diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 172917207f..2df6491a5e 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -8,6 +8,10 @@ updates:
directory: "/"
schedule:
interval: "daily"
+ - package-ecosystem: "gomod"
+ directory: "pkg"
+ schedule:
+ interval: "daily"
- package-ecosystem: "npm"
directory: "/"
schedule:
diff --git a/.github/workflows/api-sync.yml b/.github/workflows/api-sync.yml
new file mode 100644
index 0000000000..764de088c8
--- /dev/null
+++ b/.github/workflows/api-sync.yml
@@ -0,0 +1,61 @@
+name: API Sync
+
+on:
+ repository_dispatch:
+ types: [api-sync]
+ workflow_dispatch: # allow manual triggering
+
+# Add explicit permissions
+permissions:
+ contents: write
+ pull-requests: write
+
+jobs:
+ sync:
+ name: Sync API Types
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-go@v5
+ with:
+ go-version-file: go.mod
+ cache: true
+
+ - name: Run codegen
+ run: go generate
+
+ - name: Check for changes
+ id: check
+ run: |
+ if git diff --ignore-space-at-eol --exit-code --quiet pkg; then
+ echo "No changes detected"
+ echo "has_changes=false" >> $GITHUB_OUTPUT
+ else
+ echo "Changes detected"
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Create Pull Request
+ if: steps.check.outputs.has_changes == 'true'
+ id: cpr
+ uses: peter-evans/create-pull-request@v7
+ with:
+ token: ${{ secrets.GH_PAT }}
+ commit-message: "chore: sync API types from infrastructure"
+ title: "chore: sync API types from infrastructure"
+ body: |
+ This PR was automatically created to sync API types from the infrastructure repository.
+
+ Changes were detected in the generated API code after syncing with the latest spec from infrastructure.
+ branch: sync/api-types
+ base: develop
+ labels: |
+ automated pr
+ api-sync
+
+ - name: Enable Pull Request Automerge
+ if: steps.check.outputs.has_changes == 'true'
+ run: gh pr merge --auto --squash "${{ steps.cpr.outputs.pull-request-number }}"
+ env:
+ GH_TOKEN: ${{ secrets.GH_PAT }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d6bdee179c..b8f7336052 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -6,6 +6,9 @@ on:
branches:
- develop
+permissions:
+ contents: read
+
jobs:
test:
name: Test
@@ -21,8 +24,9 @@ jobs:
# Required by: internal/utils/credentials/keyring_test.go
- uses: t1m0thyj/unlock-keyring@v1
- run: |
- go run gotest.tools/gotestsum -- -race -v -count=1 -coverprofile=coverage.out \
- `go list ./... | grep -Ev 'cmd|docs|examples|pkg/api|tools'`
+ pkgs=$(go list ./pkg/... | grep -Ev 'pkg/api' | paste -sd ',' -)
+ go tool gotestsum -- -race -v -count=1 ./... \
+ -coverpkg="./cmd/...,./internal/...,${pkgs}" -coverprofile=coverage.out
- uses: coverallsapp/github-action@v2
with:
@@ -41,7 +45,7 @@ jobs:
# Linter requires no cache
cache: false
- - uses: golangci/golangci-lint-action@v6
+ - uses: golangci/golangci-lint-action@v8
with:
args: --timeout 3m --verbose
diff --git a/.github/workflows/deploy-check.yml b/.github/workflows/deploy-check.yml
index 44c2806ec5..3715958a00 100644
--- a/.github/workflows/deploy-check.yml
+++ b/.github/workflows/deploy-check.yml
@@ -1,7 +1,7 @@
name: Check Deploy
on:
- pull_request_target:
+ pull_request:
types:
- opened
- reopened
@@ -10,6 +10,9 @@ on:
branches:
- main
+permissions:
+ contents: read
+
jobs:
check:
if: github.head_ref != 'develop'
diff --git a/.github/workflows/fast-forward.yml b/.github/workflows/fast-forward.yml
index efeb443f22..c4e78c2410 100644
--- a/.github/workflows/fast-forward.yml
+++ b/.github/workflows/fast-forward.yml
@@ -27,6 +27,9 @@ jobs:
publish:
needs:
- approved
+ permissions:
+ contents: write
+ packages: write
# Call workflow explicitly because events from actions cannot trigger more actions
uses: ./.github/workflows/release.yml
secrets: inherit
diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml
index e9bcd30b10..ee7c3e5ca4 100644
--- a/.github/workflows/install.yml
+++ b/.github/workflows/install.yml
@@ -14,6 +14,9 @@ on:
- 'package.json'
- 'scripts/**'
+permissions:
+ contents: write
+
jobs:
pack:
runs-on: ubuntu-latest
@@ -99,7 +102,8 @@ jobs:
- run: npm install -g pnpm
- run: pnpm init
- - run: pnpm i --save-dev ./supabase-1.28.0.tgz
+ # https://github.com/pnpm/pnpm/issues/9124#issuecomment-2663021284
+ - run: pnpm i --save-dev ./supabase-1.28.0.tgz --allow-build=supabase
- run: pnpm supabase --version
bun:
diff --git a/.github/workflows/mirror-image.yml b/.github/workflows/mirror-image.yml
index fb0bfd5db2..82f1bc395a 100644
--- a/.github/workflows/mirror-image.yml
+++ b/.github/workflows/mirror-image.yml
@@ -13,6 +13,9 @@ on:
required: true
type: string
+permissions:
+ contents: read
+
jobs:
mirror:
runs-on: ubuntu-latest
@@ -26,7 +29,7 @@ jobs:
TAG=${{ inputs.image }}
echo "image=${TAG##*/}" >> $GITHUB_OUTPUT
- name: configure aws credentials
- uses: aws-actions/configure-aws-credentials@v4.1.0
+ uses: aws-actions/configure-aws-credentials@v4.2.1
with:
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
aws-region: us-east-1
diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml
index 0eb46d8684..d4054b3b38 100644
--- a/.github/workflows/mirror.yml
+++ b/.github/workflows/mirror.yml
@@ -19,6 +19,9 @@ on:
- submitted
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
setup:
runs-on: ubuntu-latest
@@ -46,6 +49,10 @@ jobs:
publish:
needs:
- setup
+ permissions:
+ contents: read
+ packages: write
+ id-token: write
if: ${{ needs.setup.outputs.tags != needs.setup.outputs.curr }}
strategy:
matrix:
diff --git a/.github/workflows/pg-prove.yml b/.github/workflows/pg-prove.yml
index 9844d7e614..052ac65832 100644
--- a/.github/workflows/pg-prove.yml
+++ b/.github/workflows/pg-prove.yml
@@ -3,6 +3,9 @@ name: Publish pg_prove
on:
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
settings:
runs-on: ubuntu-latest
diff --git a/.github/workflows/publish-migra.yml b/.github/workflows/publish-migra.yml
index e3db68cb64..b4a2625c54 100644
--- a/.github/workflows/publish-migra.yml
+++ b/.github/workflows/publish-migra.yml
@@ -3,6 +3,9 @@ name: Publish migra
on:
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
settings:
runs-on: ubuntu-latest
@@ -70,9 +73,9 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Merge multi-arch manifests
run: |
- docker buildx imagetools create -t ${{ needs.settings.outputs.image_tag }} \
- ${{ needs.settings.outputs.image_tag }}_amd64 \
- ${{ needs.settings.outputs.image_tag }}_arm64
+ docker buildx imagetools create -t "${{ needs.settings.outputs.image_tag }}" \
+ "${{ needs.settings.outputs.image_tag }}_amd64" \
+ "${{ needs.settings.outputs.image_tag }}_arm64"
publish:
needs:
diff --git a/.github/workflows/release-beta.yml b/.github/workflows/release-beta.yml
index bc2601c0d2..e658a7614a 100644
--- a/.github/workflows/release-beta.yml
+++ b/.github/workflows/release-beta.yml
@@ -6,6 +6,9 @@ on:
- develop
workflow_dispatch:
+permissions:
+ contents: write
+
jobs:
release:
name: semantic-release
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 8ef8b43834..369f0de896 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -6,6 +6,10 @@ on:
- main
workflow_call:
+permissions:
+ contents: write
+ packages: write
+
jobs:
settings:
runs-on: ubuntu-latest
diff --git a/.github/workflows/tag-npm.yml b/.github/workflows/tag-npm.yml
index 9eda44cba3..5787562611 100644
--- a/.github/workflows/tag-npm.yml
+++ b/.github/workflows/tag-npm.yml
@@ -13,6 +13,9 @@ on:
required: true
type: string
+permissions:
+ contents: read
+
jobs:
tag:
name: Move latest tag
diff --git a/.golangci.yml b/.golangci.yml
index b91c1afd68..634b5fe620 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,23 +1,40 @@
+version: "2"
linters:
enable:
- dogsled
- dupl
- - gofmt
- - goimports
- gosec
- misspell
- nakedret
- - stylecheck
+ - staticcheck
- unconvert
- unparam
- whitespace
- - errcheck
- - gosimple
- - staticcheck
- - ineffassign
- - unused
-linters-settings:
- stylecheck:
- checks: ["all", "-ST1003"]
- dupl:
- threshold: 250
+ settings:
+ dupl:
+ threshold: 250
+ exclusions:
+ generated: lax
+ rules:
+ - text: 'ST1003:'
+ linters:
+ - staticcheck
+ presets:
+ - comments
+ - common-false-positives
+ - legacy
+ - std-error-handling
+ paths:
+ - third_party$
+ - builtin$
+ - examples$
+formatters:
+ enable:
+ - gofmt
+ - goimports
+ exclusions:
+ generated: lax
+ paths:
+ - third_party$
+ - builtin$
+ - examples$
diff --git a/api/beta.yaml b/api/beta.yaml
deleted file mode 100644
index be28b6c21a..0000000000
--- a/api/beta.yaml
+++ /dev/null
@@ -1,6195 +0,0 @@
-openapi: 3.0.0
-paths:
- /v1/branches/{branch_id}:
- get:
- operationId: v1-get-a-branch-config
- summary: Get database branch config
- description: Fetches configurations of the specified database branch
- parameters:
- - name: branch_id
- required: true
- in: path
- description: Branch ID
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BranchDetailResponse'
- '500':
- description: Failed to retrieve database branch
- tags:
- - Environments
- security:
- - bearer: []
- patch:
- operationId: v1-update-a-branch-config
- summary: Update database branch config
- description: Updates the configuration of the specified database branch
- parameters:
- - name: branch_id
- required: true
- in: path
- description: Branch ID
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateBranchBody'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BranchResponse'
- '500':
- description: Failed to update database branch
- tags:
- - Environments
- security:
- - bearer: []
- delete:
- operationId: v1-delete-a-branch
- summary: Delete a database branch
- description: Deletes the specified database branch
- parameters:
- - name: branch_id
- required: true
- in: path
- description: Branch ID
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BranchDeleteResponse'
- '500':
- description: Failed to delete database branch
- tags:
- - Environments
- security:
- - bearer: []
- /v1/branches/{branch_id}/push:
- post:
- operationId: v1-push-a-branch
- summary: Pushes a database branch
- description: Pushes the specified database branch
- parameters:
- - name: branch_id
- required: true
- in: path
- description: Branch ID
- schema:
- type: string
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BranchUpdateResponse'
- '500':
- description: Failed to push database branch
- tags:
- - Environments
- security:
- - bearer: []
- /v1/branches/{branch_id}/reset:
- post:
- operationId: v1-reset-a-branch
- summary: Resets a database branch
- description: Resets the specified database branch
- parameters:
- - name: branch_id
- required: true
- in: path
- description: Branch ID
- schema:
- type: string
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BranchUpdateResponse'
- '500':
- description: Failed to reset database branch
- tags:
- - Environments
- security:
- - bearer: []
- /v1/projects:
- get:
- operationId: v1-list-all-projects
- summary: List all projects
- description: Returns a list of all projects you've previously created.
- parameters: []
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/V1ProjectWithDatabaseResponse'
- tags:
- - Projects
- security:
- - bearer: []
- post:
- operationId: v1-create-a-project
- summary: Create a project
- parameters: []
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1CreateProjectBodyDto'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1ProjectResponse'
- tags:
- - Projects
- security:
- - bearer: []
- /v1/organizations:
- get:
- operationId: v1-list-all-organizations
- summary: List all organizations
- description: Returns a list of organizations that you currently belong to.
- parameters: []
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/OrganizationResponseV1'
- '500':
- description: Unexpected error listing organizations
- tags:
- - Organizations
- security:
- - bearer: []
- post:
- operationId: v1-create-an-organization
- summary: Create an organization
- parameters: []
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateOrganizationV1Dto'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/OrganizationResponseV1'
- '500':
- description: Unexpected error creating an organization
- tags:
- - Organizations
- security:
- - bearer: []
- /v1/oauth/authorize:
- get:
- operationId: v1-authorize-user
- summary: '[Beta] Authorize user through oauth'
- parameters:
- - name: client_id
- required: true
- in: query
- schema:
- type: string
- - name: response_type
- required: true
- in: query
- schema:
- enum:
- - code
- - token
- - id_token token
- type: string
- - name: redirect_uri
- required: true
- in: query
- schema:
- type: string
- - name: scope
- required: false
- in: query
- schema:
- type: string
- - name: state
- required: false
- in: query
- schema:
- type: string
- - name: response_mode
- required: false
- in: query
- schema:
- type: string
- - name: code_challenge
- required: false
- in: query
- schema:
- type: string
- - name: code_challenge_method
- required: false
- in: query
- schema:
- enum:
- - plain
- - sha256
- - S256
- type: string
- responses:
- '303':
- description: ''
- tags:
- - OAuth
- security:
- - oauth2:
- - read
- /v1/oauth/token:
- post:
- operationId: v1-exchange-oauth-token
- summary: '[Beta] Exchange auth code for user''s access and refresh token'
- parameters: []
- requestBody:
- required: true
- content:
- application/x-www-form-urlencoded:
- schema:
- $ref: '#/components/schemas/OAuthTokenBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/OAuthTokenResponse'
- tags:
- - OAuth
- security:
- - oauth2:
- - write
- /v1/oauth/revoke:
- post:
- operationId: v1-revoke-token
- summary: '[Beta] Revoke oauth app authorization and it''s corresponding tokens'
- parameters: []
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/OAuthRevokeTokenBodyDto'
- responses:
- '204':
- description: ''
- tags:
- - OAuth
- security:
- - oauth2:
- - write
- /v1/snippets:
- get:
- operationId: v1-list-all-snippets
- summary: Lists SQL snippets for the logged in user
- parameters:
- - name: cursor
- required: false
- in: query
- schema:
- type: string
- - name: limit
- required: false
- in: query
- schema:
- type: string
- minimum: 1
- maximum: 100
- - name: sort_by
- required: false
- in: query
- schema:
- enum:
- - name
- - inserted_at
- type: string
- - name: sort_order
- required: false
- in: query
- schema:
- enum:
- - asc
- - desc
- type: string
- - name: project_ref
- required: false
- in: query
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SnippetList'
- '500':
- description: Failed to list user's SQL snippets
- tags:
- - Database
- security:
- - bearer: []
- /v1/snippets/{id}:
- get:
- operationId: v1-get-a-snippet
- summary: Gets a specific SQL snippet
- parameters:
- - name: id
- required: true
- in: path
- schema:
- format: uuid
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SnippetResponse'
- '500':
- description: Failed to retrieve SQL snippet
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/api-keys:
- get:
- operationId: v1-get-project-api-keys
- summary: Get project api keys
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: reveal
- required: true
- in: query
- schema:
- type: boolean
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/ApiKeyResponse'
- tags:
- - Secrets
- security:
- - bearer: []
- post:
- operationId: createApiKey
- summary: '[Alpha] Creates a new API key for the project'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: reveal
- required: true
- in: query
- schema:
- type: boolean
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateApiKeyBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiKeyResponse'
- tags:
- - Secrets
- security:
- - bearer: []
- /v1/projects/{ref}/api-keys/{id}:
- patch:
- operationId: updateApiKey
- summary: '[Alpha] Updates an API key for the project'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: id
- required: true
- in: path
- schema:
- type: string
- - name: reveal
- required: true
- in: query
- schema:
- type: boolean
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateApiKeyBody'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiKeyResponse'
- tags:
- - Secrets
- security:
- - bearer: []
- get:
- operationId: getApiKey
- summary: '[Alpha] Get API key'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: id
- required: true
- in: path
- schema:
- type: string
- - name: reveal
- required: true
- in: query
- schema:
- type: boolean
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiKeyResponse'
- tags:
- - Secrets
- security:
- - bearer: []
- delete:
- operationId: deleteApiKey
- summary: '[Alpha] Deletes an API key for the project'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: id
- required: true
- in: path
- schema:
- type: string
- - name: reveal
- required: true
- in: query
- schema:
- type: boolean
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiKeyResponse'
- '403':
- description: ''
- tags:
- - Secrets
- security:
- - bearer: []
- /v1/projects/{ref}/branches:
- get:
- operationId: v1-list-all-branches
- summary: List all database branches
- description: Returns all database branches of the specified project.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/BranchResponse'
- '500':
- description: Failed to retrieve database branches
- tags:
- - Environments
- security:
- - bearer: []
- post:
- operationId: v1-create-a-branch
- summary: Create a database branch
- description: Creates a database branch from the specified project.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateBranchBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BranchResponse'
- '500':
- description: Failed to create database branch
- tags:
- - Environments
- security:
- - bearer: []
- delete:
- operationId: v1-disable-preview-branching
- summary: Disables preview branching
- description: Disables preview branching for the specified project
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- '500':
- description: Failed to disable preview branching
- tags:
- - Environments
- security:
- - bearer: []
- /v1/projects/{ref}/custom-hostname:
- get:
- operationId: v1-get-hostname-config
- summary: '[Beta] Gets project''s custom hostname config'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateCustomHostnameResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's custom hostname config
- tags:
- - Domains
- security:
- - bearer: []
- delete:
- operationId: v1-Delete hostname config
- summary: '[Beta] Deletes a project''s custom hostname configuration'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- '403':
- description: ''
- '500':
- description: Failed to delete project custom hostname configuration
- tags:
- - Domains
- security:
- - bearer: []
- /v1/projects/{ref}/custom-hostname/initialize:
- post:
- operationId: v1-update-hostname-config
- summary: '[Beta] Updates project''s custom hostname configuration'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateCustomHostnameBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateCustomHostnameResponse'
- '403':
- description: ''
- '500':
- description: Failed to update project custom hostname configuration
- tags:
- - Domains
- security:
- - bearer: []
- /v1/projects/{ref}/custom-hostname/reverify:
- post:
- operationId: v1-verify-dns-config
- summary: >-
- [Beta] Attempts to verify the DNS configuration for project's custom
- hostname configuration
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateCustomHostnameResponse'
- '403':
- description: ''
- '500':
- description: Failed to verify project custom hostname configuration
- tags:
- - Domains
- security:
- - bearer: []
- /v1/projects/{ref}/custom-hostname/activate:
- post:
- operationId: v1-activate-custom-hostname
- summary: '[Beta] Activates a custom hostname for a project.'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateCustomHostnameResponse'
- '403':
- description: ''
- '500':
- description: Failed to activate project custom hostname configuration
- tags:
- - Domains
- security:
- - bearer: []
- /v1/projects/{ref}/network-bans/retrieve:
- post:
- operationId: v1-list-all-network-bans
- summary: '[Beta] Gets project''s network bans'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NetworkBanResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's network bans
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/network-bans:
- delete:
- operationId: v1-delete-network-bans
- summary: '[Beta] Remove network bans.'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RemoveNetworkBanRequest'
- responses:
- '200':
- description: ''
- '403':
- description: ''
- '500':
- description: Failed to remove network bans.
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/network-restrictions:
- get:
- operationId: v1-get-network-restrictions
- summary: '[Beta] Gets project''s network restrictions'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NetworkRestrictionsResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's network restrictions
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/network-restrictions/apply:
- post:
- operationId: v1-update-network-restrictions
- summary: '[Beta] Updates project''s network restrictions'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NetworkRestrictionsRequest'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NetworkRestrictionsResponse'
- '403':
- description: ''
- '500':
- description: Failed to update project network restrictions
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/pgsodium:
- get:
- operationId: v1-get-pgsodium-config
- summary: '[Beta] Gets project''s pgsodium config'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PgsodiumConfigResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's pgsodium config
- tags:
- - Secrets
- security:
- - bearer: []
- put:
- operationId: v1-update-pgsodium-config
- summary: >-
- [Beta] Updates project's pgsodium config. Updating the root_key can
- cause all data encrypted with the older key to become inaccessible.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdatePgsodiumConfigBody'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PgsodiumConfigResponse'
- '403':
- description: ''
- '500':
- description: Failed to update project's pgsodium config
- tags:
- - Secrets
- security:
- - bearer: []
- /v1/projects/{ref}/postgrest:
- get:
- operationId: v1-get-postgrest-service-config
- summary: Gets project's postgrest config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PostgrestConfigWithJWTSecretResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's postgrest config
- tags:
- - Rest
- security:
- - bearer: []
- patch:
- operationId: v1-update-postgrest-service-config
- summary: Updates project's postgrest config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdatePostgrestConfigBody'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1PostgrestConfigResponse'
- '403':
- description: ''
- '500':
- description: Failed to update project's postgrest config
- tags:
- - Rest
- security:
- - bearer: []
- /v1/projects/{ref}:
- get:
- operationId: v1-get-project
- summary: Gets a specific project that belongs to the authenticated user
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1ProjectWithDatabaseResponse'
- '500':
- description: Failed to retrieve project
- tags:
- - Projects
- security:
- - bearer: []
- delete:
- operationId: v1-delete-a-project
- summary: Deletes the given project
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1ProjectRefResponse'
- '403':
- description: ''
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/secrets:
- get:
- operationId: v1-list-all-secrets
- summary: List all secrets
- description: Returns all secrets you've previously added to the specified project.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/SecretResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's secrets
- tags:
- - Secrets
- security:
- - bearer: []
- post:
- operationId: v1-bulk-create-secrets
- summary: Bulk create secrets
- description: Creates multiple secrets and adds them to the specified project.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/CreateSecretBody'
- responses:
- '201':
- description: ''
- '403':
- description: ''
- '500':
- description: Failed to create project's secrets
- tags:
- - Secrets
- security:
- - bearer: []
- delete:
- operationId: v1-bulk-delete-secrets
- summary: Bulk delete secrets
- description: Deletes all secrets with the given names from the specified project
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: array
- items:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: object
- '403':
- description: ''
- '500':
- description: Failed to delete secrets with given names
- tags:
- - Secrets
- security:
- - bearer: []
- /v1/projects/{ref}/ssl-enforcement:
- get:
- operationId: v1-get-ssl-enforcement-config
- summary: '[Beta] Get project''s SSL enforcement configuration.'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SslEnforcementResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's SSL enforcement config
- tags:
- - Database
- security:
- - bearer: []
- put:
- operationId: v1-update-ssl-enforcement-config
- summary: '[Beta] Update project''s SSL enforcement configuration.'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SslEnforcementRequest'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SslEnforcementResponse'
- '403':
- description: ''
- '500':
- description: Failed to update project's SSL enforcement configuration.
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/types/typescript:
- get:
- operationId: v1-generate-typescript-types
- summary: Generate TypeScript types
- description: Returns the TypeScript types of your schema for use with supabase-js.
- parameters:
- - name: included_schemas
- required: false
- in: query
- schema:
- default: public
- type: string
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TypescriptResponse'
- '403':
- description: ''
- '500':
- description: Failed to generate TypeScript types
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/vanity-subdomain:
- get:
- operationId: v1-get-vanity-subdomain-config
- summary: '[Beta] Gets current vanity subdomain config'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/VanitySubdomainConfigResponse'
- '403':
- description: ''
- '500':
- description: Failed to get project vanity subdomain configuration
- tags:
- - Domains
- security:
- - bearer: []
- delete:
- operationId: v1-deactivate-vanity-subdomain-config
- summary: '[Beta] Deletes a project''s vanity subdomain configuration'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- '403':
- description: ''
- '500':
- description: Failed to delete project vanity subdomain configuration
- tags:
- - Domains
- security:
- - bearer: []
- /v1/projects/{ref}/vanity-subdomain/check-availability:
- post:
- operationId: v1-check-vanity-subdomain-availability
- summary: '[Beta] Checks vanity subdomain availability'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/VanitySubdomainBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SubdomainAvailabilityResponse'
- '403':
- description: ''
- '500':
- description: Failed to check project vanity subdomain configuration
- tags:
- - Domains
- security:
- - bearer: []
- /v1/projects/{ref}/vanity-subdomain/activate:
- post:
- operationId: v1-activate-vanity-subdomain-config
- summary: '[Beta] Activates a vanity subdomain for a project.'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/VanitySubdomainBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ActivateVanitySubdomainResponse'
- '403':
- description: ''
- '500':
- description: Failed to activate project vanity subdomain configuration
- tags:
- - Domains
- security:
- - bearer: []
- /v1/projects/{ref}/upgrade:
- post:
- operationId: v1-upgrade-postgres-version
- summary: '[Beta] Upgrades the project''s Postgres version'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpgradeDatabaseBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ProjectUpgradeInitiateResponse'
- '403':
- description: ''
- '500':
- description: Failed to initiate project upgrade
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/upgrade/eligibility:
- get:
- operationId: v1-get-postgres-upgrade-eligibility
- summary: '[Beta] Returns the project''s eligibility for upgrades'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ProjectUpgradeEligibilityResponse'
- '403':
- description: ''
- '500':
- description: Failed to determine project upgrade eligibility
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/upgrade/status:
- get:
- operationId: v1-get-postgres-upgrade-status
- summary: '[Beta] Gets the latest status of the project''s upgrade'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: tracking_id
- required: false
- in: query
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DatabaseUpgradeStatusResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project upgrade status
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/readonly:
- get:
- operationId: v1-get-readonly-mode-status
- summary: Returns project's readonly mode status
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReadOnlyStatusResponse'
- '500':
- description: Failed to get project readonly mode status
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/readonly/temporary-disable:
- post:
- operationId: v1-disable-readonly-mode-temporarily
- summary: Disables project's readonly mode for the next 15 minutes
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '201':
- description: ''
- '500':
- description: Failed to disable project's readonly mode
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/read-replicas/setup:
- post:
- operationId: v1-setup-a-read-replica
- summary: '[Beta] Set up a read replica'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SetUpReadReplicaBody'
- responses:
- '201':
- description: ''
- '403':
- description: ''
- '500':
- description: Failed to set up read replica
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/read-replicas/remove:
- post:
- operationId: v1-remove-a-read-replica
- summary: '[Beta] Remove a read replica'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RemoveReadReplicaBody'
- responses:
- '201':
- description: ''
- '403':
- description: ''
- '500':
- description: Failed to remove read replica
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/health:
- get:
- operationId: v1-get-services-health
- summary: Gets project's service health status
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: timeout_ms
- required: false
- in: query
- schema:
- minimum: 0
- maximum: 10000
- type: integer
- - name: services
- required: true
- in: query
- schema:
- type: array
- items:
- type: string
- enum:
- - auth
- - db
- - pooler
- - realtime
- - rest
- - storage
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/V1ServiceHealthResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's service health status
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/config/storage:
- get:
- operationId: v1-get-storage-config
- summary: Gets project's storage config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/StorageConfigResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's storage config
- tags:
- - Storage
- security:
- - bearer: []
- patch:
- operationId: v1-update-storage-config
- summary: Updates project's storage config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateStorageConfigBody'
- responses:
- '200':
- description: ''
- '403':
- description: ''
- '500':
- description: Failed to update project's storage config
- tags:
- - Storage
- security:
- - bearer: []
- /v1/projects/{ref}/config/database/postgres:
- get:
- operationId: v1-get-postgres-config
- summary: Gets project's Postgres config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PostgresConfigResponse'
- '500':
- description: Failed to retrieve project's Postgres config
- tags:
- - Database
- security:
- - bearer: []
- put:
- operationId: v1-update-postgres-config
- summary: Updates project's Postgres config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdatePostgresConfigBody'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PostgresConfigResponse'
- '403':
- description: ''
- '500':
- description: Failed to update project's Postgres config
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/config/database/pgbouncer:
- get:
- operationId: v1-get-project-pgbouncer-config
- summary: Get project's pgbouncer config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1PgbouncerConfigResponse'
- '500':
- description: Failed to retrieve project's pgbouncer config
- tags:
- - Database
- /v1/projects/{ref}/config/database/pooler:
- get:
- operationId: v1-get-supavisor-config
- summary: Gets project's supavisor config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/SupavisorConfigResponse'
- '500':
- description: Failed to retrieve project's supavisor config
- tags:
- - Database
- security:
- - bearer: []
- patch:
- operationId: v1-update-supavisor-config
- summary: Updates project's supavisor config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateSupavisorConfigBody'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateSupavisorConfigResponse'
- '403':
- description: ''
- '500':
- description: Failed to update project's supavisor config
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/config/auth:
- get:
- operationId: v1-get-auth-service-config
- summary: Gets project's auth config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AuthConfigResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's auth config
- tags:
- - Auth
- security:
- - bearer: []
- patch:
- operationId: v1-update-auth-service-config
- summary: Updates a project's auth config
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateAuthConfigBody'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AuthConfigResponse'
- '403':
- description: ''
- '500':
- description: Failed to update project's auth config
- tags:
- - Auth
- security:
- - bearer: []
- /v1/projects/{ref}/config/auth/third-party-auth:
- post:
- operationId: createTPAForProject
- summary: Creates a new third-party auth integration
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateThirdPartyAuthBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ThirdPartyAuth'
- '403':
- description: ''
- tags:
- - Auth
- security:
- - bearer: []
- get:
- operationId: listTPAForProject
- summary: '[Alpha] Lists all third-party auth integrations'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/ThirdPartyAuth'
- '403':
- description: ''
- tags:
- - Auth
- security:
- - bearer: []
- /v1/projects/{ref}/config/auth/third-party-auth/{tpa_id}:
- delete:
- operationId: deleteTPAForProject
- summary: '[Alpha] Removes a third-party auth integration'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: tpa_id
- required: true
- in: path
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ThirdPartyAuth'
- '403':
- description: ''
- tags:
- - Auth
- security:
- - bearer: []
- get:
- operationId: getTPAForProject
- summary: '[Alpha] Get a third-party integration'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: tpa_id
- required: true
- in: path
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ThirdPartyAuth'
- '403':
- description: ''
- tags:
- - Auth
- security:
- - bearer: []
- /v1/projects/{ref}/pause:
- post:
- operationId: v1-pause-a-project
- summary: Pauses the given project
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- '403':
- description: ''
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/restore:
- get:
- operationId: v1-list-available-restore-versions
- summary: Lists available restore versions for the given project
- parameters:
- - name: ref
- required: true
- in: path
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: >-
- #/components/schemas/GetProjectAvailableRestoreVersionsResponse
- '403':
- description: ''
- tags:
- - Projects
- security:
- - bearer: []
- post:
- operationId: v1-restore-a-project
- summary: Restores the given project
- parameters:
- - name: ref
- required: true
- in: path
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RestoreProjectBodyDto'
- responses:
- '200':
- description: ''
- '403':
- description: ''
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/restore/cancel:
- post:
- operationId: v1-cancel-a-project-restoration
- summary: Cancels the given project restoration
- parameters:
- - name: ref
- required: true
- in: path
- schema:
- type: string
- responses:
- '200':
- description: ''
- '403':
- description: ''
- tags:
- - Projects
- security:
- - bearer: []
- /v1/projects/{ref}/analytics/endpoints/logs.all:
- get:
- operationId: getLogs
- summary: Gets project's logs
- parameters:
- - name: iso_timestamp_end
- required: false
- in: query
- schema:
- type: string
- - name: iso_timestamp_start
- required: false
- in: query
- schema:
- type: string
- - name: sql
- required: false
- in: query
- schema:
- type: string
- - name: ref
- required: true
- in: path
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1AnalyticsResponse'
- '403':
- description: ''
- tags:
- - Analytics
- security:
- - bearer: []
- /v1/projects/{ref}/database/query:
- post:
- operationId: v1-run-a-query
- summary: '[Beta] Run sql query'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1RunQueryBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- type: object
- '403':
- description: ''
- '500':
- description: Failed to run sql query
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/database/webhooks/enable:
- post:
- operationId: v1-enable-database-webhook
- summary: '[Beta] Enables Database Webhooks on the project'
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '201':
- description: ''
- '403':
- description: ''
- '500':
- description: Failed to enable Database Webhooks on the project
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/database/context:
- get:
- operationId: getDatabaseMetadata
- summary: Gets database metadata for the given project.
- description: >-
- This is an **experimental** endpoint. It is subject to change or removal
- in future versions. Use it with caution, as it may not remain supported
- or stable.
- deprecated: true
- parameters:
- - name: ref
- required: true
- in: path
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetProjectDbMetadataResponseDto'
- '403':
- description: ''
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/functions:
- get:
- operationId: v1-list-all-functions
- summary: List all functions
- description: Returns all functions you've previously added to the specified project.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/FunctionResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve project's functions
- tags:
- - Edge Functions
- security:
- - bearer: []
- post:
- operationId: v1-create-a-function
- summary: Create a function
- description: Creates a function and adds it to the specified project.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: slug
- required: false
- in: query
- schema:
- pattern: /^[A-Za-z0-9_-]+$/
- type: string
- - name: name
- required: false
- in: query
- schema:
- type: string
- - name: verify_jwt
- required: false
- in: query
- schema:
- type: boolean
- - name: import_map
- required: false
- in: query
- schema:
- type: boolean
- - name: entrypoint_path
- required: false
- in: query
- schema:
- type: string
- - name: import_map_path
- required: false
- in: query
- schema:
- type: string
- - name: compute_multiplier
- required: false
- in: query
- schema:
- minimum: 1
- maximum: 4
- type: number
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1CreateFunctionBody'
- application/vnd.denoland.eszip:
- schema:
- $ref: '#/components/schemas/V1CreateFunctionBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/FunctionResponse'
- '403':
- description: ''
- '500':
- description: Failed to create project's function
- tags:
- - Edge Functions
- security:
- - bearer: []
- put:
- operationId: v1-bulk-update-functions
- summary: Bulk update functions
- description: >-
- Bulk update functions. It will create a new function or replace
- existing. The operation is idempotent. NOTE: You will need to manually
- bump the version.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/BulkUpdateFunctionBody'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BulkUpdateFunctionResponse'
- '403':
- description: ''
- '500':
- description: Failed to update functions
- tags:
- - Edge Functions
- security:
- - bearer: []
- /v1/projects/{ref}/functions/deploy:
- post:
- operationId: v1-deploy-a-function
- summary: Deploy a function
- description: >-
- A new endpoint to deploy functions. It will create if function does not
- exist.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: slug
- required: false
- in: query
- schema:
- pattern: /^[A-Za-z0-9_-]+$/
- type: string
- - name: bundleOnly
- required: false
- in: query
- schema:
- type: boolean
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- $ref: '#/components/schemas/FunctionDeployBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DeployFunctionResponse'
- '403':
- description: ''
- '500':
- description: Failed to deploy function
- tags:
- - Edge Functions
- security:
- - bearer: []
- /v1/projects/{ref}/functions/{function_slug}:
- get:
- operationId: v1-get-a-function
- summary: Retrieve a function
- description: Retrieves a function with the specified slug and project.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: function_slug
- required: true
- in: path
- description: Function slug
- schema:
- pattern: /^[A-Za-z0-9_-]+$/
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/FunctionSlugResponse'
- '403':
- description: ''
- '500':
- description: Failed to retrieve function with given slug
- tags:
- - Edge Functions
- security:
- - bearer: []
- patch:
- operationId: v1-update-a-function
- summary: Update a function
- description: Updates a function with the specified slug and project.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: function_slug
- required: true
- in: path
- description: Function slug
- schema:
- pattern: /^[A-Za-z0-9_-]+$/
- type: string
- - name: slug
- required: false
- in: query
- schema:
- pattern: /^[A-Za-z0-9_-]+$/
- type: string
- - name: name
- required: false
- in: query
- schema:
- type: string
- - name: verify_jwt
- required: false
- in: query
- schema:
- type: boolean
- - name: import_map
- required: false
- in: query
- schema:
- type: boolean
- - name: entrypoint_path
- required: false
- in: query
- schema:
- type: string
- - name: import_map_path
- required: false
- in: query
- schema:
- type: string
- - name: compute_multiplier
- required: false
- in: query
- schema:
- minimum: 1
- maximum: 4
- type: number
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1UpdateFunctionBody'
- application/vnd.denoland.eszip:
- schema:
- $ref: '#/components/schemas/V1UpdateFunctionBody'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/FunctionResponse'
- '403':
- description: ''
- '500':
- description: Failed to update function with given slug
- tags:
- - Edge Functions
- security:
- - bearer: []
- delete:
- operationId: v1-delete-a-function
- summary: Delete a function
- description: Deletes a function with the specified slug from the specified project.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: function_slug
- required: true
- in: path
- description: Function slug
- schema:
- pattern: /^[A-Za-z0-9_-]+$/
- type: string
- responses:
- '200':
- description: ''
- '403':
- description: ''
- '500':
- description: Failed to delete function with given slug
- tags:
- - Edge Functions
- security:
- - bearer: []
- /v1/projects/{ref}/functions/{function_slug}/body:
- get:
- operationId: v1-get-a-function-body
- summary: Retrieve a function body
- description: Retrieves a function body for the specified slug and project.
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: function_slug
- required: true
- in: path
- description: Function slug
- schema:
- pattern: /^[A-Za-z0-9_-]+$/
- type: string
- responses:
- '200':
- description: ''
- '403':
- description: ''
- '500':
- description: Failed to retrieve function body with given slug
- tags:
- - Edge Functions
- security:
- - bearer: []
- /v1/projects/{ref}/storage/buckets:
- get:
- operationId: v1-list-all-buckets
- summary: Lists all buckets
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/V1StorageBucketResponse'
- '403':
- description: ''
- '500':
- description: Failed to get list of buckets
- tags:
- - Storage
- security:
- - bearer: []
- /v1/projects/{ref}/config/auth/sso/providers:
- post:
- operationId: v1-create-a-sso-provider
- summary: Creates a new SSO provider
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateProviderBody'
- responses:
- '201':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateProviderResponse'
- '403':
- description: ''
- '404':
- description: SAML 2.0 support is not enabled for this project
- tags:
- - Auth
- security:
- - bearer: []
- get:
- operationId: v1-list-all-sso-provider
- summary: Lists all SSO providers
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ListProvidersResponse'
- '403':
- description: ''
- '404':
- description: SAML 2.0 support is not enabled for this project
- tags:
- - Auth
- security:
- - bearer: []
- /v1/projects/{ref}/config/auth/sso/providers/{provider_id}:
- get:
- operationId: v1-get-a-sso-provider
- summary: Gets a SSO provider by its UUID
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: provider_id
- required: true
- in: path
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GetProviderResponse'
- '403':
- description: ''
- '404':
- description: >-
- Either SAML 2.0 was not enabled for this project, or the provider
- does not exist
- tags:
- - Auth
- security:
- - bearer: []
- put:
- operationId: v1-update-a-sso-provider
- summary: Updates a SSO provider by its UUID
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: provider_id
- required: true
- in: path
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateProviderBody'
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateProviderResponse'
- '403':
- description: ''
- '404':
- description: >-
- Either SAML 2.0 was not enabled for this project, or the provider
- does not exist
- tags:
- - Auth
- security:
- - bearer: []
- delete:
- operationId: v1-delete-a-sso-provider
- summary: Removes a SSO provider by its UUID
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- - name: provider_id
- required: true
- in: path
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DeleteProviderResponse'
- '403':
- description: ''
- '404':
- description: >-
- Either SAML 2.0 was not enabled for this project, or the provider
- does not exist
- tags:
- - Auth
- security:
- - bearer: []
- /v1/projects/{ref}/database/backups:
- get:
- operationId: v1-list-all-backups
- summary: Lists all backups
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1BackupsResponse'
- '500':
- description: Failed to get backups
- tags:
- - Database
- security:
- - bearer: []
- /v1/projects/{ref}/database/backups/restore-pitr:
- post:
- operationId: v1-restore-pitr-backup
- summary: Restores a PITR backup for a database
- parameters:
- - name: ref
- required: true
- in: path
- description: Project ref
- schema:
- minLength: 20
- maxLength: 20
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1RestorePitrBody'
- responses:
- '201':
- description: ''
- tags:
- - Database
- security:
- - bearer: []
- /v1/organizations/{slug}/members:
- get:
- operationId: v1-list-organization-members
- summary: List members of an organization
- parameters:
- - name: slug
- required: true
- in: path
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/V1OrganizationMemberResponse'
- tags:
- - Organizations
- security:
- - bearer: []
- /v1/organizations/{slug}:
- get:
- operationId: v1-get-an-organization
- summary: Gets information about the organization
- parameters:
- - name: slug
- required: true
- in: path
- schema:
- type: string
- responses:
- '200':
- description: ''
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/V1OrganizationSlugResponse'
- tags:
- - Organizations
- security:
- - bearer: []
-info:
- title: Supabase API (v1)
- description: >-
- Supabase API generated from the OpenAPI specification.
Visit
- [https://supabase.com/docs](https://supabase.com/docs) for a complete
- documentation.
- version: 1.0.0
- contact: {}
-tags:
- - name: Auth
- description: Auth related endpoints
- - name: Database
- description: Database related endpoints
- - name: Domains
- description: Domains related endpoints
- - name: Edge Functions
- description: Edge related endpoints
- - name: Environments
- description: Environments related endpoints
- - name: OAuth
- description: OAuth related endpoints
- - name: Organizations
- description: Organizations related endpoints
- - name: Projects
- description: Projects related endpoints
- - name: Rest
- description: Rest related endpoints
- - name: Secrets
- description: Secrets related endpoints
- - name: Storage
- description: Storage related endpoints
-servers: []
-components:
- securitySchemes:
- bearer:
- scheme: bearer
- bearerFormat: JWT
- type: http
- schemas:
- BranchDetailResponse:
- type: object
- properties:
- status:
- type: string
- enum:
- - INACTIVE
- - ACTIVE_HEALTHY
- - ACTIVE_UNHEALTHY
- - COMING_UP
- - UNKNOWN
- - GOING_DOWN
- - INIT_FAILED
- - REMOVED
- - RESTORING
- - UPGRADING
- - PAUSING
- - RESTORE_FAILED
- - RESTARTING
- - PAUSE_FAILED
- - RESIZING
- db_port:
- type: integer
- ref:
- type: string
- postgres_version:
- type: string
- postgres_engine:
- type: string
- release_channel:
- type: string
- db_host:
- type: string
- db_user:
- type: string
- db_pass:
- type: string
- jwt_secret:
- type: string
- required:
- - status
- - db_port
- - ref
- - postgres_version
- - postgres_engine
- - release_channel
- - db_host
- UpdateBranchBody:
- type: object
- properties:
- reset_on_push:
- type: boolean
- deprecated: true
- description: >-
- This field is deprecated and will be ignored. Use v1-reset-a-branch
- endpoint directly instead.
- branch_name:
- type: string
- git_branch:
- type: string
- persistent:
- type: boolean
- status:
- type: string
- enum:
- - CREATING_PROJECT
- - RUNNING_MIGRATIONS
- - MIGRATIONS_PASSED
- - MIGRATIONS_FAILED
- - FUNCTIONS_DEPLOYED
- - FUNCTIONS_FAILED
- BranchResponse:
- type: object
- properties:
- pr_number:
- type: integer
- format: int32
- latest_check_run_id:
- type: number
- deprecated: true
- description: This field is deprecated and will not be populated.
- status:
- type: string
- enum:
- - CREATING_PROJECT
- - RUNNING_MIGRATIONS
- - MIGRATIONS_PASSED
- - MIGRATIONS_FAILED
- - FUNCTIONS_DEPLOYED
- - FUNCTIONS_FAILED
- id:
- type: string
- name:
- type: string
- project_ref:
- type: string
- parent_project_ref:
- type: string
- is_default:
- type: boolean
- git_branch:
- type: string
- persistent:
- type: boolean
- created_at:
- type: string
- updated_at:
- type: string
- required:
- - status
- - id
- - name
- - project_ref
- - parent_project_ref
- - is_default
- - persistent
- - created_at
- - updated_at
- BranchDeleteResponse:
- type: object
- properties:
- message:
- type: string
- required:
- - message
- BranchUpdateResponse:
- type: object
- properties:
- workflow_run_id:
- type: string
- message:
- type: string
- required:
- - workflow_run_id
- - message
- V1DatabaseResponse:
- type: object
- properties:
- host:
- type: string
- description: Database host
- version:
- type: string
- description: Database version
- postgres_engine:
- type: string
- description: Database engine
- release_channel:
- type: string
- description: Release channel
- required:
- - host
- - version
- - postgres_engine
- - release_channel
- V1ProjectWithDatabaseResponse:
- type: object
- properties:
- id:
- type: string
- description: Id of your project
- organization_id:
- type: string
- description: Slug of your organization
- name:
- type: string
- description: Name of your project
- region:
- type: string
- description: Region of your project
- example: us-east-1
- created_at:
- type: string
- description: Creation timestamp
- example: '2023-03-29T16:32:59Z'
- status:
- type: string
- enum:
- - INACTIVE
- - ACTIVE_HEALTHY
- - ACTIVE_UNHEALTHY
- - COMING_UP
- - UNKNOWN
- - GOING_DOWN
- - INIT_FAILED
- - REMOVED
- - RESTORING
- - UPGRADING
- - PAUSING
- - RESTORE_FAILED
- - RESTARTING
- - PAUSE_FAILED
- - RESIZING
- database:
- $ref: '#/components/schemas/V1DatabaseResponse'
- required:
- - id
- - organization_id
- - name
- - region
- - created_at
- - status
- - database
- V1CreateProjectBodyDto:
- type: object
- properties:
- db_pass:
- type: string
- description: Database password
- name:
- type: string
- description: Name of your project
- organization_id:
- type: string
- description: Slug of your organization
- plan:
- type: string
- enum:
- - free
- - pro
- deprecated: true
- description: >-
- Subscription Plan is now set on organization level and is ignored in
- this request
- region:
- type: string
- description: Region you want your server to reside in
- enum:
- - us-east-1
- - us-east-2
- - us-west-1
- - us-west-2
- - ap-east-1
- - ap-southeast-1
- - ap-northeast-1
- - ap-northeast-2
- - ap-southeast-2
- - eu-west-1
- - eu-west-2
- - eu-west-3
- - eu-north-1
- - eu-central-1
- - eu-central-2
- - ca-central-1
- - ap-south-1
- - sa-east-1
- kps_enabled:
- type: boolean
- deprecated: true
- description: This field is deprecated and is ignored in this request
- desired_instance_size:
- type: string
- enum:
- - micro
- - small
- - medium
- - large
- - xlarge
- - 2xlarge
- - 4xlarge
- - 8xlarge
- - 12xlarge
- - 16xlarge
- template_url:
- type: string
- format: uri
- description: Template URL used to create the project from the CLI.
- example: >-
- https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone
- required:
- - db_pass
- - name
- - organization_id
- - region
- additionalProperties: false
- hideDefinitions:
- - release_channel
- - postgres_engine
- V1ProjectResponse:
- type: object
- properties:
- id:
- type: string
- description: Id of your project
- organization_id:
- type: string
- description: Slug of your organization
- name:
- type: string
- description: Name of your project
- region:
- type: string
- description: Region of your project
- example: us-east-1
- created_at:
- type: string
- description: Creation timestamp
- example: '2023-03-29T16:32:59Z'
- status:
- type: string
- enum:
- - INACTIVE
- - ACTIVE_HEALTHY
- - ACTIVE_UNHEALTHY
- - COMING_UP
- - UNKNOWN
- - GOING_DOWN
- - INIT_FAILED
- - REMOVED
- - RESTORING
- - UPGRADING
- - PAUSING
- - RESTORE_FAILED
- - RESTARTING
- - PAUSE_FAILED
- - RESIZING
- required:
- - id
- - organization_id
- - name
- - region
- - created_at
- - status
- OrganizationResponseV1:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- required:
- - id
- - name
- CreateOrganizationV1Dto:
- type: object
- properties:
- name:
- type: string
- required:
- - name
- additionalProperties: false
- OAuthTokenBody:
- type: object
- properties:
- grant_type:
- enum:
- - authorization_code
- - refresh_token
- type: string
- client_id:
- type: string
- client_secret:
- type: string
- code:
- type: string
- code_verifier:
- type: string
- redirect_uri:
- type: string
- refresh_token:
- type: string
- required:
- - grant_type
- - client_id
- - client_secret
- OAuthTokenResponse:
- type: object
- properties:
- expires_in:
- type: integer
- format: int64
- token_type:
- type: string
- enum:
- - Bearer
- access_token:
- type: string
- refresh_token:
- type: string
- required:
- - expires_in
- - token_type
- - access_token
- - refresh_token
- OAuthRevokeTokenBodyDto:
- type: object
- properties:
- client_id:
- type: string
- format: uuid
- client_secret:
- type: string
- refresh_token:
- type: string
- required:
- - client_id
- - client_secret
- - refresh_token
- additionalProperties: false
- SnippetProject:
- type: object
- properties:
- id:
- type: integer
- format: int64
- name:
- type: string
- required:
- - id
- - name
- SnippetUser:
- type: object
- properties:
- id:
- type: integer
- format: int64
- username:
- type: string
- required:
- - id
- - username
- SnippetMeta:
- type: object
- properties:
- id:
- type: string
- inserted_at:
- type: string
- updated_at:
- type: string
- type:
- type: string
- enum:
- - sql
- visibility:
- type: string
- enum:
- - user
- - project
- - org
- - public
- name:
- type: string
- description:
- type: string
- nullable: true
- project:
- $ref: '#/components/schemas/SnippetProject'
- owner:
- $ref: '#/components/schemas/SnippetUser'
- updated_by:
- $ref: '#/components/schemas/SnippetUser'
- required:
- - id
- - inserted_at
- - updated_at
- - type
- - visibility
- - name
- - description
- - project
- - owner
- - updated_by
- SnippetList:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/SnippetMeta'
- cursor:
- type: string
- required:
- - data
- SnippetContent:
- type: object
- properties:
- favorite:
- type: boolean
- schema_version:
- type: string
- sql:
- type: string
- required:
- - favorite
- - schema_version
- - sql
- SnippetResponse:
- type: object
- properties:
- id:
- type: string
- inserted_at:
- type: string
- updated_at:
- type: string
- type:
- type: string
- enum:
- - sql
- visibility:
- enum:
- - user
- - project
- - org
- - public
- type: string
- name:
- type: string
- description:
- type: string
- nullable: true
- project:
- $ref: '#/components/schemas/SnippetProject'
- owner:
- $ref: '#/components/schemas/SnippetUser'
- updated_by:
- $ref: '#/components/schemas/SnippetUser'
- content:
- $ref: '#/components/schemas/SnippetContent'
- required:
- - id
- - inserted_at
- - updated_at
- - type
- - visibility
- - name
- - description
- - project
- - owner
- - updated_by
- - content
- ApiKeySecretJWTTemplate:
- type: object
- properties:
- role:
- type: string
- required:
- - role
- ApiKeyResponse:
- type: object
- properties:
- type:
- nullable: true
- type: string
- enum:
- - publishable
- - secret
- - legacy
- name:
- type: string
- api_key:
- type: string
- id:
- type: string
- nullable: true
- prefix:
- type: string
- nullable: true
- description:
- type: string
- nullable: true
- hash:
- type: string
- nullable: true
- secret_jwt_template:
- nullable: true
- allOf:
- - $ref: '#/components/schemas/ApiKeySecretJWTTemplate'
- inserted_at:
- type: string
- nullable: true
- updated_at:
- type: string
- nullable: true
- required:
- - name
- - api_key
- CreateApiKeyBody:
- type: object
- properties:
- type:
- enum:
- - publishable
- - secret
- type: string
- description:
- type: string
- nullable: true
- secret_jwt_template:
- nullable: true
- allOf:
- - $ref: '#/components/schemas/ApiKeySecretJWTTemplate'
- required:
- - type
- UpdateApiKeyBody:
- type: object
- properties:
- description:
- type: string
- nullable: true
- secret_jwt_template:
- nullable: true
- allOf:
- - $ref: '#/components/schemas/ApiKeySecretJWTTemplate'
- DesiredInstanceSize:
- type: string
- enum:
- - micro
- - small
- - medium
- - large
- - xlarge
- - 2xlarge
- - 4xlarge
- - 8xlarge
- - 12xlarge
- - 16xlarge
- ReleaseChannel:
- type: string
- enum:
- - internal
- - alpha
- - beta
- - ga
- - withdrawn
- - preview
- PostgresEngine:
- type: string
- description: >-
- Postgres engine version. If not provided, the latest version will be
- used.
- enum:
- - '15'
- - 17-oriole
- CreateBranchBody:
- type: object
- properties:
- desired_instance_size:
- $ref: '#/components/schemas/DesiredInstanceSize'
- release_channel:
- $ref: '#/components/schemas/ReleaseChannel'
- postgres_engine:
- $ref: '#/components/schemas/PostgresEngine'
- branch_name:
- type: string
- git_branch:
- type: string
- persistent:
- type: boolean
- region:
- type: string
- required:
- - branch_name
- ValidationRecord:
- type: object
- properties:
- txt_name:
- type: string
- txt_value:
- type: string
- required:
- - txt_name
- - txt_value
- ValidationError:
- type: object
- properties:
- message:
- type: string
- required:
- - message
- SslValidation:
- type: object
- properties:
- status:
- type: string
- validation_records:
- type: array
- items:
- $ref: '#/components/schemas/ValidationRecord'
- validation_errors:
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- required:
- - status
- - validation_records
- OwnershipVerification:
- type: object
- properties:
- type:
- type: string
- name:
- type: string
- value:
- type: string
- required:
- - type
- - name
- - value
- CustomHostnameDetails:
- type: object
- properties:
- id:
- type: string
- hostname:
- type: string
- ssl:
- $ref: '#/components/schemas/SslValidation'
- ownership_verification:
- $ref: '#/components/schemas/OwnershipVerification'
- custom_origin_server:
- type: string
- verification_errors:
- type: array
- items:
- type: string
- status:
- type: string
- required:
- - id
- - hostname
- - ssl
- - ownership_verification
- - custom_origin_server
- - status
- CfResponse:
- type: object
- properties:
- success:
- type: boolean
- errors:
- type: array
- items:
- type: object
- messages:
- type: array
- items:
- type: object
- result:
- $ref: '#/components/schemas/CustomHostnameDetails'
- required:
- - success
- - errors
- - messages
- - result
- UpdateCustomHostnameResponse:
- type: object
- properties:
- status:
- enum:
- - 1_not_started
- - 2_initiated
- - 3_challenge_verified
- - 4_origin_setup_completed
- - 5_services_reconfigured
- type: string
- custom_hostname:
- type: string
- data:
- $ref: '#/components/schemas/CfResponse'
- required:
- - status
- - custom_hostname
- - data
- UpdateCustomHostnameBody:
- type: object
- properties:
- custom_hostname:
- type: string
- required:
- - custom_hostname
- NetworkBanResponse:
- type: object
- properties:
- banned_ipv4_addresses:
- type: array
- items:
- type: string
- required:
- - banned_ipv4_addresses
- RemoveNetworkBanRequest:
- type: object
- properties:
- ipv4_addresses:
- type: array
- items:
- type: string
- required:
- - ipv4_addresses
- NetworkRestrictionsRequest:
- type: object
- properties:
- dbAllowedCidrs:
- type: array
- items:
- type: string
- dbAllowedCidrsV6:
- type: array
- items:
- type: string
- NetworkRestrictionsResponse:
- type: object
- properties:
- entitlement:
- enum:
- - disallowed
- - allowed
- type: string
- config:
- $ref: '#/components/schemas/NetworkRestrictionsRequest'
- old_config:
- $ref: '#/components/schemas/NetworkRestrictionsRequest'
- status:
- enum:
- - stored
- - applied
- type: string
- required:
- - entitlement
- - config
- - status
- PgsodiumConfigResponse:
- type: object
- properties:
- root_key:
- type: string
- required:
- - root_key
- UpdatePgsodiumConfigBody:
- type: object
- properties:
- root_key:
- type: string
- required:
- - root_key
- PostgrestConfigWithJWTSecretResponse:
- type: object
- properties:
- max_rows:
- type: integer
- db_pool:
- type: integer
- nullable: true
- description: >-
- If `null`, the value is automatically configured based on compute
- size.
- db_schema:
- type: string
- db_extra_search_path:
- type: string
- jwt_secret:
- type: string
- required:
- - max_rows
- - db_pool
- - db_schema
- - db_extra_search_path
- UpdatePostgrestConfigBody:
- type: object
- properties:
- max_rows:
- type: integer
- minimum: 0
- maximum: 1000000
- db_pool:
- type: integer
- minimum: 0
- maximum: 1000
- db_extra_search_path:
- type: string
- db_schema:
- type: string
- V1PostgrestConfigResponse:
- type: object
- properties:
- max_rows:
- type: integer
- db_pool:
- type: integer
- nullable: true
- description: >-
- If `null`, the value is automatically configured based on compute
- size.
- db_schema:
- type: string
- db_extra_search_path:
- type: string
- required:
- - max_rows
- - db_pool
- - db_schema
- - db_extra_search_path
- V1ProjectRefResponse:
- type: object
- properties:
- id:
- type: integer
- format: int64
- ref:
- type: string
- name:
- type: string
- required:
- - id
- - ref
- - name
- SecretResponse:
- type: object
- properties:
- name:
- type: string
- value:
- type: string
- required:
- - name
- - value
- CreateSecretBody:
- type: object
- properties:
- name:
- type: string
- maxLength: 256
- pattern: /^(?!SUPABASE_).*/
- description: Secret name must not start with the SUPABASE_ prefix.
- example: string
- value:
- type: string
- maxLength: 24576
- required:
- - name
- - value
- SslEnforcements:
- type: object
- properties:
- database:
- type: boolean
- required:
- - database
- SslEnforcementResponse:
- type: object
- properties:
- currentConfig:
- $ref: '#/components/schemas/SslEnforcements'
- appliedSuccessfully:
- type: boolean
- required:
- - currentConfig
- - appliedSuccessfully
- SslEnforcementRequest:
- type: object
- properties:
- requestedConfig:
- $ref: '#/components/schemas/SslEnforcements'
- required:
- - requestedConfig
- TypescriptResponse:
- type: object
- properties:
- types:
- type: string
- required:
- - types
- VanitySubdomainConfigResponse:
- type: object
- properties:
- status:
- enum:
- - not-used
- - custom-domain-used
- - active
- type: string
- custom_domain:
- type: string
- required:
- - status
- VanitySubdomainBody:
- type: object
- properties:
- vanity_subdomain:
- type: string
- required:
- - vanity_subdomain
- SubdomainAvailabilityResponse:
- type: object
- properties:
- available:
- type: boolean
- required:
- - available
- ActivateVanitySubdomainResponse:
- type: object
- properties:
- custom_domain:
- type: string
- required:
- - custom_domain
- UpgradeDatabaseBody:
- type: object
- properties:
- release_channel:
- $ref: '#/components/schemas/ReleaseChannel'
- target_version:
- type: string
- required:
- - release_channel
- - target_version
- ProjectUpgradeInitiateResponse:
- type: object
- properties:
- tracking_id:
- type: string
- required:
- - tracking_id
- ProjectVersion:
- type: object
- properties:
- postgres_version:
- $ref: '#/components/schemas/PostgresEngine'
- release_channel:
- $ref: '#/components/schemas/ReleaseChannel'
- app_version:
- type: string
- required:
- - postgres_version
- - release_channel
- - app_version
- ProjectUpgradeEligibilityResponse:
- type: object
- properties:
- current_app_version_release_channel:
- $ref: '#/components/schemas/ReleaseChannel'
- duration_estimate_hours:
- type: integer
- eligible:
- type: boolean
- current_app_version:
- type: string
- latest_app_version:
- type: string
- target_upgrade_versions:
- type: array
- items:
- $ref: '#/components/schemas/ProjectVersion'
- potential_breaking_changes:
- type: array
- items:
- type: string
- legacy_auth_custom_roles:
- type: array
- items:
- type: string
- extension_dependent_objects:
- type: array
- items:
- type: string
- required:
- - current_app_version_release_channel
- - duration_estimate_hours
- - eligible
- - current_app_version
- - latest_app_version
- - target_upgrade_versions
- - potential_breaking_changes
- - legacy_auth_custom_roles
- - extension_dependent_objects
- DatabaseUpgradeStatus:
- type: object
- properties:
- target_version:
- type: integer
- status:
- enum:
- - 0
- - 1
- - 2
- type: integer
- initiated_at:
- type: string
- latest_status_at:
- type: string
- error:
- type: string
- enum:
- - 1_upgraded_instance_launch_failed
- - 2_volume_detachchment_from_upgraded_instance_failed
- - 3_volume_attachment_to_original_instance_failed
- - 4_data_upgrade_initiation_failed
- - 5_data_upgrade_completion_failed
- - 6_volume_detachchment_from_original_instance_failed
- - 7_volume_attachment_to_upgraded_instance_failed
- - 8_upgrade_completion_failed
- - 9_post_physical_backup_failed
- progress:
- type: string
- enum:
- - 0_requested
- - 1_started
- - 2_launched_upgraded_instance
- - 3_detached_volume_from_upgraded_instance
- - 4_attached_volume_to_original_instance
- - 5_initiated_data_upgrade
- - 6_completed_data_upgrade
- - 7_detached_volume_from_original_instance
- - 8_attached_volume_to_upgraded_instance
- - 9_completed_upgrade
- - 10_completed_post_physical_backup
- required:
- - target_version
- - status
- - initiated_at
- - latest_status_at
- DatabaseUpgradeStatusResponse:
- type: object
- properties:
- databaseUpgradeStatus:
- nullable: true
- allOf:
- - $ref: '#/components/schemas/DatabaseUpgradeStatus'
- required:
- - databaseUpgradeStatus
- ReadOnlyStatusResponse:
- type: object
- properties:
- enabled:
- type: boolean
- override_enabled:
- type: boolean
- override_active_until:
- type: string
- required:
- - enabled
- - override_enabled
- - override_active_until
- SetUpReadReplicaBody:
- type: object
- properties:
- read_replica_region:
- type: string
- enum:
- - us-east-1
- - us-east-2
- - us-west-1
- - us-west-2
- - ap-east-1
- - ap-southeast-1
- - ap-northeast-1
- - ap-northeast-2
- - ap-southeast-2
- - eu-west-1
- - eu-west-2
- - eu-west-3
- - eu-north-1
- - eu-central-1
- - eu-central-2
- - ca-central-1
- - ap-south-1
- - sa-east-1
- description: Region you want your read replica to reside in
- example: us-east-1
- required:
- - read_replica_region
- RemoveReadReplicaBody:
- type: object
- properties:
- database_identifier:
- type: string
- required:
- - database_identifier
- AuthHealthResponse:
- type: object
- properties:
- name:
- type: string
- enum:
- - GoTrue
- required:
- - name
- RealtimeHealthResponse:
- type: object
- properties:
- connected_cluster:
- type: integer
- required:
- - connected_cluster
- V1ServiceHealthResponse:
- type: object
- properties:
- info:
- oneOf:
- - $ref: '#/components/schemas/AuthHealthResponse'
- - $ref: '#/components/schemas/RealtimeHealthResponse'
- name:
- enum:
- - auth
- - db
- - pooler
- - realtime
- - rest
- - storage
- type: string
- healthy:
- type: boolean
- status:
- enum:
- - COMING_UP
- - ACTIVE_HEALTHY
- - UNHEALTHY
- type: string
- error:
- type: string
- required:
- - name
- - healthy
- - status
- StorageFeatureImageTransformation:
- type: object
- properties:
- enabled:
- type: boolean
- required:
- - enabled
- StorageFeatureS3Protocol:
- type: object
- properties:
- enabled:
- type: boolean
- required:
- - enabled
- StorageFeatures:
- type: object
- properties:
- imageTransformation:
- $ref: '#/components/schemas/StorageFeatureImageTransformation'
- s3Protocol:
- $ref: '#/components/schemas/StorageFeatureS3Protocol'
- required:
- - imageTransformation
- - s3Protocol
- StorageConfigResponse:
- type: object
- properties:
- fileSizeLimit:
- type: integer
- format: int64
- features:
- $ref: '#/components/schemas/StorageFeatures'
- required:
- - fileSizeLimit
- - features
- UpdateStorageConfigBody:
- type: object
- properties:
- fileSizeLimit:
- type: integer
- minimum: 0
- maximum: 53687091200
- format: int64
- features:
- $ref: '#/components/schemas/StorageFeatures'
- PostgresConfigResponse:
- type: object
- properties:
- effective_cache_size:
- type: string
- logical_decoding_work_mem:
- type: string
- maintenance_work_mem:
- type: string
- track_activity_query_size:
- type: string
- max_connections:
- type: integer
- minimum: 1
- maximum: 262143
- max_locks_per_transaction:
- type: integer
- minimum: 10
- maximum: 2147483640
- max_parallel_maintenance_workers:
- type: integer
- minimum: 0
- maximum: 1024
- max_parallel_workers:
- type: integer
- minimum: 0
- maximum: 1024
- max_parallel_workers_per_gather:
- type: integer
- minimum: 0
- maximum: 1024
- max_replication_slots:
- type: integer
- max_slot_wal_keep_size:
- type: string
- max_standby_archive_delay:
- type: string
- max_standby_streaming_delay:
- type: string
- max_wal_size:
- type: string
- max_wal_senders:
- type: integer
- max_worker_processes:
- type: integer
- minimum: 0
- maximum: 262143
- shared_buffers:
- type: string
- statement_timeout:
- type: string
- track_commit_timestamp:
- type: boolean
- wal_keep_size:
- type: string
- wal_sender_timeout:
- type: string
- work_mem:
- type: string
- session_replication_role:
- enum:
- - origin
- - replica
- - local
- type: string
- UpdatePostgresConfigBody:
- type: object
- properties:
- effective_cache_size:
- type: string
- logical_decoding_work_mem:
- type: string
- maintenance_work_mem:
- type: string
- track_activity_query_size:
- type: string
- max_connections:
- type: integer
- minimum: 1
- maximum: 262143
- max_locks_per_transaction:
- type: integer
- minimum: 10
- maximum: 2147483640
- max_parallel_maintenance_workers:
- type: integer
- minimum: 0
- maximum: 1024
- max_parallel_workers:
- type: integer
- minimum: 0
- maximum: 1024
- max_parallel_workers_per_gather:
- type: integer
- minimum: 0
- maximum: 1024
- max_replication_slots:
- type: integer
- max_slot_wal_keep_size:
- type: string
- max_standby_archive_delay:
- type: string
- max_standby_streaming_delay:
- type: string
- max_wal_size:
- type: string
- max_wal_senders:
- type: integer
- max_worker_processes:
- type: integer
- minimum: 0
- maximum: 262143
- shared_buffers:
- type: string
- statement_timeout:
- type: string
- track_commit_timestamp:
- type: boolean
- wal_keep_size:
- type: string
- wal_sender_timeout:
- type: string
- work_mem:
- type: string
- restart_database:
- type: boolean
- session_replication_role:
- enum:
- - origin
- - replica
- - local
- type: string
- V1PgbouncerConfigResponse:
- type: object
- properties:
- pool_mode:
- type: string
- enum:
- - transaction
- - session
- - statement
- default_pool_size:
- type: number
- ignore_startup_parameters:
- type: string
- max_client_conn:
- type: number
- connection_string:
- type: string
- SupavisorConfigResponse:
- type: object
- properties:
- database_type:
- type: string
- enum:
- - PRIMARY
- - READ_REPLICA
- db_port:
- type: integer
- default_pool_size:
- type: integer
- nullable: true
- max_client_conn:
- type: integer
- nullable: true
- identifier:
- type: string
- is_using_scram_auth:
- type: boolean
- db_user:
- type: string
- db_host:
- type: string
- db_name:
- type: string
- connectionString:
- type: string
- pool_mode:
- enum:
- - transaction
- - session
- type: string
- required:
- - database_type
- - db_port
- - default_pool_size
- - max_client_conn
- - identifier
- - is_using_scram_auth
- - db_user
- - db_host
- - db_name
- - connectionString
- - pool_mode
- UpdateSupavisorConfigBody:
- type: object
- properties:
- default_pool_size:
- type: integer
- nullable: true
- minimum: 0
- maximum: 1000
- pool_mode:
- enum:
- - transaction
- - session
- type: string
- deprecated: true
- description: This field is deprecated and is ignored in this request
- UpdateSupavisorConfigResponse:
- type: object
- properties:
- default_pool_size:
- type: integer
- nullable: true
- pool_mode:
- enum:
- - transaction
- - session
- type: string
- required:
- - default_pool_size
- - pool_mode
- AuthConfigResponse:
- type: object
- properties:
- api_max_request_duration:
- type: integer
- nullable: true
- db_max_pool_size:
- type: integer
- nullable: true
- jwt_exp:
- type: integer
- nullable: true
- mailer_otp_exp:
- type: integer
- mailer_otp_length:
- type: integer
- nullable: true
- mfa_max_enrolled_factors:
- type: integer
- nullable: true
- mfa_phone_otp_length:
- type: integer
- mfa_phone_max_frequency:
- type: integer
- nullable: true
- password_min_length:
- type: integer
- nullable: true
- rate_limit_anonymous_users:
- type: integer
- nullable: true
- rate_limit_email_sent:
- type: integer
- nullable: true
- rate_limit_sms_sent:
- type: integer
- nullable: true
- rate_limit_token_refresh:
- type: integer
- nullable: true
- rate_limit_verify:
- type: integer
- nullable: true
- rate_limit_otp:
- type: integer
- nullable: true
- security_refresh_token_reuse_interval:
- type: integer
- nullable: true
- sessions_inactivity_timeout:
- type: integer
- nullable: true
- sessions_timebox:
- type: integer
- nullable: true
- sms_max_frequency:
- type: integer
- nullable: true
- sms_otp_exp:
- type: integer
- nullable: true
- sms_otp_length:
- type: integer
- smtp_max_frequency:
- type: integer
- nullable: true
- disable_signup:
- type: boolean
- nullable: true
- external_anonymous_users_enabled:
- type: boolean
- nullable: true
- external_apple_additional_client_ids:
- type: string
- nullable: true
- external_apple_client_id:
- type: string
- nullable: true
- external_apple_enabled:
- type: boolean
- nullable: true
- external_apple_secret:
- type: string
- nullable: true
- external_azure_client_id:
- type: string
- nullable: true
- external_azure_enabled:
- type: boolean
- nullable: true
- external_azure_secret:
- type: string
- nullable: true
- external_azure_url:
- type: string
- nullable: true
- external_bitbucket_client_id:
- type: string
- nullable: true
- external_bitbucket_enabled:
- type: boolean
- nullable: true
- external_bitbucket_secret:
- type: string
- nullable: true
- external_discord_client_id:
- type: string
- nullable: true
- external_discord_enabled:
- type: boolean
- nullable: true
- external_discord_secret:
- type: string
- nullable: true
- external_email_enabled:
- type: boolean
- nullable: true
- external_facebook_client_id:
- type: string
- nullable: true
- external_facebook_enabled:
- type: boolean
- nullable: true
- external_facebook_secret:
- type: string
- nullable: true
- external_figma_client_id:
- type: string
- nullable: true
- external_figma_enabled:
- type: boolean
- nullable: true
- external_figma_secret:
- type: string
- nullable: true
- external_github_client_id:
- type: string
- nullable: true
- external_github_enabled:
- type: boolean
- nullable: true
- external_github_secret:
- type: string
- nullable: true
- external_gitlab_client_id:
- type: string
- nullable: true
- external_gitlab_enabled:
- type: boolean
- nullable: true
- external_gitlab_secret:
- type: string
- nullable: true
- external_gitlab_url:
- type: string
- nullable: true
- external_google_additional_client_ids:
- type: string
- nullable: true
- external_google_client_id:
- type: string
- nullable: true
- external_google_enabled:
- type: boolean
- nullable: true
- external_google_secret:
- type: string
- nullable: true
- external_google_skip_nonce_check:
- type: boolean
- nullable: true
- external_kakao_client_id:
- type: string
- nullable: true
- external_kakao_enabled:
- type: boolean
- nullable: true
- external_kakao_secret:
- type: string
- nullable: true
- external_keycloak_client_id:
- type: string
- nullable: true
- external_keycloak_enabled:
- type: boolean
- nullable: true
- external_keycloak_secret:
- type: string
- nullable: true
- external_keycloak_url:
- type: string
- nullable: true
- external_linkedin_oidc_client_id:
- type: string
- nullable: true
- external_linkedin_oidc_enabled:
- type: boolean
- nullable: true
- external_linkedin_oidc_secret:
- type: string
- nullable: true
- external_slack_oidc_client_id:
- type: string
- nullable: true
- external_slack_oidc_enabled:
- type: boolean
- nullable: true
- external_slack_oidc_secret:
- type: string
- nullable: true
- external_notion_client_id:
- type: string
- nullable: true
- external_notion_enabled:
- type: boolean
- nullable: true
- external_notion_secret:
- type: string
- nullable: true
- external_phone_enabled:
- type: boolean
- nullable: true
- external_slack_client_id:
- type: string
- nullable: true
- external_slack_enabled:
- type: boolean
- nullable: true
- external_slack_secret:
- type: string
- nullable: true
- external_spotify_client_id:
- type: string
- nullable: true
- external_spotify_enabled:
- type: boolean
- nullable: true
- external_spotify_secret:
- type: string
- nullable: true
- external_twitch_client_id:
- type: string
- nullable: true
- external_twitch_enabled:
- type: boolean
- nullable: true
- external_twitch_secret:
- type: string
- nullable: true
- external_twitter_client_id:
- type: string
- nullable: true
- external_twitter_enabled:
- type: boolean
- nullable: true
- external_twitter_secret:
- type: string
- nullable: true
- external_workos_client_id:
- type: string
- nullable: true
- external_workos_enabled:
- type: boolean
- nullable: true
- external_workos_secret:
- type: string
- nullable: true
- external_workos_url:
- type: string
- nullable: true
- external_zoom_client_id:
- type: string
- nullable: true
- external_zoom_enabled:
- type: boolean
- nullable: true
- external_zoom_secret:
- type: string
- nullable: true
- hook_custom_access_token_enabled:
- type: boolean
- nullable: true
- hook_custom_access_token_uri:
- type: string
- nullable: true
- hook_custom_access_token_secrets:
- type: string
- nullable: true
- hook_mfa_verification_attempt_enabled:
- type: boolean
- nullable: true
- hook_mfa_verification_attempt_uri:
- type: string
- nullable: true
- hook_mfa_verification_attempt_secrets:
- type: string
- nullable: true
- hook_password_verification_attempt_enabled:
- type: boolean
- nullable: true
- hook_password_verification_attempt_uri:
- type: string
- nullable: true
- hook_password_verification_attempt_secrets:
- type: string
- nullable: true
- hook_send_sms_enabled:
- type: boolean
- nullable: true
- hook_send_sms_uri:
- type: string
- nullable: true
- hook_send_sms_secrets:
- type: string
- nullable: true
- hook_send_email_enabled:
- type: boolean
- nullable: true
- hook_send_email_uri:
- type: string
- nullable: true
- hook_send_email_secrets:
- type: string
- nullable: true
- mailer_allow_unverified_email_sign_ins:
- type: boolean
- nullable: true
- mailer_autoconfirm:
- type: boolean
- nullable: true
- mailer_secure_email_change_enabled:
- type: boolean
- nullable: true
- mailer_subjects_confirmation:
- type: string
- nullable: true
- mailer_subjects_email_change:
- type: string
- nullable: true
- mailer_subjects_invite:
- type: string
- nullable: true
- mailer_subjects_magic_link:
- type: string
- nullable: true
- mailer_subjects_reauthentication:
- type: string
- nullable: true
- mailer_subjects_recovery:
- type: string
- nullable: true
- mailer_templates_confirmation_content:
- type: string
- nullable: true
- mailer_templates_email_change_content:
- type: string
- nullable: true
- mailer_templates_invite_content:
- type: string
- nullable: true
- mailer_templates_magic_link_content:
- type: string
- nullable: true
- mailer_templates_reauthentication_content:
- type: string
- nullable: true
- mailer_templates_recovery_content:
- type: string
- nullable: true
- mfa_totp_enroll_enabled:
- type: boolean
- nullable: true
- mfa_totp_verify_enabled:
- type: boolean
- nullable: true
- mfa_phone_enroll_enabled:
- type: boolean
- nullable: true
- mfa_phone_verify_enabled:
- type: boolean
- nullable: true
- mfa_web_authn_enroll_enabled:
- type: boolean
- nullable: true
- mfa_web_authn_verify_enabled:
- type: boolean
- nullable: true
- mfa_phone_template:
- type: string
- nullable: true
- password_hibp_enabled:
- type: boolean
- nullable: true
- password_required_characters:
- type: string
- nullable: true
- refresh_token_rotation_enabled:
- type: boolean
- nullable: true
- saml_enabled:
- type: boolean
- nullable: true
- saml_external_url:
- type: string
- nullable: true
- saml_allow_encrypted_assertions:
- type: boolean
- nullable: true
- security_captcha_enabled:
- type: boolean
- nullable: true
- security_captcha_provider:
- type: string
- nullable: true
- security_captcha_secret:
- type: string
- nullable: true
- security_manual_linking_enabled:
- type: boolean
- nullable: true
- security_update_password_require_reauthentication:
- type: boolean
- nullable: true
- sessions_single_per_user:
- type: boolean
- nullable: true
- sessions_tags:
- type: string
- nullable: true
- site_url:
- type: string
- nullable: true
- sms_autoconfirm:
- type: boolean
- nullable: true
- sms_messagebird_access_key:
- type: string
- nullable: true
- sms_messagebird_originator:
- type: string
- nullable: true
- sms_provider:
- type: string
- nullable: true
- sms_template:
- type: string
- nullable: true
- sms_test_otp:
- type: string
- nullable: true
- sms_test_otp_valid_until:
- type: string
- nullable: true
- sms_textlocal_api_key:
- type: string
- nullable: true
- sms_textlocal_sender:
- type: string
- nullable: true
- sms_twilio_account_sid:
- type: string
- nullable: true
- sms_twilio_auth_token:
- type: string
- nullable: true
- sms_twilio_content_sid:
- type: string
- nullable: true
- sms_twilio_message_service_sid:
- type: string
- nullable: true
- sms_twilio_verify_account_sid:
- type: string
- nullable: true
- sms_twilio_verify_auth_token:
- type: string
- nullable: true
- sms_twilio_verify_message_service_sid:
- type: string
- nullable: true
- sms_vonage_api_key:
- type: string
- nullable: true
- sms_vonage_api_secret:
- type: string
- nullable: true
- sms_vonage_from:
- type: string
- nullable: true
- smtp_admin_email:
- type: string
- nullable: true
- smtp_host:
- type: string
- nullable: true
- smtp_pass:
- type: string
- nullable: true
- smtp_port:
- type: string
- nullable: true
- smtp_sender_name:
- type: string
- nullable: true
- smtp_user:
- type: string
- nullable: true
- uri_allow_list:
- type: string
- nullable: true
- required:
- - api_max_request_duration
- - db_max_pool_size
- - jwt_exp
- - mailer_otp_exp
- - mailer_otp_length
- - mfa_max_enrolled_factors
- - mfa_phone_otp_length
- - mfa_phone_max_frequency
- - password_min_length
- - rate_limit_anonymous_users
- - rate_limit_email_sent
- - rate_limit_sms_sent
- - rate_limit_token_refresh
- - rate_limit_verify
- - rate_limit_otp
- - security_refresh_token_reuse_interval
- - sessions_inactivity_timeout
- - sessions_timebox
- - sms_max_frequency
- - sms_otp_exp
- - sms_otp_length
- - smtp_max_frequency
- - disable_signup
- - external_anonymous_users_enabled
- - external_apple_additional_client_ids
- - external_apple_client_id
- - external_apple_enabled
- - external_apple_secret
- - external_azure_client_id
- - external_azure_enabled
- - external_azure_secret
- - external_azure_url
- - external_bitbucket_client_id
- - external_bitbucket_enabled
- - external_bitbucket_secret
- - external_discord_client_id
- - external_discord_enabled
- - external_discord_secret
- - external_email_enabled
- - external_facebook_client_id
- - external_facebook_enabled
- - external_facebook_secret
- - external_figma_client_id
- - external_figma_enabled
- - external_figma_secret
- - external_github_client_id
- - external_github_enabled
- - external_github_secret
- - external_gitlab_client_id
- - external_gitlab_enabled
- - external_gitlab_secret
- - external_gitlab_url
- - external_google_additional_client_ids
- - external_google_client_id
- - external_google_enabled
- - external_google_secret
- - external_google_skip_nonce_check
- - external_kakao_client_id
- - external_kakao_enabled
- - external_kakao_secret
- - external_keycloak_client_id
- - external_keycloak_enabled
- - external_keycloak_secret
- - external_keycloak_url
- - external_linkedin_oidc_client_id
- - external_linkedin_oidc_enabled
- - external_linkedin_oidc_secret
- - external_slack_oidc_client_id
- - external_slack_oidc_enabled
- - external_slack_oidc_secret
- - external_notion_client_id
- - external_notion_enabled
- - external_notion_secret
- - external_phone_enabled
- - external_slack_client_id
- - external_slack_enabled
- - external_slack_secret
- - external_spotify_client_id
- - external_spotify_enabled
- - external_spotify_secret
- - external_twitch_client_id
- - external_twitch_enabled
- - external_twitch_secret
- - external_twitter_client_id
- - external_twitter_enabled
- - external_twitter_secret
- - external_workos_client_id
- - external_workos_enabled
- - external_workos_secret
- - external_workos_url
- - external_zoom_client_id
- - external_zoom_enabled
- - external_zoom_secret
- - hook_custom_access_token_enabled
- - hook_custom_access_token_uri
- - hook_custom_access_token_secrets
- - hook_mfa_verification_attempt_enabled
- - hook_mfa_verification_attempt_uri
- - hook_mfa_verification_attempt_secrets
- - hook_password_verification_attempt_enabled
- - hook_password_verification_attempt_uri
- - hook_password_verification_attempt_secrets
- - hook_send_sms_enabled
- - hook_send_sms_uri
- - hook_send_sms_secrets
- - hook_send_email_enabled
- - hook_send_email_uri
- - hook_send_email_secrets
- - mailer_allow_unverified_email_sign_ins
- - mailer_autoconfirm
- - mailer_secure_email_change_enabled
- - mailer_subjects_confirmation
- - mailer_subjects_email_change
- - mailer_subjects_invite
- - mailer_subjects_magic_link
- - mailer_subjects_reauthentication
- - mailer_subjects_recovery
- - mailer_templates_confirmation_content
- - mailer_templates_email_change_content
- - mailer_templates_invite_content
- - mailer_templates_magic_link_content
- - mailer_templates_reauthentication_content
- - mailer_templates_recovery_content
- - mfa_totp_enroll_enabled
- - mfa_totp_verify_enabled
- - mfa_phone_enroll_enabled
- - mfa_phone_verify_enabled
- - mfa_web_authn_enroll_enabled
- - mfa_web_authn_verify_enabled
- - mfa_phone_template
- - password_hibp_enabled
- - password_required_characters
- - refresh_token_rotation_enabled
- - saml_enabled
- - saml_external_url
- - saml_allow_encrypted_assertions
- - security_captcha_enabled
- - security_captcha_provider
- - security_captcha_secret
- - security_manual_linking_enabled
- - security_update_password_require_reauthentication
- - sessions_single_per_user
- - sessions_tags
- - site_url
- - sms_autoconfirm
- - sms_messagebird_access_key
- - sms_messagebird_originator
- - sms_provider
- - sms_template
- - sms_test_otp
- - sms_test_otp_valid_until
- - sms_textlocal_api_key
- - sms_textlocal_sender
- - sms_twilio_account_sid
- - sms_twilio_auth_token
- - sms_twilio_content_sid
- - sms_twilio_message_service_sid
- - sms_twilio_verify_account_sid
- - sms_twilio_verify_auth_token
- - sms_twilio_verify_message_service_sid
- - sms_vonage_api_key
- - sms_vonage_api_secret
- - sms_vonage_from
- - smtp_admin_email
- - smtp_host
- - smtp_pass
- - smtp_port
- - smtp_sender_name
- - smtp_user
- - uri_allow_list
- UpdateAuthConfigBody:
- type: object
- properties:
- jwt_exp:
- type: integer
- minimum: 0
- maximum: 604800
- smtp_max_frequency:
- type: integer
- minimum: 0
- maximum: 32767
- mfa_max_enrolled_factors:
- type: integer
- minimum: 0
- maximum: 2147483647
- sessions_timebox:
- type: integer
- minimum: 0
- sessions_inactivity_timeout:
- type: integer
- minimum: 0
- rate_limit_anonymous_users:
- type: integer
- minimum: 1
- maximum: 2147483647
- rate_limit_email_sent:
- type: integer
- minimum: 1
- maximum: 2147483647
- rate_limit_sms_sent:
- type: integer
- minimum: 1
- maximum: 2147483647
- rate_limit_verify:
- type: integer
- minimum: 1
- maximum: 2147483647
- rate_limit_token_refresh:
- type: integer
- minimum: 1
- maximum: 2147483647
- rate_limit_otp:
- type: integer
- minimum: 1
- maximum: 2147483647
- password_min_length:
- type: integer
- minimum: 6
- maximum: 32767
- security_refresh_token_reuse_interval:
- type: integer
- minimum: 0
- maximum: 2147483647
- mailer_otp_exp:
- type: integer
- minimum: 0
- maximum: 2147483647
- mailer_otp_length:
- type: integer
- minimum: 6
- maximum: 10
- sms_max_frequency:
- type: integer
- minimum: 0
- maximum: 32767
- sms_otp_exp:
- type: integer
- minimum: 0
- maximum: 2147483647
- sms_otp_length:
- type: integer
- minimum: 0
- maximum: 32767
- db_max_pool_size:
- type: integer
- api_max_request_duration:
- type: integer
- mfa_phone_max_frequency:
- type: integer
- minimum: 0
- maximum: 32767
- mfa_phone_otp_length:
- type: integer
- minimum: 0
- maximum: 32767
- site_url:
- type: string
- pattern: /^[^,]+$/
- disable_signup:
- type: boolean
- smtp_admin_email:
- type: string
- smtp_host:
- type: string
- smtp_port:
- type: string
- smtp_user:
- type: string
- smtp_pass:
- type: string
- smtp_sender_name:
- type: string
- mailer_allow_unverified_email_sign_ins:
- type: boolean
- mailer_autoconfirm:
- type: boolean
- mailer_subjects_invite:
- type: string
- mailer_subjects_confirmation:
- type: string
- mailer_subjects_recovery:
- type: string
- mailer_subjects_email_change:
- type: string
- mailer_subjects_magic_link:
- type: string
- mailer_subjects_reauthentication:
- type: string
- mailer_templates_invite_content:
- type: string
- mailer_templates_confirmation_content:
- type: string
- mailer_templates_recovery_content:
- type: string
- mailer_templates_email_change_content:
- type: string
- mailer_templates_magic_link_content:
- type: string
- mailer_templates_reauthentication_content:
- type: string
- uri_allow_list:
- type: string
- external_anonymous_users_enabled:
- type: boolean
- external_email_enabled:
- type: boolean
- external_phone_enabled:
- type: boolean
- saml_enabled:
- type: boolean
- saml_external_url:
- type: string
- pattern: /^[^,]+$/
- security_captcha_enabled:
- type: boolean
- security_captcha_provider:
- type: string
- security_captcha_secret:
- type: string
- sessions_single_per_user:
- type: boolean
- sessions_tags:
- type: string
- pattern: /^\s*([a-z0-9_-]+(\s*,+\s*)?)*\s*$/i
- mailer_secure_email_change_enabled:
- type: boolean
- refresh_token_rotation_enabled:
- type: boolean
- password_hibp_enabled:
- type: boolean
- password_required_characters:
- type: string
- enum:
- - abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789
- - abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789
- - abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~
- - ''
- security_manual_linking_enabled:
- type: boolean
- security_update_password_require_reauthentication:
- type: boolean
- sms_autoconfirm:
- type: boolean
- sms_provider:
- type: string
- sms_messagebird_access_key:
- type: string
- sms_messagebird_originator:
- type: string
- sms_test_otp:
- type: string
- pattern: /^([0-9]{1,15}=[0-9]+,?)*$/
- sms_test_otp_valid_until:
- type: string
- sms_textlocal_api_key:
- type: string
- sms_textlocal_sender:
- type: string
- sms_twilio_account_sid:
- type: string
- sms_twilio_auth_token:
- type: string
- sms_twilio_content_sid:
- type: string
- sms_twilio_message_service_sid:
- type: string
- sms_twilio_verify_account_sid:
- type: string
- sms_twilio_verify_auth_token:
- type: string
- sms_twilio_verify_message_service_sid:
- type: string
- sms_vonage_api_key:
- type: string
- sms_vonage_api_secret:
- type: string
- sms_vonage_from:
- type: string
- sms_template:
- type: string
- hook_mfa_verification_attempt_enabled:
- type: boolean
- hook_mfa_verification_attempt_uri:
- type: string
- hook_mfa_verification_attempt_secrets:
- type: string
- hook_password_verification_attempt_enabled:
- type: boolean
- hook_password_verification_attempt_uri:
- type: string
- hook_password_verification_attempt_secrets:
- type: string
- hook_custom_access_token_enabled:
- type: boolean
- hook_custom_access_token_uri:
- type: string
- hook_custom_access_token_secrets:
- type: string
- hook_send_sms_enabled:
- type: boolean
- hook_send_sms_uri:
- type: string
- hook_send_sms_secrets:
- type: string
- hook_send_email_enabled:
- type: boolean
- hook_send_email_uri:
- type: string
- hook_send_email_secrets:
- type: string
- external_apple_enabled:
- type: boolean
- external_apple_client_id:
- type: string
- external_apple_secret:
- type: string
- external_apple_additional_client_ids:
- type: string
- external_azure_enabled:
- type: boolean
- external_azure_client_id:
- type: string
- external_azure_secret:
- type: string
- external_azure_url:
- type: string
- external_bitbucket_enabled:
- type: boolean
- external_bitbucket_client_id:
- type: string
- external_bitbucket_secret:
- type: string
- external_discord_enabled:
- type: boolean
- external_discord_client_id:
- type: string
- external_discord_secret:
- type: string
- external_facebook_enabled:
- type: boolean
- external_facebook_client_id:
- type: string
- external_facebook_secret:
- type: string
- external_figma_enabled:
- type: boolean
- external_figma_client_id:
- type: string
- external_figma_secret:
- type: string
- external_github_enabled:
- type: boolean
- external_github_client_id:
- type: string
- external_github_secret:
- type: string
- external_gitlab_enabled:
- type: boolean
- external_gitlab_client_id:
- type: string
- external_gitlab_secret:
- type: string
- external_gitlab_url:
- type: string
- external_google_enabled:
- type: boolean
- external_google_client_id:
- type: string
- external_google_secret:
- type: string
- external_google_additional_client_ids:
- type: string
- external_google_skip_nonce_check:
- type: boolean
- external_kakao_enabled:
- type: boolean
- external_kakao_client_id:
- type: string
- external_kakao_secret:
- type: string
- external_keycloak_enabled:
- type: boolean
- external_keycloak_client_id:
- type: string
- external_keycloak_secret:
- type: string
- external_keycloak_url:
- type: string
- external_linkedin_oidc_enabled:
- type: boolean
- external_linkedin_oidc_client_id:
- type: string
- external_linkedin_oidc_secret:
- type: string
- external_slack_oidc_enabled:
- type: boolean
- external_slack_oidc_client_id:
- type: string
- external_slack_oidc_secret:
- type: string
- external_notion_enabled:
- type: boolean
- external_notion_client_id:
- type: string
- external_notion_secret:
- type: string
- external_slack_enabled:
- type: boolean
- external_slack_client_id:
- type: string
- external_slack_secret:
- type: string
- external_spotify_enabled:
- type: boolean
- external_spotify_client_id:
- type: string
- external_spotify_secret:
- type: string
- external_twitch_enabled:
- type: boolean
- external_twitch_client_id:
- type: string
- external_twitch_secret:
- type: string
- external_twitter_enabled:
- type: boolean
- external_twitter_client_id:
- type: string
- external_twitter_secret:
- type: string
- external_workos_enabled:
- type: boolean
- external_workos_client_id:
- type: string
- external_workos_secret:
- type: string
- external_workos_url:
- type: string
- external_zoom_enabled:
- type: boolean
- external_zoom_client_id:
- type: string
- external_zoom_secret:
- type: string
- mfa_totp_enroll_enabled:
- type: boolean
- mfa_totp_verify_enabled:
- type: boolean
- mfa_web_authn_enroll_enabled:
- type: boolean
- mfa_web_authn_verify_enabled:
- type: boolean
- mfa_phone_enroll_enabled:
- type: boolean
- mfa_phone_verify_enabled:
- type: boolean
- mfa_phone_template:
- type: string
- CreateThirdPartyAuthBody:
- type: object
- properties:
- oidc_issuer_url:
- type: string
- jwks_url:
- type: string
- custom_jwks:
- type: object
- ThirdPartyAuth:
- type: object
- properties:
- id:
- type: string
- type:
- type: string
- oidc_issuer_url:
- type: string
- nullable: true
- jwks_url:
- type: string
- nullable: true
- custom_jwks:
- type: object
- nullable: true
- resolved_jwks:
- type: object
- nullable: true
- inserted_at:
- type: string
- updated_at:
- type: string
- resolved_at:
- type: string
- nullable: true
- required:
- - id
- - type
- - inserted_at
- - updated_at
- ProjectAvailableRestoreVersion:
- type: object
- properties:
- version:
- type: string
- release_channel:
- type: string
- enum:
- - internal
- - alpha
- - beta
- - ga
- - withdrawn
- - preview
- postgres_engine:
- type: string
- enum:
- - '13'
- - '14'
- - '15'
- - '17'
- - 17-oriole
- required:
- - version
- - release_channel
- - postgres_engine
- GetProjectAvailableRestoreVersionsResponse:
- type: object
- properties:
- available_versions:
- type: array
- items:
- $ref: '#/components/schemas/ProjectAvailableRestoreVersion'
- required:
- - available_versions
- RestoreProjectBodyDto:
- type: object
- properties: {}
- hideDefinitions:
- - release_channel
- - postgres_engine
- V1AnalyticsResponse:
- type: object
- properties:
- error:
- oneOf:
- - properties:
- code:
- type: number
- errors:
- type: array
- items:
- properties:
- domain:
- type: string
- location:
- type: string
- locationType:
- type: string
- message:
- type: string
- reason:
- type: string
- message:
- type: string
- status:
- type: string
- - type: string
- result:
- type: array
- items:
- type: object
- V1RunQueryBody:
- type: object
- properties:
- query:
- type: string
- required:
- - query
- GetProjectDbMetadataResponseDto:
- type: object
- properties:
- databases:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- schemas:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- required:
- - name
- additionalProperties: true
- required:
- - name
- - schemas
- additionalProperties: true
- required:
- - databases
- FunctionResponse:
- type: object
- properties:
- version:
- type: integer
- created_at:
- type: integer
- format: int64
- updated_at:
- type: integer
- format: int64
- id:
- type: string
- slug:
- type: string
- name:
- type: string
- status:
- enum:
- - ACTIVE
- - REMOVED
- - THROTTLED
- type: string
- verify_jwt:
- type: boolean
- import_map:
- type: boolean
- entrypoint_path:
- type: string
- import_map_path:
- type: string
- compute_multiplier:
- type: number
- required:
- - version
- - created_at
- - updated_at
- - id
- - slug
- - name
- - status
- V1CreateFunctionBody:
- type: object
- properties:
- slug:
- type: string
- pattern: /^[A-Za-z0-9_-]+$/
- name:
- type: string
- body:
- type: string
- verify_jwt:
- type: boolean
- compute_multiplier:
- type: number
- minimum: 1
- maximum: 4
- required:
- - slug
- - name
- - body
- BulkUpdateFunctionBody:
- type: object
- properties:
- version:
- type: integer
- created_at:
- type: integer
- format: int64
- id:
- type: string
- slug:
- type: string
- name:
- type: string
- status:
- enum:
- - ACTIVE
- - REMOVED
- - THROTTLED
- type: string
- verify_jwt:
- type: boolean
- import_map:
- type: boolean
- entrypoint_path:
- type: string
- import_map_path:
- type: string
- required:
- - version
- - id
- - slug
- - name
- - status
- BulkUpdateFunctionResponse:
- type: object
- properties:
- functions:
- type: array
- items:
- $ref: '#/components/schemas/FunctionResponse'
- required:
- - functions
- FunctionDeployMetadata:
- type: object
- properties:
- entrypoint_path:
- type: string
- import_map_path:
- type: string
- static_patterns:
- type: array
- items:
- type: string
- verify_jwt:
- type: boolean
- name:
- type: string
- required:
- - entrypoint_path
- FunctionDeployBody:
- type: object
- properties:
- file:
- type: array
- items:
- type: string
- format: binary
- metadata:
- $ref: '#/components/schemas/FunctionDeployMetadata'
- required:
- - file
- - metadata
- DeployFunctionResponse:
- type: object
- properties:
- version:
- type: integer
- created_at:
- type: integer
- format: int64
- updated_at:
- type: integer
- format: int64
- id:
- type: string
- slug:
- type: string
- name:
- type: string
- status:
- enum:
- - ACTIVE
- - REMOVED
- - THROTTLED
- type: string
- verify_jwt:
- type: boolean
- import_map:
- type: boolean
- entrypoint_path:
- type: string
- import_map_path:
- type: string
- compute_multiplier:
- type: number
- required:
- - version
- - id
- - slug
- - name
- - status
- FunctionSlugResponse:
- type: object
- properties:
- version:
- type: integer
- created_at:
- type: integer
- format: int64
- updated_at:
- type: integer
- format: int64
- id:
- type: string
- slug:
- type: string
- name:
- type: string
- status:
- enum:
- - ACTIVE
- - REMOVED
- - THROTTLED
- type: string
- verify_jwt:
- type: boolean
- import_map:
- type: boolean
- entrypoint_path:
- type: string
- import_map_path:
- type: string
- compute_multiplier:
- type: number
- required:
- - version
- - created_at
- - updated_at
- - id
- - slug
- - name
- - status
- V1UpdateFunctionBody:
- type: object
- properties:
- name:
- type: string
- body:
- type: string
- verify_jwt:
- type: boolean
- compute_multiplier:
- type: number
- minimum: 1
- maximum: 4
- V1StorageBucketResponse:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- owner:
- type: string
- created_at:
- type: string
- updated_at:
- type: string
- public:
- type: boolean
- required:
- - id
- - name
- - owner
- - created_at
- - updated_at
- - public
- AttributeValue:
- type: object
- properties:
- default:
- oneOf:
- - type: object
- - type: number
- - type: string
- - type: boolean
- name:
- type: string
- names:
- type: array
- items:
- type: string
- array:
- type: boolean
- AttributeMapping:
- type: object
- properties:
- keys:
- type: object
- additionalProperties:
- $ref: '#/components/schemas/AttributeValue'
- required:
- - keys
- CreateProviderBody:
- type: object
- properties:
- type:
- type: string
- enum:
- - saml
- description: What type of provider will be created
- metadata_xml:
- type: string
- metadata_url:
- type: string
- domains:
- type: array
- items:
- type: string
- attribute_mapping:
- $ref: '#/components/schemas/AttributeMapping'
- required:
- - type
- SamlDescriptor:
- type: object
- properties:
- id:
- type: string
- entity_id:
- type: string
- metadata_url:
- type: string
- metadata_xml:
- type: string
- attribute_mapping:
- $ref: '#/components/schemas/AttributeMapping'
- required:
- - id
- - entity_id
- Domain:
- type: object
- properties:
- id:
- type: string
- domain:
- type: string
- created_at:
- type: string
- updated_at:
- type: string
- required:
- - id
- CreateProviderResponse:
- type: object
- properties:
- id:
- type: string
- saml:
- $ref: '#/components/schemas/SamlDescriptor'
- domains:
- type: array
- items:
- $ref: '#/components/schemas/Domain'
- created_at:
- type: string
- updated_at:
- type: string
- required:
- - id
- Provider:
- type: object
- properties:
- id:
- type: string
- saml:
- $ref: '#/components/schemas/SamlDescriptor'
- domains:
- type: array
- items:
- $ref: '#/components/schemas/Domain'
- created_at:
- type: string
- updated_at:
- type: string
- required:
- - id
- ListProvidersResponse:
- type: object
- properties:
- items:
- type: array
- items:
- $ref: '#/components/schemas/Provider'
- required:
- - items
- GetProviderResponse:
- type: object
- properties:
- id:
- type: string
- saml:
- $ref: '#/components/schemas/SamlDescriptor'
- domains:
- type: array
- items:
- $ref: '#/components/schemas/Domain'
- created_at:
- type: string
- updated_at:
- type: string
- required:
- - id
- UpdateProviderBody:
- type: object
- properties:
- metadata_xml:
- type: string
- metadata_url:
- type: string
- domains:
- type: array
- items:
- type: string
- attribute_mapping:
- $ref: '#/components/schemas/AttributeMapping'
- UpdateProviderResponse:
- type: object
- properties:
- id:
- type: string
- saml:
- $ref: '#/components/schemas/SamlDescriptor'
- domains:
- type: array
- items:
- $ref: '#/components/schemas/Domain'
- created_at:
- type: string
- updated_at:
- type: string
- required:
- - id
- DeleteProviderResponse:
- type: object
- properties:
- id:
- type: string
- saml:
- $ref: '#/components/schemas/SamlDescriptor'
- domains:
- type: array
- items:
- $ref: '#/components/schemas/Domain'
- created_at:
- type: string
- updated_at:
- type: string
- required:
- - id
- V1Backup:
- type: object
- properties:
- status:
- type: string
- enum:
- - COMPLETED
- - FAILED
- - PENDING
- - REMOVED
- - ARCHIVED
- - CANCELLED
- is_physical_backup:
- type: boolean
- inserted_at:
- type: string
- required:
- - status
- - is_physical_backup
- - inserted_at
- V1PhysicalBackup:
- type: object
- properties:
- earliest_physical_backup_date_unix:
- type: integer
- format: int64
- latest_physical_backup_date_unix:
- type: integer
- format: int64
- V1BackupsResponse:
- type: object
- properties:
- region:
- type: string
- walg_enabled:
- type: boolean
- pitr_enabled:
- type: boolean
- backups:
- type: array
- items:
- $ref: '#/components/schemas/V1Backup'
- physical_backup_data:
- $ref: '#/components/schemas/V1PhysicalBackup'
- required:
- - region
- - walg_enabled
- - pitr_enabled
- - backups
- - physical_backup_data
- V1RestorePitrBody:
- type: object
- properties:
- recovery_time_target_unix:
- type: integer
- minimum: 0
- format: int64
- required:
- - recovery_time_target_unix
- V1OrganizationMemberResponse:
- type: object
- properties:
- user_id:
- type: string
- user_name:
- type: string
- email:
- type: string
- role_name:
- type: string
- mfa_enabled:
- type: boolean
- required:
- - user_id
- - user_name
- - role_name
- - mfa_enabled
- BillingPlanId:
- type: string
- enum:
- - free
- - pro
- - team
- - enterprise
- V1OrganizationSlugResponse:
- type: object
- properties:
- plan:
- $ref: '#/components/schemas/BillingPlanId'
- opt_in_tags:
- type: array
- items:
- type: string
- enum:
- - AI_SQL_GENERATOR_OPT_IN
- allowed_release_channels:
- type: array
- items:
- $ref: '#/components/schemas/ReleaseChannel'
- id:
- type: string
- name:
- type: string
- required:
- - opt_in_tags
- - allowed_release_channels
- - id
- - name
diff --git a/api/overlay.yaml b/api/overlay.yaml
new file mode 100644
index 0000000000..b455dcc796
--- /dev/null
+++ b/api/overlay.yaml
@@ -0,0 +1,31 @@
+overlay: 1.0.0
+info:
+ title: Overlay
+ version: 0.0.0
+actions:
+- target: $.components.schemas.*.properties.password_required_characters.enum
+ description: Converts enum with special characters to a string
+ remove: true
+- target: $.components.schemas.*.properties.password_required_characters
+ description: Optionally adds back the enum with escaped backslash and quotes
+ update:
+ enum:
+ - abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789
+ - abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789
+ - abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~
+ - ''
+- target: $.components.schemas.*.properties.attribute_mapping.properties.keys.additionalProperties.properties.default.oneOf
+ description: Replaces request union type with interface for easier casting
+ remove: true
+- target: $.components.schemas.*.properties.saml.properties.attribute_mapping.properties.keys.additionalProperties.properties.default.oneOf
+ description: Replaces response union type with interface for easier casting
+ remove: true
+- target: $.components.schemas.*.properties.items.items.properties.saml.properties.attribute_mapping.properties.keys.additionalProperties.properties.default.oneOf
+ description: Replaces list union type with interface for easier casting
+ remove: true
+- target: $.components.schemas.*.properties.connectionString
+ description: Removes deprecated field that conflicts with naming convention
+ remove: true
+- target: $.components.schemas.*.properties.private_jwk.discriminator
+ description: Replaces discriminated union with concrete type
+ remove: true
diff --git a/cmd/backups.go b/cmd/backups.go
new file mode 100644
index 0000000000..10f74a22d1
--- /dev/null
+++ b/cmd/backups.go
@@ -0,0 +1,46 @@
+package cmd
+
+import (
+ "github.com/spf13/cobra"
+ "github.com/supabase/cli/internal/backups/list"
+ "github.com/supabase/cli/internal/backups/restore"
+ "github.com/supabase/cli/internal/utils/flags"
+)
+
+var (
+ backupsCmd = &cobra.Command{
+ GroupID: groupManagementAPI,
+ Use: "backups",
+ Short: "Manage Supabase physical backups",
+ }
+
+ backupListCmd = &cobra.Command{
+ Use: "list",
+ Short: "Lists available physical backups",
+ Args: cobra.NoArgs,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return list.Run(cmd.Context())
+ },
+ }
+
+ timestamp int64
+
+ backupRestoreCmd = &cobra.Command{
+ Use: "restore",
+ Short: "Restore to a specific timestamp using PITR",
+ Args: cobra.NoArgs,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return restore.Run(cmd.Context(), timestamp)
+ },
+ }
+)
+
+func init() {
+ backupFlags := backupsCmd.PersistentFlags()
+ backupFlags.StringVar(&flags.ProjectRef, "project-ref", "", "Project ref of the Supabase project.")
+ backupsCmd.AddCommand(backupListCmd)
+ restoreFlags := backupRestoreCmd.Flags()
+ restoreFlags.Int64VarP(×tamp, "timestamp", "t", 0, "The recovery time target in seconds since epoch.")
+ backupsCmd.AddCommand(backupRestoreCmd)
+ rootCmd.AddCommand(backupsCmd)
+}
diff --git a/cmd/branches.go b/cmd/branches.go
index 1c093278b2..a9a8ce3921 100644
--- a/cmd/branches.go
+++ b/cmd/branches.go
@@ -32,6 +32,7 @@ var (
Allowed: awsRegions(),
}
persistent bool
+ withData bool
branchCreateCmd = &cobra.Command{
Use: "create [name]",
@@ -48,11 +49,14 @@ var (
body.Region = &branchRegion.Value
}
if cmdFlags.Changed("size") {
- body.DesiredInstanceSize = (*api.DesiredInstanceSize)(&size.Value)
+ body.DesiredInstanceSize = (*api.CreateBranchBodyDesiredInstanceSize)(&size.Value)
}
if cmdFlags.Changed("persistent") {
body.Persistent = &persistent
}
+ if cmdFlags.Changed("with-data") {
+ body.WithData = &withData
+ }
return create.Run(cmd.Context(), body, afero.NewOsFs())
},
}
@@ -157,6 +161,7 @@ func init() {
createFlags.Var(&branchRegion, "region", "Select a region to deploy the branch database.")
createFlags.Var(&size, "size", "Select a desired instance size for the branch database.")
createFlags.BoolVar(&persistent, "persistent", false, "Whether to create a persistent branch.")
+ createFlags.BoolVar(&withData, "with-data", false, "Whether to clone production data to the branch database.")
branchesCmd.AddCommand(branchCreateCmd)
branchesCmd.AddCommand(branchListCmd)
branchesCmd.AddCommand(branchGetCmd)
@@ -202,7 +207,7 @@ func promptBranchId(ctx context.Context, args []string, fsys afero.Fs) error {
} else if len(branches) == 0 {
return errors.Errorf("branch not found: %s", branchId)
} else if len(branches) == 1 {
- branchId = branches[0].Id
+ branchId = branches[0].Id.String()
return nil
}
// Let user choose from a list of branches
@@ -210,7 +215,7 @@ func promptBranchId(ctx context.Context, args []string, fsys afero.Fs) error {
for i, branch := range branches {
items[i] = utils.PromptItem{
Summary: branch.Name,
- Details: branch.Id,
+ Details: branch.Id.String(),
}
}
title := "Select a branch:"
diff --git a/cmd/db.go b/cmd/db.go
index bcc7ac5e76..08906fd5fd 100644
--- a/cmd/db.go
+++ b/cmd/db.go
@@ -18,13 +18,12 @@ import (
"github.com/supabase/cli/internal/db/lint"
"github.com/supabase/cli/internal/db/pull"
"github.com/supabase/cli/internal/db/push"
- "github.com/supabase/cli/internal/db/remote/changes"
- "github.com/supabase/cli/internal/db/remote/commit"
"github.com/supabase/cli/internal/db/reset"
"github.com/supabase/cli/internal/db/start"
"github.com/supabase/cli/internal/db/test"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/internal/utils/flags"
+ "github.com/supabase/cli/pkg/migration"
)
var (
@@ -122,7 +121,13 @@ var (
}
},
RunE: func(cmd *cobra.Command, args []string) error {
- return dump.Run(cmd.Context(), file, flags.DbConfig, schema, excludeTable, dataOnly, roleOnly, keepComments, useCopy, dryRun, afero.NewOsFs())
+ opts := []migration.DumpOptionFunc{
+ migration.WithSchema(schema...),
+ migration.WithoutTable(excludeTable...),
+ migration.WithComments(keepComments),
+ migration.WithColumnInsert(!useCopy),
+ }
+ return dump.Run(cmd.Context(), file, flags.DbConfig, dataOnly, roleOnly, dryRun, afero.NewOsFs(), opts...)
},
PostRun: func(cmd *cobra.Command, args []string) {
if len(file) > 0 {
@@ -175,7 +180,7 @@ var (
Short: "Show changes on the remote database",
Long: "Show changes on the remote database since last migration.",
RunE: func(cmd *cobra.Command, args []string) error {
- return changes.Run(cmd.Context(), schema, flags.DbConfig, afero.NewOsFs())
+ return diff.Run(cmd.Context(), schema, file, flags.DbConfig, diff.DiffSchemaMigra, afero.NewOsFs())
},
}
@@ -184,11 +189,12 @@ var (
Use: "commit",
Short: "Commit remote changes as a new migration",
RunE: func(cmd *cobra.Command, args []string) error {
- return commit.Run(cmd.Context(), schema, flags.DbConfig, afero.NewOsFs())
+ return pull.Run(cmd.Context(), schema, flags.DbConfig, "remote_commit", afero.NewOsFs())
},
}
- noSeed bool
+ noSeed bool
+ lastVersion uint
dbResetCmd = &cobra.Command{
Use: "reset",
@@ -197,7 +203,7 @@ var (
if noSeed {
utils.Config.Db.Seed.Enabled = false
}
- return reset.Run(cmd.Context(), migrationVersion, flags.DbConfig, afero.NewOsFs())
+ return reset.Run(cmd.Context(), migrationVersion, lastVersion, flags.DbConfig, afero.NewOsFs())
},
}
@@ -304,10 +310,12 @@ func init() {
dbCmd.AddCommand(dbPullCmd)
// Build remote command
remoteFlags := dbRemoteCmd.PersistentFlags()
+ remoteFlags.StringSliceVarP(&schema, "schema", "s", []string{}, "Comma separated list of schema to include.")
remoteFlags.String("db-url", "", "Connect using the specified Postgres URL (must be percent-encoded).")
+ remoteFlags.Bool("linked", true, "Connect to the linked project.")
+ dbRemoteCmd.MarkFlagsMutuallyExclusive("db-url", "linked")
remoteFlags.StringVarP(&dbPassword, "password", "p", "", "Password to your remote Postgres database.")
cobra.CheckErr(viper.BindPFlag("DB_PASSWORD", remoteFlags.Lookup("password")))
- remoteFlags.StringSliceVarP(&schema, "schema", "s", []string{}, "Comma separated list of schema to include.")
dbRemoteCmd.AddCommand(dbRemoteChangesCmd)
dbRemoteCmd.AddCommand(dbRemoteCommitCmd)
dbCmd.AddCommand(dbRemoteCmd)
@@ -319,6 +327,8 @@ func init() {
resetFlags.BoolVar(&noSeed, "no-seed", false, "Skip running the seed script after reset.")
dbResetCmd.MarkFlagsMutuallyExclusive("db-url", "linked", "local")
resetFlags.StringVar(&migrationVersion, "version", "", "Reset up to the specified version.")
+ resetFlags.UintVar(&lastVersion, "last", 0, "Reset up to the last n migration versions.")
+ dbResetCmd.MarkFlagsMutuallyExclusive("version", "last")
dbCmd.AddCommand(dbResetCmd)
// Build lint command
lintFlags := dbLintCmd.Flags()
diff --git a/cmd/functions.go b/cmd/functions.go
index cc5ffa53de..6b5684bc21 100644
--- a/cmd/functions.go
+++ b/cmd/functions.go
@@ -58,6 +58,7 @@ var (
useLegacyBundle bool
noVerifyJWT = new(bool)
importMapPath string
+ prune bool
functionsDeployCmd = &cobra.Command{
Use: "deploy [Function name]",
@@ -73,7 +74,7 @@ var (
} else if maxJobs > 1 {
return errors.New("--jobs must be used together with --use-api")
}
- return deploy.Run(cmd.Context(), args, useDocker, noVerifyJWT, importMapPath, maxJobs, afero.NewOsFs())
+ return deploy.Run(cmd.Context(), args, useDocker, noVerifyJWT, importMapPath, maxJobs, prune, afero.NewOsFs())
},
}
@@ -139,6 +140,7 @@ func init() {
cobra.CheckErr(deployFlags.MarkHidden("legacy-bundle"))
deployFlags.UintVarP(&maxJobs, "jobs", "j", 1, "Maximum number of parallel jobs.")
deployFlags.BoolVar(noVerifyJWT, "no-verify-jwt", false, "Disable JWT verification for the Function.")
+ deployFlags.BoolVar(&prune, "prune", false, "Delete Functions that exist in Supabase project but not locally.")
deployFlags.StringVar(&flags.ProjectRef, "project-ref", "", "Project ref of the Supabase project.")
deployFlags.StringVar(&importMapPath, "import-map", "", "Path to import map file.")
functionsServeCmd.Flags().BoolVar(noVerifyJWT, "no-verify-jwt", false, "Disable JWT verification for the Function.")
diff --git a/cmd/gen.go b/cmd/gen.go
index 5849a5ce01..48a800f170 100644
--- a/cmd/gen.go
+++ b/cmd/gen.go
@@ -9,6 +9,7 @@ import (
"github.com/spf13/afero"
"github.com/spf13/cobra"
"github.com/supabase/cli/internal/gen/keys"
+ "github.com/supabase/cli/internal/gen/signingkeys"
"github.com/supabase/cli/internal/gen/types"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/internal/utils/flags"
@@ -93,6 +94,26 @@ var (
supabase gen types --project-id abc-def-123 --schema public --schema private
supabase gen types --db-url 'postgresql://...' --schema public --schema auth`,
}
+
+ algorithm = utils.EnumFlag{
+ Allowed: signingkeys.GetSupportedAlgorithms(),
+ Value: string(signingkeys.AlgES256),
+ }
+ appendKeys bool
+
+ genSigningKeyCmd = &cobra.Command{
+ Use: "signing-key",
+ Short: "Generate a JWT signing key",
+ Long: `Securely generate a private JWT signing key for use in the CLI or to import in the dashboard.
+
+Supported algorithms:
+ ES256 - ECDSA with P-256 curve and SHA-256 (recommended)
+ RS256 - RSA with SHA-256
+`,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return signingkeys.Run(cmd.Context(), algorithm.Value, appendKeys, afero.NewOsFs())
+ },
+ }
)
func init() {
@@ -111,5 +132,9 @@ func init() {
keyFlags.StringVar(&flags.ProjectRef, "project-ref", "", "Project ref of the Supabase project.")
keyFlags.StringSliceVar(&override, "override-name", []string{}, "Override specific variable names.")
genCmd.AddCommand(genKeysCmd)
+ signingKeyFlags := genSigningKeyCmd.Flags()
+ signingKeyFlags.Var(&algorithm, "algorithm", "Algorithm for signing key generation.")
+ signingKeyFlags.BoolVar(&appendKeys, "append", false, "Append new key to existing keys file instead of overwriting.")
+ genCmd.AddCommand(genSigningKeyCmd)
rootCmd.AddCommand(genCmd)
}
diff --git a/cmd/inspect.go b/cmd/inspect.go
index 2b55c3876e..24c3ff4659 100644
--- a/cmd/inspect.go
+++ b/cmd/inspect.go
@@ -1,37 +1,25 @@
package cmd
import (
- "fmt"
"os"
"os/signal"
- "path/filepath"
"github.com/spf13/afero"
"github.com/spf13/cobra"
+ "github.com/supabase/cli/internal/inspect"
"github.com/supabase/cli/internal/inspect/bloat"
"github.com/supabase/cli/internal/inspect/blocking"
- "github.com/supabase/cli/internal/inspect/cache"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/internal/utils/flags"
-
- "github.com/supabase/cli/internal/inspect"
"github.com/supabase/cli/internal/inspect/calls"
- "github.com/supabase/cli/internal/inspect/index_sizes"
- "github.com/supabase/cli/internal/inspect/index_usage"
+ "github.com/supabase/cli/internal/inspect/db_stats"
+ "github.com/supabase/cli/internal/inspect/index_stats"
"github.com/supabase/cli/internal/inspect/locks"
"github.com/supabase/cli/internal/inspect/long_running_queries"
"github.com/supabase/cli/internal/inspect/outliers"
"github.com/supabase/cli/internal/inspect/replication_slots"
- "github.com/supabase/cli/internal/inspect/role_configs"
- "github.com/supabase/cli/internal/inspect/role_connections"
- "github.com/supabase/cli/internal/inspect/seq_scans"
- "github.com/supabase/cli/internal/inspect/table_index_sizes"
- "github.com/supabase/cli/internal/inspect/table_record_counts"
- "github.com/supabase/cli/internal/inspect/table_sizes"
- "github.com/supabase/cli/internal/inspect/total_index_size"
- "github.com/supabase/cli/internal/inspect/total_table_sizes"
- "github.com/supabase/cli/internal/inspect/unused_indexes"
+ "github.com/supabase/cli/internal/inspect/role_stats"
+ "github.com/supabase/cli/internal/inspect/table_stats"
"github.com/supabase/cli/internal/inspect/vacuum_stats"
+ "github.com/supabase/cli/internal/utils/flags"
)
var (
@@ -51,11 +39,11 @@ var (
},
}
- inspectCacheHitCmd = &cobra.Command{
- Use: "cache-hit",
- Short: "Show cache hit rates for tables and indices",
+ inspectDBStatsCmd = &cobra.Command{
+ Use: "db-stats",
+ Short: "Show stats such as cache hit rates, total sizes, and WAL size",
RunE: func(cmd *cobra.Command, args []string) error {
- return cache.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return db_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
@@ -67,14 +55,6 @@ var (
},
}
- inspectIndexUsageCmd = &cobra.Command{
- Use: "index-usage",
- Short: "Show information about the efficiency of indexes",
- RunE: func(cmd *cobra.Command, args []string) error {
- return index_usage.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
- },
- }
-
inspectLocksCmd = &cobra.Command{
Use: "locks",
Short: "Show queries which have taken out an exclusive lock on a relation",
@@ -107,107 +87,159 @@ var (
},
}
- inspectTotalIndexSizeCmd = &cobra.Command{
- Use: "total-index-size",
- Short: "Show total size of all indexes",
+ inspectIndexStatsCmd = &cobra.Command{
+ Use: "index-stats",
+ Short: "Show combined index size, usage percent, scan counts, and unused status",
RunE: func(cmd *cobra.Command, args []string) error {
- return total_index_size.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return index_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
- inspectIndexSizesCmd = &cobra.Command{
- Use: "index-sizes",
- Short: "Show index sizes of individual indexes",
+ inspectLongRunningQueriesCmd = &cobra.Command{
+ Use: "long-running-queries",
+ Short: "Show currently running queries running for longer than 5 minutes",
RunE: func(cmd *cobra.Command, args []string) error {
- return index_sizes.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return long_running_queries.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
- inspectTableSizesCmd = &cobra.Command{
- Use: "table-sizes",
- Short: "Show table sizes of individual tables without their index sizes",
+ inspectBloatCmd = &cobra.Command{
+ Use: "bloat",
+ Short: "Estimates space allocated to a relation that is full of dead tuples",
RunE: func(cmd *cobra.Command, args []string) error {
- return table_sizes.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return bloat.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
- inspectTableIndexSizesCmd = &cobra.Command{
- Use: "table-index-sizes",
- Short: "Show index sizes of individual tables",
+ inspectRoleStatsCmd = &cobra.Command{
+ Use: "role-stats",
+ Short: "Show information about roles on the database",
RunE: func(cmd *cobra.Command, args []string) error {
- return table_index_sizes.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return role_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
- inspectTotalTableSizesCmd = &cobra.Command{
- Use: "total-table-sizes",
- Short: "Show total table sizes, including table index sizes",
+ inspectVacuumStatsCmd = &cobra.Command{
+ Use: "vacuum-stats",
+ Short: "Show statistics related to vacuum operations per table",
RunE: func(cmd *cobra.Command, args []string) error {
- return total_table_sizes.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return vacuum_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
- inspectUnusedIndexesCmd = &cobra.Command{
- Use: "unused-indexes",
- Short: "Show indexes with low usage",
+ inspectTableStatsCmd = &cobra.Command{
+ Use: "table-stats",
+ Short: "Show combined table size, index size, and estimated row count",
RunE: func(cmd *cobra.Command, args []string) error {
- return unused_indexes.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return table_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
- inspectSeqScansCmd = &cobra.Command{
- Use: "seq-scans",
- Short: "Show number of sequential scans recorded against all tables",
+ inspectCacheHitCmd = &cobra.Command{
+ Deprecated: `use "db-stats" instead.`,
+ Use: "cache-hit",
+ Short: "Show cache hit rates for tables and indices",
RunE: func(cmd *cobra.Command, args []string) error {
- return seq_scans.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return db_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
- inspectLongRunningQueriesCmd = &cobra.Command{
- Use: "long-running-queries",
- Short: "Show currently running queries running for longer than 5 minutes",
+ inspectIndexUsageCmd = &cobra.Command{
+ Deprecated: `use "index-stats" instead.`,
+ Use: "index-usage",
+ Short: "Show information about the efficiency of indexes",
RunE: func(cmd *cobra.Command, args []string) error {
- return long_running_queries.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return index_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
- inspectTableRecordCountsCmd = &cobra.Command{
- Use: "table-record-counts",
- Short: "Show estimated number of rows per table",
+ inspectTotalIndexSizeCmd = &cobra.Command{
+ Deprecated: `use "index-stats" instead.`,
+ Use: "total-index-size",
+ Short: "Show total size of all indexes",
RunE: func(cmd *cobra.Command, args []string) error {
- return table_record_counts.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return index_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
- inspectBloatCmd = &cobra.Command{
- Use: "bloat",
- Short: "Estimates space allocated to a relation that is full of dead tuples",
+ inspectIndexSizesCmd = &cobra.Command{
+ Deprecated: `use "index-stats" instead.`,
+ Use: "index-sizes",
+ Short: "Show index sizes of individual indexes",
RunE: func(cmd *cobra.Command, args []string) error {
- return bloat.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return index_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
- inspectVacuumStatsCmd = &cobra.Command{
- Use: "vacuum-stats",
- Short: "Show statistics related to vacuum operations per table",
+ inspectTableSizesCmd = &cobra.Command{
+ Deprecated: `use "table-stats" instead.`,
+ Use: "table-sizes",
+ Short: "Show table sizes of individual tables without their index sizes",
RunE: func(cmd *cobra.Command, args []string) error {
- return vacuum_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return table_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ },
+ }
+
+ inspectTableIndexSizesCmd = &cobra.Command{
+ Deprecated: `use "table-stats" instead.`,
+ Use: "table-index-sizes",
+ Short: "Show index sizes of individual tables",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return table_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ },
+ }
+
+ inspectTotalTableSizesCmd = &cobra.Command{
+ Deprecated: `use "table-stats" instead.`,
+ Use: "total-table-sizes",
+ Short: "Show total table sizes, including table index sizes",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return table_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ },
+ }
+
+ inspectUnusedIndexesCmd = &cobra.Command{
+ Deprecated: `use "index-stats" instead.`,
+ Use: "unused-indexes",
+ Short: "Show indexes with low usage",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return index_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ },
+ }
+
+ inspectTableRecordCountsCmd = &cobra.Command{
+ Deprecated: `use "table-stats" instead.`,
+ Use: "table-record-counts",
+ Short: "Show estimated number of rows per table",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return index_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ },
+ }
+
+ inspectSeqScansCmd = &cobra.Command{
+ Deprecated: `use "index-stats" instead.`,
+ Use: "seq-scans",
+ Short: "Show number of sequential scans recorded against all tables",
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return index_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
inspectRoleConfigsCmd = &cobra.Command{
- Use: "role-configs",
- Short: "Show configuration settings for database roles when they have been modified",
+ Deprecated: `use "role-stats" instead.`,
+ Use: "role-configs",
+ Short: "Show configuration settings for database roles when they have been modified",
RunE: func(cmd *cobra.Command, args []string) error {
- return role_configs.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return role_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
inspectRoleConnectionsCmd = &cobra.Command{
- Use: "role-connections",
- Short: "Show number of active connections for all database roles",
+ Deprecated: `use "role-stats" instead.`,
+ Use: "role-connections",
+ Short: "Show number of active connections for all database roles",
RunE: func(cmd *cobra.Command, args []string) error {
- return role_connections.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
+ return role_stats.Run(cmd.Context(), flags.DbConfig, afero.NewOsFs())
},
}
@@ -217,17 +249,7 @@ var (
Use: "report",
Short: "Generate a CSV output for all inspect commands",
RunE: func(cmd *cobra.Command, args []string) error {
- ctx := cmd.Context()
- if len(outputDir) == 0 {
- defaultPath := filepath.Join(utils.CurrentDirAbs, "report")
- title := fmt.Sprintf("Enter a directory to save output files (or leave blank to use %s): ", utils.Bold(defaultPath))
- if dir, err := utils.NewConsole().PromptText(ctx, title); err != nil {
- return err
- } else if len(dir) == 0 {
- outputDir = defaultPath
- }
- }
- return inspect.Report(ctx, outputDir, flags.DbConfig, afero.NewOsFs())
+ return inspect.Report(cmd.Context(), outputDir, flags.DbConfig, afero.NewOsFs())
},
}
)
@@ -238,28 +260,33 @@ func init() {
inspectFlags.Bool("linked", true, "Inspect the linked project.")
inspectFlags.Bool("local", false, "Inspect the local database.")
inspectCmd.MarkFlagsMutuallyExclusive("db-url", "linked", "local")
- inspectDBCmd.AddCommand(inspectCacheHitCmd)
inspectDBCmd.AddCommand(inspectReplicationSlotsCmd)
- inspectDBCmd.AddCommand(inspectIndexUsageCmd)
+ inspectDBCmd.AddCommand(inspectIndexStatsCmd)
inspectDBCmd.AddCommand(inspectLocksCmd)
inspectDBCmd.AddCommand(inspectBlockingCmd)
inspectDBCmd.AddCommand(inspectOutliersCmd)
inspectDBCmd.AddCommand(inspectCallsCmd)
+ inspectDBCmd.AddCommand(inspectLongRunningQueriesCmd)
+ inspectDBCmd.AddCommand(inspectBloatCmd)
+ inspectDBCmd.AddCommand(inspectVacuumStatsCmd)
+ inspectDBCmd.AddCommand(inspectTableStatsCmd)
+ inspectDBCmd.AddCommand(inspectRoleStatsCmd)
+ inspectDBCmd.AddCommand(inspectDBStatsCmd)
+ // DEPRECATED
+ inspectDBCmd.AddCommand(inspectCacheHitCmd)
+ inspectDBCmd.AddCommand(inspectIndexUsageCmd)
+ inspectDBCmd.AddCommand(inspectSeqScansCmd)
+ inspectDBCmd.AddCommand(inspectUnusedIndexesCmd)
+ inspectDBCmd.AddCommand(inspectTotalTableSizesCmd)
+ inspectDBCmd.AddCommand(inspectTableIndexSizesCmd)
inspectDBCmd.AddCommand(inspectTotalIndexSizeCmd)
inspectDBCmd.AddCommand(inspectIndexSizesCmd)
inspectDBCmd.AddCommand(inspectTableSizesCmd)
- inspectDBCmd.AddCommand(inspectTableIndexSizesCmd)
- inspectDBCmd.AddCommand(inspectTotalTableSizesCmd)
- inspectDBCmd.AddCommand(inspectUnusedIndexesCmd)
- inspectDBCmd.AddCommand(inspectSeqScansCmd)
- inspectDBCmd.AddCommand(inspectLongRunningQueriesCmd)
inspectDBCmd.AddCommand(inspectTableRecordCountsCmd)
- inspectDBCmd.AddCommand(inspectBloatCmd)
- inspectDBCmd.AddCommand(inspectVacuumStatsCmd)
inspectDBCmd.AddCommand(inspectRoleConfigsCmd)
inspectDBCmd.AddCommand(inspectRoleConnectionsCmd)
inspectCmd.AddCommand(inspectDBCmd)
- reportCmd.Flags().StringVar(&outputDir, "output-dir", "", "Path to save CSV files in")
+ reportCmd.Flags().StringVar(&outputDir, "output-dir", ".", "Path to save CSV files in")
inspectCmd.AddCommand(reportCmd)
rootCmd.AddCommand(inspectCmd)
}
diff --git a/cmd/migration.go b/cmd/migration.go
index 30b7716ac3..fc92e40d26 100644
--- a/cmd/migration.go
+++ b/cmd/migration.go
@@ -8,6 +8,7 @@ import (
"github.com/spf13/afero"
"github.com/spf13/cobra"
"github.com/spf13/viper"
+ "github.com/supabase/cli/internal/migration/down"
"github.com/supabase/cli/internal/migration/fetch"
"github.com/supabase/cli/internal/migration/list"
"github.com/supabase/cli/internal/migration/new"
@@ -90,6 +91,17 @@ var (
},
}
+ nLastVersion uint
+
+ migrationDownCmd = &cobra.Command{
+ Use: "down",
+ Short: "Resets applied migrations up to the last n versions",
+ Args: cobra.NoArgs,
+ RunE: func(cmd *cobra.Command, args []string) error {
+ return down.Run(cmd.Context(), nLastVersion, flags.DbConfig, afero.NewOsFs())
+ },
+ }
+
migrationFetchCmd = &cobra.Command{
Use: "fetch",
Short: "Fetch migration files from history table",
@@ -141,6 +153,13 @@ func init() {
upFlags.Bool("local", true, "Applies pending migrations to the local database.")
migrationUpCmd.MarkFlagsMutuallyExclusive("db-url", "linked", "local")
migrationCmd.AddCommand(migrationUpCmd)
+ downFlags := migrationDownCmd.Flags()
+ downFlags.UintVar(&nLastVersion, "last", 1, "Reset up to the last n migration versions.")
+ downFlags.String("db-url", "", "Resets applied migrations on the database specified by the connection string (must be percent-encoded).")
+ downFlags.Bool("linked", false, "Resets applied migrations on the linked project.")
+ downFlags.Bool("local", true, "Resets applied migrations on the local database.")
+ migrationDownCmd.MarkFlagsMutuallyExclusive("db-url", "linked", "local")
+ migrationCmd.AddCommand(migrationDownCmd)
// Build up command
fetchFlags := migrationFetchCmd.Flags()
fetchFlags.String("db-url", "", "Fetches migrations from the database specified by the connection string (must be percent-encoded).")
diff --git a/cmd/projects.go b/cmd/projects.go
index c119e71710..9e03532655 100644
--- a/cmd/projects.go
+++ b/cmd/projects.go
@@ -32,22 +32,27 @@ var (
region = utils.EnumFlag{
Allowed: awsRegions(),
}
- plan = utils.EnumFlag{
- Allowed: []string{string(api.V1CreateProjectBodyDtoPlanFree), string(api.V1CreateProjectBodyDtoPlanPro)},
- Value: string(api.V1CreateProjectBodyDtoPlanFree),
- }
size = utils.EnumFlag{
Allowed: []string{
- string(api.DesiredInstanceSizeMicro),
- string(api.DesiredInstanceSizeSmall),
- string(api.DesiredInstanceSizeMedium),
- string(api.DesiredInstanceSizeLarge),
- string(api.DesiredInstanceSizeXlarge),
- string(api.DesiredInstanceSizeN2xlarge),
- string(api.DesiredInstanceSizeN4xlarge),
- string(api.DesiredInstanceSizeN8xlarge),
- string(api.DesiredInstanceSizeN12xlarge),
- string(api.DesiredInstanceSizeN16xlarge),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeLarge),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeMedium),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeMicro),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN12xlarge),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN16xlarge),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN24xlarge),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN24xlargeHighMemory),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN24xlargeOptimizedCpu),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN24xlargeOptimizedMemory),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN2xlarge),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN48xlarge),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN48xlargeHighMemory),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN48xlargeOptimizedCpu),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN48xlargeOptimizedMemory),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN4xlarge),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeN8xlarge),
+ string(api.V1CreateProjectBodyDesiredInstanceSizePico),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeSmall),
+ string(api.V1CreateProjectBodyDesiredInstanceSizeXlarge),
},
}
@@ -69,14 +74,14 @@ var (
if len(args) > 0 {
projectName = args[0]
}
- body := api.V1CreateProjectBodyDto{
+ body := api.V1CreateProjectBody{
Name: projectName,
OrganizationId: orgId,
DbPass: dbPassword,
- Region: api.V1CreateProjectBodyDtoRegion(region.Value),
+ Region: api.V1CreateProjectBodyRegion(region.Value),
}
if cmd.Flags().Changed("size") {
- body.DesiredInstanceSize = (*api.V1CreateProjectBodyDtoDesiredInstanceSize)(&size.Value)
+ body.DesiredInstanceSize = (*api.V1CreateProjectBodyDesiredInstanceSize)(&size.Value)
}
return create.Run(cmd.Context(), body, afero.NewOsFs())
},
@@ -133,7 +138,7 @@ func init() {
createFlags.StringVar(&orgId, "org-id", "", "Organization ID to create the project in.")
createFlags.StringVar(&dbPassword, "db-password", "", "Database password of the project.")
createFlags.Var(®ion, "region", "Select a region close to you for the best performance.")
- createFlags.Var(&plan, "plan", "Select a plan that suits your needs.")
+ createFlags.String("plan", "", "Select a plan that suits your needs.")
cobra.CheckErr(createFlags.MarkHidden("plan"))
createFlags.Var(&size, "size", "Select a desired instance size for your project.")
cobra.CheckErr(viper.BindPFlag("DB_PASSWORD", createFlags.Lookup("db-password")))
diff --git a/cmd/root.go b/cmd/root.go
index 1e50cf8fba..24aad18d3d 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"net"
+ "net/http"
"net/url"
"os"
"os/signal"
@@ -15,6 +16,7 @@ import (
"github.com/spf13/afero"
"github.com/spf13/cobra"
"github.com/spf13/viper"
+ "github.com/supabase/cli/internal/debug"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/internal/utils/flags"
"golang.org/x/mod/semver"
@@ -109,12 +111,12 @@ var (
}
}
}
- if err := flags.ParseDatabaseConfig(cmd.Flags(), fsys); err != nil {
+ if err := flags.ParseDatabaseConfig(ctx, cmd.Flags(), fsys); err != nil {
return err
}
// Prepare context
if viper.GetBool("DEBUG") {
- ctx = utils.WithTraceContext(ctx)
+ http.DefaultTransport = debug.NewTransport()
fmt.Fprintln(os.Stderr, cmd.Root().Short)
}
cmd.SetContext(ctx)
@@ -198,6 +200,9 @@ func recoverAndExit() {
!viper.GetBool("DEBUG") {
utils.CmdSuggestion = utils.SuggestDebugFlag
}
+ if e, ok := err.(*errors.Error); ok && len(utils.Version) == 0 {
+ fmt.Fprintln(os.Stderr, string(e.Stack()))
+ }
msg = err.Error()
default:
msg = fmt.Sprintf("%#v", err)
@@ -227,6 +232,7 @@ func init() {
})
flags := rootCmd.PersistentFlags()
+ flags.Bool("yes", false, "answer yes to all prompts")
flags.Bool("debug", false, "output debug logs to stderr")
flags.String("workdir", "", "path to a Supabase project directory")
flags.Bool("experimental", false, "enable experimental features")
diff --git a/cmd/services.go b/cmd/services.go
index fe298cb437..955f6bc2bd 100644
--- a/cmd/services.go
+++ b/cmd/services.go
@@ -8,7 +8,7 @@ import (
var (
servicesCmd = &cobra.Command{
- GroupID: groupManagementAPI,
+ GroupID: groupLocalDev,
Use: "services",
Short: "Show versions of all Supabase services",
RunE: func(cmd *cobra.Command, args []string) error {
diff --git a/cmd/storage.go b/cmd/storage.go
index 3e6eb8fea3..aa3876e92f 100644
--- a/cmd/storage.go
+++ b/cmd/storage.go
@@ -70,7 +70,6 @@ cp -r ss:///bucket/docs .
Example: `rm -r ss:///bucket/docs
rm ss:///bucket/docs/example.md ss:///bucket/readme.md
`,
- Args: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
return rm.Run(cmd.Context(), args, recursive, afero.NewOsFs())
},
diff --git a/docs/supabase/config/push.md b/docs/supabase/config/push.md
new file mode 100644
index 0000000000..859d340ad7
--- /dev/null
+++ b/docs/supabase/config/push.md
@@ -0,0 +1,5 @@
+# supabase-config-push
+
+Updates the configurations of a linked Supabase project with the local `supabase/config.toml` file.
+
+This command allows you to manage project configuration as code by defining settings locally and then pushing them to your remote project.
diff --git a/docs/supabase/functions.md b/docs/supabase/functions.md
new file mode 100644
index 0000000000..d0a08de06c
--- /dev/null
+++ b/docs/supabase/functions.md
@@ -0,0 +1,9 @@
+## supabase-functions
+
+Manage Supabase Edge Functions.
+
+Supabase Edge Functions are server-less functions that run close to your users.
+
+Edge Functions allow you to execute custom server-side code without deploying or scaling a traditional server. They're ideal for handling webhooks, custom API endpoints, data validation, and serving personalized content.
+
+Edge Functions are written in TypeScript and run on Deno compatible edge runtime, which is a secure runtime with no package management needed, fast cold starts, and built-in security.
diff --git a/docs/supabase/functions/new.md b/docs/supabase/functions/new.md
new file mode 100644
index 0000000000..cfe689ae0e
--- /dev/null
+++ b/docs/supabase/functions/new.md
@@ -0,0 +1,7 @@
+## supabase-functions-new
+
+Creates a new Edge Function with boilerplate code in the `supabase/functions` directory.
+
+This command generates a starter TypeScript file with the necessary Deno imports and a basic function structure. The function is created as a new directory with the name you specify, containing an `index.ts` file with the function code.
+
+After creating the function, you can edit it locally and then use `supabase functions serve` to test it before deploying with `supabase functions deploy`.
diff --git a/docs/supabase/gen.md b/docs/supabase/gen.md
new file mode 100644
index 0000000000..f88cbf8c9e
--- /dev/null
+++ b/docs/supabase/gen.md
@@ -0,0 +1,9 @@
+## supabase-gen
+
+Automatically generates type definitions based on your Postgres database schema.
+
+This command connects to your database (local or remote) and generates typed definitions that match your database tables, views, and stored procedures. By default, it generates TypeScript definitions, but also supports Go and Swift.
+
+Generated types give you type safety and autocompletion when working with your database in code, helping prevent runtime errors and improving developer experience.
+
+The types respect relationships, constraints, and custom types defined in your database schema.
diff --git a/docs/supabase/projects.md b/docs/supabase/projects.md
new file mode 100644
index 0000000000..d01c49ed65
--- /dev/null
+++ b/docs/supabase/projects.md
@@ -0,0 +1,7 @@
+## supabase-projects
+
+Provides tools for creating and managing your Supabase projects.
+
+This command group allows you to list all projects in your organizations, create new projects, delete existing projects, and retrieve API keys. These operations help you manage your Supabase infrastructure programmatically without using the dashboard.
+
+Project management via CLI is especially useful for automation scripts and when you need to provision environments in a repeatable way.
diff --git a/docs/supabase/secrets.md b/docs/supabase/secrets.md
new file mode 100644
index 0000000000..82541c9d05
--- /dev/null
+++ b/docs/supabase/secrets.md
@@ -0,0 +1,11 @@
+## supabase-secrets
+
+Provides tools for managing environment variables and secrets for your Supabase project.
+
+This command group allows you to set, unset, and list secrets that are securely stored and made available to Edge Functions as environment variables.
+
+Secrets management through the CLI is useful for:
+- Setting environment-specific configuration
+- Managing sensitive credentials securely
+
+Secrets can be set individually or loaded from .env files for convenience.
diff --git a/go.mod b/go.mod
index 4531caa13a..033126a151 100644
--- a/go.mod
+++ b/go.mod
@@ -1,88 +1,80 @@
module github.com/supabase/cli
-go 1.23.2
-
-toolchain go1.24.1
+go 1.24.4
require (
github.com/BurntSushi/toml v1.5.0
github.com/Netflix/go-env v0.1.2
- github.com/andybalholm/brotli v1.1.1
+ github.com/andybalholm/brotli v1.2.0
github.com/cenkalti/backoff/v4 v4.3.0
github.com/charmbracelet/bubbles v0.18.0
github.com/charmbracelet/bubbletea v0.25.0
- github.com/charmbracelet/glamour v0.7.0
- github.com/charmbracelet/lipgloss v0.12.1
- github.com/containers/common v0.62.2
- github.com/docker/cli v28.0.2+incompatible
- github.com/docker/docker v28.0.2+incompatible
+ github.com/charmbracelet/glamour v0.9.1
+ github.com/charmbracelet/lipgloss v1.1.0
+ github.com/containerd/errdefs v1.0.0
+ github.com/containers/common v0.64.0
+ github.com/docker/cli v28.3.3+incompatible
+ github.com/docker/docker v28.3.3+incompatible
github.com/docker/go-connections v0.5.0
- github.com/docker/go-units v0.5.0
- github.com/ecies/go/v2 v2.0.10
- github.com/getsentry/sentry-go v0.31.1
+ github.com/fsnotify/fsnotify v1.9.0
+ github.com/getsentry/sentry-go v0.35.0
github.com/go-errors/errors v1.5.1
- github.com/go-git/go-git/v5 v5.14.0
+ github.com/go-git/go-git/v5 v5.16.2
github.com/go-xmlfmt/xmlfmt v1.1.3
- github.com/golang-jwt/jwt/v5 v5.2.2
- github.com/golangci/golangci-lint v1.64.8
github.com/google/go-github/v62 v62.0.0
github.com/google/go-querystring v1.1.0
github.com/google/uuid v1.6.0
github.com/h2non/gock v1.2.0
github.com/jackc/pgconn v1.14.3
github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438
- github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65
github.com/jackc/pgproto3/v2 v2.3.3
- github.com/jackc/pgtype v1.14.4
github.com/jackc/pgx/v4 v4.18.3
github.com/joho/godotenv v1.5.1
- github.com/mitchellh/mapstructure v1.5.0
+ github.com/mithrandie/csvq-driver v1.7.0
github.com/muesli/reflow v0.3.0
- github.com/oapi-codegen/oapi-codegen/v2 v2.4.1
- github.com/oapi-codegen/runtime v1.1.1
- github.com/slack-go/slack v0.16.0
+ github.com/oapi-codegen/nullable v1.1.0
+ github.com/slack-go/slack v0.17.3
github.com/spf13/afero v1.14.0
github.com/spf13/cobra v1.9.1
- github.com/spf13/pflag v1.0.6
- github.com/spf13/viper v1.19.0
+ github.com/spf13/pflag v1.0.7
+ github.com/spf13/viper v1.20.1
github.com/stretchr/testify v1.10.0
- github.com/stripe/pg-schema-diff v0.8.0
+ github.com/stripe/pg-schema-diff v0.9.1
+ github.com/supabase/cli/pkg v1.0.0
github.com/tidwall/jsonc v0.3.2
github.com/withfig/autocomplete-tools/packages/cobra v1.2.0
github.com/zalando/go-keyring v0.2.6
- go.opentelemetry.io/otel v1.35.0
- golang.org/x/mod v0.24.0
- golang.org/x/oauth2 v0.28.0
- golang.org/x/term v0.30.0
- google.golang.org/grpc v1.71.0
+ go.opentelemetry.io/otel v1.37.0
+ golang.org/x/mod v0.26.0
+ golang.org/x/oauth2 v0.30.0
+ golang.org/x/term v0.33.0
+ google.golang.org/grpc v1.74.2
gopkg.in/yaml.v3 v3.0.1
- gotest.tools/gotestsum v1.12.1
)
require (
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
4d63.com/gochecknoglobals v0.2.2 // indirect
al.essio.dev/pkg/shellescape v1.5.1 // indirect
- dario.cat/mergo v1.0.1 // indirect
+ dario.cat/mergo v1.0.2 // indirect
github.com/4meepo/tagalign v1.4.2 // indirect
github.com/Abirdcfly/dupword v0.1.3 // indirect
- github.com/Antonboom/errname v1.0.0 // indirect
- github.com/Antonboom/nilnil v1.0.1 // indirect
- github.com/Antonboom/testifylint v1.5.2 // indirect
+ github.com/Antonboom/errname v1.1.0 // indirect
+ github.com/Antonboom/nilnil v1.1.0 // indirect
+ github.com/Antonboom/testifylint v1.6.1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
- github.com/Crocmagnon/fatcontext v0.7.1 // indirect
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 // indirect
- github.com/Masterminds/semver/v3 v3.3.0 // indirect
+ github.com/Masterminds/semver/v3 v3.3.1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
- github.com/ProtonMail/go-crypto v1.1.5 // indirect
- github.com/alecthomas/chroma/v2 v2.8.0 // indirect
+ github.com/ProtonMail/go-crypto v1.1.6 // indirect
+ github.com/alecthomas/chroma/v2 v2.17.2 // indirect
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
- github.com/alexkohler/nakedret/v2 v2.0.5 // indirect
+ github.com/alexkohler/nakedret/v2 v2.0.6 // indirect
github.com/alexkohler/prealloc v1.0.0 // indirect
github.com/alingse/asasalint v0.0.11 // indirect
- github.com/alingse/nilnesserr v0.1.2 // indirect
+ github.com/alingse/nilnesserr v0.2.0 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/ashanbrown/forbidigo v1.6.0 // indirect
github.com/ashanbrown/makezero v1.2.0 // indirect
@@ -93,57 +85,60 @@ require (
github.com/bitfield/gotestdox v0.2.2 // indirect
github.com/bkielbasa/cyclop v1.2.3 // indirect
github.com/blizzy78/varnamelen v0.8.0 // indirect
- github.com/bombsimon/wsl/v4 v4.5.0 // indirect
- github.com/breml/bidichk v0.3.2 // indirect
- github.com/breml/errchkjson v0.4.0 // indirect
- github.com/butuzov/ireturn v0.3.1 // indirect
+ github.com/bombsimon/wsl/v4 v4.7.0 // indirect
+ github.com/breml/bidichk v0.3.3 // indirect
+ github.com/breml/errchkjson v0.4.1 // indirect
+ github.com/butuzov/ireturn v0.4.0 // indirect
github.com/butuzov/mirror v1.3.0 // indirect
- github.com/catenacyber/perfsprint v0.8.2 // indirect
+ github.com/catenacyber/perfsprint v0.9.1 // indirect
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/charithe/durationcheck v0.0.10 // indirect
+ github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
github.com/charmbracelet/harmonica v0.2.0 // indirect
- github.com/charmbracelet/x/ansi v0.1.4 // indirect
+ github.com/charmbracelet/x/ansi v0.8.0 // indirect
+ github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
+ github.com/charmbracelet/x/term v0.2.1 // indirect
github.com/chavacava/garif v0.1.0 // indirect
- github.com/ckaznocha/intrange v0.3.0 // indirect
- github.com/cloudflare/circl v1.6.0 // indirect
+ github.com/ckaznocha/intrange v0.3.1 // indirect
+ github.com/cloudflare/circl v1.6.1 // indirect
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect
- github.com/containerd/log v0.1.0 // indirect
- github.com/containers/storage v1.57.2 // indirect
+ github.com/containerd/errdefs/pkg v0.3.0 // indirect
+ github.com/containers/storage v1.59.0 // indirect
github.com/curioswitch/go-reassign v0.3.0 // indirect
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
- github.com/daixiang0/gci v0.13.5 // indirect
+ github.com/daixiang0/gci v0.13.6 // indirect
github.com/danieljoos/wincred v1.2.2 // indirect
+ github.com/dave/dst v0.27.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
- github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
+ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
github.com/denis-tingaikin/go-header v0.5.0 // indirect
github.com/distribution/reference v0.6.0 // indirect
- github.com/dlclark/regexp2 v1.11.0 // indirect
+ github.com/dlclark/regexp2 v1.11.5 // indirect
github.com/dnephin/pflag v1.0.7 // indirect
- github.com/docker/distribution v2.8.3+incompatible // indirect
- github.com/docker/docker-credential-helpers v0.8.2 // indirect
- github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect
+ github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
+ github.com/docker/go-units v0.5.0 // indirect
github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect
+ github.com/ecies/go/v2 v2.0.11 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
- github.com/ethereum/go-ethereum v1.14.13 // indirect
+ github.com/ethereum/go-ethereum v1.15.8 // indirect
github.com/ettle/strcase v0.2.0 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fatih/structtag v1.2.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
- github.com/firefart/nonamedreturns v1.0.5 // indirect
- github.com/fsnotify/fsnotify v1.8.0 // indirect
+ github.com/firefart/nonamedreturns v1.0.6 // indirect
github.com/fvbommel/sortorder v1.1.0 // indirect
github.com/fzipp/gocyclo v0.6.0 // indirect
- github.com/getkin/kin-openapi v0.127.0 // indirect
- github.com/ghostiam/protogetter v0.3.9 // indirect
- github.com/go-critic/go-critic v0.12.0 // indirect
+ github.com/getkin/kin-openapi v0.131.0 // indirect
+ github.com/ghostiam/protogetter v0.3.15 // indirect
+ github.com/go-critic/go-critic v0.13.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.6.2 // indirect
- github.com/go-logr/logr v1.4.2 // indirect
+ github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
- github.com/go-openapi/swag v0.23.0 // indirect
+ github.com/go-openapi/swag v0.23.1 // indirect
github.com/go-toolsmith/astcast v1.1.0 // indirect
github.com/go-toolsmith/astcopy v1.1.0 // indirect
github.com/go-toolsmith/astequal v1.2.0 // indirect
@@ -151,26 +146,28 @@ require (
github.com/go-toolsmith/astp v1.1.0 // indirect
github.com/go-toolsmith/strparse v1.1.0 // indirect
github.com/go-toolsmith/typep v1.1.0 // indirect
- github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
+ github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gofrs/flock v0.12.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
github.com/golangci/go-printf-func-name v0.1.0 // indirect
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
+ github.com/golangci/golangci-lint/v2 v2.1.6 // indirect
+ github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 // indirect
github.com/golangci/misspell v0.6.0 // indirect
github.com/golangci/plugin-module-register v0.1.1 // indirect
github.com/golangci/revgrep v0.8.0 // indirect
- github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect
+ github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/gordonklaus/ineffassign v0.1.0 // indirect
- github.com/gorilla/css v1.0.0 // indirect
- github.com/gorilla/mux v1.8.1 // indirect
- github.com/gorilla/websocket v1.5.0 // indirect
+ github.com/gorilla/css v1.0.1 // indirect
+ github.com/gorilla/websocket v1.5.3 // indirect
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
github.com/gostaticanalysis/comment v1.5.0 // indirect
github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect
@@ -180,16 +177,16 @@ require (
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
- github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
- github.com/invopop/yaml v0.3.1 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
+ github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
+ github.com/jackc/pgtype v1.14.4 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
- github.com/jgautheron/goconst v1.7.1 // indirect
+ github.com/jgautheron/goconst v1.8.1 // indirect
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
github.com/jjti/go-spancheck v0.6.4 // indirect
github.com/josharian/intern v1.0.0 // indirect
@@ -201,19 +198,19 @@ require (
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kulti/thelper v0.6.3 // indirect
- github.com/kunwardeep/paralleltest v1.0.10 // indirect
+ github.com/kunwardeep/paralleltest v1.0.14 // indirect
github.com/lasiar/canonicalheader v1.1.2 // indirect
- github.com/ldez/exptostd v0.4.2 // indirect
+ github.com/ldez/exptostd v0.4.3 // indirect
github.com/ldez/gomoddirectives v0.6.1 // indirect
github.com/ldez/grignotin v0.9.0 // indirect
github.com/ldez/tagliatelle v0.7.1 // indirect
- github.com/ldez/usetesting v0.4.2 // indirect
+ github.com/ldez/usetesting v0.4.3 // indirect
github.com/leonklingele/grouper v1.1.2 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
- github.com/macabu/inamedparam v0.1.3 // indirect
- github.com/magiconair/properties v1.8.7 // indirect
- github.com/mailru/easyjson v0.7.7 // indirect
+ github.com/macabu/inamedparam v0.2.0 // indirect
+ github.com/mailru/easyjson v0.9.0 // indirect
+ github.com/manuelarte/funcorder v0.2.1 // indirect
github.com/maratori/testableexamples v1.0.0 // indirect
github.com/maratori/testpackage v1.1.1 // indirect
github.com/matoous/godox v1.1.0 // indirect
@@ -222,12 +219,16 @@ require (
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
- github.com/mgechev/revive v1.7.0 // indirect
- github.com/microcosm-cc/bluemonday v1.0.25 // indirect
- github.com/miekg/pkcs11 v1.1.1 // indirect
+ github.com/mgechev/revive v1.9.0 // indirect
+ github.com/microcosm-cc/bluemonday v1.0.27 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
+ github.com/mithrandie/csvq v1.18.1 // indirect
+ github.com/mithrandie/go-file/v2 v2.1.0 // indirect
+ github.com/mithrandie/go-text v1.6.0 // indirect
+ github.com/mithrandie/ternary v1.1.1 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
+ github.com/moby/sys/atomicwriter v0.1.0 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
@@ -235,25 +236,29 @@ require (
github.com/morikuni/aec v1.0.0 // indirect
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
- github.com/muesli/termenv v0.15.2 // indirect
+ github.com/muesli/termenv v0.16.0 // indirect
github.com/nakabonne/nestif v0.3.1 // indirect
github.com/nishanths/exhaustive v0.12.0 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/nunnatsa/ginkgolinter v0.19.1 // indirect
+ github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 // indirect
+ github.com/oapi-codegen/runtime v1.1.2 // indirect
+ github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
+ github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
- github.com/opencontainers/image-spec v1.1.0 // indirect
- github.com/pelletier/go-toml/v2 v2.2.3 // indirect
+ github.com/opencontainers/image-spec v1.1.1 // indirect
+ github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pjbgf/sha1cd v0.3.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
- github.com/polyfloyd/go-errorlint v1.7.1 // indirect
+ github.com/polyfloyd/go-errorlint v1.8.0 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
- github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect
+ github.com/quasilyte/go-ruleguard v0.4.4 // indirect
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
github.com/quasilyte/gogrep v0.5.0 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
@@ -261,36 +266,34 @@ require (
github.com/raeperd/recvcheck v0.2.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
- github.com/ryancurrah/gomodguard v1.3.5 // indirect
+ github.com/ryancurrah/gomodguard v1.4.1 // indirect
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
- github.com/sagikazarmark/locafero v0.4.0 // indirect
- github.com/sagikazarmark/slog-shim v0.1.0 // indirect
+ github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f // indirect
github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.28.0 // indirect
- github.com/securego/gosec/v2 v2.22.2 // indirect
+ github.com/securego/gosec/v2 v2.22.3 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sivchari/containedctx v1.0.3 // indirect
- github.com/sivchari/tenv v1.12.1 // indirect
github.com/skeema/knownhosts v1.3.1 // indirect
github.com/sonatard/noctx v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/sourcegraph/go-diff v0.7.0 // indirect
github.com/speakeasy-api/openapi-overlay v0.9.0 // indirect
- github.com/spf13/cast v1.6.0 // indirect
+ github.com/spf13/cast v1.7.1 // indirect
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tdakkota/asciicheck v0.4.1 // indirect
- github.com/tetafro/godot v1.5.0 // indirect
+ github.com/tetafro/godot v1.5.1 // indirect
github.com/theupdateframework/notary v0.7.0 // indirect
- github.com/timakin/bodyclose v0.0.0-20241017074812-ed6a65f985e3 // indirect
- github.com/timonwong/loggercheck v0.10.1 // indirect
- github.com/tomarrell/wrapcheck/v2 v2.10.0 // indirect
+ github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 // indirect
+ github.com/timonwong/loggercheck v0.11.0 // indirect
+ github.com/tomarrell/wrapcheck/v2 v2.11.0 // indirect
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
github.com/ultraware/funlen v0.2.0 // indirect
github.com/ultraware/whitespace v0.2.0 // indirect
@@ -301,45 +304,54 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
- github.com/xen0n/gosmopolitan v1.2.2 // indirect
+ github.com/xen0n/gosmopolitan v1.3.0 // indirect
+ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/yagipy/maintidx v1.0.0 // indirect
github.com/yeya24/promlinter v0.3.0 // indirect
github.com/ykadowak/zerologlint v0.1.5 // indirect
- github.com/yuin/goldmark v1.5.4 // indirect
- github.com/yuin/goldmark-emoji v1.0.2 // indirect
+ github.com/yuin/goldmark v1.7.8 // indirect
+ github.com/yuin/goldmark-emoji v1.0.5 // indirect
gitlab.com/bosi/decorder v0.4.2 // indirect
- go-simpler.org/musttag v0.13.0 // indirect
- go-simpler.org/sloglint v0.9.0 // indirect
+ go-simpler.org/musttag v0.13.1 // indirect
+ go-simpler.org/sloglint v0.11.0 // indirect
+ go.augendre.info/fatcontext v0.8.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
- go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 // indirect
- go.opentelemetry.io/otel/metric v1.35.0 // indirect
- go.opentelemetry.io/otel/sdk v1.34.0 // indirect
- go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect
- go.opentelemetry.io/otel/trace v1.35.0 // indirect
+ go.opentelemetry.io/otel/metric v1.37.0 // indirect
+ go.opentelemetry.io/otel/sdk v1.36.0 // indirect
+ go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
+ go.opentelemetry.io/otel/trace v1.37.0 // indirect
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.uber.org/zap v1.24.0 // indirect
- golang.org/x/crypto v0.36.0 // indirect
- golang.org/x/exp v0.0.0-20250103183323-7d7fa50e5329 // indirect
+ golang.org/x/crypto v0.40.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect
- golang.org/x/net v0.37.0 // indirect
- golang.org/x/sync v0.12.0 // indirect
- golang.org/x/sys v0.31.0 // indirect
- golang.org/x/text v0.23.0 // indirect
- golang.org/x/tools v0.31.0 // indirect
- google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 // indirect
- google.golang.org/protobuf v1.36.5 // indirect
- gopkg.in/ini.v1 v1.67.0 // indirect
+ golang.org/x/net v0.41.0 // indirect
+ golang.org/x/sync v0.16.0 // indirect
+ golang.org/x/sys v0.34.0 // indirect
+ golang.org/x/text v0.27.0 // indirect
+ golang.org/x/tools v0.34.0 // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect
+ google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
+ gotest.tools/gotestsum v1.12.2 // indirect
honnef.co/go/tools v0.6.1 // indirect
- mvdan.cc/gofumpt v0.7.0 // indirect
- mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect
+ mvdan.cc/gofumpt v0.8.0 // indirect
+ mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 // indirect
+)
+
+replace github.com/supabase/cli/pkg v1.0.0 => ./pkg
+
+tool (
+ github.com/golangci/golangci-lint/v2/cmd/golangci-lint
+ github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen
+ gotest.tools/gotestsum
)
diff --git a/go.sum b/go.sum
index 715c72d570..eff73ce59d 100644
--- a/go.sum
+++ b/go.sum
@@ -36,34 +36,32 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
-dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
-dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
+dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8=
+dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/4meepo/tagalign v1.4.2 h1:0hcLHPGMjDyM1gHG58cS73aQF8J4TdVR96TZViorO9E=
github.com/4meepo/tagalign v1.4.2/go.mod h1:+p4aMyFM+ra7nb41CnFG6aSDXqRxU/w1VQqScKqDARI=
github.com/Abirdcfly/dupword v0.1.3 h1:9Pa1NuAsZvpFPi9Pqkd93I7LIYRURj+A//dFd5tgBeE=
github.com/Abirdcfly/dupword v0.1.3/go.mod h1:8VbB2t7e10KRNdwTVoxdBaxla6avbhGzb8sCTygUMhw=
-github.com/Antonboom/errname v1.0.0 h1:oJOOWR07vS1kRusl6YRSlat7HFnb3mSfMl6sDMRoTBA=
-github.com/Antonboom/errname v1.0.0/go.mod h1:gMOBFzK/vrTiXN9Oh+HFs+e6Ndl0eTFbtsRTSRdXyGI=
-github.com/Antonboom/nilnil v1.0.1 h1:C3Tkm0KUxgfO4Duk3PM+ztPncTFlOf0b2qadmS0s4xs=
-github.com/Antonboom/nilnil v1.0.1/go.mod h1:CH7pW2JsRNFgEh8B2UaPZTEPhCMuFowP/e8Udp9Nnb0=
-github.com/Antonboom/testifylint v1.5.2 h1:4s3Xhuv5AvdIgbd8wOOEeo0uZG7PbDKQyKY5lGoQazk=
-github.com/Antonboom/testifylint v1.5.2/go.mod h1:vxy8VJ0bc6NavlYqjZfmp6EfqXMtBgQ4+mhCojwC1P8=
+github.com/Antonboom/errname v1.1.0 h1:A+ucvdpMwlo/myWrkHEUEBWc/xuXdud23S8tmTb/oAE=
+github.com/Antonboom/errname v1.1.0/go.mod h1:O1NMrzgUcVBGIfi3xlVuvX8Q/VP/73sseCaAppfjqZw=
+github.com/Antonboom/nilnil v1.1.0 h1:jGxJxjgYS3VUUtOTNk8Z1icwT5ESpLH/426fjmQG+ng=
+github.com/Antonboom/nilnil v1.1.0/go.mod h1:b7sAlogQjFa1wV8jUW3o4PMzDVFLbTux+xnQdvzdcIE=
+github.com/Antonboom/testifylint v1.6.1 h1:6ZSytkFWatT8mwZlmRCHkWz1gPi+q6UBSbieji2Gj/o=
+github.com/Antonboom/testifylint v1.6.1/go.mod h1:k+nEkathI2NFjKO6HvwmSrbzUcQ6FAnbZV+ZRrnXPLI=
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg=
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/Crocmagnon/fatcontext v0.7.1 h1:SC/VIbRRZQeQWj/TcQBS6JmrXcfA+BU4OGSVUt54PjM=
-github.com/Crocmagnon/fatcontext v0.7.1/go.mod h1:1wMvv3NXEBJucFGfwOJBxSVWcoIO6emV215SMkW9MFU=
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM=
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 h1:Sz1JIXEcSfhz7fUi7xHnhpIE0thVASYjvosApmHuD2k=
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1/go.mod h1:n/LSCXNuIYqVfBlVXyHfMQkZDdp1/mmxfSjADd3z1Zg=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0=
-github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
+github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4=
+github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
@@ -71,15 +69,14 @@ github.com/Netflix/go-env v0.1.2 h1:0DRoLR9lECQ9Zqvkswuebm3jJ/2enaDX6Ei8/Z+EnK0=
github.com/Netflix/go-env v0.1.2/go.mod h1:WlIhYi++8FlKNJtrop1mjXYAJMzv1f43K4MqCoh0yGE=
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 h1:vckeWVESWp6Qog7UZSARNqfu/cZqvki8zsuj3piCMx4=
github.com/OpenPeeDeeP/depguard/v2 v2.2.1/go.mod h1:q4DKzC4UcVaAvcfd41CZh0PWpGgzrVxUYBlgKNGquUo=
-github.com/ProtonMail/go-crypto v1.1.5 h1:eoAQfK2dwL+tFSFpr7TbOaPNUbPiJj4fLYwwGE1FQO4=
-github.com/ProtonMail/go-crypto v1.1.5/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
+github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNxpLfdw=
+github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
-github.com/Shopify/logrus-bugsnag v0.0.0-20170309145241-6dbc35f2c30d h1:hi6J4K6DKrR4/ljxn6SF6nURyu785wKMuQcjt7H3VCQ=
github.com/Shopify/logrus-bugsnag v0.0.0-20170309145241-6dbc35f2c30d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
-github.com/alecthomas/chroma/v2 v2.8.0 h1:w9WJUjFFmHHB2e8mRpL9jjy3alYDlU0QLDezj1xE264=
-github.com/alecthomas/chroma/v2 v2.8.0/go.mod h1:yrkMI9807G1ROx13fhe1v6PN2DDeaR73L3d+1nmYQtw=
+github.com/alecthomas/chroma/v2 v2.17.2 h1:Rm81SCZ2mPoH+Q8ZCc/9YvzPUN/E7HgPiPJD8SLV6GI=
+github.com/alecthomas/chroma/v2 v2.17.2/go.mod h1:RVX6AvYm4VfYe/zsk7mjHueLDZor3aWCNE14TFlepBk=
github.com/alecthomas/go-check-sumtype v0.3.1 h1:u9aUvbGINJxLVXiFvHUlPEaD7VDULsrxJb4Aq31NLkU=
github.com/alecthomas/go-check-sumtype v0.3.1/go.mod h1:A8TSiN3UPRw3laIgWEUOHHLPa6/r9MtoigdlP5h3K/E=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
@@ -89,16 +86,16 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
-github.com/alexkohler/nakedret/v2 v2.0.5 h1:fP5qLgtwbx9EJE8dGEERT02YwS8En4r9nnZ71RK+EVU=
-github.com/alexkohler/nakedret/v2 v2.0.5/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU=
+github.com/alexkohler/nakedret/v2 v2.0.6 h1:ME3Qef1/KIKr3kWX3nti3hhgNxw6aqN5pZmQiFSsuzQ=
+github.com/alexkohler/nakedret/v2 v2.0.6/go.mod h1:l3RKju/IzOMQHmsEvXwkqMDzHHvurNQfAgE1eVmT40Q=
github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw=
github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE=
github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw=
github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I=
-github.com/alingse/nilnesserr v0.1.2 h1:Yf8Iwm3z2hUUrP4muWfW83DF4nE3r1xZ26fGWUKCZlo=
-github.com/alingse/nilnesserr v0.1.2/go.mod h1:1xJPrXonEtX7wyTq8Dytns5P2hNzoWymVUIaKm4HNFg=
-github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
-github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
+github.com/alingse/nilnesserr v0.2.0 h1:raLem5KG7EFVb4UIDAXgrv3N2JIaffeKNtcEXkEWd/w=
+github.com/alingse/nilnesserr v0.2.0/go.mod h1:1xJPrXonEtX7wyTq8Dytns5P2hNzoWymVUIaKm4HNFg=
+github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ=
+github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
@@ -113,6 +110,8 @@ github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
+github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8=
+github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
@@ -132,24 +131,21 @@ github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ
github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k=
github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
-github.com/bombsimon/wsl/v4 v4.5.0 h1:iZRsEvDdyhd2La0FVi5k6tYehpOR/R7qIUjmKk7N74A=
-github.com/bombsimon/wsl/v4 v4.5.0/go.mod h1:NOQ3aLF4nD7N5YPXMruR6ZXDOAqLoM0GEpLwTdvmOSc=
-github.com/breml/bidichk v0.3.2 h1:xV4flJ9V5xWTqxL+/PMFF6dtJPvZLPsyixAoPe8BGJs=
-github.com/breml/bidichk v0.3.2/go.mod h1:VzFLBxuYtT23z5+iVkamXO386OB+/sVwZOpIj6zXGos=
-github.com/breml/errchkjson v0.4.0 h1:gftf6uWZMtIa/Is3XJgibewBm2ksAQSY/kABDNFTAdk=
-github.com/breml/errchkjson v0.4.0/go.mod h1:AuBOSTHyLSaaAFlWsRSuRBIroCh3eh7ZHh5YeelDIk8=
-github.com/bugsnag/bugsnag-go v1.0.5-0.20150529004307-13fd6b8acda0 h1:s7+5BfS4WFJoVF9pnB8kBk03S7pZXRdKamnV0FOl5Sc=
+github.com/bombsimon/wsl/v4 v4.7.0 h1:1Ilm9JBPRczjyUs6hvOPKvd7VL1Q++PL8M0SXBDf+jQ=
+github.com/bombsimon/wsl/v4 v4.7.0/go.mod h1:uV/+6BkffuzSAVYD+yGyld1AChO7/EuLrCF/8xTiapg=
+github.com/breml/bidichk v0.3.3 h1:WSM67ztRusf1sMoqH6/c4OBCUlRVTKq+CbSeo0R17sE=
+github.com/breml/bidichk v0.3.3/go.mod h1:ISbsut8OnjB367j5NseXEGGgO/th206dVa427kR8YTE=
+github.com/breml/errchkjson v0.4.1 h1:keFSS8D7A2T0haP9kzZTi7o26r7kE3vymjZNeNDRDwg=
+github.com/breml/errchkjson v0.4.1/go.mod h1:a23OvR6Qvcl7DG/Z4o0el6BRAjKnaReoPQFciAl9U3s=
github.com/bugsnag/bugsnag-go v1.0.5-0.20150529004307-13fd6b8acda0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
-github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ=
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
-github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o=
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
-github.com/butuzov/ireturn v0.3.1 h1:mFgbEI6m+9W8oP/oDdfA34dLisRFCj2G6o/yiI1yZrY=
-github.com/butuzov/ireturn v0.3.1/go.mod h1:ZfRp+E7eJLC0NQmk1Nrm1LOrn/gQlOykv+cVPdiXH5M=
+github.com/butuzov/ireturn v0.4.0 h1:+s76bF/PfeKEdbG8b54aCocxXmi0wvYdOVsWxVO7n8E=
+github.com/butuzov/ireturn v0.4.0/go.mod h1:ghI0FrCmap8pDWZwfPisFD1vEc56VKH4NpQUxDHta70=
github.com/butuzov/mirror v1.3.0 h1:HdWCXzmwlQHdVhwvsfBb2Au0r3HyINry3bDWLYXiKoc=
github.com/butuzov/mirror v1.3.0/go.mod h1:AEij0Z8YMALaq4yQj9CPPVYOyJQyiexpQEQgihajRfI=
-github.com/catenacyber/perfsprint v0.8.2 h1:+o9zVmCSVa7M4MvabsWvESEhpsMkhfE7k0sHNGL95yw=
-github.com/catenacyber/perfsprint v0.8.2/go.mod h1:q//VWC2fWbcdSLEY1R3l8n0zQCDPdE4IjZwyY1HMunM=
+github.com/catenacyber/perfsprint v0.9.1 h1:5LlTp4RwTooQjJCvGEFV6XksZvWE7wCOUvjD2z0vls0=
+github.com/catenacyber/perfsprint v0.9.1/go.mod h1:q//VWC2fWbcdSLEY1R3l8n0zQCDPdE4IjZwyY1HMunM=
github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg=
github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
@@ -165,37 +161,48 @@ github.com/charmbracelet/bubbles v0.18.0 h1:PYv1A036luoBGroX6VWjQIE9Syf2Wby2oOl/
github.com/charmbracelet/bubbles v0.18.0/go.mod h1:08qhZhtIwzgrtBjAcJnij1t1H0ZRjwHyGsy6AL11PSw=
github.com/charmbracelet/bubbletea v0.25.0 h1:bAfwk7jRz7FKFl9RzlIULPkStffg5k6pNt5dywy4TcM=
github.com/charmbracelet/bubbletea v0.25.0/go.mod h1:EN3QDR1T5ZdWmdfDzYcqOCAps45+QIJbLOBxmVNWNNg=
-github.com/charmbracelet/glamour v0.7.0 h1:2BtKGZ4iVJCDfMF229EzbeR1QRKLWztO9dMtjmqZSng=
-github.com/charmbracelet/glamour v0.7.0/go.mod h1:jUMh5MeihljJPQbJ/wf4ldw2+yBP59+ctV36jASy7ps=
+github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs=
+github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk=
+github.com/charmbracelet/glamour v0.9.1 h1:11dEfiGP8q1BEqvGoIjivuc2rBk+5qEXdPtaQ2WoiCM=
+github.com/charmbracelet/glamour v0.9.1/go.mod h1:+SHvIS8qnwhgTpVMiXwn7OfGomSqff1cHBCI8jLOetk=
github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ=
github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao=
-github.com/charmbracelet/lipgloss v0.12.1 h1:/gmzszl+pedQpjCOH+wFkZr/N90Snz40J/NR7A0zQcs=
-github.com/charmbracelet/lipgloss v0.12.1/go.mod h1:V2CiwIuhx9S1S1ZlADfOj9HmxeMAORuz5izHb0zGbB8=
-github.com/charmbracelet/x/ansi v0.1.4 h1:IEU3D6+dWwPSgZ6HBH+v6oUuZ/nVawMiWj5831KfiLM=
-github.com/charmbracelet/x/ansi v0.1.4/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw=
+github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY=
+github.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30=
+github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE=
+github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q=
+github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8=
+github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=
+github.com/charmbracelet/x/exp/golden v0.0.0-20240806155701-69247e0abc2a h1:G99klV19u0QnhiizODirwVksQB91TJKV/UaTnACcG30=
+github.com/charmbracelet/x/exp/golden v0.0.0-20240806155701-69247e0abc2a/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U=
+github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=
+github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=
github.com/chavacava/garif v0.1.0 h1:2JHa3hbYf5D9dsgseMKAmc/MZ109otzgNFk5s87H9Pc=
github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
-github.com/ckaznocha/intrange v0.3.0 h1:VqnxtK32pxgkhJgYQEeOArVidIPg+ahLP7WBOXZd5ZY=
-github.com/ckaznocha/intrange v0.3.0/go.mod h1:+I/o2d2A1FBHgGELbGxzIcyd3/9l9DuwjM8FsbSS3Lo=
+github.com/ckaznocha/intrange v0.3.1 h1:j1onQyXvHUsPWujDH6WIjhyH26gkRt/txNlV7LspvJs=
+github.com/ckaznocha/intrange v0.3.1/go.mod h1:QVepyz1AkUoFQkpEqksSYpNpUo3c5W7nWh/s6SHIJJk=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004 h1:lkAMpLVBDaj17e85keuznYcH5rqI438v41pKcBl4ZxQ=
github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA=
-github.com/cloudflare/circl v1.6.0 h1:cr5JKic4HI+LkINy2lg3W2jF8sHCVTBncJr5gIIq7qk=
-github.com/cloudflare/circl v1.6.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
+github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
+github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY=
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk=
+github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI=
+github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M=
+github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE=
+github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
-github.com/containers/common v0.62.2 h1:xO45OOoeq17EZMIDZoSyRqg7GXGcRHa9sXlrr75zH+U=
-github.com/containers/common v0.62.2/go.mod h1:veFiR9iq2j3CHXtB4YnPHuOkSRdhIQ3bAY8AFMP/5bE=
-github.com/containers/storage v1.57.2 h1:2roCtTyE9pzIaBDHibK72DTnYkPmwWaq5uXxZdaWK4U=
-github.com/containers/storage v1.57.2/go.mod h1:i/Hb4lu7YgFr9G0K6BMjqW0BLJO1sFsnWQwj2UoWCUM=
+github.com/containers/common v0.64.0 h1:Jdjq1e5tqrLov9tcAVc/AfvQCgX4krhcfDBgOXwrSfw=
+github.com/containers/common v0.64.0/go.mod h1:bq2UIiFP8vUJdgM+WN8E8jkD7wF69SpDRGzU7epJljg=
+github.com/containers/storage v1.59.0 h1:r2pYSTzQpJTROZbjJQ54Z0GT+rUC6+wHzlSY8yPjsXk=
+github.com/containers/storage v1.59.0/go.mod h1:KoAYHnAjP3/cTsRS+mmWZGkufSY2GACiKQ4V3ZLQnR0=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
@@ -207,34 +214,38 @@ github.com/curioswitch/go-reassign v0.3.0 h1:dh3kpQHuADL3cobV/sSGETA8DOv457dwl+f
github.com/curioswitch/go-reassign v0.3.0/go.mod h1:nApPCCTtqLJN/s8HfItCcKV0jIPwluBOvZP+dsJGA88=
github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s=
github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=
-github.com/daixiang0/gci v0.13.5 h1:kThgmH1yBmZSBCh1EJVxQ7JsHpm5Oms0AMed/0LaH4c=
-github.com/daixiang0/gci v0.13.5/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk=
+github.com/daixiang0/gci v0.13.6 h1:RKuEOSkGpSadkGbvZ6hJ4ddItT3cVZ9Vn9Rybk6xjl8=
+github.com/daixiang0/gci v0.13.6/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk=
github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0=
github.com/danieljoos/wincred v1.2.2/go.mod h1:w7w4Utbrz8lqeMbDAK0lkNJUv5sAOkFi7nd/ogr0Uh8=
+github.com/dave/dst v0.27.3 h1:P1HPoMza3cMEquVf9kKy8yXsFirry4zEnWOdYPOoIzY=
+github.com/dave/dst v0.27.3/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc=
+github.com/dave/jennifer v1.7.1 h1:B4jJJDHelWcDhlRQxWeo0Npa/pYKBLrirAQoTN45txo=
+github.com/dave/jennifer v1.7.1/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg=
-github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0=
+github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc=
+github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40=
github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8=
github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY=
github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
-github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
-github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
+github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
+github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk=
github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE=
-github.com/docker/cli v28.0.2+incompatible h1:cRPZ77FK3/IXTAIQQj1vmhlxiLS5m+MIUDwS6f57lrE=
-github.com/docker/cli v28.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
+github.com/docker/cli v28.3.3+incompatible h1:fp9ZHAr1WWPGdIWBM1b3zLtgCF+83gRdVMTJsUeiyAo=
+github.com/docker/cli v28.3.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
-github.com/docker/docker v28.0.2+incompatible h1:9BILleFwug5FSSqWBgVevgL3ewDJfWWWyZVqlDMttE8=
-github.com/docker/docker v28.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
-github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo=
-github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
+github.com/docker/docker v28.3.3+incompatible h1:Dypm25kh4rmk49v1eiVbsAtpAsYURjYkaKubwuBdxEI=
+github.com/docker/docker v28.3.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
+github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
@@ -245,14 +256,13 @@ github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQ
github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
-github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4=
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960/go.mod h1:9HQzr9D/0PGwMEbC3d5AB7oi67+h4TsQqItC1GVYG58=
github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 h1:PRxIJD8XjimM5aTknUK9w6DHLDox2r2M3DI4i2pnd3w=
github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936/go.mod h1:ttYvX5qlB+mlV1okblJqcSMtR4c52UKxDiX9GRBS8+Q=
github.com/dvsekhvalnov/jose2go v0.0.0-20170216131308-f21a8cedbbae/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM=
-github.com/ecies/go/v2 v2.0.10 h1:AaLxGio0MLLbvWur4rKnLzw+K9zI+wMScIDAtqCqOtU=
-github.com/ecies/go/v2 v2.0.10/go.mod h1:N73OyuR6tuKznit2LhXjrZ0XAQ234uKbzYz8pEPYzlI=
+github.com/ecies/go/v2 v2.0.11 h1:xYhtMdLiqNi02oLirFmLyNbVXw6250h3WM6zJryQdiM=
+github.com/ecies/go/v2 v2.0.11/go.mod h1:LPRzoefP0Tam+1uesQOq3Gtb6M2OwlFUnXBTtBAKfDQ=
github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o=
github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE=
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
@@ -262,8 +272,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
-github.com/ethereum/go-ethereum v1.14.13 h1:L81Wmv0OUP6cf4CW6wtXsr23RUrDhKs2+Y9Qto+OgHU=
-github.com/ethereum/go-ethereum v1.14.13/go.mod h1:RAC2gVMWJ6FkxSPESfbshrcKpIokgQKsVKmAuqdekDY=
+github.com/ethereum/go-ethereum v1.15.8 h1:H6NilvRXFVoHiXZ3zkuTqKW5XcxjLZniV5UjxJt1GJU=
+github.com/ethereum/go-ethereum v1.15.8/go.mod h1:+S9k+jFzlyVTNcYGvqFhzN/SFhI6vA+aOY4T5tLSPL0=
github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q=
github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
@@ -272,28 +282,28 @@ github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4
github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
-github.com/firefart/nonamedreturns v1.0.5 h1:tM+Me2ZaXs8tfdDw3X6DOX++wMCOqzYUho6tUTYIdRA=
-github.com/firefart/nonamedreturns v1.0.5/go.mod h1:gHJjDqhGM4WyPt639SOZs+G89Ko7QKH5R5BhnO6xJhw=
+github.com/firefart/nonamedreturns v1.0.6 h1:vmiBcKV/3EqKY3ZiPxCINmpS431OcE1S47AQUwhrg8E=
+github.com/firefart/nonamedreturns v1.0.6/go.mod h1:R8NisJnSIpvPWheCq0mNRXJok6D8h7fagJTF8EMEwCo=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
-github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
+github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
+github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw=
github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo=
github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA=
-github.com/getkin/kin-openapi v0.127.0 h1:Mghqi3Dhryf3F8vR370nN67pAERW+3a95vomb3MAREY=
-github.com/getkin/kin-openapi v0.127.0/go.mod h1:OZrfXzUfGrNbsKj+xmFBx6E5c6yH3At/tAKSc2UszXM=
-github.com/getsentry/sentry-go v0.31.1 h1:ELVc0h7gwyhnXHDouXkhqTFSO5oslsRDk0++eyE0KJ4=
-github.com/getsentry/sentry-go v0.31.1/go.mod h1:CYNcMMz73YigoHljQRG+qPF+eMq8gG72XcGN/p71BAY=
-github.com/ghostiam/protogetter v0.3.9 h1:j+zlLLWzqLay22Cz/aYwTHKQ88GE2DQ6GkWSYFOI4lQ=
-github.com/ghostiam/protogetter v0.3.9/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA=
+github.com/getkin/kin-openapi v0.131.0 h1:NO2UeHnFKRYhZ8wg6Nyh5Cq7dHk4suQQr72a4pMrDxE=
+github.com/getkin/kin-openapi v0.131.0/go.mod h1:3OlG51PCYNsPByuiMB0t4fjnNlIDnaEDsjiKUV8nL58=
+github.com/getsentry/sentry-go v0.35.0 h1:+FJNlnjJsZMG3g0/rmmP7GiKjQoUF5EXfEtBwtPtkzY=
+github.com/getsentry/sentry-go v0.35.0/go.mod h1:C55omcY9ChRQIUcVcGcs+Zdy4ZpQGvNJ7JYHIoSWOtE=
+github.com/ghostiam/protogetter v0.3.15 h1:1KF5sXel0HE48zh1/vn0Loiw25A9ApyseLzQuif1mLY=
+github.com/ghostiam/protogetter v0.3.15/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA=
github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c=
github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU=
-github.com/go-critic/go-critic v0.12.0 h1:iLosHZuye812wnkEz1Xu3aBwn5ocCPfc9yqmFG9pa6w=
-github.com/go-critic/go-critic v0.12.0/go.mod h1:DpE0P6OVc6JzVYzmM5gq5jMU31zLr4am5mB/VfFK64w=
+github.com/go-critic/go-critic v0.13.0 h1:kJzM7wzltQasSUXtYyTl6UaPVySO6GkaR1thFnJ6afY=
+github.com/go-critic/go-critic v0.13.0/go.mod h1:M/YeuJ3vOCQDnP2SU+ZhjgRzwzcBW87JqLpMJLrZDLI=
github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
@@ -302,8 +312,8 @@ github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UN
github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU=
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
-github.com/go-git/go-git/v5 v5.14.0 h1:/MD3lCrGjCen5WfEAzKg00MJJffKhC8gzS80ycmCi60=
-github.com/go-git/go-git/v5 v5.14.0/go.mod h1:Z5Xhoia5PcWA3NF8vRLURn9E5FRhSl7dGj9ItW3Wk5k=
+github.com/go-git/go-git/v5 v5.16.2 h1:fT6ZIOjE5iEnkzKyxTHK1W4HGAsPhqEqiSAssSO77hM=
+github.com/go-git/go-git/v5 v5.16.2/go.mod h1:4Ge4alE/5gPs30F2H1esi2gPd69R0C39lolkucHBOp8=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -314,27 +324,24 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
-github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
-github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
+github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ=
github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY=
-github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
-github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
+github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU=
+github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0=
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
-github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
-github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
-github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
-github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
-github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
+github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U=
+github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8=
github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU=
github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s=
@@ -354,8 +361,8 @@ github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQi
github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ=
github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus=
github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig=
-github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss=
-github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
+github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
+github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/go-xmlfmt/xmlfmt v1.1.3 h1:t8Ey3Uy7jDSEisW2K3somuMKIpzktkWptA0iFCnRUWY=
github.com/go-xmlfmt/xmlfmt v1.1.3/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM=
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
@@ -370,8 +377,8 @@ github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
-github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
-github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
+github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
+github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -410,19 +417,20 @@ github.com/golangci/go-printf-func-name v0.1.0 h1:dVokQP+NMTO7jwO4bwsRwLWeudOVUP
github.com/golangci/go-printf-func-name v0.1.0/go.mod h1:wqhWFH5mUdJQhweRnldEywnR5021wTdZSNgwYceV14s=
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d h1:viFft9sS/dxoYY0aiOTsLKO2aZQAPT4nlQCsimGcSGE=
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d/go.mod h1:ivJ9QDg0XucIkmwhzCDsqcnxxlDStoTl89jDMIoNxKY=
-github.com/golangci/golangci-lint v1.64.8 h1:y5TdeVidMtBGG32zgSC7ZXTFNHrsJkDnpO4ItB3Am+I=
-github.com/golangci/golangci-lint v1.64.8/go.mod h1:5cEsUQBSr6zi8XI8OjmcY2Xmliqc4iYL7YoPrL+zLJ4=
+github.com/golangci/golangci-lint/v2 v2.1.6 h1:LXqShFfAGM5BDzEOWD2SL1IzJAgUOqES/HRBsfKjI+w=
+github.com/golangci/golangci-lint/v2 v2.1.6/go.mod h1:EPj+fgv4TeeBq3TcqaKZb3vkiV5dP4hHHKhXhEhzci8=
+github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 h1:AkK+w9FZBXlU/xUmBtSJN1+tAI4FIvy5WtnUnY8e4p8=
+github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95/go.mod h1:k9mmcyWKSTMcPPvQUCfRWWQ9VHJ1U9Dc0R7kaXAgtnQ=
github.com/golangci/misspell v0.6.0 h1:JCle2HUTNWirNlDIAUO44hUsKhOFqGPoC4LZxlaSXDs=
github.com/golangci/misspell v0.6.0/go.mod h1:keMNyY6R9isGaSAu+4Q8NMBwMPkh15Gtc8UCVoDtAWo=
github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c=
github.com/golangci/plugin-module-register v0.1.1/go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc=
github.com/golangci/revgrep v0.8.0 h1:EZBctwbVd0aMeRnNUsFogoyayvKHyxlV3CdUA46FX2s=
github.com/golangci/revgrep v0.8.0/go.mod h1:U4R/s9dlXZsg8uJmaR1GrloUr14D7qDl8gi2iPXJH8k=
-github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNFP0hTEi1YKjB/ub8zkpaOqFFMApi2EAs=
-github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ=
+github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e h1:gD6P7NEo7Eqtt0ssnqSJNNndxe69DOQ24A5h7+i3KpM=
+github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e/go.mod h1:h+wZwLjUTJnm/P2rwlbJdRPZXOzaT36/FwnPnY2inzc=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93 h1:jc2UWq7CbdszqeH6qu1ougXMIUBfSy8Pbh/anURYbGI=
github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
@@ -435,7 +443,6 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
@@ -454,8 +461,8 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg=
-github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
+github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8=
+github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
@@ -465,14 +472,13 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s=
github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0=
-github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
-github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
+github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8=
+github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0=
github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
-github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
-github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
+github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk=
github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc=
github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado=
@@ -492,7 +498,6 @@ github.com/h2non/gock v1.2.0 h1:K6ol8rfrRkUOefooBC8elXoaNGYkpp7y2qcxGG6BzUE=
github.com/h2non/gock v1.2.0/go.mod h1:tNhoxHYW2W42cYkYb1WqzdbYIieALC99kpYr7rH/BQk=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
-github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8=
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4=
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 h1:CUW5RYIcysz+D3B+l1mDeXrQ7fUvGGCwJfdASSzbrfo=
github.com/hashicorp/go-immutable-radix/v2 v2.1.0/go.mod h1:hgdqLXA4f6NIjRVisM1TJ9aOJVNRqKZj+xDGF6m7PBw=
@@ -505,8 +510,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
-github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
-github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
@@ -515,8 +518,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
-github.com/invopop/yaml v0.3.1 h1:f0+ZpmhfBSS4MhG+4HYseMdJhoeeopbSKbq5Rpeelso=
-github.com/invopop/yaml v0.3.1/go.mod h1:PMOp3nn4/12yEZUFfmOuNHJsZToEEOwoWsT+D81KkeA=
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
@@ -571,13 +572,11 @@ github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv
github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
-github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5Jkk=
-github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4=
+github.com/jgautheron/goconst v1.8.1 h1:PPqCYp3K/xlOj5JmIe6O1Mj6r1DbkdbLtR3AJuZo414=
+github.com/jgautheron/goconst v1.8.1/go.mod h1:A0oxgBCHy55NQn6sYpO7UdnA9p+h7cPtoOZUmvNIako=
github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs=
github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c=
-github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8 h1:CZkYfurY6KGhVtlalI4QwQ6T0Cu6iuY3e0x5RLu96WE=
github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo=
-github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d h1:jRQLvyVGL+iVtDElaEIDdKwpPqUIZJfzkNLV34htpEc=
github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jjti/go-spancheck v0.6.4 h1:Tl7gQpYf4/TMU7AT84MN83/6PutY21Nb9fuQjFTpRRc=
@@ -624,22 +623,22 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs=
github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I=
-github.com/kunwardeep/paralleltest v1.0.10 h1:wrodoaKYzS2mdNVnc4/w31YaXFtsc21PCTdvWJ/lDDs=
-github.com/kunwardeep/paralleltest v1.0.10/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY=
+github.com/kunwardeep/paralleltest v1.0.14 h1:wAkMoMeGX/kGfhQBPODT/BL8XhK23ol/nuQ3SwFaUw8=
+github.com/kunwardeep/paralleltest v1.0.14/go.mod h1:di4moFqtfz3ToSKxhNjhOZL+696QtJGCFe132CbBLGk=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4=
github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI=
-github.com/ldez/exptostd v0.4.2 h1:l5pOzHBz8mFOlbcifTxzfyYbgEmoUqjxLFHZkjlbHXs=
-github.com/ldez/exptostd v0.4.2/go.mod h1:iZBRYaUmcW5jwCR3KROEZ1KivQQp6PHXbDPk9hqJKCQ=
+github.com/ldez/exptostd v0.4.3 h1:Ag1aGiq2epGePuRJhez2mzOpZ8sI9Gimcb4Sb3+pk9Y=
+github.com/ldez/exptostd v0.4.3/go.mod h1:iZBRYaUmcW5jwCR3KROEZ1KivQQp6PHXbDPk9hqJKCQ=
github.com/ldez/gomoddirectives v0.6.1 h1:Z+PxGAY+217f/bSGjNZr/b2KTXcyYLgiWI6geMBN2Qc=
github.com/ldez/gomoddirectives v0.6.1/go.mod h1:cVBiu3AHR9V31em9u2kwfMKD43ayN5/XDgr+cdaFaKs=
github.com/ldez/grignotin v0.9.0 h1:MgOEmjZIVNn6p5wPaGp/0OKWyvq42KnzAt/DAb8O4Ow=
github.com/ldez/grignotin v0.9.0/go.mod h1:uaVTr0SoZ1KBii33c47O1M8Jp3OP3YDwhZCmzT9GHEk=
github.com/ldez/tagliatelle v0.7.1 h1:bTgKjjc2sQcsgPiT902+aadvMjCeMHrY7ly2XKFORIk=
github.com/ldez/tagliatelle v0.7.1/go.mod h1:3zjxUpsNB2aEZScWiZTHrAXOl1x25t3cRmzfK1mlo2I=
-github.com/ldez/usetesting v0.4.2 h1:J2WwbrFGk3wx4cZwSMiCQQ00kjGR0+tuuyW0Lqm4lwA=
-github.com/ldez/usetesting v0.4.2/go.mod h1:eEs46T3PpQ+9RgN9VjpY6qWdiw2/QmfiDeWmdZdrjIQ=
+github.com/ldez/usetesting v0.4.3 h1:pJpN0x3fMupdTf/IapYjnkhiY1nSTN+pox1/GyBRw3k=
+github.com/ldez/usetesting v0.4.3/go.mod h1:eEs46T3PpQ+9RgN9VjpY6qWdiw2/QmfiDeWmdZdrjIQ=
github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84YrjT3mIY=
github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA=
github.com/lib/pq v0.0.0-20150723085316-0dad96c0b94f/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
@@ -651,13 +650,13 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
-github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk=
-github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I=
+github.com/macabu/inamedparam v0.2.0 h1:VyPYpOc10nkhI2qeNUdh3Zket4fcZjEWe35poddBCpE=
+github.com/macabu/inamedparam v0.2.0/go.mod h1:+Pee9/YfGe5LJ62pYXqB89lJ+0k5bsR8Wgz/C0Zlq3U=
github.com/magiconair/properties v1.5.3/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
-github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
-github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
-github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
-github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
+github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=
+github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
+github.com/manuelarte/funcorder v0.2.1 h1:7QJsw3qhljoZ5rH0xapIvjw31EcQeFbF31/7kQ/xS34=
+github.com/manuelarte/funcorder v0.2.1/go.mod h1:BQQ0yW57+PF9ZpjpeJDKOffEsQbxDFKW8F8zSMe/Zd0=
github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI=
github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE=
github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04=
@@ -685,10 +684,10 @@ github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOq
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
-github.com/mgechev/revive v1.7.0 h1:JyeQ4yO5K8aZhIKf5rec56u0376h8AlKNQEmjfkjKlY=
-github.com/mgechev/revive v1.7.0/go.mod h1:qZnwcNhoguE58dfi96IJeSTPeZQejNeoMQLUZGi4SW4=
-github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg=
-github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE=
+github.com/mgechev/revive v1.9.0 h1:8LaA62XIKrb8lM6VsBSQ92slt/o92z5+hTw3CmrvSrM=
+github.com/mgechev/revive v1.9.0/go.mod h1:LAPq3+MgOf7GcL5PlWIkHb0PT7XH4NuC2LdWymhb9Mo=
+github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk=
+github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA=
github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU=
github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
@@ -697,10 +696,20 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
github.com/mitchellh/mapstructure v0.0.0-20150613213606-2caf8efc9366/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
-github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mithrandie/csvq v1.18.1 h1:f7NB2scbb7xx2ffPduJ2VtZ85RpWXfvanYskAkGlCBU=
+github.com/mithrandie/csvq v1.18.1/go.mod h1:MRJj7AtcXfk7jhNGxLuJGP3LORmh4lpiPWxQ7VyCRn8=
+github.com/mithrandie/csvq-driver v1.7.0 h1:ejiavXNWwTPMyr3fJFnhcqd1L1cYudA0foQy9cZrqhw=
+github.com/mithrandie/csvq-driver v1.7.0/go.mod h1:HcN3xL9UCJnBYA/AIQOOB/KlyfXAiYr5yxDmiwrGk5o=
+github.com/mithrandie/go-file/v2 v2.1.0 h1:XA5Tl+73GXMDvgwSE3Sg0uC5FkLr3hnXs8SpUas0hyg=
+github.com/mithrandie/go-file/v2 v2.1.0/go.mod h1:9YtTF3Xo59GqC1Pxw6KyGVcM/qubAMlxVsqI/u9r++c=
+github.com/mithrandie/go-text v1.6.0 h1:8gOXTMPbMY8DJbKMTv8kHhADcJlDWXqS/YQH4SyWO6s=
+github.com/mithrandie/go-text v1.6.0/go.mod h1:xCgj1xiNbI/d4xA9sLVvXkjh5B2tNx2ZT2/3rpmh8to=
+github.com/mithrandie/ternary v1.1.1 h1:k/joD6UGVYxHixYmSR8EGgDFNONBMqyD373xT4QRdC4=
+github.com/mithrandie/ternary v1.1.1/go.mod h1:0D9Ba3+09K2TdSZO7/bFCC0GjSXetCvYuYq0u8FY/1g=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
+github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw=
+github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs=
github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU=
github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko=
github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ=
@@ -722,8 +731,8 @@ github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELU
github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=
github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
-github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo=
-github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8=
+github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
+github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U=
@@ -740,10 +749,16 @@ github.com/nunnatsa/ginkgolinter v0.19.1/go.mod h1:jkQ3naZDmxaZMXPWaS9rblH+i+GWX
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
+github.com/oapi-codegen/nullable v1.1.0 h1:eAh8JVc5430VtYVnq00Hrbpag9PFRGWLjxR1/3KntMs=
+github.com/oapi-codegen/nullable v1.1.0/go.mod h1:KUZ3vUzkmEKY90ksAmit2+5juDIhIZhfDl+0PwOQlFY=
github.com/oapi-codegen/oapi-codegen/v2 v2.4.1 h1:ykgG34472DWey7TSjd8vIfNykXgjOgYJZoQbKfEeY/Q=
github.com/oapi-codegen/oapi-codegen/v2 v2.4.1/go.mod h1:N5+lY1tiTDV3V1BeHtOxeWXHoPVeApvsvjJqegfoaz8=
-github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro=
-github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
+github.com/oapi-codegen/runtime v1.1.2 h1:P2+CubHq8fO4Q6fV1tqDBZHCwpVpvPg7oKiYzQgXIyI=
+github.com/oapi-codegen/runtime v1.1.2/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
+github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY=
+github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw=
+github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c=
+github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@@ -753,23 +768,22 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
-github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU=
-github.com/onsi/ginkgo/v2 v2.22.2/go.mod h1:oeMosUL+8LtarXBHu/c0bx2D/K9zyQ6uX3cTyztHwsk=
+github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus=
+github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
-github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8=
-github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY=
+github.com/onsi/gomega v1.37.0 h1:CdEG8g0S133B4OswTDC/5XPSzE1OeP29QOioj2PID2Y=
+github.com/onsi/gomega v1.37.0/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0=
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
-github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
-github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
-github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
+github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
+github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
@@ -778,8 +792,8 @@ github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJ
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
-github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
-github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
+github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
+github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s=
github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
@@ -794,8 +808,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/polyfloyd/go-errorlint v1.7.1 h1:RyLVXIbosq1gBdk/pChWA8zWYLsq9UEw7a1L5TVMCnA=
-github.com/polyfloyd/go-errorlint v1.7.1/go.mod h1:aXjNb1x2TNhoLsk26iv1yl7a+zTnXPhwEMtEXukiLR8=
+github.com/polyfloyd/go-errorlint v1.8.0 h1:DL4RestQqRLr8U4LygLw8g2DX6RN1eBJOpa2mzsrl1Q=
+github.com/polyfloyd/go-errorlint v1.8.0/go.mod h1:G2W0Q5roxbLCt0ZQbdoxQxXktTjwNyDbEaj3n7jvl4s=
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
github.com/prometheus/client_golang v0.9.0-pre1.0.20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
@@ -828,8 +842,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
-github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 h1:+Wl/0aFp0hpuHM3H//KMft64WQ1yX9LdJY64Qm/gFCo=
-github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI=
+github.com/quasilyte/go-ruleguard v0.4.4 h1:53DncefIeLX3qEpjzlS1lyUmQoUEeOWPFWqaTJq9eAQ=
+github.com/quasilyte/go-ruleguard v0.4.4/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE=
github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE=
github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU=
github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo=
@@ -852,14 +866,12 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/ryancurrah/gomodguard v1.3.5 h1:cShyguSwUEeC0jS7ylOiG/idnd1TpJ1LfHGpV3oJmPU=
-github.com/ryancurrah/gomodguard v1.3.5/go.mod h1:MXlEPQRxgfPQa62O8wzK3Ozbkv9Rkqr+wKjSxTdsNJE=
+github.com/ryancurrah/gomodguard v1.4.1 h1:eWC8eUMNZ/wM/PWuZBv7JxxqT5fiIKSIyTvjb7Elr+g=
+github.com/ryancurrah/gomodguard v1.4.1/go.mod h1:qnMJwV1hX9m+YJseXEBhd2s90+1Xn6x9dLz11ualI1I=
github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU=
github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ=
-github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
-github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
-github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
-github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
+github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo=
+github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k=
github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f h1:MvTmaQdww/z0Q4wrYjDSCcZ78NoftLQyHBSLW/Cx79Y=
github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
github.com/sanposhiho/wastedassign/v2 v2.1.0 h1:crurBF7fJKIORrV85u9UUpePDYGWnwvv3+A96WvwXT0=
@@ -871,8 +883,8 @@ github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84d
github.com/sashamelentyev/usestdlibvars v1.28.0 h1:jZnudE2zKCtYlGzLVreNp5pmCdOxXUzwsMDBkR21cyQ=
github.com/sashamelentyev/usestdlibvars v1.28.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
-github.com/securego/gosec/v2 v2.22.2 h1:IXbuI7cJninj0nRpZSLCUlotsj8jGusohfONMrHoF6g=
-github.com/securego/gosec/v2 v2.22.2/go.mod h1:UEBGA+dSKb+VqM6TdehR7lnQtIIMorYJ4/9CW1KVQBE=
+github.com/securego/gosec/v2 v2.22.3 h1:mRrCNmRF2NgZp4RJ8oJ6yPJ7G4x6OCiAXHd8x4trLRc=
+github.com/securego/gosec/v2 v2.22.3/go.mod h1:42M9Xs0v1WseinaB/BmNGO8AVqG8vRfhC2686ACY48k=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
@@ -891,12 +903,10 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE=
github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4=
-github.com/sivchari/tenv v1.12.1 h1:+E0QzjktdnExv/wwsnnyk4oqZBUfuh89YMQT1cyuvSY=
-github.com/sivchari/tenv v1.12.1/go.mod h1:1LjSOUCc25snIr5n3DtGGrENhX3LuWefcplwVGC24mw=
github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8=
github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY=
-github.com/slack-go/slack v0.16.0 h1:khp/WCFv+Hb/B/AJaAwvcxKun0hM6grN0bUZ8xG60P8=
-github.com/slack-go/slack v0.16.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=
+github.com/slack-go/slack v0.17.3 h1:zV5qO3Q+WJAQ/XwbGfNFrRMaJ5T/naqaonyPV/1TP4g=
+github.com/slack-go/slack v0.17.3/go.mod h1:X+UqOufi3LYQHDnMG1vxf0J8asC6+WllXrVrhl8/Prk=
github.com/sonatard/noctx v0.1.0 h1:JjqOc2WN16ISWAjAk8M5ej0RfExEXtkEyExl2hLW+OM=
github.com/sonatard/noctx v0.1.0/go.mod h1:0RvBxqY8D4j9cTTTWE8ylt2vqj2EPI8fHmrxHdsaZ2c=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
@@ -908,19 +918,20 @@ github.com/speakeasy-api/openapi-overlay v0.9.0/go.mod h1:f5FloQrHA7MsxYg9djzMD5
github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA=
github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo=
github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
-github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0=
-github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
+github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
+github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
+github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
-github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
-github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
+github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4=
+github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4=
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0=
github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I=
@@ -944,8 +955,8 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
-github.com/stripe/pg-schema-diff v0.8.0 h1:Ggm4yDbPtaflYQLV3auEMTLxQPaentV/wmDEoCF5jxQ=
-github.com/stripe/pg-schema-diff v0.8.0/go.mod h1:HuTBuWLuvnY9g9nptbSD58xugN19zSJNkF4w/sYRtdU=
+github.com/stripe/pg-schema-diff v0.9.1 h1:vF8PBxgrTGSxy2qOgRrcjnHGh1rQmE3ZALJNO3Juc8Y=
+github.com/stripe/pg-schema-diff v0.9.1/go.mod h1:cl2VC6te/cCTOewTRvv4pYsgQqAOhvRQmatCHfYwy8c=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tdakkota/asciicheck v0.4.1 h1:bm0tbcmi0jezRA2b5kg4ozmMuGAFotKI3RZfrhfovg8=
@@ -954,18 +965,18 @@ github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA
github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0=
github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag=
github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY=
-github.com/tetafro/godot v1.5.0 h1:aNwfVI4I3+gdxjMgYPus9eHmoBeJIbnajOyqZYStzuw=
-github.com/tetafro/godot v1.5.0/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio=
+github.com/tetafro/godot v1.5.1 h1:PZnjCol4+FqaEzvZg5+O8IY2P3hfY9JzRBNPv1pEDS4=
+github.com/tetafro/godot v1.5.1/go.mod h1:cCdPtEndkmqqrhiCfkmxDodMQJ/f3L1BCNskCUZdTwk=
github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c=
github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw=
github.com/tidwall/jsonc v0.3.2 h1:ZTKrmejRlAJYdn0kcaFqRAKlxxFIC21pYq8vLa4p2Wc=
github.com/tidwall/jsonc v0.3.2/go.mod h1:dw+3CIxqHi+t8eFSpzzMlcVYxKp08UP5CD8/uSFCyJE=
-github.com/timakin/bodyclose v0.0.0-20241017074812-ed6a65f985e3 h1:y4mJRFlM6fUyPhoXuFg/Yu02fg/nIPFMOY8tOqppoFg=
-github.com/timakin/bodyclose v0.0.0-20241017074812-ed6a65f985e3/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460=
-github.com/timonwong/loggercheck v0.10.1 h1:uVZYClxQFpw55eh+PIoqM7uAOHMrhVcDoWDery9R8Lg=
-github.com/timonwong/loggercheck v0.10.1/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8=
-github.com/tomarrell/wrapcheck/v2 v2.10.0 h1:SzRCryzy4IrAH7bVGG4cK40tNUhmVmMDuJujy4XwYDg=
-github.com/tomarrell/wrapcheck/v2 v2.10.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo=
+github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 h1:9LPGD+jzxMlnk5r6+hJnar67cgpDIz/iyD+rfl5r2Vk=
+github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67/go.mod h1:mkjARE7Yr8qU23YcGMSALbIxTQ9r9QBVahQOBRfU460=
+github.com/timonwong/loggercheck v0.11.0 h1:jdaMpYBl+Uq9mWPXv1r8jc5fC3gyXx4/WGwTnnNKn4M=
+github.com/timonwong/loggercheck v0.11.0/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8=
+github.com/tomarrell/wrapcheck/v2 v2.11.0 h1:BJSt36snX9+4WTIXeJ7nvHBQBcm1h2SjQMSlmQ6aFSU=
+github.com/tomarrell/wrapcheck/v2 v2.11.0/go.mod h1:wFL9pDWDAbXhhPZZt+nG8Fu+h29TtnZ2MW6Lx4BRXIU=
github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw=
github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw=
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
@@ -990,8 +1001,10 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
-github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU=
-github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg=
+github.com/xen0n/gosmopolitan v1.3.0 h1:zAZI1zefvo7gcpbCOrPSHJZJYA9ZgLfJqtKzZ5pHqQM=
+github.com/xen0n/gosmopolitan v1.3.0/go.mod h1:rckfr5T6o4lBtM1ga7mLGKZmLxswUoH1zxHgNXOsEt4=
+github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
+github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM=
@@ -1005,13 +1018,13 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
-github.com/yuin/goldmark v1.3.7/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU=
-github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-github.com/yuin/goldmark-emoji v1.0.2 h1:c/RgTShNgHTtc6xdz2KKI74jJr6rWi7FPgnP9GAsO5s=
-github.com/yuin/goldmark-emoji v1.0.2/go.mod h1:RhP/RWpexdp+KHs7ghKnifRoIs/Bq4nDS7tRbCkOwKY=
+github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
+github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic=
+github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
+github.com/yuin/goldmark-emoji v1.0.5 h1:EMVWyCGPlXJfUXBXpuMu+ii3TIaxbVBnEX9uaDC4cIk=
+github.com/yuin/goldmark-emoji v1.0.5/go.mod h1:tTkZEbwu5wkPmgTcitqddVxY9osFZiavD+r4AzQrh1U=
github.com/zalando/go-keyring v0.2.6 h1:r7Yc3+H+Ux0+M72zacZoItR3UDxeWfKTcabvkI8ua9s=
github.com/zalando/go-keyring v0.2.6/go.mod h1:2TCrxYrbUNYfNS/Kgy/LSrkSQzZ5UPVH85RwfczwvcI=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
@@ -1019,10 +1032,12 @@ gitlab.com/bosi/decorder v0.4.2 h1:qbQaV3zgwnBZ4zPMhGLW4KZe7A7NwxEhJx39R3shffo=
gitlab.com/bosi/decorder v0.4.2/go.mod h1:muuhHoaJkA9QLcYHq4Mj8FJUwDZ+EirSHRiaTcTf6T8=
go-simpler.org/assert v0.9.0 h1:PfpmcSvL7yAnWyChSjOz6Sp6m9j5lyK8Ok9pEL31YkQ=
go-simpler.org/assert v0.9.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28=
-go-simpler.org/musttag v0.13.0 h1:Q/YAW0AHvaoaIbsPj3bvEI5/QFP7w696IMUpnKXQfCE=
-go-simpler.org/musttag v0.13.0/go.mod h1:FTzIGeK6OkKlUDVpj0iQUXZLUO1Js9+mvykDQy9C5yM=
-go-simpler.org/sloglint v0.9.0 h1:/40NQtjRx9txvsB/RN022KsUJU+zaaSb/9q9BSefSrE=
-go-simpler.org/sloglint v0.9.0/go.mod h1:G/OrAF6uxj48sHahCzrbarVMptL2kjWTaUeC8+fOGww=
+go-simpler.org/musttag v0.13.1 h1:lw2sJyu7S1X8lc8zWUAdH42y+afdcCnHhWpnkWvd6vU=
+go-simpler.org/musttag v0.13.1/go.mod h1:8r450ehpMLQgvpb6sg+hV5Ur47eH6olp/3yEanfG97k=
+go-simpler.org/sloglint v0.11.0 h1:JlR1X4jkbeaffiyjLtymeqmGDKBDO1ikC6rjiuFAOco=
+go-simpler.org/sloglint v0.11.0/go.mod h1:CFDO8R1i77dlciGfPEPvYke2ZMx4eyGiEIWkyeW2Pvw=
+go.augendre.info/fatcontext v0.8.0 h1:2dfk6CQbDGeu1YocF59Za5Pia7ULeAM6friJ3LP7lmk=
+go.augendre.info/fatcontext v0.8.0/go.mod h1:oVJfMgwngMsHO+KB2MdgzcO+RvtNdiCEOlWvSFtax/s=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
@@ -1030,10 +1045,10 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSGJt/Ao6Gp4CXckLxVRRsRgDHoI8XjbL3PDl8s=
-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I=
-go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
-go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ=
+go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
+go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.34.0 h1:ajl4QczuJVA2TU9W9AGw++86Xga/RKt//16z/yxPgdk=
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.34.0/go.mod h1:Vn3/rlOJ3ntf/Q3zAI0V5lDnTbHGaUsNUeF6nZmm7pA=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60=
@@ -1042,14 +1057,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0u
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 h1:BEj3SPM81McUZHYjRS5pEgNgnmzGJ5tRpU5krWnV8Bs=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0/go.mod h1:9cKLGBDzI/F3NoHLQGm4ZrYdIHsvGt6ej6hUowxY0J4=
-go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
-go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
-go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
-go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
-go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
-go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
-go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
-go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
+go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
+go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
+go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
+go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
+go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
+go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
+go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
+go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -1093,8 +1108,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
-golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
-golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
+golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
+golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1105,8 +1120,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
-golang.org/x/exp v0.0.0-20250103183323-7d7fa50e5329 h1:9kj3STMvgqy3YA4VQXBrN7925ICMxD5wzMRcgA30588=
-golang.org/x/exp v0.0.0-20250103183323-7d7fa50e5329/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
+golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
+golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac h1:TSSpLIG4v+p0rPv1pNOQtl1I8knsO4S9trOxNMOLVP4=
@@ -1140,8 +1155,8 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
-golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
-golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
+golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
+golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1189,16 +1204,16 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
-golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c=
-golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
+golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
+golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc=
-golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
+golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
+golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1214,8 +1229,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
-golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
-golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
+golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
+golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1282,8 +1297,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
-golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
+golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA=
+golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -1294,8 +1309,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
-golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y=
-golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g=
+golang.org/x/term v0.33.0 h1:NuFncQrRcaRvVmgRkvM3j/F00gWIAlcmlB8ACEKmGIg=
+golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1310,13 +1325,13 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
-golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
-golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
+golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
+golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=
-golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
+golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
+golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -1381,8 +1396,8 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg=
-golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU=
-golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ=
+golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
+golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1440,10 +1455,10 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f h1:gap6+3Gk41EItBuyi4XX/bp4oqJ3UwuIMl25yGinuAA=
-google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:Ic02D47M+zbarjYYUlK57y316f2MoN0gjAwI3f2S95o=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 h1:DMTIbak9GhdaSxEjvVzAeNZvyc03I61duqNbnm3SU0M=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I=
+google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a h1:SGktgSolFCo75dnHJF2yMvnns6jCmHFJ0vE4Vn2JKvQ=
+google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
@@ -1457,8 +1472,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg=
-google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
+google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4=
+google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1471,11 +1486,10 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
-google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
+google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
+google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
-gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII=
gopkg.in/cenkalti/backoff.v2 v2.2.1/go.mod h1:S0QdOvT2AlerfSBkp0O+dk+bbIMaNbEmVk876gPCthU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -1487,9 +1501,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
-gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
-gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
-gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 h1:d4KQkxAaAiRY2h5Zqis161Pv91A37uZyJOx73duwUwM=
gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1/go.mod h1:WbjuEoo1oadwzQ4apSDU+JTvmllEHtsNHS6y7vFc7iw=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
@@ -1507,11 +1518,10 @@ gopkg.in/yaml.v3 v3.0.0-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
-gotest.tools/gotestsum v1.12.1 h1:dvcxFBTFR1QsQmrCQa4k/vDXow9altdYz4CjdW+XeBE=
-gotest.tools/gotestsum v1.12.1/go.mod h1:mwDmLbx9DIvr09dnAoGgQPLaSXszNpXpWo2bsQge5BE=
-gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU=
-gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
+gotest.tools/gotestsum v1.12.2 h1:eli4tu9Q2D/ogDsEGSr8XfQfl7mT0JsGOG6DFtUiZ/Q=
+gotest.tools/gotestsum v1.12.2/go.mod h1:kjRtCglPZVsSU0hFHX3M5VWBM6Y63emHuB14ER1/sow=
+gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
+gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
@@ -1521,10 +1531,10 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI=
honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4=
-mvdan.cc/gofumpt v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU=
-mvdan.cc/gofumpt v0.7.0/go.mod h1:txVFJy/Sc/mvaycET54pV8SW8gWxTlUuGHVEcncmNUo=
-mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8XzX0u72NttUGVFjO3U=
-mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ=
+mvdan.cc/gofumpt v0.8.0 h1:nZUCeC2ViFaerTcYKstMmfysj6uhQrA2vJe+2vwGU6k=
+mvdan.cc/gofumpt v0.8.0/go.mod h1:vEYnSzyGPmjvFkqJWtXkh79UwPWP9/HMxQdGEXZHjpg=
+mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 h1:WjUu4yQoT5BHT1w8Zu56SP8367OuBV5jvo+4Ulppyf8=
+mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4/go.mod h1:rthT7OuvRbaGcd5ginj6dA2oLE7YNlta9qhBNNdCaLE=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
diff --git a/internal/backups/list/list.go b/internal/backups/list/list.go
new file mode 100644
index 0000000000..bcff285ff8
--- /dev/null
+++ b/internal/backups/list/list.go
@@ -0,0 +1,69 @@
+package list
+
+import (
+ "context"
+ "fmt"
+ "os"
+
+ "github.com/go-errors/errors"
+ "github.com/supabase/cli/internal/migration/list"
+ "github.com/supabase/cli/internal/utils"
+ "github.com/supabase/cli/internal/utils/flags"
+ "github.com/supabase/cli/pkg/api"
+ "github.com/supabase/cli/pkg/cast"
+)
+
+func Run(ctx context.Context) error {
+ resp, err := utils.GetSupabase().V1ListAllBackupsWithResponse(ctx, flags.ProjectRef)
+ if err != nil {
+ return errors.Errorf("failed to list physical backups: %w", err)
+ } else if resp.JSON200 == nil {
+ return errors.Errorf("unexpected list backup status %d: %s", resp.StatusCode(), string(resp.Body))
+ }
+ switch utils.OutputFormat.Value {
+ case utils.OutputPretty:
+ if len(resp.JSON200.Backups) > 0 {
+ return listLogicalBackups(*resp.JSON200)
+ }
+ table := `REGION|WALG|PITR|EARLIEST TIMESTAMP|LATEST TIMESTAMP
+|-|-|-|-|-|
+`
+ table += fmt.Sprintf(
+ "|`%s`|`%t`|`%t`|`%d`|`%d`|\n",
+ utils.FormatRegion(resp.JSON200.Region),
+ resp.JSON200.WalgEnabled,
+ resp.JSON200.PitrEnabled,
+ cast.Val(resp.JSON200.PhysicalBackupData.EarliestPhysicalBackupDateUnix, 0),
+ cast.Val(resp.JSON200.PhysicalBackupData.LatestPhysicalBackupDateUnix, 0),
+ )
+ return list.RenderTable(table)
+ case utils.OutputEnv:
+ return errors.Errorf("--output env flag is not supported")
+ }
+ return utils.EncodeOutput(utils.OutputFormat.Value, os.Stdout, *resp.JSON200)
+}
+
+const (
+ BACKUP_LOGICAL = "LOGICAL"
+ BACKUP_PHYSICAL = "PHYSICAL"
+)
+
+func listLogicalBackups(resp api.V1BackupsResponse) error {
+ table := `REGION|BACKUP TYPE|STATUS|CREATED AT (UTC)
+|-|-|-|-|
+`
+ for _, backup := range resp.Backups {
+ backupType := BACKUP_LOGICAL
+ if backup.IsPhysicalBackup {
+ backupType = BACKUP_PHYSICAL
+ }
+ table += fmt.Sprintf(
+ "|`%s`|`%s`|`%s`|`%s`|\n",
+ utils.FormatRegion(resp.Region),
+ backupType,
+ backup.Status,
+ utils.FormatTimestamp(backup.InsertedAt),
+ )
+ }
+ return list.RenderTable(table)
+}
diff --git a/internal/backups/restore/restore.go b/internal/backups/restore/restore.go
new file mode 100644
index 0000000000..8118f1bcde
--- /dev/null
+++ b/internal/backups/restore/restore.go
@@ -0,0 +1,24 @@
+package restore
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+
+ "github.com/go-errors/errors"
+ "github.com/supabase/cli/internal/utils"
+ "github.com/supabase/cli/internal/utils/flags"
+ "github.com/supabase/cli/pkg/api"
+)
+
+func Run(ctx context.Context, timestamp int64) error {
+ body := api.V1RestorePitrBody{RecoveryTimeTargetUnix: timestamp}
+ resp, err := utils.GetSupabase().V1RestorePitrBackupWithResponse(ctx, flags.ProjectRef, body)
+ if err != nil {
+ return errors.Errorf("failed to restore backup: %w", err)
+ } else if resp.StatusCode() != http.StatusCreated {
+ return errors.Errorf("unexpected restore backup status %d: %s", resp.StatusCode(), string(resp.Body))
+ }
+ fmt.Println("Started PITR restore:", flags.ProjectRef)
+ return nil
+}
diff --git a/internal/bans/update/update.go b/internal/bans/update/update.go
index dfb31d8cf5..d89fa08f25 100644
--- a/internal/bans/update/update.go
+++ b/internal/bans/update/update.go
@@ -13,9 +13,8 @@ import (
func validateIps(ips []string) error {
for _, ip := range ips {
- ip := net.ParseIP(ip)
- if ip.To4() == nil {
- return errors.Errorf("only IPv4 supported at the moment: %s", ip)
+ if net.ParseIP(ip) == nil {
+ return errors.Errorf("invalid IP address: %s", ip)
}
}
return nil
@@ -23,11 +22,8 @@ func validateIps(ips []string) error {
func Run(ctx context.Context, projectRef string, dbIpsToUnban []string, fsys afero.Fs) error {
// 1. sanity checks
- {
- err := validateIps(dbIpsToUnban)
- if err != nil {
- return err
- }
+ if err := validateIps(dbIpsToUnban); err != nil {
+ return err
}
// 2. remove bans
diff --git a/internal/bans/update/update_test.go b/internal/bans/update/update_test.go
index 8e488fe42b..2a40be2a42 100644
--- a/internal/bans/update/update_test.go
+++ b/internal/bans/update/update_test.go
@@ -8,10 +8,15 @@ import (
func TestPrivateSubnet(t *testing.T) {
err := validateIps([]string{"12.3.4.5", "10.0.0.0", "1.2.3.1"})
- assert.Nil(t, err)
+ assert.NoError(t, err)
}
-func TestIpv4(t *testing.T) {
- err := validateIps([]string{"12.3.4.5", "2001:db8:abcd:0012::0", "1.2.3.1"})
- assert.ErrorContains(t, err, "only IPv4 supported at the moment: 2001:db8:abcd:12::")
+func TestIPv6(t *testing.T) {
+ err := validateIps([]string{"2001:db8:abcd:0012::0", "::0"})
+ assert.NoError(t, err)
+}
+
+func TestInvalidAddress(t *testing.T) {
+ err := validateIps([]string{"12.3.4"})
+ assert.ErrorContains(t, err, "invalid IP address: 12.3.4")
}
diff --git a/internal/bootstrap/bootstrap.go b/internal/bootstrap/bootstrap.go
index 8310a82fb8..70aa6305bc 100644
--- a/internal/bootstrap/bootstrap.go
+++ b/internal/bootstrap/bootstrap.go
@@ -77,9 +77,11 @@ func Run(ctx context.Context, starter StarterTemplate, fsys afero.Fs, options ..
return err
}
// 2. Create project
- params := api.V1CreateProjectBodyDto{
- Name: filepath.Base(workdir),
- TemplateUrl: &starter.Url,
+ params := api.V1CreateProjectBody{
+ Name: filepath.Base(workdir),
+ }
+ if len(starter.Url) > 0 {
+ params.TemplateUrl = &starter.Url
}
if err := create.Run(ctx, params, fsys); err != nil {
return err
@@ -111,7 +113,7 @@ func Run(ctx context.Context, starter StarterTemplate, fsys afero.Fs, options ..
return err
}
// 6. Push migrations
- config := flags.NewDbConfigWithPassword(flags.ProjectRef)
+ config := flags.NewDbConfigWithPassword(ctx, flags.ProjectRef)
if err := writeDotEnv(keys, config, fsys); err != nil {
fmt.Fprintln(os.Stderr, "Failed to create .env file:", err)
}
@@ -152,9 +154,7 @@ func suggestAppStart(cwd, command string) string {
func checkProjectHealth(ctx context.Context) error {
params := api.V1GetServicesHealthParams{
- Services: []api.V1GetServicesHealthParamsServices{
- api.V1GetServicesHealthParamsServicesDb,
- },
+ Services: []api.V1GetServicesHealthParamsServices{api.Db},
}
resp, err := utils.GetSupabase().V1GetServicesHealthWithResponse(ctx, flags.ProjectRef, ¶ms)
if err != nil {
@@ -217,17 +217,11 @@ const (
func writeDotEnv(keys []api.ApiKeyResponse, config pgconn.Config, fsys afero.Fs) error {
// Initialise default envs
+ initial := apiKeys.ToEnv(keys)
+ initial[SUPABASE_URL] = "https://" + utils.GetSupabaseHost(flags.ProjectRef)
transactionMode := *config.Copy()
transactionMode.Port = 6543
- initial := map[string]string{
- SUPABASE_URL: "https://" + utils.GetSupabaseHost(flags.ProjectRef),
- POSTGRES_URL: utils.ToPostgresURL(transactionMode),
- }
- for _, entry := range keys {
- name := strings.ToUpper(entry.Name)
- key := fmt.Sprintf("SUPABASE_%s_KEY", name)
- initial[key] = entry.ApiKey
- }
+ initial[POSTGRES_URL] = utils.ToPostgresURL(transactionMode)
// Populate from .env.example if exists
envs, err := parseExampleEnv(fsys)
if err != nil {
diff --git a/internal/bootstrap/bootstrap_test.go b/internal/bootstrap/bootstrap_test.go
index 6cf6eb6e45..ab12d12686 100644
--- a/internal/bootstrap/bootstrap_test.go
+++ b/internal/bootstrap/bootstrap_test.go
@@ -7,6 +7,7 @@ import (
"github.com/jackc/pgconn"
"github.com/joho/godotenv"
+ "github.com/oapi-codegen/nullable"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -46,11 +47,11 @@ func TestSuggestAppStart(t *testing.T) {
func TestWriteEnv(t *testing.T) {
var apiKeys = []api.ApiKeyResponse{{
- ApiKey: "anonkey",
Name: "anon",
+ ApiKey: nullable.NewNullableWithValue("anonkey"),
}, {
- ApiKey: "servicekey",
Name: "service_role",
+ ApiKey: nullable.NewNullableWithValue("servicekey"),
}}
var dbConfig = pgconn.Config{
diff --git a/internal/branches/create/create.go b/internal/branches/create/create.go
index bf2931b68d..6fce6be013 100644
--- a/internal/branches/create/create.go
+++ b/internal/branches/create/create.go
@@ -22,8 +22,8 @@ func Run(ctx context.Context, body api.CreateBranchBody, fsys afero.Fs) error {
return errors.New(context.Canceled)
}
body.BranchName = gitBranch
+ body.GitBranch = &gitBranch
}
- body.GitBranch = &gitBranch
resp, err := utils.GetSupabase().V1CreateABranchWithResponse(ctx, flags.ProjectRef, body)
if err != nil {
diff --git a/internal/branches/create/create_test.go b/internal/branches/create/create_test.go
index e07e10387c..2fd2a09048 100644
--- a/internal/branches/create/create_test.go
+++ b/internal/branches/create/create_test.go
@@ -6,6 +6,7 @@ import (
"net/http"
"testing"
+ "github.com/google/uuid"
"github.com/h2non/gock"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
@@ -33,7 +34,7 @@ func TestCreateCommand(t *testing.T) {
Post("/v1/projects/" + flags.ProjectRef + "/branches").
Reply(http.StatusCreated).
JSON(api.BranchResponse{
- Id: "test-uuid",
+ Id: uuid.New(),
})
// Run test
err := Run(context.Background(), api.CreateBranchBody{
diff --git a/internal/branches/delete/delete.go b/internal/branches/delete/delete.go
index b7fdd6671a..9c7222c9ef 100644
--- a/internal/branches/delete/delete.go
+++ b/internal/branches/delete/delete.go
@@ -6,11 +6,16 @@ import (
"net/http"
"github.com/go-errors/errors"
+ "github.com/google/uuid"
"github.com/supabase/cli/internal/utils"
)
func Run(ctx context.Context, branchId string) error {
- resp, err := utils.GetSupabase().V1DeleteABranchWithResponse(ctx, branchId)
+ parsed, err := uuid.Parse(branchId)
+ if err != nil {
+ return errors.Errorf("failed to parse branch ID: %w", err)
+ }
+ resp, err := utils.GetSupabase().V1DeleteABranchWithResponse(ctx, parsed)
if err != nil {
return errors.Errorf("failed to delete preview branch: %w", err)
}
diff --git a/internal/branches/get/get.go b/internal/branches/get/get.go
index eebd8b4c26..0a6c93d531 100644
--- a/internal/branches/get/get.go
+++ b/internal/branches/get/get.go
@@ -6,6 +6,7 @@ import (
"os"
"github.com/go-errors/errors"
+ "github.com/google/uuid"
"github.com/jackc/pgconn"
"github.com/spf13/afero"
"github.com/supabase/cli/internal/migration/list"
@@ -52,7 +53,11 @@ func Run(ctx context.Context, branchId string, fsys afero.Fs) error {
func getBranchDetail(ctx context.Context, branchId string) (api.BranchDetailResponse, error) {
var result api.BranchDetailResponse
- resp, err := utils.GetSupabase().V1GetABranchConfigWithResponse(ctx, branchId)
+ parsed, err := uuid.Parse(branchId)
+ if err != nil {
+ return result, errors.Errorf("failed to parse branch ID: %w", err)
+ }
+ resp, err := utils.GetSupabase().V1GetABranchConfigWithResponse(ctx, parsed)
if err != nil {
return result, errors.Errorf("failed to get branch: %w", err)
} else if resp.JSON200 == nil {
@@ -73,7 +78,7 @@ func getBranchDetail(ctx context.Context, branchId string) (api.BranchDetailResp
func getPoolerConfig(ctx context.Context, ref string) (api.SupavisorConfigResponse, error) {
var result api.SupavisorConfigResponse
- resp, err := utils.GetSupabase().V1GetSupavisorConfigWithResponse(ctx, ref)
+ resp, err := utils.GetSupabase().V1GetPoolerConfigWithResponse(ctx, ref)
if err != nil {
return result, errors.Errorf("failed to get pooler: %w", err)
} else if resp.JSON200 == nil {
@@ -105,5 +110,6 @@ func toStandardEnvs(detail api.BranchDetailResponse, pooler api.SupavisorConfigR
envs["POSTGRES_URL"] = utils.ToPostgresURL(*config)
envs["POSTGRES_URL_NON_POOLING"] = utils.ToPostgresURL(direct)
envs["SUPABASE_URL"] = "https://" + utils.GetSupabaseHost(detail.Ref)
+ envs["SUPABASE_JWT_SECRET"] = *detail.JwtSecret
return envs
}
diff --git a/internal/branches/list/list.go b/internal/branches/list/list.go
index fd40da97c8..4807c7059f 100644
--- a/internal/branches/list/list.go
+++ b/internal/branches/list/list.go
@@ -3,6 +3,7 @@ package list
import (
"context"
"fmt"
+ "os"
"strings"
"github.com/go-errors/errors"
@@ -19,27 +20,39 @@ func Run(ctx context.Context, fsys afero.Fs) error {
return err
}
- table := `|ID|NAME|DEFAULT|GIT BRANCH|STATUS|CREATED AT (UTC)|UPDATED AT (UTC)|
+ switch utils.OutputFormat.Value {
+ case utils.OutputPretty:
+ table := `|ID|NAME|DEFAULT|GIT BRANCH|STATUS|CREATED AT (UTC)|UPDATED AT (UTC)|
|-|-|-|-|-|-|-|
`
- for _, branch := range branches {
- gitBranch := " "
- if branch.GitBranch != nil {
- gitBranch = *branch.GitBranch
+ for _, branch := range branches {
+ gitBranch := " "
+ if branch.GitBranch != nil {
+ gitBranch = *branch.GitBranch
+ }
+ table += fmt.Sprintf(
+ "|`%s`|`%s`|`%t`|`%s`|`%s`|`%s`|`%s`|\n",
+ branch.Id,
+ strings.ReplaceAll(branch.Name, "|", "\\|"),
+ branch.IsDefault,
+ strings.ReplaceAll(gitBranch, "|", "\\|"),
+ branch.Status,
+ utils.FormatTime(branch.CreatedAt),
+ utils.FormatTime(branch.UpdatedAt),
+ )
}
- table += fmt.Sprintf(
- "|`%s`|`%s`|`%t`|`%s`|`%s`|`%s`|`%s`|\n",
- branch.Id,
- strings.ReplaceAll(branch.Name, "|", "\\|"),
- branch.IsDefault,
- strings.ReplaceAll(gitBranch, "|", "\\|"),
- branch.Status,
- utils.FormatTimestamp(branch.CreatedAt),
- utils.FormatTimestamp(branch.UpdatedAt),
- )
+ return list.RenderTable(table)
+ case utils.OutputToml:
+ return utils.EncodeOutput(utils.OutputFormat.Value, os.Stdout, struct {
+ Branches []api.BranchResponse `toml:"branches"`
+ }{
+ Branches: branches,
+ })
+ case utils.OutputEnv:
+ return errors.Errorf("--output env flag is not supported")
}
- return list.RenderTable(table)
+ return utils.EncodeOutput(utils.OutputFormat.Value, os.Stdout, branches)
}
type BranchFilter func(api.BranchResponse) bool
diff --git a/internal/branches/update/update.go b/internal/branches/update/update.go
index 6c0f5fc4a5..5b6957462f 100644
--- a/internal/branches/update/update.go
+++ b/internal/branches/update/update.go
@@ -5,13 +5,18 @@ import (
"fmt"
"github.com/go-errors/errors"
+ "github.com/google/uuid"
"github.com/spf13/afero"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/pkg/api"
)
func Run(ctx context.Context, branchId string, body api.UpdateBranchBody, fsys afero.Fs) error {
- resp, err := utils.GetSupabase().V1UpdateABranchConfigWithResponse(ctx, branchId, body)
+ parsed, err := uuid.Parse(branchId)
+ if err != nil {
+ return errors.Errorf("failed to parse branch ID: %w", err)
+ }
+ resp, err := utils.GetSupabase().V1UpdateABranchConfigWithResponse(ctx, parsed, body)
if err != nil {
return errors.Errorf("failed to update preview branch: %w", err)
}
diff --git a/internal/db/diff/diff.go b/internal/db/diff/diff.go
index 646ee005da..3187fd242f 100644
--- a/internal/db/diff/diff.go
+++ b/internal/db/diff/diff.go
@@ -31,30 +31,6 @@ import (
type DiffFunc func(context.Context, string, string, []string) (string, error)
func Run(ctx context.Context, schema []string, file string, config pgconn.Config, differ DiffFunc, fsys afero.Fs, options ...func(*pgx.ConnConfig)) (err error) {
- // Sanity checks.
- if utils.IsLocalDatabase(config) {
- if declared, err := loadDeclaredSchemas(fsys); err != nil {
- return err
- } else if container, err := createShadowIfNotExists(ctx, declared); err != nil {
- return err
- } else if len(container) > 0 {
- defer utils.DockerRemove(container)
- if err := start.WaitForHealthyService(ctx, start.HealthTimeout, container); err != nil {
- return err
- }
- if err := migrateBaseDatabase(ctx, container, declared, fsys, options...); err != nil {
- return err
- }
- }
- }
- // 1. Load all user defined schemas
- if len(schema) == 0 {
- schema, err = loadSchema(ctx, config, options...)
- if err != nil {
- return err
- }
- }
- // 3. Run migra to diff schema
out, err := DiffDatabase(ctx, schema, config, os.Stderr, fsys, differ, options...)
if err != nil {
return err
@@ -72,22 +48,6 @@ func Run(ctx context.Context, schema []string, file string, config pgconn.Config
return nil
}
-func createShadowIfNotExists(ctx context.Context, migrations []string) (string, error) {
- if len(migrations) == 0 {
- return "", nil
- }
- if err := utils.AssertSupabaseDbIsRunning(); !errors.Is(err, utils.ErrNotRunning) {
- return "", err
- }
- fmt.Fprintln(os.Stderr, "Creating local database from declarative schemas:")
- msg := make([]string, len(migrations))
- for i, m := range migrations {
- msg[i] = fmt.Sprintf(" • %s", utils.Bold(m))
- }
- fmt.Fprintln(os.Stderr, strings.Join(msg, "\n"))
- return CreateShadowDatabase(ctx, utils.Config.Db.Port)
-}
-
func loadDeclaredSchemas(fsys afero.Fs) ([]string, error) {
if schemas := utils.Config.Db.Migrations.SchemaPaths; len(schemas) > 0 {
return schemas.Files(afero.NewIOFS(fsys))
@@ -140,7 +100,8 @@ func loadSchema(ctx context.Context, config pgconn.Config, options ...func(*pgx.
}
func CreateShadowDatabase(ctx context.Context, port uint16) (string, error) {
- config := start.NewContainerConfig()
+ // Disable background workers in shadow database
+ config := start.NewContainerConfig("-c", "max_worker_processes=0")
hostPort := strconv.FormatUint(uint64(port), 10)
hostConfig := container.HostConfig{
PortBindings: nat.PortMap{"5432/tcp": []nat.PortBinding{{HostPort: hostPort}}},
@@ -148,7 +109,6 @@ func CreateShadowDatabase(ctx context.Context, port uint16) (string, error) {
}
networkingConfig := network.NetworkingConfig{}
if utils.Config.Db.MajorVersion <= 14 {
- config.Entrypoint = nil
hostConfig.Tmpfs = map[string]string{"/docker-entrypoint-initdb.d": ""}
}
return utils.DockerStart(ctx, config, hostConfig, networkingConfig, "")
@@ -164,6 +124,9 @@ func ConnectShadowDatabase(ctx context.Context, timeout time.Duration, options .
return backoff.RetryWithData(connect, policy)
}
+// Required to bypass pg_cron check: https://github.com/citusdata/pg_cron/blob/main/pg_cron.sql#L3
+const CREATE_TEMPLATE = "CREATE DATABASE contrib_regression TEMPLATE postgres"
+
func MigrateShadowDatabase(ctx context.Context, container string, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
migrations, err := migration.ListLocalMigrations(utils.MigrationsDir, afero.NewIOFS(fsys))
if err != nil {
@@ -177,19 +140,10 @@ func MigrateShadowDatabase(ctx context.Context, container string, fsys afero.Fs,
if err := start.SetupDatabase(ctx, conn, container[:12], os.Stderr, fsys); err != nil {
return err
}
- return migration.ApplyMigrations(ctx, migrations, conn, afero.NewIOFS(fsys))
-}
-
-func migrateBaseDatabase(ctx context.Context, container string, migrations []string, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
- conn, err := utils.ConnectLocalPostgres(ctx, pgconn.Config{}, options...)
- if err != nil {
- return err
- }
- defer conn.Close(context.Background())
- if err := start.SetupDatabase(ctx, conn, container[:12], os.Stderr, fsys); err != nil {
- return err
+ if _, err := conn.Exec(ctx, CREATE_TEMPLATE); err != nil {
+ return errors.Errorf("failed to create template database: %w", err)
}
- return migration.SeedGlobals(ctx, migrations, conn, afero.NewIOFS(fsys))
+ return migration.ApplyMigrations(ctx, migrations, conn, afero.NewIOFS(fsys))
}
func DiffDatabase(ctx context.Context, schema []string, config pgconn.Config, w io.Writer, fsys afero.Fs, differ func(context.Context, string, string, []string) (string, error), options ...func(*pgx.ConnConfig)) (string, error) {
@@ -205,14 +159,47 @@ func DiffDatabase(ctx context.Context, schema []string, config pgconn.Config, w
if err := MigrateShadowDatabase(ctx, shadow, fsys, options...); err != nil {
return "", err
}
- fmt.Fprintln(w, "Diffing schemas:", strings.Join(schema, ","))
- source := utils.ToPostgresURL(pgconn.Config{
+ shadowConfig := pgconn.Config{
Host: utils.Config.Hostname,
Port: utils.Config.Db.ShadowPort,
User: "postgres",
Password: utils.Config.Db.Password,
Database: "postgres",
- })
+ }
+ if utils.IsLocalDatabase(config) {
+ if declared, err := loadDeclaredSchemas(fsys); err != nil {
+ return "", err
+ } else if len(declared) > 0 {
+ config = shadowConfig
+ config.Database = "contrib_regression"
+ if err := migrateBaseDatabase(ctx, config, declared, fsys, options...); err != nil {
+ return "", err
+ }
+ }
+ }
+ // Load all user defined schemas
+ if len(schema) == 0 {
+ if schema, err = loadSchema(ctx, config, options...); err != nil {
+ return "", err
+ }
+ }
+ fmt.Fprintln(w, "Diffing schemas:", strings.Join(schema, ","))
+ source := utils.ToPostgresURL(shadowConfig)
target := utils.ToPostgresURL(config)
return differ(ctx, source, target, schema)
}
+
+func migrateBaseDatabase(ctx context.Context, config pgconn.Config, migrations []string, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
+ fmt.Fprintln(os.Stderr, "Creating local database from declarative schemas:")
+ msg := make([]string, len(migrations))
+ for i, m := range migrations {
+ msg[i] = fmt.Sprintf(" • %s", utils.Bold(m))
+ }
+ fmt.Fprintln(os.Stderr, strings.Join(msg, "\n"))
+ conn, err := utils.ConnectLocalPostgres(ctx, config, options...)
+ if err != nil {
+ return err
+ }
+ defer conn.Close(context.Background())
+ return migration.SeedGlobals(ctx, migrations, conn, afero.NewIOFS(fsys))
+}
diff --git a/internal/db/diff/diff_test.go b/internal/db/diff/diff_test.go
index 71b03223e2..47e2a0d497 100644
--- a/internal/db/diff/diff_test.go
+++ b/internal/db/diff/diff_test.go
@@ -69,6 +69,8 @@ func TestRun(t *testing.T) {
require.NoError(t, apitest.MockDockerLogs(utils.Docker, "test-migra", diff))
// Setup mock postgres
conn := pgtest.NewConn()
+ conn.Query(CREATE_TEMPLATE).
+ Reply("CREATE DATABASE")
defer conn.Close(t)
// Run test
err := Run(context.Background(), []string{"public"}, "file", dbConfig, DiffSchemaMigra, fsys, conn.Intercept)
@@ -85,20 +87,6 @@ func TestRun(t *testing.T) {
assert.Equal(t, []byte(diff), contents)
})
- t.Run("throws error on failure to load user schemas", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(migration.ListSchemas, migration.ManagedSchemas).
- ReplyError(pgerrcode.DuplicateTable, `relation "test" already exists`)
- // Run test
- err := Run(context.Background(), []string{}, "", dbConfig, DiffSchemaMigra, fsys, conn.Intercept)
- // Check error
- assert.ErrorContains(t, err, `ERROR: relation "test" already exists (SQLSTATE 42P07)`)
- })
-
t.Run("throws error on failure to diff target", func(t *testing.T) {
// Setup in-memory fs
fsys := afero.NewMemMapFs()
@@ -134,7 +122,9 @@ func TestMigrateShadow(t *testing.T) {
conn.Query(utils.GlobalsSql).
Reply("CREATE SCHEMA").
Query(utils.InitialSchemaPg14Sql).
- Reply("CREATE SCHEMA")
+ Reply("CREATE SCHEMA").
+ Query(CREATE_TEMPLATE).
+ Reply("CREATE DATABASE")
helper.MockMigrationHistory(conn).
Query(sql).
Reply("CREATE SCHEMA").
@@ -268,7 +258,7 @@ func TestDiffDatabase(t *testing.T) {
// Check error
assert.Empty(t, diff)
assert.ErrorContains(t, err, `ERROR: schema "public" already exists (SQLSTATE 42P06)
-At statement 0:
+At statement: 0
create schema public`)
assert.Empty(t, apitest.ListUnmatchedRequests())
})
@@ -308,7 +298,9 @@ create schema public`)
conn.Query(utils.GlobalsSql).
Reply("CREATE SCHEMA").
Query(utils.InitialSchemaPg14Sql).
- Reply("CREATE SCHEMA")
+ Reply("CREATE SCHEMA").
+ Query(CREATE_TEMPLATE).
+ Reply("CREATE DATABASE")
helper.MockMigrationHistory(conn).
Query(sql).
Reply("CREATE SCHEMA").
diff --git a/internal/db/diff/pgschema.go b/internal/db/diff/pgschema.go
index a72a3c39aa..75ead3b52e 100644
--- a/internal/db/diff/pgschema.go
+++ b/internal/db/diff/pgschema.go
@@ -24,7 +24,7 @@ func DiffPgSchema(ctx context.Context, source, target string, schema []string) (
// Generate DDL based on schema plan
plan, err := pgschema.Generate(
ctx,
- dbSrc,
+ pgschema.DBSchemaSource(dbSrc),
pgschema.DBSchemaSource(dbDst),
pgschema.WithDoNotValidatePlan(),
pgschema.WithIncludeSchemas(schema...),
diff --git a/internal/db/dump/dump.go b/internal/db/dump/dump.go
index 5336e624a9..7b40ddccce 100644
--- a/internal/db/dump/dump.go
+++ b/internal/db/dump/dump.go
@@ -14,34 +14,23 @@ import (
"github.com/jackc/pgconn"
"github.com/spf13/afero"
"github.com/supabase/cli/internal/utils"
- cliConfig "github.com/supabase/cli/pkg/config"
+ "github.com/supabase/cli/pkg/migration"
)
-var (
- //go:embed templates/dump_schema.sh
- dumpSchemaScript string
- //go:embed templates/dump_data.sh
- dumpDataScript string
- //go:embed templates/dump_role.sh
- dumpRoleScript string
-)
-
-func Run(ctx context.Context, path string, config pgconn.Config, schema, excludeTable []string, dataOnly, roleOnly, keepComments, useCopy, dryRun bool, fsys afero.Fs) error {
+func Run(ctx context.Context, path string, config pgconn.Config, dataOnly, roleOnly, dryRun bool, fsys afero.Fs, opts ...migration.DumpOptionFunc) error {
// Initialize output stream
- var outStream afero.File
- if len(path) > 0 {
+ outStream := (io.Writer)(os.Stdout)
+ exec := DockerExec
+ if dryRun {
+ fmt.Fprintln(os.Stderr, "DRY RUN: *only* printing the pg_dump script to console.")
+ exec = noExec
+ } else if len(path) > 0 {
f, err := fsys.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
if err != nil {
return errors.Errorf("failed to open dump file: %w", err)
}
defer f.Close()
outStream = f
- } else {
- outStream = os.Stdout
- }
- // Load the requested script
- if dryRun {
- fmt.Fprintln(os.Stderr, "DRY RUN: *only* printing the pg_dump script to console.")
}
db := "remote"
if utils.IsLocalDatabase(config) {
@@ -49,132 +38,42 @@ func Run(ctx context.Context, path string, config pgconn.Config, schema, exclude
}
if dataOnly {
fmt.Fprintf(os.Stderr, "Dumping data from %s database...\n", db)
- return dumpData(ctx, config, schema, excludeTable, useCopy, dryRun, outStream)
+ return migration.DumpData(ctx, config, outStream, exec, opts...)
} else if roleOnly {
fmt.Fprintf(os.Stderr, "Dumping roles from %s database...\n", db)
- return dumpRole(ctx, config, keepComments, dryRun, outStream)
+ return migration.DumpRole(ctx, config, outStream, exec, opts...)
}
fmt.Fprintf(os.Stderr, "Dumping schemas from %s database...\n", db)
- return DumpSchema(ctx, config, schema, keepComments, dryRun, outStream)
+ return migration.DumpSchema(ctx, config, outStream, exec, opts...)
}
-func DumpSchema(ctx context.Context, config pgconn.Config, schema []string, keepComments, dryRun bool, stdout io.Writer) error {
- var env []string
- if len(schema) > 0 {
- // Must append flag because empty string results in error
- env = append(env, "EXTRA_FLAGS=--schema="+strings.Join(schema, "|"))
- } else {
- env = append(env, "EXCLUDED_SCHEMAS="+strings.Join(utils.InternalSchemas, "|"))
- }
- if !keepComments {
- env = append(env, "EXTRA_SED=/^--/d")
- }
- return dump(ctx, config, dumpSchemaScript, env, dryRun, stdout)
-}
-
-func dumpData(ctx context.Context, config pgconn.Config, schema, excludeTable []string, useCopy, dryRun bool, stdout io.Writer) error {
- // We want to dump user data in auth, storage, etc. for migrating to new project
- excludedSchemas := []string{
- "information_schema",
- "pg_*", // Wildcard pattern follows pg_dump
- // Owned by extensions
- // "cron",
- "graphql",
- "graphql_public",
- // "net",
- // "pgmq",
- // "pgsodium",
- // "pgsodium_masks",
- "pgtle",
- "repack",
- "tiger",
- "tiger_data",
- "timescaledb_*",
- "_timescaledb_*",
- "topology",
- // "vault",
- // Managed by Supabase
- // "auth",
- "extensions",
- "pgbouncer",
- "realtime",
- // "storage",
- // "supabase_functions",
- "supabase_migrations",
- // TODO: Remove in a few version in favor of _supabase internal db
- "_analytics",
- "_realtime",
- "_supavisor",
- }
- var env []string
- if len(schema) > 0 {
- env = append(env, "INCLUDED_SCHEMAS="+strings.Join(schema, "|"))
- } else {
- env = append(env, "INCLUDED_SCHEMAS=*", "EXCLUDED_SCHEMAS="+strings.Join(excludedSchemas, "|"))
- }
- var extraFlags []string
- if !useCopy {
- extraFlags = append(extraFlags, "--column-inserts", "--rows-per-insert 100000")
- }
- for _, table := range excludeTable {
- escaped := quoteUpperCase(table)
- // Use separate flags to avoid error: too many dotted names
- extraFlags = append(extraFlags, "--exclude-table "+escaped)
- }
- if len(extraFlags) > 0 {
- env = append(env, "EXTRA_FLAGS="+strings.Join(extraFlags, " "))
- }
- return dump(ctx, config, dumpDataScript, env, dryRun, stdout)
-}
-
-func quoteUpperCase(table string) string {
- escaped := strings.ReplaceAll(table, ".", `"."`)
- return fmt.Sprintf(`"%s"`, escaped)
-}
-
-func dumpRole(ctx context.Context, config pgconn.Config, keepComments, dryRun bool, stdout io.Writer) error {
- env := []string{}
- if !keepComments {
- env = append(env, "EXTRA_SED=/^--/d")
+func noExec(ctx context.Context, script string, env []string, w io.Writer) error {
+ envMap := make(map[string]string, len(env))
+ for _, e := range env {
+ index := strings.IndexByte(e, '=')
+ if index < 0 {
+ continue
+ }
+ envMap[e[:index]] = e[index+1:]
}
- return dump(ctx, config, dumpRoleScript, env, dryRun, stdout)
+ expanded := os.Expand(script, func(key string) string {
+ // Bash variable expansion is unsupported:
+ // https://github.com/golang/go/issues/47187
+ parts := strings.Split(key, ":")
+ value := envMap[parts[0]]
+ // Escape double quotes in env vars
+ return strings.ReplaceAll(value, `"`, `\"`)
+ })
+ fmt.Fprintln(w, expanded)
+ return nil
}
-func dump(ctx context.Context, config pgconn.Config, script string, env []string, dryRun bool, stdout io.Writer) error {
- allEnvs := append(env,
- "PGHOST="+config.Host,
- fmt.Sprintf("PGPORT=%d", config.Port),
- "PGUSER="+config.User,
- "PGPASSWORD="+config.Password,
- "PGDATABASE="+config.Database,
- "RESERVED_ROLES="+strings.Join(utils.ReservedRoles, "|"),
- "ALLOWED_CONFIGS="+strings.Join(utils.AllowedConfigs, "|"),
- )
- if dryRun {
- envMap := make(map[string]string, len(allEnvs))
- for _, e := range allEnvs {
- index := strings.IndexByte(e, '=')
- if index < 0 {
- continue
- }
- envMap[e[:index]] = e[index+1:]
- }
- expanded := os.Expand(script, func(key string) string {
- // Bash variable expansion is unsupported:
- // https://github.com/golang/go/issues/47187
- parts := strings.Split(key, ":")
- value := envMap[parts[0]]
- // Escape double quotes in env vars
- return strings.ReplaceAll(value, `"`, `\"`)
- })
- fmt.Println(expanded)
- return nil
- }
+func DockerExec(ctx context.Context, script string, env []string, w io.Writer) error {
return utils.DockerRunOnceWithConfig(
ctx,
container.Config{
- Image: cliConfig.Images.Pg15,
- Env: allEnvs,
+ Image: utils.Config.Db.Image,
+ Env: env,
Cmd: []string{"bash", "-c", script, "--"},
},
container.HostConfig{
@@ -182,7 +81,7 @@ func dump(ctx context.Context, config pgconn.Config, script string, env []string
},
network.NetworkingConfig{},
"",
- stdout,
+ w,
os.Stderr,
)
}
diff --git a/internal/db/dump/dump_test.go b/internal/db/dump/dump_test.go
index e8e4b2d1a0..bfdccb1289 100644
--- a/internal/db/dump/dump_test.go
+++ b/internal/db/dump/dump_test.go
@@ -12,6 +12,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/supabase/cli/internal/testing/apitest"
"github.com/supabase/cli/internal/utils"
+ "github.com/supabase/cli/pkg/migration"
)
var dbConfig = pgconn.Config{
@@ -22,7 +23,7 @@ var dbConfig = pgconn.Config{
Database: "postgres",
}
-func TestPullCommand(t *testing.T) {
+func TestDumpCommand(t *testing.T) {
imageUrl := utils.GetRegistryImageUrl(utils.Config.Db.Image)
const containerId = "test-container"
@@ -35,7 +36,7 @@ func TestPullCommand(t *testing.T) {
apitest.MockDockerStart(utils.Docker, imageUrl, containerId)
require.NoError(t, apitest.MockDockerLogs(utils.Docker, containerId, "hello world"))
// Run test
- err := Run(context.Background(), "schema.sql", dbConfig, nil, nil, false, false, false, false, false, fsys)
+ err := Run(context.Background(), "schema.sql", dbConfig, false, false, false, fsys)
// Check error
assert.NoError(t, err)
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -54,7 +55,7 @@ func TestPullCommand(t *testing.T) {
apitest.MockDockerStart(utils.Docker, imageUrl, containerId)
require.NoError(t, apitest.MockDockerLogs(utils.Docker, containerId, "hello world\n"))
// Run test
- err := Run(context.Background(), "", dbConfig, []string{"public"}, nil, false, false, false, false, false, fsys)
+ err := Run(context.Background(), "", dbConfig, false, false, false, fsys, migration.WithSchema("public"))
// Check error
assert.NoError(t, err)
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -70,7 +71,7 @@ func TestPullCommand(t *testing.T) {
Get("/v" + utils.Docker.ClientVersion() + "/images").
Reply(http.StatusServiceUnavailable)
// Run test
- err := Run(context.Background(), "", dbConfig, nil, nil, false, false, false, false, false, fsys)
+ err := Run(context.Background(), "", dbConfig, false, false, false, fsys)
// Check error
assert.ErrorContains(t, err, "request returned 503 Service Unavailable for API route and version")
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -85,7 +86,7 @@ func TestPullCommand(t *testing.T) {
apitest.MockDockerStart(utils.Docker, imageUrl, containerId)
require.NoError(t, apitest.MockDockerLogs(utils.Docker, containerId, "hello world\n"))
// Run test
- err := Run(context.Background(), "schema.sql", dbConfig, nil, nil, false, false, false, false, false, fsys)
+ err := Run(context.Background(), "schema.sql", dbConfig, false, false, false, fsys)
// Check error
assert.ErrorContains(t, err, "operation not permitted")
assert.Empty(t, apitest.ListUnmatchedRequests())
diff --git a/internal/db/pull/pull.go b/internal/db/pull/pull.go
index 3f99f972ff..9c302e61b2 100644
--- a/internal/db/pull/pull.go
+++ b/internal/db/pull/pull.go
@@ -6,6 +6,7 @@ import (
"fmt"
"math"
"os"
+ "path/filepath"
"strconv"
"github.com/go-errors/errors"
@@ -89,7 +90,7 @@ func run(p utils.Program, ctx context.Context, schema []string, path string, con
func dumpRemoteSchema(p utils.Program, ctx context.Context, path string, config pgconn.Config, fsys afero.Fs) error {
// Special case if this is the first migration
p.Send(utils.StatusMsg("Dumping schema from remote database..."))
- if err := utils.MkdirIfNotExistFS(fsys, utils.MigrationsDir); err != nil {
+ if err := utils.MkdirIfNotExistFS(fsys, filepath.Dir(path)); err != nil {
return err
}
f, err := fsys.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
@@ -97,7 +98,7 @@ func dumpRemoteSchema(p utils.Program, ctx context.Context, path string, config
return errors.Errorf("failed to open dump file: %w", err)
}
defer f.Close()
- return dump.DumpSchema(ctx, config, nil, false, false, f)
+ return migration.DumpSchema(ctx, config, f, dump.DockerExec)
}
func diffRemoteSchema(p utils.Program, ctx context.Context, schema []string, path string, config pgconn.Config, fsys afero.Fs) error {
diff --git a/internal/db/push/push.go b/internal/db/push/push.go
index 4a1fdf6df5..6960702d17 100644
--- a/internal/db/push/push.go
+++ b/internal/db/push/push.go
@@ -26,8 +26,10 @@ func Run(ctx context.Context, dryRun, ignoreVersionMismatch bool, includeRoles,
return err
}
defer conn.Close(context.Background())
- pending, err := up.GetPendingMigrations(ctx, ignoreVersionMismatch, conn, fsys)
- if err != nil {
+ var pending []string
+ if !utils.Config.Db.Migrations.Enabled {
+ fmt.Fprintln(os.Stderr, "Skipping migrations because it is disabled in config.toml for project:", flags.ProjectRef)
+ } else if pending, err = up.GetPendingMigrations(ctx, ignoreVersionMismatch, conn, fsys); err != nil {
return err
}
var seeds []migration.SeedFile
diff --git a/internal/db/push/push_test.go b/internal/db/push/push_test.go
index f25ba2090f..9bc1baf582 100644
--- a/internal/db/push/push_test.go
+++ b/internal/db/push/push_test.go
@@ -105,7 +105,7 @@ func TestMigrationPush(t *testing.T) {
err := Run(context.Background(), false, false, false, false, dbConfig, fsys, conn.Intercept)
// Check error
assert.ErrorContains(t, err, `ERROR: null value in column "version" of relation "schema_migrations" (SQLSTATE 23502)`)
- assert.ErrorContains(t, err, "At statement 0:\n"+migration.INSERT_MIGRATION_VERSION)
+ assert.ErrorContains(t, err, "At statement: 0\n"+migration.INSERT_MIGRATION_VERSION)
})
}
diff --git a/internal/db/remote/changes/changes.go b/internal/db/remote/changes/changes.go
deleted file mode 100644
index 12c39288be..0000000000
--- a/internal/db/remote/changes/changes.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package changes
-
-import (
- "context"
- "io"
-
- "github.com/jackc/pgconn"
- "github.com/spf13/afero"
- "github.com/supabase/cli/internal/db/diff"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/migration"
-)
-
-var output string
-
-func Run(ctx context.Context, schema []string, config pgconn.Config, fsys afero.Fs) error {
- if err := utils.RunProgram(ctx, func(p utils.Program, ctx context.Context) error {
- return run(p, ctx, schema, config, fsys)
- }); err != nil {
- return err
- }
- return diff.SaveDiff(output, "", fsys)
-}
-
-func run(p utils.Program, ctx context.Context, schema []string, config pgconn.Config, fsys afero.Fs) (err error) {
- // 1. Assert `supabase/migrations` and `schema_migrations` are in sync.
- w := utils.StatusWriter{Program: p}
- if len(schema) == 0 {
- schema, err = loadSchema(ctx, config, w)
- if err != nil {
- return err
- }
- }
-
- // 2. Diff remote db (source) & shadow db (target) and print it.
- output, err = diff.DiffDatabase(ctx, schema, config, w, fsys, diff.DiffSchemaMigra)
- return err
-}
-
-func loadSchema(ctx context.Context, config pgconn.Config, w io.Writer) ([]string, error) {
- conn, err := utils.ConnectByConfigStream(ctx, config, w)
- if err != nil {
- return nil, err
- }
- defer conn.Close(context.Background())
- return migration.ListUserSchemas(ctx, conn)
-}
diff --git a/internal/db/remote/commit/commit.go b/internal/db/remote/commit/commit.go
deleted file mode 100644
index 3e49346f6f..0000000000
--- a/internal/db/remote/commit/commit.go
+++ /dev/null
@@ -1,106 +0,0 @@
-package commit
-
-import (
- "context"
- _ "embed"
- "fmt"
- "path/filepath"
-
- "github.com/go-errors/errors"
- "github.com/jackc/pgconn"
- "github.com/jackc/pgx/v4"
- "github.com/spf13/afero"
- "github.com/supabase/cli/internal/db/diff"
- "github.com/supabase/cli/internal/db/dump"
- "github.com/supabase/cli/internal/migration/list"
- "github.com/supabase/cli/internal/migration/repair"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/migration"
-)
-
-func Run(ctx context.Context, schema []string, config pgconn.Config, fsys afero.Fs) error {
- if err := utils.RunProgram(ctx, func(p utils.Program, ctx context.Context) error {
- return run(p, ctx, schema, config, fsys)
- }); err != nil {
- return err
- }
- fmt.Println("Finished " + utils.Aqua("supabase db remote commit") + ".")
- return nil
-}
-
-func run(p utils.Program, ctx context.Context, schema []string, config pgconn.Config, fsys afero.Fs) error {
- // 1. Assert `supabase/migrations` and `schema_migrations` are in sync.
- w := utils.StatusWriter{Program: p}
- conn, err := utils.ConnectByConfigStream(ctx, config, w)
- if err != nil {
- return err
- }
- defer conn.Close(context.Background())
- if err := assertRemoteInSync(ctx, conn, fsys); err != nil {
- return err
- }
-
- // 2. Fetch remote schema changes
- if len(schema) == 0 {
- schema, err = migration.ListUserSchemas(ctx, conn)
- if err != nil {
- return err
- }
- }
- timestamp := utils.GetCurrentTimestamp()
- if err := fetchRemote(p, ctx, schema, timestamp, config, fsys); err != nil {
- return err
- }
-
- // 3. Insert a row to `schema_migrations`
- return repair.UpdateMigrationTable(ctx, conn, []string{timestamp}, repair.Applied, false, fsys)
-}
-
-func fetchRemote(p utils.Program, ctx context.Context, schema []string, timestamp string, config pgconn.Config, fsys afero.Fs) error {
- path := filepath.Join(utils.MigrationsDir, timestamp+"_remote_commit.sql")
- // Special case if this is the first migration
- if migrations, err := migration.ListLocalMigrations(utils.MigrationsDir, afero.NewIOFS(fsys)); err != nil {
- return err
- } else if len(migrations) == 0 {
- p.Send(utils.StatusMsg("Committing initial migration on remote database..."))
- return dump.Run(ctx, path, config, nil, nil, false, false, false, false, false, fsys)
- }
-
- w := utils.StatusWriter{Program: p}
- // Diff remote db (source) & shadow db (target) and write it as a new migration.
- output, err := diff.DiffDatabase(ctx, schema, config, w, fsys, diff.DiffSchemaMigra)
- if err != nil {
- return err
- }
- if len(output) == 0 {
- return errors.New("No schema changes found")
- }
- return utils.WriteFile(path, []byte(output), fsys)
-}
-
-func assertRemoteInSync(ctx context.Context, conn *pgx.Conn, fsys afero.Fs) error {
- remoteMigrations, err := migration.ListRemoteMigrations(ctx, conn)
- if err != nil {
- return err
- }
- localMigrations, err := list.LoadLocalVersions(fsys)
- if err != nil {
- return err
- }
-
- conflictErr := errors.New("The remote database's migration history is not in sync with the contents of " + utils.Bold(utils.MigrationsDir) + `. Resolve this by:
-- Updating the project from version control to get the latest ` + utils.Bold(utils.MigrationsDir) + `,
-- Pushing unapplied migrations with ` + utils.Aqua("supabase db push") + `,
-- Or failing that, manually editing supabase_migrations.schema_migrations table with ` + utils.Aqua("supabase migration repair") + ".")
- if len(remoteMigrations) != len(localMigrations) {
- return conflictErr
- }
-
- for i, remoteTimestamp := range remoteMigrations {
- if localMigrations[i] != remoteTimestamp {
- return conflictErr
- }
- }
-
- return nil
-}
diff --git a/internal/db/reset/reset.go b/internal/db/reset/reset.go
index d3e33e5829..fd5b7e711a 100644
--- a/internal/db/reset/reset.go
+++ b/internal/db/reset/reset.go
@@ -11,10 +11,10 @@ import (
"time"
"github.com/cenkalti/backoff/v4"
+ "github.com/containerd/errdefs"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
- "github.com/docker/docker/errdefs"
"github.com/go-errors/errors"
"github.com/jackc/pgconn"
"github.com/jackc/pgerrcode"
@@ -23,14 +23,15 @@ import (
"github.com/supabase/cli/internal/db/start"
"github.com/supabase/cli/internal/gen/keys"
"github.com/supabase/cli/internal/migration/apply"
+ "github.com/supabase/cli/internal/migration/down"
+ "github.com/supabase/cli/internal/migration/list"
"github.com/supabase/cli/internal/migration/repair"
"github.com/supabase/cli/internal/seed/buckets"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/pkg/migration"
- "github.com/supabase/cli/pkg/vault"
)
-func Run(ctx context.Context, version string, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
+func Run(ctx context.Context, version string, last uint, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
if len(version) > 0 {
if _, err := strconv.Atoi(version); err != nil {
return errors.New(repair.ErrInvalidVersion)
@@ -38,14 +39,19 @@ func Run(ctx context.Context, version string, config pgconn.Config, fsys afero.F
if _, err := repair.GetMigrationFile(version, fsys); err != nil {
return err
}
- }
- if !utils.IsLocalDatabase(config) {
- msg := "Do you want to reset the remote database?"
- if shouldReset, err := utils.NewConsole().PromptYesNo(ctx, msg, false); err != nil {
+ } else if last > 0 {
+ localMigrations, err := list.LoadLocalVersions(fsys)
+ if err != nil {
return err
- } else if !shouldReset {
- return errors.New(context.Canceled)
}
+ if total := uint(len(localMigrations)); last < total {
+ version = localMigrations[total-last-1]
+ } else {
+ // Negative skips all migrations
+ version = "-"
+ }
+ }
+ if !utils.IsLocalDatabase(config) {
return resetRemote(ctx, version, config, fsys, options...)
}
// Config file is loaded before parsing --linked or --local flags
@@ -233,19 +239,19 @@ func listServicesToRestart() []string {
}
func resetRemote(ctx context.Context, version string, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
+ msg := "Do you want to reset the remote database?"
+ if shouldReset, err := utils.NewConsole().PromptYesNo(ctx, msg, false); err != nil {
+ return err
+ } else if !shouldReset {
+ return errors.New(context.Canceled)
+ }
fmt.Fprintln(os.Stderr, "Resetting remote database"+toLogMessage(version))
conn, err := utils.ConnectByConfigStream(ctx, config, io.Discard, options...)
if err != nil {
return err
}
defer conn.Close(context.Background())
- if err := migration.DropUserSchemas(ctx, conn); err != nil {
- return err
- }
- if err := vault.UpsertVaultSecrets(ctx, utils.Config.Db.Vault, conn); err != nil {
- return err
- }
- return apply.MigrateAndSeed(ctx, version, conn, fsys)
+ return down.ResetAll(ctx, version, conn, fsys)
}
func LikeEscapeSchema(schemas []string) (result []string) {
diff --git a/internal/db/reset/reset_test.go b/internal/db/reset/reset_test.go
index bb87bd912e..23454d0701 100644
--- a/internal/db/reset/reset_test.go
+++ b/internal/db/reset/reset_test.go
@@ -5,7 +5,6 @@ import (
"errors"
"io"
"net/http"
- "path/filepath"
"testing"
"time"
@@ -20,9 +19,7 @@ import (
"github.com/supabase/cli/internal/db/start"
"github.com/supabase/cli/internal/testing/apitest"
"github.com/supabase/cli/internal/testing/fstest"
- "github.com/supabase/cli/internal/testing/helper"
"github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/migration"
"github.com/supabase/cli/pkg/pgtest"
"github.com/supabase/cli/pkg/storage"
)
@@ -96,7 +93,7 @@ func TestResetCommand(t *testing.T) {
Reply(http.StatusOK).
JSON([]storage.BucketResponse{})
// Run test
- err := Run(context.Background(), "", dbConfig, fsys, conn.Intercept)
+ err := Run(context.Background(), "", 0, dbConfig, fsys, conn.Intercept)
// Check error
assert.NoError(t, err)
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -106,7 +103,7 @@ func TestResetCommand(t *testing.T) {
// Setup in-memory fs
fsys := afero.NewMemMapFs()
// Run test
- err := Run(context.Background(), "", pgconn.Config{Host: "db.supabase.co"}, fsys)
+ err := Run(context.Background(), "", 0, pgconn.Config{Host: "db.supabase.co"}, fsys)
// Check error
assert.ErrorIs(t, err, context.Canceled)
})
@@ -116,7 +113,7 @@ func TestResetCommand(t *testing.T) {
// Setup in-memory fs
fsys := afero.NewMemMapFs()
// Run test
- err := Run(context.Background(), "", pgconn.Config{Host: "db.supabase.co"}, fsys)
+ err := Run(context.Background(), "", 0, pgconn.Config{Host: "db.supabase.co"}, fsys)
// Check error
assert.ErrorContains(t, err, "invalid port (outside range)")
})
@@ -131,7 +128,7 @@ func TestResetCommand(t *testing.T) {
Get("/v" + utils.Docker.ClientVersion() + "/containers").
Reply(http.StatusNotFound)
// Run test
- err := Run(context.Background(), "", dbConfig, fsys)
+ err := Run(context.Background(), "", 0, dbConfig, fsys)
// Check error
assert.ErrorIs(t, err, utils.ErrNotRunning)
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -153,7 +150,7 @@ func TestResetCommand(t *testing.T) {
Delete("/v" + utils.Docker.ClientVersion() + "/containers/" + utils.DbId).
ReplyError(errors.New("network error"))
// Run test
- err := Run(context.Background(), "", dbConfig, fsys)
+ err := Run(context.Background(), "", 0, dbConfig, fsys)
// Check error
assert.ErrorContains(t, err, "network error")
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -406,90 +403,3 @@ func TestRestartDatabase(t *testing.T) {
assert.Empty(t, apitest.ListUnmatchedRequests())
})
}
-
-var escapedSchemas = append(migration.ManagedSchemas, "extensions", "public")
-
-func TestResetRemote(t *testing.T) {
- dbConfig := pgconn.Config{
- Host: "db.supabase.co",
- Port: 5432,
- User: "admin",
- Password: "password",
- Database: "postgres",
- }
-
- t.Run("resets remote database", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- path := filepath.Join(utils.MigrationsDir, "0_schema.sql")
- require.NoError(t, afero.WriteFile(fsys, path, nil, 0644))
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(migration.ListSchemas, escapedSchemas).
- Reply("SELECT 1", []interface{}{"private"}).
- Query("DROP SCHEMA IF EXISTS private CASCADE").
- Reply("DROP SCHEMA").
- Query(migration.DropObjects).
- Reply("INSERT 0")
- helper.MockMigrationHistory(conn).
- Query(migration.INSERT_MIGRATION_VERSION, "0", "schema", nil).
- Reply("INSERT 0 1")
- // Run test
- err := resetRemote(context.Background(), "", dbConfig, fsys, conn.Intercept)
- // Check error
- assert.NoError(t, err)
- })
-
- t.Run("resets remote database with seed config disabled", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- path := filepath.Join(utils.MigrationsDir, "0_schema.sql")
- require.NoError(t, afero.WriteFile(fsys, path, nil, 0644))
- seedPath := filepath.Join(utils.SupabaseDirPath, "seed.sql")
- // Will raise an error when seeding
- require.NoError(t, afero.WriteFile(fsys, seedPath, []byte("INSERT INTO test_table;"), 0644))
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(migration.ListSchemas, escapedSchemas).
- Reply("SELECT 1", []interface{}{"private"}).
- Query("DROP SCHEMA IF EXISTS private CASCADE").
- Reply("DROP SCHEMA").
- Query(migration.DropObjects).
- Reply("INSERT 0")
- helper.MockMigrationHistory(conn).
- Query(migration.INSERT_MIGRATION_VERSION, "0", "schema", nil).
- Reply("INSERT 0 1")
- utils.Config.Db.Seed.Enabled = false
- // Run test
- err := resetRemote(context.Background(), "", dbConfig, fsys, conn.Intercept)
- // No error should be raised since we're skipping the seed
- assert.NoError(t, err)
- })
-
- t.Run("throws error on connect failure", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Run test
- err := resetRemote(context.Background(), "", pgconn.Config{}, fsys)
- // Check error
- assert.ErrorContains(t, err, "invalid port (outside range)")
- })
-
- t.Run("throws error on drop schema failure", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(migration.ListSchemas, escapedSchemas).
- Reply("SELECT 0").
- Query(migration.DropObjects).
- ReplyError(pgerrcode.InsufficientPrivilege, "permission denied for relation supabase_migrations")
- // Run test
- err := resetRemote(context.Background(), "", dbConfig, fsys, conn.Intercept)
- // Check error
- assert.ErrorContains(t, err, "ERROR: permission denied for relation supabase_migrations (SQLSTATE 42501)")
- })
-}
diff --git a/internal/db/start/start.go b/internal/db/start/start.go
index bb26b71ca2..665c5f4f77 100644
--- a/internal/db/start/start.go
+++ b/internal/db/start/start.go
@@ -12,9 +12,9 @@ import (
"time"
"github.com/cenkalti/backoff/v4"
+ "github.com/containerd/errdefs"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
- "github.com/docker/docker/client"
"github.com/docker/go-connections/nat"
"github.com/go-errors/errors"
"github.com/jackc/pgconn"
@@ -24,6 +24,7 @@ import (
"github.com/supabase/cli/internal/status"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/internal/utils/flags"
+ "github.com/supabase/cli/pkg/config"
"github.com/supabase/cli/pkg/migration"
"github.com/supabase/cli/pkg/vault"
)
@@ -59,11 +60,15 @@ func Run(ctx context.Context, fromBackup string, fsys afero.Fs) error {
return err
}
-func NewContainerConfig() container.Config {
+func NewContainerConfig(args ...string) container.Config {
+ if utils.Config.Db.MajorVersion >= 14 {
+ // Extensions schema does not exist on PG13 and below
+ args = append(args, "-c", "search_path='$user,public,extensions'")
+ }
env := []string{
"POSTGRES_PASSWORD=" + utils.Config.Db.Password,
"POSTGRES_HOST=/var/run/postgresql",
- "JWT_SECRET=" + utils.Config.Auth.JwtSecret,
+ "JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
fmt.Sprintf("JWT_EXP=%d", utils.Config.Auth.JwtExpiry),
}
if len(utils.Config.Experimental.OrioleDBVersion) > 0 {
@@ -75,7 +80,7 @@ func NewContainerConfig() container.Config {
"S3_ACCESS_KEY="+utils.Config.Experimental.S3AccessKey,
"S3_SECRET_KEY="+utils.Config.Experimental.S3SecretKey,
)
- } else {
+ } else if i := strings.IndexByte(utils.Config.Db.Image, ':'); config.VersionCompare(utils.Config.Db.Image[i+1:], "15.8.1.005") < 0 {
env = append(env, "POSTGRES_INITDB_ARGS=--lc-collate=C.UTF-8")
}
config := container.Config{
@@ -91,22 +96,25 @@ func NewContainerConfig() container.Config {
cat <<'EOF' > /etc/postgresql.schema.sql && \
cat <<'EOF' > /etc/postgresql-custom/pgsodium_root.key && \
cat <<'EOF' >> /etc/postgresql/postgresql.conf && \
-docker-entrypoint.sh postgres -D /etc/postgresql
+docker-entrypoint.sh postgres -D /etc/postgresql ` + strings.Join(args, " ") + `
` + initialSchema + `
` + webhookSchema + `
` + _supabaseSchema + `
EOF
-` + utils.Config.Db.RootKey + `
+` + utils.Config.Db.RootKey.Value + `
EOF
` + utils.Config.Db.Settings.ToPostgresConfig() + `
EOF`},
}
- if utils.Config.Db.MajorVersion >= 14 {
- config.Cmd = []string{"postgres",
- "-c", "config_file=/etc/postgresql/postgresql.conf",
- // Ref: https://postgrespro.com/list/thread-id/2448092
- "-c", `search_path="$user",public,extensions`,
- }
+ if utils.Config.Db.MajorVersion <= 14 {
+ config.Entrypoint = []string{"sh", "-c", `
+cat <<'EOF' > /docker-entrypoint-initdb.d/supabase_schema.sql && \
+cat <<'EOF' >> /etc/postgresql/postgresql.conf && \
+docker-entrypoint.sh postgres -D /etc/postgresql ` + strings.Join(args, " ") + `
+` + _supabaseSchema + `
+EOF
+` + utils.Config.Db.Settings.ToPostgresConfig() + `
+EOF`}
}
return config
}
@@ -121,6 +129,9 @@ func NewHostConfig() container.HostConfig {
utils.ConfigId + ":/etc/postgresql-custom",
},
}
+ if utils.Config.Db.MajorVersion <= 14 {
+ hostConfig.Tmpfs = map[string]string{"/docker-entrypoint-initdb.d": ""}
+ }
return hostConfig
}
@@ -134,17 +145,6 @@ func StartDatabase(ctx context.Context, fromBackup string, fsys afero.Fs, w io.W
},
},
}
- if utils.Config.Db.MajorVersion <= 14 {
- config.Entrypoint = []string{"sh", "-c", `
-cat <<'EOF' > /docker-entrypoint-initdb.d/supabase_schema.sql && \
-cat <<'EOF' >> /etc/postgresql/postgresql.conf && \
-docker-entrypoint.sh postgres -D /etc/postgresql
-` + _supabaseSchema + `
-EOF
-` + utils.Config.Db.Settings.ToPostgresConfig() + `
-EOF`}
- hostConfig.Tmpfs = map[string]string{"/docker-entrypoint-initdb.d": ""}
- }
if len(fromBackup) > 0 {
config.Entrypoint = []string{"sh", "-c", `
cat <<'EOF' > /etc/postgresql.schema.sql && \
@@ -157,7 +157,7 @@ docker-entrypoint.sh postgres -D /etc/postgresql
EOF
` + restoreScript + `
EOF
-` + utils.Config.Db.RootKey + `
+` + utils.Config.Db.RootKey.Value + `
EOF
` + utils.Config.Db.Settings.ToPostgresConfig() + `
EOF`}
@@ -168,7 +168,7 @@ EOF`}
}
// Creating volume will not override existing volume, so we must inspect explicitly
_, err := utils.Docker.VolumeInspect(ctx, utils.DbId)
- utils.NoBackupVolume = client.IsErrNotFound(err)
+ utils.NoBackupVolume = errdefs.IsNotFound(err)
if utils.NoBackupVolume {
fmt.Fprintln(w, "Starting database...")
} else if len(fromBackup) > 0 {
@@ -284,8 +284,8 @@ func initRealtimeJob(host string) utils.DockerJob {
"DB_NAME=postgres",
"DB_AFTER_CONNECT_QUERY=SET search_path TO _realtime",
"DB_ENC_KEY=" + utils.Config.Realtime.EncryptionKey,
- "API_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
- "METRICS_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
+ "API_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
+ "METRICS_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
"APP_NAME=realtime",
"SECRET_KEY_BASE=" + utils.Config.Realtime.SecretKeyBase,
"ERL_AFLAGS=" + utils.ToRealtimeEnv(utils.Config.Realtime.IpVersion),
@@ -305,9 +305,10 @@ func initStorageJob(host string) utils.DockerJob {
Image: utils.Config.Storage.Image,
Env: []string{
"DB_INSTALL_ROLES=false",
- "ANON_KEY=" + utils.Config.Auth.AnonKey,
- "SERVICE_KEY=" + utils.Config.Auth.ServiceRoleKey,
- "PGRST_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
+ "DB_MIGRATIONS_FREEZE_AT=" + utils.Config.Storage.TargetMigration,
+ "ANON_KEY=" + utils.Config.Auth.AnonKey.Value,
+ "SERVICE_KEY=" + utils.Config.Auth.ServiceRoleKey.Value,
+ "PGRST_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
fmt.Sprintf("DATABASE_URL=postgresql://supabase_storage_admin:%s@%s:5432/postgres", utils.Config.Db.Password, host),
fmt.Sprintf("FILE_SIZE_LIMIT=%v", utils.Config.Storage.FileSizeLimit),
"STORAGE_BACKEND=file",
@@ -330,7 +331,7 @@ func initAuthJob(host string) utils.DockerJob {
"GOTRUE_DB_DRIVER=postgres",
fmt.Sprintf("GOTRUE_DB_DATABASE_URL=postgresql://supabase_auth_admin:%s@%s:5432/postgres", utils.Config.Db.Password, host),
"GOTRUE_SITE_URL=" + utils.Config.Auth.SiteUrl,
- "GOTRUE_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
+ "GOTRUE_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
},
Cmd: []string{"gotrue", "migrate"},
}
diff --git a/internal/debug/http.go b/internal/debug/http.go
new file mode 100644
index 0000000000..b22f6bbc8a
--- /dev/null
+++ b/internal/debug/http.go
@@ -0,0 +1,24 @@
+package debug
+
+import (
+ "log"
+ "net/http"
+ "os"
+)
+
+type debugTransport struct {
+ http.RoundTripper
+ logger *log.Logger
+}
+
+func (t *debugTransport) RoundTrip(req *http.Request) (*http.Response, error) {
+ t.logger.Printf("%s: %s\n", req.Method, req.URL)
+ return t.RoundTripper.RoundTrip(req)
+}
+
+func NewTransport() http.RoundTripper {
+ return &debugTransport{
+ http.DefaultTransport,
+ log.New(os.Stderr, "HTTP ", log.LstdFlags|log.Lmsgprefix),
+ }
+}
diff --git a/internal/functions/delete/delete.go b/internal/functions/delete/delete.go
index 47d5957efa..5e087e71e1 100644
--- a/internal/functions/delete/delete.go
+++ b/internal/functions/delete/delete.go
@@ -11,27 +11,29 @@ import (
)
func Run(ctx context.Context, slug string, projectRef string, fsys afero.Fs) error {
- // 1. Sanity checks.
- {
- if err := utils.ValidateFunctionSlug(slug); err != nil {
- return err
- }
+ if err := utils.ValidateFunctionSlug(slug); err != nil {
+ return err
}
+ if err := Undeploy(ctx, projectRef, slug); err != nil {
+ return err
+ }
+ fmt.Printf("Deleted Function %s from project %s.\n", utils.Aqua(slug), utils.Aqua(projectRef))
+ return nil
+}
- // 2. Delete Function.
+var ErrNoDelete = errors.New("nothing to delete")
+
+func Undeploy(ctx context.Context, projectRef string, slug string) error {
resp, err := utils.GetSupabase().V1DeleteAFunctionWithResponse(ctx, projectRef, slug)
if err != nil {
return errors.Errorf("failed to delete function: %w", err)
}
switch resp.StatusCode() {
case http.StatusNotFound:
- return errors.New("Function " + utils.Aqua(slug) + " does not exist on the Supabase project.")
+ return errors.Errorf("Function %s does not exist on the Supabase project: %w", slug, ErrNoDelete)
case http.StatusOK:
- break
+ return nil
default:
- return errors.New("Failed to delete Function " + utils.Aqua(slug) + " on the Supabase project: " + string(resp.Body))
+ return errors.Errorf("unexpected delete function status %d: %s", resp.StatusCode(), string(resp.Body))
}
-
- fmt.Println("Deleted Function " + utils.Aqua(slug) + " from project " + utils.Aqua(projectRef) + ".")
- return nil
}
diff --git a/internal/functions/delete/delete_test.go b/internal/functions/delete/delete_test.go
index 110208ea90..79bd2bb5ac 100644
--- a/internal/functions/delete/delete_test.go
+++ b/internal/functions/delete/delete_test.go
@@ -73,7 +73,7 @@ func TestDeleteCommand(t *testing.T) {
// Run test
err := Run(context.Background(), slug, project, fsys)
// Check error
- assert.ErrorContains(t, err, "Function test-func does not exist on the Supabase project.")
+ assert.ErrorIs(t, err, ErrNoDelete)
assert.Empty(t, apitest.ListUnmatchedRequests())
})
@@ -88,7 +88,7 @@ func TestDeleteCommand(t *testing.T) {
// Run test
err := Run(context.Background(), slug, project, fsys)
// Check error
- assert.ErrorContains(t, err, "Failed to delete Function test-func on the Supabase project:")
+ assert.ErrorContains(t, err, "unexpected delete function status 503:")
assert.Empty(t, apitest.ListUnmatchedRequests())
})
}
diff --git a/internal/functions/deploy/bundle.go b/internal/functions/deploy/bundle.go
index dc20da5d39..f476bd31c5 100644
--- a/internal/functions/deploy/bundle.go
+++ b/internal/functions/deploy/bundle.go
@@ -14,7 +14,6 @@ import (
"github.com/spf13/afero"
"github.com/spf13/viper"
"github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/api"
"github.com/supabase/cli/pkg/function"
)
@@ -26,7 +25,7 @@ func NewDockerBundler(fsys afero.Fs) function.EszipBundler {
return &dockerBundler{fsys: fsys}
}
-func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (api.FunctionDeployMetadata, error) {
+func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (function.FunctionDeployMetadata, error) {
meta := function.NewMetadata(slug, entrypoint, importMap, staticFiles)
fmt.Fprintln(os.Stderr, "Bundling Function:", utils.Bold(slug))
cwd, err := os.Getwd()
@@ -60,6 +59,7 @@ func (b *dockerBundler) Bundle(ctx context.Context, slug, entrypoint, importMap
if viper.GetBool("DEBUG") {
cmd = append(cmd, "--verbose")
}
+ cmd = append(cmd, function.BundleFlags...)
env := []string{}
if custom_registry := os.Getenv("NPM_CONFIG_REGISTRY"); custom_registry != "" {
@@ -122,41 +122,17 @@ func GetBindMounts(cwd, hostFuncDir, hostOutputDir, hostEntrypointPath, hostImpo
binds = append(binds, hostOutputDir+":"+dockerOutputDir+":rw")
}
}
- // Allow entrypoints outside the functions directory
- hostEntrypointDir := filepath.Dir(hostEntrypointPath)
- if len(hostEntrypointDir) > 0 {
- if !filepath.IsAbs(hostEntrypointDir) {
- hostEntrypointDir = filepath.Join(cwd, hostEntrypointDir)
- }
- if !strings.HasSuffix(hostEntrypointDir, sep) {
- hostEntrypointDir += sep
- }
- if !strings.HasPrefix(hostEntrypointDir, hostFuncDir) &&
- !strings.HasPrefix(hostEntrypointDir, hostOutputDir) {
- dockerEntrypointDir := utils.ToDockerPath(hostEntrypointDir)
- binds = append(binds, hostEntrypointDir+":"+dockerEntrypointDir+":ro")
- }
+ // Imports outside of ./supabase/functions will be bound by walking the entrypoint
+ modules, err := utils.BindHostModules(cwd, hostEntrypointPath, hostImportMapPath, fsys)
+ if err != nil {
+ return nil, err
}
- // Imports outside of ./supabase/functions will be bound by absolute path
- if len(hostImportMapPath) > 0 {
- if !filepath.IsAbs(hostImportMapPath) {
- hostImportMapPath = filepath.Join(cwd, hostImportMapPath)
- }
- importMap, err := utils.NewImportMap(hostImportMapPath, fsys)
- if err != nil {
- return nil, err
- }
- modules := importMap.BindHostModules()
- dockerImportMapPath := utils.ToDockerPath(hostImportMapPath)
- modules = append(modules, hostImportMapPath+":"+dockerImportMapPath+":ro")
- // Remove any duplicate mount points
- for _, mod := range modules {
- hostPath := strings.Split(mod, ":")[0]
- if !strings.HasPrefix(hostPath, hostFuncDir) &&
- (len(hostOutputDir) == 0 || !strings.HasPrefix(hostPath, hostOutputDir)) &&
- (len(hostEntrypointDir) == 0 || !strings.HasPrefix(hostPath, hostEntrypointDir)) {
- binds = append(binds, mod)
- }
+ // Remove any duplicate mount points
+ for _, mod := range modules {
+ hostPath := strings.Split(mod, ":")[0]
+ if !strings.HasPrefix(hostPath, hostFuncDir) &&
+ (len(hostOutputDir) == 0 || !strings.HasPrefix(hostPath, hostOutputDir)) {
+ binds = append(binds, mod)
}
}
return binds, nil
diff --git a/internal/functions/deploy/bundle_test.go b/internal/functions/deploy/bundle_test.go
index 7e436a2edd..5933e77dc4 100644
--- a/internal/functions/deploy/bundle_test.go
+++ b/internal/functions/deploy/bundle_test.go
@@ -29,7 +29,7 @@ func TestDockerBundle(t *testing.T) {
t.Run("throws error on bundle failure", func(t *testing.T) {
// Setup in-memory fs
fsys := afero.NewMemMapFs()
- absImportMap := filepath.Join(cwd, "hello", "deno.json")
+ absImportMap := filepath.Join("hello", "deno.json")
require.NoError(t, utils.WriteFile(absImportMap, []byte("{}"), fsys))
// Setup deno error
t.Setenv("TEST_DENO_ERROR", "bundle failed")
diff --git a/internal/functions/deploy/deploy.go b/internal/functions/deploy/deploy.go
index 8686a426f2..bcee53c551 100644
--- a/internal/functions/deploy/deploy.go
+++ b/internal/functions/deploy/deploy.go
@@ -9,13 +9,15 @@ import (
"github.com/go-errors/errors"
"github.com/spf13/afero"
+ "github.com/supabase/cli/internal/functions/delete"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/internal/utils/flags"
+ "github.com/supabase/cli/pkg/api"
"github.com/supabase/cli/pkg/config"
"github.com/supabase/cli/pkg/function"
)
-func Run(ctx context.Context, slugs []string, useDocker bool, noVerifyJWT *bool, importMapPath string, maxJobs uint, fsys afero.Fs) error {
+func Run(ctx context.Context, slugs []string, useDocker bool, noVerifyJWT *bool, importMapPath string, maxJobs uint, prune bool, fsys afero.Fs) error {
// Load function config and project id
if err := flags.LoadConfig(fsys); err != nil {
return err
@@ -32,13 +34,31 @@ func Run(ctx context.Context, slugs []string, useDocker bool, noVerifyJWT *bool,
if len(slugs) == 0 {
return errors.Errorf("No Functions specified or found in %s", utils.Bold(utils.FunctionsDir))
}
+ // Flag import map is specified relative to current directory instead of workdir
+ cwd, err := os.Getwd()
+ if err != nil {
+ return errors.Errorf("failed to get working directory: %w", err)
+ }
+ if len(importMapPath) > 0 {
+ if !filepath.IsAbs(importMapPath) {
+ importMapPath = filepath.Join(utils.CurrentDirAbs, importMapPath)
+ }
+ if importMapPath, err = filepath.Rel(cwd, importMapPath); err != nil {
+ return errors.Errorf("failed to resolve relative path: %w", err)
+ }
+ }
functionConfig, err := GetFunctionConfig(slugs, importMapPath, noVerifyJWT, fsys)
if err != nil {
return err
}
+ // Deploy new and updated functions
opt := function.WithMaxJobs(maxJobs)
if useDocker {
- opt = function.WithBundler(NewDockerBundler(fsys))
+ if utils.IsDockerRunning(ctx) {
+ opt = function.WithBundler(NewDockerBundler(fsys))
+ } else {
+ fmt.Fprintln(os.Stderr, utils.Yellow("WARNING:"), "Docker is not running")
+ }
}
api := function.NewEdgeRuntimeAPI(flags.ProjectRef, *utils.GetSupabase(), opt)
if err := api.Deploy(ctx, functionConfig, afero.NewIOFS(fsys)); errors.Is(err, function.ErrNoDeploy) {
@@ -50,7 +70,10 @@ func Run(ctx context.Context, slugs []string, useDocker bool, noVerifyJWT *bool,
fmt.Printf("Deployed Functions on project %s: %s\n", utils.Aqua(flags.ProjectRef), strings.Join(slugs, ", "))
url := fmt.Sprintf("%s/project/%v/functions", utils.GetSupabaseDashboardURL(), flags.ProjectRef)
fmt.Println("You can inspect your deployment in the Dashboard: " + url)
- return nil
+ if !prune {
+ return nil
+ }
+ return pruneFunctions(ctx, functionConfig)
}
func GetFunctionSlugs(fsys afero.Fs) (slugs []string, err error) {
@@ -83,10 +106,6 @@ func GetFunctionConfig(slugs []string, importMapPath string, noVerifyJWT *bool,
} else if err != nil {
return nil, errors.Errorf("failed to fallback import map: %w", err)
}
- // Flag import map is specified relative to current directory instead of workdir
- if len(importMapPath) > 0 && !filepath.IsAbs(importMapPath) {
- importMapPath = filepath.Join(utils.CurrentDirAbs, importMapPath)
- }
functionConfig := make(config.FunctionConfig, len(slugs))
for _, name := range slugs {
function, ok := utils.Config.Functions[name]
@@ -142,3 +161,51 @@ func GetFunctionConfig(slugs []string, importMapPath string, noVerifyJWT *bool,
}
return functionConfig, nil
}
+
+// pruneFunctions deletes functions that exist remotely but not locally
+func pruneFunctions(ctx context.Context, functionConfig config.FunctionConfig) error {
+ resp, err := utils.GetSupabase().V1ListAllFunctionsWithResponse(ctx, flags.ProjectRef)
+ if err != nil {
+ return errors.Errorf("failed to list functions: %w", err)
+ } else if resp.JSON200 == nil {
+ return errors.Errorf("unexpected list functions status %d: %s", resp.StatusCode(), string(resp.Body))
+ }
+ // No need to delete disabled functions
+ var toDelete []string
+ for _, deployed := range *resp.JSON200 {
+ if deployed.Status == api.FunctionResponseStatusREMOVED {
+ continue
+ } else if _, exists := functionConfig[deployed.Slug]; exists {
+ continue
+ }
+ toDelete = append(toDelete, deployed.Slug)
+ }
+ if len(toDelete) == 0 {
+ fmt.Fprintln(os.Stderr, "No Functions to prune.")
+ return nil
+ }
+ // Confirm before pruning functions
+ msg := fmt.Sprintln(confirmPruneAll(toDelete))
+ if shouldDelete, err := utils.NewConsole().PromptYesNo(ctx, msg, false); err != nil {
+ return err
+ } else if !shouldDelete {
+ return errors.New(context.Canceled)
+ }
+ for _, slug := range toDelete {
+ fmt.Fprintln(os.Stderr, "Deleting Function:", slug)
+ if err := delete.Undeploy(ctx, flags.ProjectRef, slug); errors.Is(err, delete.ErrNoDelete) {
+ fmt.Fprintln(utils.GetDebugLogger(), err)
+ } else if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func confirmPruneAll(pending []string) string {
+ msg := fmt.Sprintln("Do you want to delete the following Functions from your project?")
+ for _, slug := range pending {
+ msg += fmt.Sprintf(" • %s\n", utils.Bold(slug))
+ }
+ return msg
+}
diff --git a/internal/functions/deploy/deploy_test.go b/internal/functions/deploy/deploy_test.go
index 9510d4c731..e746da9279 100644
--- a/internal/functions/deploy/deploy_test.go
+++ b/internal/functions/deploy/deploy_test.go
@@ -4,12 +4,14 @@ import (
"context"
"fmt"
"net/http"
+ "net/url"
"os"
"path/filepath"
"testing"
"github.com/h2non/gock"
"github.com/spf13/afero"
+ "github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/supabase/cli/internal/testing/apitest"
@@ -26,6 +28,11 @@ func TestDeployCommand(t *testing.T) {
const containerId = "test-container"
imageUrl := utils.GetRegistryImageUrl(utils.Config.EdgeRuntime.Image)
+ parsed, err := url.Parse(utils.Docker.DaemonHost())
+ require.NoError(t, err)
+ parsed.Scheme = "http:"
+ dockerHost := parsed.String()
+
t.Run("deploys multiple functions", func(t *testing.T) {
functions := []string{slug, slug + "-2"}
// Setup in-memory fs
@@ -39,6 +46,9 @@ func TestDeployCommand(t *testing.T) {
require.NoError(t, err)
// Setup mock api
defer gock.OffAll()
+ gock.New(dockerHost).
+ Head("/_ping").
+ Reply(http.StatusOK)
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/functions").
Reply(http.StatusOK).
@@ -65,7 +75,7 @@ func TestDeployCommand(t *testing.T) {
}
// Run test
noVerifyJWT := true
- err = Run(context.Background(), functions, true, &noVerifyJWT, "", 1, fsys)
+ err = Run(context.Background(), functions, true, &noVerifyJWT, "", 1, false, fsys)
// Check error
assert.NoError(t, err)
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -84,8 +94,7 @@ import_map = "./import_map.json"
`)
require.NoError(t, err)
require.NoError(t, f.Close())
- importMapPath, err := filepath.Abs(filepath.Join(utils.SupabaseDirPath, "import_map.json"))
- require.NoError(t, err)
+ importMapPath := filepath.Join(utils.SupabaseDirPath, "import_map.json")
require.NoError(t, afero.WriteFile(fsys, importMapPath, []byte("{}"), 0644))
// Setup function entrypoint
entrypointPath := filepath.Join(utils.FunctionsDir, slug, "index.ts")
@@ -100,6 +109,9 @@ import_map = "./import_map.json"
require.NoError(t, err)
// Setup mock api
defer gock.OffAll()
+ gock.New(dockerHost).
+ Head("/_ping").
+ Reply(http.StatusOK)
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/functions").
Reply(http.StatusOK).
@@ -118,7 +130,7 @@ import_map = "./import_map.json"
outputDir := filepath.Join(utils.TempDir, fmt.Sprintf(".output_%s", slug))
require.NoError(t, afero.WriteFile(fsys, filepath.Join(outputDir, "output.eszip"), []byte(""), 0644))
// Run test
- err = Run(context.Background(), nil, true, nil, "", 1, fsys)
+ err = Run(context.Background(), nil, true, nil, "", 1, false, fsys)
// Check error
assert.NoError(t, err)
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -152,6 +164,9 @@ import_map = "./import_map.json"
require.NoError(t, err)
// Setup mock api
defer gock.OffAll()
+ gock.New(dockerHost).
+ Head("/_ping").
+ Reply(http.StatusOK)
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/functions").
Reply(http.StatusOK).
@@ -168,7 +183,7 @@ import_map = "./import_map.json"
outputDir := filepath.Join(utils.TempDir, ".output_enabled-func")
require.NoError(t, afero.WriteFile(fsys, filepath.Join(outputDir, "output.eszip"), []byte(""), 0644))
// Run test
- err = Run(context.Background(), nil, true, nil, "", 1, fsys)
+ err = Run(context.Background(), nil, true, nil, "", 1, false, fsys)
// Check error
assert.NoError(t, err)
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -179,7 +194,7 @@ import_map = "./import_map.json"
fsys := afero.NewMemMapFs()
require.NoError(t, utils.WriteConfig(fsys, false))
// Run test
- err := Run(context.Background(), []string{"_invalid"}, true, nil, "", 1, fsys)
+ err := Run(context.Background(), []string{"_invalid"}, true, nil, "", 1, false, fsys)
// Check error
assert.ErrorContains(t, err, "Invalid Function name.")
})
@@ -189,7 +204,7 @@ import_map = "./import_map.json"
fsys := afero.NewMemMapFs()
require.NoError(t, utils.WriteConfig(fsys, false))
// Run test
- err := Run(context.Background(), nil, true, nil, "", 1, fsys)
+ err := Run(context.Background(), nil, true, nil, "", 1, false, fsys)
// Check error
assert.ErrorContains(t, err, "No Functions specified or found in supabase/functions")
})
@@ -215,6 +230,9 @@ verify_jwt = false
require.NoError(t, err)
// Setup mock api
defer gock.OffAll()
+ gock.New(dockerHost).
+ Head("/_ping").
+ Reply(http.StatusOK)
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/functions").
Reply(http.StatusOK).
@@ -232,7 +250,7 @@ verify_jwt = false
outputDir := filepath.Join(utils.TempDir, fmt.Sprintf(".output_%s", slug))
require.NoError(t, afero.WriteFile(fsys, filepath.Join(outputDir, "output.eszip"), []byte(""), 0644))
// Run test
- assert.NoError(t, Run(context.Background(), []string{slug}, true, nil, "", 1, fsys))
+ assert.NoError(t, Run(context.Background(), []string{slug}, true, nil, "", 1, false, fsys))
// Validate api
assert.Empty(t, apitest.ListUnmatchedRequests())
})
@@ -258,6 +276,9 @@ verify_jwt = false
require.NoError(t, err)
// Setup mock api
defer gock.OffAll()
+ gock.New(dockerHost).
+ Head("/_ping").
+ Reply(http.StatusOK)
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/functions").
Reply(http.StatusOK).
@@ -275,8 +296,8 @@ verify_jwt = false
outputDir := filepath.Join(utils.TempDir, fmt.Sprintf(".output_%s", slug))
require.NoError(t, afero.WriteFile(fsys, filepath.Join(outputDir, "output.eszip"), []byte(""), 0644))
// Run test
- noVerifyJwt := false
- assert.NoError(t, Run(context.Background(), []string{slug}, true, &noVerifyJwt, "", 1, fsys))
+ noVerifyJWT := false
+ assert.NoError(t, Run(context.Background(), []string{slug}, true, &noVerifyJWT, "", 1, false, fsys))
// Validate api
assert.Empty(t, apitest.ListUnmatchedRequests())
})
@@ -352,3 +373,90 @@ func TestImportMapPath(t *testing.T) {
assert.Equal(t, path, fc["test"].ImportMap)
})
}
+
+func TestPruneFunctions(t *testing.T) {
+ flags.ProjectRef = apitest.RandomProjectRef()
+ token := apitest.RandomAccessToken(t)
+ t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+ viper.Set("YES", true)
+
+ t.Run("prunes functions not in local directory", func(t *testing.T) {
+ // Setup function entrypoints
+ localFunctions := config.FunctionConfig{
+ "local-func-1": {Enabled: true},
+ "local-func-2": {Enabled: true},
+ }
+ // Setup mock api - remote functions include local ones plus orphaned ones
+ defer gock.OffAll()
+ remoteFunctions := []api.FunctionResponse{
+ {Slug: "local-func-1"},
+ {Slug: "local-func-2"},
+ {Slug: "orphaned-func-1"},
+ {Slug: "orphaned-func-2"},
+ }
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects/" + flags.ProjectRef + "/functions").
+ Reply(http.StatusOK).
+ JSON(remoteFunctions)
+ gock.New(utils.DefaultApiHost).
+ Delete("/v1/projects/" + flags.ProjectRef + "/functions/orphaned-func-1").
+ Reply(http.StatusOK)
+ gock.New(utils.DefaultApiHost).
+ Delete("/v1/projects/" + flags.ProjectRef + "/functions/orphaned-func-2").
+ Reply(http.StatusOK)
+ // Run test with prune and force (to skip confirmation)
+ err := pruneFunctions(context.Background(), localFunctions)
+ // Check error
+ assert.NoError(t, err)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("skips pruning when no orphaned functions", func(t *testing.T) {
+ // Setup function entrypoints
+ localFunctions := config.FunctionConfig{
+ "local-func-1": {},
+ "local-func-2": {},
+ }
+ // Setup mock api - remote functions match local ones exactly
+ defer gock.OffAll()
+ remoteFunctions := []api.FunctionResponse{
+ {Slug: "local-func-1"},
+ {Slug: "local-func-2"},
+ {Slug: "orphaned-func-1", Status: api.FunctionResponseStatusREMOVED},
+ {Slug: "orphaned-func-2", Status: api.FunctionResponseStatusREMOVED},
+ }
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects/" + flags.ProjectRef + "/functions").
+ Reply(http.StatusOK).
+ JSON(remoteFunctions)
+ // Run test with prune and force
+ err := pruneFunctions(context.Background(), localFunctions)
+ // Check error
+ assert.NoError(t, err)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("handles 404 on delete gracefully", func(t *testing.T) {
+ // Setup function entrypoints
+ localFunctions := config.FunctionConfig{"local-func": {}}
+ // Setup mock api
+ defer gock.OffAll()
+ remoteFunctions := []api.FunctionResponse{
+ {Slug: "local-func"},
+ {Slug: "orphaned-func"},
+ }
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects/" + flags.ProjectRef + "/functions").
+ Reply(http.StatusOK).
+ JSON(remoteFunctions)
+ // Mock delete endpoint with 404 (function already deleted)
+ gock.New(utils.DefaultApiHost).
+ Delete("/v1/projects/" + flags.ProjectRef + "/functions/orphaned-func").
+ Reply(http.StatusNotFound)
+ // Run test with prune and force
+ err := pruneFunctions(context.Background(), localFunctions)
+ // Check error
+ assert.NoError(t, err)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+}
diff --git a/internal/functions/download/download.go b/internal/functions/download/download.go
index ca99c1bcf0..d37d4a54ea 100644
--- a/internal/functions/download/download.go
+++ b/internal/functions/download/download.go
@@ -10,11 +10,14 @@ import (
"os/exec"
"path"
"path/filepath"
+ "strings"
+ "github.com/andybalholm/brotli"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/go-errors/errors"
"github.com/spf13/afero"
+ "github.com/spf13/viper"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/internal/utils/flags"
"github.com/supabase/cli/pkg/api"
@@ -121,11 +124,13 @@ func Run(ctx context.Context, slug string, projectRef string, useLegacyBundle bo
if err != nil {
return err
}
- defer func() {
- if err := fsys.Remove(eszipPath); err != nil {
- fmt.Fprintln(os.Stderr, err)
- }
- }()
+ if !viper.GetBool("DEBUG") {
+ defer func() {
+ if err := fsys.Remove(eszipPath); err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ }
+ }()
+ }
// Extract eszip to functions directory
err = extractOne(ctx, slug, eszipPath)
if err != nil {
@@ -148,12 +153,16 @@ func downloadOne(ctx context.Context, slug, projectRef string, fsys afero.Fs) (s
}
return "", errors.Errorf("Error status %d: %s", resp.StatusCode, string(body))
}
+ r := io.Reader(resp.Body)
+ if strings.EqualFold(resp.Header.Get("Content-Encoding"), "br") {
+ r = brotli.NewReader(resp.Body)
+ }
// Create temp file to store downloaded eszip
eszipPath := filepath.Join(utils.TempDir, fmt.Sprintf("output_%s.eszip", slug))
if err := utils.MkdirIfNotExistFS(fsys, utils.TempDir); err != nil {
return "", err
}
- if err := afero.WriteReader(fsys, eszipPath, resp.Body); err != nil {
+ if err := afero.WriteReader(fsys, eszipPath, r); err != nil {
return "", errors.Errorf("failed to download file: %w", err)
}
return eszipPath, nil
diff --git a/internal/functions/new/new.go b/internal/functions/new/new.go
index 877928c849..5785e0783f 100644
--- a/internal/functions/new/new.go
+++ b/internal/functions/new/new.go
@@ -73,7 +73,7 @@ func createEntrypointFile(slug string, fsys afero.Fs) error {
defer f.Close()
if err := indexTemplate.Option("missingkey=error").Execute(f, indexConfig{
URL: utils.GetApiUrl("/functions/v1/" + slug),
- Token: utils.Config.Auth.AnonKey,
+ Token: utils.Config.Auth.AnonKey.Value,
}); err != nil {
return errors.Errorf("failed to write entrypoint: %w", err)
}
diff --git a/internal/functions/serve/serve.go b/internal/functions/serve/serve.go
index b3d43a6b8b..9819a181df 100644
--- a/internal/functions/serve/serve.go
+++ b/internal/functions/serve/serve.go
@@ -10,7 +10,9 @@ import (
"strconv"
"strings"
+ "github.com/docker/cli/cli/compose/loader"
"github.com/docker/docker/api/types/container"
+ "github.com/docker/docker/api/types/mount"
"github.com/docker/docker/api/types/network"
"github.com/docker/go-connections/nat"
"github.com/go-errors/errors"
@@ -46,6 +48,7 @@ func (mode InspectMode) toFlag() string {
type RuntimeOption struct {
InspectMode *InspectMode
InspectMain bool
+ fileWatcher *debounceFileWatcher
}
func (i *RuntimeOption) toArgs() []string {
@@ -64,12 +67,40 @@ const (
dockerRuntimeInspectorPort = 8083
)
-var (
- //go:embed templates/main.ts
- mainFuncEmbed string
-)
+//go:embed templates/main.ts
+var mainFuncEmbed string
func Run(ctx context.Context, envFilePath string, noVerifyJWT *bool, importMapPath string, runtimeOption RuntimeOption, fsys afero.Fs) error {
+ watcher, err := NewDebounceFileWatcher()
+ if err != nil {
+ return err
+ }
+ go watcher.Start()
+ defer watcher.Close()
+ // TODO: refactor this to edge runtime service
+ runtimeOption.fileWatcher = watcher
+ if err := restartEdgeRuntime(ctx, envFilePath, noVerifyJWT, importMapPath, runtimeOption, fsys); err != nil {
+ return err
+ }
+ streamer := NewLogStreamer(ctx)
+ go streamer.Start(utils.EdgeRuntimeId)
+ defer streamer.Close()
+ for {
+ select {
+ case <-ctx.Done():
+ fmt.Println("Stopped serving " + utils.Bold(utils.FunctionsDir))
+ return ctx.Err()
+ case <-watcher.RestartCh:
+ if err := restartEdgeRuntime(ctx, envFilePath, noVerifyJWT, importMapPath, runtimeOption, fsys); err != nil {
+ return err
+ }
+ case err := <-streamer.ErrCh:
+ return err
+ }
+ }
+}
+
+func restartEdgeRuntime(ctx context.Context, envFilePath string, noVerifyJWT *bool, importMapPath string, runtimeOption RuntimeOption, fsys afero.Fs) error {
// 1. Sanity checks.
if err := flags.LoadConfig(fsys); err != nil {
return err
@@ -86,14 +117,7 @@ func Run(ctx context.Context, envFilePath string, noVerifyJWT *bool, importMapPa
dbUrl := fmt.Sprintf("postgresql://postgres:postgres@%s:5432/postgres", utils.DbAliases[0])
// 3. Serve and log to console
fmt.Fprintln(os.Stderr, "Setting up Edge Functions runtime...")
- if err := ServeFunctions(ctx, envFilePath, noVerifyJWT, importMapPath, dbUrl, runtimeOption, fsys); err != nil {
- return err
- }
- if err := utils.DockerStreamLogs(ctx, utils.EdgeRuntimeId, os.Stdout, os.Stderr); err != nil {
- return err
- }
- fmt.Println("Stopped serving " + utils.Bold(utils.FunctionsDir))
- return nil
+ return ServeFunctions(ctx, envFilePath, noVerifyJWT, importMapPath, dbUrl, runtimeOption, fsys)
}
func ServeFunctions(ctx context.Context, envFilePath string, noVerifyJWT *bool, importMapPath string, dbUrl string, runtimeOption RuntimeOption, fsys afero.Fs) error {
@@ -104,10 +128,10 @@ func ServeFunctions(ctx context.Context, envFilePath string, noVerifyJWT *bool,
}
env = append(env,
fmt.Sprintf("SUPABASE_URL=http://%s:8000", utils.KongAliases[0]),
- "SUPABASE_ANON_KEY="+utils.Config.Auth.AnonKey,
- "SUPABASE_SERVICE_ROLE_KEY="+utils.Config.Auth.ServiceRoleKey,
+ "SUPABASE_ANON_KEY="+utils.Config.Auth.AnonKey.Value,
+ "SUPABASE_SERVICE_ROLE_KEY="+utils.Config.Auth.ServiceRoleKey.Value,
"SUPABASE_DB_URL="+dbUrl,
- "SUPABASE_INTERNAL_JWT_SECRET="+utils.Config.Auth.JwtSecret,
+ "SUPABASE_INTERNAL_JWT_SECRET="+utils.Config.Auth.JwtSecret.Value,
fmt.Sprintf("SUPABASE_INTERNAL_HOST_PORT=%d", utils.Config.Api.Port),
)
if viper.GetBool("DEBUG") {
@@ -121,10 +145,31 @@ func ServeFunctions(ctx context.Context, envFilePath string, noVerifyJWT *bool,
if err != nil {
return errors.Errorf("failed to get working directory: %w", err)
}
+ if len(importMapPath) > 0 {
+ if !filepath.IsAbs(importMapPath) {
+ importMapPath = filepath.Join(utils.CurrentDirAbs, importMapPath)
+ }
+ if importMapPath, err = filepath.Rel(cwd, importMapPath); err != nil {
+ return errors.Errorf("failed to resolve relative path: %w", err)
+ }
+ }
binds, functionsConfigString, err := populatePerFunctionConfigs(cwd, importMapPath, noVerifyJWT, fsys)
if err != nil {
return err
}
+ if watcher := runtimeOption.fileWatcher; watcher != nil {
+ var watchPaths []string
+ for _, b := range binds {
+ if spec, err := loader.ParseVolume(b); err != nil {
+ return errors.Errorf("failed to parse docker volume: %w", err)
+ } else if spec.Type == string(mount.TypeBind) {
+ watchPaths = append(watchPaths, spec.Source)
+ }
+ }
+ if err := watcher.SetWatchPaths(watchPaths, fsys); err != nil {
+ return err
+ }
+ }
env = append(env, "SUPABASE_INTERNAL_FUNCTIONS_CONFIG="+functionsConfigString)
// 3. Parse entrypoint script
cmd := append([]string{
@@ -209,6 +254,7 @@ func populatePerFunctionConfigs(cwd, importMapPath string, noVerifyJWT *bool, fs
for slug, fc := range functionsConfig {
if !fc.Enabled {
fmt.Fprintln(os.Stderr, "Skipped serving Function:", slug)
+ delete(functionsConfig, slug)
continue
}
modules, err := deploy.GetBindMounts(cwd, utils.FunctionsDir, "", fc.Entrypoint, fc.ImportMap, fsys)
diff --git a/internal/functions/serve/serve_test.go b/internal/functions/serve/serve_test.go
index 5f66d8e934..7b0bb17fa0 100644
--- a/internal/functions/serve/serve_test.go
+++ b/internal/functions/serve/serve_test.go
@@ -2,9 +2,10 @@ package serve
import (
"context"
+ "embed"
"net/http"
- "os"
"path/filepath"
+ "strings"
"testing"
"github.com/docker/docker/api/types/container"
@@ -17,13 +18,20 @@ import (
"github.com/supabase/cli/pkg/cast"
)
+var (
+ //go:embed testdata/config.toml
+ testConfig []byte
+ //go:embed testdata/*
+ testdata embed.FS
+)
+
func TestServeCommand(t *testing.T) {
t.Run("serves all functions", func(t *testing.T) {
// Setup in-memory fs
fsys := afero.NewMemMapFs()
- require.NoError(t, utils.InitConfig(utils.InitParams{ProjectId: "test"}, fsys))
+ require.NoError(t, afero.WriteFile(fsys, utils.ConfigPath, testConfig, 0644))
require.NoError(t, afero.WriteFile(fsys, utils.FallbackEnvFilePath, []byte{}, 0644))
- require.NoError(t, afero.WriteFile(fsys, utils.FallbackImportMapPath, []byte{}, 0644))
+ require.NoError(t, afero.WriteFile(fsys, utils.FallbackImportMapPath, []byte("{}"), 0644))
// Setup mock docker
require.NoError(t, apitest.MockDocker(utils.Docker))
defer gock.OffAll()
@@ -36,11 +44,11 @@ func TestServeCommand(t *testing.T) {
Delete("/v" + utils.Docker.ClientVersion() + "/containers/" + containerId).
Reply(http.StatusOK)
apitest.MockDockerStart(utils.Docker, utils.GetRegistryImageUrl(utils.Config.EdgeRuntime.Image), containerId)
- require.NoError(t, apitest.MockDockerLogs(utils.Docker, containerId, "success"))
- // Run test
+ require.NoError(t, apitest.MockDockerLogsStream(utils.Docker, containerId, 1, strings.NewReader("failed")))
+ // Run test with timeout context
err := Run(context.Background(), "", nil, "", RuntimeOption{}, fsys)
// Check error
- assert.NoError(t, err)
+ assert.ErrorContains(t, err, "error running container: exit 1")
assert.Empty(t, apitest.ListUnmatchedRequests())
})
@@ -104,6 +112,62 @@ func TestServeCommand(t *testing.T) {
// Run test
err := Run(context.Background(), ".env", cast.Ptr(true), "import_map.json", RuntimeOption{}, fsys)
// Check error
- assert.ErrorIs(t, err, os.ErrNotExist)
+ assert.ErrorContains(t, err, "failed to resolve relative path:")
+ })
+}
+
+func TestServeFunctions(t *testing.T) {
+ require.NoError(t, utils.Config.Load("testdata/config.toml", testdata))
+ utils.UpdateDockerIds()
+
+ t.Run("runs inspect mode", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := afero.FromIOFS{FS: testdata}
+ // Setup mock docker
+ require.NoError(t, apitest.MockDocker(utils.Docker))
+ defer gock.OffAll()
+ apitest.MockDockerStart(utils.Docker, utils.GetRegistryImageUrl(utils.Config.EdgeRuntime.Image), utils.EdgeRuntimeId)
+ // Run test
+ err := ServeFunctions(context.Background(), "", nil, "", "", RuntimeOption{
+ InspectMode: cast.Ptr(InspectModeRun),
+ InspectMain: true,
+ }, fsys)
+ // Check error
+ assert.NoError(t, err)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("parses env file", func(t *testing.T) {
+ envPath := "/project/.env"
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
+ require.NoError(t, utils.WriteFile(envPath, []byte(`
+ DATABASE_URL=postgresql://localhost:5432/test
+ API_KEY=secret123
+ DEBUG=true
+ `), fsys))
+ // Run test
+ env, err := parseEnvFile(envPath, fsys)
+ // Check error
+ assert.NoError(t, err)
+ assert.ElementsMatch(t, []string{
+ "DATABASE_URL=postgresql://localhost:5432/test",
+ "API_KEY=secret123",
+ "DEBUG=true",
+ }, env)
+ })
+
+ t.Run("parses function config", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := afero.FromIOFS{FS: testdata}
+ // Run test
+ binds, configString, err := populatePerFunctionConfigs("/", "", nil, fsys)
+ // Check error
+ assert.NoError(t, err)
+ assert.ElementsMatch(t, []string{
+ "supabase_edge_runtime_test:/root/.cache/deno:rw",
+ "/supabase/functions/:/supabase/functions/:ro",
+ }, binds)
+ assert.Equal(t, `{"hello":{"verifyJWT":true,"entrypointPath":"testdata/functions/hello/index.ts","staticFiles":["testdata/image.png"]}}`, configString)
})
}
diff --git a/internal/functions/serve/streamer.go b/internal/functions/serve/streamer.go
new file mode 100644
index 0000000000..09d4171d5e
--- /dev/null
+++ b/internal/functions/serve/streamer.go
@@ -0,0 +1,47 @@
+package serve
+
+import (
+ "context"
+ "os"
+ "time"
+
+ "github.com/cenkalti/backoff/v4"
+ "github.com/containerd/errdefs"
+ "github.com/docker/docker/api/types/container"
+ "github.com/go-errors/errors"
+ "github.com/supabase/cli/internal/utils"
+)
+
+type logStreamer struct {
+ ctx context.Context
+ Close context.CancelFunc
+ ErrCh chan error
+}
+
+func NewLogStreamer(ctx context.Context) logStreamer {
+ cancelCtx, cancel := context.WithCancel(ctx)
+ return logStreamer{
+ ctx: cancelCtx,
+ Close: cancel,
+ ErrCh: make(chan error, 1),
+ }
+}
+
+// Used by unit tests
+var retryInterval = time.Millisecond * 400
+
+func (s *logStreamer) Start(containerID string) {
+ // Retry indefinitely until stream is closed
+ policy := backoff.WithContext(backoff.NewConstantBackOff(retryInterval), s.ctx)
+ fetch := func() error {
+ if err := utils.DockerStreamLogs(s.ctx, containerID, os.Stdout, os.Stderr, func(lo *container.LogsOptions) {
+ lo.Timestamps = true
+ }); errdefs.IsNotFound(err) || errdefs.IsConflict(err) || errors.Is(err, utils.ErrContainerKilled) {
+ return err
+ } else if err != nil {
+ return &backoff.PermanentError{Err: err}
+ }
+ return errors.Errorf("container exited gracefully: %s", containerID)
+ }
+ s.ErrCh <- backoff.Retry(fetch, policy)
+}
diff --git a/internal/functions/serve/streamer_test.go b/internal/functions/serve/streamer_test.go
new file mode 100644
index 0000000000..23116860e9
--- /dev/null
+++ b/internal/functions/serve/streamer_test.go
@@ -0,0 +1,91 @@
+package serve
+
+import (
+ "context"
+ "net/http"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/h2non/gock"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+ "github.com/supabase/cli/internal/testing/apitest"
+ "github.com/supabase/cli/internal/utils"
+)
+
+func TestLogStreamer(t *testing.T) {
+ containerID := "test-container"
+ retryInterval = 0
+
+ t.Run("streams logs from container", func(t *testing.T) {
+ // Setup mock docker
+ require.NoError(t, apitest.MockDocker(utils.Docker))
+ defer gock.OffAll()
+ require.NoError(t, apitest.MockDockerLogsStream(utils.Docker, containerID, 1, strings.NewReader("")))
+ // Run test
+ streamer := NewLogStreamer(context.Background())
+ streamer.Start(containerID)
+ // Check error
+ select {
+ case err := <-streamer.ErrCh:
+ assert.ErrorContains(t, err, "error running container: exit 1")
+ case <-time.After(2 * time.Second):
+ assert.Fail(t, "missing error signal from closing")
+ }
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("retries on container exit", func(t *testing.T) {
+ // Setup mock docker
+ require.NoError(t, apitest.MockDocker(utils.Docker))
+ defer gock.OffAll()
+ require.NoError(t, apitest.MockDockerLogsStream(utils.Docker, containerID, 0, strings.NewReader("")))
+ require.NoError(t, apitest.MockDockerLogsStream(utils.Docker, containerID, 137, strings.NewReader("")))
+ require.NoError(t, apitest.MockDockerLogsStream(utils.Docker, containerID, 1, strings.NewReader("")))
+ // Run test
+ streamer := NewLogStreamer(context.Background())
+ streamer.Start(containerID)
+ // Check error
+ select {
+ case err := <-streamer.ErrCh:
+ assert.ErrorContains(t, err, "error running container: exit 1")
+ case <-time.After(2 * time.Second):
+ assert.Fail(t, "missing error signal from closing")
+ }
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("retries on missing container", func(t *testing.T) {
+ // Setup mock docker
+ require.NoError(t, apitest.MockDocker(utils.Docker))
+ defer gock.OffAll()
+ gock.New(utils.Docker.DaemonHost()).
+ Get("/v" + utils.Docker.ClientVersion() + "/containers/" + containerID + "/logs").
+ Reply(http.StatusNotFound).
+ BodyString("No such container")
+ gock.New(utils.Docker.DaemonHost()).
+ Get("/v" + utils.Docker.ClientVersion() + "/containers/" + containerID + "/logs").
+ Reply(http.StatusConflict).
+ BodyString("can not get logs from container which is dead or marked for removal")
+ gock.New(utils.Docker.DaemonHost()).
+ Get("/v" + utils.Docker.ClientVersion() + "/containers/" + containerID + "/logs").
+ Reply(http.StatusOK)
+ gock.New(utils.Docker.DaemonHost()).
+ Get("/v" + utils.Docker.ClientVersion() + "/containers/" + containerID + "/json").
+ Reply(http.StatusNotFound).
+ BodyString("No such object")
+ require.NoError(t, apitest.MockDockerLogsStream(utils.Docker, containerID, 1, strings.NewReader("")))
+ // Run test
+ streamer := NewLogStreamer(context.Background())
+ streamer.Start(containerID)
+ // Check error
+ select {
+ case err := <-streamer.ErrCh:
+ assert.ErrorContains(t, err, "error running container: exit 1")
+ case <-time.After(2 * time.Second):
+ assert.Fail(t, "missing error signal from closing")
+ }
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+}
diff --git a/internal/functions/serve/templates/main.ts b/internal/functions/serve/templates/main.ts
index 534409a98b..568c547f8a 100644
--- a/internal/functions/serve/templates/main.ts
+++ b/internal/functions/serve/templates/main.ts
@@ -48,6 +48,7 @@ const DENO_SB_ERROR_MAP = new Map([
SB_SPECIFIC_ERROR_CODE.WorkerLimit,
],
]);
+const GENERIC_FUNCTION_SERVE_MESSAGE = `Serving functions on http://127.0.0.1:${HOST_PORT}/functions/v1/`
interface FunctionConfig {
entrypointPath: string;
@@ -228,9 +229,36 @@ Deno.serve({
},
onListen: () => {
- console.log(
- `Serving functions on http://127.0.0.1:${HOST_PORT}/functions/v1/\nUsing ${Deno.version.deno}`,
- );
+ try {
+ const functionsConfigString = Deno.env.get(
+ "SUPABASE_INTERNAL_FUNCTIONS_CONFIG"
+ );
+ if (functionsConfigString) {
+ const MAX_FUNCTIONS_URL_EXAMPLES = 5
+ const functionsConfig = JSON.parse(functionsConfigString) as Record<
+ string,
+ unknown
+ >;
+ const functionNames = Object.keys(functionsConfig);
+ const exampleFunctions = functionNames.slice(0, MAX_FUNCTIONS_URL_EXAMPLES);
+ const functionsUrls = exampleFunctions.map(
+ (fname) => ` - http://127.0.0.1:${HOST_PORT}/functions/v1/${fname}`
+ );
+ const functionsExamplesMessages = functionNames.length > 0
+ // Show some functions urls examples
+ ? `\n${functionsUrls.join(`\n`)}${functionNames.length > MAX_FUNCTIONS_URL_EXAMPLES
+ // If we have more than 10 functions to serve, then show examples for first 10
+ // and a count for the remaining ones
+ ? `\n... and ${functionNames.length - MAX_FUNCTIONS_URL_EXAMPLES} more functions`
+ : ''}`
+ : ''
+ console.log(`${GENERIC_FUNCTION_SERVE_MESSAGE}${functionsExamplesMessages}\nUsing ${Deno.version.deno}`);
+ }
+ } catch (e) {
+ console.log(
+ `${GENERIC_FUNCTION_SERVE_MESSAGE}\nUsing ${Deno.version.deno}`
+ );
+ }
},
onError: e => {
diff --git a/internal/functions/serve/testdata/config.toml b/internal/functions/serve/testdata/config.toml
new file mode 100644
index 0000000000..28ea9a510b
--- /dev/null
+++ b/internal/functions/serve/testdata/config.toml
@@ -0,0 +1,8 @@
+project_id = "test"
+
+[functions.hello]
+static_files = ["image.png"]
+
+[functions.world]
+enabled = false
+verify_jwt = false
diff --git a/internal/functions/serve/watcher.go b/internal/functions/serve/watcher.go
new file mode 100644
index 0000000000..6e75a104b4
--- /dev/null
+++ b/internal/functions/serve/watcher.go
@@ -0,0 +1,165 @@
+package serve
+
+import (
+ "fmt"
+ "io/fs"
+ "os"
+ "path/filepath"
+ "slices"
+ "strings"
+ "time"
+
+ "github.com/fsnotify/fsnotify"
+ "github.com/go-errors/errors"
+ "github.com/spf13/afero"
+ "github.com/spf13/viper"
+ "github.com/supabase/cli/internal/utils"
+)
+
+const (
+ // Debounce duration for file changes
+ debounceDuration = 500 * time.Millisecond
+ restartEvents = fsnotify.Write | fsnotify.Create | fsnotify.Remove | fsnotify.Rename
+ maxFileLimit = 1000
+)
+
+var (
+ errTooManyFiles = errors.New("too many files")
+
+ // Directories to ignore.
+ ignoredDirNames = []string{
+ ".git",
+ "node_modules",
+ ".vscode",
+ ".idea",
+ ".DS_Store",
+ "vendor",
+ }
+
+ // Patterns for ignoring file events.
+ ignoredFilePatterns = []struct {
+ Prefix string // File basename prefix
+ Suffix string // File basename suffix
+ ExactMatch bool // File basename exact match
+ }{
+ {Suffix: "~"}, // Common backup files (e.g., emacs, gedit)
+ {Prefix: ".", Suffix: ".swp"}, // Vim swap files
+ {Prefix: ".", Suffix: ".swx"}, // Vim swap files (extended)
+ {Prefix: "___"}, // Deno temp files often start with this
+ {Suffix: ".tmp"}, // Generic temp files
+ {Prefix: ".#"}, // Emacs lock files
+ }
+)
+
+// isIgnoredFileEvent checks if a file event should be ignored based on predefined patterns.
+func isIgnoredFileEvent(event fsnotify.Event) bool {
+ if !event.Has(restartEvents) {
+ return true
+ }
+ baseName := filepath.Base(event.Name)
+ for _, p := range ignoredFilePatterns {
+ if strings.HasPrefix(baseName, p.Prefix) && strings.HasSuffix(baseName, p.Suffix) {
+ // An exact match means all characters match both prefix and suffix
+ if p.ExactMatch && len(baseName) > len(p.Prefix)+len(p.Suffix) {
+ continue
+ }
+ return true
+ }
+ }
+ return false
+}
+
+type debounceFileWatcher struct {
+ watcher *fsnotify.Watcher
+ restartTimer *time.Timer
+ RestartCh <-chan time.Time
+ ErrCh <-chan error
+}
+
+func NewDebounceFileWatcher() (*debounceFileWatcher, error) {
+ restartTimer := time.NewTimer(debounceDuration)
+ if !restartTimer.Stop() {
+ return nil, errors.New("failed to initialise timer")
+ }
+ watcher, err := fsnotify.NewWatcher()
+ if err != nil {
+ return nil, errors.Errorf("failed to create file watcher: %w", err)
+ }
+ return &debounceFileWatcher{
+ watcher: watcher,
+ ErrCh: watcher.Errors,
+ restartTimer: restartTimer,
+ RestartCh: restartTimer.C,
+ }, nil
+}
+
+func (w *debounceFileWatcher) Start() {
+ for {
+ event, ok := <-w.watcher.Events
+ if !isIgnoredFileEvent(event) {
+ fmt.Fprintf(os.Stderr, "File change detected: %s (%s)\n", event.Name, event.Op.String())
+ // Fire immediately when timer is inactive, without blocking this thread
+ if active := w.restartTimer.Reset(0); active {
+ w.restartTimer.Reset(debounceDuration)
+ }
+ }
+ // Ensure the last event is fired before channel close
+ if !ok {
+ return
+ }
+ fmt.Fprintf(utils.GetDebugLogger(), "Ignoring file event: %s (%s)\n", event.Name, event.Op.String())
+ }
+}
+
+func (w *debounceFileWatcher) SetWatchPaths(watchPaths []string, fsys afero.Fs) error {
+ watchLimit := viper.GetUint("FUNCTIONS_WATCH_LIMIT")
+ if watchLimit == 0 {
+ watchLimit = maxFileLimit
+ }
+ shouldWatchDirs := make(map[string]struct{})
+ for _, hostPath := range watchPaths {
+ // Ignore non-existent paths and symlink directories
+ if err := afero.Walk(fsys, hostPath, func(path string, info fs.FileInfo, err error) error {
+ if errors.Is(err, os.ErrNotExist) || slices.Contains(ignoredDirNames, filepath.Base(path)) {
+ return nil
+ } else if err != nil {
+ return errors.Errorf("failed to walk path: %w", err)
+ }
+ if info.IsDir() {
+ shouldWatchDirs[path] = struct{}{}
+ } else if path == hostPath {
+ shouldWatchDirs[filepath.Dir(path)] = struct{}{}
+ }
+ if uint(len(shouldWatchDirs)) >= watchLimit {
+ return errors.Errorf("file watcher stopped at %s: %w", path, errTooManyFiles)
+ }
+ return nil
+ }); errors.Is(err, errTooManyFiles) {
+ fmt.Fprintf(os.Stderr, "%s\nYou can increase this limit by setting SUPABASE_FUNCTIONS_WATCH_LIMIT=%d", err.Error(), watchLimit<<2)
+ } else if err != nil {
+ return err
+ }
+ }
+ // Add directories to watch, ignoring duplicates
+ for hostPath := range shouldWatchDirs {
+ if err := w.watcher.Add(hostPath); err != nil {
+ return errors.Errorf("failed to watch directory: %w", err)
+ }
+ fmt.Fprintln(utils.GetDebugLogger(), "Added directory from watcher:", hostPath)
+ }
+ // Remove directories that are no longer needed
+ for _, hostPath := range w.watcher.WatchList() {
+ if _, ok := shouldWatchDirs[hostPath]; !ok {
+ if err := w.watcher.Remove(hostPath); err != nil {
+ return errors.Errorf("failed to remove watch directory: %w", err)
+ }
+ fmt.Fprintln(utils.GetDebugLogger(), "Removed directory from watcher:", hostPath)
+ }
+ }
+ return nil
+}
+
+func (r *debounceFileWatcher) Close() error {
+ // Don't stop the timer to allow debounced events to fire
+ return r.watcher.Close()
+}
diff --git a/internal/functions/serve/watcher_test.go b/internal/functions/serve/watcher_test.go
new file mode 100644
index 0000000000..cde1dc078e
--- /dev/null
+++ b/internal/functions/serve/watcher_test.go
@@ -0,0 +1,264 @@
+package serve
+
+import (
+ "context"
+ "os"
+ "path/filepath"
+ "testing"
+ "time"
+
+ "github.com/fsnotify/fsnotify"
+ "github.com/spf13/afero"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+// Integration test setup for watcher functionality
+type WatcherIntegrationSetup struct {
+ T *testing.T
+ Context context.Context
+ Cancel context.CancelFunc
+ TempDir string
+}
+
+func NewWatcherIntegrationSetup(t *testing.T) *WatcherIntegrationSetup {
+ ctx, cancel := context.WithCancel(context.Background())
+ tempDir := t.TempDir()
+
+ setup := &WatcherIntegrationSetup{
+ T: t,
+ Context: ctx,
+ Cancel: cancel,
+ TempDir: tempDir,
+ }
+
+ return setup
+}
+
+func (s *WatcherIntegrationSetup) Cleanup() {
+ s.Cancel()
+}
+
+// SetupFunctionsDirectory creates a functions directory with test functions
+func (s *WatcherIntegrationSetup) SetupFunctionsDirectory() string {
+ functionsDir := filepath.Join(s.TempDir, "supabase", "functions")
+ require.NoError(s.T, os.MkdirAll(functionsDir, 0755))
+
+ // Set up test functions
+ s.createFunction("hello", `export default () => new Response("Hello World")`)
+ s.createFunction("protected", `export default () => new Response("Protected")`)
+
+ return functionsDir
+}
+
+func (s *WatcherIntegrationSetup) SetupSupabaseDirectory() string {
+ supabaseDir := filepath.Join(s.TempDir, "supabase")
+ require.NoError(s.T, os.MkdirAll(supabaseDir, 0755))
+
+ return supabaseDir
+}
+
+func (s *WatcherIntegrationSetup) createFunction(name, content string) {
+ funcDir := filepath.Join(s.TempDir, "supabase", "functions", name)
+ require.NoError(s.T, os.MkdirAll(funcDir, 0755))
+ require.NoError(s.T, os.WriteFile(filepath.Join(funcDir, "index.ts"), []byte(content), 0600))
+}
+
+// CreateFileWatcher creates and configures a debounce file watcher for testing
+func (s *WatcherIntegrationSetup) CreateFileWatcher() (*debounceFileWatcher, error) {
+ watcher, err := NewDebounceFileWatcher()
+ if err != nil {
+ return nil, err
+ }
+
+ // Set up watch paths to include our test directory
+ fsys := afero.NewOsFs()
+ watchPaths := []string{s.TempDir}
+
+ if err := watcher.SetWatchPaths(watchPaths, fsys); err != nil {
+ watcher.Close()
+ return nil, err
+ }
+
+ return watcher, nil
+}
+
+func TestFileWatcher(t *testing.T) {
+ t.Run("detects TypeScript function changes and triggers restart", func(t *testing.T) {
+ setup := NewWatcherIntegrationSetup(t)
+ defer setup.Cleanup()
+
+ functionsDir := setup.SetupFunctionsDirectory()
+ watcher, err := setup.CreateFileWatcher()
+ require.NoError(t, err)
+
+ // Modify a function file in background
+ go func() {
+ defer watcher.Close()
+ funcFile := filepath.Join(functionsDir, "hello", "index.ts")
+ newContent := `export default () => new Response("Hello Modified World")`
+ require.NoError(t, os.WriteFile(funcFile, []byte(newContent), 0600))
+ // https://github.com/fsnotify/fsnotify/blob/main/fsnotify_test.go#L181
+ time.Sleep(50 * time.Millisecond)
+ }()
+
+ // Run watcher on main thread to avoid sleeping
+ watcher.Start()
+
+ // Wait for restart signal
+ select {
+ case ts, ok := <-watcher.RestartCh:
+ assert.NotZero(t, ts, "file change should trigger restart")
+ assert.True(t, ok, "timer channel should be closed")
+ case <-time.After(2 * time.Second):
+ assert.Fail(t, "missing restart signal after modifying TypeScript file")
+ }
+ })
+
+ t.Run("ignores editor temporary files", func(t *testing.T) {
+ watcher, err := NewDebounceFileWatcher()
+ require.NoError(t, err)
+
+ // Create various temporary/editor files that should be ignored
+ go func() {
+ defer watcher.Close()
+ tempFiles := []string{
+ filepath.Join("/tmp", "test.txt~"), // Backup file
+ filepath.Join("/tmp", ".test.swp"), // Vim swap
+ filepath.Join("/tmp", ".#test.ts"), // Emacs lock
+ filepath.Join("/tmp", "test.tmp"), // Temp file
+ filepath.Join("/tmp", "___deno_temp___"), // Deno temp
+ }
+ for _, tempFile := range tempFiles {
+ // Fire events directly since we only care about ignore files
+ watcher.watcher.Events <- fsnotify.Event{
+ Name: tempFile,
+ Op: fsnotify.Create,
+ }
+ }
+ }()
+
+ // Run watcher on main thread to avoid sleeping
+ watcher.Start()
+
+ // Wait multiple times for out of order events
+ for range 3 {
+ select {
+ case <-watcher.RestartCh:
+ assert.Fail(t, "should not receive any restart signals from ignored files")
+ case err := <-watcher.ErrCh:
+ assert.NoError(t, err)
+ }
+ }
+ })
+
+ t.Run("detects config file changes and triggers restart", func(t *testing.T) {
+ setup := NewWatcherIntegrationSetup(t)
+ defer setup.Cleanup()
+
+ supabaseDir := setup.SetupSupabaseDirectory()
+ watcher, err := setup.CreateFileWatcher()
+ require.NoError(t, err)
+
+ // Create and modify a config.toml file
+ go func() {
+ defer watcher.Close()
+ configFile := filepath.Join(supabaseDir, "config.toml")
+ require.NoError(t, os.WriteFile(configFile, []byte(`
+ [functions.hello]
+ enabled = true
+ verify_jwt = false
+ `), 0600))
+ // https://github.com/fsnotify/fsnotify/blob/main/fsnotify_test.go#L181
+ time.Sleep(50 * time.Millisecond)
+ }()
+
+ // Run watcher on main thread to avoid sleeping
+ watcher.Start()
+
+ // Wait for restart signal
+ select {
+ case ts, ok := <-watcher.RestartCh:
+ assert.NotZero(t, ts, "config change should trigger restart")
+ assert.True(t, ok, "timer channel should be closed")
+ case <-time.After(2 * time.Second):
+ assert.Fail(t, "missing restart signal after modifying config file")
+ }
+ })
+
+ t.Run("debounces rapid file changes", func(t *testing.T) {
+ watcher, err := NewDebounceFileWatcher()
+ require.NoError(t, err)
+
+ // Make rapid changes to a file
+ go func() {
+ defer watcher.Close()
+ for range 5 {
+ watcher.watcher.Events <- fsnotify.Event{
+ Name: filepath.Join("/tmp", "index.ts"),
+ Op: fsnotify.Write,
+ }
+ }
+ }()
+
+ // Run watcher on main thread to avoid sleeping
+ watcher.Start()
+
+ // Wait for debounce duration
+ select {
+ case ts, ok := <-watcher.RestartCh:
+ assert.NotZero(t, ts)
+ assert.True(t, ok)
+ case <-time.After(debounceDuration):
+ assert.Fail(t, "missing restart signal after rapid file changes")
+ }
+ select {
+ case <-watcher.RestartCh:
+ assert.Fail(t, "should only get one restart signal due to debouncing")
+ case ts, ok := <-time.After(debounceDuration):
+ assert.NotZero(t, ts)
+ assert.True(t, ok)
+ }
+ })
+
+ t.Run("watches multiple directories", func(t *testing.T) {
+ setup := NewWatcherIntegrationSetup(t)
+ defer setup.Cleanup()
+
+ // Create multiple directories with functions
+ functionsDir := setup.SetupFunctionsDirectory()
+ libDir := filepath.Join(setup.TempDir, "lib")
+ require.NoError(t, os.MkdirAll(libDir, 0755))
+
+ // Create a utility file in lib directory
+ utilFile := filepath.Join(libDir, "utils.ts")
+ require.NoError(t, os.WriteFile(utilFile, []byte(`export function util() { return "utility"; }`), 0600))
+
+ watcher, err := NewDebounceFileWatcher()
+ require.NoError(t, err)
+
+ go func() {
+ defer watcher.Close()
+ // Set up watch paths to include both directories
+ fsys := afero.NewOsFs()
+ watchPaths := []string{functionsDir, libDir}
+ require.NoError(t, watcher.SetWatchPaths(watchPaths, fsys))
+ // Modify file in lib directory
+ require.NoError(t, os.WriteFile(utilFile, []byte(`export function util() { return "modified utility"; }`), 0600))
+ // https://github.com/fsnotify/fsnotify/blob/main/fsnotify_test.go#L181
+ time.Sleep(50 * time.Millisecond)
+ }()
+
+ // Run watcher on main thread to avoid sleeping
+ watcher.Start()
+
+ // Wait for restart signal
+ select {
+ case ts, ok := <-watcher.RestartCh:
+ assert.NotZero(t, ts, "change in watched lib directory should trigger restart")
+ assert.True(t, ok, "timer channel should be closed")
+ case <-time.After(2 * time.Second):
+ assert.Fail(t, "missing restart signal after modifying file in watched lib directory")
+ }
+ })
+}
diff --git a/internal/gen/keys/keys.go b/internal/gen/keys/keys.go
index 81ed52988e..6c81f4bd32 100644
--- a/internal/gen/keys/keys.go
+++ b/internal/gen/keys/keys.go
@@ -31,9 +31,9 @@ func Run(ctx context.Context, projectRef, format string, names CustomName, fsys
return utils.EncodeOutput(format, os.Stdout, map[string]string{
names.DbHost: fmt.Sprintf("%s-%s.fly.dev", projectRef, branch),
names.DbPassword: utils.Config.Db.Password,
- names.JWTSecret: utils.Config.Auth.JwtSecret,
- names.AnonKey: utils.Config.Auth.AnonKey,
- names.ServiceRoleKey: utils.Config.Auth.ServiceRoleKey,
+ names.JWTSecret: utils.Config.Auth.JwtSecret.Value,
+ names.AnonKey: utils.Config.Auth.AnonKey.Value,
+ names.ServiceRoleKey: utils.Config.Auth.ServiceRoleKey.Value,
})
}
@@ -46,11 +46,11 @@ func GenerateSecrets(ctx context.Context, projectRef, branch string, fsys afero.
if resp.JSON200 == nil {
return errors.New("Unexpected error retrieving JWT secret: " + string(resp.Body))
}
- utils.Config.Auth.JwtSecret = *resp.JSON200.JwtSecret
+ utils.Config.Auth.JwtSecret.Value = *resp.JSON200.JwtSecret
// Generate database password
key := strings.Join([]string{
projectRef,
- utils.Config.Auth.JwtSecret,
+ utils.Config.Auth.JwtSecret.Value,
branch,
}, ":")
hash := sha256.Sum256([]byte(key))
@@ -61,7 +61,7 @@ func GenerateSecrets(ctx context.Context, projectRef, branch string, fsys afero.
Ref: projectRef,
Role: "anon",
}.NewToken()
- if utils.Config.Auth.AnonKey, err = anonToken.SignedString([]byte(utils.Config.Auth.JwtSecret)); err != nil {
+ if utils.Config.Auth.AnonKey.Value, err = anonToken.SignedString([]byte(utils.Config.Auth.JwtSecret.Value)); err != nil {
return errors.Errorf("failed to sign anon key: %w", err)
}
serviceToken := config.CustomClaims{
@@ -69,7 +69,7 @@ func GenerateSecrets(ctx context.Context, projectRef, branch string, fsys afero.
Ref: projectRef,
Role: "service_role",
}.NewToken()
- if utils.Config.Auth.ServiceRoleKey, err = serviceToken.SignedString([]byte(utils.Config.Auth.JwtSecret)); err != nil {
+ if utils.Config.Auth.ServiceRoleKey.Value, err = serviceToken.SignedString([]byte(utils.Config.Auth.JwtSecret.Value)); err != nil {
return errors.Errorf("failed to sign service_role key: %w", err)
}
return nil
diff --git a/internal/gen/signingkeys/signingkeys.go b/internal/gen/signingkeys/signingkeys.go
new file mode 100644
index 0000000000..7394a99c4e
--- /dev/null
+++ b/internal/gen/signingkeys/signingkeys.go
@@ -0,0 +1,249 @@
+package signingkeys
+
+import (
+ "context"
+ "crypto/ecdsa"
+ "crypto/elliptic"
+ "crypto/rand"
+ "crypto/rsa"
+ "encoding/base64"
+ "encoding/json"
+ "fmt"
+ "io"
+ "math/big"
+ "os"
+ "path/filepath"
+
+ "github.com/go-errors/errors"
+ "github.com/google/uuid"
+ "github.com/spf13/afero"
+ "github.com/supabase/cli/internal/utils"
+ "github.com/supabase/cli/internal/utils/flags"
+ "github.com/supabase/cli/pkg/cast"
+)
+
+type Algorithm string
+
+const (
+ AlgRS256 Algorithm = "RS256"
+ AlgES256 Algorithm = "ES256"
+)
+
+type JWK struct {
+ KeyType string `json:"kty"`
+ KeyID string `json:"kid,omitempty"`
+ Use string `json:"use,omitempty"`
+ KeyOps []string `json:"key_ops,omitempty"`
+ Algorithm string `json:"alg,omitempty"`
+ Extractable *bool `json:"ext,omitempty"`
+ // RSA specific fields
+ Modulus string `json:"n,omitempty"`
+ Exponent string `json:"e,omitempty"`
+ // RSA private key fields
+ PrivateExponent string `json:"d,omitempty"`
+ FirstPrimeFactor string `json:"p,omitempty"`
+ SecondPrimeFactor string `json:"q,omitempty"`
+ FirstFactorCRTExponent string `json:"dp,omitempty"`
+ SecondFactorCRTExponent string `json:"dq,omitempty"`
+ FirstCRTCoefficient string `json:"qi,omitempty"`
+ // EC specific fields
+ Curve string `json:"crv,omitempty"`
+ X string `json:"x,omitempty"`
+ Y string `json:"y,omitempty"`
+}
+
+type KeyPair struct {
+ PublicKey JWK
+ PrivateKey JWK
+}
+
+// GenerateKeyPair generates a new key pair for the specified algorithm
+func GenerateKeyPair(alg Algorithm) (*KeyPair, error) {
+ keyID := uuid.New().String()
+
+ switch alg {
+ case AlgRS256:
+ return generateRSAKeyPair(keyID)
+ case AlgES256:
+ return generateECDSAKeyPair(keyID)
+ default:
+ return nil, errors.Errorf("unsupported algorithm: %s", alg)
+ }
+}
+
+func generateRSAKeyPair(keyID string) (*KeyPair, error) {
+ // Generate RSA key pair (2048 bits for RS256)
+ privateKey, err := rsa.GenerateKey(rand.Reader, 2048)
+ if err != nil {
+ return nil, errors.Errorf("failed to generate RSA key: %w", err)
+ }
+
+ publicKey := &privateKey.PublicKey
+
+ // Precompute CRT values for completeness
+ privateKey.Precompute()
+
+ // Convert to JWK format
+ privateJWK := JWK{
+ KeyType: "RSA",
+ KeyID: keyID,
+ Use: "sig",
+ KeyOps: []string{"sign", "verify"},
+ Algorithm: "RS256",
+ Extractable: cast.Ptr(true),
+ Modulus: base64.RawURLEncoding.EncodeToString(publicKey.N.Bytes()),
+ Exponent: base64.RawURLEncoding.EncodeToString(big.NewInt(int64(publicKey.E)).Bytes()),
+ PrivateExponent: base64.RawURLEncoding.EncodeToString(privateKey.D.Bytes()),
+ FirstPrimeFactor: base64.RawURLEncoding.EncodeToString(privateKey.Primes[0].Bytes()),
+ SecondPrimeFactor: base64.RawURLEncoding.EncodeToString(privateKey.Primes[1].Bytes()),
+ FirstFactorCRTExponent: base64.RawURLEncoding.EncodeToString(privateKey.Precomputed.Dp.Bytes()),
+ SecondFactorCRTExponent: base64.RawURLEncoding.EncodeToString(privateKey.Precomputed.Dq.Bytes()),
+ FirstCRTCoefficient: base64.RawURLEncoding.EncodeToString(privateKey.Precomputed.Qinv.Bytes()),
+ }
+
+ publicJWK := JWK{
+ KeyType: "RSA",
+ KeyID: keyID,
+ Use: "sig",
+ KeyOps: []string{"verify"},
+ Algorithm: "RS256",
+ Extractable: cast.Ptr(true),
+ Modulus: privateJWK.Modulus,
+ Exponent: privateJWK.Exponent,
+ }
+
+ return &KeyPair{
+ PublicKey: publicJWK,
+ PrivateKey: privateJWK,
+ }, nil
+}
+
+func generateECDSAKeyPair(keyID string) (*KeyPair, error) {
+ // Generate ECDSA key pair (P-256 curve for ES256)
+ privateKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
+ if err != nil {
+ return nil, errors.Errorf("failed to generate ECDSA key: %w", err)
+ }
+
+ publicKey := &privateKey.PublicKey
+
+ // Convert to JWK format
+ privateJWK := JWK{
+ KeyType: "EC",
+ KeyID: keyID,
+ Use: "sig",
+ KeyOps: []string{"sign", "verify"},
+ Algorithm: "ES256",
+ Extractable: cast.Ptr(true),
+ Curve: "P-256",
+ X: base64.RawURLEncoding.EncodeToString(publicKey.X.Bytes()),
+ Y: base64.RawURLEncoding.EncodeToString(publicKey.Y.Bytes()),
+ PrivateExponent: base64.RawURLEncoding.EncodeToString(privateKey.D.Bytes()),
+ }
+
+ publicJWK := JWK{
+ KeyType: "EC",
+ KeyID: keyID,
+ Use: "sig",
+ KeyOps: []string{"verify"},
+ Algorithm: "ES256",
+ Extractable: cast.Ptr(true),
+ Curve: "P-256",
+ X: privateJWK.X,
+ Y: privateJWK.Y,
+ }
+
+ return &KeyPair{
+ PublicKey: publicJWK,
+ PrivateKey: privateJWK,
+ }, nil
+}
+
+// Run generates a key pair and writes it to the specified file path
+func Run(ctx context.Context, algorithm string, appendMode bool, fsys afero.Fs) error {
+ err := flags.LoadConfig(fsys)
+ if err != nil {
+ return err
+ }
+ outputPath := utils.Config.Auth.SigningKeysPath
+
+ // Generate key pair
+ keyPair, err := GenerateKeyPair(Algorithm(algorithm))
+ if err != nil {
+ return err
+ }
+
+ out := io.Writer(os.Stdout)
+ var jwkArray []JWK
+ if len(outputPath) > 0 {
+ if err := utils.MkdirIfNotExistFS(fsys, filepath.Dir(outputPath)); err != nil {
+ return err
+ }
+ f, err := fsys.OpenFile(outputPath, os.O_RDWR|os.O_CREATE, 0600)
+ if err != nil {
+ return errors.Errorf("failed to open signing key: %w", err)
+ }
+ defer f.Close()
+ if appendMode {
+ // Load existing key and reset file
+ dec := json.NewDecoder(f)
+ // Since a new file is empty, we must ignore EOF error
+ if err := dec.Decode(&jwkArray); err != nil && !errors.Is(err, io.EOF) {
+ return errors.Errorf("failed to decode signing key: %w", err)
+ }
+ if _, err = f.Seek(0, io.SeekStart); err != nil {
+ return errors.Errorf("failed to seek signing key: %w", err)
+ }
+ } else if fi, err := f.Stat(); fi.Size() > 0 {
+ if err != nil {
+ fmt.Fprintln(utils.GetDebugLogger(), err)
+ }
+ label := fmt.Sprintf("Do you want to overwrite the existing %s file?", utils.Bold(outputPath))
+ if shouldOverwrite, err := utils.NewConsole().PromptYesNo(ctx, label, true); err != nil {
+ return err
+ } else if !shouldOverwrite {
+ return errors.New(context.Canceled)
+ }
+ if err := f.Truncate(0); err != nil {
+ return errors.Errorf("failed to truncate signing key: %w", err)
+ }
+ }
+ out = f
+ }
+ jwkArray = append(jwkArray, keyPair.PrivateKey)
+
+ // Write to file
+ enc := json.NewEncoder(out)
+ enc.SetIndent("", " ")
+ if err := enc.Encode(jwkArray); err != nil {
+ return errors.Errorf("failed to encode signing key: %w", err)
+ }
+
+ if len(outputPath) == 0 {
+ utils.CmdSuggestion = fmt.Sprintf(`
+To enable JWT signing keys in your local project:
+1. Save the generated key to %s
+2. Update your %s with the new keys path
+
+[auth]
+signing_keys_path = "./signing_key.json"
+`, utils.Bold(filepath.Join(utils.SupabaseDirPath, "signing_key.json")), utils.Bold(utils.ConfigPath))
+ return nil
+ }
+
+ fmt.Fprintf(os.Stderr, "JWT signing key appended to: %s (now contains %d keys)\n", utils.Bold(outputPath), len(jwkArray))
+ if len(jwkArray) == 1 {
+ if ignored, err := utils.IsGitIgnored(outputPath); err != nil {
+ fmt.Fprintln(utils.GetDebugLogger(), err)
+ } else if !ignored {
+ // Since the output path is user defined, we can't update the managed .gitignore file.
+ fmt.Fprintln(os.Stderr, utils.Yellow("IMPORTANT:"), "Add your signing key path to .gitignore to prevent committing to version control.")
+ }
+ }
+ return nil
+}
+
+// GetSupportedAlgorithms returns a list of supported algorithms
+func GetSupportedAlgorithms() []string {
+ return []string{string(AlgRS256), string(AlgES256)}
+}
diff --git a/internal/gen/signingkeys/signingkeys_test.go b/internal/gen/signingkeys/signingkeys_test.go
new file mode 100644
index 0000000000..51333887d2
--- /dev/null
+++ b/internal/gen/signingkeys/signingkeys_test.go
@@ -0,0 +1,109 @@
+package signingkeys
+
+import (
+ "testing"
+)
+
+func TestGenerateKeyPair(t *testing.T) {
+ tests := []struct {
+ name string
+ algorithm Algorithm
+ wantErr bool
+ }{
+ {
+ name: "RSA key generation",
+ algorithm: AlgRS256,
+ wantErr: false,
+ },
+ {
+ name: "ECDSA key generation",
+ algorithm: AlgES256,
+ wantErr: false,
+ },
+ {
+ name: "unsupported algorithm",
+ algorithm: "UNSUPPORTED",
+ wantErr: true,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ keyPair, err := GenerateKeyPair(tt.algorithm)
+ if (err != nil) != tt.wantErr {
+ t.Errorf("GenerateKeyPair(%s) error = %v, wantErr %v", tt.algorithm, err, tt.wantErr)
+ return
+ }
+ if !tt.wantErr {
+ if keyPair == nil {
+ t.Error("GenerateKeyPair() returned nil key pair")
+ return
+ }
+
+ // Check that both public and private keys are generated
+ if keyPair.PublicKey.KeyType == "" {
+ t.Error("Public key type is empty")
+ }
+ if keyPair.PrivateKey.KeyType == "" {
+ t.Error("Private key type is empty")
+ }
+
+ // Check that key IDs match
+ if keyPair.PublicKey.KeyID != keyPair.PrivateKey.KeyID {
+ t.Error("Public and private key IDs don't match")
+ }
+
+ // Algorithm-specific checks
+ switch tt.algorithm {
+ case AlgRS256:
+ if keyPair.PublicKey.KeyType != "RSA" {
+ t.Errorf("Expected RSA key type, got %s", keyPair.PublicKey.KeyType)
+ }
+ if keyPair.PrivateKey.Algorithm != "RS256" {
+ t.Errorf("Expected RS256 algorithm, got %s", keyPair.PrivateKey.Algorithm)
+ }
+ // Check that RSA-specific fields are present
+ if keyPair.PrivateKey.Modulus == "" {
+ t.Error("RSA private key missing modulus")
+ }
+ if keyPair.PrivateKey.PrivateExponent == "" {
+ t.Error("RSA private key missing private exponent")
+ }
+ case AlgES256:
+ if keyPair.PublicKey.KeyType != "EC" {
+ t.Errorf("Expected EC key type, got %s", keyPair.PublicKey.KeyType)
+ }
+ if keyPair.PrivateKey.Algorithm != "ES256" {
+ t.Errorf("Expected ES256 algorithm, got %s", keyPair.PrivateKey.Algorithm)
+ }
+ // Check that EC-specific fields are present
+ if keyPair.PrivateKey.Curve != "P-256" {
+ t.Errorf("Expected P-256 curve, got %s", keyPair.PrivateKey.Curve)
+ }
+ if keyPair.PrivateKey.X == "" {
+ t.Error("EC private key missing X coordinate")
+ }
+ if keyPair.PrivateKey.Y == "" {
+ t.Error("EC private key missing Y coordinate")
+ }
+ }
+ }
+ })
+ }
+}
+
+func TestGetSupportedAlgorithms(t *testing.T) {
+ algorithms := GetSupportedAlgorithms()
+ expected := []string{"RS256", "ES256"}
+
+ if len(algorithms) != len(expected) {
+ t.Errorf("GetSupportedAlgorithms() length = %d, expected %d", len(algorithms), len(expected))
+ return
+ }
+
+ for i, alg := range algorithms {
+ if alg != expected[i] {
+ t.Errorf("GetSupportedAlgorithms()[%d] = %s, expected %s", i, alg, expected[i])
+ }
+ }
+}
diff --git a/internal/gen/types/types.go b/internal/gen/types/types.go
index 9ffc7dc722..26f3c09bfe 100644
--- a/internal/gen/types/types.go
+++ b/internal/gen/types/types.go
@@ -12,6 +12,7 @@ import (
"github.com/jackc/pgconn"
"github.com/jackc/pgx/v4"
"github.com/spf13/afero"
+ "github.com/spf13/viper"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/pkg/api"
)
@@ -113,5 +114,6 @@ func isRequireSSL(ctx context.Context, dbUrl string, options ...func(*pgx.ConnCo
}
return false, err
}
- return true, conn.Close(ctx)
+ // SSL is not supported in debug mode
+ return !viper.GetBool("DEBUG"), conn.Close(ctx)
}
diff --git a/internal/inspect/bloat/bloat.go b/internal/inspect/bloat/bloat.go
index 6a97e41c8a..a339cd2053 100644
--- a/internal/inspect/bloat/bloat.go
+++ b/internal/inspect/bloat/bloat.go
@@ -19,11 +19,10 @@ import (
var BloatQuery string
type Result struct {
- Type string
- Schemaname string
- Object_name string
- Bloat string
- Waste string
+ Type string
+ Name string
+ Bloat string
+ Waste string
}
func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
@@ -41,9 +40,9 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
return err
}
- table := "|Type|Schema name|Object name|Bloat|Waste\n|-|-|-|-|-|\n"
+ table := "|Type|Name|Bloat|Waste\n|-|-|-|-|\n"
for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%s`|`%s`|`%s`|`%s`|\n", r.Type, r.Schemaname, r.Object_name, r.Bloat, r.Waste)
+ table += fmt.Sprintf("|`%s`|`%s`|`%s`|`%s`|\n", r.Type, r.Name, r.Bloat, r.Waste)
}
return list.RenderTable(table)
}
diff --git a/internal/inspect/bloat/bloat.sql b/internal/inspect/bloat/bloat.sql
index 25917d874b..06e4234f03 100644
--- a/internal/inspect/bloat/bloat.sql
+++ b/internal/inspect/bloat/bloat.sql
@@ -25,7 +25,8 @@ WITH constants AS (
(CASE WHEN datahdr%ma=0 THEN ma ELSE datahdr%ma END))+nullhdr2+4))/(bs-20::float)) AS otta
FROM bloat_info
JOIN pg_class cc ON cc.relname = bloat_info.tablename
- JOIN pg_namespace nn ON cc.relnamespace = nn.oid AND nn.nspname = bloat_info.schemaname AND nn.nspname <> 'information_schema'
+ JOIN pg_namespace nn ON cc.relnamespace = nn.oid AND nn.nspname = bloat_info.schemaname
+ WHERE NOT nn.nspname LIKE ANY($1)
), index_bloat AS (
SELECT
schemaname, tablename, bs,
@@ -33,29 +34,25 @@ WITH constants AS (
COALESCE(CEIL((c2.reltuples*(datahdr-12))/(bs-20::float)),0) AS iotta -- very rough approximation, assumes all cols
FROM bloat_info
JOIN pg_class cc ON cc.relname = bloat_info.tablename
- JOIN pg_namespace nn ON cc.relnamespace = nn.oid AND nn.nspname = bloat_info.schemaname AND nn.nspname <> 'information_schema'
+ JOIN pg_namespace nn ON cc.relnamespace = nn.oid AND nn.nspname = bloat_info.schemaname
JOIN pg_index i ON indrelid = cc.oid
JOIN pg_class c2 ON c2.oid = i.indexrelid
-)
-SELECT
- type, schemaname, object_name, bloat, pg_size_pretty(raw_waste) as waste
-FROM
-(SELECT
- 'table' as type,
- schemaname,
- tablename as object_name,
- ROUND(CASE WHEN otta=0 THEN 0.0 ELSE table_bloat.relpages/otta::numeric END,1) AS bloat,
- CASE WHEN relpages < otta THEN '0' ELSE (bs*(table_bloat.relpages-otta)::bigint)::bigint END AS raw_waste
-FROM
- table_bloat
+ WHERE NOT nn.nspname LIKE ANY($1)
+), bloat_summary AS (
+ SELECT
+ 'table' as type,
+ FORMAT('%I.%I', schemaname, tablename) AS name,
+ ROUND(CASE WHEN otta=0 THEN 0.0 ELSE table_bloat.relpages/otta::numeric END,1) AS bloat,
+ CASE WHEN relpages < otta THEN '0' ELSE (bs*(table_bloat.relpages-otta)::bigint)::bigint END AS raw_waste
+ FROM table_bloat
UNION
-SELECT
- 'index' as type,
- schemaname,
- tablename || '::' || iname as object_name,
- ROUND(CASE WHEN iotta=0 OR ipages=0 THEN 0.0 ELSE ipages/iotta::numeric END,1) AS bloat,
+ SELECT
+ 'index' as type,
+ FORMAT('%I.%I::%I', schemaname, tablename, iname) AS name,
+ ROUND(CASE WHEN iotta=0 OR ipages=0 THEN 0.0 ELSE ipages/iotta::numeric END,1) AS bloat,
CASE WHEN ipages < iotta THEN '0' ELSE (bs*(ipages-iotta))::bigint END AS raw_waste
-FROM
- index_bloat) bloat_summary
-WHERE NOT schemaname LIKE ANY($1)
+ FROM index_bloat
+)
+SELECT type, name, bloat, pg_size_pretty(raw_waste) as waste
+FROM bloat_summary
ORDER BY raw_waste DESC, bloat DESC
diff --git a/internal/inspect/bloat/bloat_test.go b/internal/inspect/bloat/bloat_test.go
index 8646565cef..d172e4220a 100644
--- a/internal/inspect/bloat/bloat_test.go
+++ b/internal/inspect/bloat/bloat_test.go
@@ -29,11 +29,10 @@ func TestBloat(t *testing.T) {
defer conn.Close(t)
conn.Query(BloatQuery, reset.LikeEscapeSchema(utils.InternalSchemas)).
Reply("SELECT 1", Result{
- Type: "index hit rate",
- Schemaname: "public",
- Object_name: "table",
- Bloat: "0.9",
- Waste: "0.1",
+ Type: "index hit rate",
+ Name: "public.table",
+ Bloat: "0.9",
+ Waste: "0.1",
})
// Run test
err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
diff --git a/internal/inspect/cache/cache.go b/internal/inspect/cache/cache.go
deleted file mode 100644
index ce30c1f4a5..0000000000
--- a/internal/inspect/cache/cache.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package cache
-
-import (
- "context"
- _ "embed"
- "fmt"
-
- "github.com/go-errors/errors"
- "github.com/jackc/pgconn"
- "github.com/jackc/pgx/v4"
- "github.com/spf13/afero"
- "github.com/supabase/cli/internal/migration/list"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgxv5"
-)
-
-//go:embed cache.sql
-var CacheQuery string
-
-type Result struct {
- Name string
- Ratio float64
-}
-
-func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
- // Ref: https://github.com/heroku/heroku-pg-extras/blob/main/commands/cache_hit.js#L7
- conn, err := utils.ConnectByConfig(ctx, config, options...)
- if err != nil {
- return err
- }
- defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, CacheQuery)
- if err != nil {
- return errors.Errorf("failed to query rows: %w", err)
- }
- result, err := pgxv5.CollectRows[Result](rows)
- if err != nil {
- return err
- }
- // TODO: implement a markdown table marshaller
- table := "|Name|Ratio|OK?|Explanation|\n|-|-|-|-|\n"
- for _, r := range result {
- ok := "Yup!"
- if r.Ratio < 0.94 {
- ok = "Maybe not..."
- }
- var explanation string
- if r.Name == "index hit rate" {
- explanation = "This is the ratio of index hits to index scans. If this ratio is low, it means that the database is not using indexes effectively. Check the `index-usage` command for more info."
- } else if r.Name == "table hit rate" {
- explanation = "This is the ratio of table hits to table scans. If this ratio is low, it means that your queries are not finding the data effectively. Check your query performance and it might be worth increasing your compute."
- }
- table += fmt.Sprintf("|`%s`|`%.6f`|`%s`|`%s`|\n", r.Name, r.Ratio, ok, explanation)
- }
- return list.RenderTable(table)
-}
diff --git a/internal/inspect/cache/cache.sql b/internal/inspect/cache/cache.sql
deleted file mode 100644
index fc14b288c7..0000000000
--- a/internal/inspect/cache/cache.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-SELECT
- 'index hit rate' AS name,
- (sum(idx_blks_hit)) / nullif(sum(idx_blks_hit + idx_blks_read),0) AS ratio
-FROM pg_statio_user_indexes
-UNION ALL
-SELECT
- 'table hit rate' AS name,
- sum(heap_blks_hit) / nullif(sum(heap_blks_hit) + sum(heap_blks_read),0) AS ratio
-FROM pg_statio_user_tables
diff --git a/internal/inspect/cache/cache_test.go b/internal/inspect/cache/cache_test.go
deleted file mode 100644
index 28fa1cb73b..0000000000
--- a/internal/inspect/cache/cache_test.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package cache
-
-import (
- "context"
- "testing"
-
- "github.com/jackc/pgconn"
- "github.com/spf13/afero"
- "github.com/stretchr/testify/assert"
- "github.com/supabase/cli/pkg/pgtest"
-)
-
-var dbConfig = pgconn.Config{
- Host: "127.0.0.1",
- Port: 5432,
- User: "admin",
- Password: "password",
- Database: "postgres",
-}
-
-func TestCacheCommand(t *testing.T) {
- t.Run("inspects cache hit rate", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(CacheQuery).
- Reply("SELECT 1", Result{
- Name: "index hit rate",
- Ratio: 0.9,
- })
- // Run test
- err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
- // Check error
- assert.NoError(t, err)
- })
-
- t.Run("throws error on empty result", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(CacheQuery).
- Reply("SELECT 1", []interface{}{})
- // Run test
- err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
- // Check error
- assert.ErrorContains(t, err, "cannot find field Name in returned row")
- })
-}
diff --git a/internal/inspect/db_stats/db_stats.go b/internal/inspect/db_stats/db_stats.go
new file mode 100644
index 0000000000..e9ca43f7e0
--- /dev/null
+++ b/internal/inspect/db_stats/db_stats.go
@@ -0,0 +1,52 @@
+package db_stats
+
+import (
+ "context"
+ _ "embed"
+ "fmt"
+
+ "github.com/go-errors/errors"
+ "github.com/jackc/pgconn"
+ "github.com/jackc/pgx/v4"
+ "github.com/spf13/afero"
+ "github.com/supabase/cli/internal/db/reset"
+ "github.com/supabase/cli/internal/migration/list"
+ "github.com/supabase/cli/internal/utils"
+ "github.com/supabase/cli/pkg/pgxv5"
+)
+
+//go:embed db_stats.sql
+var DBStatsQuery string
+
+type Result struct {
+ Database_size string
+ Total_index_size string
+ Total_table_size string
+ Total_toast_size string
+ Time_since_stats_reset string
+ Index_hit_rate string
+ Table_hit_rate string
+ WAL_size string
+}
+
+func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
+ conn, err := utils.ConnectByConfig(ctx, config, options...)
+ if err != nil {
+ return err
+ }
+ defer conn.Close(context.Background())
+ rows, err := conn.Query(ctx, DBStatsQuery, reset.LikeEscapeSchema(utils.InternalSchemas), config.Database)
+ if err != nil {
+ return errors.Errorf("failed to query rows: %w", err)
+ }
+ result, err := pgxv5.CollectRows[Result](rows)
+ if err != nil {
+ return err
+ }
+
+ table := "|Name|Database Size|Total Index Size|Total Table Size|Total Toast Size|Time Since Stats Reset|Index Hit Rate|Table Hit Rate|WAL Size|\n|-|-|-|-|-|-|-|-|-|\n"
+ for _, r := range result {
+ table += fmt.Sprintf("|`%s`|`%s`|`%s`|`%s`|`%s`|`%s`|`%s`|`%s`|`%s`|\n", config.Database, r.Database_size, r.Total_index_size, r.Total_table_size, r.Total_toast_size, r.Time_since_stats_reset, r.Index_hit_rate, r.Table_hit_rate, r.WAL_size)
+ }
+ return list.RenderTable(table)
+}
diff --git a/internal/inspect/db_stats/db_stats.sql b/internal/inspect/db_stats/db_stats.sql
new file mode 100644
index 0000000000..d7fc02f980
--- /dev/null
+++ b/internal/inspect/db_stats/db_stats.sql
@@ -0,0 +1,27 @@
+WITH total_objects AS (
+ SELECT c.relkind, pg_size_pretty(SUM(pg_relation_size(c.oid))) AS size
+ FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace
+ WHERE c.relkind IN ('i', 'r', 't') AND NOT n.nspname LIKE ANY($1)
+ GROUP BY c.relkind
+), cache_hit AS (
+ SELECT
+ 'i' AS relkind,
+ ROUND(SUM(idx_blks_hit)::numeric / nullif(SUM(idx_blks_hit + idx_blks_read), 0), 2) AS ratio
+ FROM pg_statio_user_indexes
+ WHERE NOT schemaname LIKE ANY($1)
+ UNION
+ SELECT
+ 't' AS relkind,
+ ROUND(SUM(heap_blks_hit)::numeric / nullif(SUM(heap_blks_hit + heap_blks_read), 0), 2) AS ratio
+ FROM pg_statio_user_tables
+ WHERE NOT schemaname LIKE ANY($1)
+)
+SELECT
+ pg_size_pretty(pg_database_size($2)) AS database_size,
+ (SELECT size FROM total_objects WHERE relkind = 'i') AS total_index_size,
+ (SELECT size FROM total_objects WHERE relkind = 'r') AS total_table_size,
+ (SELECT size FROM total_objects WHERE relkind = 't') AS total_toast_size,
+ (SELECT (now() - stats_reset)::text FROM pg_stat_statements_info) AS time_since_stats_reset,
+ (SELECT COALESCE(ratio::text, 'N/A') FROM cache_hit WHERE relkind = 'i') AS index_hit_rate,
+ (SELECT COALESCE(ratio::text, 'N/A') FROM cache_hit WHERE relkind = 't') AS table_hit_rate,
+ (SELECT pg_size_pretty(SUM(size)) FROM pg_ls_waldir()) AS wal_size
diff --git a/internal/inspect/total_index_size/total_index_size_test.go b/internal/inspect/db_stats/db_stats_test.go
similarity index 63%
rename from internal/inspect/total_index_size/total_index_size_test.go
rename to internal/inspect/db_stats/db_stats_test.go
index 8eb0e0aa9d..46b22efc89 100644
--- a/internal/inspect/total_index_size/total_index_size_test.go
+++ b/internal/inspect/db_stats/db_stats_test.go
@@ -1,4 +1,4 @@
-package total_index_size
+package db_stats
import (
"context"
@@ -20,16 +20,23 @@ var dbConfig = pgconn.Config{
Database: "postgres",
}
-func TestTotalIndexSizeCommand(t *testing.T) {
+func TestDBStatsCommand(t *testing.T) {
t.Run("inspects size of all indexes", func(t *testing.T) {
// Setup in-memory fs
fsys := afero.NewMemMapFs()
// Setup mock postgres
conn := pgtest.NewConn()
defer conn.Close(t)
- conn.Query(TotalIndexSizeQuery, reset.LikeEscapeSchema(utils.InternalSchemas)).
+ conn.Query(DBStatsQuery, reset.LikeEscapeSchema(utils.InternalSchemas), dbConfig.Database).
Reply("SELECT 1", Result{
- Size: "8GB",
+ Database_size: "8GB",
+ Total_index_size: "8GB",
+ Total_table_size: "8GB",
+ Total_toast_size: "8GB",
+ Time_since_stats_reset: "8GB",
+ Index_hit_rate: "0.89",
+ Table_hit_rate: "0.98",
+ WAL_size: "8GB",
})
// Run test
err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
diff --git a/internal/inspect/index_sizes/index_sizes.sql b/internal/inspect/index_sizes/index_sizes.sql
deleted file mode 100644
index 25b6f96d55..0000000000
--- a/internal/inspect/index_sizes/index_sizes.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-SELECT
- n.nspname || '.' || c.relname AS name,
- pg_size_pretty(sum(c.relpages::bigint*8192)::bigint) AS size
-FROM pg_class c
-LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
-WHERE NOT n.nspname LIKE ANY($1)
-AND c.relkind = 'i'
-GROUP BY n.nspname, c.relname
-ORDER BY sum(c.relpages) DESC
diff --git a/internal/inspect/index_sizes/index_sizes.go b/internal/inspect/index_stats/index_stats.go
similarity index 64%
rename from internal/inspect/index_sizes/index_sizes.go
rename to internal/inspect/index_stats/index_stats.go
index 2cfc06e8d4..8f781c688b 100644
--- a/internal/inspect/index_sizes/index_sizes.go
+++ b/internal/inspect/index_stats/index_stats.go
@@ -1,4 +1,4 @@
-package index_sizes
+package index_stats
import (
"context"
@@ -15,12 +15,16 @@ import (
"github.com/supabase/cli/pkg/pgxv5"
)
-//go:embed index_sizes.sql
-var IndexSizesQuery string
+//go:embed index_stats.sql
+var IndexStatsQuery string
type Result struct {
- Name string
- Size string
+ Name string
+ Size string
+ Percent_used string
+ Index_scans int64
+ Seq_scans int64
+ Unused bool
}
func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
@@ -29,7 +33,7 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
return err
}
defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, IndexSizesQuery, reset.LikeEscapeSchema(utils.InternalSchemas))
+ rows, err := conn.Query(ctx, IndexStatsQuery, reset.LikeEscapeSchema(utils.InternalSchemas))
if err != nil {
return errors.Errorf("failed to query rows: %w", err)
}
@@ -38,9 +42,9 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
return err
}
- table := "|Name|size|\n|-|-|\n"
+ table := "|Name|Size|Percent used|Index scans|Seq scans|Unused|\n|-|-|-|-|-|-|\n"
for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%s`|\n", r.Name, r.Size)
+ table += fmt.Sprintf("|`%s`|`%s`|`%s`|`%d`|`%d`|`%t`|\n", r.Name, r.Size, r.Percent_used, r.Index_scans, r.Seq_scans, r.Unused)
}
return list.RenderTable(table)
}
diff --git a/internal/inspect/index_stats/index_stats.sql b/internal/inspect/index_stats/index_stats.sql
new file mode 100644
index 0000000000..c8d33e95dd
--- /dev/null
+++ b/internal/inspect/index_stats/index_stats.sql
@@ -0,0 +1,49 @@
+-- Combined index statistics: size, usage percent, seq scans, and mark unused
+WITH idx_sizes AS (
+ SELECT
+ i.indexrelid AS oid,
+ FORMAT('%I.%I', n.nspname, c.relname) AS name,
+ pg_relation_size(i.indexrelid) AS index_size_bytes
+ FROM pg_stat_user_indexes ui
+ JOIN pg_index i ON ui.indexrelid = i.indexrelid
+ JOIN pg_class c ON ui.indexrelid = c.oid
+ JOIN pg_namespace n ON c.relnamespace = n.oid
+ WHERE NOT n.nspname LIKE ANY($1)
+),
+idx_usage AS (
+ SELECT
+ indexrelid AS oid,
+ idx_scan::bigint AS idx_scans
+ FROM pg_stat_user_indexes ui
+ WHERE NOT schemaname LIKE ANY($1)
+),
+seq_usage AS (
+ SELECT
+ relid AS oid,
+ seq_scan::bigint AS seq_scans
+ FROM pg_stat_user_tables
+ WHERE NOT schemaname LIKE ANY($1)
+),
+usage_pct AS (
+ SELECT
+ u.oid,
+ CASE
+ WHEN u.idx_scans IS NULL OR u.idx_scans = 0 THEN 0
+ WHEN s.seq_scans IS NULL THEN 100
+ ELSE ROUND(100.0 * u.idx_scans / (s.seq_scans + u.idx_scans), 1)
+ END AS percent_used
+ FROM idx_usage u
+ LEFT JOIN seq_usage s ON s.oid = u.oid
+)
+SELECT
+ s.name,
+ pg_size_pretty(s.index_size_bytes) AS size,
+ COALESCE(up.percent_used, 0)::text || '%' AS percent_used,
+ COALESCE(u.idx_scans, 0) AS index_scans,
+ COALESCE(sq.seq_scans, 0) AS seq_scans,
+ CASE WHEN COALESCE(u.idx_scans, 0) = 0 THEN true ELSE false END AS unused
+FROM idx_sizes s
+LEFT JOIN idx_usage u ON u.oid = s.oid
+LEFT JOIN seq_usage sq ON sq.oid = s.oid
+LEFT JOIN usage_pct up ON up.oid = s.oid
+ORDER BY s.index_size_bytes DESC
diff --git a/internal/inspect/index_sizes/index_sizes_test.go b/internal/inspect/index_stats/index_stats_test.go
similarity index 63%
rename from internal/inspect/index_sizes/index_sizes_test.go
rename to internal/inspect/index_stats/index_stats_test.go
index 9071c5710e..abc3cd6543 100644
--- a/internal/inspect/index_sizes/index_sizes_test.go
+++ b/internal/inspect/index_stats/index_stats_test.go
@@ -1,4 +1,4 @@
-package index_sizes
+package index_stats
import (
"context"
@@ -20,21 +20,24 @@ var dbConfig = pgconn.Config{
Database: "postgres",
}
-func TestIndexSizes(t *testing.T) {
- t.Run("inspects index sizes", func(t *testing.T) {
- // Setup in-memory fs
+func TestIndexStatsCommand(t *testing.T) {
+ t.Run("inspects index stats", func(t *testing.T) {
fsys := afero.NewMemMapFs()
- // Setup mock postgres
conn := pgtest.NewConn()
defer conn.Close(t)
- conn.Query(IndexSizesQuery, reset.LikeEscapeSchema(utils.InternalSchemas)).
+
+ // Mock index stats
+ conn.Query(IndexStatsQuery, reset.LikeEscapeSchema(utils.InternalSchemas)).
Reply("SELECT 1", Result{
- Name: "test_table_idx",
- Size: "100GB",
+ Name: "public.test_idx",
+ Size: "1GB",
+ Percent_used: "50%",
+ Index_scans: 5,
+ Seq_scans: 5,
+ Unused: false,
})
- // Run test
+
err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
- // Check error
assert.NoError(t, err)
})
}
diff --git a/internal/inspect/index_usage/index_usage.sql b/internal/inspect/index_usage/index_usage.sql
deleted file mode 100644
index fa83e97dbf..0000000000
--- a/internal/inspect/index_usage/index_usage.sql
+++ /dev/null
@@ -1,17 +0,0 @@
-SELECT
- schemaname || '.' || relname AS name,
- CASE
- WHEN idx_scan IS NULL THEN 'Insufficient data'
- WHEN idx_scan = 0 THEN 'Insufficient data'
- ELSE ROUND(100.0 * idx_scan / (seq_scan + idx_scan), 1) || '%'
- END percent_of_times_index_used,
- n_live_tup rows_in_table
-FROM pg_stat_user_tables
-WHERE NOT schemaname LIKE ANY($1)
-ORDER BY
- CASE
- WHEN idx_scan is null then 1
- WHEN idx_scan = 0 then 1
- ELSE 0
- END,
- n_live_tup DESC
diff --git a/internal/inspect/locks/locks.go b/internal/inspect/locks/locks.go
index 0b2db71c63..be5c34d3a8 100644
--- a/internal/inspect/locks/locks.go
+++ b/internal/inspect/locks/locks.go
@@ -23,7 +23,7 @@ type Result struct {
Relname string
Transactionid string
Granted bool
- Query string
+ Stmt string
Age string
}
@@ -42,16 +42,16 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
return err
}
- table := "|pid|relname|transaction id|granted|query|age|\n|-|-|-|-|-|-|\n"
+ table := "|pid|relname|transaction id|granted|stmt|age|\n|-|-|-|-|-|-|\n"
for _, r := range result {
// remove whitespace from query
re := regexp.MustCompile(`\s+|\r+|\n+|\t+|\v`)
- query := re.ReplaceAllString(r.Query, " ")
+ stmt := re.ReplaceAllString(r.Stmt, " ")
// escape pipes in query
re = regexp.MustCompile(`\|`)
- query = re.ReplaceAllString(query, `\|`)
- table += fmt.Sprintf("|`%d`|`%s`|`%s`|`%t`|%s|`%s`|\n", r.Pid, r.Relname, r.Transactionid, r.Granted, query, r.Age)
+ stmt = re.ReplaceAllString(stmt, `\|`)
+ table += fmt.Sprintf("|`%d`|`%s`|`%s`|`%t`|%s|`%s`|\n", r.Pid, r.Relname, r.Transactionid, r.Granted, stmt, r.Age)
}
return list.RenderTable(table)
}
diff --git a/internal/inspect/locks/locks.sql b/internal/inspect/locks/locks.sql
index e140f4786d..9369057b5d 100644
--- a/internal/inspect/locks/locks.sql
+++ b/internal/inspect/locks/locks.sql
@@ -1,9 +1,9 @@
SELECT
pg_stat_activity.pid,
COALESCE(pg_class.relname, 'null') AS relname,
- COALESCE(pg_locks.transactionid, 'null') AS transactionid,
+ COALESCE(pg_locks.transactionid::text, 'null') AS transactionid,
pg_locks.granted,
- pg_stat_activity.query,
+ pg_stat_activity.query AS stmt,
age(now(), pg_stat_activity.query_start)::text AS age
FROM pg_stat_activity, pg_locks LEFT OUTER JOIN pg_class ON (pg_locks.relation = pg_class.oid)
WHERE pg_stat_activity.query <> ''
diff --git a/internal/inspect/locks/locks_test.go b/internal/inspect/locks/locks_test.go
index e4c55c6bdb..0964ad1222 100644
--- a/internal/inspect/locks/locks_test.go
+++ b/internal/inspect/locks/locks_test.go
@@ -31,7 +31,7 @@ func TestLocksCommand(t *testing.T) {
Relname: "rel",
Transactionid: "9301",
Granted: true,
- Query: "select 1",
+ Stmt: "select 1",
Age: "300ms",
})
// Run test
diff --git a/internal/inspect/report.go b/internal/inspect/report.go
index de721d9544..e69e792b14 100644
--- a/internal/inspect/report.go
+++ b/internal/inspect/report.go
@@ -2,6 +2,7 @@ package inspect
import (
"context"
+ "database/sql"
"embed"
"fmt"
"io/fs"
@@ -10,20 +11,26 @@ import (
"strings"
"time"
+ "github.com/BurntSushi/toml"
"github.com/go-errors/errors"
"github.com/jackc/pgconn"
"github.com/jackc/pgx/v4"
+ _ "github.com/mithrandie/csvq-driver"
"github.com/spf13/afero"
"github.com/supabase/cli/internal/db/reset"
+ "github.com/supabase/cli/internal/migration/list"
"github.com/supabase/cli/internal/utils"
)
//go:embed **/*.sql
var queries embed.FS
-func Report(ctx context.Context, out string, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
- date := time.Now().Format("2006-01-02")
- if err := utils.MkdirIfNotExistFS(fsys, out); err != nil {
+func Report(ctx context.Context, outDir string, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
+ outDir = filepath.Join(outDir, time.Now().Format("2006-01-02"))
+ if !filepath.IsAbs(outDir) {
+ outDir = filepath.Join(utils.CurrentDirAbs, outDir)
+ }
+ if err := utils.MkdirIfNotExistFS(fsys, outDir); err != nil {
return err
}
conn, err := utils.ConnectByConfig(ctx, config, options...)
@@ -44,19 +51,18 @@ func Report(ctx context.Context, out string, config pgconn.Config, fsys afero.Fs
return errors.Errorf("failed to read query: %w", err)
}
name := strings.Split(d.Name(), ".")[0]
- outPath := filepath.Join(out, fmt.Sprintf("%s_%s.csv", name, date))
- return copyToCSV(ctx, string(query), outPath, conn.PgConn(), fsys)
+ outPath := filepath.Join(outDir, fmt.Sprintf("%s.csv", name))
+ return copyToCSV(ctx, string(query), config.Database, outPath, conn.PgConn(), fsys)
}); err != nil {
return err
}
- if !filepath.IsAbs(out) {
- out, _ = filepath.Abs(out)
- }
- fmt.Fprintln(os.Stderr, "Reports saved to "+utils.Bold(out))
- return nil
+ fmt.Fprintln(os.Stderr, "Reports saved to "+utils.Bold(outDir))
+ return printSummary(ctx, outDir)
}
-func copyToCSV(ctx context.Context, query, outPath string, conn *pgconn.PgConn, fsys afero.Fs) error {
+var ignoreSchemas = fmt.Sprintf("'{%s}'::text[]", strings.Join(reset.LikeEscapeSchema(utils.InternalSchemas), ","))
+
+func copyToCSV(ctx context.Context, query, database, outPath string, conn *pgconn.PgConn, fsys afero.Fs) error {
// Create output file
f, err := fsys.OpenFile(outPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
if err != nil {
@@ -64,16 +70,56 @@ func copyToCSV(ctx context.Context, query, outPath string, conn *pgconn.PgConn,
}
defer f.Close()
// Execute query
- csvQuery := wrapQuery(query)
+ csvQuery := wrapQuery(query, ignoreSchemas, fmt.Sprintf("'%s'", database))
if _, err = conn.CopyTo(ctx, f, csvQuery); err != nil {
return errors.Errorf("failed to copy output: %w", err)
}
return nil
}
-var ignoreSchemas = fmt.Sprintf("'{%s}'::text[]", strings.Join(reset.LikeEscapeSchema(utils.InternalSchemas), ","))
+func wrapQuery(query string, args ...string) string {
+ for i, v := range args {
+ query = strings.ReplaceAll(query, fmt.Sprintf("$%d", i+1), v)
+ }
+ return fmt.Sprintf("COPY (%s) TO STDOUT WITH CSV HEADER", query)
+}
+
+//go:embed templates/rules.toml
+var rulesConfig embed.FS
-func wrapQuery(query string) string {
- fullQuery := strings.ReplaceAll(query, "$1", ignoreSchemas)
- return fmt.Sprintf("COPY (%s) TO STDOUT WITH CSV HEADER", fullQuery)
+func printSummary(ctx context.Context, outDir string) error {
+ if len(utils.Config.Experimental.Inspect.Rules) == 0 {
+ fmt.Fprintln(os.Stderr, "Loading default rules...")
+ if _, err := toml.DecodeFS(rulesConfig, "templates/rules.toml", &utils.Config.Experimental.Inspect); err != nil {
+ return errors.Errorf("failed load default rules: %w", err)
+ }
+ }
+ // Open csvq database rooted at the output directory
+ db, err := sql.Open("csvq", outDir)
+ if err != nil {
+ return err
+ }
+ defer db.Close()
+ // Build report summary table
+ table := "RULE|STATUS|MATCHES\n|-|-|-|\n"
+ for _, r := range utils.Config.Experimental.Inspect.Rules {
+ row := db.QueryRowContext(ctx, r.Query)
+ // find matching rule
+ var status string
+ var match sql.NullString
+ if err := row.Scan(&match); errors.Is(err, sql.ErrNoRows) {
+ status = r.Pass
+ } else if err != nil {
+ status = err.Error()
+ } else if !match.Valid || match.String == "" {
+ status = r.Pass
+ } else {
+ status = r.Fail
+ }
+ if !match.Valid {
+ match.String = "-"
+ }
+ table += fmt.Sprintf("|`%s`|`%s`|`%s`|\n", r.Name, status, match.String)
+ }
+ return list.RenderTable(table)
}
diff --git a/internal/inspect/report_test.go b/internal/inspect/report_test.go
index 6b4220451b..dd0b61d098 100644
--- a/internal/inspect/report_test.go
+++ b/internal/inspect/report_test.go
@@ -3,31 +3,13 @@ package inspect
import (
"context"
"fmt"
+ "io/fs"
"testing"
"github.com/jackc/pgconn"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
- "github.com/supabase/cli/internal/inspect/bloat"
- "github.com/supabase/cli/internal/inspect/blocking"
- "github.com/supabase/cli/internal/inspect/cache"
- "github.com/supabase/cli/internal/inspect/calls"
- "github.com/supabase/cli/internal/inspect/index_sizes"
- "github.com/supabase/cli/internal/inspect/index_usage"
- "github.com/supabase/cli/internal/inspect/locks"
- "github.com/supabase/cli/internal/inspect/long_running_queries"
- "github.com/supabase/cli/internal/inspect/outliers"
- "github.com/supabase/cli/internal/inspect/replication_slots"
- "github.com/supabase/cli/internal/inspect/role_configs"
- "github.com/supabase/cli/internal/inspect/role_connections"
- "github.com/supabase/cli/internal/inspect/seq_scans"
- "github.com/supabase/cli/internal/inspect/table_index_sizes"
- "github.com/supabase/cli/internal/inspect/table_record_counts"
- "github.com/supabase/cli/internal/inspect/table_sizes"
- "github.com/supabase/cli/internal/inspect/total_index_size"
- "github.com/supabase/cli/internal/inspect/total_table_sizes"
- "github.com/supabase/cli/internal/inspect/unused_indexes"
- "github.com/supabase/cli/internal/inspect/vacuum_stats"
+ "github.com/stretchr/testify/require"
"github.com/supabase/cli/pkg/pgtest"
)
@@ -41,58 +23,25 @@ var dbConfig = pgconn.Config{
func TestReportCommand(t *testing.T) {
t.Run("runs all queries", func(t *testing.T) {
- // Setup in-memory fs
fsys := afero.NewMemMapFs()
// Setup mock postgres
conn := pgtest.NewConn()
defer conn.Close(t)
- conn.Query(wrapQuery(bloat.BloatQuery)).
- Reply("COPY 0").
- Query(wrapQuery(blocking.BlockingQuery)).
- Reply("COPY 0").
- Query(wrapQuery(cache.CacheQuery)).
- Reply("COPY 0").
- Query(wrapQuery(calls.CallsQuery)).
- Reply("COPY 0").
- Query(wrapQuery(index_sizes.IndexSizesQuery)).
- Reply("COPY 0").
- Query(wrapQuery(index_usage.IndexUsageQuery)).
- Reply("COPY 0").
- Query(wrapQuery(locks.LocksQuery)).
- Reply("COPY 0").
- Query(wrapQuery(long_running_queries.LongRunningQueriesQuery)).
- Reply("COPY 0").
- Query(wrapQuery(outliers.OutliersQuery)).
- Reply("COPY 0").
- Query(wrapQuery(replication_slots.ReplicationSlotsQuery)).
- Reply("COPY 0").
- Query(wrapQuery(role_configs.RoleConfigsQuery)).
- Reply("COPY 0").
- Query(wrapQuery(role_connections.RoleConnectionsQuery)).
- Reply("COPY 0").
- Query(wrapQuery(seq_scans.SeqScansQuery)).
- Reply("COPY 0").
- Query(wrapQuery(table_index_sizes.TableIndexSizesQuery)).
- Reply("COPY 0").
- Query(wrapQuery(table_record_counts.TableRecordCountsQuery)).
- Reply("COPY 0").
- Query(wrapQuery(table_sizes.TableSizesQuery)).
- Reply("COPY 0").
- Query(wrapQuery(total_index_size.TotalIndexSizeQuery)).
- Reply("COPY 0").
- Query(wrapQuery(total_table_sizes.TotalTableSizesQuery)).
- Reply("COPY 0").
- Query(wrapQuery(unused_indexes.UnusedIndexesQuery)).
- Reply("COPY 0").
- Query(wrapQuery(vacuum_stats.VacuumStatsQuery)).
- Reply("COPY 0")
+ // Iterate over all embedded SQL files
+ sqlPaths, err := fs.Glob(queries, "*/*.sql")
+ require.NoError(t, err)
+ for _, fp := range sqlPaths {
+ data, err := queries.ReadFile(fp)
+ require.NoError(t, err)
+ sql := wrapQuery(string(data), ignoreSchemas, fmt.Sprintf("'%s'", dbConfig.Database))
+ conn.Query(sql).Reply("COPY 0")
+ }
// Run test
- err := Report(context.Background(), ".", dbConfig, fsys, conn.Intercept)
- // Check error
+ err = Report(context.Background(), ".", dbConfig, fsys, conn.Intercept)
assert.NoError(t, err)
- matches, err := afero.Glob(fsys, "*.csv")
+ matches, err := afero.Glob(fsys, "*/*.csv")
assert.NoError(t, err)
- assert.Len(t, matches, 20)
+ assert.Len(t, matches, len(sqlPaths))
})
}
@@ -107,7 +56,7 @@ func TestWrapQuery(t *testing.T) {
t.Run("replaces placeholder value", func(t *testing.T) {
assert.Equal(t,
fmt.Sprintf("COPY (SELECT 'a' LIKE ANY(%s)) TO STDOUT WITH CSV HEADER", ignoreSchemas),
- wrapQuery("SELECT 'a' LIKE ANY($1)"),
+ wrapQuery("SELECT 'a' LIKE ANY($1)", ignoreSchemas),
)
})
}
diff --git a/internal/inspect/role_configs/role_configs.sql b/internal/inspect/role_configs/role_configs.sql
deleted file mode 100644
index fd7f964d0c..0000000000
--- a/internal/inspect/role_configs/role_configs.sql
+++ /dev/null
@@ -1,5 +0,0 @@
-select
- rolname as role_name,
- array_to_string(rolconfig, ',', '*') as custom_config
-from
- pg_roles where rolconfig is not null
diff --git a/internal/inspect/role_configs/role_configs_test.go b/internal/inspect/role_configs/role_configs_test.go
deleted file mode 100644
index 554a12526f..0000000000
--- a/internal/inspect/role_configs/role_configs_test.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package role_configs
-
-import (
- "context"
- "testing"
-
- "github.com/jackc/pgconn"
- "github.com/spf13/afero"
- "github.com/stretchr/testify/assert"
- "github.com/supabase/cli/pkg/pgtest"
-)
-
-var dbConfig = pgconn.Config{
- Host: "127.0.0.1",
- Port: 5432,
- User: "admin",
- Password: "password",
- Database: "postgres",
-}
-
-func TestRoleCommand(t *testing.T) {
- t.Run("inspects role connections", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(RoleConfigsQuery).
- Reply("SELECT 1", Result{
- Role_name: "postgres",
- Custom_config: "statement_timeout=3s",
- })
- // Run test
- err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
- // Check error
- assert.NoError(t, err)
- })
-}
diff --git a/internal/inspect/role_connections/role_connections.go b/internal/inspect/role_connections/role_connections.go
deleted file mode 100644
index 5b0a565391..0000000000
--- a/internal/inspect/role_connections/role_connections.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package role_connections
-
-import (
- "context"
- _ "embed"
- "fmt"
-
- "github.com/go-errors/errors"
- "github.com/jackc/pgconn"
- "github.com/jackc/pgx/v4"
- "github.com/spf13/afero"
- "github.com/supabase/cli/internal/migration/list"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgxv5"
-)
-
-//go:embed role_connections.sql
-var RoleConnectionsQuery string
-
-type Result struct {
- Rolname string
- Active_connections int
- Connection_limit int
-}
-
-func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
- conn, err := utils.ConnectByConfig(ctx, config, options...)
- if err != nil {
- return err
- }
- defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, RoleConnectionsQuery)
- if err != nil {
- return errors.Errorf("failed to query rows: %w", err)
- }
- result, err := pgxv5.CollectRows[Result](rows)
- if err != nil {
- return err
- }
-
- table := "|Role Name|Active connction|\n|-|-|\n"
- sum := 0
- for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%d`|\n", r.Rolname, r.Active_connections)
- sum += r.Active_connections
- }
-
- if err := list.RenderTable(table); err != nil {
- return err
- }
-
- if len(result) > 0 {
- fmt.Printf("\nActive connections %d/%d\n\n", sum, result[0].Connection_limit)
- }
-
- if matches := utils.ProjectHostPattern.FindStringSubmatch(config.Host); len(matches) == 4 {
- fmt.Println("Go to the dashboard for more here:")
- fmt.Printf("https://app.supabase.com/project/%s/database/roles\n", matches[2])
- }
-
- return nil
-}
diff --git a/internal/inspect/role_configs/role_configs.go b/internal/inspect/role_stats/role_stats.go
similarity index 64%
rename from internal/inspect/role_configs/role_configs.go
rename to internal/inspect/role_stats/role_stats.go
index f4fb793829..ee5e724f20 100644
--- a/internal/inspect/role_configs/role_configs.go
+++ b/internal/inspect/role_stats/role_stats.go
@@ -1,4 +1,4 @@
-package role_configs
+package role_stats
import (
"context"
@@ -14,12 +14,14 @@ import (
"github.com/supabase/cli/pkg/pgxv5"
)
-//go:embed role_configs.sql
-var RoleConfigsQuery string
+//go:embed role_stats.sql
+var RoleStatsQuery string
type Result struct {
- Role_name string
- Custom_config string
+ Role_name string
+ Active_connections int
+ Connection_limit int
+ Custom_config string
}
func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
@@ -28,7 +30,7 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
return err
}
defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, RoleConfigsQuery)
+ rows, err := conn.Query(ctx, RoleStatsQuery)
if err != nil {
return errors.Errorf("failed to query rows: %w", err)
}
@@ -37,9 +39,9 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
return err
}
- table := "|Role name|Custom config|\n|-|-|\n"
+ table := "|Role name|Active connections|Connection limit|Custom config|\n|-|-|-|-|\n"
for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%s`|\n", r.Role_name, r.Custom_config)
+ table += fmt.Sprintf("|`%s`|`%d`|`%d`|`%s`|\n", r.Role_name, r.Active_connections, r.Connection_limit, r.Custom_config)
}
return list.RenderTable(table)
diff --git a/internal/inspect/role_connections/role_connections.sql b/internal/inspect/role_stats/role_stats.sql
similarity index 64%
rename from internal/inspect/role_connections/role_connections.sql
rename to internal/inspect/role_stats/role_stats.sql
index 40b1036692..92f32c9e5b 100644
--- a/internal/inspect/role_connections/role_connections.sql
+++ b/internal/inspect/role_stats/role_stats.sql
@@ -1,5 +1,5 @@
SELECT
- rolname,
+ rolname as role_name,
(
SELECT
count(*)
@@ -11,6 +11,8 @@ SELECT
CASE WHEN rolconnlimit = -1
THEN current_setting('max_connections')::int8
ELSE rolconnlimit
- END AS connection_limit
-FROM pg_roles
-ORDER BY 2 DESC
+ END AS connection_limit,
+ array_to_string(rolconfig, ',', '*') as custom_config
+FROM
+ pg_roles
+ORDER BY 1 DESC
diff --git a/internal/inspect/role_connections/role_connections_test.go b/internal/inspect/role_stats/role_stats_test.go
similarity index 84%
rename from internal/inspect/role_connections/role_connections_test.go
rename to internal/inspect/role_stats/role_stats_test.go
index 32ecab7687..0539c594f3 100644
--- a/internal/inspect/role_connections/role_connections_test.go
+++ b/internal/inspect/role_stats/role_stats_test.go
@@ -1,4 +1,4 @@
-package role_connections
+package role_stats
import (
"context"
@@ -25,9 +25,10 @@ func TestRoleCommand(t *testing.T) {
// Setup mock postgres
conn := pgtest.NewConn()
defer conn.Close(t)
- conn.Query(RoleConnectionsQuery).
+ conn.Query(RoleStatsQuery).
Reply("SELECT 1", Result{
- Rolname: "postgres",
+ Role_name: "postgres",
+ Custom_config: "statement_timeout=3s",
Active_connections: 1,
Connection_limit: 10,
})
diff --git a/internal/inspect/seq_scans/seq_scans.go b/internal/inspect/seq_scans/seq_scans.go
deleted file mode 100644
index 6b52538ee0..0000000000
--- a/internal/inspect/seq_scans/seq_scans.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package seq_scans
-
-import (
- "context"
- _ "embed"
- "fmt"
-
- "github.com/go-errors/errors"
- "github.com/jackc/pgconn"
- "github.com/jackc/pgx/v4"
- "github.com/spf13/afero"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/migration/list"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgxv5"
-)
-
-//go:embed seq_scans.sql
-var SeqScansQuery string
-
-type Result struct {
- Name string
- Count int64
-}
-
-func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
- conn, err := utils.ConnectByConfig(ctx, config, options...)
- if err != nil {
- return err
- }
- defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, SeqScansQuery, reset.LikeEscapeSchema(utils.InternalSchemas))
- if err != nil {
- return errors.Errorf("failed to query rows: %w", err)
- }
- result, err := pgxv5.CollectRows[Result](rows)
- if err != nil {
- return err
- }
-
- table := "|Name|Count|\n|-|-|\n"
- for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%d`|\n", r.Name, r.Count)
- }
- return list.RenderTable(table)
-}
diff --git a/internal/inspect/seq_scans/seq_scans.sql b/internal/inspect/seq_scans/seq_scans.sql
deleted file mode 100644
index c8edfc8e3f..0000000000
--- a/internal/inspect/seq_scans/seq_scans.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-SELECT
- schemaname || '.' || relname AS name,
- seq_scan as count
-FROM pg_stat_user_tables
-WHERE NOT schemaname LIKE ANY($1)
-ORDER BY seq_scan DESC
diff --git a/internal/inspect/seq_scans/seq_scans_test.go b/internal/inspect/seq_scans/seq_scans_test.go
deleted file mode 100644
index 3db6caee58..0000000000
--- a/internal/inspect/seq_scans/seq_scans_test.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package seq_scans
-
-import (
- "context"
- "testing"
-
- "github.com/jackc/pgconn"
- "github.com/spf13/afero"
- "github.com/stretchr/testify/assert"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgtest"
-)
-
-var dbConfig = pgconn.Config{
- Host: "127.0.0.1",
- Port: 5432,
- User: "admin",
- Password: "password",
- Database: "postgres",
-}
-
-func TestSequentialScansCommand(t *testing.T) {
- t.Run("inspects sequential scans", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(SeqScansQuery, reset.LikeEscapeSchema(utils.InternalSchemas)).
- Reply("SELECT 1", Result{
- Name: "test_table",
- Count: 99999,
- })
- // Run test
- err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
- // Check error
- assert.NoError(t, err)
- })
-}
diff --git a/internal/inspect/table_index_sizes/table_index_sizes.go b/internal/inspect/table_index_sizes/table_index_sizes.go
deleted file mode 100644
index e61f23361b..0000000000
--- a/internal/inspect/table_index_sizes/table_index_sizes.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package table_index_sizes
-
-import (
- "context"
- _ "embed"
- "fmt"
-
- "github.com/go-errors/errors"
- "github.com/jackc/pgconn"
- "github.com/jackc/pgx/v4"
- "github.com/spf13/afero"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/migration/list"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgxv5"
-)
-
-//go:embed table_index_sizes.sql
-var TableIndexSizesQuery string
-
-type Result struct {
- Table string
- Index_size string
-}
-
-func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
- conn, err := utils.ConnectByConfig(ctx, config, options...)
- if err != nil {
- return err
- }
- defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, TableIndexSizesQuery, reset.LikeEscapeSchema(utils.InternalSchemas))
- if err != nil {
- return errors.Errorf("failed to query rows: %w", err)
- }
- result, err := pgxv5.CollectRows[Result](rows)
- if err != nil {
- return err
- }
-
- table := "|Table|Index size|\n|-|-|\n"
- for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%s`|\n", r.Table, r.Index_size)
- }
- return list.RenderTable(table)
-}
diff --git a/internal/inspect/table_index_sizes/table_index_sizes.sql b/internal/inspect/table_index_sizes/table_index_sizes.sql
deleted file mode 100644
index 0c9bc6bfc5..0000000000
--- a/internal/inspect/table_index_sizes/table_index_sizes.sql
+++ /dev/null
@@ -1,8 +0,0 @@
-SELECT
- n.nspname || '.' || c.relname AS table,
- pg_size_pretty(pg_indexes_size(c.oid)) AS index_size
-FROM pg_class c
-LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
-WHERE NOT n.nspname LIKE ANY($1)
-AND c.relkind = 'r'
-ORDER BY pg_indexes_size(c.oid) DESC
diff --git a/internal/inspect/table_index_sizes/table_index_sizes_test.go b/internal/inspect/table_index_sizes/table_index_sizes_test.go
deleted file mode 100644
index 20ad80fc9b..0000000000
--- a/internal/inspect/table_index_sizes/table_index_sizes_test.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package table_index_sizes
-
-import (
- "context"
- "testing"
-
- "github.com/jackc/pgconn"
- "github.com/spf13/afero"
- "github.com/stretchr/testify/assert"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgtest"
-)
-
-var dbConfig = pgconn.Config{
- Host: "127.0.0.1",
- Port: 5432,
- User: "admin",
- Password: "password",
- Database: "postgres",
-}
-
-func TestTableIndexSizesCommand(t *testing.T) {
- t.Run("inspects table index sizes", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(TableIndexSizesQuery, reset.LikeEscapeSchema(utils.InternalSchemas)).
- Reply("SELECT 1", Result{
- Table: "public.test_table",
- Index_size: "3GB",
- })
- // Run test
- err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
- // Check error
- assert.NoError(t, err)
- })
-}
diff --git a/internal/inspect/table_record_counts/table_record_counts.go b/internal/inspect/table_record_counts/table_record_counts.go
deleted file mode 100644
index e0b394374a..0000000000
--- a/internal/inspect/table_record_counts/table_record_counts.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package table_record_counts
-
-import (
- "context"
- _ "embed"
- "fmt"
-
- "github.com/go-errors/errors"
- "github.com/jackc/pgconn"
- "github.com/jackc/pgx/v4"
- "github.com/spf13/afero"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/migration/list"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgxv5"
-)
-
-//go:embed table_record_counts.sql
-var TableRecordCountsQuery string
-
-type Result struct {
- Schema string
- Name string
- Estimated_count int64
-}
-
-func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
- conn, err := utils.ConnectByConfig(ctx, config, options...)
- if err != nil {
- return err
- }
- defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, TableRecordCountsQuery, reset.LikeEscapeSchema(utils.PgSchemas))
- if err != nil {
- return errors.Errorf("failed to query rows: %w", err)
- }
- result, err := pgxv5.CollectRows[Result](rows)
- if err != nil {
- return err
- }
-
- table := "Schema|Table|Estimated count|\n|-|-|-|\n"
- for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%s`|`%d`|\n", r.Schema, r.Name, r.Estimated_count)
- }
- return list.RenderTable(table)
-}
diff --git a/internal/inspect/table_record_counts/table_record_counts.sql b/internal/inspect/table_record_counts/table_record_counts.sql
deleted file mode 100644
index 1b24f04a41..0000000000
--- a/internal/inspect/table_record_counts/table_record_counts.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-SELECT
- schemaname AS schema,
- relname AS name,
- n_live_tup AS estimated_count
-FROM pg_stat_user_tables
-WHERE NOT schemaname LIKE ANY($1)
-ORDER BY n_live_tup DESC
diff --git a/internal/inspect/table_record_counts/table_record_counts_test.go b/internal/inspect/table_record_counts/table_record_counts_test.go
deleted file mode 100644
index a03714d97a..0000000000
--- a/internal/inspect/table_record_counts/table_record_counts_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package table_record_counts
-
-import (
- "context"
- "testing"
-
- "github.com/jackc/pgconn"
- "github.com/spf13/afero"
- "github.com/stretchr/testify/assert"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgtest"
-)
-
-var dbConfig = pgconn.Config{
- Host: "127.0.0.1",
- Port: 5432,
- User: "admin",
- Password: "password",
- Database: "postgres",
-}
-
-func TestTableRecordCountsCommand(t *testing.T) {
- t.Run("inspects table record counts", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(TableRecordCountsQuery, reset.LikeEscapeSchema(utils.PgSchemas)).
- Reply("SELECT 1", Result{
- Schema: "public",
- Name: "test_table",
- Estimated_count: 100,
- })
- // Run test
- err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
- // Check error
- assert.NoError(t, err)
- })
-}
diff --git a/internal/inspect/table_sizes/table_sizes.go b/internal/inspect/table_sizes/table_sizes.go
deleted file mode 100644
index 7741f01190..0000000000
--- a/internal/inspect/table_sizes/table_sizes.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package table_sizes
-
-import (
- "context"
- _ "embed"
- "fmt"
-
- "github.com/go-errors/errors"
- "github.com/jackc/pgconn"
- "github.com/jackc/pgx/v4"
- "github.com/spf13/afero"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/migration/list"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgxv5"
-)
-
-//go:embed table_sizes.sql
-var TableSizesQuery string
-
-type Result struct {
- Schema string
- Name string
- Size string
-}
-
-func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
- conn, err := utils.ConnectByConfig(ctx, config, options...)
- if err != nil {
- return err
- }
- defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, TableSizesQuery, reset.LikeEscapeSchema(utils.PgSchemas))
- if err != nil {
- return errors.Errorf("failed to query rows: %w", err)
- }
- result, err := pgxv5.CollectRows[Result](rows)
- if err != nil {
- return err
- }
-
- table := "Schema|Table|size|\n|-|-|-|\n"
- for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%s`|`%s`|\n", r.Schema, r.Name, r.Size)
- }
- return list.RenderTable(table)
-}
diff --git a/internal/inspect/table_sizes/table_sizes.sql b/internal/inspect/table_sizes/table_sizes.sql
deleted file mode 100644
index 2c8fb30640..0000000000
--- a/internal/inspect/table_sizes/table_sizes.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-SELECT
- n.nspname AS schema,
- c.relname AS name,
- pg_size_pretty(pg_table_size(c.oid)) AS size
-FROM pg_class c
-LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
-WHERE NOT n.nspname LIKE ANY($1)
-AND c.relkind = 'r'
-ORDER BY pg_table_size(c.oid) DESC
diff --git a/internal/inspect/table_sizes/table_sizes_test.go b/internal/inspect/table_sizes/table_sizes_test.go
deleted file mode 100644
index 5cc6426adc..0000000000
--- a/internal/inspect/table_sizes/table_sizes_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package table_sizes
-
-import (
- "context"
- "testing"
-
- "github.com/jackc/pgconn"
- "github.com/spf13/afero"
- "github.com/stretchr/testify/assert"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgtest"
-)
-
-var dbConfig = pgconn.Config{
- Host: "127.0.0.1",
- Port: 5432,
- User: "admin",
- Password: "password",
- Database: "postgres",
-}
-
-func TestTableSizesCommand(t *testing.T) {
- t.Run("inspects table sizes", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(TableSizesQuery, reset.LikeEscapeSchema(utils.PgSchemas)).
- Reply("SELECT 1", Result{
- Schema: "schema",
- Name: "test_table",
- Size: "3GB",
- })
- // Run test
- err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
- // Check error
- assert.NoError(t, err)
- })
-}
diff --git a/internal/inspect/index_usage/index_usage.go b/internal/inspect/table_stats/table_stats.go
similarity index 60%
rename from internal/inspect/index_usage/index_usage.go
rename to internal/inspect/table_stats/table_stats.go
index cd8875f796..afc3b193be 100644
--- a/internal/inspect/index_usage/index_usage.go
+++ b/internal/inspect/table_stats/table_stats.go
@@ -1,4 +1,4 @@
-package index_usage
+package table_stats
import (
"context"
@@ -15,13 +15,16 @@ import (
"github.com/supabase/cli/pkg/pgxv5"
)
-//go:embed index_usage.sql
-var IndexUsageQuery string
+//go:embed table_stats.sql
+var TableStatsQuery string
type Result struct {
- Name string
- Percent_of_times_index_used string
- Rows_in_table int64
+ Name string
+ Table_size string
+ Index_size string
+ Total_size string
+ Estimated_row_count int64
+ Seq_scans int64
}
func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
@@ -30,7 +33,7 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
return err
}
defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, IndexUsageQuery, reset.LikeEscapeSchema(utils.InternalSchemas))
+ rows, err := conn.Query(ctx, TableStatsQuery, reset.LikeEscapeSchema(utils.InternalSchemas))
if err != nil {
return errors.Errorf("failed to query rows: %w", err)
}
@@ -38,10 +41,10 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
if err != nil {
return err
}
- // TODO: implement a markdown table marshaller
- table := "|Table name|Percentage of times index used|Rows in table|\n|-|-|-|\n"
+
+ table := "|Name|Table size|Index size|Total size|Estimated row count|Seq scans|\n|-|-|-|-|-|-|\n"
for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%s`|`%d`|\n", r.Name, r.Percent_of_times_index_used, r.Rows_in_table)
+ table += fmt.Sprintf("|`%s`|`%s`|`%s`|`%s`|`%d`|`%d`|\n", r.Name, r.Table_size, r.Index_size, r.Total_size, r.Estimated_row_count, r.Seq_scans)
}
return list.RenderTable(table)
}
diff --git a/internal/inspect/table_stats/table_stats.sql b/internal/inspect/table_stats/table_stats.sql
new file mode 100644
index 0000000000..bcc22b29d5
--- /dev/null
+++ b/internal/inspect/table_stats/table_stats.sql
@@ -0,0 +1,27 @@
+SELECT
+ ts.name,
+ pg_size_pretty(ts.table_size_bytes) AS table_size,
+ pg_size_pretty(ts.index_size_bytes) AS index_size,
+ pg_size_pretty(ts.total_size_bytes) AS total_size,
+ COALESCE(rc.estimated_row_count, 0) AS estimated_row_count,
+ COALESCE(rc.seq_scans, 0) AS seq_scans
+FROM (
+ SELECT
+ FORMAT('%I.%I', n.nspname, c.relname) AS name,
+ pg_table_size(c.oid) AS table_size_bytes,
+ pg_indexes_size(c.oid) AS index_size_bytes,
+ pg_total_relation_size(c.oid) AS total_size_bytes
+ FROM pg_class c
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+ WHERE NOT n.nspname LIKE ANY($1)
+ AND c.relkind = 'r'
+) ts
+LEFT JOIN (
+ SELECT
+ FORMAT('%I.%I', schemaname, relname) AS name,
+ n_live_tup AS estimated_row_count,
+ seq_scan AS seq_scans
+ FROM pg_stat_user_tables
+ WHERE NOT schemaname LIKE ANY($1)
+) rc ON rc.name = ts.name
+ORDER BY ts.total_size_bytes DESC
diff --git a/internal/inspect/index_usage/index_usage_test.go b/internal/inspect/table_stats/table_stats_test.go
similarity index 59%
rename from internal/inspect/index_usage/index_usage_test.go
rename to internal/inspect/table_stats/table_stats_test.go
index 5b735bb603..087641029a 100644
--- a/internal/inspect/index_usage/index_usage_test.go
+++ b/internal/inspect/table_stats/table_stats_test.go
@@ -1,4 +1,4 @@
-package index_usage
+package table_stats
import (
"context"
@@ -20,22 +20,24 @@ var dbConfig = pgconn.Config{
Database: "postgres",
}
-func TestIndexUsage(t *testing.T) {
- t.Run("inspects index usage", func(t *testing.T) {
- // Setup in-memory fs
+func TestTableStatsCommand(t *testing.T) {
+ t.Run("inspects table stats", func(t *testing.T) {
fsys := afero.NewMemMapFs()
- // Setup mock postgres
conn := pgtest.NewConn()
defer conn.Close(t)
- conn.Query(IndexUsageQuery, reset.LikeEscapeSchema(utils.InternalSchemas)).
+
+ // Mock table sizes and index sizes
+ conn.Query(TableStatsQuery, reset.LikeEscapeSchema(utils.InternalSchemas)).
Reply("SELECT 1", Result{
- Name: "test_table_idx",
- Percent_of_times_index_used: "0.9",
- Rows_in_table: 300,
+ Name: "public.test_table",
+ Table_size: "3GB",
+ Index_size: "1GB",
+ Total_size: "4GB",
+ Estimated_row_count: 100,
+ Seq_scans: 1,
})
- // Run test
+
err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
- // Check error
assert.NoError(t, err)
})
}
diff --git a/internal/inspect/templates/rules.toml b/internal/inspect/templates/rules.toml
new file mode 100644
index 0000000000..2597ee720d
--- /dev/null
+++ b/internal/inspect/templates/rules.toml
@@ -0,0 +1,43 @@
+# Rules to validate CSV report files
+
+[[rules]]
+query = "SELECT LISTAGG(stmt, ',') AS match FROM `locks.csv` WHERE age > '00:02:00'"
+name = "No old locks"
+pass = "✔"
+fail = "There is at least one lock older than 2 minutes"
+
+[[rules]]
+query = "SELECT LISTAGG(stmt, ',') AS match FROM `locks.csv` WHERE granted = 'f'"
+name = "No ungranted locks"
+pass = "✔"
+fail = "There is at least one ungranted lock"
+
+[[rules]]
+query = "SELECT LISTAGG(index, ',') AS match FROM `unused_indexes.csv`"
+name = "No unused indexes"
+pass = "✔"
+fail = "There is at least one unused index"
+
+[[rules]]
+query = "SELECT LISTAGG(name, ',') AS match FROM `db_stats.csv` WHERE index_hit_rate < 0.94 OR table_hit_rate < 0.94"
+name = "Check cache hit is within acceptable bounds"
+pass = "✔"
+fail = "There is a cache hit ratio (table or index) below 94%"
+
+[[rules]]
+query = "SELECT LISTAGG(t.name, ',') AS match FROM `table_stats.csv` t WHERE t.seq_scans > t.estimated_row_count * 0.1 AND t.estimated_row_count > 1000;"
+name = "No large tables with sequential scans more than 10% of rows"
+pass = "✔"
+fail = "At least one table is showing sequential scans more than 10% of total row count"
+
+[[rules]]
+query = "SELECT LISTAGG(s.tbl, ',') AS match FROM `vacuum_stats.csv` s WHERE s.expect_autovacuum = 'yes' and s.rowcount > 1000;"
+name = "No large tables waiting on autovacuum"
+pass = "✔"
+fail = "At least one table is waiting on autovacuum"
+
+[[rules]]
+query = "SELECT LISTAGG(s.name, ',') AS match FROM `vacuum_stats.csv` s WHERE s.rowcount > 0 AND (s.last_autovacuum = '' OR s.last_vacuum = '');"
+name = "No tables yet to be vacuumed"
+pass = "✔"
+fail = "At least one table has never had autovacuum or vacuum run on it"
diff --git a/internal/inspect/total_index_size/total_index_size.go b/internal/inspect/total_index_size/total_index_size.go
deleted file mode 100644
index fbc66b2598..0000000000
--- a/internal/inspect/total_index_size/total_index_size.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package total_index_size
-
-import (
- "context"
- _ "embed"
- "fmt"
-
- "github.com/go-errors/errors"
- "github.com/jackc/pgconn"
- "github.com/jackc/pgx/v4"
- "github.com/spf13/afero"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/migration/list"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgxv5"
-)
-
-//go:embed total_index_size.sql
-var TotalIndexSizeQuery string
-
-type Result struct {
- Size string
-}
-
-func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
- conn, err := utils.ConnectByConfig(ctx, config, options...)
- if err != nil {
- return err
- }
- defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, TotalIndexSizeQuery, reset.LikeEscapeSchema(utils.InternalSchemas))
- if err != nil {
- return errors.Errorf("failed to query rows: %w", err)
- }
- result, err := pgxv5.CollectRows[Result](rows)
- if err != nil {
- return err
- }
-
- table := "|Size|\n|-|\n"
- for _, r := range result {
- table += fmt.Sprintf("|`%s`|\n", r.Size)
- }
- return list.RenderTable(table)
-}
diff --git a/internal/inspect/total_index_size/total_index_size.sql b/internal/inspect/total_index_size/total_index_size.sql
deleted file mode 100644
index d1e8ab3d8f..0000000000
--- a/internal/inspect/total_index_size/total_index_size.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-SELECT
- pg_size_pretty(sum(c.relpages::bigint*8192)::bigint) AS size
-FROM pg_class c
-LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
-WHERE NOT n.nspname LIKE ANY($1)
-AND c.relkind = 'i'
diff --git a/internal/inspect/total_table_sizes/total_table_sizes.go b/internal/inspect/total_table_sizes/total_table_sizes.go
deleted file mode 100644
index 80b1c89a86..0000000000
--- a/internal/inspect/total_table_sizes/total_table_sizes.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package total_table_sizes
-
-import (
- "context"
- _ "embed"
- "fmt"
-
- "github.com/go-errors/errors"
- "github.com/jackc/pgconn"
- "github.com/jackc/pgx/v4"
- "github.com/spf13/afero"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/migration/list"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgxv5"
-)
-
-//go:embed total_table_sizes.sql
-var TotalTableSizesQuery string
-
-type Result struct {
- Schema string
- Name string
- Size string
-}
-
-func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
- conn, err := utils.ConnectByConfig(ctx, config, options...)
- if err != nil {
- return err
- }
- defer conn.Close(context.Background())
- rows, err := conn.Query(ctx, TotalTableSizesQuery, reset.LikeEscapeSchema(utils.PgSchemas))
- if err != nil {
- return errors.Errorf("failed to query rows: %w", err)
- }
- result, err := pgxv5.CollectRows[Result](rows)
- if err != nil {
- return err
- }
-
- table := "Schema|Table|Size|\n|-|-|-|\n"
- for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%s`|`%s`|\n", r.Schema, r.Name, r.Size)
- }
- return list.RenderTable(table)
-}
diff --git a/internal/inspect/total_table_sizes/total_table_sizes.sql b/internal/inspect/total_table_sizes/total_table_sizes.sql
deleted file mode 100644
index 471d0655f6..0000000000
--- a/internal/inspect/total_table_sizes/total_table_sizes.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-SELECT
- n.nspname AS schema,
- c.relname AS name,
- pg_size_pretty(pg_total_relation_size(c.oid)) AS size
-FROM pg_class c
-LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)
-WHERE NOT n.nspname LIKE ANY($1)
-AND c.relkind = 'r'
-ORDER BY pg_total_relation_size(c.oid) DESC
diff --git a/internal/inspect/total_table_sizes/total_table_sizes_test.go b/internal/inspect/total_table_sizes/total_table_sizes_test.go
deleted file mode 100644
index bc548af608..0000000000
--- a/internal/inspect/total_table_sizes/total_table_sizes_test.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package total_table_sizes
-
-import (
- "context"
- "testing"
-
- "github.com/jackc/pgconn"
- "github.com/spf13/afero"
- "github.com/stretchr/testify/assert"
- "github.com/supabase/cli/internal/db/reset"
- "github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/pgtest"
-)
-
-var dbConfig = pgconn.Config{
- Host: "127.0.0.1",
- Port: 5432,
- User: "admin",
- Password: "password",
- Database: "postgres",
-}
-
-func TestTotalTableSizesCommand(t *testing.T) {
- t.Run("inspects total table sizes", func(t *testing.T) {
- // Setup in-memory fs
- fsys := afero.NewMemMapFs()
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(TotalTableSizesQuery, reset.LikeEscapeSchema(utils.PgSchemas)).
- Reply("SELECT 1", Result{
- Schema: "public",
- Name: "test_table",
- Size: "3GB",
- })
- // Run test
- err := Run(context.Background(), dbConfig, fsys, conn.Intercept)
- // Check error
- assert.NoError(t, err)
- })
-}
diff --git a/internal/inspect/unused_indexes/unused_indexes.go b/internal/inspect/unused_indexes/unused_indexes.go
index 2a30a46d73..bfbbf523a2 100644
--- a/internal/inspect/unused_indexes/unused_indexes.go
+++ b/internal/inspect/unused_indexes/unused_indexes.go
@@ -19,7 +19,7 @@ import (
var UnusedIndexesQuery string
type Result struct {
- Table string
+ Name string
Index string
Index_size string
Index_scans int64
@@ -42,7 +42,7 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
table := "|Table|Index|Index Size|Index Scans\n|-|-|-|-|\n"
for _, r := range result {
- table += fmt.Sprintf("|`%s`|`%s`|`%s`|`%d`|\n", r.Table, r.Index, r.Index_size, r.Index_scans)
+ table += fmt.Sprintf("|`%s`|`%s`|`%s`|`%d`|\n", r.Name, r.Index, r.Index_size, r.Index_scans)
}
return list.RenderTable(table)
}
diff --git a/internal/inspect/unused_indexes/unused_indexes.sql b/internal/inspect/unused_indexes/unused_indexes.sql
index 6e775967df..aa429b9edb 100644
--- a/internal/inspect/unused_indexes/unused_indexes.sql
+++ b/internal/inspect/unused_indexes/unused_indexes.sql
@@ -1,5 +1,5 @@
SELECT
- schemaname || '.' || relname AS table,
+ FORMAT('%I.%I', schemaname, relname) AS name,
indexrelname AS index,
pg_size_pretty(pg_relation_size(i.indexrelid)) AS index_size,
idx_scan as index_scans
diff --git a/internal/inspect/unused_indexes/unused_indexes_test.go b/internal/inspect/unused_indexes/unused_indexes_test.go
index ee41820948..517f88c616 100644
--- a/internal/inspect/unused_indexes/unused_indexes_test.go
+++ b/internal/inspect/unused_indexes/unused_indexes_test.go
@@ -29,7 +29,7 @@ func TestUnusedIndexesCommand(t *testing.T) {
defer conn.Close(t)
conn.Query(UnusedIndexesQuery, reset.LikeEscapeSchema(utils.InternalSchemas)).
Reply("SELECT 1", Result{
- Table: "test_table",
+ Name: "public.test_table",
Index: "test_table_idx",
Index_size: "3GB",
Index_scans: 2,
diff --git a/internal/inspect/vacuum_stats/vacuum_stats.go b/internal/inspect/vacuum_stats/vacuum_stats.go
index dc9326d793..8b36698793 100644
--- a/internal/inspect/vacuum_stats/vacuum_stats.go
+++ b/internal/inspect/vacuum_stats/vacuum_stats.go
@@ -20,8 +20,7 @@ import (
var VacuumStatsQuery string
type Result struct {
- Schema string
- Table string
+ Name string
Last_vacuum string
Last_autovacuum string
Rowcount string
@@ -45,10 +44,10 @@ func Run(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...fu
return err
}
- table := "|Schema|Table|Last Vacuum|Last Auto Vacuum|Row count|Dead row count|Expect autovacuum?\n|-|-|-|-|-|-|-|\n"
+ table := "|Table|Last Vacuum|Last Auto Vacuum|Row count|Dead row count|Expect autovacuum?\n|-|-|-|-|-|-|\n"
for _, r := range result {
rowcount := strings.Replace(r.Rowcount, "-1", "No stats", 1)
- table += fmt.Sprintf("|`%s`|`%s`|%s|%s|`%s`|`%s`|`%s`|\n", r.Schema, r.Table, r.Last_vacuum, r.Last_autovacuum, rowcount, r.Dead_rowcount, r.Expect_autovacuum)
+ table += fmt.Sprintf("|`%s`|%s|%s|`%s`|`%s`|`%s`|\n", r.Name, r.Last_vacuum, r.Last_autovacuum, rowcount, r.Dead_rowcount, r.Expect_autovacuum)
}
return list.RenderTable(table)
}
diff --git a/internal/inspect/vacuum_stats/vacuum_stats.sql b/internal/inspect/vacuum_stats/vacuum_stats.sql
index 7078474973..534fa4e647 100644
--- a/internal/inspect/vacuum_stats/vacuum_stats.sql
+++ b/internal/inspect/vacuum_stats/vacuum_stats.sql
@@ -20,8 +20,7 @@ WITH table_opts AS (
table_opts
)
SELECT
- vacuum_settings.nspname AS schema,
- vacuum_settings.relname AS table,
+ FORMAT('%I.%I', vacuum_settings.nspname, vacuum_settings.relname) AS name,
coalesce(to_char(psut.last_vacuum, 'YYYY-MM-DD HH24:MI'), '') AS last_vacuum,
coalesce(to_char(psut.last_autovacuum, 'YYYY-MM-DD HH24:MI'), '') AS last_autovacuum,
to_char(pg_class.reltuples, '9G999G999G999') AS rowcount,
diff --git a/internal/inspect/vacuum_stats/vacuum_stats_test.go b/internal/inspect/vacuum_stats/vacuum_stats_test.go
index 0d3cbec105..7872567b36 100644
--- a/internal/inspect/vacuum_stats/vacuum_stats_test.go
+++ b/internal/inspect/vacuum_stats/vacuum_stats_test.go
@@ -29,8 +29,7 @@ func TestVacuumCommand(t *testing.T) {
defer conn.Close(t)
conn.Query(VacuumStatsQuery, reset.LikeEscapeSchema(utils.InternalSchemas)).
Reply("SELECT 1", Result{
- Schema: "test_schema",
- Table: "test_table",
+ Name: "test_schema.test_table",
Last_vacuum: "2021-01-01 00:00:00",
Last_autovacuum: "2021-01-01 00:00:00",
Rowcount: "1000",
diff --git a/internal/link/link.go b/internal/link/link.go
index d35321e2ea..9bf77675e4 100644
--- a/internal/link/link.go
+++ b/internal/link/link.go
@@ -14,7 +14,6 @@ import (
"github.com/spf13/afero"
"github.com/spf13/viper"
"github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/internal/utils/credentials"
"github.com/supabase/cli/internal/utils/flags"
"github.com/supabase/cli/internal/utils/tenant"
"github.com/supabase/cli/pkg/api"
@@ -40,18 +39,12 @@ func Run(ctx context.Context, projectRef string, fsys afero.Fs, options ...func(
if err != nil {
return err
}
- LinkServices(ctx, projectRef, keys.Anon, fsys)
+ LinkServices(ctx, projectRef, keys.ServiceRole, fsys)
// 2. Check database connection
- config := flags.GetDbConfigOptionalPassword(projectRef)
- if len(config.Password) > 0 {
- if err := linkDatabase(ctx, config, options...); err != nil {
- return err
- }
- // Save database password
- if err := credentials.StoreProvider.Set(projectRef, config.Password); err != nil {
- fmt.Fprintln(os.Stderr, "Failed to save database password:", err)
- }
+ config := flags.NewDbConfigWithPassword(ctx, projectRef)
+ if err := linkDatabase(ctx, config, fsys, options...); err != nil {
+ return err
}
// 3. Save project ref
@@ -73,7 +66,7 @@ func Run(ctx context.Context, projectRef string, fsys afero.Fs, options ...func(
return nil
}
-func LinkServices(ctx context.Context, projectRef, anonKey string, fsys afero.Fs) {
+func LinkServices(ctx context.Context, projectRef, serviceKey string, fsys afero.Fs) {
// Ignore non-fatal errors linking services
var wg sync.WaitGroup
wg.Add(8)
@@ -83,6 +76,12 @@ func LinkServices(ctx context.Context, projectRef, anonKey string, fsys afero.Fs
fmt.Fprintln(os.Stderr, err)
}
}()
+ go func() {
+ defer wg.Done()
+ if err := linkNetworkRestrictions(ctx, projectRef); err != nil && viper.GetBool("DEBUG") {
+ fmt.Fprintln(os.Stderr, err)
+ }
+ }()
go func() {
defer wg.Done()
if err := linkPostgrest(ctx, projectRef); err != nil && viper.GetBool("DEBUG") {
@@ -107,7 +106,7 @@ func LinkServices(ctx context.Context, projectRef, anonKey string, fsys afero.Fs
fmt.Fprintln(os.Stderr, err)
}
}()
- api := tenant.NewTenantAPI(ctx, projectRef, anonKey)
+ api := tenant.NewTenantAPI(ctx, projectRef, serviceKey)
go func() {
defer wg.Done()
if err := linkPostgrestVersion(ctx, api, fsys); err != nil && viper.GetBool("DEBUG") {
@@ -120,12 +119,6 @@ func LinkServices(ctx context.Context, projectRef, anonKey string, fsys afero.Fs
fmt.Fprintln(os.Stderr, err)
}
}()
- go func() {
- defer wg.Done()
- if err := linkStorageVersion(ctx, api, fsys); err != nil && viper.GetBool("DEBUG") {
- fmt.Fprintln(os.Stderr, err)
- }
- }()
wg.Wait()
}
@@ -178,12 +171,14 @@ func linkStorage(ctx context.Context, projectRef string) error {
return nil
}
-func linkStorageVersion(ctx context.Context, api tenant.TenantAPI, fsys afero.Fs) error {
- version, err := api.GetStorageVersion(ctx)
- if err != nil {
- return err
+const GET_LATEST_STORAGE_MIGRATION = "SELECT name FROM storage.migrations ORDER BY id DESC LIMIT 1"
+
+func linkStorageVersion(ctx context.Context, conn *pgx.Conn, fsys afero.Fs) error {
+ var name string
+ if err := conn.QueryRow(ctx, GET_LATEST_STORAGE_MIGRATION).Scan(&name); err != nil {
+ return errors.Errorf("failed to fetch storage migration: %w", err)
}
- return utils.WriteFile(utils.StorageVersionPath, []byte(version), fsys)
+ return utils.WriteFile(utils.StorageVersionPath, []byte(name), fsys)
}
func linkDatabaseSettings(ctx context.Context, projectRef string) error {
@@ -197,13 +192,27 @@ func linkDatabaseSettings(ctx context.Context, projectRef string) error {
return nil
}
-func linkDatabase(ctx context.Context, config pgconn.Config, options ...func(*pgx.ConnConfig)) error {
+func linkNetworkRestrictions(ctx context.Context, projectRef string) error {
+ resp, err := utils.GetSupabase().V1GetNetworkRestrictionsWithResponse(ctx, projectRef)
+ if err != nil {
+ return errors.Errorf("failed to read network restrictions: %w", err)
+ } else if resp.JSON200 == nil {
+ return errors.Errorf("unexpected network restrictions status %d: %s", resp.StatusCode(), string(resp.Body))
+ }
+ utils.Config.Db.NetworkRestrictions.FromRemoteNetworkRestrictions(*resp.JSON200)
+ return nil
+}
+
+func linkDatabase(ctx context.Context, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
conn, err := utils.ConnectByConfig(ctx, config, options...)
if err != nil {
return err
}
defer conn.Close(context.Background())
updatePostgresConfig(conn)
+ if err := linkStorageVersion(ctx, conn, fsys); err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ }
// If `schema_migrations` doesn't exist on the remote database, create it.
if err := migration.CreateMigrationTable(ctx, conn); err != nil {
return err
@@ -225,7 +234,7 @@ func updatePostgresConfig(conn *pgx.Conn) {
}
func linkPooler(ctx context.Context, projectRef string, fsys afero.Fs) error {
- resp, err := utils.GetSupabase().V1GetSupavisorConfigWithResponse(ctx, projectRef)
+ resp, err := utils.GetSupabase().V1GetPoolerConfigWithResponse(ctx, projectRef)
if err != nil {
return errors.Errorf("failed to get pooler config: %w", err)
}
@@ -243,11 +252,11 @@ func linkPooler(ctx context.Context, projectRef string, fsys afero.Fs) error {
func updatePoolerConfig(config api.SupavisorConfigResponse) {
utils.Config.Db.Pooler.ConnectionString = config.ConnectionString
utils.Config.Db.Pooler.PoolMode = cliConfig.PoolMode(config.PoolMode)
- if config.DefaultPoolSize != nil {
- utils.Config.Db.Pooler.DefaultPoolSize = cast.IntToUint(*config.DefaultPoolSize)
+ if value, err := config.DefaultPoolSize.Get(); err == nil {
+ utils.Config.Db.Pooler.DefaultPoolSize = cast.IntToUint(value)
}
- if config.MaxClientConn != nil {
- utils.Config.Db.Pooler.MaxClientConn = cast.IntToUint(*config.MaxClientConn)
+ if value, err := config.MaxClientConn.Get(); err == nil {
+ utils.Config.Db.Pooler.MaxClientConn = cast.IntToUint(value)
}
}
diff --git a/internal/link/link_test.go b/internal/link/link_test.go
index 18c090ad3e..15ff82962f 100644
--- a/internal/link/link_test.go
+++ b/internal/link/link_test.go
@@ -10,6 +10,7 @@ import (
"github.com/jackc/pgconn"
"github.com/jackc/pgerrcode"
"github.com/jackc/pgx/v4"
+ "github.com/oapi-codegen/nullable"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
"github.com/supabase/cli/internal/testing/apitest"
@@ -20,6 +21,7 @@ import (
"github.com/supabase/cli/pkg/api"
"github.com/supabase/cli/pkg/migration"
"github.com/supabase/cli/pkg/pgtest"
+ "github.com/supabase/cli/pkg/pgxv5"
"github.com/zalando/go-keyring"
)
@@ -46,26 +48,28 @@ func TestLinkCommand(t *testing.T) {
// Setup mock postgres
conn := pgtest.NewConn()
defer conn.Close(t)
+ conn.Query(pgxv5.SET_SESSION_ROLE).
+ Reply("SET ROLE").
+ Query(GET_LATEST_STORAGE_MIGRATION).
+ Reply("SELECT 1", []interface{}{"custom-metadata"})
helper.MockMigrationHistory(conn)
helper.MockSeedHistory(conn)
// Flush pending mocks after test execution
defer gock.OffAll()
// Mock project status
- postgres := api.V1DatabaseResponse{
- Host: utils.GetSupabaseDbHost(project),
- Version: "15.1.0.117",
+ mockPostgres := api.V1ProjectWithDatabaseResponse{
+ Status: api.V1ProjectWithDatabaseResponseStatusACTIVEHEALTHY,
}
+ mockPostgres.Database.Host = utils.GetSupabaseDbHost(project)
+ mockPostgres.Database.Version = "15.1.0.117"
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + project).
Reply(200).
- JSON(api.V1ProjectWithDatabaseResponse{
- Status: api.V1ProjectWithDatabaseResponseStatusACTIVEHEALTHY,
- Database: postgres,
- })
+ JSON(mockPostgres)
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + project + "/api-keys").
Reply(200).
- JSON([]api.ApiKeyResponse{{Name: "anon", ApiKey: "anon-key"}})
+ JSON([]api.ApiKeyResponse{{Name: "anon", ApiKey: nullable.NewNullableWithValue("anon-key")}})
// Link configs
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + project + "/config/database/postgres").
@@ -87,6 +91,13 @@ func TestLinkCommand(t *testing.T) {
Get("/v1/projects/" + project + "/config/database/pooler").
Reply(200).
JSON(api.V1PgbouncerConfigResponse{})
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects/" + project + "/network-restrictions").
+ Reply(200).
+ JSON(api.NetworkRestrictionsResponse{})
+ gock.New(utils.DefaultApiHost).
+ Post("/v1/projects/" + project + "/database/query").
+ Reply(http.StatusCreated)
// Link versions
auth := tenant.HealthResponse{Version: "v2.74.2"}
gock.New("https://" + utils.GetSupabaseHost(project)).
@@ -98,10 +109,6 @@ func TestLinkCommand(t *testing.T) {
Get("/rest/v1/").
Reply(200).
JSON(rest)
- gock.New("https://" + utils.GetSupabaseHost(project)).
- Get("/storage/v1/version").
- Reply(200).
- BodyString("0.40.4")
// Run test
err := Run(context.Background(), project, fsys, conn.Intercept)
// Check error
@@ -119,7 +126,7 @@ func TestLinkCommand(t *testing.T) {
assert.Equal(t, []byte(auth.Version), authVersion)
postgresVersion, err := afero.ReadFile(fsys, utils.PostgresVersionPath)
assert.NoError(t, err)
- assert.Equal(t, []byte(postgres.Version), postgresVersion)
+ assert.Equal(t, []byte(mockPostgres.Database.Version), postgresVersion)
})
t.Run("ignores error linking services", func(t *testing.T) {
@@ -133,13 +140,12 @@ func TestLinkCommand(t *testing.T) {
Get("/v1/projects/" + project).
Reply(200).
JSON(api.V1ProjectWithDatabaseResponse{
- Status: api.V1ProjectWithDatabaseResponseStatusACTIVEHEALTHY,
- Database: api.V1DatabaseResponse{},
+ Status: api.V1ProjectWithDatabaseResponseStatusACTIVEHEALTHY,
})
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + project + "/api-keys").
Reply(200).
- JSON([]api.ApiKeyResponse{{Name: "anon", ApiKey: "anon-key"}})
+ JSON([]api.ApiKeyResponse{{Name: "anon", ApiKey: nullable.NewNullableWithValue("anon-key")}})
// Link configs
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + project + "/config/database/postgres").
@@ -156,6 +162,13 @@ func TestLinkCommand(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + project + "/config/database/pooler").
ReplyError(errors.New("network error"))
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects/" + project + "/network-restrictions").
+ Reply(http.StatusOK).
+ JSON(api.NetworkRestrictionsResponse{})
+ gock.New(utils.DefaultApiHost).
+ Post("/v1/projects/" + project + "/database/query").
+ Reply(http.StatusServiceUnavailable)
// Link versions
gock.New("https://" + utils.GetSupabaseHost(project)).
Get("/auth/v1/health").
@@ -163,9 +176,6 @@ func TestLinkCommand(t *testing.T) {
gock.New("https://" + utils.GetSupabaseHost(project)).
Get("/rest/v1/").
ReplyError(errors.New("network error"))
- gock.New("https://" + utils.GetSupabaseHost(project)).
- Get("/storage/v1/version").
- ReplyError(errors.New("network error"))
// Run test
err := Run(context.Background(), project, fsys, func(cc *pgx.ConnConfig) {
cc.LookupFunc = func(ctx context.Context, host string) (addrs []string, err error) {
@@ -180,6 +190,15 @@ func TestLinkCommand(t *testing.T) {
t.Run("throws error on write failure", func(t *testing.T) {
// Setup in-memory fs
fsys := afero.NewReadOnlyFs(afero.NewMemMapFs())
+ // Setup mock postgres
+ conn := pgtest.NewConn()
+ defer conn.Close(t)
+ conn.Query(pgxv5.SET_SESSION_ROLE).
+ Reply("SET ROLE").
+ Query(GET_LATEST_STORAGE_MIGRATION).
+ Reply("SELECT 1", []interface{}{"custom-metadata"})
+ helper.MockMigrationHistory(conn)
+ helper.MockSeedHistory(conn)
// Flush pending mocks after test execution
defer gock.OffAll()
// Mock project status
@@ -187,13 +206,12 @@ func TestLinkCommand(t *testing.T) {
Get("/v1/projects/" + project).
Reply(200).
JSON(api.V1ProjectWithDatabaseResponse{
- Status: api.V1ProjectWithDatabaseResponseStatusACTIVEHEALTHY,
- Database: api.V1DatabaseResponse{},
+ Status: api.V1ProjectWithDatabaseResponseStatusACTIVEHEALTHY,
})
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + project + "/api-keys").
Reply(200).
- JSON([]api.ApiKeyResponse{{Name: "anon", ApiKey: "anon-key"}})
+ JSON([]api.ApiKeyResponse{{Name: "anon", ApiKey: nullable.NewNullableWithValue("anon-key")}})
// Link configs
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + project + "/config/database/postgres").
@@ -210,6 +228,13 @@ func TestLinkCommand(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + project + "/config/database/pooler").
ReplyError(errors.New("network error"))
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects/" + project + "/network-restrictions").
+ Reply(http.StatusOK).
+ JSON(api.NetworkRestrictionsResponse{})
+ gock.New(utils.DefaultApiHost).
+ Post("/v1/projects/" + project + "/database/query").
+ Reply(http.StatusCreated)
// Link versions
gock.New("https://" + utils.GetSupabaseHost(project)).
Get("/auth/v1/health").
@@ -217,14 +242,11 @@ func TestLinkCommand(t *testing.T) {
gock.New("https://" + utils.GetSupabaseHost(project)).
Get("/rest/v1/").
ReplyError(errors.New("network error"))
- gock.New("https://" + utils.GetSupabaseHost(project)).
- Get("/storage/v1/version").
- ReplyError(errors.New("network error"))
gock.New(utils.DefaultApiHost).
Get("/v1/projects").
ReplyError(errors.New("network error"))
// Run test
- err := Run(context.Background(), project, fsys)
+ err := Run(context.Background(), project, fsys, conn.Intercept)
// Check error
assert.ErrorContains(t, err, "operation not permitted")
assert.Empty(t, apitest.ListUnmatchedRequests())
@@ -237,20 +259,23 @@ func TestLinkCommand(t *testing.T) {
func TestStatusCheck(t *testing.T) {
project := "test-project"
+ token := apitest.RandomAccessToken(t)
+ t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
t.Run("updates postgres version when healthy", func(t *testing.T) {
// Setup in-memory fs
fsys := afero.NewMemMapFs()
// Flush pending mocks after test execution
defer gock.OffAll()
+ postgres := api.V1ProjectWithDatabaseResponse{
+ Status: api.V1ProjectWithDatabaseResponseStatusACTIVEHEALTHY,
+ }
+ postgres.Database.Version = "15.6.1.139"
// Mock project status
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + project).
Reply(http.StatusOK).
- JSON(api.V1ProjectWithDatabaseResponse{
- Status: api.V1ProjectWithDatabaseResponseStatusACTIVEHEALTHY,
- Database: api.V1DatabaseResponse{Version: "15.6.1.139"},
- })
+ JSON(postgres)
// Run test
err := checkRemoteProjectStatus(context.Background(), project, fsys)
// Check error
@@ -372,50 +397,69 @@ func TestLinkPostgrest(t *testing.T) {
func TestLinkDatabase(t *testing.T) {
t.Run("throws error on connect failure", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
// Run test
- err := linkDatabase(context.Background(), pgconn.Config{})
+ err := linkDatabase(context.Background(), pgconn.Config{}, fsys)
// Check error
assert.ErrorContains(t, err, "invalid port (outside range)")
})
t.Run("ignores missing server version", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
// Setup mock postgres
conn := pgtest.NewWithStatus(map[string]string{
"standard_conforming_strings": "on",
})
defer conn.Close(t)
+ conn.Query(GET_LATEST_STORAGE_MIGRATION).
+ Reply("SELECT 1", []interface{}{"custom-metadata"})
helper.MockMigrationHistory(conn)
helper.MockSeedHistory(conn)
// Run test
- err := linkDatabase(context.Background(), dbConfig, conn.Intercept)
+ err := linkDatabase(context.Background(), dbConfig, fsys, conn.Intercept)
// Check error
assert.NoError(t, err)
+ version, err := afero.ReadFile(fsys, utils.StorageVersionPath)
+ assert.NoError(t, err)
+ assert.Equal(t, "custom-metadata", string(version))
})
t.Run("updates config to newer db version", func(t *testing.T) {
utils.Config.Db.MajorVersion = 14
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
// Setup mock postgres
conn := pgtest.NewWithStatus(map[string]string{
"standard_conforming_strings": "on",
"server_version": "15.0",
})
defer conn.Close(t)
+ conn.Query(GET_LATEST_STORAGE_MIGRATION).
+ Reply("SELECT 1", []interface{}{"custom-metadata"})
helper.MockMigrationHistory(conn)
helper.MockSeedHistory(conn)
// Run test
- err := linkDatabase(context.Background(), dbConfig, conn.Intercept)
+ err := linkDatabase(context.Background(), dbConfig, fsys, conn.Intercept)
// Check error
assert.NoError(t, err)
- utils.Config.Db.MajorVersion = 15
assert.Equal(t, uint(15), utils.Config.Db.MajorVersion)
+ version, err := afero.ReadFile(fsys, utils.StorageVersionPath)
+ assert.NoError(t, err)
+ assert.Equal(t, "custom-metadata", string(version))
})
t.Run("throws error on query failure", func(t *testing.T) {
utils.Config.Db.MajorVersion = 14
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
// Setup mock postgres
conn := pgtest.NewConn()
defer conn.Close(t)
- conn.Query(migration.SET_LOCK_TIMEOUT).
+ conn.Query(GET_LATEST_STORAGE_MIGRATION).
+ ReplyError(pgerrcode.InsufficientPrivilege, "permission denied for relation migrations").
+ Query(migration.SET_LOCK_TIMEOUT).
Query(migration.CREATE_VERSION_SCHEMA).
Reply("CREATE SCHEMA").
Query(migration.CREATE_VERSION_TABLE).
@@ -423,8 +467,11 @@ func TestLinkDatabase(t *testing.T) {
Query(migration.ADD_STATEMENTS_COLUMN).
Query(migration.ADD_NAME_COLUMN)
// Run test
- err := linkDatabase(context.Background(), dbConfig, conn.Intercept)
+ err := linkDatabase(context.Background(), dbConfig, fsys, conn.Intercept)
// Check error
assert.ErrorContains(t, err, "ERROR: permission denied for relation supabase_migrations (SQLSTATE 42501)")
+ exists, err := afero.Exists(fsys, utils.StorageVersionPath)
+ assert.NoError(t, err)
+ assert.False(t, exists)
})
}
diff --git a/internal/logout/logout_test.go b/internal/logout/logout_test.go
index 42f9f8ead1..943f25bed2 100644
--- a/internal/logout/logout_test.go
+++ b/internal/logout/logout_test.go
@@ -34,7 +34,7 @@ func TestLogoutCommand(t *testing.T) {
})
t.Run("removes all Supabase CLI credentials", func(t *testing.T) {
- t.Cleanup(credentials.MockInit())
+ keyring.MockInit()
require.NoError(t, credentials.StoreProvider.Set(utils.AccessTokenKey, token))
require.NoError(t, credentials.StoreProvider.Set("project1", "password1"))
require.NoError(t, credentials.StoreProvider.Set("project2", "password2"))
diff --git a/internal/migration/apply/apply.go b/internal/migration/apply/apply.go
index 224b342f76..f9c517ace5 100644
--- a/internal/migration/apply/apply.go
+++ b/internal/migration/apply/apply.go
@@ -11,14 +11,21 @@ import (
)
func MigrateAndSeed(ctx context.Context, version string, conn *pgx.Conn, fsys afero.Fs) error {
- migrations, err := list.LoadPartialMigrations(version, fsys)
- if err != nil {
+ if err := applyMigrationFiles(ctx, version, conn, fsys); err != nil {
return err
}
- if err := migration.ApplyMigrations(ctx, migrations, conn, afero.NewIOFS(fsys)); err != nil {
+ return applySeedFiles(ctx, conn, fsys)
+}
+
+func applyMigrationFiles(ctx context.Context, version string, conn *pgx.Conn, fsys afero.Fs) error {
+ if !utils.Config.Db.Migrations.Enabled {
+ return nil
+ }
+ migrations, err := list.LoadPartialMigrations(version, fsys)
+ if err != nil {
return err
}
- return applySeedFiles(ctx, conn, fsys)
+ return migration.ApplyMigrations(ctx, migrations, conn, afero.NewIOFS(fsys))
}
func applySeedFiles(ctx context.Context, conn *pgx.Conn, fsys afero.Fs) error {
diff --git a/internal/migration/down/down.go b/internal/migration/down/down.go
new file mode 100644
index 0000000000..35a9fa7e88
--- /dev/null
+++ b/internal/migration/down/down.go
@@ -0,0 +1,64 @@
+package down
+
+import (
+ "context"
+ "fmt"
+ "os"
+
+ "github.com/go-errors/errors"
+ "github.com/jackc/pgconn"
+ "github.com/jackc/pgx/v4"
+ "github.com/spf13/afero"
+ "github.com/supabase/cli/internal/migration/apply"
+ "github.com/supabase/cli/internal/utils"
+ "github.com/supabase/cli/pkg/migration"
+ "github.com/supabase/cli/pkg/vault"
+)
+
+func Run(ctx context.Context, last uint, config pgconn.Config, fsys afero.Fs, options ...func(*pgx.ConnConfig)) error {
+ if last == 0 {
+ return errors.Errorf("--last must be greater than 0")
+ }
+ conn, err := utils.ConnectByConfig(ctx, config, options...)
+ if err != nil {
+ return err
+ }
+ defer conn.Close(context.Background())
+ remoteMigrations, err := migration.ListRemoteMigrations(ctx, conn)
+ if err != nil {
+ return err
+ }
+ total := uint(len(remoteMigrations))
+ if total <= last {
+ utils.CmdSuggestion = fmt.Sprintf("Try %s if you want to revert all migrations.", utils.Aqua("supabase db reset"))
+ return errors.Errorf("--last must be smaller than total applied migrations: %d", total)
+ }
+ msg := confirmResetAll(remoteMigrations[total-last:])
+ if shouldReset, err := utils.NewConsole().PromptYesNo(ctx, msg, false); err != nil {
+ return err
+ } else if !shouldReset {
+ return errors.New(context.Canceled)
+ }
+ version := remoteMigrations[total-last-1]
+ fmt.Fprintln(os.Stderr, "Resetting database to version:", version)
+ return ResetAll(ctx, version, conn, fsys)
+}
+
+func ResetAll(ctx context.Context, version string, conn *pgx.Conn, fsys afero.Fs) error {
+ if err := migration.DropUserSchemas(ctx, conn); err != nil {
+ return err
+ }
+ if err := vault.UpsertVaultSecrets(ctx, utils.Config.Db.Vault, conn); err != nil {
+ return err
+ }
+ return apply.MigrateAndSeed(ctx, version, conn, fsys)
+}
+
+func confirmResetAll(pending []string) string {
+ msg := fmt.Sprintln("Do you want to revert the following migrations?")
+ for _, v := range pending {
+ msg += fmt.Sprintf(" • %s\n", utils.Bold(v))
+ }
+ msg += fmt.Sprintf("%s you will lose all data in this database.", utils.Yellow("WARNING:"))
+ return msg
+}
diff --git a/internal/migration/down/down_test.go b/internal/migration/down/down_test.go
new file mode 100644
index 0000000000..76baefe970
--- /dev/null
+++ b/internal/migration/down/down_test.go
@@ -0,0 +1,135 @@
+package down
+
+import (
+ "context"
+ "path/filepath"
+ "testing"
+
+ "github.com/jackc/pgconn"
+ "github.com/jackc/pgerrcode"
+ "github.com/spf13/afero"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+ "github.com/supabase/cli/internal/testing/helper"
+ "github.com/supabase/cli/internal/utils"
+ "github.com/supabase/cli/pkg/migration"
+ "github.com/supabase/cli/pkg/pgtest"
+)
+
+var dbConfig = pgconn.Config{
+ Host: "127.0.0.1",
+ Port: 5432,
+ User: "admin",
+ Password: "password",
+ Database: "postgres",
+}
+
+func TestMigrationsDown(t *testing.T) {
+ t.Run("resets last n migrations", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
+ files := []string{
+ filepath.Join(utils.MigrationsDir, "20221201000000_test.sql"),
+ filepath.Join(utils.MigrationsDir, "20221201000001_test.sql"),
+ filepath.Join(utils.MigrationsDir, "20221201000002_test.sql"),
+ }
+ for _, path := range files {
+ require.NoError(t, afero.WriteFile(fsys, path, []byte(""), 0644))
+ }
+ // Setup mock postgres
+ conn := pgtest.NewConn()
+ defer conn.Close(t)
+ conn.Query(migration.LIST_MIGRATION_VERSION).
+ Reply("SELECT 2", []interface{}{"20221201000000"}, []interface{}{"20221201000001"})
+ // Run test
+ err := Run(context.Background(), 1, dbConfig, fsys, conn.Intercept)
+ // Check error
+ assert.ErrorIs(t, err, context.Canceled)
+ })
+
+ t.Run("throws error on out of range", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
+ // Setup mock postgres
+ conn := pgtest.NewConn()
+ defer conn.Close(t)
+ conn.Query(migration.LIST_MIGRATION_VERSION).
+ Reply("SELECT 2", []interface{}{"20221201000000"}, []interface{}{"20221201000001"})
+ // Run test
+ err := Run(context.Background(), 2, dbConfig, fsys, conn.Intercept)
+ // Check error
+ assert.ErrorContains(t, err, "--last must be smaller than total applied migrations: 2")
+ })
+
+ t.Run("throws error on insufficient privilege", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
+ // Setup mock postgres
+ conn := pgtest.NewConn()
+ defer conn.Close(t)
+ conn.Query(migration.LIST_MIGRATION_VERSION).
+ ReplyError(pgerrcode.InsufficientPrivilege, "permission denied for relation supabase_migrations")
+ // Run test
+ err := Run(context.Background(), 1, dbConfig, fsys, conn.Intercept)
+ // Check error
+ assert.ErrorContains(t, err, "ERROR: permission denied for relation supabase_migrations (SQLSTATE 42501)")
+ })
+}
+
+func TestResetRemote(t *testing.T) {
+ t.Run("resets remote database", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
+ path := filepath.Join(utils.MigrationsDir, "0_schema.sql")
+ require.NoError(t, afero.WriteFile(fsys, path, nil, 0644))
+ // Setup mock postgres
+ conn := pgtest.NewConn()
+ defer conn.Close(t)
+ conn.Query(migration.DropObjects).
+ Reply("INSERT 0")
+ helper.MockMigrationHistory(conn).
+ Query(migration.INSERT_MIGRATION_VERSION, "0", "schema", nil).
+ Reply("INSERT 0 1")
+ // Run test
+ err := ResetAll(context.Background(), "", conn.MockClient(t), fsys)
+ // Check error
+ assert.NoError(t, err)
+ })
+
+ t.Run("resets remote database with seed config disabled", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
+ path := filepath.Join(utils.MigrationsDir, "0_schema.sql")
+ require.NoError(t, afero.WriteFile(fsys, path, nil, 0644))
+ seedPath := filepath.Join(utils.SupabaseDirPath, "seed.sql")
+ // Will raise an error when seeding
+ require.NoError(t, afero.WriteFile(fsys, seedPath, []byte("INSERT INTO test_table;"), 0644))
+ // Setup mock postgres
+ conn := pgtest.NewConn()
+ defer conn.Close(t)
+ conn.Query(migration.DropObjects).
+ Reply("INSERT 0")
+ helper.MockMigrationHistory(conn).
+ Query(migration.INSERT_MIGRATION_VERSION, "0", "schema", nil).
+ Reply("INSERT 0 1")
+ utils.Config.Db.Seed.Enabled = false
+ // Run test
+ err := ResetAll(context.Background(), "", conn.MockClient(t), fsys)
+ // No error should be raised since we're skipping the seed
+ assert.NoError(t, err)
+ })
+
+ t.Run("throws error on drop schema failure", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := afero.NewMemMapFs()
+ // Setup mock postgres
+ conn := pgtest.NewConn()
+ defer conn.Close(t)
+ conn.Query(migration.DropObjects).
+ ReplyError(pgerrcode.InsufficientPrivilege, "permission denied for relation supabase_migrations")
+ // Run test
+ err := ResetAll(context.Background(), "", conn.MockClient(t), fsys)
+ // Check error
+ assert.ErrorContains(t, err, "ERROR: permission denied for relation supabase_migrations (SQLSTATE 42501)")
+ })
+}
diff --git a/internal/migration/list/list.go b/internal/migration/list/list.go
index 3107d4ec69..c10245d56b 100644
--- a/internal/migration/list/list.go
+++ b/internal/migration/list/list.go
@@ -7,6 +7,7 @@ import (
"strconv"
"github.com/charmbracelet/glamour"
+ "github.com/charmbracelet/glamour/styles"
"github.com/go-errors/errors"
"github.com/jackc/pgconn"
"github.com/jackc/pgx/v4"
@@ -73,7 +74,7 @@ func makeTable(remoteMigrations, localMigrations []string) string {
func RenderTable(markdown string) error {
r, err := glamour.NewTermRenderer(
- glamour.WithAutoStyle(),
+ glamour.WithStandardStyle(styles.AsciiStyle),
glamour.WithWordWrap(-1),
)
if err != nil {
diff --git a/internal/migration/squash/squash.go b/internal/migration/squash/squash.go
index 22f3278de2..1ba5c55a95 100644
--- a/internal/migration/squash/squash.go
+++ b/internal/migration/squash/squash.go
@@ -96,7 +96,7 @@ func squashMigrations(ctx context.Context, migrations []string, fsys afero.Fs, o
return err
}
// Assuming entities in managed schemas are not altered, we can simply diff the dumps before and after migrations.
- schemas := []string{"auth", "storage"}
+ opt := migration.WithSchema("auth", "storage")
config := pgconn.Config{
Host: utils.Config.Hostname,
Port: utils.Config.Db.ShadowPort,
@@ -105,14 +105,14 @@ func squashMigrations(ctx context.Context, migrations []string, fsys afero.Fs, o
Database: "postgres",
}
var before, after bytes.Buffer
- if err := dump.DumpSchema(ctx, config, schemas, false, false, &before); err != nil {
+ if err := migration.DumpSchema(ctx, config, &before, dump.DockerExec, opt); err != nil {
return err
}
// 2. Migrate to target version
if err := migration.ApplyMigrations(ctx, migrations, conn, afero.NewIOFS(fsys)); err != nil {
return err
}
- if err := dump.DumpSchema(ctx, config, schemas, false, false, &after); err != nil {
+ if err := migration.DumpSchema(ctx, config, &after, dump.DockerExec, opt); err != nil {
return err
}
// 3. Dump migrated schema
@@ -122,7 +122,7 @@ func squashMigrations(ctx context.Context, migrations []string, fsys afero.Fs, o
return errors.Errorf("failed to open migration file: %w", err)
}
defer f.Close()
- if err := dump.DumpSchema(ctx, config, nil, false, false, f); err != nil {
+ if err := migration.DumpSchema(ctx, config, f, dump.DockerExec); err != nil {
return err
}
// 4. Append managed schema diffs
diff --git a/internal/postgresConfig/update/update.go b/internal/postgresConfig/update/update.go
index 94632d4860..f031b33782 100644
--- a/internal/postgresConfig/update/update.go
+++ b/internal/postgresConfig/update/update.go
@@ -4,6 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
+ "fmt"
"strconv"
"strings"
@@ -53,6 +54,12 @@ func Run(ctx context.Context, projectRef string, values []string, replaceOverrid
if noRestart {
finalOverrides["restart_database"] = false
}
+ // statement_timeout and wal_sender_timeout must be typed as string
+ for k, v := range finalOverrides {
+ if _, ok := v.(string); strings.HasSuffix(k, "_timeout") && !ok {
+ finalOverrides[k] = fmt.Sprintf("%v", v)
+ }
+ }
bts, err := json.Marshal(finalOverrides)
if err != nil {
return errors.Errorf("failed to serialize config overrides: %w", err)
diff --git a/internal/projects/apiKeys/api_keys.go b/internal/projects/apiKeys/api_keys.go
index 5d5af351cd..32a6d1cf05 100644
--- a/internal/projects/apiKeys/api_keys.go
+++ b/internal/projects/apiKeys/api_keys.go
@@ -7,6 +7,7 @@ import (
"strings"
"github.com/go-errors/errors"
+ "github.com/oapi-codegen/nullable"
"github.com/spf13/afero"
"github.com/supabase/cli/internal/migration/list"
"github.com/supabase/cli/internal/utils"
@@ -25,7 +26,9 @@ func Run(ctx context.Context, projectRef string, fsys afero.Fs) error {
|-|-|
`
for _, entry := range keys {
- table += fmt.Sprintf("|`%s`|`%s`|\n", strings.ReplaceAll(entry.Name, "|", "\\|"), entry.ApiKey)
+ k := strings.ReplaceAll(entry.Name, "|", "\\|")
+ v := toValue(entry.ApiKey)
+ table += fmt.Sprintf("|`%s`|`%s`|\n", k, v)
}
return list.RenderTable(table)
@@ -51,7 +54,14 @@ func ToEnv(keys []api.ApiKeyResponse) map[string]string {
for _, entry := range keys {
name := strings.ToUpper(entry.Name)
key := fmt.Sprintf("SUPABASE_%s_KEY", name)
- envs[key] = entry.ApiKey
+ envs[key] = toValue(entry.ApiKey)
}
return envs
}
+
+func toValue(v nullable.Nullable[string]) string {
+ if value, err := v.Get(); err == nil {
+ return value
+ }
+ return "******"
+}
diff --git a/internal/projects/apiKeys/api_keys_test.go b/internal/projects/apiKeys/api_keys_test.go
index 48730a0a72..82030c003c 100644
--- a/internal/projects/apiKeys/api_keys_test.go
+++ b/internal/projects/apiKeys/api_keys_test.go
@@ -7,6 +7,7 @@ import (
"testing"
"github.com/h2non/gock"
+ "github.com/oapi-codegen/nullable"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
"github.com/supabase/cli/internal/testing/apitest"
@@ -31,7 +32,10 @@ func TestProjectApiKeysCommand(t *testing.T) {
Reply(200).
JSON([]api.ApiKeyResponse{{
Name: "Test ApiKey",
- ApiKey: "dummy-api-key-value",
+ ApiKey: nullable.NewNullableWithValue("dummy-api-key-value"),
+ }, {
+ Name: "Test NullKey",
+ ApiKey: nullable.NewNullNullable[string](),
}})
// Run test
err := Run(context.Background(), project, fsys)
diff --git a/internal/projects/create/create.go b/internal/projects/create/create.go
index bfd4617690..6d565bfcfe 100644
--- a/internal/projects/create/create.go
+++ b/internal/projects/create/create.go
@@ -15,7 +15,7 @@ import (
"github.com/supabase/cli/pkg/api"
)
-func Run(ctx context.Context, params api.V1CreateProjectBodyDto, fsys afero.Fs) error {
+func Run(ctx context.Context, params api.V1CreateProjectBody, fsys afero.Fs) error {
if err := promptMissingParams(ctx, ¶ms); err != nil {
return err
}
@@ -50,7 +50,7 @@ func printKeyValue(key, value string) string {
return key + ":" + spaces + value
}
-func promptMissingParams(ctx context.Context, body *api.V1CreateProjectBodyDto) error {
+func promptMissingParams(ctx context.Context, body *api.V1CreateProjectBody) error {
var err error
if len(body.Name) == 0 {
if body.Name, err = promptProjectName(ctx); err != nil {
@@ -107,7 +107,7 @@ func promptOrgId(ctx context.Context) (string, error) {
return choice.Details, nil
}
-func promptProjectRegion(ctx context.Context) (api.V1CreateProjectBodyDtoRegion, error) {
+func promptProjectRegion(ctx context.Context) (api.V1CreateProjectBodyRegion, error) {
title := "Which region do you want to host the project in?"
items := make([]utils.PromptItem, len(utils.RegionMap))
i := 0
@@ -119,5 +119,5 @@ func promptProjectRegion(ctx context.Context) (api.V1CreateProjectBodyDtoRegion,
if err != nil {
return "", err
}
- return api.V1CreateProjectBodyDtoRegion(choice.Summary), nil
+ return api.V1CreateProjectBodyRegion(choice.Summary), nil
}
diff --git a/internal/projects/create/create_test.go b/internal/projects/create/create_test.go
index 879421d724..c67c7a35e5 100644
--- a/internal/projects/create/create_test.go
+++ b/internal/projects/create/create_test.go
@@ -14,11 +14,11 @@ import (
)
func TestProjectCreateCommand(t *testing.T) {
- var params = api.V1CreateProjectBodyDto{
+ var params = api.V1CreateProjectBody{
Name: "Test Project",
OrganizationId: "combined-fuchsia-lion",
DbPass: "redacted",
- Region: api.V1CreateProjectBodyDtoRegionUsWest1,
+ Region: api.V1CreateProjectBodyRegionUsWest1,
}
t.Run("creates a new project", func(t *testing.T) {
diff --git a/internal/projects/list/list.go b/internal/projects/list/list.go
index babded41d4..da788de687 100644
--- a/internal/projects/list/list.go
+++ b/internal/projects/list/list.go
@@ -53,7 +53,7 @@ func Run(ctx context.Context, fsys afero.Fs) error {
project.OrganizationId,
project.Id,
strings.ReplaceAll(project.Name, "|", "\\|"),
- formatRegion(project.Region),
+ utils.FormatRegion(project.Region),
utils.FormatTimestamp(project.CreatedAt),
)
}
@@ -77,10 +77,3 @@ func formatBullet(value bool) string {
}
return " "
}
-
-func formatRegion(region string) string {
- if readable, ok := utils.RegionMap[region]; ok {
- return readable
- }
- return region
-}
diff --git a/internal/secrets/set/set.go b/internal/secrets/set/set.go
index 765599299b..159a2b4e06 100644
--- a/internal/secrets/set/set.go
+++ b/internal/secrets/set/set.go
@@ -43,7 +43,7 @@ func Run(ctx context.Context, projectRef, envFilePath string, args []string, fsy
return nil
}
-func ListSecrets(envFilePath string, fsys afero.Fs, envArgs ...string) ([]api.CreateSecretBody, error) {
+func ListSecrets(envFilePath string, fsys afero.Fs, envArgs ...string) (api.CreateSecretBody, error) {
envMap := map[string]string{}
for name, secret := range utils.Config.EdgeRuntime.Secrets {
if len(secret.SHA256) > 0 {
@@ -64,17 +64,17 @@ func ListSecrets(envFilePath string, fsys afero.Fs, envArgs ...string) ([]api.Cr
}
envMap[name] = value
}
- var result []api.CreateSecretBody
+ var result api.CreateSecretBody
for name, value := range envMap {
// Lower case prefix is accepted by API
if strings.HasPrefix(name, "SUPABASE_") {
fmt.Fprintln(os.Stderr, "Env name cannot start with SUPABASE_, skipping: "+name)
continue
}
- result = append(result, api.CreateSecretBody{
+ result = append(result, api.CreateSecretBody{{
Name: name,
Value: value,
- })
+ }}...)
}
return result, nil
}
diff --git a/internal/secrets/set/set_test.go b/internal/secrets/set/set_test.go
index df18aa8563..a99cfd8c8d 100644
--- a/internal/secrets/set/set_test.go
+++ b/internal/secrets/set/set_test.go
@@ -16,8 +16,8 @@ import (
)
func TestSecretSetCommand(t *testing.T) {
- dummy := api.CreateSecretBody{Name: "my_name", Value: "my_value"}
- dummyEnv := dummy.Name + "=" + dummy.Value
+ dummy := api.CreateSecretBody{{Name: "my_name", Value: "my_value"}}
+ dummyEnv := dummy[0].Name + "=" + dummy[0].Value
utils.CurrentDirAbs = "/tmp"
t.Run("Sets secret via cli args", func(t *testing.T) {
@@ -33,7 +33,7 @@ func TestSecretSetCommand(t *testing.T) {
gock.New(utils.DefaultApiHost).
Post("/v1/projects/" + project + "/secrets").
MatchType("json").
- JSON(api.V1BulkCreateSecretsJSONRequestBody{dummy}).
+ JSON(dummy).
Reply(http.StatusCreated)
// Run test
err := Run(context.Background(), project, "", []string{dummyEnv}, fsys)
@@ -56,7 +56,7 @@ func TestSecretSetCommand(t *testing.T) {
gock.New(utils.DefaultApiHost).
Post("/v1/projects/" + project + "/secrets").
MatchType("json").
- JSON(api.V1BulkCreateSecretsJSONRequestBody{dummy}).
+ JSON(dummy).
Reply(http.StatusCreated)
// Run test
err := Run(context.Background(), project, "/tmp/.env", []string{}, fsys)
@@ -106,7 +106,7 @@ func TestSecretSetCommand(t *testing.T) {
gock.New(utils.DefaultApiHost).
Post("/v1/projects/" + project + "/secrets").
MatchType("json").
- JSON(api.V1BulkCreateSecretsJSONRequestBody{dummy}).
+ JSON(dummy).
ReplyError(errors.New("network error"))
// Run test
err := Run(context.Background(), project, "", []string{dummyEnv}, fsys)
@@ -128,7 +128,7 @@ func TestSecretSetCommand(t *testing.T) {
gock.New(utils.DefaultApiHost).
Post("/v1/projects/" + project + "/secrets").
MatchType("json").
- JSON(api.V1BulkCreateSecretsJSONRequestBody{dummy}).
+ JSON(dummy).
Reply(500).
JSON(map[string]string{"message": "unavailable"})
// Run test
diff --git a/internal/services/services.go b/internal/services/services.go
index ebc08efcac..a84e3a878b 100644
--- a/internal/services/services.go
+++ b/internal/services/services.go
@@ -9,6 +9,7 @@ import (
"sync"
"github.com/spf13/afero"
+ "github.com/spf13/viper"
"github.com/supabase/cli/internal/migration/list"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/internal/utils/flags"
@@ -19,7 +20,7 @@ func Run(ctx context.Context, fsys afero.Fs) error {
if err := flags.LoadProjectRef(fsys); err != nil && !errors.Is(err, utils.ErrNotLinked) {
fmt.Fprintln(os.Stderr, err)
}
- if err := utils.Config.Load("", utils.NewRootFS(fsys)); err != nil && !errors.Is(err, os.ErrNotExist) {
+ if err := flags.LoadConfig(fsys); err != nil {
fmt.Fprintln(os.Stderr, err)
}
@@ -79,24 +80,22 @@ func listRemoteImages(ctx context.Context, projectRef string) map[string]string
wg.Wait()
return linked
}
- api := tenant.NewTenantAPI(ctx, projectRef, keys.Anon)
- wg.Add(3)
+ api := tenant.NewTenantAPI(ctx, projectRef, keys.ServiceRole)
+ wg.Add(2)
go func() {
defer wg.Done()
if version, err := api.GetGotrueVersion(ctx); err == nil {
linked[utils.Config.Auth.Image] = version
+ } else if viper.GetBool("DEBUG") {
+ fmt.Fprintln(os.Stderr, err)
}
}()
go func() {
defer wg.Done()
if version, err := api.GetPostgrestVersion(ctx); err == nil {
linked[utils.Config.Api.Image] = version
- }
- }()
- go func() {
- defer wg.Done()
- if version, err := api.GetStorageVersion(ctx); err == nil {
- linked[utils.Config.Storage.Image] = version
+ } else if viper.GetBool("DEBUG") {
+ fmt.Fprintln(os.Stderr, err)
}
}()
wg.Wait()
diff --git a/internal/ssl_enforcement/update/update.go b/internal/ssl_enforcement/update/update.go
index 51b0b67250..8f1b5f56d9 100644
--- a/internal/ssl_enforcement/update/update.go
+++ b/internal/ssl_enforcement/update/update.go
@@ -14,11 +14,9 @@ func Run(ctx context.Context, projectRef string, enforceDbSsl bool, fsys afero.F
// 1. sanity checks
// 2. update restrictions
{
- resp, err := utils.GetSupabase().V1UpdateSslEnforcementConfigWithResponse(ctx, projectRef, api.V1UpdateSslEnforcementConfigJSONRequestBody{
- RequestedConfig: api.SslEnforcements{
- Database: enforceDbSsl,
- },
- })
+ body := api.V1UpdateSslEnforcementConfigJSONRequestBody{}
+ body.RequestedConfig.Database = enforceDbSsl
+ resp, err := utils.GetSupabase().V1UpdateSslEnforcementConfigWithResponse(ctx, projectRef, body)
if err != nil {
return errors.Errorf("failed to update ssl enforcement: %w", err)
}
diff --git a/internal/sso/create/create.go b/internal/sso/create/create.go
index 802bbd05b3..83cadd5fba 100644
--- a/internal/sso/create/create.go
+++ b/internal/sso/create/create.go
@@ -49,12 +49,17 @@ func Run(ctx context.Context, params RunParams) error {
}
if params.AttributeMapping != "" {
- data, err := saml.ReadAttributeMappingFile(Fs, params.AttributeMapping)
- if err != nil {
+ body.AttributeMapping = &struct {
+ Keys map[string]struct {
+ Array *bool "json:\"array,omitempty\""
+ Default *interface{} "json:\"default,omitempty\""
+ Name *string "json:\"name,omitempty\""
+ Names *[]string "json:\"names,omitempty\""
+ } "json:\"keys\""
+ }{}
+ if err := saml.ReadAttributeMappingFile(Fs, params.AttributeMapping, body.AttributeMapping); err != nil {
return err
}
-
- body.AttributeMapping = data
}
if params.Domains != nil {
@@ -76,13 +81,7 @@ func Run(ctx context.Context, params RunParams) error {
switch params.Format {
case utils.OutputPretty:
- return render.SingleMarkdown(api.Provider{
- Id: resp.JSON201.Id,
- Saml: resp.JSON201.Saml,
- Domains: resp.JSON201.Domains,
- CreatedAt: resp.JSON201.CreatedAt,
- UpdatedAt: resp.JSON201.UpdatedAt,
- })
+ return render.SingleMarkdown(api.GetProviderResponse(*resp.JSON201))
case utils.OutputEnv:
return nil
default:
diff --git a/internal/sso/get/get.go b/internal/sso/get/get.go
index 75de6abcdc..07e6251f7e 100644
--- a/internal/sso/get/get.go
+++ b/internal/sso/get/get.go
@@ -7,13 +7,17 @@ import (
"os"
"github.com/go-errors/errors"
+ "github.com/google/uuid"
"github.com/supabase/cli/internal/sso/internal/render"
"github.com/supabase/cli/internal/utils"
- "github.com/supabase/cli/pkg/api"
)
func Run(ctx context.Context, ref, providerId, format string) error {
- resp, err := utils.GetSupabase().V1GetASsoProviderWithResponse(ctx, ref, providerId)
+ parsed, err := uuid.Parse(providerId)
+ if err != nil {
+ return errors.Errorf("failed to parse provider id: %w", err)
+ }
+ resp, err := utils.GetSupabase().V1GetASsoProviderWithResponse(ctx, ref, parsed)
if err != nil {
return err
}
@@ -31,13 +35,7 @@ func Run(ctx context.Context, ref, providerId, format string) error {
_, err := fmt.Println(*resp.JSON200.Saml.MetadataXml)
return err
case utils.OutputPretty:
- return render.SingleMarkdown(api.Provider{
- Id: resp.JSON200.Id,
- Saml: resp.JSON200.Saml,
- Domains: resp.JSON200.Domains,
- CreatedAt: resp.JSON200.CreatedAt,
- UpdatedAt: resp.JSON200.UpdatedAt,
- })
+ return render.SingleMarkdown(*resp.JSON200)
case utils.OutputEnv:
return errors.Errorf("--output env flag is not supported")
default:
diff --git a/internal/sso/internal/render/render.go b/internal/sso/internal/render/render.go
index 3f3a03db1d..e0af9497a4 100644
--- a/internal/sso/internal/render/render.go
+++ b/internal/sso/internal/render/render.go
@@ -12,16 +12,16 @@ import (
"github.com/supabase/cli/pkg/api"
)
-func formatProtocol(provider api.Provider) string {
+func formatProtocol(provider api.GetProviderResponse) string {
protocol := "SAML 2.0"
- if provider.Saml == nil || *provider.Saml == (api.SamlDescriptor{}) {
+ if provider.Saml == nil {
protocol = "unknown"
}
return protocol
}
-func formatMetadataSource(provider api.Provider) string {
+func formatMetadataSource(provider api.GetProviderResponse) string {
source := "FILE"
if provider.Saml != nil && provider.Saml.MetadataUrl != nil && *provider.Saml.MetadataUrl != "" {
source = *provider.Saml.MetadataUrl
@@ -30,15 +30,6 @@ func formatMetadataSource(provider api.Provider) string {
return source
}
-func formatAttributeMapping(attributeMapping *api.AttributeMapping) (string, error) {
- data, err := json.MarshalIndent(attributeMapping, "", " ")
- if err != nil {
- return "", errors.Errorf("failed to marshal attribute mapping: %w", err)
- }
-
- return string(data), nil
-}
-
func formatTimestamp(timestamp *string) string {
if timestamp == nil {
return ""
@@ -47,7 +38,7 @@ func formatTimestamp(timestamp *string) string {
return utils.FormatTimestamp(*timestamp)
}
-func formatDomains(provider api.Provider) string {
+func formatDomains(provider api.GetProviderResponse) string {
var domains []string
if provider.Domains != nil {
@@ -66,7 +57,7 @@ func formatDomains(provider api.Provider) string {
return domainsString
}
-func formatEntityID(provider api.Provider) string {
+func formatEntityID(provider api.GetProviderResponse) string {
entityID := "-"
if provider.Saml != nil && provider.Saml.EntityId != "" {
entityID = provider.Saml.EntityId
@@ -75,12 +66,12 @@ func formatEntityID(provider api.Provider) string {
return entityID
}
-func ListMarkdown(providers []api.Provider) error {
+func ListMarkdown(providers api.ListProvidersResponse) error {
markdownTable := []string{
"|TYPE|IDENTITY PROVIDER ID|DOMAINS|SAML 2.0 `EntityID`|CREATED AT (UTC)|UPDATED AT (UTC)|\n|-|-|-|-|-|-|\n",
}
- for _, item := range providers {
+ for _, item := range providers.Items {
markdownTable = append(markdownTable, fmt.Sprintf(
"|`%s`|`%s`|`%s`|`%s`|`%s`|`%s`|\n",
formatProtocol(item),
@@ -95,7 +86,7 @@ func ListMarkdown(providers []api.Provider) error {
return list.RenderTable(strings.Join(markdownTable, ""))
}
-func SingleMarkdown(provider api.Provider) error {
+func SingleMarkdown(provider api.GetProviderResponse) error {
markdownTable := []string{
"|PROPERTY|VALUE|",
"|-|-|",
@@ -139,12 +130,12 @@ func SingleMarkdown(provider api.Provider) error {
))
if provider.Saml != nil && provider.Saml.AttributeMapping != nil && len(provider.Saml.AttributeMapping.Keys) > 0 {
- attributeMapping, err := formatAttributeMapping(provider.Saml.AttributeMapping)
+ attributeMapping, err := json.MarshalIndent(provider.Saml.AttributeMapping, "", " ")
if err != nil {
- return err
+ return errors.Errorf("failed to marshal attribute mapping: %w", err)
}
- markdownTable = append(markdownTable, "", "## Attribute Mapping", "```json", attributeMapping, "```")
+ markdownTable = append(markdownTable, "", "## Attribute Mapping", "```json", string(attributeMapping), "```")
}
if provider.Saml != nil && provider.Saml.MetadataXml != nil && *provider.Saml.MetadataXml != "" {
diff --git a/internal/sso/internal/saml/files.go b/internal/sso/internal/saml/files.go
index 62e0846e3c..023fe08931 100644
--- a/internal/sso/internal/saml/files.go
+++ b/internal/sso/internal/saml/files.go
@@ -12,7 +12,6 @@ import (
"github.com/go-errors/errors"
"github.com/spf13/afero"
- "github.com/supabase/cli/pkg/api"
"github.com/supabase/cli/pkg/fetcher"
)
@@ -23,6 +22,7 @@ func ReadMetadataFile(fsys afero.Fs, path string) (string, error) {
if err != nil {
return "", errors.Errorf("failed to open metadata file: %w", err)
}
+ defer file.Close()
data, err := io.ReadAll(file)
if err != nil {
@@ -36,19 +36,19 @@ func ReadMetadataFile(fsys afero.Fs, path string) (string, error) {
return string(data), nil
}
-func ReadAttributeMappingFile(fsys afero.Fs, path string) (*api.AttributeMapping, error) {
+func ReadAttributeMappingFile(fsys afero.Fs, path string, mapping any) error {
file, err := fsys.Open(path)
if err != nil {
- return nil, errors.Errorf("failed to open attribute mapping: %w", err)
+ return errors.Errorf("failed to open attribute mapping: %w", err)
}
+ defer file.Close()
- var mapping api.AttributeMapping
dec := json.NewDecoder(file)
- if err := dec.Decode(&mapping); err != nil {
- return nil, errors.Errorf("failed to parse attribute mapping: %w", err)
+ if err := dec.Decode(mapping); err != nil {
+ return errors.Errorf("failed to parse attribute mapping: %w", err)
}
- return &mapping, nil
+ return nil
}
func ValidateMetadata(data []byte, source string) error {
diff --git a/internal/sso/internal/saml/files_test.go b/internal/sso/internal/saml/files_test.go
index ec7afe6dec..320f2df132 100644
--- a/internal/sso/internal/saml/files_test.go
+++ b/internal/sso/internal/saml/files_test.go
@@ -8,28 +8,46 @@ import (
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+ "github.com/supabase/cli/pkg/api"
+ "github.com/supabase/cli/pkg/cast"
)
func TestReadAttributeMappingFile(t *testing.T) {
t.Run("open file that does not exist", func(t *testing.T) {
- _, err := ReadAttributeMappingFile(afero.NewMemMapFs(), "/does-not-exist")
+ err := ReadAttributeMappingFile(afero.NewMemMapFs(), "/does-not-exist", nil)
assert.ErrorIs(t, err, os.ErrNotExist)
})
t.Run("open file that is not valid JSON", func(t *testing.T) {
fs := afero.NewMemMapFs()
require.NoError(t, afero.WriteFile(fs, "/not-valid-json", []byte("not-valid-JSON"), 0755))
-
- _, err := ReadAttributeMappingFile(fs, "/not-valid-json")
+ var body api.CreateProviderBody
+ err := ReadAttributeMappingFile(fs, "/not-valid-json", body.AttributeMapping)
assert.ErrorContains(t, err, "failed to parse attribute mapping")
})
t.Run("open valid file", func(t *testing.T) {
fs := afero.NewMemMapFs()
- require.NoError(t, afero.WriteFile(fs, "/valid-json", []byte(`{"keys":{"abc":{"names":["x","y","z"],"default":2,"name":"k"}}}`), 0755))
-
- _, err := ReadAttributeMappingFile(fs, "/valid-json")
+ data := `{"keys":{"abc":{"names":["x","y","z"],"default":2,"name":"k"}}}`
+ require.NoError(t, afero.WriteFile(fs, "/valid-json", []byte(data), 0755))
+ body := api.CreateProviderBody{
+ AttributeMapping: &struct {
+ Keys map[string]struct {
+ Array *bool "json:\"array,omitempty\""
+ Default *interface{} "json:\"default,omitempty\""
+ Name *string "json:\"name,omitempty\""
+ Names *[]string "json:\"names,omitempty\""
+ } "json:\"keys\""
+ }{},
+ }
+ err := ReadAttributeMappingFile(fs, "/valid-json", body.AttributeMapping)
assert.NoError(t, err)
+ assert.Len(t, body.AttributeMapping.Keys, 1)
+ value := body.AttributeMapping.Keys["abc"]
+ assert.Equal(t, cast.Ptr("k"), value.Name)
+ assert.Equal(t, &[]string{"x", "y", "z"}, value.Names)
+ assert.NotNil(t, value.Default)
+ assert.Equal(t, float64(2), *value.Default)
})
}
diff --git a/internal/sso/list/list.go b/internal/sso/list/list.go
index efacb1a04c..a517149bed 100644
--- a/internal/sso/list/list.go
+++ b/internal/sso/list/list.go
@@ -26,7 +26,7 @@ func Run(ctx context.Context, ref, format string) error {
switch format {
case utils.OutputPretty:
- return render.ListMarkdown(resp.JSON200.Items)
+ return render.ListMarkdown(*resp.JSON200)
default:
return utils.EncodeOutput(format, os.Stdout, map[string]any{
diff --git a/internal/sso/remove/remove.go b/internal/sso/remove/remove.go
index 69bf5c4d02..9de49be3af 100644
--- a/internal/sso/remove/remove.go
+++ b/internal/sso/remove/remove.go
@@ -6,13 +6,18 @@ import (
"os"
"github.com/go-errors/errors"
+ "github.com/google/uuid"
"github.com/supabase/cli/internal/sso/internal/render"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/pkg/api"
)
func Run(ctx context.Context, ref, providerId, format string) error {
- resp, err := utils.GetSupabase().V1DeleteASsoProviderWithResponse(ctx, ref, providerId)
+ parsed, err := uuid.Parse(providerId)
+ if err != nil {
+ return errors.Errorf("failed to parse provider ID: %w", err)
+ }
+ resp, err := utils.GetSupabase().V1DeleteASsoProviderWithResponse(ctx, ref, parsed)
if err != nil {
return errors.Errorf("failed to remove sso provider: %w", err)
}
@@ -27,13 +32,7 @@ func Run(ctx context.Context, ref, providerId, format string) error {
switch format {
case utils.OutputPretty:
- return render.SingleMarkdown(api.Provider{
- Id: resp.JSON200.Id,
- Saml: resp.JSON200.Saml,
- Domains: resp.JSON200.Domains,
- CreatedAt: resp.JSON200.CreatedAt,
- UpdatedAt: resp.JSON200.UpdatedAt,
- })
+ return render.SingleMarkdown(api.GetProviderResponse(*resp.JSON200))
case utils.OutputEnv:
return nil
default:
diff --git a/internal/sso/update/update.go b/internal/sso/update/update.go
index 5729a64e7c..f92357c70a 100644
--- a/internal/sso/update/update.go
+++ b/internal/sso/update/update.go
@@ -6,6 +6,7 @@ import (
"os"
"github.com/go-errors/errors"
+ "github.com/google/uuid"
"github.com/spf13/afero"
"github.com/supabase/cli/internal/sso/internal/render"
"github.com/supabase/cli/internal/sso/internal/saml"
@@ -31,14 +32,18 @@ type RunParams struct {
}
func Run(ctx context.Context, params RunParams) error {
- getResp, err := utils.GetSupabase().V1GetASsoProviderWithResponse(ctx, params.ProjectRef, params.ProviderID)
+ parsed, err := uuid.Parse(params.ProviderID)
+ if err != nil {
+ return errors.Errorf("failed to parse provider ID: %w", err)
+ }
+ getResp, err := utils.GetSupabase().V1GetASsoProviderWithResponse(ctx, params.ProjectRef, parsed)
if err != nil {
return errors.Errorf("failed to get sso provider: %w", err)
}
if getResp.JSON200 == nil {
if getResp.StatusCode() == http.StatusNotFound {
- return errors.Errorf("An identity provider with ID %q could not be found.", params.ProviderID)
+ return errors.Errorf("An identity provider with ID %q could not be found.", parsed)
}
return errors.New("unexpected error fetching identity provider: " + string(getResp.Body))
@@ -64,12 +69,17 @@ func Run(ctx context.Context, params RunParams) error {
}
if params.AttributeMapping != "" {
- data, err := saml.ReadAttributeMappingFile(Fs, params.AttributeMapping)
- if err != nil {
+ body.AttributeMapping = &struct {
+ Keys map[string]struct {
+ Array *bool "json:\"array,omitempty\""
+ Default *interface{} "json:\"default,omitempty\""
+ Name *string "json:\"name,omitempty\""
+ Names *[]string "json:\"names,omitempty\""
+ } "json:\"keys\""
+ }{}
+ if err := saml.ReadAttributeMappingFile(Fs, params.AttributeMapping, body.AttributeMapping); err != nil {
return err
}
-
- body.AttributeMapping = data
}
if len(params.Domains) != 0 {
@@ -101,7 +111,7 @@ func Run(ctx context.Context, params RunParams) error {
body.Domains = &domains
}
- putResp, err := utils.GetSupabase().V1UpdateASsoProviderWithResponse(ctx, params.ProjectRef, params.ProviderID, body)
+ putResp, err := utils.GetSupabase().V1UpdateASsoProviderWithResponse(ctx, params.ProjectRef, parsed, body)
if err != nil {
return errors.Errorf("failed to update sso provider: %w", err)
}
@@ -112,13 +122,7 @@ func Run(ctx context.Context, params RunParams) error {
switch params.Format {
case utils.OutputPretty:
- return render.SingleMarkdown(api.Provider{
- Id: putResp.JSON200.Id,
- Saml: putResp.JSON200.Saml,
- Domains: putResp.JSON200.Domains,
- CreatedAt: putResp.JSON200.CreatedAt,
- UpdatedAt: putResp.JSON200.UpdatedAt,
- })
+ return render.SingleMarkdown(api.GetProviderResponse(*putResp.JSON200))
case utils.OutputEnv:
return nil
default:
diff --git a/internal/start/start.go b/internal/start/start.go
index 50c294f607..f922addf31 100644
--- a/internal/start/start.go
+++ b/internal/start/start.go
@@ -31,7 +31,6 @@ import (
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/internal/utils/flags"
"github.com/supabase/cli/pkg/config"
- "golang.org/x/mod/semver"
)
func Run(ctx context.Context, fsys afero.Fs, excludedContainers []string, ignoreHealthCheck bool) error {
@@ -90,18 +89,10 @@ type kongConfig struct {
ApiPort uint16
}
-// TODO: deprecate after removing storage headers from kong
-func StorageVersionBelow(target string) bool {
- parts := strings.Split(utils.Config.Storage.Image, ":v")
- return semver.Compare(parts[len(parts)-1], target) < 0
-}
-
var (
//go:embed templates/kong.yml
kongConfigEmbed string
- kongConfigTemplate = template.Must(template.New("kongConfig").Funcs(template.FuncMap{
- "StorageVersionBelow": StorageVersionBelow,
- }).Parse(kongConfigEmbed))
+ kongConfigTemplate = template.Must(template.New("kongConfig").Parse(kongConfigEmbed))
//go:embed templates/custom_nginx.template
nginxConfigEmbed string
@@ -154,7 +145,7 @@ func run(p utils.Program, ctx context.Context, fsys afero.Fs, excludedContainers
excluded[name] = true
}
- jwks, err := utils.Config.Auth.ResolveJWKS(ctx)
+ jwks, err := utils.Config.Auth.ResolveJWKS(ctx, fsys)
if err != nil {
return err
}
@@ -185,7 +176,7 @@ func run(p utils.Program, ctx context.Context, fsys afero.Fs, excludedContainers
"LOGFLARE_MIN_CLUSTER_SIZE=1",
"LOGFLARE_SINGLE_TENANT=true",
"LOGFLARE_SUPABASE_MODE=true",
- "LOGFLARE_API_KEY=" + utils.Config.Analytics.ApiKey,
+ "LOGFLARE_PRIVATE_ACCESS_TOKEN=" + utils.Config.Analytics.ApiKey,
"LOGFLARE_LOG_LEVEL=warn",
"LOGFLARE_NODE_HOST=127.0.0.1",
"LOGFLARE_FEATURE_FLAG_OVERRIDE='multibackend=true'",
@@ -289,7 +280,8 @@ EOF
}
env = append(env, "DOCKER_HOST="+dindHost.String())
case "npipe":
- fmt.Fprintln(os.Stderr, utils.Yellow("WARNING:"), "analytics requires docker daemon exposed on tcp://localhost:2375")
+ const dockerDaemonNeededErr = "Analytics on Windows requires Docker daemon exposed on tcp://localhost:2375.\nSee https://supabase.com/docs/guides/local-development/cli/getting-started?queryGroups=platform&platform=windows#running-supabase-locally for more details."
+ fmt.Fprintln(os.Stderr, utils.Yellow("WARNING:"), dockerDaemonNeededErr)
env = append(env, "DOCKER_HOST="+dindHost.String())
case "unix":
if dindHost, err = client.ParseHostURL(client.DefaultDockerHost); err != nil {
@@ -337,7 +329,9 @@ EOF
); err != nil {
return err
}
- started = append(started, utils.VectorId)
+ if parsed.Scheme != "npipe" {
+ started = append(started, utils.VectorId)
+ }
}
// Start Kong.
@@ -464,7 +458,7 @@ EOF
"GOTRUE_JWT_AUD=authenticated",
"GOTRUE_JWT_DEFAULT_GROUP_NAME=authenticated",
fmt.Sprintf("GOTRUE_JWT_EXP=%v", utils.Config.Auth.JwtExpiry),
- "GOTRUE_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
+ "GOTRUE_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
"GOTRUE_JWT_ISSUER=" + utils.GetApiUrl("/auth/v1"),
fmt.Sprintf("GOTRUE_EXTERNAL_EMAIL_ENABLED=%v", utils.Config.Auth.Email.EnableSignup),
@@ -511,6 +505,12 @@ EOF
fmt.Sprintf("GOTRUE_RATE_LIMIT_OTP=%v", utils.Config.Auth.RateLimit.SignInSignUps),
fmt.Sprintf("GOTRUE_RATE_LIMIT_VERIFY=%v", utils.Config.Auth.RateLimit.TokenVerifications),
fmt.Sprintf("GOTRUE_RATE_LIMIT_SMS_SENT=%v", utils.Config.Auth.RateLimit.SmsSent),
+ fmt.Sprintf("GOTRUE_RATE_LIMIT_WEB3=%v", utils.Config.Auth.RateLimit.Web3),
+ }
+
+ // Since signing key is validated by ResolveJWKS, simply read the key file.
+ if keys, err := afero.ReadFile(fsys, utils.Config.Auth.SigningKeysPath); err == nil && len(keys) > 0 {
+ env = append(env, "GOTRUE_JWT_KEYS="+string(keys))
}
if utils.Config.Auth.Email.Smtp != nil && utils.Config.Auth.Email.Smtp.Enabled {
@@ -646,6 +646,14 @@ EOF
"GOTRUE_HOOK_SEND_EMAIL_SECRETS="+hook.Secrets.Value,
)
}
+ if hook := utils.Config.Auth.Hook.BeforeUserCreated; hook != nil && hook.Enabled {
+ env = append(
+ env,
+ "GOTRUE_HOOK_BEFORE_USER_CREATED_ENABLED=true",
+ "GOTRUE_HOOK_BEFORE_USER_CREATED_URI="+hook.URI,
+ "GOTRUE_HOOK_BEFORE_USER_CREATED_SECRETS="+hook.Secrets.Value,
+ )
+ }
if utils.Config.Auth.MFA.Phone.EnrollEnabled || utils.Config.Auth.MFA.Phone.VerifyEnabled {
env = append(
@@ -675,6 +683,7 @@ EOF
env = append(env, fmt.Sprintf("GOTRUE_EXTERNAL_%s_URL=%s", strings.ToUpper(name), config.Url))
}
}
+ env = append(env, fmt.Sprintf("GOTRUE_EXTERNAL_WEB3_SOLANA_ENABLED=%v", utils.Config.Auth.Web3.Solana.Enabled))
if _, err := utils.DockerStart(
ctx,
@@ -755,9 +764,9 @@ EOF
"DB_NAME=" + dbConfig.Database,
"DB_AFTER_CONNECT_QUERY=SET search_path TO _realtime",
"DB_ENC_KEY=" + utils.Config.Realtime.EncryptionKey,
- "API_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
+ "API_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
fmt.Sprintf("API_JWT_JWKS=%s", jwks),
- "METRICS_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
+ "METRICS_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
"APP_NAME=realtime",
"SECRET_KEY_BASE=" + utils.Config.Realtime.SecretKeyBase,
"ERL_AFLAGS=" + utils.ToRealtimeEnv(utils.Config.Realtime.IpVersion),
@@ -838,10 +847,11 @@ EOF
container.Config{
Image: utils.Config.Storage.Image,
Env: []string{
- "ANON_KEY=" + utils.Config.Auth.AnonKey,
- "SERVICE_KEY=" + utils.Config.Auth.ServiceRoleKey,
- "AUTH_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
- fmt.Sprintf("AUTH_JWT_JWKS=%s", jwks),
+ "DB_MIGRATIONS_FREEZE_AT=" + utils.Config.Storage.TargetMigration,
+ "ANON_KEY=" + utils.Config.Auth.AnonKey.Value,
+ "SERVICE_KEY=" + utils.Config.Auth.ServiceRoleKey.Value,
+ "AUTH_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
+ fmt.Sprintf("JWT_JWKS=%s", jwks),
fmt.Sprintf("DATABASE_URL=postgresql://supabase_storage_admin:%s@%s:%d/%s", dbConfig.Password, dbConfig.Host, dbConfig.Port, dbConfig.Database),
fmt.Sprintf("FILE_SIZE_LIMIT=%v", utils.Config.Storage.FileSizeLimit),
"STORAGE_BACKEND=file",
@@ -856,7 +866,6 @@ EOF
"S3_PROTOCOL_ACCESS_KEY_ID=" + utils.Config.Storage.S3Credentials.AccessKeyId,
"S3_PROTOCOL_ACCESS_KEY_SECRET=" + utils.Config.Storage.S3Credentials.SecretAccessKey,
"S3_PROTOCOL_PREFIX=/storage/v1",
- fmt.Sprintf("S3_ALLOW_FORWARDED_HEADER=%v", StorageVersionBelow("1.10.1")),
"UPLOAD_FILE_SIZE_LIMIT=52428800000",
"UPLOAD_FILE_SIZE_LIMIT_STANDARD=5242880000",
},
@@ -902,6 +911,8 @@ EOF
"IMGPROXY_MAX_SRC_FILE_SIZE=25000000",
"IMGPROXY_MAX_ANIMATION_FRAMES=60",
"IMGPROXY_ENABLE_WEBP_DETECTION=true",
+ "IMGPROXY_PRESETS=default=width:3000/height:8192",
+ "IMGPROXY_FORMAT_QUALITY=jpeg=80,avif=62,webp=80",
},
Healthcheck: &container.HealthConfig{
Test: []string{"CMD", "imgproxy", "health"},
@@ -982,14 +993,15 @@ EOF
container.Config{
Image: utils.Config.Studio.Image,
Env: []string{
+ "CURRENT_CLI_VERSION=" + utils.Version,
"STUDIO_PG_META_URL=http://" + utils.PgmetaId + ":8080",
"POSTGRES_PASSWORD=" + dbConfig.Password,
"SUPABASE_URL=http://" + utils.KongId + ":8000",
"SUPABASE_PUBLIC_URL=" + utils.Config.Studio.ApiUrl,
- "AUTH_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
- "SUPABASE_ANON_KEY=" + utils.Config.Auth.AnonKey,
- "SUPABASE_SERVICE_KEY=" + utils.Config.Auth.ServiceRoleKey,
- "LOGFLARE_API_KEY=" + utils.Config.Analytics.ApiKey,
+ "AUTH_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
+ "SUPABASE_ANON_KEY=" + utils.Config.Auth.AnonKey.Value,
+ "SUPABASE_SERVICE_KEY=" + utils.Config.Auth.ServiceRoleKey.Value,
+ "LOGFLARE_PRIVATE_ACCESS_TOKEN=" + utils.Config.Analytics.ApiKey,
"OPENAI_API_KEY=" + utils.Config.Studio.OpenaiApiKey.Value,
fmt.Sprintf("LOGFLARE_URL=http://%v:4000", utils.LogflareId),
fmt.Sprintf("NEXT_PUBLIC_ENABLE_LOGS=%v", utils.Config.Analytics.Enabled),
@@ -1056,8 +1068,8 @@ EOF
"CLUSTER_POSTGRES=true",
"SECRET_KEY_BASE=" + utils.Config.Db.Pooler.SecretKeyBase,
"VAULT_ENC_KEY=" + utils.Config.Db.Pooler.EncryptionKey,
- "API_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
- "METRICS_JWT_SECRET=" + utils.Config.Auth.JwtSecret,
+ "API_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
+ "METRICS_JWT_SECRET=" + utils.Config.Auth.JwtSecret.Value,
"REGION=local",
"RUN_JANITOR=true",
"ERL_AFLAGS=-proto_dist inet_tcp",
diff --git a/internal/start/templates/kong.yml b/internal/start/templates/kong.yml
index 8f1d28fd81..71f0453447 100644
--- a/internal/start/templates/kong.yml
+++ b/internal/start/templates/kong.yml
@@ -119,13 +119,6 @@ services:
- /storage/v1/
plugins:
- name: cors
-{{if StorageVersionBelow "1.10.1" }}
- - name: request-transformer
- config:
- add:
- headers:
- - "Forwarded: host={{ .ApiHost }}:{{ .ApiPort }};proto=http"
-{{end}}
- name: pg-meta
_comment: "pg-meta: /pg/* -> http://pg-meta:8080/*"
url: http://{{ .PgmetaId }}:8080/
diff --git a/internal/start/templates/vector.yaml b/internal/start/templates/vector.yaml
index 4c29864c0f..1b9e5f57c7 100644
--- a/internal/start/templates/vector.yaml
+++ b/internal/start/templates/vector.yaml
@@ -165,7 +165,9 @@ sinks:
method: "post"
request:
retry_max_duration_secs: 10
- uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=gotrue.logs.prod&api_key={{ .ApiKey }}"
+ headers:
+ x-api-key: "{{ .ApiKey }}"
+ uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=gotrue.logs.prod"
logflare_realtime:
type: "http"
inputs:
@@ -175,7 +177,9 @@ sinks:
method: "post"
request:
retry_max_duration_secs: 10
- uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=realtime.logs.prod&api_key={{ .ApiKey }}"
+ headers:
+ x-api-key: "{{ .ApiKey }}"
+ uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=realtime.logs.prod"
logflare_rest:
type: "http"
inputs:
@@ -185,7 +189,9 @@ sinks:
method: "post"
request:
retry_max_duration_secs: 10
- uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=postgREST.logs.prod&api_key={{ .ApiKey }}"
+ headers:
+ x-api-key: "{{ .ApiKey }}"
+ uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=postgREST.logs.prod"
logflare_db:
type: "http"
inputs:
@@ -195,7 +201,9 @@ sinks:
method: "post"
request:
retry_max_duration_secs: 10
- uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=postgres.logs&api_key={{ .ApiKey }}"
+ headers:
+ x-api-key: "{{ .ApiKey }}"
+ uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=postgres.logs"
logflare_functions:
type: "http"
inputs:
@@ -205,7 +213,9 @@ sinks:
method: "post"
request:
retry_max_duration_secs: 10
- uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=deno-relay-logs&api_key={{ .ApiKey }}"
+ headers:
+ x-api-key: "{{ .ApiKey }}"
+ uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=deno-relay-logs"
logflare_storage:
type: "http"
inputs:
@@ -215,7 +225,9 @@ sinks:
method: "post"
request:
retry_max_duration_secs: 10
- uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=storage.logs.prod.2&api_key={{ .ApiKey }}"
+ headers:
+ x-api-key: "{{ .ApiKey }}"
+ uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=storage.logs.prod.2"
logflare_kong:
type: "http"
inputs:
@@ -226,4 +238,6 @@ sinks:
method: "post"
request:
retry_max_duration_secs: 10
- uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=cloudflare.logs.prod&api_key={{ .ApiKey }}"
+ headers:
+ x-api-key: "{{ .ApiKey }}"
+ uri: "http://{{ .LogflareId }}:4000/api/logs?source_name=cloudflare.logs.prod"
diff --git a/internal/status/status.go b/internal/status/status.go
index 68eae2fe3d..7dd64ecd04 100644
--- a/internal/status/status.go
+++ b/internal/status/status.go
@@ -50,9 +50,9 @@ func (c *CustomName) toValues(exclude ...string) map[string]string {
values[c.StudioURL] = fmt.Sprintf("http://%s:%d", utils.Config.Hostname, utils.Config.Studio.Port)
}
if utils.Config.Auth.Enabled && !utils.SliceContains(exclude, utils.GotrueId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Auth.Image)) {
- values[c.JWTSecret] = utils.Config.Auth.JwtSecret
- values[c.AnonKey] = utils.Config.Auth.AnonKey
- values[c.ServiceRoleKey] = utils.Config.Auth.ServiceRoleKey
+ values[c.JWTSecret] = utils.Config.Auth.JwtSecret.Value
+ values[c.AnonKey] = utils.Config.Auth.AnonKey.Value
+ values[c.ServiceRoleKey] = utils.Config.Auth.ServiceRoleKey.Value
}
if utils.Config.Inbucket.Enabled && !utils.SliceContains(exclude, utils.InbucketId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Inbucket.Image)) {
values[c.InbucketURL] = fmt.Sprintf("http://%s:%d", utils.Config.Hostname, utils.Config.Inbucket.Port)
@@ -176,16 +176,11 @@ var (
func checkHTTPHead(ctx context.Context, path string) error {
healthOnce.Do(func() {
- server := utils.Config.Api.ExternalUrl
- header := func(req *http.Request) {
- req.Header.Add("apikey", utils.Config.Auth.AnonKey)
- }
- client := NewKongClient()
- healthClient = fetcher.NewFetcher(
- server,
- fetcher.WithHTTPClient(client),
- fetcher.WithRequestEditor(header),
- fetcher.WithExpectedStatus(http.StatusOK),
+ healthClient = fetcher.NewServiceGateway(
+ utils.Config.Api.ExternalUrl,
+ utils.Config.Auth.AnonKey.Value,
+ fetcher.WithHTTPClient(NewKongClient()),
+ fetcher.WithUserAgent("SupabaseCLI/"+utils.Version),
)
})
// HEAD method does not return response body
diff --git a/internal/storage/client/api.go b/internal/storage/client/api.go
index c8c2a02ef5..33b5d6711f 100644
--- a/internal/storage/client/api.go
+++ b/internal/storage/client/api.go
@@ -18,7 +18,7 @@ func NewStorageAPI(ctx context.Context, projectRef string) (storage.StorageAPI,
client.Fetcher = newLocalClient()
} else if viper.IsSet("AUTH_SERVICE_ROLE_KEY") {
// Special case for calling storage API without personal access token
- client.Fetcher = newRemoteClient(projectRef, utils.Config.Auth.ServiceRoleKey)
+ client.Fetcher = newRemoteClient(projectRef, utils.Config.Auth.ServiceRoleKey.Value)
} else if apiKey, err := tenant.GetApiKeys(ctx, projectRef); err == nil {
client.Fetcher = newRemoteClient(projectRef, apiKey.ServiceRole)
} else {
@@ -28,21 +28,19 @@ func NewStorageAPI(ctx context.Context, projectRef string) (storage.StorageAPI,
}
func newLocalClient() *fetcher.Fetcher {
- client := status.NewKongClient()
- return fetcher.NewFetcher(
+ return fetcher.NewServiceGateway(
utils.Config.Api.ExternalUrl,
- fetcher.WithHTTPClient(client),
- fetcher.WithBearerToken(utils.Config.Auth.ServiceRoleKey),
+ utils.Config.Auth.ServiceRoleKey.Value,
+ fetcher.WithHTTPClient(status.NewKongClient()),
fetcher.WithUserAgent("SupabaseCLI/"+utils.Version),
- fetcher.WithExpectedStatus(http.StatusOK),
)
}
func newRemoteClient(projectRef, token string) *fetcher.Fetcher {
- return fetcher.NewFetcher(
+ return fetcher.NewServiceGateway(
"https://"+utils.GetSupabaseHost(projectRef),
- fetcher.WithBearerToken(token),
+ token,
+ fetcher.WithHTTPClient(http.DefaultClient),
fetcher.WithUserAgent("SupabaseCLI/"+utils.Version),
- fetcher.WithExpectedStatus(http.StatusOK),
)
}
diff --git a/internal/storage/cp/cp_test.go b/internal/storage/cp/cp_test.go
index 75a0cf3cd6..9223c88d37 100644
--- a/internal/storage/cp/cp_test.go
+++ b/internal/storage/cp/cp_test.go
@@ -7,6 +7,7 @@ import (
"testing"
"github.com/h2non/gock"
+ "github.com/oapi-codegen/nullable"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -45,6 +46,10 @@ func TestStorageCP(t *testing.T) {
// Setup valid access token
token := apitest.RandomAccessToken(t)
t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+ apiKeys := []api.ApiKeyResponse{{
+ Name: "service_role",
+ ApiKey: nullable.NewNullableWithValue("service-key"),
+ }}
t.Run("copy local to remote", func(t *testing.T) {
// Setup in-memory fs
@@ -55,10 +60,7 @@ func TestStorageCP(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Post("/storage/v1/object/private/file").
Reply(http.StatusOK)
@@ -77,10 +79,7 @@ func TestStorageCP(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Get("/storage/v1/bucket").
Reply(http.StatusOK).
@@ -100,10 +99,7 @@ func TestStorageCP(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Get("/storage/v1/object/private/file").
Reply(http.StatusOK)
@@ -125,10 +121,7 @@ func TestStorageCP(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Get("/storage/v1/bucket").
Reply(http.StatusOK).
@@ -166,10 +159,7 @@ func TestStorageCP(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
// Run test
err := Run(context.Background(), ".", ".", false, 1, fsys)
// Check error
diff --git a/internal/storage/ls/ls_test.go b/internal/storage/ls/ls_test.go
index e0e2cd207f..27c388f5fa 100644
--- a/internal/storage/ls/ls_test.go
+++ b/internal/storage/ls/ls_test.go
@@ -7,6 +7,7 @@ import (
"testing"
"github.com/h2non/gock"
+ "github.com/oapi-codegen/nullable"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
"github.com/supabase/cli/internal/storage/client"
@@ -45,6 +46,10 @@ func TestStorageLS(t *testing.T) {
// Setup valid access token
token := apitest.RandomAccessToken(t)
t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+ apiKeys := []api.ApiKeyResponse{{
+ Name: "service_role",
+ ApiKey: nullable.NewNullableWithValue("service-key"),
+ }}
t.Run("lists buckets", func(t *testing.T) {
// Setup in-memory fs
@@ -54,10 +59,7 @@ func TestStorageLS(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Get("/storage/v1/bucket").
Reply(http.StatusOK).
@@ -85,10 +87,7 @@ func TestStorageLS(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Get("/storage/v1/bucket").
Reply(http.StatusOK).
diff --git a/internal/storage/mv/mv_test.go b/internal/storage/mv/mv_test.go
index fd8ecfbcc2..b22ed4d155 100644
--- a/internal/storage/mv/mv_test.go
+++ b/internal/storage/mv/mv_test.go
@@ -6,6 +6,7 @@ import (
"testing"
"github.com/h2non/gock"
+ "github.com/oapi-codegen/nullable"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
"github.com/supabase/cli/internal/testing/apitest"
@@ -43,6 +44,10 @@ func TestStorageMV(t *testing.T) {
// Setup valid access token
token := apitest.RandomAccessToken(t)
t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+ apiKeys := []api.ApiKeyResponse{{
+ Name: "service_role",
+ ApiKey: nullable.NewNullableWithValue("service-key"),
+ }}
t.Run("moves single object", func(t *testing.T) {
// Setup in-memory fs
@@ -52,10 +57,7 @@ func TestStorageMV(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Post("/storage/v1/object/move").
JSON(storage.MoveObjectRequest{
@@ -80,10 +82,7 @@ func TestStorageMV(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Post("/storage/v1/object/move").
JSON(storage.MoveObjectRequest{
diff --git a/internal/storage/rm/rm.go b/internal/storage/rm/rm.go
index 720bbce025..56e55a7974 100644
--- a/internal/storage/rm/rm.go
+++ b/internal/storage/rm/rm.go
@@ -49,9 +49,22 @@ func Run(ctx context.Context, paths []string, recursive bool, fsys afero.Fs) err
if err != nil {
return err
}
+ if len(groups) == 0 {
+ if !recursive {
+ return errors.New(errMissingFlag)
+ }
+ buckets, err := api.ListBuckets(ctx)
+ if err != nil {
+ return err
+ }
+ for _, b := range buckets {
+ groups[b.Name] = []string{""}
+ }
+ }
+ console := utils.NewConsole()
for bucket, prefixes := range groups {
confirm := fmt.Sprintf("Confirm deleting files in bucket %v?", utils.Bold(bucket))
- if shouldDelete, err := utils.NewConsole().PromptYesNo(ctx, confirm, false); err != nil {
+ if shouldDelete, err := console.PromptYesNo(ctx, confirm, false); err != nil {
return err
} else if !shouldDelete {
continue
diff --git a/internal/storage/rm/rm_test.go b/internal/storage/rm/rm_test.go
index 46d204cf07..cc02418cfc 100644
--- a/internal/storage/rm/rm_test.go
+++ b/internal/storage/rm/rm_test.go
@@ -6,6 +6,7 @@ import (
"testing"
"github.com/h2non/gock"
+ "github.com/oapi-codegen/nullable"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
"github.com/supabase/cli/internal/testing/apitest"
@@ -44,6 +45,10 @@ func TestStorageRM(t *testing.T) {
// Setup valid access token
token := apitest.RandomAccessToken(t)
t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+ apiKeys := []api.ApiKeyResponse{{
+ Name: "service_role",
+ ApiKey: nullable.NewNullableWithValue("service-key"),
+ }}
t.Run("throws error on invalid url", func(t *testing.T) {
// Setup in-memory fs
@@ -81,10 +86,7 @@ func TestStorageRM(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Delete("/storage/v1/object/private").
JSON(storage.DeleteObjectsRequest{Prefixes: []string{
@@ -120,10 +122,7 @@ func TestStorageRM(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
// Delete /test/ bucket
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Post("/storage/v1/object/list/test").
@@ -190,10 +189,7 @@ func TestStorageRM(t *testing.T) {
gock.New(utils.DefaultApiHost).
Get("/v1/projects/" + flags.ProjectRef + "/api-keys").
Reply(http.StatusOK).
- JSON([]api.ApiKeyResponse{{
- Name: "service_role",
- ApiKey: "service-key",
- }})
+ JSON(apiKeys)
gock.New("https://" + utils.GetSupabaseHost(flags.ProjectRef)).
Delete("/storage/v1/object/private").
Reply(http.StatusServiceUnavailable)
diff --git a/internal/testing/apitest/docker.go b/internal/testing/apitest/docker.go
index 17a14355d9..9b9020c044 100644
--- a/internal/testing/apitest/docker.go
+++ b/internal/testing/apitest/docker.go
@@ -3,7 +3,9 @@ package apitest
import (
"bytes"
"fmt"
+ "io"
"net/http"
+ "strings"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types/container"
@@ -84,9 +86,17 @@ func MockDockerStop(docker *client.Client) {
// Ref: internal/utils/docker.go::DockerRunOnce
func setupDockerLogs(docker *client.Client, containerID, stdout string, exitCode int) error {
+ err := MockDockerLogsStream(docker, containerID, exitCode, strings.NewReader(stdout))
+ gock.New(docker.DaemonHost()).
+ Delete("/v" + docker.ClientVersion() + "/containers/" + containerID).
+ Reply(http.StatusOK)
+ return err
+}
+
+func MockDockerLogsStream(docker *client.Client, containerID string, exitCode int, r io.Reader) error {
var body bytes.Buffer
writer := stdcopy.NewStdWriter(&body, stdcopy.Stdout)
- _, err := writer.Write([]byte(stdout))
+ _, err := io.Copy(writer, r)
gock.New(docker.DaemonHost()).
Get("/v"+docker.ClientVersion()+"/containers/"+containerID+"/logs").
Reply(http.StatusOK).
@@ -99,9 +109,6 @@ func setupDockerLogs(docker *client.Client, containerID, stdout string, exitCode
State: &container.State{
ExitCode: exitCode,
}}})
- gock.New(docker.DaemonHost()).
- Delete("/v" + docker.ClientVersion() + "/containers/" + containerID).
- Reply(http.StatusOK)
return err
}
diff --git a/internal/utils/access_token.go b/internal/utils/access_token.go
index f7ef90a010..26b3dfddbc 100644
--- a/internal/utils/access_token.go
+++ b/internal/utils/access_token.go
@@ -20,10 +20,6 @@ var (
const AccessTokenKey = "access-token"
-func LoadAccessToken() (string, error) {
- return LoadAccessTokenFS(afero.NewOsFs())
-}
-
func LoadAccessTokenFS(fsys afero.Fs) (string, error) {
accessToken, err := loadAccessToken(fsys)
if err != nil {
diff --git a/internal/utils/api.go b/internal/utils/api.go
index 32b199b695..c67252b6b6 100644
--- a/internal/utils/api.go
+++ b/internal/utils/api.go
@@ -2,17 +2,15 @@ package utils
import (
"context"
- "crypto/tls"
"encoding/json"
"fmt"
"log"
"net"
"net/http"
- "net/http/httptrace"
- "net/textproto"
"sync"
"github.com/go-errors/errors"
+ "github.com/spf13/afero"
"github.com/spf13/viper"
"github.com/supabase/cli/internal/utils/cloudflare"
supabase "github.com/supabase/cli/pkg/api"
@@ -79,59 +77,6 @@ func ResolveCNAME(ctx context.Context, host string) (string, error) {
return "", errors.Errorf("failed to locate appropriate CNAME record for %s; resolves to %+v", host, serialized)
}
-func WithTraceContext(ctx context.Context) context.Context {
- trace := &httptrace.ClientTrace{
- DNSStart: func(info httptrace.DNSStartInfo) {
- log.Printf("DNS Start: %+v\n", info)
- },
- DNSDone: func(info httptrace.DNSDoneInfo) {
- if info.Err != nil {
- log.Println("DNS Error:", info.Err)
- } else {
- log.Printf("DNS Done: %+v\n", info)
- }
- },
- ConnectStart: func(network, addr string) {
- log.Println("Connect Start:", network, addr)
- },
- ConnectDone: func(network, addr string, err error) {
- if err != nil {
- log.Println("Connect Error:", network, addr, err)
- } else {
- log.Println("Connect Done:", network, addr)
- }
- },
- TLSHandshakeStart: func() {
- log.Println("TLS Start")
- },
- TLSHandshakeDone: func(cs tls.ConnectionState, err error) {
- if err != nil {
- log.Println("TLS Error:", err)
- } else {
- log.Printf("TLS Done: %+v\n", cs)
- }
- },
- WroteHeaderField: func(key string, value []string) {
- log.Println("Sent Header:", key, value)
- },
- WroteRequest: func(wr httptrace.WroteRequestInfo) {
- if wr.Err != nil {
- log.Println("Send Error:", wr.Err)
- } else {
- log.Println("Send Done")
- }
- },
- Got1xxResponse: func(code int, header textproto.MIMEHeader) error {
- log.Println("Recv 1xx:", code, header)
- return nil
- },
- GotFirstResponseByte: func() {
- log.Println("Recv First Byte")
- },
- }
- return httptrace.WithClientTrace(ctx, trace)
-}
-
type DialContextFunc func(context.Context, string, string) (net.Conn, error)
// Wraps a DialContext with DNS-over-HTTPS as fallback resolver
@@ -172,7 +117,7 @@ func withFallbackDNS(dialContext DialContextFunc) DialContextFunc {
func GetSupabase() *supabase.ClientWithResponses {
clientOnce.Do(func() {
- token, err := LoadAccessToken()
+ token, err := LoadAccessTokenFS(afero.NewOsFs())
if err != nil {
log.Fatalln(err)
}
diff --git a/internal/utils/cloudflare/dns_test.go b/internal/utils/cloudflare/dns_test.go
new file mode 100644
index 0000000000..ee4d00c299
--- /dev/null
+++ b/internal/utils/cloudflare/dns_test.go
@@ -0,0 +1,128 @@
+package cloudflare
+
+import (
+ "context"
+ "net/http"
+ "testing"
+
+ "github.com/h2non/gock"
+ "github.com/stretchr/testify/assert"
+ "github.com/supabase/cli/internal/testing/apitest"
+)
+
+func TestDNSQuery(t *testing.T) {
+ t.Run("successfully queries A records", func(t *testing.T) {
+ api := NewCloudflareAPI()
+ defer gock.OffAll()
+ gock.New("https://1.1.1.1").
+ Get("/dns-query").
+ MatchParam("name", "example.com").
+ MatchHeader("accept", "application/dns-json").
+ Reply(http.StatusOK).
+ JSON(DNSResponse{
+ Answer: []DNSAnswer{
+ {
+ Name: "example.com",
+ Type: TypeA,
+ Ttl: 300,
+ Data: "93.184.216.34",
+ },
+ },
+ })
+
+ resp, err := api.DNSQuery(context.Background(), DNSParams{
+ Name: "example.com",
+ })
+
+ assert.NoError(t, err)
+ assert.Len(t, resp.Answer, 1)
+ assert.Equal(t, "93.184.216.34", resp.Answer[0].Data)
+ assert.Equal(t, TypeA, resp.Answer[0].Type)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("successfully queries specific DNS type", func(t *testing.T) {
+ api := NewCloudflareAPI()
+ dnsType := TypeCNAME
+ defer gock.OffAll()
+ gock.New("https://1.1.1.1").
+ Get("/dns-query").
+ MatchParam("name", "www.example.com").
+ MatchParam("type", "5"). // TypeCNAME = 5
+ MatchHeader("accept", "application/dns-json").
+ Reply(http.StatusOK).
+ JSON(DNSResponse{
+ Answer: []DNSAnswer{
+ {
+ Name: "www.example.com",
+ Type: TypeCNAME,
+ Ttl: 3600,
+ Data: "example.com",
+ },
+ },
+ })
+
+ resp, err := api.DNSQuery(context.Background(), DNSParams{
+ Name: "www.example.com",
+ Type: &dnsType,
+ })
+
+ assert.NoError(t, err)
+ assert.Len(t, resp.Answer, 1)
+ assert.Equal(t, "example.com", resp.Answer[0].Data)
+ assert.Equal(t, TypeCNAME, resp.Answer[0].Type)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("handles network error", func(t *testing.T) {
+ api := NewCloudflareAPI()
+ defer gock.OffAll()
+ gock.New("https://1.1.1.1").
+ Get("/dns-query").
+ MatchParam("name", "example.com").
+ ReplyError(gock.ErrCannotMatch)
+
+ resp, err := api.DNSQuery(context.Background(), DNSParams{
+ Name: "example.com",
+ })
+
+ assert.Error(t, err)
+ assert.Empty(t, resp.Answer)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("handles service unavailable", func(t *testing.T) {
+ api := NewCloudflareAPI()
+ defer gock.OffAll()
+ gock.New("https://1.1.1.1").
+ Get("/dns-query").
+ MatchParam("name", "example.com").
+ Reply(http.StatusServiceUnavailable)
+
+ resp, err := api.DNSQuery(context.Background(), DNSParams{
+ Name: "example.com",
+ })
+
+ assert.ErrorContains(t, err, "status 503")
+ assert.Empty(t, resp.Answer)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("handles malformed response", func(t *testing.T) {
+ api := NewCloudflareAPI()
+ defer gock.OffAll()
+ gock.New("https://1.1.1.1").
+ Get("/dns-query").
+ MatchParam("name", "example.com").
+ Reply(http.StatusOK).
+ JSON("invalid json")
+
+ resp, err := api.DNSQuery(context.Background(), DNSParams{
+ Name: "example.com",
+ })
+
+ assert.ErrorContains(t, err, "failed to parse")
+ assert.Empty(t, resp.Answer)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+}
diff --git a/internal/utils/config_test.go b/internal/utils/config_test.go
new file mode 100644
index 0000000000..9ac835170f
--- /dev/null
+++ b/internal/utils/config_test.go
@@ -0,0 +1,168 @@
+package utils
+
+import (
+ "os"
+ "testing"
+
+ "github.com/spf13/afero"
+ "github.com/spf13/viper"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestGetId(t *testing.T) {
+ t.Run("generates container id", func(t *testing.T) {
+ Config.ProjectId = "test-project"
+ name := "test-service"
+
+ id := GetId(name)
+
+ assert.Equal(t, "supabase_test-service_test-project", id)
+ })
+}
+
+func TestUpdateDockerIds(t *testing.T) {
+ t.Run("updates all container ids", func(t *testing.T) {
+ Config.ProjectId = "test-project"
+ viper.Set("network-id", "custom-network")
+ defer viper.Reset()
+
+ UpdateDockerIds()
+
+ assert.Equal(t, "custom-network", NetId)
+ assert.Equal(t, "supabase_db_test-project", DbId)
+ assert.Equal(t, "supabase_kong_test-project", KongId)
+ assert.Equal(t, "supabase_auth_test-project", GotrueId)
+ assert.Equal(t, "supabase_inbucket_test-project", InbucketId)
+ assert.Equal(t, "supabase_realtime_test-project", RealtimeId)
+ assert.Equal(t, "supabase_rest_test-project", RestId)
+ assert.Equal(t, "supabase_storage_test-project", StorageId)
+ assert.Equal(t, "supabase_imgproxy_test-project", ImgProxyId)
+ assert.Equal(t, "supabase_differ_test-project", DifferId)
+ assert.Equal(t, "supabase_pg_meta_test-project", PgmetaId)
+ assert.Equal(t, "supabase_studio_test-project", StudioId)
+ assert.Equal(t, "supabase_edge_runtime_test-project", EdgeRuntimeId)
+ assert.Equal(t, "supabase_analytics_test-project", LogflareId)
+ assert.Equal(t, "supabase_vector_test-project", VectorId)
+ assert.Equal(t, "supabase_pooler_test-project", PoolerId)
+ })
+
+ t.Run("generates network id if not set", func(t *testing.T) {
+ Config.ProjectId = "test-project"
+ viper.Reset()
+
+ UpdateDockerIds()
+
+ assert.Equal(t, "supabase_network_test-project", NetId)
+ })
+}
+
+func TestInitConfig(t *testing.T) {
+ t.Run("creates new config file", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ params := InitParams{
+ ProjectId: "test-project",
+ }
+
+ err := InitConfig(params, fsys)
+
+ assert.NoError(t, err)
+ exists, err := afero.Exists(fsys, ConfigPath)
+ assert.NoError(t, err)
+ assert.True(t, exists)
+ })
+
+ t.Run("creates config with orioledb", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ params := InitParams{
+ ProjectId: "test-project",
+ UseOrioleDB: true,
+ }
+
+ err := InitConfig(params, fsys)
+
+ assert.NoError(t, err)
+ content, err := afero.ReadFile(fsys, ConfigPath)
+ assert.NoError(t, err)
+ assert.Contains(t, string(content), "15.1.0.150")
+ })
+
+ t.Run("fails if config exists and no overwrite", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ err := afero.WriteFile(fsys, ConfigPath, []byte("existing"), 0644)
+ require.NoError(t, err)
+ params := InitParams{
+ ProjectId: "test-project",
+ }
+
+ err = InitConfig(params, fsys)
+
+ assert.ErrorIs(t, err, os.ErrExist)
+ })
+
+ t.Run("overwrites existing config when specified", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ err := afero.WriteFile(fsys, ConfigPath, []byte("existing"), 0644)
+ require.NoError(t, err)
+ params := InitParams{
+ ProjectId: "test-project",
+ Overwrite: true,
+ }
+
+ err = InitConfig(params, fsys)
+
+ assert.NoError(t, err)
+ content, err := afero.ReadFile(fsys, ConfigPath)
+ assert.NoError(t, err)
+ assert.NotEqual(t, "existing", string(content))
+ })
+}
+
+func TestGetApiUrl(t *testing.T) {
+ t.Run("returns external url when configured", func(t *testing.T) {
+ Config.Api.ExternalUrl = "https://api.example.com"
+
+ url := GetApiUrl("/test")
+
+ assert.Equal(t, "https://api.example.com/test", url)
+ })
+
+ t.Run("builds url from hostname and port", func(t *testing.T) {
+ Config.Hostname = "localhost"
+ Config.Api.Port = 8000
+ Config.Api.ExternalUrl = ""
+
+ url := GetApiUrl("/test")
+
+ assert.Equal(t, "http://localhost:8000/test", url)
+ })
+}
+
+func TestRootFS(t *testing.T) {
+ t.Run("opens file from root fs", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ content := []byte("test content")
+ err := afero.WriteFile(fsys, "/test.txt", content, 0644)
+ require.NoError(t, err)
+
+ rootfs := NewRootFS(fsys)
+ f, err := rootfs.Open("/test.txt")
+ assert.NoError(t, err)
+ defer f.Close()
+
+ buf := make([]byte, len(content))
+ n, err := f.Read(buf)
+ assert.NoError(t, err)
+ assert.Equal(t, len(content), n)
+ assert.Equal(t, content, buf)
+ })
+
+ t.Run("returns error for non-existent file", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ rootfs := NewRootFS(fsys)
+
+ _, err := rootfs.Open("/non-existent.txt")
+
+ assert.Error(t, err)
+ })
+}
diff --git a/internal/utils/console.go b/internal/utils/console.go
index 85bebdc1ee..f80099aa34 100644
--- a/internal/utils/console.go
+++ b/internal/utils/console.go
@@ -10,6 +10,7 @@ import (
"time"
"github.com/go-errors/errors"
+ "github.com/spf13/viper"
"github.com/supabase/cli/pkg/cast"
"golang.org/x/term"
)
@@ -66,6 +67,10 @@ func (c *Console) PromptYesNo(ctx context.Context, label string, def bool) (bool
choices = "y/N"
}
labelWithChoice := fmt.Sprintf("%s [%s] ", label, choices)
+ if viper.GetBool("YES") {
+ fmt.Fprintln(os.Stderr, labelWithChoice+"y")
+ return true, nil
+ }
// Any error will be handled as default value
input, err := c.PromptText(ctx, labelWithChoice)
if len(input) > 0 {
diff --git a/internal/utils/container_output.go b/internal/utils/container_output.go
index 8f417afd15..ccbbab033a 100644
--- a/internal/utils/container_output.go
+++ b/internal/utils/container_output.go
@@ -12,8 +12,6 @@ import (
"strings"
"github.com/docker/docker/pkg/jsonmessage"
- "github.com/docker/docker/pkg/stdcopy"
- "github.com/go-errors/errors"
)
func ProcessPullOutput(out io.ReadCloser, p Program) error {
@@ -205,36 +203,3 @@ func ProcessDiffOutput(diffBytes []byte) ([]byte, error) {
}
return []byte(diffHeader + "\n\n" + strings.Join(filteredDiffDdls, "\n\n") + "\n"), nil
}
-
-func ProcessPsqlOutput(out io.Reader, p Program) error {
- r, w := io.Pipe()
- doneCh := make(chan struct{}, 1)
-
- go func() {
- scanner := bufio.NewScanner(r)
-
- for scanner.Scan() {
- select {
- case <-doneCh:
- return
- default:
- }
-
- line := scanner.Text()
- p.Send(PsqlMsg(&line))
- }
- }()
-
- var errBuf bytes.Buffer
- if _, err := stdcopy.StdCopy(w, &errBuf, out); err != nil {
- return err
- }
- if errBuf.Len() > 0 {
- return errors.New("Error running SQL: " + errBuf.String())
- }
-
- doneCh <- struct{}{}
- p.Send(PsqlMsg(nil))
-
- return nil
-}
diff --git a/internal/utils/container_output_test.go b/internal/utils/container_output_test.go
new file mode 100644
index 0000000000..3250846183
--- /dev/null
+++ b/internal/utils/container_output_test.go
@@ -0,0 +1,134 @@
+package utils
+
+import (
+ "encoding/json"
+ "io"
+ "sync"
+ "testing"
+
+ tea "github.com/charmbracelet/bubbletea"
+ "github.com/docker/docker/pkg/jsonmessage"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestProcessDiffOutput(t *testing.T) {
+ t.Run("processes valid diff entries", func(t *testing.T) {
+ input := []DiffEntry{
+ {
+ Type: "table",
+ Status: "Different",
+ DiffDdl: "ALTER TABLE test;",
+ GroupName: "public",
+ },
+ {
+ Type: "extension",
+ Status: "Different",
+ DiffDdl: "CREATE EXTENSION test;",
+ GroupName: "public",
+ },
+ }
+ inputBytes, err := json.Marshal(input)
+ require.NoError(t, err)
+
+ output, err := ProcessDiffOutput(inputBytes)
+
+ assert.NoError(t, err)
+ assert.Contains(t, string(output), "ALTER TABLE test;")
+ assert.Contains(t, string(output), "CREATE EXTENSION test;")
+ })
+
+ t.Run("filters out internal schemas", func(t *testing.T) {
+ input := []DiffEntry{
+ {
+ Type: "table",
+ Status: "Different",
+ DiffDdl: "ALTER TABLE test;",
+ GroupName: "auth",
+ },
+ {
+ Type: "extension",
+ Status: "Different",
+ DiffDdl: "CREATE EXTENSION test;",
+ GroupName: "auth",
+ },
+ }
+ inputBytes, err := json.Marshal(input)
+ require.NoError(t, err)
+
+ output, err := ProcessDiffOutput(inputBytes)
+
+ assert.NoError(t, err)
+ assert.Nil(t, output)
+ })
+}
+
+func TestProcessPullOutput(t *testing.T) {
+ t.Run("processes docker pull messages", func(t *testing.T) {
+ messages := []jsonmessage.JSONMessage{
+ {Status: "Pulling from library/postgres"},
+ {ID: "layer1", Status: "Pulling fs layer"},
+ {ID: "layer1", Status: "Downloading", Progress: &jsonmessage.JSONProgress{Current: 50, Total: 100}},
+ {ID: "layer2", Status: "Pulling fs layer"},
+ {ID: "layer2", Status: "Downloading", Progress: &jsonmessage.JSONProgress{Current: 75, Total: 100}},
+ }
+
+ // Create a pipe to write messages
+ r, w := io.Pipe()
+ enc := json.NewEncoder(w)
+ go func() {
+ for _, msg := range messages {
+ err := enc.Encode(msg)
+ assert.Nil(t, err)
+ }
+ w.Close()
+ }()
+
+ var status string
+ var progressFirst *float64
+ var progress *float64
+ p := NewMockProgram(func(msg tea.Msg) {
+ switch m := msg.(type) {
+ case StatusMsg:
+ status = string(m)
+ case ProgressMsg:
+ progress = m
+ if progressFirst == nil {
+ progressFirst = m
+ }
+ }
+ })
+
+ err := ProcessPullOutput(r, p)
+
+ assert.NoError(t, err)
+ assert.Equal(t, "Pulling from library/postgres...", status)
+ assert.Equal(t, *progressFirst, 0.5)
+ assert.Nil(t, progress)
+ })
+}
+
+type MockProgram struct {
+ handler func(tea.Msg)
+ mu sync.Mutex // Add mutex for thread safety
+}
+
+func NewMockProgram(handler func(tea.Msg)) *MockProgram {
+ return &MockProgram{
+ handler: handler,
+ }
+}
+
+func (m *MockProgram) Send(msg tea.Msg) {
+ if m.handler != nil {
+ m.mu.Lock()
+ m.handler(msg)
+ m.mu.Unlock()
+ }
+}
+
+func (m *MockProgram) Start() error {
+ return nil
+}
+
+func (m *MockProgram) Quit() {}
diff --git a/internal/utils/credentials/store_mock.go b/internal/utils/credentials/store_mock.go
deleted file mode 100644
index 32715fc375..0000000000
--- a/internal/utils/credentials/store_mock.go
+++ /dev/null
@@ -1,68 +0,0 @@
-package credentials
-
-import (
- "github.com/zalando/go-keyring"
-)
-
-type mockProvider struct {
- mockStore map[string]map[string]string
- mockError error
-}
-
-// Get retrieves the password for a project from the mock store.
-func (m *mockProvider) Get(project string) (string, error) {
- if m.mockError != nil {
- return "", m.mockError
- }
- if pass, ok := m.mockStore[namespace][project]; ok {
- return pass, nil
- }
- return "", keyring.ErrNotFound
-}
-
-// Set stores the password for a project in the mock store.
-func (m *mockProvider) Set(project, password string) error {
- if m.mockError != nil {
- return m.mockError
- }
- if m.mockStore == nil {
- m.mockStore = make(map[string]map[string]string)
- }
- if m.mockStore[namespace] == nil {
- m.mockStore[namespace] = make(map[string]string)
- }
- m.mockStore[namespace][project] = password
- return nil
-}
-
-// Delete removes the password for a project from the mock store.
-func (m *mockProvider) Delete(project string) error {
- if m.mockError != nil {
- return m.mockError
- }
- if _, ok := m.mockStore[namespace][project]; ok {
- delete(m.mockStore[namespace], project)
- return nil
- }
- return keyring.ErrNotFound
-}
-
-// DeleteAll removes all passwords from the mock store.
-func (m *mockProvider) DeleteAll() error {
- if m.mockError != nil {
- return m.mockError
- }
- delete(m.mockStore, namespace)
- return nil
-}
-
-func MockInit() func() {
- oldStore := StoreProvider
- teardown := func() {
- StoreProvider = oldStore
- }
- StoreProvider = &mockProvider{
- mockStore: map[string]map[string]string{},
- }
- return teardown
-}
diff --git a/internal/utils/credentials/store_test.go b/internal/utils/credentials/store_test.go
new file mode 100644
index 0000000000..4bb62f6581
--- /dev/null
+++ b/internal/utils/credentials/store_test.go
@@ -0,0 +1,99 @@
+package credentials
+
+import (
+ "testing"
+
+ "github.com/go-errors/errors"
+ "github.com/stretchr/testify/assert"
+ "github.com/zalando/go-keyring"
+)
+
+func TestKeyringStore(t *testing.T) {
+ t.Run("stores and retrieves password", func(t *testing.T) {
+ keyring.MockInit()
+ project := "test-project"
+ password := "test-password"
+
+ err := StoreProvider.Set(project, password)
+ assert.NoError(t, err)
+
+ retrieved, err := StoreProvider.Get(project)
+ assert.NoError(t, err)
+ assert.Equal(t, password, retrieved)
+ })
+
+ t.Run("returns error for non-existent project", func(t *testing.T) {
+ keyring.MockInit()
+ project := "non-existent"
+
+ retrieved, err := StoreProvider.Get(project)
+ assert.ErrorIs(t, err, keyring.ErrNotFound)
+ assert.Empty(t, retrieved)
+ })
+
+ t.Run("deletes specific project password", func(t *testing.T) {
+ keyring.MockInit()
+ project := "test-project"
+ password := "test-password"
+
+ err := StoreProvider.Set(project, password)
+ assert.NoError(t, err)
+ err = StoreProvider.Delete(project)
+ assert.NoError(t, err)
+
+ _, err = StoreProvider.Get(project)
+ assert.ErrorIs(t, err, keyring.ErrNotFound)
+ })
+
+ t.Run("deletes all project passwords", func(t *testing.T) {
+ keyring.MockInit()
+ projects := []string{"project1", "project2"}
+
+ for _, project := range projects {
+ err := StoreProvider.Set(project, "password")
+ assert.NoError(t, err)
+ }
+
+ err := StoreProvider.DeleteAll()
+ assert.NoError(t, err)
+
+ for _, project := range projects {
+ _, err := StoreProvider.Get(project)
+ assert.ErrorIs(t, err, keyring.ErrNotFound)
+ }
+ })
+}
+
+func TestKeyringErrors(t *testing.T) {
+ t.Run("handles Get error", func(t *testing.T) {
+ mockErr := errors.New("mock error")
+ keyring.MockInitWithError(mockErr)
+
+ _, err := StoreProvider.Get("test")
+ assert.ErrorIs(t, err, mockErr)
+ })
+
+ t.Run("handles Set error", func(t *testing.T) {
+ mockErr := errors.New("mock error")
+ keyring.MockInitWithError(mockErr)
+
+ err := StoreProvider.Set("test", "pass")
+ assert.ErrorIs(t, err, mockErr)
+ })
+
+ t.Run("handles Delete error", func(t *testing.T) {
+ mockErr := errors.New("mock error")
+ keyring.MockInitWithError(mockErr)
+
+ err := StoreProvider.Delete("test")
+ assert.ErrorIs(t, err, mockErr)
+ })
+
+ t.Run("handles DeleteAll error", func(t *testing.T) {
+ mockErr := errors.New("mock error")
+ keyring.MockInitWithError(mockErr)
+
+ err := StoreProvider.DeleteAll()
+ assert.ErrorIs(t, err, mockErr)
+ })
+}
diff --git a/internal/utils/deno.go b/internal/utils/deno.go
index 54e1fc59a6..86d12da0d0 100644
--- a/internal/utils/deno.go
+++ b/internal/utils/deno.go
@@ -6,20 +6,20 @@ import (
"context"
"crypto/sha256"
"embed"
- "encoding/json"
"fmt"
"io"
"io/fs"
"net/http"
"os"
"os/exec"
+ "path"
"path/filepath"
"runtime"
"strings"
"github.com/go-errors/errors"
"github.com/spf13/afero"
- "github.com/tidwall/jsonc"
+ "github.com/supabase/cli/pkg/function"
)
var (
@@ -197,7 +197,6 @@ func CopyDenoScripts(ctx context.Context, fsys afero.Fs) (*DenoScriptDir, error)
return nil
})
-
if err != nil {
return nil, err
}
@@ -210,87 +209,60 @@ func CopyDenoScripts(ctx context.Context, fsys afero.Fs) (*DenoScriptDir, error)
return &sd, nil
}
-type ImportMap struct {
- Imports map[string]string `json:"imports"`
- Scopes map[string]map[string]string `json:"scopes"`
-}
-
-func NewImportMap(absJsonPath string, fsys afero.Fs) (*ImportMap, error) {
- data, err := afero.ReadFile(fsys, absJsonPath)
- if err != nil {
- return nil, errors.Errorf("failed to load import map: %w", err)
- }
- result := ImportMap{}
- if err := result.Parse(data); err != nil {
- return nil, err
- }
- // Resolve all paths relative to current file
- for k, v := range result.Imports {
- result.Imports[k] = resolveHostPath(absJsonPath, v, fsys)
+func BindHostModules(cwd, relEntrypointPath, relImportMapPath string, fsys afero.Fs) ([]string, error) {
+ var modules []string
+ bindModule := func(srcPath string, r io.Reader) error {
+ hostPath := filepath.Join(cwd, filepath.FromSlash(srcPath))
+ dockerPath := ToDockerPath(hostPath)
+ modules = append(modules, hostPath+":"+dockerPath+":ro")
+ return nil
}
- for module, mapping := range result.Scopes {
- for k, v := range mapping {
- result.Scopes[module][k] = resolveHostPath(absJsonPath, v, fsys)
+ importMap := function.ImportMap{}
+ if imPath := filepath.ToSlash(relImportMapPath); len(imPath) > 0 {
+ if err := importMap.LoadAsDeno(imPath, afero.NewIOFS(fsys), bindModule); err != nil {
+ return nil, err
}
}
- return &result, nil
-}
-
-func (m *ImportMap) Parse(data []byte) error {
- data = jsonc.ToJSONInPlace(data)
- decoder := json.NewDecoder(bytes.NewReader(data))
- if err := decoder.Decode(&m); err != nil {
- return errors.Errorf("failed to parse import map: %w", err)
- }
- return nil
-}
-
-func resolveHostPath(jsonPath, hostPath string, fsys afero.Fs) string {
- // Leave absolute paths unchanged
- if filepath.IsAbs(hostPath) {
- return hostPath
- }
- resolved := filepath.Join(filepath.Dir(jsonPath), hostPath)
- if exists, err := afero.Exists(fsys, resolved); !exists {
- // Leave URLs unchanged
+ // Resolving all Import Graph
+ addModule := func(unixPath string, w io.Writer) error {
+ hostPath := toHostPath(cwd, unixPath)
+ f, err := fsys.Open(hostPath)
if err != nil {
- logger := GetDebugLogger()
- fmt.Fprintln(logger, err)
+ return errors.Errorf("failed to read file: %w", err)
}
- return hostPath
- }
- // Directory imports need to be suffixed with /
- // Ref: https://deno.com/manual@v1.33.0/basics/import_maps
- if strings.HasSuffix(hostPath, string(filepath.Separator)) {
- resolved += string(filepath.Separator)
- }
- return resolved
-}
-
-func (m *ImportMap) BindHostModules() []string {
- hostFuncDir, err := filepath.Abs(FunctionsDir)
- if err != nil {
- logger := GetDebugLogger()
- fmt.Fprintln(logger, err)
- }
- binds := []string{}
- for _, hostPath := range m.Imports {
- if !filepath.IsAbs(hostPath) || strings.HasPrefix(hostPath, hostFuncDir) {
- continue
+ defer f.Close()
+ if _, err := io.Copy(w, f); err != nil {
+ return errors.Errorf("failed to copy file content: %w", err)
}
dockerPath := ToDockerPath(hostPath)
- binds = append(binds, hostPath+":"+dockerPath+":ro")
+ modules = append(modules, hostPath+":"+dockerPath+":ro")
+ return nil
+ }
+ unixPath := filepath.ToSlash(relEntrypointPath)
+ if err := importMap.WalkImportPaths(unixPath, addModule); err != nil {
+ return nil, err
}
- for _, mapping := range m.Scopes {
- for _, hostPath := range mapping {
- if !filepath.IsAbs(hostPath) || strings.HasPrefix(hostPath, hostFuncDir) {
- continue
+ // Also mount local directories declared in scopes
+ for _, scope := range importMap.Scopes {
+ for _, unixPath := range scope {
+ hostPath := toHostPath(cwd, unixPath)
+ // Ref: https://docs.deno.com/runtime/fundamentals/modules/#overriding-https-imports
+ if _, err := fsys.Stat(hostPath); err != nil {
+ return nil, errors.Errorf("failed to resolve scope: %w", err)
}
dockerPath := ToDockerPath(hostPath)
- binds = append(binds, hostPath+":"+dockerPath+":ro")
+ modules = append(modules, hostPath+":"+dockerPath+":ro")
}
}
- return binds
+ return modules, nil
+}
+
+func toHostPath(cwd, unixPath string) string {
+ hostPath := filepath.FromSlash(unixPath)
+ if path.IsAbs(unixPath) {
+ return filepath.VolumeName(cwd) + hostPath
+ }
+ return filepath.Join(cwd, hostPath)
}
func ToDockerPath(absHostPath string) string {
diff --git a/internal/utils/deno_test.go b/internal/utils/deno_test.go
index c65e7ab780..c5b140a8f7 100644
--- a/internal/utils/deno_test.go
+++ b/internal/utils/deno_test.go
@@ -1,8 +1,10 @@
package utils
import (
+ "context"
"os"
"path/filepath"
+ "runtime"
"testing"
"github.com/spf13/afero"
@@ -10,89 +12,136 @@ import (
"github.com/stretchr/testify/require"
)
-func TestResolveImports(t *testing.T) {
- t.Run("resolves relative directory", func(t *testing.T) {
- importMap := []byte(`{
- "imports": {
- "abs/": "/tmp/",
- "root": "../../common",
- "parent": "../tests",
- "child": "child/",
- "missing": "../missing"
- }
-}`)
- // Setup in-memory fs
+func TestBindModules(t *testing.T) {
+ t.Run("binds docker imports", func(t *testing.T) {
fsys := afero.NewMemMapFs()
- cwd, err := os.Getwd()
- require.NoError(t, err)
- jsonPath := filepath.Join(cwd, FallbackImportMapPath)
- require.NoError(t, afero.WriteFile(fsys, jsonPath, importMap, 0644))
- require.NoError(t, fsys.Mkdir(filepath.Join(cwd, "common"), 0755))
- require.NoError(t, fsys.Mkdir(filepath.Join(cwd, DbTestsDir), 0755))
- require.NoError(t, fsys.Mkdir(filepath.Join(cwd, FunctionsDir, "child"), 0755))
+ entrypoint := `import "https://deno.land"
+import "/tmp/index.ts"
+import "../common/index.ts"
+import "../../../supabase/tests/index.ts"
+import "./child/index.ts"`
+ require.NoError(t, WriteFile("/app/supabase/functions/hello/index.ts", []byte(entrypoint), fsys))
+ require.NoError(t, WriteFile("/tmp/index.ts", []byte{}, fsys))
+ require.NoError(t, WriteFile("/app/supabase/functions/common/index.ts", []byte{}, fsys))
+ require.NoError(t, WriteFile("/app/supabase/tests/index.ts", []byte{}, fsys))
+ require.NoError(t, WriteFile("/app/supabase/functions/hello/child/index.ts", []byte{}, fsys))
// Run test
- resolved, err := NewImportMap(jsonPath, fsys)
+ mods, err := BindHostModules("/app", "supabase/functions/hello/index.ts", "", fsys)
// Check error
assert.NoError(t, err)
- assert.Equal(t, "/tmp/", resolved.Imports["abs/"])
- assert.Equal(t, cwd+"/common", resolved.Imports["root"])
- assert.Equal(t, cwd+"/supabase/tests", resolved.Imports["parent"])
- assert.Equal(t, cwd+"/supabase/functions/child/", resolved.Imports["child"])
- assert.Equal(t, "../missing", resolved.Imports["missing"])
+ assert.ElementsMatch(t, mods, []string{
+ "/app/supabase/functions/hello/index.ts:/app/supabase/functions/hello/index.ts:ro",
+ "/tmp/index.ts:/tmp/index.ts:ro",
+ "/app/supabase/functions/common/index.ts:/app/supabase/functions/common/index.ts:ro",
+ "/app/supabase/tests/index.ts:/app/supabase/tests/index.ts:ro",
+ "/app/supabase/functions/hello/child/index.ts:/app/supabase/functions/hello/child/index.ts:ro",
+ })
})
+}
+
+func TestGetDenoPath(t *testing.T) {
+ t.Run("returns override path when set", func(t *testing.T) {
+ override := "/custom/path/to/deno"
+ DenoPathOverride = override
+ defer func() { DenoPathOverride = "" }()
+
+ path, err := GetDenoPath()
- t.Run("resolves parent scopes", func(t *testing.T) {
- importMap := []byte(`{
- "scopes": {
- "my-scope": {
- "my-mod": "https://deno.land"
+ assert.NoError(t, err)
+ assert.Equal(t, override, path)
+ })
+
+ t.Run("returns default path", func(t *testing.T) {
+ home, err := os.UserHomeDir()
+ require.NoError(t, err)
+ expected := filepath.Join(home, ".supabase", "deno")
+ if runtime.GOOS == "windows" {
+ expected += ".exe"
}
- }
-}`)
- // Setup in-memory fs
+
+ path, err := GetDenoPath()
+
+ assert.NoError(t, err)
+ assert.Equal(t, expected, path)
+ })
+}
+
+func TestIsScriptModified(t *testing.T) {
+ t.Run("detects modified script", func(t *testing.T) {
fsys := afero.NewMemMapFs()
- require.NoError(t, afero.WriteFile(fsys, FallbackImportMapPath, importMap, 0644))
- // Run test
- resolved, err := NewImportMap(FallbackImportMapPath, fsys)
- // Check error
+ destPath := "/path/to/script.ts"
+ original := []byte("original content")
+ modified := []byte("modified content")
+ require.NoError(t, afero.WriteFile(fsys, destPath, modified, 0644))
+
+ isModified, err := isScriptModified(fsys, destPath, original)
+
+ assert.NoError(t, err)
+ assert.True(t, isModified)
+ })
+
+ t.Run("detects unmodified script", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ destPath := "/path/to/script.ts"
+ content := []byte("test content")
+ require.NoError(t, afero.WriteFile(fsys, destPath, content, 0644))
+
+ isModified, err := isScriptModified(fsys, destPath, content)
+
+ assert.NoError(t, err)
+ assert.False(t, isModified)
+ })
+
+ t.Run("handles non-existent script", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ destPath := "/path/to/script.ts"
+ content := []byte("test content")
+
+ isModified, err := isScriptModified(fsys, destPath, content)
+
assert.NoError(t, err)
- assert.Equal(t, "https://deno.land", resolved.Scopes["my-scope"]["my-mod"])
+ assert.True(t, isModified)
})
}
-func TestBindModules(t *testing.T) {
- t.Run("binds docker imports", func(t *testing.T) {
- cwd, err := os.Getwd()
+func TestCopyDenoScripts(t *testing.T) {
+ t.Run("copies deno scripts", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ home, err := os.UserHomeDir()
require.NoError(t, err)
- importMap := ImportMap{
- Imports: map[string]string{
- "abs/": "/tmp/",
- "root": cwd + "/common",
- "parent": cwd + "/supabase/tests",
- "child": cwd + "/supabase/functions/child/",
- },
- }
- // Run test
- mods := importMap.BindHostModules()
- // Check error
- assert.ElementsMatch(t, mods, []string{
- "/tmp/:/tmp/:ro",
- cwd + "/common:" + cwd + "/common:ro",
- cwd + "/supabase/tests:" + cwd + "/supabase/tests:ro",
- })
+ denoDir := filepath.Join(home, ".supabase")
+ require.NoError(t, fsys.MkdirAll(denoDir, 0755))
+
+ scripts, err := CopyDenoScripts(context.Background(), fsys)
+
+ assert.NoError(t, err)
+ assert.NotNil(t, scripts)
+ extractExists, err := afero.Exists(fsys, scripts.ExtractPath)
+ assert.NoError(t, err)
+ assert.True(t, extractExists)
})
- t.Run("binds docker scopes", func(t *testing.T) {
- importMap := ImportMap{
- Scopes: map[string]map[string]string{
- "my-scope": {
- "my-mod": "https://deno.land",
- },
- },
- }
- // Run test
- mods := importMap.BindHostModules()
- // Check error
- assert.Empty(t, mods)
+ t.Run("skips copying unmodified scripts", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ home, err := os.UserHomeDir()
+ require.NoError(t, err)
+ scriptDir := filepath.Join(home, ".supabase", "denos")
+ require.NoError(t, fsys.MkdirAll(scriptDir, 0755))
+
+ scripts1, err := CopyDenoScripts(context.Background(), fsys)
+ require.NoError(t, err)
+ stat1, err := fsys.Stat(scripts1.ExtractPath)
+ require.NoError(t, err)
+ modTime1 := stat1.ModTime()
+
+ // Second copy
+ scripts2, err := CopyDenoScripts(context.Background(), fsys)
+ require.NoError(t, err)
+ stat2, err := fsys.Stat(scripts2.ExtractPath)
+ require.NoError(t, err)
+ modTime2 := stat2.ModTime()
+
+ // Verify file wasn't rewritten
+ assert.Equal(t, modTime1, modTime2)
})
}
diff --git a/internal/utils/docker.go b/internal/utils/docker.go
index 792ffb3dbc..7e908649ee 100644
--- a/internal/utils/docker.go
+++ b/internal/utils/docker.go
@@ -14,6 +14,7 @@ import (
"sync"
"time"
+ "github.com/containerd/errdefs"
podman "github.com/containers/common/libnetwork/types"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/compose/loader"
@@ -28,7 +29,6 @@ import (
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/api/types/volume"
"github.com/docker/docker/client"
- "github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/stdcopy"
"github.com/go-errors/errors"
@@ -241,7 +241,7 @@ func DockerPullImageIfNotCached(ctx context.Context, imageName string) error {
imageUrl := GetRegistryImageUrl(imageName)
if _, err := Docker.ImageInspect(ctx, imageUrl); err == nil {
return nil
- } else if !client.IsErrNotFound(err) {
+ } else if !errdefs.IsNotFound(err) {
return errors.Errorf("failed to inspect docker image: %w", err)
}
return DockerImagePullWithRetry(ctx, imageUrl, 2)
@@ -376,13 +376,19 @@ func DockerRunOnceWithConfig(ctx context.Context, config container.Config, hostC
return DockerStreamLogs(ctx, container, stdout, stderr)
}
-func DockerStreamLogs(ctx context.Context, containerId string, stdout, stderr io.Writer) error {
- // Stream logs
- logs, err := Docker.ContainerLogs(ctx, containerId, container.LogsOptions{
+var ErrContainerKilled = errors.New("exit 137")
+
+func DockerStreamLogs(ctx context.Context, containerId string, stdout, stderr io.Writer, opts ...func(*container.LogsOptions)) error {
+ logsOptions := container.LogsOptions{
ShowStdout: true,
ShowStderr: true,
Follow: true,
- })
+ }
+ for _, apply := range opts {
+ apply(&logsOptions)
+ }
+ // Stream logs
+ logs, err := Docker.ContainerLogs(ctx, containerId, logsOptions)
if err != nil {
return errors.Errorf("failed to read docker logs: %w", err)
}
@@ -395,10 +401,15 @@ func DockerStreamLogs(ctx context.Context, containerId string, stdout, stderr io
if err != nil {
return errors.Errorf("failed to inspect docker container: %w", err)
}
- if resp.State.ExitCode > 0 {
- return errors.Errorf("error running container: exit %d", resp.State.ExitCode)
+ switch resp.State.ExitCode {
+ case 0:
+ return nil
+ case 137:
+ err = ErrContainerKilled
+ default:
+ err = errors.Errorf("exit %d", resp.State.ExitCode)
}
- return nil
+ return errors.Errorf("error running container: %w", err)
}
func DockerStreamLogsOnce(ctx context.Context, containerId string, stdout, stderr io.Writer) error {
@@ -460,6 +471,11 @@ func DockerExecOnceWithStream(ctx context.Context, containerId, workdir string,
return err
}
+func IsDockerRunning(ctx context.Context) bool {
+ _, err := Docker.Ping(ctx)
+ return !client.IsErrConnectionFailed(err)
+}
+
var portErrorPattern = regexp.MustCompile("Bind for (.*) failed: port is already allocated")
func parsePortBindError(err error) string {
diff --git a/internal/utils/flags/db_url.go b/internal/utils/flags/db_url.go
index 2a9134c6b4..0b666d6e16 100644
--- a/internal/utils/flags/db_url.go
+++ b/internal/utils/flags/db_url.go
@@ -1,11 +1,16 @@
package flags
import (
+ "bytes"
+ "context"
"crypto/rand"
+ _ "embed"
"fmt"
"math/big"
+ "net/http"
"os"
"strings"
+ "text/template"
"github.com/go-errors/errors"
"github.com/jackc/pgconn"
@@ -15,6 +20,8 @@ import (
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/internal/utils/credentials"
"github.com/supabase/cli/pkg/api"
+ "github.com/supabase/cli/pkg/config"
+ "github.com/supabase/cli/pkg/pgxv5"
)
type connection int
@@ -29,7 +36,7 @@ const (
var DbConfig pgconn.Config
-func ParseDatabaseConfig(flagSet *pflag.FlagSet, fsys afero.Fs) error {
+func ParseDatabaseConfig(ctx context.Context, flagSet *pflag.FlagSet, fsys afero.Fs) error {
// Changed flags take precedence over default values
var connType connection
if flag := flagSet.Lookup("db-url"); flag != nil && flag.Changed {
@@ -77,7 +84,7 @@ func ParseDatabaseConfig(flagSet *pflag.FlagSet, fsys afero.Fs) error {
if err := LoadConfig(fsys); err != nil {
return err
}
- DbConfig = NewDbConfigWithPassword(ProjectRef)
+ DbConfig = NewDbConfigWithPassword(ctx, ProjectRef)
case proxy:
token, err := utils.LoadAccessTokenFS(fsys)
if err != nil {
@@ -95,23 +102,71 @@ func ParseDatabaseConfig(flagSet *pflag.FlagSet, fsys afero.Fs) error {
return nil
}
-func NewDbConfigWithPassword(projectRef string) pgconn.Config {
- config := getDbConfig(projectRef)
- config.Password = getPassword(projectRef)
- return config
+const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+
+func RandomString(size int) (string, error) {
+ data := make([]byte, size)
+ _, err := rand.Read(data)
+ if err != nil {
+ return "", errors.Errorf("failed to read random: %w", err)
+ }
+ for i := range data {
+ n := int(data[i]) % len(letters)
+ data[i] = letters[n]
+ }
+ return string(data), nil
}
-func getPassword(projectRef string) string {
- if password := viper.GetString("DB_PASSWORD"); len(password) > 0 {
- return password
+func NewDbConfigWithPassword(ctx context.Context, projectRef string) pgconn.Config {
+ config := getDbConfig(projectRef)
+ config.Password = viper.GetString("DB_PASSWORD")
+ if len(config.Password) > 0 {
+ return config
}
- if password, err := credentials.StoreProvider.Get(projectRef); err == nil {
- return password
+ var err error
+ if config.Password, err = RandomString(32); err == nil {
+ newRole := pgconn.Config{
+ User: pgxv5.CLI_LOGIN_ROLE,
+ Password: config.Password,
+ }
+ if err := initLoginRole(ctx, projectRef, newRole); err == nil {
+ // Special handling for pooler username
+ if suffix := "." + projectRef; strings.HasSuffix(config.User, suffix) {
+ newRole.User += suffix
+ }
+ config.User = newRole.User
+ return config
+ }
+ }
+ if config.Password, err = credentials.StoreProvider.Get(projectRef); err == nil {
+ return config
}
resetUrl := fmt.Sprintf("%s/project/%s/settings/database", utils.GetSupabaseDashboardURL(), projectRef)
fmt.Fprintln(os.Stderr, "Forgot your password? Reset it from the Dashboard:", utils.Bold(resetUrl))
fmt.Fprint(os.Stderr, "Enter your database password: ")
- return credentials.PromptMasked(os.Stdin)
+ config.Password = credentials.PromptMasked(os.Stdin)
+ return config
+}
+
+var (
+ //go:embed queries/role.sql
+ initRoleEmbed string
+ initRoleTemplate = template.Must(template.New("initRole").Parse(initRoleEmbed))
+)
+
+func initLoginRole(ctx context.Context, projectRef string, config pgconn.Config) error {
+ fmt.Fprintf(os.Stderr, "Initialising %s role...\n", config.User)
+ var initRoleBuf bytes.Buffer
+ if err := initRoleTemplate.Option("missingkey=error").Execute(&initRoleBuf, config); err != nil {
+ return errors.Errorf("failed to exec template: %w", err)
+ }
+ body := api.V1RunQueryBody{Query: initRoleBuf.String()}
+ if resp, err := utils.GetSupabase().V1RunAQueryWithResponse(ctx, projectRef, body); err != nil {
+ return errors.Errorf("failed to initialise login role: %w", err)
+ } else if resp.StatusCode() != http.StatusCreated {
+ return errors.Errorf("unexpected query status %d: %s", resp.StatusCode(), string(resp.Body))
+ }
+ return nil
}
const PASSWORD_LENGTH = 16
@@ -123,7 +178,7 @@ func PromptPassword(stdin *os.File) string {
}
// Generate a password, see ./Settings/Database/DatabaseSettings/ResetDbPassword.tsx#L83
var password []byte
- charset := string(api.AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567891)
+ charset := string(config.LowerUpperLettersDigits.ToChar())
charset = strings.ReplaceAll(charset, ":", "")
maxRange := big.NewInt(int64(len(charset)))
for i := 0; i < PASSWORD_LENGTH; i++ {
@@ -148,13 +203,3 @@ func getDbConfig(projectRef string) pgconn.Config {
Database: "postgres",
}
}
-
-func GetDbConfigOptionalPassword(projectRef string) pgconn.Config {
- config := getDbConfig(projectRef)
- config.Password = viper.GetString("DB_PASSWORD")
- if config.Password == "" {
- fmt.Fprint(os.Stderr, "Enter your database password (or leave blank to skip): ")
- config.Password = credentials.PromptMasked(os.Stdin)
- }
- return config
-}
diff --git a/internal/utils/flags/db_url_test.go b/internal/utils/flags/db_url_test.go
new file mode 100644
index 0000000000..1bb3fcc791
--- /dev/null
+++ b/internal/utils/flags/db_url_test.go
@@ -0,0 +1,111 @@
+package flags
+
+import (
+ "context"
+ "os"
+ "testing"
+
+ "github.com/spf13/afero"
+ "github.com/spf13/pflag"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+ "github.com/supabase/cli/internal/testing/apitest"
+ "github.com/supabase/cli/internal/utils"
+)
+
+func TestParseDatabaseConfig(t *testing.T) {
+ // Setup valid access token
+ token := apitest.RandomAccessToken(t)
+ t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+
+ t.Run("parses direct connection from db-url flag", func(t *testing.T) {
+ flagSet := pflag.NewFlagSet("test", pflag.ContinueOnError)
+ flagSet.String("db-url", "postgres://postgres:password@localhost:5432/postgres", "")
+ err := flagSet.Set("db-url", "postgres://admin:secret@db.example.com:6432/app")
+ assert.Nil(t, err)
+
+ fsys := afero.NewMemMapFs()
+
+ err = ParseDatabaseConfig(context.Background(), flagSet, fsys)
+
+ assert.NoError(t, err)
+ assert.Equal(t, "db.example.com", DbConfig.Host)
+ assert.Equal(t, uint16(6432), DbConfig.Port)
+ assert.Equal(t, "admin", DbConfig.User)
+ assert.Equal(t, "secret", DbConfig.Password)
+ assert.Equal(t, "app", DbConfig.Database)
+ })
+
+ t.Run("parses local connection", func(t *testing.T) {
+ flagSet := pflag.NewFlagSet("test", pflag.ContinueOnError)
+ flagSet.Bool("local", false, "")
+ err := flagSet.Set("local", "true")
+ assert.Nil(t, err)
+
+ fsys := afero.NewMemMapFs()
+
+ utils.Config.Hostname = "localhost"
+ utils.Config.Db.Port = 54322
+ utils.Config.Db.Password = "local-password"
+
+ err = ParseDatabaseConfig(context.Background(), flagSet, fsys)
+
+ assert.NoError(t, err)
+ assert.Equal(t, "localhost", DbConfig.Host)
+ assert.Equal(t, uint16(54322), DbConfig.Port)
+ assert.Equal(t, "postgres", DbConfig.User)
+ assert.Equal(t, "local-password", DbConfig.Password)
+ assert.Equal(t, "postgres", DbConfig.Database)
+ })
+
+ t.Run("parses linked connection", func(t *testing.T) {
+ flagSet := pflag.NewFlagSet("test", pflag.ContinueOnError)
+ flagSet.Bool("linked", false, "")
+ err := flagSet.Set("linked", "true")
+ assert.Nil(t, err)
+
+ fsys := afero.NewMemMapFs()
+
+ project := apitest.RandomProjectRef()
+ err = afero.WriteFile(fsys, utils.ProjectRefPath, []byte(project), 0644)
+ require.NoError(t, err)
+
+ err = ParseDatabaseConfig(context.Background(), flagSet, fsys)
+
+ assert.NoError(t, err)
+ assert.Equal(t, utils.GetSupabaseDbHost(project), DbConfig.Host)
+ })
+}
+
+func TestPromptPassword(t *testing.T) {
+ t.Run("returns user input when provided", func(t *testing.T) {
+ r, w, err := os.Pipe()
+ require.NoError(t, err)
+ defer r.Close()
+ go func() {
+ defer w.Close()
+ _, err := w.Write([]byte("test-password"))
+ assert.Nil(t, err)
+ }()
+
+ password := PromptPassword(r)
+
+ assert.Equal(t, "test-password", password)
+ })
+
+ t.Run("generates password when input is empty", func(t *testing.T) {
+ r, w, err := os.Pipe()
+ require.NoError(t, err)
+ defer r.Close()
+ go func() {
+ defer w.Close()
+ _, err := w.Write([]byte(""))
+ assert.Nil(t, err)
+ }()
+
+ password := PromptPassword(r)
+
+ assert.Len(t, password, PASSWORD_LENGTH)
+ assert.NotEqual(t, "", password)
+ })
+}
diff --git a/internal/utils/flags/queries/role.sql b/internal/utils/flags/queries/role.sql
new file mode 100644
index 0000000000..2e10035aeb
--- /dev/null
+++ b/internal/utils/flags/queries/role.sql
@@ -0,0 +1,16 @@
+do $func$
+begin
+ if not exists (
+ select 1
+ from pg_roles
+ where rolname = '{{ .User }}'
+ )
+ then
+ create role "{{ .User }}" noinherit login noreplication in role postgres;
+ end if;
+ execute format(
+ $$alter role "{{ .User }}" with password '{{ .Password }}' valid until %L$$,
+ now() + interval '5 minutes'
+ );
+end
+$func$ language plpgsql;
diff --git a/internal/utils/misc.go b/internal/utils/misc.go
index d7d9fd33c4..80fb13b27d 100644
--- a/internal/utils/misc.go
+++ b/internal/utils/misc.go
@@ -10,11 +10,14 @@ import (
"regexp"
"time"
+ "github.com/containerd/errdefs"
"github.com/docker/docker/client"
"github.com/go-errors/errors"
"github.com/go-git/go-git/v5"
+ "github.com/go-git/go-git/v5/plumbing/format/gitignore"
"github.com/spf13/afero"
"github.com/spf13/viper"
+ "github.com/supabase/cli/pkg/migration"
)
// Assigned using `-ldflags` https://stackoverflow.com/q/11354518
@@ -52,69 +55,8 @@ var (
ImageNamePattern = regexp.MustCompile(`\/(.*):`)
// These schemas are ignored from db diff and db dump
- PgSchemas = []string{
- "information_schema",
- "pg_*", // Wildcard pattern follows pg_dump
- }
- // Initialised by postgres image and owned by postgres role
- InternalSchemas = append([]string{
- "_analytics",
- "_realtime",
- "_supavisor",
- "auth",
- "extensions",
- "pgbouncer",
- "realtime",
- "storage",
- "supabase_functions",
- "supabase_migrations",
- // Owned by extensions
- "cron",
- "dbdev",
- "graphql",
- "graphql_public",
- "net",
- "pgmq",
- "pgsodium",
- "pgsodium_masks",
- "pgtle",
- "repack",
- "tiger",
- "tiger_data",
- "timescaledb_*",
- "_timescaledb_*",
- "topology",
- "vault",
- }, PgSchemas...)
- ReservedRoles = []string{
- "anon",
- "authenticated",
- "authenticator",
- "dashboard_user",
- "pgbouncer",
- "postgres",
- "service_role",
- "supabase_admin",
- "supabase_auth_admin",
- "supabase_functions_admin",
- "supabase_read_only_user",
- "supabase_realtime_admin",
- "supabase_replication_admin",
- "supabase_storage_admin",
- // Managed by extensions
- "pgsodium_keyholder",
- "pgsodium_keyiduser",
- "pgsodium_keymaker",
- "pgtle_admin",
- }
- AllowedConfigs = []string{
- // Ref: https://github.com/supabase/postgres/blob/develop/ansible/files/postgresql_config/supautils.conf.j2#L10
- "pgaudit.*",
- "pgrst.*",
- "session_replication_role",
- "statement_timeout",
- "track_io_timing",
- }
+ PgSchemas = migration.InternalSchemas[:2]
+ InternalSchemas = migration.InternalSchemas
SupabaseDirPath = "supabase"
ConfigPath = filepath.Join(SupabaseDirPath, "config.toml")
@@ -149,7 +91,7 @@ var (
func GetCurrentTimestamp() string {
// Magic number: https://stackoverflow.com/q/45160822.
- return time.Now().UTC().Format("20060102150405")
+ return time.Now().UTC().Format(layoutVersion)
}
func GetCurrentBranchFS(fsys afero.Fs) (string, error) {
@@ -167,7 +109,7 @@ func AssertSupabaseDbIsRunning() error {
func AssertServiceIsRunning(ctx context.Context, containerId string) error {
if _, err := Docker.ContainerInspect(ctx, containerId); err != nil {
- if client.IsErrNotFound(err) {
+ if errdefs.IsNotFound(err) {
return errors.New(ErrNotRunning)
}
if client.IsErrConnectionFailed(err) {
@@ -184,6 +126,24 @@ func IsGitRepo() bool {
return err == nil
}
+func IsGitIgnored(fp ...string) (bool, error) {
+ opts := &git.PlainOpenOptions{DetectDotGit: true}
+ repo, err := git.PlainOpenWithOptions(".", opts)
+ if err != nil {
+ return false, err
+ }
+ wt, err := repo.Worktree()
+ if err != nil {
+ return false, err
+ }
+ ps, err := gitignore.ReadPatterns(wt.Filesystem, nil)
+ if err != nil {
+ return false, err
+ }
+ m := gitignore.NewMatcher(ps)
+ return m.Match(fp, false), nil
+}
+
// If the `os.Getwd()` is within a supabase project, this will return
// the root of the given project as the current working directory.
// Otherwise, the `os.Getwd()` is kept as is.
diff --git a/internal/utils/misc_test.go b/internal/utils/misc_test.go
index 6472c2145f..b12d68c789 100644
--- a/internal/utils/misc_test.go
+++ b/internal/utils/misc_test.go
@@ -75,3 +75,114 @@ func TestProjectRoot(t *testing.T) {
assert.Equal(t, cwd, path)
})
}
+
+func TestShortContainerImageName(t *testing.T) {
+ t.Run("extracts short name from image", func(t *testing.T) {
+ input := "registry.supabase.com/postgres:15.1.0.99"
+ expected := "postgres"
+
+ result := ShortContainerImageName(input)
+
+ assert.Equal(t, expected, result)
+ })
+}
+
+func TestIsBranchNameReserved(t *testing.T) {
+ t.Run("identifies reserved names", func(t *testing.T) {
+ reserved := []string{"_current_branch", "main"}
+ for _, name := range reserved {
+ assert.True(t, IsBranchNameReserved(name), "Expected %s to be reserved", name)
+ }
+ })
+
+ t.Run("allows custom names", func(t *testing.T) {
+ allowed := []string{"my-feature", "test-branch-123"}
+ for _, name := range allowed {
+ assert.False(t, IsBranchNameReserved(name), "Expected %s to be allowed", name)
+ }
+ })
+}
+
+func TestValidateFunctionSlug(t *testing.T) {
+ t.Run("validates correct slugs", func(t *testing.T) {
+ valid := []string{
+ "my-function",
+ "MyFunction",
+ "function_1",
+ "a123",
+ }
+ for _, slug := range valid {
+ err := ValidateFunctionSlug(slug)
+ assert.NoError(t, err, "Expected %s to be valid", slug)
+ }
+ })
+
+ t.Run("rejects invalid slugs", func(t *testing.T) {
+ invalid := []string{
+ "1function",
+ "my function",
+ "function!",
+ "",
+ "-function",
+ "_function",
+ }
+ for _, slug := range invalid {
+ err := ValidateFunctionSlug(slug)
+ assert.ErrorIs(t, err, ErrInvalidSlug, "Expected %s to be invalid", slug)
+ }
+ })
+}
+
+func TestAssertProjectRefIsValid(t *testing.T) {
+ t.Run("validates correct refs", func(t *testing.T) {
+ validRef := "abcdefghijklmnopqrst"
+ err := AssertProjectRefIsValid(validRef)
+ assert.NoError(t, err)
+ })
+
+ t.Run("rejects invalid refs", func(t *testing.T) {
+ invalid := []string{
+ "tooshort",
+ "toolongabcdefghijklmnopqrst",
+ "UPPERCASE",
+ "special-chars",
+ "123",
+ "",
+ }
+ for _, ref := range invalid {
+ err := AssertProjectRefIsValid(ref)
+ assert.ErrorIs(t, err, ErrInvalidRef, "Expected %s to be invalid", ref)
+ }
+ })
+}
+
+func TestWriteFile(t *testing.T) {
+ t.Run("writes file with directories", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ path := filepath.Join("deep", "nested", "dir", "file.txt")
+ content := []byte("test content")
+
+ err := WriteFile(path, content, fsys)
+
+ assert.NoError(t, err)
+
+ written, err := afero.ReadFile(fsys, path)
+ assert.NoError(t, err)
+ assert.Equal(t, content, written)
+ })
+
+ t.Run("overwrites existing file", func(t *testing.T) {
+ fsys := afero.NewMemMapFs()
+ path := "test.txt"
+ original := []byte("original")
+ updated := []byte("updated")
+ require.NoError(t, afero.WriteFile(fsys, path, original, 0644))
+
+ err := WriteFile(path, updated, fsys)
+
+ assert.NoError(t, err)
+ written, err := afero.ReadFile(fsys, path)
+ assert.NoError(t, err)
+ assert.Equal(t, updated, written)
+ })
+}
diff --git a/internal/utils/output_test.go b/internal/utils/output_test.go
new file mode 100644
index 0000000000..088136ebac
--- /dev/null
+++ b/internal/utils/output_test.go
@@ -0,0 +1,141 @@
+package utils
+
+import (
+ "bytes"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestEncodeOutput(t *testing.T) {
+ t.Run("encodes env format", func(t *testing.T) {
+ input := map[string]string{
+ "DATABASE_URL": "postgres://user:pass@host:5432/db",
+ "API_KEY": "secret-key",
+ }
+ var buf bytes.Buffer
+ err := EncodeOutput(OutputEnv, &buf, input)
+ assert.NoError(t, err)
+ expected := "API_KEY=\"secret-key\"\nDATABASE_URL=\"postgres://user:pass@host:5432/db\"\n"
+ assert.Equal(t, expected, buf.String())
+ })
+
+ t.Run("fails env format with invalid type", func(t *testing.T) {
+ input := map[string]int{"FOO": 123}
+ var buf bytes.Buffer
+ err := EncodeOutput(OutputEnv, &buf, input)
+ assert.ErrorContains(t, err, "value is not a map[string]string")
+ })
+
+ t.Run("encodes json format", func(t *testing.T) {
+ input := map[string]interface{}{
+ "name": "test",
+ "config": map[string]interface{}{
+ "port": 5432,
+ "enabled": true,
+ },
+ }
+ var buf bytes.Buffer
+ err := EncodeOutput(OutputJson, &buf, input)
+ assert.NoError(t, err)
+ expected := `{
+ "config": {
+ "enabled": true,
+ "port": 5432
+ },
+ "name": "test"
+}
+`
+ assert.Equal(t, expected, buf.String())
+ })
+
+ t.Run("encodes yaml format", func(t *testing.T) {
+ input := map[string]interface{}{
+ "name": "test",
+ "config": map[string]interface{}{
+ "port": 5432,
+ "enabled": true,
+ },
+ }
+ var buf bytes.Buffer
+ err := EncodeOutput(OutputYaml, &buf, input)
+ assert.NoError(t, err)
+ expected := `config:
+ enabled: true
+ port: 5432
+name: test
+`
+ assert.Equal(t, expected, buf.String())
+ })
+
+ t.Run("encodes toml format", func(t *testing.T) {
+ input := map[string]interface{}{
+ "name": "test",
+ "config": map[string]interface{}{
+ "port": 5432,
+ "enabled": true,
+ },
+ }
+ var buf bytes.Buffer
+ err := EncodeOutput(OutputToml, &buf, input)
+ assert.NoError(t, err)
+ expected := `name = "test"
+
+[config]
+ enabled = true
+ port = 5432
+`
+ assert.Equal(t, expected, buf.String())
+ })
+
+ t.Run("fails with unsupported format", func(t *testing.T) {
+ var buf bytes.Buffer
+ err := EncodeOutput("invalid", &buf, nil)
+ assert.ErrorContains(t, err, `Unsupported output encoding "invalid"`)
+ })
+
+ t.Run("handles complex nested structures", func(t *testing.T) {
+ input := map[string]interface{}{
+ "database": map[string]interface{}{
+ "connections": []map[string]interface{}{
+ {
+ "host": "localhost",
+ "port": 5432,
+ },
+ {
+ "host": "remote",
+ "port": 6543,
+ },
+ },
+ "settings": map[string]interface{}{
+ "max_connections": 100,
+ "ssl_enabled": true,
+ },
+ },
+ }
+ var buf bytes.Buffer
+ err := EncodeOutput(OutputJson, &buf, input)
+ require.NoError(t, err)
+ expected := `{
+ "database": {
+ "connections": [
+ {
+ "host": "localhost",
+ "port": 5432
+ },
+ {
+ "host": "remote",
+ "port": 6543
+ }
+ ],
+ "settings": {
+ "max_connections": 100,
+ "ssl_enabled": true
+ }
+ }
+}
+`
+ assert.Equal(t, expected, buf.String())
+ })
+}
diff --git a/internal/utils/render.go b/internal/utils/render.go
index 2d99f368a2..07d674d298 100644
--- a/internal/utils/render.go
+++ b/internal/utils/render.go
@@ -10,6 +10,10 @@ const (
layoutHuman = "2006-01-02 15:04:05"
)
+func FormatTime(t time.Time) string {
+ return t.UTC().Format(layoutHuman)
+}
+
func FormatTimestamp(timestamp string) string {
return parse(time.RFC3339, timestamp)
}
@@ -24,5 +28,12 @@ func parse(layout, value string) string {
fmt.Fprintln(GetDebugLogger(), err)
return value
}
- return t.UTC().Format(layoutHuman)
+ return FormatTime(t)
+}
+
+func FormatRegion(region string) string {
+ if readable, ok := RegionMap[region]; ok {
+ return readable
+ }
+ return region
}
diff --git a/internal/utils/slice_test.go b/internal/utils/slice_test.go
index 81642c73ff..47bdea171f 100644
--- a/internal/utils/slice_test.go
+++ b/internal/utils/slice_test.go
@@ -7,9 +7,59 @@ import (
)
func TestSliceEqual(t *testing.T) {
- assert.False(t, SliceEqual([]string{"a"}, []string{"b"}))
+ t.Run("different slices", func(t *testing.T) {
+ assert.False(t, SliceEqual([]string{"a"}, []string{"b"}))
+ })
+
+ t.Run("different lengths", func(t *testing.T) {
+ assert.False(t, SliceEqual([]string{"a"}, []string{"a", "b"}))
+ assert.False(t, SliceEqual([]string{"a", "b"}, []string{"a"}))
+ })
+
+ t.Run("equal slices", func(t *testing.T) {
+ assert.True(t, SliceEqual([]string{"a", "b"}, []string{"a", "b"}))
+ assert.True(t, SliceEqual([]int{1, 2, 3}, []int{1, 2, 3}))
+ })
+
+ t.Run("empty slices", func(t *testing.T) {
+ assert.True(t, SliceEqual([]string{}, []string{}))
+ })
}
func TestSliceContains(t *testing.T) {
- assert.False(t, SliceContains([]string{"a"}, "b"))
+ t.Run("not contains element", func(t *testing.T) {
+ assert.False(t, SliceContains([]string{"a"}, "b"))
+ })
+
+ t.Run("contains element", func(t *testing.T) {
+ assert.True(t, SliceContains([]string{"a", "b", "c"}, "b"))
+ assert.True(t, SliceContains([]int{1, 2, 3}, 2))
+ })
+
+ t.Run("empty slice", func(t *testing.T) {
+ assert.False(t, SliceContains([]string{}, "a"))
+ })
+}
+
+func TestRemoveDuplicates(t *testing.T) {
+ t.Run("string slice", func(t *testing.T) {
+ input := []string{"a", "b", "a", "c", "b", "d"}
+ expected := []string{"a", "b", "c", "d"}
+ assert.Equal(t, expected, RemoveDuplicates(input))
+ })
+
+ t.Run("int slice", func(t *testing.T) {
+ input := []int{1, 2, 2, 3, 1, 4, 3, 5}
+ expected := []int{1, 2, 3, 4, 5}
+ assert.Equal(t, expected, RemoveDuplicates(input))
+ })
+
+ t.Run("empty slice", func(t *testing.T) {
+ assert.Empty(t, RemoveDuplicates([]string{}))
+ })
+
+ t.Run("no duplicates", func(t *testing.T) {
+ input := []int{1, 2, 3, 4, 5}
+ assert.Equal(t, input, RemoveDuplicates(input))
+ })
}
diff --git a/internal/utils/tenant/client.go b/internal/utils/tenant/client.go
index ad0ef6aa7b..3d6d039fa8 100644
--- a/internal/utils/tenant/client.go
+++ b/internal/utils/tenant/client.go
@@ -2,12 +2,12 @@ package tenant
import (
"context"
- "net/http"
- "time"
+ "strings"
"github.com/go-errors/errors"
"github.com/supabase/cli/internal/utils"
"github.com/supabase/cli/pkg/api"
+ "github.com/supabase/cli/pkg/cast"
"github.com/supabase/cli/pkg/fetcher"
)
@@ -28,18 +28,49 @@ func (a ApiKey) IsEmpty() bool {
func NewApiKey(resp []api.ApiKeyResponse) ApiKey {
var result ApiKey
for _, key := range resp {
- if key.Name == "anon" {
- result.Anon = key.ApiKey
+ value, err := key.ApiKey.Get()
+ if err != nil {
+ continue
}
- if key.Name == "service_role" {
- result.ServiceRole = key.ApiKey
+ if t, err := key.Type.Get(); err == nil {
+ switch t {
+ case api.ApiKeyResponseTypePublishable:
+ result.Anon = value
+ continue
+ case api.ApiKeyResponseTypeSecret:
+ if isServiceRole(key) {
+ result.ServiceRole = value
+ }
+ continue
+ }
+ }
+ switch key.Name {
+ case "anon":
+ if len(result.Anon) == 0 {
+ result.Anon = value
+ }
+ case "service_role":
+ if len(result.ServiceRole) == 0 {
+ result.ServiceRole = value
+ }
}
}
return result
}
+func isServiceRole(key api.ApiKeyResponse) bool {
+ if tmpl, err := key.SecretJwtTemplate.Get(); err == nil {
+ if role, ok := tmpl["role"].(string); ok {
+ return strings.EqualFold(role, "service_role")
+ }
+ }
+ return false
+}
+
func GetApiKeys(ctx context.Context, projectRef string) (ApiKey, error) {
- resp, err := utils.GetSupabase().V1GetProjectApiKeysWithResponse(ctx, projectRef, &api.V1GetProjectApiKeysParams{})
+ resp, err := utils.GetSupabase().V1GetProjectApiKeysWithResponse(ctx, projectRef, &api.V1GetProjectApiKeysParams{
+ Reveal: cast.Ptr(true),
+ })
if err != nil {
return ApiKey{}, errors.Errorf("failed to get api keys: %w", err)
}
@@ -57,20 +88,10 @@ type TenantAPI struct {
*fetcher.Fetcher
}
-func NewTenantAPI(ctx context.Context, projectRef, anonKey string) TenantAPI {
- server := "https://" + utils.GetSupabaseHost(projectRef)
- client := &http.Client{
- Timeout: 10 * time.Second,
- }
- header := func(req *http.Request) {
- req.Header.Add("apikey", anonKey)
- }
- api := TenantAPI{Fetcher: fetcher.NewFetcher(
- server,
- fetcher.WithHTTPClient(client),
- fetcher.WithRequestEditor(header),
+func NewTenantAPI(ctx context.Context, projectRef, serviceKey string) TenantAPI {
+ return TenantAPI{Fetcher: fetcher.NewServiceGateway(
+ "https://"+utils.GetSupabaseHost(projectRef),
+ serviceKey,
fetcher.WithUserAgent("SupabaseCLI/"+utils.Version),
- fetcher.WithExpectedStatus(http.StatusOK),
)}
- return api
}
diff --git a/internal/utils/tenant/client_test.go b/internal/utils/tenant/client_test.go
new file mode 100644
index 0000000000..849629284b
--- /dev/null
+++ b/internal/utils/tenant/client_test.go
@@ -0,0 +1,151 @@
+package tenant
+
+import (
+ "context"
+ "net/http"
+ "testing"
+
+ "github.com/h2non/gock"
+ "github.com/oapi-codegen/nullable"
+ "github.com/stretchr/testify/assert"
+ "github.com/supabase/cli/internal/testing/apitest"
+ "github.com/supabase/cli/internal/utils"
+ "github.com/supabase/cli/pkg/api"
+)
+
+func TestApiKey(t *testing.T) {
+ t.Run("creates api key from response", func(t *testing.T) {
+ resp := []api.ApiKeyResponse{
+ {Name: "anon", ApiKey: nullable.NewNullableWithValue("anon-key")},
+ {Name: "service_role", ApiKey: nullable.NewNullableWithValue("service-key")},
+ }
+
+ keys := NewApiKey(resp)
+
+ assert.Equal(t, "anon-key", keys.Anon)
+ assert.Equal(t, "service-key", keys.ServiceRole)
+ assert.False(t, keys.IsEmpty())
+ })
+
+ t.Run("handles empty response", func(t *testing.T) {
+ resp := []api.ApiKeyResponse{
+ {Name: "service_role", ApiKey: nullable.NewNullNullable[string]()},
+ }
+
+ keys := NewApiKey(resp)
+
+ assert.Empty(t, keys.Anon)
+ assert.Empty(t, keys.ServiceRole)
+ assert.True(t, keys.IsEmpty())
+ })
+
+ t.Run("handles partial response", func(t *testing.T) {
+ resp := []api.ApiKeyResponse{
+ {Name: "anon", ApiKey: nullable.NewNullableWithValue("anon-key")},
+ }
+
+ keys := NewApiKey(resp)
+
+ assert.Equal(t, "anon-key", keys.Anon)
+ assert.Empty(t, keys.ServiceRole)
+ assert.False(t, keys.IsEmpty())
+ })
+}
+
+func TestGetApiKeys(t *testing.T) {
+ t.Run("retrieves api keys successfully", func(t *testing.T) {
+ token := apitest.RandomAccessToken(t)
+ t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+
+ defer gock.OffAll()
+ projectRef := apitest.RandomProjectRef()
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects/" + projectRef + "/api-keys").
+ Reply(http.StatusOK).
+ JSON([]api.ApiKeyResponse{
+ {Name: "anon", ApiKey: nullable.NewNullableWithValue("anon-key")},
+ {Name: "service_role", ApiKey: nullable.NewNullableWithValue("service-key")},
+ })
+
+ keys, err := GetApiKeys(context.Background(), projectRef)
+
+ assert.NoError(t, err)
+ assert.Equal(t, "anon-key", keys.Anon)
+ assert.Equal(t, "service-key", keys.ServiceRole)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("handles network error", func(t *testing.T) {
+ token := apitest.RandomAccessToken(t)
+ t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+
+ defer gock.OffAll()
+ projectRef := apitest.RandomProjectRef()
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects/" + projectRef + "/api-keys").
+ ReplyError(gock.ErrCannotMatch)
+
+ keys, err := GetApiKeys(context.Background(), projectRef)
+
+ assert.Error(t, err)
+ assert.Contains(t, err.Error(), "failed to get api keys")
+ assert.True(t, keys.IsEmpty())
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("handles unauthorized error", func(t *testing.T) {
+ token := apitest.RandomAccessToken(t)
+ t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+
+ defer gock.OffAll()
+ projectRef := apitest.RandomProjectRef()
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects/" + projectRef + "/api-keys").
+ Reply(http.StatusUnauthorized).
+ JSON(map[string]string{"message": "unauthorized"})
+
+ keys, err := GetApiKeys(context.Background(), projectRef)
+
+ assert.ErrorIs(t, err, ErrAuthToken)
+ assert.True(t, keys.IsEmpty())
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("handles missing anon key", func(t *testing.T) {
+ token := apitest.RandomAccessToken(t)
+ t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+
+ defer gock.OffAll()
+ projectRef := apitest.RandomProjectRef()
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects/" + projectRef + "/api-keys").
+ Reply(http.StatusOK).
+ JSON([]api.ApiKeyResponse{}) // should this error if response has only service_role key?
+
+ keys, err := GetApiKeys(context.Background(), projectRef)
+
+ assert.ErrorIs(t, err, errMissingKey)
+ assert.True(t, keys.IsEmpty())
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+}
+
+func TestNewTenantAPI(t *testing.T) {
+ projectRef := apitest.RandomProjectRef()
+ anonKey := "test-key"
+
+ api := NewTenantAPI(context.Background(), projectRef, anonKey)
+ assert.NotNil(t, api.Fetcher)
+
+ defer gock.OffAll()
+ gock.New("https://"+utils.GetSupabaseHost(projectRef)).
+ Get("/test").
+ MatchHeader("Authorization", "Bearer "+anonKey).
+ MatchHeader("User-Agent", "SupabaseCLI/"+utils.Version).
+ Reply(http.StatusOK)
+
+ _, err := api.Send(context.Background(), http.MethodGet, "/test", nil)
+
+ assert.NoError(t, err)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+}
diff --git a/internal/utils/tenant/database_test.go b/internal/utils/tenant/database_test.go
new file mode 100644
index 0000000000..d80ac5cba9
--- /dev/null
+++ b/internal/utils/tenant/database_test.go
@@ -0,0 +1,75 @@
+package tenant
+
+import (
+ "context"
+ "net/http"
+ "testing"
+
+ "github.com/h2non/gock"
+ "github.com/stretchr/testify/assert"
+ "github.com/supabase/cli/internal/testing/apitest"
+ "github.com/supabase/cli/internal/utils"
+ "github.com/supabase/cli/pkg/api"
+)
+
+func TestGetDatabaseVersion(t *testing.T) {
+ t.Run("retrieves database version successfully", func(t *testing.T) {
+ token := apitest.RandomAccessToken(t)
+ t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+
+ defer gock.OffAll()
+ projectRef := apitest.RandomProjectRef()
+ mockPostgres := api.V1ProjectWithDatabaseResponse{Id: projectRef}
+ mockPostgres.Database.Version = "14.1.0.99"
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects").
+ Reply(http.StatusOK).
+ JSON([]api.V1ProjectWithDatabaseResponse{mockPostgres})
+
+ version, err := GetDatabaseVersion(context.Background(), projectRef)
+
+ assert.NoError(t, err)
+ assert.Equal(t, "14.1.0.99", version)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("handles project not found", func(t *testing.T) {
+ token := apitest.RandomAccessToken(t)
+ t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+
+ defer gock.OffAll()
+ projectRef := apitest.RandomProjectRef()
+ mockPostgres := api.V1ProjectWithDatabaseResponse{Id: "different-project"}
+ mockPostgres.Database.Version = "14.1.0.99"
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects").
+ Reply(http.StatusOK).
+ JSON([]api.V1ProjectWithDatabaseResponse{mockPostgres})
+
+ version, err := GetDatabaseVersion(context.Background(), projectRef)
+
+ assert.ErrorIs(t, err, errDatabaseVersion)
+ assert.Empty(t, version)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+
+ t.Run("handles empty database version", func(t *testing.T) {
+ token := apitest.RandomAccessToken(t)
+ t.Setenv("SUPABASE_ACCESS_TOKEN", string(token))
+
+ defer gock.OffAll()
+ projectRef := apitest.RandomProjectRef()
+ gock.New(utils.DefaultApiHost).
+ Get("/v1/projects").
+ Reply(http.StatusOK).
+ JSON([]api.V1ProjectWithDatabaseResponse{{
+ Id: projectRef,
+ }})
+
+ version, err := GetDatabaseVersion(context.Background(), projectRef)
+
+ assert.ErrorIs(t, err, errDatabaseVersion)
+ assert.Empty(t, version)
+ assert.Empty(t, apitest.ListUnmatchedRequests())
+ })
+}
diff --git a/main.go b/main.go
index 55a2e9a50b..825dde8355 100644
--- a/main.go
+++ b/main.go
@@ -4,8 +4,8 @@ import (
"github.com/supabase/cli/cmd"
)
-//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=pkg/api/types.cfg.yaml api/beta.yaml
-//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=pkg/api/client.cfg.yaml api/beta.yaml
+//go:generate go tool oapi-codegen -config pkg/api/types.cfg.yaml https://api.supabase.green/api/v1-yaml
+//go:generate go tool oapi-codegen -config pkg/api/client.cfg.yaml https://api.supabase.green/api/v1-yaml
func main() {
cmd.Execute()
diff --git a/pkg/api/client.gen.go b/pkg/api/client.gen.go
index ed9093744c..b3898e0f3d 100644
--- a/pkg/api/client.gen.go
+++ b/pkg/api/client.gen.go
@@ -91,25 +91,40 @@ func WithRequestEditorFn(fn RequestEditorFn) ClientOption {
// The interface specification for the client above.
type ClientInterface interface {
// V1DeleteABranch request
- V1DeleteABranch(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1DeleteABranch(ctx context.Context, branchId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1GetABranchConfig request
- V1GetABranchConfig(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1GetABranchConfig(ctx context.Context, branchId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1UpdateABranchConfigWithBody request with any body
- V1UpdateABranchConfigWithBody(ctx context.Context, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1UpdateABranchConfigWithBody(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
- V1UpdateABranchConfig(ctx context.Context, branchId string, body V1UpdateABranchConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1UpdateABranchConfig(ctx context.Context, branchId openapi_types.UUID, body V1UpdateABranchConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- // V1PushABranch request
- V1PushABranch(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1DiffABranch request
+ V1DiffABranch(ctx context.Context, branchId openapi_types.UUID, params *V1DiffABranchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- // V1ResetABranch request
- V1ResetABranch(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1MergeABranchWithBody request with any body
+ V1MergeABranchWithBody(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1MergeABranch(ctx context.Context, branchId openapi_types.UUID, body V1MergeABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1PushABranchWithBody request with any body
+ V1PushABranchWithBody(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1PushABranch(ctx context.Context, branchId openapi_types.UUID, body V1PushABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1ResetABranchWithBody request with any body
+ V1ResetABranchWithBody(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1ResetABranch(ctx context.Context, branchId openapi_types.UUID, body V1ResetABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1AuthorizeUser request
V1AuthorizeUser(ctx context.Context, params *V1AuthorizeUserParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1OauthAuthorizeProjectClaim request
+ V1OauthAuthorizeProjectClaim(ctx context.Context, params *V1OauthAuthorizeProjectClaimParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+
// V1RevokeTokenWithBody request with any body
V1RevokeTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -134,6 +149,12 @@ type ClientInterface interface {
// V1ListOrganizationMembers request
V1ListOrganizationMembers(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1GetOrganizationProjectClaim request
+ V1GetOrganizationProjectClaim(ctx context.Context, slug string, token string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1ClaimProjectForOrganization request
+ V1ClaimProjectForOrganization(ctx context.Context, slug string, token string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
// V1ListAllProjects request
V1ListAllProjects(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -148,27 +169,56 @@ type ClientInterface interface {
// V1GetProject request
V1GetProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
- // GetLogs request
- GetLogs(ctx context.Context, ref string, params *GetLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1GetPerformanceAdvisors request
+ V1GetPerformanceAdvisors(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1GetSecurityAdvisors request
+ V1GetSecurityAdvisors(ctx context.Context, ref string, params *V1GetSecurityAdvisorsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1GetProjectLogs request
+ V1GetProjectLogs(ctx context.Context, ref string, params *V1GetProjectLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1GetProjectUsageApiCount request
+ V1GetProjectUsageApiCount(ctx context.Context, ref string, params *V1GetProjectUsageApiCountParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1GetProjectUsageRequestCount request
+ V1GetProjectUsageRequestCount(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1GetProjectApiKeys request
V1GetProjectApiKeys(ctx context.Context, ref string, params *V1GetProjectApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- // CreateApiKeyWithBody request with any body
- CreateApiKeyWithBody(ctx context.Context, ref string, params *CreateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1CreateProjectApiKeyWithBody request with any body
+ V1CreateProjectApiKeyWithBody(ctx context.Context, ref string, params *V1CreateProjectApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1CreateProjectApiKey(ctx context.Context, ref string, params *V1CreateProjectApiKeyParams, body V1CreateProjectApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1GetProjectLegacyApiKeys request
+ V1GetProjectLegacyApiKeys(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1UpdateProjectLegacyApiKeys request
+ V1UpdateProjectLegacyApiKeys(ctx context.Context, ref string, params *V1UpdateProjectLegacyApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1DeleteProjectApiKey request
+ V1DeleteProjectApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *V1DeleteProjectApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- CreateApiKey(ctx context.Context, ref string, params *CreateApiKeyParams, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1GetProjectApiKey request
+ V1GetProjectApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *V1GetProjectApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- // DeleteApiKey request
- DeleteApiKey(ctx context.Context, ref string, id string, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1UpdateProjectApiKeyWithBody request with any body
+ V1UpdateProjectApiKeyWithBody(ctx context.Context, ref string, id openapi_types.UUID, params *V1UpdateProjectApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
- // GetApiKey request
- GetApiKey(ctx context.Context, ref string, id string, params *GetApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1UpdateProjectApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *V1UpdateProjectApiKeyParams, body V1UpdateProjectApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- // UpdateApiKeyWithBody request with any body
- UpdateApiKeyWithBody(ctx context.Context, ref string, id string, params *UpdateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1ListProjectAddons request
+ V1ListProjectAddons(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
- UpdateApiKey(ctx context.Context, ref string, id string, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1ApplyProjectAddonWithBody request with any body
+ V1ApplyProjectAddonWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1ApplyProjectAddon(ctx context.Context, ref string, body V1ApplyProjectAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1RemoveProjectAddon request
+ V1RemoveProjectAddon(ctx context.Context, ref string, addonVariant interface{}, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1DisablePreviewBranching request
V1DisablePreviewBranching(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -181,6 +231,18 @@ type ClientInterface interface {
V1CreateABranch(ctx context.Context, ref string, body V1CreateABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1GetABranch request
+ V1GetABranch(ctx context.Context, ref string, name string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1DeleteProjectClaimToken request
+ V1DeleteProjectClaimToken(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1GetProjectClaimToken request
+ V1GetProjectClaimToken(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1CreateProjectClaimToken request
+ V1CreateProjectClaimToken(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
// V1GetAuthServiceConfig request
V1GetAuthServiceConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -189,6 +251,31 @@ type ClientInterface interface {
V1UpdateAuthServiceConfig(ctx context.Context, ref string, body V1UpdateAuthServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1GetProjectSigningKeys request
+ V1GetProjectSigningKeys(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1CreateProjectSigningKeyWithBody request with any body
+ V1CreateProjectSigningKeyWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1CreateProjectSigningKey(ctx context.Context, ref string, body V1CreateProjectSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1GetLegacySigningKey request
+ V1GetLegacySigningKey(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1CreateLegacySigningKey request
+ V1CreateLegacySigningKey(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1RemoveProjectSigningKey request
+ V1RemoveProjectSigningKey(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1GetProjectSigningKey request
+ V1GetProjectSigningKey(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1UpdateProjectSigningKeyWithBody request with any body
+ V1UpdateProjectSigningKeyWithBody(ctx context.Context, ref string, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1UpdateProjectSigningKey(ctx context.Context, ref string, id openapi_types.UUID, body V1UpdateProjectSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
// V1ListAllSsoProvider request
V1ListAllSsoProvider(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -198,40 +285,40 @@ type ClientInterface interface {
V1CreateASsoProvider(ctx context.Context, ref string, body V1CreateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1DeleteASsoProvider request
- V1DeleteASsoProvider(ctx context.Context, ref string, providerId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1DeleteASsoProvider(ctx context.Context, ref string, providerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1GetASsoProvider request
- V1GetASsoProvider(ctx context.Context, ref string, providerId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1GetASsoProvider(ctx context.Context, ref string, providerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1UpdateASsoProviderWithBody request with any body
- V1UpdateASsoProviderWithBody(ctx context.Context, ref string, providerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1UpdateASsoProviderWithBody(ctx context.Context, ref string, providerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
- V1UpdateASsoProvider(ctx context.Context, ref string, providerId string, body V1UpdateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1UpdateASsoProvider(ctx context.Context, ref string, providerId openapi_types.UUID, body V1UpdateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- // ListTPAForProject request
- ListTPAForProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1ListProjectTpaIntegrations request
+ V1ListProjectTpaIntegrations(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
- // CreateTPAForProjectWithBody request with any body
- CreateTPAForProjectWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1CreateProjectTpaIntegrationWithBody request with any body
+ V1CreateProjectTpaIntegrationWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
- CreateTPAForProject(ctx context.Context, ref string, body CreateTPAForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1CreateProjectTpaIntegration(ctx context.Context, ref string, body V1CreateProjectTpaIntegrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- // DeleteTPAForProject request
- DeleteTPAForProject(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1DeleteProjectTpaIntegration request
+ V1DeleteProjectTpaIntegration(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
- // GetTPAForProject request
- GetTPAForProject(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1GetProjectTpaIntegration request
+ V1GetProjectTpaIntegration(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1GetProjectPgbouncerConfig request
V1GetProjectPgbouncerConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
- // V1GetSupavisorConfig request
- V1GetSupavisorConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1GetPoolerConfig request
+ V1GetPoolerConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
- // V1UpdateSupavisorConfigWithBody request with any body
- V1UpdateSupavisorConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1UpdatePoolerConfigWithBody request with any body
+ V1UpdatePoolerConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
- V1UpdateSupavisorConfig(ctx context.Context, ref string, body V1UpdateSupavisorConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ V1UpdatePoolerConfig(ctx context.Context, ref string, body V1UpdatePoolerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1GetPostgresConfig request
V1GetPostgresConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -274,8 +361,48 @@ type ClientInterface interface {
V1RestorePitrBackup(ctx context.Context, ref string, body V1RestorePitrBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
- // GetDatabaseMetadata request
- GetDatabaseMetadata(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1GetRestorePoint request
+ V1GetRestorePoint(ctx context.Context, ref string, params *V1GetRestorePointParams, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1CreateRestorePointWithBody request with any body
+ V1CreateRestorePointWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1CreateRestorePoint(ctx context.Context, ref string, body V1CreateRestorePointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1UndoWithBody request with any body
+ V1UndoWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1Undo(ctx context.Context, ref string, body V1UndoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1GetDatabaseMetadata request
+ V1GetDatabaseMetadata(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1GetJitAccess request
+ V1GetJitAccess(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1UpdateJitAccessWithBody request with any body
+ V1UpdateJitAccessWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1UpdateJitAccess(ctx context.Context, ref string, body V1UpdateJitAccessJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1ListJitAccess request
+ V1ListJitAccess(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1DeleteJitAccess request
+ V1DeleteJitAccess(ctx context.Context, ref string, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1ListMigrationHistory request
+ V1ListMigrationHistory(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1ApplyAMigrationWithBody request with any body
+ V1ApplyAMigrationWithBody(ctx context.Context, ref string, params *V1ApplyAMigrationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1ApplyAMigration(ctx context.Context, ref string, params *V1ApplyAMigrationParams, body V1ApplyAMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ // V1UpsertAMigrationWithBody request with any body
+ V1UpsertAMigrationWithBody(ctx context.Context, ref string, params *V1UpsertAMigrationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
+
+ V1UpsertAMigration(ctx context.Context, ref string, params *V1UpsertAMigrationParams, body V1UpsertAMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1RunAQueryWithBody request with any body
V1RunAQueryWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -326,6 +453,9 @@ type ClientInterface interface {
// V1ListAllNetworkBans request
V1ListAllNetworkBans(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1ListAllNetworkBansEnriched request
+ V1ListAllNetworkBansEnriched(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
+
// V1GetNetworkRestrictions request
V1GetNetworkRestrictions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -372,10 +502,8 @@ type ClientInterface interface {
// V1ListAvailableRestoreVersions request
V1ListAvailableRestoreVersions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
- // V1RestoreAProjectWithBody request with any body
- V1RestoreAProjectWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
-
- V1RestoreAProject(ctx context.Context, ref string, body V1RestoreAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
+ // V1RestoreAProject request
+ V1RestoreAProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
// V1CancelAProjectRestoration request
V1CancelAProjectRestoration(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error)
@@ -441,7 +569,7 @@ type ClientInterface interface {
V1GetASnippet(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)
}
-func (c *Client) V1DeleteABranch(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+func (c *Client) V1DeleteABranch(ctx context.Context, branchId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewV1DeleteABranchRequest(c.Server, branchId)
if err != nil {
return nil, err
@@ -453,7 +581,7 @@ func (c *Client) V1DeleteABranch(ctx context.Context, branchId string, reqEditor
return c.Client.Do(req)
}
-func (c *Client) V1GetABranchConfig(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+func (c *Client) V1GetABranchConfig(ctx context.Context, branchId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewV1GetABranchConfigRequest(c.Server, branchId)
if err != nil {
return nil, err
@@ -465,7 +593,7 @@ func (c *Client) V1GetABranchConfig(ctx context.Context, branchId string, reqEdi
return c.Client.Do(req)
}
-func (c *Client) V1UpdateABranchConfigWithBody(ctx context.Context, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+func (c *Client) V1UpdateABranchConfigWithBody(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewV1UpdateABranchConfigRequestWithBody(c.Server, branchId, contentType, body)
if err != nil {
return nil, err
@@ -477,7 +605,7 @@ func (c *Client) V1UpdateABranchConfigWithBody(ctx context.Context, branchId str
return c.Client.Do(req)
}
-func (c *Client) V1UpdateABranchConfig(ctx context.Context, branchId string, body V1UpdateABranchConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+func (c *Client) V1UpdateABranchConfig(ctx context.Context, branchId openapi_types.UUID, body V1UpdateABranchConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
req, err := NewV1UpdateABranchConfigRequest(c.Server, branchId, body)
if err != nil {
return nil, err
@@ -489,8 +617,8 @@ func (c *Client) V1UpdateABranchConfig(ctx context.Context, branchId string, bod
return c.Client.Do(req)
}
-func (c *Client) V1PushABranch(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1PushABranchRequest(c.Server, branchId)
+func (c *Client) V1DiffABranch(ctx context.Context, branchId openapi_types.UUID, params *V1DiffABranchParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DiffABranchRequest(c.Server, branchId, params)
if err != nil {
return nil, err
}
@@ -501,8 +629,8 @@ func (c *Client) V1PushABranch(ctx context.Context, branchId string, reqEditors
return c.Client.Do(req)
}
-func (c *Client) V1ResetABranch(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ResetABranchRequest(c.Server, branchId)
+func (c *Client) V1MergeABranchWithBody(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1MergeABranchRequestWithBody(c.Server, branchId, contentType, body)
if err != nil {
return nil, err
}
@@ -513,8 +641,8 @@ func (c *Client) V1ResetABranch(ctx context.Context, branchId string, reqEditors
return c.Client.Do(req)
}
-func (c *Client) V1AuthorizeUser(ctx context.Context, params *V1AuthorizeUserParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1AuthorizeUserRequest(c.Server, params)
+func (c *Client) V1MergeABranch(ctx context.Context, branchId openapi_types.UUID, body V1MergeABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1MergeABranchRequest(c.Server, branchId, body)
if err != nil {
return nil, err
}
@@ -525,8 +653,8 @@ func (c *Client) V1AuthorizeUser(ctx context.Context, params *V1AuthorizeUserPar
return c.Client.Do(req)
}
-func (c *Client) V1RevokeTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1RevokeTokenRequestWithBody(c.Server, contentType, body)
+func (c *Client) V1PushABranchWithBody(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1PushABranchRequestWithBody(c.Server, branchId, contentType, body)
if err != nil {
return nil, err
}
@@ -537,8 +665,8 @@ func (c *Client) V1RevokeTokenWithBody(ctx context.Context, contentType string,
return c.Client.Do(req)
}
-func (c *Client) V1RevokeToken(ctx context.Context, body V1RevokeTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1RevokeTokenRequest(c.Server, body)
+func (c *Client) V1PushABranch(ctx context.Context, branchId openapi_types.UUID, body V1PushABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1PushABranchRequest(c.Server, branchId, body)
if err != nil {
return nil, err
}
@@ -549,8 +677,8 @@ func (c *Client) V1RevokeToken(ctx context.Context, body V1RevokeTokenJSONReques
return c.Client.Do(req)
}
-func (c *Client) V1ExchangeOauthTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ExchangeOauthTokenRequestWithBody(c.Server, contentType, body)
+func (c *Client) V1ResetABranchWithBody(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ResetABranchRequestWithBody(c.Server, branchId, contentType, body)
if err != nil {
return nil, err
}
@@ -561,8 +689,8 @@ func (c *Client) V1ExchangeOauthTokenWithBody(ctx context.Context, contentType s
return c.Client.Do(req)
}
-func (c *Client) V1ExchangeOauthTokenWithFormdataBody(ctx context.Context, body V1ExchangeOauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ExchangeOauthTokenRequestWithFormdataBody(c.Server, body)
+func (c *Client) V1ResetABranch(ctx context.Context, branchId openapi_types.UUID, body V1ResetABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ResetABranchRequest(c.Server, branchId, body)
if err != nil {
return nil, err
}
@@ -573,8 +701,8 @@ func (c *Client) V1ExchangeOauthTokenWithFormdataBody(ctx context.Context, body
return c.Client.Do(req)
}
-func (c *Client) V1ListAllOrganizations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAllOrganizationsRequest(c.Server)
+func (c *Client) V1AuthorizeUser(ctx context.Context, params *V1AuthorizeUserParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1AuthorizeUserRequest(c.Server, params)
if err != nil {
return nil, err
}
@@ -585,8 +713,8 @@ func (c *Client) V1ListAllOrganizations(ctx context.Context, reqEditors ...Reque
return c.Client.Do(req)
}
-func (c *Client) V1CreateAnOrganizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CreateAnOrganizationRequestWithBody(c.Server, contentType, body)
+func (c *Client) V1OauthAuthorizeProjectClaim(ctx context.Context, params *V1OauthAuthorizeProjectClaimParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1OauthAuthorizeProjectClaimRequest(c.Server, params)
if err != nil {
return nil, err
}
@@ -597,8 +725,8 @@ func (c *Client) V1CreateAnOrganizationWithBody(ctx context.Context, contentType
return c.Client.Do(req)
}
-func (c *Client) V1CreateAnOrganization(ctx context.Context, body V1CreateAnOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CreateAnOrganizationRequest(c.Server, body)
+func (c *Client) V1RevokeTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RevokeTokenRequestWithBody(c.Server, contentType, body)
if err != nil {
return nil, err
}
@@ -609,8 +737,8 @@ func (c *Client) V1CreateAnOrganization(ctx context.Context, body V1CreateAnOrga
return c.Client.Do(req)
}
-func (c *Client) V1GetAnOrganization(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetAnOrganizationRequest(c.Server, slug)
+func (c *Client) V1RevokeToken(ctx context.Context, body V1RevokeTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RevokeTokenRequest(c.Server, body)
if err != nil {
return nil, err
}
@@ -621,8 +749,8 @@ func (c *Client) V1GetAnOrganization(ctx context.Context, slug string, reqEditor
return c.Client.Do(req)
}
-func (c *Client) V1ListOrganizationMembers(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListOrganizationMembersRequest(c.Server, slug)
+func (c *Client) V1ExchangeOauthTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ExchangeOauthTokenRequestWithBody(c.Server, contentType, body)
if err != nil {
return nil, err
}
@@ -633,8 +761,8 @@ func (c *Client) V1ListOrganizationMembers(ctx context.Context, slug string, req
return c.Client.Do(req)
}
-func (c *Client) V1ListAllProjects(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAllProjectsRequest(c.Server)
+func (c *Client) V1ExchangeOauthTokenWithFormdataBody(ctx context.Context, body V1ExchangeOauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ExchangeOauthTokenRequestWithFormdataBody(c.Server, body)
if err != nil {
return nil, err
}
@@ -645,8 +773,8 @@ func (c *Client) V1ListAllProjects(ctx context.Context, reqEditors ...RequestEdi
return c.Client.Do(req)
}
-func (c *Client) V1CreateAProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CreateAProjectRequestWithBody(c.Server, contentType, body)
+func (c *Client) V1ListAllOrganizations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllOrganizationsRequest(c.Server)
if err != nil {
return nil, err
}
@@ -657,8 +785,8 @@ func (c *Client) V1CreateAProjectWithBody(ctx context.Context, contentType strin
return c.Client.Do(req)
}
-func (c *Client) V1CreateAProject(ctx context.Context, body V1CreateAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CreateAProjectRequest(c.Server, body)
+func (c *Client) V1CreateAnOrganizationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateAnOrganizationRequestWithBody(c.Server, contentType, body)
if err != nil {
return nil, err
}
@@ -669,8 +797,8 @@ func (c *Client) V1CreateAProject(ctx context.Context, body V1CreateAProjectJSON
return c.Client.Do(req)
}
-func (c *Client) V1DeleteAProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1DeleteAProjectRequest(c.Server, ref)
+func (c *Client) V1CreateAnOrganization(ctx context.Context, body V1CreateAnOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateAnOrganizationRequest(c.Server, body)
if err != nil {
return nil, err
}
@@ -681,8 +809,8 @@ func (c *Client) V1DeleteAProject(ctx context.Context, ref string, reqEditors ..
return c.Client.Do(req)
}
-func (c *Client) V1GetProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetProjectRequest(c.Server, ref)
+func (c *Client) V1GetAnOrganization(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetAnOrganizationRequest(c.Server, slug)
if err != nil {
return nil, err
}
@@ -693,8 +821,8 @@ func (c *Client) V1GetProject(ctx context.Context, ref string, reqEditors ...Req
return c.Client.Do(req)
}
-func (c *Client) GetLogs(ctx context.Context, ref string, params *GetLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewGetLogsRequest(c.Server, ref, params)
+func (c *Client) V1ListOrganizationMembers(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListOrganizationMembersRequest(c.Server, slug)
if err != nil {
return nil, err
}
@@ -705,8 +833,8 @@ func (c *Client) GetLogs(ctx context.Context, ref string, params *GetLogsParams,
return c.Client.Do(req)
}
-func (c *Client) V1GetProjectApiKeys(ctx context.Context, ref string, params *V1GetProjectApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetProjectApiKeysRequest(c.Server, ref, params)
+func (c *Client) V1GetOrganizationProjectClaim(ctx context.Context, slug string, token string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetOrganizationProjectClaimRequest(c.Server, slug, token)
if err != nil {
return nil, err
}
@@ -717,8 +845,8 @@ func (c *Client) V1GetProjectApiKeys(ctx context.Context, ref string, params *V1
return c.Client.Do(req)
}
-func (c *Client) CreateApiKeyWithBody(ctx context.Context, ref string, params *CreateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewCreateApiKeyRequestWithBody(c.Server, ref, params, contentType, body)
+func (c *Client) V1ClaimProjectForOrganization(ctx context.Context, slug string, token string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ClaimProjectForOrganizationRequest(c.Server, slug, token)
if err != nil {
return nil, err
}
@@ -729,8 +857,8 @@ func (c *Client) CreateApiKeyWithBody(ctx context.Context, ref string, params *C
return c.Client.Do(req)
}
-func (c *Client) CreateApiKey(ctx context.Context, ref string, params *CreateApiKeyParams, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewCreateApiKeyRequest(c.Server, ref, params, body)
+func (c *Client) V1ListAllProjects(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllProjectsRequest(c.Server)
if err != nil {
return nil, err
}
@@ -741,8 +869,8 @@ func (c *Client) CreateApiKey(ctx context.Context, ref string, params *CreateApi
return c.Client.Do(req)
}
-func (c *Client) DeleteApiKey(ctx context.Context, ref string, id string, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewDeleteApiKeyRequest(c.Server, ref, id, params)
+func (c *Client) V1CreateAProjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateAProjectRequestWithBody(c.Server, contentType, body)
if err != nil {
return nil, err
}
@@ -753,8 +881,8 @@ func (c *Client) DeleteApiKey(ctx context.Context, ref string, id string, params
return c.Client.Do(req)
}
-func (c *Client) GetApiKey(ctx context.Context, ref string, id string, params *GetApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewGetApiKeyRequest(c.Server, ref, id, params)
+func (c *Client) V1CreateAProject(ctx context.Context, body V1CreateAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateAProjectRequest(c.Server, body)
if err != nil {
return nil, err
}
@@ -765,8 +893,8 @@ func (c *Client) GetApiKey(ctx context.Context, ref string, id string, params *G
return c.Client.Do(req)
}
-func (c *Client) UpdateApiKeyWithBody(ctx context.Context, ref string, id string, params *UpdateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewUpdateApiKeyRequestWithBody(c.Server, ref, id, params, contentType, body)
+func (c *Client) V1DeleteAProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeleteAProjectRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -777,8 +905,8 @@ func (c *Client) UpdateApiKeyWithBody(ctx context.Context, ref string, id string
return c.Client.Do(req)
}
-func (c *Client) UpdateApiKey(ctx context.Context, ref string, id string, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewUpdateApiKeyRequest(c.Server, ref, id, params, body)
+func (c *Client) V1GetProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -789,8 +917,8 @@ func (c *Client) UpdateApiKey(ctx context.Context, ref string, id string, params
return c.Client.Do(req)
}
-func (c *Client) V1DisablePreviewBranching(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1DisablePreviewBranchingRequest(c.Server, ref)
+func (c *Client) V1GetPerformanceAdvisors(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetPerformanceAdvisorsRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -801,8 +929,8 @@ func (c *Client) V1DisablePreviewBranching(ctx context.Context, ref string, reqE
return c.Client.Do(req)
}
-func (c *Client) V1ListAllBranches(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAllBranchesRequest(c.Server, ref)
+func (c *Client) V1GetSecurityAdvisors(ctx context.Context, ref string, params *V1GetSecurityAdvisorsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetSecurityAdvisorsRequest(c.Server, ref, params)
if err != nil {
return nil, err
}
@@ -813,8 +941,8 @@ func (c *Client) V1ListAllBranches(ctx context.Context, ref string, reqEditors .
return c.Client.Do(req)
}
-func (c *Client) V1CreateABranchWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CreateABranchRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1GetProjectLogs(ctx context.Context, ref string, params *V1GetProjectLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectLogsRequest(c.Server, ref, params)
if err != nil {
return nil, err
}
@@ -825,8 +953,8 @@ func (c *Client) V1CreateABranchWithBody(ctx context.Context, ref string, conten
return c.Client.Do(req)
}
-func (c *Client) V1CreateABranch(ctx context.Context, ref string, body V1CreateABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CreateABranchRequest(c.Server, ref, body)
+func (c *Client) V1GetProjectUsageApiCount(ctx context.Context, ref string, params *V1GetProjectUsageApiCountParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectUsageApiCountRequest(c.Server, ref, params)
if err != nil {
return nil, err
}
@@ -837,8 +965,8 @@ func (c *Client) V1CreateABranch(ctx context.Context, ref string, body V1CreateA
return c.Client.Do(req)
}
-func (c *Client) V1GetAuthServiceConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetAuthServiceConfigRequest(c.Server, ref)
+func (c *Client) V1GetProjectUsageRequestCount(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectUsageRequestCountRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -849,8 +977,8 @@ func (c *Client) V1GetAuthServiceConfig(ctx context.Context, ref string, reqEdit
return c.Client.Do(req)
}
-func (c *Client) V1UpdateAuthServiceConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateAuthServiceConfigRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1GetProjectApiKeys(ctx context.Context, ref string, params *V1GetProjectApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectApiKeysRequest(c.Server, ref, params)
if err != nil {
return nil, err
}
@@ -861,8 +989,8 @@ func (c *Client) V1UpdateAuthServiceConfigWithBody(ctx context.Context, ref stri
return c.Client.Do(req)
}
-func (c *Client) V1UpdateAuthServiceConfig(ctx context.Context, ref string, body V1UpdateAuthServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateAuthServiceConfigRequest(c.Server, ref, body)
+func (c *Client) V1CreateProjectApiKeyWithBody(ctx context.Context, ref string, params *V1CreateProjectApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateProjectApiKeyRequestWithBody(c.Server, ref, params, contentType, body)
if err != nil {
return nil, err
}
@@ -873,8 +1001,8 @@ func (c *Client) V1UpdateAuthServiceConfig(ctx context.Context, ref string, body
return c.Client.Do(req)
}
-func (c *Client) V1ListAllSsoProvider(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAllSsoProviderRequest(c.Server, ref)
+func (c *Client) V1CreateProjectApiKey(ctx context.Context, ref string, params *V1CreateProjectApiKeyParams, body V1CreateProjectApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateProjectApiKeyRequest(c.Server, ref, params, body)
if err != nil {
return nil, err
}
@@ -885,8 +1013,8 @@ func (c *Client) V1ListAllSsoProvider(ctx context.Context, ref string, reqEditor
return c.Client.Do(req)
}
-func (c *Client) V1CreateASsoProviderWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CreateASsoProviderRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1GetProjectLegacyApiKeys(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectLegacyApiKeysRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -897,8 +1025,8 @@ func (c *Client) V1CreateASsoProviderWithBody(ctx context.Context, ref string, c
return c.Client.Do(req)
}
-func (c *Client) V1CreateASsoProvider(ctx context.Context, ref string, body V1CreateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CreateASsoProviderRequest(c.Server, ref, body)
+func (c *Client) V1UpdateProjectLegacyApiKeys(ctx context.Context, ref string, params *V1UpdateProjectLegacyApiKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateProjectLegacyApiKeysRequest(c.Server, ref, params)
if err != nil {
return nil, err
}
@@ -909,8 +1037,8 @@ func (c *Client) V1CreateASsoProvider(ctx context.Context, ref string, body V1Cr
return c.Client.Do(req)
}
-func (c *Client) V1DeleteASsoProvider(ctx context.Context, ref string, providerId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1DeleteASsoProviderRequest(c.Server, ref, providerId)
+func (c *Client) V1DeleteProjectApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *V1DeleteProjectApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeleteProjectApiKeyRequest(c.Server, ref, id, params)
if err != nil {
return nil, err
}
@@ -921,8 +1049,8 @@ func (c *Client) V1DeleteASsoProvider(ctx context.Context, ref string, providerI
return c.Client.Do(req)
}
-func (c *Client) V1GetASsoProvider(ctx context.Context, ref string, providerId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetASsoProviderRequest(c.Server, ref, providerId)
+func (c *Client) V1GetProjectApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *V1GetProjectApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectApiKeyRequest(c.Server, ref, id, params)
if err != nil {
return nil, err
}
@@ -933,8 +1061,8 @@ func (c *Client) V1GetASsoProvider(ctx context.Context, ref string, providerId s
return c.Client.Do(req)
}
-func (c *Client) V1UpdateASsoProviderWithBody(ctx context.Context, ref string, providerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateASsoProviderRequestWithBody(c.Server, ref, providerId, contentType, body)
+func (c *Client) V1UpdateProjectApiKeyWithBody(ctx context.Context, ref string, id openapi_types.UUID, params *V1UpdateProjectApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateProjectApiKeyRequestWithBody(c.Server, ref, id, params, contentType, body)
if err != nil {
return nil, err
}
@@ -945,8 +1073,8 @@ func (c *Client) V1UpdateASsoProviderWithBody(ctx context.Context, ref string, p
return c.Client.Do(req)
}
-func (c *Client) V1UpdateASsoProvider(ctx context.Context, ref string, providerId string, body V1UpdateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateASsoProviderRequest(c.Server, ref, providerId, body)
+func (c *Client) V1UpdateProjectApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *V1UpdateProjectApiKeyParams, body V1UpdateProjectApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateProjectApiKeyRequest(c.Server, ref, id, params, body)
if err != nil {
return nil, err
}
@@ -957,8 +1085,8 @@ func (c *Client) V1UpdateASsoProvider(ctx context.Context, ref string, providerI
return c.Client.Do(req)
}
-func (c *Client) ListTPAForProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewListTPAForProjectRequest(c.Server, ref)
+func (c *Client) V1ListProjectAddons(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListProjectAddonsRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -969,8 +1097,8 @@ func (c *Client) ListTPAForProject(ctx context.Context, ref string, reqEditors .
return c.Client.Do(req)
}
-func (c *Client) CreateTPAForProjectWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewCreateTPAForProjectRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1ApplyProjectAddonWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ApplyProjectAddonRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -981,8 +1109,8 @@ func (c *Client) CreateTPAForProjectWithBody(ctx context.Context, ref string, co
return c.Client.Do(req)
}
-func (c *Client) CreateTPAForProject(ctx context.Context, ref string, body CreateTPAForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewCreateTPAForProjectRequest(c.Server, ref, body)
+func (c *Client) V1ApplyProjectAddon(ctx context.Context, ref string, body V1ApplyProjectAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ApplyProjectAddonRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -993,8 +1121,8 @@ func (c *Client) CreateTPAForProject(ctx context.Context, ref string, body Creat
return c.Client.Do(req)
}
-func (c *Client) DeleteTPAForProject(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewDeleteTPAForProjectRequest(c.Server, ref, tpaId)
+func (c *Client) V1RemoveProjectAddon(ctx context.Context, ref string, addonVariant interface{}, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RemoveProjectAddonRequest(c.Server, ref, addonVariant)
if err != nil {
return nil, err
}
@@ -1005,8 +1133,8 @@ func (c *Client) DeleteTPAForProject(ctx context.Context, ref string, tpaId stri
return c.Client.Do(req)
}
-func (c *Client) GetTPAForProject(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewGetTPAForProjectRequest(c.Server, ref, tpaId)
+func (c *Client) V1DisablePreviewBranching(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DisablePreviewBranchingRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1017,8 +1145,8 @@ func (c *Client) GetTPAForProject(ctx context.Context, ref string, tpaId string,
return c.Client.Do(req)
}
-func (c *Client) V1GetProjectPgbouncerConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetProjectPgbouncerConfigRequest(c.Server, ref)
+func (c *Client) V1ListAllBranches(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllBranchesRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1029,8 +1157,8 @@ func (c *Client) V1GetProjectPgbouncerConfig(ctx context.Context, ref string, re
return c.Client.Do(req)
}
-func (c *Client) V1GetSupavisorConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetSupavisorConfigRequest(c.Server, ref)
+func (c *Client) V1CreateABranchWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateABranchRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1041,8 +1169,8 @@ func (c *Client) V1GetSupavisorConfig(ctx context.Context, ref string, reqEditor
return c.Client.Do(req)
}
-func (c *Client) V1UpdateSupavisorConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateSupavisorConfigRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1CreateABranch(ctx context.Context, ref string, body V1CreateABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateABranchRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1053,8 +1181,8 @@ func (c *Client) V1UpdateSupavisorConfigWithBody(ctx context.Context, ref string
return c.Client.Do(req)
}
-func (c *Client) V1UpdateSupavisorConfig(ctx context.Context, ref string, body V1UpdateSupavisorConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateSupavisorConfigRequest(c.Server, ref, body)
+func (c *Client) V1GetABranch(ctx context.Context, ref string, name string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetABranchRequest(c.Server, ref, name)
if err != nil {
return nil, err
}
@@ -1065,8 +1193,8 @@ func (c *Client) V1UpdateSupavisorConfig(ctx context.Context, ref string, body V
return c.Client.Do(req)
}
-func (c *Client) V1GetPostgresConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetPostgresConfigRequest(c.Server, ref)
+func (c *Client) V1DeleteProjectClaimToken(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeleteProjectClaimTokenRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1077,8 +1205,8 @@ func (c *Client) V1GetPostgresConfig(ctx context.Context, ref string, reqEditors
return c.Client.Do(req)
}
-func (c *Client) V1UpdatePostgresConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdatePostgresConfigRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1GetProjectClaimToken(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectClaimTokenRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1089,8 +1217,8 @@ func (c *Client) V1UpdatePostgresConfigWithBody(ctx context.Context, ref string,
return c.Client.Do(req)
}
-func (c *Client) V1UpdatePostgresConfig(ctx context.Context, ref string, body V1UpdatePostgresConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdatePostgresConfigRequest(c.Server, ref, body)
+func (c *Client) V1CreateProjectClaimToken(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateProjectClaimTokenRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1101,8 +1229,8 @@ func (c *Client) V1UpdatePostgresConfig(ctx context.Context, ref string, body V1
return c.Client.Do(req)
}
-func (c *Client) V1GetStorageConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetStorageConfigRequest(c.Server, ref)
+func (c *Client) V1GetAuthServiceConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetAuthServiceConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1113,8 +1241,8 @@ func (c *Client) V1GetStorageConfig(ctx context.Context, ref string, reqEditors
return c.Client.Do(req)
}
-func (c *Client) V1UpdateStorageConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateStorageConfigRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1UpdateAuthServiceConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateAuthServiceConfigRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1125,8 +1253,8 @@ func (c *Client) V1UpdateStorageConfigWithBody(ctx context.Context, ref string,
return c.Client.Do(req)
}
-func (c *Client) V1UpdateStorageConfig(ctx context.Context, ref string, body V1UpdateStorageConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateStorageConfigRequest(c.Server, ref, body)
+func (c *Client) V1UpdateAuthServiceConfig(ctx context.Context, ref string, body V1UpdateAuthServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateAuthServiceConfigRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1137,8 +1265,8 @@ func (c *Client) V1UpdateStorageConfig(ctx context.Context, ref string, body V1U
return c.Client.Do(req)
}
-func (c *Client) V1DeleteHostnameConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1DeleteHostnameConfigRequest(c.Server, ref)
+func (c *Client) V1GetProjectSigningKeys(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectSigningKeysRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1149,8 +1277,8 @@ func (c *Client) V1DeleteHostnameConfig(ctx context.Context, ref string, reqEdit
return c.Client.Do(req)
}
-func (c *Client) V1GetHostnameConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetHostnameConfigRequest(c.Server, ref)
+func (c *Client) V1CreateProjectSigningKeyWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateProjectSigningKeyRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1161,8 +1289,8 @@ func (c *Client) V1GetHostnameConfig(ctx context.Context, ref string, reqEditors
return c.Client.Do(req)
}
-func (c *Client) V1ActivateCustomHostname(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ActivateCustomHostnameRequest(c.Server, ref)
+func (c *Client) V1CreateProjectSigningKey(ctx context.Context, ref string, body V1CreateProjectSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateProjectSigningKeyRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1173,8 +1301,8 @@ func (c *Client) V1ActivateCustomHostname(ctx context.Context, ref string, reqEd
return c.Client.Do(req)
}
-func (c *Client) V1UpdateHostnameConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateHostnameConfigRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1GetLegacySigningKey(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetLegacySigningKeyRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1185,8 +1313,8 @@ func (c *Client) V1UpdateHostnameConfigWithBody(ctx context.Context, ref string,
return c.Client.Do(req)
}
-func (c *Client) V1UpdateHostnameConfig(ctx context.Context, ref string, body V1UpdateHostnameConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateHostnameConfigRequest(c.Server, ref, body)
+func (c *Client) V1CreateLegacySigningKey(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateLegacySigningKeyRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1197,8 +1325,8 @@ func (c *Client) V1UpdateHostnameConfig(ctx context.Context, ref string, body V1
return c.Client.Do(req)
}
-func (c *Client) V1VerifyDnsConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1VerifyDnsConfigRequest(c.Server, ref)
+func (c *Client) V1RemoveProjectSigningKey(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RemoveProjectSigningKeyRequest(c.Server, ref, id)
if err != nil {
return nil, err
}
@@ -1209,8 +1337,8 @@ func (c *Client) V1VerifyDnsConfig(ctx context.Context, ref string, reqEditors .
return c.Client.Do(req)
}
-func (c *Client) V1ListAllBackups(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAllBackupsRequest(c.Server, ref)
+func (c *Client) V1GetProjectSigningKey(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectSigningKeyRequest(c.Server, ref, id)
if err != nil {
return nil, err
}
@@ -1221,8 +1349,8 @@ func (c *Client) V1ListAllBackups(ctx context.Context, ref string, reqEditors ..
return c.Client.Do(req)
}
-func (c *Client) V1RestorePitrBackupWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1RestorePitrBackupRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1UpdateProjectSigningKeyWithBody(ctx context.Context, ref string, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateProjectSigningKeyRequestWithBody(c.Server, ref, id, contentType, body)
if err != nil {
return nil, err
}
@@ -1233,8 +1361,8 @@ func (c *Client) V1RestorePitrBackupWithBody(ctx context.Context, ref string, co
return c.Client.Do(req)
}
-func (c *Client) V1RestorePitrBackup(ctx context.Context, ref string, body V1RestorePitrBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1RestorePitrBackupRequest(c.Server, ref, body)
+func (c *Client) V1UpdateProjectSigningKey(ctx context.Context, ref string, id openapi_types.UUID, body V1UpdateProjectSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateProjectSigningKeyRequest(c.Server, ref, id, body)
if err != nil {
return nil, err
}
@@ -1245,8 +1373,8 @@ func (c *Client) V1RestorePitrBackup(ctx context.Context, ref string, body V1Res
return c.Client.Do(req)
}
-func (c *Client) GetDatabaseMetadata(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewGetDatabaseMetadataRequest(c.Server, ref)
+func (c *Client) V1ListAllSsoProvider(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllSsoProviderRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1257,8 +1385,8 @@ func (c *Client) GetDatabaseMetadata(ctx context.Context, ref string, reqEditors
return c.Client.Do(req)
}
-func (c *Client) V1RunAQueryWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1RunAQueryRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1CreateASsoProviderWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateASsoProviderRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1269,8 +1397,8 @@ func (c *Client) V1RunAQueryWithBody(ctx context.Context, ref string, contentTyp
return c.Client.Do(req)
}
-func (c *Client) V1RunAQuery(ctx context.Context, ref string, body V1RunAQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1RunAQueryRequest(c.Server, ref, body)
+func (c *Client) V1CreateASsoProvider(ctx context.Context, ref string, body V1CreateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateASsoProviderRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1281,8 +1409,8 @@ func (c *Client) V1RunAQuery(ctx context.Context, ref string, body V1RunAQueryJS
return c.Client.Do(req)
}
-func (c *Client) V1EnableDatabaseWebhook(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1EnableDatabaseWebhookRequest(c.Server, ref)
+func (c *Client) V1DeleteASsoProvider(ctx context.Context, ref string, providerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeleteASsoProviderRequest(c.Server, ref, providerId)
if err != nil {
return nil, err
}
@@ -1293,8 +1421,8 @@ func (c *Client) V1EnableDatabaseWebhook(ctx context.Context, ref string, reqEdi
return c.Client.Do(req)
}
-func (c *Client) V1ListAllFunctions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAllFunctionsRequest(c.Server, ref)
+func (c *Client) V1GetASsoProvider(ctx context.Context, ref string, providerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetASsoProviderRequest(c.Server, ref, providerId)
if err != nil {
return nil, err
}
@@ -1305,8 +1433,8 @@ func (c *Client) V1ListAllFunctions(ctx context.Context, ref string, reqEditors
return c.Client.Do(req)
}
-func (c *Client) V1CreateAFunctionWithBody(ctx context.Context, ref string, params *V1CreateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CreateAFunctionRequestWithBody(c.Server, ref, params, contentType, body)
+func (c *Client) V1UpdateASsoProviderWithBody(ctx context.Context, ref string, providerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateASsoProviderRequestWithBody(c.Server, ref, providerId, contentType, body)
if err != nil {
return nil, err
}
@@ -1317,8 +1445,8 @@ func (c *Client) V1CreateAFunctionWithBody(ctx context.Context, ref string, para
return c.Client.Do(req)
}
-func (c *Client) V1CreateAFunction(ctx context.Context, ref string, params *V1CreateAFunctionParams, body V1CreateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CreateAFunctionRequest(c.Server, ref, params, body)
+func (c *Client) V1UpdateASsoProvider(ctx context.Context, ref string, providerId openapi_types.UUID, body V1UpdateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateASsoProviderRequest(c.Server, ref, providerId, body)
if err != nil {
return nil, err
}
@@ -1329,8 +1457,8 @@ func (c *Client) V1CreateAFunction(ctx context.Context, ref string, params *V1Cr
return c.Client.Do(req)
}
-func (c *Client) V1BulkUpdateFunctionsWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1BulkUpdateFunctionsRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1ListProjectTpaIntegrations(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListProjectTpaIntegrationsRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1341,8 +1469,8 @@ func (c *Client) V1BulkUpdateFunctionsWithBody(ctx context.Context, ref string,
return c.Client.Do(req)
}
-func (c *Client) V1BulkUpdateFunctions(ctx context.Context, ref string, body V1BulkUpdateFunctionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1BulkUpdateFunctionsRequest(c.Server, ref, body)
+func (c *Client) V1CreateProjectTpaIntegrationWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateProjectTpaIntegrationRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1353,8 +1481,8 @@ func (c *Client) V1BulkUpdateFunctions(ctx context.Context, ref string, body V1B
return c.Client.Do(req)
}
-func (c *Client) V1DeployAFunctionWithBody(ctx context.Context, ref string, params *V1DeployAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1DeployAFunctionRequestWithBody(c.Server, ref, params, contentType, body)
+func (c *Client) V1CreateProjectTpaIntegration(ctx context.Context, ref string, body V1CreateProjectTpaIntegrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateProjectTpaIntegrationRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1365,8 +1493,8 @@ func (c *Client) V1DeployAFunctionWithBody(ctx context.Context, ref string, para
return c.Client.Do(req)
}
-func (c *Client) V1DeleteAFunction(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1DeleteAFunctionRequest(c.Server, ref, functionSlug)
+func (c *Client) V1DeleteProjectTpaIntegration(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeleteProjectTpaIntegrationRequest(c.Server, ref, tpaId)
if err != nil {
return nil, err
}
@@ -1377,8 +1505,8 @@ func (c *Client) V1DeleteAFunction(ctx context.Context, ref string, functionSlug
return c.Client.Do(req)
}
-func (c *Client) V1GetAFunction(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetAFunctionRequest(c.Server, ref, functionSlug)
+func (c *Client) V1GetProjectTpaIntegration(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectTpaIntegrationRequest(c.Server, ref, tpaId)
if err != nil {
return nil, err
}
@@ -1389,8 +1517,8 @@ func (c *Client) V1GetAFunction(ctx context.Context, ref string, functionSlug st
return c.Client.Do(req)
}
-func (c *Client) V1UpdateAFunctionWithBody(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateAFunctionRequestWithBody(c.Server, ref, functionSlug, params, contentType, body)
+func (c *Client) V1GetProjectPgbouncerConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetProjectPgbouncerConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1401,8 +1529,8 @@ func (c *Client) V1UpdateAFunctionWithBody(ctx context.Context, ref string, func
return c.Client.Do(req)
}
-func (c *Client) V1UpdateAFunction(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, body V1UpdateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateAFunctionRequest(c.Server, ref, functionSlug, params, body)
+func (c *Client) V1GetPoolerConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetPoolerConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1413,8 +1541,8 @@ func (c *Client) V1UpdateAFunction(ctx context.Context, ref string, functionSlug
return c.Client.Do(req)
}
-func (c *Client) V1GetAFunctionBody(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetAFunctionBodyRequest(c.Server, ref, functionSlug)
+func (c *Client) V1UpdatePoolerConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdatePoolerConfigRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1425,8 +1553,8 @@ func (c *Client) V1GetAFunctionBody(ctx context.Context, ref string, functionSlu
return c.Client.Do(req)
}
-func (c *Client) V1GetServicesHealth(ctx context.Context, ref string, params *V1GetServicesHealthParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetServicesHealthRequest(c.Server, ref, params)
+func (c *Client) V1UpdatePoolerConfig(ctx context.Context, ref string, body V1UpdatePoolerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdatePoolerConfigRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1437,8 +1565,8 @@ func (c *Client) V1GetServicesHealth(ctx context.Context, ref string, params *V1
return c.Client.Do(req)
}
-func (c *Client) V1DeleteNetworkBansWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1DeleteNetworkBansRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1GetPostgresConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetPostgresConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1449,8 +1577,8 @@ func (c *Client) V1DeleteNetworkBansWithBody(ctx context.Context, ref string, co
return c.Client.Do(req)
}
-func (c *Client) V1DeleteNetworkBans(ctx context.Context, ref string, body V1DeleteNetworkBansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1DeleteNetworkBansRequest(c.Server, ref, body)
+func (c *Client) V1UpdatePostgresConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdatePostgresConfigRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1461,8 +1589,8 @@ func (c *Client) V1DeleteNetworkBans(ctx context.Context, ref string, body V1Del
return c.Client.Do(req)
}
-func (c *Client) V1ListAllNetworkBans(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAllNetworkBansRequest(c.Server, ref)
+func (c *Client) V1UpdatePostgresConfig(ctx context.Context, ref string, body V1UpdatePostgresConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdatePostgresConfigRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1473,8 +1601,8 @@ func (c *Client) V1ListAllNetworkBans(ctx context.Context, ref string, reqEditor
return c.Client.Do(req)
}
-func (c *Client) V1GetNetworkRestrictions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetNetworkRestrictionsRequest(c.Server, ref)
+func (c *Client) V1GetStorageConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetStorageConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1485,8 +1613,8 @@ func (c *Client) V1GetNetworkRestrictions(ctx context.Context, ref string, reqEd
return c.Client.Do(req)
}
-func (c *Client) V1UpdateNetworkRestrictionsWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateNetworkRestrictionsRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1UpdateStorageConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateStorageConfigRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1497,8 +1625,8 @@ func (c *Client) V1UpdateNetworkRestrictionsWithBody(ctx context.Context, ref st
return c.Client.Do(req)
}
-func (c *Client) V1UpdateNetworkRestrictions(ctx context.Context, ref string, body V1UpdateNetworkRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateNetworkRestrictionsRequest(c.Server, ref, body)
+func (c *Client) V1UpdateStorageConfig(ctx context.Context, ref string, body V1UpdateStorageConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateStorageConfigRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1509,8 +1637,8 @@ func (c *Client) V1UpdateNetworkRestrictions(ctx context.Context, ref string, bo
return c.Client.Do(req)
}
-func (c *Client) V1PauseAProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1PauseAProjectRequest(c.Server, ref)
+func (c *Client) V1DeleteHostnameConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeleteHostnameConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1521,8 +1649,8 @@ func (c *Client) V1PauseAProject(ctx context.Context, ref string, reqEditors ...
return c.Client.Do(req)
}
-func (c *Client) V1GetPgsodiumConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetPgsodiumConfigRequest(c.Server, ref)
+func (c *Client) V1GetHostnameConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetHostnameConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1533,8 +1661,8 @@ func (c *Client) V1GetPgsodiumConfig(ctx context.Context, ref string, reqEditors
return c.Client.Do(req)
}
-func (c *Client) V1UpdatePgsodiumConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdatePgsodiumConfigRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1ActivateCustomHostname(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ActivateCustomHostnameRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1545,8 +1673,8 @@ func (c *Client) V1UpdatePgsodiumConfigWithBody(ctx context.Context, ref string,
return c.Client.Do(req)
}
-func (c *Client) V1UpdatePgsodiumConfig(ctx context.Context, ref string, body V1UpdatePgsodiumConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdatePgsodiumConfigRequest(c.Server, ref, body)
+func (c *Client) V1UpdateHostnameConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateHostnameConfigRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1557,8 +1685,8 @@ func (c *Client) V1UpdatePgsodiumConfig(ctx context.Context, ref string, body V1
return c.Client.Do(req)
}
-func (c *Client) V1GetPostgrestServiceConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetPostgrestServiceConfigRequest(c.Server, ref)
+func (c *Client) V1UpdateHostnameConfig(ctx context.Context, ref string, body V1UpdateHostnameConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateHostnameConfigRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1569,8 +1697,8 @@ func (c *Client) V1GetPostgrestServiceConfig(ctx context.Context, ref string, re
return c.Client.Do(req)
}
-func (c *Client) V1UpdatePostgrestServiceConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdatePostgrestServiceConfigRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1VerifyDnsConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1VerifyDnsConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1581,8 +1709,8 @@ func (c *Client) V1UpdatePostgrestServiceConfigWithBody(ctx context.Context, ref
return c.Client.Do(req)
}
-func (c *Client) V1UpdatePostgrestServiceConfig(ctx context.Context, ref string, body V1UpdatePostgrestServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdatePostgrestServiceConfigRequest(c.Server, ref, body)
+func (c *Client) V1ListAllBackups(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllBackupsRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1593,8 +1721,8 @@ func (c *Client) V1UpdatePostgrestServiceConfig(ctx context.Context, ref string,
return c.Client.Do(req)
}
-func (c *Client) V1RemoveAReadReplicaWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1RemoveAReadReplicaRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1RestorePitrBackupWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RestorePitrBackupRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1605,8 +1733,8 @@ func (c *Client) V1RemoveAReadReplicaWithBody(ctx context.Context, ref string, c
return c.Client.Do(req)
}
-func (c *Client) V1RemoveAReadReplica(ctx context.Context, ref string, body V1RemoveAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1RemoveAReadReplicaRequest(c.Server, ref, body)
+func (c *Client) V1RestorePitrBackup(ctx context.Context, ref string, body V1RestorePitrBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RestorePitrBackupRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1617,8 +1745,8 @@ func (c *Client) V1RemoveAReadReplica(ctx context.Context, ref string, body V1Re
return c.Client.Do(req)
}
-func (c *Client) V1SetupAReadReplicaWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1SetupAReadReplicaRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1GetRestorePoint(ctx context.Context, ref string, params *V1GetRestorePointParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetRestorePointRequest(c.Server, ref, params)
if err != nil {
return nil, err
}
@@ -1629,8 +1757,8 @@ func (c *Client) V1SetupAReadReplicaWithBody(ctx context.Context, ref string, co
return c.Client.Do(req)
}
-func (c *Client) V1SetupAReadReplica(ctx context.Context, ref string, body V1SetupAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1SetupAReadReplicaRequest(c.Server, ref, body)
+func (c *Client) V1CreateRestorePointWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateRestorePointRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1641,8 +1769,8 @@ func (c *Client) V1SetupAReadReplica(ctx context.Context, ref string, body V1Set
return c.Client.Do(req)
}
-func (c *Client) V1GetReadonlyModeStatus(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetReadonlyModeStatusRequest(c.Server, ref)
+func (c *Client) V1CreateRestorePoint(ctx context.Context, ref string, body V1CreateRestorePointJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateRestorePointRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1653,8 +1781,8 @@ func (c *Client) V1GetReadonlyModeStatus(ctx context.Context, ref string, reqEdi
return c.Client.Do(req)
}
-func (c *Client) V1DisableReadonlyModeTemporarily(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1DisableReadonlyModeTemporarilyRequest(c.Server, ref)
+func (c *Client) V1UndoWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UndoRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1665,8 +1793,8 @@ func (c *Client) V1DisableReadonlyModeTemporarily(ctx context.Context, ref strin
return c.Client.Do(req)
}
-func (c *Client) V1ListAvailableRestoreVersions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAvailableRestoreVersionsRequest(c.Server, ref)
+func (c *Client) V1Undo(ctx context.Context, ref string, body V1UndoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UndoRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1677,8 +1805,8 @@ func (c *Client) V1ListAvailableRestoreVersions(ctx context.Context, ref string,
return c.Client.Do(req)
}
-func (c *Client) V1RestoreAProjectWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1RestoreAProjectRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1GetDatabaseMetadata(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetDatabaseMetadataRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1689,8 +1817,8 @@ func (c *Client) V1RestoreAProjectWithBody(ctx context.Context, ref string, cont
return c.Client.Do(req)
}
-func (c *Client) V1RestoreAProject(ctx context.Context, ref string, body V1RestoreAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1RestoreAProjectRequest(c.Server, ref, body)
+func (c *Client) V1GetJitAccess(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetJitAccessRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1701,8 +1829,8 @@ func (c *Client) V1RestoreAProject(ctx context.Context, ref string, body V1Resto
return c.Client.Do(req)
}
-func (c *Client) V1CancelAProjectRestoration(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CancelAProjectRestorationRequest(c.Server, ref)
+func (c *Client) V1UpdateJitAccessWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateJitAccessRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1713,8 +1841,8 @@ func (c *Client) V1CancelAProjectRestoration(ctx context.Context, ref string, re
return c.Client.Do(req)
}
-func (c *Client) V1BulkDeleteSecretsWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1BulkDeleteSecretsRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1UpdateJitAccess(ctx context.Context, ref string, body V1UpdateJitAccessJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateJitAccessRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1725,8 +1853,8 @@ func (c *Client) V1BulkDeleteSecretsWithBody(ctx context.Context, ref string, co
return c.Client.Do(req)
}
-func (c *Client) V1BulkDeleteSecrets(ctx context.Context, ref string, body V1BulkDeleteSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1BulkDeleteSecretsRequest(c.Server, ref, body)
+func (c *Client) V1ListJitAccess(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListJitAccessRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1737,8 +1865,8 @@ func (c *Client) V1BulkDeleteSecrets(ctx context.Context, ref string, body V1Bul
return c.Client.Do(req)
}
-func (c *Client) V1ListAllSecrets(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAllSecretsRequest(c.Server, ref)
+func (c *Client) V1DeleteJitAccess(ctx context.Context, ref string, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeleteJitAccessRequest(c.Server, ref, userId)
if err != nil {
return nil, err
}
@@ -1749,8 +1877,8 @@ func (c *Client) V1ListAllSecrets(ctx context.Context, ref string, reqEditors ..
return c.Client.Do(req)
}
-func (c *Client) V1BulkCreateSecretsWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1BulkCreateSecretsRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1ListMigrationHistory(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListMigrationHistoryRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1761,8 +1889,8 @@ func (c *Client) V1BulkCreateSecretsWithBody(ctx context.Context, ref string, co
return c.Client.Do(req)
}
-func (c *Client) V1BulkCreateSecrets(ctx context.Context, ref string, body V1BulkCreateSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1BulkCreateSecretsRequest(c.Server, ref, body)
+func (c *Client) V1ApplyAMigrationWithBody(ctx context.Context, ref string, params *V1ApplyAMigrationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ApplyAMigrationRequestWithBody(c.Server, ref, params, contentType, body)
if err != nil {
return nil, err
}
@@ -1773,8 +1901,8 @@ func (c *Client) V1BulkCreateSecrets(ctx context.Context, ref string, body V1Bul
return c.Client.Do(req)
}
-func (c *Client) V1GetSslEnforcementConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetSslEnforcementConfigRequest(c.Server, ref)
+func (c *Client) V1ApplyAMigration(ctx context.Context, ref string, params *V1ApplyAMigrationParams, body V1ApplyAMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ApplyAMigrationRequest(c.Server, ref, params, body)
if err != nil {
return nil, err
}
@@ -1785,8 +1913,8 @@ func (c *Client) V1GetSslEnforcementConfig(ctx context.Context, ref string, reqE
return c.Client.Do(req)
}
-func (c *Client) V1UpdateSslEnforcementConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateSslEnforcementConfigRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1UpsertAMigrationWithBody(ctx context.Context, ref string, params *V1UpsertAMigrationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpsertAMigrationRequestWithBody(c.Server, ref, params, contentType, body)
if err != nil {
return nil, err
}
@@ -1797,8 +1925,8 @@ func (c *Client) V1UpdateSslEnforcementConfigWithBody(ctx context.Context, ref s
return c.Client.Do(req)
}
-func (c *Client) V1UpdateSslEnforcementConfig(ctx context.Context, ref string, body V1UpdateSslEnforcementConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpdateSslEnforcementConfigRequest(c.Server, ref, body)
+func (c *Client) V1UpsertAMigration(ctx context.Context, ref string, params *V1UpsertAMigrationParams, body V1UpsertAMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpsertAMigrationRequest(c.Server, ref, params, body)
if err != nil {
return nil, err
}
@@ -1809,8 +1937,8 @@ func (c *Client) V1UpdateSslEnforcementConfig(ctx context.Context, ref string, b
return c.Client.Do(req)
}
-func (c *Client) V1ListAllBuckets(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAllBucketsRequest(c.Server, ref)
+func (c *Client) V1RunAQueryWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RunAQueryRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1821,8 +1949,8 @@ func (c *Client) V1ListAllBuckets(ctx context.Context, ref string, reqEditors ..
return c.Client.Do(req)
}
-func (c *Client) V1GenerateTypescriptTypes(ctx context.Context, ref string, params *V1GenerateTypescriptTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GenerateTypescriptTypesRequest(c.Server, ref, params)
+func (c *Client) V1RunAQuery(ctx context.Context, ref string, body V1RunAQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RunAQueryRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1833,8 +1961,8 @@ func (c *Client) V1GenerateTypescriptTypes(ctx context.Context, ref string, para
return c.Client.Do(req)
}
-func (c *Client) V1UpgradePostgresVersionWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpgradePostgresVersionRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1EnableDatabaseWebhook(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1EnableDatabaseWebhookRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1845,8 +1973,8 @@ func (c *Client) V1UpgradePostgresVersionWithBody(ctx context.Context, ref strin
return c.Client.Do(req)
}
-func (c *Client) V1UpgradePostgresVersion(ctx context.Context, ref string, body V1UpgradePostgresVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1UpgradePostgresVersionRequest(c.Server, ref, body)
+func (c *Client) V1ListAllFunctions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllFunctionsRequest(c.Server, ref)
if err != nil {
return nil, err
}
@@ -1857,8 +1985,8 @@ func (c *Client) V1UpgradePostgresVersion(ctx context.Context, ref string, body
return c.Client.Do(req)
}
-func (c *Client) V1GetPostgresUpgradeEligibility(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetPostgresUpgradeEligibilityRequest(c.Server, ref)
+func (c *Client) V1CreateAFunctionWithBody(ctx context.Context, ref string, params *V1CreateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateAFunctionRequestWithBody(c.Server, ref, params, contentType, body)
if err != nil {
return nil, err
}
@@ -1869,8 +1997,8 @@ func (c *Client) V1GetPostgresUpgradeEligibility(ctx context.Context, ref string
return c.Client.Do(req)
}
-func (c *Client) V1GetPostgresUpgradeStatus(ctx context.Context, ref string, params *V1GetPostgresUpgradeStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetPostgresUpgradeStatusRequest(c.Server, ref, params)
+func (c *Client) V1CreateAFunction(ctx context.Context, ref string, params *V1CreateAFunctionParams, body V1CreateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CreateAFunctionRequest(c.Server, ref, params, body)
if err != nil {
return nil, err
}
@@ -1881,8 +2009,8 @@ func (c *Client) V1GetPostgresUpgradeStatus(ctx context.Context, ref string, par
return c.Client.Do(req)
}
-func (c *Client) V1DeactivateVanitySubdomainConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1DeactivateVanitySubdomainConfigRequest(c.Server, ref)
+func (c *Client) V1BulkUpdateFunctionsWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1BulkUpdateFunctionsRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
@@ -1893,8 +2021,8 @@ func (c *Client) V1DeactivateVanitySubdomainConfig(ctx context.Context, ref stri
return c.Client.Do(req)
}
-func (c *Client) V1GetVanitySubdomainConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetVanitySubdomainConfigRequest(c.Server, ref)
+func (c *Client) V1BulkUpdateFunctions(ctx context.Context, ref string, body V1BulkUpdateFunctionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1BulkUpdateFunctionsRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
@@ -1905,8 +2033,8 @@ func (c *Client) V1GetVanitySubdomainConfig(ctx context.Context, ref string, req
return c.Client.Do(req)
}
-func (c *Client) V1ActivateVanitySubdomainConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ActivateVanitySubdomainConfigRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1DeployAFunctionWithBody(ctx context.Context, ref string, params *V1DeployAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeployAFunctionRequestWithBody(c.Server, ref, params, contentType, body)
if err != nil {
return nil, err
}
@@ -1917,8 +2045,8 @@ func (c *Client) V1ActivateVanitySubdomainConfigWithBody(ctx context.Context, re
return c.Client.Do(req)
}
-func (c *Client) V1ActivateVanitySubdomainConfig(ctx context.Context, ref string, body V1ActivateVanitySubdomainConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ActivateVanitySubdomainConfigRequest(c.Server, ref, body)
+func (c *Client) V1DeleteAFunction(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeleteAFunctionRequest(c.Server, ref, functionSlug)
if err != nil {
return nil, err
}
@@ -1929,8 +2057,8 @@ func (c *Client) V1ActivateVanitySubdomainConfig(ctx context.Context, ref string
return c.Client.Do(req)
}
-func (c *Client) V1CheckVanitySubdomainAvailabilityWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CheckVanitySubdomainAvailabilityRequestWithBody(c.Server, ref, contentType, body)
+func (c *Client) V1GetAFunction(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetAFunctionRequest(c.Server, ref, functionSlug)
if err != nil {
return nil, err
}
@@ -1941,8 +2069,8 @@ func (c *Client) V1CheckVanitySubdomainAvailabilityWithBody(ctx context.Context,
return c.Client.Do(req)
}
-func (c *Client) V1CheckVanitySubdomainAvailability(ctx context.Context, ref string, body V1CheckVanitySubdomainAvailabilityJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1CheckVanitySubdomainAvailabilityRequest(c.Server, ref, body)
+func (c *Client) V1UpdateAFunctionWithBody(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateAFunctionRequestWithBody(c.Server, ref, functionSlug, params, contentType, body)
if err != nil {
return nil, err
}
@@ -1953,8 +2081,8 @@ func (c *Client) V1CheckVanitySubdomainAvailability(ctx context.Context, ref str
return c.Client.Do(req)
}
-func (c *Client) V1ListAllSnippets(ctx context.Context, params *V1ListAllSnippetsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1ListAllSnippetsRequest(c.Server, params)
+func (c *Client) V1UpdateAFunction(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, body V1UpdateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateAFunctionRequest(c.Server, ref, functionSlug, params, body)
if err != nil {
return nil, err
}
@@ -1965,8 +2093,8 @@ func (c *Client) V1ListAllSnippets(ctx context.Context, params *V1ListAllSnippet
return c.Client.Do(req)
}
-func (c *Client) V1GetASnippet(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
- req, err := NewV1GetASnippetRequest(c.Server, id)
+func (c *Client) V1GetAFunctionBody(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetAFunctionBodyRequest(c.Server, ref, functionSlug)
if err != nil {
return nil, err
}
@@ -1977,695 +2105,565 @@ func (c *Client) V1GetASnippet(ctx context.Context, id openapi_types.UUID, reqEd
return c.Client.Do(req)
}
-// NewV1DeleteABranchRequest generates requests for V1DeleteABranch
-func NewV1DeleteABranchRequest(server string, branchId string) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
+func (c *Client) V1GetServicesHealth(ctx context.Context, ref string, params *V1GetServicesHealthParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetServicesHealthRequest(c.Server, ref, params)
if err != nil {
return nil, err
}
-
- serverURL, err := url.Parse(server)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
+ return c.Client.Do(req)
+}
- operationPath := fmt.Sprintf("/v1/branches/%s", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
- }
-
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1DeleteNetworkBansWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeleteNetworkBansRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("DELETE", queryURL.String(), nil)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1GetABranchConfigRequest generates requests for V1GetABranchConfig
-func NewV1GetABranchConfigRequest(server string, branchId string) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
+func (c *Client) V1DeleteNetworkBans(ctx context.Context, ref string, body V1DeleteNetworkBansJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeleteNetworkBansRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
-
- serverURL, err := url.Parse(server)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
+ return c.Client.Do(req)
+}
- operationPath := fmt.Sprintf("/v1/branches/%s", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
- }
-
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1ListAllNetworkBans(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllNetworkBansRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("GET", queryURL.String(), nil)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1UpdateABranchConfigRequest calls the generic V1UpdateABranchConfig builder with application/json body
-func NewV1UpdateABranchConfigRequest(server string, branchId string, body V1UpdateABranchConfigJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
+func (c *Client) V1ListAllNetworkBansEnriched(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllNetworkBansEnrichedRequest(c.Server, ref)
if err != nil {
return nil, err
}
- bodyReader = bytes.NewReader(buf)
- return NewV1UpdateABranchConfigRequestWithBody(server, branchId, "application/json", bodyReader)
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
}
-// NewV1UpdateABranchConfigRequestWithBody generates requests for V1UpdateABranchConfig with any type of body
-func NewV1UpdateABranchConfigRequestWithBody(server string, branchId string, contentType string, body io.Reader) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
+func (c *Client) V1GetNetworkRestrictions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetNetworkRestrictionsRequest(c.Server, ref)
if err != nil {
return nil, err
}
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
- serverURL, err := url.Parse(server)
+func (c *Client) V1UpdateNetworkRestrictionsWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateNetworkRestrictionsRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
-
- operationPath := fmt.Sprintf("/v1/branches/%s", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1UpdateNetworkRestrictions(ctx context.Context, ref string, body V1UpdateNetworkRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateNetworkRestrictionsRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("PATCH", queryURL.String(), body)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- req.Header.Add("Content-Type", contentType)
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1PushABranchRequest generates requests for V1PushABranch
-func NewV1PushABranchRequest(server string, branchId string) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
+func (c *Client) V1PauseAProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1PauseAProjectRequest(c.Server, ref)
if err != nil {
return nil, err
}
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
- serverURL, err := url.Parse(server)
+func (c *Client) V1GetPgsodiumConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetPgsodiumConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- operationPath := fmt.Sprintf("/v1/branches/%s/push", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1UpdatePgsodiumConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdatePgsodiumConfigRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("POST", queryURL.String(), nil)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1ResetABranchRequest generates requests for V1ResetABranch
-func NewV1ResetABranchRequest(server string, branchId string) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
+func (c *Client) V1UpdatePgsodiumConfig(ctx context.Context, ref string, body V1UpdatePgsodiumConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdatePgsodiumConfigRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
- serverURL, err := url.Parse(server)
+func (c *Client) V1GetPostgrestServiceConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetPostgrestServiceConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- operationPath := fmt.Sprintf("/v1/branches/%s/reset", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1UpdatePostgrestServiceConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdatePostgrestServiceConfigRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("POST", queryURL.String(), nil)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1AuthorizeUserRequest generates requests for V1AuthorizeUser
-func NewV1AuthorizeUserRequest(server string, params *V1AuthorizeUserParams) (*http.Request, error) {
- var err error
-
- serverURL, err := url.Parse(server)
+func (c *Client) V1UpdatePostgrestServiceConfig(ctx context.Context, ref string, body V1UpdatePostgrestServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdatePostgrestServiceConfigRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
-
- operationPath := fmt.Sprintf("/v1/oauth/authorize")
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1RemoveAReadReplicaWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RemoveAReadReplicaRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
-
- if params != nil {
- queryValues := queryURL.Query()
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "client_id", runtime.ParamLocationQuery, params.ClientId); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "response_type", runtime.ParamLocationQuery, params.ResponseType); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "redirect_uri", runtime.ParamLocationQuery, params.RedirectUri); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- if params.Scope != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, *params.Scope); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.State != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "state", runtime.ParamLocationQuery, *params.State); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.ResponseMode != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "response_mode", runtime.ParamLocationQuery, *params.ResponseMode); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.CodeChallenge != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "code_challenge", runtime.ParamLocationQuery, *params.CodeChallenge); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.CodeChallengeMethod != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "code_challenge_method", runtime.ParamLocationQuery, *params.CodeChallengeMethod); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- queryURL.RawQuery = queryValues.Encode()
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- req, err := http.NewRequest("GET", queryURL.String(), nil)
+func (c *Client) V1RemoveAReadReplica(ctx context.Context, ref string, body V1RemoveAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RemoveAReadReplicaRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
-
- return req, nil
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
}
-// NewV1RevokeTokenRequest calls the generic V1RevokeToken builder with application/json body
-func NewV1RevokeTokenRequest(server string, body V1RevokeTokenJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
+func (c *Client) V1SetupAReadReplicaWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1SetupAReadReplicaRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
- bodyReader = bytes.NewReader(buf)
- return NewV1RevokeTokenRequestWithBody(server, "application/json", bodyReader)
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
}
-// NewV1RevokeTokenRequestWithBody generates requests for V1RevokeToken with any type of body
-func NewV1RevokeTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
- var err error
-
- serverURL, err := url.Parse(server)
+func (c *Client) V1SetupAReadReplica(ctx context.Context, ref string, body V1SetupAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1SetupAReadReplicaRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
-
- operationPath := fmt.Sprintf("/v1/oauth/revoke")
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1GetReadonlyModeStatus(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetReadonlyModeStatusRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("POST", queryURL.String(), body)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- req.Header.Add("Content-Type", contentType)
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1ExchangeOauthTokenRequestWithFormdataBody calls the generic V1ExchangeOauthToken builder with application/x-www-form-urlencoded body
-func NewV1ExchangeOauthTokenRequestWithFormdataBody(server string, body V1ExchangeOauthTokenFormdataRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- bodyStr, err := runtime.MarshalForm(body, nil)
+func (c *Client) V1DisableReadonlyModeTemporarily(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DisableReadonlyModeTemporarilyRequest(c.Server, ref)
if err != nil {
return nil, err
}
- bodyReader = strings.NewReader(bodyStr.Encode())
- return NewV1ExchangeOauthTokenRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader)
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
}
-// NewV1ExchangeOauthTokenRequestWithBody generates requests for V1ExchangeOauthToken with any type of body
-func NewV1ExchangeOauthTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
- var err error
-
- serverURL, err := url.Parse(server)
+func (c *Client) V1ListAvailableRestoreVersions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAvailableRestoreVersionsRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- operationPath := fmt.Sprintf("/v1/oauth/token")
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1RestoreAProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1RestoreAProjectRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("POST", queryURL.String(), body)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- req.Header.Add("Content-Type", contentType)
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1ListAllOrganizationsRequest generates requests for V1ListAllOrganizations
-func NewV1ListAllOrganizationsRequest(server string) (*http.Request, error) {
- var err error
-
- serverURL, err := url.Parse(server)
+func (c *Client) V1CancelAProjectRestoration(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CancelAProjectRestorationRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- operationPath := fmt.Sprintf("/v1/organizations")
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1BulkDeleteSecretsWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1BulkDeleteSecretsRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("GET", queryURL.String(), nil)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1CreateAnOrganizationRequest calls the generic V1CreateAnOrganization builder with application/json body
-func NewV1CreateAnOrganizationRequest(server string, body V1CreateAnOrganizationJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
+func (c *Client) V1BulkDeleteSecrets(ctx context.Context, ref string, body V1BulkDeleteSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1BulkDeleteSecretsRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
- bodyReader = bytes.NewReader(buf)
- return NewV1CreateAnOrganizationRequestWithBody(server, "application/json", bodyReader)
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
}
-// NewV1CreateAnOrganizationRequestWithBody generates requests for V1CreateAnOrganization with any type of body
-func NewV1CreateAnOrganizationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
- var err error
-
- serverURL, err := url.Parse(server)
+func (c *Client) V1ListAllSecrets(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllSecretsRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- operationPath := fmt.Sprintf("/v1/organizations")
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1BulkCreateSecretsWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1BulkCreateSecretsRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("POST", queryURL.String(), body)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- req.Header.Add("Content-Type", contentType)
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1GetAnOrganizationRequest generates requests for V1GetAnOrganization
-func NewV1GetAnOrganizationRequest(server string, slug string) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "slug", runtime.ParamLocationPath, slug)
+func (c *Client) V1BulkCreateSecrets(ctx context.Context, ref string, body V1BulkCreateSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1BulkCreateSecretsRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
-
- serverURL, err := url.Parse(server)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
+ return c.Client.Do(req)
+}
- operationPath := fmt.Sprintf("/v1/organizations/%s", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
- }
-
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1GetSslEnforcementConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetSslEnforcementConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("GET", queryURL.String(), nil)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1ListOrganizationMembersRequest generates requests for V1ListOrganizationMembers
-func NewV1ListOrganizationMembersRequest(server string, slug string) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "slug", runtime.ParamLocationPath, slug)
+func (c *Client) V1UpdateSslEnforcementConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateSslEnforcementConfigRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
-
- serverURL, err := url.Parse(server)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
+ return c.Client.Do(req)
+}
- operationPath := fmt.Sprintf("/v1/organizations/%s/members", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
- }
-
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1UpdateSslEnforcementConfig(ctx context.Context, ref string, body V1UpdateSslEnforcementConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpdateSslEnforcementConfigRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("GET", queryURL.String(), nil)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1ListAllProjectsRequest generates requests for V1ListAllProjects
-func NewV1ListAllProjectsRequest(server string) (*http.Request, error) {
- var err error
-
- serverURL, err := url.Parse(server)
+func (c *Client) V1ListAllBuckets(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllBucketsRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- operationPath := fmt.Sprintf("/v1/projects")
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1GenerateTypescriptTypes(ctx context.Context, ref string, params *V1GenerateTypescriptTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GenerateTypescriptTypesRequest(c.Server, ref, params)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("GET", queryURL.String(), nil)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1CreateAProjectRequest calls the generic V1CreateAProject builder with application/json body
-func NewV1CreateAProjectRequest(server string, body V1CreateAProjectJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
+func (c *Client) V1UpgradePostgresVersionWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpgradePostgresVersionRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
- bodyReader = bytes.NewReader(buf)
- return NewV1CreateAProjectRequestWithBody(server, "application/json", bodyReader)
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
}
-// NewV1CreateAProjectRequestWithBody generates requests for V1CreateAProject with any type of body
-func NewV1CreateAProjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
- var err error
-
- serverURL, err := url.Parse(server)
+func (c *Client) V1UpgradePostgresVersion(ctx context.Context, ref string, body V1UpgradePostgresVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1UpgradePostgresVersionRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
-
- operationPath := fmt.Sprintf("/v1/projects")
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1GetPostgresUpgradeEligibility(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetPostgresUpgradeEligibilityRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("POST", queryURL.String(), body)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- req.Header.Add("Content-Type", contentType)
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1DeleteAProjectRequest generates requests for V1DeleteAProject
-func NewV1DeleteAProjectRequest(server string, ref string) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+func (c *Client) V1GetPostgresUpgradeStatus(ctx context.Context, ref string, params *V1GetPostgresUpgradeStatusParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetPostgresUpgradeStatusRequest(c.Server, ref, params)
if err != nil {
return nil, err
}
-
- serverURL, err := url.Parse(server)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
+ return c.Client.Do(req)
+}
- operationPath := fmt.Sprintf("/v1/projects/%s", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
- }
-
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1DeactivateVanitySubdomainConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1DeactivateVanitySubdomainConfigRequest(c.Server, ref)
if err != nil {
return nil, err
}
-
- req, err := http.NewRequest("DELETE", queryURL.String(), nil)
- if err != nil {
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
return nil, err
}
-
- return req, nil
+ return c.Client.Do(req)
}
-// NewV1GetProjectRequest generates requests for V1GetProject
-func NewV1GetProjectRequest(server string, ref string) (*http.Request, error) {
- var err error
-
- var pathParam0 string
+func (c *Client) V1GetVanitySubdomainConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetVanitySubdomainConfigRequest(c.Server, ref)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+func (c *Client) V1ActivateVanitySubdomainConfigWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ActivateVanitySubdomainConfigRequestWithBody(c.Server, ref, contentType, body)
if err != nil {
return nil, err
}
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
- serverURL, err := url.Parse(server)
+func (c *Client) V1ActivateVanitySubdomainConfig(ctx context.Context, ref string, body V1ActivateVanitySubdomainConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ActivateVanitySubdomainConfigRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
- operationPath := fmt.Sprintf("/v1/projects/%s", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+func (c *Client) V1CheckVanitySubdomainAvailabilityWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CheckVanitySubdomainAvailabilityRequestWithBody(c.Server, ref, contentType, body)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
}
+ return c.Client.Do(req)
+}
- queryURL, err := serverURL.Parse(operationPath)
+func (c *Client) V1CheckVanitySubdomainAvailability(ctx context.Context, ref string, body V1CheckVanitySubdomainAvailabilityJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1CheckVanitySubdomainAvailabilityRequest(c.Server, ref, body)
if err != nil {
return nil, err
}
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
- req, err := http.NewRequest("GET", queryURL.String(), nil)
+func (c *Client) V1ListAllSnippets(ctx context.Context, params *V1ListAllSnippetsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1ListAllSnippetsRequest(c.Server, params)
if err != nil {
return nil, err
}
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
+}
- return req, nil
+func (c *Client) V1GetASnippet(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) {
+ req, err := NewV1GetASnippetRequest(c.Server, id)
+ if err != nil {
+ return nil, err
+ }
+ req = req.WithContext(ctx)
+ if err := c.applyEditors(ctx, req, reqEditors); err != nil {
+ return nil, err
+ }
+ return c.Client.Do(req)
}
-// NewGetLogsRequest generates requests for GetLogs
-func NewGetLogsRequest(server string, ref string, params *GetLogsParams) (*http.Request, error) {
+// NewV1DeleteABranchRequest generates requests for V1DeleteABranch
+func NewV1DeleteABranchRequest(server string, branchId openapi_types.UUID) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
if err != nil {
return nil, err
}
@@ -2675,7 +2673,7 @@ func NewGetLogsRequest(server string, ref string, params *GetLogsParams) (*http.
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/analytics/endpoints/logs.all", pathParam0)
+ operationPath := fmt.Sprintf("/v1/branches/%s", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -2685,61 +2683,7 @@ func NewGetLogsRequest(server string, ref string, params *GetLogsParams) (*http.
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
-
- if params.IsoTimestampEnd != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "iso_timestamp_end", runtime.ParamLocationQuery, *params.IsoTimestampEnd); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.IsoTimestampStart != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "iso_timestamp_start", runtime.ParamLocationQuery, *params.IsoTimestampStart); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.Sql != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sql", runtime.ParamLocationQuery, *params.Sql); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- queryURL.RawQuery = queryValues.Encode()
- }
-
- req, err := http.NewRequest("GET", queryURL.String(), nil)
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -2747,13 +2691,13 @@ func NewGetLogsRequest(server string, ref string, params *GetLogsParams) (*http.
return req, nil
}
-// NewV1GetProjectApiKeysRequest generates requests for V1GetProjectApiKeys
-func NewV1GetProjectApiKeysRequest(server string, ref string, params *V1GetProjectApiKeysParams) (*http.Request, error) {
+// NewV1GetABranchConfigRequest generates requests for V1GetABranchConfig
+func NewV1GetABranchConfigRequest(server string, branchId openapi_types.UUID) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
if err != nil {
return nil, err
}
@@ -2763,7 +2707,7 @@ func NewV1GetProjectApiKeysRequest(server string, ref string, params *V1GetProje
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/api-keys", pathParam0)
+ operationPath := fmt.Sprintf("/v1/branches/%s", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -2773,24 +2717,6 @@ func NewV1GetProjectApiKeysRequest(server string, ref string, params *V1GetProje
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reveal", runtime.ParamLocationQuery, params.Reveal); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- queryURL.RawQuery = queryValues.Encode()
- }
-
req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
@@ -2799,24 +2725,24 @@ func NewV1GetProjectApiKeysRequest(server string, ref string, params *V1GetProje
return req, nil
}
-// NewCreateApiKeyRequest calls the generic CreateApiKey builder with application/json body
-func NewCreateApiKeyRequest(server string, ref string, params *CreateApiKeyParams, body CreateApiKeyJSONRequestBody) (*http.Request, error) {
+// NewV1UpdateABranchConfigRequest calls the generic V1UpdateABranchConfig builder with application/json body
+func NewV1UpdateABranchConfigRequest(server string, branchId openapi_types.UUID, body V1UpdateABranchConfigJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewCreateApiKeyRequestWithBody(server, ref, params, "application/json", bodyReader)
+ return NewV1UpdateABranchConfigRequestWithBody(server, branchId, "application/json", bodyReader)
}
-// NewCreateApiKeyRequestWithBody generates requests for CreateApiKey with any type of body
-func NewCreateApiKeyRequestWithBody(server string, ref string, params *CreateApiKeyParams, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1UpdateABranchConfigRequestWithBody generates requests for V1UpdateABranchConfig with any type of body
+func NewV1UpdateABranchConfigRequestWithBody(server string, branchId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
if err != nil {
return nil, err
}
@@ -2826,7 +2752,7 @@ func NewCreateApiKeyRequestWithBody(server string, ref string, params *CreateApi
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/api-keys", pathParam0)
+ operationPath := fmt.Sprintf("/v1/branches/%s", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -2836,25 +2762,7 @@ func NewCreateApiKeyRequestWithBody(server string, ref string, params *CreateApi
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reveal", runtime.ParamLocationQuery, params.Reveal); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- queryURL.RawQuery = queryValues.Encode()
- }
-
- req, err := http.NewRequest("POST", queryURL.String(), body)
+ req, err := http.NewRequest("PATCH", queryURL.String(), body)
if err != nil {
return nil, err
}
@@ -2864,20 +2772,13 @@ func NewCreateApiKeyRequestWithBody(server string, ref string, params *CreateApi
return req, nil
}
-// NewDeleteApiKeyRequest generates requests for DeleteApiKey
-func NewDeleteApiKeyRequest(server string, ref string, id string, params *DeleteApiKeyParams) (*http.Request, error) {
+// NewV1DiffABranchRequest generates requests for V1DiffABranch
+func NewV1DiffABranchRequest(server string, branchId openapi_types.UUID, params *V1DiffABranchParams) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
-
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
if err != nil {
return nil, err
}
@@ -2887,7 +2788,7 @@ func NewDeleteApiKeyRequest(server string, ref string, id string, params *Delete
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/api-keys/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/branches/%s/diff", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -2900,22 +2801,26 @@ func NewDeleteApiKeyRequest(server string, ref string, id string, params *Delete
if params != nil {
queryValues := queryURL.Query()
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reveal", runtime.ParamLocationQuery, params.Reveal); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
+ if params.IncludedSchemas != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "included_schemas", runtime.ParamLocationQuery, *params.IncludedSchemas); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
}
}
+
}
queryURL.RawQuery = queryValues.Encode()
}
- req, err := http.NewRequest("DELETE", queryURL.String(), nil)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -2923,20 +2828,24 @@ func NewDeleteApiKeyRequest(server string, ref string, id string, params *Delete
return req, nil
}
-// NewGetApiKeyRequest generates requests for GetApiKey
-func NewGetApiKeyRequest(server string, ref string, id string, params *GetApiKeyParams) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+// NewV1MergeABranchRequest calls the generic V1MergeABranch builder with application/json body
+func NewV1MergeABranchRequest(server string, branchId openapi_types.UUID, body V1MergeABranchJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
+ bodyReader = bytes.NewReader(buf)
+ return NewV1MergeABranchRequestWithBody(server, branchId, "application/json", bodyReader)
+}
- var pathParam1 string
+// NewV1MergeABranchRequestWithBody generates requests for V1MergeABranch with any type of body
+func NewV1MergeABranchRequestWithBody(server string, branchId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
if err != nil {
return nil, err
}
@@ -2946,7 +2855,7 @@ func NewGetApiKeyRequest(server string, ref string, id string, params *GetApiKey
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/api-keys/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/branches/%s/merge", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -2956,57 +2865,34 @@ func NewGetApiKeyRequest(server string, ref string, id string, params *GetApiKey
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reveal", runtime.ParamLocationQuery, params.Reveal); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- queryURL.RawQuery = queryValues.Encode()
- }
-
- req, err := http.NewRequest("GET", queryURL.String(), nil)
+ req, err := http.NewRequest("POST", queryURL.String(), body)
if err != nil {
return nil, err
}
+ req.Header.Add("Content-Type", contentType)
+
return req, nil
}
-// NewUpdateApiKeyRequest calls the generic UpdateApiKey builder with application/json body
-func NewUpdateApiKeyRequest(server string, ref string, id string, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody) (*http.Request, error) {
+// NewV1PushABranchRequest calls the generic V1PushABranch builder with application/json body
+func NewV1PushABranchRequest(server string, branchId openapi_types.UUID, body V1PushABranchJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewUpdateApiKeyRequestWithBody(server, ref, id, params, "application/json", bodyReader)
+ return NewV1PushABranchRequestWithBody(server, branchId, "application/json", bodyReader)
}
-// NewUpdateApiKeyRequestWithBody generates requests for UpdateApiKey with any type of body
-func NewUpdateApiKeyRequestWithBody(server string, ref string, id string, params *UpdateApiKeyParams, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1PushABranchRequestWithBody generates requests for V1PushABranch with any type of body
+func NewV1PushABranchRequestWithBody(server string, branchId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
-
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
if err != nil {
return nil, err
}
@@ -3016,7 +2902,7 @@ func NewUpdateApiKeyRequestWithBody(server string, ref string, id string, params
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/api-keys/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/branches/%s/push", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3026,25 +2912,7 @@ func NewUpdateApiKeyRequestWithBody(server string, ref string, id string, params
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reveal", runtime.ParamLocationQuery, params.Reveal); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- queryURL.RawQuery = queryValues.Encode()
- }
-
- req, err := http.NewRequest("PATCH", queryURL.String(), body)
+ req, err := http.NewRequest("POST", queryURL.String(), body)
if err != nil {
return nil, err
}
@@ -3054,13 +2922,24 @@ func NewUpdateApiKeyRequestWithBody(server string, ref string, id string, params
return req, nil
}
-// NewV1DisablePreviewBranchingRequest generates requests for V1DisablePreviewBranching
-func NewV1DisablePreviewBranchingRequest(server string, ref string) (*http.Request, error) {
+// NewV1ResetABranchRequest calls the generic V1ResetABranch builder with application/json body
+func NewV1ResetABranchRequest(server string, branchId openapi_types.UUID, body V1ResetABranchJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1ResetABranchRequestWithBody(server, branchId, "application/json", bodyReader)
+}
+
+// NewV1ResetABranchRequestWithBody generates requests for V1ResetABranch with any type of body
+func NewV1ResetABranchRequestWithBody(server string, branchId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId)
if err != nil {
return nil, err
}
@@ -3070,7 +2949,7 @@ func NewV1DisablePreviewBranchingRequest(server string, ref string) (*http.Reque
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0)
+ operationPath := fmt.Sprintf("/v1/branches/%s/reset", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3080,31 +2959,26 @@ func NewV1DisablePreviewBranchingRequest(server string, ref string) (*http.Reque
return nil, err
}
- req, err := http.NewRequest("DELETE", queryURL.String(), nil)
+ req, err := http.NewRequest("POST", queryURL.String(), body)
if err != nil {
return nil, err
}
+ req.Header.Add("Content-Type", contentType)
+
return req, nil
}
-// NewV1ListAllBranchesRequest generates requests for V1ListAllBranches
-func NewV1ListAllBranchesRequest(server string, ref string) (*http.Request, error) {
+// NewV1AuthorizeUserRequest generates requests for V1AuthorizeUser
+func NewV1AuthorizeUserRequest(server string, params *V1AuthorizeUserParams) (*http.Request, error) {
var err error
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
-
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0)
+ operationPath := fmt.Sprintf("/v1/oauth/authorize")
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3114,78 +2988,178 @@ func NewV1ListAllBranchesRequest(server string, ref string) (*http.Request, erro
return nil, err
}
- req, err := http.NewRequest("GET", queryURL.String(), nil)
- if err != nil {
- return nil, err
- }
+ if params != nil {
+ queryValues := queryURL.Query()
- return req, nil
-}
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "client_id", runtime.ParamLocationQuery, params.ClientId); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
-// NewV1CreateABranchRequest calls the generic V1CreateABranch builder with application/json body
-func NewV1CreateABranchRequest(server string, ref string, body V1CreateABranchJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
- if err != nil {
- return nil, err
- }
- bodyReader = bytes.NewReader(buf)
- return NewV1CreateABranchRequestWithBody(server, ref, "application/json", bodyReader)
-}
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "response_type", runtime.ParamLocationQuery, params.ResponseType); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
-// NewV1CreateABranchRequestWithBody generates requests for V1CreateABranch with any type of body
-func NewV1CreateABranchRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
- var err error
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "redirect_uri", runtime.ParamLocationQuery, params.RedirectUri); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
- var pathParam0 string
+ if params.Scope != nil {
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "scope", runtime.ParamLocationQuery, *params.Scope); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
- serverURL, err := url.Parse(server)
- if err != nil {
- return nil, err
- }
+ }
- operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
- }
+ if params.State != nil {
- queryURL, err := serverURL.Parse(operationPath)
- if err != nil {
- return nil, err
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "state", runtime.ParamLocationQuery, *params.State); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.ResponseMode != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "response_mode", runtime.ParamLocationQuery, *params.ResponseMode); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.CodeChallenge != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "code_challenge", runtime.ParamLocationQuery, *params.CodeChallenge); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.CodeChallengeMethod != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "code_challenge_method", runtime.ParamLocationQuery, *params.CodeChallengeMethod); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.OrganizationSlug != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization_slug", runtime.ParamLocationQuery, *params.OrganizationSlug); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.Resource != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "resource", runtime.ParamLocationQuery, *params.Resource); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
}
- req, err := http.NewRequest("POST", queryURL.String(), body)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
- req.Header.Add("Content-Type", contentType)
-
return req, nil
}
-// NewV1GetAuthServiceConfigRequest generates requests for V1GetAuthServiceConfig
-func NewV1GetAuthServiceConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1OauthAuthorizeProjectClaimRequest generates requests for V1OauthAuthorizeProjectClaim
+func NewV1OauthAuthorizeProjectClaimRequest(server string, params *V1OauthAuthorizeProjectClaimParams) (*http.Request, error) {
var err error
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
-
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth", pathParam0)
+ operationPath := fmt.Sprintf("/v1/oauth/authorize/project-claim")
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3195,42 +3169,153 @@ func NewV1GetAuthServiceConfigRequest(server string, ref string) (*http.Request,
return nil, err
}
- req, err := http.NewRequest("GET", queryURL.String(), nil)
- if err != nil {
- return nil, err
- }
-
- return req, nil
-}
+ if params != nil {
+ queryValues := queryURL.Query()
-// NewV1UpdateAuthServiceConfigRequest calls the generic V1UpdateAuthServiceConfig builder with application/json body
-func NewV1UpdateAuthServiceConfigRequest(server string, ref string, body V1UpdateAuthServiceConfigJSONRequestBody) (*http.Request, error) {
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project_ref", runtime.ParamLocationQuery, params.ProjectRef); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "client_id", runtime.ParamLocationQuery, params.ClientId); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "response_type", runtime.ParamLocationQuery, params.ResponseType); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "redirect_uri", runtime.ParamLocationQuery, params.RedirectUri); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ if params.State != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "state", runtime.ParamLocationQuery, *params.State); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.ResponseMode != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "response_mode", runtime.ParamLocationQuery, *params.ResponseMode); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.CodeChallenge != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "code_challenge", runtime.ParamLocationQuery, *params.CodeChallenge); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.CodeChallengeMethod != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "code_challenge_method", runtime.ParamLocationQuery, *params.CodeChallengeMethod); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1RevokeTokenRequest calls the generic V1RevokeToken builder with application/json body
+func NewV1RevokeTokenRequest(server string, body V1RevokeTokenJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1UpdateAuthServiceConfigRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1RevokeTokenRequestWithBody(server, "application/json", bodyReader)
}
-// NewV1UpdateAuthServiceConfigRequestWithBody generates requests for V1UpdateAuthServiceConfig with any type of body
-func NewV1UpdateAuthServiceConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1RevokeTokenRequestWithBody generates requests for V1RevokeToken with any type of body
+func NewV1RevokeTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
var err error
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
-
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth", pathParam0)
+ operationPath := fmt.Sprintf("/v1/oauth/revoke")
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3240,7 +3325,7 @@ func NewV1UpdateAuthServiceConfigRequestWithBody(server string, ref string, cont
return nil, err
}
- req, err := http.NewRequest("PATCH", queryURL.String(), body)
+ req, err := http.NewRequest("POST", queryURL.String(), body)
if err != nil {
return nil, err
}
@@ -3250,23 +3335,56 @@ func NewV1UpdateAuthServiceConfigRequestWithBody(server string, ref string, cont
return req, nil
}
-// NewV1ListAllSsoProviderRequest generates requests for V1ListAllSsoProvider
-func NewV1ListAllSsoProviderRequest(server string, ref string) (*http.Request, error) {
+// NewV1ExchangeOauthTokenRequestWithFormdataBody calls the generic V1ExchangeOauthToken builder with application/x-www-form-urlencoded body
+func NewV1ExchangeOauthTokenRequestWithFormdataBody(server string, body V1ExchangeOauthTokenFormdataRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ bodyStr, err := runtime.MarshalForm(body, nil)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = strings.NewReader(bodyStr.Encode())
+ return NewV1ExchangeOauthTokenRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader)
+}
+
+// NewV1ExchangeOauthTokenRequestWithBody generates requests for V1ExchangeOauthToken with any type of body
+func NewV1ExchangeOauthTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
var err error
- var pathParam0 string
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ operationPath := fmt.Sprintf("/v1/oauth/token")
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), body)
if err != nil {
return nil, err
}
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1ListAllOrganizationsRequest generates requests for V1ListAllOrganizations
+func NewV1ListAllOrganizationsRequest(server string) (*http.Request, error) {
+ var err error
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers", pathParam0)
+ operationPath := fmt.Sprintf("/v1/organizations")
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3284,34 +3402,27 @@ func NewV1ListAllSsoProviderRequest(server string, ref string) (*http.Request, e
return req, nil
}
-// NewV1CreateASsoProviderRequest calls the generic V1CreateASsoProvider builder with application/json body
-func NewV1CreateASsoProviderRequest(server string, ref string, body V1CreateASsoProviderJSONRequestBody) (*http.Request, error) {
+// NewV1CreateAnOrganizationRequest calls the generic V1CreateAnOrganization builder with application/json body
+func NewV1CreateAnOrganizationRequest(server string, body V1CreateAnOrganizationJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1CreateASsoProviderRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1CreateAnOrganizationRequestWithBody(server, "application/json", bodyReader)
}
-// NewV1CreateASsoProviderRequestWithBody generates requests for V1CreateASsoProvider with any type of body
-func NewV1CreateASsoProviderRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1CreateAnOrganizationRequestWithBody generates requests for V1CreateAnOrganization with any type of body
+func NewV1CreateAnOrganizationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
var err error
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
-
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers", pathParam0)
+ operationPath := fmt.Sprintf("/v1/organizations")
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3331,20 +3442,13 @@ func NewV1CreateASsoProviderRequestWithBody(server string, ref string, contentTy
return req, nil
}
-// NewV1DeleteASsoProviderRequest generates requests for V1DeleteASsoProvider
-func NewV1DeleteASsoProviderRequest(server string, ref string, providerId string) (*http.Request, error) {
+// NewV1GetAnOrganizationRequest generates requests for V1GetAnOrganization
+func NewV1GetAnOrganizationRequest(server string, slug string) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
-
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "provider_id", runtime.ParamLocationPath, providerId)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "slug", runtime.ParamLocationPath, slug)
if err != nil {
return nil, err
}
@@ -3354,7 +3458,7 @@ func NewV1DeleteASsoProviderRequest(server string, ref string, providerId string
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/organizations/%s", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3364,7 +3468,7 @@ func NewV1DeleteASsoProviderRequest(server string, ref string, providerId string
return nil, err
}
- req, err := http.NewRequest("DELETE", queryURL.String(), nil)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -3372,20 +3476,13 @@ func NewV1DeleteASsoProviderRequest(server string, ref string, providerId string
return req, nil
}
-// NewV1GetASsoProviderRequest generates requests for V1GetASsoProvider
-func NewV1GetASsoProviderRequest(server string, ref string, providerId string) (*http.Request, error) {
+// NewV1ListOrganizationMembersRequest generates requests for V1ListOrganizationMembers
+func NewV1ListOrganizationMembersRequest(server string, slug string) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
-
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "provider_id", runtime.ParamLocationPath, providerId)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "slug", runtime.ParamLocationPath, slug)
if err != nil {
return nil, err
}
@@ -3395,7 +3492,7 @@ func NewV1GetASsoProviderRequest(server string, ref string, providerId string) (
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/organizations/%s/members", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3413,31 +3510,20 @@ func NewV1GetASsoProviderRequest(server string, ref string, providerId string) (
return req, nil
}
-// NewV1UpdateASsoProviderRequest calls the generic V1UpdateASsoProvider builder with application/json body
-func NewV1UpdateASsoProviderRequest(server string, ref string, providerId string, body V1UpdateASsoProviderJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
- if err != nil {
- return nil, err
- }
- bodyReader = bytes.NewReader(buf)
- return NewV1UpdateASsoProviderRequestWithBody(server, ref, providerId, "application/json", bodyReader)
-}
-
-// NewV1UpdateASsoProviderRequestWithBody generates requests for V1UpdateASsoProvider with any type of body
-func NewV1UpdateASsoProviderRequestWithBody(server string, ref string, providerId string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1GetOrganizationProjectClaimRequest generates requests for V1GetOrganizationProjectClaim
+func NewV1GetOrganizationProjectClaimRequest(server string, slug string, token string) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "slug", runtime.ParamLocationPath, slug)
if err != nil {
return nil, err
}
var pathParam1 string
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "provider_id", runtime.ParamLocationPath, providerId)
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "token", runtime.ParamLocationPath, token)
if err != nil {
return nil, err
}
@@ -3447,7 +3533,7 @@ func NewV1UpdateASsoProviderRequestWithBody(server string, ref string, providerI
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/organizations/%s/project-claim/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3457,23 +3543,28 @@ func NewV1UpdateASsoProviderRequestWithBody(server string, ref string, providerI
return nil, err
}
- req, err := http.NewRequest("PUT", queryURL.String(), body)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
- req.Header.Add("Content-Type", contentType)
-
return req, nil
}
-// NewListTPAForProjectRequest generates requests for ListTPAForProject
-func NewListTPAForProjectRequest(server string, ref string) (*http.Request, error) {
+// NewV1ClaimProjectForOrganizationRequest generates requests for V1ClaimProjectForOrganization
+func NewV1ClaimProjectForOrganizationRequest(server string, slug string, token string) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "slug", runtime.ParamLocationPath, slug)
+ if err != nil {
+ return nil, err
+ }
+
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "token", runtime.ParamLocationPath, token)
if err != nil {
return nil, err
}
@@ -3483,7 +3574,34 @@ func NewListTPAForProjectRequest(server string, ref string) (*http.Request, erro
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth", pathParam0)
+ operationPath := fmt.Sprintf("/v1/organizations/%s/project-claim/%s", pathParam0, pathParam1)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1ListAllProjectsRequest generates requests for V1ListAllProjects
+func NewV1ListAllProjectsRequest(server string) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects")
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3501,34 +3619,27 @@ func NewListTPAForProjectRequest(server string, ref string) (*http.Request, erro
return req, nil
}
-// NewCreateTPAForProjectRequest calls the generic CreateTPAForProject builder with application/json body
-func NewCreateTPAForProjectRequest(server string, ref string, body CreateTPAForProjectJSONRequestBody) (*http.Request, error) {
+// NewV1CreateAProjectRequest calls the generic V1CreateAProject builder with application/json body
+func NewV1CreateAProjectRequest(server string, body V1CreateAProjectJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewCreateTPAForProjectRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1CreateAProjectRequestWithBody(server, "application/json", bodyReader)
}
-// NewCreateTPAForProjectRequestWithBody generates requests for CreateTPAForProject with any type of body
-func NewCreateTPAForProjectRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1CreateAProjectRequestWithBody generates requests for V1CreateAProject with any type of body
+func NewV1CreateAProjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
var err error
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
-
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects")
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3548,8 +3659,8 @@ func NewCreateTPAForProjectRequestWithBody(server string, ref string, contentTyp
return req, nil
}
-// NewDeleteTPAForProjectRequest generates requests for DeleteTPAForProject
-func NewDeleteTPAForProjectRequest(server string, ref string, tpaId string) (*http.Request, error) {
+// NewV1DeleteAProjectRequest generates requests for V1DeleteAProject
+func NewV1DeleteAProjectRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3559,19 +3670,12 @@ func NewDeleteTPAForProjectRequest(server string, ref string, tpaId string) (*ht
return nil, err
}
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "tpa_id", runtime.ParamLocationPath, tpaId)
- if err != nil {
- return nil, err
- }
-
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/projects/%s", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3589,8 +3693,8 @@ func NewDeleteTPAForProjectRequest(server string, ref string, tpaId string) (*ht
return req, nil
}
-// NewGetTPAForProjectRequest generates requests for GetTPAForProject
-func NewGetTPAForProjectRequest(server string, ref string, tpaId string) (*http.Request, error) {
+// NewV1GetProjectRequest generates requests for V1GetProject
+func NewV1GetProjectRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3600,19 +3704,12 @@ func NewGetTPAForProjectRequest(server string, ref string, tpaId string) (*http.
return nil, err
}
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "tpa_id", runtime.ParamLocationPath, tpaId)
- if err != nil {
- return nil, err
- }
-
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/projects/%s", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3630,8 +3727,8 @@ func NewGetTPAForProjectRequest(server string, ref string, tpaId string) (*http.
return req, nil
}
-// NewV1GetProjectPgbouncerConfigRequest generates requests for V1GetProjectPgbouncerConfig
-func NewV1GetProjectPgbouncerConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetPerformanceAdvisorsRequest generates requests for V1GetPerformanceAdvisors
+func NewV1GetPerformanceAdvisorsRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3646,7 +3743,7 @@ func NewV1GetProjectPgbouncerConfigRequest(server string, ref string) (*http.Req
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/database/pgbouncer", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/advisors/performance", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3664,8 +3761,8 @@ func NewV1GetProjectPgbouncerConfigRequest(server string, ref string) (*http.Req
return req, nil
}
-// NewV1GetSupavisorConfigRequest generates requests for V1GetSupavisorConfig
-func NewV1GetSupavisorConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetSecurityAdvisorsRequest generates requests for V1GetSecurityAdvisors
+func NewV1GetSecurityAdvisorsRequest(server string, ref string, params *V1GetSecurityAdvisorsParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3680,7 +3777,7 @@ func NewV1GetSupavisorConfigRequest(server string, ref string) (*http.Request, e
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/database/pooler", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/advisors/security", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3690,6 +3787,28 @@ func NewV1GetSupavisorConfigRequest(server string, ref string) (*http.Request, e
return nil, err
}
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.LintType != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "lint_type", runtime.ParamLocationQuery, *params.LintType); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
@@ -3698,19 +3817,8 @@ func NewV1GetSupavisorConfigRequest(server string, ref string) (*http.Request, e
return req, nil
}
-// NewV1UpdateSupavisorConfigRequest calls the generic V1UpdateSupavisorConfig builder with application/json body
-func NewV1UpdateSupavisorConfigRequest(server string, ref string, body V1UpdateSupavisorConfigJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
- if err != nil {
- return nil, err
- }
- bodyReader = bytes.NewReader(buf)
- return NewV1UpdateSupavisorConfigRequestWithBody(server, ref, "application/json", bodyReader)
-}
-
-// NewV1UpdateSupavisorConfigRequestWithBody generates requests for V1UpdateSupavisorConfig with any type of body
-func NewV1UpdateSupavisorConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1GetProjectLogsRequest generates requests for V1GetProjectLogs
+func NewV1GetProjectLogsRequest(server string, ref string, params *V1GetProjectLogsParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3725,7 +3833,7 @@ func NewV1UpdateSupavisorConfigRequestWithBody(server string, ref string, conten
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/database/pooler", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/analytics/endpoints/logs.all", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3735,18 +3843,70 @@ func NewV1UpdateSupavisorConfigRequestWithBody(server string, ref string, conten
return nil, err
}
- req, err := http.NewRequest("PATCH", queryURL.String(), body)
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.Sql != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sql", runtime.ParamLocationQuery, *params.Sql); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.IsoTimestampStart != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "iso_timestamp_start", runtime.ParamLocationQuery, *params.IsoTimestampStart); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.IsoTimestampEnd != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "iso_timestamp_end", runtime.ParamLocationQuery, *params.IsoTimestampEnd); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
- req.Header.Add("Content-Type", contentType)
-
return req, nil
}
-// NewV1GetPostgresConfigRequest generates requests for V1GetPostgresConfig
-func NewV1GetPostgresConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetProjectUsageApiCountRequest generates requests for V1GetProjectUsageApiCount
+func NewV1GetProjectUsageApiCountRequest(server string, ref string, params *V1GetProjectUsageApiCountParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3761,7 +3921,7 @@ func NewV1GetPostgresConfigRequest(server string, ref string) (*http.Request, er
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/database/postgres", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/analytics/endpoints/usage.api-counts", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3771,6 +3931,28 @@ func NewV1GetPostgresConfigRequest(server string, ref string) (*http.Request, er
return nil, err
}
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.Interval != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "interval", runtime.ParamLocationQuery, *params.Interval); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
@@ -3779,19 +3961,8 @@ func NewV1GetPostgresConfigRequest(server string, ref string) (*http.Request, er
return req, nil
}
-// NewV1UpdatePostgresConfigRequest calls the generic V1UpdatePostgresConfig builder with application/json body
-func NewV1UpdatePostgresConfigRequest(server string, ref string, body V1UpdatePostgresConfigJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
- if err != nil {
- return nil, err
- }
- bodyReader = bytes.NewReader(buf)
- return NewV1UpdatePostgresConfigRequestWithBody(server, ref, "application/json", bodyReader)
-}
-
-// NewV1UpdatePostgresConfigRequestWithBody generates requests for V1UpdatePostgresConfig with any type of body
-func NewV1UpdatePostgresConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1GetProjectUsageRequestCountRequest generates requests for V1GetProjectUsageRequestCount
+func NewV1GetProjectUsageRequestCountRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3806,7 +3977,7 @@ func NewV1UpdatePostgresConfigRequestWithBody(server string, ref string, content
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/database/postgres", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/analytics/endpoints/usage.api-requests-count", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3816,18 +3987,16 @@ func NewV1UpdatePostgresConfigRequestWithBody(server string, ref string, content
return nil, err
}
- req, err := http.NewRequest("PUT", queryURL.String(), body)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
- req.Header.Add("Content-Type", contentType)
-
return req, nil
}
-// NewV1GetStorageConfigRequest generates requests for V1GetStorageConfig
-func NewV1GetStorageConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetProjectApiKeysRequest generates requests for V1GetProjectApiKeys
+func NewV1GetProjectApiKeysRequest(server string, ref string, params *V1GetProjectApiKeysParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3842,7 +4011,7 @@ func NewV1GetStorageConfigRequest(server string, ref string) (*http.Request, err
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/storage", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/api-keys", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3852,6 +4021,28 @@ func NewV1GetStorageConfigRequest(server string, ref string) (*http.Request, err
return nil, err
}
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.Reveal != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reveal", runtime.ParamLocationQuery, *params.Reveal); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
@@ -3860,19 +4051,19 @@ func NewV1GetStorageConfigRequest(server string, ref string) (*http.Request, err
return req, nil
}
-// NewV1UpdateStorageConfigRequest calls the generic V1UpdateStorageConfig builder with application/json body
-func NewV1UpdateStorageConfigRequest(server string, ref string, body V1UpdateStorageConfigJSONRequestBody) (*http.Request, error) {
+// NewV1CreateProjectApiKeyRequest calls the generic V1CreateProjectApiKey builder with application/json body
+func NewV1CreateProjectApiKeyRequest(server string, ref string, params *V1CreateProjectApiKeyParams, body V1CreateProjectApiKeyJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1UpdateStorageConfigRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1CreateProjectApiKeyRequestWithBody(server, ref, params, "application/json", bodyReader)
}
-// NewV1UpdateStorageConfigRequestWithBody generates requests for V1UpdateStorageConfig with any type of body
-func NewV1UpdateStorageConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1CreateProjectApiKeyRequestWithBody generates requests for V1CreateProjectApiKey with any type of body
+func NewV1CreateProjectApiKeyRequestWithBody(server string, ref string, params *V1CreateProjectApiKeyParams, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3887,7 +4078,7 @@ func NewV1UpdateStorageConfigRequestWithBody(server string, ref string, contentT
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/config/storage", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/api-keys", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3897,52 +4088,40 @@ func NewV1UpdateStorageConfigRequestWithBody(server string, ref string, contentT
return nil, err
}
- req, err := http.NewRequest("PATCH", queryURL.String(), body)
- if err != nil {
- return nil, err
- }
+ if params != nil {
+ queryValues := queryURL.Query()
- req.Header.Add("Content-Type", contentType)
+ if params.Reveal != nil {
- return req, nil
-}
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reveal", runtime.ParamLocationQuery, *params.Reveal); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
-// NewV1DeleteHostnameConfigRequest generates requests for V1DeleteHostnameConfig
-func NewV1DeleteHostnameConfigRequest(server string, ref string) (*http.Request, error) {
- var err error
-
- var pathParam0 string
-
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
-
- serverURL, err := url.Parse(server)
- if err != nil {
- return nil, err
- }
+ }
- operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
+ queryURL.RawQuery = queryValues.Encode()
}
- queryURL, err := serverURL.Parse(operationPath)
+ req, err := http.NewRequest("POST", queryURL.String(), body)
if err != nil {
return nil, err
}
- req, err := http.NewRequest("DELETE", queryURL.String(), nil)
- if err != nil {
- return nil, err
- }
+ req.Header.Add("Content-Type", contentType)
return req, nil
}
-// NewV1GetHostnameConfigRequest generates requests for V1GetHostnameConfig
-func NewV1GetHostnameConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetProjectLegacyApiKeysRequest generates requests for V1GetProjectLegacyApiKeys
+func NewV1GetProjectLegacyApiKeysRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3957,7 +4136,7 @@ func NewV1GetHostnameConfigRequest(server string, ref string) (*http.Request, er
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/api-keys/legacy", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -3975,8 +4154,8 @@ func NewV1GetHostnameConfigRequest(server string, ref string) (*http.Request, er
return req, nil
}
-// NewV1ActivateCustomHostnameRequest generates requests for V1ActivateCustomHostname
-func NewV1ActivateCustomHostnameRequest(server string, ref string) (*http.Request, error) {
+// NewV1UpdateProjectLegacyApiKeysRequest generates requests for V1UpdateProjectLegacyApiKeys
+func NewV1UpdateProjectLegacyApiKeysRequest(server string, ref string, params *V1UpdateProjectLegacyApiKeysParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -3991,7 +4170,7 @@ func NewV1ActivateCustomHostnameRequest(server string, ref string) (*http.Reques
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname/activate", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/api-keys/legacy", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4001,27 +4180,34 @@ func NewV1ActivateCustomHostnameRequest(server string, ref string) (*http.Reques
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), nil)
- if err != nil {
- return nil, err
- }
+ if params != nil {
+ queryValues := queryURL.Query()
- return req, nil
-}
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "enabled", runtime.ParamLocationQuery, params.Enabled); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
-// NewV1UpdateHostnameConfigRequest calls the generic V1UpdateHostnameConfig builder with application/json body
-func NewV1UpdateHostnameConfigRequest(server string, ref string, body V1UpdateHostnameConfigJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("PUT", queryURL.String(), nil)
if err != nil {
return nil, err
}
- bodyReader = bytes.NewReader(buf)
- return NewV1UpdateHostnameConfigRequestWithBody(server, ref, "application/json", bodyReader)
+
+ return req, nil
}
-// NewV1UpdateHostnameConfigRequestWithBody generates requests for V1UpdateHostnameConfig with any type of body
-func NewV1UpdateHostnameConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1DeleteProjectApiKeyRequest generates requests for V1DeleteProjectApiKey
+func NewV1DeleteProjectApiKeyRequest(server string, ref string, id openapi_types.UUID, params *V1DeleteProjectApiKeyParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4031,12 +4217,19 @@ func NewV1UpdateHostnameConfigRequestWithBody(server string, ref string, content
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname/initialize", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/api-keys/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4046,43 +4239,61 @@ func NewV1UpdateHostnameConfigRequestWithBody(server string, ref string, content
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), body)
- if err != nil {
- return nil, err
- }
+ if params != nil {
+ queryValues := queryURL.Query()
- req.Header.Add("Content-Type", contentType)
+ if params.Reveal != nil {
- return req, nil
-}
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reveal", runtime.ParamLocationQuery, *params.Reveal); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
-// NewV1VerifyDnsConfigRequest generates requests for V1VerifyDnsConfig
-func NewV1VerifyDnsConfigRequest(server string, ref string) (*http.Request, error) {
- var err error
+ }
- var pathParam0 string
+ if params.WasCompromised != nil {
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
- if err != nil {
- return nil, err
- }
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "was_compromised", runtime.ParamLocationQuery, *params.WasCompromised); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
- serverURL, err := url.Parse(server)
- if err != nil {
- return nil, err
- }
+ }
- operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname/reverify", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
- }
+ if params.Reason != nil {
- queryURL, err := serverURL.Parse(operationPath)
- if err != nil {
- return nil, err
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reason", runtime.ParamLocationQuery, *params.Reason); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
}
- req, err := http.NewRequest("POST", queryURL.String(), nil)
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -4090,8 +4301,8 @@ func NewV1VerifyDnsConfigRequest(server string, ref string) (*http.Request, erro
return req, nil
}
-// NewV1ListAllBackupsRequest generates requests for V1ListAllBackups
-func NewV1ListAllBackupsRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetProjectApiKeyRequest generates requests for V1GetProjectApiKey
+func NewV1GetProjectApiKeyRequest(server string, ref string, id openapi_types.UUID, params *V1GetProjectApiKeyParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4101,12 +4312,19 @@ func NewV1ListAllBackupsRequest(server string, ref string) (*http.Request, error
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/database/backups", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/api-keys/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4116,6 +4334,28 @@ func NewV1ListAllBackupsRequest(server string, ref string) (*http.Request, error
return nil, err
}
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.Reveal != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reveal", runtime.ParamLocationQuery, *params.Reveal); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
@@ -4124,19 +4364,19 @@ func NewV1ListAllBackupsRequest(server string, ref string) (*http.Request, error
return req, nil
}
-// NewV1RestorePitrBackupRequest calls the generic V1RestorePitrBackup builder with application/json body
-func NewV1RestorePitrBackupRequest(server string, ref string, body V1RestorePitrBackupJSONRequestBody) (*http.Request, error) {
+// NewV1UpdateProjectApiKeyRequest calls the generic V1UpdateProjectApiKey builder with application/json body
+func NewV1UpdateProjectApiKeyRequest(server string, ref string, id openapi_types.UUID, params *V1UpdateProjectApiKeyParams, body V1UpdateProjectApiKeyJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1RestorePitrBackupRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1UpdateProjectApiKeyRequestWithBody(server, ref, id, params, "application/json", bodyReader)
}
-// NewV1RestorePitrBackupRequestWithBody generates requests for V1RestorePitrBackup with any type of body
-func NewV1RestorePitrBackupRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1UpdateProjectApiKeyRequestWithBody generates requests for V1UpdateProjectApiKey with any type of body
+func NewV1UpdateProjectApiKeyRequestWithBody(server string, ref string, id openapi_types.UUID, params *V1UpdateProjectApiKeyParams, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4146,12 +4386,19 @@ func NewV1RestorePitrBackupRequestWithBody(server string, ref string, contentTyp
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/database/backups/restore-pitr", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/api-keys/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4161,7 +4408,29 @@ func NewV1RestorePitrBackupRequestWithBody(server string, ref string, contentTyp
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), body)
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.Reveal != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "reveal", runtime.ParamLocationQuery, *params.Reveal); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("PATCH", queryURL.String(), body)
if err != nil {
return nil, err
}
@@ -4171,8 +4440,8 @@ func NewV1RestorePitrBackupRequestWithBody(server string, ref string, contentTyp
return req, nil
}
-// NewGetDatabaseMetadataRequest generates requests for GetDatabaseMetadata
-func NewGetDatabaseMetadataRequest(server string, ref string) (*http.Request, error) {
+// NewV1ListProjectAddonsRequest generates requests for V1ListProjectAddons
+func NewV1ListProjectAddonsRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4187,7 +4456,7 @@ func NewGetDatabaseMetadataRequest(server string, ref string) (*http.Request, er
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/database/context", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/billing/addons", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4205,19 +4474,19 @@ func NewGetDatabaseMetadataRequest(server string, ref string) (*http.Request, er
return req, nil
}
-// NewV1RunAQueryRequest calls the generic V1RunAQuery builder with application/json body
-func NewV1RunAQueryRequest(server string, ref string, body V1RunAQueryJSONRequestBody) (*http.Request, error) {
+// NewV1ApplyProjectAddonRequest calls the generic V1ApplyProjectAddon builder with application/json body
+func NewV1ApplyProjectAddonRequest(server string, ref string, body V1ApplyProjectAddonJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1RunAQueryRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1ApplyProjectAddonRequestWithBody(server, ref, "application/json", bodyReader)
}
-// NewV1RunAQueryRequestWithBody generates requests for V1RunAQuery with any type of body
-func NewV1RunAQueryRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1ApplyProjectAddonRequestWithBody generates requests for V1ApplyProjectAddon with any type of body
+func NewV1ApplyProjectAddonRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4232,7 +4501,7 @@ func NewV1RunAQueryRequestWithBody(server string, ref string, contentType string
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/database/query", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/billing/addons", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4242,7 +4511,7 @@ func NewV1RunAQueryRequestWithBody(server string, ref string, contentType string
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), body)
+ req, err := http.NewRequest("PATCH", queryURL.String(), body)
if err != nil {
return nil, err
}
@@ -4252,8 +4521,8 @@ func NewV1RunAQueryRequestWithBody(server string, ref string, contentType string
return req, nil
}
-// NewV1EnableDatabaseWebhookRequest generates requests for V1EnableDatabaseWebhook
-func NewV1EnableDatabaseWebhookRequest(server string, ref string) (*http.Request, error) {
+// NewV1RemoveProjectAddonRequest generates requests for V1RemoveProjectAddon
+func NewV1RemoveProjectAddonRequest(server string, ref string, addonVariant interface{}) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4263,12 +4532,19 @@ func NewV1EnableDatabaseWebhookRequest(server string, ref string) (*http.Request
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "addon_variant", runtime.ParamLocationPath, addonVariant)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/database/webhooks/enable", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/billing/addons/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4278,7 +4554,7 @@ func NewV1EnableDatabaseWebhookRequest(server string, ref string) (*http.Request
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), nil)
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -4286,8 +4562,8 @@ func NewV1EnableDatabaseWebhookRequest(server string, ref string) (*http.Request
return req, nil
}
-// NewV1ListAllFunctionsRequest generates requests for V1ListAllFunctions
-func NewV1ListAllFunctionsRequest(server string, ref string) (*http.Request, error) {
+// NewV1DisablePreviewBranchingRequest generates requests for V1DisablePreviewBranching
+func NewV1DisablePreviewBranchingRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4302,7 +4578,7 @@ func NewV1ListAllFunctionsRequest(server string, ref string) (*http.Request, err
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/functions", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4312,7 +4588,7 @@ func NewV1ListAllFunctionsRequest(server string, ref string) (*http.Request, err
return nil, err
}
- req, err := http.NewRequest("GET", queryURL.String(), nil)
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -4320,19 +4596,8 @@ func NewV1ListAllFunctionsRequest(server string, ref string) (*http.Request, err
return req, nil
}
-// NewV1CreateAFunctionRequest calls the generic V1CreateAFunction builder with application/json body
-func NewV1CreateAFunctionRequest(server string, ref string, params *V1CreateAFunctionParams, body V1CreateAFunctionJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
- if err != nil {
- return nil, err
- }
- bodyReader = bytes.NewReader(buf)
- return NewV1CreateAFunctionRequestWithBody(server, ref, params, "application/json", bodyReader)
-}
-
-// NewV1CreateAFunctionRequestWithBody generates requests for V1CreateAFunction with any type of body
-func NewV1CreateAFunctionRequestWithBody(server string, ref string, params *V1CreateAFunctionParams, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1ListAllBranchesRequest generates requests for V1ListAllBranches
+func NewV1ListAllBranchesRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4347,7 +4612,7 @@ func NewV1CreateAFunctionRequestWithBody(server string, ref string, params *V1Cr
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/functions", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4357,122 +4622,49 @@ func NewV1CreateAFunctionRequestWithBody(server string, ref string, params *V1Cr
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
- if params.Slug != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "slug", runtime.ParamLocationQuery, *params.Slug); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.Name != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name", runtime.ParamLocationQuery, *params.Name); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.VerifyJwt != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "verify_jwt", runtime.ParamLocationQuery, *params.VerifyJwt); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.ImportMap != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "import_map", runtime.ParamLocationQuery, *params.ImportMap); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.EntrypointPath != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "entrypoint_path", runtime.ParamLocationQuery, *params.EntrypointPath); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
+ return req, nil
+}
- if params.ImportMapPath != nil {
+// NewV1CreateABranchRequest calls the generic V1CreateABranch builder with application/json body
+func NewV1CreateABranchRequest(server string, ref string, body V1CreateABranchJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1CreateABranchRequestWithBody(server, ref, "application/json", bodyReader)
+}
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "import_map_path", runtime.ParamLocationQuery, *params.ImportMapPath); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
+// NewV1CreateABranchRequestWithBody generates requests for V1CreateABranch with any type of body
+func NewV1CreateABranchRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
- }
+ var pathParam0 string
- if params.ComputeMultiplier != nil {
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_multiplier", runtime.ParamLocationQuery, *params.ComputeMultiplier); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- }
+ operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- queryURL.RawQuery = queryValues.Encode()
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
}
req, err := http.NewRequest("POST", queryURL.String(), body)
@@ -4485,19 +4677,8 @@ func NewV1CreateAFunctionRequestWithBody(server string, ref string, params *V1Cr
return req, nil
}
-// NewV1BulkUpdateFunctionsRequest calls the generic V1BulkUpdateFunctions builder with application/json body
-func NewV1BulkUpdateFunctionsRequest(server string, ref string, body V1BulkUpdateFunctionsJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
- if err != nil {
- return nil, err
- }
- bodyReader = bytes.NewReader(buf)
- return NewV1BulkUpdateFunctionsRequestWithBody(server, ref, "application/json", bodyReader)
-}
-
-// NewV1BulkUpdateFunctionsRequestWithBody generates requests for V1BulkUpdateFunctions with any type of body
-func NewV1BulkUpdateFunctionsRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1GetABranchRequest generates requests for V1GetABranch
+func NewV1GetABranchRequest(server string, ref string, name string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4507,12 +4688,19 @@ func NewV1BulkUpdateFunctionsRequestWithBody(server string, ref string, contentT
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/functions", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/branches/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4522,18 +4710,16 @@ func NewV1BulkUpdateFunctionsRequestWithBody(server string, ref string, contentT
return nil, err
}
- req, err := http.NewRequest("PUT", queryURL.String(), body)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
- req.Header.Add("Content-Type", contentType)
-
return req, nil
}
-// NewV1DeployAFunctionRequestWithBody generates requests for V1DeployAFunction with any type of body
-func NewV1DeployAFunctionRequestWithBody(server string, ref string, params *V1DeployAFunctionParams, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1DeleteProjectClaimTokenRequest generates requests for V1DeleteProjectClaimToken
+func NewV1DeleteProjectClaimTokenRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4548,7 +4734,7 @@ func NewV1DeployAFunctionRequestWithBody(server string, ref string, params *V1De
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/functions/deploy", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/claim-token", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4558,56 +4744,50 @@ func NewV1DeployAFunctionRequestWithBody(server string, ref string, params *V1De
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
-
- if params.Slug != nil {
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "slug", runtime.ParamLocationQuery, *params.Slug); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
+ return req, nil
+}
- }
+// NewV1GetProjectClaimTokenRequest generates requests for V1GetProjectClaimToken
+func NewV1GetProjectClaimTokenRequest(server string, ref string) (*http.Request, error) {
+ var err error
- if params.BundleOnly != nil {
+ var pathParam0 string
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "bundleOnly", runtime.ParamLocationQuery, *params.BundleOnly); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- }
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- queryURL.RawQuery = queryValues.Encode()
+ operationPath := fmt.Sprintf("/v1/projects/%s/claim-token", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
}
- req, err := http.NewRequest("POST", queryURL.String(), body)
+ queryURL, err := serverURL.Parse(operationPath)
if err != nil {
return nil, err
}
- req.Header.Add("Content-Type", contentType)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
return req, nil
}
-// NewV1DeleteAFunctionRequest generates requests for V1DeleteAFunction
-func NewV1DeleteAFunctionRequest(server string, ref string, functionSlug string) (*http.Request, error) {
+// NewV1CreateProjectClaimTokenRequest generates requests for V1CreateProjectClaimToken
+func NewV1CreateProjectClaimTokenRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4617,19 +4797,12 @@ func NewV1DeleteAFunctionRequest(server string, ref string, functionSlug string)
return nil, err
}
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "function_slug", runtime.ParamLocationPath, functionSlug)
- if err != nil {
- return nil, err
- }
-
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/projects/%s/claim-token", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4639,7 +4812,7 @@ func NewV1DeleteAFunctionRequest(server string, ref string, functionSlug string)
return nil, err
}
- req, err := http.NewRequest("DELETE", queryURL.String(), nil)
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -4647,8 +4820,8 @@ func NewV1DeleteAFunctionRequest(server string, ref string, functionSlug string)
return req, nil
}
-// NewV1GetAFunctionRequest generates requests for V1GetAFunction
-func NewV1GetAFunctionRequest(server string, ref string, functionSlug string) (*http.Request, error) {
+// NewV1GetAuthServiceConfigRequest generates requests for V1GetAuthServiceConfig
+func NewV1GetAuthServiceConfigRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4658,19 +4831,12 @@ func NewV1GetAFunctionRequest(server string, ref string, functionSlug string) (*
return nil, err
}
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "function_slug", runtime.ParamLocationPath, functionSlug)
- if err != nil {
- return nil, err
- }
-
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4688,19 +4854,19 @@ func NewV1GetAFunctionRequest(server string, ref string, functionSlug string) (*
return req, nil
}
-// NewV1UpdateAFunctionRequest calls the generic V1UpdateAFunction builder with application/json body
-func NewV1UpdateAFunctionRequest(server string, ref string, functionSlug string, params *V1UpdateAFunctionParams, body V1UpdateAFunctionJSONRequestBody) (*http.Request, error) {
+// NewV1UpdateAuthServiceConfigRequest calls the generic V1UpdateAuthServiceConfig builder with application/json body
+func NewV1UpdateAuthServiceConfigRequest(server string, ref string, body V1UpdateAuthServiceConfigJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1UpdateAFunctionRequestWithBody(server, ref, functionSlug, params, "application/json", bodyReader)
+ return NewV1UpdateAuthServiceConfigRequestWithBody(server, ref, "application/json", bodyReader)
}
-// NewV1UpdateAFunctionRequestWithBody generates requests for V1UpdateAFunction with any type of body
-func NewV1UpdateAFunctionRequestWithBody(server string, ref string, functionSlug string, params *V1UpdateAFunctionParams, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1UpdateAuthServiceConfigRequestWithBody generates requests for V1UpdateAuthServiceConfig with any type of body
+func NewV1UpdateAuthServiceConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4710,19 +4876,12 @@ func NewV1UpdateAFunctionRequestWithBody(server string, ref string, functionSlug
return nil, err
}
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "function_slug", runtime.ParamLocationPath, functionSlug)
+ serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- serverURL, err := url.Parse(server)
- if err != nil {
- return nil, err
- }
-
- operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4732,124 +4891,6 @@ func NewV1UpdateAFunctionRequestWithBody(server string, ref string, functionSlug
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
-
- if params.Slug != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "slug", runtime.ParamLocationQuery, *params.Slug); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.Name != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name", runtime.ParamLocationQuery, *params.Name); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.VerifyJwt != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "verify_jwt", runtime.ParamLocationQuery, *params.VerifyJwt); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.ImportMap != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "import_map", runtime.ParamLocationQuery, *params.ImportMap); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.EntrypointPath != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "entrypoint_path", runtime.ParamLocationQuery, *params.EntrypointPath); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.ImportMapPath != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "import_map_path", runtime.ParamLocationQuery, *params.ImportMapPath); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.ComputeMultiplier != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "compute_multiplier", runtime.ParamLocationQuery, *params.ComputeMultiplier); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- queryURL.RawQuery = queryValues.Encode()
- }
-
req, err := http.NewRequest("PATCH", queryURL.String(), body)
if err != nil {
return nil, err
@@ -4860,8 +4901,8 @@ func NewV1UpdateAFunctionRequestWithBody(server string, ref string, functionSlug
return req, nil
}
-// NewV1GetAFunctionBodyRequest generates requests for V1GetAFunctionBody
-func NewV1GetAFunctionBodyRequest(server string, ref string, functionSlug string) (*http.Request, error) {
+// NewV1GetProjectSigningKeysRequest generates requests for V1GetProjectSigningKeys
+func NewV1GetProjectSigningKeysRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4871,19 +4912,12 @@ func NewV1GetAFunctionBodyRequest(server string, ref string, functionSlug string
return nil, err
}
- var pathParam1 string
-
- pathParam1, err = runtime.StyleParamWithLocation("simple", false, "function_slug", runtime.ParamLocationPath, functionSlug)
- if err != nil {
- return nil, err
- }
-
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s/body", pathParam0, pathParam1)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4901,8 +4935,19 @@ func NewV1GetAFunctionBodyRequest(server string, ref string, functionSlug string
return req, nil
}
-// NewV1GetServicesHealthRequest generates requests for V1GetServicesHealth
-func NewV1GetServicesHealthRequest(server string, ref string, params *V1GetServicesHealthParams) (*http.Request, error) {
+// NewV1CreateProjectSigningKeyRequest calls the generic V1CreateProjectSigningKey builder with application/json body
+func NewV1CreateProjectSigningKeyRequest(server string, ref string, body V1CreateProjectSigningKeyJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1CreateProjectSigningKeyRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1CreateProjectSigningKeyRequestWithBody generates requests for V1CreateProjectSigningKey with any type of body
+func NewV1CreateProjectSigningKeyRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4917,7 +4962,7 @@ func NewV1GetServicesHealthRequest(server string, ref string, params *V1GetServi
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/health", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -4927,61 +4972,52 @@ func NewV1GetServicesHealthRequest(server string, ref string, params *V1GetServi
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
- if params.TimeoutMs != nil {
+ req.Header.Add("Content-Type", contentType)
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "timeout_ms", runtime.ParamLocationQuery, *params.TimeoutMs); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
+ return req, nil
+}
- }
+// NewV1GetLegacySigningKeyRequest generates requests for V1GetLegacySigningKey
+func NewV1GetLegacySigningKeyRequest(server string, ref string) (*http.Request, error) {
+ var err error
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "services", runtime.ParamLocationQuery, params.Services); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
+ var pathParam0 string
- queryURL.RawQuery = queryValues.Encode()
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
}
- req, err := http.NewRequest("GET", queryURL.String(), nil)
+ serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- return req, nil
-}
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys/legacy", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
-// NewV1DeleteNetworkBansRequest calls the generic V1DeleteNetworkBans builder with application/json body
-func NewV1DeleteNetworkBansRequest(server string, ref string, body V1DeleteNetworkBansJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
+ queryURL, err := serverURL.Parse(operationPath)
if err != nil {
return nil, err
}
- bodyReader = bytes.NewReader(buf)
- return NewV1DeleteNetworkBansRequestWithBody(server, ref, "application/json", bodyReader)
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
}
-// NewV1DeleteNetworkBansRequestWithBody generates requests for V1DeleteNetworkBans with any type of body
-func NewV1DeleteNetworkBansRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1CreateLegacySigningKeyRequest generates requests for V1CreateLegacySigningKey
+func NewV1CreateLegacySigningKeyRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -4996,7 +5032,7 @@ func NewV1DeleteNetworkBansRequestWithBody(server string, ref string, contentTyp
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/network-bans", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys/legacy", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5006,18 +5042,16 @@ func NewV1DeleteNetworkBansRequestWithBody(server string, ref string, contentTyp
return nil, err
}
- req, err := http.NewRequest("DELETE", queryURL.String(), body)
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
if err != nil {
return nil, err
}
- req.Header.Add("Content-Type", contentType)
-
return req, nil
}
-// NewV1ListAllNetworkBansRequest generates requests for V1ListAllNetworkBans
-func NewV1ListAllNetworkBansRequest(server string, ref string) (*http.Request, error) {
+// NewV1RemoveProjectSigningKeyRequest generates requests for V1RemoveProjectSigningKey
+func NewV1RemoveProjectSigningKeyRequest(server string, ref string, id openapi_types.UUID) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5027,12 +5061,19 @@ func NewV1ListAllNetworkBansRequest(server string, ref string) (*http.Request, e
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/network-bans/retrieve", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5042,7 +5083,7 @@ func NewV1ListAllNetworkBansRequest(server string, ref string) (*http.Request, e
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), nil)
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -5050,8 +5091,8 @@ func NewV1ListAllNetworkBansRequest(server string, ref string) (*http.Request, e
return req, nil
}
-// NewV1GetNetworkRestrictionsRequest generates requests for V1GetNetworkRestrictions
-func NewV1GetNetworkRestrictionsRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetProjectSigningKeyRequest generates requests for V1GetProjectSigningKey
+func NewV1GetProjectSigningKeyRequest(server string, ref string, id openapi_types.UUID) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5061,12 +5102,19 @@ func NewV1GetNetworkRestrictionsRequest(server string, ref string) (*http.Reques
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/network-restrictions", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5084,19 +5132,19 @@ func NewV1GetNetworkRestrictionsRequest(server string, ref string) (*http.Reques
return req, nil
}
-// NewV1UpdateNetworkRestrictionsRequest calls the generic V1UpdateNetworkRestrictions builder with application/json body
-func NewV1UpdateNetworkRestrictionsRequest(server string, ref string, body V1UpdateNetworkRestrictionsJSONRequestBody) (*http.Request, error) {
+// NewV1UpdateProjectSigningKeyRequest calls the generic V1UpdateProjectSigningKey builder with application/json body
+func NewV1UpdateProjectSigningKeyRequest(server string, ref string, id openapi_types.UUID, body V1UpdateProjectSigningKeyJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1UpdateNetworkRestrictionsRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1UpdateProjectSigningKeyRequestWithBody(server, ref, id, "application/json", bodyReader)
}
-// NewV1UpdateNetworkRestrictionsRequestWithBody generates requests for V1UpdateNetworkRestrictions with any type of body
-func NewV1UpdateNetworkRestrictionsRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1UpdateProjectSigningKeyRequestWithBody generates requests for V1UpdateProjectSigningKey with any type of body
+func NewV1UpdateProjectSigningKeyRequestWithBody(server string, ref string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5106,12 +5154,19 @@ func NewV1UpdateNetworkRestrictionsRequestWithBody(server string, ref string, co
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/network-restrictions/apply", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5121,7 +5176,7 @@ func NewV1UpdateNetworkRestrictionsRequestWithBody(server string, ref string, co
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), body)
+ req, err := http.NewRequest("PATCH", queryURL.String(), body)
if err != nil {
return nil, err
}
@@ -5131,8 +5186,8 @@ func NewV1UpdateNetworkRestrictionsRequestWithBody(server string, ref string, co
return req, nil
}
-// NewV1PauseAProjectRequest generates requests for V1PauseAProject
-func NewV1PauseAProjectRequest(server string, ref string) (*http.Request, error) {
+// NewV1ListAllSsoProviderRequest generates requests for V1ListAllSsoProvider
+func NewV1ListAllSsoProviderRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5147,7 +5202,7 @@ func NewV1PauseAProjectRequest(server string, ref string) (*http.Request, error)
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/pause", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5157,7 +5212,7 @@ func NewV1PauseAProjectRequest(server string, ref string) (*http.Request, error)
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), nil)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -5165,8 +5220,19 @@ func NewV1PauseAProjectRequest(server string, ref string) (*http.Request, error)
return req, nil
}
-// NewV1GetPgsodiumConfigRequest generates requests for V1GetPgsodiumConfig
-func NewV1GetPgsodiumConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1CreateASsoProviderRequest calls the generic V1CreateASsoProvider builder with application/json body
+func NewV1CreateASsoProviderRequest(server string, ref string, body V1CreateASsoProviderJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1CreateASsoProviderRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1CreateASsoProviderRequestWithBody generates requests for V1CreateASsoProvider with any type of body
+func NewV1CreateASsoProviderRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5181,7 +5247,7 @@ func NewV1GetPgsodiumConfigRequest(server string, ref string) (*http.Request, er
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/pgsodium", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5191,27 +5257,18 @@ func NewV1GetPgsodiumConfigRequest(server string, ref string) (*http.Request, er
return nil, err
}
- req, err := http.NewRequest("GET", queryURL.String(), nil)
+ req, err := http.NewRequest("POST", queryURL.String(), body)
if err != nil {
return nil, err
}
- return req, nil
-}
+ req.Header.Add("Content-Type", contentType)
-// NewV1UpdatePgsodiumConfigRequest calls the generic V1UpdatePgsodiumConfig builder with application/json body
-func NewV1UpdatePgsodiumConfigRequest(server string, ref string, body V1UpdatePgsodiumConfigJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
- if err != nil {
- return nil, err
- }
- bodyReader = bytes.NewReader(buf)
- return NewV1UpdatePgsodiumConfigRequestWithBody(server, ref, "application/json", bodyReader)
+ return req, nil
}
-// NewV1UpdatePgsodiumConfigRequestWithBody generates requests for V1UpdatePgsodiumConfig with any type of body
-func NewV1UpdatePgsodiumConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1DeleteASsoProviderRequest generates requests for V1DeleteASsoProvider
+func NewV1DeleteASsoProviderRequest(server string, ref string, providerId openapi_types.UUID) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5221,12 +5278,19 @@ func NewV1UpdatePgsodiumConfigRequestWithBody(server string, ref string, content
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "provider_id", runtime.ParamLocationPath, providerId)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/pgsodium", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5236,18 +5300,16 @@ func NewV1UpdatePgsodiumConfigRequestWithBody(server string, ref string, content
return nil, err
}
- req, err := http.NewRequest("PUT", queryURL.String(), body)
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
if err != nil {
return nil, err
}
- req.Header.Add("Content-Type", contentType)
-
return req, nil
}
-// NewV1GetPostgrestServiceConfigRequest generates requests for V1GetPostgrestServiceConfig
-func NewV1GetPostgrestServiceConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetASsoProviderRequest generates requests for V1GetASsoProvider
+func NewV1GetASsoProviderRequest(server string, ref string, providerId openapi_types.UUID) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5257,12 +5319,19 @@ func NewV1GetPostgrestServiceConfigRequest(server string, ref string) (*http.Req
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "provider_id", runtime.ParamLocationPath, providerId)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/postgrest", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5280,19 +5349,19 @@ func NewV1GetPostgrestServiceConfigRequest(server string, ref string) (*http.Req
return req, nil
}
-// NewV1UpdatePostgrestServiceConfigRequest calls the generic V1UpdatePostgrestServiceConfig builder with application/json body
-func NewV1UpdatePostgrestServiceConfigRequest(server string, ref string, body V1UpdatePostgrestServiceConfigJSONRequestBody) (*http.Request, error) {
+// NewV1UpdateASsoProviderRequest calls the generic V1UpdateASsoProvider builder with application/json body
+func NewV1UpdateASsoProviderRequest(server string, ref string, providerId openapi_types.UUID, body V1UpdateASsoProviderJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1UpdatePostgrestServiceConfigRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1UpdateASsoProviderRequestWithBody(server, ref, providerId, "application/json", bodyReader)
}
-// NewV1UpdatePostgrestServiceConfigRequestWithBody generates requests for V1UpdatePostgrestServiceConfig with any type of body
-func NewV1UpdatePostgrestServiceConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1UpdateASsoProviderRequestWithBody generates requests for V1UpdateASsoProvider with any type of body
+func NewV1UpdateASsoProviderRequestWithBody(server string, ref string, providerId openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5302,12 +5371,19 @@ func NewV1UpdatePostgrestServiceConfigRequestWithBody(server string, ref string,
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "provider_id", runtime.ParamLocationPath, providerId)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/postgrest", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5317,7 +5393,7 @@ func NewV1UpdatePostgrestServiceConfigRequestWithBody(server string, ref string,
return nil, err
}
- req, err := http.NewRequest("PATCH", queryURL.String(), body)
+ req, err := http.NewRequest("PUT", queryURL.String(), body)
if err != nil {
return nil, err
}
@@ -5327,19 +5403,8 @@ func NewV1UpdatePostgrestServiceConfigRequestWithBody(server string, ref string,
return req, nil
}
-// NewV1RemoveAReadReplicaRequest calls the generic V1RemoveAReadReplica builder with application/json body
-func NewV1RemoveAReadReplicaRequest(server string, ref string, body V1RemoveAReadReplicaJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
- if err != nil {
- return nil, err
- }
- bodyReader = bytes.NewReader(buf)
- return NewV1RemoveAReadReplicaRequestWithBody(server, ref, "application/json", bodyReader)
-}
-
-// NewV1RemoveAReadReplicaRequestWithBody generates requests for V1RemoveAReadReplica with any type of body
-func NewV1RemoveAReadReplicaRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1ListProjectTpaIntegrationsRequest generates requests for V1ListProjectTpaIntegrations
+func NewV1ListProjectTpaIntegrationsRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5354,7 +5419,7 @@ func NewV1RemoveAReadReplicaRequestWithBody(server string, ref string, contentTy
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/read-replicas/remove", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5364,29 +5429,27 @@ func NewV1RemoveAReadReplicaRequestWithBody(server string, ref string, contentTy
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), body)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
- req.Header.Add("Content-Type", contentType)
-
return req, nil
}
-// NewV1SetupAReadReplicaRequest calls the generic V1SetupAReadReplica builder with application/json body
-func NewV1SetupAReadReplicaRequest(server string, ref string, body V1SetupAReadReplicaJSONRequestBody) (*http.Request, error) {
+// NewV1CreateProjectTpaIntegrationRequest calls the generic V1CreateProjectTpaIntegration builder with application/json body
+func NewV1CreateProjectTpaIntegrationRequest(server string, ref string, body V1CreateProjectTpaIntegrationJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1SetupAReadReplicaRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1CreateProjectTpaIntegrationRequestWithBody(server, ref, "application/json", bodyReader)
}
-// NewV1SetupAReadReplicaRequestWithBody generates requests for V1SetupAReadReplica with any type of body
-func NewV1SetupAReadReplicaRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1CreateProjectTpaIntegrationRequestWithBody generates requests for V1CreateProjectTpaIntegration with any type of body
+func NewV1CreateProjectTpaIntegrationRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5401,7 +5464,7 @@ func NewV1SetupAReadReplicaRequestWithBody(server string, ref string, contentTyp
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/read-replicas/setup", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5421,8 +5484,8 @@ func NewV1SetupAReadReplicaRequestWithBody(server string, ref string, contentTyp
return req, nil
}
-// NewV1GetReadonlyModeStatusRequest generates requests for V1GetReadonlyModeStatus
-func NewV1GetReadonlyModeStatusRequest(server string, ref string) (*http.Request, error) {
+// NewV1DeleteProjectTpaIntegrationRequest generates requests for V1DeleteProjectTpaIntegration
+func NewV1DeleteProjectTpaIntegrationRequest(server string, ref string, tpaId openapi_types.UUID) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5432,36 +5495,9 @@ func NewV1GetReadonlyModeStatusRequest(server string, ref string) (*http.Request
return nil, err
}
- serverURL, err := url.Parse(server)
- if err != nil {
- return nil, err
- }
-
- operationPath := fmt.Sprintf("/v1/projects/%s/readonly", pathParam0)
- if operationPath[0] == '/' {
- operationPath = "." + operationPath
- }
-
- queryURL, err := serverURL.Parse(operationPath)
- if err != nil {
- return nil, err
- }
-
- req, err := http.NewRequest("GET", queryURL.String(), nil)
- if err != nil {
- return nil, err
- }
-
- return req, nil
-}
-
-// NewV1DisableReadonlyModeTemporarilyRequest generates requests for V1DisableReadonlyModeTemporarily
-func NewV1DisableReadonlyModeTemporarilyRequest(server string, ref string) (*http.Request, error) {
- var err error
-
- var pathParam0 string
+ var pathParam1 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "tpa_id", runtime.ParamLocationPath, tpaId)
if err != nil {
return nil, err
}
@@ -5471,7 +5507,7 @@ func NewV1DisableReadonlyModeTemporarilyRequest(server string, ref string) (*htt
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/readonly/temporary-disable", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5481,7 +5517,7 @@ func NewV1DisableReadonlyModeTemporarilyRequest(server string, ref string) (*htt
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), nil)
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -5489,8 +5525,8 @@ func NewV1DisableReadonlyModeTemporarilyRequest(server string, ref string) (*htt
return req, nil
}
-// NewV1ListAvailableRestoreVersionsRequest generates requests for V1ListAvailableRestoreVersions
-func NewV1ListAvailableRestoreVersionsRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetProjectTpaIntegrationRequest generates requests for V1GetProjectTpaIntegration
+func NewV1GetProjectTpaIntegrationRequest(server string, ref string, tpaId openapi_types.UUID) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5500,12 +5536,19 @@ func NewV1ListAvailableRestoreVersionsRequest(server string, ref string) (*http.
return nil, err
}
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "tpa_id", runtime.ParamLocationPath, tpaId)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/restore", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth/%s", pathParam0, pathParam1)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5523,19 +5566,8 @@ func NewV1ListAvailableRestoreVersionsRequest(server string, ref string) (*http.
return req, nil
}
-// NewV1RestoreAProjectRequest calls the generic V1RestoreAProject builder with application/json body
-func NewV1RestoreAProjectRequest(server string, ref string, body V1RestoreAProjectJSONRequestBody) (*http.Request, error) {
- var bodyReader io.Reader
- buf, err := json.Marshal(body)
- if err != nil {
- return nil, err
- }
- bodyReader = bytes.NewReader(buf)
- return NewV1RestoreAProjectRequestWithBody(server, ref, "application/json", bodyReader)
-}
-
-// NewV1RestoreAProjectRequestWithBody generates requests for V1RestoreAProject with any type of body
-func NewV1RestoreAProjectRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1GetProjectPgbouncerConfigRequest generates requests for V1GetProjectPgbouncerConfig
+func NewV1GetProjectPgbouncerConfigRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5550,7 +5582,7 @@ func NewV1RestoreAProjectRequestWithBody(server string, ref string, contentType
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/restore", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/database/pgbouncer", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5560,18 +5592,16 @@ func NewV1RestoreAProjectRequestWithBody(server string, ref string, contentType
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), body)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
- req.Header.Add("Content-Type", contentType)
-
return req, nil
}
-// NewV1CancelAProjectRestorationRequest generates requests for V1CancelAProjectRestoration
-func NewV1CancelAProjectRestorationRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetPoolerConfigRequest generates requests for V1GetPoolerConfig
+func NewV1GetPoolerConfigRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5586,7 +5616,7 @@ func NewV1CancelAProjectRestorationRequest(server string, ref string) (*http.Req
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/restore/cancel", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/database/pooler", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5596,7 +5626,7 @@ func NewV1CancelAProjectRestorationRequest(server string, ref string) (*http.Req
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), nil)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -5604,19 +5634,19 @@ func NewV1CancelAProjectRestorationRequest(server string, ref string) (*http.Req
return req, nil
}
-// NewV1BulkDeleteSecretsRequest calls the generic V1BulkDeleteSecrets builder with application/json body
-func NewV1BulkDeleteSecretsRequest(server string, ref string, body V1BulkDeleteSecretsJSONRequestBody) (*http.Request, error) {
+// NewV1UpdatePoolerConfigRequest calls the generic V1UpdatePoolerConfig builder with application/json body
+func NewV1UpdatePoolerConfigRequest(server string, ref string, body V1UpdatePoolerConfigJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1BulkDeleteSecretsRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1UpdatePoolerConfigRequestWithBody(server, ref, "application/json", bodyReader)
}
-// NewV1BulkDeleteSecretsRequestWithBody generates requests for V1BulkDeleteSecrets with any type of body
-func NewV1BulkDeleteSecretsRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1UpdatePoolerConfigRequestWithBody generates requests for V1UpdatePoolerConfig with any type of body
+func NewV1UpdatePoolerConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5631,7 +5661,7 @@ func NewV1BulkDeleteSecretsRequestWithBody(server string, ref string, contentTyp
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/secrets", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/database/pooler", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5641,7 +5671,7 @@ func NewV1BulkDeleteSecretsRequestWithBody(server string, ref string, contentTyp
return nil, err
}
- req, err := http.NewRequest("DELETE", queryURL.String(), body)
+ req, err := http.NewRequest("PATCH", queryURL.String(), body)
if err != nil {
return nil, err
}
@@ -5651,8 +5681,8 @@ func NewV1BulkDeleteSecretsRequestWithBody(server string, ref string, contentTyp
return req, nil
}
-// NewV1ListAllSecretsRequest generates requests for V1ListAllSecrets
-func NewV1ListAllSecretsRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetPostgresConfigRequest generates requests for V1GetPostgresConfig
+func NewV1GetPostgresConfigRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5667,7 +5697,7 @@ func NewV1ListAllSecretsRequest(server string, ref string) (*http.Request, error
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/secrets", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/database/postgres", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5685,19 +5715,19 @@ func NewV1ListAllSecretsRequest(server string, ref string) (*http.Request, error
return req, nil
}
-// NewV1BulkCreateSecretsRequest calls the generic V1BulkCreateSecrets builder with application/json body
-func NewV1BulkCreateSecretsRequest(server string, ref string, body V1BulkCreateSecretsJSONRequestBody) (*http.Request, error) {
+// NewV1UpdatePostgresConfigRequest calls the generic V1UpdatePostgresConfig builder with application/json body
+func NewV1UpdatePostgresConfigRequest(server string, ref string, body V1UpdatePostgresConfigJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1BulkCreateSecretsRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1UpdatePostgresConfigRequestWithBody(server, ref, "application/json", bodyReader)
}
-// NewV1BulkCreateSecretsRequestWithBody generates requests for V1BulkCreateSecrets with any type of body
-func NewV1BulkCreateSecretsRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1UpdatePostgresConfigRequestWithBody generates requests for V1UpdatePostgresConfig with any type of body
+func NewV1UpdatePostgresConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5712,7 +5742,7 @@ func NewV1BulkCreateSecretsRequestWithBody(server string, ref string, contentTyp
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/secrets", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/database/postgres", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5722,7 +5752,7 @@ func NewV1BulkCreateSecretsRequestWithBody(server string, ref string, contentTyp
return nil, err
}
- req, err := http.NewRequest("POST", queryURL.String(), body)
+ req, err := http.NewRequest("PUT", queryURL.String(), body)
if err != nil {
return nil, err
}
@@ -5732,8 +5762,8 @@ func NewV1BulkCreateSecretsRequestWithBody(server string, ref string, contentTyp
return req, nil
}
-// NewV1GetSslEnforcementConfigRequest generates requests for V1GetSslEnforcementConfig
-func NewV1GetSslEnforcementConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetStorageConfigRequest generates requests for V1GetStorageConfig
+func NewV1GetStorageConfigRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5748,7 +5778,7 @@ func NewV1GetSslEnforcementConfigRequest(server string, ref string) (*http.Reque
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/ssl-enforcement", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/storage", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5766,19 +5796,19 @@ func NewV1GetSslEnforcementConfigRequest(server string, ref string) (*http.Reque
return req, nil
}
-// NewV1UpdateSslEnforcementConfigRequest calls the generic V1UpdateSslEnforcementConfig builder with application/json body
-func NewV1UpdateSslEnforcementConfigRequest(server string, ref string, body V1UpdateSslEnforcementConfigJSONRequestBody) (*http.Request, error) {
+// NewV1UpdateStorageConfigRequest calls the generic V1UpdateStorageConfig builder with application/json body
+func NewV1UpdateStorageConfigRequest(server string, ref string, body V1UpdateStorageConfigJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1UpdateSslEnforcementConfigRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1UpdateStorageConfigRequestWithBody(server, ref, "application/json", bodyReader)
}
-// NewV1UpdateSslEnforcementConfigRequestWithBody generates requests for V1UpdateSslEnforcementConfig with any type of body
-func NewV1UpdateSslEnforcementConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1UpdateStorageConfigRequestWithBody generates requests for V1UpdateStorageConfig with any type of body
+func NewV1UpdateStorageConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5793,7 +5823,7 @@ func NewV1UpdateSslEnforcementConfigRequestWithBody(server string, ref string, c
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/ssl-enforcement", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/config/storage", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5803,7 +5833,7 @@ func NewV1UpdateSslEnforcementConfigRequestWithBody(server string, ref string, c
return nil, err
}
- req, err := http.NewRequest("PUT", queryURL.String(), body)
+ req, err := http.NewRequest("PATCH", queryURL.String(), body)
if err != nil {
return nil, err
}
@@ -5813,8 +5843,8 @@ func NewV1UpdateSslEnforcementConfigRequestWithBody(server string, ref string, c
return req, nil
}
-// NewV1ListAllBucketsRequest generates requests for V1ListAllBuckets
-func NewV1ListAllBucketsRequest(server string, ref string) (*http.Request, error) {
+// NewV1DeleteHostnameConfigRequest generates requests for V1DeleteHostnameConfig
+func NewV1DeleteHostnameConfigRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5829,7 +5859,7 @@ func NewV1ListAllBucketsRequest(server string, ref string) (*http.Request, error
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/storage/buckets", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5839,7 +5869,7 @@ func NewV1ListAllBucketsRequest(server string, ref string) (*http.Request, error
return nil, err
}
- req, err := http.NewRequest("GET", queryURL.String(), nil)
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -5847,8 +5877,8 @@ func NewV1ListAllBucketsRequest(server string, ref string) (*http.Request, error
return req, nil
}
-// NewV1GenerateTypescriptTypesRequest generates requests for V1GenerateTypescriptTypes
-func NewV1GenerateTypescriptTypesRequest(server string, ref string, params *V1GenerateTypescriptTypesParams) (*http.Request, error) {
+// NewV1GetHostnameConfigRequest generates requests for V1GetHostnameConfig
+func NewV1GetHostnameConfigRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5863,7 +5893,7 @@ func NewV1GenerateTypescriptTypesRequest(server string, ref string, params *V1Ge
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/types/typescript", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5873,29 +5903,41 @@ func NewV1GenerateTypescriptTypesRequest(server string, ref string, params *V1Ge
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
- if params.IncludedSchemas != nil {
+ return req, nil
+}
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "included_schemas", runtime.ParamLocationQuery, *params.IncludedSchemas); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
+// NewV1ActivateCustomHostnameRequest generates requests for V1ActivateCustomHostname
+func NewV1ActivateCustomHostnameRequest(server string, ref string) (*http.Request, error) {
+ var err error
- }
+ var pathParam0 string
- queryURL.RawQuery = queryValues.Encode()
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
}
- req, err := http.NewRequest("GET", queryURL.String(), nil)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname/activate", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -5903,19 +5945,19 @@ func NewV1GenerateTypescriptTypesRequest(server string, ref string, params *V1Ge
return req, nil
}
-// NewV1UpgradePostgresVersionRequest calls the generic V1UpgradePostgresVersion builder with application/json body
-func NewV1UpgradePostgresVersionRequest(server string, ref string, body V1UpgradePostgresVersionJSONRequestBody) (*http.Request, error) {
+// NewV1UpdateHostnameConfigRequest calls the generic V1UpdateHostnameConfig builder with application/json body
+func NewV1UpdateHostnameConfigRequest(server string, ref string, body V1UpdateHostnameConfigJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1UpgradePostgresVersionRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1UpdateHostnameConfigRequestWithBody(server, ref, "application/json", bodyReader)
}
-// NewV1UpgradePostgresVersionRequestWithBody generates requests for V1UpgradePostgresVersion with any type of body
-func NewV1UpgradePostgresVersionRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1UpdateHostnameConfigRequestWithBody generates requests for V1UpdateHostnameConfig with any type of body
+func NewV1UpdateHostnameConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5930,7 +5972,7 @@ func NewV1UpgradePostgresVersionRequestWithBody(server string, ref string, conte
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/upgrade", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname/initialize", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5950,8 +5992,8 @@ func NewV1UpgradePostgresVersionRequestWithBody(server string, ref string, conte
return req, nil
}
-// NewV1GetPostgresUpgradeEligibilityRequest generates requests for V1GetPostgresUpgradeEligibility
-func NewV1GetPostgresUpgradeEligibilityRequest(server string, ref string) (*http.Request, error) {
+// NewV1VerifyDnsConfigRequest generates requests for V1VerifyDnsConfig
+func NewV1VerifyDnsConfigRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -5966,7 +6008,7 @@ func NewV1GetPostgresUpgradeEligibilityRequest(server string, ref string) (*http
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/upgrade/eligibility", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname/reverify", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -5976,7 +6018,7 @@ func NewV1GetPostgresUpgradeEligibilityRequest(server string, ref string) (*http
return nil, err
}
- req, err := http.NewRequest("GET", queryURL.String(), nil)
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
if err != nil {
return nil, err
}
@@ -5984,8 +6026,8 @@ func NewV1GetPostgresUpgradeEligibilityRequest(server string, ref string) (*http
return req, nil
}
-// NewV1GetPostgresUpgradeStatusRequest generates requests for V1GetPostgresUpgradeStatus
-func NewV1GetPostgresUpgradeStatusRequest(server string, ref string, params *V1GetPostgresUpgradeStatusParams) (*http.Request, error) {
+// NewV1ListAllBackupsRequest generates requests for V1ListAllBackups
+func NewV1ListAllBackupsRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
@@ -6000,7 +6042,7 @@ func NewV1GetPostgresUpgradeStatusRequest(server string, ref string, params *V1G
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/upgrade/status", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/backups", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -6010,28 +6052,6 @@ func NewV1GetPostgresUpgradeStatusRequest(server string, ref string, params *V1G
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
-
- if params.TrackingId != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tracking_id", runtime.ParamLocationQuery, *params.TrackingId); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- queryURL.RawQuery = queryValues.Encode()
- }
-
req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
@@ -6040,8 +6060,19 @@ func NewV1GetPostgresUpgradeStatusRequest(server string, ref string, params *V1G
return req, nil
}
-// NewV1DeactivateVanitySubdomainConfigRequest generates requests for V1DeactivateVanitySubdomainConfig
-func NewV1DeactivateVanitySubdomainConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1RestorePitrBackupRequest calls the generic V1RestorePitrBackup builder with application/json body
+func NewV1RestorePitrBackupRequest(server string, ref string, body V1RestorePitrBackupJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1RestorePitrBackupRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1RestorePitrBackupRequestWithBody generates requests for V1RestorePitrBackup with any type of body
+func NewV1RestorePitrBackupRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -6056,7 +6087,7 @@ func NewV1DeactivateVanitySubdomainConfigRequest(server string, ref string) (*ht
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/backups/restore-pitr", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -6066,16 +6097,18 @@ func NewV1DeactivateVanitySubdomainConfigRequest(server string, ref string) (*ht
return nil, err
}
- req, err := http.NewRequest("DELETE", queryURL.String(), nil)
+ req, err := http.NewRequest("POST", queryURL.String(), body)
if err != nil {
return nil, err
}
+ req.Header.Add("Content-Type", contentType)
+
return req, nil
}
-// NewV1GetVanitySubdomainConfigRequest generates requests for V1GetVanitySubdomainConfig
-func NewV1GetVanitySubdomainConfigRequest(server string, ref string) (*http.Request, error) {
+// NewV1GetRestorePointRequest generates requests for V1GetRestorePoint
+func NewV1GetRestorePointRequest(server string, ref string, params *V1GetRestorePointParams) (*http.Request, error) {
var err error
var pathParam0 string
@@ -6090,7 +6123,7 @@ func NewV1GetVanitySubdomainConfigRequest(server string, ref string) (*http.Requ
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/backups/restore-point", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -6100,6 +6133,28 @@ func NewV1GetVanitySubdomainConfigRequest(server string, ref string) (*http.Requ
return nil, err
}
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.Name != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name", runtime.ParamLocationQuery, *params.Name); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
@@ -6108,19 +6163,19 @@ func NewV1GetVanitySubdomainConfigRequest(server string, ref string) (*http.Requ
return req, nil
}
-// NewV1ActivateVanitySubdomainConfigRequest calls the generic V1ActivateVanitySubdomainConfig builder with application/json body
-func NewV1ActivateVanitySubdomainConfigRequest(server string, ref string, body V1ActivateVanitySubdomainConfigJSONRequestBody) (*http.Request, error) {
+// NewV1CreateRestorePointRequest calls the generic V1CreateRestorePoint builder with application/json body
+func NewV1CreateRestorePointRequest(server string, ref string, body V1CreateRestorePointJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1ActivateVanitySubdomainConfigRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1CreateRestorePointRequestWithBody(server, ref, "application/json", bodyReader)
}
-// NewV1ActivateVanitySubdomainConfigRequestWithBody generates requests for V1ActivateVanitySubdomainConfig with any type of body
-func NewV1ActivateVanitySubdomainConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1CreateRestorePointRequestWithBody generates requests for V1CreateRestorePoint with any type of body
+func NewV1CreateRestorePointRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -6135,7 +6190,7 @@ func NewV1ActivateVanitySubdomainConfigRequestWithBody(server string, ref string
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain/activate", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/backups/restore-point", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -6155,19 +6210,19 @@ func NewV1ActivateVanitySubdomainConfigRequestWithBody(server string, ref string
return req, nil
}
-// NewV1CheckVanitySubdomainAvailabilityRequest calls the generic V1CheckVanitySubdomainAvailability builder with application/json body
-func NewV1CheckVanitySubdomainAvailabilityRequest(server string, ref string, body V1CheckVanitySubdomainAvailabilityJSONRequestBody) (*http.Request, error) {
+// NewV1UndoRequest calls the generic V1Undo builder with application/json body
+func NewV1UndoRequest(server string, ref string, body V1UndoJSONRequestBody) (*http.Request, error) {
var bodyReader io.Reader
buf, err := json.Marshal(body)
if err != nil {
return nil, err
}
bodyReader = bytes.NewReader(buf)
- return NewV1CheckVanitySubdomainAvailabilityRequestWithBody(server, ref, "application/json", bodyReader)
+ return NewV1UndoRequestWithBody(server, ref, "application/json", bodyReader)
}
-// NewV1CheckVanitySubdomainAvailabilityRequestWithBody generates requests for V1CheckVanitySubdomainAvailability with any type of body
-func NewV1CheckVanitySubdomainAvailabilityRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+// NewV1UndoRequestWithBody generates requests for V1Undo with any type of body
+func NewV1UndoRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
var err error
var pathParam0 string
@@ -6182,7 +6237,7 @@ func NewV1CheckVanitySubdomainAvailabilityRequestWithBody(server string, ref str
return nil, err
}
- operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain/check-availability", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/backups/undo", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -6202,16 +6257,23 @@ func NewV1CheckVanitySubdomainAvailabilityRequestWithBody(server string, ref str
return req, nil
}
-// NewV1ListAllSnippetsRequest generates requests for V1ListAllSnippets
-func NewV1ListAllSnippetsRequest(server string, params *V1ListAllSnippetsParams) (*http.Request, error) {
+// NewV1GetDatabaseMetadataRequest generates requests for V1GetDatabaseMetadata
+func NewV1GetDatabaseMetadataRequest(server string, ref string) (*http.Request, error) {
var err error
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
serverURL, err := url.Parse(server)
if err != nil {
return nil, err
}
- operationPath := fmt.Sprintf("/v1/snippets")
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/context", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -6221,92 +6283,6 @@ func NewV1ListAllSnippetsRequest(server string, params *V1ListAllSnippetsParams)
return nil, err
}
- if params != nil {
- queryValues := queryURL.Query()
-
- if params.Cursor != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cursor", runtime.ParamLocationQuery, *params.Cursor); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.Limit != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.SortBy != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.SortOrder != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_order", runtime.ParamLocationQuery, *params.SortOrder); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- if params.ProjectRef != nil {
-
- if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project_ref", runtime.ParamLocationQuery, *params.ProjectRef); err != nil {
- return nil, err
- } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
- return nil, err
- } else {
- for k, v := range parsed {
- for _, v2 := range v {
- queryValues.Add(k, v2)
- }
- }
- }
-
- }
-
- queryURL.RawQuery = queryValues.Encode()
- }
-
req, err := http.NewRequest("GET", queryURL.String(), nil)
if err != nil {
return nil, err
@@ -6315,13 +6291,13 @@ func NewV1ListAllSnippetsRequest(server string, params *V1ListAllSnippetsParams)
return req, nil
}
-// NewV1GetASnippetRequest generates requests for V1GetASnippet
-func NewV1GetASnippetRequest(server string, id openapi_types.UUID) (*http.Request, error) {
+// NewV1GetJitAccessRequest generates requests for V1GetJitAccess
+func NewV1GetJitAccessRequest(server string, ref string) (*http.Request, error) {
var err error
var pathParam0 string
- pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
if err != nil {
return nil, err
}
@@ -6331,7 +6307,7 @@ func NewV1GetASnippetRequest(server string, id openapi_types.UUID) (*http.Reques
return nil, err
}
- operationPath := fmt.Sprintf("/v1/snippets/%s", pathParam0)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/jit", pathParam0)
if operationPath[0] == '/' {
operationPath = "." + operationPath
}
@@ -6349,408 +6325,4248 @@ func NewV1GetASnippetRequest(server string, id openapi_types.UUID) (*http.Reques
return req, nil
}
-func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
- for _, r := range c.RequestEditors {
- if err := r(ctx, req); err != nil {
- return err
- }
- }
- for _, r := range additionalEditors {
- if err := r(ctx, req); err != nil {
- return err
- }
+// NewV1UpdateJitAccessRequest calls the generic V1UpdateJitAccess builder with application/json body
+func NewV1UpdateJitAccessRequest(server string, ref string, body V1UpdateJitAccessJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
}
- return nil
+ bodyReader = bytes.NewReader(buf)
+ return NewV1UpdateJitAccessRequestWithBody(server, ref, "application/json", bodyReader)
}
-// ClientWithResponses builds on ClientInterface to offer response payloads
-type ClientWithResponses struct {
- ClientInterface
-}
+// NewV1UpdateJitAccessRequestWithBody generates requests for V1UpdateJitAccess with any type of body
+func NewV1UpdateJitAccessRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
-// NewClientWithResponses creates a new ClientWithResponses, which wraps
-// Client with return type handling
-func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) {
- client, err := NewClient(server, opts...)
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
if err != nil {
return nil, err
}
- return &ClientWithResponses{client}, nil
-}
-// WithBaseURL overrides the baseURL.
-func WithBaseURL(baseURL string) ClientOption {
- return func(c *Client) error {
- newBaseURL, err := url.Parse(baseURL)
- if err != nil {
- return err
- }
- c.Server = newBaseURL.String()
- return nil
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
}
-}
-
-// ClientWithResponsesInterface is the interface specification for the client with responses above.
-type ClientWithResponsesInterface interface {
- // V1DeleteABranchWithResponse request
- V1DeleteABranchWithResponse(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*V1DeleteABranchResponse, error)
- // V1GetABranchConfigWithResponse request
- V1GetABranchConfigWithResponse(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*V1GetABranchConfigResponse, error)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/jit", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- // V1UpdateABranchConfigWithBodyWithResponse request with any body
- V1UpdateABranchConfigWithBodyWithResponse(ctx context.Context, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateABranchConfigResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- V1UpdateABranchConfigWithResponse(ctx context.Context, branchId string, body V1UpdateABranchConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateABranchConfigResponse, error)
+ req, err := http.NewRequest("PUT", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
- // V1PushABranchWithResponse request
- V1PushABranchWithResponse(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*V1PushABranchResponse, error)
+ req.Header.Add("Content-Type", contentType)
- // V1ResetABranchWithResponse request
- V1ResetABranchWithResponse(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*V1ResetABranchResponse, error)
+ return req, nil
+}
- // V1AuthorizeUserWithResponse request
- V1AuthorizeUserWithResponse(ctx context.Context, params *V1AuthorizeUserParams, reqEditors ...RequestEditorFn) (*V1AuthorizeUserResponse, error)
+// NewV1ListJitAccessRequest generates requests for V1ListJitAccess
+func NewV1ListJitAccessRequest(server string, ref string) (*http.Request, error) {
+ var err error
- // V1RevokeTokenWithBodyWithResponse request with any body
- V1RevokeTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RevokeTokenResponse, error)
+ var pathParam0 string
- V1RevokeTokenWithResponse(ctx context.Context, body V1RevokeTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RevokeTokenResponse, error)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- // V1ExchangeOauthTokenWithBodyWithResponse request with any body
- V1ExchangeOauthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ExchangeOauthTokenResponse, error)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- V1ExchangeOauthTokenWithFormdataBodyWithResponse(ctx context.Context, body V1ExchangeOauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*V1ExchangeOauthTokenResponse, error)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/jit/list", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- // V1ListAllOrganizationsWithResponse request
- V1ListAllOrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*V1ListAllOrganizationsResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- // V1CreateAnOrganizationWithBodyWithResponse request with any body
- V1CreateAnOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAnOrganizationResponse, error)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
- V1CreateAnOrganizationWithResponse(ctx context.Context, body V1CreateAnOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAnOrganizationResponse, error)
+ return req, nil
+}
- // V1GetAnOrganizationWithResponse request
- V1GetAnOrganizationWithResponse(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*V1GetAnOrganizationResponse, error)
+// NewV1DeleteJitAccessRequest generates requests for V1DeleteJitAccess
+func NewV1DeleteJitAccessRequest(server string, ref string, userId openapi_types.UUID) (*http.Request, error) {
+ var err error
- // V1ListOrganizationMembersWithResponse request
- V1ListOrganizationMembersWithResponse(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*V1ListOrganizationMembersResponse, error)
+ var pathParam0 string
- // V1ListAllProjectsWithResponse request
- V1ListAllProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*V1ListAllProjectsResponse, error)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- // V1CreateAProjectWithBodyWithResponse request with any body
- V1CreateAProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error)
+ var pathParam1 string
- V1CreateAProjectWithResponse(ctx context.Context, body V1CreateAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error)
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "user_id", runtime.ParamLocationPath, userId)
+ if err != nil {
+ return nil, err
+ }
- // V1DeleteAProjectWithResponse request
- V1DeleteAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteAProjectResponse, error)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- // V1GetProjectWithResponse request
- V1GetProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectResponse, error)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/jit/%s", pathParam0, pathParam1)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- // GetLogsWithResponse request
- GetLogsWithResponse(ctx context.Context, ref string, params *GetLogsParams, reqEditors ...RequestEditorFn) (*GetLogsResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- // V1GetProjectApiKeysWithResponse request
- V1GetProjectApiKeysWithResponse(ctx context.Context, ref string, params *V1GetProjectApiKeysParams, reqEditors ...RequestEditorFn) (*V1GetProjectApiKeysResponse, error)
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
- // CreateApiKeyWithBodyWithResponse request with any body
- CreateApiKeyWithBodyWithResponse(ctx context.Context, ref string, params *CreateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)
+ return req, nil
+}
- CreateApiKeyWithResponse(ctx context.Context, ref string, params *CreateApiKeyParams, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error)
+// NewV1ListMigrationHistoryRequest generates requests for V1ListMigrationHistory
+func NewV1ListMigrationHistoryRequest(server string, ref string) (*http.Request, error) {
+ var err error
- // DeleteApiKeyWithResponse request
- DeleteApiKeyWithResponse(ctx context.Context, ref string, id string, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error)
+ var pathParam0 string
- // GetApiKeyWithResponse request
- GetApiKeyWithResponse(ctx context.Context, ref string, id string, params *GetApiKeyParams, reqEditors ...RequestEditorFn) (*GetApiKeyResponse, error)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- // UpdateApiKeyWithBodyWithResponse request with any body
- UpdateApiKeyWithBodyWithResponse(ctx context.Context, ref string, id string, params *UpdateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- UpdateApiKeyWithResponse(ctx context.Context, ref string, id string, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/migrations", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- // V1DisablePreviewBranchingWithResponse request
- V1DisablePreviewBranchingWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisablePreviewBranchingResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- // V1ListAllBranchesWithResponse request
- V1ListAllBranchesWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBranchesResponse, error)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
- // V1CreateABranchWithBodyWithResponse request with any body
- V1CreateABranchWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateABranchResponse, error)
+ return req, nil
+}
- V1CreateABranchWithResponse(ctx context.Context, ref string, body V1CreateABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateABranchResponse, error)
+// NewV1ApplyAMigrationRequest calls the generic V1ApplyAMigration builder with application/json body
+func NewV1ApplyAMigrationRequest(server string, ref string, params *V1ApplyAMigrationParams, body V1ApplyAMigrationJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1ApplyAMigrationRequestWithBody(server, ref, params, "application/json", bodyReader)
+}
- // V1GetAuthServiceConfigWithResponse request
- V1GetAuthServiceConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetAuthServiceConfigResponse, error)
+// NewV1ApplyAMigrationRequestWithBody generates requests for V1ApplyAMigration with any type of body
+func NewV1ApplyAMigrationRequestWithBody(server string, ref string, params *V1ApplyAMigrationParams, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
- // V1UpdateAuthServiceConfigWithBodyWithResponse request with any body
- V1UpdateAuthServiceConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateAuthServiceConfigResponse, error)
+ var pathParam0 string
- V1UpdateAuthServiceConfigWithResponse(ctx context.Context, ref string, body V1UpdateAuthServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateAuthServiceConfigResponse, error)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- // V1ListAllSsoProviderWithResponse request
- V1ListAllSsoProviderWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllSsoProviderResponse, error)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- // V1CreateASsoProviderWithBodyWithResponse request with any body
- V1CreateASsoProviderWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateASsoProviderResponse, error)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/migrations", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- V1CreateASsoProviderWithResponse(ctx context.Context, ref string, body V1CreateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateASsoProviderResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- // V1DeleteASsoProviderWithResponse request
- V1DeleteASsoProviderWithResponse(ctx context.Context, ref string, providerId string, reqEditors ...RequestEditorFn) (*V1DeleteASsoProviderResponse, error)
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
- // V1GetASsoProviderWithResponse request
- V1GetASsoProviderWithResponse(ctx context.Context, ref string, providerId string, reqEditors ...RequestEditorFn) (*V1GetASsoProviderResponse, error)
+ req.Header.Add("Content-Type", contentType)
- // V1UpdateASsoProviderWithBodyWithResponse request with any body
- V1UpdateASsoProviderWithBodyWithResponse(ctx context.Context, ref string, providerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateASsoProviderResponse, error)
+ if params != nil {
- V1UpdateASsoProviderWithResponse(ctx context.Context, ref string, providerId string, body V1UpdateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateASsoProviderResponse, error)
+ if params.IdempotencyKey != nil {
+ var headerParam0 string
- // ListTPAForProjectWithResponse request
- ListTPAForProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*ListTPAForProjectResponse, error)
+ headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Idempotency-Key", runtime.ParamLocationHeader, *params.IdempotencyKey)
+ if err != nil {
+ return nil, err
+ }
- // CreateTPAForProjectWithBodyWithResponse request with any body
- CreateTPAForProjectWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTPAForProjectResponse, error)
+ req.Header.Set("Idempotency-Key", headerParam0)
+ }
- CreateTPAForProjectWithResponse(ctx context.Context, ref string, body CreateTPAForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTPAForProjectResponse, error)
+ }
- // DeleteTPAForProjectWithResponse request
- DeleteTPAForProjectWithResponse(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*DeleteTPAForProjectResponse, error)
+ return req, nil
+}
- // GetTPAForProjectWithResponse request
- GetTPAForProjectWithResponse(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*GetTPAForProjectResponse, error)
+// NewV1UpsertAMigrationRequest calls the generic V1UpsertAMigration builder with application/json body
+func NewV1UpsertAMigrationRequest(server string, ref string, params *V1UpsertAMigrationParams, body V1UpsertAMigrationJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1UpsertAMigrationRequestWithBody(server, ref, params, "application/json", bodyReader)
+}
- // V1GetProjectPgbouncerConfigWithResponse request
- V1GetProjectPgbouncerConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectPgbouncerConfigResponse, error)
+// NewV1UpsertAMigrationRequestWithBody generates requests for V1UpsertAMigration with any type of body
+func NewV1UpsertAMigrationRequestWithBody(server string, ref string, params *V1UpsertAMigrationParams, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
- // V1GetSupavisorConfigWithResponse request
- V1GetSupavisorConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetSupavisorConfigResponse, error)
+ var pathParam0 string
- // V1UpdateSupavisorConfigWithBodyWithResponse request with any body
- V1UpdateSupavisorConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateSupavisorConfigResponse, error)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- V1UpdateSupavisorConfigWithResponse(ctx context.Context, ref string, body V1UpdateSupavisorConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateSupavisorConfigResponse, error)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- // V1GetPostgresConfigWithResponse request
- V1GetPostgresConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgresConfigResponse, error)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/migrations", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- // V1UpdatePostgresConfigWithBodyWithResponse request with any body
- V1UpdatePostgresConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- V1UpdatePostgresConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgresConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error)
+ req, err := http.NewRequest("PUT", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
- // V1GetStorageConfigWithResponse request
- V1GetStorageConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetStorageConfigResponse, error)
+ req.Header.Add("Content-Type", contentType)
- // V1UpdateStorageConfigWithBodyWithResponse request with any body
- V1UpdateStorageConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error)
+ if params != nil {
- V1UpdateStorageConfigWithResponse(ctx context.Context, ref string, body V1UpdateStorageConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error)
+ if params.IdempotencyKey != nil {
+ var headerParam0 string
- // V1DeleteHostnameConfigWithResponse request
- V1DeleteHostnameConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteHostnameConfigResponse, error)
+ headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Idempotency-Key", runtime.ParamLocationHeader, *params.IdempotencyKey)
+ if err != nil {
+ return nil, err
+ }
- // V1GetHostnameConfigWithResponse request
- V1GetHostnameConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetHostnameConfigResponse, error)
+ req.Header.Set("Idempotency-Key", headerParam0)
+ }
- // V1ActivateCustomHostnameWithResponse request
- V1ActivateCustomHostnameWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ActivateCustomHostnameResponse, error)
+ }
- // V1UpdateHostnameConfigWithBodyWithResponse request with any body
- V1UpdateHostnameConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error)
+ return req, nil
+}
- V1UpdateHostnameConfigWithResponse(ctx context.Context, ref string, body V1UpdateHostnameConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error)
+// NewV1RunAQueryRequest calls the generic V1RunAQuery builder with application/json body
+func NewV1RunAQueryRequest(server string, ref string, body V1RunAQueryJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1RunAQueryRequestWithBody(server, ref, "application/json", bodyReader)
+}
- // V1VerifyDnsConfigWithResponse request
- V1VerifyDnsConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1VerifyDnsConfigResponse, error)
+// NewV1RunAQueryRequestWithBody generates requests for V1RunAQuery with any type of body
+func NewV1RunAQueryRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
- // V1ListAllBackupsWithResponse request
- V1ListAllBackupsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBackupsResponse, error)
+ var pathParam0 string
- // V1RestorePitrBackupWithBodyWithResponse request with any body
- V1RestorePitrBackupWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- V1RestorePitrBackupWithResponse(ctx context.Context, ref string, body V1RestorePitrBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- // GetDatabaseMetadataWithResponse request
- GetDatabaseMetadataWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetDatabaseMetadataResponse, error)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/query", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- // V1RunAQueryWithBodyWithResponse request with any body
- V1RunAQueryWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- V1RunAQueryWithResponse(ctx context.Context, ref string, body V1RunAQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error)
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
- // V1EnableDatabaseWebhookWithResponse request
- V1EnableDatabaseWebhookWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1EnableDatabaseWebhookResponse, error)
+ req.Header.Add("Content-Type", contentType)
- // V1ListAllFunctionsWithResponse request
- V1ListAllFunctionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllFunctionsResponse, error)
+ return req, nil
+}
- // V1CreateAFunctionWithBodyWithResponse request with any body
- V1CreateAFunctionWithBodyWithResponse(ctx context.Context, ref string, params *V1CreateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAFunctionResponse, error)
+// NewV1EnableDatabaseWebhookRequest generates requests for V1EnableDatabaseWebhook
+func NewV1EnableDatabaseWebhookRequest(server string, ref string) (*http.Request, error) {
+ var err error
- V1CreateAFunctionWithResponse(ctx context.Context, ref string, params *V1CreateAFunctionParams, body V1CreateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAFunctionResponse, error)
+ var pathParam0 string
- // V1BulkUpdateFunctionsWithBodyWithResponse request with any body
- V1BulkUpdateFunctionsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkUpdateFunctionsResponse, error)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- V1BulkUpdateFunctionsWithResponse(ctx context.Context, ref string, body V1BulkUpdateFunctionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkUpdateFunctionsResponse, error)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- // V1DeployAFunctionWithBodyWithResponse request with any body
- V1DeployAFunctionWithBodyWithResponse(ctx context.Context, ref string, params *V1DeployAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1DeployAFunctionResponse, error)
+ operationPath := fmt.Sprintf("/v1/projects/%s/database/webhooks/enable", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- // V1DeleteAFunctionWithResponse request
- V1DeleteAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1DeleteAFunctionResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- // V1GetAFunctionWithResponse request
- V1GetAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1GetAFunctionResponse, error)
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
- // V1UpdateAFunctionWithBodyWithResponse request with any body
- V1UpdateAFunctionWithBodyWithResponse(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateAFunctionResponse, error)
+ return req, nil
+}
- V1UpdateAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, body V1UpdateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateAFunctionResponse, error)
+// NewV1ListAllFunctionsRequest generates requests for V1ListAllFunctions
+func NewV1ListAllFunctionsRequest(server string, ref string) (*http.Request, error) {
+ var err error
- // V1GetAFunctionBodyWithResponse request
- V1GetAFunctionBodyWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1GetAFunctionBodyResponse, error)
+ var pathParam0 string
- // V1GetServicesHealthWithResponse request
- V1GetServicesHealthWithResponse(ctx context.Context, ref string, params *V1GetServicesHealthParams, reqEditors ...RequestEditorFn) (*V1GetServicesHealthResponse, error)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- // V1DeleteNetworkBansWithBodyWithResponse request with any body
- V1DeleteNetworkBansWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1DeleteNetworkBansResponse, error)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- V1DeleteNetworkBansWithResponse(ctx context.Context, ref string, body V1DeleteNetworkBansJSONRequestBody, reqEditors ...RequestEditorFn) (*V1DeleteNetworkBansResponse, error)
+ operationPath := fmt.Sprintf("/v1/projects/%s/functions", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- // V1ListAllNetworkBansWithResponse request
- V1ListAllNetworkBansWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllNetworkBansResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- // V1GetNetworkRestrictionsWithResponse request
- V1GetNetworkRestrictionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetNetworkRestrictionsResponse, error)
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
- // V1UpdateNetworkRestrictionsWithBodyWithResponse request with any body
- V1UpdateNetworkRestrictionsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateNetworkRestrictionsResponse, error)
+ return req, nil
+}
- V1UpdateNetworkRestrictionsWithResponse(ctx context.Context, ref string, body V1UpdateNetworkRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateNetworkRestrictionsResponse, error)
+// NewV1CreateAFunctionRequest calls the generic V1CreateAFunction builder with application/json body
+func NewV1CreateAFunctionRequest(server string, ref string, params *V1CreateAFunctionParams, body V1CreateAFunctionJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1CreateAFunctionRequestWithBody(server, ref, params, "application/json", bodyReader)
+}
- // V1PauseAProjectWithResponse request
- V1PauseAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1PauseAProjectResponse, error)
+// NewV1CreateAFunctionRequestWithBody generates requests for V1CreateAFunction with any type of body
+func NewV1CreateAFunctionRequestWithBody(server string, ref string, params *V1CreateAFunctionParams, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
- // V1GetPgsodiumConfigWithResponse request
- V1GetPgsodiumConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPgsodiumConfigResponse, error)
+ var pathParam0 string
- // V1UpdatePgsodiumConfigWithBodyWithResponse request with any body
- V1UpdatePgsodiumConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePgsodiumConfigResponse, error)
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
- V1UpdatePgsodiumConfigWithResponse(ctx context.Context, ref string, body V1UpdatePgsodiumConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePgsodiumConfigResponse, error)
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
- // V1GetPostgrestServiceConfigWithResponse request
- V1GetPostgrestServiceConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgrestServiceConfigResponse, error)
+ operationPath := fmt.Sprintf("/v1/projects/%s/functions", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
- // V1UpdatePostgrestServiceConfigWithBodyWithResponse request with any body
- V1UpdatePostgrestServiceConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePostgrestServiceConfigResponse, error)
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
- V1UpdatePostgrestServiceConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgrestServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgrestServiceConfigResponse, error)
+ if params != nil {
+ queryValues := queryURL.Query()
- // V1RemoveAReadReplicaWithBodyWithResponse request with any body
- V1RemoveAReadReplicaWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RemoveAReadReplicaResponse, error)
+ if params.Slug != nil {
- V1RemoveAReadReplicaWithResponse(ctx context.Context, ref string, body V1RemoveAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RemoveAReadReplicaResponse, error)
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "slug", runtime.ParamLocationQuery, *params.Slug); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
- // V1SetupAReadReplicaWithBodyWithResponse request with any body
- V1SetupAReadReplicaWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1SetupAReadReplicaResponse, error)
+ }
- V1SetupAReadReplicaWithResponse(ctx context.Context, ref string, body V1SetupAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*V1SetupAReadReplicaResponse, error)
+ if params.Name != nil {
- // V1GetReadonlyModeStatusWithResponse request
- V1GetReadonlyModeStatusWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetReadonlyModeStatusResponse, error)
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name", runtime.ParamLocationQuery, *params.Name); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
- // V1DisableReadonlyModeTemporarilyWithResponse request
- V1DisableReadonlyModeTemporarilyWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisableReadonlyModeTemporarilyResponse, error)
+ }
- // V1ListAvailableRestoreVersionsWithResponse request
- V1ListAvailableRestoreVersionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAvailableRestoreVersionsResponse, error)
+ if params.VerifyJwt != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "verify_jwt", runtime.ParamLocationQuery, *params.VerifyJwt); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.ImportMap != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "import_map", runtime.ParamLocationQuery, *params.ImportMap); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.EntrypointPath != nil {
- // V1RestoreAProjectWithBodyWithResponse request with any body
- V1RestoreAProjectWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RestoreAProjectResponse, error)
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "entrypoint_path", runtime.ParamLocationQuery, *params.EntrypointPath); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.ImportMapPath != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "import_map_path", runtime.ParamLocationQuery, *params.ImportMapPath); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.EzbrSha256 != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ezbr_sha256", runtime.ParamLocationQuery, *params.EzbrSha256); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1BulkUpdateFunctionsRequest calls the generic V1BulkUpdateFunctions builder with application/json body
+func NewV1BulkUpdateFunctionsRequest(server string, ref string, body V1BulkUpdateFunctionsJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1BulkUpdateFunctionsRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1BulkUpdateFunctionsRequestWithBody generates requests for V1BulkUpdateFunctions with any type of body
+func NewV1BulkUpdateFunctionsRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/functions", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("PUT", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1DeployAFunctionRequestWithBody generates requests for V1DeployAFunction with any type of body
+func NewV1DeployAFunctionRequestWithBody(server string, ref string, params *V1DeployAFunctionParams, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/functions/deploy", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.Slug != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "slug", runtime.ParamLocationQuery, *params.Slug); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.BundleOnly != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "bundleOnly", runtime.ParamLocationQuery, *params.BundleOnly); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1DeleteAFunctionRequest generates requests for V1DeleteAFunction
+func NewV1DeleteAFunctionRequest(server string, ref string, functionSlug string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "function_slug", runtime.ParamLocationPath, functionSlug)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s", pathParam0, pathParam1)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1GetAFunctionRequest generates requests for V1GetAFunction
+func NewV1GetAFunctionRequest(server string, ref string, functionSlug string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "function_slug", runtime.ParamLocationPath, functionSlug)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s", pathParam0, pathParam1)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1UpdateAFunctionRequest calls the generic V1UpdateAFunction builder with application/json body
+func NewV1UpdateAFunctionRequest(server string, ref string, functionSlug string, params *V1UpdateAFunctionParams, body V1UpdateAFunctionJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1UpdateAFunctionRequestWithBody(server, ref, functionSlug, params, "application/json", bodyReader)
+}
+
+// NewV1UpdateAFunctionRequestWithBody generates requests for V1UpdateAFunction with any type of body
+func NewV1UpdateAFunctionRequestWithBody(server string, ref string, functionSlug string, params *V1UpdateAFunctionParams, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "function_slug", runtime.ParamLocationPath, functionSlug)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s", pathParam0, pathParam1)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.Slug != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "slug", runtime.ParamLocationQuery, *params.Slug); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.Name != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name", runtime.ParamLocationQuery, *params.Name); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.VerifyJwt != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "verify_jwt", runtime.ParamLocationQuery, *params.VerifyJwt); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.ImportMap != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "import_map", runtime.ParamLocationQuery, *params.ImportMap); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.EntrypointPath != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "entrypoint_path", runtime.ParamLocationQuery, *params.EntrypointPath); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.ImportMapPath != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "import_map_path", runtime.ParamLocationQuery, *params.ImportMapPath); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.EzbrSha256 != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ezbr_sha256", runtime.ParamLocationQuery, *params.EzbrSha256); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("PATCH", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1GetAFunctionBodyRequest generates requests for V1GetAFunctionBody
+func NewV1GetAFunctionBodyRequest(server string, ref string, functionSlug string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ var pathParam1 string
+
+ pathParam1, err = runtime.StyleParamWithLocation("simple", false, "function_slug", runtime.ParamLocationPath, functionSlug)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s/body", pathParam0, pathParam1)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1GetServicesHealthRequest generates requests for V1GetServicesHealth
+func NewV1GetServicesHealthRequest(server string, ref string, params *V1GetServicesHealthParams) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/health", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "services", runtime.ParamLocationQuery, params.Services); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ if params.TimeoutMs != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "timeout_ms", runtime.ParamLocationQuery, *params.TimeoutMs); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1DeleteNetworkBansRequest calls the generic V1DeleteNetworkBans builder with application/json body
+func NewV1DeleteNetworkBansRequest(server string, ref string, body V1DeleteNetworkBansJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1DeleteNetworkBansRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1DeleteNetworkBansRequestWithBody generates requests for V1DeleteNetworkBans with any type of body
+func NewV1DeleteNetworkBansRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/network-bans", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("DELETE", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1ListAllNetworkBansRequest generates requests for V1ListAllNetworkBans
+func NewV1ListAllNetworkBansRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/network-bans/retrieve", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1ListAllNetworkBansEnrichedRequest generates requests for V1ListAllNetworkBansEnriched
+func NewV1ListAllNetworkBansEnrichedRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/network-bans/retrieve/enriched", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1GetNetworkRestrictionsRequest generates requests for V1GetNetworkRestrictions
+func NewV1GetNetworkRestrictionsRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/network-restrictions", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1UpdateNetworkRestrictionsRequest calls the generic V1UpdateNetworkRestrictions builder with application/json body
+func NewV1UpdateNetworkRestrictionsRequest(server string, ref string, body V1UpdateNetworkRestrictionsJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1UpdateNetworkRestrictionsRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1UpdateNetworkRestrictionsRequestWithBody generates requests for V1UpdateNetworkRestrictions with any type of body
+func NewV1UpdateNetworkRestrictionsRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/network-restrictions/apply", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1PauseAProjectRequest generates requests for V1PauseAProject
+func NewV1PauseAProjectRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/pause", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1GetPgsodiumConfigRequest generates requests for V1GetPgsodiumConfig
+func NewV1GetPgsodiumConfigRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/pgsodium", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1UpdatePgsodiumConfigRequest calls the generic V1UpdatePgsodiumConfig builder with application/json body
+func NewV1UpdatePgsodiumConfigRequest(server string, ref string, body V1UpdatePgsodiumConfigJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1UpdatePgsodiumConfigRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1UpdatePgsodiumConfigRequestWithBody generates requests for V1UpdatePgsodiumConfig with any type of body
+func NewV1UpdatePgsodiumConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/pgsodium", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("PUT", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1GetPostgrestServiceConfigRequest generates requests for V1GetPostgrestServiceConfig
+func NewV1GetPostgrestServiceConfigRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/postgrest", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1UpdatePostgrestServiceConfigRequest calls the generic V1UpdatePostgrestServiceConfig builder with application/json body
+func NewV1UpdatePostgrestServiceConfigRequest(server string, ref string, body V1UpdatePostgrestServiceConfigJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1UpdatePostgrestServiceConfigRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1UpdatePostgrestServiceConfigRequestWithBody generates requests for V1UpdatePostgrestServiceConfig with any type of body
+func NewV1UpdatePostgrestServiceConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/postgrest", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("PATCH", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1RemoveAReadReplicaRequest calls the generic V1RemoveAReadReplica builder with application/json body
+func NewV1RemoveAReadReplicaRequest(server string, ref string, body V1RemoveAReadReplicaJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1RemoveAReadReplicaRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1RemoveAReadReplicaRequestWithBody generates requests for V1RemoveAReadReplica with any type of body
+func NewV1RemoveAReadReplicaRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/read-replicas/remove", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1SetupAReadReplicaRequest calls the generic V1SetupAReadReplica builder with application/json body
+func NewV1SetupAReadReplicaRequest(server string, ref string, body V1SetupAReadReplicaJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1SetupAReadReplicaRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1SetupAReadReplicaRequestWithBody generates requests for V1SetupAReadReplica with any type of body
+func NewV1SetupAReadReplicaRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/read-replicas/setup", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1GetReadonlyModeStatusRequest generates requests for V1GetReadonlyModeStatus
+func NewV1GetReadonlyModeStatusRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/readonly", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1DisableReadonlyModeTemporarilyRequest generates requests for V1DisableReadonlyModeTemporarily
+func NewV1DisableReadonlyModeTemporarilyRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/readonly/temporary-disable", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1ListAvailableRestoreVersionsRequest generates requests for V1ListAvailableRestoreVersions
+func NewV1ListAvailableRestoreVersionsRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/restore", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1RestoreAProjectRequest generates requests for V1RestoreAProject
+func NewV1RestoreAProjectRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/restore", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1CancelAProjectRestorationRequest generates requests for V1CancelAProjectRestoration
+func NewV1CancelAProjectRestorationRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/restore/cancel", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1BulkDeleteSecretsRequest calls the generic V1BulkDeleteSecrets builder with application/json body
+func NewV1BulkDeleteSecretsRequest(server string, ref string, body V1BulkDeleteSecretsJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1BulkDeleteSecretsRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1BulkDeleteSecretsRequestWithBody generates requests for V1BulkDeleteSecrets with any type of body
+func NewV1BulkDeleteSecretsRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/secrets", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("DELETE", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1ListAllSecretsRequest generates requests for V1ListAllSecrets
+func NewV1ListAllSecretsRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/secrets", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1BulkCreateSecretsRequest calls the generic V1BulkCreateSecrets builder with application/json body
+func NewV1BulkCreateSecretsRequest(server string, ref string, body V1BulkCreateSecretsJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1BulkCreateSecretsRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1BulkCreateSecretsRequestWithBody generates requests for V1BulkCreateSecrets with any type of body
+func NewV1BulkCreateSecretsRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/secrets", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1GetSslEnforcementConfigRequest generates requests for V1GetSslEnforcementConfig
+func NewV1GetSslEnforcementConfigRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/ssl-enforcement", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1UpdateSslEnforcementConfigRequest calls the generic V1UpdateSslEnforcementConfig builder with application/json body
+func NewV1UpdateSslEnforcementConfigRequest(server string, ref string, body V1UpdateSslEnforcementConfigJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1UpdateSslEnforcementConfigRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1UpdateSslEnforcementConfigRequestWithBody generates requests for V1UpdateSslEnforcementConfig with any type of body
+func NewV1UpdateSslEnforcementConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/ssl-enforcement", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("PUT", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1ListAllBucketsRequest generates requests for V1ListAllBuckets
+func NewV1ListAllBucketsRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/storage/buckets", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1GenerateTypescriptTypesRequest generates requests for V1GenerateTypescriptTypes
+func NewV1GenerateTypescriptTypesRequest(server string, ref string, params *V1GenerateTypescriptTypesParams) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/types/typescript", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.IncludedSchemas != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "included_schemas", runtime.ParamLocationQuery, *params.IncludedSchemas); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1UpgradePostgresVersionRequest calls the generic V1UpgradePostgresVersion builder with application/json body
+func NewV1UpgradePostgresVersionRequest(server string, ref string, body V1UpgradePostgresVersionJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1UpgradePostgresVersionRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1UpgradePostgresVersionRequestWithBody generates requests for V1UpgradePostgresVersion with any type of body
+func NewV1UpgradePostgresVersionRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/upgrade", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1GetPostgresUpgradeEligibilityRequest generates requests for V1GetPostgresUpgradeEligibility
+func NewV1GetPostgresUpgradeEligibilityRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/upgrade/eligibility", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1GetPostgresUpgradeStatusRequest generates requests for V1GetPostgresUpgradeStatus
+func NewV1GetPostgresUpgradeStatusRequest(server string, ref string, params *V1GetPostgresUpgradeStatusParams) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/upgrade/status", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.TrackingId != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tracking_id", runtime.ParamLocationQuery, *params.TrackingId); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1DeactivateVanitySubdomainConfigRequest generates requests for V1DeactivateVanitySubdomainConfig
+func NewV1DeactivateVanitySubdomainConfigRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("DELETE", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1GetVanitySubdomainConfigRequest generates requests for V1GetVanitySubdomainConfig
+func NewV1GetVanitySubdomainConfigRequest(server string, ref string) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1ActivateVanitySubdomainConfigRequest calls the generic V1ActivateVanitySubdomainConfig builder with application/json body
+func NewV1ActivateVanitySubdomainConfigRequest(server string, ref string, body V1ActivateVanitySubdomainConfigJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1ActivateVanitySubdomainConfigRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1ActivateVanitySubdomainConfigRequestWithBody generates requests for V1ActivateVanitySubdomainConfig with any type of body
+func NewV1ActivateVanitySubdomainConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain/activate", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1CheckVanitySubdomainAvailabilityRequest calls the generic V1CheckVanitySubdomainAvailability builder with application/json body
+func NewV1CheckVanitySubdomainAvailabilityRequest(server string, ref string, body V1CheckVanitySubdomainAvailabilityJSONRequestBody) (*http.Request, error) {
+ var bodyReader io.Reader
+ buf, err := json.Marshal(body)
+ if err != nil {
+ return nil, err
+ }
+ bodyReader = bytes.NewReader(buf)
+ return NewV1CheckVanitySubdomainAvailabilityRequestWithBody(server, ref, "application/json", bodyReader)
+}
+
+// NewV1CheckVanitySubdomainAvailabilityRequestWithBody generates requests for V1CheckVanitySubdomainAvailability with any type of body
+func NewV1CheckVanitySubdomainAvailabilityRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain/check-availability", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("POST", queryURL.String(), body)
+ if err != nil {
+ return nil, err
+ }
+
+ req.Header.Add("Content-Type", contentType)
+
+ return req, nil
+}
+
+// NewV1ListAllSnippetsRequest generates requests for V1ListAllSnippets
+func NewV1ListAllSnippetsRequest(server string, params *V1ListAllSnippetsParams) (*http.Request, error) {
+ var err error
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/snippets")
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ if params != nil {
+ queryValues := queryURL.Query()
+
+ if params.ProjectRef != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project_ref", runtime.ParamLocationQuery, *params.ProjectRef); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.Cursor != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "cursor", runtime.ParamLocationQuery, *params.Cursor); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.Limit != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.SortBy != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_by", runtime.ParamLocationQuery, *params.SortBy); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ if params.SortOrder != nil {
+
+ if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort_order", runtime.ParamLocationQuery, *params.SortOrder); err != nil {
+ return nil, err
+ } else if parsed, err := url.ParseQuery(queryFrag); err != nil {
+ return nil, err
+ } else {
+ for k, v := range parsed {
+ for _, v2 := range v {
+ queryValues.Add(k, v2)
+ }
+ }
+ }
+
+ }
+
+ queryURL.RawQuery = queryValues.Encode()
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+// NewV1GetASnippetRequest generates requests for V1GetASnippet
+func NewV1GetASnippetRequest(server string, id openapi_types.UUID) (*http.Request, error) {
+ var err error
+
+ var pathParam0 string
+
+ pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id)
+ if err != nil {
+ return nil, err
+ }
+
+ serverURL, err := url.Parse(server)
+ if err != nil {
+ return nil, err
+ }
+
+ operationPath := fmt.Sprintf("/v1/snippets/%s", pathParam0)
+ if operationPath[0] == '/' {
+ operationPath = "." + operationPath
+ }
+
+ queryURL, err := serverURL.Parse(operationPath)
+ if err != nil {
+ return nil, err
+ }
+
+ req, err := http.NewRequest("GET", queryURL.String(), nil)
+ if err != nil {
+ return nil, err
+ }
+
+ return req, nil
+}
+
+func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
+ for _, r := range c.RequestEditors {
+ if err := r(ctx, req); err != nil {
+ return err
+ }
+ }
+ for _, r := range additionalEditors {
+ if err := r(ctx, req); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// ClientWithResponses builds on ClientInterface to offer response payloads
+type ClientWithResponses struct {
+ ClientInterface
+}
+
+// NewClientWithResponses creates a new ClientWithResponses, which wraps
+// Client with return type handling
+func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) {
+ client, err := NewClient(server, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return &ClientWithResponses{client}, nil
+}
+
+// WithBaseURL overrides the baseURL.
+func WithBaseURL(baseURL string) ClientOption {
+ return func(c *Client) error {
+ newBaseURL, err := url.Parse(baseURL)
+ if err != nil {
+ return err
+ }
+ c.Server = newBaseURL.String()
+ return nil
+ }
+}
+
+// ClientWithResponsesInterface is the interface specification for the client with responses above.
+type ClientWithResponsesInterface interface {
+ // V1DeleteABranchWithResponse request
+ V1DeleteABranchWithResponse(ctx context.Context, branchId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1DeleteABranchResponse, error)
+
+ // V1GetABranchConfigWithResponse request
+ V1GetABranchConfigWithResponse(ctx context.Context, branchId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetABranchConfigResponse, error)
+
+ // V1UpdateABranchConfigWithBodyWithResponse request with any body
+ V1UpdateABranchConfigWithBodyWithResponse(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateABranchConfigResponse, error)
+
+ V1UpdateABranchConfigWithResponse(ctx context.Context, branchId openapi_types.UUID, body V1UpdateABranchConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateABranchConfigResponse, error)
+
+ // V1DiffABranchWithResponse request
+ V1DiffABranchWithResponse(ctx context.Context, branchId openapi_types.UUID, params *V1DiffABranchParams, reqEditors ...RequestEditorFn) (*V1DiffABranchResponse, error)
+
+ // V1MergeABranchWithBodyWithResponse request with any body
+ V1MergeABranchWithBodyWithResponse(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1MergeABranchResponse, error)
+
+ V1MergeABranchWithResponse(ctx context.Context, branchId openapi_types.UUID, body V1MergeABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1MergeABranchResponse, error)
+
+ // V1PushABranchWithBodyWithResponse request with any body
+ V1PushABranchWithBodyWithResponse(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1PushABranchResponse, error)
+
+ V1PushABranchWithResponse(ctx context.Context, branchId openapi_types.UUID, body V1PushABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1PushABranchResponse, error)
+
+ // V1ResetABranchWithBodyWithResponse request with any body
+ V1ResetABranchWithBodyWithResponse(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ResetABranchResponse, error)
+
+ V1ResetABranchWithResponse(ctx context.Context, branchId openapi_types.UUID, body V1ResetABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ResetABranchResponse, error)
+
+ // V1AuthorizeUserWithResponse request
+ V1AuthorizeUserWithResponse(ctx context.Context, params *V1AuthorizeUserParams, reqEditors ...RequestEditorFn) (*V1AuthorizeUserResponse, error)
+
+ // V1OauthAuthorizeProjectClaimWithResponse request
+ V1OauthAuthorizeProjectClaimWithResponse(ctx context.Context, params *V1OauthAuthorizeProjectClaimParams, reqEditors ...RequestEditorFn) (*V1OauthAuthorizeProjectClaimResponse, error)
+
+ // V1RevokeTokenWithBodyWithResponse request with any body
+ V1RevokeTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RevokeTokenResponse, error)
+
+ V1RevokeTokenWithResponse(ctx context.Context, body V1RevokeTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RevokeTokenResponse, error)
+
+ // V1ExchangeOauthTokenWithBodyWithResponse request with any body
+ V1ExchangeOauthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ExchangeOauthTokenResponse, error)
+
+ V1ExchangeOauthTokenWithFormdataBodyWithResponse(ctx context.Context, body V1ExchangeOauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*V1ExchangeOauthTokenResponse, error)
+
+ // V1ListAllOrganizationsWithResponse request
+ V1ListAllOrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*V1ListAllOrganizationsResponse, error)
+
+ // V1CreateAnOrganizationWithBodyWithResponse request with any body
+ V1CreateAnOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAnOrganizationResponse, error)
+
+ V1CreateAnOrganizationWithResponse(ctx context.Context, body V1CreateAnOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAnOrganizationResponse, error)
+
+ // V1GetAnOrganizationWithResponse request
+ V1GetAnOrganizationWithResponse(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*V1GetAnOrganizationResponse, error)
+
+ // V1ListOrganizationMembersWithResponse request
+ V1ListOrganizationMembersWithResponse(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*V1ListOrganizationMembersResponse, error)
+
+ // V1GetOrganizationProjectClaimWithResponse request
+ V1GetOrganizationProjectClaimWithResponse(ctx context.Context, slug string, token string, reqEditors ...RequestEditorFn) (*V1GetOrganizationProjectClaimResponse, error)
+
+ // V1ClaimProjectForOrganizationWithResponse request
+ V1ClaimProjectForOrganizationWithResponse(ctx context.Context, slug string, token string, reqEditors ...RequestEditorFn) (*V1ClaimProjectForOrganizationResponse, error)
+
+ // V1ListAllProjectsWithResponse request
+ V1ListAllProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*V1ListAllProjectsResponse, error)
+
+ // V1CreateAProjectWithBodyWithResponse request with any body
+ V1CreateAProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error)
+
+ V1CreateAProjectWithResponse(ctx context.Context, body V1CreateAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error)
+
+ // V1DeleteAProjectWithResponse request
+ V1DeleteAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteAProjectResponse, error)
+
+ // V1GetProjectWithResponse request
+ V1GetProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectResponse, error)
+
+ // V1GetPerformanceAdvisorsWithResponse request
+ V1GetPerformanceAdvisorsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPerformanceAdvisorsResponse, error)
+
+ // V1GetSecurityAdvisorsWithResponse request
+ V1GetSecurityAdvisorsWithResponse(ctx context.Context, ref string, params *V1GetSecurityAdvisorsParams, reqEditors ...RequestEditorFn) (*V1GetSecurityAdvisorsResponse, error)
+
+ // V1GetProjectLogsWithResponse request
+ V1GetProjectLogsWithResponse(ctx context.Context, ref string, params *V1GetProjectLogsParams, reqEditors ...RequestEditorFn) (*V1GetProjectLogsResponse, error)
+
+ // V1GetProjectUsageApiCountWithResponse request
+ V1GetProjectUsageApiCountWithResponse(ctx context.Context, ref string, params *V1GetProjectUsageApiCountParams, reqEditors ...RequestEditorFn) (*V1GetProjectUsageApiCountResponse, error)
+
+ // V1GetProjectUsageRequestCountWithResponse request
+ V1GetProjectUsageRequestCountWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectUsageRequestCountResponse, error)
+
+ // V1GetProjectApiKeysWithResponse request
+ V1GetProjectApiKeysWithResponse(ctx context.Context, ref string, params *V1GetProjectApiKeysParams, reqEditors ...RequestEditorFn) (*V1GetProjectApiKeysResponse, error)
+
+ // V1CreateProjectApiKeyWithBodyWithResponse request with any body
+ V1CreateProjectApiKeyWithBodyWithResponse(ctx context.Context, ref string, params *V1CreateProjectApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateProjectApiKeyResponse, error)
+
+ V1CreateProjectApiKeyWithResponse(ctx context.Context, ref string, params *V1CreateProjectApiKeyParams, body V1CreateProjectApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateProjectApiKeyResponse, error)
+
+ // V1GetProjectLegacyApiKeysWithResponse request
+ V1GetProjectLegacyApiKeysWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectLegacyApiKeysResponse, error)
+
+ // V1UpdateProjectLegacyApiKeysWithResponse request
+ V1UpdateProjectLegacyApiKeysWithResponse(ctx context.Context, ref string, params *V1UpdateProjectLegacyApiKeysParams, reqEditors ...RequestEditorFn) (*V1UpdateProjectLegacyApiKeysResponse, error)
+
+ // V1DeleteProjectApiKeyWithResponse request
+ V1DeleteProjectApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *V1DeleteProjectApiKeyParams, reqEditors ...RequestEditorFn) (*V1DeleteProjectApiKeyResponse, error)
+
+ // V1GetProjectApiKeyWithResponse request
+ V1GetProjectApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *V1GetProjectApiKeyParams, reqEditors ...RequestEditorFn) (*V1GetProjectApiKeyResponse, error)
+
+ // V1UpdateProjectApiKeyWithBodyWithResponse request with any body
+ V1UpdateProjectApiKeyWithBodyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *V1UpdateProjectApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateProjectApiKeyResponse, error)
+
+ V1UpdateProjectApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *V1UpdateProjectApiKeyParams, body V1UpdateProjectApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateProjectApiKeyResponse, error)
+
+ // V1ListProjectAddonsWithResponse request
+ V1ListProjectAddonsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListProjectAddonsResponse, error)
+
+ // V1ApplyProjectAddonWithBodyWithResponse request with any body
+ V1ApplyProjectAddonWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ApplyProjectAddonResponse, error)
+
+ V1ApplyProjectAddonWithResponse(ctx context.Context, ref string, body V1ApplyProjectAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ApplyProjectAddonResponse, error)
+
+ // V1RemoveProjectAddonWithResponse request
+ V1RemoveProjectAddonWithResponse(ctx context.Context, ref string, addonVariant interface{}, reqEditors ...RequestEditorFn) (*V1RemoveProjectAddonResponse, error)
+
+ // V1DisablePreviewBranchingWithResponse request
+ V1DisablePreviewBranchingWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisablePreviewBranchingResponse, error)
+
+ // V1ListAllBranchesWithResponse request
+ V1ListAllBranchesWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBranchesResponse, error)
+
+ // V1CreateABranchWithBodyWithResponse request with any body
+ V1CreateABranchWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateABranchResponse, error)
+
+ V1CreateABranchWithResponse(ctx context.Context, ref string, body V1CreateABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateABranchResponse, error)
+
+ // V1GetABranchWithResponse request
+ V1GetABranchWithResponse(ctx context.Context, ref string, name string, reqEditors ...RequestEditorFn) (*V1GetABranchResponse, error)
+
+ // V1DeleteProjectClaimTokenWithResponse request
+ V1DeleteProjectClaimTokenWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteProjectClaimTokenResponse, error)
+
+ // V1GetProjectClaimTokenWithResponse request
+ V1GetProjectClaimTokenWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectClaimTokenResponse, error)
+
+ // V1CreateProjectClaimTokenWithResponse request
+ V1CreateProjectClaimTokenWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CreateProjectClaimTokenResponse, error)
+
+ // V1GetAuthServiceConfigWithResponse request
+ V1GetAuthServiceConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetAuthServiceConfigResponse, error)
+
+ // V1UpdateAuthServiceConfigWithBodyWithResponse request with any body
+ V1UpdateAuthServiceConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateAuthServiceConfigResponse, error)
+
+ V1UpdateAuthServiceConfigWithResponse(ctx context.Context, ref string, body V1UpdateAuthServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateAuthServiceConfigResponse, error)
+
+ // V1GetProjectSigningKeysWithResponse request
+ V1GetProjectSigningKeysWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectSigningKeysResponse, error)
+
+ // V1CreateProjectSigningKeyWithBodyWithResponse request with any body
+ V1CreateProjectSigningKeyWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateProjectSigningKeyResponse, error)
+
+ V1CreateProjectSigningKeyWithResponse(ctx context.Context, ref string, body V1CreateProjectSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateProjectSigningKeyResponse, error)
+
+ // V1GetLegacySigningKeyWithResponse request
+ V1GetLegacySigningKeyWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetLegacySigningKeyResponse, error)
+
+ // V1CreateLegacySigningKeyWithResponse request
+ V1CreateLegacySigningKeyWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CreateLegacySigningKeyResponse, error)
+
+ // V1RemoveProjectSigningKeyWithResponse request
+ V1RemoveProjectSigningKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1RemoveProjectSigningKeyResponse, error)
+
+ // V1GetProjectSigningKeyWithResponse request
+ V1GetProjectSigningKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetProjectSigningKeyResponse, error)
+
+ // V1UpdateProjectSigningKeyWithBodyWithResponse request with any body
+ V1UpdateProjectSigningKeyWithBodyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateProjectSigningKeyResponse, error)
+
+ V1UpdateProjectSigningKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, body V1UpdateProjectSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateProjectSigningKeyResponse, error)
+
+ // V1ListAllSsoProviderWithResponse request
+ V1ListAllSsoProviderWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllSsoProviderResponse, error)
+
+ // V1CreateASsoProviderWithBodyWithResponse request with any body
+ V1CreateASsoProviderWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateASsoProviderResponse, error)
+
+ V1CreateASsoProviderWithResponse(ctx context.Context, ref string, body V1CreateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateASsoProviderResponse, error)
+
+ // V1DeleteASsoProviderWithResponse request
+ V1DeleteASsoProviderWithResponse(ctx context.Context, ref string, providerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1DeleteASsoProviderResponse, error)
+
+ // V1GetASsoProviderWithResponse request
+ V1GetASsoProviderWithResponse(ctx context.Context, ref string, providerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetASsoProviderResponse, error)
+
+ // V1UpdateASsoProviderWithBodyWithResponse request with any body
+ V1UpdateASsoProviderWithBodyWithResponse(ctx context.Context, ref string, providerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateASsoProviderResponse, error)
+
+ V1UpdateASsoProviderWithResponse(ctx context.Context, ref string, providerId openapi_types.UUID, body V1UpdateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateASsoProviderResponse, error)
+
+ // V1ListProjectTpaIntegrationsWithResponse request
+ V1ListProjectTpaIntegrationsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListProjectTpaIntegrationsResponse, error)
+
+ // V1CreateProjectTpaIntegrationWithBodyWithResponse request with any body
+ V1CreateProjectTpaIntegrationWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateProjectTpaIntegrationResponse, error)
+
+ V1CreateProjectTpaIntegrationWithResponse(ctx context.Context, ref string, body V1CreateProjectTpaIntegrationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateProjectTpaIntegrationResponse, error)
+
+ // V1DeleteProjectTpaIntegrationWithResponse request
+ V1DeleteProjectTpaIntegrationWithResponse(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1DeleteProjectTpaIntegrationResponse, error)
+
+ // V1GetProjectTpaIntegrationWithResponse request
+ V1GetProjectTpaIntegrationWithResponse(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetProjectTpaIntegrationResponse, error)
+
+ // V1GetProjectPgbouncerConfigWithResponse request
+ V1GetProjectPgbouncerConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectPgbouncerConfigResponse, error)
+
+ // V1GetPoolerConfigWithResponse request
+ V1GetPoolerConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPoolerConfigResponse, error)
+
+ // V1UpdatePoolerConfigWithBodyWithResponse request with any body
+ V1UpdatePoolerConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePoolerConfigResponse, error)
+
+ V1UpdatePoolerConfigWithResponse(ctx context.Context, ref string, body V1UpdatePoolerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePoolerConfigResponse, error)
+
+ // V1GetPostgresConfigWithResponse request
+ V1GetPostgresConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgresConfigResponse, error)
+
+ // V1UpdatePostgresConfigWithBodyWithResponse request with any body
+ V1UpdatePostgresConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error)
+
+ V1UpdatePostgresConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgresConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error)
+
+ // V1GetStorageConfigWithResponse request
+ V1GetStorageConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetStorageConfigResponse, error)
+
+ // V1UpdateStorageConfigWithBodyWithResponse request with any body
+ V1UpdateStorageConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error)
+
+ V1UpdateStorageConfigWithResponse(ctx context.Context, ref string, body V1UpdateStorageConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error)
+
+ // V1DeleteHostnameConfigWithResponse request
+ V1DeleteHostnameConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteHostnameConfigResponse, error)
+
+ // V1GetHostnameConfigWithResponse request
+ V1GetHostnameConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetHostnameConfigResponse, error)
+
+ // V1ActivateCustomHostnameWithResponse request
+ V1ActivateCustomHostnameWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ActivateCustomHostnameResponse, error)
+
+ // V1UpdateHostnameConfigWithBodyWithResponse request with any body
+ V1UpdateHostnameConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error)
+
+ V1UpdateHostnameConfigWithResponse(ctx context.Context, ref string, body V1UpdateHostnameConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error)
+
+ // V1VerifyDnsConfigWithResponse request
+ V1VerifyDnsConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1VerifyDnsConfigResponse, error)
+
+ // V1ListAllBackupsWithResponse request
+ V1ListAllBackupsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBackupsResponse, error)
+
+ // V1RestorePitrBackupWithBodyWithResponse request with any body
+ V1RestorePitrBackupWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error)
+
+ V1RestorePitrBackupWithResponse(ctx context.Context, ref string, body V1RestorePitrBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error)
+
+ // V1GetRestorePointWithResponse request
+ V1GetRestorePointWithResponse(ctx context.Context, ref string, params *V1GetRestorePointParams, reqEditors ...RequestEditorFn) (*V1GetRestorePointResponse, error)
+
+ // V1CreateRestorePointWithBodyWithResponse request with any body
+ V1CreateRestorePointWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateRestorePointResponse, error)
+
+ V1CreateRestorePointWithResponse(ctx context.Context, ref string, body V1CreateRestorePointJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateRestorePointResponse, error)
+
+ // V1UndoWithBodyWithResponse request with any body
+ V1UndoWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UndoResponse, error)
+
+ V1UndoWithResponse(ctx context.Context, ref string, body V1UndoJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UndoResponse, error)
+
+ // V1GetDatabaseMetadataWithResponse request
+ V1GetDatabaseMetadataWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetDatabaseMetadataResponse, error)
+
+ // V1GetJitAccessWithResponse request
+ V1GetJitAccessWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetJitAccessResponse, error)
+
+ // V1UpdateJitAccessWithBodyWithResponse request with any body
+ V1UpdateJitAccessWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateJitAccessResponse, error)
+
+ V1UpdateJitAccessWithResponse(ctx context.Context, ref string, body V1UpdateJitAccessJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateJitAccessResponse, error)
+
+ // V1ListJitAccessWithResponse request
+ V1ListJitAccessWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListJitAccessResponse, error)
+
+ // V1DeleteJitAccessWithResponse request
+ V1DeleteJitAccessWithResponse(ctx context.Context, ref string, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1DeleteJitAccessResponse, error)
+
+ // V1ListMigrationHistoryWithResponse request
+ V1ListMigrationHistoryWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListMigrationHistoryResponse, error)
+
+ // V1ApplyAMigrationWithBodyWithResponse request with any body
+ V1ApplyAMigrationWithBodyWithResponse(ctx context.Context, ref string, params *V1ApplyAMigrationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ApplyAMigrationResponse, error)
+
+ V1ApplyAMigrationWithResponse(ctx context.Context, ref string, params *V1ApplyAMigrationParams, body V1ApplyAMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ApplyAMigrationResponse, error)
+
+ // V1UpsertAMigrationWithBodyWithResponse request with any body
+ V1UpsertAMigrationWithBodyWithResponse(ctx context.Context, ref string, params *V1UpsertAMigrationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpsertAMigrationResponse, error)
+
+ V1UpsertAMigrationWithResponse(ctx context.Context, ref string, params *V1UpsertAMigrationParams, body V1UpsertAMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpsertAMigrationResponse, error)
+
+ // V1RunAQueryWithBodyWithResponse request with any body
+ V1RunAQueryWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error)
+
+ V1RunAQueryWithResponse(ctx context.Context, ref string, body V1RunAQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error)
+
+ // V1EnableDatabaseWebhookWithResponse request
+ V1EnableDatabaseWebhookWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1EnableDatabaseWebhookResponse, error)
+
+ // V1ListAllFunctionsWithResponse request
+ V1ListAllFunctionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllFunctionsResponse, error)
+
+ // V1CreateAFunctionWithBodyWithResponse request with any body
+ V1CreateAFunctionWithBodyWithResponse(ctx context.Context, ref string, params *V1CreateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAFunctionResponse, error)
+
+ V1CreateAFunctionWithResponse(ctx context.Context, ref string, params *V1CreateAFunctionParams, body V1CreateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAFunctionResponse, error)
+
+ // V1BulkUpdateFunctionsWithBodyWithResponse request with any body
+ V1BulkUpdateFunctionsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkUpdateFunctionsResponse, error)
+
+ V1BulkUpdateFunctionsWithResponse(ctx context.Context, ref string, body V1BulkUpdateFunctionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkUpdateFunctionsResponse, error)
+
+ // V1DeployAFunctionWithBodyWithResponse request with any body
+ V1DeployAFunctionWithBodyWithResponse(ctx context.Context, ref string, params *V1DeployAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1DeployAFunctionResponse, error)
+
+ // V1DeleteAFunctionWithResponse request
+ V1DeleteAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1DeleteAFunctionResponse, error)
+
+ // V1GetAFunctionWithResponse request
+ V1GetAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1GetAFunctionResponse, error)
+
+ // V1UpdateAFunctionWithBodyWithResponse request with any body
+ V1UpdateAFunctionWithBodyWithResponse(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateAFunctionResponse, error)
+
+ V1UpdateAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, body V1UpdateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateAFunctionResponse, error)
+
+ // V1GetAFunctionBodyWithResponse request
+ V1GetAFunctionBodyWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1GetAFunctionBodyResponse, error)
+
+ // V1GetServicesHealthWithResponse request
+ V1GetServicesHealthWithResponse(ctx context.Context, ref string, params *V1GetServicesHealthParams, reqEditors ...RequestEditorFn) (*V1GetServicesHealthResponse, error)
+
+ // V1DeleteNetworkBansWithBodyWithResponse request with any body
+ V1DeleteNetworkBansWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1DeleteNetworkBansResponse, error)
+
+ V1DeleteNetworkBansWithResponse(ctx context.Context, ref string, body V1DeleteNetworkBansJSONRequestBody, reqEditors ...RequestEditorFn) (*V1DeleteNetworkBansResponse, error)
+
+ // V1ListAllNetworkBansWithResponse request
+ V1ListAllNetworkBansWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllNetworkBansResponse, error)
+
+ // V1ListAllNetworkBansEnrichedWithResponse request
+ V1ListAllNetworkBansEnrichedWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllNetworkBansEnrichedResponse, error)
+
+ // V1GetNetworkRestrictionsWithResponse request
+ V1GetNetworkRestrictionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetNetworkRestrictionsResponse, error)
+
+ // V1UpdateNetworkRestrictionsWithBodyWithResponse request with any body
+ V1UpdateNetworkRestrictionsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateNetworkRestrictionsResponse, error)
+
+ V1UpdateNetworkRestrictionsWithResponse(ctx context.Context, ref string, body V1UpdateNetworkRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateNetworkRestrictionsResponse, error)
+
+ // V1PauseAProjectWithResponse request
+ V1PauseAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1PauseAProjectResponse, error)
+
+ // V1GetPgsodiumConfigWithResponse request
+ V1GetPgsodiumConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPgsodiumConfigResponse, error)
+
+ // V1UpdatePgsodiumConfigWithBodyWithResponse request with any body
+ V1UpdatePgsodiumConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePgsodiumConfigResponse, error)
+
+ V1UpdatePgsodiumConfigWithResponse(ctx context.Context, ref string, body V1UpdatePgsodiumConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePgsodiumConfigResponse, error)
+
+ // V1GetPostgrestServiceConfigWithResponse request
+ V1GetPostgrestServiceConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgrestServiceConfigResponse, error)
+
+ // V1UpdatePostgrestServiceConfigWithBodyWithResponse request with any body
+ V1UpdatePostgrestServiceConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePostgrestServiceConfigResponse, error)
+
+ V1UpdatePostgrestServiceConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgrestServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgrestServiceConfigResponse, error)
+
+ // V1RemoveAReadReplicaWithBodyWithResponse request with any body
+ V1RemoveAReadReplicaWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RemoveAReadReplicaResponse, error)
+
+ V1RemoveAReadReplicaWithResponse(ctx context.Context, ref string, body V1RemoveAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RemoveAReadReplicaResponse, error)
+
+ // V1SetupAReadReplicaWithBodyWithResponse request with any body
+ V1SetupAReadReplicaWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1SetupAReadReplicaResponse, error)
+
+ V1SetupAReadReplicaWithResponse(ctx context.Context, ref string, body V1SetupAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*V1SetupAReadReplicaResponse, error)
+
+ // V1GetReadonlyModeStatusWithResponse request
+ V1GetReadonlyModeStatusWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetReadonlyModeStatusResponse, error)
+
+ // V1DisableReadonlyModeTemporarilyWithResponse request
+ V1DisableReadonlyModeTemporarilyWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisableReadonlyModeTemporarilyResponse, error)
+
+ // V1ListAvailableRestoreVersionsWithResponse request
+ V1ListAvailableRestoreVersionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAvailableRestoreVersionsResponse, error)
+
+ // V1RestoreAProjectWithResponse request
+ V1RestoreAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1RestoreAProjectResponse, error)
+
+ // V1CancelAProjectRestorationWithResponse request
+ V1CancelAProjectRestorationWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CancelAProjectRestorationResponse, error)
+
+ // V1BulkDeleteSecretsWithBodyWithResponse request with any body
+ V1BulkDeleteSecretsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkDeleteSecretsResponse, error)
+
+ V1BulkDeleteSecretsWithResponse(ctx context.Context, ref string, body V1BulkDeleteSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkDeleteSecretsResponse, error)
+
+ // V1ListAllSecretsWithResponse request
+ V1ListAllSecretsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllSecretsResponse, error)
+
+ // V1BulkCreateSecretsWithBodyWithResponse request with any body
+ V1BulkCreateSecretsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkCreateSecretsResponse, error)
+
+ V1BulkCreateSecretsWithResponse(ctx context.Context, ref string, body V1BulkCreateSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkCreateSecretsResponse, error)
+
+ // V1GetSslEnforcementConfigWithResponse request
+ V1GetSslEnforcementConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetSslEnforcementConfigResponse, error)
+
+ // V1UpdateSslEnforcementConfigWithBodyWithResponse request with any body
+ V1UpdateSslEnforcementConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateSslEnforcementConfigResponse, error)
+
+ V1UpdateSslEnforcementConfigWithResponse(ctx context.Context, ref string, body V1UpdateSslEnforcementConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateSslEnforcementConfigResponse, error)
+
+ // V1ListAllBucketsWithResponse request
+ V1ListAllBucketsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBucketsResponse, error)
+
+ // V1GenerateTypescriptTypesWithResponse request
+ V1GenerateTypescriptTypesWithResponse(ctx context.Context, ref string, params *V1GenerateTypescriptTypesParams, reqEditors ...RequestEditorFn) (*V1GenerateTypescriptTypesResponse, error)
+
+ // V1UpgradePostgresVersionWithBodyWithResponse request with any body
+ V1UpgradePostgresVersionWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpgradePostgresVersionResponse, error)
+
+ V1UpgradePostgresVersionWithResponse(ctx context.Context, ref string, body V1UpgradePostgresVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpgradePostgresVersionResponse, error)
+
+ // V1GetPostgresUpgradeEligibilityWithResponse request
+ V1GetPostgresUpgradeEligibilityWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgresUpgradeEligibilityResponse, error)
+
+ // V1GetPostgresUpgradeStatusWithResponse request
+ V1GetPostgresUpgradeStatusWithResponse(ctx context.Context, ref string, params *V1GetPostgresUpgradeStatusParams, reqEditors ...RequestEditorFn) (*V1GetPostgresUpgradeStatusResponse, error)
+
+ // V1DeactivateVanitySubdomainConfigWithResponse request
+ V1DeactivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeactivateVanitySubdomainConfigResponse, error)
+
+ // V1GetVanitySubdomainConfigWithResponse request
+ V1GetVanitySubdomainConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetVanitySubdomainConfigResponse, error)
+
+ // V1ActivateVanitySubdomainConfigWithBodyWithResponse request with any body
+ V1ActivateVanitySubdomainConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ActivateVanitySubdomainConfigResponse, error)
+
+ V1ActivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, body V1ActivateVanitySubdomainConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ActivateVanitySubdomainConfigResponse, error)
+
+ // V1CheckVanitySubdomainAvailabilityWithBodyWithResponse request with any body
+ V1CheckVanitySubdomainAvailabilityWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CheckVanitySubdomainAvailabilityResponse, error)
+
+ V1CheckVanitySubdomainAvailabilityWithResponse(ctx context.Context, ref string, body V1CheckVanitySubdomainAvailabilityJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CheckVanitySubdomainAvailabilityResponse, error)
+
+ // V1ListAllSnippetsWithResponse request
+ V1ListAllSnippetsWithResponse(ctx context.Context, params *V1ListAllSnippetsParams, reqEditors ...RequestEditorFn) (*V1ListAllSnippetsResponse, error)
+
+ // V1GetASnippetWithResponse request
+ V1GetASnippetWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetASnippetResponse, error)
+}
+
+type V1DeleteABranchResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *BranchDeleteResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1DeleteABranchResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1DeleteABranchResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetABranchConfigResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *BranchDetailResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetABranchConfigResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetABranchConfigResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1UpdateABranchConfigResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *BranchResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1UpdateABranchConfigResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1UpdateABranchConfigResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1DiffABranchResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+}
+
+// Status returns HTTPResponse.Status
+func (r V1DiffABranchResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1DiffABranchResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1MergeABranchResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *BranchUpdateResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1MergeABranchResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1MergeABranchResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1PushABranchResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *BranchUpdateResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1PushABranchResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1PushABranchResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1ResetABranchResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *BranchUpdateResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1ResetABranchResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ResetABranchResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1AuthorizeUserResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+}
+
+// Status returns HTTPResponse.Status
+func (r V1AuthorizeUserResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1AuthorizeUserResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1OauthAuthorizeProjectClaimResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+}
+
+// Status returns HTTPResponse.Status
+func (r V1OauthAuthorizeProjectClaimResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1OauthAuthorizeProjectClaimResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1RevokeTokenResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+}
+
+// Status returns HTTPResponse.Status
+func (r V1RevokeTokenResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1RevokeTokenResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1ExchangeOauthTokenResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *OAuthTokenResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1ExchangeOauthTokenResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ExchangeOauthTokenResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1ListAllOrganizationsResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *[]OrganizationResponseV1
+}
+
+// Status returns HTTPResponse.Status
+func (r V1ListAllOrganizationsResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ListAllOrganizationsResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1CreateAnOrganizationResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *OrganizationResponseV1
+}
+
+// Status returns HTTPResponse.Status
+func (r V1CreateAnOrganizationResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1CreateAnOrganizationResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetAnOrganizationResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *V1OrganizationSlugResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetAnOrganizationResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetAnOrganizationResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1ListOrganizationMembersResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *[]V1OrganizationMemberResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1ListOrganizationMembersResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ListOrganizationMembersResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetOrganizationProjectClaimResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *OrganizationProjectClaimResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetOrganizationProjectClaimResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetOrganizationProjectClaimResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1ClaimProjectForOrganizationResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+}
+
+// Status returns HTTPResponse.Status
+func (r V1ClaimProjectForOrganizationResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ClaimProjectForOrganizationResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1ListAllProjectsResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *[]V1ProjectWithDatabaseResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1ListAllProjectsResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ListAllProjectsResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1CreateAProjectResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *V1ProjectResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1CreateAProjectResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1CreateAProjectResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1DeleteAProjectResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *V1ProjectRefResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1DeleteAProjectResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1DeleteAProjectResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetProjectResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *V1ProjectWithDatabaseResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetProjectResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetProjectResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetPerformanceAdvisorsResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *V1ProjectAdvisorsResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetPerformanceAdvisorsResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetPerformanceAdvisorsResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetSecurityAdvisorsResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *V1ProjectAdvisorsResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetSecurityAdvisorsResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetSecurityAdvisorsResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetProjectLogsResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *AnalyticsResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetProjectLogsResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetProjectLogsResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetProjectUsageApiCountResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *AnalyticsResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetProjectUsageApiCountResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetProjectUsageApiCountResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetProjectUsageRequestCountResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *AnalyticsResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetProjectUsageRequestCountResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetProjectUsageRequestCountResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetProjectApiKeysResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *[]ApiKeyResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetProjectApiKeysResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetProjectApiKeysResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1CreateProjectApiKeyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *ApiKeyResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1CreateProjectApiKeyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1CreateProjectApiKeyResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetProjectLegacyApiKeysResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *LegacyApiKeysResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetProjectLegacyApiKeysResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetProjectLegacyApiKeysResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1UpdateProjectLegacyApiKeysResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *LegacyApiKeysResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1UpdateProjectLegacyApiKeysResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1UpdateProjectLegacyApiKeysResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1DeleteProjectApiKeyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *ApiKeyResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1DeleteProjectApiKeyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1DeleteProjectApiKeyResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetProjectApiKeyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *ApiKeyResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetProjectApiKeyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetProjectApiKeyResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1UpdateProjectApiKeyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *ApiKeyResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1UpdateProjectApiKeyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1UpdateProjectApiKeyResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1ListProjectAddonsResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *ListProjectAddonsResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1ListProjectAddonsResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ListProjectAddonsResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1ApplyProjectAddonResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+}
+
+// Status returns HTTPResponse.Status
+func (r V1ApplyProjectAddonResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ApplyProjectAddonResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1RemoveProjectAddonResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+}
+
+// Status returns HTTPResponse.Status
+func (r V1RemoveProjectAddonResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1RemoveProjectAddonResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1DisablePreviewBranchingResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+}
+
+// Status returns HTTPResponse.Status
+func (r V1DisablePreviewBranchingResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1DisablePreviewBranchingResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1ListAllBranchesResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *[]BranchResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1ListAllBranchesResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ListAllBranchesResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1CreateABranchResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *BranchResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1CreateABranchResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1CreateABranchResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetABranchResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *BranchResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetABranchResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetABranchResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1DeleteProjectClaimTokenResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+}
+
+// Status returns HTTPResponse.Status
+func (r V1DeleteProjectClaimTokenResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1DeleteProjectClaimTokenResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetProjectClaimTokenResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *ProjectClaimTokenResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetProjectClaimTokenResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetProjectClaimTokenResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1CreateProjectClaimTokenResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *CreateProjectClaimTokenResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1CreateProjectClaimTokenResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1CreateProjectClaimTokenResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetAuthServiceConfigResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *AuthConfigResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetAuthServiceConfigResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetAuthServiceConfigResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1UpdateAuthServiceConfigResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *AuthConfigResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1UpdateAuthServiceConfigResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1UpdateAuthServiceConfigResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetProjectSigningKeysResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *SigningKeysResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetProjectSigningKeysResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetProjectSigningKeysResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1CreateProjectSigningKeyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *SigningKeyResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1CreateProjectSigningKeyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1CreateProjectSigningKeyResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1GetLegacySigningKeyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *SigningKeyResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1GetLegacySigningKeyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetLegacySigningKeyResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1CreateLegacySigningKeyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *SigningKeyResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1CreateLegacySigningKeyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1CreateLegacySigningKeyResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
+
+type V1RemoveProjectSigningKeyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *SigningKeyResponse
+}
+
+// Status returns HTTPResponse.Status
+func (r V1RemoveProjectSigningKeyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
+
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1RemoveProjectSigningKeyResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
- V1RestoreAProjectWithResponse(ctx context.Context, ref string, body V1RestoreAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RestoreAProjectResponse, error)
+type V1GetProjectSigningKeyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *SigningKeyResponse
+}
- // V1CancelAProjectRestorationWithResponse request
- V1CancelAProjectRestorationWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CancelAProjectRestorationResponse, error)
+// Status returns HTTPResponse.Status
+func (r V1GetProjectSigningKeyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
- // V1BulkDeleteSecretsWithBodyWithResponse request with any body
- V1BulkDeleteSecretsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkDeleteSecretsResponse, error)
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetProjectSigningKeyResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
- V1BulkDeleteSecretsWithResponse(ctx context.Context, ref string, body V1BulkDeleteSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkDeleteSecretsResponse, error)
+type V1UpdateProjectSigningKeyResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *SigningKeyResponse
+}
- // V1ListAllSecretsWithResponse request
- V1ListAllSecretsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllSecretsResponse, error)
+// Status returns HTTPResponse.Status
+func (r V1UpdateProjectSigningKeyResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
- // V1BulkCreateSecretsWithBodyWithResponse request with any body
- V1BulkCreateSecretsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkCreateSecretsResponse, error)
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1UpdateProjectSigningKeyResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
- V1BulkCreateSecretsWithResponse(ctx context.Context, ref string, body V1BulkCreateSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkCreateSecretsResponse, error)
+type V1ListAllSsoProviderResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *ListProvidersResponse
+}
- // V1GetSslEnforcementConfigWithResponse request
- V1GetSslEnforcementConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetSslEnforcementConfigResponse, error)
+// Status returns HTTPResponse.Status
+func (r V1ListAllSsoProviderResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
- // V1UpdateSslEnforcementConfigWithBodyWithResponse request with any body
- V1UpdateSslEnforcementConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateSslEnforcementConfigResponse, error)
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ListAllSsoProviderResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
- V1UpdateSslEnforcementConfigWithResponse(ctx context.Context, ref string, body V1UpdateSslEnforcementConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateSslEnforcementConfigResponse, error)
+type V1CreateASsoProviderResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON201 *CreateProviderResponse
+}
- // V1ListAllBucketsWithResponse request
- V1ListAllBucketsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBucketsResponse, error)
+// Status returns HTTPResponse.Status
+func (r V1CreateASsoProviderResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
- // V1GenerateTypescriptTypesWithResponse request
- V1GenerateTypescriptTypesWithResponse(ctx context.Context, ref string, params *V1GenerateTypescriptTypesParams, reqEditors ...RequestEditorFn) (*V1GenerateTypescriptTypesResponse, error)
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1CreateASsoProviderResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
- // V1UpgradePostgresVersionWithBodyWithResponse request with any body
- V1UpgradePostgresVersionWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpgradePostgresVersionResponse, error)
+type V1DeleteASsoProviderResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *DeleteProviderResponse
+}
- V1UpgradePostgresVersionWithResponse(ctx context.Context, ref string, body V1UpgradePostgresVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpgradePostgresVersionResponse, error)
+// Status returns HTTPResponse.Status
+func (r V1DeleteASsoProviderResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
- // V1GetPostgresUpgradeEligibilityWithResponse request
- V1GetPostgresUpgradeEligibilityWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgresUpgradeEligibilityResponse, error)
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1DeleteASsoProviderResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
- // V1GetPostgresUpgradeStatusWithResponse request
- V1GetPostgresUpgradeStatusWithResponse(ctx context.Context, ref string, params *V1GetPostgresUpgradeStatusParams, reqEditors ...RequestEditorFn) (*V1GetPostgresUpgradeStatusResponse, error)
+type V1GetASsoProviderResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *GetProviderResponse
+}
- // V1DeactivateVanitySubdomainConfigWithResponse request
- V1DeactivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeactivateVanitySubdomainConfigResponse, error)
+// Status returns HTTPResponse.Status
+func (r V1GetASsoProviderResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
- // V1GetVanitySubdomainConfigWithResponse request
- V1GetVanitySubdomainConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetVanitySubdomainConfigResponse, error)
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1GetASsoProviderResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
- // V1ActivateVanitySubdomainConfigWithBodyWithResponse request with any body
- V1ActivateVanitySubdomainConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ActivateVanitySubdomainConfigResponse, error)
+type V1UpdateASsoProviderResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *UpdateProviderResponse
+}
- V1ActivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, body V1ActivateVanitySubdomainConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ActivateVanitySubdomainConfigResponse, error)
+// Status returns HTTPResponse.Status
+func (r V1UpdateASsoProviderResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
- // V1CheckVanitySubdomainAvailabilityWithBodyWithResponse request with any body
- V1CheckVanitySubdomainAvailabilityWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CheckVanitySubdomainAvailabilityResponse, error)
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1UpdateASsoProviderResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
+}
- V1CheckVanitySubdomainAvailabilityWithResponse(ctx context.Context, ref string, body V1CheckVanitySubdomainAvailabilityJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CheckVanitySubdomainAvailabilityResponse, error)
+type V1ListProjectTpaIntegrationsResponse struct {
+ Body []byte
+ HTTPResponse *http.Response
+ JSON200 *[]ThirdPartyAuth
+}
- // V1ListAllSnippetsWithResponse request
- V1ListAllSnippetsWithResponse(ctx context.Context, params *V1ListAllSnippetsParams, reqEditors ...RequestEditorFn) (*V1ListAllSnippetsResponse, error)
+// Status returns HTTPResponse.Status
+func (r V1ListProjectTpaIntegrationsResponse) Status() string {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.Status
+ }
+ return http.StatusText(0)
+}
- // V1GetASnippetWithResponse request
- V1GetASnippetWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetASnippetResponse, error)
+// StatusCode returns HTTPResponse.StatusCode
+func (r V1ListProjectTpaIntegrationsResponse) StatusCode() int {
+ if r.HTTPResponse != nil {
+ return r.HTTPResponse.StatusCode
+ }
+ return 0
}
-type V1DeleteABranchResponse struct {
+type V1CreateProjectTpaIntegrationResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *BranchDeleteResponse
+ JSON201 *ThirdPartyAuth
}
// Status returns HTTPResponse.Status
-func (r V1DeleteABranchResponse) Status() string {
+func (r V1CreateProjectTpaIntegrationResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6758,21 +10574,21 @@ func (r V1DeleteABranchResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1DeleteABranchResponse) StatusCode() int {
+func (r V1CreateProjectTpaIntegrationResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetABranchConfigResponse struct {
+type V1DeleteProjectTpaIntegrationResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *BranchDetailResponse
+ JSON200 *ThirdPartyAuth
}
// Status returns HTTPResponse.Status
-func (r V1GetABranchConfigResponse) Status() string {
+func (r V1DeleteProjectTpaIntegrationResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6780,21 +10596,21 @@ func (r V1GetABranchConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetABranchConfigResponse) StatusCode() int {
+func (r V1DeleteProjectTpaIntegrationResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdateABranchConfigResponse struct {
+type V1GetProjectTpaIntegrationResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *BranchResponse
+ JSON200 *ThirdPartyAuth
}
// Status returns HTTPResponse.Status
-func (r V1UpdateABranchConfigResponse) Status() string {
+func (r V1GetProjectTpaIntegrationResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6802,21 +10618,21 @@ func (r V1UpdateABranchConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdateABranchConfigResponse) StatusCode() int {
+func (r V1GetProjectTpaIntegrationResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1PushABranchResponse struct {
+type V1GetProjectPgbouncerConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *BranchUpdateResponse
+ JSON200 *V1PgbouncerConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1PushABranchResponse) Status() string {
+func (r V1GetProjectPgbouncerConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6824,21 +10640,21 @@ func (r V1PushABranchResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1PushABranchResponse) StatusCode() int {
+func (r V1GetProjectPgbouncerConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ResetABranchResponse struct {
+type V1GetPoolerConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *BranchUpdateResponse
+ JSON200 *[]SupavisorConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1ResetABranchResponse) Status() string {
+func (r V1GetPoolerConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6846,20 +10662,21 @@ func (r V1ResetABranchResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ResetABranchResponse) StatusCode() int {
+func (r V1GetPoolerConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1AuthorizeUserResponse struct {
+type V1UpdatePoolerConfigResponse struct {
Body []byte
HTTPResponse *http.Response
+ JSON200 *UpdateSupavisorConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1AuthorizeUserResponse) Status() string {
+func (r V1UpdatePoolerConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6867,20 +10684,21 @@ func (r V1AuthorizeUserResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1AuthorizeUserResponse) StatusCode() int {
+func (r V1UpdatePoolerConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1RevokeTokenResponse struct {
+type V1GetPostgresConfigResponse struct {
Body []byte
HTTPResponse *http.Response
+ JSON200 *PostgresConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1RevokeTokenResponse) Status() string {
+func (r V1GetPostgresConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6888,21 +10706,21 @@ func (r V1RevokeTokenResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1RevokeTokenResponse) StatusCode() int {
+func (r V1GetPostgresConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ExchangeOauthTokenResponse struct {
+type V1UpdatePostgresConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *OAuthTokenResponse
+ JSON200 *PostgresConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1ExchangeOauthTokenResponse) Status() string {
+func (r V1UpdatePostgresConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6910,21 +10728,21 @@ func (r V1ExchangeOauthTokenResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ExchangeOauthTokenResponse) StatusCode() int {
+func (r V1UpdatePostgresConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ListAllOrganizationsResponse struct {
+type V1GetStorageConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *[]OrganizationResponseV1
+ JSON200 *StorageConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1ListAllOrganizationsResponse) Status() string {
+func (r V1GetStorageConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6932,21 +10750,20 @@ func (r V1ListAllOrganizationsResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAllOrganizationsResponse) StatusCode() int {
+func (r V1GetStorageConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1CreateAnOrganizationResponse struct {
+type V1UpdateStorageConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *OrganizationResponseV1
}
// Status returns HTTPResponse.Status
-func (r V1CreateAnOrganizationResponse) Status() string {
+func (r V1UpdateStorageConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6954,21 +10771,20 @@ func (r V1CreateAnOrganizationResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1CreateAnOrganizationResponse) StatusCode() int {
+func (r V1UpdateStorageConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetAnOrganizationResponse struct {
+type V1DeleteHostnameConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *V1OrganizationSlugResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetAnOrganizationResponse) Status() string {
+func (r V1DeleteHostnameConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6976,21 +10792,21 @@ func (r V1GetAnOrganizationResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetAnOrganizationResponse) StatusCode() int {
+func (r V1DeleteHostnameConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ListOrganizationMembersResponse struct {
+type V1GetHostnameConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *[]V1OrganizationMemberResponse
+ JSON200 *UpdateCustomHostnameResponse
}
// Status returns HTTPResponse.Status
-func (r V1ListOrganizationMembersResponse) Status() string {
+func (r V1GetHostnameConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -6998,21 +10814,21 @@ func (r V1ListOrganizationMembersResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListOrganizationMembersResponse) StatusCode() int {
+func (r V1GetHostnameConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ListAllProjectsResponse struct {
+type V1ActivateCustomHostnameResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *[]V1ProjectWithDatabaseResponse
+ JSON201 *UpdateCustomHostnameResponse
}
// Status returns HTTPResponse.Status
-func (r V1ListAllProjectsResponse) Status() string {
+func (r V1ActivateCustomHostnameResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7020,21 +10836,21 @@ func (r V1ListAllProjectsResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAllProjectsResponse) StatusCode() int {
+func (r V1ActivateCustomHostnameResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1CreateAProjectResponse struct {
+type V1UpdateHostnameConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *V1ProjectResponse
+ JSON201 *UpdateCustomHostnameResponse
}
// Status returns HTTPResponse.Status
-func (r V1CreateAProjectResponse) Status() string {
+func (r V1UpdateHostnameConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7042,21 +10858,21 @@ func (r V1CreateAProjectResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1CreateAProjectResponse) StatusCode() int {
+func (r V1UpdateHostnameConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1DeleteAProjectResponse struct {
+type V1VerifyDnsConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *V1ProjectRefResponse
+ JSON201 *UpdateCustomHostnameResponse
}
// Status returns HTTPResponse.Status
-func (r V1DeleteAProjectResponse) Status() string {
+func (r V1VerifyDnsConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7064,21 +10880,21 @@ func (r V1DeleteAProjectResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1DeleteAProjectResponse) StatusCode() int {
+func (r V1VerifyDnsConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetProjectResponse struct {
+type V1ListAllBackupsResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *V1ProjectWithDatabaseResponse
+ JSON200 *V1BackupsResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetProjectResponse) Status() string {
+func (r V1ListAllBackupsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7086,21 +10902,20 @@ func (r V1GetProjectResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetProjectResponse) StatusCode() int {
+func (r V1ListAllBackupsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type GetLogsResponse struct {
+type V1RestorePitrBackupResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *V1AnalyticsResponse
}
// Status returns HTTPResponse.Status
-func (r GetLogsResponse) Status() string {
+func (r V1RestorePitrBackupResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7108,21 +10923,21 @@ func (r GetLogsResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r GetLogsResponse) StatusCode() int {
+func (r V1RestorePitrBackupResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetProjectApiKeysResponse struct {
+type V1GetRestorePointResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *[]ApiKeyResponse
+ JSON200 *V1RestorePointResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetProjectApiKeysResponse) Status() string {
+func (r V1GetRestorePointResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7130,21 +10945,21 @@ func (r V1GetProjectApiKeysResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetProjectApiKeysResponse) StatusCode() int {
+func (r V1GetRestorePointResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type CreateApiKeyResponse struct {
+type V1CreateRestorePointResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *ApiKeyResponse
+ JSON201 *V1RestorePointResponse
}
// Status returns HTTPResponse.Status
-func (r CreateApiKeyResponse) Status() string {
+func (r V1CreateRestorePointResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7152,21 +10967,20 @@ func (r CreateApiKeyResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r CreateApiKeyResponse) StatusCode() int {
+func (r V1CreateRestorePointResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type DeleteApiKeyResponse struct {
+type V1UndoResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *ApiKeyResponse
}
// Status returns HTTPResponse.Status
-func (r DeleteApiKeyResponse) Status() string {
+func (r V1UndoResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7174,21 +10988,21 @@ func (r DeleteApiKeyResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r DeleteApiKeyResponse) StatusCode() int {
+func (r V1UndoResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type GetApiKeyResponse struct {
+type V1GetDatabaseMetadataResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *ApiKeyResponse
+ JSON200 *GetProjectDbMetadataResponse
}
// Status returns HTTPResponse.Status
-func (r GetApiKeyResponse) Status() string {
+func (r V1GetDatabaseMetadataResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7196,21 +11010,21 @@ func (r GetApiKeyResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r GetApiKeyResponse) StatusCode() int {
+func (r V1GetDatabaseMetadataResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type UpdateApiKeyResponse struct {
+type V1GetJitAccessResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *ApiKeyResponse
+ JSON200 *JitAccessResponse
}
// Status returns HTTPResponse.Status
-func (r UpdateApiKeyResponse) Status() string {
+func (r V1GetJitAccessResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7218,20 +11032,21 @@ func (r UpdateApiKeyResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r UpdateApiKeyResponse) StatusCode() int {
+func (r V1GetJitAccessResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1DisablePreviewBranchingResponse struct {
+type V1UpdateJitAccessResponse struct {
Body []byte
HTTPResponse *http.Response
+ JSON200 *JitAccessResponse
}
// Status returns HTTPResponse.Status
-func (r V1DisablePreviewBranchingResponse) Status() string {
+func (r V1UpdateJitAccessResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7239,21 +11054,21 @@ func (r V1DisablePreviewBranchingResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1DisablePreviewBranchingResponse) StatusCode() int {
+func (r V1UpdateJitAccessResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ListAllBranchesResponse struct {
+type V1ListJitAccessResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *[]BranchResponse
+ JSON200 *JitListAccessResponse
}
// Status returns HTTPResponse.Status
-func (r V1ListAllBranchesResponse) Status() string {
+func (r V1ListJitAccessResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7261,21 +11076,20 @@ func (r V1ListAllBranchesResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAllBranchesResponse) StatusCode() int {
+func (r V1ListJitAccessResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1CreateABranchResponse struct {
+type V1DeleteJitAccessResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *BranchResponse
}
// Status returns HTTPResponse.Status
-func (r V1CreateABranchResponse) Status() string {
+func (r V1DeleteJitAccessResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7283,21 +11097,21 @@ func (r V1CreateABranchResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1CreateABranchResponse) StatusCode() int {
+func (r V1DeleteJitAccessResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetAuthServiceConfigResponse struct {
+type V1ListMigrationHistoryResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *AuthConfigResponse
+ JSON200 *V1ListMigrationsResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetAuthServiceConfigResponse) Status() string {
+func (r V1ListMigrationHistoryResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7305,21 +11119,20 @@ func (r V1GetAuthServiceConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetAuthServiceConfigResponse) StatusCode() int {
+func (r V1ListMigrationHistoryResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdateAuthServiceConfigResponse struct {
+type V1ApplyAMigrationResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *AuthConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1UpdateAuthServiceConfigResponse) Status() string {
+func (r V1ApplyAMigrationResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7327,21 +11140,20 @@ func (r V1UpdateAuthServiceConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdateAuthServiceConfigResponse) StatusCode() int {
+func (r V1ApplyAMigrationResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ListAllSsoProviderResponse struct {
+type V1UpsertAMigrationResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *ListProvidersResponse
}
// Status returns HTTPResponse.Status
-func (r V1ListAllSsoProviderResponse) Status() string {
+func (r V1UpsertAMigrationResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7349,21 +11161,20 @@ func (r V1ListAllSsoProviderResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAllSsoProviderResponse) StatusCode() int {
+func (r V1UpsertAMigrationResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1CreateASsoProviderResponse struct {
+type V1RunAQueryResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *CreateProviderResponse
}
// Status returns HTTPResponse.Status
-func (r V1CreateASsoProviderResponse) Status() string {
+func (r V1RunAQueryResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7371,21 +11182,20 @@ func (r V1CreateASsoProviderResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1CreateASsoProviderResponse) StatusCode() int {
+func (r V1RunAQueryResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1DeleteASsoProviderResponse struct {
+type V1EnableDatabaseWebhookResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *DeleteProviderResponse
}
// Status returns HTTPResponse.Status
-func (r V1DeleteASsoProviderResponse) Status() string {
+func (r V1EnableDatabaseWebhookResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7393,21 +11203,21 @@ func (r V1DeleteASsoProviderResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1DeleteASsoProviderResponse) StatusCode() int {
+func (r V1EnableDatabaseWebhookResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetASsoProviderResponse struct {
+type V1ListAllFunctionsResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *GetProviderResponse
+ JSON200 *[]FunctionResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetASsoProviderResponse) Status() string {
+func (r V1ListAllFunctionsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7415,21 +11225,21 @@ func (r V1GetASsoProviderResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetASsoProviderResponse) StatusCode() int {
+func (r V1ListAllFunctionsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdateASsoProviderResponse struct {
+type V1CreateAFunctionResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *UpdateProviderResponse
+ JSON201 *FunctionResponse
}
// Status returns HTTPResponse.Status
-func (r V1UpdateASsoProviderResponse) Status() string {
+func (r V1CreateAFunctionResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7437,21 +11247,21 @@ func (r V1UpdateASsoProviderResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdateASsoProviderResponse) StatusCode() int {
+func (r V1CreateAFunctionResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type ListTPAForProjectResponse struct {
+type V1BulkUpdateFunctionsResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *[]ThirdPartyAuth
+ JSON200 *BulkUpdateFunctionResponse
}
// Status returns HTTPResponse.Status
-func (r ListTPAForProjectResponse) Status() string {
+func (r V1BulkUpdateFunctionsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7459,21 +11269,21 @@ func (r ListTPAForProjectResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r ListTPAForProjectResponse) StatusCode() int {
+func (r V1BulkUpdateFunctionsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type CreateTPAForProjectResponse struct {
+type V1DeployAFunctionResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *ThirdPartyAuth
+ JSON201 *DeployFunctionResponse
}
// Status returns HTTPResponse.Status
-func (r CreateTPAForProjectResponse) Status() string {
+func (r V1DeployAFunctionResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7481,21 +11291,20 @@ func (r CreateTPAForProjectResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r CreateTPAForProjectResponse) StatusCode() int {
+func (r V1DeployAFunctionResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type DeleteTPAForProjectResponse struct {
+type V1DeleteAFunctionResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *ThirdPartyAuth
}
// Status returns HTTPResponse.Status
-func (r DeleteTPAForProjectResponse) Status() string {
+func (r V1DeleteAFunctionResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7503,21 +11312,21 @@ func (r DeleteTPAForProjectResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r DeleteTPAForProjectResponse) StatusCode() int {
+func (r V1DeleteAFunctionResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type GetTPAForProjectResponse struct {
+type V1GetAFunctionResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *ThirdPartyAuth
+ JSON200 *FunctionSlugResponse
}
// Status returns HTTPResponse.Status
-func (r GetTPAForProjectResponse) Status() string {
+func (r V1GetAFunctionResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7525,21 +11334,21 @@ func (r GetTPAForProjectResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r GetTPAForProjectResponse) StatusCode() int {
+func (r V1GetAFunctionResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetProjectPgbouncerConfigResponse struct {
+type V1UpdateAFunctionResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *V1PgbouncerConfigResponse
+ JSON200 *FunctionResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetProjectPgbouncerConfigResponse) Status() string {
+func (r V1UpdateAFunctionResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7547,21 +11356,21 @@ func (r V1GetProjectPgbouncerConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetProjectPgbouncerConfigResponse) StatusCode() int {
+func (r V1UpdateAFunctionResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetSupavisorConfigResponse struct {
+type V1GetAFunctionBodyResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *[]SupavisorConfigResponse
+ JSON200 *StreamableFile
}
// Status returns HTTPResponse.Status
-func (r V1GetSupavisorConfigResponse) Status() string {
+func (r V1GetAFunctionBodyResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7569,21 +11378,21 @@ func (r V1GetSupavisorConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetSupavisorConfigResponse) StatusCode() int {
+func (r V1GetAFunctionBodyResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdateSupavisorConfigResponse struct {
+type V1GetServicesHealthResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *UpdateSupavisorConfigResponse
+ JSON200 *[]V1ServiceHealthResponse
}
// Status returns HTTPResponse.Status
-func (r V1UpdateSupavisorConfigResponse) Status() string {
+func (r V1GetServicesHealthResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7591,21 +11400,20 @@ func (r V1UpdateSupavisorConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdateSupavisorConfigResponse) StatusCode() int {
+func (r V1GetServicesHealthResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetPostgresConfigResponse struct {
+type V1DeleteNetworkBansResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *PostgresConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetPostgresConfigResponse) Status() string {
+func (r V1DeleteNetworkBansResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7613,21 +11421,21 @@ func (r V1GetPostgresConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetPostgresConfigResponse) StatusCode() int {
+func (r V1DeleteNetworkBansResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdatePostgresConfigResponse struct {
+type V1ListAllNetworkBansResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *PostgresConfigResponse
+ JSON201 *NetworkBanResponse
}
// Status returns HTTPResponse.Status
-func (r V1UpdatePostgresConfigResponse) Status() string {
+func (r V1ListAllNetworkBansResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7635,21 +11443,21 @@ func (r V1UpdatePostgresConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdatePostgresConfigResponse) StatusCode() int {
+func (r V1ListAllNetworkBansResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetStorageConfigResponse struct {
+type V1ListAllNetworkBansEnrichedResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *StorageConfigResponse
+ JSON201 *NetworkBanResponseEnriched
}
// Status returns HTTPResponse.Status
-func (r V1GetStorageConfigResponse) Status() string {
+func (r V1ListAllNetworkBansEnrichedResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7657,20 +11465,21 @@ func (r V1GetStorageConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetStorageConfigResponse) StatusCode() int {
+func (r V1ListAllNetworkBansEnrichedResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdateStorageConfigResponse struct {
+type V1GetNetworkRestrictionsResponse struct {
Body []byte
HTTPResponse *http.Response
+ JSON200 *NetworkRestrictionsResponse
}
// Status returns HTTPResponse.Status
-func (r V1UpdateStorageConfigResponse) Status() string {
+func (r V1GetNetworkRestrictionsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7678,20 +11487,21 @@ func (r V1UpdateStorageConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdateStorageConfigResponse) StatusCode() int {
+func (r V1GetNetworkRestrictionsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1DeleteHostnameConfigResponse struct {
+type V1UpdateNetworkRestrictionsResponse struct {
Body []byte
HTTPResponse *http.Response
+ JSON201 *NetworkRestrictionsResponse
}
// Status returns HTTPResponse.Status
-func (r V1DeleteHostnameConfigResponse) Status() string {
+func (r V1UpdateNetworkRestrictionsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7699,21 +11509,20 @@ func (r V1DeleteHostnameConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1DeleteHostnameConfigResponse) StatusCode() int {
+func (r V1UpdateNetworkRestrictionsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetHostnameConfigResponse struct {
+type V1PauseAProjectResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *UpdateCustomHostnameResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetHostnameConfigResponse) Status() string {
+func (r V1PauseAProjectResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7721,21 +11530,21 @@ func (r V1GetHostnameConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetHostnameConfigResponse) StatusCode() int {
+func (r V1PauseAProjectResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ActivateCustomHostnameResponse struct {
+type V1GetPgsodiumConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *UpdateCustomHostnameResponse
+ JSON200 *PgsodiumConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1ActivateCustomHostnameResponse) Status() string {
+func (r V1GetPgsodiumConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7743,21 +11552,21 @@ func (r V1ActivateCustomHostnameResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ActivateCustomHostnameResponse) StatusCode() int {
+func (r V1GetPgsodiumConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdateHostnameConfigResponse struct {
+type V1UpdatePgsodiumConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *UpdateCustomHostnameResponse
+ JSON200 *PgsodiumConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1UpdateHostnameConfigResponse) Status() string {
+func (r V1UpdatePgsodiumConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7765,21 +11574,21 @@ func (r V1UpdateHostnameConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdateHostnameConfigResponse) StatusCode() int {
+func (r V1UpdatePgsodiumConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1VerifyDnsConfigResponse struct {
+type V1GetPostgrestServiceConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *UpdateCustomHostnameResponse
+ JSON200 *PostgrestConfigWithJWTSecretResponse
}
// Status returns HTTPResponse.Status
-func (r V1VerifyDnsConfigResponse) Status() string {
+func (r V1GetPostgrestServiceConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7787,21 +11596,21 @@ func (r V1VerifyDnsConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1VerifyDnsConfigResponse) StatusCode() int {
+func (r V1GetPostgrestServiceConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ListAllBackupsResponse struct {
+type V1UpdatePostgrestServiceConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *V1BackupsResponse
+ JSON200 *V1PostgrestConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1ListAllBackupsResponse) Status() string {
+func (r V1UpdatePostgrestServiceConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7809,20 +11618,20 @@ func (r V1ListAllBackupsResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAllBackupsResponse) StatusCode() int {
+func (r V1UpdatePostgrestServiceConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1RestorePitrBackupResponse struct {
+type V1RemoveAReadReplicaResponse struct {
Body []byte
HTTPResponse *http.Response
}
// Status returns HTTPResponse.Status
-func (r V1RestorePitrBackupResponse) Status() string {
+func (r V1RemoveAReadReplicaResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7830,21 +11639,20 @@ func (r V1RestorePitrBackupResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1RestorePitrBackupResponse) StatusCode() int {
+func (r V1RemoveAReadReplicaResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type GetDatabaseMetadataResponse struct {
+type V1SetupAReadReplicaResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *GetProjectDbMetadataResponseDto
}
// Status returns HTTPResponse.Status
-func (r GetDatabaseMetadataResponse) Status() string {
+func (r V1SetupAReadReplicaResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7852,21 +11660,21 @@ func (r GetDatabaseMetadataResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r GetDatabaseMetadataResponse) StatusCode() int {
+func (r V1SetupAReadReplicaResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1RunAQueryResponse struct {
+type V1GetReadonlyModeStatusResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *map[string]interface{}
+ JSON200 *ReadOnlyStatusResponse
}
// Status returns HTTPResponse.Status
-func (r V1RunAQueryResponse) Status() string {
+func (r V1GetReadonlyModeStatusResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7874,20 +11682,20 @@ func (r V1RunAQueryResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1RunAQueryResponse) StatusCode() int {
+func (r V1GetReadonlyModeStatusResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1EnableDatabaseWebhookResponse struct {
+type V1DisableReadonlyModeTemporarilyResponse struct {
Body []byte
HTTPResponse *http.Response
}
// Status returns HTTPResponse.Status
-func (r V1EnableDatabaseWebhookResponse) Status() string {
+func (r V1DisableReadonlyModeTemporarilyResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7895,21 +11703,21 @@ func (r V1EnableDatabaseWebhookResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1EnableDatabaseWebhookResponse) StatusCode() int {
+func (r V1DisableReadonlyModeTemporarilyResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ListAllFunctionsResponse struct {
+type V1ListAvailableRestoreVersionsResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *[]FunctionResponse
+ JSON200 *GetProjectAvailableRestoreVersionsResponse
}
// Status returns HTTPResponse.Status
-func (r V1ListAllFunctionsResponse) Status() string {
+func (r V1ListAvailableRestoreVersionsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7917,21 +11725,20 @@ func (r V1ListAllFunctionsResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAllFunctionsResponse) StatusCode() int {
+func (r V1ListAvailableRestoreVersionsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1CreateAFunctionResponse struct {
+type V1RestoreAProjectResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *FunctionResponse
}
// Status returns HTTPResponse.Status
-func (r V1CreateAFunctionResponse) Status() string {
+func (r V1RestoreAProjectResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7939,21 +11746,20 @@ func (r V1CreateAFunctionResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1CreateAFunctionResponse) StatusCode() int {
+func (r V1RestoreAProjectResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1BulkUpdateFunctionsResponse struct {
+type V1CancelAProjectRestorationResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *BulkUpdateFunctionResponse
}
// Status returns HTTPResponse.Status
-func (r V1BulkUpdateFunctionsResponse) Status() string {
+func (r V1CancelAProjectRestorationResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7961,21 +11767,20 @@ func (r V1BulkUpdateFunctionsResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1BulkUpdateFunctionsResponse) StatusCode() int {
+func (r V1CancelAProjectRestorationResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1DeployAFunctionResponse struct {
+type V1BulkDeleteSecretsResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *DeployFunctionResponse
}
// Status returns HTTPResponse.Status
-func (r V1DeployAFunctionResponse) Status() string {
+func (r V1BulkDeleteSecretsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -7983,20 +11788,21 @@ func (r V1DeployAFunctionResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1DeployAFunctionResponse) StatusCode() int {
+func (r V1BulkDeleteSecretsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1DeleteAFunctionResponse struct {
+type V1ListAllSecretsResponse struct {
Body []byte
HTTPResponse *http.Response
+ JSON200 *[]SecretResponse
}
// Status returns HTTPResponse.Status
-func (r V1DeleteAFunctionResponse) Status() string {
+func (r V1ListAllSecretsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8004,21 +11810,20 @@ func (r V1DeleteAFunctionResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1DeleteAFunctionResponse) StatusCode() int {
+func (r V1ListAllSecretsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetAFunctionResponse struct {
+type V1BulkCreateSecretsResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *FunctionSlugResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetAFunctionResponse) Status() string {
+func (r V1BulkCreateSecretsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8026,21 +11831,21 @@ func (r V1GetAFunctionResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetAFunctionResponse) StatusCode() int {
+func (r V1BulkCreateSecretsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdateAFunctionResponse struct {
+type V1GetSslEnforcementConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *FunctionResponse
+ JSON200 *SslEnforcementResponse
}
// Status returns HTTPResponse.Status
-func (r V1UpdateAFunctionResponse) Status() string {
+func (r V1GetSslEnforcementConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8048,20 +11853,21 @@ func (r V1UpdateAFunctionResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdateAFunctionResponse) StatusCode() int {
+func (r V1GetSslEnforcementConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetAFunctionBodyResponse struct {
+type V1UpdateSslEnforcementConfigResponse struct {
Body []byte
HTTPResponse *http.Response
+ JSON200 *SslEnforcementResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetAFunctionBodyResponse) Status() string {
+func (r V1UpdateSslEnforcementConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8069,21 +11875,21 @@ func (r V1GetAFunctionBodyResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetAFunctionBodyResponse) StatusCode() int {
+func (r V1UpdateSslEnforcementConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetServicesHealthResponse struct {
+type V1ListAllBucketsResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *[]V1ServiceHealthResponse
+ JSON200 *[]V1StorageBucketResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetServicesHealthResponse) Status() string {
+func (r V1ListAllBucketsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8091,20 +11897,21 @@ func (r V1GetServicesHealthResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetServicesHealthResponse) StatusCode() int {
+func (r V1ListAllBucketsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1DeleteNetworkBansResponse struct {
+type V1GenerateTypescriptTypesResponse struct {
Body []byte
HTTPResponse *http.Response
+ JSON200 *TypescriptResponse
}
// Status returns HTTPResponse.Status
-func (r V1DeleteNetworkBansResponse) Status() string {
+func (r V1GenerateTypescriptTypesResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8112,21 +11919,21 @@ func (r V1DeleteNetworkBansResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1DeleteNetworkBansResponse) StatusCode() int {
+func (r V1GenerateTypescriptTypesResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1ListAllNetworkBansResponse struct {
+type V1UpgradePostgresVersionResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *NetworkBanResponse
+ JSON201 *ProjectUpgradeInitiateResponse
}
// Status returns HTTPResponse.Status
-func (r V1ListAllNetworkBansResponse) Status() string {
+func (r V1UpgradePostgresVersionResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8134,21 +11941,21 @@ func (r V1ListAllNetworkBansResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAllNetworkBansResponse) StatusCode() int {
+func (r V1UpgradePostgresVersionResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetNetworkRestrictionsResponse struct {
+type V1GetPostgresUpgradeEligibilityResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *NetworkRestrictionsResponse
+ JSON200 *ProjectUpgradeEligibilityResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetNetworkRestrictionsResponse) Status() string {
+func (r V1GetPostgresUpgradeEligibilityResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8156,21 +11963,21 @@ func (r V1GetNetworkRestrictionsResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetNetworkRestrictionsResponse) StatusCode() int {
+func (r V1GetPostgresUpgradeEligibilityResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdateNetworkRestrictionsResponse struct {
+type V1GetPostgresUpgradeStatusResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON201 *NetworkRestrictionsResponse
+ JSON200 *DatabaseUpgradeStatusResponse
}
// Status returns HTTPResponse.Status
-func (r V1UpdateNetworkRestrictionsResponse) Status() string {
+func (r V1GetPostgresUpgradeStatusResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8178,20 +11985,20 @@ func (r V1UpdateNetworkRestrictionsResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdateNetworkRestrictionsResponse) StatusCode() int {
+func (r V1GetPostgresUpgradeStatusResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1PauseAProjectResponse struct {
+type V1DeactivateVanitySubdomainConfigResponse struct {
Body []byte
HTTPResponse *http.Response
}
// Status returns HTTPResponse.Status
-func (r V1PauseAProjectResponse) Status() string {
+func (r V1DeactivateVanitySubdomainConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8199,21 +12006,21 @@ func (r V1PauseAProjectResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1PauseAProjectResponse) StatusCode() int {
+func (r V1DeactivateVanitySubdomainConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetPgsodiumConfigResponse struct {
+type V1GetVanitySubdomainConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *PgsodiumConfigResponse
+ JSON200 *VanitySubdomainConfigResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetPgsodiumConfigResponse) Status() string {
+func (r V1GetVanitySubdomainConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8221,21 +12028,21 @@ func (r V1GetPgsodiumConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetPgsodiumConfigResponse) StatusCode() int {
+func (r V1GetVanitySubdomainConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdatePgsodiumConfigResponse struct {
+type V1ActivateVanitySubdomainConfigResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *PgsodiumConfigResponse
+ JSON201 *ActivateVanitySubdomainResponse
}
// Status returns HTTPResponse.Status
-func (r V1UpdatePgsodiumConfigResponse) Status() string {
+func (r V1ActivateVanitySubdomainConfigResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8243,21 +12050,21 @@ func (r V1UpdatePgsodiumConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdatePgsodiumConfigResponse) StatusCode() int {
+func (r V1ActivateVanitySubdomainConfigResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1GetPostgrestServiceConfigResponse struct {
+type V1CheckVanitySubdomainAvailabilityResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *PostgrestConfigWithJWTSecretResponse
+ JSON201 *SubdomainAvailabilityResponse
}
// Status returns HTTPResponse.Status
-func (r V1GetPostgrestServiceConfigResponse) Status() string {
+func (r V1CheckVanitySubdomainAvailabilityResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8265,21 +12072,21 @@ func (r V1GetPostgrestServiceConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetPostgrestServiceConfigResponse) StatusCode() int {
+func (r V1CheckVanitySubdomainAvailabilityResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1UpdatePostgrestServiceConfigResponse struct {
+type V1ListAllSnippetsResponse struct {
Body []byte
HTTPResponse *http.Response
- JSON200 *V1PostgrestConfigResponse
+ JSON200 *SnippetList
}
// Status returns HTTPResponse.Status
-func (r V1UpdatePostgrestServiceConfigResponse) Status() string {
+func (r V1ListAllSnippetsResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8287,20 +12094,21 @@ func (r V1UpdatePostgrestServiceConfigResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdatePostgrestServiceConfigResponse) StatusCode() int {
+func (r V1ListAllSnippetsResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1RemoveAReadReplicaResponse struct {
+type V1GetASnippetResponse struct {
Body []byte
HTTPResponse *http.Response
+ JSON200 *SnippetResponse
}
// Status returns HTTPResponse.Status
-func (r V1RemoveAReadReplicaResponse) Status() string {
+func (r V1GetASnippetResponse) Status() string {
if r.HTTPResponse != nil {
return r.HTTPResponse.Status
}
@@ -8308,1625 +12116,2021 @@ func (r V1RemoveAReadReplicaResponse) Status() string {
}
// StatusCode returns HTTPResponse.StatusCode
-func (r V1RemoveAReadReplicaResponse) StatusCode() int {
+func (r V1GetASnippetResponse) StatusCode() int {
if r.HTTPResponse != nil {
return r.HTTPResponse.StatusCode
}
return 0
}
-type V1SetupAReadReplicaResponse struct {
- Body []byte
- HTTPResponse *http.Response
+// V1DeleteABranchWithResponse request returning *V1DeleteABranchResponse
+func (c *ClientWithResponses) V1DeleteABranchWithResponse(ctx context.Context, branchId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1DeleteABranchResponse, error) {
+ rsp, err := c.V1DeleteABranch(ctx, branchId, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1DeleteABranchResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1SetupAReadReplicaResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetABranchConfigWithResponse request returning *V1GetABranchConfigResponse
+func (c *ClientWithResponses) V1GetABranchConfigWithResponse(ctx context.Context, branchId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetABranchConfigResponse, error) {
+ rsp, err := c.V1GetABranchConfig(ctx, branchId, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1GetABranchConfigResponse(rsp)
+}
+
+// V1UpdateABranchConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateABranchConfigResponse
+func (c *ClientWithResponses) V1UpdateABranchConfigWithBodyWithResponse(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateABranchConfigResponse, error) {
+ rsp, err := c.V1UpdateABranchConfigWithBody(ctx, branchId, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1UpdateABranchConfigResponse(rsp)
+}
+
+func (c *ClientWithResponses) V1UpdateABranchConfigWithResponse(ctx context.Context, branchId openapi_types.UUID, body V1UpdateABranchConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateABranchConfigResponse, error) {
+ rsp, err := c.V1UpdateABranchConfig(ctx, branchId, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1UpdateABranchConfigResponse(rsp)
+}
+
+// V1DiffABranchWithResponse request returning *V1DiffABranchResponse
+func (c *ClientWithResponses) V1DiffABranchWithResponse(ctx context.Context, branchId openapi_types.UUID, params *V1DiffABranchParams, reqEditors ...RequestEditorFn) (*V1DiffABranchResponse, error) {
+ rsp, err := c.V1DiffABranch(ctx, branchId, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1DiffABranchResponse(rsp)
+}
+
+// V1MergeABranchWithBodyWithResponse request with arbitrary body returning *V1MergeABranchResponse
+func (c *ClientWithResponses) V1MergeABranchWithBodyWithResponse(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1MergeABranchResponse, error) {
+ rsp, err := c.V1MergeABranchWithBody(ctx, branchId, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1MergeABranchResponse(rsp)
+}
+
+func (c *ClientWithResponses) V1MergeABranchWithResponse(ctx context.Context, branchId openapi_types.UUID, body V1MergeABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1MergeABranchResponse, error) {
+ rsp, err := c.V1MergeABranch(ctx, branchId, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1MergeABranchResponse(rsp)
+}
+
+// V1PushABranchWithBodyWithResponse request with arbitrary body returning *V1PushABranchResponse
+func (c *ClientWithResponses) V1PushABranchWithBodyWithResponse(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1PushABranchResponse, error) {
+ rsp, err := c.V1PushABranchWithBody(ctx, branchId, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1PushABranchResponse(rsp)
+}
+
+func (c *ClientWithResponses) V1PushABranchWithResponse(ctx context.Context, branchId openapi_types.UUID, body V1PushABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1PushABranchResponse, error) {
+ rsp, err := c.V1PushABranch(ctx, branchId, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1PushABranchResponse(rsp)
+}
+
+// V1ResetABranchWithBodyWithResponse request with arbitrary body returning *V1ResetABranchResponse
+func (c *ClientWithResponses) V1ResetABranchWithBodyWithResponse(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ResetABranchResponse, error) {
+ rsp, err := c.V1ResetABranchWithBody(ctx, branchId, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1ResetABranchResponse(rsp)
+}
+
+func (c *ClientWithResponses) V1ResetABranchWithResponse(ctx context.Context, branchId openapi_types.UUID, body V1ResetABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ResetABranchResponse, error) {
+ rsp, err := c.V1ResetABranch(ctx, branchId, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1ResetABranchResponse(rsp)
+}
+
+// V1AuthorizeUserWithResponse request returning *V1AuthorizeUserResponse
+func (c *ClientWithResponses) V1AuthorizeUserWithResponse(ctx context.Context, params *V1AuthorizeUserParams, reqEditors ...RequestEditorFn) (*V1AuthorizeUserResponse, error) {
+ rsp, err := c.V1AuthorizeUser(ctx, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1AuthorizeUserResponse(rsp)
+}
+
+// V1OauthAuthorizeProjectClaimWithResponse request returning *V1OauthAuthorizeProjectClaimResponse
+func (c *ClientWithResponses) V1OauthAuthorizeProjectClaimWithResponse(ctx context.Context, params *V1OauthAuthorizeProjectClaimParams, reqEditors ...RequestEditorFn) (*V1OauthAuthorizeProjectClaimResponse, error) {
+ rsp, err := c.V1OauthAuthorizeProjectClaim(ctx, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1OauthAuthorizeProjectClaimResponse(rsp)
+}
+
+// V1RevokeTokenWithBodyWithResponse request with arbitrary body returning *V1RevokeTokenResponse
+func (c *ClientWithResponses) V1RevokeTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RevokeTokenResponse, error) {
+ rsp, err := c.V1RevokeTokenWithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1RevokeTokenResponse(rsp)
+}
+
+func (c *ClientWithResponses) V1RevokeTokenWithResponse(ctx context.Context, body V1RevokeTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RevokeTokenResponse, error) {
+ rsp, err := c.V1RevokeToken(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1RevokeTokenResponse(rsp)
+}
+
+// V1ExchangeOauthTokenWithBodyWithResponse request with arbitrary body returning *V1ExchangeOauthTokenResponse
+func (c *ClientWithResponses) V1ExchangeOauthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ExchangeOauthTokenResponse, error) {
+ rsp, err := c.V1ExchangeOauthTokenWithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1ExchangeOauthTokenResponse(rsp)
+}
+
+func (c *ClientWithResponses) V1ExchangeOauthTokenWithFormdataBodyWithResponse(ctx context.Context, body V1ExchangeOauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*V1ExchangeOauthTokenResponse, error) {
+ rsp, err := c.V1ExchangeOauthTokenWithFormdataBody(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1ExchangeOauthTokenResponse(rsp)
+}
+
+// V1ListAllOrganizationsWithResponse request returning *V1ListAllOrganizationsResponse
+func (c *ClientWithResponses) V1ListAllOrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*V1ListAllOrganizationsResponse, error) {
+ rsp, err := c.V1ListAllOrganizations(ctx, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1ListAllOrganizationsResponse(rsp)
+}
+
+// V1CreateAnOrganizationWithBodyWithResponse request with arbitrary body returning *V1CreateAnOrganizationResponse
+func (c *ClientWithResponses) V1CreateAnOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAnOrganizationResponse, error) {
+ rsp, err := c.V1CreateAnOrganizationWithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1CreateAnOrganizationResponse(rsp)
+}
+
+func (c *ClientWithResponses) V1CreateAnOrganizationWithResponse(ctx context.Context, body V1CreateAnOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAnOrganizationResponse, error) {
+ rsp, err := c.V1CreateAnOrganization(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1CreateAnOrganizationResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1SetupAReadReplicaResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1GetAnOrganizationWithResponse request returning *V1GetAnOrganizationResponse
+func (c *ClientWithResponses) V1GetAnOrganizationWithResponse(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*V1GetAnOrganizationResponse, error) {
+ rsp, err := c.V1GetAnOrganization(ctx, slug, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1GetAnOrganizationResponse(rsp)
}
-type V1GetReadonlyModeStatusResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *ReadOnlyStatusResponse
+// V1ListOrganizationMembersWithResponse request returning *V1ListOrganizationMembersResponse
+func (c *ClientWithResponses) V1ListOrganizationMembersWithResponse(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*V1ListOrganizationMembersResponse, error) {
+ rsp, err := c.V1ListOrganizationMembers(ctx, slug, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1ListOrganizationMembersResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1GetReadonlyModeStatusResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetOrganizationProjectClaimWithResponse request returning *V1GetOrganizationProjectClaimResponse
+func (c *ClientWithResponses) V1GetOrganizationProjectClaimWithResponse(ctx context.Context, slug string, token string, reqEditors ...RequestEditorFn) (*V1GetOrganizationProjectClaimResponse, error) {
+ rsp, err := c.V1GetOrganizationProjectClaim(ctx, slug, token, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetOrganizationProjectClaimResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetReadonlyModeStatusResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1ClaimProjectForOrganizationWithResponse request returning *V1ClaimProjectForOrganizationResponse
+func (c *ClientWithResponses) V1ClaimProjectForOrganizationWithResponse(ctx context.Context, slug string, token string, reqEditors ...RequestEditorFn) (*V1ClaimProjectForOrganizationResponse, error) {
+ rsp, err := c.V1ClaimProjectForOrganization(ctx, slug, token, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1ClaimProjectForOrganizationResponse(rsp)
}
-type V1DisableReadonlyModeTemporarilyResponse struct {
- Body []byte
- HTTPResponse *http.Response
+// V1ListAllProjectsWithResponse request returning *V1ListAllProjectsResponse
+func (c *ClientWithResponses) V1ListAllProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*V1ListAllProjectsResponse, error) {
+ rsp, err := c.V1ListAllProjects(ctx, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1ListAllProjectsResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1DisableReadonlyModeTemporarilyResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1CreateAProjectWithBodyWithResponse request with arbitrary body returning *V1CreateAProjectResponse
+func (c *ClientWithResponses) V1CreateAProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error) {
+ rsp, err := c.V1CreateAProjectWithBody(ctx, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1CreateAProjectResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1DisableReadonlyModeTemporarilyResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+func (c *ClientWithResponses) V1CreateAProjectWithResponse(ctx context.Context, body V1CreateAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error) {
+ rsp, err := c.V1CreateAProject(ctx, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1CreateAProjectResponse(rsp)
}
-type V1ListAvailableRestoreVersionsResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *GetProjectAvailableRestoreVersionsResponse
+// V1DeleteAProjectWithResponse request returning *V1DeleteAProjectResponse
+func (c *ClientWithResponses) V1DeleteAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteAProjectResponse, error) {
+ rsp, err := c.V1DeleteAProject(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1DeleteAProjectResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1ListAvailableRestoreVersionsResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetProjectWithResponse request returning *V1GetProjectResponse
+func (c *ClientWithResponses) V1GetProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectResponse, error) {
+ rsp, err := c.V1GetProject(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetProjectResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAvailableRestoreVersionsResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1GetPerformanceAdvisorsWithResponse request returning *V1GetPerformanceAdvisorsResponse
+func (c *ClientWithResponses) V1GetPerformanceAdvisorsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPerformanceAdvisorsResponse, error) {
+ rsp, err := c.V1GetPerformanceAdvisors(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1GetPerformanceAdvisorsResponse(rsp)
}
-type V1RestoreAProjectResponse struct {
- Body []byte
- HTTPResponse *http.Response
+// V1GetSecurityAdvisorsWithResponse request returning *V1GetSecurityAdvisorsResponse
+func (c *ClientWithResponses) V1GetSecurityAdvisorsWithResponse(ctx context.Context, ref string, params *V1GetSecurityAdvisorsParams, reqEditors ...RequestEditorFn) (*V1GetSecurityAdvisorsResponse, error) {
+ rsp, err := c.V1GetSecurityAdvisors(ctx, ref, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1GetSecurityAdvisorsResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1RestoreAProjectResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetProjectLogsWithResponse request returning *V1GetProjectLogsResponse
+func (c *ClientWithResponses) V1GetProjectLogsWithResponse(ctx context.Context, ref string, params *V1GetProjectLogsParams, reqEditors ...RequestEditorFn) (*V1GetProjectLogsResponse, error) {
+ rsp, err := c.V1GetProjectLogs(ctx, ref, params, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetProjectLogsResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1RestoreAProjectResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1GetProjectUsageApiCountWithResponse request returning *V1GetProjectUsageApiCountResponse
+func (c *ClientWithResponses) V1GetProjectUsageApiCountWithResponse(ctx context.Context, ref string, params *V1GetProjectUsageApiCountParams, reqEditors ...RequestEditorFn) (*V1GetProjectUsageApiCountResponse, error) {
+ rsp, err := c.V1GetProjectUsageApiCount(ctx, ref, params, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1GetProjectUsageApiCountResponse(rsp)
}
-type V1CancelAProjectRestorationResponse struct {
- Body []byte
- HTTPResponse *http.Response
+// V1GetProjectUsageRequestCountWithResponse request returning *V1GetProjectUsageRequestCountResponse
+func (c *ClientWithResponses) V1GetProjectUsageRequestCountWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectUsageRequestCountResponse, error) {
+ rsp, err := c.V1GetProjectUsageRequestCount(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1GetProjectUsageRequestCountResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1CancelAProjectRestorationResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetProjectApiKeysWithResponse request returning *V1GetProjectApiKeysResponse
+func (c *ClientWithResponses) V1GetProjectApiKeysWithResponse(ctx context.Context, ref string, params *V1GetProjectApiKeysParams, reqEditors ...RequestEditorFn) (*V1GetProjectApiKeysResponse, error) {
+ rsp, err := c.V1GetProjectApiKeys(ctx, ref, params, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetProjectApiKeysResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1CancelAProjectRestorationResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1CreateProjectApiKeyWithBodyWithResponse request with arbitrary body returning *V1CreateProjectApiKeyResponse
+func (c *ClientWithResponses) V1CreateProjectApiKeyWithBodyWithResponse(ctx context.Context, ref string, params *V1CreateProjectApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateProjectApiKeyResponse, error) {
+ rsp, err := c.V1CreateProjectApiKeyWithBody(ctx, ref, params, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1CreateProjectApiKeyResponse(rsp)
}
-type V1BulkDeleteSecretsResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *map[string]interface{}
+func (c *ClientWithResponses) V1CreateProjectApiKeyWithResponse(ctx context.Context, ref string, params *V1CreateProjectApiKeyParams, body V1CreateProjectApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateProjectApiKeyResponse, error) {
+ rsp, err := c.V1CreateProjectApiKey(ctx, ref, params, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1CreateProjectApiKeyResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1BulkDeleteSecretsResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetProjectLegacyApiKeysWithResponse request returning *V1GetProjectLegacyApiKeysResponse
+func (c *ClientWithResponses) V1GetProjectLegacyApiKeysWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectLegacyApiKeysResponse, error) {
+ rsp, err := c.V1GetProjectLegacyApiKeys(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetProjectLegacyApiKeysResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1BulkDeleteSecretsResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1UpdateProjectLegacyApiKeysWithResponse request returning *V1UpdateProjectLegacyApiKeysResponse
+func (c *ClientWithResponses) V1UpdateProjectLegacyApiKeysWithResponse(ctx context.Context, ref string, params *V1UpdateProjectLegacyApiKeysParams, reqEditors ...RequestEditorFn) (*V1UpdateProjectLegacyApiKeysResponse, error) {
+ rsp, err := c.V1UpdateProjectLegacyApiKeys(ctx, ref, params, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1UpdateProjectLegacyApiKeysResponse(rsp)
}
-type V1ListAllSecretsResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *[]SecretResponse
+// V1DeleteProjectApiKeyWithResponse request returning *V1DeleteProjectApiKeyResponse
+func (c *ClientWithResponses) V1DeleteProjectApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *V1DeleteProjectApiKeyParams, reqEditors ...RequestEditorFn) (*V1DeleteProjectApiKeyResponse, error) {
+ rsp, err := c.V1DeleteProjectApiKey(ctx, ref, id, params, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1DeleteProjectApiKeyResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1ListAllSecretsResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetProjectApiKeyWithResponse request returning *V1GetProjectApiKeyResponse
+func (c *ClientWithResponses) V1GetProjectApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *V1GetProjectApiKeyParams, reqEditors ...RequestEditorFn) (*V1GetProjectApiKeyResponse, error) {
+ rsp, err := c.V1GetProjectApiKey(ctx, ref, id, params, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetProjectApiKeyResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAllSecretsResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1UpdateProjectApiKeyWithBodyWithResponse request with arbitrary body returning *V1UpdateProjectApiKeyResponse
+func (c *ClientWithResponses) V1UpdateProjectApiKeyWithBodyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *V1UpdateProjectApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateProjectApiKeyResponse, error) {
+ rsp, err := c.V1UpdateProjectApiKeyWithBody(ctx, ref, id, params, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1UpdateProjectApiKeyResponse(rsp)
}
-type V1BulkCreateSecretsResponse struct {
- Body []byte
- HTTPResponse *http.Response
+func (c *ClientWithResponses) V1UpdateProjectApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *V1UpdateProjectApiKeyParams, body V1UpdateProjectApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateProjectApiKeyResponse, error) {
+ rsp, err := c.V1UpdateProjectApiKey(ctx, ref, id, params, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1UpdateProjectApiKeyResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1BulkCreateSecretsResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1ListProjectAddonsWithResponse request returning *V1ListProjectAddonsResponse
+func (c *ClientWithResponses) V1ListProjectAddonsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListProjectAddonsResponse, error) {
+ rsp, err := c.V1ListProjectAddons(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1ListProjectAddonsResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1BulkCreateSecretsResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1ApplyProjectAddonWithBodyWithResponse request with arbitrary body returning *V1ApplyProjectAddonResponse
+func (c *ClientWithResponses) V1ApplyProjectAddonWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ApplyProjectAddonResponse, error) {
+ rsp, err := c.V1ApplyProjectAddonWithBody(ctx, ref, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1ApplyProjectAddonResponse(rsp)
}
-type V1GetSslEnforcementConfigResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *SslEnforcementResponse
+func (c *ClientWithResponses) V1ApplyProjectAddonWithResponse(ctx context.Context, ref string, body V1ApplyProjectAddonJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ApplyProjectAddonResponse, error) {
+ rsp, err := c.V1ApplyProjectAddon(ctx, ref, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1ApplyProjectAddonResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1GetSslEnforcementConfigResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1RemoveProjectAddonWithResponse request returning *V1RemoveProjectAddonResponse
+func (c *ClientWithResponses) V1RemoveProjectAddonWithResponse(ctx context.Context, ref string, addonVariant interface{}, reqEditors ...RequestEditorFn) (*V1RemoveProjectAddonResponse, error) {
+ rsp, err := c.V1RemoveProjectAddon(ctx, ref, addonVariant, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1RemoveProjectAddonResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetSslEnforcementConfigResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1DisablePreviewBranchingWithResponse request returning *V1DisablePreviewBranchingResponse
+func (c *ClientWithResponses) V1DisablePreviewBranchingWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisablePreviewBranchingResponse, error) {
+ rsp, err := c.V1DisablePreviewBranching(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1DisablePreviewBranchingResponse(rsp)
}
-type V1UpdateSslEnforcementConfigResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *SslEnforcementResponse
+// V1ListAllBranchesWithResponse request returning *V1ListAllBranchesResponse
+func (c *ClientWithResponses) V1ListAllBranchesWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBranchesResponse, error) {
+ rsp, err := c.V1ListAllBranches(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1ListAllBranchesResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1UpdateSslEnforcementConfigResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1CreateABranchWithBodyWithResponse request with arbitrary body returning *V1CreateABranchResponse
+func (c *ClientWithResponses) V1CreateABranchWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateABranchResponse, error) {
+ rsp, err := c.V1CreateABranchWithBody(ctx, ref, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1CreateABranchResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpdateSslEnforcementConfigResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+func (c *ClientWithResponses) V1CreateABranchWithResponse(ctx context.Context, ref string, body V1CreateABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateABranchResponse, error) {
+ rsp, err := c.V1CreateABranch(ctx, ref, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1CreateABranchResponse(rsp)
}
-type V1ListAllBucketsResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *[]V1StorageBucketResponse
+// V1GetABranchWithResponse request returning *V1GetABranchResponse
+func (c *ClientWithResponses) V1GetABranchWithResponse(ctx context.Context, ref string, name string, reqEditors ...RequestEditorFn) (*V1GetABranchResponse, error) {
+ rsp, err := c.V1GetABranch(ctx, ref, name, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1GetABranchResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1ListAllBucketsResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1DeleteProjectClaimTokenWithResponse request returning *V1DeleteProjectClaimTokenResponse
+func (c *ClientWithResponses) V1DeleteProjectClaimTokenWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteProjectClaimTokenResponse, error) {
+ rsp, err := c.V1DeleteProjectClaimToken(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1DeleteProjectClaimTokenResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAllBucketsResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1GetProjectClaimTokenWithResponse request returning *V1GetProjectClaimTokenResponse
+func (c *ClientWithResponses) V1GetProjectClaimTokenWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectClaimTokenResponse, error) {
+ rsp, err := c.V1GetProjectClaimToken(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1GetProjectClaimTokenResponse(rsp)
}
-type V1GenerateTypescriptTypesResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *TypescriptResponse
+// V1CreateProjectClaimTokenWithResponse request returning *V1CreateProjectClaimTokenResponse
+func (c *ClientWithResponses) V1CreateProjectClaimTokenWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CreateProjectClaimTokenResponse, error) {
+ rsp, err := c.V1CreateProjectClaimToken(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1CreateProjectClaimTokenResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1GenerateTypescriptTypesResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetAuthServiceConfigWithResponse request returning *V1GetAuthServiceConfigResponse
+func (c *ClientWithResponses) V1GetAuthServiceConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetAuthServiceConfigResponse, error) {
+ rsp, err := c.V1GetAuthServiceConfig(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetAuthServiceConfigResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1GenerateTypescriptTypesResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1UpdateAuthServiceConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateAuthServiceConfigResponse
+func (c *ClientWithResponses) V1UpdateAuthServiceConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateAuthServiceConfigResponse, error) {
+ rsp, err := c.V1UpdateAuthServiceConfigWithBody(ctx, ref, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1UpdateAuthServiceConfigResponse(rsp)
}
-type V1UpgradePostgresVersionResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON201 *ProjectUpgradeInitiateResponse
+func (c *ClientWithResponses) V1UpdateAuthServiceConfigWithResponse(ctx context.Context, ref string, body V1UpdateAuthServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateAuthServiceConfigResponse, error) {
+ rsp, err := c.V1UpdateAuthServiceConfig(ctx, ref, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1UpdateAuthServiceConfigResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1UpgradePostgresVersionResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetProjectSigningKeysWithResponse request returning *V1GetProjectSigningKeysResponse
+func (c *ClientWithResponses) V1GetProjectSigningKeysWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectSigningKeysResponse, error) {
+ rsp, err := c.V1GetProjectSigningKeys(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetProjectSigningKeysResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1UpgradePostgresVersionResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1CreateProjectSigningKeyWithBodyWithResponse request with arbitrary body returning *V1CreateProjectSigningKeyResponse
+func (c *ClientWithResponses) V1CreateProjectSigningKeyWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateProjectSigningKeyResponse, error) {
+ rsp, err := c.V1CreateProjectSigningKeyWithBody(ctx, ref, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1CreateProjectSigningKeyResponse(rsp)
}
-type V1GetPostgresUpgradeEligibilityResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *ProjectUpgradeEligibilityResponse
+func (c *ClientWithResponses) V1CreateProjectSigningKeyWithResponse(ctx context.Context, ref string, body V1CreateProjectSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateProjectSigningKeyResponse, error) {
+ rsp, err := c.V1CreateProjectSigningKey(ctx, ref, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1CreateProjectSigningKeyResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1GetPostgresUpgradeEligibilityResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetLegacySigningKeyWithResponse request returning *V1GetLegacySigningKeyResponse
+func (c *ClientWithResponses) V1GetLegacySigningKeyWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetLegacySigningKeyResponse, error) {
+ rsp, err := c.V1GetLegacySigningKey(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetLegacySigningKeyResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetPostgresUpgradeEligibilityResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1CreateLegacySigningKeyWithResponse request returning *V1CreateLegacySigningKeyResponse
+func (c *ClientWithResponses) V1CreateLegacySigningKeyWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CreateLegacySigningKeyResponse, error) {
+ rsp, err := c.V1CreateLegacySigningKey(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1CreateLegacySigningKeyResponse(rsp)
}
-type V1GetPostgresUpgradeStatusResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *DatabaseUpgradeStatusResponse
+// V1RemoveProjectSigningKeyWithResponse request returning *V1RemoveProjectSigningKeyResponse
+func (c *ClientWithResponses) V1RemoveProjectSigningKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1RemoveProjectSigningKeyResponse, error) {
+ rsp, err := c.V1RemoveProjectSigningKey(ctx, ref, id, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1RemoveProjectSigningKeyResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1GetPostgresUpgradeStatusResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetProjectSigningKeyWithResponse request returning *V1GetProjectSigningKeyResponse
+func (c *ClientWithResponses) V1GetProjectSigningKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetProjectSigningKeyResponse, error) {
+ rsp, err := c.V1GetProjectSigningKey(ctx, ref, id, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetProjectSigningKeyResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetPostgresUpgradeStatusResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1UpdateProjectSigningKeyWithBodyWithResponse request with arbitrary body returning *V1UpdateProjectSigningKeyResponse
+func (c *ClientWithResponses) V1UpdateProjectSigningKeyWithBodyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateProjectSigningKeyResponse, error) {
+ rsp, err := c.V1UpdateProjectSigningKeyWithBody(ctx, ref, id, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1UpdateProjectSigningKeyResponse(rsp)
}
-type V1DeactivateVanitySubdomainConfigResponse struct {
- Body []byte
- HTTPResponse *http.Response
+func (c *ClientWithResponses) V1UpdateProjectSigningKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, body V1UpdateProjectSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateProjectSigningKeyResponse, error) {
+ rsp, err := c.V1UpdateProjectSigningKey(ctx, ref, id, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1UpdateProjectSigningKeyResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1DeactivateVanitySubdomainConfigResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1ListAllSsoProviderWithResponse request returning *V1ListAllSsoProviderResponse
+func (c *ClientWithResponses) V1ListAllSsoProviderWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllSsoProviderResponse, error) {
+ rsp, err := c.V1ListAllSsoProvider(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1ListAllSsoProviderResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1DeactivateVanitySubdomainConfigResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1CreateASsoProviderWithBodyWithResponse request with arbitrary body returning *V1CreateASsoProviderResponse
+func (c *ClientWithResponses) V1CreateASsoProviderWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateASsoProviderResponse, error) {
+ rsp, err := c.V1CreateASsoProviderWithBody(ctx, ref, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1CreateASsoProviderResponse(rsp)
}
-type V1GetVanitySubdomainConfigResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *VanitySubdomainConfigResponse
+func (c *ClientWithResponses) V1CreateASsoProviderWithResponse(ctx context.Context, ref string, body V1CreateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateASsoProviderResponse, error) {
+ rsp, err := c.V1CreateASsoProvider(ctx, ref, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1CreateASsoProviderResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1GetVanitySubdomainConfigResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1DeleteASsoProviderWithResponse request returning *V1DeleteASsoProviderResponse
+func (c *ClientWithResponses) V1DeleteASsoProviderWithResponse(ctx context.Context, ref string, providerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1DeleteASsoProviderResponse, error) {
+ rsp, err := c.V1DeleteASsoProvider(ctx, ref, providerId, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1DeleteASsoProviderResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetVanitySubdomainConfigResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1GetASsoProviderWithResponse request returning *V1GetASsoProviderResponse
+func (c *ClientWithResponses) V1GetASsoProviderWithResponse(ctx context.Context, ref string, providerId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetASsoProviderResponse, error) {
+ rsp, err := c.V1GetASsoProvider(ctx, ref, providerId, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1GetASsoProviderResponse(rsp)
}
-type V1ActivateVanitySubdomainConfigResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON201 *ActivateVanitySubdomainResponse
+// V1UpdateASsoProviderWithBodyWithResponse request with arbitrary body returning *V1UpdateASsoProviderResponse
+func (c *ClientWithResponses) V1UpdateASsoProviderWithBodyWithResponse(ctx context.Context, ref string, providerId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateASsoProviderResponse, error) {
+ rsp, err := c.V1UpdateASsoProviderWithBody(ctx, ref, providerId, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1UpdateASsoProviderResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1ActivateVanitySubdomainConfigResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+func (c *ClientWithResponses) V1UpdateASsoProviderWithResponse(ctx context.Context, ref string, providerId openapi_types.UUID, body V1UpdateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateASsoProviderResponse, error) {
+ rsp, err := c.V1UpdateASsoProvider(ctx, ref, providerId, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1UpdateASsoProviderResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1ActivateVanitySubdomainConfigResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1ListProjectTpaIntegrationsWithResponse request returning *V1ListProjectTpaIntegrationsResponse
+func (c *ClientWithResponses) V1ListProjectTpaIntegrationsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListProjectTpaIntegrationsResponse, error) {
+ rsp, err := c.V1ListProjectTpaIntegrations(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1ListProjectTpaIntegrationsResponse(rsp)
}
-type V1CheckVanitySubdomainAvailabilityResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON201 *SubdomainAvailabilityResponse
+// V1CreateProjectTpaIntegrationWithBodyWithResponse request with arbitrary body returning *V1CreateProjectTpaIntegrationResponse
+func (c *ClientWithResponses) V1CreateProjectTpaIntegrationWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateProjectTpaIntegrationResponse, error) {
+ rsp, err := c.V1CreateProjectTpaIntegrationWithBody(ctx, ref, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1CreateProjectTpaIntegrationResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1CheckVanitySubdomainAvailabilityResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+func (c *ClientWithResponses) V1CreateProjectTpaIntegrationWithResponse(ctx context.Context, ref string, body V1CreateProjectTpaIntegrationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateProjectTpaIntegrationResponse, error) {
+ rsp, err := c.V1CreateProjectTpaIntegration(ctx, ref, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1CreateProjectTpaIntegrationResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1CheckVanitySubdomainAvailabilityResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1DeleteProjectTpaIntegrationWithResponse request returning *V1DeleteProjectTpaIntegrationResponse
+func (c *ClientWithResponses) V1DeleteProjectTpaIntegrationWithResponse(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1DeleteProjectTpaIntegrationResponse, error) {
+ rsp, err := c.V1DeleteProjectTpaIntegration(ctx, ref, tpaId, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1DeleteProjectTpaIntegrationResponse(rsp)
}
-type V1ListAllSnippetsResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *SnippetList
+// V1GetProjectTpaIntegrationWithResponse request returning *V1GetProjectTpaIntegrationResponse
+func (c *ClientWithResponses) V1GetProjectTpaIntegrationWithResponse(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetProjectTpaIntegrationResponse, error) {
+ rsp, err := c.V1GetProjectTpaIntegration(ctx, ref, tpaId, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1GetProjectTpaIntegrationResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1ListAllSnippetsResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+// V1GetProjectPgbouncerConfigWithResponse request returning *V1GetProjectPgbouncerConfigResponse
+func (c *ClientWithResponses) V1GetProjectPgbouncerConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectPgbouncerConfigResponse, error) {
+ rsp, err := c.V1GetProjectPgbouncerConfig(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1GetProjectPgbouncerConfigResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1ListAllSnippetsResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1GetPoolerConfigWithResponse request returning *V1GetPoolerConfigResponse
+func (c *ClientWithResponses) V1GetPoolerConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPoolerConfigResponse, error) {
+ rsp, err := c.V1GetPoolerConfig(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1GetPoolerConfigResponse(rsp)
}
-type V1GetASnippetResponse struct {
- Body []byte
- HTTPResponse *http.Response
- JSON200 *SnippetResponse
+// V1UpdatePoolerConfigWithBodyWithResponse request with arbitrary body returning *V1UpdatePoolerConfigResponse
+func (c *ClientWithResponses) V1UpdatePoolerConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePoolerConfigResponse, error) {
+ rsp, err := c.V1UpdatePoolerConfigWithBody(ctx, ref, contentType, body, reqEditors...)
+ if err != nil {
+ return nil, err
+ }
+ return ParseV1UpdatePoolerConfigResponse(rsp)
}
-// Status returns HTTPResponse.Status
-func (r V1GetASnippetResponse) Status() string {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.Status
+func (c *ClientWithResponses) V1UpdatePoolerConfigWithResponse(ctx context.Context, ref string, body V1UpdatePoolerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePoolerConfigResponse, error) {
+ rsp, err := c.V1UpdatePoolerConfig(ctx, ref, body, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return http.StatusText(0)
+ return ParseV1UpdatePoolerConfigResponse(rsp)
}
-// StatusCode returns HTTPResponse.StatusCode
-func (r V1GetASnippetResponse) StatusCode() int {
- if r.HTTPResponse != nil {
- return r.HTTPResponse.StatusCode
+// V1GetPostgresConfigWithResponse request returning *V1GetPostgresConfigResponse
+func (c *ClientWithResponses) V1GetPostgresConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgresConfigResponse, error) {
+ rsp, err := c.V1GetPostgresConfig(ctx, ref, reqEditors...)
+ if err != nil {
+ return nil, err
}
- return 0
+ return ParseV1GetPostgresConfigResponse(rsp)
}
-// V1DeleteABranchWithResponse request returning *V1DeleteABranchResponse
-func (c *ClientWithResponses) V1DeleteABranchWithResponse(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*V1DeleteABranchResponse, error) {
- rsp, err := c.V1DeleteABranch(ctx, branchId, reqEditors...)
+// V1UpdatePostgresConfigWithBodyWithResponse request with arbitrary body returning *V1UpdatePostgresConfigResponse
+func (c *ClientWithResponses) V1UpdatePostgresConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error) {
+ rsp, err := c.V1UpdatePostgresConfigWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1DeleteABranchResponse(rsp)
+ return ParseV1UpdatePostgresConfigResponse(rsp)
}
-// V1GetABranchConfigWithResponse request returning *V1GetABranchConfigResponse
-func (c *ClientWithResponses) V1GetABranchConfigWithResponse(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*V1GetABranchConfigResponse, error) {
- rsp, err := c.V1GetABranchConfig(ctx, branchId, reqEditors...)
+func (c *ClientWithResponses) V1UpdatePostgresConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgresConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error) {
+ rsp, err := c.V1UpdatePostgresConfig(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetABranchConfigResponse(rsp)
+ return ParseV1UpdatePostgresConfigResponse(rsp)
}
-// V1UpdateABranchConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateABranchConfigResponse
-func (c *ClientWithResponses) V1UpdateABranchConfigWithBodyWithResponse(ctx context.Context, branchId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateABranchConfigResponse, error) {
- rsp, err := c.V1UpdateABranchConfigWithBody(ctx, branchId, contentType, body, reqEditors...)
+// V1GetStorageConfigWithResponse request returning *V1GetStorageConfigResponse
+func (c *ClientWithResponses) V1GetStorageConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetStorageConfigResponse, error) {
+ rsp, err := c.V1GetStorageConfig(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateABranchConfigResponse(rsp)
+ return ParseV1GetStorageConfigResponse(rsp)
}
-func (c *ClientWithResponses) V1UpdateABranchConfigWithResponse(ctx context.Context, branchId string, body V1UpdateABranchConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateABranchConfigResponse, error) {
- rsp, err := c.V1UpdateABranchConfig(ctx, branchId, body, reqEditors...)
+// V1UpdateStorageConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateStorageConfigResponse
+func (c *ClientWithResponses) V1UpdateStorageConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error) {
+ rsp, err := c.V1UpdateStorageConfigWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateABranchConfigResponse(rsp)
+ return ParseV1UpdateStorageConfigResponse(rsp)
}
-// V1PushABranchWithResponse request returning *V1PushABranchResponse
-func (c *ClientWithResponses) V1PushABranchWithResponse(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*V1PushABranchResponse, error) {
- rsp, err := c.V1PushABranch(ctx, branchId, reqEditors...)
+func (c *ClientWithResponses) V1UpdateStorageConfigWithResponse(ctx context.Context, ref string, body V1UpdateStorageConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error) {
+ rsp, err := c.V1UpdateStorageConfig(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1PushABranchResponse(rsp)
+ return ParseV1UpdateStorageConfigResponse(rsp)
}
-// V1ResetABranchWithResponse request returning *V1ResetABranchResponse
-func (c *ClientWithResponses) V1ResetABranchWithResponse(ctx context.Context, branchId string, reqEditors ...RequestEditorFn) (*V1ResetABranchResponse, error) {
- rsp, err := c.V1ResetABranch(ctx, branchId, reqEditors...)
+// V1DeleteHostnameConfigWithResponse request returning *V1DeleteHostnameConfigResponse
+func (c *ClientWithResponses) V1DeleteHostnameConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteHostnameConfigResponse, error) {
+ rsp, err := c.V1DeleteHostnameConfig(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ResetABranchResponse(rsp)
+ return ParseV1DeleteHostnameConfigResponse(rsp)
}
-// V1AuthorizeUserWithResponse request returning *V1AuthorizeUserResponse
-func (c *ClientWithResponses) V1AuthorizeUserWithResponse(ctx context.Context, params *V1AuthorizeUserParams, reqEditors ...RequestEditorFn) (*V1AuthorizeUserResponse, error) {
- rsp, err := c.V1AuthorizeUser(ctx, params, reqEditors...)
+// V1GetHostnameConfigWithResponse request returning *V1GetHostnameConfigResponse
+func (c *ClientWithResponses) V1GetHostnameConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetHostnameConfigResponse, error) {
+ rsp, err := c.V1GetHostnameConfig(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1AuthorizeUserResponse(rsp)
+ return ParseV1GetHostnameConfigResponse(rsp)
}
-// V1RevokeTokenWithBodyWithResponse request with arbitrary body returning *V1RevokeTokenResponse
-func (c *ClientWithResponses) V1RevokeTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RevokeTokenResponse, error) {
- rsp, err := c.V1RevokeTokenWithBody(ctx, contentType, body, reqEditors...)
+// V1ActivateCustomHostnameWithResponse request returning *V1ActivateCustomHostnameResponse
+func (c *ClientWithResponses) V1ActivateCustomHostnameWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ActivateCustomHostnameResponse, error) {
+ rsp, err := c.V1ActivateCustomHostname(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1RevokeTokenResponse(rsp)
+ return ParseV1ActivateCustomHostnameResponse(rsp)
}
-func (c *ClientWithResponses) V1RevokeTokenWithResponse(ctx context.Context, body V1RevokeTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RevokeTokenResponse, error) {
- rsp, err := c.V1RevokeToken(ctx, body, reqEditors...)
+// V1UpdateHostnameConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateHostnameConfigResponse
+func (c *ClientWithResponses) V1UpdateHostnameConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error) {
+ rsp, err := c.V1UpdateHostnameConfigWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1RevokeTokenResponse(rsp)
+ return ParseV1UpdateHostnameConfigResponse(rsp)
}
-// V1ExchangeOauthTokenWithBodyWithResponse request with arbitrary body returning *V1ExchangeOauthTokenResponse
-func (c *ClientWithResponses) V1ExchangeOauthTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ExchangeOauthTokenResponse, error) {
- rsp, err := c.V1ExchangeOauthTokenWithBody(ctx, contentType, body, reqEditors...)
+func (c *ClientWithResponses) V1UpdateHostnameConfigWithResponse(ctx context.Context, ref string, body V1UpdateHostnameConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error) {
+ rsp, err := c.V1UpdateHostnameConfig(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ExchangeOauthTokenResponse(rsp)
+ return ParseV1UpdateHostnameConfigResponse(rsp)
}
-func (c *ClientWithResponses) V1ExchangeOauthTokenWithFormdataBodyWithResponse(ctx context.Context, body V1ExchangeOauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*V1ExchangeOauthTokenResponse, error) {
- rsp, err := c.V1ExchangeOauthTokenWithFormdataBody(ctx, body, reqEditors...)
+// V1VerifyDnsConfigWithResponse request returning *V1VerifyDnsConfigResponse
+func (c *ClientWithResponses) V1VerifyDnsConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1VerifyDnsConfigResponse, error) {
+ rsp, err := c.V1VerifyDnsConfig(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ExchangeOauthTokenResponse(rsp)
+ return ParseV1VerifyDnsConfigResponse(rsp)
}
-// V1ListAllOrganizationsWithResponse request returning *V1ListAllOrganizationsResponse
-func (c *ClientWithResponses) V1ListAllOrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*V1ListAllOrganizationsResponse, error) {
- rsp, err := c.V1ListAllOrganizations(ctx, reqEditors...)
+// V1ListAllBackupsWithResponse request returning *V1ListAllBackupsResponse
+func (c *ClientWithResponses) V1ListAllBackupsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBackupsResponse, error) {
+ rsp, err := c.V1ListAllBackups(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ListAllOrganizationsResponse(rsp)
+ return ParseV1ListAllBackupsResponse(rsp)
}
-// V1CreateAnOrganizationWithBodyWithResponse request with arbitrary body returning *V1CreateAnOrganizationResponse
-func (c *ClientWithResponses) V1CreateAnOrganizationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAnOrganizationResponse, error) {
- rsp, err := c.V1CreateAnOrganizationWithBody(ctx, contentType, body, reqEditors...)
+// V1RestorePitrBackupWithBodyWithResponse request with arbitrary body returning *V1RestorePitrBackupResponse
+func (c *ClientWithResponses) V1RestorePitrBackupWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error) {
+ rsp, err := c.V1RestorePitrBackupWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1CreateAnOrganizationResponse(rsp)
+ return ParseV1RestorePitrBackupResponse(rsp)
}
-func (c *ClientWithResponses) V1CreateAnOrganizationWithResponse(ctx context.Context, body V1CreateAnOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAnOrganizationResponse, error) {
- rsp, err := c.V1CreateAnOrganization(ctx, body, reqEditors...)
+func (c *ClientWithResponses) V1RestorePitrBackupWithResponse(ctx context.Context, ref string, body V1RestorePitrBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error) {
+ rsp, err := c.V1RestorePitrBackup(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1CreateAnOrganizationResponse(rsp)
+ return ParseV1RestorePitrBackupResponse(rsp)
}
-// V1GetAnOrganizationWithResponse request returning *V1GetAnOrganizationResponse
-func (c *ClientWithResponses) V1GetAnOrganizationWithResponse(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*V1GetAnOrganizationResponse, error) {
- rsp, err := c.V1GetAnOrganization(ctx, slug, reqEditors...)
+// V1GetRestorePointWithResponse request returning *V1GetRestorePointResponse
+func (c *ClientWithResponses) V1GetRestorePointWithResponse(ctx context.Context, ref string, params *V1GetRestorePointParams, reqEditors ...RequestEditorFn) (*V1GetRestorePointResponse, error) {
+ rsp, err := c.V1GetRestorePoint(ctx, ref, params, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetAnOrganizationResponse(rsp)
+ return ParseV1GetRestorePointResponse(rsp)
}
-// V1ListOrganizationMembersWithResponse request returning *V1ListOrganizationMembersResponse
-func (c *ClientWithResponses) V1ListOrganizationMembersWithResponse(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*V1ListOrganizationMembersResponse, error) {
- rsp, err := c.V1ListOrganizationMembers(ctx, slug, reqEditors...)
+// V1CreateRestorePointWithBodyWithResponse request with arbitrary body returning *V1CreateRestorePointResponse
+func (c *ClientWithResponses) V1CreateRestorePointWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateRestorePointResponse, error) {
+ rsp, err := c.V1CreateRestorePointWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ListOrganizationMembersResponse(rsp)
+ return ParseV1CreateRestorePointResponse(rsp)
}
-// V1ListAllProjectsWithResponse request returning *V1ListAllProjectsResponse
-func (c *ClientWithResponses) V1ListAllProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*V1ListAllProjectsResponse, error) {
- rsp, err := c.V1ListAllProjects(ctx, reqEditors...)
+func (c *ClientWithResponses) V1CreateRestorePointWithResponse(ctx context.Context, ref string, body V1CreateRestorePointJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateRestorePointResponse, error) {
+ rsp, err := c.V1CreateRestorePoint(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ListAllProjectsResponse(rsp)
+ return ParseV1CreateRestorePointResponse(rsp)
}
-// V1CreateAProjectWithBodyWithResponse request with arbitrary body returning *V1CreateAProjectResponse
-func (c *ClientWithResponses) V1CreateAProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error) {
- rsp, err := c.V1CreateAProjectWithBody(ctx, contentType, body, reqEditors...)
+// V1UndoWithBodyWithResponse request with arbitrary body returning *V1UndoResponse
+func (c *ClientWithResponses) V1UndoWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UndoResponse, error) {
+ rsp, err := c.V1UndoWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1CreateAProjectResponse(rsp)
+ return ParseV1UndoResponse(rsp)
}
-func (c *ClientWithResponses) V1CreateAProjectWithResponse(ctx context.Context, body V1CreateAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error) {
- rsp, err := c.V1CreateAProject(ctx, body, reqEditors...)
+func (c *ClientWithResponses) V1UndoWithResponse(ctx context.Context, ref string, body V1UndoJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UndoResponse, error) {
+ rsp, err := c.V1Undo(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1CreateAProjectResponse(rsp)
+ return ParseV1UndoResponse(rsp)
}
-// V1DeleteAProjectWithResponse request returning *V1DeleteAProjectResponse
-func (c *ClientWithResponses) V1DeleteAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteAProjectResponse, error) {
- rsp, err := c.V1DeleteAProject(ctx, ref, reqEditors...)
+// V1GetDatabaseMetadataWithResponse request returning *V1GetDatabaseMetadataResponse
+func (c *ClientWithResponses) V1GetDatabaseMetadataWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetDatabaseMetadataResponse, error) {
+ rsp, err := c.V1GetDatabaseMetadata(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1DeleteAProjectResponse(rsp)
+ return ParseV1GetDatabaseMetadataResponse(rsp)
}
-// V1GetProjectWithResponse request returning *V1GetProjectResponse
-func (c *ClientWithResponses) V1GetProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectResponse, error) {
- rsp, err := c.V1GetProject(ctx, ref, reqEditors...)
+// V1GetJitAccessWithResponse request returning *V1GetJitAccessResponse
+func (c *ClientWithResponses) V1GetJitAccessWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetJitAccessResponse, error) {
+ rsp, err := c.V1GetJitAccess(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetProjectResponse(rsp)
+ return ParseV1GetJitAccessResponse(rsp)
}
-// GetLogsWithResponse request returning *GetLogsResponse
-func (c *ClientWithResponses) GetLogsWithResponse(ctx context.Context, ref string, params *GetLogsParams, reqEditors ...RequestEditorFn) (*GetLogsResponse, error) {
- rsp, err := c.GetLogs(ctx, ref, params, reqEditors...)
+// V1UpdateJitAccessWithBodyWithResponse request with arbitrary body returning *V1UpdateJitAccessResponse
+func (c *ClientWithResponses) V1UpdateJitAccessWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateJitAccessResponse, error) {
+ rsp, err := c.V1UpdateJitAccessWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseGetLogsResponse(rsp)
+ return ParseV1UpdateJitAccessResponse(rsp)
}
-// V1GetProjectApiKeysWithResponse request returning *V1GetProjectApiKeysResponse
-func (c *ClientWithResponses) V1GetProjectApiKeysWithResponse(ctx context.Context, ref string, params *V1GetProjectApiKeysParams, reqEditors ...RequestEditorFn) (*V1GetProjectApiKeysResponse, error) {
- rsp, err := c.V1GetProjectApiKeys(ctx, ref, params, reqEditors...)
+func (c *ClientWithResponses) V1UpdateJitAccessWithResponse(ctx context.Context, ref string, body V1UpdateJitAccessJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateJitAccessResponse, error) {
+ rsp, err := c.V1UpdateJitAccess(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetProjectApiKeysResponse(rsp)
+ return ParseV1UpdateJitAccessResponse(rsp)
}
-// CreateApiKeyWithBodyWithResponse request with arbitrary body returning *CreateApiKeyResponse
-func (c *ClientWithResponses) CreateApiKeyWithBodyWithResponse(ctx context.Context, ref string, params *CreateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) {
- rsp, err := c.CreateApiKeyWithBody(ctx, ref, params, contentType, body, reqEditors...)
+// V1ListJitAccessWithResponse request returning *V1ListJitAccessResponse
+func (c *ClientWithResponses) V1ListJitAccessWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListJitAccessResponse, error) {
+ rsp, err := c.V1ListJitAccess(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseCreateApiKeyResponse(rsp)
+ return ParseV1ListJitAccessResponse(rsp)
}
-func (c *ClientWithResponses) CreateApiKeyWithResponse(ctx context.Context, ref string, params *CreateApiKeyParams, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) {
- rsp, err := c.CreateApiKey(ctx, ref, params, body, reqEditors...)
+// V1DeleteJitAccessWithResponse request returning *V1DeleteJitAccessResponse
+func (c *ClientWithResponses) V1DeleteJitAccessWithResponse(ctx context.Context, ref string, userId openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1DeleteJitAccessResponse, error) {
+ rsp, err := c.V1DeleteJitAccess(ctx, ref, userId, reqEditors...)
if err != nil {
return nil, err
}
- return ParseCreateApiKeyResponse(rsp)
+ return ParseV1DeleteJitAccessResponse(rsp)
}
-// DeleteApiKeyWithResponse request returning *DeleteApiKeyResponse
-func (c *ClientWithResponses) DeleteApiKeyWithResponse(ctx context.Context, ref string, id string, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error) {
- rsp, err := c.DeleteApiKey(ctx, ref, id, params, reqEditors...)
+// V1ListMigrationHistoryWithResponse request returning *V1ListMigrationHistoryResponse
+func (c *ClientWithResponses) V1ListMigrationHistoryWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListMigrationHistoryResponse, error) {
+ rsp, err := c.V1ListMigrationHistory(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseDeleteApiKeyResponse(rsp)
+ return ParseV1ListMigrationHistoryResponse(rsp)
}
-// GetApiKeyWithResponse request returning *GetApiKeyResponse
-func (c *ClientWithResponses) GetApiKeyWithResponse(ctx context.Context, ref string, id string, params *GetApiKeyParams, reqEditors ...RequestEditorFn) (*GetApiKeyResponse, error) {
- rsp, err := c.GetApiKey(ctx, ref, id, params, reqEditors...)
+// V1ApplyAMigrationWithBodyWithResponse request with arbitrary body returning *V1ApplyAMigrationResponse
+func (c *ClientWithResponses) V1ApplyAMigrationWithBodyWithResponse(ctx context.Context, ref string, params *V1ApplyAMigrationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ApplyAMigrationResponse, error) {
+ rsp, err := c.V1ApplyAMigrationWithBody(ctx, ref, params, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseGetApiKeyResponse(rsp)
+ return ParseV1ApplyAMigrationResponse(rsp)
}
-// UpdateApiKeyWithBodyWithResponse request with arbitrary body returning *UpdateApiKeyResponse
-func (c *ClientWithResponses) UpdateApiKeyWithBodyWithResponse(ctx context.Context, ref string, id string, params *UpdateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error) {
- rsp, err := c.UpdateApiKeyWithBody(ctx, ref, id, params, contentType, body, reqEditors...)
+func (c *ClientWithResponses) V1ApplyAMigrationWithResponse(ctx context.Context, ref string, params *V1ApplyAMigrationParams, body V1ApplyAMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ApplyAMigrationResponse, error) {
+ rsp, err := c.V1ApplyAMigration(ctx, ref, params, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseUpdateApiKeyResponse(rsp)
+ return ParseV1ApplyAMigrationResponse(rsp)
}
-func (c *ClientWithResponses) UpdateApiKeyWithResponse(ctx context.Context, ref string, id string, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error) {
- rsp, err := c.UpdateApiKey(ctx, ref, id, params, body, reqEditors...)
+// V1UpsertAMigrationWithBodyWithResponse request with arbitrary body returning *V1UpsertAMigrationResponse
+func (c *ClientWithResponses) V1UpsertAMigrationWithBodyWithResponse(ctx context.Context, ref string, params *V1UpsertAMigrationParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpsertAMigrationResponse, error) {
+ rsp, err := c.V1UpsertAMigrationWithBody(ctx, ref, params, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseUpdateApiKeyResponse(rsp)
+ return ParseV1UpsertAMigrationResponse(rsp)
}
-// V1DisablePreviewBranchingWithResponse request returning *V1DisablePreviewBranchingResponse
-func (c *ClientWithResponses) V1DisablePreviewBranchingWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisablePreviewBranchingResponse, error) {
- rsp, err := c.V1DisablePreviewBranching(ctx, ref, reqEditors...)
+func (c *ClientWithResponses) V1UpsertAMigrationWithResponse(ctx context.Context, ref string, params *V1UpsertAMigrationParams, body V1UpsertAMigrationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpsertAMigrationResponse, error) {
+ rsp, err := c.V1UpsertAMigration(ctx, ref, params, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1DisablePreviewBranchingResponse(rsp)
+ return ParseV1UpsertAMigrationResponse(rsp)
}
-// V1ListAllBranchesWithResponse request returning *V1ListAllBranchesResponse
-func (c *ClientWithResponses) V1ListAllBranchesWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBranchesResponse, error) {
- rsp, err := c.V1ListAllBranches(ctx, ref, reqEditors...)
+// V1RunAQueryWithBodyWithResponse request with arbitrary body returning *V1RunAQueryResponse
+func (c *ClientWithResponses) V1RunAQueryWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error) {
+ rsp, err := c.V1RunAQueryWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ListAllBranchesResponse(rsp)
+ return ParseV1RunAQueryResponse(rsp)
}
-// V1CreateABranchWithBodyWithResponse request with arbitrary body returning *V1CreateABranchResponse
-func (c *ClientWithResponses) V1CreateABranchWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateABranchResponse, error) {
- rsp, err := c.V1CreateABranchWithBody(ctx, ref, contentType, body, reqEditors...)
+func (c *ClientWithResponses) V1RunAQueryWithResponse(ctx context.Context, ref string, body V1RunAQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error) {
+ rsp, err := c.V1RunAQuery(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1CreateABranchResponse(rsp)
+ return ParseV1RunAQueryResponse(rsp)
}
-func (c *ClientWithResponses) V1CreateABranchWithResponse(ctx context.Context, ref string, body V1CreateABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateABranchResponse, error) {
- rsp, err := c.V1CreateABranch(ctx, ref, body, reqEditors...)
+// V1EnableDatabaseWebhookWithResponse request returning *V1EnableDatabaseWebhookResponse
+func (c *ClientWithResponses) V1EnableDatabaseWebhookWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1EnableDatabaseWebhookResponse, error) {
+ rsp, err := c.V1EnableDatabaseWebhook(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1CreateABranchResponse(rsp)
+ return ParseV1EnableDatabaseWebhookResponse(rsp)
}
-// V1GetAuthServiceConfigWithResponse request returning *V1GetAuthServiceConfigResponse
-func (c *ClientWithResponses) V1GetAuthServiceConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetAuthServiceConfigResponse, error) {
- rsp, err := c.V1GetAuthServiceConfig(ctx, ref, reqEditors...)
+// V1ListAllFunctionsWithResponse request returning *V1ListAllFunctionsResponse
+func (c *ClientWithResponses) V1ListAllFunctionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllFunctionsResponse, error) {
+ rsp, err := c.V1ListAllFunctions(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetAuthServiceConfigResponse(rsp)
+ return ParseV1ListAllFunctionsResponse(rsp)
}
-// V1UpdateAuthServiceConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateAuthServiceConfigResponse
-func (c *ClientWithResponses) V1UpdateAuthServiceConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateAuthServiceConfigResponse, error) {
- rsp, err := c.V1UpdateAuthServiceConfigWithBody(ctx, ref, contentType, body, reqEditors...)
+// V1CreateAFunctionWithBodyWithResponse request with arbitrary body returning *V1CreateAFunctionResponse
+func (c *ClientWithResponses) V1CreateAFunctionWithBodyWithResponse(ctx context.Context, ref string, params *V1CreateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAFunctionResponse, error) {
+ rsp, err := c.V1CreateAFunctionWithBody(ctx, ref, params, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateAuthServiceConfigResponse(rsp)
+ return ParseV1CreateAFunctionResponse(rsp)
}
-func (c *ClientWithResponses) V1UpdateAuthServiceConfigWithResponse(ctx context.Context, ref string, body V1UpdateAuthServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateAuthServiceConfigResponse, error) {
- rsp, err := c.V1UpdateAuthServiceConfig(ctx, ref, body, reqEditors...)
+func (c *ClientWithResponses) V1CreateAFunctionWithResponse(ctx context.Context, ref string, params *V1CreateAFunctionParams, body V1CreateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAFunctionResponse, error) {
+ rsp, err := c.V1CreateAFunction(ctx, ref, params, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateAuthServiceConfigResponse(rsp)
+ return ParseV1CreateAFunctionResponse(rsp)
}
-// V1ListAllSsoProviderWithResponse request returning *V1ListAllSsoProviderResponse
-func (c *ClientWithResponses) V1ListAllSsoProviderWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllSsoProviderResponse, error) {
- rsp, err := c.V1ListAllSsoProvider(ctx, ref, reqEditors...)
+// V1BulkUpdateFunctionsWithBodyWithResponse request with arbitrary body returning *V1BulkUpdateFunctionsResponse
+func (c *ClientWithResponses) V1BulkUpdateFunctionsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkUpdateFunctionsResponse, error) {
+ rsp, err := c.V1BulkUpdateFunctionsWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ListAllSsoProviderResponse(rsp)
+ return ParseV1BulkUpdateFunctionsResponse(rsp)
}
-// V1CreateASsoProviderWithBodyWithResponse request with arbitrary body returning *V1CreateASsoProviderResponse
-func (c *ClientWithResponses) V1CreateASsoProviderWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateASsoProviderResponse, error) {
- rsp, err := c.V1CreateASsoProviderWithBody(ctx, ref, contentType, body, reqEditors...)
+func (c *ClientWithResponses) V1BulkUpdateFunctionsWithResponse(ctx context.Context, ref string, body V1BulkUpdateFunctionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkUpdateFunctionsResponse, error) {
+ rsp, err := c.V1BulkUpdateFunctions(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1CreateASsoProviderResponse(rsp)
+ return ParseV1BulkUpdateFunctionsResponse(rsp)
}
-func (c *ClientWithResponses) V1CreateASsoProviderWithResponse(ctx context.Context, ref string, body V1CreateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateASsoProviderResponse, error) {
- rsp, err := c.V1CreateASsoProvider(ctx, ref, body, reqEditors...)
+// V1DeployAFunctionWithBodyWithResponse request with arbitrary body returning *V1DeployAFunctionResponse
+func (c *ClientWithResponses) V1DeployAFunctionWithBodyWithResponse(ctx context.Context, ref string, params *V1DeployAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1DeployAFunctionResponse, error) {
+ rsp, err := c.V1DeployAFunctionWithBody(ctx, ref, params, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1CreateASsoProviderResponse(rsp)
+ return ParseV1DeployAFunctionResponse(rsp)
}
-// V1DeleteASsoProviderWithResponse request returning *V1DeleteASsoProviderResponse
-func (c *ClientWithResponses) V1DeleteASsoProviderWithResponse(ctx context.Context, ref string, providerId string, reqEditors ...RequestEditorFn) (*V1DeleteASsoProviderResponse, error) {
- rsp, err := c.V1DeleteASsoProvider(ctx, ref, providerId, reqEditors...)
+// V1DeleteAFunctionWithResponse request returning *V1DeleteAFunctionResponse
+func (c *ClientWithResponses) V1DeleteAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1DeleteAFunctionResponse, error) {
+ rsp, err := c.V1DeleteAFunction(ctx, ref, functionSlug, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1DeleteASsoProviderResponse(rsp)
+ return ParseV1DeleteAFunctionResponse(rsp)
}
-// V1GetASsoProviderWithResponse request returning *V1GetASsoProviderResponse
-func (c *ClientWithResponses) V1GetASsoProviderWithResponse(ctx context.Context, ref string, providerId string, reqEditors ...RequestEditorFn) (*V1GetASsoProviderResponse, error) {
- rsp, err := c.V1GetASsoProvider(ctx, ref, providerId, reqEditors...)
+// V1GetAFunctionWithResponse request returning *V1GetAFunctionResponse
+func (c *ClientWithResponses) V1GetAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1GetAFunctionResponse, error) {
+ rsp, err := c.V1GetAFunction(ctx, ref, functionSlug, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetASsoProviderResponse(rsp)
+ return ParseV1GetAFunctionResponse(rsp)
}
-// V1UpdateASsoProviderWithBodyWithResponse request with arbitrary body returning *V1UpdateASsoProviderResponse
-func (c *ClientWithResponses) V1UpdateASsoProviderWithBodyWithResponse(ctx context.Context, ref string, providerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateASsoProviderResponse, error) {
- rsp, err := c.V1UpdateASsoProviderWithBody(ctx, ref, providerId, contentType, body, reqEditors...)
+// V1UpdateAFunctionWithBodyWithResponse request with arbitrary body returning *V1UpdateAFunctionResponse
+func (c *ClientWithResponses) V1UpdateAFunctionWithBodyWithResponse(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateAFunctionResponse, error) {
+ rsp, err := c.V1UpdateAFunctionWithBody(ctx, ref, functionSlug, params, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateASsoProviderResponse(rsp)
+ return ParseV1UpdateAFunctionResponse(rsp)
}
-func (c *ClientWithResponses) V1UpdateASsoProviderWithResponse(ctx context.Context, ref string, providerId string, body V1UpdateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateASsoProviderResponse, error) {
- rsp, err := c.V1UpdateASsoProvider(ctx, ref, providerId, body, reqEditors...)
+func (c *ClientWithResponses) V1UpdateAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, body V1UpdateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateAFunctionResponse, error) {
+ rsp, err := c.V1UpdateAFunction(ctx, ref, functionSlug, params, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateASsoProviderResponse(rsp)
+ return ParseV1UpdateAFunctionResponse(rsp)
}
-// ListTPAForProjectWithResponse request returning *ListTPAForProjectResponse
-func (c *ClientWithResponses) ListTPAForProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*ListTPAForProjectResponse, error) {
- rsp, err := c.ListTPAForProject(ctx, ref, reqEditors...)
+// V1GetAFunctionBodyWithResponse request returning *V1GetAFunctionBodyResponse
+func (c *ClientWithResponses) V1GetAFunctionBodyWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1GetAFunctionBodyResponse, error) {
+ rsp, err := c.V1GetAFunctionBody(ctx, ref, functionSlug, reqEditors...)
if err != nil {
return nil, err
}
- return ParseListTPAForProjectResponse(rsp)
+ return ParseV1GetAFunctionBodyResponse(rsp)
}
-// CreateTPAForProjectWithBodyWithResponse request with arbitrary body returning *CreateTPAForProjectResponse
-func (c *ClientWithResponses) CreateTPAForProjectWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTPAForProjectResponse, error) {
- rsp, err := c.CreateTPAForProjectWithBody(ctx, ref, contentType, body, reqEditors...)
+// V1GetServicesHealthWithResponse request returning *V1GetServicesHealthResponse
+func (c *ClientWithResponses) V1GetServicesHealthWithResponse(ctx context.Context, ref string, params *V1GetServicesHealthParams, reqEditors ...RequestEditorFn) (*V1GetServicesHealthResponse, error) {
+ rsp, err := c.V1GetServicesHealth(ctx, ref, params, reqEditors...)
if err != nil {
return nil, err
}
- return ParseCreateTPAForProjectResponse(rsp)
+ return ParseV1GetServicesHealthResponse(rsp)
}
-func (c *ClientWithResponses) CreateTPAForProjectWithResponse(ctx context.Context, ref string, body CreateTPAForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTPAForProjectResponse, error) {
- rsp, err := c.CreateTPAForProject(ctx, ref, body, reqEditors...)
+// V1DeleteNetworkBansWithBodyWithResponse request with arbitrary body returning *V1DeleteNetworkBansResponse
+func (c *ClientWithResponses) V1DeleteNetworkBansWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1DeleteNetworkBansResponse, error) {
+ rsp, err := c.V1DeleteNetworkBansWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseCreateTPAForProjectResponse(rsp)
+ return ParseV1DeleteNetworkBansResponse(rsp)
}
-// DeleteTPAForProjectWithResponse request returning *DeleteTPAForProjectResponse
-func (c *ClientWithResponses) DeleteTPAForProjectWithResponse(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*DeleteTPAForProjectResponse, error) {
- rsp, err := c.DeleteTPAForProject(ctx, ref, tpaId, reqEditors...)
+func (c *ClientWithResponses) V1DeleteNetworkBansWithResponse(ctx context.Context, ref string, body V1DeleteNetworkBansJSONRequestBody, reqEditors ...RequestEditorFn) (*V1DeleteNetworkBansResponse, error) {
+ rsp, err := c.V1DeleteNetworkBans(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseDeleteTPAForProjectResponse(rsp)
+ return ParseV1DeleteNetworkBansResponse(rsp)
}
-// GetTPAForProjectWithResponse request returning *GetTPAForProjectResponse
-func (c *ClientWithResponses) GetTPAForProjectWithResponse(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*GetTPAForProjectResponse, error) {
- rsp, err := c.GetTPAForProject(ctx, ref, tpaId, reqEditors...)
+// V1ListAllNetworkBansWithResponse request returning *V1ListAllNetworkBansResponse
+func (c *ClientWithResponses) V1ListAllNetworkBansWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllNetworkBansResponse, error) {
+ rsp, err := c.V1ListAllNetworkBans(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseGetTPAForProjectResponse(rsp)
+ return ParseV1ListAllNetworkBansResponse(rsp)
}
-// V1GetProjectPgbouncerConfigWithResponse request returning *V1GetProjectPgbouncerConfigResponse
-func (c *ClientWithResponses) V1GetProjectPgbouncerConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectPgbouncerConfigResponse, error) {
- rsp, err := c.V1GetProjectPgbouncerConfig(ctx, ref, reqEditors...)
+// V1ListAllNetworkBansEnrichedWithResponse request returning *V1ListAllNetworkBansEnrichedResponse
+func (c *ClientWithResponses) V1ListAllNetworkBansEnrichedWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllNetworkBansEnrichedResponse, error) {
+ rsp, err := c.V1ListAllNetworkBansEnriched(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetProjectPgbouncerConfigResponse(rsp)
+ return ParseV1ListAllNetworkBansEnrichedResponse(rsp)
}
-// V1GetSupavisorConfigWithResponse request returning *V1GetSupavisorConfigResponse
-func (c *ClientWithResponses) V1GetSupavisorConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetSupavisorConfigResponse, error) {
- rsp, err := c.V1GetSupavisorConfig(ctx, ref, reqEditors...)
+// V1GetNetworkRestrictionsWithResponse request returning *V1GetNetworkRestrictionsResponse
+func (c *ClientWithResponses) V1GetNetworkRestrictionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetNetworkRestrictionsResponse, error) {
+ rsp, err := c.V1GetNetworkRestrictions(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetSupavisorConfigResponse(rsp)
+ return ParseV1GetNetworkRestrictionsResponse(rsp)
}
-// V1UpdateSupavisorConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateSupavisorConfigResponse
-func (c *ClientWithResponses) V1UpdateSupavisorConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateSupavisorConfigResponse, error) {
- rsp, err := c.V1UpdateSupavisorConfigWithBody(ctx, ref, contentType, body, reqEditors...)
+// V1UpdateNetworkRestrictionsWithBodyWithResponse request with arbitrary body returning *V1UpdateNetworkRestrictionsResponse
+func (c *ClientWithResponses) V1UpdateNetworkRestrictionsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateNetworkRestrictionsResponse, error) {
+ rsp, err := c.V1UpdateNetworkRestrictionsWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateSupavisorConfigResponse(rsp)
+ return ParseV1UpdateNetworkRestrictionsResponse(rsp)
}
-func (c *ClientWithResponses) V1UpdateSupavisorConfigWithResponse(ctx context.Context, ref string, body V1UpdateSupavisorConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateSupavisorConfigResponse, error) {
- rsp, err := c.V1UpdateSupavisorConfig(ctx, ref, body, reqEditors...)
+func (c *ClientWithResponses) V1UpdateNetworkRestrictionsWithResponse(ctx context.Context, ref string, body V1UpdateNetworkRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateNetworkRestrictionsResponse, error) {
+ rsp, err := c.V1UpdateNetworkRestrictions(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateSupavisorConfigResponse(rsp)
+ return ParseV1UpdateNetworkRestrictionsResponse(rsp)
}
-// V1GetPostgresConfigWithResponse request returning *V1GetPostgresConfigResponse
-func (c *ClientWithResponses) V1GetPostgresConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgresConfigResponse, error) {
- rsp, err := c.V1GetPostgresConfig(ctx, ref, reqEditors...)
+// V1PauseAProjectWithResponse request returning *V1PauseAProjectResponse
+func (c *ClientWithResponses) V1PauseAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1PauseAProjectResponse, error) {
+ rsp, err := c.V1PauseAProject(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetPostgresConfigResponse(rsp)
+ return ParseV1PauseAProjectResponse(rsp)
}
-// V1UpdatePostgresConfigWithBodyWithResponse request with arbitrary body returning *V1UpdatePostgresConfigResponse
-func (c *ClientWithResponses) V1UpdatePostgresConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error) {
- rsp, err := c.V1UpdatePostgresConfigWithBody(ctx, ref, contentType, body, reqEditors...)
+// V1GetPgsodiumConfigWithResponse request returning *V1GetPgsodiumConfigResponse
+func (c *ClientWithResponses) V1GetPgsodiumConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPgsodiumConfigResponse, error) {
+ rsp, err := c.V1GetPgsodiumConfig(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdatePostgresConfigResponse(rsp)
+ return ParseV1GetPgsodiumConfigResponse(rsp)
}
-func (c *ClientWithResponses) V1UpdatePostgresConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgresConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error) {
- rsp, err := c.V1UpdatePostgresConfig(ctx, ref, body, reqEditors...)
+// V1UpdatePgsodiumConfigWithBodyWithResponse request with arbitrary body returning *V1UpdatePgsodiumConfigResponse
+func (c *ClientWithResponses) V1UpdatePgsodiumConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePgsodiumConfigResponse, error) {
+ rsp, err := c.V1UpdatePgsodiumConfigWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdatePostgresConfigResponse(rsp)
+ return ParseV1UpdatePgsodiumConfigResponse(rsp)
}
-// V1GetStorageConfigWithResponse request returning *V1GetStorageConfigResponse
-func (c *ClientWithResponses) V1GetStorageConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetStorageConfigResponse, error) {
- rsp, err := c.V1GetStorageConfig(ctx, ref, reqEditors...)
+func (c *ClientWithResponses) V1UpdatePgsodiumConfigWithResponse(ctx context.Context, ref string, body V1UpdatePgsodiumConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePgsodiumConfigResponse, error) {
+ rsp, err := c.V1UpdatePgsodiumConfig(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetStorageConfigResponse(rsp)
+ return ParseV1UpdatePgsodiumConfigResponse(rsp)
}
-// V1UpdateStorageConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateStorageConfigResponse
-func (c *ClientWithResponses) V1UpdateStorageConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error) {
- rsp, err := c.V1UpdateStorageConfigWithBody(ctx, ref, contentType, body, reqEditors...)
+// V1GetPostgrestServiceConfigWithResponse request returning *V1GetPostgrestServiceConfigResponse
+func (c *ClientWithResponses) V1GetPostgrestServiceConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgrestServiceConfigResponse, error) {
+ rsp, err := c.V1GetPostgrestServiceConfig(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateStorageConfigResponse(rsp)
+ return ParseV1GetPostgrestServiceConfigResponse(rsp)
}
-func (c *ClientWithResponses) V1UpdateStorageConfigWithResponse(ctx context.Context, ref string, body V1UpdateStorageConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error) {
- rsp, err := c.V1UpdateStorageConfig(ctx, ref, body, reqEditors...)
+// V1UpdatePostgrestServiceConfigWithBodyWithResponse request with arbitrary body returning *V1UpdatePostgrestServiceConfigResponse
+func (c *ClientWithResponses) V1UpdatePostgrestServiceConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePostgrestServiceConfigResponse, error) {
+ rsp, err := c.V1UpdatePostgrestServiceConfigWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateStorageConfigResponse(rsp)
+ return ParseV1UpdatePostgrestServiceConfigResponse(rsp)
}
-// V1DeleteHostnameConfigWithResponse request returning *V1DeleteHostnameConfigResponse
-func (c *ClientWithResponses) V1DeleteHostnameConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteHostnameConfigResponse, error) {
- rsp, err := c.V1DeleteHostnameConfig(ctx, ref, reqEditors...)
+func (c *ClientWithResponses) V1UpdatePostgrestServiceConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgrestServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgrestServiceConfigResponse, error) {
+ rsp, err := c.V1UpdatePostgrestServiceConfig(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1DeleteHostnameConfigResponse(rsp)
+ return ParseV1UpdatePostgrestServiceConfigResponse(rsp)
}
-// V1GetHostnameConfigWithResponse request returning *V1GetHostnameConfigResponse
-func (c *ClientWithResponses) V1GetHostnameConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetHostnameConfigResponse, error) {
- rsp, err := c.V1GetHostnameConfig(ctx, ref, reqEditors...)
+// V1RemoveAReadReplicaWithBodyWithResponse request with arbitrary body returning *V1RemoveAReadReplicaResponse
+func (c *ClientWithResponses) V1RemoveAReadReplicaWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RemoveAReadReplicaResponse, error) {
+ rsp, err := c.V1RemoveAReadReplicaWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetHostnameConfigResponse(rsp)
+ return ParseV1RemoveAReadReplicaResponse(rsp)
}
-// V1ActivateCustomHostnameWithResponse request returning *V1ActivateCustomHostnameResponse
-func (c *ClientWithResponses) V1ActivateCustomHostnameWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ActivateCustomHostnameResponse, error) {
- rsp, err := c.V1ActivateCustomHostname(ctx, ref, reqEditors...)
+func (c *ClientWithResponses) V1RemoveAReadReplicaWithResponse(ctx context.Context, ref string, body V1RemoveAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RemoveAReadReplicaResponse, error) {
+ rsp, err := c.V1RemoveAReadReplica(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ActivateCustomHostnameResponse(rsp)
+ return ParseV1RemoveAReadReplicaResponse(rsp)
}
-// V1UpdateHostnameConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateHostnameConfigResponse
-func (c *ClientWithResponses) V1UpdateHostnameConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error) {
- rsp, err := c.V1UpdateHostnameConfigWithBody(ctx, ref, contentType, body, reqEditors...)
+// V1SetupAReadReplicaWithBodyWithResponse request with arbitrary body returning *V1SetupAReadReplicaResponse
+func (c *ClientWithResponses) V1SetupAReadReplicaWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1SetupAReadReplicaResponse, error) {
+ rsp, err := c.V1SetupAReadReplicaWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateHostnameConfigResponse(rsp)
+ return ParseV1SetupAReadReplicaResponse(rsp)
}
-func (c *ClientWithResponses) V1UpdateHostnameConfigWithResponse(ctx context.Context, ref string, body V1UpdateHostnameConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error) {
- rsp, err := c.V1UpdateHostnameConfig(ctx, ref, body, reqEditors...)
+func (c *ClientWithResponses) V1SetupAReadReplicaWithResponse(ctx context.Context, ref string, body V1SetupAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*V1SetupAReadReplicaResponse, error) {
+ rsp, err := c.V1SetupAReadReplica(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateHostnameConfigResponse(rsp)
+ return ParseV1SetupAReadReplicaResponse(rsp)
}
-// V1VerifyDnsConfigWithResponse request returning *V1VerifyDnsConfigResponse
-func (c *ClientWithResponses) V1VerifyDnsConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1VerifyDnsConfigResponse, error) {
- rsp, err := c.V1VerifyDnsConfig(ctx, ref, reqEditors...)
+// V1GetReadonlyModeStatusWithResponse request returning *V1GetReadonlyModeStatusResponse
+func (c *ClientWithResponses) V1GetReadonlyModeStatusWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetReadonlyModeStatusResponse, error) {
+ rsp, err := c.V1GetReadonlyModeStatus(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1VerifyDnsConfigResponse(rsp)
+ return ParseV1GetReadonlyModeStatusResponse(rsp)
}
-// V1ListAllBackupsWithResponse request returning *V1ListAllBackupsResponse
-func (c *ClientWithResponses) V1ListAllBackupsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBackupsResponse, error) {
- rsp, err := c.V1ListAllBackups(ctx, ref, reqEditors...)
+// V1DisableReadonlyModeTemporarilyWithResponse request returning *V1DisableReadonlyModeTemporarilyResponse
+func (c *ClientWithResponses) V1DisableReadonlyModeTemporarilyWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisableReadonlyModeTemporarilyResponse, error) {
+ rsp, err := c.V1DisableReadonlyModeTemporarily(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ListAllBackupsResponse(rsp)
+ return ParseV1DisableReadonlyModeTemporarilyResponse(rsp)
}
-// V1RestorePitrBackupWithBodyWithResponse request with arbitrary body returning *V1RestorePitrBackupResponse
-func (c *ClientWithResponses) V1RestorePitrBackupWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error) {
- rsp, err := c.V1RestorePitrBackupWithBody(ctx, ref, contentType, body, reqEditors...)
+// V1ListAvailableRestoreVersionsWithResponse request returning *V1ListAvailableRestoreVersionsResponse
+func (c *ClientWithResponses) V1ListAvailableRestoreVersionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAvailableRestoreVersionsResponse, error) {
+ rsp, err := c.V1ListAvailableRestoreVersions(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1RestorePitrBackupResponse(rsp)
+ return ParseV1ListAvailableRestoreVersionsResponse(rsp)
}
-func (c *ClientWithResponses) V1RestorePitrBackupWithResponse(ctx context.Context, ref string, body V1RestorePitrBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error) {
- rsp, err := c.V1RestorePitrBackup(ctx, ref, body, reqEditors...)
+// V1RestoreAProjectWithResponse request returning *V1RestoreAProjectResponse
+func (c *ClientWithResponses) V1RestoreAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1RestoreAProjectResponse, error) {
+ rsp, err := c.V1RestoreAProject(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1RestorePitrBackupResponse(rsp)
+ return ParseV1RestoreAProjectResponse(rsp)
}
-// GetDatabaseMetadataWithResponse request returning *GetDatabaseMetadataResponse
-func (c *ClientWithResponses) GetDatabaseMetadataWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetDatabaseMetadataResponse, error) {
- rsp, err := c.GetDatabaseMetadata(ctx, ref, reqEditors...)
+// V1CancelAProjectRestorationWithResponse request returning *V1CancelAProjectRestorationResponse
+func (c *ClientWithResponses) V1CancelAProjectRestorationWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CancelAProjectRestorationResponse, error) {
+ rsp, err := c.V1CancelAProjectRestoration(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseGetDatabaseMetadataResponse(rsp)
+ return ParseV1CancelAProjectRestorationResponse(rsp)
}
-// V1RunAQueryWithBodyWithResponse request with arbitrary body returning *V1RunAQueryResponse
-func (c *ClientWithResponses) V1RunAQueryWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error) {
- rsp, err := c.V1RunAQueryWithBody(ctx, ref, contentType, body, reqEditors...)
+// V1BulkDeleteSecretsWithBodyWithResponse request with arbitrary body returning *V1BulkDeleteSecretsResponse
+func (c *ClientWithResponses) V1BulkDeleteSecretsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkDeleteSecretsResponse, error) {
+ rsp, err := c.V1BulkDeleteSecretsWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1RunAQueryResponse(rsp)
+ return ParseV1BulkDeleteSecretsResponse(rsp)
}
-func (c *ClientWithResponses) V1RunAQueryWithResponse(ctx context.Context, ref string, body V1RunAQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error) {
- rsp, err := c.V1RunAQuery(ctx, ref, body, reqEditors...)
+func (c *ClientWithResponses) V1BulkDeleteSecretsWithResponse(ctx context.Context, ref string, body V1BulkDeleteSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkDeleteSecretsResponse, error) {
+ rsp, err := c.V1BulkDeleteSecrets(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1RunAQueryResponse(rsp)
+ return ParseV1BulkDeleteSecretsResponse(rsp)
}
-// V1EnableDatabaseWebhookWithResponse request returning *V1EnableDatabaseWebhookResponse
-func (c *ClientWithResponses) V1EnableDatabaseWebhookWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1EnableDatabaseWebhookResponse, error) {
- rsp, err := c.V1EnableDatabaseWebhook(ctx, ref, reqEditors...)
+// V1ListAllSecretsWithResponse request returning *V1ListAllSecretsResponse
+func (c *ClientWithResponses) V1ListAllSecretsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllSecretsResponse, error) {
+ rsp, err := c.V1ListAllSecrets(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1EnableDatabaseWebhookResponse(rsp)
+ return ParseV1ListAllSecretsResponse(rsp)
}
-// V1ListAllFunctionsWithResponse request returning *V1ListAllFunctionsResponse
-func (c *ClientWithResponses) V1ListAllFunctionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllFunctionsResponse, error) {
- rsp, err := c.V1ListAllFunctions(ctx, ref, reqEditors...)
+// V1BulkCreateSecretsWithBodyWithResponse request with arbitrary body returning *V1BulkCreateSecretsResponse
+func (c *ClientWithResponses) V1BulkCreateSecretsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkCreateSecretsResponse, error) {
+ rsp, err := c.V1BulkCreateSecretsWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ListAllFunctionsResponse(rsp)
+ return ParseV1BulkCreateSecretsResponse(rsp)
}
-// V1CreateAFunctionWithBodyWithResponse request with arbitrary body returning *V1CreateAFunctionResponse
-func (c *ClientWithResponses) V1CreateAFunctionWithBodyWithResponse(ctx context.Context, ref string, params *V1CreateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAFunctionResponse, error) {
- rsp, err := c.V1CreateAFunctionWithBody(ctx, ref, params, contentType, body, reqEditors...)
+func (c *ClientWithResponses) V1BulkCreateSecretsWithResponse(ctx context.Context, ref string, body V1BulkCreateSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkCreateSecretsResponse, error) {
+ rsp, err := c.V1BulkCreateSecrets(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1CreateAFunctionResponse(rsp)
+ return ParseV1BulkCreateSecretsResponse(rsp)
}
-func (c *ClientWithResponses) V1CreateAFunctionWithResponse(ctx context.Context, ref string, params *V1CreateAFunctionParams, body V1CreateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAFunctionResponse, error) {
- rsp, err := c.V1CreateAFunction(ctx, ref, params, body, reqEditors...)
+// V1GetSslEnforcementConfigWithResponse request returning *V1GetSslEnforcementConfigResponse
+func (c *ClientWithResponses) V1GetSslEnforcementConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetSslEnforcementConfigResponse, error) {
+ rsp, err := c.V1GetSslEnforcementConfig(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1CreateAFunctionResponse(rsp)
+ return ParseV1GetSslEnforcementConfigResponse(rsp)
}
-// V1BulkUpdateFunctionsWithBodyWithResponse request with arbitrary body returning *V1BulkUpdateFunctionsResponse
-func (c *ClientWithResponses) V1BulkUpdateFunctionsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkUpdateFunctionsResponse, error) {
- rsp, err := c.V1BulkUpdateFunctionsWithBody(ctx, ref, contentType, body, reqEditors...)
+// V1UpdateSslEnforcementConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateSslEnforcementConfigResponse
+func (c *ClientWithResponses) V1UpdateSslEnforcementConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateSslEnforcementConfigResponse, error) {
+ rsp, err := c.V1UpdateSslEnforcementConfigWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1BulkUpdateFunctionsResponse(rsp)
+ return ParseV1UpdateSslEnforcementConfigResponse(rsp)
}
-func (c *ClientWithResponses) V1BulkUpdateFunctionsWithResponse(ctx context.Context, ref string, body V1BulkUpdateFunctionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkUpdateFunctionsResponse, error) {
- rsp, err := c.V1BulkUpdateFunctions(ctx, ref, body, reqEditors...)
+func (c *ClientWithResponses) V1UpdateSslEnforcementConfigWithResponse(ctx context.Context, ref string, body V1UpdateSslEnforcementConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateSslEnforcementConfigResponse, error) {
+ rsp, err := c.V1UpdateSslEnforcementConfig(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1BulkUpdateFunctionsResponse(rsp)
+ return ParseV1UpdateSslEnforcementConfigResponse(rsp)
}
-// V1DeployAFunctionWithBodyWithResponse request with arbitrary body returning *V1DeployAFunctionResponse
-func (c *ClientWithResponses) V1DeployAFunctionWithBodyWithResponse(ctx context.Context, ref string, params *V1DeployAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1DeployAFunctionResponse, error) {
- rsp, err := c.V1DeployAFunctionWithBody(ctx, ref, params, contentType, body, reqEditors...)
+// V1ListAllBucketsWithResponse request returning *V1ListAllBucketsResponse
+func (c *ClientWithResponses) V1ListAllBucketsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBucketsResponse, error) {
+ rsp, err := c.V1ListAllBuckets(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1DeployAFunctionResponse(rsp)
+ return ParseV1ListAllBucketsResponse(rsp)
}
-// V1DeleteAFunctionWithResponse request returning *V1DeleteAFunctionResponse
-func (c *ClientWithResponses) V1DeleteAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1DeleteAFunctionResponse, error) {
- rsp, err := c.V1DeleteAFunction(ctx, ref, functionSlug, reqEditors...)
+// V1GenerateTypescriptTypesWithResponse request returning *V1GenerateTypescriptTypesResponse
+func (c *ClientWithResponses) V1GenerateTypescriptTypesWithResponse(ctx context.Context, ref string, params *V1GenerateTypescriptTypesParams, reqEditors ...RequestEditorFn) (*V1GenerateTypescriptTypesResponse, error) {
+ rsp, err := c.V1GenerateTypescriptTypes(ctx, ref, params, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1DeleteAFunctionResponse(rsp)
+ return ParseV1GenerateTypescriptTypesResponse(rsp)
}
-// V1GetAFunctionWithResponse request returning *V1GetAFunctionResponse
-func (c *ClientWithResponses) V1GetAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1GetAFunctionResponse, error) {
- rsp, err := c.V1GetAFunction(ctx, ref, functionSlug, reqEditors...)
+// V1UpgradePostgresVersionWithBodyWithResponse request with arbitrary body returning *V1UpgradePostgresVersionResponse
+func (c *ClientWithResponses) V1UpgradePostgresVersionWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpgradePostgresVersionResponse, error) {
+ rsp, err := c.V1UpgradePostgresVersionWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetAFunctionResponse(rsp)
+ return ParseV1UpgradePostgresVersionResponse(rsp)
}
-// V1UpdateAFunctionWithBodyWithResponse request with arbitrary body returning *V1UpdateAFunctionResponse
-func (c *ClientWithResponses) V1UpdateAFunctionWithBodyWithResponse(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateAFunctionResponse, error) {
- rsp, err := c.V1UpdateAFunctionWithBody(ctx, ref, functionSlug, params, contentType, body, reqEditors...)
+func (c *ClientWithResponses) V1UpgradePostgresVersionWithResponse(ctx context.Context, ref string, body V1UpgradePostgresVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpgradePostgresVersionResponse, error) {
+ rsp, err := c.V1UpgradePostgresVersion(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateAFunctionResponse(rsp)
+ return ParseV1UpgradePostgresVersionResponse(rsp)
}
-func (c *ClientWithResponses) V1UpdateAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, body V1UpdateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateAFunctionResponse, error) {
- rsp, err := c.V1UpdateAFunction(ctx, ref, functionSlug, params, body, reqEditors...)
+// V1GetPostgresUpgradeEligibilityWithResponse request returning *V1GetPostgresUpgradeEligibilityResponse
+func (c *ClientWithResponses) V1GetPostgresUpgradeEligibilityWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgresUpgradeEligibilityResponse, error) {
+ rsp, err := c.V1GetPostgresUpgradeEligibility(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateAFunctionResponse(rsp)
+ return ParseV1GetPostgresUpgradeEligibilityResponse(rsp)
}
-// V1GetAFunctionBodyWithResponse request returning *V1GetAFunctionBodyResponse
-func (c *ClientWithResponses) V1GetAFunctionBodyWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1GetAFunctionBodyResponse, error) {
- rsp, err := c.V1GetAFunctionBody(ctx, ref, functionSlug, reqEditors...)
+// V1GetPostgresUpgradeStatusWithResponse request returning *V1GetPostgresUpgradeStatusResponse
+func (c *ClientWithResponses) V1GetPostgresUpgradeStatusWithResponse(ctx context.Context, ref string, params *V1GetPostgresUpgradeStatusParams, reqEditors ...RequestEditorFn) (*V1GetPostgresUpgradeStatusResponse, error) {
+ rsp, err := c.V1GetPostgresUpgradeStatus(ctx, ref, params, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetAFunctionBodyResponse(rsp)
+ return ParseV1GetPostgresUpgradeStatusResponse(rsp)
}
-// V1GetServicesHealthWithResponse request returning *V1GetServicesHealthResponse
-func (c *ClientWithResponses) V1GetServicesHealthWithResponse(ctx context.Context, ref string, params *V1GetServicesHealthParams, reqEditors ...RequestEditorFn) (*V1GetServicesHealthResponse, error) {
- rsp, err := c.V1GetServicesHealth(ctx, ref, params, reqEditors...)
+// V1DeactivateVanitySubdomainConfigWithResponse request returning *V1DeactivateVanitySubdomainConfigResponse
+func (c *ClientWithResponses) V1DeactivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeactivateVanitySubdomainConfigResponse, error) {
+ rsp, err := c.V1DeactivateVanitySubdomainConfig(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetServicesHealthResponse(rsp)
+ return ParseV1DeactivateVanitySubdomainConfigResponse(rsp)
}
-// V1DeleteNetworkBansWithBodyWithResponse request with arbitrary body returning *V1DeleteNetworkBansResponse
-func (c *ClientWithResponses) V1DeleteNetworkBansWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1DeleteNetworkBansResponse, error) {
- rsp, err := c.V1DeleteNetworkBansWithBody(ctx, ref, contentType, body, reqEditors...)
+// V1GetVanitySubdomainConfigWithResponse request returning *V1GetVanitySubdomainConfigResponse
+func (c *ClientWithResponses) V1GetVanitySubdomainConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetVanitySubdomainConfigResponse, error) {
+ rsp, err := c.V1GetVanitySubdomainConfig(ctx, ref, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1DeleteNetworkBansResponse(rsp)
+ return ParseV1GetVanitySubdomainConfigResponse(rsp)
}
-func (c *ClientWithResponses) V1DeleteNetworkBansWithResponse(ctx context.Context, ref string, body V1DeleteNetworkBansJSONRequestBody, reqEditors ...RequestEditorFn) (*V1DeleteNetworkBansResponse, error) {
- rsp, err := c.V1DeleteNetworkBans(ctx, ref, body, reqEditors...)
+// V1ActivateVanitySubdomainConfigWithBodyWithResponse request with arbitrary body returning *V1ActivateVanitySubdomainConfigResponse
+func (c *ClientWithResponses) V1ActivateVanitySubdomainConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ActivateVanitySubdomainConfigResponse, error) {
+ rsp, err := c.V1ActivateVanitySubdomainConfigWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1DeleteNetworkBansResponse(rsp)
+ return ParseV1ActivateVanitySubdomainConfigResponse(rsp)
}
-// V1ListAllNetworkBansWithResponse request returning *V1ListAllNetworkBansResponse
-func (c *ClientWithResponses) V1ListAllNetworkBansWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllNetworkBansResponse, error) {
- rsp, err := c.V1ListAllNetworkBans(ctx, ref, reqEditors...)
+func (c *ClientWithResponses) V1ActivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, body V1ActivateVanitySubdomainConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ActivateVanitySubdomainConfigResponse, error) {
+ rsp, err := c.V1ActivateVanitySubdomainConfig(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1ListAllNetworkBansResponse(rsp)
+ return ParseV1ActivateVanitySubdomainConfigResponse(rsp)
}
-// V1GetNetworkRestrictionsWithResponse request returning *V1GetNetworkRestrictionsResponse
-func (c *ClientWithResponses) V1GetNetworkRestrictionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetNetworkRestrictionsResponse, error) {
- rsp, err := c.V1GetNetworkRestrictions(ctx, ref, reqEditors...)
+// V1CheckVanitySubdomainAvailabilityWithBodyWithResponse request with arbitrary body returning *V1CheckVanitySubdomainAvailabilityResponse
+func (c *ClientWithResponses) V1CheckVanitySubdomainAvailabilityWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CheckVanitySubdomainAvailabilityResponse, error) {
+ rsp, err := c.V1CheckVanitySubdomainAvailabilityWithBody(ctx, ref, contentType, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1GetNetworkRestrictionsResponse(rsp)
+ return ParseV1CheckVanitySubdomainAvailabilityResponse(rsp)
}
-// V1UpdateNetworkRestrictionsWithBodyWithResponse request with arbitrary body returning *V1UpdateNetworkRestrictionsResponse
-func (c *ClientWithResponses) V1UpdateNetworkRestrictionsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateNetworkRestrictionsResponse, error) {
- rsp, err := c.V1UpdateNetworkRestrictionsWithBody(ctx, ref, contentType, body, reqEditors...)
+func (c *ClientWithResponses) V1CheckVanitySubdomainAvailabilityWithResponse(ctx context.Context, ref string, body V1CheckVanitySubdomainAvailabilityJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CheckVanitySubdomainAvailabilityResponse, error) {
+ rsp, err := c.V1CheckVanitySubdomainAvailability(ctx, ref, body, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateNetworkRestrictionsResponse(rsp)
+ return ParseV1CheckVanitySubdomainAvailabilityResponse(rsp)
}
-func (c *ClientWithResponses) V1UpdateNetworkRestrictionsWithResponse(ctx context.Context, ref string, body V1UpdateNetworkRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateNetworkRestrictionsResponse, error) {
- rsp, err := c.V1UpdateNetworkRestrictions(ctx, ref, body, reqEditors...)
+// V1ListAllSnippetsWithResponse request returning *V1ListAllSnippetsResponse
+func (c *ClientWithResponses) V1ListAllSnippetsWithResponse(ctx context.Context, params *V1ListAllSnippetsParams, reqEditors ...RequestEditorFn) (*V1ListAllSnippetsResponse, error) {
+ rsp, err := c.V1ListAllSnippets(ctx, params, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1UpdateNetworkRestrictionsResponse(rsp)
+ return ParseV1ListAllSnippetsResponse(rsp)
}
-// V1PauseAProjectWithResponse request returning *V1PauseAProjectResponse
-func (c *ClientWithResponses) V1PauseAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1PauseAProjectResponse, error) {
- rsp, err := c.V1PauseAProject(ctx, ref, reqEditors...)
+// V1GetASnippetWithResponse request returning *V1GetASnippetResponse
+func (c *ClientWithResponses) V1GetASnippetWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetASnippetResponse, error) {
+ rsp, err := c.V1GetASnippet(ctx, id, reqEditors...)
if err != nil {
return nil, err
}
- return ParseV1PauseAProjectResponse(rsp)
+ return ParseV1GetASnippetResponse(rsp)
}
-// V1GetPgsodiumConfigWithResponse request returning *V1GetPgsodiumConfigResponse
-func (c *ClientWithResponses) V1GetPgsodiumConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPgsodiumConfigResponse, error) {
- rsp, err := c.V1GetPgsodiumConfig(ctx, ref, reqEditors...)
+// ParseV1DeleteABranchResponse parses an HTTP response from a V1DeleteABranchWithResponse call
+func ParseV1DeleteABranchResponse(rsp *http.Response) (*V1DeleteABranchResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1GetPgsodiumConfigResponse(rsp)
+
+ response := &V1DeleteABranchResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest BranchDeleteResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
+ return response, nil
}
-// V1UpdatePgsodiumConfigWithBodyWithResponse request with arbitrary body returning *V1UpdatePgsodiumConfigResponse
-func (c *ClientWithResponses) V1UpdatePgsodiumConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePgsodiumConfigResponse, error) {
- rsp, err := c.V1UpdatePgsodiumConfigWithBody(ctx, ref, contentType, body, reqEditors...)
+// ParseV1GetABranchConfigResponse parses an HTTP response from a V1GetABranchConfigWithResponse call
+func ParseV1GetABranchConfigResponse(rsp *http.Response) (*V1GetABranchConfigResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1UpdatePgsodiumConfigResponse(rsp)
+
+ response := &V1GetABranchConfigResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest BranchDetailResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
+ return response, nil
}
-func (c *ClientWithResponses) V1UpdatePgsodiumConfigWithResponse(ctx context.Context, ref string, body V1UpdatePgsodiumConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePgsodiumConfigResponse, error) {
- rsp, err := c.V1UpdatePgsodiumConfig(ctx, ref, body, reqEditors...)
+// ParseV1UpdateABranchConfigResponse parses an HTTP response from a V1UpdateABranchConfigWithResponse call
+func ParseV1UpdateABranchConfigResponse(rsp *http.Response) (*V1UpdateABranchConfigResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1UpdatePgsodiumConfigResponse(rsp)
+
+ response := &V1UpdateABranchConfigResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest BranchResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
+ return response, nil
}
-// V1GetPostgrestServiceConfigWithResponse request returning *V1GetPostgrestServiceConfigResponse
-func (c *ClientWithResponses) V1GetPostgrestServiceConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgrestServiceConfigResponse, error) {
- rsp, err := c.V1GetPostgrestServiceConfig(ctx, ref, reqEditors...)
+// ParseV1DiffABranchResponse parses an HTTP response from a V1DiffABranchWithResponse call
+func ParseV1DiffABranchResponse(rsp *http.Response) (*V1DiffABranchResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1GetPostgrestServiceConfigResponse(rsp)
+
+ response := &V1DiffABranchResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
}
-// V1UpdatePostgrestServiceConfigWithBodyWithResponse request with arbitrary body returning *V1UpdatePostgrestServiceConfigResponse
-func (c *ClientWithResponses) V1UpdatePostgrestServiceConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePostgrestServiceConfigResponse, error) {
- rsp, err := c.V1UpdatePostgrestServiceConfigWithBody(ctx, ref, contentType, body, reqEditors...)
+// ParseV1MergeABranchResponse parses an HTTP response from a V1MergeABranchWithResponse call
+func ParseV1MergeABranchResponse(rsp *http.Response) (*V1MergeABranchResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1UpdatePostgrestServiceConfigResponse(rsp)
+
+ response := &V1MergeABranchResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
+ var dest BranchUpdateResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON201 = &dest
+
+ }
+
+ return response, nil
}
-func (c *ClientWithResponses) V1UpdatePostgrestServiceConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgrestServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgrestServiceConfigResponse, error) {
- rsp, err := c.V1UpdatePostgrestServiceConfig(ctx, ref, body, reqEditors...)
+// ParseV1PushABranchResponse parses an HTTP response from a V1PushABranchWithResponse call
+func ParseV1PushABranchResponse(rsp *http.Response) (*V1PushABranchResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1UpdatePostgrestServiceConfigResponse(rsp)
+
+ response := &V1PushABranchResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
+ var dest BranchUpdateResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON201 = &dest
+
+ }
+
+ return response, nil
}
-// V1RemoveAReadReplicaWithBodyWithResponse request with arbitrary body returning *V1RemoveAReadReplicaResponse
-func (c *ClientWithResponses) V1RemoveAReadReplicaWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RemoveAReadReplicaResponse, error) {
- rsp, err := c.V1RemoveAReadReplicaWithBody(ctx, ref, contentType, body, reqEditors...)
+// ParseV1ResetABranchResponse parses an HTTP response from a V1ResetABranchWithResponse call
+func ParseV1ResetABranchResponse(rsp *http.Response) (*V1ResetABranchResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1RemoveAReadReplicaResponse(rsp)
+
+ response := &V1ResetABranchResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
+ var dest BranchUpdateResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON201 = &dest
+
+ }
+
+ return response, nil
}
-func (c *ClientWithResponses) V1RemoveAReadReplicaWithResponse(ctx context.Context, ref string, body V1RemoveAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RemoveAReadReplicaResponse, error) {
- rsp, err := c.V1RemoveAReadReplica(ctx, ref, body, reqEditors...)
+// ParseV1AuthorizeUserResponse parses an HTTP response from a V1AuthorizeUserWithResponse call
+func ParseV1AuthorizeUserResponse(rsp *http.Response) (*V1AuthorizeUserResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1RemoveAReadReplicaResponse(rsp)
+
+ response := &V1AuthorizeUserResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
}
-// V1SetupAReadReplicaWithBodyWithResponse request with arbitrary body returning *V1SetupAReadReplicaResponse
-func (c *ClientWithResponses) V1SetupAReadReplicaWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1SetupAReadReplicaResponse, error) {
- rsp, err := c.V1SetupAReadReplicaWithBody(ctx, ref, contentType, body, reqEditors...)
+// ParseV1OauthAuthorizeProjectClaimResponse parses an HTTP response from a V1OauthAuthorizeProjectClaimWithResponse call
+func ParseV1OauthAuthorizeProjectClaimResponse(rsp *http.Response) (*V1OauthAuthorizeProjectClaimResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1SetupAReadReplicaResponse(rsp)
+
+ response := &V1OauthAuthorizeProjectClaimResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
}
-func (c *ClientWithResponses) V1SetupAReadReplicaWithResponse(ctx context.Context, ref string, body V1SetupAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*V1SetupAReadReplicaResponse, error) {
- rsp, err := c.V1SetupAReadReplica(ctx, ref, body, reqEditors...)
+// ParseV1RevokeTokenResponse parses an HTTP response from a V1RevokeTokenWithResponse call
+func ParseV1RevokeTokenResponse(rsp *http.Response) (*V1RevokeTokenResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1SetupAReadReplicaResponse(rsp)
+
+ response := &V1RevokeTokenResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
}
-// V1GetReadonlyModeStatusWithResponse request returning *V1GetReadonlyModeStatusResponse
-func (c *ClientWithResponses) V1GetReadonlyModeStatusWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetReadonlyModeStatusResponse, error) {
- rsp, err := c.V1GetReadonlyModeStatus(ctx, ref, reqEditors...)
+// ParseV1ExchangeOauthTokenResponse parses an HTTP response from a V1ExchangeOauthTokenWithResponse call
+func ParseV1ExchangeOauthTokenResponse(rsp *http.Response) (*V1ExchangeOauthTokenResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1GetReadonlyModeStatusResponse(rsp)
-}
-// V1DisableReadonlyModeTemporarilyWithResponse request returning *V1DisableReadonlyModeTemporarilyResponse
-func (c *ClientWithResponses) V1DisableReadonlyModeTemporarilyWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisableReadonlyModeTemporarilyResponse, error) {
- rsp, err := c.V1DisableReadonlyModeTemporarily(ctx, ref, reqEditors...)
- if err != nil {
- return nil, err
+ response := &V1ExchangeOauthTokenResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
+ var dest OAuthTokenResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON201 = &dest
+
}
- return ParseV1DisableReadonlyModeTemporarilyResponse(rsp)
+
+ return response, nil
}
-// V1ListAvailableRestoreVersionsWithResponse request returning *V1ListAvailableRestoreVersionsResponse
-func (c *ClientWithResponses) V1ListAvailableRestoreVersionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAvailableRestoreVersionsResponse, error) {
- rsp, err := c.V1ListAvailableRestoreVersions(ctx, ref, reqEditors...)
+// ParseV1ListAllOrganizationsResponse parses an HTTP response from a V1ListAllOrganizationsWithResponse call
+func ParseV1ListAllOrganizationsResponse(rsp *http.Response) (*V1ListAllOrganizationsResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1ListAvailableRestoreVersionsResponse(rsp)
-}
-// V1RestoreAProjectWithBodyWithResponse request with arbitrary body returning *V1RestoreAProjectResponse
-func (c *ClientWithResponses) V1RestoreAProjectWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RestoreAProjectResponse, error) {
- rsp, err := c.V1RestoreAProjectWithBody(ctx, ref, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
+ response := &V1ListAllOrganizationsResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseV1RestoreAProjectResponse(rsp)
-}
-func (c *ClientWithResponses) V1RestoreAProjectWithResponse(ctx context.Context, ref string, body V1RestoreAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RestoreAProjectResponse, error) {
- rsp, err := c.V1RestoreAProject(ctx, ref, body, reqEditors...)
- if err != nil {
- return nil, err
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest []OrganizationResponseV1
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
}
- return ParseV1RestoreAProjectResponse(rsp)
+
+ return response, nil
}
-// V1CancelAProjectRestorationWithResponse request returning *V1CancelAProjectRestorationResponse
-func (c *ClientWithResponses) V1CancelAProjectRestorationWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CancelAProjectRestorationResponse, error) {
- rsp, err := c.V1CancelAProjectRestoration(ctx, ref, reqEditors...)
+// ParseV1CreateAnOrganizationResponse parses an HTTP response from a V1CreateAnOrganizationWithResponse call
+func ParseV1CreateAnOrganizationResponse(rsp *http.Response) (*V1CreateAnOrganizationResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1CancelAProjectRestorationResponse(rsp)
-}
-// V1BulkDeleteSecretsWithBodyWithResponse request with arbitrary body returning *V1BulkDeleteSecretsResponse
-func (c *ClientWithResponses) V1BulkDeleteSecretsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkDeleteSecretsResponse, error) {
- rsp, err := c.V1BulkDeleteSecretsWithBody(ctx, ref, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
+ response := &V1CreateAnOrganizationResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseV1BulkDeleteSecretsResponse(rsp)
-}
-func (c *ClientWithResponses) V1BulkDeleteSecretsWithResponse(ctx context.Context, ref string, body V1BulkDeleteSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkDeleteSecretsResponse, error) {
- rsp, err := c.V1BulkDeleteSecrets(ctx, ref, body, reqEditors...)
- if err != nil {
- return nil, err
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
+ var dest OrganizationResponseV1
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON201 = &dest
+
}
- return ParseV1BulkDeleteSecretsResponse(rsp)
+
+ return response, nil
}
-// V1ListAllSecretsWithResponse request returning *V1ListAllSecretsResponse
-func (c *ClientWithResponses) V1ListAllSecretsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllSecretsResponse, error) {
- rsp, err := c.V1ListAllSecrets(ctx, ref, reqEditors...)
+// ParseV1GetAnOrganizationResponse parses an HTTP response from a V1GetAnOrganizationWithResponse call
+func ParseV1GetAnOrganizationResponse(rsp *http.Response) (*V1GetAnOrganizationResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1ListAllSecretsResponse(rsp)
-}
-// V1BulkCreateSecretsWithBodyWithResponse request with arbitrary body returning *V1BulkCreateSecretsResponse
-func (c *ClientWithResponses) V1BulkCreateSecretsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkCreateSecretsResponse, error) {
- rsp, err := c.V1BulkCreateSecretsWithBody(ctx, ref, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
+ response := &V1GetAnOrganizationResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseV1BulkCreateSecretsResponse(rsp)
-}
-func (c *ClientWithResponses) V1BulkCreateSecretsWithResponse(ctx context.Context, ref string, body V1BulkCreateSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkCreateSecretsResponse, error) {
- rsp, err := c.V1BulkCreateSecrets(ctx, ref, body, reqEditors...)
- if err != nil {
- return nil, err
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest V1OrganizationSlugResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
}
- return ParseV1BulkCreateSecretsResponse(rsp)
+
+ return response, nil
}
-// V1GetSslEnforcementConfigWithResponse request returning *V1GetSslEnforcementConfigResponse
-func (c *ClientWithResponses) V1GetSslEnforcementConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetSslEnforcementConfigResponse, error) {
- rsp, err := c.V1GetSslEnforcementConfig(ctx, ref, reqEditors...)
+// ParseV1ListOrganizationMembersResponse parses an HTTP response from a V1ListOrganizationMembersWithResponse call
+func ParseV1ListOrganizationMembersResponse(rsp *http.Response) (*V1ListOrganizationMembersResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1GetSslEnforcementConfigResponse(rsp)
-}
-// V1UpdateSslEnforcementConfigWithBodyWithResponse request with arbitrary body returning *V1UpdateSslEnforcementConfigResponse
-func (c *ClientWithResponses) V1UpdateSslEnforcementConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateSslEnforcementConfigResponse, error) {
- rsp, err := c.V1UpdateSslEnforcementConfigWithBody(ctx, ref, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
+ response := &V1ListOrganizationMembersResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseV1UpdateSslEnforcementConfigResponse(rsp)
-}
-func (c *ClientWithResponses) V1UpdateSslEnforcementConfigWithResponse(ctx context.Context, ref string, body V1UpdateSslEnforcementConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateSslEnforcementConfigResponse, error) {
- rsp, err := c.V1UpdateSslEnforcementConfig(ctx, ref, body, reqEditors...)
- if err != nil {
- return nil, err
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest []V1OrganizationMemberResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
}
- return ParseV1UpdateSslEnforcementConfigResponse(rsp)
+
+ return response, nil
}
-// V1ListAllBucketsWithResponse request returning *V1ListAllBucketsResponse
-func (c *ClientWithResponses) V1ListAllBucketsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBucketsResponse, error) {
- rsp, err := c.V1ListAllBuckets(ctx, ref, reqEditors...)
+// ParseV1GetOrganizationProjectClaimResponse parses an HTTP response from a V1GetOrganizationProjectClaimWithResponse call
+func ParseV1GetOrganizationProjectClaimResponse(rsp *http.Response) (*V1GetOrganizationProjectClaimResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1ListAllBucketsResponse(rsp)
-}
-// V1GenerateTypescriptTypesWithResponse request returning *V1GenerateTypescriptTypesResponse
-func (c *ClientWithResponses) V1GenerateTypescriptTypesWithResponse(ctx context.Context, ref string, params *V1GenerateTypescriptTypesParams, reqEditors ...RequestEditorFn) (*V1GenerateTypescriptTypesResponse, error) {
- rsp, err := c.V1GenerateTypescriptTypes(ctx, ref, params, reqEditors...)
- if err != nil {
- return nil, err
+ response := &V1GetOrganizationProjectClaimResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseV1GenerateTypescriptTypesResponse(rsp)
-}
-// V1UpgradePostgresVersionWithBodyWithResponse request with arbitrary body returning *V1UpgradePostgresVersionResponse
-func (c *ClientWithResponses) V1UpgradePostgresVersionWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpgradePostgresVersionResponse, error) {
- rsp, err := c.V1UpgradePostgresVersionWithBody(ctx, ref, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest OrganizationProjectClaimResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
}
- return ParseV1UpgradePostgresVersionResponse(rsp)
+
+ return response, nil
}
-func (c *ClientWithResponses) V1UpgradePostgresVersionWithResponse(ctx context.Context, ref string, body V1UpgradePostgresVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpgradePostgresVersionResponse, error) {
- rsp, err := c.V1UpgradePostgresVersion(ctx, ref, body, reqEditors...)
+// ParseV1ClaimProjectForOrganizationResponse parses an HTTP response from a V1ClaimProjectForOrganizationWithResponse call
+func ParseV1ClaimProjectForOrganizationResponse(rsp *http.Response) (*V1ClaimProjectForOrganizationResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1UpgradePostgresVersionResponse(rsp)
-}
-// V1GetPostgresUpgradeEligibilityWithResponse request returning *V1GetPostgresUpgradeEligibilityResponse
-func (c *ClientWithResponses) V1GetPostgresUpgradeEligibilityWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgresUpgradeEligibilityResponse, error) {
- rsp, err := c.V1GetPostgresUpgradeEligibility(ctx, ref, reqEditors...)
- if err != nil {
- return nil, err
+ response := &V1ClaimProjectForOrganizationResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseV1GetPostgresUpgradeEligibilityResponse(rsp)
+
+ return response, nil
}
-// V1GetPostgresUpgradeStatusWithResponse request returning *V1GetPostgresUpgradeStatusResponse
-func (c *ClientWithResponses) V1GetPostgresUpgradeStatusWithResponse(ctx context.Context, ref string, params *V1GetPostgresUpgradeStatusParams, reqEditors ...RequestEditorFn) (*V1GetPostgresUpgradeStatusResponse, error) {
- rsp, err := c.V1GetPostgresUpgradeStatus(ctx, ref, params, reqEditors...)
+// ParseV1ListAllProjectsResponse parses an HTTP response from a V1ListAllProjectsWithResponse call
+func ParseV1ListAllProjectsResponse(rsp *http.Response) (*V1ListAllProjectsResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1GetPostgresUpgradeStatusResponse(rsp)
-}
-// V1DeactivateVanitySubdomainConfigWithResponse request returning *V1DeactivateVanitySubdomainConfigResponse
-func (c *ClientWithResponses) V1DeactivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeactivateVanitySubdomainConfigResponse, error) {
- rsp, err := c.V1DeactivateVanitySubdomainConfig(ctx, ref, reqEditors...)
- if err != nil {
- return nil, err
+ response := &V1ListAllProjectsResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseV1DeactivateVanitySubdomainConfigResponse(rsp)
-}
-// V1GetVanitySubdomainConfigWithResponse request returning *V1GetVanitySubdomainConfigResponse
-func (c *ClientWithResponses) V1GetVanitySubdomainConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetVanitySubdomainConfigResponse, error) {
- rsp, err := c.V1GetVanitySubdomainConfig(ctx, ref, reqEditors...)
- if err != nil {
- return nil, err
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest []V1ProjectWithDatabaseResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
}
- return ParseV1GetVanitySubdomainConfigResponse(rsp)
+
+ return response, nil
}
-// V1ActivateVanitySubdomainConfigWithBodyWithResponse request with arbitrary body returning *V1ActivateVanitySubdomainConfigResponse
-func (c *ClientWithResponses) V1ActivateVanitySubdomainConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1ActivateVanitySubdomainConfigResponse, error) {
- rsp, err := c.V1ActivateVanitySubdomainConfigWithBody(ctx, ref, contentType, body, reqEditors...)
+// ParseV1CreateAProjectResponse parses an HTTP response from a V1CreateAProjectWithResponse call
+func ParseV1CreateAProjectResponse(rsp *http.Response) (*V1CreateAProjectResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1ActivateVanitySubdomainConfigResponse(rsp)
-}
-func (c *ClientWithResponses) V1ActivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, body V1ActivateVanitySubdomainConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ActivateVanitySubdomainConfigResponse, error) {
- rsp, err := c.V1ActivateVanitySubdomainConfig(ctx, ref, body, reqEditors...)
- if err != nil {
- return nil, err
+ response := &V1CreateAProjectResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseV1ActivateVanitySubdomainConfigResponse(rsp)
-}
-// V1CheckVanitySubdomainAvailabilityWithBodyWithResponse request with arbitrary body returning *V1CheckVanitySubdomainAvailabilityResponse
-func (c *ClientWithResponses) V1CheckVanitySubdomainAvailabilityWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CheckVanitySubdomainAvailabilityResponse, error) {
- rsp, err := c.V1CheckVanitySubdomainAvailabilityWithBody(ctx, ref, contentType, body, reqEditors...)
- if err != nil {
- return nil, err
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
+ var dest V1ProjectResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON201 = &dest
+
}
- return ParseV1CheckVanitySubdomainAvailabilityResponse(rsp)
+
+ return response, nil
}
-func (c *ClientWithResponses) V1CheckVanitySubdomainAvailabilityWithResponse(ctx context.Context, ref string, body V1CheckVanitySubdomainAvailabilityJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CheckVanitySubdomainAvailabilityResponse, error) {
- rsp, err := c.V1CheckVanitySubdomainAvailability(ctx, ref, body, reqEditors...)
+// ParseV1DeleteAProjectResponse parses an HTTP response from a V1DeleteAProjectWithResponse call
+func ParseV1DeleteAProjectResponse(rsp *http.Response) (*V1DeleteAProjectResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- return ParseV1CheckVanitySubdomainAvailabilityResponse(rsp)
-}
-// V1ListAllSnippetsWithResponse request returning *V1ListAllSnippetsResponse
-func (c *ClientWithResponses) V1ListAllSnippetsWithResponse(ctx context.Context, params *V1ListAllSnippetsParams, reqEditors ...RequestEditorFn) (*V1ListAllSnippetsResponse, error) {
- rsp, err := c.V1ListAllSnippets(ctx, params, reqEditors...)
- if err != nil {
- return nil, err
+ response := &V1DeleteAProjectResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
}
- return ParseV1ListAllSnippetsResponse(rsp)
-}
-// V1GetASnippetWithResponse request returning *V1GetASnippetResponse
-func (c *ClientWithResponses) V1GetASnippetWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*V1GetASnippetResponse, error) {
- rsp, err := c.V1GetASnippet(ctx, id, reqEditors...)
- if err != nil {
- return nil, err
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest V1ProjectRefResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
}
- return ParseV1GetASnippetResponse(rsp)
+
+ return response, nil
}
-// ParseV1DeleteABranchResponse parses an HTTP response from a V1DeleteABranchWithResponse call
-func ParseV1DeleteABranchResponse(rsp *http.Response) (*V1DeleteABranchResponse, error) {
+// ParseV1GetProjectResponse parses an HTTP response from a V1GetProjectWithResponse call
+func ParseV1GetProjectResponse(rsp *http.Response) (*V1GetProjectResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1DeleteABranchResponse{
+ response := &V1GetProjectResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest BranchDeleteResponse
+ var dest V1ProjectWithDatabaseResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -9937,22 +14141,22 @@ func ParseV1DeleteABranchResponse(rsp *http.Response) (*V1DeleteABranchResponse,
return response, nil
}
-// ParseV1GetABranchConfigResponse parses an HTTP response from a V1GetABranchConfigWithResponse call
-func ParseV1GetABranchConfigResponse(rsp *http.Response) (*V1GetABranchConfigResponse, error) {
+// ParseV1GetPerformanceAdvisorsResponse parses an HTTP response from a V1GetPerformanceAdvisorsWithResponse call
+func ParseV1GetPerformanceAdvisorsResponse(rsp *http.Response) (*V1GetPerformanceAdvisorsResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1GetABranchConfigResponse{
+ response := &V1GetPerformanceAdvisorsResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest BranchDetailResponse
+ var dest V1ProjectAdvisorsResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -9963,22 +14167,22 @@ func ParseV1GetABranchConfigResponse(rsp *http.Response) (*V1GetABranchConfigRes
return response, nil
}
-// ParseV1UpdateABranchConfigResponse parses an HTTP response from a V1UpdateABranchConfigWithResponse call
-func ParseV1UpdateABranchConfigResponse(rsp *http.Response) (*V1UpdateABranchConfigResponse, error) {
+// ParseV1GetSecurityAdvisorsResponse parses an HTTP response from a V1GetSecurityAdvisorsWithResponse call
+func ParseV1GetSecurityAdvisorsResponse(rsp *http.Response) (*V1GetSecurityAdvisorsResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1UpdateABranchConfigResponse{
+ response := &V1GetSecurityAdvisorsResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest BranchResponse
+ var dest V1ProjectAdvisorsResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -9989,106 +14193,126 @@ func ParseV1UpdateABranchConfigResponse(rsp *http.Response) (*V1UpdateABranchCon
return response, nil
}
-// ParseV1PushABranchResponse parses an HTTP response from a V1PushABranchWithResponse call
-func ParseV1PushABranchResponse(rsp *http.Response) (*V1PushABranchResponse, error) {
+// ParseV1GetProjectLogsResponse parses an HTTP response from a V1GetProjectLogsWithResponse call
+func ParseV1GetProjectLogsResponse(rsp *http.Response) (*V1GetProjectLogsResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1PushABranchResponse{
+ response := &V1GetProjectLogsResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
- var dest BranchUpdateResponse
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest AnalyticsResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON201 = &dest
+ response.JSON200 = &dest
}
return response, nil
}
-// ParseV1ResetABranchResponse parses an HTTP response from a V1ResetABranchWithResponse call
-func ParseV1ResetABranchResponse(rsp *http.Response) (*V1ResetABranchResponse, error) {
+// ParseV1GetProjectUsageApiCountResponse parses an HTTP response from a V1GetProjectUsageApiCountWithResponse call
+func ParseV1GetProjectUsageApiCountResponse(rsp *http.Response) (*V1GetProjectUsageApiCountResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1ResetABranchResponse{
+ response := &V1GetProjectUsageApiCountResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
- var dest BranchUpdateResponse
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest AnalyticsResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON201 = &dest
+ response.JSON200 = &dest
}
return response, nil
}
-// ParseV1AuthorizeUserResponse parses an HTTP response from a V1AuthorizeUserWithResponse call
-func ParseV1AuthorizeUserResponse(rsp *http.Response) (*V1AuthorizeUserResponse, error) {
+// ParseV1GetProjectUsageRequestCountResponse parses an HTTP response from a V1GetProjectUsageRequestCountWithResponse call
+func ParseV1GetProjectUsageRequestCountResponse(rsp *http.Response) (*V1GetProjectUsageRequestCountResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1AuthorizeUserResponse{
+ response := &V1GetProjectUsageRequestCountResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest AnalyticsResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
return response, nil
}
-// ParseV1RevokeTokenResponse parses an HTTP response from a V1RevokeTokenWithResponse call
-func ParseV1RevokeTokenResponse(rsp *http.Response) (*V1RevokeTokenResponse, error) {
+// ParseV1GetProjectApiKeysResponse parses an HTTP response from a V1GetProjectApiKeysWithResponse call
+func ParseV1GetProjectApiKeysResponse(rsp *http.Response) (*V1GetProjectApiKeysResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1RevokeTokenResponse{
+ response := &V1GetProjectApiKeysResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest []ApiKeyResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
return response, nil
}
-// ParseV1ExchangeOauthTokenResponse parses an HTTP response from a V1ExchangeOauthTokenWithResponse call
-func ParseV1ExchangeOauthTokenResponse(rsp *http.Response) (*V1ExchangeOauthTokenResponse, error) {
+// ParseV1CreateProjectApiKeyResponse parses an HTTP response from a V1CreateProjectApiKeyWithResponse call
+func ParseV1CreateProjectApiKeyResponse(rsp *http.Response) (*V1CreateProjectApiKeyResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1ExchangeOauthTokenResponse{
+ response := &V1CreateProjectApiKeyResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
- var dest OAuthTokenResponse
+ var dest ApiKeyResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10099,22 +14323,22 @@ func ParseV1ExchangeOauthTokenResponse(rsp *http.Response) (*V1ExchangeOauthToke
return response, nil
}
-// ParseV1ListAllOrganizationsResponse parses an HTTP response from a V1ListAllOrganizationsWithResponse call
-func ParseV1ListAllOrganizationsResponse(rsp *http.Response) (*V1ListAllOrganizationsResponse, error) {
+// ParseV1GetProjectLegacyApiKeysResponse parses an HTTP response from a V1GetProjectLegacyApiKeysWithResponse call
+func ParseV1GetProjectLegacyApiKeysResponse(rsp *http.Response) (*V1GetProjectLegacyApiKeysResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1ListAllOrganizationsResponse{
+ response := &V1GetProjectLegacyApiKeysResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest []OrganizationResponseV1
+ var dest LegacyApiKeysResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10125,48 +14349,48 @@ func ParseV1ListAllOrganizationsResponse(rsp *http.Response) (*V1ListAllOrganiza
return response, nil
}
-// ParseV1CreateAnOrganizationResponse parses an HTTP response from a V1CreateAnOrganizationWithResponse call
-func ParseV1CreateAnOrganizationResponse(rsp *http.Response) (*V1CreateAnOrganizationResponse, error) {
+// ParseV1UpdateProjectLegacyApiKeysResponse parses an HTTP response from a V1UpdateProjectLegacyApiKeysWithResponse call
+func ParseV1UpdateProjectLegacyApiKeysResponse(rsp *http.Response) (*V1UpdateProjectLegacyApiKeysResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1CreateAnOrganizationResponse{
+ response := &V1UpdateProjectLegacyApiKeysResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
- var dest OrganizationResponseV1
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest LegacyApiKeysResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON201 = &dest
+ response.JSON200 = &dest
}
return response, nil
}
-// ParseV1GetAnOrganizationResponse parses an HTTP response from a V1GetAnOrganizationWithResponse call
-func ParseV1GetAnOrganizationResponse(rsp *http.Response) (*V1GetAnOrganizationResponse, error) {
+// ParseV1DeleteProjectApiKeyResponse parses an HTTP response from a V1DeleteProjectApiKeyWithResponse call
+func ParseV1DeleteProjectApiKeyResponse(rsp *http.Response) (*V1DeleteProjectApiKeyResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1GetAnOrganizationResponse{
+ response := &V1DeleteProjectApiKeyResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest V1OrganizationSlugResponse
+ var dest ApiKeyResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10177,22 +14401,22 @@ func ParseV1GetAnOrganizationResponse(rsp *http.Response) (*V1GetAnOrganizationR
return response, nil
}
-// ParseV1ListOrganizationMembersResponse parses an HTTP response from a V1ListOrganizationMembersWithResponse call
-func ParseV1ListOrganizationMembersResponse(rsp *http.Response) (*V1ListOrganizationMembersResponse, error) {
+// ParseV1GetProjectApiKeyResponse parses an HTTP response from a V1GetProjectApiKeyWithResponse call
+func ParseV1GetProjectApiKeyResponse(rsp *http.Response) (*V1GetProjectApiKeyResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1ListOrganizationMembersResponse{
+ response := &V1GetProjectApiKeyResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest []V1OrganizationMemberResponse
+ var dest ApiKeyResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10203,22 +14427,22 @@ func ParseV1ListOrganizationMembersResponse(rsp *http.Response) (*V1ListOrganiza
return response, nil
}
-// ParseV1ListAllProjectsResponse parses an HTTP response from a V1ListAllProjectsWithResponse call
-func ParseV1ListAllProjectsResponse(rsp *http.Response) (*V1ListAllProjectsResponse, error) {
+// ParseV1UpdateProjectApiKeyResponse parses an HTTP response from a V1UpdateProjectApiKeyWithResponse call
+func ParseV1UpdateProjectApiKeyResponse(rsp *http.Response) (*V1UpdateProjectApiKeyResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1ListAllProjectsResponse{
+ response := &V1UpdateProjectApiKeyResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest []V1ProjectWithDatabaseResponse
+ var dest ApiKeyResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10229,48 +14453,96 @@ func ParseV1ListAllProjectsResponse(rsp *http.Response) (*V1ListAllProjectsRespo
return response, nil
}
-// ParseV1CreateAProjectResponse parses an HTTP response from a V1CreateAProjectWithResponse call
-func ParseV1CreateAProjectResponse(rsp *http.Response) (*V1CreateAProjectResponse, error) {
+// ParseV1ListProjectAddonsResponse parses an HTTP response from a V1ListProjectAddonsWithResponse call
+func ParseV1ListProjectAddonsResponse(rsp *http.Response) (*V1ListProjectAddonsResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1CreateAProjectResponse{
+ response := &V1ListProjectAddonsResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
- var dest V1ProjectResponse
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest ListProjectAddonsResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON201 = &dest
+ response.JSON200 = &dest
}
return response, nil
}
-// ParseV1DeleteAProjectResponse parses an HTTP response from a V1DeleteAProjectWithResponse call
-func ParseV1DeleteAProjectResponse(rsp *http.Response) (*V1DeleteAProjectResponse, error) {
+// ParseV1ApplyProjectAddonResponse parses an HTTP response from a V1ApplyProjectAddonWithResponse call
+func ParseV1ApplyProjectAddonResponse(rsp *http.Response) (*V1ApplyProjectAddonResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1DeleteAProjectResponse{
+ response := &V1ApplyProjectAddonResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
+}
+
+// ParseV1RemoveProjectAddonResponse parses an HTTP response from a V1RemoveProjectAddonWithResponse call
+func ParseV1RemoveProjectAddonResponse(rsp *http.Response) (*V1RemoveProjectAddonResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1RemoveProjectAddonResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
+}
+
+// ParseV1DisablePreviewBranchingResponse parses an HTTP response from a V1DisablePreviewBranchingWithResponse call
+func ParseV1DisablePreviewBranchingResponse(rsp *http.Response) (*V1DisablePreviewBranchingResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1DisablePreviewBranchingResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
+}
+
+// ParseV1ListAllBranchesResponse parses an HTTP response from a V1ListAllBranchesWithResponse call
+func ParseV1ListAllBranchesResponse(rsp *http.Response) (*V1ListAllBranchesResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1ListAllBranchesResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest V1ProjectRefResponse
+ var dest []BranchResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10281,48 +14553,48 @@ func ParseV1DeleteAProjectResponse(rsp *http.Response) (*V1DeleteAProjectRespons
return response, nil
}
-// ParseV1GetProjectResponse parses an HTTP response from a V1GetProjectWithResponse call
-func ParseV1GetProjectResponse(rsp *http.Response) (*V1GetProjectResponse, error) {
+// ParseV1CreateABranchResponse parses an HTTP response from a V1CreateABranchWithResponse call
+func ParseV1CreateABranchResponse(rsp *http.Response) (*V1CreateABranchResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1GetProjectResponse{
+ response := &V1CreateABranchResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest V1ProjectWithDatabaseResponse
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
+ var dest BranchResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON200 = &dest
+ response.JSON201 = &dest
}
return response, nil
}
-// ParseGetLogsResponse parses an HTTP response from a GetLogsWithResponse call
-func ParseGetLogsResponse(rsp *http.Response) (*GetLogsResponse, error) {
+// ParseV1GetABranchResponse parses an HTTP response from a V1GetABranchWithResponse call
+func ParseV1GetABranchResponse(rsp *http.Response) (*V1GetABranchResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &GetLogsResponse{
+ response := &V1GetABranchResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest V1AnalyticsResponse
+ var dest BranchResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10333,22 +14605,38 @@ func ParseGetLogsResponse(rsp *http.Response) (*GetLogsResponse, error) {
return response, nil
}
-// ParseV1GetProjectApiKeysResponse parses an HTTP response from a V1GetProjectApiKeysWithResponse call
-func ParseV1GetProjectApiKeysResponse(rsp *http.Response) (*V1GetProjectApiKeysResponse, error) {
+// ParseV1DeleteProjectClaimTokenResponse parses an HTTP response from a V1DeleteProjectClaimTokenWithResponse call
+func ParseV1DeleteProjectClaimTokenResponse(rsp *http.Response) (*V1DeleteProjectClaimTokenResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1GetProjectApiKeysResponse{
+ response := &V1DeleteProjectClaimTokenResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
+}
+
+// ParseV1GetProjectClaimTokenResponse parses an HTTP response from a V1GetProjectClaimTokenWithResponse call
+func ParseV1GetProjectClaimTokenResponse(rsp *http.Response) (*V1GetProjectClaimTokenResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1GetProjectClaimTokenResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest []ApiKeyResponse
+ var dest ProjectClaimTokenResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10359,48 +14647,48 @@ func ParseV1GetProjectApiKeysResponse(rsp *http.Response) (*V1GetProjectApiKeysR
return response, nil
}
-// ParseCreateApiKeyResponse parses an HTTP response from a CreateApiKeyWithResponse call
-func ParseCreateApiKeyResponse(rsp *http.Response) (*CreateApiKeyResponse, error) {
+// ParseV1CreateProjectClaimTokenResponse parses an HTTP response from a V1CreateProjectClaimTokenWithResponse call
+func ParseV1CreateProjectClaimTokenResponse(rsp *http.Response) (*V1CreateProjectClaimTokenResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &CreateApiKeyResponse{
+ response := &V1CreateProjectClaimTokenResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
- var dest ApiKeyResponse
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest CreateProjectClaimTokenResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON201 = &dest
+ response.JSON200 = &dest
}
return response, nil
}
-// ParseDeleteApiKeyResponse parses an HTTP response from a DeleteApiKeyWithResponse call
-func ParseDeleteApiKeyResponse(rsp *http.Response) (*DeleteApiKeyResponse, error) {
+// ParseV1GetAuthServiceConfigResponse parses an HTTP response from a V1GetAuthServiceConfigWithResponse call
+func ParseV1GetAuthServiceConfigResponse(rsp *http.Response) (*V1GetAuthServiceConfigResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &DeleteApiKeyResponse{
+ response := &V1GetAuthServiceConfigResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest ApiKeyResponse
+ var dest AuthConfigResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10411,22 +14699,22 @@ func ParseDeleteApiKeyResponse(rsp *http.Response) (*DeleteApiKeyResponse, error
return response, nil
}
-// ParseGetApiKeyResponse parses an HTTP response from a GetApiKeyWithResponse call
-func ParseGetApiKeyResponse(rsp *http.Response) (*GetApiKeyResponse, error) {
+// ParseV1UpdateAuthServiceConfigResponse parses an HTTP response from a V1UpdateAuthServiceConfigWithResponse call
+func ParseV1UpdateAuthServiceConfigResponse(rsp *http.Response) (*V1UpdateAuthServiceConfigResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &GetApiKeyResponse{
+ response := &V1UpdateAuthServiceConfigResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest ApiKeyResponse
+ var dest AuthConfigResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10437,22 +14725,22 @@ func ParseGetApiKeyResponse(rsp *http.Response) (*GetApiKeyResponse, error) {
return response, nil
}
-// ParseUpdateApiKeyResponse parses an HTTP response from a UpdateApiKeyWithResponse call
-func ParseUpdateApiKeyResponse(rsp *http.Response) (*UpdateApiKeyResponse, error) {
+// ParseV1GetProjectSigningKeysResponse parses an HTTP response from a V1GetProjectSigningKeysWithResponse call
+func ParseV1GetProjectSigningKeysResponse(rsp *http.Response) (*V1GetProjectSigningKeysResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &UpdateApiKeyResponse{
+ response := &V1GetProjectSigningKeysResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest ApiKeyResponse
+ var dest SigningKeysResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10463,90 +14751,126 @@ func ParseUpdateApiKeyResponse(rsp *http.Response) (*UpdateApiKeyResponse, error
return response, nil
}
-// ParseV1DisablePreviewBranchingResponse parses an HTTP response from a V1DisablePreviewBranchingWithResponse call
-func ParseV1DisablePreviewBranchingResponse(rsp *http.Response) (*V1DisablePreviewBranchingResponse, error) {
+// ParseV1CreateProjectSigningKeyResponse parses an HTTP response from a V1CreateProjectSigningKeyWithResponse call
+func ParseV1CreateProjectSigningKeyResponse(rsp *http.Response) (*V1CreateProjectSigningKeyResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1CreateProjectSigningKeyResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
+ var dest SigningKeyResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON201 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseV1GetLegacySigningKeyResponse parses an HTTP response from a V1GetLegacySigningKeyWithResponse call
+func ParseV1GetLegacySigningKeyResponse(rsp *http.Response) (*V1GetLegacySigningKeyResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1DisablePreviewBranchingResponse{
+ response := &V1GetLegacySigningKeyResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest SigningKeyResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
return response, nil
}
-// ParseV1ListAllBranchesResponse parses an HTTP response from a V1ListAllBranchesWithResponse call
-func ParseV1ListAllBranchesResponse(rsp *http.Response) (*V1ListAllBranchesResponse, error) {
+// ParseV1CreateLegacySigningKeyResponse parses an HTTP response from a V1CreateLegacySigningKeyWithResponse call
+func ParseV1CreateLegacySigningKeyResponse(rsp *http.Response) (*V1CreateLegacySigningKeyResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1ListAllBranchesResponse{
+ response := &V1CreateLegacySigningKeyResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest []BranchResponse
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
+ var dest SigningKeyResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON200 = &dest
+ response.JSON201 = &dest
}
return response, nil
}
-// ParseV1CreateABranchResponse parses an HTTP response from a V1CreateABranchWithResponse call
-func ParseV1CreateABranchResponse(rsp *http.Response) (*V1CreateABranchResponse, error) {
+// ParseV1RemoveProjectSigningKeyResponse parses an HTTP response from a V1RemoveProjectSigningKeyWithResponse call
+func ParseV1RemoveProjectSigningKeyResponse(rsp *http.Response) (*V1RemoveProjectSigningKeyResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1CreateABranchResponse{
+ response := &V1RemoveProjectSigningKeyResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
- var dest BranchResponse
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest SigningKeyResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
- response.JSON201 = &dest
+ response.JSON200 = &dest
}
return response, nil
}
-// ParseV1GetAuthServiceConfigResponse parses an HTTP response from a V1GetAuthServiceConfigWithResponse call
-func ParseV1GetAuthServiceConfigResponse(rsp *http.Response) (*V1GetAuthServiceConfigResponse, error) {
+// ParseV1GetProjectSigningKeyResponse parses an HTTP response from a V1GetProjectSigningKeyWithResponse call
+func ParseV1GetProjectSigningKeyResponse(rsp *http.Response) (*V1GetProjectSigningKeyResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1GetAuthServiceConfigResponse{
+ response := &V1GetProjectSigningKeyResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest AuthConfigResponse
+ var dest SigningKeyResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10557,22 +14881,22 @@ func ParseV1GetAuthServiceConfigResponse(rsp *http.Response) (*V1GetAuthServiceC
return response, nil
}
-// ParseV1UpdateAuthServiceConfigResponse parses an HTTP response from a V1UpdateAuthServiceConfigWithResponse call
-func ParseV1UpdateAuthServiceConfigResponse(rsp *http.Response) (*V1UpdateAuthServiceConfigResponse, error) {
+// ParseV1UpdateProjectSigningKeyResponse parses an HTTP response from a V1UpdateProjectSigningKeyWithResponse call
+func ParseV1UpdateProjectSigningKeyResponse(rsp *http.Response) (*V1UpdateProjectSigningKeyResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1UpdateAuthServiceConfigResponse{
+ response := &V1UpdateProjectSigningKeyResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest AuthConfigResponse
+ var dest SigningKeyResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -10713,15 +15037,15 @@ func ParseV1UpdateASsoProviderResponse(rsp *http.Response) (*V1UpdateASsoProvide
return response, nil
}
-// ParseListTPAForProjectResponse parses an HTTP response from a ListTPAForProjectWithResponse call
-func ParseListTPAForProjectResponse(rsp *http.Response) (*ListTPAForProjectResponse, error) {
+// ParseV1ListProjectTpaIntegrationsResponse parses an HTTP response from a V1ListProjectTpaIntegrationsWithResponse call
+func ParseV1ListProjectTpaIntegrationsResponse(rsp *http.Response) (*V1ListProjectTpaIntegrationsResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &ListTPAForProjectResponse{
+ response := &V1ListProjectTpaIntegrationsResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
@@ -10739,15 +15063,15 @@ func ParseListTPAForProjectResponse(rsp *http.Response) (*ListTPAForProjectRespo
return response, nil
}
-// ParseCreateTPAForProjectResponse parses an HTTP response from a CreateTPAForProjectWithResponse call
-func ParseCreateTPAForProjectResponse(rsp *http.Response) (*CreateTPAForProjectResponse, error) {
+// ParseV1CreateProjectTpaIntegrationResponse parses an HTTP response from a V1CreateProjectTpaIntegrationWithResponse call
+func ParseV1CreateProjectTpaIntegrationResponse(rsp *http.Response) (*V1CreateProjectTpaIntegrationResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &CreateTPAForProjectResponse{
+ response := &V1CreateProjectTpaIntegrationResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
@@ -10765,15 +15089,15 @@ func ParseCreateTPAForProjectResponse(rsp *http.Response) (*CreateTPAForProjectR
return response, nil
}
-// ParseDeleteTPAForProjectResponse parses an HTTP response from a DeleteTPAForProjectWithResponse call
-func ParseDeleteTPAForProjectResponse(rsp *http.Response) (*DeleteTPAForProjectResponse, error) {
+// ParseV1DeleteProjectTpaIntegrationResponse parses an HTTP response from a V1DeleteProjectTpaIntegrationWithResponse call
+func ParseV1DeleteProjectTpaIntegrationResponse(rsp *http.Response) (*V1DeleteProjectTpaIntegrationResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &DeleteTPAForProjectResponse{
+ response := &V1DeleteProjectTpaIntegrationResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
@@ -10791,15 +15115,15 @@ func ParseDeleteTPAForProjectResponse(rsp *http.Response) (*DeleteTPAForProjectR
return response, nil
}
-// ParseGetTPAForProjectResponse parses an HTTP response from a GetTPAForProjectWithResponse call
-func ParseGetTPAForProjectResponse(rsp *http.Response) (*GetTPAForProjectResponse, error) {
+// ParseV1GetProjectTpaIntegrationResponse parses an HTTP response from a V1GetProjectTpaIntegrationWithResponse call
+func ParseV1GetProjectTpaIntegrationResponse(rsp *http.Response) (*V1GetProjectTpaIntegrationResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &GetTPAForProjectResponse{
+ response := &V1GetProjectTpaIntegrationResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
@@ -10843,15 +15167,15 @@ func ParseV1GetProjectPgbouncerConfigResponse(rsp *http.Response) (*V1GetProject
return response, nil
}
-// ParseV1GetSupavisorConfigResponse parses an HTTP response from a V1GetSupavisorConfigWithResponse call
-func ParseV1GetSupavisorConfigResponse(rsp *http.Response) (*V1GetSupavisorConfigResponse, error) {
+// ParseV1GetPoolerConfigResponse parses an HTTP response from a V1GetPoolerConfigWithResponse call
+func ParseV1GetPoolerConfigResponse(rsp *http.Response) (*V1GetPoolerConfigResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1GetSupavisorConfigResponse{
+ response := &V1GetPoolerConfigResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
@@ -10869,15 +15193,15 @@ func ParseV1GetSupavisorConfigResponse(rsp *http.Response) (*V1GetSupavisorConfi
return response, nil
}
-// ParseV1UpdateSupavisorConfigResponse parses an HTTP response from a V1UpdateSupavisorConfigWithResponse call
-func ParseV1UpdateSupavisorConfigResponse(rsp *http.Response) (*V1UpdateSupavisorConfigResponse, error) {
+// ParseV1UpdatePoolerConfigResponse parses an HTTP response from a V1UpdatePoolerConfigWithResponse call
+func ParseV1UpdatePoolerConfigResponse(rsp *http.Response) (*V1UpdatePoolerConfigResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1UpdateSupavisorConfigResponse{
+ response := &V1UpdatePoolerConfigResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
@@ -11151,22 +15475,22 @@ func ParseV1RestorePitrBackupResponse(rsp *http.Response) (*V1RestorePitrBackupR
return response, nil
}
-// ParseGetDatabaseMetadataResponse parses an HTTP response from a GetDatabaseMetadataWithResponse call
-func ParseGetDatabaseMetadataResponse(rsp *http.Response) (*GetDatabaseMetadataResponse, error) {
+// ParseV1GetRestorePointResponse parses an HTTP response from a V1GetRestorePointWithResponse call
+func ParseV1GetRestorePointResponse(rsp *http.Response) (*V1GetRestorePointResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &GetDatabaseMetadataResponse{
+ response := &V1GetRestorePointResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest GetProjectDbMetadataResponseDto
+ var dest V1RestorePointResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -11177,22 +15501,22 @@ func ParseGetDatabaseMetadataResponse(rsp *http.Response) (*GetDatabaseMetadataR
return response, nil
}
-// ParseV1RunAQueryResponse parses an HTTP response from a V1RunAQueryWithResponse call
-func ParseV1RunAQueryResponse(rsp *http.Response) (*V1RunAQueryResponse, error) {
+// ParseV1CreateRestorePointResponse parses an HTTP response from a V1CreateRestorePointWithResponse call
+func ParseV1CreateRestorePointResponse(rsp *http.Response) (*V1CreateRestorePointResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
defer func() { _ = rsp.Body.Close() }()
if err != nil {
return nil, err
}
- response := &V1RunAQueryResponse{
+ response := &V1CreateRestorePointResponse{
Body: bodyBytes,
HTTPResponse: rsp,
}
switch {
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
- var dest map[string]interface{}
+ var dest V1RestorePointResponse
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
return nil, err
}
@@ -11203,6 +15527,216 @@ func ParseV1RunAQueryResponse(rsp *http.Response) (*V1RunAQueryResponse, error)
return response, nil
}
+// ParseV1UndoResponse parses an HTTP response from a V1UndoWithResponse call
+func ParseV1UndoResponse(rsp *http.Response) (*V1UndoResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1UndoResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
+}
+
+// ParseV1GetDatabaseMetadataResponse parses an HTTP response from a V1GetDatabaseMetadataWithResponse call
+func ParseV1GetDatabaseMetadataResponse(rsp *http.Response) (*V1GetDatabaseMetadataResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1GetDatabaseMetadataResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest GetProjectDbMetadataResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseV1GetJitAccessResponse parses an HTTP response from a V1GetJitAccessWithResponse call
+func ParseV1GetJitAccessResponse(rsp *http.Response) (*V1GetJitAccessResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1GetJitAccessResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest JitAccessResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseV1UpdateJitAccessResponse parses an HTTP response from a V1UpdateJitAccessWithResponse call
+func ParseV1UpdateJitAccessResponse(rsp *http.Response) (*V1UpdateJitAccessResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1UpdateJitAccessResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest JitAccessResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseV1ListJitAccessResponse parses an HTTP response from a V1ListJitAccessWithResponse call
+func ParseV1ListJitAccessResponse(rsp *http.Response) (*V1ListJitAccessResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1ListJitAccessResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest JitListAccessResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseV1DeleteJitAccessResponse parses an HTTP response from a V1DeleteJitAccessWithResponse call
+func ParseV1DeleteJitAccessResponse(rsp *http.Response) (*V1DeleteJitAccessResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1DeleteJitAccessResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
+}
+
+// ParseV1ListMigrationHistoryResponse parses an HTTP response from a V1ListMigrationHistoryWithResponse call
+func ParseV1ListMigrationHistoryResponse(rsp *http.Response) (*V1ListMigrationHistoryResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1ListMigrationHistoryResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest V1ListMigrationsResponse
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
+ return response, nil
+}
+
+// ParseV1ApplyAMigrationResponse parses an HTTP response from a V1ApplyAMigrationWithResponse call
+func ParseV1ApplyAMigrationResponse(rsp *http.Response) (*V1ApplyAMigrationResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1ApplyAMigrationResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
+}
+
+// ParseV1UpsertAMigrationResponse parses an HTTP response from a V1UpsertAMigrationWithResponse call
+func ParseV1UpsertAMigrationResponse(rsp *http.Response) (*V1UpsertAMigrationResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1UpsertAMigrationResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
+}
+
+// ParseV1RunAQueryResponse parses an HTTP response from a V1RunAQueryWithResponse call
+func ParseV1RunAQueryResponse(rsp *http.Response) (*V1RunAQueryResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1RunAQueryResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ return response, nil
+}
+
// ParseV1EnableDatabaseWebhookResponse parses an HTTP response from a V1EnableDatabaseWebhookWithResponse call
func ParseV1EnableDatabaseWebhookResponse(rsp *http.Response) (*V1EnableDatabaseWebhookResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
@@ -11404,6 +15938,16 @@ func ParseV1GetAFunctionBodyResponse(rsp *http.Response) (*V1GetAFunctionBodyRes
HTTPResponse: rsp,
}
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
+ var dest StreamableFile
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON200 = &dest
+
+ }
+
return response, nil
}
@@ -11475,6 +16019,32 @@ func ParseV1ListAllNetworkBansResponse(rsp *http.Response) (*V1ListAllNetworkBan
return response, nil
}
+// ParseV1ListAllNetworkBansEnrichedResponse parses an HTTP response from a V1ListAllNetworkBansEnrichedWithResponse call
+func ParseV1ListAllNetworkBansEnrichedResponse(rsp *http.Response) (*V1ListAllNetworkBansEnrichedResponse, error) {
+ bodyBytes, err := io.ReadAll(rsp.Body)
+ defer func() { _ = rsp.Body.Close() }()
+ if err != nil {
+ return nil, err
+ }
+
+ response := &V1ListAllNetworkBansEnrichedResponse{
+ Body: bodyBytes,
+ HTTPResponse: rsp,
+ }
+
+ switch {
+ case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201:
+ var dest NetworkBanResponseEnriched
+ if err := json.Unmarshal(bodyBytes, &dest); err != nil {
+ return nil, err
+ }
+ response.JSON201 = &dest
+
+ }
+
+ return response, nil
+}
+
// ParseV1GetNetworkRestrictionsResponse parses an HTTP response from a V1GetNetworkRestrictionsWithResponse call
func ParseV1GetNetworkRestrictionsResponse(rsp *http.Response) (*V1GetNetworkRestrictionsResponse, error) {
bodyBytes, err := io.ReadAll(rsp.Body)
@@ -11792,16 +16362,6 @@ func ParseV1BulkDeleteSecretsResponse(rsp *http.Response) (*V1BulkDeleteSecretsR
HTTPResponse: rsp,
}
- switch {
- case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
- var dest map[string]interface{}
- if err := json.Unmarshal(bodyBytes, &dest); err != nil {
- return nil, err
- }
- response.JSON200 = &dest
-
- }
-
return response, nil
}
diff --git a/pkg/api/types.cfg.yaml b/pkg/api/types.cfg.yaml
index 6dcd8d6ca6..128f4a387b 100755
--- a/pkg/api/types.cfg.yaml
+++ b/pkg/api/types.cfg.yaml
@@ -1,4 +1,8 @@
package: api
generate:
models: true
+output-options:
+ nullable-type: true
+ overlay:
+ path: api/overlay.yaml
output: pkg/api/types.gen.go
diff --git a/pkg/api/types.gen.go b/pkg/api/types.gen.go
index 9c289d3fe1..7079302fc6 100644
--- a/pkg/api/types.gen.go
+++ b/pkg/api/types.gen.go
@@ -6,7 +6,9 @@ package api
import (
"encoding/json"
"fmt"
+ "time"
+ "github.com/oapi-codegen/nullable"
"github.com/oapi-codegen/runtime"
openapi_types "github.com/oapi-codegen/runtime/types"
)
@@ -23,17 +25,82 @@ const (
ApiKeyResponseTypeSecret ApiKeyResponseType = "secret"
)
-// Defines values for AuthHealthResponseName.
+// Defines values for ApplyProjectAddonBodyAddonType.
const (
- GoTrue AuthHealthResponseName = "GoTrue"
+ ApplyProjectAddonBodyAddonTypeAuthMfaPhone ApplyProjectAddonBodyAddonType = "auth_mfa_phone"
+ ApplyProjectAddonBodyAddonTypeAuthMfaWebAuthn ApplyProjectAddonBodyAddonType = "auth_mfa_web_authn"
+ ApplyProjectAddonBodyAddonTypeComputeInstance ApplyProjectAddonBodyAddonType = "compute_instance"
+ ApplyProjectAddonBodyAddonTypeCustomDomain ApplyProjectAddonBodyAddonType = "custom_domain"
+ ApplyProjectAddonBodyAddonTypeIpv4 ApplyProjectAddonBodyAddonType = "ipv4"
+ ApplyProjectAddonBodyAddonTypeLogDrain ApplyProjectAddonBodyAddonType = "log_drain"
+ ApplyProjectAddonBodyAddonTypePitr ApplyProjectAddonBodyAddonType = "pitr"
)
-// Defines values for BillingPlanId.
+// Defines values for ApplyProjectAddonBodyAddonVariant0.
const (
- BillingPlanIdEnterprise BillingPlanId = "enterprise"
- BillingPlanIdFree BillingPlanId = "free"
- BillingPlanIdPro BillingPlanId = "pro"
- BillingPlanIdTeam BillingPlanId = "team"
+ ApplyProjectAddonBodyAddonVariant0Ci12xlarge ApplyProjectAddonBodyAddonVariant0 = "ci_12xlarge"
+ ApplyProjectAddonBodyAddonVariant0Ci16xlarge ApplyProjectAddonBodyAddonVariant0 = "ci_16xlarge"
+ ApplyProjectAddonBodyAddonVariant0Ci24xlarge ApplyProjectAddonBodyAddonVariant0 = "ci_24xlarge"
+ ApplyProjectAddonBodyAddonVariant0Ci24xlargeHighMemory ApplyProjectAddonBodyAddonVariant0 = "ci_24xlarge_high_memory"
+ ApplyProjectAddonBodyAddonVariant0Ci24xlargeOptimizedCpu ApplyProjectAddonBodyAddonVariant0 = "ci_24xlarge_optimized_cpu"
+ ApplyProjectAddonBodyAddonVariant0Ci24xlargeOptimizedMemory ApplyProjectAddonBodyAddonVariant0 = "ci_24xlarge_optimized_memory"
+ ApplyProjectAddonBodyAddonVariant0Ci2xlarge ApplyProjectAddonBodyAddonVariant0 = "ci_2xlarge"
+ ApplyProjectAddonBodyAddonVariant0Ci48xlarge ApplyProjectAddonBodyAddonVariant0 = "ci_48xlarge"
+ ApplyProjectAddonBodyAddonVariant0Ci48xlargeHighMemory ApplyProjectAddonBodyAddonVariant0 = "ci_48xlarge_high_memory"
+ ApplyProjectAddonBodyAddonVariant0Ci48xlargeOptimizedCpu ApplyProjectAddonBodyAddonVariant0 = "ci_48xlarge_optimized_cpu"
+ ApplyProjectAddonBodyAddonVariant0Ci48xlargeOptimizedMemory ApplyProjectAddonBodyAddonVariant0 = "ci_48xlarge_optimized_memory"
+ ApplyProjectAddonBodyAddonVariant0Ci4xlarge ApplyProjectAddonBodyAddonVariant0 = "ci_4xlarge"
+ ApplyProjectAddonBodyAddonVariant0Ci8xlarge ApplyProjectAddonBodyAddonVariant0 = "ci_8xlarge"
+ ApplyProjectAddonBodyAddonVariant0CiLarge ApplyProjectAddonBodyAddonVariant0 = "ci_large"
+ ApplyProjectAddonBodyAddonVariant0CiMedium ApplyProjectAddonBodyAddonVariant0 = "ci_medium"
+ ApplyProjectAddonBodyAddonVariant0CiMicro ApplyProjectAddonBodyAddonVariant0 = "ci_micro"
+ ApplyProjectAddonBodyAddonVariant0CiSmall ApplyProjectAddonBodyAddonVariant0 = "ci_small"
+ ApplyProjectAddonBodyAddonVariant0CiXlarge ApplyProjectAddonBodyAddonVariant0 = "ci_xlarge"
+)
+
+// Defines values for ApplyProjectAddonBodyAddonVariant1.
+const (
+ ApplyProjectAddonBodyAddonVariant1CdDefault ApplyProjectAddonBodyAddonVariant1 = "cd_default"
+)
+
+// Defines values for ApplyProjectAddonBodyAddonVariant2.
+const (
+ ApplyProjectAddonBodyAddonVariant2Pitr14 ApplyProjectAddonBodyAddonVariant2 = "pitr_14"
+ ApplyProjectAddonBodyAddonVariant2Pitr28 ApplyProjectAddonBodyAddonVariant2 = "pitr_28"
+ ApplyProjectAddonBodyAddonVariant2Pitr7 ApplyProjectAddonBodyAddonVariant2 = "pitr_7"
+)
+
+// Defines values for ApplyProjectAddonBodyAddonVariant3.
+const (
+ ApplyProjectAddonBodyAddonVariant3Ipv4Default ApplyProjectAddonBodyAddonVariant3 = "ipv4_default"
+)
+
+// Defines values for AuthConfigResponsePasswordRequiredCharacters.
+const (
+ AuthConfigResponsePasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 AuthConfigResponsePasswordRequiredCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789"
+ AuthConfigResponsePasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567891 AuthConfigResponsePasswordRequiredCharacters = "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789"
+ AuthConfigResponsePasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567892 AuthConfigResponsePasswordRequiredCharacters = "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~"
+ AuthConfigResponsePasswordRequiredCharactersEmpty AuthConfigResponsePasswordRequiredCharacters = ""
+)
+
+// Defines values for AuthConfigResponseSecurityCaptchaProvider.
+const (
+ AuthConfigResponseSecurityCaptchaProviderHcaptcha AuthConfigResponseSecurityCaptchaProvider = "hcaptcha"
+ AuthConfigResponseSecurityCaptchaProviderTurnstile AuthConfigResponseSecurityCaptchaProvider = "turnstile"
+)
+
+// Defines values for AuthConfigResponseSmsProvider.
+const (
+ AuthConfigResponseSmsProviderMessagebird AuthConfigResponseSmsProvider = "messagebird"
+ AuthConfigResponseSmsProviderTextlocal AuthConfigResponseSmsProvider = "textlocal"
+ AuthConfigResponseSmsProviderTwilio AuthConfigResponseSmsProvider = "twilio"
+ AuthConfigResponseSmsProviderTwilioVerify AuthConfigResponseSmsProvider = "twilio_verify"
+ AuthConfigResponseSmsProviderVonage AuthConfigResponseSmsProvider = "vonage"
+)
+
+// Defines values for BranchDeleteResponseMessage.
+const (
+ BranchDeleteResponseMessageOk BranchDeleteResponseMessage = "ok"
)
// Defines values for BranchDetailResponseStatus.
@@ -65,6 +132,11 @@ const (
BranchResponseStatusRUNNINGMIGRATIONS BranchResponseStatus = "RUNNING_MIGRATIONS"
)
+// Defines values for BranchUpdateResponseMessage.
+const (
+ BranchUpdateResponseMessageOk BranchUpdateResponseMessage = "ok"
+)
+
// Defines values for BulkUpdateFunctionBodyStatus.
const (
BulkUpdateFunctionBodyStatusACTIVE BulkUpdateFunctionBodyStatus = "ACTIVE"
@@ -72,50 +144,140 @@ const (
BulkUpdateFunctionBodyStatusTHROTTLED BulkUpdateFunctionBodyStatus = "THROTTLED"
)
+// Defines values for BulkUpdateFunctionResponseFunctionsStatus.
+const (
+ BulkUpdateFunctionResponseFunctionsStatusACTIVE BulkUpdateFunctionResponseFunctionsStatus = "ACTIVE"
+ BulkUpdateFunctionResponseFunctionsStatusREMOVED BulkUpdateFunctionResponseFunctionsStatus = "REMOVED"
+ BulkUpdateFunctionResponseFunctionsStatusTHROTTLED BulkUpdateFunctionResponseFunctionsStatus = "THROTTLED"
+)
+
// Defines values for CreateApiKeyBodyType.
const (
CreateApiKeyBodyTypePublishable CreateApiKeyBodyType = "publishable"
CreateApiKeyBodyTypeSecret CreateApiKeyBodyType = "secret"
)
+// Defines values for CreateBranchBodyDesiredInstanceSize.
+const (
+ CreateBranchBodyDesiredInstanceSizeLarge CreateBranchBodyDesiredInstanceSize = "large"
+ CreateBranchBodyDesiredInstanceSizeMedium CreateBranchBodyDesiredInstanceSize = "medium"
+ CreateBranchBodyDesiredInstanceSizeMicro CreateBranchBodyDesiredInstanceSize = "micro"
+ CreateBranchBodyDesiredInstanceSizeN12xlarge CreateBranchBodyDesiredInstanceSize = "12xlarge"
+ CreateBranchBodyDesiredInstanceSizeN16xlarge CreateBranchBodyDesiredInstanceSize = "16xlarge"
+ CreateBranchBodyDesiredInstanceSizeN24xlarge CreateBranchBodyDesiredInstanceSize = "24xlarge"
+ CreateBranchBodyDesiredInstanceSizeN24xlargeHighMemory CreateBranchBodyDesiredInstanceSize = "24xlarge_high_memory"
+ CreateBranchBodyDesiredInstanceSizeN24xlargeOptimizedCpu CreateBranchBodyDesiredInstanceSize = "24xlarge_optimized_cpu"
+ CreateBranchBodyDesiredInstanceSizeN24xlargeOptimizedMemory CreateBranchBodyDesiredInstanceSize = "24xlarge_optimized_memory"
+ CreateBranchBodyDesiredInstanceSizeN2xlarge CreateBranchBodyDesiredInstanceSize = "2xlarge"
+ CreateBranchBodyDesiredInstanceSizeN48xlarge CreateBranchBodyDesiredInstanceSize = "48xlarge"
+ CreateBranchBodyDesiredInstanceSizeN48xlargeHighMemory CreateBranchBodyDesiredInstanceSize = "48xlarge_high_memory"
+ CreateBranchBodyDesiredInstanceSizeN48xlargeOptimizedCpu CreateBranchBodyDesiredInstanceSize = "48xlarge_optimized_cpu"
+ CreateBranchBodyDesiredInstanceSizeN48xlargeOptimizedMemory CreateBranchBodyDesiredInstanceSize = "48xlarge_optimized_memory"
+ CreateBranchBodyDesiredInstanceSizeN4xlarge CreateBranchBodyDesiredInstanceSize = "4xlarge"
+ CreateBranchBodyDesiredInstanceSizeN8xlarge CreateBranchBodyDesiredInstanceSize = "8xlarge"
+ CreateBranchBodyDesiredInstanceSizeNano CreateBranchBodyDesiredInstanceSize = "nano"
+ CreateBranchBodyDesiredInstanceSizePico CreateBranchBodyDesiredInstanceSize = "pico"
+ CreateBranchBodyDesiredInstanceSizeSmall CreateBranchBodyDesiredInstanceSize = "small"
+ CreateBranchBodyDesiredInstanceSizeXlarge CreateBranchBodyDesiredInstanceSize = "xlarge"
+)
+
+// Defines values for CreateBranchBodyPostgresEngine.
+const (
+ CreateBranchBodyPostgresEngineN15 CreateBranchBodyPostgresEngine = "15"
+ CreateBranchBodyPostgresEngineN17 CreateBranchBodyPostgresEngine = "17"
+ CreateBranchBodyPostgresEngineN17Oriole CreateBranchBodyPostgresEngine = "17-oriole"
+)
+
+// Defines values for CreateBranchBodyReleaseChannel.
+const (
+ CreateBranchBodyReleaseChannelAlpha CreateBranchBodyReleaseChannel = "alpha"
+ CreateBranchBodyReleaseChannelBeta CreateBranchBodyReleaseChannel = "beta"
+ CreateBranchBodyReleaseChannelGa CreateBranchBodyReleaseChannel = "ga"
+ CreateBranchBodyReleaseChannelInternal CreateBranchBodyReleaseChannel = "internal"
+ CreateBranchBodyReleaseChannelPreview CreateBranchBodyReleaseChannel = "preview"
+ CreateBranchBodyReleaseChannelWithdrawn CreateBranchBodyReleaseChannel = "withdrawn"
+)
+
// Defines values for CreateProviderBodyType.
const (
Saml CreateProviderBodyType = "saml"
)
-// Defines values for DatabaseUpgradeStatusError.
+// Defines values for CreateSigningKeyBodyAlgorithm.
+const (
+ CreateSigningKeyBodyAlgorithmES256 CreateSigningKeyBodyAlgorithm = "ES256"
+ CreateSigningKeyBodyAlgorithmEdDSA CreateSigningKeyBodyAlgorithm = "EdDSA"
+ CreateSigningKeyBodyAlgorithmHS256 CreateSigningKeyBodyAlgorithm = "HS256"
+ CreateSigningKeyBodyAlgorithmRS256 CreateSigningKeyBodyAlgorithm = "RS256"
+)
+
+// Defines values for CreateSigningKeyBodyPrivateJwk0E.
+const (
+ AQAB CreateSigningKeyBodyPrivateJwk0E = "AQAB"
+)
+
+// Defines values for CreateSigningKeyBodyPrivateJwk0Kty.
+const (
+ RSA CreateSigningKeyBodyPrivateJwk0Kty = "RSA"
+)
+
+// Defines values for CreateSigningKeyBodyPrivateJwk1Crv.
+const (
+ P256 CreateSigningKeyBodyPrivateJwk1Crv = "P-256"
+)
+
+// Defines values for CreateSigningKeyBodyPrivateJwk1Kty.
const (
- N1UpgradedInstanceLaunchFailed DatabaseUpgradeStatusError = "1_upgraded_instance_launch_failed"
- N2VolumeDetachchmentFromUpgradedInstanceFailed DatabaseUpgradeStatusError = "2_volume_detachchment_from_upgraded_instance_failed"
- N3VolumeAttachmentToOriginalInstanceFailed DatabaseUpgradeStatusError = "3_volume_attachment_to_original_instance_failed"
- N4DataUpgradeInitiationFailed DatabaseUpgradeStatusError = "4_data_upgrade_initiation_failed"
- N5DataUpgradeCompletionFailed DatabaseUpgradeStatusError = "5_data_upgrade_completion_failed"
- N6VolumeDetachchmentFromOriginalInstanceFailed DatabaseUpgradeStatusError = "6_volume_detachchment_from_original_instance_failed"
- N7VolumeAttachmentToUpgradedInstanceFailed DatabaseUpgradeStatusError = "7_volume_attachment_to_upgraded_instance_failed"
- N8UpgradeCompletionFailed DatabaseUpgradeStatusError = "8_upgrade_completion_failed"
- N9PostPhysicalBackupFailed DatabaseUpgradeStatusError = "9_post_physical_backup_failed"
+ EC CreateSigningKeyBodyPrivateJwk1Kty = "EC"
)
-// Defines values for DatabaseUpgradeStatusProgress.
+// Defines values for CreateSigningKeyBodyPrivateJwk2Crv.
const (
- N0Requested DatabaseUpgradeStatusProgress = "0_requested"
- N10CompletedPostPhysicalBackup DatabaseUpgradeStatusProgress = "10_completed_post_physical_backup"
- N1Started DatabaseUpgradeStatusProgress = "1_started"
- N2LaunchedUpgradedInstance DatabaseUpgradeStatusProgress = "2_launched_upgraded_instance"
- N3DetachedVolumeFromUpgradedInstance DatabaseUpgradeStatusProgress = "3_detached_volume_from_upgraded_instance"
- N4AttachedVolumeToOriginalInstance DatabaseUpgradeStatusProgress = "4_attached_volume_to_original_instance"
- N5InitiatedDataUpgrade DatabaseUpgradeStatusProgress = "5_initiated_data_upgrade"
- N6CompletedDataUpgrade DatabaseUpgradeStatusProgress = "6_completed_data_upgrade"
- N7DetachedVolumeFromOriginalInstance DatabaseUpgradeStatusProgress = "7_detached_volume_from_original_instance"
- N8AttachedVolumeToUpgradedInstance DatabaseUpgradeStatusProgress = "8_attached_volume_to_upgraded_instance"
- N9CompletedUpgrade DatabaseUpgradeStatusProgress = "9_completed_upgrade"
+ Ed25519 CreateSigningKeyBodyPrivateJwk2Crv = "Ed25519"
)
-// Defines values for DatabaseUpgradeStatusStatus.
+// Defines values for CreateSigningKeyBodyPrivateJwk2Kty.
const (
- N0 DatabaseUpgradeStatusStatus = 0
- N1 DatabaseUpgradeStatusStatus = 1
- N2 DatabaseUpgradeStatusStatus = 2
+ OKP CreateSigningKeyBodyPrivateJwk2Kty = "OKP"
+)
+
+// Defines values for CreateSigningKeyBodyPrivateJwk3Kty.
+const (
+ Oct CreateSigningKeyBodyPrivateJwk3Kty = "oct"
+)
+
+// Defines values for CreateSigningKeyBodyStatus.
+const (
+ CreateSigningKeyBodyStatusInUse CreateSigningKeyBodyStatus = "in_use"
+ CreateSigningKeyBodyStatusStandby CreateSigningKeyBodyStatus = "standby"
+)
+
+// Defines values for DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError.
+const (
+ N1UpgradedInstanceLaunchFailed DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError = "1_upgraded_instance_launch_failed"
+ N2VolumeDetachchmentFromUpgradedInstanceFailed DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError = "2_volume_detachchment_from_upgraded_instance_failed"
+ N3VolumeAttachmentToOriginalInstanceFailed DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError = "3_volume_attachment_to_original_instance_failed"
+ N4DataUpgradeInitiationFailed DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError = "4_data_upgrade_initiation_failed"
+ N5DataUpgradeCompletionFailed DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError = "5_data_upgrade_completion_failed"
+ N6VolumeDetachchmentFromOriginalInstanceFailed DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError = "6_volume_detachchment_from_original_instance_failed"
+ N7VolumeAttachmentToUpgradedInstanceFailed DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError = "7_volume_attachment_to_upgraded_instance_failed"
+ N8UpgradeCompletionFailed DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError = "8_upgrade_completion_failed"
+ N9PostPhysicalBackupFailed DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError = "9_post_physical_backup_failed"
+)
+
+// Defines values for DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress.
+const (
+ N0Requested DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "0_requested"
+ N10CompletedPostPhysicalBackup DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "10_completed_post_physical_backup"
+ N1Started DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "1_started"
+ N2LaunchedUpgradedInstance DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "2_launched_upgraded_instance"
+ N3DetachedVolumeFromUpgradedInstance DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "3_detached_volume_from_upgraded_instance"
+ N4AttachedVolumeToOriginalInstance DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "4_attached_volume_to_original_instance"
+ N5InitiatedDataUpgrade DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "5_initiated_data_upgrade"
+ N6CompletedDataUpgrade DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "6_completed_data_upgrade"
+ N7DetachedVolumeFromOriginalInstance DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "7_detached_volume_from_original_instance"
+ N8AttachedVolumeToUpgradedInstance DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "8_attached_volume_to_upgraded_instance"
+ N9CompletedUpgrade DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress = "9_completed_upgrade"
)
// Defines values for DeployFunctionResponseStatus.
@@ -125,20 +287,6 @@ const (
DeployFunctionResponseStatusTHROTTLED DeployFunctionResponseStatus = "THROTTLED"
)
-// Defines values for DesiredInstanceSize.
-const (
- DesiredInstanceSizeLarge DesiredInstanceSize = "large"
- DesiredInstanceSizeMedium DesiredInstanceSize = "medium"
- DesiredInstanceSizeMicro DesiredInstanceSize = "micro"
- DesiredInstanceSizeN12xlarge DesiredInstanceSize = "12xlarge"
- DesiredInstanceSizeN16xlarge DesiredInstanceSize = "16xlarge"
- DesiredInstanceSizeN2xlarge DesiredInstanceSize = "2xlarge"
- DesiredInstanceSizeN4xlarge DesiredInstanceSize = "4xlarge"
- DesiredInstanceSizeN8xlarge DesiredInstanceSize = "8xlarge"
- DesiredInstanceSizeSmall DesiredInstanceSize = "small"
- DesiredInstanceSizeXlarge DesiredInstanceSize = "xlarge"
-)
-
// Defines values for FunctionResponseStatus.
const (
FunctionResponseStatusACTIVE FunctionResponseStatus = "ACTIVE"
@@ -153,6 +301,179 @@ const (
FunctionSlugResponseStatusTHROTTLED FunctionSlugResponseStatus = "THROTTLED"
)
+// Defines values for GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngine.
+const (
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngineN13 GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngine = "13"
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngineN14 GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngine = "14"
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngineN15 GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngine = "15"
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngineN17 GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngine = "17"
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngineN17Oriole GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngine = "17-oriole"
+)
+
+// Defines values for GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel.
+const (
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannelAlpha GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel = "alpha"
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannelBeta GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel = "beta"
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannelGa GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel = "ga"
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannelInternal GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel = "internal"
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannelPreview GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel = "preview"
+ GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannelWithdrawn GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel = "withdrawn"
+)
+
+// Defines values for ListProjectAddonsResponseAvailableAddonsType.
+const (
+ ListProjectAddonsResponseAvailableAddonsTypeAuthMfaPhone ListProjectAddonsResponseAvailableAddonsType = "auth_mfa_phone"
+ ListProjectAddonsResponseAvailableAddonsTypeAuthMfaWebAuthn ListProjectAddonsResponseAvailableAddonsType = "auth_mfa_web_authn"
+ ListProjectAddonsResponseAvailableAddonsTypeComputeInstance ListProjectAddonsResponseAvailableAddonsType = "compute_instance"
+ ListProjectAddonsResponseAvailableAddonsTypeCustomDomain ListProjectAddonsResponseAvailableAddonsType = "custom_domain"
+ ListProjectAddonsResponseAvailableAddonsTypeIpv4 ListProjectAddonsResponseAvailableAddonsType = "ipv4"
+ ListProjectAddonsResponseAvailableAddonsTypeLogDrain ListProjectAddonsResponseAvailableAddonsType = "log_drain"
+ ListProjectAddonsResponseAvailableAddonsTypePitr ListProjectAddonsResponseAvailableAddonsType = "pitr"
+)
+
+// Defines values for ListProjectAddonsResponseAvailableAddonsVariantsId0.
+const (
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci12xlarge ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_12xlarge"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci16xlarge ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_16xlarge"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci24xlarge ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_24xlarge"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci24xlargeHighMemory ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_24xlarge_high_memory"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci24xlargeOptimizedCpu ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_24xlarge_optimized_cpu"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci24xlargeOptimizedMemory ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_24xlarge_optimized_memory"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci2xlarge ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_2xlarge"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci48xlarge ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_48xlarge"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci48xlargeHighMemory ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_48xlarge_high_memory"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci48xlargeOptimizedCpu ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_48xlarge_optimized_cpu"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci48xlargeOptimizedMemory ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_48xlarge_optimized_memory"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci4xlarge ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_4xlarge"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0Ci8xlarge ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_8xlarge"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0CiLarge ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_large"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0CiMedium ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_medium"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0CiMicro ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_micro"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0CiSmall ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_small"
+ ListProjectAddonsResponseAvailableAddonsVariantsId0CiXlarge ListProjectAddonsResponseAvailableAddonsVariantsId0 = "ci_xlarge"
+)
+
+// Defines values for ListProjectAddonsResponseAvailableAddonsVariantsId1.
+const (
+ ListProjectAddonsResponseAvailableAddonsVariantsId1CdDefault ListProjectAddonsResponseAvailableAddonsVariantsId1 = "cd_default"
+)
+
+// Defines values for ListProjectAddonsResponseAvailableAddonsVariantsId2.
+const (
+ ListProjectAddonsResponseAvailableAddonsVariantsId2Pitr14 ListProjectAddonsResponseAvailableAddonsVariantsId2 = "pitr_14"
+ ListProjectAddonsResponseAvailableAddonsVariantsId2Pitr28 ListProjectAddonsResponseAvailableAddonsVariantsId2 = "pitr_28"
+ ListProjectAddonsResponseAvailableAddonsVariantsId2Pitr7 ListProjectAddonsResponseAvailableAddonsVariantsId2 = "pitr_7"
+)
+
+// Defines values for ListProjectAddonsResponseAvailableAddonsVariantsId3.
+const (
+ ListProjectAddonsResponseAvailableAddonsVariantsId3Ipv4Default ListProjectAddonsResponseAvailableAddonsVariantsId3 = "ipv4_default"
+)
+
+// Defines values for ListProjectAddonsResponseAvailableAddonsVariantsId4.
+const (
+ ListProjectAddonsResponseAvailableAddonsVariantsId4AuthMfaPhoneDefault ListProjectAddonsResponseAvailableAddonsVariantsId4 = "auth_mfa_phone_default"
+)
+
+// Defines values for ListProjectAddonsResponseAvailableAddonsVariantsId5.
+const (
+ ListProjectAddonsResponseAvailableAddonsVariantsId5AuthMfaWebAuthnDefault ListProjectAddonsResponseAvailableAddonsVariantsId5 = "auth_mfa_web_authn_default"
+)
+
+// Defines values for ListProjectAddonsResponseAvailableAddonsVariantsId6.
+const (
+ ListProjectAddonsResponseAvailableAddonsVariantsId6LogDrainDefault ListProjectAddonsResponseAvailableAddonsVariantsId6 = "log_drain_default"
+)
+
+// Defines values for ListProjectAddonsResponseAvailableAddonsVariantsPriceInterval.
+const (
+ ListProjectAddonsResponseAvailableAddonsVariantsPriceIntervalHourly ListProjectAddonsResponseAvailableAddonsVariantsPriceInterval = "hourly"
+ ListProjectAddonsResponseAvailableAddonsVariantsPriceIntervalMonthly ListProjectAddonsResponseAvailableAddonsVariantsPriceInterval = "monthly"
+)
+
+// Defines values for ListProjectAddonsResponseAvailableAddonsVariantsPriceType.
+const (
+ ListProjectAddonsResponseAvailableAddonsVariantsPriceTypeFixed ListProjectAddonsResponseAvailableAddonsVariantsPriceType = "fixed"
+ ListProjectAddonsResponseAvailableAddonsVariantsPriceTypeUsage ListProjectAddonsResponseAvailableAddonsVariantsPriceType = "usage"
+)
+
+// Defines values for ListProjectAddonsResponseSelectedAddonsType.
+const (
+ AuthMfaPhone ListProjectAddonsResponseSelectedAddonsType = "auth_mfa_phone"
+ AuthMfaWebAuthn ListProjectAddonsResponseSelectedAddonsType = "auth_mfa_web_authn"
+ ComputeInstance ListProjectAddonsResponseSelectedAddonsType = "compute_instance"
+ CustomDomain ListProjectAddonsResponseSelectedAddonsType = "custom_domain"
+ Ipv4 ListProjectAddonsResponseSelectedAddonsType = "ipv4"
+ LogDrain ListProjectAddonsResponseSelectedAddonsType = "log_drain"
+ Pitr ListProjectAddonsResponseSelectedAddonsType = "pitr"
+)
+
+// Defines values for ListProjectAddonsResponseSelectedAddonsVariantId0.
+const (
+ Ci12xlarge ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_12xlarge"
+ Ci16xlarge ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_16xlarge"
+ Ci24xlarge ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_24xlarge"
+ Ci24xlargeHighMemory ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_24xlarge_high_memory"
+ Ci24xlargeOptimizedCpu ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_24xlarge_optimized_cpu"
+ Ci24xlargeOptimizedMemory ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_24xlarge_optimized_memory"
+ Ci2xlarge ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_2xlarge"
+ Ci48xlarge ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_48xlarge"
+ Ci48xlargeHighMemory ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_48xlarge_high_memory"
+ Ci48xlargeOptimizedCpu ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_48xlarge_optimized_cpu"
+ Ci48xlargeOptimizedMemory ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_48xlarge_optimized_memory"
+ Ci4xlarge ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_4xlarge"
+ Ci8xlarge ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_8xlarge"
+ CiLarge ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_large"
+ CiMedium ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_medium"
+ CiMicro ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_micro"
+ CiSmall ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_small"
+ CiXlarge ListProjectAddonsResponseSelectedAddonsVariantId0 = "ci_xlarge"
+)
+
+// Defines values for ListProjectAddonsResponseSelectedAddonsVariantId1.
+const (
+ CdDefault ListProjectAddonsResponseSelectedAddonsVariantId1 = "cd_default"
+)
+
+// Defines values for ListProjectAddonsResponseSelectedAddonsVariantId2.
+const (
+ Pitr14 ListProjectAddonsResponseSelectedAddonsVariantId2 = "pitr_14"
+ Pitr28 ListProjectAddonsResponseSelectedAddonsVariantId2 = "pitr_28"
+ Pitr7 ListProjectAddonsResponseSelectedAddonsVariantId2 = "pitr_7"
+)
+
+// Defines values for ListProjectAddonsResponseSelectedAddonsVariantId3.
+const (
+ Ipv4Default ListProjectAddonsResponseSelectedAddonsVariantId3 = "ipv4_default"
+)
+
+// Defines values for ListProjectAddonsResponseSelectedAddonsVariantId4.
+const (
+ ListProjectAddonsResponseSelectedAddonsVariantId4AuthMfaPhoneDefault ListProjectAddonsResponseSelectedAddonsVariantId4 = "auth_mfa_phone_default"
+)
+
+// Defines values for ListProjectAddonsResponseSelectedAddonsVariantId5.
+const (
+ ListProjectAddonsResponseSelectedAddonsVariantId5AuthMfaWebAuthnDefault ListProjectAddonsResponseSelectedAddonsVariantId5 = "auth_mfa_web_authn_default"
+)
+
+// Defines values for ListProjectAddonsResponseSelectedAddonsVariantId6.
+const (
+ ListProjectAddonsResponseSelectedAddonsVariantId6LogDrainDefault ListProjectAddonsResponseSelectedAddonsVariantId6 = "log_drain_default"
+)
+
+// Defines values for ListProjectAddonsResponseSelectedAddonsVariantPriceInterval.
+const (
+ ListProjectAddonsResponseSelectedAddonsVariantPriceIntervalHourly ListProjectAddonsResponseSelectedAddonsVariantPriceInterval = "hourly"
+ ListProjectAddonsResponseSelectedAddonsVariantPriceIntervalMonthly ListProjectAddonsResponseSelectedAddonsVariantPriceInterval = "monthly"
+)
+
+// Defines values for ListProjectAddonsResponseSelectedAddonsVariantPriceType.
+const (
+ ListProjectAddonsResponseSelectedAddonsVariantPriceTypeFixed ListProjectAddonsResponseSelectedAddonsVariantPriceType = "fixed"
+ ListProjectAddonsResponseSelectedAddonsVariantPriceTypeUsage ListProjectAddonsResponseSelectedAddonsVariantPriceType = "usage"
+)
+
// Defines values for NetworkRestrictionsResponseEntitlement.
const (
Allowed NetworkRestrictionsResponseEntitlement = "allowed"
@@ -171,11 +492,32 @@ const (
RefreshToken OAuthTokenBodyGrantType = "refresh_token"
)
+// Defines values for OAuthTokenBodyResource.
+const (
+ OAuthTokenBodyResourceHttpsapiSupabaseGreenmcp OAuthTokenBodyResource = "https://api.supabase.green/mcp"
+)
+
// Defines values for OAuthTokenResponseTokenType.
const (
Bearer OAuthTokenResponseTokenType = "Bearer"
)
+// Defines values for OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan.
+const (
+ OrganizationProjectClaimResponsePreviewSourceSubscriptionPlanEnterprise OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan = "enterprise"
+ OrganizationProjectClaimResponsePreviewSourceSubscriptionPlanFree OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan = "free"
+ OrganizationProjectClaimResponsePreviewSourceSubscriptionPlanPro OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan = "pro"
+ OrganizationProjectClaimResponsePreviewSourceSubscriptionPlanTeam OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan = "team"
+)
+
+// Defines values for OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan.
+const (
+ OrganizationProjectClaimResponsePreviewTargetSubscriptionPlanEnterprise OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan = "enterprise"
+ OrganizationProjectClaimResponsePreviewTargetSubscriptionPlanFree OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan = "free"
+ OrganizationProjectClaimResponsePreviewTargetSubscriptionPlanPro OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan = "pro"
+ OrganizationProjectClaimResponsePreviewTargetSubscriptionPlanTeam OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan = "team"
+)
+
// Defines values for PostgresConfigResponseSessionReplicationRole.
const (
PostgresConfigResponseSessionReplicationRoleLocal PostgresConfigResponseSessionReplicationRole = "local"
@@ -183,39 +525,33 @@ const (
PostgresConfigResponseSessionReplicationRoleReplica PostgresConfigResponseSessionReplicationRole = "replica"
)
-// Defines values for PostgresEngine.
-const (
- PostgresEngineN15 PostgresEngine = "15"
- PostgresEngineN17Oriole PostgresEngine = "17-oriole"
-)
-
-// Defines values for ProjectAvailableRestoreVersionPostgresEngine.
+// Defines values for ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannel.
const (
- ProjectAvailableRestoreVersionPostgresEngineN13 ProjectAvailableRestoreVersionPostgresEngine = "13"
- ProjectAvailableRestoreVersionPostgresEngineN14 ProjectAvailableRestoreVersionPostgresEngine = "14"
- ProjectAvailableRestoreVersionPostgresEngineN15 ProjectAvailableRestoreVersionPostgresEngine = "15"
- ProjectAvailableRestoreVersionPostgresEngineN17 ProjectAvailableRestoreVersionPostgresEngine = "17"
- ProjectAvailableRestoreVersionPostgresEngineN17Oriole ProjectAvailableRestoreVersionPostgresEngine = "17-oriole"
+ ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannelAlpha ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannel = "alpha"
+ ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannelBeta ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannel = "beta"
+ ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannelGa ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannel = "ga"
+ ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannelInternal ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannel = "internal"
+ ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannelPreview ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannel = "preview"
+ ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannelWithdrawn ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannel = "withdrawn"
)
-// Defines values for ProjectAvailableRestoreVersionReleaseChannel.
+// Defines values for ProjectUpgradeEligibilityResponseTargetUpgradeVersionsPostgresVersion.
const (
- ProjectAvailableRestoreVersionReleaseChannelAlpha ProjectAvailableRestoreVersionReleaseChannel = "alpha"
- ProjectAvailableRestoreVersionReleaseChannelBeta ProjectAvailableRestoreVersionReleaseChannel = "beta"
- ProjectAvailableRestoreVersionReleaseChannelGa ProjectAvailableRestoreVersionReleaseChannel = "ga"
- ProjectAvailableRestoreVersionReleaseChannelInternal ProjectAvailableRestoreVersionReleaseChannel = "internal"
- ProjectAvailableRestoreVersionReleaseChannelPreview ProjectAvailableRestoreVersionReleaseChannel = "preview"
- ProjectAvailableRestoreVersionReleaseChannelWithdrawn ProjectAvailableRestoreVersionReleaseChannel = "withdrawn"
+ N13 ProjectUpgradeEligibilityResponseTargetUpgradeVersionsPostgresVersion = "13"
+ N14 ProjectUpgradeEligibilityResponseTargetUpgradeVersionsPostgresVersion = "14"
+ N15 ProjectUpgradeEligibilityResponseTargetUpgradeVersionsPostgresVersion = "15"
+ N17 ProjectUpgradeEligibilityResponseTargetUpgradeVersionsPostgresVersion = "17"
+ N17Oriole ProjectUpgradeEligibilityResponseTargetUpgradeVersionsPostgresVersion = "17-oriole"
)
-// Defines values for ReleaseChannel.
+// Defines values for ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel.
const (
- ReleaseChannelAlpha ReleaseChannel = "alpha"
- ReleaseChannelBeta ReleaseChannel = "beta"
- ReleaseChannelGa ReleaseChannel = "ga"
- ReleaseChannelInternal ReleaseChannel = "internal"
- ReleaseChannelPreview ReleaseChannel = "preview"
- ReleaseChannelWithdrawn ReleaseChannel = "withdrawn"
+ ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannelAlpha ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel = "alpha"
+ ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannelBeta ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel = "beta"
+ ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannelGa ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel = "ga"
+ ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannelInternal ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel = "internal"
+ ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannelPreview ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel = "preview"
+ ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannelWithdrawn ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel = "withdrawn"
)
// Defines values for SetUpReadReplicaBodyReadReplicaRegion.
@@ -240,17 +576,49 @@ const (
SetUpReadReplicaBodyReadReplicaRegionUsWest2 SetUpReadReplicaBodyReadReplicaRegion = "us-west-2"
)
-// Defines values for SnippetMetaType.
+// Defines values for SigningKeyResponseAlgorithm.
+const (
+ SigningKeyResponseAlgorithmES256 SigningKeyResponseAlgorithm = "ES256"
+ SigningKeyResponseAlgorithmEdDSA SigningKeyResponseAlgorithm = "EdDSA"
+ SigningKeyResponseAlgorithmHS256 SigningKeyResponseAlgorithm = "HS256"
+ SigningKeyResponseAlgorithmRS256 SigningKeyResponseAlgorithm = "RS256"
+)
+
+// Defines values for SigningKeyResponseStatus.
const (
- SnippetMetaTypeSql SnippetMetaType = "sql"
+ SigningKeyResponseStatusInUse SigningKeyResponseStatus = "in_use"
+ SigningKeyResponseStatusPreviouslyUsed SigningKeyResponseStatus = "previously_used"
+ SigningKeyResponseStatusRevoked SigningKeyResponseStatus = "revoked"
+ SigningKeyResponseStatusStandby SigningKeyResponseStatus = "standby"
)
-// Defines values for SnippetMetaVisibility.
+// Defines values for SigningKeysResponseKeysAlgorithm.
const (
- SnippetMetaVisibilityOrg SnippetMetaVisibility = "org"
- SnippetMetaVisibilityProject SnippetMetaVisibility = "project"
- SnippetMetaVisibilityPublic SnippetMetaVisibility = "public"
- SnippetMetaVisibilityUser SnippetMetaVisibility = "user"
+ ES256 SigningKeysResponseKeysAlgorithm = "ES256"
+ EdDSA SigningKeysResponseKeysAlgorithm = "EdDSA"
+ HS256 SigningKeysResponseKeysAlgorithm = "HS256"
+ RS256 SigningKeysResponseKeysAlgorithm = "RS256"
+)
+
+// Defines values for SigningKeysResponseKeysStatus.
+const (
+ SigningKeysResponseKeysStatusInUse SigningKeysResponseKeysStatus = "in_use"
+ SigningKeysResponseKeysStatusPreviouslyUsed SigningKeysResponseKeysStatus = "previously_used"
+ SigningKeysResponseKeysStatusRevoked SigningKeysResponseKeysStatus = "revoked"
+ SigningKeysResponseKeysStatusStandby SigningKeysResponseKeysStatus = "standby"
+)
+
+// Defines values for SnippetListDataType.
+const (
+ SnippetListDataTypeSql SnippetListDataType = "sql"
+)
+
+// Defines values for SnippetListDataVisibility.
+const (
+ SnippetListDataVisibilityOrg SnippetListDataVisibility = "org"
+ SnippetListDataVisibilityProject SnippetListDataVisibility = "project"
+ SnippetListDataVisibilityPublic SnippetListDataVisibility = "public"
+ SnippetListDataVisibilityUser SnippetListDataVisibility = "user"
)
// Defines values for SnippetResponseType.
@@ -266,6 +634,12 @@ const (
SnippetResponseVisibilityUser SnippetResponseVisibility = "user"
)
+// Defines values for StorageConfigResponseExternalUpstreamTarget.
+const (
+ StorageConfigResponseExternalUpstreamTargetCanary StorageConfigResponseExternalUpstreamTarget = "canary"
+ StorageConfigResponseExternalUpstreamTargetMain StorageConfigResponseExternalUpstreamTarget = "main"
+)
+
// Defines values for SupavisorConfigResponseDatabaseType.
const (
PRIMARY SupavisorConfigResponseDatabaseType = "PRIMARY"
@@ -280,10 +654,25 @@ const (
// Defines values for UpdateAuthConfigBodyPasswordRequiredCharacters.
const (
- AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 UpdateAuthConfigBodyPasswordRequiredCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789"
- AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567891 UpdateAuthConfigBodyPasswordRequiredCharacters = "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789"
- AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567892 UpdateAuthConfigBodyPasswordRequiredCharacters = "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~"
- Empty UpdateAuthConfigBodyPasswordRequiredCharacters = ""
+ UpdateAuthConfigBodyPasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 UpdateAuthConfigBodyPasswordRequiredCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789"
+ UpdateAuthConfigBodyPasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567891 UpdateAuthConfigBodyPasswordRequiredCharacters = "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789"
+ UpdateAuthConfigBodyPasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567892 UpdateAuthConfigBodyPasswordRequiredCharacters = "abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:0123456789:!@#$%^&*()_+-=[]{};'\\\\:\"|<>?,./`~"
+ UpdateAuthConfigBodyPasswordRequiredCharactersEmpty UpdateAuthConfigBodyPasswordRequiredCharacters = ""
+)
+
+// Defines values for UpdateAuthConfigBodySecurityCaptchaProvider.
+const (
+ UpdateAuthConfigBodySecurityCaptchaProviderHcaptcha UpdateAuthConfigBodySecurityCaptchaProvider = "hcaptcha"
+ UpdateAuthConfigBodySecurityCaptchaProviderTurnstile UpdateAuthConfigBodySecurityCaptchaProvider = "turnstile"
+)
+
+// Defines values for UpdateAuthConfigBodySmsProvider.
+const (
+ UpdateAuthConfigBodySmsProviderMessagebird UpdateAuthConfigBodySmsProvider = "messagebird"
+ UpdateAuthConfigBodySmsProviderTextlocal UpdateAuthConfigBodySmsProvider = "textlocal"
+ UpdateAuthConfigBodySmsProviderTwilio UpdateAuthConfigBodySmsProvider = "twilio"
+ UpdateAuthConfigBodySmsProviderTwilioVerify UpdateAuthConfigBodySmsProvider = "twilio_verify"
+ UpdateAuthConfigBodySmsProviderVonage UpdateAuthConfigBodySmsProvider = "vonage"
)
// Defines values for UpdateBranchBodyStatus.
@@ -312,80 +701,188 @@ const (
UpdatePostgresConfigBodySessionReplicationRoleReplica UpdatePostgresConfigBodySessionReplicationRole = "replica"
)
+// Defines values for UpdateSigningKeyBodyStatus.
+const (
+ UpdateSigningKeyBodyStatusInUse UpdateSigningKeyBodyStatus = "in_use"
+ UpdateSigningKeyBodyStatusPreviouslyUsed UpdateSigningKeyBodyStatus = "previously_used"
+ UpdateSigningKeyBodyStatusRevoked UpdateSigningKeyBodyStatus = "revoked"
+ UpdateSigningKeyBodyStatusStandby UpdateSigningKeyBodyStatus = "standby"
+)
+
+// Defines values for UpdateStorageConfigBodyExternalUpstreamTarget.
+const (
+ UpdateStorageConfigBodyExternalUpstreamTargetCanary UpdateStorageConfigBodyExternalUpstreamTarget = "canary"
+ UpdateStorageConfigBodyExternalUpstreamTargetMain UpdateStorageConfigBodyExternalUpstreamTarget = "main"
+)
+
// Defines values for UpdateSupavisorConfigBodyPoolMode.
const (
UpdateSupavisorConfigBodyPoolModeSession UpdateSupavisorConfigBodyPoolMode = "session"
UpdateSupavisorConfigBodyPoolModeTransaction UpdateSupavisorConfigBodyPoolMode = "transaction"
)
-// Defines values for UpdateSupavisorConfigResponsePoolMode.
+// Defines values for UpgradeDatabaseBodyReleaseChannel.
const (
- UpdateSupavisorConfigResponsePoolModeSession UpdateSupavisorConfigResponsePoolMode = "session"
- UpdateSupavisorConfigResponsePoolModeTransaction UpdateSupavisorConfigResponsePoolMode = "transaction"
+ UpgradeDatabaseBodyReleaseChannelAlpha UpgradeDatabaseBodyReleaseChannel = "alpha"
+ UpgradeDatabaseBodyReleaseChannelBeta UpgradeDatabaseBodyReleaseChannel = "beta"
+ UpgradeDatabaseBodyReleaseChannelGa UpgradeDatabaseBodyReleaseChannel = "ga"
+ UpgradeDatabaseBodyReleaseChannelInternal UpgradeDatabaseBodyReleaseChannel = "internal"
+ UpgradeDatabaseBodyReleaseChannelPreview UpgradeDatabaseBodyReleaseChannel = "preview"
+ UpgradeDatabaseBodyReleaseChannelWithdrawn UpgradeDatabaseBodyReleaseChannel = "withdrawn"
)
-// Defines values for V1BackupStatus.
+// Defines values for V1BackupsResponseBackupsStatus.
const (
- V1BackupStatusARCHIVED V1BackupStatus = "ARCHIVED"
- V1BackupStatusCANCELLED V1BackupStatus = "CANCELLED"
- V1BackupStatusCOMPLETED V1BackupStatus = "COMPLETED"
- V1BackupStatusFAILED V1BackupStatus = "FAILED"
- V1BackupStatusPENDING V1BackupStatus = "PENDING"
- V1BackupStatusREMOVED V1BackupStatus = "REMOVED"
+ V1BackupsResponseBackupsStatusARCHIVED V1BackupsResponseBackupsStatus = "ARCHIVED"
+ V1BackupsResponseBackupsStatusCANCELLED V1BackupsResponseBackupsStatus = "CANCELLED"
+ V1BackupsResponseBackupsStatusCOMPLETED V1BackupsResponseBackupsStatus = "COMPLETED"
+ V1BackupsResponseBackupsStatusFAILED V1BackupsResponseBackupsStatus = "FAILED"
+ V1BackupsResponseBackupsStatusPENDING V1BackupsResponseBackupsStatus = "PENDING"
+ V1BackupsResponseBackupsStatusREMOVED V1BackupsResponseBackupsStatus = "REMOVED"
)
-// Defines values for V1CreateProjectBodyDtoDesiredInstanceSize.
+// Defines values for V1CreateProjectBodyDesiredInstanceSize.
const (
- V1CreateProjectBodyDtoDesiredInstanceSizeLarge V1CreateProjectBodyDtoDesiredInstanceSize = "large"
- V1CreateProjectBodyDtoDesiredInstanceSizeMedium V1CreateProjectBodyDtoDesiredInstanceSize = "medium"
- V1CreateProjectBodyDtoDesiredInstanceSizeMicro V1CreateProjectBodyDtoDesiredInstanceSize = "micro"
- V1CreateProjectBodyDtoDesiredInstanceSizeN12xlarge V1CreateProjectBodyDtoDesiredInstanceSize = "12xlarge"
- V1CreateProjectBodyDtoDesiredInstanceSizeN16xlarge V1CreateProjectBodyDtoDesiredInstanceSize = "16xlarge"
- V1CreateProjectBodyDtoDesiredInstanceSizeN2xlarge V1CreateProjectBodyDtoDesiredInstanceSize = "2xlarge"
- V1CreateProjectBodyDtoDesiredInstanceSizeN4xlarge V1CreateProjectBodyDtoDesiredInstanceSize = "4xlarge"
- V1CreateProjectBodyDtoDesiredInstanceSizeN8xlarge V1CreateProjectBodyDtoDesiredInstanceSize = "8xlarge"
- V1CreateProjectBodyDtoDesiredInstanceSizeSmall V1CreateProjectBodyDtoDesiredInstanceSize = "small"
- V1CreateProjectBodyDtoDesiredInstanceSizeXlarge V1CreateProjectBodyDtoDesiredInstanceSize = "xlarge"
+ V1CreateProjectBodyDesiredInstanceSizeLarge V1CreateProjectBodyDesiredInstanceSize = "large"
+ V1CreateProjectBodyDesiredInstanceSizeMedium V1CreateProjectBodyDesiredInstanceSize = "medium"
+ V1CreateProjectBodyDesiredInstanceSizeMicro V1CreateProjectBodyDesiredInstanceSize = "micro"
+ V1CreateProjectBodyDesiredInstanceSizeN12xlarge V1CreateProjectBodyDesiredInstanceSize = "12xlarge"
+ V1CreateProjectBodyDesiredInstanceSizeN16xlarge V1CreateProjectBodyDesiredInstanceSize = "16xlarge"
+ V1CreateProjectBodyDesiredInstanceSizeN24xlarge V1CreateProjectBodyDesiredInstanceSize = "24xlarge"
+ V1CreateProjectBodyDesiredInstanceSizeN24xlargeHighMemory V1CreateProjectBodyDesiredInstanceSize = "24xlarge_high_memory"
+ V1CreateProjectBodyDesiredInstanceSizeN24xlargeOptimizedCpu V1CreateProjectBodyDesiredInstanceSize = "24xlarge_optimized_cpu"
+ V1CreateProjectBodyDesiredInstanceSizeN24xlargeOptimizedMemory V1CreateProjectBodyDesiredInstanceSize = "24xlarge_optimized_memory"
+ V1CreateProjectBodyDesiredInstanceSizeN2xlarge V1CreateProjectBodyDesiredInstanceSize = "2xlarge"
+ V1CreateProjectBodyDesiredInstanceSizeN48xlarge V1CreateProjectBodyDesiredInstanceSize = "48xlarge"
+ V1CreateProjectBodyDesiredInstanceSizeN48xlargeHighMemory V1CreateProjectBodyDesiredInstanceSize = "48xlarge_high_memory"
+ V1CreateProjectBodyDesiredInstanceSizeN48xlargeOptimizedCpu V1CreateProjectBodyDesiredInstanceSize = "48xlarge_optimized_cpu"
+ V1CreateProjectBodyDesiredInstanceSizeN48xlargeOptimizedMemory V1CreateProjectBodyDesiredInstanceSize = "48xlarge_optimized_memory"
+ V1CreateProjectBodyDesiredInstanceSizeN4xlarge V1CreateProjectBodyDesiredInstanceSize = "4xlarge"
+ V1CreateProjectBodyDesiredInstanceSizeN8xlarge V1CreateProjectBodyDesiredInstanceSize = "8xlarge"
+ V1CreateProjectBodyDesiredInstanceSizeNano V1CreateProjectBodyDesiredInstanceSize = "nano"
+ V1CreateProjectBodyDesiredInstanceSizePico V1CreateProjectBodyDesiredInstanceSize = "pico"
+ V1CreateProjectBodyDesiredInstanceSizeSmall V1CreateProjectBodyDesiredInstanceSize = "small"
+ V1CreateProjectBodyDesiredInstanceSizeXlarge V1CreateProjectBodyDesiredInstanceSize = "xlarge"
)
-// Defines values for V1CreateProjectBodyDtoPlan.
+// Defines values for V1CreateProjectBodyPlan.
const (
- V1CreateProjectBodyDtoPlanFree V1CreateProjectBodyDtoPlan = "free"
- V1CreateProjectBodyDtoPlanPro V1CreateProjectBodyDtoPlan = "pro"
+ V1CreateProjectBodyPlanFree V1CreateProjectBodyPlan = "free"
+ V1CreateProjectBodyPlanPro V1CreateProjectBodyPlan = "pro"
)
-// Defines values for V1CreateProjectBodyDtoRegion.
+// Defines values for V1CreateProjectBodyRegion.
const (
- V1CreateProjectBodyDtoRegionApEast1 V1CreateProjectBodyDtoRegion = "ap-east-1"
- V1CreateProjectBodyDtoRegionApNortheast1 V1CreateProjectBodyDtoRegion = "ap-northeast-1"
- V1CreateProjectBodyDtoRegionApNortheast2 V1CreateProjectBodyDtoRegion = "ap-northeast-2"
- V1CreateProjectBodyDtoRegionApSouth1 V1CreateProjectBodyDtoRegion = "ap-south-1"
- V1CreateProjectBodyDtoRegionApSoutheast1 V1CreateProjectBodyDtoRegion = "ap-southeast-1"
- V1CreateProjectBodyDtoRegionApSoutheast2 V1CreateProjectBodyDtoRegion = "ap-southeast-2"
- V1CreateProjectBodyDtoRegionCaCentral1 V1CreateProjectBodyDtoRegion = "ca-central-1"
- V1CreateProjectBodyDtoRegionEuCentral1 V1CreateProjectBodyDtoRegion = "eu-central-1"
- V1CreateProjectBodyDtoRegionEuCentral2 V1CreateProjectBodyDtoRegion = "eu-central-2"
- V1CreateProjectBodyDtoRegionEuNorth1 V1CreateProjectBodyDtoRegion = "eu-north-1"
- V1CreateProjectBodyDtoRegionEuWest1 V1CreateProjectBodyDtoRegion = "eu-west-1"
- V1CreateProjectBodyDtoRegionEuWest2 V1CreateProjectBodyDtoRegion = "eu-west-2"
- V1CreateProjectBodyDtoRegionEuWest3 V1CreateProjectBodyDtoRegion = "eu-west-3"
- V1CreateProjectBodyDtoRegionSaEast1 V1CreateProjectBodyDtoRegion = "sa-east-1"
- V1CreateProjectBodyDtoRegionUsEast1 V1CreateProjectBodyDtoRegion = "us-east-1"
- V1CreateProjectBodyDtoRegionUsEast2 V1CreateProjectBodyDtoRegion = "us-east-2"
- V1CreateProjectBodyDtoRegionUsWest1 V1CreateProjectBodyDtoRegion = "us-west-1"
- V1CreateProjectBodyDtoRegionUsWest2 V1CreateProjectBodyDtoRegion = "us-west-2"
+ V1CreateProjectBodyRegionApEast1 V1CreateProjectBodyRegion = "ap-east-1"
+ V1CreateProjectBodyRegionApNortheast1 V1CreateProjectBodyRegion = "ap-northeast-1"
+ V1CreateProjectBodyRegionApNortheast2 V1CreateProjectBodyRegion = "ap-northeast-2"
+ V1CreateProjectBodyRegionApSouth1 V1CreateProjectBodyRegion = "ap-south-1"
+ V1CreateProjectBodyRegionApSoutheast1 V1CreateProjectBodyRegion = "ap-southeast-1"
+ V1CreateProjectBodyRegionApSoutheast2 V1CreateProjectBodyRegion = "ap-southeast-2"
+ V1CreateProjectBodyRegionCaCentral1 V1CreateProjectBodyRegion = "ca-central-1"
+ V1CreateProjectBodyRegionEuCentral1 V1CreateProjectBodyRegion = "eu-central-1"
+ V1CreateProjectBodyRegionEuCentral2 V1CreateProjectBodyRegion = "eu-central-2"
+ V1CreateProjectBodyRegionEuNorth1 V1CreateProjectBodyRegion = "eu-north-1"
+ V1CreateProjectBodyRegionEuWest1 V1CreateProjectBodyRegion = "eu-west-1"
+ V1CreateProjectBodyRegionEuWest2 V1CreateProjectBodyRegion = "eu-west-2"
+ V1CreateProjectBodyRegionEuWest3 V1CreateProjectBodyRegion = "eu-west-3"
+ V1CreateProjectBodyRegionSaEast1 V1CreateProjectBodyRegion = "sa-east-1"
+ V1CreateProjectBodyRegionUsEast1 V1CreateProjectBodyRegion = "us-east-1"
+ V1CreateProjectBodyRegionUsEast2 V1CreateProjectBodyRegion = "us-east-2"
+ V1CreateProjectBodyRegionUsWest1 V1CreateProjectBodyRegion = "us-west-1"
+ V1CreateProjectBodyRegionUsWest2 V1CreateProjectBodyRegion = "us-west-2"
+)
+
+// Defines values for V1OrganizationSlugResponseAllowedReleaseChannels.
+const (
+ V1OrganizationSlugResponseAllowedReleaseChannelsAlpha V1OrganizationSlugResponseAllowedReleaseChannels = "alpha"
+ V1OrganizationSlugResponseAllowedReleaseChannelsBeta V1OrganizationSlugResponseAllowedReleaseChannels = "beta"
+ V1OrganizationSlugResponseAllowedReleaseChannelsGa V1OrganizationSlugResponseAllowedReleaseChannels = "ga"
+ V1OrganizationSlugResponseAllowedReleaseChannelsInternal V1OrganizationSlugResponseAllowedReleaseChannels = "internal"
+ V1OrganizationSlugResponseAllowedReleaseChannelsPreview V1OrganizationSlugResponseAllowedReleaseChannels = "preview"
+ V1OrganizationSlugResponseAllowedReleaseChannelsWithdrawn V1OrganizationSlugResponseAllowedReleaseChannels = "withdrawn"
)
// Defines values for V1OrganizationSlugResponseOptInTags.
const (
- AISQLGENERATOROPTIN V1OrganizationSlugResponseOptInTags = "AI_SQL_GENERATOR_OPT_IN"
+ AIDATAGENERATOROPTIN V1OrganizationSlugResponseOptInTags = "AI_DATA_GENERATOR_OPT_IN"
+ AILOGGENERATOROPTIN V1OrganizationSlugResponseOptInTags = "AI_LOG_GENERATOR_OPT_IN"
+ AISQLGENERATOROPTIN V1OrganizationSlugResponseOptInTags = "AI_SQL_GENERATOR_OPT_IN"
+)
+
+// Defines values for V1OrganizationSlugResponsePlan.
+const (
+ V1OrganizationSlugResponsePlanEnterprise V1OrganizationSlugResponsePlan = "enterprise"
+ V1OrganizationSlugResponsePlanFree V1OrganizationSlugResponsePlan = "free"
+ V1OrganizationSlugResponsePlanPro V1OrganizationSlugResponsePlan = "pro"
+ V1OrganizationSlugResponsePlanTeam V1OrganizationSlugResponsePlan = "team"
)
// Defines values for V1PgbouncerConfigResponsePoolMode.
const (
- V1PgbouncerConfigResponsePoolModeSession V1PgbouncerConfigResponsePoolMode = "session"
- V1PgbouncerConfigResponsePoolModeStatement V1PgbouncerConfigResponsePoolMode = "statement"
- V1PgbouncerConfigResponsePoolModeTransaction V1PgbouncerConfigResponsePoolMode = "transaction"
+ Session V1PgbouncerConfigResponsePoolMode = "session"
+ Statement V1PgbouncerConfigResponsePoolMode = "statement"
+ Transaction V1PgbouncerConfigResponsePoolMode = "transaction"
+)
+
+// Defines values for V1ProjectAdvisorsResponseLintsCategories.
+const (
+ PERFORMANCE V1ProjectAdvisorsResponseLintsCategories = "PERFORMANCE"
+ SECURITY V1ProjectAdvisorsResponseLintsCategories = "SECURITY"
+)
+
+// Defines values for V1ProjectAdvisorsResponseLintsFacing.
+const (
+ EXTERNAL V1ProjectAdvisorsResponseLintsFacing = "EXTERNAL"
+)
+
+// Defines values for V1ProjectAdvisorsResponseLintsLevel.
+const (
+ ERROR V1ProjectAdvisorsResponseLintsLevel = "ERROR"
+ INFO V1ProjectAdvisorsResponseLintsLevel = "INFO"
+ WARN V1ProjectAdvisorsResponseLintsLevel = "WARN"
+)
+
+// Defines values for V1ProjectAdvisorsResponseLintsMetadataType.
+const (
+ V1ProjectAdvisorsResponseLintsMetadataTypeAuth V1ProjectAdvisorsResponseLintsMetadataType = "auth"
+ V1ProjectAdvisorsResponseLintsMetadataTypeCompliance V1ProjectAdvisorsResponseLintsMetadataType = "compliance"
+ V1ProjectAdvisorsResponseLintsMetadataTypeExtension V1ProjectAdvisorsResponseLintsMetadataType = "extension"
+ V1ProjectAdvisorsResponseLintsMetadataTypeFunction V1ProjectAdvisorsResponseLintsMetadataType = "function"
+ V1ProjectAdvisorsResponseLintsMetadataTypeTable V1ProjectAdvisorsResponseLintsMetadataType = "table"
+ V1ProjectAdvisorsResponseLintsMetadataTypeView V1ProjectAdvisorsResponseLintsMetadataType = "view"
+)
+
+// Defines values for V1ProjectAdvisorsResponseLintsName.
+const (
+ AuthInsufficientMfaOptions V1ProjectAdvisorsResponseLintsName = "auth_insufficient_mfa_options"
+ AuthLeakedPasswordProtection V1ProjectAdvisorsResponseLintsName = "auth_leaked_password_protection"
+ AuthOtpLongExpiry V1ProjectAdvisorsResponseLintsName = "auth_otp_long_expiry"
+ AuthOtpShortLength V1ProjectAdvisorsResponseLintsName = "auth_otp_short_length"
+ AuthPasswordPolicyMissing V1ProjectAdvisorsResponseLintsName = "auth_password_policy_missing"
+ AuthRlsInitplan V1ProjectAdvisorsResponseLintsName = "auth_rls_initplan"
+ AuthUsersExposed V1ProjectAdvisorsResponseLintsName = "auth_users_exposed"
+ DuplicateIndex V1ProjectAdvisorsResponseLintsName = "duplicate_index"
+ ExtensionInPublic V1ProjectAdvisorsResponseLintsName = "extension_in_public"
+ ForeignTableInApi V1ProjectAdvisorsResponseLintsName = "foreign_table_in_api"
+ FunctionSearchPathMutable V1ProjectAdvisorsResponseLintsName = "function_search_path_mutable"
+ LeakedServiceKey V1ProjectAdvisorsResponseLintsName = "leaked_service_key"
+ MaterializedViewInApi V1ProjectAdvisorsResponseLintsName = "materialized_view_in_api"
+ MultiplePermissivePolicies V1ProjectAdvisorsResponseLintsName = "multiple_permissive_policies"
+ NetworkRestrictionsNotSet V1ProjectAdvisorsResponseLintsName = "network_restrictions_not_set"
+ NoBackupAdmin V1ProjectAdvisorsResponseLintsName = "no_backup_admin"
+ NoPrimaryKey V1ProjectAdvisorsResponseLintsName = "no_primary_key"
+ PasswordRequirementsMinLength V1ProjectAdvisorsResponseLintsName = "password_requirements_min_length"
+ PitrNotEnabled V1ProjectAdvisorsResponseLintsName = "pitr_not_enabled"
+ PolicyExistsRlsDisabled V1ProjectAdvisorsResponseLintsName = "policy_exists_rls_disabled"
+ RlsDisabledInPublic V1ProjectAdvisorsResponseLintsName = "rls_disabled_in_public"
+ RlsEnabledNoPolicy V1ProjectAdvisorsResponseLintsName = "rls_enabled_no_policy"
+ RlsReferencesUserMetadata V1ProjectAdvisorsResponseLintsName = "rls_references_user_metadata"
+ SecurityDefinerView V1ProjectAdvisorsResponseLintsName = "security_definer_view"
+ SslNotEnforced V1ProjectAdvisorsResponseLintsName = "ssl_not_enforced"
+ UnindexedForeignKeys V1ProjectAdvisorsResponseLintsName = "unindexed_foreign_keys"
+ UnsupportedRegTypes V1ProjectAdvisorsResponseLintsName = "unsupported_reg_types"
+ UnusedIndex V1ProjectAdvisorsResponseLintsName = "unused_index"
)
// Defines values for V1ProjectResponseStatus.
@@ -426,6 +923,18 @@ const (
V1ProjectWithDatabaseResponseStatusUPGRADING V1ProjectWithDatabaseResponseStatus = "UPGRADING"
)
+// Defines values for V1RestorePointResponseStatus.
+const (
+ V1RestorePointResponseStatusAVAILABLE V1RestorePointResponseStatus = "AVAILABLE"
+ V1RestorePointResponseStatusPENDING V1RestorePointResponseStatus = "PENDING"
+ V1RestorePointResponseStatusREMOVED V1RestorePointResponseStatus = "REMOVED"
+)
+
+// Defines values for V1ServiceHealthResponseInfo0Name.
+const (
+ GoTrue V1ServiceHealthResponseInfo0Name = "GoTrue"
+)
+
// Defines values for V1ServiceHealthResponseName.
const (
V1ServiceHealthResponseNameAuth V1ServiceHealthResponseName = "auth"
@@ -452,26 +961,61 @@ const (
// Defines values for V1AuthorizeUserParamsResponseType.
const (
- Code V1AuthorizeUserParamsResponseType = "code"
- IdTokenToken V1AuthorizeUserParamsResponseType = "id_token token"
- Token V1AuthorizeUserParamsResponseType = "token"
+ V1AuthorizeUserParamsResponseTypeCode V1AuthorizeUserParamsResponseType = "code"
+ V1AuthorizeUserParamsResponseTypeIdTokenToken V1AuthorizeUserParamsResponseType = "id_token token"
+ V1AuthorizeUserParamsResponseTypeToken V1AuthorizeUserParamsResponseType = "token"
)
// Defines values for V1AuthorizeUserParamsCodeChallengeMethod.
const (
- Plain V1AuthorizeUserParamsCodeChallengeMethod = "plain"
- S256 V1AuthorizeUserParamsCodeChallengeMethod = "S256"
- Sha256 V1AuthorizeUserParamsCodeChallengeMethod = "sha256"
+ V1AuthorizeUserParamsCodeChallengeMethodPlain V1AuthorizeUserParamsCodeChallengeMethod = "plain"
+ V1AuthorizeUserParamsCodeChallengeMethodS256 V1AuthorizeUserParamsCodeChallengeMethod = "S256"
+ V1AuthorizeUserParamsCodeChallengeMethodSha256 V1AuthorizeUserParamsCodeChallengeMethod = "sha256"
+)
+
+// Defines values for V1AuthorizeUserParamsResource.
+const (
+ V1AuthorizeUserParamsResourceHttpsapiSupabaseGreenmcp V1AuthorizeUserParamsResource = "https://api.supabase.green/mcp"
+)
+
+// Defines values for V1OauthAuthorizeProjectClaimParamsResponseType.
+const (
+ V1OauthAuthorizeProjectClaimParamsResponseTypeCode V1OauthAuthorizeProjectClaimParamsResponseType = "code"
+ V1OauthAuthorizeProjectClaimParamsResponseTypeIdTokenToken V1OauthAuthorizeProjectClaimParamsResponseType = "id_token token"
+ V1OauthAuthorizeProjectClaimParamsResponseTypeToken V1OauthAuthorizeProjectClaimParamsResponseType = "token"
+)
+
+// Defines values for V1OauthAuthorizeProjectClaimParamsCodeChallengeMethod.
+const (
+ V1OauthAuthorizeProjectClaimParamsCodeChallengeMethodPlain V1OauthAuthorizeProjectClaimParamsCodeChallengeMethod = "plain"
+ V1OauthAuthorizeProjectClaimParamsCodeChallengeMethodS256 V1OauthAuthorizeProjectClaimParamsCodeChallengeMethod = "S256"
+ V1OauthAuthorizeProjectClaimParamsCodeChallengeMethodSha256 V1OauthAuthorizeProjectClaimParamsCodeChallengeMethod = "sha256"
+)
+
+// Defines values for V1GetSecurityAdvisorsParamsLintType.
+const (
+ Sql V1GetSecurityAdvisorsParamsLintType = "sql"
+)
+
+// Defines values for V1GetProjectUsageApiCountParamsInterval.
+const (
+ N15min V1GetProjectUsageApiCountParamsInterval = "15min"
+ N1day V1GetProjectUsageApiCountParamsInterval = "1day"
+ N1hr V1GetProjectUsageApiCountParamsInterval = "1hr"
+ N30min V1GetProjectUsageApiCountParamsInterval = "30min"
+ N3day V1GetProjectUsageApiCountParamsInterval = "3day"
+ N3hr V1GetProjectUsageApiCountParamsInterval = "3hr"
+ N7day V1GetProjectUsageApiCountParamsInterval = "7day"
)
// Defines values for V1GetServicesHealthParamsServices.
const (
- V1GetServicesHealthParamsServicesAuth V1GetServicesHealthParamsServices = "auth"
- V1GetServicesHealthParamsServicesDb V1GetServicesHealthParamsServices = "db"
- V1GetServicesHealthParamsServicesPooler V1GetServicesHealthParamsServices = "pooler"
- V1GetServicesHealthParamsServicesRealtime V1GetServicesHealthParamsServices = "realtime"
- V1GetServicesHealthParamsServicesRest V1GetServicesHealthParamsServices = "rest"
- V1GetServicesHealthParamsServicesStorage V1GetServicesHealthParamsServices = "storage"
+ Auth V1GetServicesHealthParamsServices = "auth"
+ Db V1GetServicesHealthParamsServices = "db"
+ Pooler V1GetServicesHealthParamsServices = "pooler"
+ Realtime V1GetServicesHealthParamsServices = "realtime"
+ Rest V1GetServicesHealthParamsServices = "rest"
+ Storage V1GetServicesHealthParamsServices = "storage"
)
// Defines values for V1ListAllSnippetsParamsSortBy.
@@ -491,248 +1035,278 @@ type ActivateVanitySubdomainResponse struct {
CustomDomain string `json:"custom_domain"`
}
+// AnalyticsResponse defines model for AnalyticsResponse.
+type AnalyticsResponse struct {
+ Error *AnalyticsResponse_Error `json:"error,omitempty"`
+ Result *[]interface{} `json:"result,omitempty"`
+}
+
+// AnalyticsResponseError0 defines model for .
+type AnalyticsResponseError0 = string
+
+// AnalyticsResponseError1 defines model for .
+type AnalyticsResponseError1 struct {
+ Code float32 `json:"code"`
+ Errors []struct {
+ Domain string `json:"domain"`
+ Location string `json:"location"`
+ LocationType string `json:"locationType"`
+ Message string `json:"message"`
+ Reason string `json:"reason"`
+ } `json:"errors"`
+ Message string `json:"message"`
+ Status string `json:"status"`
+}
+
+// AnalyticsResponse_Error defines model for AnalyticsResponse.Error.
+type AnalyticsResponse_Error struct {
+ union json.RawMessage
+}
+
// ApiKeyResponse defines model for ApiKeyResponse.
type ApiKeyResponse struct {
- ApiKey string `json:"api_key"`
- Description *string `json:"description"`
- Hash *string `json:"hash"`
- Id *string `json:"id"`
- InsertedAt *string `json:"inserted_at"`
- Name string `json:"name"`
- Prefix *string `json:"prefix"`
- SecretJwtTemplate *ApiKeySecretJWTTemplate `json:"secret_jwt_template"`
- Type *ApiKeyResponseType `json:"type"`
- UpdatedAt *string `json:"updated_at"`
+ ApiKey nullable.Nullable[string] `json:"api_key,omitempty"`
+ Description nullable.Nullable[string] `json:"description,omitempty"`
+ Hash nullable.Nullable[string] `json:"hash,omitempty"`
+ Id nullable.Nullable[string] `json:"id,omitempty"`
+ InsertedAt nullable.Nullable[time.Time] `json:"inserted_at,omitempty"`
+ Name string `json:"name"`
+ Prefix nullable.Nullable[string] `json:"prefix,omitempty"`
+ SecretJwtTemplate nullable.Nullable[map[string]interface{}] `json:"secret_jwt_template,omitempty"`
+ Type nullable.Nullable[ApiKeyResponseType] `json:"type,omitempty"`
+ UpdatedAt nullable.Nullable[time.Time] `json:"updated_at,omitempty"`
}
// ApiKeyResponseType defines model for ApiKeyResponse.Type.
type ApiKeyResponseType string
-// ApiKeySecretJWTTemplate defines model for ApiKeySecretJWTTemplate.
-type ApiKeySecretJWTTemplate struct {
- Role string `json:"role"`
-}
-
-// AttributeMapping defines model for AttributeMapping.
-type AttributeMapping struct {
- Keys map[string]AttributeValue `json:"keys"`
+// ApplyProjectAddonBody defines model for ApplyProjectAddonBody.
+type ApplyProjectAddonBody struct {
+ AddonType ApplyProjectAddonBodyAddonType `json:"addon_type"`
+ AddonVariant ApplyProjectAddonBody_AddonVariant `json:"addon_variant"`
}
-// AttributeValue defines model for AttributeValue.
-type AttributeValue struct {
- Array *bool `json:"array,omitempty"`
- Default *AttributeValue_Default `json:"default,omitempty"`
- Name *string `json:"name,omitempty"`
- Names *[]string `json:"names,omitempty"`
-}
+// ApplyProjectAddonBodyAddonType defines model for ApplyProjectAddonBody.AddonType.
+type ApplyProjectAddonBodyAddonType string
-// AttributeValueDefault0 defines model for .
-type AttributeValueDefault0 = map[string]interface{}
+// ApplyProjectAddonBodyAddonVariant0 defines model for ApplyProjectAddonBody.AddonVariant.0.
+type ApplyProjectAddonBodyAddonVariant0 string
-// AttributeValueDefault1 defines model for .
-type AttributeValueDefault1 = float32
+// ApplyProjectAddonBodyAddonVariant1 defines model for ApplyProjectAddonBody.AddonVariant.1.
+type ApplyProjectAddonBodyAddonVariant1 string
-// AttributeValueDefault2 defines model for .
-type AttributeValueDefault2 = string
+// ApplyProjectAddonBodyAddonVariant2 defines model for ApplyProjectAddonBody.AddonVariant.2.
+type ApplyProjectAddonBodyAddonVariant2 string
-// AttributeValueDefault3 defines model for .
-type AttributeValueDefault3 = bool
+// ApplyProjectAddonBodyAddonVariant3 defines model for ApplyProjectAddonBody.AddonVariant.3.
+type ApplyProjectAddonBodyAddonVariant3 string
-// AttributeValue_Default defines model for AttributeValue.Default.
-type AttributeValue_Default struct {
+// ApplyProjectAddonBody_AddonVariant defines model for ApplyProjectAddonBody.AddonVariant.
+type ApplyProjectAddonBody_AddonVariant struct {
union json.RawMessage
}
// AuthConfigResponse defines model for AuthConfigResponse.
type AuthConfigResponse struct {
- ApiMaxRequestDuration *int `json:"api_max_request_duration"`
- DbMaxPoolSize *int `json:"db_max_pool_size"`
- DisableSignup *bool `json:"disable_signup"`
- ExternalAnonymousUsersEnabled *bool `json:"external_anonymous_users_enabled"`
- ExternalAppleAdditionalClientIds *string `json:"external_apple_additional_client_ids"`
- ExternalAppleClientId *string `json:"external_apple_client_id"`
- ExternalAppleEnabled *bool `json:"external_apple_enabled"`
- ExternalAppleSecret *string `json:"external_apple_secret"`
- ExternalAzureClientId *string `json:"external_azure_client_id"`
- ExternalAzureEnabled *bool `json:"external_azure_enabled"`
- ExternalAzureSecret *string `json:"external_azure_secret"`
- ExternalAzureUrl *string `json:"external_azure_url"`
- ExternalBitbucketClientId *string `json:"external_bitbucket_client_id"`
- ExternalBitbucketEnabled *bool `json:"external_bitbucket_enabled"`
- ExternalBitbucketSecret *string `json:"external_bitbucket_secret"`
- ExternalDiscordClientId *string `json:"external_discord_client_id"`
- ExternalDiscordEnabled *bool `json:"external_discord_enabled"`
- ExternalDiscordSecret *string `json:"external_discord_secret"`
- ExternalEmailEnabled *bool `json:"external_email_enabled"`
- ExternalFacebookClientId *string `json:"external_facebook_client_id"`
- ExternalFacebookEnabled *bool `json:"external_facebook_enabled"`
- ExternalFacebookSecret *string `json:"external_facebook_secret"`
- ExternalFigmaClientId *string `json:"external_figma_client_id"`
- ExternalFigmaEnabled *bool `json:"external_figma_enabled"`
- ExternalFigmaSecret *string `json:"external_figma_secret"`
- ExternalGithubClientId *string `json:"external_github_client_id"`
- ExternalGithubEnabled *bool `json:"external_github_enabled"`
- ExternalGithubSecret *string `json:"external_github_secret"`
- ExternalGitlabClientId *string `json:"external_gitlab_client_id"`
- ExternalGitlabEnabled *bool `json:"external_gitlab_enabled"`
- ExternalGitlabSecret *string `json:"external_gitlab_secret"`
- ExternalGitlabUrl *string `json:"external_gitlab_url"`
- ExternalGoogleAdditionalClientIds *string `json:"external_google_additional_client_ids"`
- ExternalGoogleClientId *string `json:"external_google_client_id"`
- ExternalGoogleEnabled *bool `json:"external_google_enabled"`
- ExternalGoogleSecret *string `json:"external_google_secret"`
- ExternalGoogleSkipNonceCheck *bool `json:"external_google_skip_nonce_check"`
- ExternalKakaoClientId *string `json:"external_kakao_client_id"`
- ExternalKakaoEnabled *bool `json:"external_kakao_enabled"`
- ExternalKakaoSecret *string `json:"external_kakao_secret"`
- ExternalKeycloakClientId *string `json:"external_keycloak_client_id"`
- ExternalKeycloakEnabled *bool `json:"external_keycloak_enabled"`
- ExternalKeycloakSecret *string `json:"external_keycloak_secret"`
- ExternalKeycloakUrl *string `json:"external_keycloak_url"`
- ExternalLinkedinOidcClientId *string `json:"external_linkedin_oidc_client_id"`
- ExternalLinkedinOidcEnabled *bool `json:"external_linkedin_oidc_enabled"`
- ExternalLinkedinOidcSecret *string `json:"external_linkedin_oidc_secret"`
- ExternalNotionClientId *string `json:"external_notion_client_id"`
- ExternalNotionEnabled *bool `json:"external_notion_enabled"`
- ExternalNotionSecret *string `json:"external_notion_secret"`
- ExternalPhoneEnabled *bool `json:"external_phone_enabled"`
- ExternalSlackClientId *string `json:"external_slack_client_id"`
- ExternalSlackEnabled *bool `json:"external_slack_enabled"`
- ExternalSlackOidcClientId *string `json:"external_slack_oidc_client_id"`
- ExternalSlackOidcEnabled *bool `json:"external_slack_oidc_enabled"`
- ExternalSlackOidcSecret *string `json:"external_slack_oidc_secret"`
- ExternalSlackSecret *string `json:"external_slack_secret"`
- ExternalSpotifyClientId *string `json:"external_spotify_client_id"`
- ExternalSpotifyEnabled *bool `json:"external_spotify_enabled"`
- ExternalSpotifySecret *string `json:"external_spotify_secret"`
- ExternalTwitchClientId *string `json:"external_twitch_client_id"`
- ExternalTwitchEnabled *bool `json:"external_twitch_enabled"`
- ExternalTwitchSecret *string `json:"external_twitch_secret"`
- ExternalTwitterClientId *string `json:"external_twitter_client_id"`
- ExternalTwitterEnabled *bool `json:"external_twitter_enabled"`
- ExternalTwitterSecret *string `json:"external_twitter_secret"`
- ExternalWorkosClientId *string `json:"external_workos_client_id"`
- ExternalWorkosEnabled *bool `json:"external_workos_enabled"`
- ExternalWorkosSecret *string `json:"external_workos_secret"`
- ExternalWorkosUrl *string `json:"external_workos_url"`
- ExternalZoomClientId *string `json:"external_zoom_client_id"`
- ExternalZoomEnabled *bool `json:"external_zoom_enabled"`
- ExternalZoomSecret *string `json:"external_zoom_secret"`
- HookCustomAccessTokenEnabled *bool `json:"hook_custom_access_token_enabled"`
- HookCustomAccessTokenSecrets *string `json:"hook_custom_access_token_secrets"`
- HookCustomAccessTokenUri *string `json:"hook_custom_access_token_uri"`
- HookMfaVerificationAttemptEnabled *bool `json:"hook_mfa_verification_attempt_enabled"`
- HookMfaVerificationAttemptSecrets *string `json:"hook_mfa_verification_attempt_secrets"`
- HookMfaVerificationAttemptUri *string `json:"hook_mfa_verification_attempt_uri"`
- HookPasswordVerificationAttemptEnabled *bool `json:"hook_password_verification_attempt_enabled"`
- HookPasswordVerificationAttemptSecrets *string `json:"hook_password_verification_attempt_secrets"`
- HookPasswordVerificationAttemptUri *string `json:"hook_password_verification_attempt_uri"`
- HookSendEmailEnabled *bool `json:"hook_send_email_enabled"`
- HookSendEmailSecrets *string `json:"hook_send_email_secrets"`
- HookSendEmailUri *string `json:"hook_send_email_uri"`
- HookSendSmsEnabled *bool `json:"hook_send_sms_enabled"`
- HookSendSmsSecrets *string `json:"hook_send_sms_secrets"`
- HookSendSmsUri *string `json:"hook_send_sms_uri"`
- JwtExp *int `json:"jwt_exp"`
- MailerAllowUnverifiedEmailSignIns *bool `json:"mailer_allow_unverified_email_sign_ins"`
- MailerAutoconfirm *bool `json:"mailer_autoconfirm"`
- MailerOtpExp int `json:"mailer_otp_exp"`
- MailerOtpLength *int `json:"mailer_otp_length"`
- MailerSecureEmailChangeEnabled *bool `json:"mailer_secure_email_change_enabled"`
- MailerSubjectsConfirmation *string `json:"mailer_subjects_confirmation"`
- MailerSubjectsEmailChange *string `json:"mailer_subjects_email_change"`
- MailerSubjectsInvite *string `json:"mailer_subjects_invite"`
- MailerSubjectsMagicLink *string `json:"mailer_subjects_magic_link"`
- MailerSubjectsReauthentication *string `json:"mailer_subjects_reauthentication"`
- MailerSubjectsRecovery *string `json:"mailer_subjects_recovery"`
- MailerTemplatesConfirmationContent *string `json:"mailer_templates_confirmation_content"`
- MailerTemplatesEmailChangeContent *string `json:"mailer_templates_email_change_content"`
- MailerTemplatesInviteContent *string `json:"mailer_templates_invite_content"`
- MailerTemplatesMagicLinkContent *string `json:"mailer_templates_magic_link_content"`
- MailerTemplatesReauthenticationContent *string `json:"mailer_templates_reauthentication_content"`
- MailerTemplatesRecoveryContent *string `json:"mailer_templates_recovery_content"`
- MfaMaxEnrolledFactors *int `json:"mfa_max_enrolled_factors"`
- MfaPhoneEnrollEnabled *bool `json:"mfa_phone_enroll_enabled"`
- MfaPhoneMaxFrequency *int `json:"mfa_phone_max_frequency"`
- MfaPhoneOtpLength int `json:"mfa_phone_otp_length"`
- MfaPhoneTemplate *string `json:"mfa_phone_template"`
- MfaPhoneVerifyEnabled *bool `json:"mfa_phone_verify_enabled"`
- MfaTotpEnrollEnabled *bool `json:"mfa_totp_enroll_enabled"`
- MfaTotpVerifyEnabled *bool `json:"mfa_totp_verify_enabled"`
- MfaWebAuthnEnrollEnabled *bool `json:"mfa_web_authn_enroll_enabled"`
- MfaWebAuthnVerifyEnabled *bool `json:"mfa_web_authn_verify_enabled"`
- PasswordHibpEnabled *bool `json:"password_hibp_enabled"`
- PasswordMinLength *int `json:"password_min_length"`
- PasswordRequiredCharacters *string `json:"password_required_characters"`
- RateLimitAnonymousUsers *int `json:"rate_limit_anonymous_users"`
- RateLimitEmailSent *int `json:"rate_limit_email_sent"`
- RateLimitOtp *int `json:"rate_limit_otp"`
- RateLimitSmsSent *int `json:"rate_limit_sms_sent"`
- RateLimitTokenRefresh *int `json:"rate_limit_token_refresh"`
- RateLimitVerify *int `json:"rate_limit_verify"`
- RefreshTokenRotationEnabled *bool `json:"refresh_token_rotation_enabled"`
- SamlAllowEncryptedAssertions *bool `json:"saml_allow_encrypted_assertions"`
- SamlEnabled *bool `json:"saml_enabled"`
- SamlExternalUrl *string `json:"saml_external_url"`
- SecurityCaptchaEnabled *bool `json:"security_captcha_enabled"`
- SecurityCaptchaProvider *string `json:"security_captcha_provider"`
- SecurityCaptchaSecret *string `json:"security_captcha_secret"`
- SecurityManualLinkingEnabled *bool `json:"security_manual_linking_enabled"`
- SecurityRefreshTokenReuseInterval *int `json:"security_refresh_token_reuse_interval"`
- SecurityUpdatePasswordRequireReauthentication *bool `json:"security_update_password_require_reauthentication"`
- SessionsInactivityTimeout *int `json:"sessions_inactivity_timeout"`
- SessionsSinglePerUser *bool `json:"sessions_single_per_user"`
- SessionsTags *string `json:"sessions_tags"`
- SessionsTimebox *int `json:"sessions_timebox"`
- SiteUrl *string `json:"site_url"`
- SmsAutoconfirm *bool `json:"sms_autoconfirm"`
- SmsMaxFrequency *int `json:"sms_max_frequency"`
- SmsMessagebirdAccessKey *string `json:"sms_messagebird_access_key"`
- SmsMessagebirdOriginator *string `json:"sms_messagebird_originator"`
- SmsOtpExp *int `json:"sms_otp_exp"`
- SmsOtpLength int `json:"sms_otp_length"`
- SmsProvider *string `json:"sms_provider"`
- SmsTemplate *string `json:"sms_template"`
- SmsTestOtp *string `json:"sms_test_otp"`
- SmsTestOtpValidUntil *string `json:"sms_test_otp_valid_until"`
- SmsTextlocalApiKey *string `json:"sms_textlocal_api_key"`
- SmsTextlocalSender *string `json:"sms_textlocal_sender"`
- SmsTwilioAccountSid *string `json:"sms_twilio_account_sid"`
- SmsTwilioAuthToken *string `json:"sms_twilio_auth_token"`
- SmsTwilioContentSid *string `json:"sms_twilio_content_sid"`
- SmsTwilioMessageServiceSid *string `json:"sms_twilio_message_service_sid"`
- SmsTwilioVerifyAccountSid *string `json:"sms_twilio_verify_account_sid"`
- SmsTwilioVerifyAuthToken *string `json:"sms_twilio_verify_auth_token"`
- SmsTwilioVerifyMessageServiceSid *string `json:"sms_twilio_verify_message_service_sid"`
- SmsVonageApiKey *string `json:"sms_vonage_api_key"`
- SmsVonageApiSecret *string `json:"sms_vonage_api_secret"`
- SmsVonageFrom *string `json:"sms_vonage_from"`
- SmtpAdminEmail *string `json:"smtp_admin_email"`
- SmtpHost *string `json:"smtp_host"`
- SmtpMaxFrequency *int `json:"smtp_max_frequency"`
- SmtpPass *string `json:"smtp_pass"`
- SmtpPort *string `json:"smtp_port"`
- SmtpSenderName *string `json:"smtp_sender_name"`
- SmtpUser *string `json:"smtp_user"`
- UriAllowList *string `json:"uri_allow_list"`
-}
-
-// AuthHealthResponse defines model for AuthHealthResponse.
-type AuthHealthResponse struct {
- Name AuthHealthResponseName `json:"name"`
-}
-
-// AuthHealthResponseName defines model for AuthHealthResponse.Name.
-type AuthHealthResponseName string
-
-// BillingPlanId defines model for BillingPlanId.
-type BillingPlanId string
+ ApiMaxRequestDuration nullable.Nullable[int] `json:"api_max_request_duration"`
+ DbMaxPoolSize nullable.Nullable[int] `json:"db_max_pool_size"`
+ DisableSignup nullable.Nullable[bool] `json:"disable_signup"`
+ ExternalAnonymousUsersEnabled nullable.Nullable[bool] `json:"external_anonymous_users_enabled"`
+ ExternalAppleAdditionalClientIds nullable.Nullable[string] `json:"external_apple_additional_client_ids"`
+ ExternalAppleClientId nullable.Nullable[string] `json:"external_apple_client_id"`
+ ExternalAppleEnabled nullable.Nullable[bool] `json:"external_apple_enabled"`
+ ExternalAppleSecret nullable.Nullable[string] `json:"external_apple_secret"`
+ ExternalAzureClientId nullable.Nullable[string] `json:"external_azure_client_id"`
+ ExternalAzureEnabled nullable.Nullable[bool] `json:"external_azure_enabled"`
+ ExternalAzureSecret nullable.Nullable[string] `json:"external_azure_secret"`
+ ExternalAzureUrl nullable.Nullable[string] `json:"external_azure_url"`
+ ExternalBitbucketClientId nullable.Nullable[string] `json:"external_bitbucket_client_id"`
+ ExternalBitbucketEnabled nullable.Nullable[bool] `json:"external_bitbucket_enabled"`
+ ExternalBitbucketSecret nullable.Nullable[string] `json:"external_bitbucket_secret"`
+ ExternalDiscordClientId nullable.Nullable[string] `json:"external_discord_client_id"`
+ ExternalDiscordEnabled nullable.Nullable[bool] `json:"external_discord_enabled"`
+ ExternalDiscordSecret nullable.Nullable[string] `json:"external_discord_secret"`
+ ExternalEmailEnabled nullable.Nullable[bool] `json:"external_email_enabled"`
+ ExternalFacebookClientId nullable.Nullable[string] `json:"external_facebook_client_id"`
+ ExternalFacebookEnabled nullable.Nullable[bool] `json:"external_facebook_enabled"`
+ ExternalFacebookSecret nullable.Nullable[string] `json:"external_facebook_secret"`
+ ExternalFigmaClientId nullable.Nullable[string] `json:"external_figma_client_id"`
+ ExternalFigmaEnabled nullable.Nullable[bool] `json:"external_figma_enabled"`
+ ExternalFigmaSecret nullable.Nullable[string] `json:"external_figma_secret"`
+ ExternalGithubClientId nullable.Nullable[string] `json:"external_github_client_id"`
+ ExternalGithubEnabled nullable.Nullable[bool] `json:"external_github_enabled"`
+ ExternalGithubSecret nullable.Nullable[string] `json:"external_github_secret"`
+ ExternalGitlabClientId nullable.Nullable[string] `json:"external_gitlab_client_id"`
+ ExternalGitlabEnabled nullable.Nullable[bool] `json:"external_gitlab_enabled"`
+ ExternalGitlabSecret nullable.Nullable[string] `json:"external_gitlab_secret"`
+ ExternalGitlabUrl nullable.Nullable[string] `json:"external_gitlab_url"`
+ ExternalGoogleAdditionalClientIds nullable.Nullable[string] `json:"external_google_additional_client_ids"`
+ ExternalGoogleClientId nullable.Nullable[string] `json:"external_google_client_id"`
+ ExternalGoogleEnabled nullable.Nullable[bool] `json:"external_google_enabled"`
+ ExternalGoogleSecret nullable.Nullable[string] `json:"external_google_secret"`
+ ExternalGoogleSkipNonceCheck nullable.Nullable[bool] `json:"external_google_skip_nonce_check"`
+ ExternalKakaoClientId nullable.Nullable[string] `json:"external_kakao_client_id"`
+ ExternalKakaoEnabled nullable.Nullable[bool] `json:"external_kakao_enabled"`
+ ExternalKakaoSecret nullable.Nullable[string] `json:"external_kakao_secret"`
+ ExternalKeycloakClientId nullable.Nullable[string] `json:"external_keycloak_client_id"`
+ ExternalKeycloakEnabled nullable.Nullable[bool] `json:"external_keycloak_enabled"`
+ ExternalKeycloakSecret nullable.Nullable[string] `json:"external_keycloak_secret"`
+ ExternalKeycloakUrl nullable.Nullable[string] `json:"external_keycloak_url"`
+ ExternalLinkedinOidcClientId nullable.Nullable[string] `json:"external_linkedin_oidc_client_id"`
+ ExternalLinkedinOidcEnabled nullable.Nullable[bool] `json:"external_linkedin_oidc_enabled"`
+ ExternalLinkedinOidcSecret nullable.Nullable[string] `json:"external_linkedin_oidc_secret"`
+ ExternalNotionClientId nullable.Nullable[string] `json:"external_notion_client_id"`
+ ExternalNotionEnabled nullable.Nullable[bool] `json:"external_notion_enabled"`
+ ExternalNotionSecret nullable.Nullable[string] `json:"external_notion_secret"`
+ ExternalPhoneEnabled nullable.Nullable[bool] `json:"external_phone_enabled"`
+ ExternalSlackClientId nullable.Nullable[string] `json:"external_slack_client_id"`
+ ExternalSlackEnabled nullable.Nullable[bool] `json:"external_slack_enabled"`
+ ExternalSlackOidcClientId nullable.Nullable[string] `json:"external_slack_oidc_client_id"`
+ ExternalSlackOidcEnabled nullable.Nullable[bool] `json:"external_slack_oidc_enabled"`
+ ExternalSlackOidcSecret nullable.Nullable[string] `json:"external_slack_oidc_secret"`
+ ExternalSlackSecret nullable.Nullable[string] `json:"external_slack_secret"`
+ ExternalSpotifyClientId nullable.Nullable[string] `json:"external_spotify_client_id"`
+ ExternalSpotifyEnabled nullable.Nullable[bool] `json:"external_spotify_enabled"`
+ ExternalSpotifySecret nullable.Nullable[string] `json:"external_spotify_secret"`
+ ExternalTwitchClientId nullable.Nullable[string] `json:"external_twitch_client_id"`
+ ExternalTwitchEnabled nullable.Nullable[bool] `json:"external_twitch_enabled"`
+ ExternalTwitchSecret nullable.Nullable[string] `json:"external_twitch_secret"`
+ ExternalTwitterClientId nullable.Nullable[string] `json:"external_twitter_client_id"`
+ ExternalTwitterEnabled nullable.Nullable[bool] `json:"external_twitter_enabled"`
+ ExternalTwitterSecret nullable.Nullable[string] `json:"external_twitter_secret"`
+ ExternalWeb3SolanaEnabled nullable.Nullable[bool] `json:"external_web3_solana_enabled"`
+ ExternalWorkosClientId nullable.Nullable[string] `json:"external_workos_client_id"`
+ ExternalWorkosEnabled nullable.Nullable[bool] `json:"external_workos_enabled"`
+ ExternalWorkosSecret nullable.Nullable[string] `json:"external_workos_secret"`
+ ExternalWorkosUrl nullable.Nullable[string] `json:"external_workos_url"`
+ ExternalZoomClientId nullable.Nullable[string] `json:"external_zoom_client_id"`
+ ExternalZoomEnabled nullable.Nullable[bool] `json:"external_zoom_enabled"`
+ ExternalZoomSecret nullable.Nullable[string] `json:"external_zoom_secret"`
+ HookBeforeUserCreatedEnabled nullable.Nullable[bool] `json:"hook_before_user_created_enabled"`
+ HookBeforeUserCreatedSecrets nullable.Nullable[string] `json:"hook_before_user_created_secrets"`
+ HookBeforeUserCreatedUri nullable.Nullable[string] `json:"hook_before_user_created_uri"`
+ HookCustomAccessTokenEnabled nullable.Nullable[bool] `json:"hook_custom_access_token_enabled"`
+ HookCustomAccessTokenSecrets nullable.Nullable[string] `json:"hook_custom_access_token_secrets"`
+ HookCustomAccessTokenUri nullable.Nullable[string] `json:"hook_custom_access_token_uri"`
+ HookMfaVerificationAttemptEnabled nullable.Nullable[bool] `json:"hook_mfa_verification_attempt_enabled"`
+ HookMfaVerificationAttemptSecrets nullable.Nullable[string] `json:"hook_mfa_verification_attempt_secrets"`
+ HookMfaVerificationAttemptUri nullable.Nullable[string] `json:"hook_mfa_verification_attempt_uri"`
+ HookPasswordVerificationAttemptEnabled nullable.Nullable[bool] `json:"hook_password_verification_attempt_enabled"`
+ HookPasswordVerificationAttemptSecrets nullable.Nullable[string] `json:"hook_password_verification_attempt_secrets"`
+ HookPasswordVerificationAttemptUri nullable.Nullable[string] `json:"hook_password_verification_attempt_uri"`
+ HookSendEmailEnabled nullable.Nullable[bool] `json:"hook_send_email_enabled"`
+ HookSendEmailSecrets nullable.Nullable[string] `json:"hook_send_email_secrets"`
+ HookSendEmailUri nullable.Nullable[string] `json:"hook_send_email_uri"`
+ HookSendSmsEnabled nullable.Nullable[bool] `json:"hook_send_sms_enabled"`
+ HookSendSmsSecrets nullable.Nullable[string] `json:"hook_send_sms_secrets"`
+ HookSendSmsUri nullable.Nullable[string] `json:"hook_send_sms_uri"`
+ JwtExp nullable.Nullable[int] `json:"jwt_exp"`
+ MailerAllowUnverifiedEmailSignIns nullable.Nullable[bool] `json:"mailer_allow_unverified_email_sign_ins"`
+ MailerAutoconfirm nullable.Nullable[bool] `json:"mailer_autoconfirm"`
+ MailerOtpExp int `json:"mailer_otp_exp"`
+ MailerOtpLength nullable.Nullable[int] `json:"mailer_otp_length"`
+ MailerSecureEmailChangeEnabled nullable.Nullable[bool] `json:"mailer_secure_email_change_enabled"`
+ MailerSubjectsConfirmation nullable.Nullable[string] `json:"mailer_subjects_confirmation"`
+ MailerSubjectsEmailChange nullable.Nullable[string] `json:"mailer_subjects_email_change"`
+ MailerSubjectsInvite nullable.Nullable[string] `json:"mailer_subjects_invite"`
+ MailerSubjectsMagicLink nullable.Nullable[string] `json:"mailer_subjects_magic_link"`
+ MailerSubjectsReauthentication nullable.Nullable[string] `json:"mailer_subjects_reauthentication"`
+ MailerSubjectsRecovery nullable.Nullable[string] `json:"mailer_subjects_recovery"`
+ MailerTemplatesConfirmationContent nullable.Nullable[string] `json:"mailer_templates_confirmation_content"`
+ MailerTemplatesEmailChangeContent nullable.Nullable[string] `json:"mailer_templates_email_change_content"`
+ MailerTemplatesInviteContent nullable.Nullable[string] `json:"mailer_templates_invite_content"`
+ MailerTemplatesMagicLinkContent nullable.Nullable[string] `json:"mailer_templates_magic_link_content"`
+ MailerTemplatesReauthenticationContent nullable.Nullable[string] `json:"mailer_templates_reauthentication_content"`
+ MailerTemplatesRecoveryContent nullable.Nullable[string] `json:"mailer_templates_recovery_content"`
+ MfaMaxEnrolledFactors nullable.Nullable[int] `json:"mfa_max_enrolled_factors"`
+ MfaPhoneEnrollEnabled nullable.Nullable[bool] `json:"mfa_phone_enroll_enabled"`
+ MfaPhoneMaxFrequency nullable.Nullable[int] `json:"mfa_phone_max_frequency"`
+ MfaPhoneOtpLength int `json:"mfa_phone_otp_length"`
+ MfaPhoneTemplate nullable.Nullable[string] `json:"mfa_phone_template"`
+ MfaPhoneVerifyEnabled nullable.Nullable[bool] `json:"mfa_phone_verify_enabled"`
+ MfaTotpEnrollEnabled nullable.Nullable[bool] `json:"mfa_totp_enroll_enabled"`
+ MfaTotpVerifyEnabled nullable.Nullable[bool] `json:"mfa_totp_verify_enabled"`
+ MfaWebAuthnEnrollEnabled nullable.Nullable[bool] `json:"mfa_web_authn_enroll_enabled"`
+ MfaWebAuthnVerifyEnabled nullable.Nullable[bool] `json:"mfa_web_authn_verify_enabled"`
+ PasswordHibpEnabled nullable.Nullable[bool] `json:"password_hibp_enabled"`
+ PasswordMinLength nullable.Nullable[int] `json:"password_min_length"`
+ PasswordRequiredCharacters nullable.Nullable[AuthConfigResponsePasswordRequiredCharacters] `json:"password_required_characters"`
+ RateLimitAnonymousUsers nullable.Nullable[int] `json:"rate_limit_anonymous_users"`
+ RateLimitEmailSent nullable.Nullable[int] `json:"rate_limit_email_sent"`
+ RateLimitOtp nullable.Nullable[int] `json:"rate_limit_otp"`
+ RateLimitSmsSent nullable.Nullable[int] `json:"rate_limit_sms_sent"`
+ RateLimitTokenRefresh nullable.Nullable[int] `json:"rate_limit_token_refresh"`
+ RateLimitVerify nullable.Nullable[int] `json:"rate_limit_verify"`
+ RateLimitWeb3 nullable.Nullable[int] `json:"rate_limit_web3"`
+ RefreshTokenRotationEnabled nullable.Nullable[bool] `json:"refresh_token_rotation_enabled"`
+ SamlAllowEncryptedAssertions nullable.Nullable[bool] `json:"saml_allow_encrypted_assertions"`
+ SamlEnabled nullable.Nullable[bool] `json:"saml_enabled"`
+ SamlExternalUrl nullable.Nullable[string] `json:"saml_external_url"`
+ SecurityCaptchaEnabled nullable.Nullable[bool] `json:"security_captcha_enabled"`
+ SecurityCaptchaProvider nullable.Nullable[AuthConfigResponseSecurityCaptchaProvider] `json:"security_captcha_provider"`
+ SecurityCaptchaSecret nullable.Nullable[string] `json:"security_captcha_secret"`
+ SecurityManualLinkingEnabled nullable.Nullable[bool] `json:"security_manual_linking_enabled"`
+ SecurityRefreshTokenReuseInterval nullable.Nullable[int] `json:"security_refresh_token_reuse_interval"`
+ SecurityUpdatePasswordRequireReauthentication nullable.Nullable[bool] `json:"security_update_password_require_reauthentication"`
+ SessionsInactivityTimeout nullable.Nullable[int] `json:"sessions_inactivity_timeout"`
+ SessionsSinglePerUser nullable.Nullable[bool] `json:"sessions_single_per_user"`
+ SessionsTags nullable.Nullable[string] `json:"sessions_tags"`
+ SessionsTimebox nullable.Nullable[int] `json:"sessions_timebox"`
+ SiteUrl nullable.Nullable[string] `json:"site_url"`
+ SmsAutoconfirm nullable.Nullable[bool] `json:"sms_autoconfirm"`
+ SmsMaxFrequency nullable.Nullable[int] `json:"sms_max_frequency"`
+ SmsMessagebirdAccessKey nullable.Nullable[string] `json:"sms_messagebird_access_key"`
+ SmsMessagebirdOriginator nullable.Nullable[string] `json:"sms_messagebird_originator"`
+ SmsOtpExp nullable.Nullable[int] `json:"sms_otp_exp"`
+ SmsOtpLength int `json:"sms_otp_length"`
+ SmsProvider nullable.Nullable[AuthConfigResponseSmsProvider] `json:"sms_provider"`
+ SmsTemplate nullable.Nullable[string] `json:"sms_template"`
+ SmsTestOtp nullable.Nullable[string] `json:"sms_test_otp"`
+ SmsTestOtpValidUntil nullable.Nullable[time.Time] `json:"sms_test_otp_valid_until"`
+ SmsTextlocalApiKey nullable.Nullable[string] `json:"sms_textlocal_api_key"`
+ SmsTextlocalSender nullable.Nullable[string] `json:"sms_textlocal_sender"`
+ SmsTwilioAccountSid nullable.Nullable[string] `json:"sms_twilio_account_sid"`
+ SmsTwilioAuthToken nullable.Nullable[string] `json:"sms_twilio_auth_token"`
+ SmsTwilioContentSid nullable.Nullable[string] `json:"sms_twilio_content_sid"`
+ SmsTwilioMessageServiceSid nullable.Nullable[string] `json:"sms_twilio_message_service_sid"`
+ SmsTwilioVerifyAccountSid nullable.Nullable[string] `json:"sms_twilio_verify_account_sid"`
+ SmsTwilioVerifyAuthToken nullable.Nullable[string] `json:"sms_twilio_verify_auth_token"`
+ SmsTwilioVerifyMessageServiceSid nullable.Nullable[string] `json:"sms_twilio_verify_message_service_sid"`
+ SmsVonageApiKey nullable.Nullable[string] `json:"sms_vonage_api_key"`
+ SmsVonageApiSecret nullable.Nullable[string] `json:"sms_vonage_api_secret"`
+ SmsVonageFrom nullable.Nullable[string] `json:"sms_vonage_from"`
+ SmtpAdminEmail nullable.Nullable[openapi_types.Email] `json:"smtp_admin_email"`
+ SmtpHost nullable.Nullable[string] `json:"smtp_host"`
+ SmtpMaxFrequency nullable.Nullable[int] `json:"smtp_max_frequency"`
+ SmtpPass nullable.Nullable[string] `json:"smtp_pass"`
+ SmtpPort nullable.Nullable[string] `json:"smtp_port"`
+ SmtpSenderName nullable.Nullable[string] `json:"smtp_sender_name"`
+ SmtpUser nullable.Nullable[string] `json:"smtp_user"`
+ UriAllowList nullable.Nullable[string] `json:"uri_allow_list"`
+}
+
+// AuthConfigResponsePasswordRequiredCharacters defines model for AuthConfigResponse.PasswordRequiredCharacters.
+type AuthConfigResponsePasswordRequiredCharacters string
+
+// AuthConfigResponseSecurityCaptchaProvider defines model for AuthConfigResponse.SecurityCaptchaProvider.
+type AuthConfigResponseSecurityCaptchaProvider string
+
+// AuthConfigResponseSmsProvider defines model for AuthConfigResponse.SmsProvider.
+type AuthConfigResponseSmsProvider string
+
+// BranchActionBody defines model for BranchActionBody.
+type BranchActionBody struct {
+ MigrationVersion *string `json:"migration_version,omitempty"`
+}
// BranchDeleteResponse defines model for BranchDeleteResponse.
type BranchDeleteResponse struct {
- Message string `json:"message"`
+ Message BranchDeleteResponseMessage `json:"message"`
}
+// BranchDeleteResponseMessage defines model for BranchDeleteResponse.Message.
+type BranchDeleteResponseMessage string
+
// BranchDetailResponse defines model for BranchDetailResponse.
type BranchDetailResponse struct {
DbHost string `json:"db_host"`
@@ -752,21 +1326,22 @@ type BranchDetailResponseStatus string
// BranchResponse defines model for BranchResponse.
type BranchResponse struct {
- CreatedAt string `json:"created_at"`
- GitBranch *string `json:"git_branch,omitempty"`
- Id string `json:"id"`
- IsDefault bool `json:"is_default"`
+ CreatedAt time.Time `json:"created_at"`
+ GitBranch *string `json:"git_branch,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ IsDefault bool `json:"is_default"`
// LatestCheckRunId This field is deprecated and will not be populated.
// Deprecated:
- LatestCheckRunId *float32 `json:"latest_check_run_id,omitempty"`
- Name string `json:"name"`
- ParentProjectRef string `json:"parent_project_ref"`
- Persistent bool `json:"persistent"`
- PrNumber *int32 `json:"pr_number,omitempty"`
- ProjectRef string `json:"project_ref"`
- Status BranchResponseStatus `json:"status"`
- UpdatedAt string `json:"updated_at"`
+ LatestCheckRunId *float32 `json:"latest_check_run_id,omitempty"`
+ Name string `json:"name"`
+ ParentProjectRef string `json:"parent_project_ref"`
+ Persistent bool `json:"persistent"`
+ PrNumber *int32 `json:"pr_number,omitempty"`
+ ProjectRef string `json:"project_ref"`
+ ReviewRequestedAt *time.Time `json:"review_requested_at,omitempty"`
+ Status BranchResponseStatus `json:"status"`
+ UpdatedAt time.Time `json:"updated_at"`
}
// BranchResponseStatus defines model for BranchResponse.Status.
@@ -774,14 +1349,18 @@ type BranchResponseStatus string
// BranchUpdateResponse defines model for BranchUpdateResponse.
type BranchUpdateResponse struct {
- Message string `json:"message"`
- WorkflowRunId string `json:"workflow_run_id"`
+ Message BranchUpdateResponseMessage `json:"message"`
+ WorkflowRunId string `json:"workflow_run_id"`
}
+// BranchUpdateResponseMessage defines model for BranchUpdateResponse.Message.
+type BranchUpdateResponseMessage string
+
// BulkUpdateFunctionBody defines model for BulkUpdateFunctionBody.
-type BulkUpdateFunctionBody struct {
+type BulkUpdateFunctionBody = []struct {
CreatedAt *int64 `json:"created_at,omitempty"`
EntrypointPath *string `json:"entrypoint_path,omitempty"`
+ EzbrSha256 *string `json:"ezbr_sha256,omitempty"`
Id string `json:"id"`
ImportMap *bool `json:"import_map,omitempty"`
ImportMapPath *string `json:"import_map_path,omitempty"`
@@ -797,22 +1376,31 @@ type BulkUpdateFunctionBodyStatus string
// BulkUpdateFunctionResponse defines model for BulkUpdateFunctionResponse.
type BulkUpdateFunctionResponse struct {
- Functions []FunctionResponse `json:"functions"`
-}
-
-// CfResponse defines model for CfResponse.
-type CfResponse struct {
- Errors []map[string]interface{} `json:"errors"`
- Messages []map[string]interface{} `json:"messages"`
- Result CustomHostnameDetails `json:"result"`
- Success bool `json:"success"`
-}
+ Functions []struct {
+ CreatedAt int64 `json:"created_at"`
+ EntrypointPath *string `json:"entrypoint_path,omitempty"`
+ EzbrSha256 *string `json:"ezbr_sha256,omitempty"`
+ Id string `json:"id"`
+ ImportMap *bool `json:"import_map,omitempty"`
+ ImportMapPath *string `json:"import_map_path,omitempty"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ Status BulkUpdateFunctionResponseFunctionsStatus `json:"status"`
+ UpdatedAt int64 `json:"updated_at"`
+ VerifyJwt *bool `json:"verify_jwt,omitempty"`
+ Version int `json:"version"`
+ } `json:"functions"`
+}
+
+// BulkUpdateFunctionResponseFunctionsStatus defines model for BulkUpdateFunctionResponse.Functions.Status.
+type BulkUpdateFunctionResponseFunctionsStatus string
// CreateApiKeyBody defines model for CreateApiKeyBody.
type CreateApiKeyBody struct {
- Description *string `json:"description"`
- SecretJwtTemplate *ApiKeySecretJWTTemplate `json:"secret_jwt_template"`
- Type CreateApiKeyBodyType `json:"type"`
+ Description nullable.Nullable[string] `json:"description,omitempty"`
+ Name string `json:"name"`
+ SecretJwtTemplate nullable.Nullable[map[string]interface{}] `json:"secret_jwt_template,omitempty"`
+ Type CreateApiKeyBodyType `json:"type"`
}
// CreateApiKeyBodyType defines model for CreateApiKeyBody.Type.
@@ -820,28 +1408,58 @@ type CreateApiKeyBodyType string
// CreateBranchBody defines model for CreateBranchBody.
type CreateBranchBody struct {
- BranchName string `json:"branch_name"`
- DesiredInstanceSize *DesiredInstanceSize `json:"desired_instance_size,omitempty"`
- GitBranch *string `json:"git_branch,omitempty"`
- Persistent *bool `json:"persistent,omitempty"`
+ BranchName string `json:"branch_name"`
+ DesiredInstanceSize *CreateBranchBodyDesiredInstanceSize `json:"desired_instance_size,omitempty"`
+ GitBranch *string `json:"git_branch,omitempty"`
+ IsDefault *bool `json:"is_default,omitempty"`
+ Persistent *bool `json:"persistent,omitempty"`
// PostgresEngine Postgres engine version. If not provided, the latest version will be used.
- PostgresEngine *PostgresEngine `json:"postgres_engine,omitempty"`
- Region *string `json:"region,omitempty"`
- ReleaseChannel *ReleaseChannel `json:"release_channel,omitempty"`
+ PostgresEngine *CreateBranchBodyPostgresEngine `json:"postgres_engine,omitempty"`
+ Region *string `json:"region,omitempty"`
+
+ // ReleaseChannel Release channel. If not provided, GA will be used.
+ ReleaseChannel *CreateBranchBodyReleaseChannel `json:"release_channel,omitempty"`
+ Secrets *map[string]string `json:"secrets,omitempty"`
+ WithData *bool `json:"with_data,omitempty"`
}
-// CreateOrganizationV1Dto defines model for CreateOrganizationV1Dto.
-type CreateOrganizationV1Dto struct {
+// CreateBranchBodyDesiredInstanceSize defines model for CreateBranchBody.DesiredInstanceSize.
+type CreateBranchBodyDesiredInstanceSize string
+
+// CreateBranchBodyPostgresEngine Postgres engine version. If not provided, the latest version will be used.
+type CreateBranchBodyPostgresEngine string
+
+// CreateBranchBodyReleaseChannel Release channel. If not provided, GA will be used.
+type CreateBranchBodyReleaseChannel string
+
+// CreateOrganizationV1 defines model for CreateOrganizationV1.
+type CreateOrganizationV1 struct {
Name string `json:"name"`
}
+// CreateProjectClaimTokenResponse defines model for CreateProjectClaimTokenResponse.
+type CreateProjectClaimTokenResponse struct {
+ CreatedAt string `json:"created_at"`
+ CreatedBy openapi_types.UUID `json:"created_by"`
+ ExpiresAt string `json:"expires_at"`
+ Token string `json:"token"`
+ TokenAlias string `json:"token_alias"`
+}
+
// CreateProviderBody defines model for CreateProviderBody.
type CreateProviderBody struct {
- AttributeMapping *AttributeMapping `json:"attribute_mapping,omitempty"`
- Domains *[]string `json:"domains,omitempty"`
- MetadataUrl *string `json:"metadata_url,omitempty"`
- MetadataXml *string `json:"metadata_xml,omitempty"`
+ AttributeMapping *struct {
+ Keys map[string]struct {
+ Array *bool `json:"array,omitempty"`
+ Default *interface{} `json:"default,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Names *[]string `json:"names,omitempty"`
+ } `json:"keys"`
+ } `json:"attribute_mapping,omitempty"`
+ Domains *[]string `json:"domains,omitempty"`
+ MetadataUrl *string `json:"metadata_url,omitempty"`
+ MetadataXml *string `json:"metadata_xml,omitempty"`
// Type What type of provider will be created
Type CreateProviderBodyType `json:"type"`
@@ -852,130 +1470,210 @@ type CreateProviderBodyType string
// CreateProviderResponse defines model for CreateProviderResponse.
type CreateProviderResponse struct {
- CreatedAt *string `json:"created_at,omitempty"`
- Domains *[]Domain `json:"domains,omitempty"`
- Id string `json:"id"`
- Saml *SamlDescriptor `json:"saml,omitempty"`
- UpdatedAt *string `json:"updated_at,omitempty"`
+ CreatedAt *string `json:"created_at,omitempty"`
+ Domains *[]struct {
+ CreatedAt *string `json:"created_at,omitempty"`
+ Domain *string `json:"domain,omitempty"`
+ Id string `json:"id"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
+ } `json:"domains,omitempty"`
+ Id string `json:"id"`
+ Saml *struct {
+ AttributeMapping *struct {
+ Keys map[string]struct {
+ Array *bool `json:"array,omitempty"`
+ Default *interface{} `json:"default,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Names *[]string `json:"names,omitempty"`
+ } `json:"keys"`
+ } `json:"attribute_mapping,omitempty"`
+ EntityId string `json:"entity_id"`
+ Id string `json:"id"`
+ MetadataUrl *string `json:"metadata_url,omitempty"`
+ MetadataXml *string `json:"metadata_xml,omitempty"`
+ } `json:"saml,omitempty"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
}
// CreateSecretBody defines model for CreateSecretBody.
-type CreateSecretBody struct {
+type CreateSecretBody = []struct {
// Name Secret name must not start with the SUPABASE_ prefix.
Name string `json:"name"`
Value string `json:"value"`
}
-// CreateThirdPartyAuthBody defines model for CreateThirdPartyAuthBody.
-type CreateThirdPartyAuthBody struct {
- CustomJwks *map[string]interface{} `json:"custom_jwks,omitempty"`
- JwksUrl *string `json:"jwks_url,omitempty"`
- OidcIssuerUrl *string `json:"oidc_issuer_url,omitempty"`
+// CreateSigningKeyBody defines model for CreateSigningKeyBody.
+type CreateSigningKeyBody struct {
+ Algorithm CreateSigningKeyBodyAlgorithm `json:"algorithm"`
+ PrivateJwk *CreateSigningKeyBody_PrivateJwk `json:"private_jwk,omitempty"`
+ Status *CreateSigningKeyBodyStatus `json:"status,omitempty"`
}
-// CustomHostnameDetails defines model for CustomHostnameDetails.
-type CustomHostnameDetails struct {
- CustomOriginServer string `json:"custom_origin_server"`
- Hostname string `json:"hostname"`
- Id string `json:"id"`
- OwnershipVerification OwnershipVerification `json:"ownership_verification"`
- Ssl SslValidation `json:"ssl"`
- Status string `json:"status"`
- VerificationErrors *[]string `json:"verification_errors,omitempty"`
-}
+// CreateSigningKeyBodyAlgorithm defines model for CreateSigningKeyBody.Algorithm.
+type CreateSigningKeyBodyAlgorithm string
-// DatabaseUpgradeStatus defines model for DatabaseUpgradeStatus.
-type DatabaseUpgradeStatus struct {
- Error *DatabaseUpgradeStatusError `json:"error,omitempty"`
- InitiatedAt string `json:"initiated_at"`
- LatestStatusAt string `json:"latest_status_at"`
- Progress *DatabaseUpgradeStatusProgress `json:"progress,omitempty"`
- Status DatabaseUpgradeStatusStatus `json:"status"`
- TargetVersion int `json:"target_version"`
+// CreateSigningKeyBodyPrivateJwk0 defines model for .
+type CreateSigningKeyBodyPrivateJwk0 struct {
+ D string `json:"d"`
+ Dp string `json:"dp"`
+ Dq string `json:"dq"`
+ E CreateSigningKeyBodyPrivateJwk0E `json:"e"`
+ Kty CreateSigningKeyBodyPrivateJwk0Kty `json:"kty"`
+ N string `json:"n"`
+ P string `json:"p"`
+ Q string `json:"q"`
+ Qi string `json:"qi"`
}
-// DatabaseUpgradeStatusError defines model for DatabaseUpgradeStatus.Error.
-type DatabaseUpgradeStatusError string
-
-// DatabaseUpgradeStatusProgress defines model for DatabaseUpgradeStatus.Progress.
-type DatabaseUpgradeStatusProgress string
+// CreateSigningKeyBodyPrivateJwk0E defines model for CreateSigningKeyBody.PrivateJwk.0.E.
+type CreateSigningKeyBodyPrivateJwk0E string
-// DatabaseUpgradeStatusStatus defines model for DatabaseUpgradeStatus.Status.
-type DatabaseUpgradeStatusStatus int
+// CreateSigningKeyBodyPrivateJwk0Kty defines model for CreateSigningKeyBody.PrivateJwk.0.Kty.
+type CreateSigningKeyBodyPrivateJwk0Kty string
-// DatabaseUpgradeStatusResponse defines model for DatabaseUpgradeStatusResponse.
-type DatabaseUpgradeStatusResponse struct {
- DatabaseUpgradeStatus *DatabaseUpgradeStatus `json:"databaseUpgradeStatus"`
+// CreateSigningKeyBodyPrivateJwk1 defines model for .
+type CreateSigningKeyBodyPrivateJwk1 struct {
+ Crv CreateSigningKeyBodyPrivateJwk1Crv `json:"crv"`
+ D string `json:"d"`
+ Kty CreateSigningKeyBodyPrivateJwk1Kty `json:"kty"`
+ X string `json:"x"`
+ Y string `json:"y"`
}
-// DeleteProviderResponse defines model for DeleteProviderResponse.
-type DeleteProviderResponse struct {
- CreatedAt *string `json:"created_at,omitempty"`
- Domains *[]Domain `json:"domains,omitempty"`
- Id string `json:"id"`
- Saml *SamlDescriptor `json:"saml,omitempty"`
- UpdatedAt *string `json:"updated_at,omitempty"`
-}
+// CreateSigningKeyBodyPrivateJwk1Crv defines model for CreateSigningKeyBody.PrivateJwk.1.Crv.
+type CreateSigningKeyBodyPrivateJwk1Crv string
-// DeployFunctionResponse defines model for DeployFunctionResponse.
-type DeployFunctionResponse struct {
- ComputeMultiplier *float32 `json:"compute_multiplier,omitempty"`
- CreatedAt *int64 `json:"created_at,omitempty"`
- EntrypointPath *string `json:"entrypoint_path,omitempty"`
- Id string `json:"id"`
- ImportMap *bool `json:"import_map,omitempty"`
- ImportMapPath *string `json:"import_map_path,omitempty"`
- Name string `json:"name"`
- Slug string `json:"slug"`
- Status DeployFunctionResponseStatus `json:"status"`
- UpdatedAt *int64 `json:"updated_at,omitempty"`
- VerifyJwt *bool `json:"verify_jwt,omitempty"`
- Version int `json:"version"`
+// CreateSigningKeyBodyPrivateJwk1Kty defines model for CreateSigningKeyBody.PrivateJwk.1.Kty.
+type CreateSigningKeyBodyPrivateJwk1Kty string
+
+// CreateSigningKeyBodyPrivateJwk2 defines model for .
+type CreateSigningKeyBodyPrivateJwk2 struct {
+ Crv CreateSigningKeyBodyPrivateJwk2Crv `json:"crv"`
+ D string `json:"d"`
+ Kty CreateSigningKeyBodyPrivateJwk2Kty `json:"kty"`
+ X string `json:"x"`
}
-// DeployFunctionResponseStatus defines model for DeployFunctionResponse.Status.
-type DeployFunctionResponseStatus string
+// CreateSigningKeyBodyPrivateJwk2Crv defines model for CreateSigningKeyBody.PrivateJwk.2.Crv.
+type CreateSigningKeyBodyPrivateJwk2Crv string
-// DesiredInstanceSize defines model for DesiredInstanceSize.
-type DesiredInstanceSize string
+// CreateSigningKeyBodyPrivateJwk2Kty defines model for CreateSigningKeyBody.PrivateJwk.2.Kty.
+type CreateSigningKeyBodyPrivateJwk2Kty string
-// Domain defines model for Domain.
-type Domain struct {
- CreatedAt *string `json:"created_at,omitempty"`
- Domain *string `json:"domain,omitempty"`
- Id string `json:"id"`
- UpdatedAt *string `json:"updated_at,omitempty"`
+// CreateSigningKeyBodyPrivateJwk3 defines model for .
+type CreateSigningKeyBodyPrivateJwk3 struct {
+ K string `json:"k"`
+ Kty CreateSigningKeyBodyPrivateJwk3Kty `json:"kty"`
}
-// FunctionDeployBody defines model for FunctionDeployBody.
-type FunctionDeployBody struct {
- File []openapi_types.File `json:"file"`
- Metadata FunctionDeployMetadata `json:"metadata"`
+// CreateSigningKeyBodyPrivateJwk3Kty defines model for CreateSigningKeyBody.PrivateJwk.3.Kty.
+type CreateSigningKeyBodyPrivateJwk3Kty string
+
+// CreateSigningKeyBody_PrivateJwk defines model for CreateSigningKeyBody.PrivateJwk.
+type CreateSigningKeyBody_PrivateJwk struct {
+ union json.RawMessage
+}
+
+// CreateSigningKeyBodyStatus defines model for CreateSigningKeyBody.Status.
+type CreateSigningKeyBodyStatus string
+
+// CreateThirdPartyAuthBody defines model for CreateThirdPartyAuthBody.
+type CreateThirdPartyAuthBody struct {
+ CustomJwks *interface{} `json:"custom_jwks,omitempty"`
+ JwksUrl *string `json:"jwks_url,omitempty"`
+ OidcIssuerUrl *string `json:"oidc_issuer_url,omitempty"`
+}
+
+// DatabaseUpgradeStatusResponse defines model for DatabaseUpgradeStatusResponse.
+type DatabaseUpgradeStatusResponse struct {
+ DatabaseUpgradeStatus nullable.Nullable[struct {
+ Error *DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError `json:"error,omitempty"`
+ InitiatedAt string `json:"initiated_at"`
+ LatestStatusAt string `json:"latest_status_at"`
+ Progress *DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress `json:"progress,omitempty"`
+ Status float32 `json:"status"`
+ TargetVersion float32 `json:"target_version"`
+ }] `json:"databaseUpgradeStatus"`
+}
+
+// DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError defines model for DatabaseUpgradeStatusResponse.DatabaseUpgradeStatus.Error.
+type DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError string
+
+// DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress defines model for DatabaseUpgradeStatusResponse.DatabaseUpgradeStatus.Progress.
+type DatabaseUpgradeStatusResponseDatabaseUpgradeStatusProgress string
+
+// DeleteProviderResponse defines model for DeleteProviderResponse.
+type DeleteProviderResponse struct {
+ CreatedAt *string `json:"created_at,omitempty"`
+ Domains *[]struct {
+ CreatedAt *string `json:"created_at,omitempty"`
+ Domain *string `json:"domain,omitempty"`
+ Id string `json:"id"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
+ } `json:"domains,omitempty"`
+ Id string `json:"id"`
+ Saml *struct {
+ AttributeMapping *struct {
+ Keys map[string]struct {
+ Array *bool `json:"array,omitempty"`
+ Default *interface{} `json:"default,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Names *[]string `json:"names,omitempty"`
+ } `json:"keys"`
+ } `json:"attribute_mapping,omitempty"`
+ EntityId string `json:"entity_id"`
+ Id string `json:"id"`
+ MetadataUrl *string `json:"metadata_url,omitempty"`
+ MetadataXml *string `json:"metadata_xml,omitempty"`
+ } `json:"saml,omitempty"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
+}
+
+// DeployFunctionResponse defines model for DeployFunctionResponse.
+type DeployFunctionResponse struct {
+ CreatedAt *int64 `json:"created_at,omitempty"`
+ EntrypointPath *string `json:"entrypoint_path,omitempty"`
+ EzbrSha256 *string `json:"ezbr_sha256,omitempty"`
+ Id string `json:"id"`
+ ImportMap *bool `json:"import_map,omitempty"`
+ ImportMapPath *string `json:"import_map_path,omitempty"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ Status DeployFunctionResponseStatus `json:"status"`
+ UpdatedAt *int64 `json:"updated_at,omitempty"`
+ VerifyJwt *bool `json:"verify_jwt,omitempty"`
+ Version int `json:"version"`
}
-// FunctionDeployMetadata defines model for FunctionDeployMetadata.
-type FunctionDeployMetadata struct {
- EntrypointPath string `json:"entrypoint_path"`
- ImportMapPath *string `json:"import_map_path,omitempty"`
- Name *string `json:"name,omitempty"`
- StaticPatterns *[]string `json:"static_patterns,omitempty"`
- VerifyJwt *bool `json:"verify_jwt,omitempty"`
+// DeployFunctionResponseStatus defines model for DeployFunctionResponse.Status.
+type DeployFunctionResponseStatus string
+
+// FunctionDeployBody defines model for FunctionDeployBody.
+type FunctionDeployBody struct {
+ File *[]openapi_types.File `json:"file,omitempty"`
+ Metadata struct {
+ EntrypointPath string `json:"entrypoint_path"`
+ ImportMapPath *string `json:"import_map_path,omitempty"`
+ Name *string `json:"name,omitempty"`
+ StaticPatterns *[]string `json:"static_patterns,omitempty"`
+ VerifyJwt *bool `json:"verify_jwt,omitempty"`
+ } `json:"metadata"`
}
// FunctionResponse defines model for FunctionResponse.
type FunctionResponse struct {
- ComputeMultiplier *float32 `json:"compute_multiplier,omitempty"`
- CreatedAt int64 `json:"created_at"`
- EntrypointPath *string `json:"entrypoint_path,omitempty"`
- Id string `json:"id"`
- ImportMap *bool `json:"import_map,omitempty"`
- ImportMapPath *string `json:"import_map_path,omitempty"`
- Name string `json:"name"`
- Slug string `json:"slug"`
- Status FunctionResponseStatus `json:"status"`
- UpdatedAt int64 `json:"updated_at"`
- VerifyJwt *bool `json:"verify_jwt,omitempty"`
- Version int `json:"version"`
+ CreatedAt int64 `json:"created_at"`
+ EntrypointPath *string `json:"entrypoint_path,omitempty"`
+ EzbrSha256 *string `json:"ezbr_sha256,omitempty"`
+ Id string `json:"id"`
+ ImportMap *bool `json:"import_map,omitempty"`
+ ImportMapPath *string `json:"import_map_path,omitempty"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ Status FunctionResponseStatus `json:"status"`
+ UpdatedAt int64 `json:"updated_at"`
+ VerifyJwt *bool `json:"verify_jwt,omitempty"`
+ Version int `json:"version"`
}
// FunctionResponseStatus defines model for FunctionResponse.Status.
@@ -983,18 +1681,18 @@ type FunctionResponseStatus string
// FunctionSlugResponse defines model for FunctionSlugResponse.
type FunctionSlugResponse struct {
- ComputeMultiplier *float32 `json:"compute_multiplier,omitempty"`
- CreatedAt int64 `json:"created_at"`
- EntrypointPath *string `json:"entrypoint_path,omitempty"`
- Id string `json:"id"`
- ImportMap *bool `json:"import_map,omitempty"`
- ImportMapPath *string `json:"import_map_path,omitempty"`
- Name string `json:"name"`
- Slug string `json:"slug"`
- Status FunctionSlugResponseStatus `json:"status"`
- UpdatedAt int64 `json:"updated_at"`
- VerifyJwt *bool `json:"verify_jwt,omitempty"`
- Version int `json:"version"`
+ CreatedAt int64 `json:"created_at"`
+ EntrypointPath *string `json:"entrypoint_path,omitempty"`
+ EzbrSha256 *string `json:"ezbr_sha256,omitempty"`
+ Id string `json:"id"`
+ ImportMap *bool `json:"import_map,omitempty"`
+ ImportMapPath *string `json:"import_map_path,omitempty"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ Status FunctionSlugResponseStatus `json:"status"`
+ UpdatedAt int64 `json:"updated_at"`
+ VerifyJwt *bool `json:"verify_jwt,omitempty"`
+ Version int `json:"version"`
}
// FunctionSlugResponseStatus defines model for FunctionSlugResponse.Status.
@@ -1002,39 +1700,223 @@ type FunctionSlugResponseStatus string
// GetProjectAvailableRestoreVersionsResponse defines model for GetProjectAvailableRestoreVersionsResponse.
type GetProjectAvailableRestoreVersionsResponse struct {
- AvailableVersions []ProjectAvailableRestoreVersion `json:"available_versions"`
+ AvailableVersions []struct {
+ PostgresEngine GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngine `json:"postgres_engine"`
+ ReleaseChannel GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel `json:"release_channel"`
+ Version string `json:"version"`
+ } `json:"available_versions"`
}
-// GetProjectDbMetadataResponseDto defines model for GetProjectDbMetadataResponseDto.
-type GetProjectDbMetadataResponseDto struct {
- Databases []GetProjectDbMetadataResponseDto_Databases_Item `json:"databases"`
+// GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngine defines model for GetProjectAvailableRestoreVersionsResponse.AvailableVersions.PostgresEngine.
+type GetProjectAvailableRestoreVersionsResponseAvailableVersionsPostgresEngine string
+
+// GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel defines model for GetProjectAvailableRestoreVersionsResponse.AvailableVersions.ReleaseChannel.
+type GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel string
+
+// GetProjectDbMetadataResponse defines model for GetProjectDbMetadataResponse.
+type GetProjectDbMetadataResponse struct {
+ Databases []GetProjectDbMetadataResponse_Databases_Item `json:"databases"`
}
-// GetProjectDbMetadataResponseDto_Databases_Schemas_Item defines model for GetProjectDbMetadataResponseDto.Databases.Schemas.Item.
-type GetProjectDbMetadataResponseDto_Databases_Schemas_Item struct {
+// GetProjectDbMetadataResponse_Databases_Schemas_Item defines model for GetProjectDbMetadataResponse.Databases.Schemas.Item.
+type GetProjectDbMetadataResponse_Databases_Schemas_Item struct {
Name string `json:"name"`
AdditionalProperties map[string]interface{} `json:"-"`
}
-// GetProjectDbMetadataResponseDto_Databases_Item defines model for GetProjectDbMetadataResponseDto.databases.Item.
-type GetProjectDbMetadataResponseDto_Databases_Item struct {
- Name string `json:"name"`
- Schemas []GetProjectDbMetadataResponseDto_Databases_Schemas_Item `json:"schemas"`
- AdditionalProperties map[string]interface{} `json:"-"`
+// GetProjectDbMetadataResponse_Databases_Item defines model for GetProjectDbMetadataResponse.databases.Item.
+type GetProjectDbMetadataResponse_Databases_Item struct {
+ Name string `json:"name"`
+ Schemas []GetProjectDbMetadataResponse_Databases_Schemas_Item `json:"schemas"`
+ AdditionalProperties map[string]interface{} `json:"-"`
}
// GetProviderResponse defines model for GetProviderResponse.
type GetProviderResponse struct {
- CreatedAt *string `json:"created_at,omitempty"`
- Domains *[]Domain `json:"domains,omitempty"`
- Id string `json:"id"`
- Saml *SamlDescriptor `json:"saml,omitempty"`
- UpdatedAt *string `json:"updated_at,omitempty"`
+ CreatedAt *string `json:"created_at,omitempty"`
+ Domains *[]struct {
+ CreatedAt *string `json:"created_at,omitempty"`
+ Domain *string `json:"domain,omitempty"`
+ Id string `json:"id"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
+ } `json:"domains,omitempty"`
+ Id string `json:"id"`
+ Saml *struct {
+ AttributeMapping *struct {
+ Keys map[string]struct {
+ Array *bool `json:"array,omitempty"`
+ Default *interface{} `json:"default,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Names *[]string `json:"names,omitempty"`
+ } `json:"keys"`
+ } `json:"attribute_mapping,omitempty"`
+ EntityId string `json:"entity_id"`
+ Id string `json:"id"`
+ MetadataUrl *string `json:"metadata_url,omitempty"`
+ MetadataXml *string `json:"metadata_xml,omitempty"`
+ } `json:"saml,omitempty"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
+}
+
+// JitAccessResponse defines model for JitAccessResponse.
+type JitAccessResponse struct {
+ UserId openapi_types.UUID `json:"user_id"`
+ UserRoles []struct {
+ ExpiresAt *string `json:"expires_at,omitempty"`
+ Role string `json:"role"`
+ } `json:"user_roles"`
+}
+
+// JitListAccessResponse defines model for JitListAccessResponse.
+type JitListAccessResponse struct {
+ Items []struct {
+ UserId openapi_types.UUID `json:"user_id"`
+ UserRoles []struct {
+ ExpiresAt *string `json:"expires_at,omitempty"`
+ Role string `json:"role"`
+ } `json:"user_roles"`
+ } `json:"items"`
+}
+
+// LegacyApiKeysResponse defines model for LegacyApiKeysResponse.
+type LegacyApiKeysResponse struct {
+ Enabled bool `json:"enabled"`
+}
+
+// ListProjectAddonsResponse defines model for ListProjectAddonsResponse.
+type ListProjectAddonsResponse struct {
+ AvailableAddons []struct {
+ Name string `json:"name"`
+ Type ListProjectAddonsResponseAvailableAddonsType `json:"type"`
+ Variants []struct {
+ Id ListProjectAddonsResponse_AvailableAddons_Variants_Id `json:"id"`
+
+ // Meta Any JSON-serializable value
+ Meta *interface{} `json:"meta,omitempty"`
+ Name string `json:"name"`
+ Price struct {
+ Amount float32 `json:"amount"`
+ Description string `json:"description"`
+ Interval ListProjectAddonsResponseAvailableAddonsVariantsPriceInterval `json:"interval"`
+ Type ListProjectAddonsResponseAvailableAddonsVariantsPriceType `json:"type"`
+ } `json:"price"`
+ } `json:"variants"`
+ } `json:"available_addons"`
+ SelectedAddons []struct {
+ Type ListProjectAddonsResponseSelectedAddonsType `json:"type"`
+ Variant struct {
+ Id ListProjectAddonsResponse_SelectedAddons_Variant_Id `json:"id"`
+
+ // Meta Any JSON-serializable value
+ Meta *interface{} `json:"meta,omitempty"`
+ Name string `json:"name"`
+ Price struct {
+ Amount float32 `json:"amount"`
+ Description string `json:"description"`
+ Interval ListProjectAddonsResponseSelectedAddonsVariantPriceInterval `json:"interval"`
+ Type ListProjectAddonsResponseSelectedAddonsVariantPriceType `json:"type"`
+ } `json:"price"`
+ } `json:"variant"`
+ } `json:"selected_addons"`
+}
+
+// ListProjectAddonsResponseAvailableAddonsType defines model for ListProjectAddonsResponse.AvailableAddons.Type.
+type ListProjectAddonsResponseAvailableAddonsType string
+
+// ListProjectAddonsResponseAvailableAddonsVariantsId0 defines model for ListProjectAddonsResponse.AvailableAddons.Variants.Id.0.
+type ListProjectAddonsResponseAvailableAddonsVariantsId0 string
+
+// ListProjectAddonsResponseAvailableAddonsVariantsId1 defines model for ListProjectAddonsResponse.AvailableAddons.Variants.Id.1.
+type ListProjectAddonsResponseAvailableAddonsVariantsId1 string
+
+// ListProjectAddonsResponseAvailableAddonsVariantsId2 defines model for ListProjectAddonsResponse.AvailableAddons.Variants.Id.2.
+type ListProjectAddonsResponseAvailableAddonsVariantsId2 string
+
+// ListProjectAddonsResponseAvailableAddonsVariantsId3 defines model for ListProjectAddonsResponse.AvailableAddons.Variants.Id.3.
+type ListProjectAddonsResponseAvailableAddonsVariantsId3 string
+
+// ListProjectAddonsResponseAvailableAddonsVariantsId4 defines model for ListProjectAddonsResponse.AvailableAddons.Variants.Id.4.
+type ListProjectAddonsResponseAvailableAddonsVariantsId4 string
+
+// ListProjectAddonsResponseAvailableAddonsVariantsId5 defines model for ListProjectAddonsResponse.AvailableAddons.Variants.Id.5.
+type ListProjectAddonsResponseAvailableAddonsVariantsId5 string
+
+// ListProjectAddonsResponseAvailableAddonsVariantsId6 defines model for ListProjectAddonsResponse.AvailableAddons.Variants.Id.6.
+type ListProjectAddonsResponseAvailableAddonsVariantsId6 string
+
+// ListProjectAddonsResponse_AvailableAddons_Variants_Id defines model for ListProjectAddonsResponse.AvailableAddons.Variants.Id.
+type ListProjectAddonsResponse_AvailableAddons_Variants_Id struct {
+ union json.RawMessage
+}
+
+// ListProjectAddonsResponseAvailableAddonsVariantsPriceInterval defines model for ListProjectAddonsResponse.AvailableAddons.Variants.Price.Interval.
+type ListProjectAddonsResponseAvailableAddonsVariantsPriceInterval string
+
+// ListProjectAddonsResponseAvailableAddonsVariantsPriceType defines model for ListProjectAddonsResponse.AvailableAddons.Variants.Price.Type.
+type ListProjectAddonsResponseAvailableAddonsVariantsPriceType string
+
+// ListProjectAddonsResponseSelectedAddonsType defines model for ListProjectAddonsResponse.SelectedAddons.Type.
+type ListProjectAddonsResponseSelectedAddonsType string
+
+// ListProjectAddonsResponseSelectedAddonsVariantId0 defines model for ListProjectAddonsResponse.SelectedAddons.Variant.Id.0.
+type ListProjectAddonsResponseSelectedAddonsVariantId0 string
+
+// ListProjectAddonsResponseSelectedAddonsVariantId1 defines model for ListProjectAddonsResponse.SelectedAddons.Variant.Id.1.
+type ListProjectAddonsResponseSelectedAddonsVariantId1 string
+
+// ListProjectAddonsResponseSelectedAddonsVariantId2 defines model for ListProjectAddonsResponse.SelectedAddons.Variant.Id.2.
+type ListProjectAddonsResponseSelectedAddonsVariantId2 string
+
+// ListProjectAddonsResponseSelectedAddonsVariantId3 defines model for ListProjectAddonsResponse.SelectedAddons.Variant.Id.3.
+type ListProjectAddonsResponseSelectedAddonsVariantId3 string
+
+// ListProjectAddonsResponseSelectedAddonsVariantId4 defines model for ListProjectAddonsResponse.SelectedAddons.Variant.Id.4.
+type ListProjectAddonsResponseSelectedAddonsVariantId4 string
+
+// ListProjectAddonsResponseSelectedAddonsVariantId5 defines model for ListProjectAddonsResponse.SelectedAddons.Variant.Id.5.
+type ListProjectAddonsResponseSelectedAddonsVariantId5 string
+
+// ListProjectAddonsResponseSelectedAddonsVariantId6 defines model for ListProjectAddonsResponse.SelectedAddons.Variant.Id.6.
+type ListProjectAddonsResponseSelectedAddonsVariantId6 string
+
+// ListProjectAddonsResponse_SelectedAddons_Variant_Id defines model for ListProjectAddonsResponse.SelectedAddons.Variant.Id.
+type ListProjectAddonsResponse_SelectedAddons_Variant_Id struct {
+ union json.RawMessage
}
+// ListProjectAddonsResponseSelectedAddonsVariantPriceInterval defines model for ListProjectAddonsResponse.SelectedAddons.Variant.Price.Interval.
+type ListProjectAddonsResponseSelectedAddonsVariantPriceInterval string
+
+// ListProjectAddonsResponseSelectedAddonsVariantPriceType defines model for ListProjectAddonsResponse.SelectedAddons.Variant.Price.Type.
+type ListProjectAddonsResponseSelectedAddonsVariantPriceType string
+
// ListProvidersResponse defines model for ListProvidersResponse.
type ListProvidersResponse struct {
- Items []Provider `json:"items"`
+ Items []struct {
+ CreatedAt *string `json:"created_at,omitempty"`
+ Domains *[]struct {
+ CreatedAt *string `json:"created_at,omitempty"`
+ Domain *string `json:"domain,omitempty"`
+ Id string `json:"id"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
+ } `json:"domains,omitempty"`
+ Id string `json:"id"`
+ Saml *struct {
+ AttributeMapping *struct {
+ Keys map[string]struct {
+ Array *bool `json:"array,omitempty"`
+ Default *interface{} `json:"default,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Names *[]string `json:"names,omitempty"`
+ } `json:"keys"`
+ } `json:"attribute_mapping,omitempty"`
+ EntityId string `json:"entity_id"`
+ Id string `json:"id"`
+ MetadataUrl *string `json:"metadata_url,omitempty"`
+ MetadataXml *string `json:"metadata_xml,omitempty"`
+ } `json:"saml,omitempty"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
+ } `json:"items"`
}
// NetworkBanResponse defines model for NetworkBanResponse.
@@ -1042,6 +1924,15 @@ type NetworkBanResponse struct {
BannedIpv4Addresses []string `json:"banned_ipv4_addresses"`
}
+// NetworkBanResponseEnriched defines model for NetworkBanResponseEnriched.
+type NetworkBanResponseEnriched struct {
+ BannedIpv4Addresses []struct {
+ BannedAddress string `json:"banned_address"`
+ Identifier string `json:"identifier"`
+ Type string `json:"type"`
+ } `json:"banned_ipv4_addresses"`
+}
+
// NetworkRestrictionsRequest defines model for NetworkRestrictionsRequest.
type NetworkRestrictionsRequest struct {
DbAllowedCidrs *[]string `json:"dbAllowedCidrs,omitempty"`
@@ -1050,10 +1941,19 @@ type NetworkRestrictionsRequest struct {
// NetworkRestrictionsResponse defines model for NetworkRestrictionsResponse.
type NetworkRestrictionsResponse struct {
- Config NetworkRestrictionsRequest `json:"config"`
+ // Config At any given point in time, this is the config that the user has requested be applied to their project. The `status` field indicates if it has been applied to the project, or is pending. When an updated config is received, the applied config is moved to `old_config`.
+ Config struct {
+ DbAllowedCidrs *[]string `json:"dbAllowedCidrs,omitempty"`
+ DbAllowedCidrsV6 *[]string `json:"dbAllowedCidrsV6,omitempty"`
+ } `json:"config"`
Entitlement NetworkRestrictionsResponseEntitlement `json:"entitlement"`
- OldConfig *NetworkRestrictionsRequest `json:"old_config,omitempty"`
- Status NetworkRestrictionsResponseStatus `json:"status"`
+
+ // OldConfig Populated when a new config has been received, but not registered as successfully applied to a project.
+ OldConfig *struct {
+ DbAllowedCidrs *[]string `json:"dbAllowedCidrs,omitempty"`
+ DbAllowedCidrsV6 *[]string `json:"dbAllowedCidrsV6,omitempty"`
+ } `json:"old_config,omitempty"`
+ Status NetworkRestrictionsResponseStatus `json:"status"`
}
// NetworkRestrictionsResponseEntitlement defines model for NetworkRestrictionsResponse.Entitlement.
@@ -1062,8 +1962,8 @@ type NetworkRestrictionsResponseEntitlement string
// NetworkRestrictionsResponseStatus defines model for NetworkRestrictionsResponse.Status.
type NetworkRestrictionsResponseStatus string
-// OAuthRevokeTokenBodyDto defines model for OAuthRevokeTokenBodyDto.
-type OAuthRevokeTokenBodyDto struct {
+// OAuthRevokeTokenBody defines model for OAuthRevokeTokenBody.
+type OAuthRevokeTokenBody struct {
ClientId openapi_types.UUID `json:"client_id"`
ClientSecret string `json:"client_secret"`
RefreshToken string `json:"refresh_token"`
@@ -1071,22 +1971,28 @@ type OAuthRevokeTokenBodyDto struct {
// OAuthTokenBody defines model for OAuthTokenBody.
type OAuthTokenBody struct {
- ClientId string `json:"client_id"`
- ClientSecret string `json:"client_secret"`
- Code *string `json:"code,omitempty"`
- CodeVerifier *string `json:"code_verifier,omitempty"`
- GrantType OAuthTokenBodyGrantType `json:"grant_type"`
- RedirectUri *string `json:"redirect_uri,omitempty"`
- RefreshToken *string `json:"refresh_token,omitempty"`
+ ClientId *openapi_types.UUID `json:"client_id,omitempty"`
+ ClientSecret *string `json:"client_secret,omitempty"`
+ Code *string `json:"code,omitempty"`
+ CodeVerifier *string `json:"code_verifier,omitempty"`
+ GrantType *OAuthTokenBodyGrantType `json:"grant_type,omitempty"`
+ RedirectUri *string `json:"redirect_uri,omitempty"`
+ RefreshToken *string `json:"refresh_token,omitempty"`
+
+ // Resource Resource indicator for MCP (Model Context Protocol) clients
+ Resource *OAuthTokenBodyResource `json:"resource,omitempty"`
}
// OAuthTokenBodyGrantType defines model for OAuthTokenBody.GrantType.
type OAuthTokenBodyGrantType string
+// OAuthTokenBodyResource Resource indicator for MCP (Model Context Protocol) clients
+type OAuthTokenBodyResource string
+
// OAuthTokenResponse defines model for OAuthTokenResponse.
type OAuthTokenResponse struct {
AccessToken string `json:"access_token"`
- ExpiresIn int64 `json:"expires_in"`
+ ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
TokenType OAuthTokenResponseTokenType `json:"token_type"`
}
@@ -1094,19 +2000,52 @@ type OAuthTokenResponse struct {
// OAuthTokenResponseTokenType defines model for OAuthTokenResponse.TokenType.
type OAuthTokenResponseTokenType string
+// OrganizationProjectClaimResponse defines model for OrganizationProjectClaimResponse.
+type OrganizationProjectClaimResponse struct {
+ CreatedAt string `json:"created_at"`
+ CreatedBy openapi_types.UUID `json:"created_by"`
+ ExpiresAt string `json:"expires_at"`
+ Preview struct {
+ Errors []struct {
+ Key string `json:"key"`
+ Message string `json:"message"`
+ } `json:"errors"`
+ Info []struct {
+ Key string `json:"key"`
+ Message string `json:"message"`
+ } `json:"info"`
+ MembersExceedingFreeProjectLimit []struct {
+ Limit float32 `json:"limit"`
+ Name string `json:"name"`
+ } `json:"members_exceeding_free_project_limit"`
+ SourceSubscriptionPlan OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan `json:"source_subscription_plan"`
+ TargetOrganizationEligible nullable.Nullable[bool] `json:"target_organization_eligible"`
+ TargetOrganizationHasFreeProjectSlots nullable.Nullable[bool] `json:"target_organization_has_free_project_slots"`
+ TargetSubscriptionPlan nullable.Nullable[OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan] `json:"target_subscription_plan"`
+ Valid bool `json:"valid"`
+ Warnings []struct {
+ Key string `json:"key"`
+ Message string `json:"message"`
+ } `json:"warnings"`
+ } `json:"preview"`
+ Project struct {
+ Name string `json:"name"`
+ Ref string `json:"ref"`
+ } `json:"project"`
+}
+
+// OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan defines model for OrganizationProjectClaimResponse.Preview.SourceSubscriptionPlan.
+type OrganizationProjectClaimResponsePreviewSourceSubscriptionPlan string
+
+// OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan defines model for OrganizationProjectClaimResponse.Preview.TargetSubscriptionPlan.
+type OrganizationProjectClaimResponsePreviewTargetSubscriptionPlan string
+
// OrganizationResponseV1 defines model for OrganizationResponseV1.
type OrganizationResponseV1 struct {
Id string `json:"id"`
Name string `json:"name"`
}
-// OwnershipVerification defines model for OwnershipVerification.
-type OwnershipVerification struct {
- Name string `json:"name"`
- Type string `json:"type"`
- Value string `json:"value"`
-}
-
// PgsodiumConfigResponse defines model for PgsodiumConfigResponse.
type PgsodiumConfigResponse struct {
RootKey string `json:"root_key"`
@@ -1142,69 +2081,57 @@ type PostgresConfigResponse struct {
// PostgresConfigResponseSessionReplicationRole defines model for PostgresConfigResponse.SessionReplicationRole.
type PostgresConfigResponseSessionReplicationRole string
-// PostgresEngine Postgres engine version. If not provided, the latest version will be used.
-type PostgresEngine string
-
// PostgrestConfigWithJWTSecretResponse defines model for PostgrestConfigWithJWTSecretResponse.
type PostgrestConfigWithJWTSecretResponse struct {
DbExtraSearchPath string `json:"db_extra_search_path"`
// DbPool If `null`, the value is automatically configured based on compute size.
- DbPool *int `json:"db_pool"`
- DbSchema string `json:"db_schema"`
- JwtSecret *string `json:"jwt_secret,omitempty"`
- MaxRows int `json:"max_rows"`
+ DbPool nullable.Nullable[int] `json:"db_pool"`
+ DbSchema string `json:"db_schema"`
+ JwtSecret *string `json:"jwt_secret,omitempty"`
+ MaxRows int `json:"max_rows"`
}
-// ProjectAvailableRestoreVersion defines model for ProjectAvailableRestoreVersion.
-type ProjectAvailableRestoreVersion struct {
- PostgresEngine ProjectAvailableRestoreVersionPostgresEngine `json:"postgres_engine"`
- ReleaseChannel ProjectAvailableRestoreVersionReleaseChannel `json:"release_channel"`
- Version string `json:"version"`
+// ProjectClaimTokenResponse defines model for ProjectClaimTokenResponse.
+type ProjectClaimTokenResponse struct {
+ CreatedAt string `json:"created_at"`
+ CreatedBy openapi_types.UUID `json:"created_by"`
+ ExpiresAt string `json:"expires_at"`
+ TokenAlias string `json:"token_alias"`
}
-// ProjectAvailableRestoreVersionPostgresEngine defines model for ProjectAvailableRestoreVersion.PostgresEngine.
-type ProjectAvailableRestoreVersionPostgresEngine string
-
-// ProjectAvailableRestoreVersionReleaseChannel defines model for ProjectAvailableRestoreVersion.ReleaseChannel.
-type ProjectAvailableRestoreVersionReleaseChannel string
-
// ProjectUpgradeEligibilityResponse defines model for ProjectUpgradeEligibilityResponse.
type ProjectUpgradeEligibilityResponse struct {
- CurrentAppVersion string `json:"current_app_version"`
- CurrentAppVersionReleaseChannel ReleaseChannel `json:"current_app_version_release_channel"`
- DurationEstimateHours int `json:"duration_estimate_hours"`
- Eligible bool `json:"eligible"`
- ExtensionDependentObjects []string `json:"extension_dependent_objects"`
- LatestAppVersion string `json:"latest_app_version"`
- LegacyAuthCustomRoles []string `json:"legacy_auth_custom_roles"`
- PotentialBreakingChanges []string `json:"potential_breaking_changes"`
- TargetUpgradeVersions []ProjectVersion `json:"target_upgrade_versions"`
-}
+ CurrentAppVersion string `json:"current_app_version"`
+ CurrentAppVersionReleaseChannel ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannel `json:"current_app_version_release_channel"`
+ DurationEstimateHours float32 `json:"duration_estimate_hours"`
+ Eligible bool `json:"eligible"`
+ LatestAppVersion string `json:"latest_app_version"`
+ LegacyAuthCustomRoles []string `json:"legacy_auth_custom_roles"`
+ ObjectsToBeDropped []string `json:"objects_to_be_dropped"`
+ TargetUpgradeVersions []struct {
+ AppVersion string `json:"app_version"`
+ PostgresVersion ProjectUpgradeEligibilityResponseTargetUpgradeVersionsPostgresVersion `json:"postgres_version"`
+ ReleaseChannel ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel `json:"release_channel"`
+ } `json:"target_upgrade_versions"`
+ UnsupportedExtensions []string `json:"unsupported_extensions"`
+ UserDefinedObjectsInInternalSchemas []string `json:"user_defined_objects_in_internal_schemas"`
+}
+
+// ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannel defines model for ProjectUpgradeEligibilityResponse.CurrentAppVersionReleaseChannel.
+type ProjectUpgradeEligibilityResponseCurrentAppVersionReleaseChannel string
+
+// ProjectUpgradeEligibilityResponseTargetUpgradeVersionsPostgresVersion defines model for ProjectUpgradeEligibilityResponse.TargetUpgradeVersions.PostgresVersion.
+type ProjectUpgradeEligibilityResponseTargetUpgradeVersionsPostgresVersion string
+
+// ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel defines model for ProjectUpgradeEligibilityResponse.TargetUpgradeVersions.ReleaseChannel.
+type ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel string
// ProjectUpgradeInitiateResponse defines model for ProjectUpgradeInitiateResponse.
type ProjectUpgradeInitiateResponse struct {
TrackingId string `json:"tracking_id"`
}
-// ProjectVersion defines model for ProjectVersion.
-type ProjectVersion struct {
- AppVersion string `json:"app_version"`
-
- // PostgresVersion Postgres engine version. If not provided, the latest version will be used.
- PostgresVersion PostgresEngine `json:"postgres_version"`
- ReleaseChannel ReleaseChannel `json:"release_channel"`
-}
-
-// Provider defines model for Provider.
-type Provider struct {
- CreatedAt *string `json:"created_at,omitempty"`
- Domains *[]Domain `json:"domains,omitempty"`
- Id string `json:"id"`
- Saml *SamlDescriptor `json:"saml,omitempty"`
- UpdatedAt *string `json:"updated_at,omitempty"`
-}
-
// ReadOnlyStatusResponse defines model for ReadOnlyStatusResponse.
type ReadOnlyStatusResponse struct {
Enabled bool `json:"enabled"`
@@ -1212,16 +2139,9 @@ type ReadOnlyStatusResponse struct {
OverrideEnabled bool `json:"override_enabled"`
}
-// RealtimeHealthResponse defines model for RealtimeHealthResponse.
-type RealtimeHealthResponse struct {
- ConnectedCluster int `json:"connected_cluster"`
-}
-
-// ReleaseChannel defines model for ReleaseChannel.
-type ReleaseChannel string
-
// RemoveNetworkBanRequest defines model for RemoveNetworkBanRequest.
type RemoveNetworkBanRequest struct {
+ Identifier *string `json:"identifier,omitempty"`
Ipv4Addresses []string `json:"ipv4_addresses"`
}
@@ -1230,22 +2150,11 @@ type RemoveReadReplicaBody struct {
DatabaseIdentifier string `json:"database_identifier"`
}
-// RestoreProjectBodyDto defines model for RestoreProjectBodyDto.
-type RestoreProjectBodyDto = map[string]interface{}
-
-// SamlDescriptor defines model for SamlDescriptor.
-type SamlDescriptor struct {
- AttributeMapping *AttributeMapping `json:"attribute_mapping,omitempty"`
- EntityId string `json:"entity_id"`
- Id string `json:"id"`
- MetadataUrl *string `json:"metadata_url,omitempty"`
- MetadataXml *string `json:"metadata_xml,omitempty"`
-}
-
// SecretResponse defines model for SecretResponse.
type SecretResponse struct {
- Name string `json:"name"`
- Value string `json:"value"`
+ Name string `json:"name"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
+ Value string `json:"value"`
}
// SetUpReadReplicaBody defines model for SetUpReadReplicaBody.
@@ -1257,58 +2166,98 @@ type SetUpReadReplicaBody struct {
// SetUpReadReplicaBodyReadReplicaRegion Region you want your read replica to reside in
type SetUpReadReplicaBodyReadReplicaRegion string
-// SnippetContent defines model for SnippetContent.
-type SnippetContent struct {
- Favorite bool `json:"favorite"`
- SchemaVersion string `json:"schema_version"`
- Sql string `json:"sql"`
+// SigningKeyResponse defines model for SigningKeyResponse.
+type SigningKeyResponse struct {
+ Algorithm SigningKeyResponseAlgorithm `json:"algorithm"`
+ CreatedAt time.Time `json:"created_at"`
+ Id openapi_types.UUID `json:"id"`
+ PublicJwk nullable.Nullable[interface{}] `json:"public_jwk,omitempty"`
+ Status SigningKeyResponseStatus `json:"status"`
+ UpdatedAt time.Time `json:"updated_at"`
}
-// SnippetList defines model for SnippetList.
-type SnippetList struct {
- Cursor *string `json:"cursor,omitempty"`
- Data []SnippetMeta `json:"data"`
-}
+// SigningKeyResponseAlgorithm defines model for SigningKeyResponse.Algorithm.
+type SigningKeyResponseAlgorithm string
-// SnippetMeta defines model for SnippetMeta.
-type SnippetMeta struct {
- Description *string `json:"description"`
- Id string `json:"id"`
- InsertedAt string `json:"inserted_at"`
- Name string `json:"name"`
- Owner SnippetUser `json:"owner"`
- Project SnippetProject `json:"project"`
- Type SnippetMetaType `json:"type"`
- UpdatedAt string `json:"updated_at"`
- UpdatedBy SnippetUser `json:"updated_by"`
- Visibility SnippetMetaVisibility `json:"visibility"`
+// SigningKeyResponseStatus defines model for SigningKeyResponse.Status.
+type SigningKeyResponseStatus string
+
+// SigningKeysResponse defines model for SigningKeysResponse.
+type SigningKeysResponse struct {
+ Keys []struct {
+ Algorithm SigningKeysResponseKeysAlgorithm `json:"algorithm"`
+ CreatedAt time.Time `json:"created_at"`
+ Id openapi_types.UUID `json:"id"`
+ PublicJwk nullable.Nullable[interface{}] `json:"public_jwk,omitempty"`
+ Status SigningKeysResponseKeysStatus `json:"status"`
+ UpdatedAt time.Time `json:"updated_at"`
+ } `json:"keys"`
}
-// SnippetMetaType defines model for SnippetMeta.Type.
-type SnippetMetaType string
+// SigningKeysResponseKeysAlgorithm defines model for SigningKeysResponse.Keys.Algorithm.
+type SigningKeysResponseKeysAlgorithm string
-// SnippetMetaVisibility defines model for SnippetMeta.Visibility.
-type SnippetMetaVisibility string
+// SigningKeysResponseKeysStatus defines model for SigningKeysResponse.Keys.Status.
+type SigningKeysResponseKeysStatus string
-// SnippetProject defines model for SnippetProject.
-type SnippetProject struct {
- Id int64 `json:"id"`
- Name string `json:"name"`
-}
+// SnippetList defines model for SnippetList.
+type SnippetList struct {
+ Cursor *string `json:"cursor,omitempty"`
+ Data []struct {
+ Description nullable.Nullable[string] `json:"description"`
+ Id string `json:"id"`
+ InsertedAt string `json:"inserted_at"`
+ Name string `json:"name"`
+ Owner struct {
+ Id float32 `json:"id"`
+ Username string `json:"username"`
+ } `json:"owner"`
+ Project struct {
+ Id float32 `json:"id"`
+ Name string `json:"name"`
+ } `json:"project"`
+ Type SnippetListDataType `json:"type"`
+ UpdatedAt string `json:"updated_at"`
+ UpdatedBy struct {
+ Id float32 `json:"id"`
+ Username string `json:"username"`
+ } `json:"updated_by"`
+ Visibility SnippetListDataVisibility `json:"visibility"`
+ } `json:"data"`
+}
+
+// SnippetListDataType defines model for SnippetList.Data.Type.
+type SnippetListDataType string
+
+// SnippetListDataVisibility defines model for SnippetList.Data.Visibility.
+type SnippetListDataVisibility string
// SnippetResponse defines model for SnippetResponse.
type SnippetResponse struct {
- Content SnippetContent `json:"content"`
- Description *string `json:"description"`
+ Content struct {
+ Favorite bool `json:"favorite"`
+ SchemaVersion string `json:"schema_version"`
+ Sql string `json:"sql"`
+ } `json:"content"`
+ Description nullable.Nullable[string] `json:"description"`
Id string `json:"id"`
InsertedAt string `json:"inserted_at"`
Name string `json:"name"`
- Owner SnippetUser `json:"owner"`
- Project SnippetProject `json:"project"`
- Type SnippetResponseType `json:"type"`
- UpdatedAt string `json:"updated_at"`
- UpdatedBy SnippetUser `json:"updated_by"`
- Visibility SnippetResponseVisibility `json:"visibility"`
+ Owner struct {
+ Id float32 `json:"id"`
+ Username string `json:"username"`
+ } `json:"owner"`
+ Project struct {
+ Id float32 `json:"id"`
+ Name string `json:"name"`
+ } `json:"project"`
+ Type SnippetResponseType `json:"type"`
+ UpdatedAt string `json:"updated_at"`
+ UpdatedBy struct {
+ Id float32 `json:"id"`
+ Username string `json:"username"`
+ } `json:"updated_by"`
+ Visibility SnippetResponseVisibility `json:"visibility"`
}
// SnippetResponseType defines model for SnippetResponse.Type.
@@ -1317,56 +2266,49 @@ type SnippetResponseType string
// SnippetResponseVisibility defines model for SnippetResponse.Visibility.
type SnippetResponseVisibility string
-// SnippetUser defines model for SnippetUser.
-type SnippetUser struct {
- Id int64 `json:"id"`
- Username string `json:"username"`
-}
-
// SslEnforcementRequest defines model for SslEnforcementRequest.
type SslEnforcementRequest struct {
- RequestedConfig SslEnforcements `json:"requestedConfig"`
+ RequestedConfig struct {
+ Database bool `json:"database"`
+ } `json:"requestedConfig"`
}
// SslEnforcementResponse defines model for SslEnforcementResponse.
type SslEnforcementResponse struct {
- AppliedSuccessfully bool `json:"appliedSuccessfully"`
- CurrentConfig SslEnforcements `json:"currentConfig"`
-}
-
-// SslEnforcements defines model for SslEnforcements.
-type SslEnforcements struct {
- Database bool `json:"database"`
-}
-
-// SslValidation defines model for SslValidation.
-type SslValidation struct {
- Status string `json:"status"`
- ValidationErrors *[]ValidationError `json:"validation_errors,omitempty"`
- ValidationRecords []ValidationRecord `json:"validation_records"`
+ AppliedSuccessfully bool `json:"appliedSuccessfully"`
+ CurrentConfig struct {
+ Database bool `json:"database"`
+ } `json:"currentConfig"`
}
// StorageConfigResponse defines model for StorageConfigResponse.
type StorageConfigResponse struct {
- Features StorageFeatures `json:"features"`
- FileSizeLimit int64 `json:"fileSizeLimit"`
-}
-
-// StorageFeatureImageTransformation defines model for StorageFeatureImageTransformation.
-type StorageFeatureImageTransformation struct {
- Enabled bool `json:"enabled"`
-}
-
-// StorageFeatureS3Protocol defines model for StorageFeatureS3Protocol.
-type StorageFeatureS3Protocol struct {
- Enabled bool `json:"enabled"`
-}
-
-// StorageFeatures defines model for StorageFeatures.
-type StorageFeatures struct {
- ImageTransformation StorageFeatureImageTransformation `json:"imageTransformation"`
- S3Protocol StorageFeatureS3Protocol `json:"s3Protocol"`
-}
+ Capabilities struct {
+ IcebergCatalog bool `json:"iceberg_catalog"`
+ ListV2 bool `json:"list_v2"`
+ } `json:"capabilities"`
+ External struct {
+ UpstreamTarget StorageConfigResponseExternalUpstreamTarget `json:"upstreamTarget"`
+ } `json:"external"`
+ Features struct {
+ IcebergCatalog *struct {
+ Enabled bool `json:"enabled"`
+ } `json:"icebergCatalog,omitempty"`
+ ImageTransformation struct {
+ Enabled bool `json:"enabled"`
+ } `json:"imageTransformation"`
+ S3Protocol struct {
+ Enabled bool `json:"enabled"`
+ } `json:"s3Protocol"`
+ } `json:"features"`
+ FileSizeLimit int64 `json:"fileSizeLimit"`
+}
+
+// StorageConfigResponseExternalUpstreamTarget defines model for StorageConfigResponse.External.UpstreamTarget.
+type StorageConfigResponseExternalUpstreamTarget string
+
+// StreamableFile defines model for StreamableFile.
+type StreamableFile = map[string]interface{}
// SubdomainAvailabilityResponse defines model for SubdomainAvailabilityResponse.
type SubdomainAvailabilityResponse struct {
@@ -1375,16 +2317,16 @@ type SubdomainAvailabilityResponse struct {
// SupavisorConfigResponse defines model for SupavisorConfigResponse.
type SupavisorConfigResponse struct {
- ConnectionString string `json:"connectionString"`
+ ConnectionString string `json:"connection_string"`
DatabaseType SupavisorConfigResponseDatabaseType `json:"database_type"`
DbHost string `json:"db_host"`
DbName string `json:"db_name"`
DbPort int `json:"db_port"`
DbUser string `json:"db_user"`
- DefaultPoolSize *int `json:"default_pool_size"`
+ DefaultPoolSize nullable.Nullable[int] `json:"default_pool_size"`
Identifier string `json:"identifier"`
IsUsingScramAuth bool `json:"is_using_scram_auth"`
- MaxClientConn *int `json:"max_client_conn"`
+ MaxClientConn nullable.Nullable[int] `json:"max_client_conn"`
PoolMode SupavisorConfigResponsePoolMode `json:"pool_mode"`
}
@@ -1396,15 +2338,15 @@ type SupavisorConfigResponsePoolMode string
// ThirdPartyAuth defines model for ThirdPartyAuth.
type ThirdPartyAuth struct {
- CustomJwks *map[string]interface{} `json:"custom_jwks"`
- Id string `json:"id"`
- InsertedAt string `json:"inserted_at"`
- JwksUrl *string `json:"jwks_url"`
- OidcIssuerUrl *string `json:"oidc_issuer_url"`
- ResolvedAt *string `json:"resolved_at"`
- ResolvedJwks *map[string]interface{} `json:"resolved_jwks"`
- Type string `json:"type"`
- UpdatedAt string `json:"updated_at"`
+ CustomJwks nullable.Nullable[interface{}] `json:"custom_jwks,omitempty"`
+ Id openapi_types.UUID `json:"id"`
+ InsertedAt string `json:"inserted_at"`
+ JwksUrl nullable.Nullable[string] `json:"jwks_url,omitempty"`
+ OidcIssuerUrl nullable.Nullable[string] `json:"oidc_issuer_url,omitempty"`
+ ResolvedAt nullable.Nullable[string] `json:"resolved_at,omitempty"`
+ ResolvedJwks nullable.Nullable[interface{}] `json:"resolved_jwks,omitempty"`
+ Type string `json:"type"`
+ UpdatedAt string `json:"updated_at"`
}
// TypescriptResponse defines model for TypescriptResponse.
@@ -1414,191 +2356,204 @@ type TypescriptResponse struct {
// UpdateApiKeyBody defines model for UpdateApiKeyBody.
type UpdateApiKeyBody struct {
- Description *string `json:"description"`
- SecretJwtTemplate *ApiKeySecretJWTTemplate `json:"secret_jwt_template"`
+ Description nullable.Nullable[string] `json:"description,omitempty"`
+ Name *string `json:"name,omitempty"`
+ SecretJwtTemplate nullable.Nullable[map[string]interface{}] `json:"secret_jwt_template,omitempty"`
}
// UpdateAuthConfigBody defines model for UpdateAuthConfigBody.
type UpdateAuthConfigBody struct {
- ApiMaxRequestDuration *int `json:"api_max_request_duration,omitempty"`
- DbMaxPoolSize *int `json:"db_max_pool_size,omitempty"`
- DisableSignup *bool `json:"disable_signup,omitempty"`
- ExternalAnonymousUsersEnabled *bool `json:"external_anonymous_users_enabled,omitempty"`
- ExternalAppleAdditionalClientIds *string `json:"external_apple_additional_client_ids,omitempty"`
- ExternalAppleClientId *string `json:"external_apple_client_id,omitempty"`
- ExternalAppleEnabled *bool `json:"external_apple_enabled,omitempty"`
- ExternalAppleSecret *string `json:"external_apple_secret,omitempty"`
- ExternalAzureClientId *string `json:"external_azure_client_id,omitempty"`
- ExternalAzureEnabled *bool `json:"external_azure_enabled,omitempty"`
- ExternalAzureSecret *string `json:"external_azure_secret,omitempty"`
- ExternalAzureUrl *string `json:"external_azure_url,omitempty"`
- ExternalBitbucketClientId *string `json:"external_bitbucket_client_id,omitempty"`
- ExternalBitbucketEnabled *bool `json:"external_bitbucket_enabled,omitempty"`
- ExternalBitbucketSecret *string `json:"external_bitbucket_secret,omitempty"`
- ExternalDiscordClientId *string `json:"external_discord_client_id,omitempty"`
- ExternalDiscordEnabled *bool `json:"external_discord_enabled,omitempty"`
- ExternalDiscordSecret *string `json:"external_discord_secret,omitempty"`
- ExternalEmailEnabled *bool `json:"external_email_enabled,omitempty"`
- ExternalFacebookClientId *string `json:"external_facebook_client_id,omitempty"`
- ExternalFacebookEnabled *bool `json:"external_facebook_enabled,omitempty"`
- ExternalFacebookSecret *string `json:"external_facebook_secret,omitempty"`
- ExternalFigmaClientId *string `json:"external_figma_client_id,omitempty"`
- ExternalFigmaEnabled *bool `json:"external_figma_enabled,omitempty"`
- ExternalFigmaSecret *string `json:"external_figma_secret,omitempty"`
- ExternalGithubClientId *string `json:"external_github_client_id,omitempty"`
- ExternalGithubEnabled *bool `json:"external_github_enabled,omitempty"`
- ExternalGithubSecret *string `json:"external_github_secret,omitempty"`
- ExternalGitlabClientId *string `json:"external_gitlab_client_id,omitempty"`
- ExternalGitlabEnabled *bool `json:"external_gitlab_enabled,omitempty"`
- ExternalGitlabSecret *string `json:"external_gitlab_secret,omitempty"`
- ExternalGitlabUrl *string `json:"external_gitlab_url,omitempty"`
- ExternalGoogleAdditionalClientIds *string `json:"external_google_additional_client_ids,omitempty"`
- ExternalGoogleClientId *string `json:"external_google_client_id,omitempty"`
- ExternalGoogleEnabled *bool `json:"external_google_enabled,omitempty"`
- ExternalGoogleSecret *string `json:"external_google_secret,omitempty"`
- ExternalGoogleSkipNonceCheck *bool `json:"external_google_skip_nonce_check,omitempty"`
- ExternalKakaoClientId *string `json:"external_kakao_client_id,omitempty"`
- ExternalKakaoEnabled *bool `json:"external_kakao_enabled,omitempty"`
- ExternalKakaoSecret *string `json:"external_kakao_secret,omitempty"`
- ExternalKeycloakClientId *string `json:"external_keycloak_client_id,omitempty"`
- ExternalKeycloakEnabled *bool `json:"external_keycloak_enabled,omitempty"`
- ExternalKeycloakSecret *string `json:"external_keycloak_secret,omitempty"`
- ExternalKeycloakUrl *string `json:"external_keycloak_url,omitempty"`
- ExternalLinkedinOidcClientId *string `json:"external_linkedin_oidc_client_id,omitempty"`
- ExternalLinkedinOidcEnabled *bool `json:"external_linkedin_oidc_enabled,omitempty"`
- ExternalLinkedinOidcSecret *string `json:"external_linkedin_oidc_secret,omitempty"`
- ExternalNotionClientId *string `json:"external_notion_client_id,omitempty"`
- ExternalNotionEnabled *bool `json:"external_notion_enabled,omitempty"`
- ExternalNotionSecret *string `json:"external_notion_secret,omitempty"`
- ExternalPhoneEnabled *bool `json:"external_phone_enabled,omitempty"`
- ExternalSlackClientId *string `json:"external_slack_client_id,omitempty"`
- ExternalSlackEnabled *bool `json:"external_slack_enabled,omitempty"`
- ExternalSlackOidcClientId *string `json:"external_slack_oidc_client_id,omitempty"`
- ExternalSlackOidcEnabled *bool `json:"external_slack_oidc_enabled,omitempty"`
- ExternalSlackOidcSecret *string `json:"external_slack_oidc_secret,omitempty"`
- ExternalSlackSecret *string `json:"external_slack_secret,omitempty"`
- ExternalSpotifyClientId *string `json:"external_spotify_client_id,omitempty"`
- ExternalSpotifyEnabled *bool `json:"external_spotify_enabled,omitempty"`
- ExternalSpotifySecret *string `json:"external_spotify_secret,omitempty"`
- ExternalTwitchClientId *string `json:"external_twitch_client_id,omitempty"`
- ExternalTwitchEnabled *bool `json:"external_twitch_enabled,omitempty"`
- ExternalTwitchSecret *string `json:"external_twitch_secret,omitempty"`
- ExternalTwitterClientId *string `json:"external_twitter_client_id,omitempty"`
- ExternalTwitterEnabled *bool `json:"external_twitter_enabled,omitempty"`
- ExternalTwitterSecret *string `json:"external_twitter_secret,omitempty"`
- ExternalWorkosClientId *string `json:"external_workos_client_id,omitempty"`
- ExternalWorkosEnabled *bool `json:"external_workos_enabled,omitempty"`
- ExternalWorkosSecret *string `json:"external_workos_secret,omitempty"`
- ExternalWorkosUrl *string `json:"external_workos_url,omitempty"`
- ExternalZoomClientId *string `json:"external_zoom_client_id,omitempty"`
- ExternalZoomEnabled *bool `json:"external_zoom_enabled,omitempty"`
- ExternalZoomSecret *string `json:"external_zoom_secret,omitempty"`
- HookCustomAccessTokenEnabled *bool `json:"hook_custom_access_token_enabled,omitempty"`
- HookCustomAccessTokenSecrets *string `json:"hook_custom_access_token_secrets,omitempty"`
- HookCustomAccessTokenUri *string `json:"hook_custom_access_token_uri,omitempty"`
- HookMfaVerificationAttemptEnabled *bool `json:"hook_mfa_verification_attempt_enabled,omitempty"`
- HookMfaVerificationAttemptSecrets *string `json:"hook_mfa_verification_attempt_secrets,omitempty"`
- HookMfaVerificationAttemptUri *string `json:"hook_mfa_verification_attempt_uri,omitempty"`
- HookPasswordVerificationAttemptEnabled *bool `json:"hook_password_verification_attempt_enabled,omitempty"`
- HookPasswordVerificationAttemptSecrets *string `json:"hook_password_verification_attempt_secrets,omitempty"`
- HookPasswordVerificationAttemptUri *string `json:"hook_password_verification_attempt_uri,omitempty"`
- HookSendEmailEnabled *bool `json:"hook_send_email_enabled,omitempty"`
- HookSendEmailSecrets *string `json:"hook_send_email_secrets,omitempty"`
- HookSendEmailUri *string `json:"hook_send_email_uri,omitempty"`
- HookSendSmsEnabled *bool `json:"hook_send_sms_enabled,omitempty"`
- HookSendSmsSecrets *string `json:"hook_send_sms_secrets,omitempty"`
- HookSendSmsUri *string `json:"hook_send_sms_uri,omitempty"`
- JwtExp *int `json:"jwt_exp,omitempty"`
- MailerAllowUnverifiedEmailSignIns *bool `json:"mailer_allow_unverified_email_sign_ins,omitempty"`
- MailerAutoconfirm *bool `json:"mailer_autoconfirm,omitempty"`
- MailerOtpExp *int `json:"mailer_otp_exp,omitempty"`
- MailerOtpLength *int `json:"mailer_otp_length,omitempty"`
- MailerSecureEmailChangeEnabled *bool `json:"mailer_secure_email_change_enabled,omitempty"`
- MailerSubjectsConfirmation *string `json:"mailer_subjects_confirmation,omitempty"`
- MailerSubjectsEmailChange *string `json:"mailer_subjects_email_change,omitempty"`
- MailerSubjectsInvite *string `json:"mailer_subjects_invite,omitempty"`
- MailerSubjectsMagicLink *string `json:"mailer_subjects_magic_link,omitempty"`
- MailerSubjectsReauthentication *string `json:"mailer_subjects_reauthentication,omitempty"`
- MailerSubjectsRecovery *string `json:"mailer_subjects_recovery,omitempty"`
- MailerTemplatesConfirmationContent *string `json:"mailer_templates_confirmation_content,omitempty"`
- MailerTemplatesEmailChangeContent *string `json:"mailer_templates_email_change_content,omitempty"`
- MailerTemplatesInviteContent *string `json:"mailer_templates_invite_content,omitempty"`
- MailerTemplatesMagicLinkContent *string `json:"mailer_templates_magic_link_content,omitempty"`
- MailerTemplatesReauthenticationContent *string `json:"mailer_templates_reauthentication_content,omitempty"`
- MailerTemplatesRecoveryContent *string `json:"mailer_templates_recovery_content,omitempty"`
- MfaMaxEnrolledFactors *int `json:"mfa_max_enrolled_factors,omitempty"`
- MfaPhoneEnrollEnabled *bool `json:"mfa_phone_enroll_enabled,omitempty"`
- MfaPhoneMaxFrequency *int `json:"mfa_phone_max_frequency,omitempty"`
- MfaPhoneOtpLength *int `json:"mfa_phone_otp_length,omitempty"`
- MfaPhoneTemplate *string `json:"mfa_phone_template,omitempty"`
- MfaPhoneVerifyEnabled *bool `json:"mfa_phone_verify_enabled,omitempty"`
- MfaTotpEnrollEnabled *bool `json:"mfa_totp_enroll_enabled,omitempty"`
- MfaTotpVerifyEnabled *bool `json:"mfa_totp_verify_enabled,omitempty"`
- MfaWebAuthnEnrollEnabled *bool `json:"mfa_web_authn_enroll_enabled,omitempty"`
- MfaWebAuthnVerifyEnabled *bool `json:"mfa_web_authn_verify_enabled,omitempty"`
- PasswordHibpEnabled *bool `json:"password_hibp_enabled,omitempty"`
- PasswordMinLength *int `json:"password_min_length,omitempty"`
- PasswordRequiredCharacters *UpdateAuthConfigBodyPasswordRequiredCharacters `json:"password_required_characters,omitempty"`
- RateLimitAnonymousUsers *int `json:"rate_limit_anonymous_users,omitempty"`
- RateLimitEmailSent *int `json:"rate_limit_email_sent,omitempty"`
- RateLimitOtp *int `json:"rate_limit_otp,omitempty"`
- RateLimitSmsSent *int `json:"rate_limit_sms_sent,omitempty"`
- RateLimitTokenRefresh *int `json:"rate_limit_token_refresh,omitempty"`
- RateLimitVerify *int `json:"rate_limit_verify,omitempty"`
- RefreshTokenRotationEnabled *bool `json:"refresh_token_rotation_enabled,omitempty"`
- SamlEnabled *bool `json:"saml_enabled,omitempty"`
- SamlExternalUrl *string `json:"saml_external_url,omitempty"`
- SecurityCaptchaEnabled *bool `json:"security_captcha_enabled,omitempty"`
- SecurityCaptchaProvider *string `json:"security_captcha_provider,omitempty"`
- SecurityCaptchaSecret *string `json:"security_captcha_secret,omitempty"`
- SecurityManualLinkingEnabled *bool `json:"security_manual_linking_enabled,omitempty"`
- SecurityRefreshTokenReuseInterval *int `json:"security_refresh_token_reuse_interval,omitempty"`
- SecurityUpdatePasswordRequireReauthentication *bool `json:"security_update_password_require_reauthentication,omitempty"`
- SessionsInactivityTimeout *int `json:"sessions_inactivity_timeout,omitempty"`
- SessionsSinglePerUser *bool `json:"sessions_single_per_user,omitempty"`
- SessionsTags *string `json:"sessions_tags,omitempty"`
- SessionsTimebox *int `json:"sessions_timebox,omitempty"`
- SiteUrl *string `json:"site_url,omitempty"`
- SmsAutoconfirm *bool `json:"sms_autoconfirm,omitempty"`
- SmsMaxFrequency *int `json:"sms_max_frequency,omitempty"`
- SmsMessagebirdAccessKey *string `json:"sms_messagebird_access_key,omitempty"`
- SmsMessagebirdOriginator *string `json:"sms_messagebird_originator,omitempty"`
- SmsOtpExp *int `json:"sms_otp_exp,omitempty"`
- SmsOtpLength *int `json:"sms_otp_length,omitempty"`
- SmsProvider *string `json:"sms_provider,omitempty"`
- SmsTemplate *string `json:"sms_template,omitempty"`
- SmsTestOtp *string `json:"sms_test_otp,omitempty"`
- SmsTestOtpValidUntil *string `json:"sms_test_otp_valid_until,omitempty"`
- SmsTextlocalApiKey *string `json:"sms_textlocal_api_key,omitempty"`
- SmsTextlocalSender *string `json:"sms_textlocal_sender,omitempty"`
- SmsTwilioAccountSid *string `json:"sms_twilio_account_sid,omitempty"`
- SmsTwilioAuthToken *string `json:"sms_twilio_auth_token,omitempty"`
- SmsTwilioContentSid *string `json:"sms_twilio_content_sid,omitempty"`
- SmsTwilioMessageServiceSid *string `json:"sms_twilio_message_service_sid,omitempty"`
- SmsTwilioVerifyAccountSid *string `json:"sms_twilio_verify_account_sid,omitempty"`
- SmsTwilioVerifyAuthToken *string `json:"sms_twilio_verify_auth_token,omitempty"`
- SmsTwilioVerifyMessageServiceSid *string `json:"sms_twilio_verify_message_service_sid,omitempty"`
- SmsVonageApiKey *string `json:"sms_vonage_api_key,omitempty"`
- SmsVonageApiSecret *string `json:"sms_vonage_api_secret,omitempty"`
- SmsVonageFrom *string `json:"sms_vonage_from,omitempty"`
- SmtpAdminEmail *string `json:"smtp_admin_email,omitempty"`
- SmtpHost *string `json:"smtp_host,omitempty"`
- SmtpMaxFrequency *int `json:"smtp_max_frequency,omitempty"`
- SmtpPass *string `json:"smtp_pass,omitempty"`
- SmtpPort *string `json:"smtp_port,omitempty"`
- SmtpSenderName *string `json:"smtp_sender_name,omitempty"`
- SmtpUser *string `json:"smtp_user,omitempty"`
- UriAllowList *string `json:"uri_allow_list,omitempty"`
+ ApiMaxRequestDuration nullable.Nullable[int] `json:"api_max_request_duration,omitempty"`
+ DbMaxPoolSize nullable.Nullable[int] `json:"db_max_pool_size,omitempty"`
+ DisableSignup nullable.Nullable[bool] `json:"disable_signup,omitempty"`
+ ExternalAnonymousUsersEnabled nullable.Nullable[bool] `json:"external_anonymous_users_enabled,omitempty"`
+ ExternalAppleAdditionalClientIds nullable.Nullable[string] `json:"external_apple_additional_client_ids,omitempty"`
+ ExternalAppleClientId nullable.Nullable[string] `json:"external_apple_client_id,omitempty"`
+ ExternalAppleEnabled nullable.Nullable[bool] `json:"external_apple_enabled,omitempty"`
+ ExternalAppleSecret nullable.Nullable[string] `json:"external_apple_secret,omitempty"`
+ ExternalAzureClientId nullable.Nullable[string] `json:"external_azure_client_id,omitempty"`
+ ExternalAzureEnabled nullable.Nullable[bool] `json:"external_azure_enabled,omitempty"`
+ ExternalAzureSecret nullable.Nullable[string] `json:"external_azure_secret,omitempty"`
+ ExternalAzureUrl nullable.Nullable[string] `json:"external_azure_url,omitempty"`
+ ExternalBitbucketClientId nullable.Nullable[string] `json:"external_bitbucket_client_id,omitempty"`
+ ExternalBitbucketEnabled nullable.Nullable[bool] `json:"external_bitbucket_enabled,omitempty"`
+ ExternalBitbucketSecret nullable.Nullable[string] `json:"external_bitbucket_secret,omitempty"`
+ ExternalDiscordClientId nullable.Nullable[string] `json:"external_discord_client_id,omitempty"`
+ ExternalDiscordEnabled nullable.Nullable[bool] `json:"external_discord_enabled,omitempty"`
+ ExternalDiscordSecret nullable.Nullable[string] `json:"external_discord_secret,omitempty"`
+ ExternalEmailEnabled nullable.Nullable[bool] `json:"external_email_enabled,omitempty"`
+ ExternalFacebookClientId nullable.Nullable[string] `json:"external_facebook_client_id,omitempty"`
+ ExternalFacebookEnabled nullable.Nullable[bool] `json:"external_facebook_enabled,omitempty"`
+ ExternalFacebookSecret nullable.Nullable[string] `json:"external_facebook_secret,omitempty"`
+ ExternalFigmaClientId nullable.Nullable[string] `json:"external_figma_client_id,omitempty"`
+ ExternalFigmaEnabled nullable.Nullable[bool] `json:"external_figma_enabled,omitempty"`
+ ExternalFigmaSecret nullable.Nullable[string] `json:"external_figma_secret,omitempty"`
+ ExternalGithubClientId nullable.Nullable[string] `json:"external_github_client_id,omitempty"`
+ ExternalGithubEnabled nullable.Nullable[bool] `json:"external_github_enabled,omitempty"`
+ ExternalGithubSecret nullable.Nullable[string] `json:"external_github_secret,omitempty"`
+ ExternalGitlabClientId nullable.Nullable[string] `json:"external_gitlab_client_id,omitempty"`
+ ExternalGitlabEnabled nullable.Nullable[bool] `json:"external_gitlab_enabled,omitempty"`
+ ExternalGitlabSecret nullable.Nullable[string] `json:"external_gitlab_secret,omitempty"`
+ ExternalGitlabUrl nullable.Nullable[string] `json:"external_gitlab_url,omitempty"`
+ ExternalGoogleAdditionalClientIds nullable.Nullable[string] `json:"external_google_additional_client_ids,omitempty"`
+ ExternalGoogleClientId nullable.Nullable[string] `json:"external_google_client_id,omitempty"`
+ ExternalGoogleEnabled nullable.Nullable[bool] `json:"external_google_enabled,omitempty"`
+ ExternalGoogleSecret nullable.Nullable[string] `json:"external_google_secret,omitempty"`
+ ExternalGoogleSkipNonceCheck nullable.Nullable[bool] `json:"external_google_skip_nonce_check,omitempty"`
+ ExternalKakaoClientId nullable.Nullable[string] `json:"external_kakao_client_id,omitempty"`
+ ExternalKakaoEnabled nullable.Nullable[bool] `json:"external_kakao_enabled,omitempty"`
+ ExternalKakaoSecret nullable.Nullable[string] `json:"external_kakao_secret,omitempty"`
+ ExternalKeycloakClientId nullable.Nullable[string] `json:"external_keycloak_client_id,omitempty"`
+ ExternalKeycloakEnabled nullable.Nullable[bool] `json:"external_keycloak_enabled,omitempty"`
+ ExternalKeycloakSecret nullable.Nullable[string] `json:"external_keycloak_secret,omitempty"`
+ ExternalKeycloakUrl nullable.Nullable[string] `json:"external_keycloak_url,omitempty"`
+ ExternalLinkedinOidcClientId nullable.Nullable[string] `json:"external_linkedin_oidc_client_id,omitempty"`
+ ExternalLinkedinOidcEnabled nullable.Nullable[bool] `json:"external_linkedin_oidc_enabled,omitempty"`
+ ExternalLinkedinOidcSecret nullable.Nullable[string] `json:"external_linkedin_oidc_secret,omitempty"`
+ ExternalNotionClientId nullable.Nullable[string] `json:"external_notion_client_id,omitempty"`
+ ExternalNotionEnabled nullable.Nullable[bool] `json:"external_notion_enabled,omitempty"`
+ ExternalNotionSecret nullable.Nullable[string] `json:"external_notion_secret,omitempty"`
+ ExternalPhoneEnabled nullable.Nullable[bool] `json:"external_phone_enabled,omitempty"`
+ ExternalSlackClientId nullable.Nullable[string] `json:"external_slack_client_id,omitempty"`
+ ExternalSlackEnabled nullable.Nullable[bool] `json:"external_slack_enabled,omitempty"`
+ ExternalSlackOidcClientId nullable.Nullable[string] `json:"external_slack_oidc_client_id,omitempty"`
+ ExternalSlackOidcEnabled nullable.Nullable[bool] `json:"external_slack_oidc_enabled,omitempty"`
+ ExternalSlackOidcSecret nullable.Nullable[string] `json:"external_slack_oidc_secret,omitempty"`
+ ExternalSlackSecret nullable.Nullable[string] `json:"external_slack_secret,omitempty"`
+ ExternalSpotifyClientId nullable.Nullable[string] `json:"external_spotify_client_id,omitempty"`
+ ExternalSpotifyEnabled nullable.Nullable[bool] `json:"external_spotify_enabled,omitempty"`
+ ExternalSpotifySecret nullable.Nullable[string] `json:"external_spotify_secret,omitempty"`
+ ExternalTwitchClientId nullable.Nullable[string] `json:"external_twitch_client_id,omitempty"`
+ ExternalTwitchEnabled nullable.Nullable[bool] `json:"external_twitch_enabled,omitempty"`
+ ExternalTwitchSecret nullable.Nullable[string] `json:"external_twitch_secret,omitempty"`
+ ExternalTwitterClientId nullable.Nullable[string] `json:"external_twitter_client_id,omitempty"`
+ ExternalTwitterEnabled nullable.Nullable[bool] `json:"external_twitter_enabled,omitempty"`
+ ExternalTwitterSecret nullable.Nullable[string] `json:"external_twitter_secret,omitempty"`
+ ExternalWeb3SolanaEnabled nullable.Nullable[bool] `json:"external_web3_solana_enabled,omitempty"`
+ ExternalWorkosClientId nullable.Nullable[string] `json:"external_workos_client_id,omitempty"`
+ ExternalWorkosEnabled nullable.Nullable[bool] `json:"external_workos_enabled,omitempty"`
+ ExternalWorkosSecret nullable.Nullable[string] `json:"external_workos_secret,omitempty"`
+ ExternalWorkosUrl nullable.Nullable[string] `json:"external_workos_url,omitempty"`
+ ExternalZoomClientId nullable.Nullable[string] `json:"external_zoom_client_id,omitempty"`
+ ExternalZoomEnabled nullable.Nullable[bool] `json:"external_zoom_enabled,omitempty"`
+ ExternalZoomSecret nullable.Nullable[string] `json:"external_zoom_secret,omitempty"`
+ HookBeforeUserCreatedEnabled nullable.Nullable[bool] `json:"hook_before_user_created_enabled,omitempty"`
+ HookBeforeUserCreatedSecrets nullable.Nullable[string] `json:"hook_before_user_created_secrets,omitempty"`
+ HookBeforeUserCreatedUri nullable.Nullable[string] `json:"hook_before_user_created_uri,omitempty"`
+ HookCustomAccessTokenEnabled nullable.Nullable[bool] `json:"hook_custom_access_token_enabled,omitempty"`
+ HookCustomAccessTokenSecrets nullable.Nullable[string] `json:"hook_custom_access_token_secrets,omitempty"`
+ HookCustomAccessTokenUri nullable.Nullable[string] `json:"hook_custom_access_token_uri,omitempty"`
+ HookMfaVerificationAttemptEnabled nullable.Nullable[bool] `json:"hook_mfa_verification_attempt_enabled,omitempty"`
+ HookMfaVerificationAttemptSecrets nullable.Nullable[string] `json:"hook_mfa_verification_attempt_secrets,omitempty"`
+ HookMfaVerificationAttemptUri nullable.Nullable[string] `json:"hook_mfa_verification_attempt_uri,omitempty"`
+ HookPasswordVerificationAttemptEnabled nullable.Nullable[bool] `json:"hook_password_verification_attempt_enabled,omitempty"`
+ HookPasswordVerificationAttemptSecrets nullable.Nullable[string] `json:"hook_password_verification_attempt_secrets,omitempty"`
+ HookPasswordVerificationAttemptUri nullable.Nullable[string] `json:"hook_password_verification_attempt_uri,omitempty"`
+ HookSendEmailEnabled nullable.Nullable[bool] `json:"hook_send_email_enabled,omitempty"`
+ HookSendEmailSecrets nullable.Nullable[string] `json:"hook_send_email_secrets,omitempty"`
+ HookSendEmailUri nullable.Nullable[string] `json:"hook_send_email_uri,omitempty"`
+ HookSendSmsEnabled nullable.Nullable[bool] `json:"hook_send_sms_enabled,omitempty"`
+ HookSendSmsSecrets nullable.Nullable[string] `json:"hook_send_sms_secrets,omitempty"`
+ HookSendSmsUri nullable.Nullable[string] `json:"hook_send_sms_uri,omitempty"`
+ JwtExp nullable.Nullable[int] `json:"jwt_exp,omitempty"`
+ MailerAllowUnverifiedEmailSignIns nullable.Nullable[bool] `json:"mailer_allow_unverified_email_sign_ins,omitempty"`
+ MailerAutoconfirm nullable.Nullable[bool] `json:"mailer_autoconfirm,omitempty"`
+ MailerOtpExp *int `json:"mailer_otp_exp,omitempty"`
+ MailerOtpLength nullable.Nullable[int] `json:"mailer_otp_length,omitempty"`
+ MailerSecureEmailChangeEnabled nullable.Nullable[bool] `json:"mailer_secure_email_change_enabled,omitempty"`
+ MailerSubjectsConfirmation nullable.Nullable[string] `json:"mailer_subjects_confirmation,omitempty"`
+ MailerSubjectsEmailChange nullable.Nullable[string] `json:"mailer_subjects_email_change,omitempty"`
+ MailerSubjectsInvite nullable.Nullable[string] `json:"mailer_subjects_invite,omitempty"`
+ MailerSubjectsMagicLink nullable.Nullable[string] `json:"mailer_subjects_magic_link,omitempty"`
+ MailerSubjectsReauthentication nullable.Nullable[string] `json:"mailer_subjects_reauthentication,omitempty"`
+ MailerSubjectsRecovery nullable.Nullable[string] `json:"mailer_subjects_recovery,omitempty"`
+ MailerTemplatesConfirmationContent nullable.Nullable[string] `json:"mailer_templates_confirmation_content,omitempty"`
+ MailerTemplatesEmailChangeContent nullable.Nullable[string] `json:"mailer_templates_email_change_content,omitempty"`
+ MailerTemplatesInviteContent nullable.Nullable[string] `json:"mailer_templates_invite_content,omitempty"`
+ MailerTemplatesMagicLinkContent nullable.Nullable[string] `json:"mailer_templates_magic_link_content,omitempty"`
+ MailerTemplatesReauthenticationContent nullable.Nullable[string] `json:"mailer_templates_reauthentication_content,omitempty"`
+ MailerTemplatesRecoveryContent nullable.Nullable[string] `json:"mailer_templates_recovery_content,omitempty"`
+ MfaMaxEnrolledFactors nullable.Nullable[int] `json:"mfa_max_enrolled_factors,omitempty"`
+ MfaPhoneEnrollEnabled nullable.Nullable[bool] `json:"mfa_phone_enroll_enabled,omitempty"`
+ MfaPhoneMaxFrequency nullable.Nullable[int] `json:"mfa_phone_max_frequency,omitempty"`
+ MfaPhoneOtpLength nullable.Nullable[int] `json:"mfa_phone_otp_length,omitempty"`
+ MfaPhoneTemplate nullable.Nullable[string] `json:"mfa_phone_template,omitempty"`
+ MfaPhoneVerifyEnabled nullable.Nullable[bool] `json:"mfa_phone_verify_enabled,omitempty"`
+ MfaTotpEnrollEnabled nullable.Nullable[bool] `json:"mfa_totp_enroll_enabled,omitempty"`
+ MfaTotpVerifyEnabled nullable.Nullable[bool] `json:"mfa_totp_verify_enabled,omitempty"`
+ MfaWebAuthnEnrollEnabled nullable.Nullable[bool] `json:"mfa_web_authn_enroll_enabled,omitempty"`
+ MfaWebAuthnVerifyEnabled nullable.Nullable[bool] `json:"mfa_web_authn_verify_enabled,omitempty"`
+ PasswordHibpEnabled nullable.Nullable[bool] `json:"password_hibp_enabled,omitempty"`
+ PasswordMinLength nullable.Nullable[int] `json:"password_min_length,omitempty"`
+ PasswordRequiredCharacters nullable.Nullable[UpdateAuthConfigBodyPasswordRequiredCharacters] `json:"password_required_characters,omitempty"`
+ RateLimitAnonymousUsers nullable.Nullable[int] `json:"rate_limit_anonymous_users,omitempty"`
+ RateLimitEmailSent nullable.Nullable[int] `json:"rate_limit_email_sent,omitempty"`
+ RateLimitOtp nullable.Nullable[int] `json:"rate_limit_otp,omitempty"`
+ RateLimitSmsSent nullable.Nullable[int] `json:"rate_limit_sms_sent,omitempty"`
+ RateLimitTokenRefresh nullable.Nullable[int] `json:"rate_limit_token_refresh,omitempty"`
+ RateLimitVerify nullable.Nullable[int] `json:"rate_limit_verify,omitempty"`
+ RateLimitWeb3 nullable.Nullable[int] `json:"rate_limit_web3,omitempty"`
+ RefreshTokenRotationEnabled nullable.Nullable[bool] `json:"refresh_token_rotation_enabled,omitempty"`
+ SamlEnabled nullable.Nullable[bool] `json:"saml_enabled,omitempty"`
+ SamlExternalUrl nullable.Nullable[string] `json:"saml_external_url,omitempty"`
+ SecurityCaptchaEnabled nullable.Nullable[bool] `json:"security_captcha_enabled,omitempty"`
+ SecurityCaptchaProvider nullable.Nullable[UpdateAuthConfigBodySecurityCaptchaProvider] `json:"security_captcha_provider,omitempty"`
+ SecurityCaptchaSecret nullable.Nullable[string] `json:"security_captcha_secret,omitempty"`
+ SecurityManualLinkingEnabled nullable.Nullable[bool] `json:"security_manual_linking_enabled,omitempty"`
+ SecurityRefreshTokenReuseInterval nullable.Nullable[int] `json:"security_refresh_token_reuse_interval,omitempty"`
+ SecurityUpdatePasswordRequireReauthentication nullable.Nullable[bool] `json:"security_update_password_require_reauthentication,omitempty"`
+ SessionsInactivityTimeout nullable.Nullable[int] `json:"sessions_inactivity_timeout,omitempty"`
+ SessionsSinglePerUser nullable.Nullable[bool] `json:"sessions_single_per_user,omitempty"`
+ SessionsTags nullable.Nullable[string] `json:"sessions_tags,omitempty"`
+ SessionsTimebox nullable.Nullable[int] `json:"sessions_timebox,omitempty"`
+ SiteUrl nullable.Nullable[string] `json:"site_url,omitempty"`
+ SmsAutoconfirm nullable.Nullable[bool] `json:"sms_autoconfirm,omitempty"`
+ SmsMaxFrequency nullable.Nullable[int] `json:"sms_max_frequency,omitempty"`
+ SmsMessagebirdAccessKey nullable.Nullable[string] `json:"sms_messagebird_access_key,omitempty"`
+ SmsMessagebirdOriginator nullable.Nullable[string] `json:"sms_messagebird_originator,omitempty"`
+ SmsOtpExp nullable.Nullable[int] `json:"sms_otp_exp,omitempty"`
+ SmsOtpLength *int `json:"sms_otp_length,omitempty"`
+ SmsProvider nullable.Nullable[UpdateAuthConfigBodySmsProvider] `json:"sms_provider,omitempty"`
+ SmsTemplate nullable.Nullable[string] `json:"sms_template,omitempty"`
+ SmsTestOtp nullable.Nullable[string] `json:"sms_test_otp,omitempty"`
+ SmsTestOtpValidUntil nullable.Nullable[time.Time] `json:"sms_test_otp_valid_until,omitempty"`
+ SmsTextlocalApiKey nullable.Nullable[string] `json:"sms_textlocal_api_key,omitempty"`
+ SmsTextlocalSender nullable.Nullable[string] `json:"sms_textlocal_sender,omitempty"`
+ SmsTwilioAccountSid nullable.Nullable[string] `json:"sms_twilio_account_sid,omitempty"`
+ SmsTwilioAuthToken nullable.Nullable[string] `json:"sms_twilio_auth_token,omitempty"`
+ SmsTwilioContentSid nullable.Nullable[string] `json:"sms_twilio_content_sid,omitempty"`
+ SmsTwilioMessageServiceSid nullable.Nullable[string] `json:"sms_twilio_message_service_sid,omitempty"`
+ SmsTwilioVerifyAccountSid nullable.Nullable[string] `json:"sms_twilio_verify_account_sid,omitempty"`
+ SmsTwilioVerifyAuthToken nullable.Nullable[string] `json:"sms_twilio_verify_auth_token,omitempty"`
+ SmsTwilioVerifyMessageServiceSid nullable.Nullable[string] `json:"sms_twilio_verify_message_service_sid,omitempty"`
+ SmsVonageApiKey nullable.Nullable[string] `json:"sms_vonage_api_key,omitempty"`
+ SmsVonageApiSecret nullable.Nullable[string] `json:"sms_vonage_api_secret,omitempty"`
+ SmsVonageFrom nullable.Nullable[string] `json:"sms_vonage_from,omitempty"`
+ SmtpAdminEmail nullable.Nullable[openapi_types.Email] `json:"smtp_admin_email,omitempty"`
+ SmtpHost nullable.Nullable[string] `json:"smtp_host,omitempty"`
+ SmtpMaxFrequency nullable.Nullable[int] `json:"smtp_max_frequency,omitempty"`
+ SmtpPass nullable.Nullable[string] `json:"smtp_pass,omitempty"`
+ SmtpPort nullable.Nullable[string] `json:"smtp_port,omitempty"`
+ SmtpSenderName nullable.Nullable[string] `json:"smtp_sender_name,omitempty"`
+ SmtpUser nullable.Nullable[string] `json:"smtp_user,omitempty"`
+ UriAllowList nullable.Nullable[string] `json:"uri_allow_list,omitempty"`
}
// UpdateAuthConfigBodyPasswordRequiredCharacters defines model for UpdateAuthConfigBody.PasswordRequiredCharacters.
type UpdateAuthConfigBodyPasswordRequiredCharacters string
+// UpdateAuthConfigBodySecurityCaptchaProvider defines model for UpdateAuthConfigBody.SecurityCaptchaProvider.
+type UpdateAuthConfigBodySecurityCaptchaProvider string
+
+// UpdateAuthConfigBodySmsProvider defines model for UpdateAuthConfigBody.SmsProvider.
+type UpdateAuthConfigBodySmsProvider string
+
// UpdateBranchBody defines model for UpdateBranchBody.
type UpdateBranchBody struct {
- BranchName *string `json:"branch_name,omitempty"`
- GitBranch *string `json:"git_branch,omitempty"`
- Persistent *bool `json:"persistent,omitempty"`
+ BranchName *string `json:"branch_name,omitempty"`
+ GitBranch *string `json:"git_branch,omitempty"`
+ Persistent *bool `json:"persistent,omitempty"`
+ RequestReview *bool `json:"request_review,omitempty"`
// ResetOnPush This field is deprecated and will be ignored. Use v1-reset-a-branch endpoint directly instead.
// Deprecated:
@@ -1616,14 +2571,49 @@ type UpdateCustomHostnameBody struct {
// UpdateCustomHostnameResponse defines model for UpdateCustomHostnameResponse.
type UpdateCustomHostnameResponse struct {
- CustomHostname string `json:"custom_hostname"`
- Data CfResponse `json:"data"`
- Status UpdateCustomHostnameResponseStatus `json:"status"`
+ CustomHostname string `json:"custom_hostname"`
+ Data struct {
+ Errors []interface{} `json:"errors"`
+ Messages []interface{} `json:"messages"`
+ Result struct {
+ CustomOriginServer string `json:"custom_origin_server"`
+ Hostname string `json:"hostname"`
+ Id string `json:"id"`
+ OwnershipVerification struct {
+ Name string `json:"name"`
+ Type string `json:"type"`
+ Value string `json:"value"`
+ } `json:"ownership_verification"`
+ Ssl struct {
+ Status string `json:"status"`
+ ValidationErrors *[]struct {
+ Message string `json:"message"`
+ } `json:"validation_errors,omitempty"`
+ ValidationRecords []struct {
+ TxtName string `json:"txt_name"`
+ TxtValue string `json:"txt_value"`
+ } `json:"validation_records"`
+ } `json:"ssl"`
+ Status string `json:"status"`
+ VerificationErrors *[]string `json:"verification_errors,omitempty"`
+ } `json:"result"`
+ Success bool `json:"success"`
+ } `json:"data"`
+ Status UpdateCustomHostnameResponseStatus `json:"status"`
}
// UpdateCustomHostnameResponseStatus defines model for UpdateCustomHostnameResponse.Status.
type UpdateCustomHostnameResponseStatus string
+// UpdateJitAccessBody defines model for UpdateJitAccessBody.
+type UpdateJitAccessBody struct {
+ Roles []struct {
+ ExpiresAt *string `json:"expires_at,omitempty"`
+ Role string `json:"role"`
+ } `json:"roles"`
+ UserId openapi_types.UUID `json:"user_id"`
+}
+
// UpdatePgsodiumConfigBody defines model for UpdatePgsodiumConfigBody.
type UpdatePgsodiumConfigBody struct {
RootKey string `json:"root_key"`
@@ -1660,125 +2650,142 @@ type UpdatePostgresConfigBody struct {
// UpdatePostgresConfigBodySessionReplicationRole defines model for UpdatePostgresConfigBody.SessionReplicationRole.
type UpdatePostgresConfigBodySessionReplicationRole string
-// UpdatePostgrestConfigBody defines model for UpdatePostgrestConfigBody.
-type UpdatePostgrestConfigBody struct {
- DbExtraSearchPath *string `json:"db_extra_search_path,omitempty"`
- DbPool *int `json:"db_pool,omitempty"`
- DbSchema *string `json:"db_schema,omitempty"`
- MaxRows *int `json:"max_rows,omitempty"`
-}
-
// UpdateProviderBody defines model for UpdateProviderBody.
type UpdateProviderBody struct {
- AttributeMapping *AttributeMapping `json:"attribute_mapping,omitempty"`
- Domains *[]string `json:"domains,omitempty"`
- MetadataUrl *string `json:"metadata_url,omitempty"`
- MetadataXml *string `json:"metadata_xml,omitempty"`
+ AttributeMapping *struct {
+ Keys map[string]struct {
+ Array *bool `json:"array,omitempty"`
+ Default *interface{} `json:"default,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Names *[]string `json:"names,omitempty"`
+ } `json:"keys"`
+ } `json:"attribute_mapping,omitempty"`
+ Domains *[]string `json:"domains,omitempty"`
+ MetadataUrl *string `json:"metadata_url,omitempty"`
+ MetadataXml *string `json:"metadata_xml,omitempty"`
}
// UpdateProviderResponse defines model for UpdateProviderResponse.
type UpdateProviderResponse struct {
- CreatedAt *string `json:"created_at,omitempty"`
- Domains *[]Domain `json:"domains,omitempty"`
- Id string `json:"id"`
- Saml *SamlDescriptor `json:"saml,omitempty"`
- UpdatedAt *string `json:"updated_at,omitempty"`
+ CreatedAt *string `json:"created_at,omitempty"`
+ Domains *[]struct {
+ CreatedAt *string `json:"created_at,omitempty"`
+ Domain *string `json:"domain,omitempty"`
+ Id string `json:"id"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
+ } `json:"domains,omitempty"`
+ Id string `json:"id"`
+ Saml *struct {
+ AttributeMapping *struct {
+ Keys map[string]struct {
+ Array *bool `json:"array,omitempty"`
+ Default *interface{} `json:"default,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Names *[]string `json:"names,omitempty"`
+ } `json:"keys"`
+ } `json:"attribute_mapping,omitempty"`
+ EntityId string `json:"entity_id"`
+ Id string `json:"id"`
+ MetadataUrl *string `json:"metadata_url,omitempty"`
+ MetadataXml *string `json:"metadata_xml,omitempty"`
+ } `json:"saml,omitempty"`
+ UpdatedAt *string `json:"updated_at,omitempty"`
+}
+
+// UpdateSigningKeyBody defines model for UpdateSigningKeyBody.
+type UpdateSigningKeyBody struct {
+ Status UpdateSigningKeyBodyStatus `json:"status"`
}
+// UpdateSigningKeyBodyStatus defines model for UpdateSigningKeyBody.Status.
+type UpdateSigningKeyBodyStatus string
+
// UpdateStorageConfigBody defines model for UpdateStorageConfigBody.
type UpdateStorageConfigBody struct {
- Features *StorageFeatures `json:"features,omitempty"`
- FileSizeLimit *int64 `json:"fileSizeLimit,omitempty"`
-}
+ External *struct {
+ UpstreamTarget UpdateStorageConfigBodyExternalUpstreamTarget `json:"upstreamTarget"`
+ } `json:"external,omitempty"`
+ Features *struct {
+ IcebergCatalog *struct {
+ Enabled bool `json:"enabled"`
+ } `json:"icebergCatalog,omitempty"`
+ ImageTransformation struct {
+ Enabled bool `json:"enabled"`
+ } `json:"imageTransformation"`
+ S3Protocol struct {
+ Enabled bool `json:"enabled"`
+ } `json:"s3Protocol"`
+ } `json:"features,omitempty"`
+ FileSizeLimit *int64 `json:"fileSizeLimit,omitempty"`
+}
+
+// UpdateStorageConfigBodyExternalUpstreamTarget defines model for UpdateStorageConfigBody.External.UpstreamTarget.
+type UpdateStorageConfigBodyExternalUpstreamTarget string
// UpdateSupavisorConfigBody defines model for UpdateSupavisorConfigBody.
type UpdateSupavisorConfigBody struct {
- DefaultPoolSize *int `json:"default_pool_size"`
+ DefaultPoolSize nullable.Nullable[int] `json:"default_pool_size,omitempty"`
- // PoolMode This field is deprecated and is ignored in this request
- // Deprecated:
+ // PoolMode Dedicated pooler mode for the project
PoolMode *UpdateSupavisorConfigBodyPoolMode `json:"pool_mode,omitempty"`
}
-// UpdateSupavisorConfigBodyPoolMode This field is deprecated and is ignored in this request
+// UpdateSupavisorConfigBodyPoolMode Dedicated pooler mode for the project
type UpdateSupavisorConfigBodyPoolMode string
// UpdateSupavisorConfigResponse defines model for UpdateSupavisorConfigResponse.
type UpdateSupavisorConfigResponse struct {
- DefaultPoolSize *int `json:"default_pool_size"`
- PoolMode UpdateSupavisorConfigResponsePoolMode `json:"pool_mode"`
+ DefaultPoolSize nullable.Nullable[int] `json:"default_pool_size"`
+ PoolMode string `json:"pool_mode"`
}
-// UpdateSupavisorConfigResponsePoolMode defines model for UpdateSupavisorConfigResponse.PoolMode.
-type UpdateSupavisorConfigResponsePoolMode string
-
// UpgradeDatabaseBody defines model for UpgradeDatabaseBody.
type UpgradeDatabaseBody struct {
- ReleaseChannel ReleaseChannel `json:"release_channel"`
- TargetVersion string `json:"target_version"`
-}
-
-// V1AnalyticsResponse defines model for V1AnalyticsResponse.
-type V1AnalyticsResponse struct {
- Error *V1AnalyticsResponse_Error `json:"error,omitempty"`
- Result *[]map[string]interface{} `json:"result,omitempty"`
-}
-
-// V1AnalyticsResponseError0 defines model for .
-type V1AnalyticsResponseError0 struct {
- Code *float32 `json:"code,omitempty"`
- Errors *[]struct {
- Domain *string `json:"domain,omitempty"`
- Location *string `json:"location,omitempty"`
- LocationType *string `json:"locationType,omitempty"`
- Message *string `json:"message,omitempty"`
- Reason *string `json:"reason,omitempty"`
- } `json:"errors,omitempty"`
- Message *string `json:"message,omitempty"`
- Status *string `json:"status,omitempty"`
+ ReleaseChannel *UpgradeDatabaseBodyReleaseChannel `json:"release_channel,omitempty"`
+ TargetVersion string `json:"target_version"`
}
-// V1AnalyticsResponseError1 defines model for .
-type V1AnalyticsResponseError1 = string
-
-// V1AnalyticsResponse_Error defines model for V1AnalyticsResponse.Error.
-type V1AnalyticsResponse_Error struct {
- union json.RawMessage
-}
-
-// V1Backup defines model for V1Backup.
-type V1Backup struct {
- InsertedAt string `json:"inserted_at"`
- IsPhysicalBackup bool `json:"is_physical_backup"`
- Status V1BackupStatus `json:"status"`
-}
-
-// V1BackupStatus defines model for V1Backup.Status.
-type V1BackupStatus string
+// UpgradeDatabaseBodyReleaseChannel defines model for UpgradeDatabaseBody.ReleaseChannel.
+type UpgradeDatabaseBodyReleaseChannel string
// V1BackupsResponse defines model for V1BackupsResponse.
type V1BackupsResponse struct {
- Backups []V1Backup `json:"backups"`
- PhysicalBackupData V1PhysicalBackup `json:"physical_backup_data"`
- PitrEnabled bool `json:"pitr_enabled"`
- Region string `json:"region"`
- WalgEnabled bool `json:"walg_enabled"`
-}
+ Backups []struct {
+ InsertedAt string `json:"inserted_at"`
+ IsPhysicalBackup bool `json:"is_physical_backup"`
+ Status V1BackupsResponseBackupsStatus `json:"status"`
+ } `json:"backups"`
+ PhysicalBackupData struct {
+ EarliestPhysicalBackupDateUnix *int `json:"earliest_physical_backup_date_unix,omitempty"`
+ LatestPhysicalBackupDateUnix *int `json:"latest_physical_backup_date_unix,omitempty"`
+ } `json:"physical_backup_data"`
+ PitrEnabled bool `json:"pitr_enabled"`
+ Region string `json:"region"`
+ WalgEnabled bool `json:"walg_enabled"`
+}
+
+// V1BackupsResponseBackupsStatus defines model for V1BackupsResponse.Backups.Status.
+type V1BackupsResponseBackupsStatus string
// V1CreateFunctionBody defines model for V1CreateFunctionBody.
type V1CreateFunctionBody struct {
- Body string `json:"body"`
- ComputeMultiplier *float32 `json:"compute_multiplier,omitempty"`
- Name string `json:"name"`
- Slug string `json:"slug"`
- VerifyJwt *bool `json:"verify_jwt,omitempty"`
+ Body string `json:"body"`
+ Name string `json:"name"`
+ Slug string `json:"slug"`
+ VerifyJwt *bool `json:"verify_jwt,omitempty"`
}
-// V1CreateProjectBodyDto defines model for V1CreateProjectBodyDto.
-type V1CreateProjectBodyDto struct {
+// V1CreateMigrationBody defines model for V1CreateMigrationBody.
+type V1CreateMigrationBody struct {
+ Name *string `json:"name,omitempty"`
+ Query string `json:"query"`
+}
+
+// V1CreateProjectBody defines model for V1CreateProjectBody.
+type V1CreateProjectBody struct {
// DbPass Database password
- DbPass string `json:"db_pass"`
- DesiredInstanceSize *V1CreateProjectBodyDtoDesiredInstanceSize `json:"desired_instance_size,omitempty"`
+ DbPass string `json:"db_pass"`
+ DesiredInstanceSize *V1CreateProjectBodyDesiredInstanceSize `json:"desired_instance_size,omitempty"`
// KpsEnabled This field is deprecated and is ignored in this request
// Deprecated:
@@ -1792,37 +2799,28 @@ type V1CreateProjectBodyDto struct {
// Plan Subscription Plan is now set on organization level and is ignored in this request
// Deprecated:
- Plan *V1CreateProjectBodyDtoPlan `json:"plan,omitempty"`
+ Plan *V1CreateProjectBodyPlan `json:"plan,omitempty"`
// Region Region you want your server to reside in
- Region V1CreateProjectBodyDtoRegion `json:"region"`
+ Region V1CreateProjectBodyRegion `json:"region"`
// TemplateUrl Template URL used to create the project from the CLI.
TemplateUrl *string `json:"template_url,omitempty"`
}
-// V1CreateProjectBodyDtoDesiredInstanceSize defines model for V1CreateProjectBodyDto.DesiredInstanceSize.
-type V1CreateProjectBodyDtoDesiredInstanceSize string
-
-// V1CreateProjectBodyDtoPlan Subscription Plan is now set on organization level and is ignored in this request
-type V1CreateProjectBodyDtoPlan string
-
-// V1CreateProjectBodyDtoRegion Region you want your server to reside in
-type V1CreateProjectBodyDtoRegion string
+// V1CreateProjectBodyDesiredInstanceSize defines model for V1CreateProjectBody.DesiredInstanceSize.
+type V1CreateProjectBodyDesiredInstanceSize string
-// V1DatabaseResponse defines model for V1DatabaseResponse.
-type V1DatabaseResponse struct {
- // Host Database host
- Host string `json:"host"`
+// V1CreateProjectBodyPlan Subscription Plan is now set on organization level and is ignored in this request
+type V1CreateProjectBodyPlan string
- // PostgresEngine Database engine
- PostgresEngine string `json:"postgres_engine"`
+// V1CreateProjectBodyRegion Region you want your server to reside in
+type V1CreateProjectBodyRegion string
- // ReleaseChannel Release channel
- ReleaseChannel string `json:"release_channel"`
-
- // Version Database version
- Version string `json:"version"`
+// V1ListMigrationsResponse defines model for V1ListMigrationsResponse.
+type V1ListMigrationsResponse = []struct {
+ Name *string `json:"name,omitempty"`
+ Version string `json:"version"`
}
// V1OrganizationMemberResponse defines model for V1OrganizationMemberResponse.
@@ -1836,47 +2834,89 @@ type V1OrganizationMemberResponse struct {
// V1OrganizationSlugResponse defines model for V1OrganizationSlugResponse.
type V1OrganizationSlugResponse struct {
- AllowedReleaseChannels []ReleaseChannel `json:"allowed_release_channels"`
- Id string `json:"id"`
- Name string `json:"name"`
- OptInTags []V1OrganizationSlugResponseOptInTags `json:"opt_in_tags"`
- Plan *BillingPlanId `json:"plan,omitempty"`
+ AllowedReleaseChannels []V1OrganizationSlugResponseAllowedReleaseChannels `json:"allowed_release_channels"`
+ Id string `json:"id"`
+ Name string `json:"name"`
+ OptInTags []V1OrganizationSlugResponseOptInTags `json:"opt_in_tags"`
+ Plan *V1OrganizationSlugResponsePlan `json:"plan,omitempty"`
}
+// V1OrganizationSlugResponseAllowedReleaseChannels defines model for V1OrganizationSlugResponse.AllowedReleaseChannels.
+type V1OrganizationSlugResponseAllowedReleaseChannels string
+
// V1OrganizationSlugResponseOptInTags defines model for V1OrganizationSlugResponse.OptInTags.
type V1OrganizationSlugResponseOptInTags string
+// V1OrganizationSlugResponsePlan defines model for V1OrganizationSlugResponse.Plan.
+type V1OrganizationSlugResponsePlan string
+
// V1PgbouncerConfigResponse defines model for V1PgbouncerConfigResponse.
type V1PgbouncerConfigResponse struct {
ConnectionString *string `json:"connection_string,omitempty"`
- DefaultPoolSize *float32 `json:"default_pool_size,omitempty"`
+ DefaultPoolSize *int `json:"default_pool_size,omitempty"`
IgnoreStartupParameters *string `json:"ignore_startup_parameters,omitempty"`
- MaxClientConn *float32 `json:"max_client_conn,omitempty"`
+ MaxClientConn *int `json:"max_client_conn,omitempty"`
PoolMode *V1PgbouncerConfigResponsePoolMode `json:"pool_mode,omitempty"`
+ QueryWaitTimeout *int `json:"query_wait_timeout,omitempty"`
+ ReservePoolSize *int `json:"reserve_pool_size,omitempty"`
+ ServerIdleTimeout *int `json:"server_idle_timeout,omitempty"`
+ ServerLifetime *int `json:"server_lifetime,omitempty"`
}
// V1PgbouncerConfigResponsePoolMode defines model for V1PgbouncerConfigResponse.PoolMode.
type V1PgbouncerConfigResponsePoolMode string
-// V1PhysicalBackup defines model for V1PhysicalBackup.
-type V1PhysicalBackup struct {
- EarliestPhysicalBackupDateUnix *int64 `json:"earliest_physical_backup_date_unix,omitempty"`
- LatestPhysicalBackupDateUnix *int64 `json:"latest_physical_backup_date_unix,omitempty"`
-}
-
// V1PostgrestConfigResponse defines model for V1PostgrestConfigResponse.
type V1PostgrestConfigResponse struct {
DbExtraSearchPath string `json:"db_extra_search_path"`
// DbPool If `null`, the value is automatically configured based on compute size.
- DbPool *int `json:"db_pool"`
- DbSchema string `json:"db_schema"`
- MaxRows int `json:"max_rows"`
-}
+ DbPool nullable.Nullable[int] `json:"db_pool"`
+ DbSchema string `json:"db_schema"`
+ MaxRows int `json:"max_rows"`
+}
+
+// V1ProjectAdvisorsResponse defines model for V1ProjectAdvisorsResponse.
+type V1ProjectAdvisorsResponse struct {
+ Lints []struct {
+ CacheKey string `json:"cache_key"`
+ Categories []V1ProjectAdvisorsResponseLintsCategories `json:"categories"`
+ Description string `json:"description"`
+ Detail string `json:"detail"`
+ Facing V1ProjectAdvisorsResponseLintsFacing `json:"facing"`
+ Level V1ProjectAdvisorsResponseLintsLevel `json:"level"`
+ Metadata *struct {
+ Entity *string `json:"entity,omitempty"`
+ FkeyColumns *[]float32 `json:"fkey_columns,omitempty"`
+ FkeyName *string `json:"fkey_name,omitempty"`
+ Name *string `json:"name,omitempty"`
+ Schema *string `json:"schema,omitempty"`
+ Type *V1ProjectAdvisorsResponseLintsMetadataType `json:"type,omitempty"`
+ } `json:"metadata,omitempty"`
+ Name V1ProjectAdvisorsResponseLintsName `json:"name"`
+ Remediation string `json:"remediation"`
+ Title string `json:"title"`
+ } `json:"lints"`
+}
+
+// V1ProjectAdvisorsResponseLintsCategories defines model for V1ProjectAdvisorsResponse.Lints.Categories.
+type V1ProjectAdvisorsResponseLintsCategories string
+
+// V1ProjectAdvisorsResponseLintsFacing defines model for V1ProjectAdvisorsResponse.Lints.Facing.
+type V1ProjectAdvisorsResponseLintsFacing string
+
+// V1ProjectAdvisorsResponseLintsLevel defines model for V1ProjectAdvisorsResponse.Lints.Level.
+type V1ProjectAdvisorsResponseLintsLevel string
+
+// V1ProjectAdvisorsResponseLintsMetadataType defines model for V1ProjectAdvisorsResponse.Lints.Metadata.Type.
+type V1ProjectAdvisorsResponseLintsMetadataType string
+
+// V1ProjectAdvisorsResponseLintsName defines model for V1ProjectAdvisorsResponse.Lints.Name.
+type V1ProjectAdvisorsResponseLintsName string
// V1ProjectRefResponse defines model for V1ProjectRefResponse.
type V1ProjectRefResponse struct {
- Id int64 `json:"id"`
+ Id int `json:"id"`
Name string `json:"name"`
Ref string `json:"ref"`
}
@@ -1906,8 +2946,20 @@ type V1ProjectResponseStatus string
// V1ProjectWithDatabaseResponse defines model for V1ProjectWithDatabaseResponse.
type V1ProjectWithDatabaseResponse struct {
// CreatedAt Creation timestamp
- CreatedAt string `json:"created_at"`
- Database V1DatabaseResponse `json:"database"`
+ CreatedAt string `json:"created_at"`
+ Database struct {
+ // Host Database host
+ Host string `json:"host"`
+
+ // PostgresEngine Database engine
+ PostgresEngine string `json:"postgres_engine"`
+
+ // ReleaseChannel Release channel
+ ReleaseChannel string `json:"release_channel"`
+
+ // Version Database version
+ Version string `json:"version"`
+ } `json:"database"`
// Id Id of your project
Id string `json:"id"`
@@ -1931,9 +2983,24 @@ type V1RestorePitrBody struct {
RecoveryTimeTargetUnix int64 `json:"recovery_time_target_unix"`
}
+// V1RestorePointPostBody defines model for V1RestorePointPostBody.
+type V1RestorePointPostBody struct {
+ Name string `json:"name"`
+}
+
+// V1RestorePointResponse defines model for V1RestorePointResponse.
+type V1RestorePointResponse struct {
+ Name string `json:"name"`
+ Status V1RestorePointResponseStatus `json:"status"`
+}
+
+// V1RestorePointResponseStatus defines model for V1RestorePointResponse.Status.
+type V1RestorePointResponseStatus string
+
// V1RunQueryBody defines model for V1RunQueryBody.
type V1RunQueryBody struct {
- Query string `json:"query"`
+ Query string `json:"query"`
+ ReadOnly *bool `json:"read_only,omitempty"`
}
// V1ServiceHealthResponse defines model for V1ServiceHealthResponse.
@@ -1945,6 +3012,23 @@ type V1ServiceHealthResponse struct {
Status V1ServiceHealthResponseStatus `json:"status"`
}
+// V1ServiceHealthResponseInfo0 defines model for .
+type V1ServiceHealthResponseInfo0 struct {
+ Description string `json:"description"`
+ Name V1ServiceHealthResponseInfo0Name `json:"name"`
+ Version string `json:"version"`
+}
+
+// V1ServiceHealthResponseInfo0Name defines model for V1ServiceHealthResponse.Info.0.Name.
+type V1ServiceHealthResponseInfo0Name string
+
+// V1ServiceHealthResponseInfo1 defines model for .
+type V1ServiceHealthResponseInfo1 struct {
+ ConnectedCluster int `json:"connected_cluster"`
+ DbConnected bool `json:"db_connected"`
+ Healthy bool `json:"healthy"`
+}
+
// V1ServiceHealthResponse_Info defines model for V1ServiceHealthResponse.Info.
type V1ServiceHealthResponse_Info struct {
union json.RawMessage
@@ -1966,23 +3050,30 @@ type V1StorageBucketResponse struct {
UpdatedAt string `json:"updated_at"`
}
+// V1UndoBody defines model for V1UndoBody.
+type V1UndoBody struct {
+ Name string `json:"name"`
+}
+
// V1UpdateFunctionBody defines model for V1UpdateFunctionBody.
type V1UpdateFunctionBody struct {
- Body *string `json:"body,omitempty"`
- ComputeMultiplier *float32 `json:"compute_multiplier,omitempty"`
- Name *string `json:"name,omitempty"`
- VerifyJwt *bool `json:"verify_jwt,omitempty"`
+ Body *string `json:"body,omitempty"`
+ Name *string `json:"name,omitempty"`
+ VerifyJwt *bool `json:"verify_jwt,omitempty"`
}
-// ValidationError defines model for ValidationError.
-type ValidationError struct {
- Message string `json:"message"`
+// V1UpdatePostgrestConfigBody defines model for V1UpdatePostgrestConfigBody.
+type V1UpdatePostgrestConfigBody struct {
+ DbExtraSearchPath *string `json:"db_extra_search_path,omitempty"`
+ DbPool *int `json:"db_pool,omitempty"`
+ DbSchema *string `json:"db_schema,omitempty"`
+ MaxRows *int `json:"max_rows,omitempty"`
}
-// ValidationRecord defines model for ValidationRecord.
-type ValidationRecord struct {
- TxtName string `json:"txt_name"`
- TxtValue string `json:"txt_value"`
+// V1UpsertMigrationBody defines model for V1UpsertMigrationBody.
+type V1UpsertMigrationBody struct {
+ Name *string `json:"name,omitempty"`
+ Query string `json:"query"`
}
// VanitySubdomainBody defines model for VanitySubdomainBody.
@@ -1999,9 +3090,14 @@ type VanitySubdomainConfigResponse struct {
// VanitySubdomainConfigResponseStatus defines model for VanitySubdomainConfigResponse.Status.
type VanitySubdomainConfigResponseStatus string
+// V1DiffABranchParams defines parameters for V1DiffABranch.
+type V1DiffABranchParams struct {
+ IncludedSchemas *string `form:"included_schemas,omitempty" json:"included_schemas,omitempty"`
+}
+
// V1AuthorizeUserParams defines parameters for V1AuthorizeUser.
type V1AuthorizeUserParams struct {
- ClientId string `form:"client_id" json:"client_id"`
+ ClientId openapi_types.UUID `form:"client_id" json:"client_id"`
ResponseType V1AuthorizeUserParamsResponseType `form:"response_type" json:"response_type"`
RedirectUri string `form:"redirect_uri" json:"redirect_uri"`
Scope *string `form:"scope,omitempty" json:"scope,omitempty"`
@@ -2009,6 +3105,12 @@ type V1AuthorizeUserParams struct {
ResponseMode *string `form:"response_mode,omitempty" json:"response_mode,omitempty"`
CodeChallenge *string `form:"code_challenge,omitempty" json:"code_challenge,omitempty"`
CodeChallengeMethod *V1AuthorizeUserParamsCodeChallengeMethod `form:"code_challenge_method,omitempty" json:"code_challenge_method,omitempty"`
+
+ // OrganizationSlug Organization slug
+ OrganizationSlug *string `form:"organization_slug,omitempty" json:"organization_slug,omitempty"`
+
+ // Resource Resource indicator for MCP (Model Context Protocol) clients
+ Resource *V1AuthorizeUserParamsResource `form:"resource,omitempty" json:"resource,omitempty"`
}
// V1AuthorizeUserParamsResponseType defines parameters for V1AuthorizeUser.
@@ -2017,73 +3119,150 @@ type V1AuthorizeUserParamsResponseType string
// V1AuthorizeUserParamsCodeChallengeMethod defines parameters for V1AuthorizeUser.
type V1AuthorizeUserParamsCodeChallengeMethod string
-// GetLogsParams defines parameters for GetLogs.
-type GetLogsParams struct {
- IsoTimestampEnd *string `form:"iso_timestamp_end,omitempty" json:"iso_timestamp_end,omitempty"`
- IsoTimestampStart *string `form:"iso_timestamp_start,omitempty" json:"iso_timestamp_start,omitempty"`
- Sql *string `form:"sql,omitempty" json:"sql,omitempty"`
+// V1AuthorizeUserParamsResource defines parameters for V1AuthorizeUser.
+type V1AuthorizeUserParamsResource string
+
+// V1OauthAuthorizeProjectClaimParams defines parameters for V1OauthAuthorizeProjectClaim.
+type V1OauthAuthorizeProjectClaimParams struct {
+ // ProjectRef Project ref
+ ProjectRef string `form:"project_ref" json:"project_ref"`
+ ClientId openapi_types.UUID `form:"client_id" json:"client_id"`
+ ResponseType V1OauthAuthorizeProjectClaimParamsResponseType `form:"response_type" json:"response_type"`
+ RedirectUri string `form:"redirect_uri" json:"redirect_uri"`
+ State *string `form:"state,omitempty" json:"state,omitempty"`
+ ResponseMode *string `form:"response_mode,omitempty" json:"response_mode,omitempty"`
+ CodeChallenge *string `form:"code_challenge,omitempty" json:"code_challenge,omitempty"`
+ CodeChallengeMethod *V1OauthAuthorizeProjectClaimParamsCodeChallengeMethod `form:"code_challenge_method,omitempty" json:"code_challenge_method,omitempty"`
}
+// V1OauthAuthorizeProjectClaimParamsResponseType defines parameters for V1OauthAuthorizeProjectClaim.
+type V1OauthAuthorizeProjectClaimParamsResponseType string
+
+// V1OauthAuthorizeProjectClaimParamsCodeChallengeMethod defines parameters for V1OauthAuthorizeProjectClaim.
+type V1OauthAuthorizeProjectClaimParamsCodeChallengeMethod string
+
+// V1GetSecurityAdvisorsParams defines parameters for V1GetSecurityAdvisors.
+type V1GetSecurityAdvisorsParams struct {
+ LintType *V1GetSecurityAdvisorsParamsLintType `form:"lint_type,omitempty" json:"lint_type,omitempty"`
+}
+
+// V1GetSecurityAdvisorsParamsLintType defines parameters for V1GetSecurityAdvisors.
+type V1GetSecurityAdvisorsParamsLintType string
+
+// V1GetProjectLogsParams defines parameters for V1GetProjectLogs.
+type V1GetProjectLogsParams struct {
+ Sql *string `form:"sql,omitempty" json:"sql,omitempty"`
+ IsoTimestampStart *time.Time `form:"iso_timestamp_start,omitempty" json:"iso_timestamp_start,omitempty"`
+ IsoTimestampEnd *time.Time `form:"iso_timestamp_end,omitempty" json:"iso_timestamp_end,omitempty"`
+}
+
+// V1GetProjectUsageApiCountParams defines parameters for V1GetProjectUsageApiCount.
+type V1GetProjectUsageApiCountParams struct {
+ Interval *V1GetProjectUsageApiCountParamsInterval `form:"interval,omitempty" json:"interval,omitempty"`
+}
+
+// V1GetProjectUsageApiCountParamsInterval defines parameters for V1GetProjectUsageApiCount.
+type V1GetProjectUsageApiCountParamsInterval string
+
// V1GetProjectApiKeysParams defines parameters for V1GetProjectApiKeys.
type V1GetProjectApiKeysParams struct {
- Reveal bool `form:"reveal" json:"reveal"`
+ // Reveal Boolean string, true or false
+ Reveal *bool `form:"reveal,omitempty" json:"reveal,omitempty"`
+}
+
+// V1CreateProjectApiKeyParams defines parameters for V1CreateProjectApiKey.
+type V1CreateProjectApiKeyParams struct {
+ // Reveal Boolean string, true or false
+ Reveal *bool `form:"reveal,omitempty" json:"reveal,omitempty"`
+}
+
+// V1UpdateProjectLegacyApiKeysParams defines parameters for V1UpdateProjectLegacyApiKeys.
+type V1UpdateProjectLegacyApiKeysParams struct {
+ // Enabled Boolean string, true or false
+ Enabled bool `form:"enabled" json:"enabled"`
+}
+
+// V1DeleteProjectApiKeyParams defines parameters for V1DeleteProjectApiKey.
+type V1DeleteProjectApiKeyParams struct {
+ // Reveal Boolean string, true or false
+ Reveal *bool `form:"reveal,omitempty" json:"reveal,omitempty"`
+
+ // WasCompromised Boolean string, true or false
+ WasCompromised *bool `form:"was_compromised,omitempty" json:"was_compromised,omitempty"`
+ Reason *string `form:"reason,omitempty" json:"reason,omitempty"`
+}
+
+// V1GetProjectApiKeyParams defines parameters for V1GetProjectApiKey.
+type V1GetProjectApiKeyParams struct {
+ // Reveal Boolean string, true or false
+ Reveal *bool `form:"reveal,omitempty" json:"reveal,omitempty"`
}
-// CreateApiKeyParams defines parameters for CreateApiKey.
-type CreateApiKeyParams struct {
- Reveal bool `form:"reveal" json:"reveal"`
+// V1UpdateProjectApiKeyParams defines parameters for V1UpdateProjectApiKey.
+type V1UpdateProjectApiKeyParams struct {
+ // Reveal Boolean string, true or false
+ Reveal *bool `form:"reveal,omitempty" json:"reveal,omitempty"`
}
-// DeleteApiKeyParams defines parameters for DeleteApiKey.
-type DeleteApiKeyParams struct {
- Reveal bool `form:"reveal" json:"reveal"`
+// V1GetRestorePointParams defines parameters for V1GetRestorePoint.
+type V1GetRestorePointParams struct {
+ Name *string `form:"name,omitempty" json:"name,omitempty"`
}
-// GetApiKeyParams defines parameters for GetApiKey.
-type GetApiKeyParams struct {
- Reveal bool `form:"reveal" json:"reveal"`
+// V1ApplyAMigrationParams defines parameters for V1ApplyAMigration.
+type V1ApplyAMigrationParams struct {
+ // IdempotencyKey A unique key to ensure the same migration is tracked only once.
+ IdempotencyKey *string `json:"Idempotency-Key,omitempty"`
}
-// UpdateApiKeyParams defines parameters for UpdateApiKey.
-type UpdateApiKeyParams struct {
- Reveal bool `form:"reveal" json:"reveal"`
+// V1UpsertAMigrationParams defines parameters for V1UpsertAMigration.
+type V1UpsertAMigrationParams struct {
+ // IdempotencyKey A unique key to ensure the same migration is tracked only once.
+ IdempotencyKey *string `json:"Idempotency-Key,omitempty"`
}
// V1CreateAFunctionParams defines parameters for V1CreateAFunction.
type V1CreateAFunctionParams struct {
- Slug *string `form:"slug,omitempty" json:"slug,omitempty"`
- Name *string `form:"name,omitempty" json:"name,omitempty"`
- VerifyJwt *bool `form:"verify_jwt,omitempty" json:"verify_jwt,omitempty"`
- ImportMap *bool `form:"import_map,omitempty" json:"import_map,omitempty"`
- EntrypointPath *string `form:"entrypoint_path,omitempty" json:"entrypoint_path,omitempty"`
- ImportMapPath *string `form:"import_map_path,omitempty" json:"import_map_path,omitempty"`
- ComputeMultiplier *float32 `form:"compute_multiplier,omitempty" json:"compute_multiplier,omitempty"`
-}
+ Slug *string `form:"slug,omitempty" json:"slug,omitempty"`
+ Name *string `form:"name,omitempty" json:"name,omitempty"`
-// V1BulkUpdateFunctionsJSONBody defines parameters for V1BulkUpdateFunctions.
-type V1BulkUpdateFunctionsJSONBody = []BulkUpdateFunctionBody
+ // VerifyJwt Boolean string, true or false
+ VerifyJwt *bool `form:"verify_jwt,omitempty" json:"verify_jwt,omitempty"`
+
+ // ImportMap Boolean string, true or false
+ ImportMap *bool `form:"import_map,omitempty" json:"import_map,omitempty"`
+ EntrypointPath *string `form:"entrypoint_path,omitempty" json:"entrypoint_path,omitempty"`
+ ImportMapPath *string `form:"import_map_path,omitempty" json:"import_map_path,omitempty"`
+ EzbrSha256 *string `form:"ezbr_sha256,omitempty" json:"ezbr_sha256,omitempty"`
+}
// V1DeployAFunctionParams defines parameters for V1DeployAFunction.
type V1DeployAFunctionParams struct {
- Slug *string `form:"slug,omitempty" json:"slug,omitempty"`
- BundleOnly *bool `form:"bundleOnly,omitempty" json:"bundleOnly,omitempty"`
+ Slug *string `form:"slug,omitempty" json:"slug,omitempty"`
+
+ // BundleOnly Boolean string, true or false
+ BundleOnly *bool `form:"bundleOnly,omitempty" json:"bundleOnly,omitempty"`
}
// V1UpdateAFunctionParams defines parameters for V1UpdateAFunction.
type V1UpdateAFunctionParams struct {
- Slug *string `form:"slug,omitempty" json:"slug,omitempty"`
- Name *string `form:"name,omitempty" json:"name,omitempty"`
- VerifyJwt *bool `form:"verify_jwt,omitempty" json:"verify_jwt,omitempty"`
- ImportMap *bool `form:"import_map,omitempty" json:"import_map,omitempty"`
- EntrypointPath *string `form:"entrypoint_path,omitempty" json:"entrypoint_path,omitempty"`
- ImportMapPath *string `form:"import_map_path,omitempty" json:"import_map_path,omitempty"`
- ComputeMultiplier *float32 `form:"compute_multiplier,omitempty" json:"compute_multiplier,omitempty"`
+ Slug *string `form:"slug,omitempty" json:"slug,omitempty"`
+ Name *string `form:"name,omitempty" json:"name,omitempty"`
+
+ // VerifyJwt Boolean string, true or false
+ VerifyJwt *bool `form:"verify_jwt,omitempty" json:"verify_jwt,omitempty"`
+
+ // ImportMap Boolean string, true or false
+ ImportMap *bool `form:"import_map,omitempty" json:"import_map,omitempty"`
+ EntrypointPath *string `form:"entrypoint_path,omitempty" json:"entrypoint_path,omitempty"`
+ ImportMapPath *string `form:"import_map_path,omitempty" json:"import_map_path,omitempty"`
+ EzbrSha256 *string `form:"ezbr_sha256,omitempty" json:"ezbr_sha256,omitempty"`
}
// V1GetServicesHealthParams defines parameters for V1GetServicesHealth.
type V1GetServicesHealthParams struct {
- TimeoutMs *int `form:"timeout_ms,omitempty" json:"timeout_ms,omitempty"`
Services []V1GetServicesHealthParamsServices `form:"services" json:"services"`
+ TimeoutMs *int `form:"timeout_ms,omitempty" json:"timeout_ms,omitempty"`
}
// V1GetServicesHealthParamsServices defines parameters for V1GetServicesHealth.
@@ -2092,9 +3271,6 @@ type V1GetServicesHealthParamsServices string
// V1BulkDeleteSecretsJSONBody defines parameters for V1BulkDeleteSecrets.
type V1BulkDeleteSecretsJSONBody = []string
-// V1BulkCreateSecretsJSONBody defines parameters for V1BulkCreateSecrets.
-type V1BulkCreateSecretsJSONBody = []CreateSecretBody
-
// V1GenerateTypescriptTypesParams defines parameters for V1GenerateTypescriptTypes.
type V1GenerateTypescriptTypesParams struct {
IncludedSchemas *string `form:"included_schemas,omitempty" json:"included_schemas,omitempty"`
@@ -2107,11 +3283,12 @@ type V1GetPostgresUpgradeStatusParams struct {
// V1ListAllSnippetsParams defines parameters for V1ListAllSnippets.
type V1ListAllSnippetsParams struct {
+ // ProjectRef Project ref
+ ProjectRef *string `form:"project_ref,omitempty" json:"project_ref,omitempty"`
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *string `form:"limit,omitempty" json:"limit,omitempty"`
SortBy *V1ListAllSnippetsParamsSortBy `form:"sort_by,omitempty" json:"sort_by,omitempty"`
SortOrder *V1ListAllSnippetsParamsSortOrder `form:"sort_order,omitempty" json:"sort_order,omitempty"`
- ProjectRef *string `form:"project_ref,omitempty" json:"project_ref,omitempty"`
}
// V1ListAllSnippetsParamsSortBy defines parameters for V1ListAllSnippets.
@@ -2123,23 +3300,35 @@ type V1ListAllSnippetsParamsSortOrder string
// V1UpdateABranchConfigJSONRequestBody defines body for V1UpdateABranchConfig for application/json ContentType.
type V1UpdateABranchConfigJSONRequestBody = UpdateBranchBody
+// V1MergeABranchJSONRequestBody defines body for V1MergeABranch for application/json ContentType.
+type V1MergeABranchJSONRequestBody = BranchActionBody
+
+// V1PushABranchJSONRequestBody defines body for V1PushABranch for application/json ContentType.
+type V1PushABranchJSONRequestBody = BranchActionBody
+
+// V1ResetABranchJSONRequestBody defines body for V1ResetABranch for application/json ContentType.
+type V1ResetABranchJSONRequestBody = BranchActionBody
+
// V1RevokeTokenJSONRequestBody defines body for V1RevokeToken for application/json ContentType.
-type V1RevokeTokenJSONRequestBody = OAuthRevokeTokenBodyDto
+type V1RevokeTokenJSONRequestBody = OAuthRevokeTokenBody
// V1ExchangeOauthTokenFormdataRequestBody defines body for V1ExchangeOauthToken for application/x-www-form-urlencoded ContentType.
type V1ExchangeOauthTokenFormdataRequestBody = OAuthTokenBody
// V1CreateAnOrganizationJSONRequestBody defines body for V1CreateAnOrganization for application/json ContentType.
-type V1CreateAnOrganizationJSONRequestBody = CreateOrganizationV1Dto
+type V1CreateAnOrganizationJSONRequestBody = CreateOrganizationV1
// V1CreateAProjectJSONRequestBody defines body for V1CreateAProject for application/json ContentType.
-type V1CreateAProjectJSONRequestBody = V1CreateProjectBodyDto
+type V1CreateAProjectJSONRequestBody = V1CreateProjectBody
+
+// V1CreateProjectApiKeyJSONRequestBody defines body for V1CreateProjectApiKey for application/json ContentType.
+type V1CreateProjectApiKeyJSONRequestBody = CreateApiKeyBody
-// CreateApiKeyJSONRequestBody defines body for CreateApiKey for application/json ContentType.
-type CreateApiKeyJSONRequestBody = CreateApiKeyBody
+// V1UpdateProjectApiKeyJSONRequestBody defines body for V1UpdateProjectApiKey for application/json ContentType.
+type V1UpdateProjectApiKeyJSONRequestBody = UpdateApiKeyBody
-// UpdateApiKeyJSONRequestBody defines body for UpdateApiKey for application/json ContentType.
-type UpdateApiKeyJSONRequestBody = UpdateApiKeyBody
+// V1ApplyProjectAddonJSONRequestBody defines body for V1ApplyProjectAddon for application/json ContentType.
+type V1ApplyProjectAddonJSONRequestBody = ApplyProjectAddonBody
// V1CreateABranchJSONRequestBody defines body for V1CreateABranch for application/json ContentType.
type V1CreateABranchJSONRequestBody = CreateBranchBody
@@ -2147,17 +3336,23 @@ type V1CreateABranchJSONRequestBody = CreateBranchBody
// V1UpdateAuthServiceConfigJSONRequestBody defines body for V1UpdateAuthServiceConfig for application/json ContentType.
type V1UpdateAuthServiceConfigJSONRequestBody = UpdateAuthConfigBody
+// V1CreateProjectSigningKeyJSONRequestBody defines body for V1CreateProjectSigningKey for application/json ContentType.
+type V1CreateProjectSigningKeyJSONRequestBody = CreateSigningKeyBody
+
+// V1UpdateProjectSigningKeyJSONRequestBody defines body for V1UpdateProjectSigningKey for application/json ContentType.
+type V1UpdateProjectSigningKeyJSONRequestBody = UpdateSigningKeyBody
+
// V1CreateASsoProviderJSONRequestBody defines body for V1CreateASsoProvider for application/json ContentType.
type V1CreateASsoProviderJSONRequestBody = CreateProviderBody
// V1UpdateASsoProviderJSONRequestBody defines body for V1UpdateASsoProvider for application/json ContentType.
type V1UpdateASsoProviderJSONRequestBody = UpdateProviderBody
-// CreateTPAForProjectJSONRequestBody defines body for CreateTPAForProject for application/json ContentType.
-type CreateTPAForProjectJSONRequestBody = CreateThirdPartyAuthBody
+// V1CreateProjectTpaIntegrationJSONRequestBody defines body for V1CreateProjectTpaIntegration for application/json ContentType.
+type V1CreateProjectTpaIntegrationJSONRequestBody = CreateThirdPartyAuthBody
-// V1UpdateSupavisorConfigJSONRequestBody defines body for V1UpdateSupavisorConfig for application/json ContentType.
-type V1UpdateSupavisorConfigJSONRequestBody = UpdateSupavisorConfigBody
+// V1UpdatePoolerConfigJSONRequestBody defines body for V1UpdatePoolerConfig for application/json ContentType.
+type V1UpdatePoolerConfigJSONRequestBody = UpdateSupavisorConfigBody
// V1UpdatePostgresConfigJSONRequestBody defines body for V1UpdatePostgresConfig for application/json ContentType.
type V1UpdatePostgresConfigJSONRequestBody = UpdatePostgresConfigBody
@@ -2171,6 +3366,21 @@ type V1UpdateHostnameConfigJSONRequestBody = UpdateCustomHostnameBody
// V1RestorePitrBackupJSONRequestBody defines body for V1RestorePitrBackup for application/json ContentType.
type V1RestorePitrBackupJSONRequestBody = V1RestorePitrBody
+// V1CreateRestorePointJSONRequestBody defines body for V1CreateRestorePoint for application/json ContentType.
+type V1CreateRestorePointJSONRequestBody = V1RestorePointPostBody
+
+// V1UndoJSONRequestBody defines body for V1Undo for application/json ContentType.
+type V1UndoJSONRequestBody = V1UndoBody
+
+// V1UpdateJitAccessJSONRequestBody defines body for V1UpdateJitAccess for application/json ContentType.
+type V1UpdateJitAccessJSONRequestBody = UpdateJitAccessBody
+
+// V1ApplyAMigrationJSONRequestBody defines body for V1ApplyAMigration for application/json ContentType.
+type V1ApplyAMigrationJSONRequestBody = V1CreateMigrationBody
+
+// V1UpsertAMigrationJSONRequestBody defines body for V1UpsertAMigration for application/json ContentType.
+type V1UpsertAMigrationJSONRequestBody = V1UpsertMigrationBody
+
// V1RunAQueryJSONRequestBody defines body for V1RunAQuery for application/json ContentType.
type V1RunAQueryJSONRequestBody = V1RunQueryBody
@@ -2178,7 +3388,7 @@ type V1RunAQueryJSONRequestBody = V1RunQueryBody
type V1CreateAFunctionJSONRequestBody = V1CreateFunctionBody
// V1BulkUpdateFunctionsJSONRequestBody defines body for V1BulkUpdateFunctions for application/json ContentType.
-type V1BulkUpdateFunctionsJSONRequestBody = V1BulkUpdateFunctionsJSONBody
+type V1BulkUpdateFunctionsJSONRequestBody = BulkUpdateFunctionBody
// V1DeployAFunctionMultipartRequestBody defines body for V1DeployAFunction for multipart/form-data ContentType.
type V1DeployAFunctionMultipartRequestBody = FunctionDeployBody
@@ -2196,7 +3406,7 @@ type V1UpdateNetworkRestrictionsJSONRequestBody = NetworkRestrictionsRequest
type V1UpdatePgsodiumConfigJSONRequestBody = UpdatePgsodiumConfigBody
// V1UpdatePostgrestServiceConfigJSONRequestBody defines body for V1UpdatePostgrestServiceConfig for application/json ContentType.
-type V1UpdatePostgrestServiceConfigJSONRequestBody = UpdatePostgrestConfigBody
+type V1UpdatePostgrestServiceConfigJSONRequestBody = V1UpdatePostgrestConfigBody
// V1RemoveAReadReplicaJSONRequestBody defines body for V1RemoveAReadReplica for application/json ContentType.
type V1RemoveAReadReplicaJSONRequestBody = RemoveReadReplicaBody
@@ -2204,14 +3414,11 @@ type V1RemoveAReadReplicaJSONRequestBody = RemoveReadReplicaBody
// V1SetupAReadReplicaJSONRequestBody defines body for V1SetupAReadReplica for application/json ContentType.
type V1SetupAReadReplicaJSONRequestBody = SetUpReadReplicaBody
-// V1RestoreAProjectJSONRequestBody defines body for V1RestoreAProject for application/json ContentType.
-type V1RestoreAProjectJSONRequestBody = RestoreProjectBodyDto
-
// V1BulkDeleteSecretsJSONRequestBody defines body for V1BulkDeleteSecrets for application/json ContentType.
type V1BulkDeleteSecretsJSONRequestBody = V1BulkDeleteSecretsJSONBody
// V1BulkCreateSecretsJSONRequestBody defines body for V1BulkCreateSecrets for application/json ContentType.
-type V1BulkCreateSecretsJSONRequestBody = V1BulkCreateSecretsJSONBody
+type V1BulkCreateSecretsJSONRequestBody = CreateSecretBody
// V1UpdateSslEnforcementConfigJSONRequestBody defines body for V1UpdateSslEnforcementConfig for application/json ContentType.
type V1UpdateSslEnforcementConfigJSONRequestBody = SslEnforcementRequest
@@ -2225,25 +3432,25 @@ type V1ActivateVanitySubdomainConfigJSONRequestBody = VanitySubdomainBody
// V1CheckVanitySubdomainAvailabilityJSONRequestBody defines body for V1CheckVanitySubdomainAvailability for application/json ContentType.
type V1CheckVanitySubdomainAvailabilityJSONRequestBody = VanitySubdomainBody
-// Getter for additional properties for GetProjectDbMetadataResponseDto_Databases_Schemas_Item. Returns the specified
+// Getter for additional properties for GetProjectDbMetadataResponse_Databases_Schemas_Item. Returns the specified
// element and whether it was found
-func (a GetProjectDbMetadataResponseDto_Databases_Schemas_Item) Get(fieldName string) (value interface{}, found bool) {
+func (a GetProjectDbMetadataResponse_Databases_Schemas_Item) Get(fieldName string) (value interface{}, found bool) {
if a.AdditionalProperties != nil {
value, found = a.AdditionalProperties[fieldName]
}
return
}
-// Setter for additional properties for GetProjectDbMetadataResponseDto_Databases_Schemas_Item
-func (a *GetProjectDbMetadataResponseDto_Databases_Schemas_Item) Set(fieldName string, value interface{}) {
+// Setter for additional properties for GetProjectDbMetadataResponse_Databases_Schemas_Item
+func (a *GetProjectDbMetadataResponse_Databases_Schemas_Item) Set(fieldName string, value interface{}) {
if a.AdditionalProperties == nil {
a.AdditionalProperties = make(map[string]interface{})
}
a.AdditionalProperties[fieldName] = value
}
-// Override default JSON handling for GetProjectDbMetadataResponseDto_Databases_Schemas_Item to handle AdditionalProperties
-func (a *GetProjectDbMetadataResponseDto_Databases_Schemas_Item) UnmarshalJSON(b []byte) error {
+// Override default JSON handling for GetProjectDbMetadataResponse_Databases_Schemas_Item to handle AdditionalProperties
+func (a *GetProjectDbMetadataResponse_Databases_Schemas_Item) UnmarshalJSON(b []byte) error {
object := make(map[string]json.RawMessage)
err := json.Unmarshal(b, &object)
if err != nil {
@@ -2272,8 +3479,8 @@ func (a *GetProjectDbMetadataResponseDto_Databases_Schemas_Item) UnmarshalJSON(b
return nil
}
-// Override default JSON handling for GetProjectDbMetadataResponseDto_Databases_Schemas_Item to handle AdditionalProperties
-func (a GetProjectDbMetadataResponseDto_Databases_Schemas_Item) MarshalJSON() ([]byte, error) {
+// Override default JSON handling for GetProjectDbMetadataResponse_Databases_Schemas_Item to handle AdditionalProperties
+func (a GetProjectDbMetadataResponse_Databases_Schemas_Item) MarshalJSON() ([]byte, error) {
var err error
object := make(map[string]json.RawMessage)
@@ -2291,25 +3498,25 @@ func (a GetProjectDbMetadataResponseDto_Databases_Schemas_Item) MarshalJSON() ([
return json.Marshal(object)
}
-// Getter for additional properties for GetProjectDbMetadataResponseDto_Databases_Item. Returns the specified
+// Getter for additional properties for GetProjectDbMetadataResponse_Databases_Item. Returns the specified
// element and whether it was found
-func (a GetProjectDbMetadataResponseDto_Databases_Item) Get(fieldName string) (value interface{}, found bool) {
+func (a GetProjectDbMetadataResponse_Databases_Item) Get(fieldName string) (value interface{}, found bool) {
if a.AdditionalProperties != nil {
value, found = a.AdditionalProperties[fieldName]
}
return
}
-// Setter for additional properties for GetProjectDbMetadataResponseDto_Databases_Item
-func (a *GetProjectDbMetadataResponseDto_Databases_Item) Set(fieldName string, value interface{}) {
+// Setter for additional properties for GetProjectDbMetadataResponse_Databases_Item
+func (a *GetProjectDbMetadataResponse_Databases_Item) Set(fieldName string, value interface{}) {
if a.AdditionalProperties == nil {
a.AdditionalProperties = make(map[string]interface{})
}
a.AdditionalProperties[fieldName] = value
}
-// Override default JSON handling for GetProjectDbMetadataResponseDto_Databases_Item to handle AdditionalProperties
-func (a *GetProjectDbMetadataResponseDto_Databases_Item) UnmarshalJSON(b []byte) error {
+// Override default JSON handling for GetProjectDbMetadataResponse_Databases_Item to handle AdditionalProperties
+func (a *GetProjectDbMetadataResponse_Databases_Item) UnmarshalJSON(b []byte) error {
object := make(map[string]json.RawMessage)
err := json.Unmarshal(b, &object)
if err != nil {
@@ -2346,8 +3553,8 @@ func (a *GetProjectDbMetadataResponseDto_Databases_Item) UnmarshalJSON(b []byte)
return nil
}
-// Override default JSON handling for GetProjectDbMetadataResponseDto_Databases_Item to handle AdditionalProperties
-func (a GetProjectDbMetadataResponseDto_Databases_Item) MarshalJSON() ([]byte, error) {
+// Override default JSON handling for GetProjectDbMetadataResponse_Databases_Item to handle AdditionalProperties
+func (a GetProjectDbMetadataResponse_Databases_Item) MarshalJSON() ([]byte, error) {
var err error
object := make(map[string]json.RawMessage)
@@ -2370,22 +3577,22 @@ func (a GetProjectDbMetadataResponseDto_Databases_Item) MarshalJSON() ([]byte, e
return json.Marshal(object)
}
-// AsAttributeValueDefault0 returns the union data inside the AttributeValue_Default as a AttributeValueDefault0
-func (t AttributeValue_Default) AsAttributeValueDefault0() (AttributeValueDefault0, error) {
- var body AttributeValueDefault0
+// AsAnalyticsResponseError0 returns the union data inside the AnalyticsResponse_Error as a AnalyticsResponseError0
+func (t AnalyticsResponse_Error) AsAnalyticsResponseError0() (AnalyticsResponseError0, error) {
+ var body AnalyticsResponseError0
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromAttributeValueDefault0 overwrites any union data inside the AttributeValue_Default as the provided AttributeValueDefault0
-func (t *AttributeValue_Default) FromAttributeValueDefault0(v AttributeValueDefault0) error {
+// FromAnalyticsResponseError0 overwrites any union data inside the AnalyticsResponse_Error as the provided AnalyticsResponseError0
+func (t *AnalyticsResponse_Error) FromAnalyticsResponseError0(v AnalyticsResponseError0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeAttributeValueDefault0 performs a merge with any union data inside the AttributeValue_Default, using the provided AttributeValueDefault0
-func (t *AttributeValue_Default) MergeAttributeValueDefault0(v AttributeValueDefault0) error {
+// MergeAnalyticsResponseError0 performs a merge with any union data inside the AnalyticsResponse_Error, using the provided AnalyticsResponseError0
+func (t *AnalyticsResponse_Error) MergeAnalyticsResponseError0(v AnalyticsResponseError0) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -2396,22 +3603,22 @@ func (t *AttributeValue_Default) MergeAttributeValueDefault0(v AttributeValueDef
return err
}
-// AsAttributeValueDefault1 returns the union data inside the AttributeValue_Default as a AttributeValueDefault1
-func (t AttributeValue_Default) AsAttributeValueDefault1() (AttributeValueDefault1, error) {
- var body AttributeValueDefault1
+// AsAnalyticsResponseError1 returns the union data inside the AnalyticsResponse_Error as a AnalyticsResponseError1
+func (t AnalyticsResponse_Error) AsAnalyticsResponseError1() (AnalyticsResponseError1, error) {
+ var body AnalyticsResponseError1
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromAttributeValueDefault1 overwrites any union data inside the AttributeValue_Default as the provided AttributeValueDefault1
-func (t *AttributeValue_Default) FromAttributeValueDefault1(v AttributeValueDefault1) error {
+// FromAnalyticsResponseError1 overwrites any union data inside the AnalyticsResponse_Error as the provided AnalyticsResponseError1
+func (t *AnalyticsResponse_Error) FromAnalyticsResponseError1(v AnalyticsResponseError1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeAttributeValueDefault1 performs a merge with any union data inside the AttributeValue_Default, using the provided AttributeValueDefault1
-func (t *AttributeValue_Default) MergeAttributeValueDefault1(v AttributeValueDefault1) error {
+// MergeAnalyticsResponseError1 performs a merge with any union data inside the AnalyticsResponse_Error, using the provided AnalyticsResponseError1
+func (t *AnalyticsResponse_Error) MergeAnalyticsResponseError1(v AnalyticsResponseError1) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -2422,22 +3629,32 @@ func (t *AttributeValue_Default) MergeAttributeValueDefault1(v AttributeValueDef
return err
}
-// AsAttributeValueDefault2 returns the union data inside the AttributeValue_Default as a AttributeValueDefault2
-func (t AttributeValue_Default) AsAttributeValueDefault2() (AttributeValueDefault2, error) {
- var body AttributeValueDefault2
+func (t AnalyticsResponse_Error) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *AnalyticsResponse_Error) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsApplyProjectAddonBodyAddonVariant0 returns the union data inside the ApplyProjectAddonBody_AddonVariant as a ApplyProjectAddonBodyAddonVariant0
+func (t ApplyProjectAddonBody_AddonVariant) AsApplyProjectAddonBodyAddonVariant0() (ApplyProjectAddonBodyAddonVariant0, error) {
+ var body ApplyProjectAddonBodyAddonVariant0
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromAttributeValueDefault2 overwrites any union data inside the AttributeValue_Default as the provided AttributeValueDefault2
-func (t *AttributeValue_Default) FromAttributeValueDefault2(v AttributeValueDefault2) error {
+// FromApplyProjectAddonBodyAddonVariant0 overwrites any union data inside the ApplyProjectAddonBody_AddonVariant as the provided ApplyProjectAddonBodyAddonVariant0
+func (t *ApplyProjectAddonBody_AddonVariant) FromApplyProjectAddonBodyAddonVariant0(v ApplyProjectAddonBodyAddonVariant0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeAttributeValueDefault2 performs a merge with any union data inside the AttributeValue_Default, using the provided AttributeValueDefault2
-func (t *AttributeValue_Default) MergeAttributeValueDefault2(v AttributeValueDefault2) error {
+// MergeApplyProjectAddonBodyAddonVariant0 performs a merge with any union data inside the ApplyProjectAddonBody_AddonVariant, using the provided ApplyProjectAddonBodyAddonVariant0
+func (t *ApplyProjectAddonBody_AddonVariant) MergeApplyProjectAddonBodyAddonVariant0(v ApplyProjectAddonBodyAddonVariant0) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -2448,22 +3665,22 @@ func (t *AttributeValue_Default) MergeAttributeValueDefault2(v AttributeValueDef
return err
}
-// AsAttributeValueDefault3 returns the union data inside the AttributeValue_Default as a AttributeValueDefault3
-func (t AttributeValue_Default) AsAttributeValueDefault3() (AttributeValueDefault3, error) {
- var body AttributeValueDefault3
+// AsApplyProjectAddonBodyAddonVariant1 returns the union data inside the ApplyProjectAddonBody_AddonVariant as a ApplyProjectAddonBodyAddonVariant1
+func (t ApplyProjectAddonBody_AddonVariant) AsApplyProjectAddonBodyAddonVariant1() (ApplyProjectAddonBodyAddonVariant1, error) {
+ var body ApplyProjectAddonBodyAddonVariant1
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromAttributeValueDefault3 overwrites any union data inside the AttributeValue_Default as the provided AttributeValueDefault3
-func (t *AttributeValue_Default) FromAttributeValueDefault3(v AttributeValueDefault3) error {
+// FromApplyProjectAddonBodyAddonVariant1 overwrites any union data inside the ApplyProjectAddonBody_AddonVariant as the provided ApplyProjectAddonBodyAddonVariant1
+func (t *ApplyProjectAddonBody_AddonVariant) FromApplyProjectAddonBodyAddonVariant1(v ApplyProjectAddonBodyAddonVariant1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeAttributeValueDefault3 performs a merge with any union data inside the AttributeValue_Default, using the provided AttributeValueDefault3
-func (t *AttributeValue_Default) MergeAttributeValueDefault3(v AttributeValueDefault3) error {
+// MergeApplyProjectAddonBodyAddonVariant1 performs a merge with any union data inside the ApplyProjectAddonBody_AddonVariant, using the provided ApplyProjectAddonBodyAddonVariant1
+func (t *ApplyProjectAddonBody_AddonVariant) MergeApplyProjectAddonBodyAddonVariant1(v ApplyProjectAddonBodyAddonVariant1) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -2474,32 +3691,520 @@ func (t *AttributeValue_Default) MergeAttributeValueDefault3(v AttributeValueDef
return err
}
-func (t AttributeValue_Default) MarshalJSON() ([]byte, error) {
- b, err := t.union.MarshalJSON()
- return b, err
+// AsApplyProjectAddonBodyAddonVariant2 returns the union data inside the ApplyProjectAddonBody_AddonVariant as a ApplyProjectAddonBodyAddonVariant2
+func (t ApplyProjectAddonBody_AddonVariant) AsApplyProjectAddonBodyAddonVariant2() (ApplyProjectAddonBodyAddonVariant2, error) {
+ var body ApplyProjectAddonBodyAddonVariant2
+ err := json.Unmarshal(t.union, &body)
+ return body, err
}
-func (t *AttributeValue_Default) UnmarshalJSON(b []byte) error {
- err := t.union.UnmarshalJSON(b)
+// FromApplyProjectAddonBodyAddonVariant2 overwrites any union data inside the ApplyProjectAddonBody_AddonVariant as the provided ApplyProjectAddonBodyAddonVariant2
+func (t *ApplyProjectAddonBody_AddonVariant) FromApplyProjectAddonBodyAddonVariant2(v ApplyProjectAddonBodyAddonVariant2) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeApplyProjectAddonBodyAddonVariant2 performs a merge with any union data inside the ApplyProjectAddonBody_AddonVariant, using the provided ApplyProjectAddonBodyAddonVariant2
+func (t *ApplyProjectAddonBody_AddonVariant) MergeApplyProjectAddonBodyAddonVariant2(v ApplyProjectAddonBodyAddonVariant2) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsApplyProjectAddonBodyAddonVariant3 returns the union data inside the ApplyProjectAddonBody_AddonVariant as a ApplyProjectAddonBodyAddonVariant3
+func (t ApplyProjectAddonBody_AddonVariant) AsApplyProjectAddonBodyAddonVariant3() (ApplyProjectAddonBodyAddonVariant3, error) {
+ var body ApplyProjectAddonBodyAddonVariant3
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromApplyProjectAddonBodyAddonVariant3 overwrites any union data inside the ApplyProjectAddonBody_AddonVariant as the provided ApplyProjectAddonBodyAddonVariant3
+func (t *ApplyProjectAddonBody_AddonVariant) FromApplyProjectAddonBodyAddonVariant3(v ApplyProjectAddonBodyAddonVariant3) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeApplyProjectAddonBodyAddonVariant3 performs a merge with any union data inside the ApplyProjectAddonBody_AddonVariant, using the provided ApplyProjectAddonBodyAddonVariant3
+func (t *ApplyProjectAddonBody_AddonVariant) MergeApplyProjectAddonBodyAddonVariant3(v ApplyProjectAddonBodyAddonVariant3) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+func (t ApplyProjectAddonBody_AddonVariant) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *ApplyProjectAddonBody_AddonVariant) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsCreateSigningKeyBodyPrivateJwk0 returns the union data inside the CreateSigningKeyBody_PrivateJwk as a CreateSigningKeyBodyPrivateJwk0
+func (t CreateSigningKeyBody_PrivateJwk) AsCreateSigningKeyBodyPrivateJwk0() (CreateSigningKeyBodyPrivateJwk0, error) {
+ var body CreateSigningKeyBodyPrivateJwk0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateSigningKeyBodyPrivateJwk0 overwrites any union data inside the CreateSigningKeyBody_PrivateJwk as the provided CreateSigningKeyBodyPrivateJwk0
+func (t *CreateSigningKeyBody_PrivateJwk) FromCreateSigningKeyBodyPrivateJwk0(v CreateSigningKeyBodyPrivateJwk0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateSigningKeyBodyPrivateJwk0 performs a merge with any union data inside the CreateSigningKeyBody_PrivateJwk, using the provided CreateSigningKeyBodyPrivateJwk0
+func (t *CreateSigningKeyBody_PrivateJwk) MergeCreateSigningKeyBodyPrivateJwk0(v CreateSigningKeyBodyPrivateJwk0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsCreateSigningKeyBodyPrivateJwk1 returns the union data inside the CreateSigningKeyBody_PrivateJwk as a CreateSigningKeyBodyPrivateJwk1
+func (t CreateSigningKeyBody_PrivateJwk) AsCreateSigningKeyBodyPrivateJwk1() (CreateSigningKeyBodyPrivateJwk1, error) {
+ var body CreateSigningKeyBodyPrivateJwk1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateSigningKeyBodyPrivateJwk1 overwrites any union data inside the CreateSigningKeyBody_PrivateJwk as the provided CreateSigningKeyBodyPrivateJwk1
+func (t *CreateSigningKeyBody_PrivateJwk) FromCreateSigningKeyBodyPrivateJwk1(v CreateSigningKeyBodyPrivateJwk1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateSigningKeyBodyPrivateJwk1 performs a merge with any union data inside the CreateSigningKeyBody_PrivateJwk, using the provided CreateSigningKeyBodyPrivateJwk1
+func (t *CreateSigningKeyBody_PrivateJwk) MergeCreateSigningKeyBodyPrivateJwk1(v CreateSigningKeyBodyPrivateJwk1) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsCreateSigningKeyBodyPrivateJwk2 returns the union data inside the CreateSigningKeyBody_PrivateJwk as a CreateSigningKeyBodyPrivateJwk2
+func (t CreateSigningKeyBody_PrivateJwk) AsCreateSigningKeyBodyPrivateJwk2() (CreateSigningKeyBodyPrivateJwk2, error) {
+ var body CreateSigningKeyBodyPrivateJwk2
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateSigningKeyBodyPrivateJwk2 overwrites any union data inside the CreateSigningKeyBody_PrivateJwk as the provided CreateSigningKeyBodyPrivateJwk2
+func (t *CreateSigningKeyBody_PrivateJwk) FromCreateSigningKeyBodyPrivateJwk2(v CreateSigningKeyBodyPrivateJwk2) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateSigningKeyBodyPrivateJwk2 performs a merge with any union data inside the CreateSigningKeyBody_PrivateJwk, using the provided CreateSigningKeyBodyPrivateJwk2
+func (t *CreateSigningKeyBody_PrivateJwk) MergeCreateSigningKeyBodyPrivateJwk2(v CreateSigningKeyBodyPrivateJwk2) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsCreateSigningKeyBodyPrivateJwk3 returns the union data inside the CreateSigningKeyBody_PrivateJwk as a CreateSigningKeyBodyPrivateJwk3
+func (t CreateSigningKeyBody_PrivateJwk) AsCreateSigningKeyBodyPrivateJwk3() (CreateSigningKeyBodyPrivateJwk3, error) {
+ var body CreateSigningKeyBodyPrivateJwk3
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromCreateSigningKeyBodyPrivateJwk3 overwrites any union data inside the CreateSigningKeyBody_PrivateJwk as the provided CreateSigningKeyBodyPrivateJwk3
+func (t *CreateSigningKeyBody_PrivateJwk) FromCreateSigningKeyBodyPrivateJwk3(v CreateSigningKeyBodyPrivateJwk3) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeCreateSigningKeyBodyPrivateJwk3 performs a merge with any union data inside the CreateSigningKeyBody_PrivateJwk, using the provided CreateSigningKeyBodyPrivateJwk3
+func (t *CreateSigningKeyBody_PrivateJwk) MergeCreateSigningKeyBodyPrivateJwk3(v CreateSigningKeyBodyPrivateJwk3) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+func (t CreateSigningKeyBody_PrivateJwk) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *CreateSigningKeyBody_PrivateJwk) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsListProjectAddonsResponseAvailableAddonsVariantsId0 returns the union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as a ListProjectAddonsResponseAvailableAddonsVariantsId0
+func (t ListProjectAddonsResponse_AvailableAddons_Variants_Id) AsListProjectAddonsResponseAvailableAddonsVariantsId0() (ListProjectAddonsResponseAvailableAddonsVariantsId0, error) {
+ var body ListProjectAddonsResponseAvailableAddonsVariantsId0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseAvailableAddonsVariantsId0 overwrites any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as the provided ListProjectAddonsResponseAvailableAddonsVariantsId0
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) FromListProjectAddonsResponseAvailableAddonsVariantsId0(v ListProjectAddonsResponseAvailableAddonsVariantsId0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseAvailableAddonsVariantsId0 performs a merge with any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id, using the provided ListProjectAddonsResponseAvailableAddonsVariantsId0
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) MergeListProjectAddonsResponseAvailableAddonsVariantsId0(v ListProjectAddonsResponseAvailableAddonsVariantsId0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsListProjectAddonsResponseAvailableAddonsVariantsId1 returns the union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as a ListProjectAddonsResponseAvailableAddonsVariantsId1
+func (t ListProjectAddonsResponse_AvailableAddons_Variants_Id) AsListProjectAddonsResponseAvailableAddonsVariantsId1() (ListProjectAddonsResponseAvailableAddonsVariantsId1, error) {
+ var body ListProjectAddonsResponseAvailableAddonsVariantsId1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseAvailableAddonsVariantsId1 overwrites any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as the provided ListProjectAddonsResponseAvailableAddonsVariantsId1
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) FromListProjectAddonsResponseAvailableAddonsVariantsId1(v ListProjectAddonsResponseAvailableAddonsVariantsId1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseAvailableAddonsVariantsId1 performs a merge with any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id, using the provided ListProjectAddonsResponseAvailableAddonsVariantsId1
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) MergeListProjectAddonsResponseAvailableAddonsVariantsId1(v ListProjectAddonsResponseAvailableAddonsVariantsId1) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsListProjectAddonsResponseAvailableAddonsVariantsId2 returns the union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as a ListProjectAddonsResponseAvailableAddonsVariantsId2
+func (t ListProjectAddonsResponse_AvailableAddons_Variants_Id) AsListProjectAddonsResponseAvailableAddonsVariantsId2() (ListProjectAddonsResponseAvailableAddonsVariantsId2, error) {
+ var body ListProjectAddonsResponseAvailableAddonsVariantsId2
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseAvailableAddonsVariantsId2 overwrites any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as the provided ListProjectAddonsResponseAvailableAddonsVariantsId2
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) FromListProjectAddonsResponseAvailableAddonsVariantsId2(v ListProjectAddonsResponseAvailableAddonsVariantsId2) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseAvailableAddonsVariantsId2 performs a merge with any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id, using the provided ListProjectAddonsResponseAvailableAddonsVariantsId2
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) MergeListProjectAddonsResponseAvailableAddonsVariantsId2(v ListProjectAddonsResponseAvailableAddonsVariantsId2) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsListProjectAddonsResponseAvailableAddonsVariantsId3 returns the union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as a ListProjectAddonsResponseAvailableAddonsVariantsId3
+func (t ListProjectAddonsResponse_AvailableAddons_Variants_Id) AsListProjectAddonsResponseAvailableAddonsVariantsId3() (ListProjectAddonsResponseAvailableAddonsVariantsId3, error) {
+ var body ListProjectAddonsResponseAvailableAddonsVariantsId3
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseAvailableAddonsVariantsId3 overwrites any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as the provided ListProjectAddonsResponseAvailableAddonsVariantsId3
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) FromListProjectAddonsResponseAvailableAddonsVariantsId3(v ListProjectAddonsResponseAvailableAddonsVariantsId3) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseAvailableAddonsVariantsId3 performs a merge with any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id, using the provided ListProjectAddonsResponseAvailableAddonsVariantsId3
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) MergeListProjectAddonsResponseAvailableAddonsVariantsId3(v ListProjectAddonsResponseAvailableAddonsVariantsId3) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsListProjectAddonsResponseAvailableAddonsVariantsId4 returns the union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as a ListProjectAddonsResponseAvailableAddonsVariantsId4
+func (t ListProjectAddonsResponse_AvailableAddons_Variants_Id) AsListProjectAddonsResponseAvailableAddonsVariantsId4() (ListProjectAddonsResponseAvailableAddonsVariantsId4, error) {
+ var body ListProjectAddonsResponseAvailableAddonsVariantsId4
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseAvailableAddonsVariantsId4 overwrites any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as the provided ListProjectAddonsResponseAvailableAddonsVariantsId4
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) FromListProjectAddonsResponseAvailableAddonsVariantsId4(v ListProjectAddonsResponseAvailableAddonsVariantsId4) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseAvailableAddonsVariantsId4 performs a merge with any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id, using the provided ListProjectAddonsResponseAvailableAddonsVariantsId4
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) MergeListProjectAddonsResponseAvailableAddonsVariantsId4(v ListProjectAddonsResponseAvailableAddonsVariantsId4) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsListProjectAddonsResponseAvailableAddonsVariantsId5 returns the union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as a ListProjectAddonsResponseAvailableAddonsVariantsId5
+func (t ListProjectAddonsResponse_AvailableAddons_Variants_Id) AsListProjectAddonsResponseAvailableAddonsVariantsId5() (ListProjectAddonsResponseAvailableAddonsVariantsId5, error) {
+ var body ListProjectAddonsResponseAvailableAddonsVariantsId5
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseAvailableAddonsVariantsId5 overwrites any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as the provided ListProjectAddonsResponseAvailableAddonsVariantsId5
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) FromListProjectAddonsResponseAvailableAddonsVariantsId5(v ListProjectAddonsResponseAvailableAddonsVariantsId5) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseAvailableAddonsVariantsId5 performs a merge with any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id, using the provided ListProjectAddonsResponseAvailableAddonsVariantsId5
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) MergeListProjectAddonsResponseAvailableAddonsVariantsId5(v ListProjectAddonsResponseAvailableAddonsVariantsId5) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsListProjectAddonsResponseAvailableAddonsVariantsId6 returns the union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as a ListProjectAddonsResponseAvailableAddonsVariantsId6
+func (t ListProjectAddonsResponse_AvailableAddons_Variants_Id) AsListProjectAddonsResponseAvailableAddonsVariantsId6() (ListProjectAddonsResponseAvailableAddonsVariantsId6, error) {
+ var body ListProjectAddonsResponseAvailableAddonsVariantsId6
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseAvailableAddonsVariantsId6 overwrites any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id as the provided ListProjectAddonsResponseAvailableAddonsVariantsId6
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) FromListProjectAddonsResponseAvailableAddonsVariantsId6(v ListProjectAddonsResponseAvailableAddonsVariantsId6) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseAvailableAddonsVariantsId6 performs a merge with any union data inside the ListProjectAddonsResponse_AvailableAddons_Variants_Id, using the provided ListProjectAddonsResponseAvailableAddonsVariantsId6
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) MergeListProjectAddonsResponseAvailableAddonsVariantsId6(v ListProjectAddonsResponseAvailableAddonsVariantsId6) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+func (t ListProjectAddonsResponse_AvailableAddons_Variants_Id) MarshalJSON() ([]byte, error) {
+ b, err := t.union.MarshalJSON()
+ return b, err
+}
+
+func (t *ListProjectAddonsResponse_AvailableAddons_Variants_Id) UnmarshalJSON(b []byte) error {
+ err := t.union.UnmarshalJSON(b)
+ return err
+}
+
+// AsListProjectAddonsResponseSelectedAddonsVariantId0 returns the union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as a ListProjectAddonsResponseSelectedAddonsVariantId0
+func (t ListProjectAddonsResponse_SelectedAddons_Variant_Id) AsListProjectAddonsResponseSelectedAddonsVariantId0() (ListProjectAddonsResponseSelectedAddonsVariantId0, error) {
+ var body ListProjectAddonsResponseSelectedAddonsVariantId0
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseSelectedAddonsVariantId0 overwrites any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as the provided ListProjectAddonsResponseSelectedAddonsVariantId0
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) FromListProjectAddonsResponseSelectedAddonsVariantId0(v ListProjectAddonsResponseSelectedAddonsVariantId0) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseSelectedAddonsVariantId0 performs a merge with any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id, using the provided ListProjectAddonsResponseSelectedAddonsVariantId0
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) MergeListProjectAddonsResponseSelectedAddonsVariantId0(v ListProjectAddonsResponseSelectedAddonsVariantId0) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsListProjectAddonsResponseSelectedAddonsVariantId1 returns the union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as a ListProjectAddonsResponseSelectedAddonsVariantId1
+func (t ListProjectAddonsResponse_SelectedAddons_Variant_Id) AsListProjectAddonsResponseSelectedAddonsVariantId1() (ListProjectAddonsResponseSelectedAddonsVariantId1, error) {
+ var body ListProjectAddonsResponseSelectedAddonsVariantId1
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseSelectedAddonsVariantId1 overwrites any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as the provided ListProjectAddonsResponseSelectedAddonsVariantId1
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) FromListProjectAddonsResponseSelectedAddonsVariantId1(v ListProjectAddonsResponseSelectedAddonsVariantId1) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseSelectedAddonsVariantId1 performs a merge with any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id, using the provided ListProjectAddonsResponseSelectedAddonsVariantId1
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) MergeListProjectAddonsResponseSelectedAddonsVariantId1(v ListProjectAddonsResponseSelectedAddonsVariantId1) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsListProjectAddonsResponseSelectedAddonsVariantId2 returns the union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as a ListProjectAddonsResponseSelectedAddonsVariantId2
+func (t ListProjectAddonsResponse_SelectedAddons_Variant_Id) AsListProjectAddonsResponseSelectedAddonsVariantId2() (ListProjectAddonsResponseSelectedAddonsVariantId2, error) {
+ var body ListProjectAddonsResponseSelectedAddonsVariantId2
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseSelectedAddonsVariantId2 overwrites any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as the provided ListProjectAddonsResponseSelectedAddonsVariantId2
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) FromListProjectAddonsResponseSelectedAddonsVariantId2(v ListProjectAddonsResponseSelectedAddonsVariantId2) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseSelectedAddonsVariantId2 performs a merge with any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id, using the provided ListProjectAddonsResponseSelectedAddonsVariantId2
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) MergeListProjectAddonsResponseSelectedAddonsVariantId2(v ListProjectAddonsResponseSelectedAddonsVariantId2) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsListProjectAddonsResponseSelectedAddonsVariantId3 returns the union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as a ListProjectAddonsResponseSelectedAddonsVariantId3
+func (t ListProjectAddonsResponse_SelectedAddons_Variant_Id) AsListProjectAddonsResponseSelectedAddonsVariantId3() (ListProjectAddonsResponseSelectedAddonsVariantId3, error) {
+ var body ListProjectAddonsResponseSelectedAddonsVariantId3
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseSelectedAddonsVariantId3 overwrites any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as the provided ListProjectAddonsResponseSelectedAddonsVariantId3
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) FromListProjectAddonsResponseSelectedAddonsVariantId3(v ListProjectAddonsResponseSelectedAddonsVariantId3) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseSelectedAddonsVariantId3 performs a merge with any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id, using the provided ListProjectAddonsResponseSelectedAddonsVariantId3
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) MergeListProjectAddonsResponseSelectedAddonsVariantId3(v ListProjectAddonsResponseSelectedAddonsVariantId3) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
+ return err
+}
+
+// AsListProjectAddonsResponseSelectedAddonsVariantId4 returns the union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as a ListProjectAddonsResponseSelectedAddonsVariantId4
+func (t ListProjectAddonsResponse_SelectedAddons_Variant_Id) AsListProjectAddonsResponseSelectedAddonsVariantId4() (ListProjectAddonsResponseSelectedAddonsVariantId4, error) {
+ var body ListProjectAddonsResponseSelectedAddonsVariantId4
+ err := json.Unmarshal(t.union, &body)
+ return body, err
+}
+
+// FromListProjectAddonsResponseSelectedAddonsVariantId4 overwrites any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as the provided ListProjectAddonsResponseSelectedAddonsVariantId4
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) FromListProjectAddonsResponseSelectedAddonsVariantId4(v ListProjectAddonsResponseSelectedAddonsVariantId4) error {
+ b, err := json.Marshal(v)
+ t.union = b
+ return err
+}
+
+// MergeListProjectAddonsResponseSelectedAddonsVariantId4 performs a merge with any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id, using the provided ListProjectAddonsResponseSelectedAddonsVariantId4
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) MergeListProjectAddonsResponseSelectedAddonsVariantId4(v ListProjectAddonsResponseSelectedAddonsVariantId4) error {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return err
+ }
+
+ merged, err := runtime.JSONMerge(t.union, b)
+ t.union = merged
return err
}
-// AsV1AnalyticsResponseError0 returns the union data inside the V1AnalyticsResponse_Error as a V1AnalyticsResponseError0
-func (t V1AnalyticsResponse_Error) AsV1AnalyticsResponseError0() (V1AnalyticsResponseError0, error) {
- var body V1AnalyticsResponseError0
+// AsListProjectAddonsResponseSelectedAddonsVariantId5 returns the union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as a ListProjectAddonsResponseSelectedAddonsVariantId5
+func (t ListProjectAddonsResponse_SelectedAddons_Variant_Id) AsListProjectAddonsResponseSelectedAddonsVariantId5() (ListProjectAddonsResponseSelectedAddonsVariantId5, error) {
+ var body ListProjectAddonsResponseSelectedAddonsVariantId5
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromV1AnalyticsResponseError0 overwrites any union data inside the V1AnalyticsResponse_Error as the provided V1AnalyticsResponseError0
-func (t *V1AnalyticsResponse_Error) FromV1AnalyticsResponseError0(v V1AnalyticsResponseError0) error {
+// FromListProjectAddonsResponseSelectedAddonsVariantId5 overwrites any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as the provided ListProjectAddonsResponseSelectedAddonsVariantId5
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) FromListProjectAddonsResponseSelectedAddonsVariantId5(v ListProjectAddonsResponseSelectedAddonsVariantId5) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeV1AnalyticsResponseError0 performs a merge with any union data inside the V1AnalyticsResponse_Error, using the provided V1AnalyticsResponseError0
-func (t *V1AnalyticsResponse_Error) MergeV1AnalyticsResponseError0(v V1AnalyticsResponseError0) error {
+// MergeListProjectAddonsResponseSelectedAddonsVariantId5 performs a merge with any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id, using the provided ListProjectAddonsResponseSelectedAddonsVariantId5
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) MergeListProjectAddonsResponseSelectedAddonsVariantId5(v ListProjectAddonsResponseSelectedAddonsVariantId5) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -2510,22 +4215,22 @@ func (t *V1AnalyticsResponse_Error) MergeV1AnalyticsResponseError0(v V1Analytics
return err
}
-// AsV1AnalyticsResponseError1 returns the union data inside the V1AnalyticsResponse_Error as a V1AnalyticsResponseError1
-func (t V1AnalyticsResponse_Error) AsV1AnalyticsResponseError1() (V1AnalyticsResponseError1, error) {
- var body V1AnalyticsResponseError1
+// AsListProjectAddonsResponseSelectedAddonsVariantId6 returns the union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as a ListProjectAddonsResponseSelectedAddonsVariantId6
+func (t ListProjectAddonsResponse_SelectedAddons_Variant_Id) AsListProjectAddonsResponseSelectedAddonsVariantId6() (ListProjectAddonsResponseSelectedAddonsVariantId6, error) {
+ var body ListProjectAddonsResponseSelectedAddonsVariantId6
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromV1AnalyticsResponseError1 overwrites any union data inside the V1AnalyticsResponse_Error as the provided V1AnalyticsResponseError1
-func (t *V1AnalyticsResponse_Error) FromV1AnalyticsResponseError1(v V1AnalyticsResponseError1) error {
+// FromListProjectAddonsResponseSelectedAddonsVariantId6 overwrites any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id as the provided ListProjectAddonsResponseSelectedAddonsVariantId6
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) FromListProjectAddonsResponseSelectedAddonsVariantId6(v ListProjectAddonsResponseSelectedAddonsVariantId6) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeV1AnalyticsResponseError1 performs a merge with any union data inside the V1AnalyticsResponse_Error, using the provided V1AnalyticsResponseError1
-func (t *V1AnalyticsResponse_Error) MergeV1AnalyticsResponseError1(v V1AnalyticsResponseError1) error {
+// MergeListProjectAddonsResponseSelectedAddonsVariantId6 performs a merge with any union data inside the ListProjectAddonsResponse_SelectedAddons_Variant_Id, using the provided ListProjectAddonsResponseSelectedAddonsVariantId6
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) MergeListProjectAddonsResponseSelectedAddonsVariantId6(v ListProjectAddonsResponseSelectedAddonsVariantId6) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -2536,32 +4241,32 @@ func (t *V1AnalyticsResponse_Error) MergeV1AnalyticsResponseError1(v V1Analytics
return err
}
-func (t V1AnalyticsResponse_Error) MarshalJSON() ([]byte, error) {
+func (t ListProjectAddonsResponse_SelectedAddons_Variant_Id) MarshalJSON() ([]byte, error) {
b, err := t.union.MarshalJSON()
return b, err
}
-func (t *V1AnalyticsResponse_Error) UnmarshalJSON(b []byte) error {
+func (t *ListProjectAddonsResponse_SelectedAddons_Variant_Id) UnmarshalJSON(b []byte) error {
err := t.union.UnmarshalJSON(b)
return err
}
-// AsAuthHealthResponse returns the union data inside the V1ServiceHealthResponse_Info as a AuthHealthResponse
-func (t V1ServiceHealthResponse_Info) AsAuthHealthResponse() (AuthHealthResponse, error) {
- var body AuthHealthResponse
+// AsV1ServiceHealthResponseInfo0 returns the union data inside the V1ServiceHealthResponse_Info as a V1ServiceHealthResponseInfo0
+func (t V1ServiceHealthResponse_Info) AsV1ServiceHealthResponseInfo0() (V1ServiceHealthResponseInfo0, error) {
+ var body V1ServiceHealthResponseInfo0
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromAuthHealthResponse overwrites any union data inside the V1ServiceHealthResponse_Info as the provided AuthHealthResponse
-func (t *V1ServiceHealthResponse_Info) FromAuthHealthResponse(v AuthHealthResponse) error {
+// FromV1ServiceHealthResponseInfo0 overwrites any union data inside the V1ServiceHealthResponse_Info as the provided V1ServiceHealthResponseInfo0
+func (t *V1ServiceHealthResponse_Info) FromV1ServiceHealthResponseInfo0(v V1ServiceHealthResponseInfo0) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeAuthHealthResponse performs a merge with any union data inside the V1ServiceHealthResponse_Info, using the provided AuthHealthResponse
-func (t *V1ServiceHealthResponse_Info) MergeAuthHealthResponse(v AuthHealthResponse) error {
+// MergeV1ServiceHealthResponseInfo0 performs a merge with any union data inside the V1ServiceHealthResponse_Info, using the provided V1ServiceHealthResponseInfo0
+func (t *V1ServiceHealthResponse_Info) MergeV1ServiceHealthResponseInfo0(v V1ServiceHealthResponseInfo0) error {
b, err := json.Marshal(v)
if err != nil {
return err
@@ -2572,22 +4277,22 @@ func (t *V1ServiceHealthResponse_Info) MergeAuthHealthResponse(v AuthHealthRespo
return err
}
-// AsRealtimeHealthResponse returns the union data inside the V1ServiceHealthResponse_Info as a RealtimeHealthResponse
-func (t V1ServiceHealthResponse_Info) AsRealtimeHealthResponse() (RealtimeHealthResponse, error) {
- var body RealtimeHealthResponse
+// AsV1ServiceHealthResponseInfo1 returns the union data inside the V1ServiceHealthResponse_Info as a V1ServiceHealthResponseInfo1
+func (t V1ServiceHealthResponse_Info) AsV1ServiceHealthResponseInfo1() (V1ServiceHealthResponseInfo1, error) {
+ var body V1ServiceHealthResponseInfo1
err := json.Unmarshal(t.union, &body)
return body, err
}
-// FromRealtimeHealthResponse overwrites any union data inside the V1ServiceHealthResponse_Info as the provided RealtimeHealthResponse
-func (t *V1ServiceHealthResponse_Info) FromRealtimeHealthResponse(v RealtimeHealthResponse) error {
+// FromV1ServiceHealthResponseInfo1 overwrites any union data inside the V1ServiceHealthResponse_Info as the provided V1ServiceHealthResponseInfo1
+func (t *V1ServiceHealthResponse_Info) FromV1ServiceHealthResponseInfo1(v V1ServiceHealthResponseInfo1) error {
b, err := json.Marshal(v)
t.union = b
return err
}
-// MergeRealtimeHealthResponse performs a merge with any union data inside the V1ServiceHealthResponse_Info, using the provided RealtimeHealthResponse
-func (t *V1ServiceHealthResponse_Info) MergeRealtimeHealthResponse(v RealtimeHealthResponse) error {
+// MergeV1ServiceHealthResponseInfo1 performs a merge with any union data inside the V1ServiceHealthResponse_Info, using the provided V1ServiceHealthResponseInfo1
+func (t *V1ServiceHealthResponse_Info) MergeV1ServiceHealthResponseInfo1(v V1ServiceHealthResponseInfo1) error {
b, err := json.Marshal(v)
if err != nil {
return err
diff --git a/pkg/config/api.go b/pkg/config/api.go
index ec7c4f86d8..c29b71a9fc 100644
--- a/pkg/config/api.go
+++ b/pkg/config/api.go
@@ -28,8 +28,8 @@ type (
}
)
-func (a *api) ToUpdatePostgrestConfigBody() v1API.UpdatePostgrestConfigBody {
- body := v1API.UpdatePostgrestConfigBody{}
+func (a *api) ToUpdatePostgrestConfigBody() v1API.V1UpdatePostgrestConfigBody {
+ body := v1API.V1UpdatePostgrestConfigBody{}
// When the api is disabled, remote side it just set the dbSchema to an empty value
if !a.Enabled {
diff --git a/pkg/config/auth.go b/pkg/config/auth.go
index dcbd0f197c..2b0e155d7e 100644
--- a/pkg/config/auth.go
+++ b/pkg/config/auth.go
@@ -6,6 +6,8 @@ import (
"time"
"github.com/go-errors/errors"
+ "github.com/oapi-codegen/nullable"
+ openapi_types "github.com/oapi-codegen/runtime/types"
v1API "github.com/supabase/cli/pkg/api"
"github.com/supabase/cli/pkg/cast"
"github.com/supabase/cli/pkg/diff"
@@ -31,22 +33,22 @@ func (r *PasswordRequirements) UnmarshalText(text []byte) error {
func (r PasswordRequirements) ToChar() v1API.UpdateAuthConfigBodyPasswordRequiredCharacters {
switch r {
case LettersDigits:
- return v1API.AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+ return v1API.UpdateAuthConfigBodyPasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
case LowerUpperLettersDigits:
- return v1API.AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567891
+ return v1API.UpdateAuthConfigBodyPasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567891
case LowerUpperLettersDigitsSymbols:
- return v1API.AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567892
+ return v1API.UpdateAuthConfigBodyPasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567892
}
- return v1API.Empty
+ return v1API.UpdateAuthConfigBodyPasswordRequiredCharactersEmpty
}
func NewPasswordRequirement(c v1API.UpdateAuthConfigBodyPasswordRequiredCharacters) PasswordRequirements {
switch c {
- case v1API.AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:
+ case v1API.UpdateAuthConfigBodyPasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:
return LettersDigits
- case v1API.AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567891:
+ case v1API.UpdateAuthConfigBodyPasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567891:
return LowerUpperLettersDigits
- case v1API.AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567892:
+ case v1API.UpdateAuthConfigBodyPasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567892:
return LowerUpperLettersDigitsSymbols
}
return NoRequirements
@@ -72,7 +74,7 @@ type (
Enabled bool `toml:"enabled"`
Image string `toml:"-"`
- SiteUrl string `toml:"site_url" mapstructure:"site_url"`
+ SiteUrl string `toml:"site_url"`
AdditionalRedirectUrls []string `toml:"additional_redirect_urls"`
JwtExpiry uint `toml:"jwt_expiry"`
EnableRefreshTokenRotation bool `toml:"enable_refresh_token_rotation"`
@@ -82,6 +84,7 @@ type (
EnableAnonymousSignIns bool `toml:"enable_anonymous_sign_ins"`
MinimumPasswordLength uint `toml:"minimum_password_length"`
PasswordRequirements PasswordRequirements `toml:"password_requirements"`
+ SigningKeysPath string `toml:"signing_keys_path"`
RateLimit rateLimit `toml:"rate_limit"`
Captcha *captcha `toml:"captcha"`
@@ -91,11 +94,12 @@ type (
Email email `toml:"email"`
Sms sms `toml:"sms"`
External external `toml:"external"`
+ Web3 web3 `toml:"web3"`
// Custom secrets can be injected from .env file
- JwtSecret string `toml:"-" mapstructure:"jwt_secret"`
- AnonKey string `toml:"-" mapstructure:"anon_key"`
- ServiceRoleKey string `toml:"-" mapstructure:"service_role_key"`
+ JwtSecret Secret `toml:"jwt_secret"`
+ AnonKey Secret `toml:"anon_key"`
+ ServiceRoleKey Secret `toml:"service_role_key"`
ThirdParty thirdParty `toml:"third_party"`
}
@@ -116,6 +120,7 @@ type (
TokenVerifications uint `toml:"token_verifications"`
EmailSent uint `toml:"email_sent"`
SmsSent uint `toml:"sms_sent"`
+ Web3 uint `toml:"web3"`
}
tpaFirebase struct {
@@ -157,13 +162,13 @@ type (
}
smtp struct {
- Enabled bool `toml:"enabled"`
- Host string `toml:"host"`
- Port uint16 `toml:"port"`
- User string `toml:"user"`
- Pass Secret `toml:"pass"`
- AdminEmail string `toml:"admin_email"`
- SenderName string `toml:"sender_name"`
+ Enabled bool `toml:"enabled"`
+ Host string `toml:"host"`
+ Port uint16 `toml:"port"`
+ User string `toml:"user"`
+ Pass Secret `toml:"pass"`
+ AdminEmail openapi_types.Email `toml:"admin_email"`
+ SenderName string `toml:"sender_name"`
}
emailTemplate struct {
@@ -177,11 +182,11 @@ type (
EnableSignup bool `toml:"enable_signup"`
EnableConfirmations bool `toml:"enable_confirmations"`
Template string `toml:"template"`
- Twilio twilioConfig `toml:"twilio" mapstructure:"twilio"`
- TwilioVerify twilioConfig `toml:"twilio_verify" mapstructure:"twilio_verify"`
- Messagebird messagebirdConfig `toml:"messagebird" mapstructure:"messagebird"`
- Textlocal textlocalConfig `toml:"textlocal" mapstructure:"textlocal"`
- Vonage vonageConfig `toml:"vonage" mapstructure:"vonage"`
+ Twilio twilioConfig `toml:"twilio"`
+ TwilioVerify twilioConfig `toml:"twilio_verify"`
+ Messagebird messagebirdConfig `toml:"messagebird"`
+ Textlocal textlocalConfig `toml:"textlocal"`
+ Vonage vonageConfig `toml:"vonage"`
TestOTP map[string]string `toml:"test_otp"`
MaxFrequency time.Duration `toml:"max_frequency"`
}
@@ -198,6 +203,7 @@ type (
CustomAccessToken *hookConfig `toml:"custom_access_token"`
SendSMS *hookConfig `toml:"send_sms"`
SendEmail *hookConfig `toml:"send_email"`
+ BeforeUserCreated *hookConfig `toml:"before_user_created"`
}
factorTypeConfiguration struct {
@@ -234,26 +240,26 @@ type (
Enabled bool `toml:"enabled"`
AccountSid string `toml:"account_sid"`
MessageServiceSid string `toml:"message_service_sid"`
- AuthToken Secret `toml:"auth_token" mapstructure:"auth_token"`
+ AuthToken Secret `toml:"auth_token"`
}
messagebirdConfig struct {
Enabled bool `toml:"enabled"`
Originator string `toml:"originator"`
- AccessKey Secret `toml:"access_key" mapstructure:"access_key"`
+ AccessKey Secret `toml:"access_key"`
}
textlocalConfig struct {
Enabled bool `toml:"enabled"`
Sender string `toml:"sender"`
- ApiKey Secret `toml:"api_key" mapstructure:"api_key"`
+ ApiKey Secret `toml:"api_key"`
}
vonageConfig struct {
Enabled bool `toml:"enabled"`
From string `toml:"from"`
- ApiKey string `toml:"api_key" mapstructure:"api_key"`
- ApiSecret Secret `toml:"api_secret" mapstructure:"api_secret"`
+ ApiKey string `toml:"api_key"`
+ ApiSecret Secret `toml:"api_secret"`
}
provider struct {
@@ -264,25 +270,33 @@ type (
RedirectUri string `toml:"redirect_uri"`
SkipNonceCheck bool `toml:"skip_nonce_check"`
}
+
+ solana struct {
+ Enabled bool `toml:"enabled"`
+ }
+
+ web3 struct {
+ Solana solana `toml:"solana"`
+ }
)
func (a *auth) ToUpdateAuthConfigBody() v1API.UpdateAuthConfigBody {
body := v1API.UpdateAuthConfigBody{
- SiteUrl: &a.SiteUrl,
- UriAllowList: cast.Ptr(strings.Join(a.AdditionalRedirectUrls, ",")),
- JwtExp: cast.UintToIntPtr(&a.JwtExpiry),
- RefreshTokenRotationEnabled: &a.EnableRefreshTokenRotation,
- SecurityRefreshTokenReuseInterval: cast.UintToIntPtr(&a.RefreshTokenReuseInterval),
- SecurityManualLinkingEnabled: &a.EnableManualLinking,
- DisableSignup: cast.Ptr(!a.EnableSignup),
- ExternalAnonymousUsersEnabled: &a.EnableAnonymousSignIns,
- PasswordMinLength: cast.UintToIntPtr(&a.MinimumPasswordLength),
- PasswordRequiredCharacters: cast.Ptr(a.PasswordRequirements.ToChar()),
+ SiteUrl: nullable.NewNullableWithValue(a.SiteUrl),
+ UriAllowList: nullable.NewNullableWithValue(strings.Join(a.AdditionalRedirectUrls, ",")),
+ JwtExp: nullable.NewNullableWithValue(cast.UintToInt(a.JwtExpiry)),
+ RefreshTokenRotationEnabled: nullable.NewNullableWithValue(a.EnableRefreshTokenRotation),
+ SecurityRefreshTokenReuseInterval: nullable.NewNullableWithValue(cast.UintToInt(a.RefreshTokenReuseInterval)),
+ SecurityManualLinkingEnabled: nullable.NewNullableWithValue(a.EnableManualLinking),
+ DisableSignup: nullable.NewNullableWithValue(!a.EnableSignup),
+ ExternalAnonymousUsersEnabled: nullable.NewNullableWithValue(a.EnableAnonymousSignIns),
+ PasswordMinLength: nullable.NewNullableWithValue(cast.UintToInt(a.MinimumPasswordLength)),
+ PasswordRequiredCharacters: nullable.NewNullableWithValue(a.PasswordRequirements.ToChar()),
}
// Add rate limit fields
a.RateLimit.toAuthConfigBody(&body)
if s := a.Email.Smtp; s != nil && s.Enabled {
- body.RateLimitEmailSent = cast.Ptr(cast.UintToInt(a.RateLimit.EmailSent))
+ body.RateLimitEmailSent = nullable.NewNullableWithValue(cast.UintToInt(a.RateLimit.EmailSent))
}
// When local config is not set, we assume platform defaults should not change
if a.Captcha != nil {
@@ -294,24 +308,25 @@ func (a *auth) ToUpdateAuthConfigBody() v1API.UpdateAuthConfigBody {
a.Email.toAuthConfigBody(&body)
a.Sms.toAuthConfigBody(&body)
a.External.toAuthConfigBody(&body)
+ a.Web3.toAuthConfigBody(&body)
return body
}
func (a *auth) FromRemoteAuthConfig(remoteConfig v1API.AuthConfigResponse) {
- a.SiteUrl = cast.Val(remoteConfig.SiteUrl, "")
- a.AdditionalRedirectUrls = strToArr(cast.Val(remoteConfig.UriAllowList, ""))
- a.JwtExpiry = cast.IntToUint(cast.Val(remoteConfig.JwtExp, 0))
- a.EnableRefreshTokenRotation = cast.Val(remoteConfig.RefreshTokenRotationEnabled, false)
- a.RefreshTokenReuseInterval = cast.IntToUint(cast.Val(remoteConfig.SecurityRefreshTokenReuseInterval, 0))
- a.EnableManualLinking = cast.Val(remoteConfig.SecurityManualLinkingEnabled, false)
- a.EnableSignup = !cast.Val(remoteConfig.DisableSignup, false)
- a.EnableAnonymousSignIns = cast.Val(remoteConfig.ExternalAnonymousUsersEnabled, false)
- a.MinimumPasswordLength = cast.IntToUint(cast.Val(remoteConfig.PasswordMinLength, 0))
- prc := cast.Val(remoteConfig.PasswordRequiredCharacters, "")
+ a.SiteUrl = ValOrDefault(remoteConfig.SiteUrl, "")
+ a.AdditionalRedirectUrls = strToArr(ValOrDefault(remoteConfig.UriAllowList, ""))
+ a.JwtExpiry = cast.IntToUint(ValOrDefault(remoteConfig.JwtExp, 0))
+ a.EnableRefreshTokenRotation = ValOrDefault(remoteConfig.RefreshTokenRotationEnabled, false)
+ a.RefreshTokenReuseInterval = cast.IntToUint(ValOrDefault(remoteConfig.SecurityRefreshTokenReuseInterval, 0))
+ a.EnableManualLinking = ValOrDefault(remoteConfig.SecurityManualLinkingEnabled, false)
+ a.EnableSignup = !ValOrDefault(remoteConfig.DisableSignup, false)
+ a.EnableAnonymousSignIns = ValOrDefault(remoteConfig.ExternalAnonymousUsersEnabled, false)
+ a.MinimumPasswordLength = cast.IntToUint(ValOrDefault(remoteConfig.PasswordMinLength, 0))
+ prc := ValOrDefault(remoteConfig.PasswordRequiredCharacters, "")
a.PasswordRequirements = NewPasswordRequirement(v1API.UpdateAuthConfigBodyPasswordRequiredCharacters(prc))
a.RateLimit.fromAuthConfig(remoteConfig)
if s := a.Email.Smtp; s != nil && s.Enabled {
- a.RateLimit.EmailSent = cast.IntToUint(cast.Val(remoteConfig.RateLimitEmailSent, 0))
+ a.RateLimit.EmailSent = cast.IntToUint(ValOrDefault(remoteConfig.RateLimitEmailSent, 0))
}
a.Captcha.fromAuthConfig(remoteConfig)
a.Hook.fromAuthConfig(remoteConfig)
@@ -320,31 +335,34 @@ func (a *auth) FromRemoteAuthConfig(remoteConfig v1API.AuthConfigResponse) {
a.Email.fromAuthConfig(remoteConfig)
a.Sms.fromAuthConfig(remoteConfig)
a.External.fromAuthConfig(remoteConfig)
+ a.Web3.fromAuthConfig(remoteConfig)
}
func (r rateLimit) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
- body.RateLimitAnonymousUsers = cast.Ptr(cast.UintToInt(r.AnonymousUsers))
- body.RateLimitTokenRefresh = cast.Ptr(cast.UintToInt(r.TokenRefresh))
- body.RateLimitOtp = cast.Ptr(cast.UintToInt(r.SignInSignUps))
- body.RateLimitVerify = cast.Ptr(cast.UintToInt(r.TokenVerifications))
+ body.RateLimitAnonymousUsers = nullable.NewNullableWithValue(cast.UintToInt(r.AnonymousUsers))
+ body.RateLimitTokenRefresh = nullable.NewNullableWithValue(cast.UintToInt(r.TokenRefresh))
+ body.RateLimitOtp = nullable.NewNullableWithValue(cast.UintToInt(r.SignInSignUps))
+ body.RateLimitVerify = nullable.NewNullableWithValue(cast.UintToInt(r.TokenVerifications))
// Email rate limit is only updated when SMTP is enabled
- body.RateLimitSmsSent = cast.Ptr(cast.UintToInt(r.SmsSent))
+ body.RateLimitSmsSent = nullable.NewNullableWithValue(cast.UintToInt(r.SmsSent))
+ body.RateLimitWeb3 = nullable.NewNullableWithValue((cast.UintToInt(r.Web3)))
}
func (r *rateLimit) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
- r.AnonymousUsers = cast.IntToUint(cast.Val(remoteConfig.RateLimitAnonymousUsers, 0))
- r.TokenRefresh = cast.IntToUint(cast.Val(remoteConfig.RateLimitTokenRefresh, 0))
- r.SignInSignUps = cast.IntToUint(cast.Val(remoteConfig.RateLimitOtp, 0))
- r.TokenVerifications = cast.IntToUint(cast.Val(remoteConfig.RateLimitVerify, 0))
+ r.AnonymousUsers = cast.IntToUint(ValOrDefault(remoteConfig.RateLimitAnonymousUsers, 0))
+ r.TokenRefresh = cast.IntToUint(ValOrDefault(remoteConfig.RateLimitTokenRefresh, 0))
+ r.SignInSignUps = cast.IntToUint(ValOrDefault(remoteConfig.RateLimitOtp, 0))
+ r.TokenVerifications = cast.IntToUint(ValOrDefault(remoteConfig.RateLimitVerify, 0))
// Email rate limit is only updated when SMTP is enabled
- r.SmsSent = cast.IntToUint(cast.Val(remoteConfig.RateLimitSmsSent, 0))
+ r.SmsSent = cast.IntToUint(ValOrDefault(remoteConfig.RateLimitSmsSent, 0))
+ r.Web3 = cast.IntToUint(ValOrDefault(remoteConfig.RateLimitWeb3, 0))
}
func (c captcha) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
- if body.SecurityCaptchaEnabled = &c.Enabled; c.Enabled {
- body.SecurityCaptchaProvider = cast.Ptr(string(c.Provider))
+ if body.SecurityCaptchaEnabled = nullable.NewNullableWithValue(c.Enabled); c.Enabled {
+ body.SecurityCaptchaProvider = nullable.NewNullableWithValue(v1API.UpdateAuthConfigBodySecurityCaptchaProvider(c.Provider))
if len(c.Secret.SHA256) > 0 {
- body.SecurityCaptchaSecret = &c.Secret.Value
+ body.SecurityCaptchaSecret = nullable.NewNullableWithValue(c.Secret.Value)
}
}
}
@@ -356,153 +374,171 @@ func (c *captcha) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
}
// Ignore disabled captcha fields to minimise config diff
if c.Enabled {
- c.Provider = CaptchaProvider(cast.Val(remoteConfig.SecurityCaptchaProvider, ""))
+ c.Provider = CaptchaProvider(ValOrDefault(remoteConfig.SecurityCaptchaProvider, ""))
if len(c.Secret.SHA256) > 0 {
- c.Secret.SHA256 = cast.Val(remoteConfig.SecurityCaptchaSecret, "")
+ c.Secret.SHA256 = ValOrDefault(remoteConfig.SecurityCaptchaSecret, "")
}
}
- c.Enabled = cast.Val(remoteConfig.SecurityCaptchaEnabled, false)
+ c.Enabled = ValOrDefault(remoteConfig.SecurityCaptchaEnabled, false)
}
func (h hook) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
// When local config is not set, we assume platform defaults should not change
+ if hook := h.BeforeUserCreated; hook != nil {
+ if body.HookBeforeUserCreatedEnabled = nullable.NewNullableWithValue(hook.Enabled); hook.Enabled {
+ body.HookBeforeUserCreatedUri = nullable.NewNullableWithValue(hook.URI)
+ if len(hook.Secrets.SHA256) > 0 {
+ body.HookBeforeUserCreatedSecrets = nullable.NewNullableWithValue(hook.Secrets.Value)
+ }
+ }
+ }
if hook := h.CustomAccessToken; hook != nil {
- if body.HookCustomAccessTokenEnabled = &hook.Enabled; hook.Enabled {
- body.HookCustomAccessTokenUri = &hook.URI
+ if body.HookCustomAccessTokenEnabled = nullable.NewNullableWithValue(hook.Enabled); hook.Enabled {
+ body.HookCustomAccessTokenUri = nullable.NewNullableWithValue(hook.URI)
if len(hook.Secrets.SHA256) > 0 {
- body.HookCustomAccessTokenSecrets = &hook.Secrets.Value
+ body.HookCustomAccessTokenSecrets = nullable.NewNullableWithValue(hook.Secrets.Value)
}
}
}
if hook := h.SendEmail; hook != nil {
- if body.HookSendEmailEnabled = &hook.Enabled; hook.Enabled {
- body.HookSendEmailUri = &hook.URI
+ if body.HookSendEmailEnabled = nullable.NewNullableWithValue(hook.Enabled); hook.Enabled {
+ body.HookSendEmailUri = nullable.NewNullableWithValue(hook.URI)
if len(hook.Secrets.SHA256) > 0 {
- body.HookSendEmailSecrets = &hook.Secrets.Value
+ body.HookSendEmailSecrets = nullable.NewNullableWithValue(hook.Secrets.Value)
}
}
}
if hook := h.SendSMS; hook != nil {
- if body.HookSendSmsEnabled = &hook.Enabled; hook.Enabled {
- body.HookSendSmsUri = &hook.URI
+ if body.HookSendSmsEnabled = nullable.NewNullableWithValue(hook.Enabled); hook.Enabled {
+ body.HookSendSmsUri = nullable.NewNullableWithValue(hook.URI)
if len(hook.Secrets.SHA256) > 0 {
- body.HookSendSmsSecrets = &hook.Secrets.Value
+ body.HookSendSmsSecrets = nullable.NewNullableWithValue(hook.Secrets.Value)
}
}
}
// Enterprise and team only features
if hook := h.MFAVerificationAttempt; hook != nil {
- if body.HookMfaVerificationAttemptEnabled = &hook.Enabled; hook.Enabled {
- body.HookMfaVerificationAttemptUri = &hook.URI
+ if body.HookMfaVerificationAttemptEnabled = nullable.NewNullableWithValue(hook.Enabled); hook.Enabled {
+ body.HookMfaVerificationAttemptUri = nullable.NewNullableWithValue(hook.URI)
if len(hook.Secrets.SHA256) > 0 {
- body.HookMfaVerificationAttemptSecrets = &hook.Secrets.Value
+ body.HookMfaVerificationAttemptSecrets = nullable.NewNullableWithValue(hook.Secrets.Value)
}
}
}
if hook := h.PasswordVerificationAttempt; hook != nil {
- if body.HookPasswordVerificationAttemptEnabled = &hook.Enabled; hook.Enabled {
- body.HookPasswordVerificationAttemptUri = &hook.URI
+ if body.HookPasswordVerificationAttemptEnabled = nullable.NewNullableWithValue(hook.Enabled); hook.Enabled {
+ body.HookPasswordVerificationAttemptUri = nullable.NewNullableWithValue(hook.URI)
if len(hook.Secrets.SHA256) > 0 {
- body.HookPasswordVerificationAttemptSecrets = &hook.Secrets.Value
+ body.HookPasswordVerificationAttemptSecrets = nullable.NewNullableWithValue(hook.Secrets.Value)
}
}
}
}
func (h *hook) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
// When local config is not set, we assume platform defaults should not change
+ if hook := h.BeforeUserCreated; hook != nil {
+ // Ignore disabled hooks because their envs are not loaded
+ if hook.Enabled {
+ hook.URI = ValOrDefault(remoteConfig.HookBeforeUserCreatedUri, "")
+ if len(hook.Secrets.SHA256) > 0 {
+ hook.Secrets.SHA256 = ValOrDefault(remoteConfig.HookBeforeUserCreatedSecrets, "")
+ }
+ }
+ hook.Enabled = ValOrDefault(remoteConfig.HookBeforeUserCreatedEnabled, false)
+ }
if hook := h.CustomAccessToken; hook != nil {
// Ignore disabled hooks because their envs are not loaded
if hook.Enabled {
- hook.URI = cast.Val(remoteConfig.HookCustomAccessTokenUri, "")
+ hook.URI = ValOrDefault(remoteConfig.HookCustomAccessTokenUri, "")
if len(hook.Secrets.SHA256) > 0 {
- hook.Secrets.SHA256 = cast.Val(remoteConfig.HookCustomAccessTokenSecrets, "")
+ hook.Secrets.SHA256 = ValOrDefault(remoteConfig.HookCustomAccessTokenSecrets, "")
}
}
- hook.Enabled = cast.Val(remoteConfig.HookCustomAccessTokenEnabled, false)
+ hook.Enabled = ValOrDefault(remoteConfig.HookCustomAccessTokenEnabled, false)
}
if hook := h.SendEmail; hook != nil {
if hook.Enabled {
- hook.URI = cast.Val(remoteConfig.HookSendEmailUri, "")
+ hook.URI = ValOrDefault(remoteConfig.HookSendEmailUri, "")
if len(hook.Secrets.SHA256) > 0 {
- hook.Secrets.SHA256 = cast.Val(remoteConfig.HookSendEmailSecrets, "")
+ hook.Secrets.SHA256 = ValOrDefault(remoteConfig.HookSendEmailSecrets, "")
}
}
- hook.Enabled = cast.Val(remoteConfig.HookSendEmailEnabled, false)
+ hook.Enabled = ValOrDefault(remoteConfig.HookSendEmailEnabled, false)
}
if hook := h.SendSMS; hook != nil {
if hook.Enabled {
- hook.URI = cast.Val(remoteConfig.HookSendSmsUri, "")
+ hook.URI = ValOrDefault(remoteConfig.HookSendSmsUri, "")
if len(hook.Secrets.SHA256) > 0 {
- hook.Secrets.SHA256 = cast.Val(remoteConfig.HookSendSmsSecrets, "")
+ hook.Secrets.SHA256 = ValOrDefault(remoteConfig.HookSendSmsSecrets, "")
}
}
- hook.Enabled = cast.Val(remoteConfig.HookSendSmsEnabled, false)
+ hook.Enabled = ValOrDefault(remoteConfig.HookSendSmsEnabled, false)
}
// Enterprise and team only features
if hook := h.MFAVerificationAttempt; hook != nil {
if hook.Enabled {
- hook.URI = cast.Val(remoteConfig.HookMfaVerificationAttemptUri, "")
+ hook.URI = ValOrDefault(remoteConfig.HookMfaVerificationAttemptUri, "")
if len(hook.Secrets.SHA256) > 0 {
- hook.Secrets.SHA256 = cast.Val(remoteConfig.HookMfaVerificationAttemptSecrets, "")
+ hook.Secrets.SHA256 = ValOrDefault(remoteConfig.HookMfaVerificationAttemptSecrets, "")
}
}
- hook.Enabled = cast.Val(remoteConfig.HookMfaVerificationAttemptEnabled, false)
+ hook.Enabled = ValOrDefault(remoteConfig.HookMfaVerificationAttemptEnabled, false)
}
if hook := h.PasswordVerificationAttempt; hook != nil {
if hook.Enabled {
- hook.URI = cast.Val(remoteConfig.HookPasswordVerificationAttemptUri, "")
+ hook.URI = ValOrDefault(remoteConfig.HookPasswordVerificationAttemptUri, "")
if len(hook.Secrets.SHA256) > 0 {
- hook.Secrets.SHA256 = cast.Val(remoteConfig.HookPasswordVerificationAttemptSecrets, "")
+ hook.Secrets.SHA256 = ValOrDefault(remoteConfig.HookPasswordVerificationAttemptSecrets, "")
}
}
- hook.Enabled = cast.Val(remoteConfig.HookPasswordVerificationAttemptEnabled, false)
+ hook.Enabled = ValOrDefault(remoteConfig.HookPasswordVerificationAttemptEnabled, false)
}
}
func (m mfa) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
- body.MfaMaxEnrolledFactors = cast.UintToIntPtr(&m.MaxEnrolledFactors)
- body.MfaTotpEnrollEnabled = &m.TOTP.EnrollEnabled
- body.MfaTotpVerifyEnabled = &m.TOTP.VerifyEnabled
- body.MfaPhoneEnrollEnabled = &m.Phone.EnrollEnabled
- body.MfaPhoneVerifyEnabled = &m.Phone.VerifyEnabled
- body.MfaPhoneOtpLength = cast.UintToIntPtr(&m.Phone.OtpLength)
- body.MfaPhoneTemplate = &m.Phone.Template
- body.MfaPhoneMaxFrequency = cast.Ptr(int(m.Phone.MaxFrequency.Seconds()))
- body.MfaWebAuthnEnrollEnabled = &m.WebAuthn.EnrollEnabled
- body.MfaWebAuthnVerifyEnabled = &m.WebAuthn.VerifyEnabled
+ body.MfaMaxEnrolledFactors = nullable.NewNullableWithValue(cast.UintToInt(m.MaxEnrolledFactors))
+ body.MfaTotpEnrollEnabled = nullable.NewNullableWithValue(m.TOTP.EnrollEnabled)
+ body.MfaTotpVerifyEnabled = nullable.NewNullableWithValue(m.TOTP.VerifyEnabled)
+ body.MfaPhoneEnrollEnabled = nullable.NewNullableWithValue(m.Phone.EnrollEnabled)
+ body.MfaPhoneVerifyEnabled = nullable.NewNullableWithValue(m.Phone.VerifyEnabled)
+ body.MfaPhoneOtpLength = nullable.NewNullableWithValue(cast.UintToInt(m.Phone.OtpLength))
+ body.MfaPhoneTemplate = nullable.NewNullableWithValue(m.Phone.Template)
+ body.MfaPhoneMaxFrequency = nullable.NewNullableWithValue(int(m.Phone.MaxFrequency.Seconds()))
+ body.MfaWebAuthnEnrollEnabled = nullable.NewNullableWithValue(m.WebAuthn.EnrollEnabled)
+ body.MfaWebAuthnVerifyEnabled = nullable.NewNullableWithValue(m.WebAuthn.VerifyEnabled)
}
func (m *mfa) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
- m.MaxEnrolledFactors = cast.IntToUint(cast.Val(remoteConfig.MfaMaxEnrolledFactors, 0))
- m.TOTP.EnrollEnabled = cast.Val(remoteConfig.MfaTotpEnrollEnabled, false)
- m.TOTP.VerifyEnabled = cast.Val(remoteConfig.MfaTotpVerifyEnabled, false)
- m.Phone.EnrollEnabled = cast.Val(remoteConfig.MfaPhoneEnrollEnabled, false)
- m.Phone.VerifyEnabled = cast.Val(remoteConfig.MfaPhoneVerifyEnabled, false)
+ m.MaxEnrolledFactors = cast.IntToUint(ValOrDefault(remoteConfig.MfaMaxEnrolledFactors, 0))
+ m.TOTP.EnrollEnabled = ValOrDefault(remoteConfig.MfaTotpEnrollEnabled, false)
+ m.TOTP.VerifyEnabled = ValOrDefault(remoteConfig.MfaTotpVerifyEnabled, false)
+ m.Phone.EnrollEnabled = ValOrDefault(remoteConfig.MfaPhoneEnrollEnabled, false)
+ m.Phone.VerifyEnabled = ValOrDefault(remoteConfig.MfaPhoneVerifyEnabled, false)
m.Phone.OtpLength = cast.IntToUint(remoteConfig.MfaPhoneOtpLength)
- m.Phone.Template = cast.Val(remoteConfig.MfaPhoneTemplate, "")
- m.Phone.MaxFrequency = time.Duration(cast.Val(remoteConfig.MfaPhoneMaxFrequency, 0)) * time.Second
- m.WebAuthn.EnrollEnabled = cast.Val(remoteConfig.MfaWebAuthnEnrollEnabled, false)
- m.WebAuthn.VerifyEnabled = cast.Val(remoteConfig.MfaWebAuthnVerifyEnabled, false)
+ m.Phone.Template = ValOrDefault(remoteConfig.MfaPhoneTemplate, "")
+ m.Phone.MaxFrequency = time.Duration(ValOrDefault(remoteConfig.MfaPhoneMaxFrequency, 0)) * time.Second
+ m.WebAuthn.EnrollEnabled = ValOrDefault(remoteConfig.MfaWebAuthnEnrollEnabled, false)
+ m.WebAuthn.VerifyEnabled = ValOrDefault(remoteConfig.MfaWebAuthnVerifyEnabled, false)
}
func (s sessions) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
- body.SessionsTimebox = cast.Ptr(int(s.Timebox.Seconds()))
- body.SessionsInactivityTimeout = cast.Ptr(int(s.InactivityTimeout.Seconds()))
+ body.SessionsTimebox = nullable.NewNullableWithValue(int(s.Timebox.Hours()))
+ body.SessionsInactivityTimeout = nullable.NewNullableWithValue(int(s.InactivityTimeout.Hours()))
}
func (s *sessions) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
- s.Timebox = time.Duration(cast.Val(remoteConfig.SessionsTimebox, 0)) * time.Second
- s.InactivityTimeout = time.Duration(cast.Val(remoteConfig.SessionsInactivityTimeout, 0)) * time.Second
+ s.Timebox = time.Duration(ValOrDefault(remoteConfig.SessionsTimebox, 0)) * time.Hour
+ s.InactivityTimeout = time.Duration(ValOrDefault(remoteConfig.SessionsInactivityTimeout, 0)) * time.Hour
}
func (e email) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
- body.ExternalEmailEnabled = &e.EnableSignup
- body.MailerSecureEmailChangeEnabled = &e.DoubleConfirmChanges
- body.MailerAutoconfirm = cast.Ptr(!e.EnableConfirmations)
- body.MailerOtpLength = cast.UintToIntPtr(&e.OtpLength)
+ body.ExternalEmailEnabled = nullable.NewNullableWithValue(e.EnableSignup)
+ body.MailerSecureEmailChangeEnabled = nullable.NewNullableWithValue(e.DoubleConfirmChanges)
+ body.MailerAutoconfirm = nullable.NewNullableWithValue(!e.EnableConfirmations)
+ body.MailerOtpLength = nullable.NewNullableWithValue(cast.UintToInt(e.OtpLength))
body.MailerOtpExp = cast.UintToIntPtr(&e.OtpExpiry)
- body.SecurityUpdatePasswordRequireReauthentication = &e.SecurePasswordChange
- body.SmtpMaxFrequency = cast.Ptr(int(e.MaxFrequency.Seconds()))
+ body.SecurityUpdatePasswordRequireReauthentication = nullable.NewNullableWithValue(e.SecurePasswordChange)
+ body.SmtpMaxFrequency = nullable.NewNullableWithValue(int(e.MaxFrequency.Seconds()))
// When local config is not set, we assume platform defaults should not change
if e.Smtp != nil {
e.Smtp.toAuthConfigBody(body)
@@ -512,88 +548,160 @@ func (e email) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
}
var tmpl *emailTemplate
tmpl = cast.Ptr(e.Template["invite"])
- body.MailerSubjectsInvite = tmpl.Subject
- body.MailerTemplatesInviteContent = tmpl.Content
+ if tmpl.Subject != nil {
+ body.MailerSubjectsInvite = nullable.NewNullableWithValue(*tmpl.Subject)
+ }
+ if tmpl.Content != nil {
+ body.MailerTemplatesInviteContent = nullable.NewNullableWithValue(*tmpl.Content)
+ }
tmpl = cast.Ptr(e.Template["confirmation"])
- body.MailerSubjectsConfirmation = tmpl.Subject
- body.MailerTemplatesConfirmationContent = tmpl.Content
+ if tmpl.Subject != nil {
+ body.MailerSubjectsConfirmation = nullable.NewNullableWithValue(*tmpl.Subject)
+ }
+ if tmpl.Content != nil {
+ body.MailerTemplatesConfirmationContent = nullable.NewNullableWithValue(*tmpl.Content)
+ }
tmpl = cast.Ptr(e.Template["recovery"])
- body.MailerSubjectsRecovery = tmpl.Subject
- body.MailerTemplatesRecoveryContent = tmpl.Content
+ if tmpl.Subject != nil {
+ body.MailerSubjectsRecovery = nullable.NewNullableWithValue(*tmpl.Subject)
+ }
+ if tmpl.Content != nil {
+ body.MailerTemplatesRecoveryContent = nullable.NewNullableWithValue(*tmpl.Content)
+ }
tmpl = cast.Ptr(e.Template["magic_link"])
- body.MailerSubjectsMagicLink = tmpl.Subject
- body.MailerTemplatesMagicLinkContent = tmpl.Content
+ if tmpl.Subject != nil {
+ body.MailerSubjectsMagicLink = nullable.NewNullableWithValue(*tmpl.Subject)
+ }
+ if tmpl.Content != nil {
+ body.MailerTemplatesMagicLinkContent = nullable.NewNullableWithValue(*tmpl.Content)
+ }
tmpl = cast.Ptr(e.Template["email_change"])
- body.MailerSubjectsEmailChange = tmpl.Subject
- body.MailerTemplatesEmailChangeContent = tmpl.Content
+ if tmpl.Subject != nil {
+ body.MailerSubjectsEmailChange = nullable.NewNullableWithValue(*tmpl.Subject)
+ }
+ if tmpl.Content != nil {
+ body.MailerTemplatesEmailChangeContent = nullable.NewNullableWithValue(*tmpl.Content)
+ }
tmpl = cast.Ptr(e.Template["reauthentication"])
- body.MailerSubjectsReauthentication = tmpl.Subject
- body.MailerTemplatesReauthenticationContent = tmpl.Content
+ if tmpl.Subject != nil {
+ body.MailerSubjectsReauthentication = nullable.NewNullableWithValue(*tmpl.Subject)
+ }
+ if tmpl.Content != nil {
+ body.MailerTemplatesReauthenticationContent = nullable.NewNullableWithValue(*tmpl.Content)
+ }
}
func (e *email) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
- e.EnableSignup = cast.Val(remoteConfig.ExternalEmailEnabled, false)
- e.DoubleConfirmChanges = cast.Val(remoteConfig.MailerSecureEmailChangeEnabled, false)
- e.EnableConfirmations = !cast.Val(remoteConfig.MailerAutoconfirm, false)
- e.OtpLength = cast.IntToUint(cast.Val(remoteConfig.MailerOtpLength, 0))
+ e.EnableSignup = ValOrDefault(remoteConfig.ExternalEmailEnabled, false)
+ e.DoubleConfirmChanges = ValOrDefault(remoteConfig.MailerSecureEmailChangeEnabled, false)
+ e.EnableConfirmations = !ValOrDefault(remoteConfig.MailerAutoconfirm, false)
+ e.OtpLength = cast.IntToUint(ValOrDefault(remoteConfig.MailerOtpLength, 0))
e.OtpExpiry = cast.IntToUint(remoteConfig.MailerOtpExp)
- e.SecurePasswordChange = cast.Val(remoteConfig.SecurityUpdatePasswordRequireReauthentication, false)
- e.MaxFrequency = time.Duration(cast.Val(remoteConfig.SmtpMaxFrequency, 0)) * time.Second
+ e.SecurePasswordChange = ValOrDefault(remoteConfig.SecurityUpdatePasswordRequireReauthentication, false)
+ e.MaxFrequency = time.Duration(ValOrDefault(remoteConfig.SmtpMaxFrequency, 0)) * time.Second
e.Smtp.fromAuthConfig(remoteConfig)
if len(e.Template) == 0 {
return
}
if t, ok := e.Template["invite"]; ok {
if t.Subject != nil {
- t.Subject = remoteConfig.MailerSubjectsInvite
+ if value, err := remoteConfig.MailerSubjectsInvite.Get(); err == nil {
+ t.Subject = &value
+ } else {
+ t.Subject = nil
+ }
}
if t.Content != nil {
- t.Content = remoteConfig.MailerTemplatesInviteContent
+ if value, err := remoteConfig.MailerTemplatesInviteContent.Get(); err == nil {
+ t.Content = &value
+ } else {
+ t.Content = nil
+ }
}
e.Template["invite"] = t
}
if t, ok := e.Template["confirmation"]; ok {
if t.Subject != nil {
- t.Subject = remoteConfig.MailerSubjectsConfirmation
+ if value, err := remoteConfig.MailerSubjectsConfirmation.Get(); err == nil {
+ t.Subject = &value
+ } else {
+ t.Subject = nil
+ }
}
if t.Content != nil {
- t.Content = remoteConfig.MailerTemplatesConfirmationContent
+ if value, err := remoteConfig.MailerTemplatesConfirmationContent.Get(); err == nil {
+ t.Content = &value
+ } else {
+ t.Content = nil
+ }
}
e.Template["confirmation"] = t
}
if t, ok := e.Template["recovery"]; ok {
if t.Subject != nil {
- t.Subject = remoteConfig.MailerSubjectsRecovery
+ if value, err := remoteConfig.MailerSubjectsRecovery.Get(); err == nil {
+ t.Subject = &value
+ } else {
+ t.Subject = nil
+ }
}
if t.Content != nil {
- t.Content = remoteConfig.MailerTemplatesRecoveryContent
+ if value, err := remoteConfig.MailerTemplatesRecoveryContent.Get(); err == nil {
+ t.Content = &value
+ } else {
+ t.Content = nil
+ }
}
e.Template["recovery"] = t
}
if t, ok := e.Template["magic_link"]; ok {
if t.Subject != nil {
- t.Subject = remoteConfig.MailerSubjectsMagicLink
+ if value, err := remoteConfig.MailerSubjectsMagicLink.Get(); err == nil {
+ t.Subject = &value
+ } else {
+ t.Subject = nil
+ }
}
if t.Content != nil {
- t.Content = remoteConfig.MailerTemplatesMagicLinkContent
+ if value, err := remoteConfig.MailerTemplatesMagicLinkContent.Get(); err == nil {
+ t.Content = &value
+ } else {
+ t.Content = nil
+ }
}
e.Template["magic_link"] = t
}
if t, ok := e.Template["email_change"]; ok {
if t.Subject != nil {
- t.Subject = remoteConfig.MailerSubjectsEmailChange
+ if value, err := remoteConfig.MailerSubjectsEmailChange.Get(); err == nil {
+ t.Subject = &value
+ } else {
+ t.Subject = nil
+ }
}
if t.Content != nil {
- t.Content = remoteConfig.MailerTemplatesEmailChangeContent
+ if value, err := remoteConfig.MailerTemplatesEmailChangeContent.Get(); err == nil {
+ t.Content = &value
+ } else {
+ t.Content = nil
+ }
}
e.Template["email_change"] = t
}
if t, ok := e.Template["reauthentication"]; ok {
if t.Subject != nil {
- t.Subject = remoteConfig.MailerSubjectsReauthentication
+ if value, err := remoteConfig.MailerSubjectsReauthentication.Get(); err == nil {
+ t.Subject = &value
+ } else {
+ t.Subject = nil
+ }
}
if t.Content != nil {
- t.Content = remoteConfig.MailerTemplatesReauthenticationContent
+ if value, err := remoteConfig.MailerTemplatesReauthenticationContent.Get(); err == nil {
+ t.Content = &value
+ } else {
+ t.Content = nil
+ }
}
e.Template["reauthentication"] = t
}
@@ -602,17 +710,17 @@ func (e *email) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
func (s smtp) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
if !s.Enabled {
// Setting a single empty string disables SMTP
- body.SmtpHost = cast.Ptr("")
+ body.SmtpHost = nullable.NewNullableWithValue("")
return
}
- body.SmtpHost = &s.Host
- body.SmtpPort = cast.Ptr(strconv.Itoa(int(s.Port)))
- body.SmtpUser = &s.User
+ body.SmtpHost = nullable.NewNullableWithValue(s.Host)
+ body.SmtpPort = nullable.NewNullableWithValue(strconv.Itoa(int(s.Port)))
+ body.SmtpUser = nullable.NewNullableWithValue(s.User)
if len(s.Pass.SHA256) > 0 {
- body.SmtpPass = &s.Pass.Value
+ body.SmtpPass = nullable.NewNullableWithValue(s.Pass.Value)
}
- body.SmtpAdminEmail = &s.AdminEmail
- body.SmtpSenderName = &s.SenderName
+ body.SmtpAdminEmail = nullable.NewNullableWithValue(s.AdminEmail)
+ body.SmtpSenderName = nullable.NewNullableWithValue(s.SenderName)
}
func (s *smtp) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
@@ -621,14 +729,14 @@ func (s *smtp) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
return
}
if s.Enabled {
- s.Host = cast.Val(remoteConfig.SmtpHost, "")
- s.User = cast.Val(remoteConfig.SmtpUser, "")
+ s.Host = ValOrDefault(remoteConfig.SmtpHost, "")
+ s.User = ValOrDefault(remoteConfig.SmtpUser, "")
if len(s.Pass.SHA256) > 0 {
- s.Pass.SHA256 = cast.Val(remoteConfig.SmtpPass, "")
+ s.Pass.SHA256 = ValOrDefault(remoteConfig.SmtpPass, "")
}
- s.AdminEmail = cast.Val(remoteConfig.SmtpAdminEmail, "")
- s.SenderName = cast.Val(remoteConfig.SmtpSenderName, "")
- portStr := cast.Val(remoteConfig.SmtpPort, "0")
+ s.AdminEmail = ValOrDefault(remoteConfig.SmtpAdminEmail, openapi_types.Email(""))
+ s.SenderName = ValOrDefault(remoteConfig.SmtpSenderName, "")
+ portStr := ValOrDefault(remoteConfig.SmtpPort, "0")
if port, err := strconv.ParseUint(portStr, 10, 16); err == nil {
s.Port = uint16(port)
}
@@ -638,95 +746,95 @@ func (s *smtp) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
}
func (s sms) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
- body.ExternalPhoneEnabled = &s.EnableSignup
- body.SmsMaxFrequency = cast.Ptr(int(s.MaxFrequency.Seconds()))
- body.SmsAutoconfirm = &s.EnableConfirmations
- body.SmsTemplate = &s.Template
+ body.ExternalPhoneEnabled = nullable.NewNullableWithValue(s.EnableSignup)
+ body.SmsMaxFrequency = nullable.NewNullableWithValue(int(s.MaxFrequency.Seconds()))
+ body.SmsAutoconfirm = nullable.NewNullableWithValue(s.EnableConfirmations)
+ body.SmsTemplate = nullable.NewNullableWithValue(s.Template)
if otpString := mapToEnv(s.TestOTP); len(otpString) > 0 {
- body.SmsTestOtp = &otpString
+ body.SmsTestOtp = nullable.NewNullableWithValue(otpString)
// Set a 10 year validity for test OTP
- timestamp := time.Now().UTC().AddDate(10, 0, 0).Format(time.RFC3339)
- body.SmsTestOtpValidUntil = ×tamp
+ timestamp := time.Now().UTC().AddDate(10, 0, 0)
+ body.SmsTestOtpValidUntil = nullable.NewNullableWithValue(timestamp)
}
// Api only overrides configs of enabled providers
switch {
case s.Twilio.Enabled:
- body.SmsProvider = cast.Ptr("twilio")
+ body.SmsProvider = nullable.NewNullableWithValue(v1API.UpdateAuthConfigBodySmsProviderTwilio)
if len(s.Twilio.AuthToken.SHA256) > 0 {
- body.SmsTwilioAuthToken = &s.Twilio.AuthToken.Value
+ body.SmsTwilioAuthToken = nullable.NewNullableWithValue(s.Twilio.AuthToken.Value)
}
- body.SmsTwilioAccountSid = &s.Twilio.AccountSid
- body.SmsTwilioMessageServiceSid = &s.Twilio.MessageServiceSid
+ body.SmsTwilioAccountSid = nullable.NewNullableWithValue(s.Twilio.AccountSid)
+ body.SmsTwilioMessageServiceSid = nullable.NewNullableWithValue(s.Twilio.MessageServiceSid)
case s.TwilioVerify.Enabled:
- body.SmsProvider = cast.Ptr("twilio_verify")
+ body.SmsProvider = nullable.NewNullableWithValue(v1API.UpdateAuthConfigBodySmsProviderTwilioVerify)
if len(s.TwilioVerify.AuthToken.SHA256) > 0 {
- body.SmsTwilioVerifyAuthToken = &s.TwilioVerify.AuthToken.Value
+ body.SmsTwilioVerifyAuthToken = nullable.NewNullableWithValue(s.TwilioVerify.AuthToken.Value)
}
- body.SmsTwilioVerifyAccountSid = &s.TwilioVerify.AccountSid
- body.SmsTwilioVerifyMessageServiceSid = &s.TwilioVerify.MessageServiceSid
+ body.SmsTwilioVerifyAccountSid = nullable.NewNullableWithValue(s.TwilioVerify.AccountSid)
+ body.SmsTwilioVerifyMessageServiceSid = nullable.NewNullableWithValue(s.TwilioVerify.MessageServiceSid)
case s.Messagebird.Enabled:
- body.SmsProvider = cast.Ptr("messagebird")
+ body.SmsProvider = nullable.NewNullableWithValue(v1API.UpdateAuthConfigBodySmsProviderMessagebird)
if len(s.Messagebird.AccessKey.SHA256) > 0 {
- body.SmsMessagebirdAccessKey = &s.Messagebird.AccessKey.Value
+ body.SmsMessagebirdAccessKey = nullable.NewNullableWithValue(s.Messagebird.AccessKey.Value)
}
- body.SmsMessagebirdOriginator = &s.Messagebird.Originator
+ body.SmsMessagebirdOriginator = nullable.NewNullableWithValue(s.Messagebird.Originator)
case s.Textlocal.Enabled:
- body.SmsProvider = cast.Ptr("textlocal")
+ body.SmsProvider = nullable.NewNullableWithValue(v1API.UpdateAuthConfigBodySmsProviderTextlocal)
if len(s.Textlocal.ApiKey.SHA256) > 0 {
- body.SmsTextlocalApiKey = &s.Textlocal.ApiKey.Value
+ body.SmsTextlocalApiKey = nullable.NewNullableWithValue(s.Textlocal.ApiKey.Value)
}
- body.SmsTextlocalSender = &s.Textlocal.Sender
+ body.SmsTextlocalSender = nullable.NewNullableWithValue(s.Textlocal.Sender)
case s.Vonage.Enabled:
- body.SmsProvider = cast.Ptr("vonage")
+ body.SmsProvider = nullable.NewNullableWithValue(v1API.UpdateAuthConfigBodySmsProviderVonage)
if len(s.Vonage.ApiSecret.SHA256) > 0 {
- body.SmsVonageApiSecret = &s.Vonage.ApiSecret.Value
+ body.SmsVonageApiSecret = nullable.NewNullableWithValue(s.Vonage.ApiSecret.Value)
}
- body.SmsVonageApiKey = &s.Vonage.ApiKey
- body.SmsVonageFrom = &s.Vonage.From
+ body.SmsVonageApiKey = nullable.NewNullableWithValue(s.Vonage.ApiKey)
+ body.SmsVonageFrom = nullable.NewNullableWithValue(s.Vonage.From)
}
}
func (s *sms) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
- s.EnableSignup = cast.Val(remoteConfig.ExternalPhoneEnabled, false)
- s.MaxFrequency = time.Duration(cast.Val(remoteConfig.SmsMaxFrequency, 0)) * time.Second
- s.EnableConfirmations = cast.Val(remoteConfig.SmsAutoconfirm, false)
- s.Template = cast.Val(remoteConfig.SmsTemplate, "")
- s.TestOTP = envToMap(cast.Val(remoteConfig.SmsTestOtp, ""))
+ s.EnableSignup = ValOrDefault(remoteConfig.ExternalPhoneEnabled, false)
+ s.MaxFrequency = time.Duration(ValOrDefault(remoteConfig.SmsMaxFrequency, 0)) * time.Second
+ s.EnableConfirmations = ValOrDefault(remoteConfig.SmsAutoconfirm, false)
+ s.Template = ValOrDefault(remoteConfig.SmsTemplate, "")
+ s.TestOTP = envToMap(ValOrDefault(remoteConfig.SmsTestOtp, ""))
// We are only interested in the provider that's enabled locally
switch {
case s.Twilio.Enabled:
if len(s.Twilio.AuthToken.SHA256) > 0 {
- s.Twilio.AuthToken.SHA256 = cast.Val(remoteConfig.SmsTwilioAuthToken, "")
+ s.Twilio.AuthToken.SHA256 = ValOrDefault(remoteConfig.SmsTwilioAuthToken, "")
}
- s.Twilio.AccountSid = cast.Val(remoteConfig.SmsTwilioAccountSid, "")
- s.Twilio.MessageServiceSid = cast.Val(remoteConfig.SmsTwilioMessageServiceSid, "")
+ s.Twilio.AccountSid = ValOrDefault(remoteConfig.SmsTwilioAccountSid, "")
+ s.Twilio.MessageServiceSid = ValOrDefault(remoteConfig.SmsTwilioMessageServiceSid, "")
case s.TwilioVerify.Enabled:
if len(s.TwilioVerify.AuthToken.SHA256) > 0 {
- s.TwilioVerify.AuthToken.SHA256 = cast.Val(remoteConfig.SmsTwilioVerifyAuthToken, "")
+ s.TwilioVerify.AuthToken.SHA256 = ValOrDefault(remoteConfig.SmsTwilioVerifyAuthToken, "")
}
- s.TwilioVerify.AccountSid = cast.Val(remoteConfig.SmsTwilioVerifyAccountSid, "")
- s.TwilioVerify.MessageServiceSid = cast.Val(remoteConfig.SmsTwilioVerifyMessageServiceSid, "")
+ s.TwilioVerify.AccountSid = ValOrDefault(remoteConfig.SmsTwilioVerifyAccountSid, "")
+ s.TwilioVerify.MessageServiceSid = ValOrDefault(remoteConfig.SmsTwilioVerifyMessageServiceSid, "")
case s.Messagebird.Enabled:
if len(s.Messagebird.AccessKey.SHA256) > 0 {
- s.Messagebird.AccessKey.SHA256 = cast.Val(remoteConfig.SmsMessagebirdAccessKey, "")
+ s.Messagebird.AccessKey.SHA256 = ValOrDefault(remoteConfig.SmsMessagebirdAccessKey, "")
}
- s.Messagebird.Originator = cast.Val(remoteConfig.SmsMessagebirdOriginator, "")
+ s.Messagebird.Originator = ValOrDefault(remoteConfig.SmsMessagebirdOriginator, "")
case s.Textlocal.Enabled:
if len(s.Textlocal.ApiKey.SHA256) > 0 {
- s.Textlocal.ApiKey.SHA256 = cast.Val(remoteConfig.SmsTextlocalApiKey, "")
+ s.Textlocal.ApiKey.SHA256 = ValOrDefault(remoteConfig.SmsTextlocalApiKey, "")
}
- s.Textlocal.Sender = cast.Val(remoteConfig.SmsTextlocalSender, "")
+ s.Textlocal.Sender = ValOrDefault(remoteConfig.SmsTextlocalSender, "")
case s.Vonage.Enabled:
if len(s.Vonage.ApiSecret.SHA256) > 0 {
- s.Vonage.ApiSecret.SHA256 = cast.Val(remoteConfig.SmsVonageApiSecret, "")
+ s.Vonage.ApiSecret.SHA256 = ValOrDefault(remoteConfig.SmsVonageApiSecret, "")
}
- s.Vonage.ApiKey = cast.Val(remoteConfig.SmsVonageApiKey, "")
- s.Vonage.From = cast.Val(remoteConfig.SmsVonageFrom, "")
+ s.Vonage.ApiKey = ValOrDefault(remoteConfig.SmsVonageApiKey, "")
+ s.Vonage.From = ValOrDefault(remoteConfig.SmsVonageFrom, "")
case !s.EnableSignup:
// Nothing to do if both local and remote providers are disabled.
return
}
- if provider := cast.Val(remoteConfig.SmsProvider, ""); len(provider) > 0 {
+ if provider := ValOrDefault(remoteConfig.SmsProvider, ""); len(provider) > 0 {
s.Twilio.Enabled = provider == "twilio"
s.TwilioVerify.Enabled = provider == "twilio_verify"
s.Messagebird.Enabled = provider == "messagebird"
@@ -741,159 +849,159 @@ func (e external) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
}
// Ignore configs of disabled providers because their envs are not loaded
if p, ok := e["apple"]; ok {
- if body.ExternalAppleEnabled = &p.Enabled; *body.ExternalAppleEnabled {
- body.ExternalAppleClientId = &p.ClientId
+ if body.ExternalAppleEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalAppleClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalAppleSecret = &p.Secret.Value
+ body.ExternalAppleSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["azure"]; ok {
- if body.ExternalAzureEnabled = &p.Enabled; *body.ExternalAzureEnabled {
- body.ExternalAzureClientId = &p.ClientId
+ if body.ExternalAzureEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalAzureClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalAzureSecret = &p.Secret.Value
+ body.ExternalAzureSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
- body.ExternalAzureUrl = &p.Url
+ body.ExternalAzureUrl = nullable.NewNullableWithValue(p.Url)
}
}
if p, ok := e["bitbucket"]; ok {
- if body.ExternalBitbucketEnabled = &p.Enabled; *body.ExternalBitbucketEnabled {
- body.ExternalBitbucketClientId = &p.ClientId
+ if body.ExternalBitbucketEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalBitbucketClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalBitbucketSecret = &p.Secret.Value
+ body.ExternalBitbucketSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["discord"]; ok {
- if body.ExternalDiscordEnabled = &p.Enabled; *body.ExternalDiscordEnabled {
- body.ExternalDiscordClientId = &p.ClientId
+ if body.ExternalDiscordEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalDiscordClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalDiscordSecret = &p.Secret.Value
+ body.ExternalDiscordSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["facebook"]; ok {
- if body.ExternalFacebookEnabled = &p.Enabled; *body.ExternalFacebookEnabled {
- body.ExternalFacebookClientId = &p.ClientId
+ if body.ExternalFacebookEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalFacebookClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalFacebookSecret = &p.Secret.Value
+ body.ExternalFacebookSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["figma"]; ok {
- if body.ExternalFigmaEnabled = &p.Enabled; *body.ExternalFigmaEnabled {
- body.ExternalFigmaClientId = &p.ClientId
+ if body.ExternalFigmaEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalFigmaClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalFigmaSecret = &p.Secret.Value
+ body.ExternalFigmaSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["github"]; ok {
- if body.ExternalGithubEnabled = &p.Enabled; *body.ExternalGithubEnabled {
- body.ExternalGithubClientId = &p.ClientId
+ if body.ExternalGithubEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalGithubClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalGithubSecret = &p.Secret.Value
+ body.ExternalGithubSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["gitlab"]; ok {
- if body.ExternalGitlabEnabled = &p.Enabled; *body.ExternalGitlabEnabled {
- body.ExternalGitlabClientId = &p.ClientId
+ if body.ExternalGitlabEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalGitlabClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalGitlabSecret = &p.Secret.Value
+ body.ExternalGitlabSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
- body.ExternalGitlabUrl = &p.Url
+ body.ExternalGitlabUrl = nullable.NewNullableWithValue(p.Url)
}
}
if p, ok := e["google"]; ok {
- if body.ExternalGoogleEnabled = &p.Enabled; *body.ExternalGoogleEnabled {
- body.ExternalGoogleClientId = &p.ClientId
+ if body.ExternalGoogleEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalGoogleClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalGoogleSecret = &p.Secret.Value
+ body.ExternalGoogleSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
- body.ExternalGoogleSkipNonceCheck = &p.SkipNonceCheck
+ body.ExternalGoogleSkipNonceCheck = nullable.NewNullableWithValue(p.SkipNonceCheck)
}
}
if p, ok := e["kakao"]; ok {
- if body.ExternalKakaoEnabled = &p.Enabled; *body.ExternalKakaoEnabled {
- body.ExternalKakaoClientId = &p.ClientId
+ if body.ExternalKakaoEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalKakaoClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalKakaoSecret = &p.Secret.Value
+ body.ExternalKakaoSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["keycloak"]; ok {
- if body.ExternalKeycloakEnabled = &p.Enabled; *body.ExternalKeycloakEnabled {
- body.ExternalKeycloakClientId = &p.ClientId
+ if body.ExternalKeycloakEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalKeycloakClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalKeycloakSecret = &p.Secret.Value
+ body.ExternalKeycloakSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
- body.ExternalKeycloakUrl = &p.Url
+ body.ExternalKeycloakUrl = nullable.NewNullableWithValue(p.Url)
}
}
if p, ok := e["linkedin_oidc"]; ok {
- if body.ExternalLinkedinOidcEnabled = &p.Enabled; *body.ExternalLinkedinOidcEnabled {
- body.ExternalLinkedinOidcClientId = &p.ClientId
+ if body.ExternalLinkedinOidcEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalLinkedinOidcClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalLinkedinOidcSecret = &p.Secret.Value
+ body.ExternalLinkedinOidcSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["notion"]; ok {
- if body.ExternalNotionEnabled = &p.Enabled; *body.ExternalNotionEnabled {
- body.ExternalNotionClientId = &p.ClientId
+ if body.ExternalNotionEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalNotionClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalNotionSecret = &p.Secret.Value
+ body.ExternalNotionSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["slack_oidc"]; ok {
- if body.ExternalSlackOidcEnabled = &p.Enabled; *body.ExternalSlackOidcEnabled {
- body.ExternalSlackOidcClientId = &p.ClientId
+ if body.ExternalSlackOidcEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalSlackOidcClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalSlackOidcSecret = &p.Secret.Value
+ body.ExternalSlackOidcSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["spotify"]; ok {
- if body.ExternalSpotifyEnabled = &p.Enabled; *body.ExternalSpotifyEnabled {
- body.ExternalSpotifyClientId = &p.ClientId
+ if body.ExternalSpotifyEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalSpotifyClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalSpotifySecret = &p.Secret.Value
+ body.ExternalSpotifySecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["twitch"]; ok {
- if body.ExternalTwitchEnabled = &p.Enabled; *body.ExternalTwitchEnabled {
- body.ExternalTwitchClientId = &p.ClientId
+ if body.ExternalTwitchEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalTwitchClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalTwitchSecret = &p.Secret.Value
+ body.ExternalTwitchSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["twitter"]; ok {
- if body.ExternalTwitterEnabled = &p.Enabled; *body.ExternalTwitterEnabled {
- body.ExternalTwitterClientId = &p.ClientId
+ if body.ExternalTwitterEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalTwitterClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalTwitterSecret = &p.Secret.Value
+ body.ExternalTwitterSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
if p, ok := e["workos"]; ok {
- if body.ExternalWorkosEnabled = &p.Enabled; *body.ExternalWorkosEnabled {
- body.ExternalWorkosClientId = &p.ClientId
+ if body.ExternalWorkosEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalWorkosClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalWorkosSecret = &p.Secret.Value
+ body.ExternalWorkosSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
- body.ExternalWorkosUrl = &p.Url
+ body.ExternalWorkosUrl = nullable.NewNullableWithValue(p.Url)
}
}
if p, ok := e["zoom"]; ok {
- if body.ExternalZoomEnabled = &p.Enabled; *body.ExternalZoomEnabled {
- body.ExternalZoomClientId = &p.ClientId
+ if body.ExternalZoomEnabled = nullable.NewNullableWithValue(p.Enabled); p.Enabled {
+ body.ExternalZoomClientId = nullable.NewNullableWithValue(p.ClientId)
if len(p.Secret.SHA256) > 0 {
- body.ExternalZoomSecret = &p.Secret.Value
+ body.ExternalZoomSecret = nullable.NewNullableWithValue(p.Secret.Value)
}
}
}
@@ -906,225 +1014,235 @@ func (e external) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
// Ignore configs of disabled providers because their envs are not loaded
if p, ok := e["apple"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalAppleClientId, "")
- if ids := cast.Val(remoteConfig.ExternalAppleAdditionalClientIds, ""); len(ids) > 0 {
+ p.ClientId = ValOrDefault(remoteConfig.ExternalAppleClientId, "")
+ if ids := ValOrDefault(remoteConfig.ExternalAppleAdditionalClientIds, ""); len(ids) > 0 {
p.ClientId += "," + ids
}
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalAppleSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalAppleSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalAppleEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalAppleEnabled, false)
e["apple"] = p
}
if p, ok := e["azure"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalAzureClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalAzureClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalAzureSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalAzureSecret, "")
}
- p.Url = cast.Val(remoteConfig.ExternalAzureUrl, "")
+ p.Url = ValOrDefault(remoteConfig.ExternalAzureUrl, "")
}
- p.Enabled = cast.Val(remoteConfig.ExternalAzureEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalAzureEnabled, false)
e["azure"] = p
}
if p, ok := e["bitbucket"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalBitbucketClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalBitbucketClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalBitbucketSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalBitbucketSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalBitbucketEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalBitbucketEnabled, false)
e["bitbucket"] = p
}
if p, ok := e["discord"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalDiscordClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalDiscordClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalDiscordSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalDiscordSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalDiscordEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalDiscordEnabled, false)
e["discord"] = p
}
if p, ok := e["facebook"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalFacebookClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalFacebookClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalFacebookSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalFacebookSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalFacebookEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalFacebookEnabled, false)
e["facebook"] = p
}
if p, ok := e["figma"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalFigmaClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalFigmaClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalFigmaSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalFigmaSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalFigmaEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalFigmaEnabled, false)
e["figma"] = p
}
if p, ok := e["github"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalGithubClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalGithubClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalGithubSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalGithubSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalGithubEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalGithubEnabled, false)
e["github"] = p
}
if p, ok := e["gitlab"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalGitlabClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalGitlabClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalGitlabSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalGitlabSecret, "")
}
- p.Url = cast.Val(remoteConfig.ExternalGitlabUrl, "")
+ p.Url = ValOrDefault(remoteConfig.ExternalGitlabUrl, "")
}
- p.Enabled = cast.Val(remoteConfig.ExternalGitlabEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalGitlabEnabled, false)
e["gitlab"] = p
}
if p, ok := e["google"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalGoogleClientId, "")
- if ids := cast.Val(remoteConfig.ExternalGoogleAdditionalClientIds, ""); len(ids) > 0 {
+ p.ClientId = ValOrDefault(remoteConfig.ExternalGoogleClientId, "")
+ if ids := ValOrDefault(remoteConfig.ExternalGoogleAdditionalClientIds, ""); len(ids) > 0 {
p.ClientId += "," + ids
}
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalGoogleSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalGoogleSecret, "")
}
- p.SkipNonceCheck = cast.Val(remoteConfig.ExternalGoogleSkipNonceCheck, false)
+ p.SkipNonceCheck = ValOrDefault(remoteConfig.ExternalGoogleSkipNonceCheck, false)
}
- p.Enabled = cast.Val(remoteConfig.ExternalGoogleEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalGoogleEnabled, false)
e["google"] = p
}
if p, ok := e["kakao"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalKakaoClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalKakaoClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalKakaoSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalKakaoSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalKakaoEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalKakaoEnabled, false)
e["kakao"] = p
}
if p, ok := e["keycloak"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalKeycloakClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalKeycloakClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalKeycloakSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalKeycloakSecret, "")
}
- p.Url = cast.Val(remoteConfig.ExternalKeycloakUrl, "")
+ p.Url = ValOrDefault(remoteConfig.ExternalKeycloakUrl, "")
}
- p.Enabled = cast.Val(remoteConfig.ExternalKeycloakEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalKeycloakEnabled, false)
e["keycloak"] = p
}
if p, ok := e["linkedin_oidc"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalLinkedinOidcClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalLinkedinOidcClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalLinkedinOidcSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalLinkedinOidcSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalLinkedinOidcEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalLinkedinOidcEnabled, false)
e["linkedin_oidc"] = p
}
if p, ok := e["notion"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalNotionClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalNotionClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalNotionSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalNotionSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalNotionEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalNotionEnabled, false)
e["notion"] = p
}
if p, ok := e["slack_oidc"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalSlackOidcClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalSlackOidcClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalSlackOidcSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalSlackOidcSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalSlackOidcEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalSlackOidcEnabled, false)
e["slack_oidc"] = p
}
if p, ok := e["spotify"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalSpotifyClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalSpotifyClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalSpotifySecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalSpotifySecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalSpotifyEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalSpotifyEnabled, false)
e["spotify"] = p
}
if p, ok := e["twitch"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalTwitchClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalTwitchClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalTwitchSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalTwitchSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalTwitchEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalTwitchEnabled, false)
e["twitch"] = p
}
if p, ok := e["twitter"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalTwitterClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalTwitterClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalTwitterSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalTwitterSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalTwitterEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalTwitterEnabled, false)
e["twitter"] = p
}
if p, ok := e["workos"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalWorkosClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalWorkosClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalWorkosSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalWorkosSecret, "")
}
- p.Url = cast.Val(remoteConfig.ExternalWorkosUrl, "")
+ p.Url = ValOrDefault(remoteConfig.ExternalWorkosUrl, "")
}
- p.Enabled = cast.Val(remoteConfig.ExternalWorkosEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalWorkosEnabled, false)
e["workos"] = p
}
if p, ok := e["zoom"]; ok {
if p.Enabled {
- p.ClientId = cast.Val(remoteConfig.ExternalZoomClientId, "")
+ p.ClientId = ValOrDefault(remoteConfig.ExternalZoomClientId, "")
if len(p.Secret.SHA256) > 0 {
- p.Secret.SHA256 = cast.Val(remoteConfig.ExternalZoomSecret, "")
+ p.Secret.SHA256 = ValOrDefault(remoteConfig.ExternalZoomSecret, "")
}
}
- p.Enabled = cast.Val(remoteConfig.ExternalZoomEnabled, false)
+ p.Enabled = ValOrDefault(remoteConfig.ExternalZoomEnabled, false)
e["zoom"] = p
}
}
+func (w web3) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) {
+ body.ExternalWeb3SolanaEnabled = nullable.NewNullableWithValue(w.Solana.Enabled)
+}
+
+func (w *web3) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) {
+ if value, err := remoteConfig.ExternalWeb3SolanaEnabled.Get(); err == nil {
+ w.Solana.Enabled = value
+ }
+}
+
func (a *auth) DiffWithRemote(remoteConfig v1API.AuthConfigResponse) ([]byte, error) {
copy := a.Clone()
// Convert the config values into easily comparable remoteConfig values
@@ -1139,3 +1257,10 @@ func (a *auth) DiffWithRemote(remoteConfig v1API.AuthConfigResponse) ([]byte, er
}
return diff.Diff("remote[auth]", remoteCompare, "local[auth]", currentValue), nil
}
+
+func ValOrDefault[T any](v nullable.Nullable[T], def T) T {
+ if value, err := v.Get(); err == nil {
+ return value
+ }
+ return def
+}
diff --git a/pkg/config/auth_test.go b/pkg/config/auth_test.go
index 3bf9dae1f9..8ec52f0fa0 100644
--- a/pkg/config/auth_test.go
+++ b/pkg/config/auth_test.go
@@ -7,6 +7,8 @@ import (
"time"
"github.com/go-errors/errors"
+ "github.com/oapi-codegen/nullable"
+ openapi_types "github.com/oapi-codegen/runtime/types"
"github.com/stretchr/testify/assert"
v1API "github.com/supabase/cli/pkg/api"
"github.com/supabase/cli/pkg/cast"
@@ -50,16 +52,16 @@ func TestAuthDiff(t *testing.T) {
c.PasswordRequirements = LettersDigits
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- SiteUrl: cast.Ptr("http://127.0.0.1:3000"),
- UriAllowList: cast.Ptr("https://127.0.0.1:3000"),
- JwtExp: cast.Ptr(3600),
- RefreshTokenRotationEnabled: cast.Ptr(true),
- SecurityRefreshTokenReuseInterval: cast.Ptr(10),
- SecurityManualLinkingEnabled: cast.Ptr(true),
- DisableSignup: cast.Ptr(false),
- ExternalAnonymousUsersEnabled: cast.Ptr(true),
- PasswordMinLength: cast.Ptr(6),
- PasswordRequiredCharacters: cast.Ptr(string(v1API.AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789)),
+ SiteUrl: nullable.NewNullableWithValue("http://127.0.0.1:3000"),
+ UriAllowList: nullable.NewNullableWithValue("https://127.0.0.1:3000"),
+ JwtExp: nullable.NewNullableWithValue(3600),
+ RefreshTokenRotationEnabled: nullable.NewNullableWithValue(true),
+ SecurityRefreshTokenReuseInterval: nullable.NewNullableWithValue(10),
+ SecurityManualLinkingEnabled: nullable.NewNullableWithValue(true),
+ DisableSignup: nullable.NewNullableWithValue(false),
+ ExternalAnonymousUsersEnabled: nullable.NewNullableWithValue(true),
+ PasswordMinLength: nullable.NewNullableWithValue(6),
+ PasswordRequiredCharacters: nullable.NewNullableWithValue(v1API.AuthConfigResponsePasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789),
})
// Check error
assert.NoError(t, err)
@@ -80,16 +82,16 @@ func TestAuthDiff(t *testing.T) {
c.PasswordRequirements = LowerUpperLettersDigitsSymbols
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- SiteUrl: cast.Ptr(""),
- UriAllowList: cast.Ptr("https://127.0.0.1:3000,https://ref.supabase.co"),
- JwtExp: cast.Ptr(0),
- RefreshTokenRotationEnabled: cast.Ptr(true),
- SecurityRefreshTokenReuseInterval: cast.Ptr(0),
- SecurityManualLinkingEnabled: cast.Ptr(true),
- DisableSignup: cast.Ptr(false),
- ExternalAnonymousUsersEnabled: cast.Ptr(true),
- PasswordMinLength: cast.Ptr(8),
- PasswordRequiredCharacters: cast.Ptr(string(v1API.AbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789)),
+ SiteUrl: nullable.NewNullableWithValue(""),
+ UriAllowList: nullable.NewNullableWithValue("https://127.0.0.1:3000,https://ref.supabase.co"),
+ JwtExp: nullable.NewNullableWithValue(0),
+ RefreshTokenRotationEnabled: nullable.NewNullableWithValue(true),
+ SecurityRefreshTokenReuseInterval: nullable.NewNullableWithValue(0),
+ SecurityManualLinkingEnabled: nullable.NewNullableWithValue(true),
+ DisableSignup: nullable.NewNullableWithValue(false),
+ ExternalAnonymousUsersEnabled: nullable.NewNullableWithValue(true),
+ PasswordMinLength: nullable.NewNullableWithValue(8),
+ PasswordRequiredCharacters: nullable.NewNullableWithValue(v1API.AuthConfigResponsePasswordRequiredCharactersAbcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789),
})
// Check error
assert.NoError(t, err)
@@ -101,16 +103,16 @@ func TestAuthDiff(t *testing.T) {
c.EnableSignup = false
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- SiteUrl: cast.Ptr(""),
- UriAllowList: cast.Ptr(""),
- JwtExp: cast.Ptr(0),
- RefreshTokenRotationEnabled: cast.Ptr(false),
- SecurityRefreshTokenReuseInterval: cast.Ptr(0),
- SecurityManualLinkingEnabled: cast.Ptr(false),
- DisableSignup: cast.Ptr(true),
- ExternalAnonymousUsersEnabled: cast.Ptr(false),
- PasswordMinLength: cast.Ptr(0),
- PasswordRequiredCharacters: cast.Ptr(""),
+ SiteUrl: nullable.NewNullableWithValue(""),
+ UriAllowList: nullable.NewNullableWithValue(""),
+ JwtExp: nullable.NewNullableWithValue(0),
+ RefreshTokenRotationEnabled: nullable.NewNullableWithValue(false),
+ SecurityRefreshTokenReuseInterval: nullable.NewNullableWithValue(0),
+ SecurityManualLinkingEnabled: nullable.NewNullableWithValue(false),
+ DisableSignup: nullable.NewNullableWithValue(true),
+ ExternalAnonymousUsersEnabled: nullable.NewNullableWithValue(false),
+ PasswordMinLength: nullable.NewNullableWithValue(0),
+ PasswordRequiredCharacters: nullable.NewNullableWithValue(v1API.AuthConfigResponsePasswordRequiredCharactersEmpty),
})
// Check error
assert.NoError(t, err)
@@ -131,9 +133,9 @@ func TestCaptchaDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- SecurityCaptchaEnabled: cast.Ptr(true),
- SecurityCaptchaProvider: cast.Ptr("hcaptcha"),
- SecurityCaptchaSecret: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ SecurityCaptchaEnabled: nullable.NewNullableWithValue(true),
+ SecurityCaptchaProvider: nullable.NewNullableWithValue(v1API.AuthConfigResponseSecurityCaptchaProviderHcaptcha),
+ SecurityCaptchaSecret: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
})
// Check error
assert.NoError(t, err)
@@ -152,9 +154,9 @@ func TestCaptchaDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- SecurityCaptchaEnabled: cast.Ptr(true),
- SecurityCaptchaProvider: cast.Ptr("hcaptcha"),
- SecurityCaptchaSecret: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ SecurityCaptchaEnabled: nullable.NewNullableWithValue(true),
+ SecurityCaptchaProvider: nullable.NewNullableWithValue(v1API.AuthConfigResponseSecurityCaptchaProviderHcaptcha),
+ SecurityCaptchaSecret: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
})
// Check error
assert.NoError(t, err)
@@ -173,9 +175,9 @@ func TestCaptchaDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- SecurityCaptchaEnabled: cast.Ptr(false),
- SecurityCaptchaProvider: cast.Ptr("hcaptcha"),
- SecurityCaptchaSecret: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ SecurityCaptchaEnabled: nullable.NewNullableWithValue(false),
+ SecurityCaptchaProvider: nullable.NewNullableWithValue(v1API.AuthConfigResponseSecurityCaptchaProviderHcaptcha),
+ SecurityCaptchaSecret: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
})
// Check error
assert.NoError(t, err)
@@ -189,7 +191,7 @@ func TestCaptchaDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- SecurityCaptchaEnabled: cast.Ptr(false),
+ SecurityCaptchaEnabled: nullable.NewNullableWithValue(false),
})
// Check error
assert.NoError(t, err)
@@ -200,9 +202,9 @@ func TestCaptchaDiff(t *testing.T) {
c := newWithDefaults()
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- SecurityCaptchaEnabled: cast.Ptr(true),
- SecurityCaptchaProvider: cast.Ptr("hcaptcha"),
- SecurityCaptchaSecret: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ SecurityCaptchaEnabled: nullable.NewNullableWithValue(true),
+ SecurityCaptchaProvider: nullable.NewNullableWithValue(v1API.AuthConfigResponseSecurityCaptchaProviderHcaptcha),
+ SecurityCaptchaSecret: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
})
// Check error
assert.NoError(t, err)
@@ -214,6 +216,14 @@ func TestHookDiff(t *testing.T) {
t.Run("local and remote enabled", func(t *testing.T) {
c := newWithDefaults()
c.Hook = hook{
+ BeforeUserCreated: &hookConfig{
+ Enabled: true,
+ URI: "http://example.com",
+ Secrets: Secret{
+ Value: "test-secret",
+ SHA256: "ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252",
+ },
+ },
CustomAccessToken: &hookConfig{
Enabled: true,
URI: "http://example.com",
@@ -253,20 +263,23 @@ func TestHookDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- HookCustomAccessTokenEnabled: cast.Ptr(true),
- HookCustomAccessTokenUri: cast.Ptr("http://example.com"),
- HookCustomAccessTokenSecrets: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
- HookSendSmsEnabled: cast.Ptr(true),
- HookSendSmsUri: cast.Ptr("http://example.com"),
- HookSendSmsSecrets: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
- HookSendEmailEnabled: cast.Ptr(true),
- HookSendEmailUri: cast.Ptr("https://example.com"),
- HookSendEmailSecrets: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
- HookMfaVerificationAttemptEnabled: cast.Ptr(true),
- HookMfaVerificationAttemptUri: cast.Ptr("https://example.com"),
- HookMfaVerificationAttemptSecrets: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
- HookPasswordVerificationAttemptEnabled: cast.Ptr(true),
- HookPasswordVerificationAttemptUri: cast.Ptr("pg-functions://verifyPassword"),
+ HookBeforeUserCreatedEnabled: nullable.NewNullableWithValue(true),
+ HookBeforeUserCreatedUri: nullable.NewNullableWithValue("http://example.com"),
+ HookBeforeUserCreatedSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookCustomAccessTokenEnabled: nullable.NewNullableWithValue(true),
+ HookCustomAccessTokenUri: nullable.NewNullableWithValue("http://example.com"),
+ HookCustomAccessTokenSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookSendSmsEnabled: nullable.NewNullableWithValue(true),
+ HookSendSmsUri: nullable.NewNullableWithValue("http://example.com"),
+ HookSendSmsSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookSendEmailEnabled: nullable.NewNullableWithValue(true),
+ HookSendEmailUri: nullable.NewNullableWithValue("https://example.com"),
+ HookSendEmailSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookMfaVerificationAttemptEnabled: nullable.NewNullableWithValue(true),
+ HookMfaVerificationAttemptUri: nullable.NewNullableWithValue("https://example.com"),
+ HookMfaVerificationAttemptSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookPasswordVerificationAttemptEnabled: nullable.NewNullableWithValue(true),
+ HookPasswordVerificationAttemptUri: nullable.NewNullableWithValue("pg-functions://verifyPassword"),
})
// Check error
assert.NoError(t, err)
@@ -276,6 +289,9 @@ func TestHookDiff(t *testing.T) {
t.Run("local disabled remote enabled", func(t *testing.T) {
c := newWithDefaults()
c.Hook = hook{
+ BeforeUserCreated: &hookConfig{
+ Enabled: false,
+ },
CustomAccessToken: &hookConfig{
Enabled: false,
},
@@ -295,19 +311,22 @@ func TestHookDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- HookCustomAccessTokenEnabled: cast.Ptr(true),
- HookCustomAccessTokenUri: cast.Ptr("http://example.com"),
- HookCustomAccessTokenSecrets: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
- HookSendSmsEnabled: cast.Ptr(true),
- HookSendSmsUri: cast.Ptr("https://example.com"),
- HookSendSmsSecrets: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
- HookSendEmailEnabled: cast.Ptr(true),
- HookSendEmailUri: cast.Ptr("pg-functions://postgres/public/sendEmail"),
- HookMfaVerificationAttemptEnabled: cast.Ptr(true),
- HookMfaVerificationAttemptUri: cast.Ptr("pg-functions://postgres/public/verifyMFA"),
- HookPasswordVerificationAttemptEnabled: cast.Ptr(true),
- HookPasswordVerificationAttemptUri: cast.Ptr("https://example.com"),
- HookPasswordVerificationAttemptSecrets: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookBeforeUserCreatedEnabled: nullable.NewNullableWithValue(true),
+ HookBeforeUserCreatedUri: nullable.NewNullableWithValue("http://example.com"),
+ HookBeforeUserCreatedSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookCustomAccessTokenEnabled: nullable.NewNullableWithValue(true),
+ HookCustomAccessTokenUri: nullable.NewNullableWithValue("http://example.com"),
+ HookCustomAccessTokenSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookSendSmsEnabled: nullable.NewNullableWithValue(true),
+ HookSendSmsUri: nullable.NewNullableWithValue("https://example.com"),
+ HookSendSmsSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookSendEmailEnabled: nullable.NewNullableWithValue(true),
+ HookSendEmailUri: nullable.NewNullableWithValue("pg-functions://postgres/public/sendEmail"),
+ HookMfaVerificationAttemptEnabled: nullable.NewNullableWithValue(true),
+ HookMfaVerificationAttemptUri: nullable.NewNullableWithValue("pg-functions://postgres/public/verifyMFA"),
+ HookPasswordVerificationAttemptEnabled: nullable.NewNullableWithValue(true),
+ HookPasswordVerificationAttemptUri: nullable.NewNullableWithValue("https://example.com"),
+ HookPasswordVerificationAttemptSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
})
// Check error
assert.NoError(t, err)
@@ -317,6 +336,14 @@ func TestHookDiff(t *testing.T) {
t.Run("local enabled remote disabled", func(t *testing.T) {
c := newWithDefaults()
c.Hook = hook{
+ BeforeUserCreated: &hookConfig{
+ Enabled: true,
+ URI: "http://example.com",
+ Secrets: Secret{
+ Value: "test-secret",
+ SHA256: "ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252",
+ },
+ },
CustomAccessToken: &hookConfig{
Enabled: true,
URI: "http://example.com",
@@ -345,17 +372,19 @@ func TestHookDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- HookCustomAccessTokenEnabled: cast.Ptr(false),
- HookCustomAccessTokenUri: cast.Ptr("pg-functions://postgres/public/customToken"),
- HookSendSmsEnabled: cast.Ptr(false),
- HookSendSmsUri: cast.Ptr("https://example.com"),
- HookSendSmsSecrets: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
- HookSendEmailEnabled: cast.Ptr(false),
- HookSendEmailUri: cast.Ptr("https://example.com"),
- HookSendEmailSecrets: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
- HookMfaVerificationAttemptEnabled: cast.Ptr(false),
- HookMfaVerificationAttemptUri: cast.Ptr("pg-functions://postgres/public/verifyMFA"),
- HookPasswordVerificationAttemptEnabled: cast.Ptr(false),
+ HookBeforeUserCreatedEnabled: nullable.NewNullableWithValue(false),
+ HookBeforeUserCreatedUri: nullable.NewNullableWithValue("pg-functions://postgres/public/beforeUserCreated"),
+ HookCustomAccessTokenEnabled: nullable.NewNullableWithValue(false),
+ HookCustomAccessTokenUri: nullable.NewNullableWithValue("pg-functions://postgres/public/customToken"),
+ HookSendSmsEnabled: nullable.NewNullableWithValue(false),
+ HookSendSmsUri: nullable.NewNullableWithValue("https://example.com"),
+ HookSendSmsSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookSendEmailEnabled: nullable.NewNullableWithValue(false),
+ HookSendEmailUri: nullable.NewNullableWithValue("https://example.com"),
+ HookSendEmailSecrets: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ HookMfaVerificationAttemptEnabled: nullable.NewNullableWithValue(false),
+ HookMfaVerificationAttemptUri: nullable.NewNullableWithValue("pg-functions://postgres/public/verifyMFA"),
+ HookPasswordVerificationAttemptEnabled: nullable.NewNullableWithValue(false),
})
// Check error
assert.NoError(t, err)
@@ -365,6 +394,7 @@ func TestHookDiff(t *testing.T) {
t.Run("local and remote disabled", func(t *testing.T) {
c := newWithDefaults()
c.Hook = hook{
+ BeforeUserCreated: &hookConfig{Enabled: false},
CustomAccessToken: &hookConfig{Enabled: false},
SendSMS: &hookConfig{Enabled: false},
SendEmail: &hookConfig{Enabled: false},
@@ -373,11 +403,12 @@ func TestHookDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- HookCustomAccessTokenEnabled: cast.Ptr(false),
- HookSendSmsEnabled: cast.Ptr(false),
- HookSendEmailEnabled: cast.Ptr(false),
- HookMfaVerificationAttemptEnabled: cast.Ptr(false),
- HookPasswordVerificationAttemptEnabled: cast.Ptr(false),
+ HookBeforeUserCreatedEnabled: nullable.NewNullableWithValue(false),
+ HookCustomAccessTokenEnabled: nullable.NewNullableWithValue(false),
+ HookSendSmsEnabled: nullable.NewNullableWithValue(false),
+ HookSendEmailEnabled: nullable.NewNullableWithValue(false),
+ HookMfaVerificationAttemptEnabled: nullable.NewNullableWithValue(false),
+ HookPasswordVerificationAttemptEnabled: nullable.NewNullableWithValue(false),
})
// Check error
assert.NoError(t, err)
@@ -410,16 +441,16 @@ func TestMfaDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- MfaMaxEnrolledFactors: cast.Ptr(10),
- MfaTotpEnrollEnabled: cast.Ptr(true),
- MfaTotpVerifyEnabled: cast.Ptr(true),
- MfaPhoneEnrollEnabled: cast.Ptr(true),
- MfaPhoneVerifyEnabled: cast.Ptr(true),
+ MfaMaxEnrolledFactors: nullable.NewNullableWithValue(10),
+ MfaTotpEnrollEnabled: nullable.NewNullableWithValue(true),
+ MfaTotpVerifyEnabled: nullable.NewNullableWithValue(true),
+ MfaPhoneEnrollEnabled: nullable.NewNullableWithValue(true),
+ MfaPhoneVerifyEnabled: nullable.NewNullableWithValue(true),
MfaPhoneOtpLength: 6,
- MfaPhoneTemplate: cast.Ptr("Your code is {{ .Code }}"),
- MfaPhoneMaxFrequency: cast.Ptr(5),
- MfaWebAuthnEnrollEnabled: cast.Ptr(true),
- MfaWebAuthnVerifyEnabled: cast.Ptr(true),
+ MfaPhoneTemplate: nullable.NewNullableWithValue("Your code is {{ .Code }}"),
+ MfaPhoneMaxFrequency: nullable.NewNullableWithValue(5),
+ MfaWebAuthnEnrollEnabled: nullable.NewNullableWithValue(true),
+ MfaWebAuthnVerifyEnabled: nullable.NewNullableWithValue(true),
})
// Check error
assert.NoError(t, err)
@@ -442,16 +473,16 @@ func TestMfaDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- MfaMaxEnrolledFactors: cast.Ptr(10),
- MfaTotpEnrollEnabled: cast.Ptr(false),
- MfaTotpVerifyEnabled: cast.Ptr(false),
- MfaPhoneEnrollEnabled: cast.Ptr(false),
- MfaPhoneVerifyEnabled: cast.Ptr(false),
+ MfaMaxEnrolledFactors: nullable.NewNullableWithValue(10),
+ MfaTotpEnrollEnabled: nullable.NewNullableWithValue(false),
+ MfaTotpVerifyEnabled: nullable.NewNullableWithValue(false),
+ MfaPhoneEnrollEnabled: nullable.NewNullableWithValue(false),
+ MfaPhoneVerifyEnabled: nullable.NewNullableWithValue(false),
MfaPhoneOtpLength: 6,
- MfaPhoneTemplate: cast.Ptr("Your code is {{ .Code }}"),
- MfaPhoneMaxFrequency: cast.Ptr(5),
- MfaWebAuthnEnrollEnabled: cast.Ptr(false),
- MfaWebAuthnVerifyEnabled: cast.Ptr(false),
+ MfaPhoneTemplate: nullable.NewNullableWithValue("Your code is {{ .Code }}"),
+ MfaPhoneMaxFrequency: nullable.NewNullableWithValue(5),
+ MfaWebAuthnEnrollEnabled: nullable.NewNullableWithValue(false),
+ MfaWebAuthnVerifyEnabled: nullable.NewNullableWithValue(false),
})
// Check error
assert.NoError(t, err)
@@ -470,16 +501,16 @@ func TestMfaDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- MfaMaxEnrolledFactors: cast.Ptr(10),
- MfaTotpEnrollEnabled: cast.Ptr(false),
- MfaTotpVerifyEnabled: cast.Ptr(false),
- MfaPhoneEnrollEnabled: cast.Ptr(false),
- MfaPhoneVerifyEnabled: cast.Ptr(false),
+ MfaMaxEnrolledFactors: nullable.NewNullableWithValue(10),
+ MfaTotpEnrollEnabled: nullable.NewNullableWithValue(false),
+ MfaTotpVerifyEnabled: nullable.NewNullableWithValue(false),
+ MfaPhoneEnrollEnabled: nullable.NewNullableWithValue(false),
+ MfaPhoneVerifyEnabled: nullable.NewNullableWithValue(false),
MfaPhoneOtpLength: 6,
- MfaPhoneTemplate: cast.Ptr("Your code is {{ .Code }}"),
- MfaPhoneMaxFrequency: cast.Ptr(5),
- MfaWebAuthnEnrollEnabled: cast.Ptr(false),
- MfaWebAuthnVerifyEnabled: cast.Ptr(false),
+ MfaPhoneTemplate: nullable.NewNullableWithValue("Your code is {{ .Code }}"),
+ MfaPhoneMaxFrequency: nullable.NewNullableWithValue(5),
+ MfaWebAuthnEnrollEnabled: nullable.NewNullableWithValue(false),
+ MfaWebAuthnVerifyEnabled: nullable.NewNullableWithValue(false),
})
// Check error
assert.NoError(t, err)
@@ -530,7 +561,7 @@ func TestEmailDiff(t *testing.T) {
Value: "test-key",
SHA256: "ed64b7695a606bc6ab4fcb41fe815b5ddf1063ccbc87afe1fa89756635db520e",
},
- AdminEmail: "admin@email.com",
+ AdminEmail: openapi_types.Email("admin@email.com"),
SenderName: "Admin",
},
MaxFrequency: time.Second,
@@ -539,32 +570,32 @@ func TestEmailDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalEmailEnabled: cast.Ptr(true),
- MailerSecureEmailChangeEnabled: cast.Ptr(true),
- MailerAutoconfirm: cast.Ptr(false),
- MailerOtpLength: cast.Ptr(6),
+ ExternalEmailEnabled: nullable.NewNullableWithValue(true),
+ MailerSecureEmailChangeEnabled: nullable.NewNullableWithValue(true),
+ MailerAutoconfirm: nullable.NewNullableWithValue(false),
+ MailerOtpLength: nullable.NewNullableWithValue(6),
MailerOtpExp: 3600,
- SecurityUpdatePasswordRequireReauthentication: cast.Ptr(true),
- SmtpHost: cast.Ptr("smtp.sendgrid.net"),
- SmtpPort: cast.Ptr("587"),
- SmtpUser: cast.Ptr("apikey"),
- SmtpPass: cast.Ptr("ed64b7695a606bc6ab4fcb41fe815b5ddf1063ccbc87afe1fa89756635db520e"),
- SmtpAdminEmail: cast.Ptr("admin@email.com"),
- SmtpSenderName: cast.Ptr("Admin"),
- SmtpMaxFrequency: cast.Ptr(1),
+ SecurityUpdatePasswordRequireReauthentication: nullable.NewNullableWithValue(true),
+ SmtpHost: nullable.NewNullableWithValue("smtp.sendgrid.net"),
+ SmtpPort: nullable.NewNullableWithValue("587"),
+ SmtpUser: nullable.NewNullableWithValue("apikey"),
+ SmtpPass: nullable.NewNullableWithValue("ed64b7695a606bc6ab4fcb41fe815b5ddf1063ccbc87afe1fa89756635db520e"),
+ SmtpAdminEmail: nullable.NewNullableWithValue(openapi_types.Email("admin@email.com")),
+ SmtpSenderName: nullable.NewNullableWithValue("Admin"),
+ SmtpMaxFrequency: nullable.NewNullableWithValue(1),
// Custom templates
- MailerSubjectsInvite: cast.Ptr("invite-subject"),
- MailerTemplatesInviteContent: cast.Ptr("invite-content"),
- MailerSubjectsConfirmation: cast.Ptr("confirmation-subject"),
- MailerTemplatesConfirmationContent: cast.Ptr("confirmation-content"),
- MailerSubjectsRecovery: cast.Ptr("recovery-subject"),
- MailerTemplatesRecoveryContent: cast.Ptr("recovery-content"),
- MailerSubjectsMagicLink: cast.Ptr("magic-link-subject"),
- MailerTemplatesMagicLinkContent: cast.Ptr("magic-link-content"),
- MailerSubjectsEmailChange: cast.Ptr("email-change-subject"),
- MailerTemplatesEmailChangeContent: cast.Ptr("email-change-content"),
- MailerSubjectsReauthentication: cast.Ptr("reauthentication-subject"),
- MailerTemplatesReauthenticationContent: cast.Ptr("reauthentication-content"),
+ MailerSubjectsInvite: nullable.NewNullableWithValue("invite-subject"),
+ MailerTemplatesInviteContent: nullable.NewNullableWithValue("invite-content"),
+ MailerSubjectsConfirmation: nullable.NewNullableWithValue("confirmation-subject"),
+ MailerTemplatesConfirmationContent: nullable.NewNullableWithValue("confirmation-content"),
+ MailerSubjectsRecovery: nullable.NewNullableWithValue("recovery-subject"),
+ MailerTemplatesRecoveryContent: nullable.NewNullableWithValue("recovery-content"),
+ MailerSubjectsMagicLink: nullable.NewNullableWithValue("magic-link-subject"),
+ MailerTemplatesMagicLinkContent: nullable.NewNullableWithValue("magic-link-content"),
+ MailerSubjectsEmailChange: nullable.NewNullableWithValue("email-change-subject"),
+ MailerTemplatesEmailChangeContent: nullable.NewNullableWithValue("email-change-content"),
+ MailerSubjectsReauthentication: nullable.NewNullableWithValue("reauthentication-subject"),
+ MailerTemplatesReauthenticationContent: nullable.NewNullableWithValue("reauthentication-content"),
})
// Check error
assert.NoError(t, err)
@@ -611,7 +642,7 @@ func TestEmailDiff(t *testing.T) {
Value: "test-key",
SHA256: "ed64b7695a606bc6ab4fcb41fe815b5ddf1063ccbc87afe1fa89756635db520e",
},
- AdminEmail: "admin@email.com",
+ AdminEmail: openapi_types.Email("admin@email.com"),
SenderName: "Admin",
},
MaxFrequency: time.Second,
@@ -620,18 +651,18 @@ func TestEmailDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalEmailEnabled: cast.Ptr(false),
- MailerSecureEmailChangeEnabled: cast.Ptr(false),
- MailerAutoconfirm: cast.Ptr(true),
- MailerOtpLength: cast.Ptr(6),
+ ExternalEmailEnabled: nullable.NewNullableWithValue(false),
+ MailerSecureEmailChangeEnabled: nullable.NewNullableWithValue(false),
+ MailerAutoconfirm: nullable.NewNullableWithValue(true),
+ MailerOtpLength: nullable.NewNullableWithValue(6),
MailerOtpExp: 3600,
- SecurityUpdatePasswordRequireReauthentication: cast.Ptr(false),
- SmtpMaxFrequency: cast.Ptr(60),
+ SecurityUpdatePasswordRequireReauthentication: nullable.NewNullableWithValue(false),
+ SmtpMaxFrequency: nullable.NewNullableWithValue(60),
// Custom templates
- MailerTemplatesConfirmationContent: cast.Ptr("confirmation-content"),
- MailerSubjectsRecovery: cast.Ptr("recovery-subject"),
- MailerSubjectsMagicLink: cast.Ptr("magic-link-subject"),
- MailerTemplatesEmailChangeContent: cast.Ptr("email-change-content"),
+ MailerTemplatesConfirmationContent: nullable.NewNullableWithValue("confirmation-content"),
+ MailerSubjectsRecovery: nullable.NewNullableWithValue("recovery-subject"),
+ MailerSubjectsMagicLink: nullable.NewNullableWithValue("magic-link-subject"),
+ MailerTemplatesEmailChangeContent: nullable.NewNullableWithValue("email-change-content"),
})
// Check error
assert.NoError(t, err)
@@ -656,32 +687,32 @@ func TestEmailDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalEmailEnabled: cast.Ptr(true),
- MailerSecureEmailChangeEnabled: cast.Ptr(true),
- MailerAutoconfirm: cast.Ptr(false),
- MailerOtpLength: cast.Ptr(6),
+ ExternalEmailEnabled: nullable.NewNullableWithValue(true),
+ MailerSecureEmailChangeEnabled: nullable.NewNullableWithValue(true),
+ MailerAutoconfirm: nullable.NewNullableWithValue(false),
+ MailerOtpLength: nullable.NewNullableWithValue(6),
MailerOtpExp: 3600,
- SecurityUpdatePasswordRequireReauthentication: cast.Ptr(true),
- SmtpHost: cast.Ptr("smtp.sendgrid.net"),
- SmtpPort: cast.Ptr("587"),
- SmtpUser: cast.Ptr("apikey"),
- SmtpPass: cast.Ptr("ed64b7695a606bc6ab4fcb41fe815b5ddf1063ccbc87afe1fa89756635db520e"),
- SmtpAdminEmail: cast.Ptr("admin@email.com"),
- SmtpSenderName: cast.Ptr("Admin"),
- SmtpMaxFrequency: cast.Ptr(1),
+ SecurityUpdatePasswordRequireReauthentication: nullable.NewNullableWithValue(true),
+ SmtpHost: nullable.NewNullableWithValue("smtp.sendgrid.net"),
+ SmtpPort: nullable.NewNullableWithValue("587"),
+ SmtpUser: nullable.NewNullableWithValue("apikey"),
+ SmtpPass: nullable.NewNullableWithValue("ed64b7695a606bc6ab4fcb41fe815b5ddf1063ccbc87afe1fa89756635db520e"),
+ SmtpAdminEmail: nullable.NewNullableWithValue(openapi_types.Email("admin@email.com")),
+ SmtpSenderName: nullable.NewNullableWithValue("Admin"),
+ SmtpMaxFrequency: nullable.NewNullableWithValue(1),
// Custom templates
- MailerSubjectsInvite: cast.Ptr("invite-subject"),
- MailerTemplatesInviteContent: cast.Ptr("invite-content"),
- MailerSubjectsConfirmation: cast.Ptr("confirmation-subject"),
- MailerTemplatesConfirmationContent: cast.Ptr("confirmation-content"),
- MailerSubjectsRecovery: cast.Ptr("recovery-subject"),
- MailerTemplatesRecoveryContent: cast.Ptr("recovery-content"),
- MailerSubjectsMagicLink: cast.Ptr("magic-link-subject"),
- MailerTemplatesMagicLinkContent: cast.Ptr("magic-link-content"),
- MailerSubjectsEmailChange: cast.Ptr("email-change-subject"),
- MailerTemplatesEmailChangeContent: cast.Ptr("email-change-content"),
- MailerSubjectsReauthentication: cast.Ptr("reauthentication-subject"),
- MailerTemplatesReauthenticationContent: cast.Ptr("reauthentication-content"),
+ MailerSubjectsInvite: nullable.NewNullableWithValue("invite-subject"),
+ MailerTemplatesInviteContent: nullable.NewNullableWithValue("invite-content"),
+ MailerSubjectsConfirmation: nullable.NewNullableWithValue("confirmation-subject"),
+ MailerTemplatesConfirmationContent: nullable.NewNullableWithValue("confirmation-content"),
+ MailerSubjectsRecovery: nullable.NewNullableWithValue("recovery-subject"),
+ MailerTemplatesRecoveryContent: nullable.NewNullableWithValue("recovery-content"),
+ MailerSubjectsMagicLink: nullable.NewNullableWithValue("magic-link-subject"),
+ MailerTemplatesMagicLinkContent: nullable.NewNullableWithValue("magic-link-content"),
+ MailerSubjectsEmailChange: nullable.NewNullableWithValue("email-change-subject"),
+ MailerTemplatesEmailChangeContent: nullable.NewNullableWithValue("email-change-content"),
+ MailerSubjectsReauthentication: nullable.NewNullableWithValue("reauthentication-subject"),
+ MailerTemplatesReauthenticationContent: nullable.NewNullableWithValue("reauthentication-content"),
})
// Check error
assert.NoError(t, err)
@@ -709,7 +740,7 @@ func TestEmailDiff(t *testing.T) {
Value: "test-key",
SHA256: "ed64b7695a606bc6ab4fcb41fe815b5ddf1063ccbc87afe1fa89756635db520e",
},
- AdminEmail: "admin@email.com",
+ AdminEmail: openapi_types.Email("admin@email.com"),
SenderName: "Admin",
},
MaxFrequency: time.Minute,
@@ -718,13 +749,13 @@ func TestEmailDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalEmailEnabled: cast.Ptr(false),
- MailerSecureEmailChangeEnabled: cast.Ptr(false),
- MailerAutoconfirm: cast.Ptr(true),
- MailerOtpLength: cast.Ptr(6),
+ ExternalEmailEnabled: nullable.NewNullableWithValue(false),
+ MailerSecureEmailChangeEnabled: nullable.NewNullableWithValue(false),
+ MailerAutoconfirm: nullable.NewNullableWithValue(true),
+ MailerOtpLength: nullable.NewNullableWithValue(6),
MailerOtpExp: 3600,
- SecurityUpdatePasswordRequireReauthentication: cast.Ptr(false),
- SmtpMaxFrequency: cast.Ptr(60),
+ SecurityUpdatePasswordRequireReauthentication: nullable.NewNullableWithValue(false),
+ SmtpMaxFrequency: nullable.NewNullableWithValue(60),
})
// Check error
assert.NoError(t, err)
@@ -753,30 +784,30 @@ func TestSmsDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalPhoneEnabled: cast.Ptr(true),
- SmsAutoconfirm: cast.Ptr(true),
- SmsMaxFrequency: cast.Ptr(60),
- SmsOtpExp: cast.Ptr(3600),
+ ExternalPhoneEnabled: nullable.NewNullableWithValue(true),
+ SmsAutoconfirm: nullable.NewNullableWithValue(true),
+ SmsMaxFrequency: nullable.NewNullableWithValue(60),
+ SmsOtpExp: nullable.NewNullableWithValue(3600),
SmsOtpLength: 6,
- SmsProvider: cast.Ptr("twilio"),
- SmsTemplate: cast.Ptr("Your code is {{ .Code }}"),
- SmsTestOtp: cast.Ptr("123=456"),
- SmsTestOtpValidUntil: cast.Ptr("2050-01-01T01:00:00Z"),
- SmsTwilioAccountSid: cast.Ptr("test-account"),
- SmsTwilioAuthToken: cast.Ptr("c84443bc59b92caef8ec8500ff443584793756749523811eb333af2bbc74fc88"),
- SmsTwilioContentSid: cast.Ptr("test-content"),
- SmsTwilioMessageServiceSid: cast.Ptr("test-service"),
+ SmsProvider: nullable.NewNullableWithValue(v1API.AuthConfigResponseSmsProviderTwilio),
+ SmsTemplate: nullable.NewNullableWithValue("Your code is {{ .Code }}"),
+ SmsTestOtp: nullable.NewNullableWithValue("123=456"),
+ SmsTestOtpValidUntil: nullable.NewNullableWithValue(time.Date(2050, 1, 1, 1, 0, 0, 0, time.UTC)),
+ SmsTwilioAccountSid: nullable.NewNullableWithValue("test-account"),
+ SmsTwilioAuthToken: nullable.NewNullableWithValue("c84443bc59b92caef8ec8500ff443584793756749523811eb333af2bbc74fc88"),
+ SmsTwilioContentSid: nullable.NewNullableWithValue("test-content"),
+ SmsTwilioMessageServiceSid: nullable.NewNullableWithValue("test-service"),
// Extra configs returned from api can be ignored
- SmsMessagebirdAccessKey: cast.Ptr("test-messagebird-key"),
- SmsMessagebirdOriginator: cast.Ptr("test-messagebird-originator"),
- SmsTextlocalApiKey: cast.Ptr("test-textlocal-key"),
- SmsTextlocalSender: cast.Ptr("test-textlocal-sencer"),
- SmsTwilioVerifyAccountSid: cast.Ptr("test-verify-account"),
- SmsTwilioVerifyAuthToken: cast.Ptr("test-verify-token"),
- SmsTwilioVerifyMessageServiceSid: cast.Ptr("test-verify-service"),
- SmsVonageApiKey: cast.Ptr("test-vonage-key"),
- SmsVonageApiSecret: cast.Ptr("test-vonage-secret"),
- SmsVonageFrom: cast.Ptr("test-vonage-from"),
+ SmsMessagebirdAccessKey: nullable.NewNullableWithValue("test-messagebird-key"),
+ SmsMessagebirdOriginator: nullable.NewNullableWithValue("test-messagebird-originator"),
+ SmsTextlocalApiKey: nullable.NewNullableWithValue("test-textlocal-key"),
+ SmsTextlocalSender: nullable.NewNullableWithValue("test-textlocal-sencer"),
+ SmsTwilioVerifyAccountSid: nullable.NewNullableWithValue("test-verify-account"),
+ SmsTwilioVerifyAuthToken: nullable.NewNullableWithValue("test-verify-token"),
+ SmsTwilioVerifyMessageServiceSid: nullable.NewNullableWithValue("test-verify-service"),
+ SmsVonageApiKey: nullable.NewNullableWithValue("test-vonage-key"),
+ SmsVonageApiSecret: nullable.NewNullableWithValue("test-vonage-secret"),
+ SmsVonageFrom: nullable.NewNullableWithValue("test-vonage-from"),
})
// Check error
assert.NoError(t, err)
@@ -787,19 +818,19 @@ func TestSmsDiff(t *testing.T) {
c := newWithDefaults()
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalPhoneEnabled: cast.Ptr(true),
- SmsAutoconfirm: cast.Ptr(true),
- SmsMaxFrequency: cast.Ptr(60),
- SmsOtpExp: cast.Ptr(3600),
+ ExternalPhoneEnabled: nullable.NewNullableWithValue(true),
+ SmsAutoconfirm: nullable.NewNullableWithValue(true),
+ SmsMaxFrequency: nullable.NewNullableWithValue(60),
+ SmsOtpExp: nullable.NewNullableWithValue(3600),
SmsOtpLength: 6,
- SmsProvider: cast.Ptr("twilio"),
- SmsTemplate: cast.Ptr("Your code is {{ .Code }}"),
- SmsTestOtp: cast.Ptr("123=456,456=123"),
- SmsTestOtpValidUntil: cast.Ptr("2050-01-01T01:00:00Z"),
- SmsTwilioAccountSid: cast.Ptr("test-account"),
- SmsTwilioAuthToken: cast.Ptr("c84443bc59b92caef8ec8500ff443584793756749523811eb333af2bbc74fc88"),
- SmsTwilioContentSid: cast.Ptr("test-content"),
- SmsTwilioMessageServiceSid: cast.Ptr("test-service"),
+ SmsProvider: nullable.NewNullableWithValue(v1API.AuthConfigResponseSmsProviderTwilio),
+ SmsTemplate: nullable.NewNullableWithValue("Your code is {{ .Code }}"),
+ SmsTestOtp: nullable.NewNullableWithValue("123=456,456=123"),
+ SmsTestOtpValidUntil: nullable.NewNullableWithValue(time.Date(2050, 1, 1, 1, 0, 0, 0, time.UTC)),
+ SmsTwilioAccountSid: nullable.NewNullableWithValue("test-account"),
+ SmsTwilioAuthToken: nullable.NewNullableWithValue("c84443bc59b92caef8ec8500ff443584793756749523811eb333af2bbc74fc88"),
+ SmsTwilioContentSid: nullable.NewNullableWithValue("test-content"),
+ SmsTwilioMessageServiceSid: nullable.NewNullableWithValue("test-service"),
})
// Check error
assert.NoError(t, err)
@@ -825,17 +856,17 @@ func TestSmsDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalPhoneEnabled: cast.Ptr(false),
- SmsAutoconfirm: cast.Ptr(false),
- SmsMaxFrequency: cast.Ptr(0),
- SmsOtpExp: cast.Ptr(3600),
+ ExternalPhoneEnabled: nullable.NewNullableWithValue(false),
+ SmsAutoconfirm: nullable.NewNullableWithValue(false),
+ SmsMaxFrequency: nullable.NewNullableWithValue(0),
+ SmsOtpExp: nullable.NewNullableWithValue(3600),
SmsOtpLength: 6,
- SmsProvider: cast.Ptr("twilio"),
- SmsTemplate: cast.Ptr(""),
- SmsTwilioAccountSid: cast.Ptr("test-account"),
- SmsTwilioAuthToken: cast.Ptr("c84443bc59b92caef8ec8500ff443584793756749523811eb333af2bbc74fc88"),
- SmsTwilioContentSid: cast.Ptr("test-content"),
- SmsTwilioMessageServiceSid: cast.Ptr("test-service"),
+ SmsProvider: nullable.NewNullableWithValue(v1API.AuthConfigResponseSmsProviderTwilio),
+ SmsTemplate: nullable.NewNullableWithValue(""),
+ SmsTwilioAccountSid: nullable.NewNullableWithValue("test-account"),
+ SmsTwilioAuthToken: nullable.NewNullableWithValue("c84443bc59b92caef8ec8500ff443584793756749523811eb333af2bbc74fc88"),
+ SmsTwilioContentSid: nullable.NewNullableWithValue("test-content"),
+ SmsTwilioMessageServiceSid: nullable.NewNullableWithValue("test-service"),
})
// Check error
assert.NoError(t, err)
@@ -853,17 +884,17 @@ func TestSmsDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalPhoneEnabled: cast.Ptr(false),
- SmsAutoconfirm: cast.Ptr(true),
- SmsMaxFrequency: cast.Ptr(60),
- SmsOtpExp: cast.Ptr(3600),
+ ExternalPhoneEnabled: nullable.NewNullableWithValue(false),
+ SmsAutoconfirm: nullable.NewNullableWithValue(true),
+ SmsMaxFrequency: nullable.NewNullableWithValue(60),
+ SmsOtpExp: nullable.NewNullableWithValue(3600),
SmsOtpLength: 6,
- SmsTemplate: cast.Ptr("Your code is {{ .Code }}"),
- SmsTestOtp: cast.Ptr("123=456"),
- SmsTestOtpValidUntil: cast.Ptr("2050-01-01T01:00:00Z"),
- SmsProvider: cast.Ptr("messagebird"),
- SmsMessagebirdAccessKey: cast.Ptr("test-messagebird-key"),
- SmsMessagebirdOriginator: cast.Ptr("test-messagebird-originator"),
+ SmsTemplate: nullable.NewNullableWithValue("Your code is {{ .Code }}"),
+ SmsTestOtp: nullable.NewNullableWithValue("123=456"),
+ SmsTestOtpValidUntil: nullable.NewNullableWithValue(time.Date(2050, 1, 1, 1, 0, 0, 0, time.UTC)),
+ SmsProvider: nullable.NewNullableWithValue(v1API.AuthConfigResponseSmsProviderMessagebird),
+ SmsMessagebirdAccessKey: nullable.NewNullableWithValue("test-messagebird-key"),
+ SmsMessagebirdOriginator: nullable.NewNullableWithValue("test-messagebird-originator"),
})
// Check error
assert.NoError(t, err)
@@ -877,8 +908,8 @@ func TestSmsDiff(t *testing.T) {
c.Sms.EnableSignup = true
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalPhoneEnabled: cast.Ptr(false),
- SmsProvider: cast.Ptr("twilio"),
+ ExternalPhoneEnabled: nullable.NewNullableWithValue(false),
+ SmsProvider: nullable.NewNullableWithValue(v1API.AuthConfigResponseSmsProviderTwilio),
})
// Check error
assert.NoError(t, err)
@@ -890,9 +921,9 @@ func TestSmsDiff(t *testing.T) {
c.Sms.Messagebird.Enabled = true
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalPhoneEnabled: cast.Ptr(false),
- SmsProvider: cast.Ptr("messagebird"),
- SmsMessagebirdAccessKey: cast.Ptr(""),
+ ExternalPhoneEnabled: nullable.NewNullableWithValue(false),
+ SmsProvider: nullable.NewNullableWithValue(v1API.AuthConfigResponseSmsProviderMessagebird),
+ SmsMessagebirdAccessKey: nullable.NewNullableWithValue(""),
})
// Check error
assert.NoError(t, err)
@@ -926,74 +957,74 @@ func TestExternalDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalAppleAdditionalClientIds: cast.Ptr(""),
- ExternalAppleClientId: cast.Ptr(""),
- ExternalAppleEnabled: cast.Ptr(true),
- ExternalAppleSecret: cast.Ptr(""),
- ExternalAzureClientId: cast.Ptr(""),
- ExternalAzureEnabled: cast.Ptr(true),
- ExternalAzureSecret: cast.Ptr(""),
- ExternalAzureUrl: cast.Ptr(""),
- ExternalBitbucketClientId: cast.Ptr(""),
- ExternalBitbucketEnabled: cast.Ptr(true),
- ExternalBitbucketSecret: cast.Ptr(""),
- ExternalDiscordClientId: cast.Ptr(""),
- ExternalDiscordEnabled: cast.Ptr(true),
- ExternalDiscordSecret: cast.Ptr(""),
- ExternalFacebookClientId: cast.Ptr(""),
- ExternalFacebookEnabled: cast.Ptr(true),
- ExternalFacebookSecret: cast.Ptr(""),
- ExternalFigmaClientId: cast.Ptr(""),
- ExternalFigmaEnabled: cast.Ptr(true),
- ExternalFigmaSecret: cast.Ptr(""),
- ExternalGithubClientId: cast.Ptr(""),
- ExternalGithubEnabled: cast.Ptr(true),
- ExternalGithubSecret: cast.Ptr(""),
- ExternalGitlabClientId: cast.Ptr(""),
- ExternalGitlabEnabled: cast.Ptr(true),
- ExternalGitlabSecret: cast.Ptr(""),
- ExternalGitlabUrl: cast.Ptr(""),
- ExternalGoogleAdditionalClientIds: cast.Ptr(""),
- ExternalGoogleClientId: cast.Ptr(""),
- ExternalGoogleEnabled: cast.Ptr(true),
- ExternalGoogleSecret: cast.Ptr(""),
- ExternalGoogleSkipNonceCheck: cast.Ptr(false),
- ExternalKakaoClientId: cast.Ptr(""),
- ExternalKakaoEnabled: cast.Ptr(true),
- ExternalKakaoSecret: cast.Ptr(""),
- ExternalKeycloakClientId: cast.Ptr(""),
- ExternalKeycloakEnabled: cast.Ptr(true),
- ExternalKeycloakSecret: cast.Ptr(""),
- ExternalKeycloakUrl: cast.Ptr(""),
- ExternalLinkedinOidcClientId: cast.Ptr(""),
- ExternalLinkedinOidcEnabled: cast.Ptr(true),
- ExternalLinkedinOidcSecret: cast.Ptr(""),
- ExternalNotionClientId: cast.Ptr(""),
- ExternalNotionEnabled: cast.Ptr(true),
- ExternalNotionSecret: cast.Ptr(""),
- ExternalSlackOidcClientId: cast.Ptr(""),
- ExternalSlackOidcEnabled: cast.Ptr(true),
- ExternalSlackOidcSecret: cast.Ptr(""),
- ExternalSpotifyClientId: cast.Ptr(""),
- ExternalSpotifyEnabled: cast.Ptr(true),
- ExternalSpotifySecret: cast.Ptr(""),
- ExternalTwitchClientId: cast.Ptr(""),
- ExternalTwitchEnabled: cast.Ptr(true),
- ExternalTwitchSecret: cast.Ptr(""),
- ExternalTwitterClientId: cast.Ptr(""),
- ExternalTwitterEnabled: cast.Ptr(true),
- ExternalTwitterSecret: cast.Ptr(""),
- ExternalWorkosClientId: cast.Ptr(""),
- ExternalWorkosEnabled: cast.Ptr(true),
- ExternalWorkosSecret: cast.Ptr(""),
- ExternalWorkosUrl: cast.Ptr(""),
- ExternalZoomClientId: cast.Ptr(""),
- ExternalZoomEnabled: cast.Ptr(true),
- ExternalZoomSecret: cast.Ptr(""),
+ ExternalAppleAdditionalClientIds: nullable.NewNullableWithValue(""),
+ ExternalAppleClientId: nullable.NewNullableWithValue(""),
+ ExternalAppleEnabled: nullable.NewNullableWithValue(true),
+ ExternalAppleSecret: nullable.NewNullableWithValue(""),
+ ExternalAzureClientId: nullable.NewNullableWithValue(""),
+ ExternalAzureEnabled: nullable.NewNullableWithValue(true),
+ ExternalAzureSecret: nullable.NewNullableWithValue(""),
+ ExternalAzureUrl: nullable.NewNullableWithValue(""),
+ ExternalBitbucketClientId: nullable.NewNullableWithValue(""),
+ ExternalBitbucketEnabled: nullable.NewNullableWithValue(true),
+ ExternalBitbucketSecret: nullable.NewNullableWithValue(""),
+ ExternalDiscordClientId: nullable.NewNullableWithValue(""),
+ ExternalDiscordEnabled: nullable.NewNullableWithValue(true),
+ ExternalDiscordSecret: nullable.NewNullableWithValue(""),
+ ExternalFacebookClientId: nullable.NewNullableWithValue(""),
+ ExternalFacebookEnabled: nullable.NewNullableWithValue(true),
+ ExternalFacebookSecret: nullable.NewNullableWithValue(""),
+ ExternalFigmaClientId: nullable.NewNullableWithValue(""),
+ ExternalFigmaEnabled: nullable.NewNullableWithValue(true),
+ ExternalFigmaSecret: nullable.NewNullableWithValue(""),
+ ExternalGithubClientId: nullable.NewNullableWithValue(""),
+ ExternalGithubEnabled: nullable.NewNullableWithValue(true),
+ ExternalGithubSecret: nullable.NewNullableWithValue(""),
+ ExternalGitlabClientId: nullable.NewNullableWithValue(""),
+ ExternalGitlabEnabled: nullable.NewNullableWithValue(true),
+ ExternalGitlabSecret: nullable.NewNullableWithValue(""),
+ ExternalGitlabUrl: nullable.NewNullableWithValue(""),
+ ExternalGoogleAdditionalClientIds: nullable.NewNullableWithValue(""),
+ ExternalGoogleClientId: nullable.NewNullableWithValue(""),
+ ExternalGoogleEnabled: nullable.NewNullableWithValue(true),
+ ExternalGoogleSecret: nullable.NewNullableWithValue(""),
+ ExternalGoogleSkipNonceCheck: nullable.NewNullableWithValue(false),
+ ExternalKakaoClientId: nullable.NewNullableWithValue(""),
+ ExternalKakaoEnabled: nullable.NewNullableWithValue(true),
+ ExternalKakaoSecret: nullable.NewNullableWithValue(""),
+ ExternalKeycloakClientId: nullable.NewNullableWithValue(""),
+ ExternalKeycloakEnabled: nullable.NewNullableWithValue(true),
+ ExternalKeycloakSecret: nullable.NewNullableWithValue(""),
+ ExternalKeycloakUrl: nullable.NewNullableWithValue(""),
+ ExternalLinkedinOidcClientId: nullable.NewNullableWithValue(""),
+ ExternalLinkedinOidcEnabled: nullable.NewNullableWithValue(true),
+ ExternalLinkedinOidcSecret: nullable.NewNullableWithValue(""),
+ ExternalNotionClientId: nullable.NewNullableWithValue(""),
+ ExternalNotionEnabled: nullable.NewNullableWithValue(true),
+ ExternalNotionSecret: nullable.NewNullableWithValue(""),
+ ExternalSlackOidcClientId: nullable.NewNullableWithValue(""),
+ ExternalSlackOidcEnabled: nullable.NewNullableWithValue(true),
+ ExternalSlackOidcSecret: nullable.NewNullableWithValue(""),
+ ExternalSpotifyClientId: nullable.NewNullableWithValue(""),
+ ExternalSpotifyEnabled: nullable.NewNullableWithValue(true),
+ ExternalSpotifySecret: nullable.NewNullableWithValue(""),
+ ExternalTwitchClientId: nullable.NewNullableWithValue(""),
+ ExternalTwitchEnabled: nullable.NewNullableWithValue(true),
+ ExternalTwitchSecret: nullable.NewNullableWithValue(""),
+ ExternalTwitterClientId: nullable.NewNullableWithValue(""),
+ ExternalTwitterEnabled: nullable.NewNullableWithValue(true),
+ ExternalTwitterSecret: nullable.NewNullableWithValue(""),
+ ExternalWorkosClientId: nullable.NewNullableWithValue(""),
+ ExternalWorkosEnabled: nullable.NewNullableWithValue(true),
+ ExternalWorkosSecret: nullable.NewNullableWithValue(""),
+ ExternalWorkosUrl: nullable.NewNullableWithValue(""),
+ ExternalZoomClientId: nullable.NewNullableWithValue(""),
+ ExternalZoomEnabled: nullable.NewNullableWithValue(true),
+ ExternalZoomSecret: nullable.NewNullableWithValue(""),
// Deprecated fields should be ignored
- ExternalSlackClientId: cast.Ptr(""),
- ExternalSlackEnabled: cast.Ptr(true),
- ExternalSlackSecret: cast.Ptr(""),
+ ExternalSlackClientId: nullable.NewNullableWithValue(""),
+ ExternalSlackEnabled: nullable.NewNullableWithValue(true),
+ ExternalSlackSecret: nullable.NewNullableWithValue(""),
})
// Check error
assert.NoError(t, err)
@@ -1044,18 +1075,18 @@ func TestExternalDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalAppleAdditionalClientIds: cast.Ptr("test-client-2"),
- ExternalAppleClientId: cast.Ptr("test-client-1"),
- ExternalAppleEnabled: cast.Ptr(false),
- ExternalAppleSecret: cast.Ptr("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
- ExternalGoogleAdditionalClientIds: cast.Ptr("test-client-2"),
- ExternalGoogleClientId: cast.Ptr("test-client-1"),
- ExternalGoogleEnabled: cast.Ptr(true),
- ExternalGoogleSecret: cast.Ptr("b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad"),
- ExternalGoogleSkipNonceCheck: cast.Ptr(true),
- ExternalKakaoClientId: cast.Ptr("test-client-2"),
- ExternalKakaoEnabled: cast.Ptr(true),
- ExternalKakaoSecret: cast.Ptr("b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad"),
+ ExternalAppleAdditionalClientIds: nullable.NewNullableWithValue("test-client-2"),
+ ExternalAppleClientId: nullable.NewNullableWithValue("test-client-1"),
+ ExternalAppleEnabled: nullable.NewNullableWithValue(false),
+ ExternalAppleSecret: nullable.NewNullableWithValue("ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"),
+ ExternalGoogleAdditionalClientIds: nullable.NewNullableWithValue("test-client-2"),
+ ExternalGoogleClientId: nullable.NewNullableWithValue("test-client-1"),
+ ExternalGoogleEnabled: nullable.NewNullableWithValue(true),
+ ExternalGoogleSecret: nullable.NewNullableWithValue("b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad"),
+ ExternalGoogleSkipNonceCheck: nullable.NewNullableWithValue(true),
+ ExternalKakaoClientId: nullable.NewNullableWithValue("test-client-2"),
+ ExternalKakaoEnabled: nullable.NewNullableWithValue(true),
+ ExternalKakaoSecret: nullable.NewNullableWithValue("b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad"),
})
// Check error
assert.NoError(t, err)
@@ -1087,28 +1118,28 @@ func TestExternalDiff(t *testing.T) {
}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- ExternalAppleEnabled: cast.Ptr(false),
- ExternalAzureEnabled: cast.Ptr(false),
- ExternalBitbucketEnabled: cast.Ptr(false),
- ExternalDiscordEnabled: cast.Ptr(false),
- ExternalFacebookEnabled: cast.Ptr(false),
- ExternalFigmaEnabled: cast.Ptr(false),
- ExternalGithubEnabled: cast.Ptr(false),
- ExternalGitlabEnabled: cast.Ptr(false),
- ExternalGoogleEnabled: cast.Ptr(false),
- ExternalGoogleSkipNonceCheck: cast.Ptr(false),
- ExternalKakaoEnabled: cast.Ptr(false),
- ExternalKeycloakEnabled: cast.Ptr(false),
- ExternalLinkedinOidcEnabled: cast.Ptr(false),
- ExternalNotionEnabled: cast.Ptr(false),
- ExternalSlackOidcEnabled: cast.Ptr(false),
- ExternalSpotifyEnabled: cast.Ptr(false),
- ExternalTwitchEnabled: cast.Ptr(false),
- ExternalTwitterEnabled: cast.Ptr(false),
- ExternalWorkosEnabled: cast.Ptr(false),
- ExternalZoomEnabled: cast.Ptr(false),
+ ExternalAppleEnabled: nullable.NewNullableWithValue(false),
+ ExternalAzureEnabled: nullable.NewNullableWithValue(false),
+ ExternalBitbucketEnabled: nullable.NewNullableWithValue(false),
+ ExternalDiscordEnabled: nullable.NewNullableWithValue(false),
+ ExternalFacebookEnabled: nullable.NewNullableWithValue(false),
+ ExternalFigmaEnabled: nullable.NewNullableWithValue(false),
+ ExternalGithubEnabled: nullable.NewNullableWithValue(false),
+ ExternalGitlabEnabled: nullable.NewNullableWithValue(false),
+ ExternalGoogleEnabled: nullable.NewNullableWithValue(false),
+ ExternalGoogleSkipNonceCheck: nullable.NewNullableWithValue(false),
+ ExternalKakaoEnabled: nullable.NewNullableWithValue(false),
+ ExternalKeycloakEnabled: nullable.NewNullableWithValue(false),
+ ExternalLinkedinOidcEnabled: nullable.NewNullableWithValue(false),
+ ExternalNotionEnabled: nullable.NewNullableWithValue(false),
+ ExternalSlackOidcEnabled: nullable.NewNullableWithValue(false),
+ ExternalSpotifyEnabled: nullable.NewNullableWithValue(false),
+ ExternalTwitchEnabled: nullable.NewNullableWithValue(false),
+ ExternalTwitterEnabled: nullable.NewNullableWithValue(false),
+ ExternalWorkosEnabled: nullable.NewNullableWithValue(false),
+ ExternalZoomEnabled: nullable.NewNullableWithValue(false),
// Deprecated fields should be ignored
- ExternalSlackEnabled: cast.Ptr(false),
+ ExternalSlackEnabled: nullable.NewNullableWithValue(false),
})
// Check error
assert.NoError(t, err)
@@ -1129,13 +1160,13 @@ func TestRateLimitsDiff(t *testing.T) {
c.Email.Smtp = &smtp{Enabled: true}
// Run test
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- RateLimitAnonymousUsers: cast.Ptr(20),
- RateLimitTokenRefresh: cast.Ptr(30),
- RateLimitOtp: cast.Ptr(40),
- RateLimitVerify: cast.Ptr(50),
- RateLimitEmailSent: cast.Ptr(25),
- RateLimitSmsSent: cast.Ptr(35),
- SmtpHost: cast.Ptr(""),
+ RateLimitAnonymousUsers: nullable.NewNullableWithValue(20),
+ RateLimitTokenRefresh: nullable.NewNullableWithValue(30),
+ RateLimitOtp: nullable.NewNullableWithValue(40),
+ RateLimitVerify: nullable.NewNullableWithValue(50),
+ RateLimitEmailSent: nullable.NewNullableWithValue(25),
+ RateLimitSmsSent: nullable.NewNullableWithValue(35),
+ SmtpHost: nullable.NewNullableWithValue(""),
})
// Check error
assert.NoError(t, err)
@@ -1154,13 +1185,13 @@ func TestRateLimitsDiff(t *testing.T) {
c.Email.Smtp = &smtp{Enabled: true}
// Run test with different remote values
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- RateLimitAnonymousUsers: cast.Ptr(10), // Different value
- RateLimitTokenRefresh: cast.Ptr(30),
- RateLimitOtp: cast.Ptr(45), // Different value
- RateLimitVerify: cast.Ptr(50),
- RateLimitEmailSent: cast.Ptr(15), // Different value
- RateLimitSmsSent: cast.Ptr(55), // Different value
- SmtpHost: cast.Ptr(""),
+ RateLimitAnonymousUsers: nullable.NewNullableWithValue(10), // Different value
+ RateLimitTokenRefresh: nullable.NewNullableWithValue(30),
+ RateLimitOtp: nullable.NewNullableWithValue(45), // Different value
+ RateLimitVerify: nullable.NewNullableWithValue(50),
+ RateLimitEmailSent: nullable.NewNullableWithValue(15), // Different value
+ RateLimitSmsSent: nullable.NewNullableWithValue(55), // Different value
+ SmtpHost: nullable.NewNullableWithValue(""),
})
// Check error
assert.NoError(t, err)
@@ -1174,8 +1205,8 @@ func TestRateLimitsDiff(t *testing.T) {
c.RateLimit.EmailSent = 25
// Run test with remote rate limits
diff, err := c.DiffWithRemote(v1API.AuthConfigResponse{
- RateLimitEmailSent: cast.Ptr(15),
- SmtpHost: cast.Ptr(""),
+ RateLimitEmailSent: nullable.NewNullableWithValue(15),
+ SmtpHost: nullable.NewNullableWithValue(""),
})
// Check error
assert.NoError(t, err)
diff --git a/pkg/config/config.go b/pkg/config/config.go
index 83eb724cc7..d96cc39529 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -26,9 +26,10 @@ import (
"github.com/BurntSushi/toml"
"github.com/docker/go-units"
"github.com/go-errors/errors"
+ "github.com/go-viper/mapstructure/v2"
"github.com/golang-jwt/jwt/v5"
"github.com/joho/godotenv"
- "github.com/mitchellh/mapstructure"
+ "github.com/spf13/afero"
"github.com/spf13/viper"
"github.com/supabase/cli/pkg/cast"
"github.com/supabase/cli/pkg/fetcher"
@@ -114,9 +115,10 @@ func (g Glob) Files(fsys fs.FS) ([]string, error) {
sort.Strings(matches)
// Remove duplicates
for _, item := range matches {
- if _, exists := set[item]; !exists {
- set[item] = struct{}{}
- result = append(result, item)
+ fp := filepath.ToSlash(item)
+ if _, exists := set[fp]; !exists {
+ set[fp] = struct{}{}
+ result = append(result, fp)
}
}
}
@@ -156,16 +158,6 @@ func (c CustomClaims) NewToken() *jwt.Token {
//
// > secret = "env(SUPABASE_AUTH_EXTERNAL_APPLE_SECRET)"
//
-// If you are adding an internal config or secret that doesn't need to be overridden by the user,
-// exclude the field from toml serialization. For example,
-//
-// type auth struct {
-// AnonKey string `toml:"-" mapstructure:"anon_key"`
-// }
-//
-// Use `mapstructure:"anon_key"` tag only if you want inject values from a predictable environment
-// variable, such as SUPABASE_AUTH_ANON_KEY.
-//
// Default values for internal configs should be added to `var Config` initializer.
type (
// Common config fields between our "base" config and any "remote" branch specific
@@ -173,12 +165,12 @@ type (
ProjectId string `toml:"project_id"`
Hostname string `toml:"-"`
Api api `toml:"api"`
- Db db `toml:"db" mapstructure:"db"`
+ Db db `toml:"db"`
Realtime realtime `toml:"realtime"`
Studio studio `toml:"studio"`
Inbucket inbucket `toml:"inbucket"`
Storage storage `toml:"storage"`
- Auth auth `toml:"auth" mapstructure:"auth"`
+ Auth auth `toml:"auth"`
EdgeRuntime edgeRuntime `toml:"edge_runtime"`
Functions FunctionConfig `toml:"functions"`
Analytics analytics `toml:"analytics"`
@@ -186,8 +178,8 @@ type (
}
config struct {
- baseConfig `mapstructure:",squash"`
- Remotes map[string]baseConfig `toml:"remotes"`
+ baseConfig
+ Remotes map[string]baseConfig `toml:"remotes"`
}
realtime struct {
@@ -248,7 +240,7 @@ type (
GcpProjectId string `toml:"gcp_project_id"`
GcpProjectNumber string `toml:"gcp_project_number"`
GcpJwtPath string `toml:"gcp_jwt_path"`
- ApiKey string `toml:"-" mapstructure:"api_key"`
+ ApiKey string `toml:"-"`
// Deprecated together with syslog
VectorPort uint16 `toml:"vector_port"`
}
@@ -257,6 +249,17 @@ type (
Enabled bool `toml:"enabled"`
}
+ inspect struct {
+ Rules []rule `toml:"rules"`
+ }
+
+ rule struct {
+ Query string `toml:"query"`
+ Name string `toml:"name"`
+ Pass string `toml:"pass"`
+ Fail string `toml:"fail"`
+ }
+
experimental struct {
OrioleDBVersion string `toml:"orioledb_version"`
S3Host string `toml:"s3_host"`
@@ -264,6 +267,7 @@ type (
S3AccessKey string `toml:"s3_access_key"`
S3SecretKey string `toml:"s3_secret_key"`
Webhooks *webhooks `toml:"webhooks"`
+ Inspect inspect `toml:"inspect"`
}
)
@@ -299,6 +303,10 @@ func (a *auth) Clone() auth {
hook := *a.Hook.SendEmail
copy.Hook.SendEmail = &hook
}
+ if a.Hook.BeforeUserCreated != nil {
+ hook := *a.Hook.BeforeUserCreated
+ copy.Hook.BeforeUserCreated = &hook
+ }
copy.Sms.TestOTP = maps.Clone(a.Sms.TestOTP)
return copy
}
@@ -327,10 +335,12 @@ func (c *baseConfig) Clone() baseConfig {
return copy
}
-type ConfigEditor func(*config)
+type Config *config
+
+type ConfigEditor func(Config)
func WithHostname(hostname string) ConfigEditor {
- return func(c *config) {
+ return func(c Config) {
c.Hostname = hostname
}
}
@@ -343,15 +353,20 @@ func NewConfig(editors ...ConfigEditor) config {
KongImage: Images.Kong,
},
Db: db{
- Image: Images.Pg15,
+ Image: Images.Pg,
Password: "postgres",
- RootKey: "d4dc5b6d4a1d6a10b2c1e76112c994d65db7cec380572cc1839624d4be3fa275",
+ RootKey: Secret{
+ Value: "d4dc5b6d4a1d6a10b2c1e76112c994d65db7cec380572cc1839624d4be3fa275",
+ },
Pooler: pooler{
Image: Images.Supavisor,
TenantId: "pooler-dev",
EncryptionKey: "12345678901234567890123456789032",
SecretKeyBase: "EAx3IQ/wRG1v47ZD4NE4/9RzBI8Jmil3x0yhcW4V2NHBP6c2iPIzwjofi2Ep4HIG",
},
+ Migrations: migrations{
+ Enabled: true,
+ },
Seed: seed{
Enabled: true,
SqlPaths: []string{"seed.sql"},
@@ -382,8 +397,10 @@ func NewConfig(editors ...ConfigEditor) config {
Sms: sms{
TestOTP: map[string]string{},
},
- External: map[string]provider{},
- JwtSecret: defaultJwtSecret,
+ External: map[string]provider{},
+ JwtSecret: Secret{
+ Value: defaultJwtSecret,
+ },
},
Inbucket: inbucket{
Image: Images.Inbucket,
@@ -439,16 +456,48 @@ func (c *config) Eject(w io.Writer) error {
// Loads custom config file to struct fields tagged with toml.
func (c *config) loadFromFile(filename string, fsys fs.FS) error {
- v := viper.New()
+ v := viper.NewWithOptions(
+ viper.ExperimentalBindStruct(),
+ viper.EnvKeyReplacer(strings.NewReplacer(".", "_")),
+ )
+ v.SetEnvPrefix("SUPABASE")
+ v.AutomaticEnv()
+ if err := c.mergeDefaultValues(v); err != nil {
+ return err
+ } else if err := mergeFileConfig(v, filename, fsys); err != nil {
+ return err
+ }
+ // Find [remotes.*] block to override base config
+ idToName := map[string]string{}
+ for name, remote := range v.GetStringMap("remotes") {
+ projectId := v.GetString(fmt.Sprintf("remotes.%s.project_id", name))
+ // Track remote project_id to check for duplication
+ if other, exists := idToName[projectId]; exists {
+ return errors.Errorf("duplicate project_id for [remotes.%s] and %s", name, other)
+ }
+ idToName[projectId] = fmt.Sprintf("[remotes.%s]", name)
+ if projectId == c.ProjectId {
+ fmt.Fprintln(os.Stderr, "Loading config override:", idToName[projectId])
+ if err := mergeRemoteConfig(v, remote.(map[string]any)); err != nil {
+ return err
+ }
+ }
+ }
+ return c.load(v)
+}
+
+func (c *config) mergeDefaultValues(v *viper.Viper) error {
v.SetConfigType("toml")
- // Load default values
var buf bytes.Buffer
if err := c.Eject(&buf); err != nil {
return err
- } else if err := c.loadFromReader(v, &buf); err != nil {
- return err
+ } else if err := v.MergeConfig(&buf); err != nil {
+ return errors.Errorf("failed to merge default values: %w", err)
}
- // Load custom config
+ return nil
+}
+
+func mergeFileConfig(v *viper.Viper, filename string, fsys fs.FS) error {
if ext := filepath.Ext(filename); len(ext) > 0 {
v.SetConfigType(ext[1:])
}
@@ -459,31 +508,27 @@ func (c *config) loadFromFile(filename string, fsys fs.FS) error {
return errors.Errorf("failed to read file config: %w", err)
}
defer f.Close()
- return c.loadFromReader(v, f)
+ if err := v.MergeConfig(f); err != nil {
+ return errors.Errorf("failed to merge file config: %w", err)
+ }
+ return nil
}
-func (c *config) loadFromReader(v *viper.Viper, r io.Reader) error {
- if err := v.MergeConfig(r); err != nil {
- return errors.Errorf("failed to merge config: %w", err)
+func mergeRemoteConfig(v *viper.Viper, remote map[string]any) error {
+ u := viper.New()
+ if err := u.MergeConfigMap(remote); err != nil {
+ return errors.Errorf("failed to merge remote config: %w", err)
}
- // Find [remotes.*] block to override base config
- baseId := v.GetString("project_id")
- idToName := map[string]string{baseId: "base"}
- for name, remote := range v.GetStringMap("remotes") {
- projectId := v.GetString(fmt.Sprintf("remotes.%s.project_id", name))
- // Track remote project_id to check for duplication
- if other, exists := idToName[projectId]; exists {
- return errors.Errorf("duplicate project_id for [remotes.%s] and %s", name, other)
- }
- idToName[projectId] = fmt.Sprintf("[remotes.%s]", name)
- if projectId == c.ProjectId {
- fmt.Fprintln(os.Stderr, "Loading config override:", idToName[projectId])
- if err := v.MergeConfigMap(remote.(map[string]any)); err != nil {
- return err
- }
- v.Set("project_id", baseId)
- }
+ for _, k := range u.AllKeys() {
+ v.Set(k, u.Get(k))
}
+ if key := "db.seed.enabled"; !u.IsSet(key) {
+ v.Set(key, false)
+ }
+ return nil
+}
+
+func (c *config) load(v *viper.Viper) error {
// Set default values for [functions.*] when config struct is empty
for key, value := range v.GetStringMap("functions") {
if _, ok := value.(map[string]any); !ok {
@@ -531,33 +576,6 @@ func (c *config) newDecodeHook(fs ...mapstructure.DecodeHookFunc) mapstructure.D
return mapstructure.ComposeDecodeHookFunc(fs...)
}
-// Loads envs prefixed with supabase_ to struct fields tagged with mapstructure.
-func (c *config) loadFromEnv() error {
- v := viper.New()
- v.SetEnvPrefix("SUPABASE")
- v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
- v.AutomaticEnv()
- // Viper does not parse env vars automatically. Instead of calling viper.BindEnv
- // per key, we decode all keys from an existing struct, and merge them to viper.
- // Ref: https://github.com/spf13/viper/issues/761#issuecomment-859306364
- envKeysMap := map[string]interface{}{}
- if dec, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{
- Result: &envKeysMap,
- IgnoreUntaggedFields: true,
- }); err != nil {
- return errors.Errorf("failed to create decoder: %w", err)
- } else if err := dec.Decode(c.baseConfig); err != nil {
- return errors.Errorf("failed to decode env: %w", err)
- } else if err := v.MergeConfigMap(envKeysMap); err != nil {
- return errors.Errorf("failed to merge env config: %w", err)
- }
- // Writes viper state back to config struct, with automatic env substitution
- if err := v.UnmarshalExact(c, viper.DecodeHook(c.newDecodeHook())); err != nil {
- return errors.Errorf("failed to parse env override: %w", err)
- }
- return nil
-}
-
func (c *config) Load(path string, fsys fs.FS) error {
builder := NewPathBuilder(path)
// Load secrets from .env file
@@ -567,24 +585,24 @@ func (c *config) Load(path string, fsys fs.FS) error {
if err := c.loadFromFile(builder.ConfigPath, fsys); err != nil {
return err
}
- if err := c.loadFromEnv(); err != nil {
- return err
- }
// Generate JWT tokens
- if len(c.Auth.AnonKey) == 0 {
+ if len(c.Auth.JwtSecret.Value) < 16 {
+ return errors.Errorf("Invalid config for auth.jwt_secret. Must be at least 16 characters")
+ }
+ if len(c.Auth.AnonKey.Value) == 0 {
anonToken := CustomClaims{Role: "anon"}.NewToken()
- if signed, err := anonToken.SignedString([]byte(c.Auth.JwtSecret)); err != nil {
+ if signed, err := anonToken.SignedString([]byte(c.Auth.JwtSecret.Value)); err != nil {
return errors.Errorf("failed to generate anon key: %w", err)
} else {
- c.Auth.AnonKey = signed
+ c.Auth.AnonKey.Value = signed
}
}
- if len(c.Auth.ServiceRoleKey) == 0 {
+ if len(c.Auth.ServiceRoleKey.Value) == 0 {
anonToken := CustomClaims{Role: "service_role"}.NewToken()
- if signed, err := anonToken.SignedString([]byte(c.Auth.JwtSecret)); err != nil {
+ if signed, err := anonToken.SignedString([]byte(c.Auth.JwtSecret.Value)); err != nil {
return errors.Errorf("failed to generate service_role key: %w", err)
} else {
- c.Auth.ServiceRoleKey = signed
+ c.Auth.ServiceRoleKey.Value = signed
}
}
// TODO: move linked pooler connection string elsewhere
@@ -604,22 +622,34 @@ func (c *config) Load(path string, fsys fs.FS) error {
c.Api.ExternalUrl = apiUrl.String()
}
// Update image versions
- if version, err := fs.ReadFile(fsys, builder.PostgresVersionPath); err == nil {
- if strings.HasPrefix(string(version), "15.") && semver.Compare(string(version[3:]), "1.0.55") >= 0 {
- c.Db.Image = replaceImageTag(Images.Pg15, string(version))
- }
+ switch c.Db.MajorVersion {
+ case 13:
+ c.Db.Image = pg15
+ case 14:
+ c.Db.Image = pg14
+ case 15:
+ c.Db.Image = pg15
}
if c.Db.MajorVersion > 14 {
+ if version, err := fs.ReadFile(fsys, builder.PostgresVersionPath); err == nil {
+ // Only replace image if postgres version is above 15.1.0.55
+ if i := strings.IndexByte(c.Db.Image, ':'); VersionCompare(c.Db.Image[i+1:], "15.1.0.55") >= 0 {
+ c.Db.Image = replaceImageTag(Images.Pg, string(version))
+ }
+ }
if version, err := fs.ReadFile(fsys, builder.RestVersionPath); err == nil && len(version) > 0 {
c.Api.Image = replaceImageTag(Images.Postgrest, string(version))
}
- if version, err := fs.ReadFile(fsys, builder.StorageVersionPath); err == nil && len(version) > 0 {
- c.Storage.Image = replaceImageTag(Images.Storage, string(version))
- }
if version, err := fs.ReadFile(fsys, builder.GotrueVersionPath); err == nil && len(version) > 0 {
c.Auth.Image = replaceImageTag(Images.Gotrue, string(version))
}
}
+ if version, err := fs.ReadFile(fsys, builder.StorageVersionPath); err == nil && len(version) > 0 {
+ // For backwards compatibility, exclude all strings that look like semver
+ if v := strings.TrimSpace(string(version)); !semver.IsValid(v) {
+ c.Storage.TargetMigration = v
+ }
+ }
if version, err := fs.ReadFile(fsys, builder.EdgeRuntimeVersionPath); err == nil && len(version) > 0 {
c.EdgeRuntime.Image = replaceImageTag(Images.EdgeRuntime, string(version))
}
@@ -636,12 +666,28 @@ func (c *config) Load(path string, fsys fs.FS) error {
c.Studio.PgmetaImage = replaceImageTag(Images.Pgmeta, string(version))
}
// TODO: replace derived config resolution with viper decode hooks
- if err := c.baseConfig.resolve(builder, fsys); err != nil {
+ if err := c.resolve(builder, fsys); err != nil {
return err
}
return c.Validate(fsys)
}
+func VersionCompare(a, b string) int {
+ var pA, pB string
+ if vA := strings.Split(a, "."); len(vA) > 3 {
+ a = strings.Join(vA[:3], ".")
+ pA = strings.TrimLeft(strings.Join(vA[3:], "."), "0")
+ }
+ if vB := strings.Split(b, "."); len(vB) > 3 {
+ b = strings.Join(vB[:3], ".")
+ pB = strings.TrimLeft(strings.Join(vB[3:], "."), "0")
+ }
+ if r := semver.Compare("v"+a, "v"+b); r != 0 {
+ return r
+ }
+ return semver.Compare("v"+pA, "v"+pB)
+}
+
func (c *baseConfig) resolve(builder pathBuilder, fsys fs.FS) error {
// Update content paths
for name, tmpl := range c.Auth.Email.Template {
@@ -662,6 +708,10 @@ func (c *baseConfig) resolve(builder pathBuilder, fsys fs.FS) error {
}
c.Storage.Buckets[name] = bucket
}
+ // Resolve signing keys path for cross-platform compatibility
+ if len(c.Auth.SigningKeysPath) > 0 && !filepath.IsAbs(c.Auth.SigningKeysPath) {
+ c.Auth.SigningKeysPath = filepath.Join(builder.SupabaseDirPath, c.Auth.SigningKeysPath)
+ }
// Resolve functions config
for slug, function := range c.Functions {
if len(function.Entrypoint) == 0 {
@@ -733,10 +783,8 @@ func (c *config) Validate(fsys fs.FS) error {
return errors.New("Missing required field in config: db.major_version")
case 12:
return errors.New("Postgres version 12.x is unsupported. To use the CLI, either start a new project or follow project migration steps here: https://supabase.com/docs/guides/database#migrating-between-projects.")
- case 13:
- c.Db.Image = pg13
- case 14:
- c.Db.Image = pg14
+ case 13, 14, 17:
+ // TODO: support oriole db 17 eventually
case 15:
if len(c.Experimental.OrioleDBVersion) > 0 {
c.Db.Image = "supabase/postgres:orioledb-" + c.Experimental.OrioleDBVersion
@@ -926,7 +974,33 @@ func loadDefaultEnv(env string) error {
func loadEnvIfExists(path string) error {
if err := godotenv.Load(path); err != nil && !errors.Is(err, os.ErrNotExist) {
- return errors.Errorf("failed to load %s: %w", ".env", err)
+ // If DEBUG=1, return the error as is for full debugability
+ if viper.GetBool("DEBUG") {
+ return errors.Errorf("failed to load %s: %w", path, err)
+ }
+ msg := err.Error()
+ switch {
+ case strings.HasPrefix(msg, "unexpected character"):
+ // Try to extract the character, fallback to generic
+ start := strings.Index(msg, "unexpected character \"")
+ if start != -1 {
+ start += len("unexpected character \"")
+ end := strings.Index(msg[start:], "\"")
+ if end != -1 {
+ char := msg[start : start+end]
+ return errors.Errorf("failed to parse environment file: %s (unexpected character '%s' in variable name)", path, char)
+ }
+ }
+ return errors.Errorf("failed to parse environment file: %s (unexpected character in variable name)", path)
+ case strings.HasPrefix(msg, "unterminated quoted value"):
+ return errors.Errorf("failed to parse environment file: %s (unterminated quoted value)", path)
+ // If the error message contains newlines, there is a high chance that the actual content of the
+ // dotenv file is being leaked. In such cases, we return a generic error to avoid unwanted leaks in the logs
+ case strings.Contains(msg, "\n"):
+ return errors.Errorf("failed to parse environment file: %s (syntax error)", path)
+ default:
+ return errors.Errorf("failed to load %s: %w", path, err)
+ }
}
return nil
}
@@ -1100,6 +1174,11 @@ func (h *hook) validate() error {
return err
}
}
+ if hook := h.BeforeUserCreated; hook != nil {
+ if err := hook.validate("before_user_created"); err != nil {
+ return err
+ }
+ }
return nil
}
@@ -1302,16 +1381,28 @@ func (tpa *thirdParty) IssuerURL() string {
return ""
}
+type (
+ remoteJWKS struct {
+ Keys []json.RawMessage `json:"keys"`
+ }
+
+ oidcConfiguration struct {
+ JWKSURI string `json:"jwks_uri"`
+ }
+
+ secretJWK struct {
+ KeyType string `json:"kty"`
+ KeyBase64URL string `json:"k"`
+ }
+)
+
// ResolveJWKS creates the JWKS from the JWT secret and Third-Party Auth
// configs by resolving the JWKS via the OIDC discovery URL.
// It always returns a JWKS string, except when there's an error fetching.
-func (a *auth) ResolveJWKS(ctx context.Context) (string, error) {
- var jwks struct {
- Keys []json.RawMessage `json:"keys"`
- }
+func (a *auth) ResolveJWKS(ctx context.Context, fsys afero.Fs) (string, error) {
+ var jwks remoteJWKS
- issuerURL := a.ThirdParty.IssuerURL()
- if issuerURL != "" {
+ if issuerURL := a.ThirdParty.IssuerURL(); issuerURL != "" {
discoveryURL := issuerURL + "/.well-known/openid-configuration"
t := &http.Client{Timeout: 10 * time.Second}
@@ -1326,10 +1417,6 @@ func (a *auth) ResolveJWKS(ctx context.Context) (string, error) {
return "", err
}
- type oidcConfiguration struct {
- JWKSURI string `json:"jwks_uri"`
- }
-
oidcConfig, err := fetcher.ParseJSON[oidcConfiguration](resp.Body)
if err != nil {
return "", err
@@ -1350,10 +1437,6 @@ func (a *auth) ResolveJWKS(ctx context.Context) (string, error) {
return "", err
}
- type remoteJWKS struct {
- Keys []json.RawMessage `json:"keys"`
- }
-
rJWKS, err := fetcher.ParseJSON[remoteJWKS](resp.Body)
if err != nil {
return "", err
@@ -1363,24 +1446,35 @@ func (a *auth) ResolveJWKS(ctx context.Context) (string, error) {
return "", fmt.Errorf("auth.third_party: JWKS at URL %q as discovered from %q does not contain any JWK keys", oidcConfig.JWKSURI, discoveryURL)
}
- jwks.Keys = rJWKS.Keys
+ jwks.Keys = append(jwks.Keys, rJWKS.Keys...)
}
- var secretJWK struct {
- KeyType string `json:"kty"`
- KeyBase64URL string `json:"k"`
- }
+ // If SIGNING_KEYS_PATH is provided, read from file
+ if len(a.SigningKeysPath) > 0 {
+ f, err := fsys.Open(a.SigningKeysPath)
+ if err != nil {
+ return "", errors.Errorf("failed to read signing key: %w", err)
+ }
+ jwtKeysArray, err := fetcher.ParseJSON[[]json.RawMessage](f)
+ if err != nil {
+ return "", err
+ }
+ jwks.Keys = append(jwks.Keys, jwtKeysArray...)
+ } else {
+ // Fallback to JWT_SECRET for backward compatibility
+ jwtSecret := secretJWK{
+ KeyType: "oct",
+ KeyBase64URL: base64.RawURLEncoding.EncodeToString([]byte(a.JwtSecret.Value)),
+ }
- secretJWK.KeyType = "oct"
- secretJWK.KeyBase64URL = base64.RawURLEncoding.EncodeToString([]byte(a.JwtSecret))
+ secretJWKEncoded, err := json.Marshal(&jwtSecret)
+ if err != nil {
+ return "", errors.Errorf("failed to marshal secret jwk: %w", err)
+ }
- secretJWKEncoded, err := json.Marshal(&secretJWK)
- if err != nil {
- return "", errors.Errorf("failed to marshal secret jwk: %w", err)
+ jwks.Keys = append(jwks.Keys, json.RawMessage(secretJWKEncoded))
}
- jwks.Keys = append(jwks.Keys, json.RawMessage(secretJWKEncoded))
-
jwksEncoded, err := json.Marshal(jwks)
if err != nil {
return "", errors.Errorf("failed to marshal jwks keys: %w", err)
@@ -1407,7 +1501,7 @@ func (c *baseConfig) GetServiceImages() []string {
// Retrieve the final base config to use taking into account the remotes override
// Pre: config must be loaded after setting config.ProjectID = "ref"
func (c *config) GetRemoteByProjectRef(projectRef string) (baseConfig, error) {
- base := c.baseConfig.Clone()
+ base := c.Clone()
for _, remote := range c.Remotes {
if remote.ProjectId == projectRef {
base.ProjectId = projectRef
diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go
index c2f695842b..fca80ad2df 100644
--- a/pkg/config/config_test.go
+++ b/pkg/config/config_test.go
@@ -3,12 +3,15 @@ package config
import (
"bytes"
_ "embed"
+ "fmt"
+ "os"
"path"
"strings"
"testing"
fs "testing/fstest"
"github.com/BurntSushi/toml"
+ "github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -69,6 +72,45 @@ func TestConfigParsing(t *testing.T) {
// Run test
assert.Error(t, config.Load("", fsys))
})
+}
+
+func TestRemoteOverride(t *testing.T) {
+ t.Run("load staging override", func(t *testing.T) {
+ config := NewConfig()
+ config.ProjectId = "bvikqvbczudanvggcord"
+ // Setup in-memory fs
+ fsys := fs.MapFS{
+ "supabase/config.toml": &fs.MapFile{Data: testInitConfigEmbed},
+ "supabase/templates/invite.html": &fs.MapFile{},
+ }
+ // Run test
+ t.Setenv("SUPABASE_AUTH_SITE_URL", "http://preview.com")
+ t.Setenv("AUTH_SEND_SMS_SECRETS", "v1,whsec_aWxpa2VzdXBhYmFzZXZlcnltdWNoYW5kaWhvcGV5b3Vkb3Rvbw==")
+ assert.NoError(t, config.Load("", fsys))
+ // Check error
+ assert.True(t, config.Db.Seed.Enabled)
+ assert.Equal(t, "http://preview.com", config.Auth.SiteUrl)
+ assert.Equal(t, []string{"image/png"}, config.Storage.Buckets["images"].AllowedMimeTypes)
+ })
+
+ t.Run("load production override", func(t *testing.T) {
+ config := NewConfig()
+ config.ProjectId = "vpefcjyosynxeiebfscx"
+ // Setup in-memory fs
+ fsys := fs.MapFS{
+ "supabase/config.toml": &fs.MapFile{Data: testInitConfigEmbed},
+ "supabase/templates/invite.html": &fs.MapFile{},
+ }
+ // Run test
+ t.Setenv("SUPABASE_AUTH_SITE_URL", "http://preview.com")
+ t.Setenv("AUTH_SEND_SMS_SECRETS", "v1,whsec_aWxpa2VzdXBhYmFzZXZlcnltdWNoYW5kaWhvcGV5b3Vkb3Rvbw==")
+ assert.NoError(t, config.Load("", fsys))
+ // Check error
+ assert.False(t, config.Db.Seed.Enabled)
+ assert.Equal(t, "http://feature-auth-branch.com/", config.Auth.SiteUrl)
+ assert.Equal(t, false, config.Auth.External["azure"].Enabled)
+ assert.Equal(t, "nope", config.Auth.External["azure"].ClientId)
+ })
t.Run("config file with remotes", func(t *testing.T) {
config := NewConfig()
@@ -279,7 +321,7 @@ func TestValidateHookURI(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
- err := tt.hookConfig.validate(tt.name)
+ err := tt.validate(tt.name)
if len(tt.errorMsg) > 0 {
assert.Error(t, err, "Expected an error for %v", tt.name)
assert.EqualError(t, err, tt.errorMsg, "Expected error message does not match for %v", tt.name)
@@ -372,18 +414,6 @@ func TestGlobFiles(t *testing.T) {
})
}
-func TestLoadEnv(t *testing.T) {
- t.Setenv("SUPABASE_AUTH_JWT_SECRET", "test-secret")
- t.Setenv("SUPABASE_DB_ROOT_KEY", "test-root-key")
- config := NewConfig()
- // Run test
- err := config.loadFromEnv()
- // Check error
- assert.NoError(t, err)
- assert.Equal(t, "test-secret", config.Auth.JwtSecret)
- assert.Equal(t, "test-root-key", config.Db.RootKey)
-}
-
func TestLoadFunctionImportMap(t *testing.T) {
t.Run("uses deno.json as import map when present", func(t *testing.T) {
config := NewConfig()
@@ -464,7 +494,7 @@ func TestLoadFunctionErrorMessageParsing(t *testing.T) {
// Run test
err := config.Load("", fsys)
// Check error contains both decode errors
- assert.ErrorContains(t, err, "* 'functions[hello]' has invalid keys: unknown_field")
+ assert.ErrorContains(t, err, "'functions[hello]' has invalid keys: unknown_field")
})
t.Run("returns error with function slug for invalid field value", func(t *testing.T) {
@@ -479,7 +509,7 @@ func TestLoadFunctionErrorMessageParsing(t *testing.T) {
// Run test
err := config.Load("", fsys)
// Check error contains both decode errors
- assert.ErrorContains(t, err, `* cannot parse 'functions[hello].verify_jwt' as bool: strconv.ParseBool: parsing "not-a-bool"`)
+ assert.ErrorContains(t, err, `cannot parse 'functions[hello].verify_jwt' as bool: strconv.ParseBool: parsing "not-a-bool"`)
})
t.Run("returns error for unknown function fields", func(t *testing.T) {
@@ -494,7 +524,122 @@ func TestLoadFunctionErrorMessageParsing(t *testing.T) {
}
// Run test
err := config.Load("", fsys)
- assert.ErrorContains(t, err, `* 'functions[name]' expected a map, got 'string'`)
- assert.ErrorContains(t, err, `* 'functions[verify_jwt]' expected a map, got 'bool'`)
+ assert.ErrorContains(t, err, `'functions[name]' expected a map, got 'string'`)
+ assert.ErrorContains(t, err, `'functions[verify_jwt]' expected a map, got 'bool'`)
+ })
+}
+
+func TestLoadEnvIfExists(t *testing.T) {
+ t.Run("returns nil when file does not exist", func(t *testing.T) {
+ err := loadEnvIfExists("nonexistent.env")
+ assert.NoError(t, err)
+ })
+
+ t.Run("returns raw error when file exists but is malformed and DEBUG=1", func(t *testing.T) {
+ // Set DEBUG=1
+ t.Setenv("DEBUG", "1")
+ viper.AutomaticEnv()
+
+ // Create a temporary file with malformed content
+ tmpFile, err := os.CreateTemp("", "test-*.env")
+ require.NoError(t, err)
+ defer os.Remove(tmpFile.Name())
+
+ // Write malformed content
+ _, err = tmpFile.WriteString("[invalid]\nvalue=secret_value\n")
+ require.NoError(t, err)
+ require.NoError(t, tmpFile.Close())
+
+ // Test loading the malformed file
+ err = loadEnvIfExists(tmpFile.Name())
+ // Should contain the raw error, including the secret value
+ assert.ErrorContains(t, err, "unexpected character")
+ assert.ErrorContains(t, err, "secret_value")
})
+
+ t.Run("returns error when file exists but is malformed invalid character", func(t *testing.T) {
+ // Create a temporary file with malformed content
+ tmpFile, err := os.CreateTemp("", "test-*.env")
+ require.NoError(t, err)
+ defer os.Remove(tmpFile.Name())
+
+ // Write malformed content
+ _, err = tmpFile.WriteString("[invalid]\nvalue=secret_value\n")
+ require.NoError(t, err)
+ require.NoError(t, tmpFile.Close())
+
+ // Test loading the malformed file
+ err = loadEnvIfExists(tmpFile.Name())
+ assert.ErrorContains(t, err, fmt.Sprintf("failed to parse environment file: %s (unexpected character '[' in variable name)", tmpFile.Name()))
+ assert.NotContains(t, err.Error(), "secret_value")
+ })
+
+ t.Run("returns error when file exists but is malformed unterminated quotes", func(t *testing.T) {
+ // Create a temporary file with malformed content
+ tmpFile, err := os.CreateTemp("", "test-*.env")
+ require.NoError(t, err)
+ defer os.Remove(tmpFile.Name())
+
+ // Write malformed content
+ _, err = tmpFile.WriteString("value=\"secret_value\n")
+ require.NoError(t, err)
+ require.NoError(t, tmpFile.Close())
+
+ // Test loading the malformed file
+ err = loadEnvIfExists(tmpFile.Name())
+ assert.ErrorContains(t, err, fmt.Sprintf("failed to parse environment file: %s (unterminated quoted value)", tmpFile.Name()))
+ assert.NotContains(t, err.Error(), "secret_value")
+ })
+
+ t.Run("loads valid env file successfully", func(t *testing.T) {
+ // Create a temporary file with valid content
+ tmpFile, err := os.CreateTemp("", "test-*.env")
+ require.NoError(t, err)
+ defer os.Remove(tmpFile.Name())
+
+ // Write valid content
+ _, err = tmpFile.WriteString("TEST_KEY=test_value\nANOTHER_KEY=another_value")
+ require.NoError(t, err)
+ require.NoError(t, tmpFile.Close())
+
+ // Test loading the valid file
+ err = loadEnvIfExists(tmpFile.Name())
+ assert.NoError(t, err)
+
+ // Verify environment variables were loaded
+ assert.Equal(t, "test_value", os.Getenv("TEST_KEY"))
+ assert.Equal(t, "another_value", os.Getenv("ANOTHER_KEY"))
+
+ // Clean up environment variables
+ os.Unsetenv("TEST_KEY")
+ os.Unsetenv("ANOTHER_KEY")
+ })
+}
+
+func TestVersionCompare(t *testing.T) {
+ var testcase = []struct {
+ a string
+ b string
+ r int
+ }{
+ {"15.1.0.55", "15.1.0.55", 0},
+ {"15.8.1.085", "15.1.0.55", 1},
+ {"15.1.0.55", "15.8.1.085", -1},
+ {"17.4.1.005", "17.4.1.005", 0},
+ {"17.4.1.030", "17.4.1.005", 1},
+ {"17.4.1.005", "17.4.1.030", -1},
+ {"15.8.1", "15.8.1", 0},
+ {"17", "15.8", 1},
+ {"14", "15.8", -1},
+ {"oriole-17", "oriole-17", 0},
+ {"17", "oriole-17", 1},
+ {"oriole-17", "17", -1},
+ }
+
+ for _, tt := range testcase {
+ t.Run(fmt.Sprintf("%s vs %s", tt.a, tt.b), func(t *testing.T) {
+ result := VersionCompare(tt.a, tt.b)
+ assert.Equal(t, tt.r, result)
+ })
+ }
}
diff --git a/pkg/config/constants.go b/pkg/config/constants.go
index 6e14890d2f..b9d03e3e37 100644
--- a/pkg/config/constants.go
+++ b/pkg/config/constants.go
@@ -5,17 +5,18 @@ import (
"regexp"
"github.com/go-errors/errors"
- "github.com/mitchellh/mapstructure"
+ "github.com/go-viper/mapstructure/v2"
)
const (
pg13 = "supabase/postgres:13.3.0"
pg14 = "supabase/postgres:14.1.0.89"
- deno2 = "supabase/edge-runtime:v1.68.0-develop.8"
+ pg15 = "supabase/postgres:15.8.1.085"
+ deno2 = "supabase/edge-runtime:v1.68.0-develop.18"
)
type images struct {
- Pg15 string `mapstructure:"pg15"`
+ Pg string `mapstructure:"pg"`
// Append to Services when adding new dependencies below
Kong string `mapstructure:"kong"`
Inbucket string `mapstructure:"mailpit"`
diff --git a/pkg/config/constants_test.go b/pkg/config/constants_test.go
index 831ce302fe..1f8badef39 100644
--- a/pkg/config/constants_test.go
+++ b/pkg/config/constants_test.go
@@ -4,7 +4,7 @@ import (
"strings"
"testing"
- "github.com/mitchellh/mapstructure"
+ "github.com/go-viper/mapstructure/v2"
"github.com/stretchr/testify/assert"
)
diff --git a/pkg/config/db.go b/pkg/config/db.go
index ee77a79062..740dabf53b 100644
--- a/pkg/config/db.go
+++ b/pkg/config/db.go
@@ -67,21 +67,29 @@ type (
WorkMem *string `toml:"work_mem"`
}
+ networkRestrictions struct {
+ Enabled bool `toml:"enabled"`
+ AllowedCidrs []string `toml:"allowed_cidrs"`
+ AllowedCidrsV6 []string `toml:"allowed_cidrs_v6"`
+ }
+
db struct {
- Image string `toml:"-"`
- Port uint16 `toml:"port"`
- ShadowPort uint16 `toml:"shadow_port"`
- MajorVersion uint `toml:"major_version"`
- Password string `toml:"-"`
- RootKey string `toml:"-" mapstructure:"root_key"`
- Pooler pooler `toml:"pooler"`
- Migrations migrations `toml:"migrations"`
- Seed seed `toml:"seed"`
- Settings settings `toml:"settings"`
- Vault map[string]Secret `toml:"vault"`
+ Image string `toml:"-"`
+ Port uint16 `toml:"port"`
+ ShadowPort uint16 `toml:"shadow_port"`
+ MajorVersion uint `toml:"major_version"`
+ Password string `toml:"-"`
+ RootKey Secret `toml:"root_key"`
+ Pooler pooler `toml:"pooler"`
+ Migrations migrations `toml:"migrations"`
+ Seed seed `toml:"seed"`
+ Settings settings `toml:"settings"`
+ NetworkRestrictions networkRestrictions `toml:"network_restrictions"`
+ Vault map[string]Secret `toml:"vault"`
}
migrations struct {
+ Enabled bool `toml:"enabled"`
SchemaPaths Glob `toml:"schema_paths"`
}
@@ -187,3 +195,38 @@ func (a *settings) DiffWithRemote(remoteConfig v1API.PostgresConfigResponse) ([]
}
return diff.Diff("remote[db.settings]", remoteCompare, "local[db.settings]", currentValue), nil
}
+
+func (n networkRestrictions) ToUpdateNetworkRestrictionsBody() v1API.V1UpdateNetworkRestrictionsJSONRequestBody {
+ body := v1API.V1UpdateNetworkRestrictionsJSONRequestBody{
+ DbAllowedCidrs: &n.AllowedCidrs,
+ DbAllowedCidrsV6: &n.AllowedCidrsV6,
+ }
+ return body
+}
+
+func (n *networkRestrictions) FromRemoteNetworkRestrictions(remoteConfig v1API.NetworkRestrictionsResponse) {
+ if !n.Enabled {
+ return
+ }
+ if remoteConfig.Config.DbAllowedCidrs != nil {
+ n.AllowedCidrs = *remoteConfig.Config.DbAllowedCidrs
+ }
+ if remoteConfig.Config.DbAllowedCidrsV6 != nil {
+ n.AllowedCidrsV6 = *remoteConfig.Config.DbAllowedCidrsV6
+ }
+}
+
+func (n *networkRestrictions) DiffWithRemote(remoteConfig v1API.NetworkRestrictionsResponse) ([]byte, error) {
+ copy := *n
+ // Convert the config values into easily comparable remoteConfig values
+ currentValue, err := ToTomlBytes(copy)
+ if err != nil {
+ return nil, err
+ }
+ copy.FromRemoteNetworkRestrictions(remoteConfig)
+ remoteCompare, err := ToTomlBytes(copy)
+ if err != nil {
+ return nil, err
+ }
+ return diff.Diff("remote[db.network_restrictions]", remoteCompare, "local[db.network_restrictions]", currentValue), nil
+}
diff --git a/pkg/config/db_test.go b/pkg/config/db_test.go
index 575fd202de..93ba47d6dd 100644
--- a/pkg/config/db_test.go
+++ b/pkg/config/db_test.go
@@ -182,3 +182,100 @@ func TestSettingsToPostgresConfig(t *testing.T) {
assert.NotContains(t, got, "=")
})
}
+
+func TestNetworkRestrictionsFromRemote(t *testing.T) {
+ t.Run("converts from remote config with restrictions", func(t *testing.T) {
+ ipv4Cidrs := []string{"192.168.1.0/24"}
+ ipv6Cidrs := []string{"2001:db8::/32"}
+ remoteConfig := v1API.NetworkRestrictionsResponse{}
+ remoteConfig.Config.DbAllowedCidrs = &ipv4Cidrs
+ remoteConfig.Config.DbAllowedCidrsV6 = &ipv6Cidrs
+ nr := networkRestrictions{Enabled: true}
+ nr.FromRemoteNetworkRestrictions(remoteConfig)
+ assert.ElementsMatch(t, ipv4Cidrs, nr.AllowedCidrs)
+ assert.ElementsMatch(t, ipv6Cidrs, nr.AllowedCidrsV6)
+ })
+
+ t.Run("converts from remote config with allow all", func(t *testing.T) {
+ ipv4Cidrs := []string{"0.0.0.0/0"}
+ ipv6Cidrs := []string{"::/0"}
+ remoteConfig := v1API.NetworkRestrictionsResponse{}
+ remoteConfig.Config.DbAllowedCidrs = &ipv4Cidrs
+ remoteConfig.Config.DbAllowedCidrsV6 = &ipv6Cidrs
+ nr := networkRestrictions{Enabled: true}
+ nr.FromRemoteNetworkRestrictions(remoteConfig)
+ assert.ElementsMatch(t, ipv4Cidrs, nr.AllowedCidrs)
+ assert.ElementsMatch(t, ipv6Cidrs, nr.AllowedCidrsV6)
+ })
+
+ t.Run("ignores locally disabled network restrictions", func(t *testing.T) {
+ remoteConfig := v1API.NetworkRestrictionsResponse{}
+ remoteConfig.Config.DbAllowedCidrs = &[]string{"192.168.1.0/24"}
+ remoteConfig.Config.DbAllowedCidrsV6 = &[]string{"2001:db8::/32"}
+ nr := networkRestrictions{}
+ nr.FromRemoteNetworkRestrictions(remoteConfig)
+ assert.False(t, nr.Enabled)
+ assert.Empty(t, nr.AllowedCidrs)
+ assert.Empty(t, nr.AllowedCidrsV6)
+ })
+}
+
+func TestNetworkRestrictionsDiff(t *testing.T) {
+ t.Run("detects differences", func(t *testing.T) {
+ local := networkRestrictions{
+ Enabled: true,
+ AllowedCidrs: []string{"192.168.1.0/24"},
+ AllowedCidrsV6: []string{"2001:db8::/32"},
+ }
+ remoteConfig := v1API.NetworkRestrictionsResponse{}
+ remoteConfig.Config.DbAllowedCidrs = &[]string{"10.0.0.0/8"}
+ remoteConfig.Config.DbAllowedCidrsV6 = &[]string{"fd00::/8"}
+ diff, err := local.DiffWithRemote(remoteConfig)
+ assert.NoError(t, err)
+ assert.Contains(t, string(diff), "-db_allowed_cidrs = [\"10.0.0.0/8\"]")
+ assert.Contains(t, string(diff), "+db_allowed_cidrs = [\"192.168.1.0/24\"]")
+ assert.Contains(t, string(diff), "-db_allowed_cidrs_v6 = [\"2001:db8::/32\"]")
+ assert.Contains(t, string(diff), "+db_allowed_cidrs_v6 = [\"fd00::/8\"]")
+ })
+
+ t.Run("no differences", func(t *testing.T) {
+ local := networkRestrictions{
+ Enabled: true,
+ AllowedCidrs: []string{"192.168.1.0/24"},
+ AllowedCidrsV6: []string{"2001:db8::/32"},
+ }
+ remoteConfig := v1API.NetworkRestrictionsResponse{}
+ remoteConfig.Config.DbAllowedCidrs = &local.AllowedCidrs
+ remoteConfig.Config.DbAllowedCidrsV6 = &local.AllowedCidrsV6
+ diff, err := local.DiffWithRemote(remoteConfig)
+ assert.NoError(t, err)
+ assert.Empty(t, diff)
+ })
+
+ t.Run("both have no restrictions - disabled vs allow all", func(t *testing.T) {
+ local := networkRestrictions{}
+ remoteConfig := v1API.NetworkRestrictionsResponse{}
+ remoteConfig.Config.DbAllowedCidrs = &[]string{"0.0.0.0/0"}
+ remoteConfig.Config.DbAllowedCidrsV6 = &[]string{"::/0"}
+ diff, err := local.DiffWithRemote(remoteConfig)
+ assert.NoError(t, err)
+ assert.Empty(t, diff)
+ })
+
+ t.Run("local disallow all, remote allow all", func(t *testing.T) {
+ local := networkRestrictions{
+ Enabled: true,
+ AllowedCidrs: []string{},
+ AllowedCidrsV6: []string{},
+ }
+ remoteConfig := v1API.NetworkRestrictionsResponse{}
+ remoteConfig.Config.DbAllowedCidrs = &[]string{"0.0.0.0/0"}
+ remoteConfig.Config.DbAllowedCidrsV6 = &[]string{"::/0"}
+ diff, err := local.DiffWithRemote(remoteConfig)
+ assert.NoError(t, err)
+ assert.Contains(t, string(diff), "-db_allowed_cidrs = [\"0.0.0.0/0\"]")
+ assert.Contains(t, string(diff), "+db_allowed_cidrs = []")
+ assert.Contains(t, string(diff), "-db_allowed_cidrs_v6 = [\"::/0\"]")
+ assert.Contains(t, string(diff), "+db_allowed_cidrs_v6 = []")
+ })
+}
diff --git a/pkg/config/secret.go b/pkg/config/secret.go
index c78a5b8b8b..72c075ba79 100644
--- a/pkg/config/secret.go
+++ b/pkg/config/secret.go
@@ -8,7 +8,7 @@ import (
ecies "github.com/ecies/go/v2"
"github.com/go-errors/errors"
- "github.com/mitchellh/mapstructure"
+ "github.com/go-viper/mapstructure/v2"
)
type Secret struct {
diff --git a/pkg/config/storage.go b/pkg/config/storage.go
index 9b82ac6e92..0c50cbb6df 100644
--- a/pkg/config/storage.go
+++ b/pkg/config/storage.go
@@ -10,6 +10,7 @@ type (
storage struct {
Enabled bool `toml:"enabled"`
Image string `toml:"-"`
+ TargetMigration string `toml:"-"`
ImgProxyImage string `toml:"-"`
FileSizeLimit sizeInBytes `toml:"file_size_limit"`
ImageTransformation *imageTransformation `toml:"image_transformation"`
@@ -43,11 +44,18 @@ func (s *storage) ToUpdateStorageConfigBody() v1API.UpdateStorageConfigBody {
}
// When local config is not set, we assume platform defaults should not change
if s.ImageTransformation != nil {
- body.Features = &v1API.StorageFeatures{
- ImageTransformation: v1API.StorageFeatureImageTransformation{
- Enabled: s.ImageTransformation.Enabled,
- },
- }
+ body.Features = &struct {
+ IcebergCatalog *struct {
+ Enabled bool `json:"enabled"`
+ } `json:"icebergCatalog,omitempty"`
+ ImageTransformation struct {
+ Enabled bool `json:"enabled"`
+ } `json:"imageTransformation"`
+ S3Protocol struct {
+ Enabled bool `json:"enabled"`
+ } `json:"s3Protocol"`
+ }{}
+ body.Features.ImageTransformation.Enabled = s.ImageTransformation.Enabled
}
return body
}
diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile
index 8cbbea5c72..ac78c890c0 100644
--- a/pkg/config/templates/Dockerfile
+++ b/pkg/config/templates/Dockerfile
@@ -1,19 +1,19 @@
# Exposed for updates by .github/dependabot.yml
-FROM supabase/postgres:15.8.1.060 AS pg15
+FROM supabase/postgres:17.4.1.068 AS pg
# Append to ServiceImages when adding new dependencies below
FROM library/kong:2.8.1 AS kong
FROM axllent/mailpit:v1.22.3 AS mailpit
-FROM postgrest/postgrest:v12.2.8 AS postgrest
-FROM supabase/postgres-meta:v0.87.1 AS pgmeta
-FROM supabase/studio:20250317-6955350 AS studio
+FROM postgrest/postgrest:v13.0.4 AS postgrest
+FROM supabase/postgres-meta:v0.91.4 AS pgmeta
+FROM supabase/studio:2025.07.28-sha-578b707 AS studio
FROM darthsim/imgproxy:v3.8.0 AS imgproxy
-FROM supabase/edge-runtime:v1.67.4 AS edgeruntime
+FROM supabase/edge-runtime:v1.68.3 AS edgeruntime
FROM timberio/vector:0.28.1-alpine AS vector
-FROM supabase/supavisor:2.4.14 AS supavisor
-FROM supabase/gotrue:v2.170.0 AS gotrue
-FROM supabase/realtime:v2.34.43 AS realtime
-FROM supabase/storage-api:v1.19.3 AS storage
-FROM supabase/logflare:1.12.0 AS logflare
+FROM supabase/supavisor:2.6.0 AS supavisor
+FROM supabase/gotrue:v2.177.0 AS gotrue
+FROM supabase/realtime:v2.41.11 AS realtime
+FROM supabase/storage-api:v1.26.1 AS storage
+FROM supabase/logflare:1.14.2 AS logflare
# Append to JobImages when adding new dependencies below
FROM supabase/pgadmin-schema-diff:cli-0.0.5 AS differ
FROM supabase/migra:3.0.1663481299 AS migra
diff --git a/pkg/config/templates/config.toml b/pkg/config/templates/config.toml
index 9f48426aa8..fea0c284d3 100644
--- a/pkg/config/templates/config.toml
+++ b/pkg/config/templates/config.toml
@@ -28,7 +28,7 @@ port = 54322
shadow_port = 54320
# The database major version to use. This has to be the same as your remote database's. Run `SHOW
# server_version;` on the remote database to check.
-major_version = 15
+major_version = 17
[db.pooler]
enabled = false
@@ -46,6 +46,8 @@ max_client_conn = 100
# secret_key = "env(SECRET_VALUE)"
[db.migrations]
+# If disabled, migrations will be skipped during a db push or reset.
+enabled = true
# Specifies an ordered list of schema files that describe your database.
# Supports glob patterns relative to supabase directory: "./schemas/*.sql"
schema_paths = []
@@ -57,6 +59,16 @@ enabled = true
# Supports glob patterns relative to supabase directory: "./seeds/*.sql"
sql_paths = ["./seed.sql"]
+[db.network_restrictions]
+# Enable management of network restrictions.
+enabled = false
+# List of IPv4 CIDR blocks allowed to connect to the database.
+# Defaults to allow all IPv4 connections. Set empty array to block all IPs.
+allowed_cidrs = ["0.0.0.0/0"]
+# List of IPv6 CIDR blocks allowed to connect to the database.
+# Defaults to allow all IPv6 connections. Set empty array to block all IPs.
+allowed_cidrs_v6 = ["::/0"]
+
[realtime]
enabled = true
# Bind realtime via either IPv4 or IPv6. (default: IPv4)
@@ -110,6 +122,8 @@ site_url = "http://127.0.0.1:3000"
additional_redirect_urls = ["https://127.0.0.1:3000"]
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
jwt_expiry = 3600
+# Path to JWT signing key. DO NOT commit your signing keys file to git.
+# signing_keys_path = "./signing_keys.json"
# If disabled, the refresh token will never expire.
enable_refresh_token_rotation = true
# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
@@ -140,6 +154,8 @@ token_refresh = 150
sign_in_sign_ups = 30
# Number of OTP / Magic link verifications that can be made in a 5 minute interval per IP address.
token_verifications = 30
+# Number of Web3 logins that can be made in a 5 minute interval per IP address.
+web3 = 30
# Configure one of the supported captcha providers: `hcaptcha`, `turnstile`.
# [auth.captcha]
@@ -200,6 +216,11 @@ max_frequency = "5s"
# Force log out if the user has been inactive longer than the specified duration.
# inactivity_timeout = "8h"
+# This hook runs before a new user is created and allows developers to reject the request based on the incoming user object.
+# [auth.hook.before_user_created]
+# enabled = true
+# uri = "pg-functions://postgres/auth/before-user-created-hook"
+
# This hook runs before a token is issued and allows you to add additional claims based on the authentication method used.
# [auth.hook.custom_access_token]
# enabled = true
@@ -252,6 +273,11 @@ url = ""
# If enabled, the nonce check will be skipped. Required for local sign in with Google auth.
skip_nonce_check = false
+# Allow Solana wallet holders to sign in to your project via the Sign in with Solana (SIWS, EIP-4361) standard.
+# You can configure "web3" rate limit in the [auth.rate_limit] section and set up [auth.captcha] if self-hosting.
+[auth.web3.solana]
+enabled = false
+
# Use Firebase Auth as a third-party provider alongside Supabase Auth.
[auth.third_party.firebase]
enabled = false
diff --git a/pkg/config/testdata/TestAuthDiff/local_enabled_and_disabled.diff b/pkg/config/testdata/TestAuthDiff/local_enabled_and_disabled.diff
index b997bb15af..5425d12659 100644
--- a/pkg/config/testdata/TestAuthDiff/local_enabled_and_disabled.diff
+++ b/pkg/config/testdata/TestAuthDiff/local_enabled_and_disabled.diff
@@ -23,6 +23,6 @@ diff remote[auth] local[auth]
+enable_anonymous_sign_ins = false
+minimum_password_length = 6
+password_requirements = "lower_upper_letters_digits_symbols"
-
- [rate_limit]
- anonymous_users = 0
+ jwt_secret = ""
+ anon_key = ""
+ service_role_key = ""
diff --git a/pkg/config/testdata/TestCaptchaDiff/local_disabled_remote_enabled.diff b/pkg/config/testdata/TestCaptchaDiff/local_disabled_remote_enabled.diff
index 514251aa3c..87790083c2 100644
--- a/pkg/config/testdata/TestCaptchaDiff/local_disabled_remote_enabled.diff
+++ b/pkg/config/testdata/TestCaptchaDiff/local_disabled_remote_enabled.diff
@@ -1,8 +1,8 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -19,7 +19,7 @@
- sms_sent = 0
+@@ -23,7 +23,7 @@
+ web3 = 0
[captcha]
-enabled = true
diff --git a/pkg/config/testdata/TestCaptchaDiff/local_enabled_remote_disabled.diff b/pkg/config/testdata/TestCaptchaDiff/local_enabled_remote_disabled.diff
index 7bbf9ee8a0..2865d6d711 100644
--- a/pkg/config/testdata/TestCaptchaDiff/local_enabled_remote_disabled.diff
+++ b/pkg/config/testdata/TestCaptchaDiff/local_enabled_remote_disabled.diff
@@ -1,8 +1,8 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -19,9 +19,9 @@
- sms_sent = 0
+@@ -23,9 +23,9 @@
+ web3 = 0
[captcha]
-enabled = false
diff --git a/pkg/config/testdata/TestEmailDiff/local_disabled_remote_enabled.diff b/pkg/config/testdata/TestEmailDiff/local_disabled_remote_enabled.diff
index 031c2c5f17..42105313b6 100644
--- a/pkg/config/testdata/TestEmailDiff/local_disabled_remote_enabled.diff
+++ b/pkg/config/testdata/TestEmailDiff/local_disabled_remote_enabled.diff
@@ -1,7 +1,7 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -40,13 +40,13 @@
+@@ -44,13 +44,13 @@
inactivity_timeout = "0s"
[email]
diff --git a/pkg/config/testdata/TestEmailDiff/local_enabled_remote_disabled.diff b/pkg/config/testdata/TestEmailDiff/local_enabled_remote_disabled.diff
index b9f2057429..536c347124 100644
--- a/pkg/config/testdata/TestEmailDiff/local_enabled_remote_disabled.diff
+++ b/pkg/config/testdata/TestEmailDiff/local_enabled_remote_disabled.diff
@@ -1,7 +1,7 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -40,36 +40,44 @@
+@@ -44,36 +44,44 @@
inactivity_timeout = "0s"
[email]
diff --git a/pkg/config/testdata/TestExternalDiff/local_enabled_and_disabled.diff b/pkg/config/testdata/TestExternalDiff/local_enabled_and_disabled.diff
index 2eef288c50..5c885eeffb 100644
--- a/pkg/config/testdata/TestExternalDiff/local_enabled_and_disabled.diff
+++ b/pkg/config/testdata/TestExternalDiff/local_enabled_and_disabled.diff
@@ -1,7 +1,7 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -80,7 +80,7 @@
+@@ -84,7 +84,7 @@
[external]
[external.apple]
@@ -10,7 +10,7 @@ diff remote[auth] local[auth]
client_id = "test-client-1,test-client-2"
secret = "hash:ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"
url = ""
-@@ -87,9 +87,9 @@
+@@ -91,9 +91,9 @@
redirect_uri = ""
skip_nonce_check = false
[external.azure]
@@ -23,7 +23,7 @@ diff remote[auth] local[auth]
url = ""
redirect_uri = ""
skip_nonce_check = false
-@@ -136,7 +136,7 @@
+@@ -140,7 +140,7 @@
redirect_uri = ""
skip_nonce_check = false
[external.google]
diff --git a/pkg/config/testdata/TestHookDiff/local_disabled_remote_enabled.diff b/pkg/config/testdata/TestHookDiff/local_disabled_remote_enabled.diff
index b3cb9e1b7d..43bab9e109 100644
--- a/pkg/config/testdata/TestHookDiff/local_disabled_remote_enabled.diff
+++ b/pkg/config/testdata/TestHookDiff/local_disabled_remote_enabled.diff
@@ -1,7 +1,7 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -20,19 +20,19 @@
+@@ -24,23 +24,23 @@
[hook]
[hook.mfa_verification_attempt]
@@ -24,4 +24,9 @@ diff remote[auth] local[auth]
+enabled = false
uri = ""
secrets = ""
+ [hook.before_user_created]
+-enabled = true
++enabled = false
+ uri = ""
+ secrets = ""
diff --git a/pkg/config/testdata/TestHookDiff/local_enabled_remote_disabled.diff b/pkg/config/testdata/TestHookDiff/local_enabled_remote_disabled.diff
index b618fb6675..ed61a4cdb8 100644
--- a/pkg/config/testdata/TestHookDiff/local_enabled_remote_disabled.diff
+++ b/pkg/config/testdata/TestHookDiff/local_enabled_remote_disabled.diff
@@ -1,7 +1,7 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -20,20 +20,20 @@
+@@ -24,25 +24,25 @@
[hook]
[hook.mfa_verification_attempt]
@@ -27,5 +27,13 @@ diff remote[auth] local[auth]
+enabled = true
+uri = "pg-functions://postgres/public/sendEmail"
secrets = ""
+ [hook.before_user_created]
+-enabled = false
+-uri = "pg-functions://postgres/public/beforeUserCreated"
+-secrets = ""
++enabled = true
++uri = "http://example.com"
++secrets = "hash:ce62bb9bcced294fd4afe668f8ab3b50a89cf433093c526fffa3d0e46bf55252"
[mfa]
+ max_enrolled_factors = 0
diff --git a/pkg/config/testdata/TestMfaDiff/local_enabled_and_disabled.diff b/pkg/config/testdata/TestMfaDiff/local_enabled_and_disabled.diff
index dbb25a8457..ae67613cbe 100644
--- a/pkg/config/testdata/TestMfaDiff/local_enabled_and_disabled.diff
+++ b/pkg/config/testdata/TestMfaDiff/local_enabled_and_disabled.diff
@@ -1,7 +1,7 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -21,16 +21,16 @@
+@@ -25,16 +25,16 @@
[hook]
[mfa]
diff --git a/pkg/config/testdata/TestRateLimitsDiff/local_and_remote_rate_limits_differ.diff b/pkg/config/testdata/TestRateLimitsDiff/local_and_remote_rate_limits_differ.diff
index c403f9cbb0..26f0fe484e 100644
--- a/pkg/config/testdata/TestRateLimitsDiff/local_and_remote_rate_limits_differ.diff
+++ b/pkg/config/testdata/TestRateLimitsDiff/local_and_remote_rate_limits_differ.diff
@@ -1,8 +1,8 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -11,12 +11,12 @@
- password_requirements = ""
+@@ -14,12 +14,12 @@
+ service_role_key = ""
[rate_limit]
-anonymous_users = 10
@@ -15,6 +15,6 @@ diff remote[auth] local[auth]
-sms_sent = 55
+email_sent = 25
+sms_sent = 35
+ web3 = 0
[hook]
-
diff --git a/pkg/config/testdata/TestSmsDiff/enable_sign_up_without_provider.diff b/pkg/config/testdata/TestSmsDiff/enable_sign_up_without_provider.diff
index a9b5eb63bc..66250c8c79 100644
--- a/pkg/config/testdata/TestSmsDiff/enable_sign_up_without_provider.diff
+++ b/pkg/config/testdata/TestSmsDiff/enable_sign_up_without_provider.diff
@@ -1,7 +1,7 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -49,7 +49,7 @@
+@@ -53,7 +53,7 @@
otp_expiry = 0
[sms]
diff --git a/pkg/config/testdata/TestSmsDiff/local_disabled_remote_enabled.diff b/pkg/config/testdata/TestSmsDiff/local_disabled_remote_enabled.diff
index b1cf6e99d6..a59f66f56a 100644
--- a/pkg/config/testdata/TestSmsDiff/local_disabled_remote_enabled.diff
+++ b/pkg/config/testdata/TestSmsDiff/local_disabled_remote_enabled.diff
@@ -1,7 +1,7 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -49,12 +49,12 @@
+@@ -53,12 +53,12 @@
otp_expiry = 0
[sms]
@@ -19,12 +19,12 @@ diff remote[auth] local[auth]
account_sid = ""
message_service_sid = ""
auth_token = ""
-@@ -77,8 +77,6 @@
+@@ -81,8 +81,6 @@
api_key = ""
api_secret = ""
[sms.test_otp]
-123 = "456"
-456 = "123"
- [third_party]
- [third_party.firebase]
+ [web3]
+ [web3.solana]
diff --git a/pkg/config/testdata/TestSmsDiff/local_enabled_remote_disabled.diff b/pkg/config/testdata/TestSmsDiff/local_enabled_remote_disabled.diff
index e2853e76e7..0c52717190 100644
--- a/pkg/config/testdata/TestSmsDiff/local_enabled_remote_disabled.diff
+++ b/pkg/config/testdata/TestSmsDiff/local_enabled_remote_disabled.diff
@@ -1,7 +1,7 @@
diff remote[auth] local[auth]
--- remote[auth]
+++ local[auth]
-@@ -49,12 +49,12 @@
+@@ -53,12 +53,12 @@
otp_expiry = 0
[sms]
@@ -19,7 +19,7 @@ diff remote[auth] local[auth]
account_sid = ""
message_service_sid = ""
auth_token = ""
-@@ -64,9 +64,9 @@
+@@ -68,9 +68,9 @@
message_service_sid = ""
auth_token = ""
[sms.messagebird]
@@ -32,11 +32,11 @@ diff remote[auth] local[auth]
[sms.textlocal]
enabled = false
sender = ""
-@@ -77,6 +77,7 @@
+@@ -81,6 +81,7 @@
api_key = ""
api_secret = ""
[sms.test_otp]
+123 = "456"
- [third_party]
- [third_party.firebase]
+ [web3]
+ [web3.solana]
diff --git a/pkg/config/testdata/config.toml b/pkg/config/testdata/config.toml
index aa0131ab12..37b5158655 100644
--- a/pkg/config/testdata/config.toml
+++ b/pkg/config/testdata/config.toml
@@ -28,9 +28,11 @@ port = 54322
shadow_port = 54320
# The database major version to use. This has to be the same as your remote database's. Run `SHOW
# server_version;` on the remote database to check.
-major_version = 15
+major_version = 17
[db.migrations]
+# If disabled, migrations will be skipped during a db push or reset.
+enabled = true
# Specifies an ordered list of schema files that describe your database.
# Supports glob patterns relative to supabase directory: "./schemas/*.sql"
schema_paths = ["./schemas/*.sql"]
@@ -57,6 +59,16 @@ enabled = true
# Supports glob patterns relative to supabase directory: "./seeds/*.sql"
sql_paths = ["./seed.sql"]
+[db.network_restrictions]
+# Enable management of network restrictions.
+enabled = true
+# List of IPv4 CIDR blocks allowed to connect to the database.
+# Defaults to allow all IPv4 connections. Set empty array to block all IPs.
+allowed_cidrs = ["0.0.0.0/0"]
+# List of IPv6 CIDR blocks allowed to connect to the database.
+# Defaults to allow all IPv6 connections. Set empty array to block all IPs.
+allowed_cidrs_v6 = ["::/0"]
+
[realtime]
enabled = true
# Bind realtime via either IPv4 or IPv6. (default: IPv6)
@@ -110,6 +122,8 @@ site_url = "http://127.0.0.1:3000"
additional_redirect_urls = ["https://127.0.0.1:3000", "env(AUTH_CALLBACK_URL)"]
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
jwt_expiry = 3600
+# Path to JWT signing key. DO NOT commit your signing keys file to git.
+signing_keys_path = "./signing_keys.json"
# If disabled, the refresh token will never expire.
enable_refresh_token_rotation = true
# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
@@ -140,6 +154,8 @@ token_refresh = 150
sign_in_sign_ups = 30
# Number of OTP / Magic link verifications that can be made in a 5 minute interval per IP address.
token_verifications = 30
+# Number of Web3 logins that can be made in a 5 minute interval per IP address.
+web3 = 30
# Configure one of the supported captcha providers: `hcaptcha`, `turnstile`.
[auth.captcha]
@@ -200,6 +216,11 @@ timebox = "24h"
# Force log out if the user has been inactive longer than the specified duration.
inactivity_timeout = "8h"
+# This hook runs before a new user is created and allows developers to reject the request based on the incoming user object.
+[auth.hook.before_user_created]
+enabled = true
+uri = "pg-functions://postgres/auth/before-user-created-hook"
+
# This hook runs before a token is issued and allows you to add additional claims based on the authentication method used.
[auth.hook.custom_access_token]
enabled = true
@@ -253,6 +274,11 @@ url = "https://login.microsoftonline.com/tenant"
# If enabled, the nonce check will be skipped. Required for local sign in with Google auth.
skip_nonce_check = true
+# Allow Solana wallet holders to sign in to your project via the Sign in with Solana (SIWS, EIP-4361) standard.
+# You can configure "web3" rate limit in the [auth.rate_limit] section and set up [auth.captcha] if self-hosting.
+[auth.web3.solana]
+enabled = true
+
[edge_runtime]
enabled = true
# Configure one of the supported request policies: `oneshot`, `per_worker`.
diff --git a/pkg/config/updater.go b/pkg/config/updater.go
index e5f42acebf..96b73efd2a 100644
--- a/pkg/config/updater.go
+++ b/pkg/config/updater.go
@@ -97,6 +97,38 @@ func (u *ConfigUpdater) UpdateDbConfig(ctx context.Context, projectRef string, c
if err := u.UpdateDbSettingsConfig(ctx, projectRef, c.Settings, filter...); err != nil {
return err
}
+ if err := u.UpdateDbNetworkRestrictionsConfig(ctx, projectRef, c.NetworkRestrictions, filter...); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (u *ConfigUpdater) UpdateDbNetworkRestrictionsConfig(ctx context.Context, projectRef string, n networkRestrictions, filter ...func(string) bool) error {
+ networkRestrictionsConfig, err := u.client.V1GetNetworkRestrictionsWithResponse(ctx, projectRef)
+ if err != nil {
+ return errors.Errorf("failed to read network restrictions config: %w", err)
+ } else if networkRestrictionsConfig.JSON200 == nil {
+ return errors.Errorf("unexpected status %d: %s", networkRestrictionsConfig.StatusCode(), string(networkRestrictionsConfig.Body))
+ }
+ networkRestrictionsDiff, err := n.DiffWithRemote(*networkRestrictionsConfig.JSON200)
+ if err != nil {
+ return err
+ } else if len(networkRestrictionsDiff) == 0 {
+ fmt.Fprintln(os.Stderr, "Remote DB Network restrictions config is up to date.")
+ return nil
+ }
+ fmt.Fprintln(os.Stderr, "Updating network restrictions with config:", string(networkRestrictionsDiff))
+ for _, keep := range filter {
+ if !keep("db") {
+ return nil
+ }
+ }
+ updateBody := n.ToUpdateNetworkRestrictionsBody()
+ if resp, err := u.client.V1UpdateNetworkRestrictionsWithResponse(ctx, projectRef, updateBody); err != nil {
+ return errors.Errorf("failed to update network restrictions config: %w", err)
+ } else if resp.JSON201 == nil {
+ return errors.Errorf("unexpected status %d: %s", resp.StatusCode(), string(resp.Body))
+ }
return nil
}
diff --git a/pkg/config/updater_test.go b/pkg/config/updater_test.go
index 05a5d91d73..ad12812e5e 100644
--- a/pkg/config/updater_test.go
+++ b/pkg/config/updater_test.go
@@ -6,6 +6,7 @@ import (
"testing"
"github.com/h2non/gock"
+ "github.com/oapi-codegen/nullable"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
v1API "github.com/supabase/cli/pkg/api"
@@ -168,7 +169,7 @@ func TestUpdateAuthConfig(t *testing.T) {
Get("/v1/projects/test-project/config/auth").
Reply(http.StatusOK).
JSON(v1API.AuthConfigResponse{
- SiteUrl: cast.Ptr("http://localhost:3000"),
+ SiteUrl: nullable.NewNullableWithValue("http://localhost:3000"),
})
gock.New(server).
Patch("/v1/projects/test-project/config/auth").
@@ -219,17 +220,25 @@ func TestUpdateStorageConfig(t *testing.T) {
updater := NewConfigUpdater(*client)
// Setup mock server
defer gock.Off()
+ mockStorage := v1API.StorageConfigResponse{
+ FileSizeLimit: 100,
+ Features: struct {
+ IcebergCatalog *struct {
+ Enabled bool `json:"enabled"`
+ } `json:"icebergCatalog,omitempty"`
+ ImageTransformation struct {
+ Enabled bool `json:"enabled"`
+ } `json:"imageTransformation"`
+ S3Protocol struct {
+ Enabled bool `json:"enabled"`
+ } `json:"s3Protocol"`
+ }{},
+ }
+ mockStorage.Features.ImageTransformation.Enabled = true
gock.New(server).
Get("/v1/projects/test-project/config/storage").
Reply(http.StatusOK).
- JSON(v1API.StorageConfigResponse{
- FileSizeLimit: 100,
- Features: v1API.StorageFeatures{
- ImageTransformation: v1API.StorageFeatureImageTransformation{
- Enabled: true,
- },
- },
- })
+ JSON(mockStorage)
gock.New(server).
Patch("/v1/projects/test-project/config/storage").
Reply(http.StatusOK)
diff --git a/pkg/fetcher/gateway.go b/pkg/fetcher/gateway.go
new file mode 100644
index 0000000000..d8fa597f77
--- /dev/null
+++ b/pkg/fetcher/gateway.go
@@ -0,0 +1,32 @@
+package fetcher
+
+import (
+ "net/http"
+ "strings"
+ "time"
+)
+
+func NewServiceGateway(server, token string, overrides ...FetcherOption) *Fetcher {
+ opts := append([]FetcherOption{
+ WithHTTPClient(&http.Client{
+ Timeout: 10 * time.Second,
+ }),
+ withAuthToken(token),
+ WithExpectedStatus(http.StatusOK),
+ }, overrides...)
+ return NewFetcher(server, opts...)
+}
+
+func withAuthToken(token string) FetcherOption {
+ if strings.HasPrefix(token, "sb_") {
+ header := func(req *http.Request) {
+ req.Header.Add("apikey", token)
+ }
+ return WithRequestEditor(header)
+ }
+ header := func(req *http.Request) {
+ req.Header.Add("apikey", token)
+ req.Header.Add("Authorization", "Bearer "+token)
+ }
+ return WithRequestEditor(header)
+}
diff --git a/pkg/function/api.go b/pkg/function/api.go
index 1070744e47..df44432405 100644
--- a/pkg/function/api.go
+++ b/pkg/function/api.go
@@ -14,8 +14,17 @@ type EdgeRuntimeAPI struct {
maxJobs uint
}
+type FunctionDeployMetadata struct {
+ EntrypointPath string `json:"entrypoint_path"`
+ ImportMapPath *string `json:"import_map_path,omitempty"`
+ Name *string `json:"name,omitempty"`
+ StaticPatterns *[]string `json:"static_patterns,omitempty"`
+ VerifyJwt *bool `json:"verify_jwt,omitempty"`
+ SHA256 string `json:"sha256,omitempty"`
+}
+
type EszipBundler interface {
- Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (api.FunctionDeployMetadata, error)
+ Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (FunctionDeployMetadata, error)
}
func NewEdgeRuntimeAPI(project string, client api.ClientWithResponses, opts ...withOption) EdgeRuntimeAPI {
diff --git a/pkg/function/batch.go b/pkg/function/batch.go
index ada209519e..69754f978b 100644
--- a/pkg/function/batch.go
+++ b/pkg/function/batch.go
@@ -3,14 +3,20 @@ package function
import (
"bytes"
"context"
+ "crypto/sha256"
+ "encoding/hex"
"fmt"
"io"
+ "net/http"
"os"
+ "strings"
+ "time"
"github.com/cenkalti/backoff/v4"
"github.com/docker/go-units"
"github.com/go-errors/errors"
"github.com/supabase/cli/pkg/api"
+ "github.com/supabase/cli/pkg/cast"
"github.com/supabase/cli/pkg/config"
)
@@ -20,19 +26,29 @@ const (
)
func (s *EdgeRuntimeAPI) UpsertFunctions(ctx context.Context, functionConfig config.FunctionConfig, filter ...func(string) bool) error {
- var result []api.FunctionResponse
- if resp, err := s.client.V1ListAllFunctionsWithResponse(ctx, s.project); err != nil {
- return errors.Errorf("failed to list functions: %w", err)
- } else if resp.JSON200 == nil {
- return errors.Errorf("unexpected list functions status %d: %s", resp.StatusCode(), string(resp.Body))
- } else {
- result = *resp.JSON200
+ policy := backoff.WithContext(backoff.WithMaxRetries(backoff.NewExponentialBackOff(), maxRetries), ctx)
+ result, err := backoff.RetryWithData(func() ([]api.FunctionResponse, error) {
+ resp, err := s.client.V1ListAllFunctionsWithResponse(ctx, s.project)
+ if err != nil {
+ return nil, errors.Errorf("failed to list functions: %w", err)
+ } else if resp.JSON200 == nil {
+ err = errors.Errorf("unexpected list functions status %d: %s", resp.StatusCode(), string(resp.Body))
+ if resp.StatusCode() < http.StatusInternalServerError {
+ err = &backoff.PermanentError{Err: err}
+ }
+ return nil, err
+ }
+ return *resp.JSON200, nil
+ }, policy)
+ if err != nil {
+ return err
}
- exists := make(map[string]struct{}, len(result))
+ policy.Reset()
+ checksum := make(map[string]string, len(result))
for _, f := range result {
- exists[f.Slug] = struct{}{}
+ checksum[f.Slug] = cast.Val(f.EzbrSha256, "")
}
- var toUpdate []api.BulkUpdateFunctionBody
+ var toUpdate api.BulkUpdateFunctionBody
OUTER:
for slug, function := range functionConfig {
if !function.Enabled {
@@ -50,44 +66,61 @@ OUTER:
return err
}
meta.VerifyJwt = &function.VerifyJWT
+ bodyHash := sha256.Sum256(body.Bytes())
+ meta.SHA256 = hex.EncodeToString(bodyHash[:])
+ // Skip if function has not changed
+ if checksum[slug] == meta.SHA256 {
+ fmt.Fprintln(os.Stderr, "No change found in Function:", slug)
+ continue
+ }
// Update if function already exists
upsert := func() (api.BulkUpdateFunctionBody, error) {
- if _, ok := exists[slug]; ok {
+ if _, ok := checksum[slug]; ok {
return s.updateFunction(ctx, slug, meta, bytes.NewReader(body.Bytes()))
}
return s.createFunction(ctx, slug, meta, bytes.NewReader(body.Bytes()))
}
functionSize := units.HumanSize(float64(body.Len()))
fmt.Fprintf(os.Stderr, "Deploying Function: %s (script size: %s)\n", slug, functionSize)
- policy := backoff.WithContext(backoff.WithMaxRetries(backoff.NewExponentialBackOff(), maxRetries), ctx)
- result, err := backoff.RetryWithData(upsert, policy)
+ result, err := backoff.RetryNotifyWithData(upsert, policy, func(err error, d time.Duration) {
+ if strings.Contains(err.Error(), "Duplicated function slug") {
+ checksum[slug] = ""
+ }
+ })
if err != nil {
return err
}
- toUpdate = append(toUpdate, result)
+ toUpdate = append(toUpdate, result...)
+ policy.Reset()
}
if len(toUpdate) > 1 {
- if resp, err := s.client.V1BulkUpdateFunctionsWithResponse(ctx, s.project, toUpdate); err != nil {
- return errors.Errorf("failed to bulk update: %w", err)
- } else if resp.JSON200 == nil {
- return errors.Errorf("unexpected bulk update status %d: %s", resp.StatusCode(), string(resp.Body))
+ if err := backoff.Retry(func() error {
+ if resp, err := s.client.V1BulkUpdateFunctionsWithResponse(ctx, s.project, toUpdate); err != nil {
+ return errors.Errorf("failed to bulk update: %w", err)
+ } else if resp.JSON200 == nil {
+ return errors.Errorf("unexpected bulk update status %d: %s", resp.StatusCode(), string(resp.Body))
+ }
+ return nil
+ }, policy); err != nil {
+ return err
}
}
return nil
}
-func (s *EdgeRuntimeAPI) updateFunction(ctx context.Context, slug string, meta api.FunctionDeployMetadata, body io.Reader) (api.BulkUpdateFunctionBody, error) {
+func (s *EdgeRuntimeAPI) updateFunction(ctx context.Context, slug string, meta FunctionDeployMetadata, body io.Reader) (api.BulkUpdateFunctionBody, error) {
resp, err := s.client.V1UpdateAFunctionWithBodyWithResponse(ctx, s.project, slug, &api.V1UpdateAFunctionParams{
VerifyJwt: meta.VerifyJwt,
ImportMapPath: meta.ImportMapPath,
EntrypointPath: &meta.EntrypointPath,
+ EzbrSha256: &meta.SHA256,
}, eszipContentType, body)
if err != nil {
return api.BulkUpdateFunctionBody{}, errors.Errorf("failed to update function: %w", err)
} else if resp.JSON200 == nil {
return api.BulkUpdateFunctionBody{}, errors.Errorf("unexpected update function status %d: %s", resp.StatusCode(), string(resp.Body))
}
- return api.BulkUpdateFunctionBody{
+ return api.BulkUpdateFunctionBody{{
Id: resp.JSON200.Id,
Name: resp.JSON200.Name,
Slug: resp.JSON200.Slug,
@@ -98,23 +131,25 @@ func (s *EdgeRuntimeAPI) updateFunction(ctx context.Context, slug string, meta a
VerifyJwt: resp.JSON200.VerifyJwt,
Status: api.BulkUpdateFunctionBodyStatus(resp.JSON200.Status),
CreatedAt: &resp.JSON200.CreatedAt,
- }, nil
+ EzbrSha256: resp.JSON200.EzbrSha256,
+ }}, nil
}
-func (s *EdgeRuntimeAPI) createFunction(ctx context.Context, slug string, meta api.FunctionDeployMetadata, body io.Reader) (api.BulkUpdateFunctionBody, error) {
+func (s *EdgeRuntimeAPI) createFunction(ctx context.Context, slug string, meta FunctionDeployMetadata, body io.Reader) (api.BulkUpdateFunctionBody, error) {
resp, err := s.client.V1CreateAFunctionWithBodyWithResponse(ctx, s.project, &api.V1CreateAFunctionParams{
Slug: &slug,
Name: &slug,
VerifyJwt: meta.VerifyJwt,
ImportMapPath: meta.ImportMapPath,
EntrypointPath: &meta.EntrypointPath,
+ EzbrSha256: &meta.SHA256,
}, eszipContentType, body)
if err != nil {
return api.BulkUpdateFunctionBody{}, errors.Errorf("failed to create function: %w", err)
} else if resp.JSON201 == nil {
return api.BulkUpdateFunctionBody{}, errors.Errorf("unexpected create function status %d: %s", resp.StatusCode(), string(resp.Body))
}
- return api.BulkUpdateFunctionBody{
+ return api.BulkUpdateFunctionBody{{
Id: resp.JSON201.Id,
Name: resp.JSON201.Name,
Slug: resp.JSON201.Slug,
@@ -125,5 +160,6 @@ func (s *EdgeRuntimeAPI) createFunction(ctx context.Context, slug string, meta a
VerifyJwt: resp.JSON201.VerifyJwt,
Status: api.BulkUpdateFunctionBodyStatus(resp.JSON201.Status),
CreatedAt: &resp.JSON201.CreatedAt,
- }, nil
+ EzbrSha256: resp.JSON201.EzbrSha256,
+ }}, nil
}
diff --git a/pkg/function/batch_test.go b/pkg/function/batch_test.go
index f92bbf3358..cc6437ec36 100644
--- a/pkg/function/batch_test.go
+++ b/pkg/function/batch_test.go
@@ -17,11 +17,11 @@ import (
type MockBundler struct {
}
-func (b *MockBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (api.FunctionDeployMetadata, error) {
+func (b *MockBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (FunctionDeployMetadata, error) {
if staticFiles == nil {
staticFiles = []string{}
}
- return api.FunctionDeployMetadata{
+ return FunctionDeployMetadata{
Name: &slug,
EntrypointPath: entrypoint,
ImportMapPath: &importMap,
@@ -41,28 +41,85 @@ func TestUpsertFunctions(t *testing.T) {
era.eszip = &MockBundler{}
})
- t.Run("throws error on network failure", func(t *testing.T) {
+ t.Run("deploys with bulk update", func(t *testing.T) {
// Setup mock api
defer gock.OffAll()
gock.New(mockApiHost).
Get("/v1/projects/" + mockProject + "/functions").
+ Reply(http.StatusOK).
+ JSON([]api.FunctionResponse{{Slug: "test-a"}})
+ gock.New(mockApiHost).
+ Patch("/v1/projects/" + mockProject + "/functions/test-a").
+ Reply(http.StatusOK).
+ JSON(api.FunctionResponse{Slug: "test-a"})
+ gock.New(mockApiHost).
+ Post("/v1/projects/" + mockProject + "/functions/test-b").
+ Reply(http.StatusOK).
+ JSON(api.FunctionResponse{Slug: "test-b"})
+ gock.New(mockApiHost).
+ Put("/v1/projects/" + mockProject + "/functions").
ReplyError(errors.New("network error"))
+ gock.New(mockApiHost).
+ Put("/v1/projects/" + mockProject + "/functions").
+ Reply(http.StatusServiceUnavailable)
+ gock.New(mockApiHost).
+ Put("/v1/projects/" + mockProject + "/functions").
+ Reply(http.StatusOK).
+ JSON(api.V1BulkUpdateFunctionsResponse{})
// Run test
- err := client.UpsertFunctions(context.Background(), nil)
+ err := client.UpsertFunctions(context.Background(), config.FunctionConfig{
+ "test-a": {},
+ "test-b": {},
+ })
// Check error
- assert.ErrorContains(t, err, "network error")
+ assert.NoError(t, err)
+ assert.Empty(t, gock.Pending())
+ assert.Empty(t, gock.GetUnmatchedRequests())
})
- t.Run("throws error on service unavailable", func(t *testing.T) {
+ t.Run("handles concurrent deploy", func(t *testing.T) {
// Setup mock api
defer gock.OffAll()
+ gock.New(mockApiHost).
+ Get("/v1/projects/" + mockProject + "/functions").
+ Reply(http.StatusOK).
+ JSON([]api.FunctionResponse{})
+ gock.New(mockApiHost).
+ Post("/v1/projects/" + mockProject + "/functions").
+ Reply(http.StatusBadRequest).
+ BodyString("Duplicated function slug")
+ gock.New(mockApiHost).
+ Patch("/v1/projects/" + mockProject + "/functions/test").
+ Reply(http.StatusOK).
+ JSON(api.FunctionResponse{Slug: "test"})
+ // Run test
+ err := client.UpsertFunctions(context.Background(), config.FunctionConfig{
+ "test": {},
+ })
+ // Check error
+ assert.NoError(t, err)
+ assert.Empty(t, gock.Pending())
+ assert.Empty(t, gock.GetUnmatchedRequests())
+ })
+
+ t.Run("retries on network failure", func(t *testing.T) {
+ // Setup mock api
+ defer gock.OffAll()
+ gock.New(mockApiHost).
+ Get("/v1/projects/" + mockProject + "/functions").
+ ReplyError(errors.New("network error"))
gock.New(mockApiHost).
Get("/v1/projects/" + mockProject + "/functions").
Reply(http.StatusServiceUnavailable)
+ gock.New(mockApiHost).
+ Get("/v1/projects/" + mockProject + "/functions").
+ Reply(http.StatusBadRequest)
// Run test
err := client.UpsertFunctions(context.Background(), nil)
// Check error
- assert.ErrorContains(t, err, "unexpected list functions status 503:")
+ assert.ErrorContains(t, err, "unexpected list functions status 400:")
+ assert.Empty(t, gock.Pending())
+ assert.Empty(t, gock.GetUnmatchedRequests())
})
t.Run("retries on create failure", func(t *testing.T) {
@@ -88,6 +145,8 @@ func TestUpsertFunctions(t *testing.T) {
})
// Check error
assert.NoError(t, err)
+ assert.Empty(t, gock.Pending())
+ assert.Empty(t, gock.GetUnmatchedRequests())
})
t.Run("retries on update failure", func(t *testing.T) {
@@ -113,5 +172,7 @@ func TestUpsertFunctions(t *testing.T) {
})
// Check error
assert.NoError(t, err)
+ assert.Empty(t, gock.Pending())
+ assert.Empty(t, gock.GetUnmatchedRequests())
})
}
diff --git a/pkg/function/bundle.go b/pkg/function/bundle.go
index 486bd4be66..eb178539a6 100644
--- a/pkg/function/bundle.go
+++ b/pkg/function/bundle.go
@@ -13,7 +13,6 @@ import (
"github.com/andybalholm/brotli"
"github.com/go-errors/errors"
- "github.com/supabase/cli/pkg/api"
"github.com/supabase/cli/pkg/cast"
)
@@ -29,10 +28,15 @@ func NewNativeBundler(tempDir string, fsys fs.FS) EszipBundler {
}
}
-// Use a package private variable to allow testing without gosec complaining about G204
-var edgeRuntimeBin = "edge-runtime"
+var (
+ // Use a package private variable to allow testing without gosec complaining about G204
+ edgeRuntimeBin = "edge-runtime"
+ BundleFlags = []string{
+ "--decorator", "tc39",
+ }
+)
-func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (api.FunctionDeployMetadata, error) {
+func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap string, staticFiles []string, output io.Writer) (FunctionDeployMetadata, error) {
meta := NewMetadata(slug, entrypoint, importMap, staticFiles)
outputPath := filepath.Join(b.tempDir, slug+".eszip")
// TODO: make edge runtime write to stdout
@@ -43,6 +47,7 @@ func (b *nativeBundler) Bundle(ctx context.Context, slug, entrypoint, importMap
for _, staticFile := range staticFiles {
args = append(args, "--static", staticFile)
}
+ args = append(args, BundleFlags...)
cmd := exec.CommandContext(ctx, edgeRuntimeBin, args...)
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
@@ -73,8 +78,8 @@ func Compress(r io.Reader, w io.Writer) error {
return nil
}
-func NewMetadata(slug, entrypoint, importMap string, staticFiles []string) api.FunctionDeployMetadata {
- meta := api.FunctionDeployMetadata{
+func NewMetadata(slug, entrypoint, importMap string, staticFiles []string) FunctionDeployMetadata {
+ meta := FunctionDeployMetadata{
Name: &slug,
EntrypointPath: toFileURL(entrypoint),
}
diff --git a/pkg/function/deno.go b/pkg/function/deno.go
new file mode 100644
index 0000000000..ec785c2467
--- /dev/null
+++ b/pkg/function/deno.go
@@ -0,0 +1,181 @@
+package function
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "io"
+ "io/fs"
+ "net/url"
+ "os"
+ "path"
+ "path/filepath"
+ "regexp"
+ "strings"
+
+ "github.com/go-errors/errors"
+ "github.com/tidwall/jsonc"
+)
+
+type ImportMap struct {
+ Imports map[string]string `json:"imports"`
+ Scopes map[string]map[string]string `json:"scopes"`
+ // Fallback reference for deno.json
+ ImportMap string `json:"importMap"`
+}
+
+func (m *ImportMap) LoadAsDeno(imPath string, fsys fs.FS, opts ...func(string, io.Reader) error) error {
+ if err := m.Load(imPath, fsys, opts...); err != nil {
+ return err
+ }
+ if name := path.Base(imPath); isDeno(name) && m.IsReference() {
+ imPath = path.Join(path.Dir(imPath), m.ImportMap)
+ if err := m.Load(imPath, fsys, opts...); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func isDeno(name string) bool {
+ return strings.EqualFold(name, "deno.json") ||
+ strings.EqualFold(name, "deno.jsonc")
+}
+
+func (m *ImportMap) IsReference() bool {
+ // Ref: https://github.com/denoland/deno/blob/main/cli/schemas/config-file.v1.json#L273
+ return len(m.Imports) == 0 && len(m.Scopes) == 0 && len(m.ImportMap) > 0
+}
+
+func (m *ImportMap) Load(imPath string, fsys fs.FS, opts ...func(string, io.Reader) error) error {
+ data, err := fs.ReadFile(fsys, filepath.FromSlash(imPath))
+ if err != nil {
+ return errors.Errorf("failed to load import map: %w", err)
+ }
+ if err := m.Parse(data); err != nil {
+ return err
+ }
+ if err := m.Resolve(imPath); err != nil {
+ return err
+ }
+ for _, apply := range opts {
+ if err := apply(imPath, bytes.NewReader(data)); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (m *ImportMap) Parse(data []byte) error {
+ data = jsonc.ToJSONInPlace(data)
+ decoder := json.NewDecoder(bytes.NewReader(data))
+ if err := decoder.Decode(&m); err != nil {
+ return errors.Errorf("failed to parse import map: %w", err)
+ }
+ return nil
+}
+
+func (m *ImportMap) Resolve(imPath string) error {
+ // Resolve all paths relative to current file
+ for k, v := range m.Imports {
+ m.Imports[k] = resolveHostPath(imPath, v)
+ }
+ for module, mapping := range m.Scopes {
+ for k, v := range mapping {
+ m.Scopes[module][k] = resolveHostPath(imPath, v)
+ }
+ }
+ return nil
+}
+
+func resolveHostPath(jsonPath, hostPath string) string {
+ // Leave absolute paths unchanged
+ if path.IsAbs(hostPath) {
+ return hostPath
+ }
+ // Leave URLs unchanged
+ if parsed, err := url.Parse(hostPath); err == nil && len(parsed.Scheme) > 0 {
+ return hostPath
+ }
+ resolved := path.Join(path.Dir(jsonPath), hostPath)
+ // Directory imports need to be suffixed with /
+ // Ref: https://deno.com/manual@v1.33.0/basics/import_maps
+ if strings.HasSuffix(hostPath, "/") {
+ resolved += "/"
+ }
+ // Relative imports must be prefixed with ./ or ../
+ if !path.IsAbs(resolved) {
+ resolved = "./" + resolved
+ }
+ return resolved
+}
+
+// Ref: https://regex101.com/r/DfBdJA/1
+var importPathPattern = regexp.MustCompile(`(?i)(?:import|export)\s+(?:{[^{}]+}|.*?)\s*(?:from)?\s*['"](.*?)['"]|import\(\s*['"](.*?)['"]\)`)
+
+func (importMap *ImportMap) WalkImportPaths(srcPath string, readFile func(curr string, w io.Writer) error) error {
+ seen := map[string]struct{}{}
+ // DFS because it's more efficient to pop from end of array
+ q := make([]string, 1)
+ q[0] = srcPath
+ for len(q) > 0 {
+ curr := q[len(q)-1]
+ q = q[:len(q)-1]
+ // Assume no file is symlinked
+ if _, ok := seen[curr]; ok {
+ continue
+ }
+ seen[curr] = struct{}{}
+ // Read into memory for regex match later
+ var buf bytes.Buffer
+ if err := readFile(curr, &buf); errors.Is(err, os.ErrNotExist) {
+ fmt.Fprintln(os.Stderr, "WARN:", err)
+ continue
+ } else if err != nil {
+ return err
+ }
+ // Traverse all modules imported by the current source file
+ for _, matches := range importPathPattern.FindAllStringSubmatch(buf.String(), -1) {
+ if len(matches) < 3 {
+ continue
+ }
+ // Matches 'from' clause if present, else fallback to 'import'
+ mod := matches[1]
+ if len(mod) == 0 {
+ mod = matches[2]
+ }
+ mod = strings.TrimSpace(mod)
+ // Substitute kv from import map
+ substituted := false
+ for k, v := range importMap.Imports {
+ if strings.HasPrefix(mod, k) {
+ mod = v + mod[len(k):]
+ substituted = true
+ }
+ }
+ // Ignore URLs and directories, assuming no sloppy imports
+ // https://github.com/denoland/deno/issues/2506#issuecomment-2727635545
+ if len(path.Ext(mod)) == 0 {
+ continue
+ }
+ // Deno import path must begin with one of these prefixes
+ if !isRelPath(mod) && !isAbsPath(mod) {
+ continue
+ }
+ if isRelPath(mod) && !substituted {
+ mod = path.Join(path.Dir(curr), mod)
+ }
+ // Cleans import path to help detect duplicates
+ q = append(q, path.Clean(mod))
+ }
+ }
+ return nil
+}
+
+func isRelPath(mod string) bool {
+ return strings.HasPrefix(mod, "./") || strings.HasPrefix(mod, "../")
+}
+
+func isAbsPath(mod string) bool {
+ return strings.HasPrefix(mod, "/")
+}
diff --git a/pkg/function/deno_test.go b/pkg/function/deno_test.go
new file mode 100644
index 0000000000..ee3ac77956
--- /dev/null
+++ b/pkg/function/deno_test.go
@@ -0,0 +1,201 @@
+package function
+
+import (
+ "embed"
+ "io"
+ "os"
+ "testing"
+ fs "testing/fstest"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/mock"
+)
+
+//go:embed testdata
+var testImports embed.FS
+
+type MockFS struct {
+ mock.Mock
+}
+
+func (m *MockFS) ReadFile(srcPath string, w io.Writer) error {
+ _ = m.Called(srcPath)
+ data, err := testImports.ReadFile(srcPath)
+ if err != nil {
+ return err
+ }
+ if _, err := w.Write(data); err != nil {
+ return err
+ }
+ return nil
+}
+
+func TestImportPaths(t *testing.T) {
+ t.Run("iterates all import paths", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := MockFS{}
+ fsys.On("ReadFile", "/modules/my-module.ts").Once()
+ fsys.On("ReadFile", "testdata/modules/imports.ts").Once()
+ fsys.On("ReadFile", "testdata/geometries/Geometries.js").Once()
+ // Run test
+ im := ImportMap{}
+ err := im.WalkImportPaths("testdata/modules/imports.ts", fsys.ReadFile)
+ // Check error
+ assert.NoError(t, err)
+ fsys.AssertExpectations(t)
+ })
+
+ t.Run("iterates with import map", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := MockFS{}
+ fsys.On("ReadFile", "/modules/my-module.ts").Once()
+ fsys.On("ReadFile", "testdata/modules/imports.ts").Once()
+ fsys.On("ReadFile", "testdata/geometries/Geometries.js").Once()
+ fsys.On("ReadFile", "testdata/shared/whatever.ts").Once()
+ fsys.On("ReadFile", "testdata/shared/mod.ts").Once()
+ fsys.On("ReadFile", "testdata/nested/index.ts").Once()
+ // Setup deno.json
+ im := ImportMap{Imports: map[string]string{
+ "module-name/": "../shared/",
+ }}
+ assert.NoError(t, im.Resolve("testdata/modules/deno.json"))
+ // Run test
+ err := im.WalkImportPaths("testdata/modules/imports.ts", fsys.ReadFile)
+ // Check error
+ assert.NoError(t, err)
+ fsys.AssertExpectations(t)
+ })
+
+ t.Run("resolves legacy import map", func(t *testing.T) {
+ // Setup in-memory fs
+ fsys := MockFS{}
+ fsys.On("ReadFile", "/modules/my-module.ts").Once()
+ fsys.On("ReadFile", "testdata/modules/imports.ts").Once()
+ fsys.On("ReadFile", "testdata/geometries/Geometries.js").Once()
+ fsys.On("ReadFile", "testdata/shared/whatever.ts").Once()
+ fsys.On("ReadFile", "testdata/shared/mod.ts").Once()
+ fsys.On("ReadFile", "testdata/nested/index.ts").Once()
+ // Setup legacy import map
+ im := ImportMap{Imports: map[string]string{
+ "module-name/": "./shared/",
+ }}
+ assert.NoError(t, im.Resolve("testdata/import_map.json"))
+ // Run test
+ err := im.WalkImportPaths("testdata/modules/imports.ts", fsys.ReadFile)
+ // Check error
+ assert.NoError(t, err)
+ fsys.AssertExpectations(t)
+ })
+}
+
+func TestResolveImports(t *testing.T) {
+ t.Run("resolves relative directory", func(t *testing.T) {
+ imPath := "supabase/functions/import_map.json"
+ // Setup in-memory fs
+ fsys := fs.MapFS{
+ imPath: &fs.MapFile{Data: []byte(`{
+ "imports": {
+ "abs/": "/tmp/",
+ "root": "../../common",
+ "parent": "../tests",
+ "child": "child/",
+ "missing": "../missing"
+ }
+ }`)},
+ "/tmp/": &fs.MapFile{},
+ "common": &fs.MapFile{},
+ "supabase/tests": &fs.MapFile{},
+ "supabase/functions/child": &fs.MapFile{},
+ }
+ // Run test
+ resolved := ImportMap{}
+ err := resolved.Load(imPath, fsys)
+ // Check error
+ assert.NoError(t, err)
+ assert.Equal(t, "/tmp/", resolved.Imports["abs/"])
+ assert.Equal(t, "./common", resolved.Imports["root"])
+ assert.Equal(t, "./supabase/tests", resolved.Imports["parent"])
+ assert.Equal(t, "./supabase/functions/child/", resolved.Imports["child"])
+ assert.Equal(t, "./supabase/missing", resolved.Imports["missing"])
+ })
+
+ t.Run("resolves parent scopes", func(t *testing.T) {
+ imPath := "supabase/functions/import_map.json"
+ // Setup in-memory fs
+ fsys := fs.MapFS{
+ imPath: &fs.MapFile{Data: []byte(`{
+ "scopes": {
+ "my-scope": {
+ "my-mod": "https://deno.land"
+ }
+ }
+ }`)},
+ }
+ // Run test
+ resolved := ImportMap{}
+ err := resolved.Load(imPath, fsys)
+ // Check error
+ assert.NoError(t, err)
+ assert.Equal(t, "https://deno.land", resolved.Scopes["my-scope"]["my-mod"])
+ })
+}
+
+func TestResolveDeno(t *testing.T) {
+ t.Run("resolves deno.json", func(t *testing.T) {
+ imPath := "supabase/functions/slug/deno.json"
+ // Setup in-memory fs
+ fsys := fs.MapFS{
+ imPath: &fs.MapFile{Data: []byte(`{
+ "imports": {
+ "@mod": "./mod.ts"
+ },
+ "importMap": "../../import_map.json"
+ }`)},
+ "supabase/functions/slug/mod.ts": &fs.MapFile{},
+ }
+ // Run test
+ resolved := ImportMap{}
+ err := resolved.LoadAsDeno(imPath, fsys)
+ // Check error
+ assert.NoError(t, err)
+ assert.Equal(t, "./supabase/functions/slug/mod.ts", resolved.Imports["@mod"])
+ })
+
+ t.Run("resolves fallback imports", func(t *testing.T) {
+ imPath := "supabase/functions/slug/deno.json"
+ // Setup in-memory fs
+ fsys := fs.MapFS{
+ imPath: &fs.MapFile{Data: []byte(`{
+ "importMap": "../../import_map.json"
+ }`)},
+ "supabase/import_map.json": &fs.MapFile{Data: []byte(`{
+ "imports": {
+ "my-mod": "https://deno.land"
+ }
+ }`)},
+ }
+ // Run test
+ resolved := ImportMap{}
+ err := resolved.LoadAsDeno(imPath, fsys)
+ // Check error
+ assert.NoError(t, err)
+ assert.Equal(t, "https://deno.land", resolved.Imports["my-mod"])
+ })
+
+ t.Run("throws error on missing import", func(t *testing.T) {
+ imPath := "supabase/functions/slug/deno.jsonc"
+ // Setup in-memory fs
+ fsys := fs.MapFS{
+ imPath: &fs.MapFile{Data: []byte(`{
+ "importMap": "../../import_map.json"
+ }`)},
+ }
+ // Run test
+ resolved := ImportMap{}
+ err := resolved.LoadAsDeno(imPath, fsys)
+ // Check error
+ assert.ErrorIs(t, err, os.ErrNotExist)
+ assert.Empty(t, resolved.Imports)
+ assert.Empty(t, resolved.Scopes)
+ })
+}
diff --git a/pkg/function/deploy.go b/pkg/function/deploy.go
index 3eef79284a..d2e302debb 100644
--- a/pkg/function/deploy.go
+++ b/pkg/function/deploy.go
@@ -1,7 +1,6 @@
package function
import (
- "bytes"
"context"
"encoding/json"
"fmt"
@@ -9,17 +8,13 @@ import (
"io/fs"
"mime/multipart"
"os"
- "path"
"path/filepath"
- "regexp"
- "strings"
"github.com/go-errors/errors"
"github.com/supabase/cli/pkg/api"
"github.com/supabase/cli/pkg/cast"
"github.com/supabase/cli/pkg/config"
"github.com/supabase/cli/pkg/queue"
- "github.com/tidwall/jsonc"
)
var ErrNoDeploy = errors.New("All Functions are up to date.")
@@ -28,21 +23,22 @@ func (s *EdgeRuntimeAPI) Deploy(ctx context.Context, functionConfig config.Funct
if s.eszip != nil {
return s.UpsertFunctions(ctx, functionConfig)
}
- var toDeploy []api.FunctionDeployMetadata
+ // Convert all paths in functions config to relative when using api deploy
+ var toDeploy []FunctionDeployMetadata
for slug, fc := range functionConfig {
if !fc.Enabled {
fmt.Fprintln(os.Stderr, "Skipped deploying Function:", slug)
continue
}
- meta := api.FunctionDeployMetadata{
+ meta := FunctionDeployMetadata{
Name: &slug,
- EntrypointPath: filepath.ToSlash(fc.Entrypoint),
- ImportMapPath: cast.Ptr(filepath.ToSlash(fc.ImportMap)),
+ EntrypointPath: toRelPath(fc.Entrypoint),
+ ImportMapPath: cast.Ptr(toRelPath(fc.ImportMap)),
VerifyJwt: &fc.VerifyJWT,
}
files := make([]string, len(fc.StaticFiles))
for i, sf := range fc.StaticFiles {
- files[i] = filepath.ToSlash(sf)
+ files[i] = toRelPath(sf)
}
meta.StaticPatterns = &files
toDeploy = append(toDeploy, meta)
@@ -57,16 +53,27 @@ func (s *EdgeRuntimeAPI) Deploy(ctx context.Context, functionConfig config.Funct
return s.bulkUpload(ctx, toDeploy, fsys)
}
-func (s *EdgeRuntimeAPI) bulkUpload(ctx context.Context, toDeploy []api.FunctionDeployMetadata, fsys fs.FS) error {
+func toRelPath(fp string) string {
+ if filepath.IsAbs(fp) {
+ if cwd, err := os.Getwd(); err == nil {
+ if relPath, err := filepath.Rel(cwd, fp); err == nil {
+ fp = relPath
+ }
+ }
+ }
+ return filepath.ToSlash(fp)
+}
+
+func (s *EdgeRuntimeAPI) bulkUpload(ctx context.Context, toDeploy []FunctionDeployMetadata, fsys fs.FS) error {
jq := queue.NewJobQueue(s.maxJobs)
- toUpdate := make([]api.BulkUpdateFunctionBody, len(toDeploy))
+ toUpdate := make(api.BulkUpdateFunctionBody, len(toDeploy))
for i, meta := range toDeploy {
- fmt.Fprintln(os.Stderr, "Deploying Function:", *meta.Name)
param := api.V1DeployAFunctionParams{
Slug: meta.Name,
BundleOnly: cast.Ptr(true),
}
bundle := func() error {
+ fmt.Fprintln(os.Stderr, "Deploying Function:", *meta.Name)
resp, err := s.upload(ctx, param, meta, fsys)
if err != nil {
return err
@@ -98,7 +105,7 @@ func (s *EdgeRuntimeAPI) bulkUpload(ctx context.Context, toDeploy []api.Function
return nil
}
-func (s *EdgeRuntimeAPI) upload(ctx context.Context, param api.V1DeployAFunctionParams, meta api.FunctionDeployMetadata, fsys fs.FS) (*api.DeployFunctionResponse, error) {
+func (s *EdgeRuntimeAPI) upload(ctx context.Context, param api.V1DeployAFunctionParams, meta FunctionDeployMetadata, fsys fs.FS) (*api.DeployFunctionResponse, error) {
body, w := io.Pipe()
form := multipart.NewWriter(w)
ctx, cancel := context.WithCancelCause(ctx)
@@ -122,7 +129,7 @@ func (s *EdgeRuntimeAPI) upload(ctx context.Context, param api.V1DeployAFunction
return resp.JSON201, nil
}
-func writeForm(form *multipart.Writer, meta api.FunctionDeployMetadata, fsys fs.FS) error {
+func writeForm(form *multipart.Writer, meta FunctionDeployMetadata, fsys fs.FS) error {
m, err := form.CreateFormField("metadata")
if err != nil {
return errors.Errorf("failed to create metadata: %w", err)
@@ -131,6 +138,17 @@ func writeForm(form *multipart.Writer, meta api.FunctionDeployMetadata, fsys fs.
if err := enc.Encode(meta); err != nil {
return errors.Errorf("failed to encode metadata: %w", err)
}
+ uploadAsset := func(srcPath string, r io.Reader) error {
+ fmt.Fprintf(os.Stderr, "Uploading asset (%s): %s\n", *meta.Name, srcPath)
+ f, err := form.CreateFormFile("file", srcPath)
+ if err != nil {
+ return errors.Errorf("failed to create form: %w", err)
+ }
+ if _, err := io.Copy(f, r); err != nil {
+ return errors.Errorf("failed to write form: %w", err)
+ }
+ return nil
+ }
addFile := func(srcPath string, w io.Writer) error {
f, err := fsys.Open(filepath.FromSlash(srcPath))
if err != nil {
@@ -142,36 +160,15 @@ func writeForm(form *multipart.Writer, meta api.FunctionDeployMetadata, fsys fs.
} else if fi.IsDir() {
return errors.New("file path is a directory: " + srcPath)
}
- fmt.Fprintf(os.Stderr, "Uploading asset (%s): %s\n", *meta.Name, srcPath)
r := io.TeeReader(f, w)
- dst, err := form.CreateFormFile("file", srcPath)
- if err != nil {
- return errors.Errorf("failed to create form: %w", err)
- }
- if _, err := io.Copy(dst, r); err != nil {
- return errors.Errorf("failed to write form: %w", err)
- }
- return nil
+ return uploadAsset(srcPath, r)
}
// Add import map
importMap := ImportMap{}
if imPath := cast.Val(meta.ImportMapPath, ""); len(imPath) > 0 {
- data, err := fs.ReadFile(fsys, filepath.FromSlash(imPath))
- if err != nil {
- return errors.Errorf("failed to load import map: %w", err)
- }
- if err := importMap.Parse(data); err != nil {
+ if err := importMap.LoadAsDeno(imPath, fsys, uploadAsset); err != nil {
return err
}
- // TODO: replace with addFile once edge runtime supports jsonc
- fmt.Fprintf(os.Stderr, "Uploading asset (%s): %s\n", *meta.Name, imPath)
- f, err := form.CreateFormFile("file", imPath)
- if err != nil {
- return errors.Errorf("failed to create import map: %w", err)
- }
- if _, err := f.Write(data); err != nil {
- return errors.Errorf("failed to write import map: %w", err)
- }
}
// Add static files
patterns := config.Glob(cast.Val(meta.StaticPatterns, []string{}))
@@ -184,75 +181,5 @@ func writeForm(form *multipart.Writer, meta api.FunctionDeployMetadata, fsys fs.
return err
}
}
- return walkImportPaths(meta.EntrypointPath, importMap, addFile)
-}
-
-type ImportMap struct {
- Imports map[string]string `json:"imports"`
- Scopes map[string]map[string]string `json:"scopes"`
-}
-
-func (m *ImportMap) Parse(data []byte) error {
- data = jsonc.ToJSONInPlace(data)
- decoder := json.NewDecoder(bytes.NewReader(data))
- if err := decoder.Decode(&m); err != nil {
- return errors.Errorf("failed to parse import map: %w", err)
- }
- return nil
-}
-
-// Ref: https://regex101.com/r/DfBdJA/1
-var importPathPattern = regexp.MustCompile(`(?i)(?:import|export)\s+(?:{[^{}]+}|.*?)\s*(?:from)?\s*['"](.*?)['"]|import\(\s*['"](.*?)['"]\)`)
-
-func walkImportPaths(srcPath string, importMap ImportMap, readFile func(curr string, w io.Writer) error) error {
- seen := map[string]struct{}{}
- // DFS because it's more efficient to pop from end of array
- q := make([]string, 1)
- q[0] = srcPath
- for len(q) > 0 {
- curr := q[len(q)-1]
- q = q[:len(q)-1]
- // Assume no file is symlinked
- if _, ok := seen[curr]; ok {
- continue
- }
- seen[curr] = struct{}{}
- // Read into memory for regex match later
- var buf bytes.Buffer
- if err := readFile(curr, &buf); errors.Is(err, os.ErrNotExist) {
- fmt.Fprintln(os.Stderr, "WARN:", err)
- continue
- } else if err != nil {
- return err
- }
- // Traverse all modules imported by the current source file
- for _, matches := range importPathPattern.FindAllStringSubmatch(buf.String(), -1) {
- if len(matches) < 3 {
- continue
- }
- // Matches 'from' clause if present, else fallback to 'import'
- mod := matches[1]
- if len(mod) == 0 {
- mod = matches[2]
- }
- mod = strings.TrimSpace(mod)
- // Substitute kv from import map
- for k, v := range importMap.Imports {
- if strings.HasPrefix(mod, k) {
- mod = v + mod[len(k):]
- }
- }
- // Deno import path must begin with these prefixes
- if strings.HasPrefix(mod, "./") || strings.HasPrefix(mod, "../") {
- mod = path.Join(path.Dir(curr), mod)
- } else if !strings.HasPrefix(mod, "/") {
- continue
- }
- if len(path.Ext(mod)) > 0 {
- // Cleans import path to help detect duplicates
- q = append(q, path.Clean(mod))
- }
- }
- }
- return nil
+ return importMap.WalkImportPaths(meta.EntrypointPath, addFile)
}
diff --git a/pkg/function/deploy_test.go b/pkg/function/deploy_test.go
index 424478aa34..50e2e859e5 100644
--- a/pkg/function/deploy_test.go
+++ b/pkg/function/deploy_test.go
@@ -3,9 +3,7 @@ package function
import (
"bytes"
"context"
- "embed"
"errors"
- "io"
"mime/multipart"
"net/http"
"os"
@@ -15,67 +13,12 @@ import (
"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
- "github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/supabase/cli/pkg/api"
"github.com/supabase/cli/pkg/cast"
"github.com/supabase/cli/pkg/config"
)
-//go:embed testdata
-var testImports embed.FS
-
-type MockFS struct {
- mock.Mock
-}
-
-func (m *MockFS) ReadFile(srcPath string, w io.Writer) error {
- _ = m.Called(srcPath)
- data, err := testImports.ReadFile(srcPath)
- if err != nil {
- return err
- }
- if _, err := w.Write(data); err != nil {
- return err
- }
- return nil
-}
-
-func TestImportPaths(t *testing.T) {
- t.Run("iterates all import paths", func(t *testing.T) {
- // Setup in-memory fs
- fsys := MockFS{}
- fsys.On("ReadFile", "/modules/my-module.ts").Once()
- fsys.On("ReadFile", "testdata/modules/imports.ts").Once()
- fsys.On("ReadFile", "testdata/geometries/Geometries.js").Once()
- // Run test
- im := ImportMap{}
- err := walkImportPaths("testdata/modules/imports.ts", im, fsys.ReadFile)
- // Check error
- assert.NoError(t, err)
- fsys.AssertExpectations(t)
- })
-
- t.Run("iterates with import map", func(t *testing.T) {
- // Setup in-memory fs
- fsys := MockFS{}
- fsys.On("ReadFile", "/modules/my-module.ts").Once()
- fsys.On("ReadFile", "testdata/modules/imports.ts").Once()
- fsys.On("ReadFile", "testdata/geometries/Geometries.js").Once()
- fsys.On("ReadFile", "testdata/shared/whatever.ts").Once()
- fsys.On("ReadFile", "testdata/shared/mod.ts").Once()
- fsys.On("ReadFile", "testdata/nested/index.ts").Once()
- // Run test
- im := ImportMap{Imports: map[string]string{
- "module-name/": "../shared/",
- }}
- err := walkImportPaths("testdata/modules/imports.ts", im, fsys.ReadFile)
- // Check error
- assert.NoError(t, err)
- fsys.AssertExpectations(t)
- })
-}
-
func assertFormEqual(t *testing.T, actual []byte) {
snapshot := path.Join("testdata", path.Base(t.Name())+".form")
expected, err := testImports.ReadFile(snapshot)
@@ -93,7 +36,7 @@ func TestWriteForm(t *testing.T) {
// Setup in-memory fs
fsys := testImports
// Run test
- err := writeForm(form, api.FunctionDeployMetadata{
+ err := writeForm(form, FunctionDeployMetadata{
Name: cast.Ptr("nested"),
VerifyJwt: cast.Ptr(true),
EntrypointPath: "testdata/nested/index.ts",
@@ -112,7 +55,7 @@ func TestWriteForm(t *testing.T) {
// Setup in-memory fs
fsys := fs.MapFS{}
// Run test
- err := writeForm(form, api.FunctionDeployMetadata{
+ err := writeForm(form, FunctionDeployMetadata{
ImportMapPath: cast.Ptr("testdata/import_map.json"),
}, fsys)
// Check error
@@ -126,7 +69,7 @@ func TestWriteForm(t *testing.T) {
// Setup in-memory fs
fsys := testImports
// Run test
- err := writeForm(form, api.FunctionDeployMetadata{
+ err := writeForm(form, FunctionDeployMetadata{
StaticPatterns: cast.Ptr([]string{"testdata"}),
}, fsys)
// Check error
diff --git a/pkg/function/testdata/nested/deno.json b/pkg/function/testdata/nested/deno.json
index 0967ef424b..bfba6fbb2c 100644
--- a/pkg/function/testdata/nested/deno.json
+++ b/pkg/function/testdata/nested/deno.json
@@ -1 +1,5 @@
-{}
+{
+ "imports": {
+ "module": "jsr:@supabase/functions-js/edge-runtime.d.ts"
+ }
+}
diff --git a/pkg/function/testdata/nested/index.ts b/pkg/function/testdata/nested/index.ts
index e69de29bb2..b0539a467f 100644
--- a/pkg/function/testdata/nested/index.ts
+++ b/pkg/function/testdata/nested/index.ts
@@ -0,0 +1 @@
+import "module";
diff --git a/pkg/function/testdata/writes_import_map.form b/pkg/function/testdata/writes_import_map.form
index 75df843f70..174a55f6b0 100644
--- a/pkg/function/testdata/writes_import_map.form
+++ b/pkg/function/testdata/writes_import_map.form
@@ -7,7 +7,11 @@ Content-Disposition: form-data; name="metadata"
Content-Disposition: form-data; name="file"; filename="testdata/nested/deno.json"
Content-Type: application/octet-stream
-{}
+{
+ "imports": {
+ "module": "jsr:@supabase/functions-js/edge-runtime.d.ts"
+ }
+}
--test
Content-Disposition: form-data; name="file"; filename="testdata/geometries/Geometries.js"
@@ -18,3 +22,4 @@ Content-Type: application/octet-stream
Content-Disposition: form-data; name="file"; filename="testdata/nested/index.ts"
Content-Type: application/octet-stream
+import "module";
diff --git a/pkg/go.mod b/pkg/go.mod
new file mode 100644
index 0000000000..da9ff4f6ce
--- /dev/null
+++ b/pkg/go.mod
@@ -0,0 +1,60 @@
+module github.com/supabase/cli/pkg
+
+go 1.24.4
+
+require (
+ github.com/BurntSushi/toml v1.5.0
+ github.com/andybalholm/brotli v1.2.0
+ github.com/cenkalti/backoff/v4 v4.3.0
+ github.com/docker/go-units v0.5.0
+ github.com/ecies/go/v2 v2.0.11
+ github.com/go-errors/errors v1.5.1
+ github.com/go-viper/mapstructure/v2 v2.4.0
+ github.com/golang-jwt/jwt/v5 v5.3.0
+ github.com/h2non/gock v1.2.0
+ github.com/jackc/pgconn v1.14.3
+ github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438
+ github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65
+ github.com/jackc/pgproto3/v2 v2.3.3
+ github.com/jackc/pgtype v1.14.4
+ github.com/jackc/pgx/v4 v4.18.3
+ github.com/joho/godotenv v1.5.1
+ github.com/oapi-codegen/nullable v1.1.0
+ github.com/oapi-codegen/runtime v1.1.2
+ github.com/spf13/afero v1.14.0
+ github.com/spf13/viper v1.20.1
+ github.com/stretchr/testify v1.10.0
+ github.com/tidwall/jsonc v0.3.2
+ golang.org/x/mod v0.26.0
+ google.golang.org/grpc v1.74.2
+)
+
+require (
+ github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
+ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
+ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
+ github.com/ethereum/go-ethereum v1.15.8 // indirect
+ github.com/fsnotify/fsnotify v1.9.0 // indirect
+ github.com/google/uuid v1.6.0 // indirect
+ github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
+ github.com/jackc/chunkreader/v2 v2.0.1 // indirect
+ github.com/jackc/pgio v1.0.0 // indirect
+ github.com/jackc/pgpassfile v1.0.0 // indirect
+ github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
+ github.com/lib/pq v1.10.9 // indirect
+ github.com/pelletier/go-toml/v2 v2.2.4 // indirect
+ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
+ github.com/rogpeppe/go-internal v1.14.1 // indirect
+ github.com/sagikazarmark/locafero v0.7.0 // indirect
+ github.com/sourcegraph/conc v0.3.0 // indirect
+ github.com/spf13/cast v1.7.1 // indirect
+ github.com/spf13/pflag v1.0.6 // indirect
+ github.com/stretchr/objx v0.5.2 // indirect
+ github.com/subosito/gotenv v1.6.0 // indirect
+ go.uber.org/atomic v1.9.0 // indirect
+ go.uber.org/multierr v1.9.0 // indirect
+ golang.org/x/crypto v0.38.0 // indirect
+ golang.org/x/sys v0.33.0 // indirect
+ golang.org/x/text v0.25.0 // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
+)
diff --git a/pkg/go.sum b/pkg/go.sum
new file mode 100644
index 0000000000..c7f70e16f7
--- /dev/null
+++ b/pkg/go.sum
@@ -0,0 +1,307 @@
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
+github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
+github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
+github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
+github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ=
+github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
+github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
+github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
+github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
+github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
+github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
+github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
+github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
+github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
+github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc=
+github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40=
+github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
+github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
+github.com/ecies/go/v2 v2.0.11 h1:xYhtMdLiqNi02oLirFmLyNbVXw6250h3WM6zJryQdiM=
+github.com/ecies/go/v2 v2.0.11/go.mod h1:LPRzoefP0Tam+1uesQOq3Gtb6M2OwlFUnXBTtBAKfDQ=
+github.com/ethereum/go-ethereum v1.15.8 h1:H6NilvRXFVoHiXZ3zkuTqKW5XcxjLZniV5UjxJt1GJU=
+github.com/ethereum/go-ethereum v1.15.8/go.mod h1:+S9k+jFzlyVTNcYGvqFhzN/SFhI6vA+aOY4T5tLSPL0=
+github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
+github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
+github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
+github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
+github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
+github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
+github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
+github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
+github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
+github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
+github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
+github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
+github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
+github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
+github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
+github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/h2non/gock v1.2.0 h1:K6ol8rfrRkUOefooBC8elXoaNGYkpp7y2qcxGG6BzUE=
+github.com/h2non/gock v1.2.0/go.mod h1:tNhoxHYW2W42cYkYb1WqzdbYIieALC99kpYr7rH/BQk=
+github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
+github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
+github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
+github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
+github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
+github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
+github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=
+github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=
+github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=
+github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
+github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=
+github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
+github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w=
+github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM=
+github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 h1:Dj0L5fhJ9F82ZJyVOmBx6msDp/kfd1t9GRfny/mfJA0=
+github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds=
+github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
+github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
+github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
+github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c=
+github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc=
+github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=
+github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
+github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
+github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
+github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
+github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
+github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
+github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
+github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
+github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
+github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag=
+github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
+github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
+github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
+github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
+github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
+github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
+github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
+github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
+github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
+github.com/jackc/pgtype v1.14.4 h1:fKuNiCumbKTAIxQwXfB/nsrnkEI6bPJrrSiMKgbJ2j8=
+github.com/jackc/pgtype v1.14.4/go.mod h1:aKeozOde08iifGosdJpz9MBZonJOUJxqNpPBcMJTlVA=
+github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
+github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
+github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
+github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
+github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=
+github.com/jackc/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA=
+github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=
+github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
+github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
+github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
+github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
+github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
+github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
+github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
+github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
+github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
+github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
+github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
+github.com/oapi-codegen/nullable v1.1.0 h1:eAh8JVc5430VtYVnq00Hrbpag9PFRGWLjxR1/3KntMs=
+github.com/oapi-codegen/nullable v1.1.0/go.mod h1:KUZ3vUzkmEKY90ksAmit2+5juDIhIZhfDl+0PwOQlFY=
+github.com/oapi-codegen/runtime v1.1.2 h1:P2+CubHq8fO4Q6fV1tqDBZHCwpVpvPg7oKiYzQgXIyI=
+github.com/oapi-codegen/runtime v1.1.2/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
+github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
+github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
+github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
+github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
+github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
+github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
+github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo=
+github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k=
+github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
+github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
+github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
+github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
+github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
+github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
+github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA=
+github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo=
+github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
+github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
+github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
+github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4=
+github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4=
+github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
+github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
+github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
+github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
+github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
+github.com/tidwall/jsonc v0.3.2 h1:ZTKrmejRlAJYdn0kcaFqRAKlxxFIC21pYq8vLa4p2Wc=
+github.com/tidwall/jsonc v0.3.2/go.mod h1:dw+3CIxqHi+t8eFSpzzMlcVYxKp08UP5CD8/uSFCyJE=
+github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
+github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
+github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
+go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
+go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
+go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
+go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
+go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
+go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
+go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
+go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
+go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
+go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
+go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
+golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
+golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
+golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=
+golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
+golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
+golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg=
+golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
+golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
+golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
+golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
+golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
+golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
+golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
+golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4=
+google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
diff --git a/pkg/migration/drop.go b/pkg/migration/drop.go
index 4fcdd805c4..aa44407ca1 100644
--- a/pkg/migration/drop.go
+++ b/pkg/migration/drop.go
@@ -3,7 +3,6 @@ package migration
import (
"context"
_ "embed"
- "fmt"
"github.com/go-errors/errors"
"github.com/jackc/pgx/v4"
@@ -33,24 +32,7 @@ var (
)
func DropUserSchemas(ctx context.Context, conn *pgx.Conn) error {
- // Only drop objects in extensions and public schema
- excludes := append(ManagedSchemas,
- "extensions",
- "public",
- )
- userSchemas, err := ListUserSchemas(ctx, conn, excludes...)
- if err != nil {
- return err
- }
- // Drop all user defined schemas
migration := MigrationFile{}
- for _, schema := range userSchemas {
- sql := fmt.Sprintf("DROP SCHEMA IF EXISTS %s CASCADE", schema)
- migration.Statements = append(migration.Statements, sql)
- }
- // If an extension uses a schema it doesn't create, dropping the schema will cascade to also
- // drop the extension. But if an extension creates its own schema, dropping the schema will
- // throw an error. Hence, we drop the extension instead so it cascades to its own schema.
migration.Statements = append(migration.Statements, DropObjects)
return migration.ExecBatch(ctx, conn)
}
diff --git a/pkg/migration/drop_test.go b/pkg/migration/drop_test.go
index d2c25ed562..644fb69be0 100644
--- a/pkg/migration/drop_test.go
+++ b/pkg/migration/drop_test.go
@@ -9,18 +9,12 @@ import (
"github.com/supabase/cli/pkg/pgtest"
)
-var escapedSchemas = append(ManagedSchemas, "extensions", "public")
-
func TestDropSchemas(t *testing.T) {
t.Run("resets remote database", func(t *testing.T) {
// Setup mock postgres
conn := pgtest.NewConn()
defer conn.Close(t)
- conn.Query(ListSchemas, escapedSchemas).
- Reply("SELECT 1", []interface{}{"private"}).
- Query("DROP SCHEMA IF EXISTS private CASCADE").
- Reply("DROP SCHEMA").
- Query(DropObjects).
+ conn.Query(DropObjects).
Reply("INSERT 0")
// Run test
err := DropUserSchemas(context.Background(), conn.MockClient(t))
@@ -28,25 +22,11 @@ func TestDropSchemas(t *testing.T) {
assert.NoError(t, err)
})
- t.Run("throws error on list schema failure", func(t *testing.T) {
- // Setup mock postgres
- conn := pgtest.NewConn()
- defer conn.Close(t)
- conn.Query(ListSchemas, escapedSchemas).
- ReplyError(pgerrcode.InsufficientPrivilege, "permission denied for relation information_schema")
- // Run test
- err := DropUserSchemas(context.Background(), conn.MockClient(t))
- // Check error
- assert.ErrorContains(t, err, "ERROR: permission denied for relation information_schema (SQLSTATE 42501)")
- })
-
t.Run("throws error on drop schema failure", func(t *testing.T) {
// Setup mock postgres
conn := pgtest.NewConn()
defer conn.Close(t)
- conn.Query(ListSchemas, escapedSchemas).
- Reply("SELECT 0").
- Query(DropObjects).
+ conn.Query(DropObjects).
ReplyError(pgerrcode.InsufficientPrivilege, "permission denied for relation supabase_migrations")
// Run test
err := DropUserSchemas(context.Background(), conn.MockClient(t))
diff --git a/pkg/migration/dump.go b/pkg/migration/dump.go
new file mode 100644
index 0000000000..66d3f7486e
--- /dev/null
+++ b/pkg/migration/dump.go
@@ -0,0 +1,224 @@
+package migration
+
+import (
+ "context"
+ _ "embed"
+ "fmt"
+ "io"
+ "strings"
+
+ "github.com/jackc/pgconn"
+)
+
+var (
+ //go:embed scripts/dump_schema.sh
+ dumpSchemaScript string
+ //go:embed scripts/dump_data.sh
+ dumpDataScript string
+ //go:embed scripts/dump_role.sh
+ dumpRoleScript string
+
+ InternalSchemas = []string{
+ "information_schema",
+ "pg_*", // Wildcard pattern follows pg_dump
+ // Initialised by supabase/postgres image and owned by postgres role
+ "_analytics",
+ "_realtime",
+ "_supavisor",
+ "auth",
+ "extensions",
+ "pgbouncer",
+ "realtime",
+ "storage",
+ "supabase_functions",
+ "supabase_migrations",
+ // Owned by extensions
+ "cron",
+ "dbdev",
+ "graphql",
+ "graphql_public",
+ "net",
+ "pgmq",
+ "pgsodium",
+ "pgsodium_masks",
+ "pgtle",
+ "repack",
+ "tiger",
+ "tiger_data",
+ "timescaledb_*",
+ "_timescaledb_*",
+ "topology",
+ "vault",
+ }
+ // Data dump includes auth, storage, etc. for migrating to new project
+ excludedSchemas = []string{
+ "information_schema",
+ "pg_*", // Wildcard pattern follows pg_dump
+ // Owned by extensions
+ // "cron",
+ "graphql",
+ "graphql_public",
+ // "net",
+ // "pgmq",
+ "pgsodium",
+ "pgsodium_masks",
+ "pgtle",
+ "repack",
+ "tiger",
+ "tiger_data",
+ "timescaledb_*",
+ "_timescaledb_*",
+ "topology",
+ "vault",
+ // Managed by Supabase
+ // "auth",
+ "extensions",
+ "pgbouncer",
+ "realtime",
+ // "storage",
+ // "supabase_functions",
+ "supabase_migrations",
+ // TODO: Remove in a few version in favor of _supabase internal db
+ "_analytics",
+ "_realtime",
+ "_supavisor",
+ }
+ reservedRoles = []string{
+ "anon",
+ "authenticated",
+ "authenticator",
+ "dashboard_user",
+ "pgbouncer",
+ "postgres",
+ "service_role",
+ "supabase_admin",
+ "supabase_auth_admin",
+ "supabase_functions_admin",
+ "supabase_read_only_user",
+ "supabase_realtime_admin",
+ "supabase_replication_admin",
+ "supabase_storage_admin",
+ // Managed by extensions
+ "pgsodium_keyholder",
+ "pgsodium_keyiduser",
+ "pgsodium_keymaker",
+ "pgtle_admin",
+ }
+ allowedConfigs = []string{
+ // Ref: https://github.com/supabase/postgres/blob/develop/ansible/files/postgresql_config/supautils.conf.j2#L10
+ "pgaudit.*",
+ "pgrst.*",
+ "session_replication_role",
+ "statement_timeout",
+ "track_io_timing",
+ }
+)
+
+type pgDumpOption struct {
+ schema []string
+ keepComments bool
+ excludeTable []string
+ columnInsert bool
+}
+
+type DumpOptionFunc func(*pgDumpOption)
+
+func WithSchema(schema ...string) DumpOptionFunc {
+ return func(pdo *pgDumpOption) {
+ pdo.schema = schema
+ }
+}
+
+func WithComments(keep bool) DumpOptionFunc {
+ return func(pdo *pgDumpOption) {
+ pdo.keepComments = keep
+ }
+}
+
+func WithColumnInsert(use bool) DumpOptionFunc {
+ return func(pdo *pgDumpOption) {
+ pdo.columnInsert = use
+ }
+}
+
+func WithoutTable(table ...string) DumpOptionFunc {
+ return func(pdo *pgDumpOption) {
+ pdo.excludeTable = table
+ }
+}
+
+func toEnv(config pgconn.Config) []string {
+ return []string{
+ "PGHOST=" + config.Host,
+ fmt.Sprintf("PGPORT=%d", config.Port),
+ "PGUSER=" + config.User,
+ "PGPASSWORD=" + config.Password,
+ "PGDATABASE=" + config.Database,
+ }
+}
+
+type ExecFunc func(context.Context, string, []string, io.Writer) error
+
+func DumpSchema(ctx context.Context, config pgconn.Config, w io.Writer, exec ExecFunc, opts ...DumpOptionFunc) error {
+ var opt pgDumpOption
+ for _, apply := range opts {
+ apply(&opt)
+ }
+ env := toEnv(config)
+ if len(opt.schema) > 0 {
+ // Must append flag because empty string results in error
+ env = append(env, "EXTRA_FLAGS=--schema="+strings.Join(opt.schema, "|"))
+ } else {
+ env = append(env, "EXCLUDED_SCHEMAS="+strings.Join(InternalSchemas, "|"))
+ }
+ if !opt.keepComments {
+ env = append(env, "EXTRA_SED=/^--/d")
+ }
+ return exec(ctx, dumpSchemaScript, env, w)
+}
+
+func DumpData(ctx context.Context, config pgconn.Config, w io.Writer, exec ExecFunc, opts ...DumpOptionFunc) error {
+ var opt pgDumpOption
+ for _, apply := range opts {
+ apply(&opt)
+ }
+ env := toEnv(config)
+ if len(opt.schema) > 0 {
+ env = append(env, "INCLUDED_SCHEMAS="+strings.Join(opt.schema, "|"))
+ } else {
+ env = append(env, "INCLUDED_SCHEMAS=*", "EXCLUDED_SCHEMAS="+strings.Join(excludedSchemas, "|"))
+ }
+ var extraFlags []string
+ if opt.columnInsert {
+ extraFlags = append(extraFlags, "--column-inserts", "--rows-per-insert 100000")
+ }
+ for _, table := range opt.excludeTable {
+ escaped := quoteUpperCase(table)
+ // Use separate flags to avoid error: too many dotted names
+ extraFlags = append(extraFlags, "--exclude-table "+escaped)
+ }
+ if len(extraFlags) > 0 {
+ env = append(env, "EXTRA_FLAGS="+strings.Join(extraFlags, " "))
+ }
+ return exec(ctx, dumpDataScript, env, w)
+}
+
+func quoteUpperCase(table string) string {
+ escaped := strings.ReplaceAll(table, ".", `"."`)
+ return fmt.Sprintf(`"%s"`, escaped)
+}
+
+func DumpRole(ctx context.Context, config pgconn.Config, w io.Writer, exec ExecFunc, opts ...DumpOptionFunc) error {
+ var opt pgDumpOption
+ for _, apply := range opts {
+ apply(&opt)
+ }
+ env := append(toEnv(config),
+ "RESERVED_ROLES="+strings.Join(reservedRoles, "|"),
+ "ALLOWED_CONFIGS="+strings.Join(allowedConfigs, "|"),
+ )
+ if !opt.keepComments {
+ env = append(env, "EXTRA_SED=/^--/d")
+ }
+ return exec(ctx, dumpRoleScript, env, w)
+}
diff --git a/pkg/migration/file.go b/pkg/migration/file.go
index 8dd254326e..fbd4a3b7fd 100644
--- a/pkg/migration/file.go
+++ b/pkg/migration/file.go
@@ -5,6 +5,7 @@ import (
"context"
"crypto/sha256"
"encoding/hex"
+ "fmt"
"io"
"io/fs"
"path/filepath"
@@ -88,11 +89,16 @@ func (m *MigrationFile) ExecBatch(ctx context.Context, conn *pgx.Conn) error {
if i < len(m.Statements) {
stat = m.Statements[i]
}
+ var msg []string
var pgErr *pgconn.PgError
if errors.As(err, &pgErr) {
stat = markError(stat, int(pgErr.Position))
+ if len(pgErr.Detail) > 0 {
+ msg = append(msg, pgErr.Detail)
+ }
}
- return errors.Errorf("%w\nAt statement %d:\n%s", err, i, stat)
+ msg = append(msg, fmt.Sprintf("At statement: %d", i), stat)
+ return errors.Errorf("%w\n%s", err, strings.Join(msg, "\n"))
}
return nil
}
diff --git a/pkg/migration/file_test.go b/pkg/migration/file_test.go
index 15bd5c7511..45bee71b65 100644
--- a/pkg/migration/file_test.go
+++ b/pkg/migration/file_test.go
@@ -75,6 +75,6 @@ func TestMigrationFile(t *testing.T) {
err := migration.ExecBatch(context.Background(), conn.MockClient(t))
// Check error
assert.ErrorContains(t, err, "ERROR: schema \"public\" already exists (SQLSTATE 42P06)")
- assert.ErrorContains(t, err, "At statement 0:\ncreate schema public")
+ assert.ErrorContains(t, err, "At statement: 0\ncreate schema public")
})
}
diff --git a/pkg/migration/queries/drop.sql b/pkg/migration/queries/drop.sql
index ed07c7242d..9ce1c8fbbb 100644
--- a/pkg/migration/queries/drop.sql
+++ b/pkg/migration/queries/drop.sql
@@ -1,6 +1,21 @@
do $$ declare
rec record;
begin
+ -- schemas
+ for rec in
+ select pn.*
+ from pg_namespace pn
+ left join pg_depend pd on pd.objid = pn.oid
+ where pd.deptype is null
+ and not pn.nspname like any(array['information\_schema', 'pg\_%', '\_analytics', '\_realtime', '\_supavisor', 'pgbouncer', 'pgmq', 'pgsodium', 'pgtle', 'supabase\_migrations', 'vault', 'extensions', 'public'])
+ and pn.nspowner::regrole::text != 'supabase_admin'
+ loop
+ -- If an extension uses a schema it doesn't create, dropping the schema will cascade to also
+ -- drop the extension. But if an extension creates its own schema, dropping the schema will
+ -- throw an error. Hence, we drop schemas first while excluding those created by extensions.
+ execute format('drop schema if exists %I cascade', rec.nspname);
+ end loop;
+
-- extensions
for rec in
select *
@@ -42,7 +57,7 @@ begin
execute format('drop materialized view if exists %I.%I cascade', rec.relnamespace::regnamespace::name, rec.relname);
end loop;
- -- tables (cascade to views)
+ -- tables (cascade to dependent objects)
for rec in
select *
from pg_class c
@@ -55,18 +70,17 @@ begin
execute format('drop table if exists %I.%I cascade', rec.relnamespace::regnamespace::name, rec.relname);
end loop;
- -- truncate tables in auth, storage, webhooks, and migrations schema
+ -- truncate tables in auth, webhooks, and migrations schema
for rec in
select *
from pg_class c
where
(c.relnamespace::regnamespace::name = 'auth' and c.relname != 'schema_migrations'
- or c.relnamespace::regnamespace::name = 'storage' and c.relname != 'migrations'
or c.relnamespace::regnamespace::name = 'supabase_functions' and c.relname != 'migrations'
or c.relnamespace::regnamespace::name = 'supabase_migrations')
and c.relkind = 'r'
loop
- execute format('truncate %I.%I restart identity cascade', rec.relnamespace::regnamespace::name, rec.relname);
+ execute format('truncate %I.%I cascade', rec.relnamespace::regnamespace::name, rec.relname);
end loop;
-- sequences
@@ -104,7 +118,7 @@ begin
select *
from pg_publication p
where
- p.pubname not like 'supabase_realtime%' and p.pubname not like 'realtime_messages%'
+ not p.pubname like any(array['supabase\_realtime%', 'realtime\_messages%'])
loop
execute format('drop publication if exists %I', rec.pubname);
end loop;
diff --git a/pkg/migration/queries/list.sql b/pkg/migration/queries/list.sql
index 67f40a3fdd..33b7be176f 100644
--- a/pkg/migration/queries/list.sql
+++ b/pkg/migration/queries/list.sql
@@ -3,11 +3,8 @@
-- Supabase managed schemas
select pn.nspname
from pg_namespace pn
-left join pg_depend pd
- on pd.objid = pn.oid
-join pg_roles r
- on pn.nspowner = r.oid
+left join pg_depend pd on pd.objid = pn.oid
where pd.deptype is null
and not pn.nspname like any($1)
- and r.rolname != 'supabase_admin'
+ and pn.nspowner::regrole::text != 'supabase_admin'
order by pn.nspname
diff --git a/internal/db/dump/templates/dump_data.sh b/pkg/migration/scripts/dump_data.sh
similarity index 97%
rename from internal/db/dump/templates/dump_data.sh
rename to pkg/migration/scripts/dump_data.sh
index 7647665106..c3c5d478bd 100755
--- a/internal/db/dump/templates/dump_data.sh
+++ b/pkg/migration/scripts/dump_data.sh
@@ -22,6 +22,7 @@ echo "SET session_replication_role = replica;
pg_dump \
--data-only \
--quote-all-identifier \
+ --role "postgres" \
--exclude-schema "${EXCLUDED_SCHEMAS:-}" \
--exclude-table "auth.schema_migrations" \
--exclude-table "storage.migrations" \
diff --git a/internal/db/dump/templates/dump_role.sh b/pkg/migration/scripts/dump_role.sh
similarity index 97%
rename from internal/db/dump/templates/dump_role.sh
rename to pkg/migration/scripts/dump_role.sh
index e5c157ba30..cadc8c542c 100755
--- a/internal/db/dump/templates/dump_role.sh
+++ b/pkg/migration/scripts/dump_role.sh
@@ -19,6 +19,7 @@ export PGDATABASE="$PGDATABASE"
# - do not alter membership grants by supabase_admin role
pg_dumpall \
--roles-only \
+ --role "postgres" \
--quote-all-identifier \
--no-role-passwords \
--no-comments \
diff --git a/internal/db/dump/templates/dump_schema.sh b/pkg/migration/scripts/dump_schema.sh
similarity index 94%
rename from internal/db/dump/templates/dump_schema.sh
rename to pkg/migration/scripts/dump_schema.sh
index 71aae48286..ee8407dad0 100755
--- a/internal/db/dump/templates/dump_schema.sh
+++ b/pkg/migration/scripts/dump_schema.sh
@@ -21,9 +21,11 @@ export PGDATABASE="$PGDATABASE"
# - do not include event triggers
# - do not create pgtle schema and extension comments
# - do not create publication "supabase_realtime"
+# - do not set transaction_timeout which requires pg17
pg_dump \
--schema-only \
--quote-all-identifier \
+ --role "postgres" \
--exclude-schema "${EXCLUDED_SCHEMAS:-}" \
${EXTRA_FLAGS:-} \
| sed -E 's/^CREATE SCHEMA "/CREATE SCHEMA IF NOT EXISTS "/' \
@@ -47,6 +49,7 @@ pg_dump \
| sed -E 's/^COMMENT ON EXTENSION (.+)/-- &/' \
| sed -E 's/^CREATE POLICY "cron_job_/-- &/' \
| sed -E 's/^ALTER TABLE "cron"/-- &/' \
+| sed -E 's/^SET transaction_timeout = 0;/-- &/' \
| sed -E "${EXTRA_SED:-}"
# Reset session config generated by pg_dump
diff --git a/pkg/pgxv5/connect.go b/pkg/pgxv5/connect.go
index 218b1b775e..c16f769c8b 100644
--- a/pkg/pgxv5/connect.go
+++ b/pkg/pgxv5/connect.go
@@ -4,12 +4,20 @@ import (
"context"
"fmt"
"os"
+ "strings"
+ "time"
+ "github.com/cenkalti/backoff/v4"
"github.com/go-errors/errors"
"github.com/jackc/pgconn"
"github.com/jackc/pgx/v4"
)
+const (
+ CLI_LOGIN_ROLE = "cli_login_postgres"
+ SET_SESSION_ROLE = "SET SESSION ROLE postgres"
+)
+
// Extends pgx.Connect with support for programmatically overriding parsed config
func Connect(ctx context.Context, connString string, options ...func(*pgx.ConnConfig)) (*pgx.Conn, error) {
// Parse connection url
@@ -20,14 +28,31 @@ func Connect(ctx context.Context, connString string, options ...func(*pgx.ConnCo
config.OnNotice = func(pc *pgconn.PgConn, n *pgconn.Notice) {
fmt.Fprintf(os.Stderr, "%s (%s): %s\n", n.Severity, n.Code, n.Message)
}
+ maxRetries := uint64(0)
+ if strings.HasPrefix(config.User, CLI_LOGIN_ROLE) {
+ config.AfterConnect = func(ctx context.Context, pgconn *pgconn.PgConn) error {
+ return pgconn.Exec(ctx, SET_SESSION_ROLE).Close()
+ }
+ // Add retry to allow enough time for password change to propagate to pooler
+ if len(config.User) > len(CLI_LOGIN_ROLE) {
+ maxRetries = 3
+ }
+ }
// Apply config overrides
for _, op := range options {
op(config)
}
// Connect to database
- conn, err := pgx.ConnectConfig(ctx, config)
- if err != nil {
- return nil, errors.Errorf("failed to connect to postgres: %w", err)
+ connect := func() (*pgx.Conn, error) {
+ conn, err := pgx.ConnectConfig(ctx, config)
+ if err != nil {
+ return nil, errors.Errorf("failed to connect to postgres: %w", err)
+ }
+ return conn, nil
}
- return conn, nil
+ policy := backoff.WithContext(backoff.WithMaxRetries(backoff.NewExponentialBackOff(
+ backoff.WithInitialInterval(3*time.Second)),
+ maxRetries),
+ ctx)
+ return backoff.RetryWithData(connect, policy)
}
diff --git a/pkg/storage/objects_test.go b/pkg/storage/objects_test.go
index a2e132a9b1..423cc765c3 100644
--- a/pkg/storage/objects_test.go
+++ b/pkg/storage/objects_test.go
@@ -9,7 +9,6 @@ import (
"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
- "github.com/supabase/cli/internal/testing/apitest"
"github.com/supabase/cli/pkg/fetcher"
)
@@ -86,7 +85,8 @@ func TestParseFileOptionsContentTypeDetection(t *testing.T) {
err := mockApi.UploadObject(context.Background(), tt.filename, tt.filename, fsys, tt.opts...)
// Assert results
assert.NoError(t, err)
- assert.Empty(t, apitest.ListUnmatchedRequests())
+ assert.Empty(t, gock.Pending())
+ assert.Empty(t, gock.GetUnmatchedRequests())
})
}
}
diff --git a/tools/bumpdoc/main.go b/tools/bumpdoc/main.go
index 55d9de3442..e8309724e6 100644
--- a/tools/bumpdoc/main.go
+++ b/tools/bumpdoc/main.go
@@ -78,7 +78,7 @@ func updateRefDoc(ctx context.Context, path string, stdin io.Reader) error {
if err != nil {
return err
}
- fmt.Fprintln(os.Stderr, "Committed changes to", *resp.Commit.SHA)
+ fmt.Fprintln(os.Stderr, "Committed changes to", *resp.SHA)
// Create pull request
pr := github.NewPullRequest{
Title: &message,
diff --git a/tools/publish/main.go b/tools/publish/main.go
index be2474edb7..c61e68adcf 100644
--- a/tools/publish/main.go
+++ b/tools/publish/main.go
@@ -146,7 +146,7 @@ func updatePackage(ctx context.Context, client *github.Client, repo, path string
if err != nil {
return err
}
- fmt.Fprintln(os.Stderr, "Committed changes to", *resp.Commit.SHA)
+ fmt.Fprintln(os.Stderr, "Committed changes to", *resp.SHA)
// Create pull request
pr := github.NewPullRequest{
Title: &message,
diff --git a/tools/selfhost/main.go b/tools/selfhost/main.go
index 2a5ed65a65..be7886ae91 100644
--- a/tools/selfhost/main.go
+++ b/tools/selfhost/main.go
@@ -61,7 +61,7 @@ func updateSelfHosted(ctx context.Context, branch string) error {
}
func getStableVersions() map[string]string {
- images := append(config.Images.Services(), config.Images.Pg15)
+ images := append(config.Images.Services(), config.Images.Pg)
result := make(map[string]string, len(images))
for _, img := range images {
parts := strings.Split(img, ":")
@@ -111,6 +111,6 @@ func updateComposeVersion(ctx context.Context, client *github.Client, path, ref
if err != nil {
return err
}
- fmt.Fprintln(os.Stderr, "Committed changes to", *resp.Commit.SHA)
+ fmt.Fprintln(os.Stderr, "Committed changes to", *resp.SHA)
return nil
}
diff --git a/tools/tools.go b/tools/tools.go
deleted file mode 100644
index 5aadac6dda..0000000000
--- a/tools/tools.go
+++ /dev/null
@@ -1,14 +0,0 @@
-//go:build tools
-
-package tools
-
-import (
- // Import all required tools so that they can be version controlled via go.mod & go.sum.
- // These imports are tracked a sub package so as to not impact the dependencies of clients of
- // the library.
- // This should be migrated directly to go.mod when the following is complete:
- // https://github.com/golang/go/issues/48429
- _ "github.com/golangci/golangci-lint/cmd/golangci-lint"
- _ "github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen"
- _ "gotest.tools/gotestsum"
-)