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/ci.yml b/.github/workflows/ci.yml index 73a9b684dd..d29506a6fb 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 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 d49eaea6c9..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 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/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..92b28afae9 --- /dev/null +++ b/api/overlay.yaml @@ -0,0 +1,28 @@ +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 diff --git a/cmd/branches.go b/cmd/branches.go index 1c093278b2..481109bdfa 100644 --- a/cmd/branches.go +++ b/cmd/branches.go @@ -48,7 +48,7 @@ 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 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/go.mod b/go.mod index 8282e5e453..7edb9539d5 100644 --- a/go.mod +++ b/go.mod @@ -1,28 +1,24 @@ module github.com/supabase/cli -go 1.24.1 +go 1.24.2 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/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.9.1 github.com/charmbracelet/lipgloss v1.1.0 + github.com/containerd/errdefs v1.0.0 github.com/containers/common v0.63.0 - github.com/docker/cli v28.1.1+incompatible - github.com/docker/docker v28.1.1+incompatible + github.com/docker/cli v28.2.2+incompatible + github.com/docker/docker v28.2.2+incompatible github.com/docker/go-connections v0.5.0 - github.com/docker/go-units v0.5.0 - github.com/ecies/go/v2 v2.0.11 github.com/getsentry/sentry-go v0.33.0 github.com/go-errors/errors v1.5.1 github.com/go-git/go-git/v5 v5.16.0 - github.com/go-viper/mapstructure/v2 v2.2.1 github.com/go-xmlfmt/xmlfmt v1.1.3 - github.com/golang-jwt/jwt/v5 v5.2.2 github.com/golangci/golangci-lint/v2 v2.1.6 github.com/google/go-github/v62 v62.0.0 github.com/google/go-querystring v1.1.0 @@ -30,29 +26,27 @@ require ( 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/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/slack-go/slack v0.17.0 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.20.1 github.com/stretchr/testify v1.10.0 github.com/stripe/pg-schema-diff v0.9.0 + 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 + go.opentelemetry.io/otel v1.36.0 golang.org/x/mod v0.24.0 golang.org/x/oauth2 v0.30.0 golang.org/x/term v0.32.0 - google.golang.org/grpc v1.72.1 + google.golang.org/grpc v1.72.2 gopkg.in/yaml.v3 v3.0.1 gotest.tools/gotestsum v1.12.2 ) @@ -80,6 +74,7 @@ require ( github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect github.com/alingse/nilnesserr v0.2.0 // indirect + github.com/andybalholm/brotli v1.1.1 // 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 @@ -108,6 +103,7 @@ require ( 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/errdefs/pkg v0.3.0 // indirect github.com/containers/storage v1.58.0 // indirect github.com/curioswitch/go-reassign v0.3.0 // indirect github.com/cyphar/filepath-securejoin v0.4.1 // indirect @@ -122,7 +118,9 @@ require ( github.com/dnephin/pflag v1.0.7 // 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.15.8 // indirect github.com/ettle/strcase v0.2.0 // indirect @@ -149,10 +147,12 @@ 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/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.2.2 // 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 @@ -167,7 +167,7 @@ require ( github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gorilla/css v1.0.1 // indirect - github.com/gorilla/websocket v1.5.0 // 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 @@ -181,8 +181,10 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // 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.8.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect @@ -235,6 +237,8 @@ require ( 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/nullable v1.1.0 // indirect + github.com/oapi-codegen/runtime v1.1.1 // 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 @@ -313,10 +317,10 @@ require ( 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/metric v1.36.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/trace v1.36.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 @@ -338,3 +342,5 @@ require ( 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 diff --git a/go.sum b/go.sum index 325985bf63..1388a0c3e4 100644 --- a/go.sum +++ b/go.sum @@ -193,6 +193,10 @@ 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.63.0 h1:ox6vgUYX5TSvt4W+bE36sYBVz/aXMAfRGVAgvknSjBg= @@ -233,13 +237,13 @@ github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZ 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.1.1+incompatible h1:eyUemzeI45DY7eDPuwUcmDyDj1pM98oD5MdSpiItp8k= -github.com/docker/cli v28.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v28.2.2+incompatible h1:qzx5BNUDFqlvyq4AHzdNB7gSyVTmU4cgsyN9SdInc1A= +github.com/docker/cli v28.2.2+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.1.1+incompatible h1:49M11BFLsVO1gxY9UX9p/zwkE/rswggs8AdFmXQw51I= -github.com/docker/docker v28.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v28.2.2+incompatible h1:CjwRSksz8Yo4+RmQ339Dp/D2tGO5JxwYeqtMOEe0LDw= +github.com/docker/docker v28.2.2+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= @@ -336,9 +340,8 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8Wd 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= @@ -440,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= @@ -475,9 +477,8 @@ github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A 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= @@ -738,6 +739,8 @@ 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= @@ -892,8 +895,8 @@ github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+W github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= 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.0 h1:Vqd4GGIcwwgEu80GBs3cXoPPho5bkDGSFnuZbSG0NhA= +github.com/slack-go/slack v0.17.0/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= @@ -1033,8 +1036,8 @@ go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJyS 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/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= +go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= 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= @@ -1043,14 +1046,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/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= +go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= 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/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= +go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= 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= @@ -1458,8 +1461,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.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= -google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= +google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= 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= diff --git a/internal/bootstrap/bootstrap.go b/internal/bootstrap/bootstrap.go index 8310a82fb8..9615256cae 100644 --- a/internal/bootstrap/bootstrap.go +++ b/internal/bootstrap/bootstrap.go @@ -77,7 +77,7 @@ func Run(ctx context.Context, starter StarterTemplate, fsys afero.Fs, options .. return err } // 2. Create project - params := api.V1CreateProjectBodyDto{ + params := api.V1CreateProjectBody{ Name: filepath.Base(workdir), TemplateUrl: &starter.Url, } @@ -152,9 +152,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 { 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/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 f13b755985..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 { 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_test.go b/internal/db/diff/diff_test.go index 71b03223e2..498c88da1b 100644 --- a/internal/db/diff/diff_test.go +++ b/internal/db/diff/diff_test.go @@ -268,7 +268,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()) }) 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/reset/reset.go b/internal/db/reset/reset.go index d3e33e5829..3455ffbc06 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" diff --git a/internal/db/start/start.go b/internal/db/start/start.go index 790e565c95..ff4b237f00 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" @@ -169,7 +169,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 { diff --git a/internal/functions/deploy/bundle.go b/internal/functions/deploy/bundle.go index 1bdc23fb97..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() diff --git a/internal/link/link.go b/internal/link/link.go index 17d9306057..2e5747fd55 100644 --- a/internal/link/link.go +++ b/internal/link/link.go @@ -224,7 +224,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) } @@ -242,11 +242,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 03c33f4bc3..376886ff3b 100644 --- a/internal/link/link_test.go +++ b/internal/link/link_test.go @@ -53,17 +53,15 @@ func TestLinkCommand(t *testing.T) { // 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). @@ -117,7 +115,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) { @@ -131,8 +129,7 @@ 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"). @@ -182,8 +179,7 @@ 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"). @@ -237,14 +233,15 @@ func TestStatusCheck(t *testing.T) { 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 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/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/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 609c395184..da619fe133 100644 --- a/internal/start/start.go +++ b/internal/start/start.go @@ -280,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 { @@ -328,7 +329,9 @@ EOF ); err != nil { return err } - started = append(started, utils.VectorId) + if parsed.Scheme != "npipe" { + started = append(started, utils.VectorId) + } } // Start Kong. @@ -502,6 +505,7 @@ 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), } if utils.Config.Auth.Email.Smtp != nil && utils.Config.Auth.Email.Smtp.Enabled { @@ -666,6 +670,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, diff --git a/internal/utils/docker.go b/internal/utils/docker.go index 792ffb3dbc..1ee1da7ef6 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) diff --git a/internal/utils/flags/db_url.go b/internal/utils/flags/db_url.go index 2a9134c6b4..46aad37342 100644 --- a/internal/utils/flags/db_url.go +++ b/internal/utils/flags/db_url.go @@ -14,7 +14,7 @@ import ( "github.com/spf13/viper" "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" ) type connection int @@ -123,7 +123,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++ { diff --git a/internal/utils/misc.go b/internal/utils/misc.go index d7d9fd33c4..4d58b81c8e 100644 --- a/internal/utils/misc.go +++ b/internal/utils/misc.go @@ -10,6 +10,7 @@ import ( "regexp" "time" + "github.com/containerd/errdefs" "github.com/docker/docker/client" "github.com/go-errors/errors" "github.com/go-git/go-git/v5" @@ -167,7 +168,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) { diff --git a/internal/utils/tenant/database_test.go b/internal/utils/tenant/database_test.go index c6680f2b72..d80ac5cba9 100644 --- a/internal/utils/tenant/database_test.go +++ b/internal/utils/tenant/database_test.go @@ -19,17 +19,12 @@ func TestGetDatabaseVersion(t *testing.T) { 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{ - { - Id: projectRef, - Database: api.V1DatabaseResponse{ - Version: "14.1.0.99", - }, - }, - }) + JSON([]api.V1ProjectWithDatabaseResponse{mockPostgres}) version, err := GetDatabaseVersion(context.Background(), projectRef) @@ -44,17 +39,12 @@ func TestGetDatabaseVersion(t *testing.T) { 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{ - { - Id: "different-project", - Database: api.V1DatabaseResponse{ - Version: "14.1.0.99", - }, - }, - }) + JSON([]api.V1ProjectWithDatabaseResponse{mockPostgres}) version, err := GetDatabaseVersion(context.Background(), projectRef) @@ -72,12 +62,9 @@ func TestGetDatabaseVersion(t *testing.T) { gock.New(utils.DefaultApiHost). Get("/v1/projects"). Reply(http.StatusOK). - JSON([]api.V1ProjectWithDatabaseResponse{ - { - Id: projectRef, - Database: api.V1DatabaseResponse{}, - }, - }) + JSON([]api.V1ProjectWithDatabaseResponse{{ + Id: projectRef, + }}) version, err := GetDatabaseVersion(context.Background(), projectRef) diff --git a/main.go b/main.go index 55a2e9a50b..17774e656d 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 run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=pkg/api/types.cfg.yaml https://api.supabase.green/api/v1-yaml +//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/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..50cd731ea5 100644 --- a/pkg/api/client.gen.go +++ b/pkg/api/client.gen.go @@ -91,21 +91,30 @@ 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) + // V1MergeABranchWithBody request with any body + V1MergeABranchWithBody(ctx context.Context, branchId openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // V1ResetABranch request - V1ResetABranch(ctx context.Context, branchId string, 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) @@ -134,6 +143,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,9 +163,21 @@ type ClientInterface interface { // V1GetProject request V1GetProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetPerformanceAdvisors request + GetPerformanceAdvisors(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSecurityAdvisors request + GetSecurityAdvisors(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) + // GetApiCounts request + GetApiCounts(ctx context.Context, ref string, params *GetApiCountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiRequestsCount request + GetApiRequestsCount(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) @@ -160,15 +187,26 @@ type ClientInterface interface { CreateApiKey(ctx context.Context, ref string, params *CreateApiKeyParams, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteApiKey request - DeleteApiKey(ctx context.Context, ref string, id string, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetApiKey request - GetApiKey(ctx context.Context, ref string, id string, params *GetApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) + GetApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *GetApiKeyParams, 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) + UpdateApiKeyWithBody(ctx context.Context, ref string, id openapi_types.UUID, params *UpdateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody, 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 +219,15 @@ type ClientInterface interface { V1CreateABranch(ctx context.Context, ref string, body V1CreateABranchJSONRequestBody, 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 +236,25 @@ type ClientInterface interface { V1UpdateAuthServiceConfig(ctx context.Context, ref string, body V1UpdateAuthServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListSigningKeysForProject request + ListSigningKeysForProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateSigningKeyForProjectWithBody request with any body + CreateSigningKeyForProjectWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateSigningKeyForProject(ctx context.Context, ref string, body CreateSigningKeyForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteSigningKey request + DeleteSigningKey(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSigningKeyForProject request + GetSigningKeyForProject(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchSigningKeyWithBody request with any body + PatchSigningKeyWithBody(ctx context.Context, ref string, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchSigningKey(ctx context.Context, ref string, id openapi_types.UUID, body PatchSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // V1ListAllSsoProvider request V1ListAllSsoProvider(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -198,15 +264,15 @@ 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) @@ -217,21 +283,21 @@ type ClientInterface interface { CreateTPAForProject(ctx context.Context, ref string, body CreateTPAForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteTPAForProject request - DeleteTPAForProject(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteTPAForProject(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) + GetTPAForProject(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) @@ -277,6 +343,14 @@ type ClientInterface interface { // GetDatabaseMetadata request GetDatabaseMetadata(ctx context.Context, ref string, 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) + // V1RunAQueryWithBody request with any body V1RunAQueryWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -326,6 +400,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 +449,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 +516,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 +528,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 +540,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 +552,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 +564,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) 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 } @@ -501,8 +576,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) 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 } @@ -513,8 +588,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) 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 } @@ -525,8 +600,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) 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 } @@ -537,8 +612,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) 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 } @@ -549,8 +624,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) 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 } @@ -561,8 +636,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) V1AuthorizeUser(ctx context.Context, params *V1AuthorizeUserParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1AuthorizeUserRequest(c.Server, params) if err != nil { return nil, err } @@ -573,8 +648,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) 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 } @@ -585,8 +660,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) V1RevokeToken(ctx context.Context, body V1RevokeTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1RevokeTokenRequest(c.Server, body) if err != nil { return nil, err } @@ -597,8 +672,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) 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 } @@ -609,8 +684,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) V1ExchangeOauthTokenWithFormdataBody(ctx context.Context, body V1ExchangeOauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ExchangeOauthTokenRequestWithFormdataBody(c.Server, body) if err != nil { return nil, err } @@ -621,8 +696,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) V1ListAllOrganizations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListAllOrganizationsRequest(c.Server) if err != nil { return nil, err } @@ -633,8 +708,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) 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 } @@ -645,8 +720,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) V1CreateAnOrganization(ctx context.Context, body V1CreateAnOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1CreateAnOrganizationRequest(c.Server, body) if err != nil { return nil, err } @@ -657,8 +732,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) V1GetAnOrganization(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetAnOrganizationRequest(c.Server, slug) if err != nil { return nil, err } @@ -669,8 +744,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) V1ListOrganizationMembers(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListOrganizationMembersRequest(c.Server, slug) if err != nil { return nil, err } @@ -681,8 +756,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) 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 } @@ -693,8 +768,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) 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 } @@ -705,8 +780,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) V1ListAllProjects(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListAllProjectsRequest(c.Server) if err != nil { return nil, err } @@ -717,8 +792,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) 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 } @@ -729,8 +804,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) V1CreateAProject(ctx context.Context, body V1CreateAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1CreateAProjectRequest(c.Server, body) if err != nil { return nil, err } @@ -741,8 +816,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) V1DeleteAProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1DeleteAProjectRequest(c.Server, ref) if err != nil { return nil, err } @@ -753,8 +828,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) V1GetProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetProjectRequest(c.Server, ref) if err != nil { return nil, err } @@ -765,8 +840,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) GetPerformanceAdvisors(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPerformanceAdvisorsRequest(c.Server, ref) if err != nil { return nil, err } @@ -777,8 +852,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) GetSecurityAdvisors(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSecurityAdvisorsRequest(c.Server, ref) if err != nil { return nil, err } @@ -789,8 +864,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) GetLogs(ctx context.Context, ref string, params *GetLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetLogsRequest(c.Server, ref, params) if err != nil { return nil, err } @@ -801,8 +876,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) GetApiCounts(ctx context.Context, ref string, params *GetApiCountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiCountsRequest(c.Server, ref, params) if err != nil { return nil, err } @@ -813,8 +888,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) GetApiRequestsCount(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiRequestsCountRequest(c.Server, ref) if err != nil { return nil, err } @@ -825,8 +900,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) 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 } @@ -837,8 +912,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) 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) if err != nil { return nil, err } @@ -849,8 +924,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) CreateApiKey(ctx context.Context, ref string, params *CreateApiKeyParams, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateApiKeyRequest(c.Server, ref, params, body) if err != nil { return nil, err } @@ -861,8 +936,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) DeleteApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiKeyRequest(c.Server, ref, id, params) if err != nil { return nil, err } @@ -873,8 +948,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) GetApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *GetApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiKeyRequest(c.Server, ref, id, params) if err != nil { return nil, err } @@ -885,8 +960,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) UpdateApiKeyWithBody(ctx context.Context, ref string, id openapi_types.UUID, params *UpdateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateApiKeyRequestWithBody(c.Server, ref, id, params, contentType, body) if err != nil { return nil, err } @@ -897,8 +972,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) UpdateApiKey(ctx context.Context, ref string, id openapi_types.UUID, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateApiKeyRequest(c.Server, ref, id, params, body) if err != nil { return nil, err } @@ -909,8 +984,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) V1ListProjectAddons(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListProjectAddonsRequest(c.Server, ref) if err != nil { return nil, err } @@ -921,8 +996,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) 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 } @@ -933,8 +1008,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) 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 } @@ -945,8 +1020,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) 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 } @@ -957,8 +1032,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) V1DisablePreviewBranching(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1DisablePreviewBranchingRequest(c.Server, ref) if err != nil { return nil, err } @@ -969,8 +1044,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) V1ListAllBranches(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListAllBranchesRequest(c.Server, ref) if err != nil { return nil, err } @@ -981,8 +1056,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) 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 } @@ -993,8 +1068,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) 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 } @@ -1005,8 +1080,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) V1DeleteProjectClaimToken(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1DeleteProjectClaimTokenRequest(c.Server, ref) if err != nil { return nil, err } @@ -1017,8 +1092,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) V1GetProjectClaimToken(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetProjectClaimTokenRequest(c.Server, ref) if err != nil { return nil, err } @@ -1029,8 +1104,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) V1CreateProjectClaimToken(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1CreateProjectClaimTokenRequest(c.Server, ref) if err != nil { return nil, err } @@ -1041,8 +1116,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) V1GetAuthServiceConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetAuthServiceConfigRequest(c.Server, ref) if err != nil { return nil, err } @@ -1053,8 +1128,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) 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 } @@ -1065,8 +1140,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) 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 } @@ -1077,8 +1152,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) ListSigningKeysForProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSigningKeysForProjectRequest(c.Server, ref) if err != nil { return nil, err } @@ -1089,8 +1164,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) CreateSigningKeyForProjectWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSigningKeyForProjectRequestWithBody(c.Server, ref, contentType, body) if err != nil { return nil, err } @@ -1101,8 +1176,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) CreateSigningKeyForProject(ctx context.Context, ref string, body CreateSigningKeyForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateSigningKeyForProjectRequest(c.Server, ref, body) if err != nil { return nil, err } @@ -1113,8 +1188,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) DeleteSigningKey(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSigningKeyRequest(c.Server, ref, id) if err != nil { return nil, err } @@ -1125,8 +1200,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) GetSigningKeyForProject(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSigningKeyForProjectRequest(c.Server, ref, id) if err != nil { return nil, err } @@ -1137,8 +1212,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) PatchSigningKeyWithBody(ctx context.Context, ref string, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchSigningKeyRequestWithBody(c.Server, ref, id, contentType, body) if err != nil { return nil, err } @@ -1149,8 +1224,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) PatchSigningKey(ctx context.Context, ref string, id openapi_types.UUID, body PatchSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchSigningKeyRequest(c.Server, ref, id, body) if err != nil { return nil, err } @@ -1161,8 +1236,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) V1ListAllSsoProvider(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListAllSsoProviderRequest(c.Server, ref) if err != nil { return nil, err } @@ -1173,8 +1248,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) 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 } @@ -1185,8 +1260,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) 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 } @@ -1197,8 +1272,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) 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 } @@ -1209,8 +1284,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) 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 } @@ -1221,8 +1296,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) 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 } @@ -1233,8 +1308,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) 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 } @@ -1245,8 +1320,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) ListTPAForProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTPAForProjectRequest(c.Server, ref) if err != nil { return nil, err } @@ -1257,8 +1332,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) CreateTPAForProjectWithBody(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTPAForProjectRequestWithBody(c.Server, ref, contentType, body) if err != nil { return nil, err } @@ -1269,8 +1344,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) CreateTPAForProject(ctx context.Context, ref string, body CreateTPAForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTPAForProjectRequest(c.Server, ref, body) if err != nil { return nil, err } @@ -1281,8 +1356,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) DeleteTPAForProject(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTPAForProjectRequest(c.Server, ref, tpaId) if err != nil { return nil, err } @@ -1293,8 +1368,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) GetTPAForProject(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTPAForProjectRequest(c.Server, ref, tpaId) if err != nil { return nil, err } @@ -1305,8 +1380,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) V1GetProjectPgbouncerConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetProjectPgbouncerConfigRequest(c.Server, ref) if err != nil { return nil, err } @@ -1317,8 +1392,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) V1GetPoolerConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetPoolerConfigRequest(c.Server, ref) if err != nil { return nil, err } @@ -1329,8 +1404,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) 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 } @@ -1341,8 +1416,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) 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 } @@ -1353,8 +1428,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) V1GetPostgresConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetPostgresConfigRequest(c.Server, ref) if err != nil { return nil, err } @@ -1365,8 +1440,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) 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 } @@ -1377,8 +1452,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) 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 } @@ -1389,8 +1464,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) V1GetStorageConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetStorageConfigRequest(c.Server, ref) if err != nil { return nil, err } @@ -1401,8 +1476,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) 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 } @@ -1413,8 +1488,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) 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 } @@ -1425,9 +1500,9 @@ 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) - if err != nil { +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 } req = req.WithContext(ctx) @@ -1437,8 +1512,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) V1GetHostnameConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetHostnameConfigRequest(c.Server, ref) if err != nil { return nil, err } @@ -1449,8 +1524,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) V1ActivateCustomHostname(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ActivateCustomHostnameRequest(c.Server, ref) if err != nil { return nil, err } @@ -1461,8 +1536,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) 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 } @@ -1473,8 +1548,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) 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 } @@ -1485,8 +1560,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) V1VerifyDnsConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1VerifyDnsConfigRequest(c.Server, ref) if err != nil { return nil, err } @@ -1497,8 +1572,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) V1ListAllBackups(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListAllBackupsRequest(c.Server, ref) if err != nil { return nil, err } @@ -1509,8 +1584,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) 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 } @@ -1521,8 +1596,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) 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 } @@ -1533,8 +1608,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) GetDatabaseMetadata(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDatabaseMetadataRequest(c.Server, ref) if err != nil { return nil, err } @@ -1545,8 +1620,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) V1ListMigrationHistory(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListMigrationHistoryRequest(c.Server, ref) if err != nil { return nil, err } @@ -1557,8 +1632,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) 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 } @@ -1569,8 +1644,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) 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 } @@ -1581,8 +1656,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) 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 } @@ -1593,8 +1668,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) 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 } @@ -1605,8 +1680,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) V1EnableDatabaseWebhook(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1EnableDatabaseWebhookRequest(c.Server, ref) if err != nil { return nil, err } @@ -1617,8 +1692,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) V1ListAllFunctions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListAllFunctionsRequest(c.Server, ref) if err != nil { return nil, err } @@ -1629,8 +1704,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) 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 } @@ -1641,8 +1716,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) 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 } @@ -1653,8 +1728,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) 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 } @@ -1665,8 +1740,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) 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 } @@ -1677,8 +1752,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) 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 } @@ -1689,8 +1764,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) 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 } @@ -1701,8 +1776,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) 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 } @@ -1713,8 +1788,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) 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 } @@ -1725,8 +1800,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) 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 } @@ -1737,8 +1812,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) 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 } @@ -1749,8 +1824,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) 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 } @@ -1761,8 +1836,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) 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 } @@ -1773,8 +1848,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) 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 } @@ -1785,8 +1860,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) V1ListAllNetworkBans(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListAllNetworkBansRequest(c.Server, ref) if err != nil { return nil, err } @@ -1797,8 +1872,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) V1ListAllNetworkBansEnriched(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListAllNetworkBansEnrichedRequest(c.Server, ref) if err != nil { return nil, err } @@ -1809,8 +1884,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) V1GetNetworkRestrictions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetNetworkRestrictionsRequest(c.Server, ref) if err != nil { return nil, err } @@ -1821,8 +1896,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) 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 } @@ -1833,8 +1908,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) 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 } @@ -1845,8 +1920,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) V1PauseAProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1PauseAProjectRequest(c.Server, ref) if err != nil { return nil, err } @@ -1857,8 +1932,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) V1GetPgsodiumConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetPgsodiumConfigRequest(c.Server, ref) if err != nil { return nil, err } @@ -1869,8 +1944,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) 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 } @@ -1881,8 +1956,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) 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 } @@ -1893,8 +1968,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) V1GetPostgrestServiceConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetPostgrestServiceConfigRequest(c.Server, ref) if err != nil { return nil, err } @@ -1905,8 +1980,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) 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 } @@ -1917,8 +1992,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) 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 } @@ -1929,8 +2004,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) 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 } @@ -1941,8 +2016,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) 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 } @@ -1953,8 +2028,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) 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 } @@ -1965,8 +2040,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) 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 } @@ -1977,157 +2052,332 @@ 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) V1GetReadonlyModeStatus(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetReadonlyModeStatusRequest(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) V1DisableReadonlyModeTemporarily(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1DisableReadonlyModeTemporarilyRequest(c.Server, ref) 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) V1ListAvailableRestoreVersions(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListAvailableRestoreVersionsRequest(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) } -// 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) V1RestoreAProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1RestoreAProjectRequest(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) 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/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) 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) } -// 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) 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 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 +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 + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam0 string +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 = 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, "branch_id", runtime.ParamLocationPath, branchId) +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 } + 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) V1GetSslEnforcementConfig(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetSslEnforcementConfigRequest(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) +} - operationPath := fmt.Sprintf("/v1/branches/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath +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 + } + 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) 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 = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req, err := http.NewRequest("PATCH", queryURL.String(), body) +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 } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - req.Header.Add("Content-Type", contentType) +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 = 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) 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 + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -// NewV1PushABranchRequest generates requests for V1PushABranch -func NewV1PushABranchRequest(server string, branchId string) (*http.Request, error) { - var err error +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 + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - var pathParam0 string +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 = 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, "branch_id", runtime.ParamLocationPath, branchId) +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 + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + 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) 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) 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) +} - operationPath := fmt.Sprintf("/v1/branches/%s/push", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath +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) +} - queryURL, err := serverURL.Parse(operationPath) +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) +} - req, err := http.NewRequest("POST", queryURL.String(), nil) +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) +} - return req, nil +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) } -// NewV1ResetABranchRequest generates requests for V1ResetABranch -func NewV1ResetABranchRequest(server string, branchId string) (*http.Request, error) { +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) +} + +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) +} + +// NewV1DeleteABranchRequest generates requests for V1DeleteABranch +func NewV1DeleteABranchRequest(server string, branchId openapi_types.UUID) (*http.Request, error) { var err error var pathParam0 string @@ -2142,7 +2392,7 @@ func NewV1ResetABranchRequest(server string, branchId string) (*http.Request, er return nil, err } - operationPath := fmt.Sprintf("/v1/branches/%s/reset", pathParam0) + operationPath := fmt.Sprintf("/v1/branches/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2152,7 +2402,7 @@ func NewV1ResetABranchRequest(server string, branchId string) (*http.Request, er 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 } @@ -2160,16 +2410,23 @@ func NewV1ResetABranchRequest(server string, branchId string) (*http.Request, er return req, nil } -// NewV1AuthorizeUserRequest generates requests for V1AuthorizeUser -func NewV1AuthorizeUserRequest(server string, params *V1AuthorizeUserParams) (*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, "branch_id", runtime.ParamLocationPath, branchId) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/oauth/authorize") + operationPath := fmt.Sprintf("/v1/branches/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2179,25 +2436,240 @@ func NewV1AuthorizeUserRequest(server string, params *V1AuthorizeUserParams) (*h return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - 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) - } - } - } + return req, nil +} - 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 +// 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 NewV1UpdateABranchConfigRequestWithBody(server, branchId, "application/json", bodyReader) +} + +// 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, "branch_id", runtime.ParamLocationPath, branchId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/branches/%s", 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 +} + +// 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) +} + +// 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 + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "branch_id", runtime.ParamLocationPath, branchId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/branches/%s/merge", 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 +} + +// 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 NewV1PushABranchRequestWithBody(server, branchId, "application/json", bodyReader) +} + +// 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, "branch_id", runtime.ParamLocationPath, branchId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/branches/%s/push", 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 +} + +// 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, "branch_id", runtime.ParamLocationPath, branchId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/branches/%s/reset", 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 +} + +// NewV1AuthorizeUserRequest generates requests for V1AuthorizeUser +func NewV1AuthorizeUserRequest(server string, params *V1AuthorizeUserParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/oauth/authorize") + 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, "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 { @@ -2524,16 +2996,30 @@ func NewV1ListOrganizationMembersRequest(server string, slug string) (*http.Requ return req, nil } -// NewV1ListAllProjectsRequest generates requests for V1ListAllProjects -func NewV1ListAllProjectsRequest(server string) (*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, "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 + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/projects") + operationPath := fmt.Sprintf("/v1/organizations/%s/project-claim/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2551,27 +3037,30 @@ func NewV1ListAllProjectsRequest(server string) (*http.Request, error) { return req, nil } -// 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) +// 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, "slug", runtime.ParamLocationPath, slug) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewV1CreateAProjectRequestWithBody(server, "application/json", bodyReader) -} -// 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 pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "token", runtime.ParamLocationPath, token) + if err != nil { + return nil, err + } serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/projects") + operationPath := fmt.Sprintf("/v1/organizations/%s/project-claim/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2581,23 +3070,88 @@ func NewV1CreateAProjectRequestWithBody(server string, contentType string, body return nil, err } - req, err := http.NewRequest("POST", 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 } -// NewV1DeleteAProjectRequest generates requests for V1DeleteAProject -func NewV1DeleteAProjectRequest(server string, ref string) (*http.Request, error) { +// NewV1ListAllProjectsRequest generates requests for V1ListAllProjects +func NewV1ListAllProjectsRequest(server string) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projects") + 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 +} + +// 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 NewV1CreateAProjectRequestWithBody(server, "application/json", bodyReader) +} + +// 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) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projects") + 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 +} + +// 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) if err != nil { return nil, err } @@ -2659,6 +3213,74 @@ func NewV1GetProjectRequest(server string, ref string) (*http.Request, error) { return req, nil } +// NewGetPerformanceAdvisorsRequest generates requests for GetPerformanceAdvisors +func NewGetPerformanceAdvisorsRequest(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/advisors/performance", 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 +} + +// NewGetSecurityAdvisorsRequest generates requests for GetSecurityAdvisors +func NewGetSecurityAdvisorsRequest(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/advisors/security", 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 +} + // NewGetLogsRequest generates requests for GetLogs func NewGetLogsRequest(server string, ref string, params *GetLogsParams) (*http.Request, error) { var err error @@ -2688,9 +3310,9 @@ func NewGetLogsRequest(server string, ref string, params *GetLogsParams) (*http. if params != nil { queryValues := queryURL.Query() - if params.IsoTimestampEnd != nil { + if params.Sql != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "iso_timestamp_end", runtime.ParamLocationQuery, *params.IsoTimestampEnd); err != 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 @@ -2720,9 +3342,9 @@ func NewGetLogsRequest(server string, ref string, params *GetLogsParams) (*http. } - if params.Sql != nil { + if params.IsoTimestampEnd != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sql", runtime.ParamLocationQuery, *params.Sql); err != 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 @@ -2747,8 +3369,8 @@ 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) { +// NewGetApiCountsRequest generates requests for GetApiCounts +func NewGetApiCountsRequest(server string, ref string, params *GetApiCountsParams) (*http.Request, error) { var err error var pathParam0 string @@ -2763,7 +3385,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/projects/%s/analytics/endpoints/usage.api-counts", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2776,16 +3398,20 @@ func NewV1GetProjectApiKeysRequest(server string, ref string, params *V1GetProje 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.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() @@ -2799,19 +3425,8 @@ 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) { - 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) -} - -// 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) { +// NewGetApiRequestsCountRequest generates requests for GetApiRequestsCount +func NewGetApiRequestsCountRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -2826,7 +3441,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/projects/%s/analytics/endpoints/usage.api-requests-count", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2836,36 +3451,16 @@ 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("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewDeleteApiKeyRequest generates requests for DeleteApiKey -func NewDeleteApiKeyRequest(server string, ref string, id string, params *DeleteApiKeyParams) (*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 @@ -2875,19 +3470,12 @@ func NewDeleteApiKeyRequest(server string, ref string, id string, params *Delete 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/api-keys/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/projects/%s/api-keys", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2900,22 +3488,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.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("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -2923,20 +3515,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) +// NewCreateApiKeyRequest calls the generic CreateApiKey builder with application/json body +func NewCreateApiKeyRequest(server string, ref string, params *CreateApiKeyParams, body CreateApiKeyJSONRequestBody) (*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) +} - var pathParam1 string +// 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) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) if err != nil { return nil, err } @@ -2946,7 +3542,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/projects/%s/api-keys", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2959,42 +3555,100 @@ func NewGetApiKeyRequest(server string, ref string, id string, params *GetApiKey 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.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) + 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) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewDeleteApiKeyRequest generates requests for DeleteApiKey +func NewDeleteApiKeyRequest(server string, ref string, id openapi_types.UUID, params *DeleteApiKeyParams) (*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 } - bodyReader = bytes.NewReader(buf) - return NewUpdateApiKeyRequestWithBody(server, ref, id, params, "application/json", bodyReader) + + 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/api-keys/%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.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("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil } -// 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) { +// NewGetApiKeyRequest generates requests for GetApiKey +func NewGetApiKeyRequest(server string, ref string, id openapi_types.UUID, params *GetApiKeyParams) (*http.Request, error) { var err error var pathParam0 string @@ -3029,33 +3683,46 @@ func NewUpdateApiKeyRequestWithBody(server string, ref string, id string, params 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.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) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewV1DisablePreviewBranchingRequest generates requests for V1DisablePreviewBranching -func NewV1DisablePreviewBranchingRequest(server string, ref string) (*http.Request, error) { +// NewUpdateApiKeyRequest calls the generic UpdateApiKey builder with application/json body +func NewUpdateApiKeyRequest(server string, ref string, id openapi_types.UUID, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody) (*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) +} + +// NewUpdateApiKeyRequestWithBody generates requests for UpdateApiKey with any type of body +func NewUpdateApiKeyRequestWithBody(server string, ref string, id openapi_types.UUID, params *UpdateApiKeyParams, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -3065,12 +3732,19 @@ func NewV1DisablePreviewBranchingRequest(server string, ref string) (*http.Reque 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/branches", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/api-keys/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3080,16 +3754,40 @@ func NewV1DisablePreviewBranchingRequest(server string, ref string) (*http.Reque return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + 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 } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewV1ListAllBranchesRequest generates requests for V1ListAllBranches -func NewV1ListAllBranchesRequest(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 @@ -3104,7 +3802,7 @@ func NewV1ListAllBranchesRequest(server string, ref string) (*http.Request, erro return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/billing/addons", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3122,19 +3820,19 @@ func NewV1ListAllBranchesRequest(server string, ref string) (*http.Request, erro return req, nil } -// NewV1CreateABranchRequest calls the generic V1CreateABranch builder with application/json body -func NewV1CreateABranchRequest(server string, ref string, body V1CreateABranchJSONRequestBody) (*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 NewV1CreateABranchRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1ApplyProjectAddonRequestWithBody(server, ref, "application/json", bodyReader) } -// NewV1CreateABranchRequestWithBody generates requests for V1CreateABranch with any type of body -func NewV1CreateABranchRequestWithBody(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 @@ -3149,7 +3847,7 @@ func NewV1CreateABranchRequestWithBody(server string, ref string, contentType st return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/billing/addons", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3159,7 +3857,7 @@ func NewV1CreateABranchRequestWithBody(server string, ref string, contentType st 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 } @@ -3169,8 +3867,8 @@ func NewV1CreateABranchRequestWithBody(server string, ref string, contentType st return req, nil } -// NewV1GetAuthServiceConfigRequest generates requests for V1GetAuthServiceConfig -func NewV1GetAuthServiceConfigRequest(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 @@ -3180,12 +3878,19 @@ func NewV1GetAuthServiceConfigRequest(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/config/auth", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/billing/addons/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3195,7 +3900,7 @@ func NewV1GetAuthServiceConfigRequest(server string, ref string) (*http.Request, 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 } @@ -3203,19 +3908,8 @@ func NewV1GetAuthServiceConfigRequest(server string, ref string) (*http.Request, return req, nil } -// 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 NewV1UpdateAuthServiceConfigRequestWithBody(server, ref, "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) { +// NewV1DisablePreviewBranchingRequest generates requests for V1DisablePreviewBranching +func NewV1DisablePreviewBranchingRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -3230,7 +3924,7 @@ func NewV1UpdateAuthServiceConfigRequestWithBody(server string, ref string, cont return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/config/auth", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3240,18 +3934,16 @@ func NewV1UpdateAuthServiceConfigRequestWithBody(server string, ref string, cont return nil, err } - req, err := http.NewRequest("PATCH", 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 } -// NewV1ListAllSsoProviderRequest generates requests for V1ListAllSsoProvider -func NewV1ListAllSsoProviderRequest(server string, ref string) (*http.Request, error) { +// NewV1ListAllBranchesRequest generates requests for V1ListAllBranches +func NewV1ListAllBranchesRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -3266,7 +3958,7 @@ func NewV1ListAllSsoProviderRequest(server string, ref string) (*http.Request, e return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3284,19 +3976,19 @@ 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) { +// 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 NewV1CreateASsoProviderRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1CreateABranchRequestWithBody(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) { +// 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 @@ -3311,7 +4003,7 @@ func NewV1CreateASsoProviderRequestWithBody(server string, ref string, contentTy return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/branches", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3331,8 +4023,8 @@ 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) { +// NewV1DeleteProjectClaimTokenRequest generates requests for V1DeleteProjectClaimToken +func NewV1DeleteProjectClaimTokenRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -3342,19 +4034,12 @@ func NewV1DeleteASsoProviderRequest(server string, ref string, providerId 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/config/auth/sso/providers/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/projects/%s/claim-token", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3372,8 +4057,8 @@ 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) { +// NewV1GetProjectClaimTokenRequest generates requests for V1GetProjectClaimToken +func NewV1GetProjectClaimTokenRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -3383,19 +4068,12 @@ func NewV1GetASsoProviderRequest(server string, ref string, providerId 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/config/auth/sso/providers/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/projects/%s/claim-token", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3413,19 +4091,8 @@ 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) { +// NewV1CreateProjectClaimTokenRequest generates requests for V1CreateProjectClaimToken +func NewV1CreateProjectClaimTokenRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -3435,19 +4102,12 @@ func NewV1UpdateASsoProviderRequestWithBody(server string, ref string, providerI 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/config/auth/sso/providers/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/projects/%s/claim-token", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3457,18 +4117,16 @@ func NewV1UpdateASsoProviderRequestWithBody(server string, ref string, providerI return nil, err } - req, err := http.NewRequest("PUT", 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 } -// NewListTPAForProjectRequest generates requests for ListTPAForProject -func NewListTPAForProjectRequest(server string, ref string) (*http.Request, error) { +// NewV1GetAuthServiceConfigRequest generates requests for V1GetAuthServiceConfig +func NewV1GetAuthServiceConfigRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -3483,7 +4141,7 @@ 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/projects/%s/config/auth", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3501,19 +4159,19 @@ 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) { +// 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 NewCreateTPAForProjectRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1UpdateAuthServiceConfigRequestWithBody(server, ref, "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) { +// 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 @@ -3528,7 +4186,7 @@ func NewCreateTPAForProjectRequestWithBody(server string, ref string, contentTyp return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/auth", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3538,7 +4196,7 @@ func NewCreateTPAForProjectRequestWithBody(server string, ref string, contentTyp 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 } @@ -3548,8 +4206,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) { +// NewListSigningKeysForProjectRequest generates requests for ListSigningKeysForProject +func NewListSigningKeysForProjectRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -3559,19 +4217,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/config/auth/signing-keys", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3581,7 +4232,7 @@ func NewDeleteTPAForProjectRequest(server string, ref string, tpaId string) (*ht 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 } @@ -3589,20 +4240,24 @@ 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) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) +// NewCreateSigningKeyForProjectRequest calls the generic CreateSigningKeyForProject builder with application/json body +func NewCreateSigningKeyForProjectRequest(server string, ref string, body CreateSigningKeyForProjectJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } + bodyReader = bytes.NewReader(buf) + return NewCreateSigningKeyForProjectRequestWithBody(server, ref, "application/json", bodyReader) +} - var pathParam1 string +// NewCreateSigningKeyForProjectRequestWithBody generates requests for CreateSigningKeyForProject with any type of body +func NewCreateSigningKeyForProjectRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) { + var err error - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "tpa_id", runtime.ParamLocationPath, tpaId) + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) if err != nil { return nil, err } @@ -3612,7 +4267,7 @@ func NewGetTPAForProjectRequest(server string, ref string, tpaId string) (*http. return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3622,16 +4277,18 @@ func NewGetTPAForProjectRequest(server string, ref string, tpaId string) (*http. 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 } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewV1GetProjectPgbouncerConfigRequest generates requests for V1GetProjectPgbouncerConfig -func NewV1GetProjectPgbouncerConfigRequest(server string, ref string) (*http.Request, error) { +// NewDeleteSigningKeyRequest generates requests for DeleteSigningKey +func NewDeleteSigningKeyRequest(server string, ref string, id openapi_types.UUID) (*http.Request, error) { var err error var pathParam0 string @@ -3641,12 +4298,19 @@ func NewV1GetProjectPgbouncerConfigRequest(server string, ref string) (*http.Req 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/config/database/pgbouncer", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3656,7 +4320,7 @@ func NewV1GetProjectPgbouncerConfigRequest(server string, ref string) (*http.Req 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 } @@ -3664,8 +4328,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) { +// NewGetSigningKeyForProjectRequest generates requests for GetSigningKeyForProject +func NewGetSigningKeyForProjectRequest(server string, ref string, id openapi_types.UUID) (*http.Request, error) { var err error var pathParam0 string @@ -3675,12 +4339,19 @@ func NewV1GetSupavisorConfigRequest(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/config/database/pooler", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3698,19 +4369,19 @@ 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) { +// NewPatchSigningKeyRequest calls the generic PatchSigningKey builder with application/json body +func NewPatchSigningKeyRequest(server string, ref string, id openapi_types.UUID, body PatchSigningKeyJSONRequestBody) (*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) + return NewPatchSigningKeyRequestWithBody(server, ref, id, "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) { +// NewPatchSigningKeyRequestWithBody generates requests for PatchSigningKey with any type of body +func NewPatchSigningKeyRequestWithBody(server string, ref string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -3720,12 +4391,19 @@ func NewV1UpdateSupavisorConfigRequestWithBody(server string, ref string, conten 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/config/database/pooler", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/signing-keys/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3745,8 +4423,8 @@ func NewV1UpdateSupavisorConfigRequestWithBody(server string, ref string, conten return req, nil } -// NewV1GetPostgresConfigRequest generates requests for V1GetPostgresConfig -func NewV1GetPostgresConfigRequest(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 @@ -3761,7 +4439,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/config/auth/sso/providers", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3779,19 +4457,19 @@ 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) { +// 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 NewV1UpdatePostgresConfigRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1CreateASsoProviderRequestWithBody(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) { +// 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 @@ -3806,7 +4484,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/config/auth/sso/providers", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3816,7 +4494,7 @@ func NewV1UpdatePostgresConfigRequestWithBody(server string, ref string, content return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -3826,8 +4504,8 @@ func NewV1UpdatePostgresConfigRequestWithBody(server string, ref string, content return req, nil } -// NewV1GetStorageConfigRequest generates requests for V1GetStorageConfig -func NewV1GetStorageConfigRequest(server string, ref string) (*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 @@ -3837,12 +4515,19 @@ func NewV1GetStorageConfigRequest(server string, ref string) (*http.Request, err 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/config/storage", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3852,7 +4537,7 @@ func NewV1GetStorageConfigRequest(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 } @@ -3860,19 +4545,8 @@ 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) { - 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) -} - -// NewV1UpdateStorageConfigRequestWithBody generates requests for V1UpdateStorageConfig with any type of body -func NewV1UpdateStorageConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*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 @@ -3882,12 +4556,19 @@ func NewV1UpdateStorageConfigRequestWithBody(server string, ref string, contentT 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/config/storage", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/sso/providers/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3897,57 +4578,39 @@ func NewV1UpdateStorageConfigRequestWithBody(server string, ref string, contentT return nil, err } - req, err := http.NewRequest("PATCH", 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 } -// 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) +// 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 NewV1UpdateASsoProviderRequestWithBody(server, ref, providerId, "application/json", bodyReader) +} - operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } +// 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 - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + var pathParam0 string - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) if err != nil { return nil, err } - return req, nil -} - -// NewV1GetHostnameConfigRequest generates requests for V1GetHostnameConfig -func NewV1GetHostnameConfigRequest(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, "provider_id", runtime.ParamLocationPath, providerId) if err != nil { return nil, err } @@ -3957,7 +4620,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/config/auth/sso/providers/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3967,16 +4630,18 @@ func NewV1GetHostnameConfigRequest(server string, ref string) (*http.Request, er return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewV1ActivateCustomHostnameRequest generates requests for V1ActivateCustomHostname -func NewV1ActivateCustomHostnameRequest(server string, ref string) (*http.Request, error) { +// NewListTPAForProjectRequest generates requests for ListTPAForProject +func NewListTPAForProjectRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -3991,7 +4656,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/config/auth/third-party-auth", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4001,7 +4666,7 @@ func NewV1ActivateCustomHostnameRequest(server string, ref string) (*http.Reques 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 } @@ -4009,19 +4674,19 @@ func NewV1ActivateCustomHostnameRequest(server string, ref string) (*http.Reques return req, nil } -// NewV1UpdateHostnameConfigRequest calls the generic V1UpdateHostnameConfig builder with application/json body -func NewV1UpdateHostnameConfigRequest(server string, ref string, body V1UpdateHostnameConfigJSONRequestBody) (*http.Request, error) { +// NewCreateTPAForProjectRequest calls the generic CreateTPAForProject builder with application/json body +func NewCreateTPAForProjectRequest(server string, ref string, body CreateTPAForProjectJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewV1UpdateHostnameConfigRequestWithBody(server, ref, "application/json", bodyReader) + return NewCreateTPAForProjectRequestWithBody(server, ref, "application/json", bodyReader) } -// NewV1UpdateHostnameConfigRequestWithBody generates requests for V1UpdateHostnameConfig with any type of body -func NewV1UpdateHostnameConfigRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateTPAForProjectRequestWithBody generates requests for CreateTPAForProject with any type of body +func NewCreateTPAForProjectRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -4036,7 +4701,7 @@ func NewV1UpdateHostnameConfigRequestWithBody(server string, ref string, content return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/custom-hostname/initialize", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4056,8 +4721,8 @@ func NewV1UpdateHostnameConfigRequestWithBody(server string, ref string, content return req, nil } -// NewV1VerifyDnsConfigRequest generates requests for V1VerifyDnsConfig -func NewV1VerifyDnsConfigRequest(server string, ref string) (*http.Request, error) { +// NewDeleteTPAForProjectRequest generates requests for DeleteTPAForProject +func NewDeleteTPAForProjectRequest(server string, ref string, tpaId openapi_types.UUID) (*http.Request, error) { var err error var pathParam0 string @@ -4067,12 +4732,19 @@ func NewV1VerifyDnsConfigRequest(server string, ref string) (*http.Request, erro 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/custom-hostname/reverify", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4082,7 +4754,7 @@ func NewV1VerifyDnsConfigRequest(server string, ref string) (*http.Request, erro 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 } @@ -4090,8 +4762,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) { +// NewGetTPAForProjectRequest generates requests for GetTPAForProject +func NewGetTPAForProjectRequest(server string, ref string, tpaId openapi_types.UUID) (*http.Request, error) { var err error var pathParam0 string @@ -4101,12 +4773,19 @@ func NewV1ListAllBackupsRequest(server string, ref string) (*http.Request, error 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/database/backups", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/auth/third-party-auth/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4124,19 +4803,8 @@ 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) { - 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) { +// NewV1GetProjectPgbouncerConfigRequest generates requests for V1GetProjectPgbouncerConfig +func NewV1GetProjectPgbouncerConfigRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -4151,7 +4819,7 @@ func NewV1RestorePitrBackupRequestWithBody(server string, ref string, contentTyp return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/database/backups/restore-pitr", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/database/pgbouncer", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4161,18 +4829,16 @@ func NewV1RestorePitrBackupRequestWithBody(server string, ref string, contentTyp 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 } -// NewGetDatabaseMetadataRequest generates requests for GetDatabaseMetadata -func NewGetDatabaseMetadataRequest(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 @@ -4187,7 +4853,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/config/database/pooler", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4205,19 +4871,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) { +// 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 NewV1RunAQueryRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1UpdatePoolerConfigRequestWithBody(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) { +// 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 @@ -4232,7 +4898,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/config/database/pooler", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4242,7 +4908,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 +4918,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) { +// NewV1GetPostgresConfigRequest generates requests for V1GetPostgresConfig +func NewV1GetPostgresConfigRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -4268,7 +4934,7 @@ func NewV1EnableDatabaseWebhookRequest(server string, ref string) (*http.Request return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/database/webhooks/enable", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/database/postgres", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4278,7 +4944,7 @@ func NewV1EnableDatabaseWebhookRequest(server string, ref string) (*http.Request 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 } @@ -4286,8 +4952,19 @@ 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) { +// 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) { var err error var pathParam0 string @@ -4302,7 +4979,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/config/database/postgres", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4312,27 +4989,18 @@ func NewV1ListAllFunctionsRequest(server string, ref string) (*http.Request, err return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// 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) + return req, nil } -// 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) { +// NewV1GetStorageConfigRequest generates requests for V1GetStorageConfig +func NewV1GetStorageConfigRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -4347,7 +5015,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/config/storage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4357,147 +5025,27 @@ func NewV1CreateAFunctionRequestWithBody(server string, ref string, params *V1Cr 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("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 } -// NewV1BulkUpdateFunctionsRequest calls the generic V1BulkUpdateFunctions builder with application/json body -func NewV1BulkUpdateFunctionsRequest(server string, ref string, body V1BulkUpdateFunctionsJSONRequestBody) (*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 NewV1BulkUpdateFunctionsRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1UpdateStorageConfigRequestWithBody(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) { +// 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 @@ -4512,7 +5060,7 @@ func NewV1BulkUpdateFunctionsRequestWithBody(server string, ref string, contentT return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/functions", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/config/storage", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4522,7 +5070,7 @@ func NewV1BulkUpdateFunctionsRequestWithBody(server string, ref string, contentT 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 } @@ -4532,8 +5080,8 @@ func NewV1BulkUpdateFunctionsRequestWithBody(server string, ref string, contentT 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) { +// NewV1DeleteHostnameConfigRequest generates requests for V1DeleteHostnameConfig +func NewV1DeleteHostnameConfigRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -4548,7 +5096,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/custom-hostname", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4558,56 +5106,16 @@ func NewV1DeployAFunctionRequestWithBody(server string, ref string, params *V1De 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) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) 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) { +// NewV1GetHostnameConfigRequest generates requests for V1GetHostnameConfig +func NewV1GetHostnameConfigRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -4617,19 +5125,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/custom-hostname", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4639,7 +5140,7 @@ func NewV1DeleteAFunctionRequest(server string, ref string, functionSlug 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 } @@ -4647,8 +5148,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) { +// NewV1ActivateCustomHostnameRequest generates requests for V1ActivateCustomHostname +func NewV1ActivateCustomHostnameRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -4658,19 +5159,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/custom-hostname/activate", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4680,7 +5174,7 @@ func NewV1GetAFunctionRequest(server string, ref string, functionSlug string) (* 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 } @@ -4688,19 +5182,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) { +// 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 NewV1UpdateAFunctionRequestWithBody(server, ref, functionSlug, params, "application/json", bodyReader) + return NewV1UpdateHostnameConfigRequestWithBody(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) { +// 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 @@ -4710,19 +5204,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) - 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/custom-hostname/initialize", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4732,125 +5219,7 @@ 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) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -4860,8 +5229,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) { +// NewV1VerifyDnsConfigRequest generates requests for V1VerifyDnsConfig +func NewV1VerifyDnsConfigRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -4871,19 +5240,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/custom-hostname/reverify", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4893,7 +5255,7 @@ func NewV1GetAFunctionBodyRequest(server string, ref string, functionSlug string 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 } @@ -4901,8 +5263,8 @@ 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) { +// NewV1ListAllBackupsRequest generates requests for V1ListAllBackups +func NewV1ListAllBackupsRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -4917,7 +5279,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/database/backups", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4927,40 +5289,6 @@ func NewV1GetServicesHealthRequest(server string, ref string, params *V1GetServi return nil, err } - if params != nil { - queryValues := queryURL.Query() - - 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) - } - } - } - - } - - 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) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -4969,19 +5297,19 @@ func NewV1GetServicesHealthRequest(server string, ref string, params *V1GetServi return req, nil } -// NewV1DeleteNetworkBansRequest calls the generic V1DeleteNetworkBans builder with application/json body -func NewV1DeleteNetworkBansRequest(server string, ref string, body V1DeleteNetworkBansJSONRequestBody) (*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 NewV1DeleteNetworkBansRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1RestorePitrBackupRequestWithBody(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) { +// 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 @@ -4996,7 +5324,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/database/backups/restore-pitr", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5006,7 +5334,7 @@ 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(), body) if err != nil { return nil, err } @@ -5016,8 +5344,8 @@ func NewV1DeleteNetworkBansRequestWithBody(server string, ref string, contentTyp return req, nil } -// NewV1ListAllNetworkBansRequest generates requests for V1ListAllNetworkBans -func NewV1ListAllNetworkBansRequest(server string, ref string) (*http.Request, error) { +// NewGetDatabaseMetadataRequest generates requests for GetDatabaseMetadata +func NewGetDatabaseMetadataRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -5032,7 +5360,7 @@ func NewV1ListAllNetworkBansRequest(server string, ref string) (*http.Request, e return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/network-bans/retrieve", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/database/context", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5042,7 +5370,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("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -5050,8 +5378,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) { +// NewV1ListMigrationHistoryRequest generates requests for V1ListMigrationHistory +func NewV1ListMigrationHistoryRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -5066,7 +5394,7 @@ func NewV1GetNetworkRestrictionsRequest(server string, ref string) (*http.Reques return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/network-restrictions", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/database/migrations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5084,19 +5412,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) { +// 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 NewV1UpdateNetworkRestrictionsRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1ApplyAMigrationRequestWithBody(server, ref, params, "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) { +// 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 var pathParam0 string @@ -5111,7 +5439,7 @@ func NewV1UpdateNetworkRestrictionsRequestWithBody(server string, ref string, co return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/network-restrictions/apply", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/database/migrations", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5128,11 +5456,37 @@ func NewV1UpdateNetworkRestrictionsRequestWithBody(server string, ref string, co req.Header.Add("Content-Type", contentType) + if params != nil { + + if params.IdempotencyKey != nil { + var headerParam0 string + + headerParam0, err = runtime.StyleParamWithLocation("simple", false, "Idempotency-Key", runtime.ParamLocationHeader, *params.IdempotencyKey) + if err != nil { + return nil, err + } + + req.Header.Set("Idempotency-Key", headerParam0) + } + + } + return req, nil } -// NewV1PauseAProjectRequest generates requests for V1PauseAProject -func NewV1PauseAProjectRequest(server string, ref string) (*http.Request, 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) +} + +// 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 var pathParam0 string @@ -5147,7 +5501,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/database/query", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5157,16 +5511,18 @@ func NewV1PauseAProjectRequest(server string, ref string) (*http.Request, error) return nil, err } - req, err := http.NewRequest("POST", 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 } -// NewV1GetPgsodiumConfigRequest generates requests for V1GetPgsodiumConfig -func NewV1GetPgsodiumConfigRequest(server string, ref string) (*http.Request, error) { +// NewV1EnableDatabaseWebhookRequest generates requests for V1EnableDatabaseWebhook +func NewV1EnableDatabaseWebhookRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -5181,7 +5537,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/database/webhooks/enable", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5191,7 +5547,7 @@ 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(), nil) if err != nil { return nil, err } @@ -5199,19 +5555,8 @@ func NewV1GetPgsodiumConfigRequest(server string, ref string) (*http.Request, er 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) { +// NewV1ListAllFunctionsRequest generates requests for V1ListAllFunctions +func NewV1ListAllFunctionsRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -5226,7 +5571,7 @@ func NewV1UpdatePgsodiumConfigRequestWithBody(server string, ref string, content return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/pgsodium", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/functions", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5236,18 +5581,27 @@ func NewV1UpdatePgsodiumConfigRequestWithBody(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 } -// NewV1GetPostgrestServiceConfigRequest generates requests for V1GetPostgrestServiceConfig -func NewV1GetPostgrestServiceConfigRequest(server string, ref string) (*http.Request, 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) +} + +// 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 var pathParam0 string @@ -5262,7 +5616,7 @@ func NewV1GetPostgrestServiceConfigRequest(server string, ref string) (*http.Req return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/postgrest", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/functions", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5272,27 +5626,131 @@ func NewV1GetPostgrestServiceConfigRequest(server string, ref string) (*http.Req return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + 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) + } + } + } + + } + + 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 } -// NewV1UpdatePostgrestServiceConfigRequest calls the generic V1UpdatePostgrestServiceConfig builder with application/json body -func NewV1UpdatePostgrestServiceConfigRequest(server string, ref string, body V1UpdatePostgrestServiceConfigJSONRequestBody) (*http.Request, error) { +// 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 NewV1UpdatePostgrestServiceConfigRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1BulkUpdateFunctionsRequestWithBody(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) { +// 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 @@ -5307,7 +5765,7 @@ func NewV1UpdatePostgrestServiceConfigRequestWithBody(server string, ref string, return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/postgrest", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/functions", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5317,7 +5775,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 +5785,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) { +// 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 @@ -5354,7 +5801,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/functions/deploy", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5364,6 +5811,44 @@ func NewV1RemoveAReadReplicaRequestWithBody(server string, ref string, contentTy 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 @@ -5374,19 +5859,8 @@ func NewV1RemoveAReadReplicaRequestWithBody(server string, ref string, contentTy 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) { +// NewV1DeleteAFunctionRequest generates requests for V1DeleteAFunction +func NewV1DeleteAFunctionRequest(server string, ref string, functionSlug string) (*http.Request, error) { var err error var pathParam0 string @@ -5396,12 +5870,19 @@ func NewV1SetupAReadReplicaRequestWithBody(server string, ref string, contentTyp 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/read-replicas/setup", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5411,18 +5892,16 @@ func NewV1SetupAReadReplicaRequestWithBody(server string, ref string, contentTyp return nil, err } - req, err := http.NewRequest("POST", 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 } -// NewV1GetReadonlyModeStatusRequest generates requests for V1GetReadonlyModeStatus -func NewV1GetReadonlyModeStatusRequest(server string, ref string) (*http.Request, error) { +// NewV1GetAFunctionRequest generates requests for V1GetAFunction +func NewV1GetAFunctionRequest(server string, ref string, functionSlug string) (*http.Request, error) { var err error var pathParam0 string @@ -5432,12 +5911,19 @@ func NewV1GetReadonlyModeStatusRequest(server string, ref string) (*http.Request return nil, err } - serverURL, err := url.Parse(server) + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "function_slug", runtime.ParamLocationPath, functionSlug) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/v1/projects/%s/readonly", pathParam0) + 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 } @@ -5455,8 +5941,19 @@ func NewV1GetReadonlyModeStatusRequest(server string, ref string) (*http.Request return req, nil } -// NewV1DisableReadonlyModeTemporarilyRequest generates requests for V1DisableReadonlyModeTemporarily -func NewV1DisableReadonlyModeTemporarilyRequest(server string, ref string) (*http.Request, error) { +// 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 @@ -5466,12 +5963,19 @@ func NewV1DisableReadonlyModeTemporarilyRequest(server string, ref string) (*htt 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/readonly/temporary-disable", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5481,61 +5985,120 @@ func NewV1DisableReadonlyModeTemporarilyRequest(server string, ref string) (*htt 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 params.Slug != nil { -// NewV1ListAvailableRestoreVersionsRequest generates requests for V1ListAvailableRestoreVersions -func NewV1ListAvailableRestoreVersionsRequest(server string, ref string) (*http.Request, error) { - var err 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) + } + } + } - var pathParam0 string + } - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) - if err != nil { - return nil, err - } + if params.Name != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + 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) + } + } + } - operationPath := fmt.Sprintf("/v1/projects/%s/restore", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + 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) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// 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) + return req, nil } -// NewV1RestoreAProjectRequestWithBody generates requests for V1RestoreAProject with any type of body -func NewV1RestoreAProjectRequestWithBody(server string, ref string, contentType string, body io.Reader) (*http.Request, error) { +// NewV1GetAFunctionBodyRequest generates requests for V1GetAFunctionBody +func NewV1GetAFunctionBodyRequest(server string, ref string, functionSlug string) (*http.Request, error) { var err error var pathParam0 string @@ -5545,12 +6108,19 @@ func NewV1RestoreAProjectRequestWithBody(server string, ref string, contentType 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/restore", pathParam0) + operationPath := fmt.Sprintf("/v1/projects/%s/functions/%s/body", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5560,18 +6130,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) { +// NewV1GetServicesHealthRequest generates requests for V1GetServicesHealth +func NewV1GetServicesHealthRequest(server string, ref string, params *V1GetServicesHealthParams) (*http.Request, error) { var err error var pathParam0 string @@ -5586,7 +6154,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/health", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5596,7 +6164,41 @@ func NewV1CancelAProjectRestorationRequest(server string, ref string) (*http.Req return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), nil) + 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 } @@ -5604,19 +6206,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) { +// 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 NewV1BulkDeleteSecretsRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1DeleteNetworkBansRequestWithBody(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) { +// 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 @@ -5631,7 +6233,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/network-bans", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5651,8 +6253,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) { +// NewV1ListAllNetworkBansRequest generates requests for V1ListAllNetworkBans +func NewV1ListAllNetworkBansRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -5667,7 +6269,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/network-bans/retrieve", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5677,7 +6279,7 @@ func NewV1ListAllSecretsRequest(server string, ref string) (*http.Request, error 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 } @@ -5685,19 +6287,8 @@ 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) { - 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) { +// NewV1ListAllNetworkBansEnrichedRequest generates requests for V1ListAllNetworkBansEnriched +func NewV1ListAllNetworkBansEnrichedRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -5712,7 +6303,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/network-bans/retrieve/enriched", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5722,18 +6313,16 @@ func NewV1BulkCreateSecretsRequestWithBody(server string, ref string, contentTyp return nil, err } - req, err := http.NewRequest("POST", 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 } -// NewV1GetSslEnforcementConfigRequest generates requests for V1GetSslEnforcementConfig -func NewV1GetSslEnforcementConfigRequest(server string, ref string) (*http.Request, error) { +// NewV1GetNetworkRestrictionsRequest generates requests for V1GetNetworkRestrictions +func NewV1GetNetworkRestrictionsRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -5748,7 +6337,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/network-restrictions", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5766,19 +6355,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) { +// 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 NewV1UpdateSslEnforcementConfigRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1UpdateNetworkRestrictionsRequestWithBody(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) { +// 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 @@ -5793,7 +6382,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/network-restrictions/apply", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5803,7 +6392,7 @@ func NewV1UpdateSslEnforcementConfigRequestWithBody(server string, ref string, c return nil, err } - req, err := http.NewRequest("PUT", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -5813,8 +6402,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) { +// NewV1PauseAProjectRequest generates requests for V1PauseAProject +func NewV1PauseAProjectRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -5829,7 +6418,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/pause", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5839,7 +6428,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("POST", queryURL.String(), nil) if err != nil { return nil, err } @@ -5847,8 +6436,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) { +// NewV1GetPgsodiumConfigRequest generates requests for V1GetPgsodiumConfig +func NewV1GetPgsodiumConfigRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -5863,7 +6452,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/pgsodium", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5873,28 +6462,6 @@ func NewV1GenerateTypescriptTypesRequest(server string, ref string, params *V1Ge 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 @@ -5903,19 +6470,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) { +// 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 NewV1UpgradePostgresVersionRequestWithBody(server, ref, "application/json", bodyReader) + return NewV1UpdatePgsodiumConfigRequestWithBody(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) { +// 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 @@ -5930,7 +6497,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/pgsodium", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5940,7 +6507,7 @@ func NewV1UpgradePostgresVersionRequestWithBody(server string, ref string, conte 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 } @@ -5950,8 +6517,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) { +// NewV1GetPostgrestServiceConfigRequest generates requests for V1GetPostgrestServiceConfig +func NewV1GetPostgrestServiceConfigRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -5966,7 +6533,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/postgrest", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5984,8 +6551,19 @@ 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) { +// 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 @@ -6000,7 +6578,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/postgrest", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6010,38 +6588,76 @@ func NewV1GetPostgresUpgradeStatusRequest(server string, ref string, params *V1G return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.TrackingId != nil { + req.Header.Add("Content-Type", contentType) - 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) - } - } - } + 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) +} - queryURL.RawQuery = queryValues.Encode() +// 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 } - 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/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 } -// NewV1DeactivateVanitySubdomainConfigRequest generates requests for V1DeactivateVanitySubdomainConfig -func NewV1DeactivateVanitySubdomainConfigRequest(server string, ref string) (*http.Request, error) { +// 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 @@ -6056,7 +6672,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/read-replicas/setup", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6066,16 +6682,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) { +// NewV1GetReadonlyModeStatusRequest generates requests for V1GetReadonlyModeStatus +func NewV1GetReadonlyModeStatusRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -6090,7 +6708,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/readonly", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6108,19 +6726,8 @@ 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) { - 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) { +// NewV1DisableReadonlyModeTemporarilyRequest generates requests for V1DisableReadonlyModeTemporarily +func NewV1DisableReadonlyModeTemporarilyRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -6135,7 +6742,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/readonly/temporary-disable", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6145,29 +6752,16 @@ func NewV1ActivateVanitySubdomainConfigRequestWithBody(server string, ref string return nil, err } - req, err := http.NewRequest("POST", 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 } -// 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) { +// NewV1ListAvailableRestoreVersionsRequest generates requests for V1ListAvailableRestoreVersions +func NewV1ListAvailableRestoreVersionsRequest(server string, ref string) (*http.Request, error) { var err error var pathParam0 string @@ -6182,7 +6776,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/restore", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6192,26 +6786,31 @@ func NewV1CheckVanitySubdomainAvailabilityRequestWithBody(server string, ref str 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 } -// NewV1ListAllSnippetsRequest generates requests for V1ListAllSnippets -func NewV1ListAllSnippetsRequest(server string, params *V1ListAllSnippetsParams) (*http.Request, error) { +// 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/snippets") + operationPath := fmt.Sprintf("/v1/projects/%s/restore", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6221,107 +6820,102 @@ func NewV1ListAllSnippetsRequest(server string, params *V1ListAllSnippetsParams) return nil, err } - if params != nil { - queryValues := queryURL.Query() + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } - if params.Cursor != nil { + return req, 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) - } - } - } +// NewV1CancelAProjectRestorationRequest generates requests for V1CancelAProjectRestoration +func NewV1CancelAProjectRestorationRequest(server string, ref string) (*http.Request, error) { + var err error - } + var pathParam0 string - if params.Limit != nil { + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - 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) - } - } - } + 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 + } - if params.SortBy != nil { + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - 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) - } - } - } + req, err := http.NewRequest("POST", queryURL.String(), nil) + if err != nil { + return nil, err + } - } + return req, nil +} - if params.SortOrder != 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) +} - 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) - } - } - } +// 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 - if params.ProjectRef != nil { + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - 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) - } - } - } + 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.RawQuery = queryValues.Encode() + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewV1GetASnippetRequest generates requests for V1GetASnippet -func NewV1GetASnippetRequest(server string, id openapi_types.UUID) (*http.Request, error) { +// 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, "id", runtime.ParamLocationPath, id) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) if err != nil { return nil, err } @@ -6331,7 +6925,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/secrets", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6349,408 +6943,1932 @@ 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 - } +// 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 } - return nil + bodyReader = bytes.NewReader(buf) + return NewV1BulkCreateSecretsRequestWithBody(server, ref, "application/json", bodyReader) } -// ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} +// 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 -// 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/secrets", 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("POST", 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) +// NewV1GetSslEnforcementConfigRequest generates requests for V1GetSslEnforcementConfig +func NewV1GetSslEnforcementConfigRequest(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/ssl-enforcement", 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) +// 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) +} - // V1ListOrganizationMembersWithResponse request - V1ListOrganizationMembersWithResponse(ctx context.Context, slug string, reqEditors ...RequestEditorFn) (*V1ListOrganizationMembersResponse, error) +// 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 - // V1ListAllProjectsWithResponse request - V1ListAllProjectsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*V1ListAllProjectsResponse, error) + var pathParam0 string - // V1CreateAProjectWithBodyWithResponse request with any body - V1CreateAProjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - V1CreateAProjectWithResponse(ctx context.Context, body V1CreateAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error) - - // 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/ssl-enforcement", pathParam0) + 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("PUT", queryURL.String(), body) + 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) + req.Header.Add("Content-Type", contentType) - CreateApiKeyWithResponse(ctx context.Context, ref string, params *CreateApiKeyParams, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) + return req, nil +} - // DeleteApiKeyWithResponse request - DeleteApiKeyWithResponse(ctx context.Context, ref string, id string, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error) +// NewV1ListAllBucketsRequest generates requests for V1ListAllBuckets +func NewV1ListAllBucketsRequest(server string, ref string) (*http.Request, error) { + var err error - // GetApiKeyWithResponse request - GetApiKeyWithResponse(ctx context.Context, ref string, id string, params *GetApiKeyParams, reqEditors ...RequestEditorFn) (*GetApiKeyResponse, error) + var pathParam0 string - // UpdateApiKeyWithBodyWithResponse request with any body - UpdateApiKeyWithBodyWithResponse(ctx context.Context, ref string, id string, params *UpdateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - UpdateApiKeyWithResponse(ctx context.Context, ref string, id string, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // V1DisablePreviewBranchingWithResponse request - V1DisablePreviewBranchingWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisablePreviewBranchingResponse, error) + operationPath := fmt.Sprintf("/v1/projects/%s/storage/buckets", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // V1ListAllBranchesWithResponse request - V1ListAllBranchesWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBranchesResponse, error) + queryURL, err := serverURL.Parse(operationPath) + 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) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - V1CreateABranchWithResponse(ctx context.Context, ref string, body V1CreateABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateABranchResponse, error) + return req, nil +} - // V1GetAuthServiceConfigWithResponse request - V1GetAuthServiceConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetAuthServiceConfigResponse, error) +// NewV1GenerateTypescriptTypesRequest generates requests for V1GenerateTypescriptTypes +func NewV1GenerateTypescriptTypesRequest(server string, ref string, params *V1GenerateTypescriptTypesParams) (*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/types/typescript", 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) + if params != nil { + queryValues := queryURL.Query() - // V1GetASsoProviderWithResponse request - V1GetASsoProviderWithResponse(ctx context.Context, ref string, providerId string, reqEditors ...RequestEditorFn) (*V1GetASsoProviderResponse, error) + if params.IncludedSchemas != nil { - // V1UpdateASsoProviderWithBodyWithResponse request with any body - V1UpdateASsoProviderWithBodyWithResponse(ctx context.Context, ref string, providerId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateASsoProviderResponse, error) + 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) + } + } + } - V1UpdateASsoProviderWithResponse(ctx context.Context, ref string, providerId string, body V1UpdateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateASsoProviderResponse, error) + } - // ListTPAForProjectWithResponse request - ListTPAForProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*ListTPAForProjectResponse, error) + queryURL.RawQuery = queryValues.Encode() + } - // CreateTPAForProjectWithBodyWithResponse request with any body - CreateTPAForProjectWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTPAForProjectResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - CreateTPAForProjectWithResponse(ctx context.Context, ref string, body CreateTPAForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTPAForProjectResponse, error) + return req, nil +} - // DeleteTPAForProjectWithResponse request - DeleteTPAForProjectWithResponse(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*DeleteTPAForProjectResponse, error) +// 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) +} - // GetTPAForProjectWithResponse request - GetTPAForProjectWithResponse(ctx context.Context, ref string, tpaId string, reqEditors ...RequestEditorFn) (*GetTPAForProjectResponse, error) +// 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 - // V1GetProjectPgbouncerConfigWithResponse request - V1GetProjectPgbouncerConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectPgbouncerConfigResponse, error) + var pathParam0 string - // V1GetSupavisorConfigWithResponse request - V1GetSupavisorConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetSupavisorConfigResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - // V1UpdateSupavisorConfigWithBodyWithResponse request with any body - V1UpdateSupavisorConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateSupavisorConfigResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - V1UpdateSupavisorConfigWithResponse(ctx context.Context, ref string, body V1UpdateSupavisorConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateSupavisorConfigResponse, error) + operationPath := fmt.Sprintf("/v1/projects/%s/upgrade", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // V1GetPostgresConfigWithResponse request - V1GetPostgresConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgresConfigResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // V1UpdatePostgresConfigWithBodyWithResponse request with any body - V1UpdatePostgresConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - V1UpdatePostgresConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgresConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error) + req.Header.Add("Content-Type", contentType) - // V1GetStorageConfigWithResponse request - V1GetStorageConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetStorageConfigResponse, error) + return req, nil +} - // V1UpdateStorageConfigWithBodyWithResponse request with any body - V1UpdateStorageConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error) +// NewV1GetPostgresUpgradeEligibilityRequest generates requests for V1GetPostgresUpgradeEligibility +func NewV1GetPostgresUpgradeEligibilityRequest(server string, ref string) (*http.Request, error) { + var err error - V1UpdateStorageConfigWithResponse(ctx context.Context, ref string, body V1UpdateStorageConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error) + var pathParam0 string - // V1DeleteHostnameConfigWithResponse request - V1DeleteHostnameConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeleteHostnameConfigResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - // V1GetHostnameConfigWithResponse request - V1GetHostnameConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetHostnameConfigResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // V1ActivateCustomHostnameWithResponse request - V1ActivateCustomHostnameWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ActivateCustomHostnameResponse, error) + operationPath := fmt.Sprintf("/v1/projects/%s/upgrade/eligibility", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // V1UpdateHostnameConfigWithBodyWithResponse request with any body - V1UpdateHostnameConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - V1UpdateHostnameConfigWithResponse(ctx context.Context, ref string, body V1UpdateHostnameConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - // V1VerifyDnsConfigWithResponse request - V1VerifyDnsConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1VerifyDnsConfigResponse, error) + return req, nil +} - // V1ListAllBackupsWithResponse request - V1ListAllBackupsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBackupsResponse, error) +// NewV1GetPostgresUpgradeStatusRequest generates requests for V1GetPostgresUpgradeStatus +func NewV1GetPostgresUpgradeStatusRequest(server string, ref string, params *V1GetPostgresUpgradeStatusParams) (*http.Request, error) { + var err error - // V1RestorePitrBackupWithBodyWithResponse request with any body - V1RestorePitrBackupWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error) + var pathParam0 string - V1RestorePitrBackupWithResponse(ctx context.Context, ref string, body V1RestorePitrBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - // GetDatabaseMetadataWithResponse request - GetDatabaseMetadataWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetDatabaseMetadataResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // V1RunAQueryWithBodyWithResponse request with any body - V1RunAQueryWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error) + operationPath := fmt.Sprintf("/v1/projects/%s/upgrade/status", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - V1RunAQueryWithResponse(ctx context.Context, ref string, body V1RunAQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // V1EnableDatabaseWebhookWithResponse request - V1EnableDatabaseWebhookWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1EnableDatabaseWebhookResponse, error) + if params != nil { + queryValues := queryURL.Query() - // V1ListAllFunctionsWithResponse request - V1ListAllFunctionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllFunctionsResponse, error) + if params.TrackingId != nil { - // V1CreateAFunctionWithBodyWithResponse request with any body - V1CreateAFunctionWithBodyWithResponse(ctx context.Context, ref string, params *V1CreateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1CreateAFunctionResponse, error) + 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) + } + } + } - 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) + queryURL.RawQuery = queryValues.Encode() + } - V1BulkUpdateFunctionsWithResponse(ctx context.Context, ref string, body V1BulkUpdateFunctionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkUpdateFunctionsResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + 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) + return req, nil +} - // V1DeleteAFunctionWithResponse request - V1DeleteAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1DeleteAFunctionResponse, error) +// NewV1DeactivateVanitySubdomainConfigRequest generates requests for V1DeactivateVanitySubdomainConfig +func NewV1DeactivateVanitySubdomainConfigRequest(server string, ref string) (*http.Request, error) { + var err error - // V1GetAFunctionWithResponse request - V1GetAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1GetAFunctionResponse, error) + var pathParam0 string - // V1UpdateAFunctionWithBodyWithResponse request with any body - V1UpdateAFunctionWithBodyWithResponse(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateAFunctionResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - V1UpdateAFunctionWithResponse(ctx context.Context, ref string, functionSlug string, params *V1UpdateAFunctionParams, body V1UpdateAFunctionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateAFunctionResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // V1GetAFunctionBodyWithResponse request - V1GetAFunctionBodyWithResponse(ctx context.Context, ref string, functionSlug string, reqEditors ...RequestEditorFn) (*V1GetAFunctionBodyResponse, error) + operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // V1GetServicesHealthWithResponse request - V1GetServicesHealthWithResponse(ctx context.Context, ref string, params *V1GetServicesHealthParams, reqEditors ...RequestEditorFn) (*V1GetServicesHealthResponse, error) + queryURL, err := serverURL.Parse(operationPath) + 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) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) + if err != nil { + return nil, err + } - V1DeleteNetworkBansWithResponse(ctx context.Context, ref string, body V1DeleteNetworkBansJSONRequestBody, reqEditors ...RequestEditorFn) (*V1DeleteNetworkBansResponse, error) + return req, nil +} - // V1ListAllNetworkBansWithResponse request - V1ListAllNetworkBansWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllNetworkBansResponse, error) +// NewV1GetVanitySubdomainConfigRequest generates requests for V1GetVanitySubdomainConfig +func NewV1GetVanitySubdomainConfigRequest(server string, ref string) (*http.Request, error) { + var err error - // V1GetNetworkRestrictionsWithResponse request - V1GetNetworkRestrictionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetNetworkRestrictionsResponse, error) + var pathParam0 string - // V1UpdateNetworkRestrictionsWithBodyWithResponse request with any body - V1UpdateNetworkRestrictionsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateNetworkRestrictionsResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - V1UpdateNetworkRestrictionsWithResponse(ctx context.Context, ref string, body V1UpdateNetworkRestrictionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateNetworkRestrictionsResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // V1PauseAProjectWithResponse request - V1PauseAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1PauseAProjectResponse, error) + operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // V1GetPgsodiumConfigWithResponse request - V1GetPgsodiumConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPgsodiumConfigResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // V1UpdatePgsodiumConfigWithBodyWithResponse request with any body - V1UpdatePgsodiumConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePgsodiumConfigResponse, error) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } - V1UpdatePgsodiumConfigWithResponse(ctx context.Context, ref string, body V1UpdatePgsodiumConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePgsodiumConfigResponse, error) + return req, nil +} - // V1GetPostgrestServiceConfigWithResponse request - V1GetPostgrestServiceConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgrestServiceConfigResponse, error) +// 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) +} - // V1UpdatePostgrestServiceConfigWithBodyWithResponse request with any body - V1UpdatePostgrestServiceConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdatePostgrestServiceConfigResponse, error) +// 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 - V1UpdatePostgrestServiceConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgrestServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgrestServiceConfigResponse, error) + var pathParam0 string - // V1RemoveAReadReplicaWithBodyWithResponse request with any body - V1RemoveAReadReplicaWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RemoveAReadReplicaResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - V1RemoveAReadReplicaWithResponse(ctx context.Context, ref string, body V1RemoveAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RemoveAReadReplicaResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // V1SetupAReadReplicaWithBodyWithResponse request with any body - V1SetupAReadReplicaWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1SetupAReadReplicaResponse, error) + operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain/activate", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - V1SetupAReadReplicaWithResponse(ctx context.Context, ref string, body V1SetupAReadReplicaJSONRequestBody, reqEditors ...RequestEditorFn) (*V1SetupAReadReplicaResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - // V1GetReadonlyModeStatusWithResponse request - V1GetReadonlyModeStatusWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetReadonlyModeStatusResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - // V1DisableReadonlyModeTemporarilyWithResponse request - V1DisableReadonlyModeTemporarilyWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisableReadonlyModeTemporarilyResponse, error) + req.Header.Add("Content-Type", contentType) - // V1ListAvailableRestoreVersionsWithResponse request - V1ListAvailableRestoreVersionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAvailableRestoreVersionsResponse, error) + return req, nil +} - // V1RestoreAProjectWithBodyWithResponse request with any body - V1RestoreAProjectWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1RestoreAProjectResponse, error) +// 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) +} - V1RestoreAProjectWithResponse(ctx context.Context, ref string, body V1RestoreAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RestoreAProjectResponse, error) +// 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 - // V1CancelAProjectRestorationWithResponse request - V1CancelAProjectRestorationWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CancelAProjectRestorationResponse, error) + var pathParam0 string - // V1BulkDeleteSecretsWithBodyWithResponse request with any body - V1BulkDeleteSecretsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkDeleteSecretsResponse, error) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } - V1BulkDeleteSecretsWithResponse(ctx context.Context, ref string, body V1BulkDeleteSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkDeleteSecretsResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // V1ListAllSecretsWithResponse request - V1ListAllSecretsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllSecretsResponse, error) + operationPath := fmt.Sprintf("/v1/projects/%s/vanity-subdomain/check-availability", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // V1BulkCreateSecretsWithBodyWithResponse request with any body - V1BulkCreateSecretsWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1BulkCreateSecretsResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - V1BulkCreateSecretsWithResponse(ctx context.Context, ref string, body V1BulkCreateSecretsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkCreateSecretsResponse, error) + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - // V1GetSslEnforcementConfigWithResponse request - V1GetSslEnforcementConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetSslEnforcementConfigResponse, error) + req.Header.Add("Content-Type", contentType) - // V1UpdateSslEnforcementConfigWithBodyWithResponse request with any body - V1UpdateSslEnforcementConfigWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateSslEnforcementConfigResponse, error) + return req, nil +} - V1UpdateSslEnforcementConfigWithResponse(ctx context.Context, ref string, body V1UpdateSslEnforcementConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateSslEnforcementConfigResponse, error) +// NewV1ListAllSnippetsRequest generates requests for V1ListAllSnippets +func NewV1ListAllSnippetsRequest(server string, params *V1ListAllSnippetsParams) (*http.Request, error) { + var err error - // V1ListAllBucketsWithResponse request - V1ListAllBucketsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1ListAllBucketsResponse, error) + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - // V1GenerateTypescriptTypesWithResponse request - V1GenerateTypescriptTypesWithResponse(ctx context.Context, ref string, params *V1GenerateTypescriptTypesParams, reqEditors ...RequestEditorFn) (*V1GenerateTypescriptTypesResponse, error) + operationPath := fmt.Sprintf("/v1/snippets") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - // V1UpgradePostgresVersionWithBodyWithResponse request with any body - V1UpgradePostgresVersionWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpgradePostgresVersionResponse, error) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } - V1UpgradePostgresVersionWithResponse(ctx context.Context, ref string, body V1UpgradePostgresVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpgradePostgresVersionResponse, error) + if params != nil { + queryValues := queryURL.Query() - // V1GetPostgresUpgradeEligibilityWithResponse request - V1GetPostgresUpgradeEligibilityWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPostgresUpgradeEligibilityResponse, error) + if params.ProjectRef != nil { - // V1GetPostgresUpgradeStatusWithResponse request - V1GetPostgresUpgradeStatusWithResponse(ctx context.Context, ref string, params *V1GetPostgresUpgradeStatusParams, reqEditors ...RequestEditorFn) (*V1GetPostgresUpgradeStatusResponse, 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) + } + } + } - // V1DeactivateVanitySubdomainConfigWithResponse request - V1DeactivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeactivateVanitySubdomainConfigResponse, error) + } - // V1GetVanitySubdomainConfigWithResponse request + 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) + + // 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) + + // 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) + + // GetPerformanceAdvisorsWithResponse request + GetPerformanceAdvisorsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetPerformanceAdvisorsResponse, error) + + // GetSecurityAdvisorsWithResponse request + GetSecurityAdvisorsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetSecurityAdvisorsResponse, error) + + // GetLogsWithResponse request + GetLogsWithResponse(ctx context.Context, ref string, params *GetLogsParams, reqEditors ...RequestEditorFn) (*GetLogsResponse, error) + + // GetApiCountsWithResponse request + GetApiCountsWithResponse(ctx context.Context, ref string, params *GetApiCountsParams, reqEditors ...RequestEditorFn) (*GetApiCountsResponse, error) + + // GetApiRequestsCountWithResponse request + GetApiRequestsCountWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetApiRequestsCountResponse, error) + + // V1GetProjectApiKeysWithResponse request + V1GetProjectApiKeysWithResponse(ctx context.Context, ref string, params *V1GetProjectApiKeysParams, reqEditors ...RequestEditorFn) (*V1GetProjectApiKeysResponse, error) + + // CreateApiKeyWithBodyWithResponse request with any body + CreateApiKeyWithBodyWithResponse(ctx context.Context, ref string, params *CreateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) + + CreateApiKeyWithResponse(ctx context.Context, ref string, params *CreateApiKeyParams, body CreateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateApiKeyResponse, error) + + // DeleteApiKeyWithResponse request + DeleteApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error) + + // GetApiKeyWithResponse request + GetApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *GetApiKeyParams, reqEditors ...RequestEditorFn) (*GetApiKeyResponse, error) + + // UpdateApiKeyWithBodyWithResponse request with any body + UpdateApiKeyWithBodyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *UpdateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error) + + UpdateApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, 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) + + // 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) + + // ListSigningKeysForProjectWithResponse request + ListSigningKeysForProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*ListSigningKeysForProjectResponse, error) + + // CreateSigningKeyForProjectWithBodyWithResponse request with any body + CreateSigningKeyForProjectWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSigningKeyForProjectResponse, error) + + CreateSigningKeyForProjectWithResponse(ctx context.Context, ref string, body CreateSigningKeyForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSigningKeyForProjectResponse, error) + + // DeleteSigningKeyWithResponse request + DeleteSigningKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteSigningKeyResponse, error) + + // GetSigningKeyForProjectWithResponse request + GetSigningKeyForProjectWithResponse(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetSigningKeyForProjectResponse, error) + + // PatchSigningKeyWithBodyWithResponse request with any body + PatchSigningKeyWithBodyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSigningKeyResponse, error) + + PatchSigningKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, body PatchSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSigningKeyResponse, 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) + + // ListTPAForProjectWithResponse request + ListTPAForProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*ListTPAForProjectResponse, error) + + // CreateTPAForProjectWithBodyWithResponse request with any body + CreateTPAForProjectWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTPAForProjectResponse, error) + + CreateTPAForProjectWithResponse(ctx context.Context, ref string, body CreateTPAForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTPAForProjectResponse, error) + + // DeleteTPAForProjectWithResponse request + DeleteTPAForProjectWithResponse(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteTPAForProjectResponse, error) + + // GetTPAForProjectWithResponse request + GetTPAForProjectWithResponse(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetTPAForProjectResponse, 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) + + // GetDatabaseMetadataWithResponse request + GetDatabaseMetadataWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetDatabaseMetadataResponse, 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) + + // 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) + // 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 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 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 GetPerformanceAdvisorsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *V1ProjectAdvisorsResponse +} + +// Status returns HTTPResponse.Status +func (r GetPerformanceAdvisorsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPerformanceAdvisorsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSecurityAdvisorsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *V1ProjectAdvisorsResponse +} + +// Status returns HTTPResponse.Status +func (r GetSecurityAdvisorsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSecurityAdvisorsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetLogsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AnalyticsResponse +} + +// Status returns HTTPResponse.Status +func (r GetLogsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetLogsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiCountsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AnalyticsResponse +} + +// Status returns HTTPResponse.Status +func (r GetApiCountsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - V1ActivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, body V1ActivateVanitySubdomainConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ActivateVanitySubdomainConfigResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiCountsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiRequestsCountResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AnalyticsResponse +} + +// Status returns HTTPResponse.Status +func (r GetApiRequestsCountResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiRequestsCountResponse) 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 CreateApiKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *ApiKeyResponse +} + +// Status returns HTTPResponse.Status +func (r CreateApiKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r CreateApiKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteApiKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ApiKeyResponse +} + +// Status returns HTTPResponse.Status +func (r DeleteApiKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetApiKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ApiKeyResponse +} + +// Status returns HTTPResponse.Status +func (r GetApiKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateApiKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ApiKeyResponse +} + +// Status returns HTTPResponse.Status +func (r UpdateApiKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateApiKeyResponse) 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) +} - // 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 V1CreateABranchResponse) 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 V1DeleteProjectClaimTokenResponse struct { + Body []byte + HTTPResponse *http.Response +} - // V1ListAllSnippetsWithResponse request - V1ListAllSnippetsWithResponse(ctx context.Context, params *V1ListAllSnippetsParams, reqEditors ...RequestEditorFn) (*V1ListAllSnippetsResponse, error) +// Status returns HTTPResponse.Status +func (r V1DeleteProjectClaimTokenResponse) 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 V1DeleteProjectClaimTokenResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } -type V1DeleteABranchResponse struct { +type V1GetProjectClaimTokenResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *BranchDeleteResponse + JSON200 *ProjectClaimTokenResponse } // Status returns HTTPResponse.Status -func (r V1DeleteABranchResponse) Status() string { +func (r V1GetProjectClaimTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6758,21 +8876,21 @@ func (r V1DeleteABranchResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1DeleteABranchResponse) StatusCode() int { +func (r V1GetProjectClaimTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetABranchConfigResponse struct { +type V1CreateProjectClaimTokenResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *BranchDetailResponse + JSON200 *CreateProjectClaimTokenResponse } // Status returns HTTPResponse.Status -func (r V1GetABranchConfigResponse) Status() string { +func (r V1CreateProjectClaimTokenResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6780,21 +8898,21 @@ func (r V1GetABranchConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetABranchConfigResponse) StatusCode() int { +func (r V1CreateProjectClaimTokenResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdateABranchConfigResponse struct { +type V1GetAuthServiceConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *BranchResponse + JSON200 *AuthConfigResponse } // Status returns HTTPResponse.Status -func (r V1UpdateABranchConfigResponse) Status() string { +func (r V1GetAuthServiceConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6802,21 +8920,21 @@ func (r V1UpdateABranchConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdateABranchConfigResponse) StatusCode() int { +func (r V1GetAuthServiceConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1PushABranchResponse struct { +type V1UpdateAuthServiceConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *BranchUpdateResponse + JSON200 *AuthConfigResponse } // Status returns HTTPResponse.Status -func (r V1PushABranchResponse) Status() string { +func (r V1UpdateAuthServiceConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6824,21 +8942,21 @@ func (r V1PushABranchResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1PushABranchResponse) StatusCode() int { +func (r V1UpdateAuthServiceConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ResetABranchResponse struct { +type ListSigningKeysForProjectResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *BranchUpdateResponse + JSON200 *SigningKeysResponse } // Status returns HTTPResponse.Status -func (r V1ResetABranchResponse) Status() string { +func (r ListSigningKeysForProjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6846,20 +8964,21 @@ func (r V1ResetABranchResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ResetABranchResponse) StatusCode() int { +func (r ListSigningKeysForProjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1AuthorizeUserResponse struct { +type CreateSigningKeyForProjectResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *SigningKeyResponse } // Status returns HTTPResponse.Status -func (r V1AuthorizeUserResponse) Status() string { +func (r CreateSigningKeyForProjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6867,20 +8986,21 @@ func (r V1AuthorizeUserResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1AuthorizeUserResponse) StatusCode() int { +func (r CreateSigningKeyForProjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1RevokeTokenResponse struct { +type DeleteSigningKeyResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *SigningKeyResponse } // Status returns HTTPResponse.Status -func (r V1RevokeTokenResponse) Status() string { +func (r DeleteSigningKeyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6888,21 +9008,21 @@ func (r V1RevokeTokenResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1RevokeTokenResponse) StatusCode() int { +func (r DeleteSigningKeyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ExchangeOauthTokenResponse struct { +type GetSigningKeyForProjectResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *OAuthTokenResponse + JSON200 *SigningKeyResponse } // Status returns HTTPResponse.Status -func (r V1ExchangeOauthTokenResponse) Status() string { +func (r GetSigningKeyForProjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6910,21 +9030,21 @@ func (r V1ExchangeOauthTokenResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ExchangeOauthTokenResponse) StatusCode() int { +func (r GetSigningKeyForProjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ListAllOrganizationsResponse struct { +type PatchSigningKeyResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]OrganizationResponseV1 + JSON200 *SigningKeyResponse } // Status returns HTTPResponse.Status -func (r V1ListAllOrganizationsResponse) Status() string { +func (r PatchSigningKeyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6932,21 +9052,21 @@ func (r V1ListAllOrganizationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ListAllOrganizationsResponse) StatusCode() int { +func (r PatchSigningKeyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1CreateAnOrganizationResponse struct { +type V1ListAllSsoProviderResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *OrganizationResponseV1 + JSON200 *ListProvidersResponse } // Status returns HTTPResponse.Status -func (r V1CreateAnOrganizationResponse) Status() string { +func (r V1ListAllSsoProviderResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6954,21 +9074,21 @@ func (r V1CreateAnOrganizationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1CreateAnOrganizationResponse) StatusCode() int { +func (r V1ListAllSsoProviderResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetAnOrganizationResponse struct { +type V1CreateASsoProviderResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *V1OrganizationSlugResponse + JSON201 *CreateProviderResponse } // Status returns HTTPResponse.Status -func (r V1GetAnOrganizationResponse) Status() string { +func (r V1CreateASsoProviderResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6976,21 +9096,21 @@ func (r V1GetAnOrganizationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetAnOrganizationResponse) StatusCode() int { +func (r V1CreateASsoProviderResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ListOrganizationMembersResponse struct { +type V1DeleteASsoProviderResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]V1OrganizationMemberResponse + JSON200 *DeleteProviderResponse } // Status returns HTTPResponse.Status -func (r V1ListOrganizationMembersResponse) Status() string { +func (r V1DeleteASsoProviderResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6998,21 +9118,21 @@ func (r V1ListOrganizationMembersResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ListOrganizationMembersResponse) StatusCode() int { +func (r V1DeleteASsoProviderResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ListAllProjectsResponse struct { +type V1GetASsoProviderResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]V1ProjectWithDatabaseResponse + JSON200 *GetProviderResponse } // Status returns HTTPResponse.Status -func (r V1ListAllProjectsResponse) Status() string { +func (r V1GetASsoProviderResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7020,21 +9140,21 @@ func (r V1ListAllProjectsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ListAllProjectsResponse) StatusCode() int { +func (r V1GetASsoProviderResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1CreateAProjectResponse struct { +type V1UpdateASsoProviderResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *V1ProjectResponse + JSON200 *UpdateProviderResponse } // Status returns HTTPResponse.Status -func (r V1CreateAProjectResponse) Status() string { +func (r V1UpdateASsoProviderResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7042,21 +9162,21 @@ func (r V1CreateAProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1CreateAProjectResponse) StatusCode() int { +func (r V1UpdateASsoProviderResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1DeleteAProjectResponse struct { +type ListTPAForProjectResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *V1ProjectRefResponse + JSON200 *[]ThirdPartyAuth } // Status returns HTTPResponse.Status -func (r V1DeleteAProjectResponse) Status() string { +func (r ListTPAForProjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7064,21 +9184,21 @@ func (r V1DeleteAProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1DeleteAProjectResponse) StatusCode() int { +func (r ListTPAForProjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetProjectResponse struct { +type CreateTPAForProjectResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *V1ProjectWithDatabaseResponse + JSON201 *ThirdPartyAuth } // Status returns HTTPResponse.Status -func (r V1GetProjectResponse) Status() string { +func (r CreateTPAForProjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7086,21 +9206,21 @@ func (r V1GetProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetProjectResponse) StatusCode() int { +func (r CreateTPAForProjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetLogsResponse struct { +type DeleteTPAForProjectResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *V1AnalyticsResponse + JSON200 *ThirdPartyAuth } // Status returns HTTPResponse.Status -func (r GetLogsResponse) Status() string { +func (r DeleteTPAForProjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7108,21 +9228,21 @@ func (r GetLogsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetLogsResponse) StatusCode() int { +func (r DeleteTPAForProjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetProjectApiKeysResponse struct { +type GetTPAForProjectResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]ApiKeyResponse + JSON200 *ThirdPartyAuth } // Status returns HTTPResponse.Status -func (r V1GetProjectApiKeysResponse) Status() string { +func (r GetTPAForProjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7130,21 +9250,21 @@ func (r V1GetProjectApiKeysResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetProjectApiKeysResponse) StatusCode() int { +func (r GetTPAForProjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateApiKeyResponse struct { +type V1GetProjectPgbouncerConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ApiKeyResponse + JSON200 *V1PgbouncerConfigResponse } // Status returns HTTPResponse.Status -func (r CreateApiKeyResponse) Status() string { +func (r V1GetProjectPgbouncerConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7152,21 +9272,21 @@ func (r CreateApiKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateApiKeyResponse) StatusCode() int { +func (r V1GetProjectPgbouncerConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteApiKeyResponse struct { +type V1GetPoolerConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ApiKeyResponse + JSON200 *[]SupavisorConfigResponse } // Status returns HTTPResponse.Status -func (r DeleteApiKeyResponse) Status() string { +func (r V1GetPoolerConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7174,21 +9294,21 @@ func (r DeleteApiKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteApiKeyResponse) StatusCode() int { +func (r V1GetPoolerConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetApiKeyResponse struct { +type V1UpdatePoolerConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ApiKeyResponse + JSON200 *UpdateSupavisorConfigResponse } // Status returns HTTPResponse.Status -func (r GetApiKeyResponse) Status() string { +func (r V1UpdatePoolerConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7196,21 +9316,21 @@ func (r GetApiKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetApiKeyResponse) StatusCode() int { +func (r V1UpdatePoolerConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateApiKeyResponse struct { +type V1GetPostgresConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ApiKeyResponse + JSON200 *PostgresConfigResponse } // Status returns HTTPResponse.Status -func (r UpdateApiKeyResponse) Status() string { +func (r V1GetPostgresConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7218,20 +9338,21 @@ func (r UpdateApiKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateApiKeyResponse) StatusCode() int { +func (r V1GetPostgresConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1DisablePreviewBranchingResponse struct { +type V1UpdatePostgresConfigResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *PostgresConfigResponse } // Status returns HTTPResponse.Status -func (r V1DisablePreviewBranchingResponse) Status() string { +func (r V1UpdatePostgresConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7239,21 +9360,21 @@ func (r V1DisablePreviewBranchingResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1DisablePreviewBranchingResponse) StatusCode() int { +func (r V1UpdatePostgresConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ListAllBranchesResponse struct { +type V1GetStorageConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]BranchResponse + JSON200 *StorageConfigResponse } // Status returns HTTPResponse.Status -func (r V1ListAllBranchesResponse) Status() string { +func (r V1GetStorageConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7261,21 +9382,20 @@ func (r V1ListAllBranchesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ListAllBranchesResponse) StatusCode() int { +func (r V1GetStorageConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1CreateABranchResponse struct { +type V1UpdateStorageConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *BranchResponse } // Status returns HTTPResponse.Status -func (r V1CreateABranchResponse) Status() string { +func (r V1UpdateStorageConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7283,21 +9403,20 @@ func (r V1CreateABranchResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1CreateABranchResponse) StatusCode() int { +func (r V1UpdateStorageConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetAuthServiceConfigResponse struct { +type V1DeleteHostnameConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AuthConfigResponse } // Status returns HTTPResponse.Status -func (r V1GetAuthServiceConfigResponse) Status() string { +func (r V1DeleteHostnameConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7305,21 +9424,21 @@ func (r V1GetAuthServiceConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetAuthServiceConfigResponse) StatusCode() int { +func (r V1DeleteHostnameConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdateAuthServiceConfigResponse struct { +type V1GetHostnameConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AuthConfigResponse + JSON200 *UpdateCustomHostnameResponse } // Status returns HTTPResponse.Status -func (r V1UpdateAuthServiceConfigResponse) Status() string { +func (r V1GetHostnameConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7327,21 +9446,21 @@ func (r V1UpdateAuthServiceConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdateAuthServiceConfigResponse) StatusCode() int { +func (r V1GetHostnameConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ListAllSsoProviderResponse struct { +type V1ActivateCustomHostnameResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ListProvidersResponse + JSON201 *UpdateCustomHostnameResponse } // Status returns HTTPResponse.Status -func (r V1ListAllSsoProviderResponse) Status() string { +func (r V1ActivateCustomHostnameResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7349,21 +9468,21 @@ func (r V1ListAllSsoProviderResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ListAllSsoProviderResponse) StatusCode() int { +func (r V1ActivateCustomHostnameResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1CreateASsoProviderResponse struct { +type V1UpdateHostnameConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *CreateProviderResponse + JSON201 *UpdateCustomHostnameResponse } // Status returns HTTPResponse.Status -func (r V1CreateASsoProviderResponse) Status() string { +func (r V1UpdateHostnameConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7371,21 +9490,21 @@ func (r V1CreateASsoProviderResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1CreateASsoProviderResponse) StatusCode() int { +func (r V1UpdateHostnameConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1DeleteASsoProviderResponse struct { +type V1VerifyDnsConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DeleteProviderResponse + JSON201 *UpdateCustomHostnameResponse } // Status returns HTTPResponse.Status -func (r V1DeleteASsoProviderResponse) Status() string { +func (r V1VerifyDnsConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7393,21 +9512,21 @@ func (r V1DeleteASsoProviderResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1DeleteASsoProviderResponse) StatusCode() int { +func (r V1VerifyDnsConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetASsoProviderResponse struct { +type V1ListAllBackupsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *GetProviderResponse + JSON200 *V1BackupsResponse } // Status returns HTTPResponse.Status -func (r V1GetASsoProviderResponse) Status() string { +func (r V1ListAllBackupsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7415,21 +9534,20 @@ func (r V1GetASsoProviderResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetASsoProviderResponse) StatusCode() int { +func (r V1ListAllBackupsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdateASsoProviderResponse struct { +type V1RestorePitrBackupResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *UpdateProviderResponse } // Status returns HTTPResponse.Status -func (r V1UpdateASsoProviderResponse) Status() string { +func (r V1RestorePitrBackupResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7437,21 +9555,21 @@ func (r V1UpdateASsoProviderResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdateASsoProviderResponse) StatusCode() int { +func (r V1RestorePitrBackupResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListTPAForProjectResponse struct { +type GetDatabaseMetadataResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]ThirdPartyAuth + JSON200 *GetProjectDbMetadataResponse } // Status returns HTTPResponse.Status -func (r ListTPAForProjectResponse) Status() string { +func (r GetDatabaseMetadataResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7459,21 +9577,21 @@ func (r ListTPAForProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListTPAForProjectResponse) StatusCode() int { +func (r GetDatabaseMetadataResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateTPAForProjectResponse struct { +type V1ListMigrationHistoryResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *ThirdPartyAuth + JSON200 *V1ListMigrationsResponse } // Status returns HTTPResponse.Status -func (r CreateTPAForProjectResponse) Status() string { +func (r V1ListMigrationHistoryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7481,21 +9599,20 @@ func (r CreateTPAForProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateTPAForProjectResponse) StatusCode() int { +func (r V1ListMigrationHistoryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteTPAForProjectResponse struct { +type V1ApplyAMigrationResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ThirdPartyAuth } // Status returns HTTPResponse.Status -func (r DeleteTPAForProjectResponse) Status() string { +func (r V1ApplyAMigrationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7503,21 +9620,20 @@ func (r DeleteTPAForProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteTPAForProjectResponse) StatusCode() int { +func (r V1ApplyAMigrationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetTPAForProjectResponse struct { +type V1RunAQueryResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ThirdPartyAuth } // Status returns HTTPResponse.Status -func (r GetTPAForProjectResponse) Status() string { +func (r V1RunAQueryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7525,21 +9641,20 @@ func (r GetTPAForProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTPAForProjectResponse) StatusCode() int { +func (r V1RunAQueryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetProjectPgbouncerConfigResponse struct { +type V1EnableDatabaseWebhookResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *V1PgbouncerConfigResponse } // Status returns HTTPResponse.Status -func (r V1GetProjectPgbouncerConfigResponse) Status() string { +func (r V1EnableDatabaseWebhookResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7547,21 +9662,21 @@ func (r V1GetProjectPgbouncerConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetProjectPgbouncerConfigResponse) StatusCode() int { +func (r V1EnableDatabaseWebhookResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetSupavisorConfigResponse struct { +type V1ListAllFunctionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]SupavisorConfigResponse + JSON200 *[]FunctionResponse } // Status returns HTTPResponse.Status -func (r V1GetSupavisorConfigResponse) Status() string { +func (r V1ListAllFunctionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7569,21 +9684,21 @@ func (r V1GetSupavisorConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetSupavisorConfigResponse) StatusCode() int { +func (r V1ListAllFunctionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdateSupavisorConfigResponse struct { +type V1CreateAFunctionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *UpdateSupavisorConfigResponse + JSON201 *FunctionResponse } // Status returns HTTPResponse.Status -func (r V1UpdateSupavisorConfigResponse) Status() string { +func (r V1CreateAFunctionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7591,21 +9706,21 @@ func (r V1UpdateSupavisorConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdateSupavisorConfigResponse) StatusCode() int { +func (r V1CreateAFunctionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetPostgresConfigResponse struct { +type V1BulkUpdateFunctionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PostgresConfigResponse + JSON200 *BulkUpdateFunctionResponse } // Status returns HTTPResponse.Status -func (r V1GetPostgresConfigResponse) Status() string { +func (r V1BulkUpdateFunctionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7613,21 +9728,21 @@ func (r V1GetPostgresConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetPostgresConfigResponse) StatusCode() int { +func (r V1BulkUpdateFunctionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdatePostgresConfigResponse struct { +type V1DeployAFunctionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PostgresConfigResponse + JSON201 *DeployFunctionResponse } // Status returns HTTPResponse.Status -func (r V1UpdatePostgresConfigResponse) Status() string { +func (r V1DeployAFunctionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7635,21 +9750,20 @@ func (r V1UpdatePostgresConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdatePostgresConfigResponse) StatusCode() int { +func (r V1DeployAFunctionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetStorageConfigResponse struct { +type V1DeleteAFunctionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *StorageConfigResponse } // Status returns HTTPResponse.Status -func (r V1GetStorageConfigResponse) Status() string { +func (r V1DeleteAFunctionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7657,20 +9771,21 @@ func (r V1GetStorageConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetStorageConfigResponse) StatusCode() int { +func (r V1DeleteAFunctionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdateStorageConfigResponse struct { +type V1GetAFunctionResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *FunctionSlugResponse } // Status returns HTTPResponse.Status -func (r V1UpdateStorageConfigResponse) Status() string { +func (r V1GetAFunctionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7678,20 +9793,21 @@ func (r V1UpdateStorageConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdateStorageConfigResponse) StatusCode() int { +func (r V1GetAFunctionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1DeleteHostnameConfigResponse struct { +type V1UpdateAFunctionResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *FunctionResponse } // Status returns HTTPResponse.Status -func (r V1DeleteHostnameConfigResponse) Status() string { +func (r V1UpdateAFunctionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7699,21 +9815,21 @@ func (r V1DeleteHostnameConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1DeleteHostnameConfigResponse) StatusCode() int { +func (r V1UpdateAFunctionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetHostnameConfigResponse struct { +type V1GetAFunctionBodyResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *UpdateCustomHostnameResponse + JSON200 *StreamableFile } // Status returns HTTPResponse.Status -func (r V1GetHostnameConfigResponse) Status() string { +func (r V1GetAFunctionBodyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7721,21 +9837,21 @@ func (r V1GetHostnameConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetHostnameConfigResponse) StatusCode() int { +func (r V1GetAFunctionBodyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ActivateCustomHostnameResponse struct { +type V1GetServicesHealthResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *UpdateCustomHostnameResponse + JSON200 *[]V1ServiceHealthResponse } // Status returns HTTPResponse.Status -func (r V1ActivateCustomHostnameResponse) Status() string { +func (r V1GetServicesHealthResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7743,21 +9859,20 @@ func (r V1ActivateCustomHostnameResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ActivateCustomHostnameResponse) StatusCode() int { +func (r V1GetServicesHealthResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdateHostnameConfigResponse struct { +type V1DeleteNetworkBansResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *UpdateCustomHostnameResponse } // Status returns HTTPResponse.Status -func (r V1UpdateHostnameConfigResponse) Status() string { +func (r V1DeleteNetworkBansResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7765,21 +9880,21 @@ func (r V1UpdateHostnameConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdateHostnameConfigResponse) StatusCode() int { +func (r V1DeleteNetworkBansResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1VerifyDnsConfigResponse struct { +type V1ListAllNetworkBansResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *UpdateCustomHostnameResponse + JSON201 *NetworkBanResponse } // Status returns HTTPResponse.Status -func (r V1VerifyDnsConfigResponse) Status() string { +func (r V1ListAllNetworkBansResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7787,21 +9902,21 @@ func (r V1VerifyDnsConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1VerifyDnsConfigResponse) StatusCode() int { +func (r V1ListAllNetworkBansResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ListAllBackupsResponse struct { +type V1ListAllNetworkBansEnrichedResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *V1BackupsResponse + JSON201 *NetworkBanResponseEnriched } // Status returns HTTPResponse.Status -func (r V1ListAllBackupsResponse) Status() string { +func (r V1ListAllNetworkBansEnrichedResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7809,20 +9924,21 @@ func (r V1ListAllBackupsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ListAllBackupsResponse) StatusCode() int { +func (r V1ListAllNetworkBansEnrichedResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1RestorePitrBackupResponse struct { +type V1GetNetworkRestrictionsResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *NetworkRestrictionsResponse } // Status returns HTTPResponse.Status -func (r V1RestorePitrBackupResponse) Status() string { +func (r V1GetNetworkRestrictionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7830,21 +9946,21 @@ func (r V1RestorePitrBackupResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1RestorePitrBackupResponse) StatusCode() int { +func (r V1GetNetworkRestrictionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetDatabaseMetadataResponse struct { +type V1UpdateNetworkRestrictionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *GetProjectDbMetadataResponseDto + JSON201 *NetworkRestrictionsResponse } // Status returns HTTPResponse.Status -func (r GetDatabaseMetadataResponse) Status() string { +func (r V1UpdateNetworkRestrictionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7852,21 +9968,20 @@ func (r GetDatabaseMetadataResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDatabaseMetadataResponse) StatusCode() int { +func (r V1UpdateNetworkRestrictionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1RunAQueryResponse struct { +type V1PauseAProjectResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *map[string]interface{} } // Status returns HTTPResponse.Status -func (r V1RunAQueryResponse) Status() string { +func (r V1PauseAProjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7874,20 +9989,21 @@ func (r V1RunAQueryResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1RunAQueryResponse) StatusCode() int { +func (r V1PauseAProjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1EnableDatabaseWebhookResponse struct { +type V1GetPgsodiumConfigResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *PgsodiumConfigResponse } // Status returns HTTPResponse.Status -func (r V1EnableDatabaseWebhookResponse) Status() string { +func (r V1GetPgsodiumConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7895,21 +10011,21 @@ func (r V1EnableDatabaseWebhookResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1EnableDatabaseWebhookResponse) StatusCode() int { +func (r V1GetPgsodiumConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ListAllFunctionsResponse struct { +type V1UpdatePgsodiumConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]FunctionResponse + JSON200 *PgsodiumConfigResponse } // Status returns HTTPResponse.Status -func (r V1ListAllFunctionsResponse) Status() string { +func (r V1UpdatePgsodiumConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7917,21 +10033,21 @@ func (r V1ListAllFunctionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ListAllFunctionsResponse) StatusCode() int { +func (r V1UpdatePgsodiumConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1CreateAFunctionResponse struct { +type V1GetPostgrestServiceConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *FunctionResponse + JSON200 *PostgrestConfigWithJWTSecretResponse } // Status returns HTTPResponse.Status -func (r V1CreateAFunctionResponse) Status() string { +func (r V1GetPostgrestServiceConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7939,21 +10055,21 @@ func (r V1CreateAFunctionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1CreateAFunctionResponse) StatusCode() int { +func (r V1GetPostgrestServiceConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1BulkUpdateFunctionsResponse struct { +type V1UpdatePostgrestServiceConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *BulkUpdateFunctionResponse + JSON200 *V1PostgrestConfigResponse } // Status returns HTTPResponse.Status -func (r V1BulkUpdateFunctionsResponse) Status() string { +func (r V1UpdatePostgrestServiceConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7961,21 +10077,20 @@ func (r V1BulkUpdateFunctionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1BulkUpdateFunctionsResponse) StatusCode() int { +func (r V1UpdatePostgrestServiceConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1DeployAFunctionResponse struct { +type V1RemoveAReadReplicaResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *DeployFunctionResponse } // Status returns HTTPResponse.Status -func (r V1DeployAFunctionResponse) Status() string { +func (r V1RemoveAReadReplicaResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7983,20 +10098,20 @@ func (r V1DeployAFunctionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1DeployAFunctionResponse) StatusCode() int { +func (r V1RemoveAReadReplicaResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1DeleteAFunctionResponse struct { +type V1SetupAReadReplicaResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r V1DeleteAFunctionResponse) Status() string { +func (r V1SetupAReadReplicaResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8004,21 +10119,21 @@ func (r V1DeleteAFunctionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1DeleteAFunctionResponse) StatusCode() int { +func (r V1SetupAReadReplicaResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetAFunctionResponse struct { +type V1GetReadonlyModeStatusResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *FunctionSlugResponse + JSON200 *ReadOnlyStatusResponse } // Status returns HTTPResponse.Status -func (r V1GetAFunctionResponse) Status() string { +func (r V1GetReadonlyModeStatusResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8026,21 +10141,20 @@ func (r V1GetAFunctionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetAFunctionResponse) StatusCode() int { +func (r V1GetReadonlyModeStatusResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdateAFunctionResponse struct { +type V1DisableReadonlyModeTemporarilyResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *FunctionResponse } // Status returns HTTPResponse.Status -func (r V1UpdateAFunctionResponse) Status() string { +func (r V1DisableReadonlyModeTemporarilyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8048,20 +10162,21 @@ func (r V1UpdateAFunctionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdateAFunctionResponse) StatusCode() int { +func (r V1DisableReadonlyModeTemporarilyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetAFunctionBodyResponse struct { +type V1ListAvailableRestoreVersionsResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *GetProjectAvailableRestoreVersionsResponse } // Status returns HTTPResponse.Status -func (r V1GetAFunctionBodyResponse) Status() string { +func (r V1ListAvailableRestoreVersionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8069,21 +10184,20 @@ func (r V1GetAFunctionBodyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetAFunctionBodyResponse) StatusCode() int { +func (r V1ListAvailableRestoreVersionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetServicesHealthResponse struct { +type V1RestoreAProjectResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]V1ServiceHealthResponse } // Status returns HTTPResponse.Status -func (r V1GetServicesHealthResponse) Status() string { +func (r V1RestoreAProjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8091,20 +10205,20 @@ func (r V1GetServicesHealthResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetServicesHealthResponse) StatusCode() int { +func (r V1RestoreAProjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1DeleteNetworkBansResponse struct { +type V1CancelAProjectRestorationResponse struct { Body []byte HTTPResponse *http.Response } // Status returns HTTPResponse.Status -func (r V1DeleteNetworkBansResponse) Status() string { +func (r V1CancelAProjectRestorationResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8112,21 +10226,20 @@ func (r V1DeleteNetworkBansResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1DeleteNetworkBansResponse) StatusCode() int { +func (r V1CancelAProjectRestorationResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ListAllNetworkBansResponse struct { +type V1BulkDeleteSecretsResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *NetworkBanResponse } // Status returns HTTPResponse.Status -func (r V1ListAllNetworkBansResponse) Status() string { +func (r V1BulkDeleteSecretsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8134,21 +10247,21 @@ func (r V1ListAllNetworkBansResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ListAllNetworkBansResponse) StatusCode() int { +func (r V1BulkDeleteSecretsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetNetworkRestrictionsResponse struct { +type V1ListAllSecretsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *NetworkRestrictionsResponse + JSON200 *[]SecretResponse } // Status returns HTTPResponse.Status -func (r V1GetNetworkRestrictionsResponse) Status() string { +func (r V1ListAllSecretsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8156,21 +10269,20 @@ func (r V1GetNetworkRestrictionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetNetworkRestrictionsResponse) StatusCode() int { +func (r V1ListAllSecretsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdateNetworkRestrictionsResponse struct { +type V1BulkCreateSecretsResponse struct { Body []byte HTTPResponse *http.Response - JSON201 *NetworkRestrictionsResponse } // Status returns HTTPResponse.Status -func (r V1UpdateNetworkRestrictionsResponse) Status() string { +func (r V1BulkCreateSecretsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8178,20 +10290,21 @@ func (r V1UpdateNetworkRestrictionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdateNetworkRestrictionsResponse) StatusCode() int { +func (r V1BulkCreateSecretsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1PauseAProjectResponse struct { +type V1GetSslEnforcementConfigResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *SslEnforcementResponse } // Status returns HTTPResponse.Status -func (r V1PauseAProjectResponse) Status() string { +func (r V1GetSslEnforcementConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8199,21 +10312,21 @@ func (r V1PauseAProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1PauseAProjectResponse) StatusCode() int { +func (r V1GetSslEnforcementConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetPgsodiumConfigResponse struct { +type V1UpdateSslEnforcementConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PgsodiumConfigResponse + JSON200 *SslEnforcementResponse } // Status returns HTTPResponse.Status -func (r V1GetPgsodiumConfigResponse) Status() string { +func (r V1UpdateSslEnforcementConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8221,21 +10334,21 @@ func (r V1GetPgsodiumConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetPgsodiumConfigResponse) StatusCode() int { +func (r V1UpdateSslEnforcementConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdatePgsodiumConfigResponse struct { +type V1ListAllBucketsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PgsodiumConfigResponse + JSON200 *[]V1StorageBucketResponse } // Status returns HTTPResponse.Status -func (r V1UpdatePgsodiumConfigResponse) Status() string { +func (r V1ListAllBucketsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8243,21 +10356,21 @@ func (r V1UpdatePgsodiumConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdatePgsodiumConfigResponse) StatusCode() int { +func (r V1ListAllBucketsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetPostgrestServiceConfigResponse struct { +type V1GenerateTypescriptTypesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PostgrestConfigWithJWTSecretResponse + JSON200 *TypescriptResponse } // Status returns HTTPResponse.Status -func (r V1GetPostgrestServiceConfigResponse) Status() string { +func (r V1GenerateTypescriptTypesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8265,21 +10378,21 @@ func (r V1GetPostgrestServiceConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetPostgrestServiceConfigResponse) StatusCode() int { +func (r V1GenerateTypescriptTypesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1UpdatePostgrestServiceConfigResponse struct { +type V1UpgradePostgresVersionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *V1PostgrestConfigResponse + JSON201 *ProjectUpgradeInitiateResponse } // Status returns HTTPResponse.Status -func (r V1UpdatePostgrestServiceConfigResponse) Status() string { +func (r V1UpgradePostgresVersionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8287,20 +10400,21 @@ func (r V1UpdatePostgrestServiceConfigResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1UpdatePostgrestServiceConfigResponse) StatusCode() int { +func (r V1UpgradePostgresVersionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1RemoveAReadReplicaResponse struct { +type V1GetPostgresUpgradeEligibilityResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ProjectUpgradeEligibilityResponse } // Status returns HTTPResponse.Status -func (r V1RemoveAReadReplicaResponse) Status() string { +func (r V1GetPostgresUpgradeEligibilityResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8308,20 +10422,21 @@ func (r V1RemoveAReadReplicaResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1RemoveAReadReplicaResponse) StatusCode() int { +func (r V1GetPostgresUpgradeEligibilityResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1SetupAReadReplicaResponse struct { +type V1GetPostgresUpgradeStatusResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *DatabaseUpgradeStatusResponse } // Status returns HTTPResponse.Status -func (r V1SetupAReadReplicaResponse) Status() string { +func (r V1GetPostgresUpgradeStatusResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8329,21 +10444,20 @@ func (r V1SetupAReadReplicaResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1SetupAReadReplicaResponse) StatusCode() int { +func (r V1GetPostgresUpgradeStatusResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1GetReadonlyModeStatusResponse struct { +type V1DeactivateVanitySubdomainConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *ReadOnlyStatusResponse } // Status returns HTTPResponse.Status -func (r V1GetReadonlyModeStatusResponse) Status() string { +func (r V1DeactivateVanitySubdomainConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8351,20 +10465,21 @@ func (r V1GetReadonlyModeStatusResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1GetReadonlyModeStatusResponse) StatusCode() int { +func (r V1DeactivateVanitySubdomainConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1DisableReadonlyModeTemporarilyResponse struct { +type V1GetVanitySubdomainConfigResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *VanitySubdomainConfigResponse } // Status returns HTTPResponse.Status -func (r V1DisableReadonlyModeTemporarilyResponse) Status() string { +func (r V1GetVanitySubdomainConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8372,21 +10487,21 @@ func (r V1DisableReadonlyModeTemporarilyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1DisableReadonlyModeTemporarilyResponse) StatusCode() int { +func (r V1GetVanitySubdomainConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1ListAvailableRestoreVersionsResponse struct { +type V1ActivateVanitySubdomainConfigResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *GetProjectAvailableRestoreVersionsResponse + JSON201 *ActivateVanitySubdomainResponse } // Status returns HTTPResponse.Status -func (r V1ListAvailableRestoreVersionsResponse) Status() string { +func (r V1ActivateVanitySubdomainConfigResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8394,20 +10509,21 @@ func (r V1ListAvailableRestoreVersionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1ListAvailableRestoreVersionsResponse) StatusCode() int { +func (r V1ActivateVanitySubdomainConfigResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1RestoreAProjectResponse struct { +type V1CheckVanitySubdomainAvailabilityResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *SubdomainAvailabilityResponse } // Status returns HTTPResponse.Status -func (r V1RestoreAProjectResponse) Status() string { +func (r V1CheckVanitySubdomainAvailabilityResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8415,20 +10531,21 @@ func (r V1RestoreAProjectResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1RestoreAProjectResponse) StatusCode() int { +func (r V1CheckVanitySubdomainAvailabilityResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1CancelAProjectRestorationResponse struct { +type V1ListAllSnippetsResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *SnippetList } // Status returns HTTPResponse.Status -func (r V1CancelAProjectRestorationResponse) Status() string { +func (r V1ListAllSnippetsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8436,21 +10553,21 @@ func (r V1CancelAProjectRestorationResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1CancelAProjectRestorationResponse) StatusCode() int { +func (r V1ListAllSnippetsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type V1BulkDeleteSecretsResponse struct { +type V1GetASnippetResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *map[string]interface{} + JSON200 *SnippetResponse } // Status returns HTTPResponse.Status -func (r V1BulkDeleteSecretsResponse) Status() string { +func (r V1GetASnippetResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -8458,1501 +10575,1796 @@ func (r V1BulkDeleteSecretsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r V1BulkDeleteSecretsResponse) StatusCode() int { +func (r V1GetASnippetResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } - return 0 -} - -type V1ListAllSecretsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]SecretResponse + return 0 +} + +// 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) +} + +// 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) +} + +// 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) +} + +// 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 ParseV1CreateAnOrganizationResponse(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...) + if err != nil { + return nil, err + } + return ParseV1GetAnOrganizationResponse(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...) + if err != nil { + return nil, err + } + return ParseV1ListOrganizationMembersResponse(rsp) +} + +// 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 ParseV1GetOrganizationProjectClaimResponse(rsp) +} + +// 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 ParseV1ClaimProjectForOrganizationResponse(rsp) +} + +// 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) +} + +// 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 ParseV1CreateAProjectResponse(rsp) +} + +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 ParseV1CreateAProjectResponse(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...) + if err != nil { + return nil, err + } + return ParseV1DeleteAProjectResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1ListAllSecretsResponse) 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 V1ListAllSecretsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// GetPerformanceAdvisorsWithResponse request returning *GetPerformanceAdvisorsResponse +func (c *ClientWithResponses) GetPerformanceAdvisorsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetPerformanceAdvisorsResponse, error) { + rsp, err := c.GetPerformanceAdvisors(ctx, ref, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseGetPerformanceAdvisorsResponse(rsp) } -type V1BulkCreateSecretsResponse struct { - Body []byte - HTTPResponse *http.Response +// GetSecurityAdvisorsWithResponse request returning *GetSecurityAdvisorsResponse +func (c *ClientWithResponses) GetSecurityAdvisorsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetSecurityAdvisorsResponse, error) { + rsp, err := c.GetSecurityAdvisors(ctx, ref, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSecurityAdvisorsResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1BulkCreateSecretsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// 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...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseGetLogsResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1BulkCreateSecretsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// GetApiCountsWithResponse request returning *GetApiCountsResponse +func (c *ClientWithResponses) GetApiCountsWithResponse(ctx context.Context, ref string, params *GetApiCountsParams, reqEditors ...RequestEditorFn) (*GetApiCountsResponse, error) { + rsp, err := c.GetApiCounts(ctx, ref, params, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseGetApiCountsResponse(rsp) } -type V1GetSslEnforcementConfigResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SslEnforcementResponse +// GetApiRequestsCountWithResponse request returning *GetApiRequestsCountResponse +func (c *ClientWithResponses) GetApiRequestsCountWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetApiRequestsCountResponse, error) { + rsp, err := c.GetApiRequestsCount(ctx, ref, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiRequestsCountResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1GetSslEnforcementConfigResponse) 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 V1GetSslEnforcementConfigResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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...) + if err != nil { + return nil, err } - return 0 + return ParseCreateApiKeyResponse(rsp) } -type V1UpdateSslEnforcementConfigResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SslEnforcementResponse +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...) + if err != nil { + return nil, err + } + return ParseCreateApiKeyResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1UpdateSslEnforcementConfigResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// DeleteApiKeyWithResponse request returning *DeleteApiKeyResponse +func (c *ClientWithResponses) DeleteApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error) { + rsp, err := c.DeleteApiKey(ctx, ref, id, params, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseDeleteApiKeyResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1UpdateSslEnforcementConfigResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// GetApiKeyWithResponse request returning *GetApiKeyResponse +func (c *ClientWithResponses) GetApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *GetApiKeyParams, reqEditors ...RequestEditorFn) (*GetApiKeyResponse, error) { + rsp, err := c.GetApiKey(ctx, ref, id, params, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseGetApiKeyResponse(rsp) } -type V1ListAllBucketsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *[]V1StorageBucketResponse +// UpdateApiKeyWithBodyWithResponse request with arbitrary body returning *UpdateApiKeyResponse +func (c *ClientWithResponses) UpdateApiKeyWithBodyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *UpdateApiKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error) { + rsp, err := c.UpdateApiKeyWithBody(ctx, ref, id, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateApiKeyResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1ListAllBucketsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +func (c *ClientWithResponses) UpdateApiKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, params *UpdateApiKeyParams, body UpdateApiKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateApiKeyResponse, error) { + rsp, err := c.UpdateApiKey(ctx, ref, id, params, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseUpdateApiKeyResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1ListAllBucketsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseV1ListProjectAddonsResponse(rsp) } -type V1GenerateTypescriptTypesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *TypescriptResponse +// 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 ParseV1ApplyProjectAddonResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1GenerateTypescriptTypesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +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 http.StatusText(0) + return ParseV1ApplyProjectAddonResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1GenerateTypescriptTypesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseV1RemoveProjectAddonResponse(rsp) } -type V1UpgradePostgresVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *ProjectUpgradeInitiateResponse +// 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 ParseV1DisablePreviewBranchingResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1UpgradePostgresVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// 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 http.StatusText(0) + return ParseV1ListAllBranchesResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1UpgradePostgresVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseV1CreateABranchResponse(rsp) } -type V1GetPostgresUpgradeEligibilityResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *ProjectUpgradeEligibilityResponse +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 ParseV1CreateABranchResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1GetPostgresUpgradeEligibilityResponse) 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 V1GetPostgresUpgradeEligibilityResponse) 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 V1GetPostgresUpgradeStatusResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *DatabaseUpgradeStatusResponse +// 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 V1GetPostgresUpgradeStatusResponse) 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 V1GetPostgresUpgradeStatusResponse) 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 V1DeactivateVanitySubdomainConfigResponse struct { - Body []byte - HTTPResponse *http.Response +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 V1DeactivateVanitySubdomainConfigResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// ListSigningKeysForProjectWithResponse request returning *ListSigningKeysForProjectResponse +func (c *ClientWithResponses) ListSigningKeysForProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*ListSigningKeysForProjectResponse, error) { + rsp, err := c.ListSigningKeysForProject(ctx, ref, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseListSigningKeysForProjectResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1DeactivateVanitySubdomainConfigResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// CreateSigningKeyForProjectWithBodyWithResponse request with arbitrary body returning *CreateSigningKeyForProjectResponse +func (c *ClientWithResponses) CreateSigningKeyForProjectWithBodyWithResponse(ctx context.Context, ref string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSigningKeyForProjectResponse, error) { + rsp, err := c.CreateSigningKeyForProjectWithBody(ctx, ref, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseCreateSigningKeyForProjectResponse(rsp) } -type V1GetVanitySubdomainConfigResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *VanitySubdomainConfigResponse +func (c *ClientWithResponses) CreateSigningKeyForProjectWithResponse(ctx context.Context, ref string, body CreateSigningKeyForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSigningKeyForProjectResponse, error) { + rsp, err := c.CreateSigningKeyForProject(ctx, ref, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateSigningKeyForProjectResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1GetVanitySubdomainConfigResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// DeleteSigningKeyWithResponse request returning *DeleteSigningKeyResponse +func (c *ClientWithResponses) DeleteSigningKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteSigningKeyResponse, error) { + rsp, err := c.DeleteSigningKey(ctx, ref, id, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseDeleteSigningKeyResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1GetVanitySubdomainConfigResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// GetSigningKeyForProjectWithResponse request returning *GetSigningKeyForProjectResponse +func (c *ClientWithResponses) GetSigningKeyForProjectWithResponse(ctx context.Context, ref string, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetSigningKeyForProjectResponse, error) { + rsp, err := c.GetSigningKeyForProject(ctx, ref, id, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseGetSigningKeyForProjectResponse(rsp) } -type V1ActivateVanitySubdomainConfigResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *ActivateVanitySubdomainResponse +// PatchSigningKeyWithBodyWithResponse request with arbitrary body returning *PatchSigningKeyResponse +func (c *ClientWithResponses) PatchSigningKeyWithBodyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSigningKeyResponse, error) { + rsp, err := c.PatchSigningKeyWithBody(ctx, ref, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchSigningKeyResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1ActivateVanitySubdomainConfigResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +func (c *ClientWithResponses) PatchSigningKeyWithResponse(ctx context.Context, ref string, id openapi_types.UUID, body PatchSigningKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSigningKeyResponse, error) { + rsp, err := c.PatchSigningKey(ctx, ref, id, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParsePatchSigningKeyResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1ActivateVanitySubdomainConfigResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseV1ListAllSsoProviderResponse(rsp) } -type V1CheckVanitySubdomainAvailabilityResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *SubdomainAvailabilityResponse +// 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 ParseV1CreateASsoProviderResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1CheckVanitySubdomainAvailabilityResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +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 http.StatusText(0) + return ParseV1CreateASsoProviderResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1CheckVanitySubdomainAvailabilityResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// 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 0 + return ParseV1DeleteASsoProviderResponse(rsp) } -type V1ListAllSnippetsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SnippetList +// 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 ParseV1GetASsoProviderResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1ListAllSnippetsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// 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 http.StatusText(0) + return ParseV1UpdateASsoProviderResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1ListAllSnippetsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +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 0 + return ParseV1UpdateASsoProviderResponse(rsp) } -type V1GetASnippetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SnippetResponse +// ListTPAForProjectWithResponse request returning *ListTPAForProjectResponse +func (c *ClientWithResponses) ListTPAForProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*ListTPAForProjectResponse, error) { + rsp, err := c.ListTPAForProject(ctx, ref, reqEditors...) + if err != nil { + return nil, err + } + return ParseListTPAForProjectResponse(rsp) } -// Status returns HTTPResponse.Status -func (r V1GetASnippetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// 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...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseCreateTPAForProjectResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r V1GetASnippetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) CreateTPAForProjectWithResponse(ctx context.Context, ref string, body CreateTPAForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTPAForProjectResponse, error) { + rsp, err := c.CreateTPAForProject(ctx, ref, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseCreateTPAForProjectResponse(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...) +// DeleteTPAForProjectWithResponse request returning *DeleteTPAForProjectResponse +func (c *ClientWithResponses) DeleteTPAForProjectWithResponse(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteTPAForProjectResponse, error) { + rsp, err := c.DeleteTPAForProject(ctx, ref, tpaId, reqEditors...) if err != nil { return nil, err } - return ParseV1DeleteABranchResponse(rsp) + return ParseDeleteTPAForProjectResponse(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...) +// GetTPAForProjectWithResponse request returning *GetTPAForProjectResponse +func (c *ClientWithResponses) GetTPAForProjectWithResponse(ctx context.Context, ref string, tpaId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetTPAForProjectResponse, error) { + rsp, err := c.GetTPAForProject(ctx, ref, tpaId, reqEditors...) if err != nil { return nil, err } - return ParseV1GetABranchConfigResponse(rsp) + return ParseGetTPAForProjectResponse(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...) +// 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 ParseV1UpdateABranchConfigResponse(rsp) + return ParseV1GetProjectPgbouncerConfigResponse(rsp) } -func (c *ClientWithResponses) V1UpdateABranchConfigWithResponse(ctx context.Context, branchId string, body V1UpdateABranchConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateABranchConfigResponse, error) { - rsp, err := c.V1UpdateABranchConfig(ctx, branchId, body, reqEditors...) +// 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 ParseV1UpdateABranchConfigResponse(rsp) + return ParseV1GetPoolerConfigResponse(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...) +// 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 ParseV1PushABranchResponse(rsp) + return ParseV1UpdatePoolerConfigResponse(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...) +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 ParseV1ResetABranchResponse(rsp) + return ParseV1UpdatePoolerConfigResponse(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...) +// 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 ParseV1AuthorizeUserResponse(rsp) + return ParseV1GetPostgresConfigResponse(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...) +// 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 ParseV1RevokeTokenResponse(rsp) + return ParseV1UpdatePostgresConfigResponse(rsp) } -func (c *ClientWithResponses) V1RevokeTokenWithResponse(ctx context.Context, body V1RevokeTokenJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RevokeTokenResponse, error) { - rsp, err := c.V1RevokeToken(ctx, body, 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 ParseV1RevokeTokenResponse(rsp) + return ParseV1UpdatePostgresConfigResponse(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...) +// 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 ParseV1ExchangeOauthTokenResponse(rsp) + return ParseV1GetStorageConfigResponse(rsp) } -func (c *ClientWithResponses) V1ExchangeOauthTokenWithFormdataBodyWithResponse(ctx context.Context, body V1ExchangeOauthTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*V1ExchangeOauthTokenResponse, error) { - rsp, err := c.V1ExchangeOauthTokenWithFormdataBody(ctx, 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 ParseV1ExchangeOauthTokenResponse(rsp) + return ParseV1UpdateStorageConfigResponse(rsp) } -// V1ListAllOrganizationsWithResponse request returning *V1ListAllOrganizationsResponse -func (c *ClientWithResponses) V1ListAllOrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*V1ListAllOrganizationsResponse, error) { - rsp, err := c.V1ListAllOrganizations(ctx, 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 ParseV1ListAllOrganizationsResponse(rsp) + return ParseV1UpdateStorageConfigResponse(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...) +// 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 ParseV1CreateAnOrganizationResponse(rsp) + return ParseV1DeleteHostnameConfigResponse(rsp) } -func (c *ClientWithResponses) V1CreateAnOrganizationWithResponse(ctx context.Context, body V1CreateAnOrganizationJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAnOrganizationResponse, error) { - rsp, err := c.V1CreateAnOrganization(ctx, body, 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 ParseV1CreateAnOrganizationResponse(rsp) + return ParseV1GetHostnameConfigResponse(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...) +// 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 ParseV1GetAnOrganizationResponse(rsp) + return ParseV1ActivateCustomHostnameResponse(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...) +// 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 ParseV1ListOrganizationMembersResponse(rsp) + return ParseV1UpdateHostnameConfigResponse(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) 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 ParseV1ListAllProjectsResponse(rsp) + return ParseV1UpdateHostnameConfigResponse(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...) +// 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 ParseV1CreateAProjectResponse(rsp) + return ParseV1VerifyDnsConfigResponse(rsp) } -func (c *ClientWithResponses) V1CreateAProjectWithResponse(ctx context.Context, body V1CreateAProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateAProjectResponse, error) { - rsp, err := c.V1CreateAProject(ctx, body, 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 ParseV1CreateAProjectResponse(rsp) + return ParseV1ListAllBackupsResponse(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...) +// 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 ParseV1DeleteAProjectResponse(rsp) + return ParseV1RestorePitrBackupResponse(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...) +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 ParseV1GetProjectResponse(rsp) + return ParseV1RestorePitrBackupResponse(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...) +// GetDatabaseMetadataWithResponse request returning *GetDatabaseMetadataResponse +func (c *ClientWithResponses) GetDatabaseMetadataWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*GetDatabaseMetadataResponse, error) { + rsp, err := c.GetDatabaseMetadata(ctx, ref, reqEditors...) if err != nil { return nil, err } - return ParseGetLogsResponse(rsp) + return ParseGetDatabaseMetadataResponse(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...) +// 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 ParseV1GetProjectApiKeysResponse(rsp) + return ParseV1ListMigrationHistoryResponse(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...) +// 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 ParseCreateApiKeyResponse(rsp) + return ParseV1ApplyAMigrationResponse(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...) +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 ParseCreateApiKeyResponse(rsp) + return ParseV1ApplyAMigrationResponse(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...) +// 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 ParseDeleteApiKeyResponse(rsp) + return ParseV1RunAQueryResponse(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...) +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 ParseGetApiKeyResponse(rsp) + return ParseV1RunAQueryResponse(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...) +// 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 ParseUpdateApiKeyResponse(rsp) + return ParseV1EnableDatabaseWebhookResponse(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...) +// 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 ParseUpdateApiKeyResponse(rsp) + return ParseV1ListAllFunctionsResponse(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...) +// 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 ParseV1DisablePreviewBranchingResponse(rsp) + return ParseV1CreateAFunctionResponse(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...) +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 ParseV1ListAllBranchesResponse(rsp) + return ParseV1CreateAFunctionResponse(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...) +// 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 ParseV1CreateABranchResponse(rsp) + return ParseV1BulkUpdateFunctionsResponse(rsp) } -func (c *ClientWithResponses) V1CreateABranchWithResponse(ctx context.Context, ref string, body V1CreateABranchJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateABranchResponse, error) { - rsp, err := c.V1CreateABranch(ctx, ref, 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 ParseV1CreateABranchResponse(rsp) + return ParseV1BulkUpdateFunctionsResponse(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...) +// 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 ParseV1GetAuthServiceConfigResponse(rsp) + return ParseV1DeployAFunctionResponse(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...) +// 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 ParseV1UpdateAuthServiceConfigResponse(rsp) + return ParseV1DeleteAFunctionResponse(rsp) } -func (c *ClientWithResponses) V1UpdateAuthServiceConfigWithResponse(ctx context.Context, ref string, body V1UpdateAuthServiceConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateAuthServiceConfigResponse, error) { - rsp, err := c.V1UpdateAuthServiceConfig(ctx, ref, body, 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 ParseV1UpdateAuthServiceConfigResponse(rsp) + return ParseV1GetAFunctionResponse(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...) +// 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 ParseV1ListAllSsoProviderResponse(rsp) + return ParseV1UpdateAFunctionResponse(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) 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 ParseV1CreateASsoProviderResponse(rsp) + return ParseV1UpdateAFunctionResponse(rsp) } -func (c *ClientWithResponses) V1CreateASsoProviderWithResponse(ctx context.Context, ref string, body V1CreateASsoProviderJSONRequestBody, reqEditors ...RequestEditorFn) (*V1CreateASsoProviderResponse, error) { - rsp, err := c.V1CreateASsoProvider(ctx, ref, body, 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 ParseV1CreateASsoProviderResponse(rsp) + return ParseV1GetAFunctionBodyResponse(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...) +// 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 ParseV1DeleteASsoProviderResponse(rsp) + return ParseV1GetServicesHealthResponse(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...) +// 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 ParseV1GetASsoProviderResponse(rsp) + return ParseV1DeleteNetworkBansResponse(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...) +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 ParseV1UpdateASsoProviderResponse(rsp) + return ParseV1DeleteNetworkBansResponse(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...) +// 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 ParseV1UpdateASsoProviderResponse(rsp) + return ParseV1ListAllNetworkBansResponse(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...) +// 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 ParseListTPAForProjectResponse(rsp) + return ParseV1ListAllNetworkBansEnrichedResponse(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...) +// 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 ParseCreateTPAForProjectResponse(rsp) + return ParseV1GetNetworkRestrictionsResponse(rsp) } -func (c *ClientWithResponses) CreateTPAForProjectWithResponse(ctx context.Context, ref string, body CreateTPAForProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTPAForProjectResponse, error) { - rsp, err := c.CreateTPAForProject(ctx, ref, 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 ParseCreateTPAForProjectResponse(rsp) + return ParseV1UpdateNetworkRestrictionsResponse(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) 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 ParseDeleteTPAForProjectResponse(rsp) + return ParseV1UpdateNetworkRestrictionsResponse(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...) +// 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 ParseGetTPAForProjectResponse(rsp) + return ParseV1PauseAProjectResponse(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...) +// 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 ParseV1GetProjectPgbouncerConfigResponse(rsp) + return ParseV1GetPgsodiumConfigResponse(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...) +// 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 ParseV1GetSupavisorConfigResponse(rsp) + return ParseV1UpdatePgsodiumConfigResponse(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...) +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 ParseV1UpdateSupavisorConfigResponse(rsp) + return ParseV1UpdatePgsodiumConfigResponse(rsp) } -func (c *ClientWithResponses) V1UpdateSupavisorConfigWithResponse(ctx context.Context, ref string, body V1UpdateSupavisorConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateSupavisorConfigResponse, error) { - rsp, err := c.V1UpdateSupavisorConfig(ctx, ref, 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 ParseV1UpdateSupavisorConfigResponse(rsp) + return ParseV1GetPostgrestServiceConfigResponse(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...) +// 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 ParseV1GetPostgresConfigResponse(rsp) + return ParseV1UpdatePostgrestServiceConfigResponse(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...) +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 ParseV1UpdatePostgresConfigResponse(rsp) + return ParseV1UpdatePostgrestServiceConfigResponse(rsp) } -func (c *ClientWithResponses) V1UpdatePostgresConfigWithResponse(ctx context.Context, ref string, body V1UpdatePostgresConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdatePostgresConfigResponse, error) { - rsp, err := c.V1UpdatePostgresConfig(ctx, ref, body, 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 ParseV1UpdatePostgresConfigResponse(rsp) + return ParseV1RemoveAReadReplicaResponse(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) 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 ParseV1GetStorageConfigResponse(rsp) + return ParseV1RemoveAReadReplicaResponse(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...) +// 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 ParseV1UpdateStorageConfigResponse(rsp) + return ParseV1SetupAReadReplicaResponse(rsp) } -func (c *ClientWithResponses) V1UpdateStorageConfigWithResponse(ctx context.Context, ref string, body V1UpdateStorageConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateStorageConfigResponse, error) { - rsp, err := c.V1UpdateStorageConfig(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 ParseV1UpdateStorageConfigResponse(rsp) + return ParseV1SetupAReadReplicaResponse(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...) +// 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 ParseV1DeleteHostnameConfigResponse(rsp) + return ParseV1GetReadonlyModeStatusResponse(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...) +// 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 ParseV1GetHostnameConfigResponse(rsp) + return ParseV1DisableReadonlyModeTemporarilyResponse(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...) +// 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 ParseV1ActivateCustomHostnameResponse(rsp) + return ParseV1ListAvailableRestoreVersionsResponse(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...) +// 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 ParseV1UpdateHostnameConfigResponse(rsp) + return ParseV1RestoreAProjectResponse(rsp) } -func (c *ClientWithResponses) V1UpdateHostnameConfigWithResponse(ctx context.Context, ref string, body V1UpdateHostnameConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateHostnameConfigResponse, error) { - rsp, err := c.V1UpdateHostnameConfig(ctx, ref, body, 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 ParseV1UpdateHostnameConfigResponse(rsp) + return ParseV1CancelAProjectRestorationResponse(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...) +// 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 ParseV1VerifyDnsConfigResponse(rsp) + return ParseV1BulkDeleteSecretsResponse(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...) +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 ParseV1ListAllBackupsResponse(rsp) + return ParseV1BulkDeleteSecretsResponse(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...) +// 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 ParseV1RestorePitrBackupResponse(rsp) + return ParseV1ListAllSecretsResponse(rsp) } -func (c *ClientWithResponses) V1RestorePitrBackupWithResponse(ctx context.Context, ref string, body V1RestorePitrBackupJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RestorePitrBackupResponse, error) { - rsp, err := c.V1RestorePitrBackup(ctx, ref, body, 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 ParseV1RestorePitrBackupResponse(rsp) + return ParseV1BulkCreateSecretsResponse(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...) +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 ParseGetDatabaseMetadataResponse(rsp) + return ParseV1BulkCreateSecretsResponse(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...) +// 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 ParseV1RunAQueryResponse(rsp) + return ParseV1GetSslEnforcementConfigResponse(rsp) } -func (c *ClientWithResponses) V1RunAQueryWithResponse(ctx context.Context, ref string, body V1RunAQueryJSONRequestBody, reqEditors ...RequestEditorFn) (*V1RunAQueryResponse, error) { - rsp, err := c.V1RunAQuery(ctx, ref, 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 ParseV1RunAQueryResponse(rsp) + return ParseV1UpdateSslEnforcementConfigResponse(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...) +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 ParseV1EnableDatabaseWebhookResponse(rsp) + return ParseV1UpdateSslEnforcementConfigResponse(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...) +// 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 ParseV1ListAllFunctionsResponse(rsp) + return ParseV1ListAllBucketsResponse(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...) +// 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 ParseV1CreateAFunctionResponse(rsp) + return ParseV1GenerateTypescriptTypesResponse(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...) +// 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 ParseV1CreateAFunctionResponse(rsp) + return ParseV1UpgradePostgresVersionResponse(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...) +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 ParseV1BulkUpdateFunctionsResponse(rsp) + return ParseV1UpgradePostgresVersionResponse(rsp) } -func (c *ClientWithResponses) V1BulkUpdateFunctionsWithResponse(ctx context.Context, ref string, body V1BulkUpdateFunctionsJSONRequestBody, reqEditors ...RequestEditorFn) (*V1BulkUpdateFunctionsResponse, error) { - rsp, err := c.V1BulkUpdateFunctions(ctx, ref, 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 ParseV1BulkUpdateFunctionsResponse(rsp) + return ParseV1GetPostgresUpgradeEligibilityResponse(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...) +// 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 ParseV1DeployAFunctionResponse(rsp) + return ParseV1GetPostgresUpgradeStatusResponse(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...) +// 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 ParseV1DeleteAFunctionResponse(rsp) + return ParseV1DeactivateVanitySubdomainConfigResponse(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...) +// 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 ParseV1GetAFunctionResponse(rsp) + return ParseV1GetVanitySubdomainConfigResponse(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...) +// 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 ParseV1UpdateAFunctionResponse(rsp) + return ParseV1ActivateVanitySubdomainConfigResponse(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...) +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 ParseV1UpdateAFunctionResponse(rsp) + return ParseV1ActivateVanitySubdomainConfigResponse(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...) +// 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 ParseV1GetAFunctionBodyResponse(rsp) + return ParseV1CheckVanitySubdomainAvailabilityResponse(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...) +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 ParseV1GetServicesHealthResponse(rsp) + return ParseV1CheckVanitySubdomainAvailabilityResponse(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...) +// 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 ParseV1DeleteNetworkBansResponse(rsp) + return ParseV1ListAllSnippetsResponse(rsp) } -func (c *ClientWithResponses) V1DeleteNetworkBansWithResponse(ctx context.Context, ref string, body V1DeleteNetworkBansJSONRequestBody, reqEditors ...RequestEditorFn) (*V1DeleteNetworkBansResponse, error) { - rsp, err := c.V1DeleteNetworkBans(ctx, ref, body, 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 ParseV1DeleteNetworkBansResponse(rsp) + return ParseV1GetASnippetResponse(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...) +// 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 ParseV1ListAllNetworkBansResponse(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 } -// V1GetNetworkRestrictionsWithResponse request returning *V1GetNetworkRestrictionsResponse -func (c *ClientWithResponses) V1GetNetworkRestrictionsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetNetworkRestrictionsResponse, error) { - rsp, err := c.V1GetNetworkRestrictions(ctx, ref, 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 ParseV1GetNetworkRestrictionsResponse(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...) - if err != nil { - return nil, err + 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 ParseV1UpdateNetworkRestrictionsResponse(rsp) -} -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 ParseV1UpdateNetworkRestrictionsResponse(rsp) + return response, nil } -// V1PauseAProjectWithResponse request returning *V1PauseAProjectResponse -func (c *ClientWithResponses) V1PauseAProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1PauseAProjectResponse, error) { - rsp, err := c.V1PauseAProject(ctx, ref, 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 ParseV1PauseAProjectResponse(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...) - if err != nil { - return nil, err + response := &V1UpdateABranchConfigResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseV1GetPgsodiumConfigResponse(rsp) -} -// 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 + 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 ParseV1UpdatePgsodiumConfigResponse(rsp) + + 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...) +// 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 ParseV1UpdatePgsodiumConfigResponse(rsp) -} -// 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 + response := &V1MergeABranchResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseV1GetPostgrestServiceConfigResponse(rsp) -} -// 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 + 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 ParseV1UpdatePostgrestServiceConfigResponse(rsp) + + 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) -} -// 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 + response := &V1PushABranchResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseV1RemoveAReadReplicaResponse(rsp) -} -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 + 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 ParseV1RemoveAReadReplicaResponse(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...) +// 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 ParseV1SetupAReadReplicaResponse(rsp) -} -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 + response := &V1ResetABranchResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseV1SetupAReadReplicaResponse(rsp) -} -// 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 + 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 ParseV1GetReadonlyModeStatusResponse(rsp) + + return response, nil } -// V1DisableReadonlyModeTemporarilyWithResponse request returning *V1DisableReadonlyModeTemporarilyResponse -func (c *ClientWithResponses) V1DisableReadonlyModeTemporarilyWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DisableReadonlyModeTemporarilyResponse, error) { - rsp, err := c.V1DisableReadonlyModeTemporarily(ctx, ref, 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 ParseV1DisableReadonlyModeTemporarilyResponse(rsp) -} -// 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 + response := &V1AuthorizeUserResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseV1ListAvailableRestoreVersionsResponse(rsp) + + return response, nil } -// 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...) +// 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 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 + response := &V1RevokeTokenResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - 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...) +// 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 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 := &V1ExchangeOauthTokenResponse{ + 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 OAuthTokenResponse + 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...) +// 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 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 := &V1ListAllOrganizationsResponse{ + 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 []OrganizationResponseV1 + 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...) +// 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 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 := &V1CreateAnOrganizationResponse{ + 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 == 201: + var dest OrganizationResponseV1 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &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...) +// 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 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 := &V1GetAnOrganizationResponse{ + 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 V1OrganizationSlugResponse + 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...) +// 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 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 := &V1ListOrganizationMembersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseV1GetPostgresUpgradeEligibilityResponse(rsp) -} -// 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 + 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 ParseV1GetPostgresUpgradeStatusResponse(rsp) + + return response, nil } -// V1DeactivateVanitySubdomainConfigWithResponse request returning *V1DeactivateVanitySubdomainConfigResponse -func (c *ClientWithResponses) V1DeactivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1DeactivateVanitySubdomainConfigResponse, error) { - rsp, err := c.V1DeactivateVanitySubdomainConfig(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 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 + response := &V1GetOrganizationProjectClaimResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseV1GetVanitySubdomainConfigResponse(rsp) -} -// 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 + 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 ParseV1ActivateVanitySubdomainConfigResponse(rsp) + + return response, nil } -func (c *ClientWithResponses) V1ActivateVanitySubdomainConfigWithResponse(ctx context.Context, ref string, body V1ActivateVanitySubdomainConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*V1ActivateVanitySubdomainConfigResponse, error) { - rsp, err := c.V1ActivateVanitySubdomainConfig(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 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 + response := &V1ClaimProjectForOrganizationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - 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...) +// 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 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 := &V1ListAllProjectsResponse{ + 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 []V1ProjectWithDatabaseResponse + 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) { +// 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 } - response := &V1DeleteABranchResponse{ + response := &V1CreateAProjectResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest BranchDeleteResponse + 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.JSON200 = &dest + response.JSON201 = &dest } return response, nil } -// ParseV1GetABranchConfigResponse parses an HTTP response from a V1GetABranchConfigWithResponse call -func ParseV1GetABranchConfigResponse(rsp *http.Response) (*V1GetABranchConfigResponse, error) { +// 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 } - response := &V1GetABranchConfigResponse{ + response := &V1DeleteAProjectResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest BranchDetailResponse + var dest V1ProjectRefResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -9963,22 +12375,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) { +// 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 := &V1UpdateABranchConfigResponse{ + response := &V1GetProjectResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest BranchResponse + var dest V1ProjectWithDatabaseResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -9989,132 +12401,152 @@ 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) { +// ParseGetPerformanceAdvisorsResponse parses an HTTP response from a GetPerformanceAdvisorsWithResponse call +func ParseGetPerformanceAdvisorsResponse(rsp *http.Response) (*GetPerformanceAdvisorsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1PushABranchResponse{ + response := &GetPerformanceAdvisorsResponse{ 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 V1ProjectAdvisorsResponse 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) { +// ParseGetSecurityAdvisorsResponse parses an HTTP response from a GetSecurityAdvisorsWithResponse call +func ParseGetSecurityAdvisorsResponse(rsp *http.Response) (*GetSecurityAdvisorsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1ResetABranchResponse{ + response := &GetSecurityAdvisorsResponse{ 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 V1ProjectAdvisorsResponse 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) { +// ParseGetLogsResponse parses an HTTP response from a GetLogsWithResponse call +func ParseGetLogsResponse(rsp *http.Response) (*GetLogsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1AuthorizeUserResponse{ + response := &GetLogsResponse{ 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) { +// ParseGetApiCountsResponse parses an HTTP response from a GetApiCountsWithResponse call +func ParseGetApiCountsResponse(rsp *http.Response) (*GetApiCountsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1RevokeTokenResponse{ + response := &GetApiCountsResponse{ 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 } -// ParseV1ExchangeOauthTokenResponse parses an HTTP response from a V1ExchangeOauthTokenWithResponse call -func ParseV1ExchangeOauthTokenResponse(rsp *http.Response) (*V1ExchangeOauthTokenResponse, error) { +// ParseGetApiRequestsCountResponse parses an HTTP response from a GetApiRequestsCountWithResponse call +func ParseGetApiRequestsCountResponse(rsp *http.Response) (*GetApiRequestsCountResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1ExchangeOauthTokenResponse{ + response := &GetApiRequestsCountResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest OAuthTokenResponse + 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 } -// ParseV1ListAllOrganizationsResponse parses an HTTP response from a V1ListAllOrganizationsWithResponse call -func ParseV1ListAllOrganizationsResponse(rsp *http.Response) (*V1ListAllOrganizationsResponse, 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 := &V1ListAllOrganizationsResponse{ + response := &V1GetProjectApiKeysResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []OrganizationResponseV1 + var dest []ApiKeyResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10125,22 +12557,22 @@ 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) { +// ParseCreateApiKeyResponse parses an HTTP response from a CreateApiKeyWithResponse call +func ParseCreateApiKeyResponse(rsp *http.Response) (*CreateApiKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1CreateAnOrganizationResponse{ + response := &CreateApiKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest OrganizationResponseV1 + var dest ApiKeyResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10151,22 +12583,22 @@ func ParseV1CreateAnOrganizationResponse(rsp *http.Response) (*V1CreateAnOrganiz return response, nil } -// ParseV1GetAnOrganizationResponse parses an HTTP response from a V1GetAnOrganizationWithResponse call -func ParseV1GetAnOrganizationResponse(rsp *http.Response) (*V1GetAnOrganizationResponse, error) { +// ParseDeleteApiKeyResponse parses an HTTP response from a DeleteApiKeyWithResponse call +func ParseDeleteApiKeyResponse(rsp *http.Response) (*DeleteApiKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1GetAnOrganizationResponse{ + response := &DeleteApiKeyResponse{ 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 +12609,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) { +// ParseGetApiKeyResponse parses an HTTP response from a GetApiKeyWithResponse call +func ParseGetApiKeyResponse(rsp *http.Response) (*GetApiKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1ListOrganizationMembersResponse{ + response := &GetApiKeyResponse{ 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 +12635,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) { +// ParseUpdateApiKeyResponse parses an HTTP response from a UpdateApiKeyWithResponse call +func ParseUpdateApiKeyResponse(rsp *http.Response) (*UpdateApiKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1ListAllProjectsResponse{ + response := &UpdateApiKeyResponse{ 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,100 +12661,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, } - 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 response, nil } -// ParseV1GetProjectResponse parses an HTTP response from a V1GetProjectWithResponse call -func ParseV1GetProjectResponse(rsp *http.Response) (*V1GetProjectResponse, error) { +// 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 := &V1GetProjectResponse{ + response := &V1RemoveProjectAddonResponse{ Body: bodyBytes, HTTPResponse: rsp, } - 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 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 } -// ParseGetLogsResponse parses an HTTP response from a GetLogsWithResponse call -func ParseGetLogsResponse(rsp *http.Response) (*GetLogsResponse, error) { +// 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 := &GetLogsResponse{ + response := &V1ListAllBranchesResponse{ 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,74 +12761,90 @@ 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) { +// 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 := &V1GetProjectApiKeysResponse{ + response := &V1CreateABranchResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []ApiKeyResponse + 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 } -// ParseCreateApiKeyResponse parses an HTTP response from a CreateApiKeyWithResponse call -func ParseCreateApiKeyResponse(rsp *http.Response) (*CreateApiKeyResponse, 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 := &CreateApiKeyResponse{ + 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 == 201: - var dest ApiKeyResponse + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ProjectClaimTokenResponse 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) { +// 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 := &DeleteApiKeyResponse{ + response := &V1CreateProjectClaimTokenResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ApiKeyResponse + var dest CreateProjectClaimTokenResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10411,22 +12855,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) { +// 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 := &GetApiKeyResponse{ + 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 } @@ -10437,22 +12881,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) { +// 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 := &UpdateApiKeyResponse{ + 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 } @@ -10463,90 +12907,100 @@ 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) { +// ParseListSigningKeysForProjectResponse parses an HTTP response from a ListSigningKeysForProjectWithResponse call +func ParseListSigningKeysForProjectResponse(rsp *http.Response) (*ListSigningKeysForProjectResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1DisablePreviewBranchingResponse{ + response := &ListSigningKeysForProjectResponse{ Body: bodyBytes, HTTPResponse: rsp, } + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SigningKeysResponse + 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) { +// ParseCreateSigningKeyForProjectResponse parses an HTTP response from a CreateSigningKeyForProjectWithResponse call +func ParseCreateSigningKeyForProjectResponse(rsp *http.Response) (*CreateSigningKeyForProjectResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1ListAllBranchesResponse{ + response := &CreateSigningKeyForProjectResponse{ 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) { +// ParseDeleteSigningKeyResponse parses an HTTP response from a DeleteSigningKeyWithResponse call +func ParseDeleteSigningKeyResponse(rsp *http.Response) (*DeleteSigningKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1CreateABranchResponse{ + response := &DeleteSigningKeyResponse{ 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) { +// ParseGetSigningKeyForProjectResponse parses an HTTP response from a GetSigningKeyForProjectWithResponse call +func ParseGetSigningKeyForProjectResponse(rsp *http.Response) (*GetSigningKeyForProjectResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1GetAuthServiceConfigResponse{ + response := &GetSigningKeyForProjectResponse{ 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 +13011,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) { +// ParsePatchSigningKeyResponse parses an HTTP response from a PatchSigningKeyWithResponse call +func ParsePatchSigningKeyResponse(rsp *http.Response) (*PatchSigningKeyResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &V1UpdateAuthServiceConfigResponse{ + response := &PatchSigningKeyResponse{ 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 } @@ -10843,15 +13297,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 +13323,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, } @@ -11166,7 +13620,7 @@ func ParseGetDatabaseMetadataResponse(rsp *http.Response) (*GetDatabaseMetadataR switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest GetProjectDbMetadataResponseDto + var dest GetProjectDbMetadataResponse if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11177,27 +13631,59 @@ 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) { +// 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 := &V1RunAQueryResponse{ + response := &V1ListMigrationHistoryResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest map[string]interface{} + 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.JSON201 = &dest + 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 +} + +// 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 @@ -11404,6 +13890,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 +13971,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 +14314,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..5d6a771972 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,105 @@ 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 ( - 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" + CreateSigningKeyBodyAlgorithmES256 CreateSigningKeyBodyAlgorithm = "ES256" + CreateSigningKeyBodyAlgorithmEdDSA CreateSigningKeyBodyAlgorithm = "EdDSA" + CreateSigningKeyBodyAlgorithmHS256 CreateSigningKeyBodyAlgorithm = "HS256" + CreateSigningKeyBodyAlgorithmRS256 CreateSigningKeyBodyAlgorithm = "RS256" ) -// Defines values for DatabaseUpgradeStatusProgress. +// Defines values for CreateSigningKeyBodyStatus. 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" + CreateSigningKeyBodyStatusInUse CreateSigningKeyBodyStatus = "in_use" + CreateSigningKeyBodyStatusStandby CreateSigningKeyBodyStatus = "standby" ) -// Defines values for DatabaseUpgradeStatusStatus. +// Defines values for DatabaseUpgradeStatusResponseDatabaseUpgradeStatusError. const ( - N0 DatabaseUpgradeStatusStatus = 0 - N1 DatabaseUpgradeStatusStatus = 1 - N2 DatabaseUpgradeStatusStatus = 2 + 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 +252,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 +266,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" @@ -176,6 +462,22 @@ 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 +485,31 @@ 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" + 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 +534,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 ( + SigningKeyResponseStatusInUse SigningKeyResponseStatus = "in_use" + SigningKeyResponseStatusPreviouslyUsed SigningKeyResponseStatus = "previously_used" + SigningKeyResponseStatusRevoked SigningKeyResponseStatus = "revoked" + SigningKeyResponseStatusStandby SigningKeyResponseStatus = "standby" +) + +// Defines values for SigningKeysResponseKeysAlgorithm. +const ( + 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 ( - SnippetMetaTypeSql SnippetMetaType = "sql" + SnippetListDataTypeSql SnippetListDataType = "sql" ) -// Defines values for SnippetMetaVisibility. +// Defines values for SnippetListDataVisibility. const ( - SnippetMetaVisibilityOrg SnippetMetaVisibility = "org" - SnippetMetaVisibilityProject SnippetMetaVisibility = "project" - SnippetMetaVisibilityPublic SnippetMetaVisibility = "public" - SnippetMetaVisibilityUser SnippetMetaVisibility = "user" + SnippetListDataVisibilityOrg SnippetListDataVisibility = "org" + SnippetListDataVisibilityProject SnippetListDataVisibility = "project" + SnippetListDataVisibilityPublic SnippetListDataVisibility = "public" + SnippetListDataVisibilityUser SnippetListDataVisibility = "user" ) // Defines values for SnippetResponseType. @@ -280,10 +606,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,68 +653,99 @@ 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 UpdateSupavisorConfigBodyPoolMode. const ( UpdateSupavisorConfigBodyPoolModeSession UpdateSupavisorConfigBodyPoolMode = "session" UpdateSupavisorConfigBodyPoolModeTransaction UpdateSupavisorConfigBodyPoolMode = "transaction" ) -// Defines values for UpdateSupavisorConfigResponsePoolMode. +// Defines values for UpgradeDatabaseBodyReleaseChannel. +const ( + UpgradeDatabaseBodyReleaseChannelAlpha UpgradeDatabaseBodyReleaseChannel = "alpha" + UpgradeDatabaseBodyReleaseChannelBeta UpgradeDatabaseBodyReleaseChannel = "beta" + UpgradeDatabaseBodyReleaseChannelGa UpgradeDatabaseBodyReleaseChannel = "ga" + UpgradeDatabaseBodyReleaseChannelInternal UpgradeDatabaseBodyReleaseChannel = "internal" + UpgradeDatabaseBodyReleaseChannelPreview UpgradeDatabaseBodyReleaseChannel = "preview" + UpgradeDatabaseBodyReleaseChannelWithdrawn UpgradeDatabaseBodyReleaseChannel = "withdrawn" +) + +// Defines values for V1BackupsResponseBackupsStatus. const ( - UpdateSupavisorConfigResponsePoolModeSession UpdateSupavisorConfigResponsePoolMode = "session" - UpdateSupavisorConfigResponsePoolModeTransaction UpdateSupavisorConfigResponsePoolMode = "transaction" + V1BackupsResponseBackupsStatusARCHIVED V1BackupsResponseBackupsStatus = "ARCHIVED" + V1BackupsResponseBackupsStatusCANCELLED V1BackupsResponseBackupsStatus = "CANCELLED" + V1BackupsResponseBackupsStatusCOMPLETED V1BackupsResponseBackupsStatus = "COMPLETED" + V1BackupsResponseBackupsStatusFAILED V1BackupsResponseBackupsStatus = "FAILED" + V1BackupsResponseBackupsStatusPENDING V1BackupsResponseBackupsStatus = "PENDING" + V1BackupsResponseBackupsStatusREMOVED V1BackupsResponseBackupsStatus = "REMOVED" ) -// Defines values for V1BackupStatus. +// Defines values for V1CreateProjectBodyDesiredInstanceSize. const ( - V1BackupStatusARCHIVED V1BackupStatus = "ARCHIVED" - V1BackupStatusCANCELLED V1BackupStatus = "CANCELLED" - V1BackupStatusCOMPLETED V1BackupStatus = "COMPLETED" - V1BackupStatusFAILED V1BackupStatus = "FAILED" - V1BackupStatusPENDING V1BackupStatus = "PENDING" - V1BackupStatusREMOVED V1BackupStatus = "REMOVED" + 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" + V1CreateProjectBodyDesiredInstanceSizePico V1CreateProjectBodyDesiredInstanceSize = "pico" + V1CreateProjectBodyDesiredInstanceSizeSmall V1CreateProjectBodyDesiredInstanceSize = "small" + V1CreateProjectBodyDesiredInstanceSizeXlarge V1CreateProjectBodyDesiredInstanceSize = "xlarge" ) -// Defines values for V1CreateProjectBodyDtoDesiredInstanceSize. +// Defines values for V1CreateProjectBodyPlan. 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" + V1CreateProjectBodyPlanFree V1CreateProjectBodyPlan = "free" + V1CreateProjectBodyPlanPro V1CreateProjectBodyPlan = "pro" ) -// Defines values for V1CreateProjectBodyDtoPlan. +// Defines values for V1CreateProjectBodyRegion. const ( - V1CreateProjectBodyDtoPlanFree V1CreateProjectBodyDtoPlan = "free" - V1CreateProjectBodyDtoPlanPro V1CreateProjectBodyDtoPlan = "pro" + 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 V1CreateProjectBodyDtoRegion. +// Defines values for V1OrganizationSlugResponseAllowedReleaseChannels. 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" + V1OrganizationSlugResponseAllowedReleaseChannelsAlpha V1OrganizationSlugResponseAllowedReleaseChannels = "alpha" + V1OrganizationSlugResponseAllowedReleaseChannelsBeta V1OrganizationSlugResponseAllowedReleaseChannels = "beta" + V1OrganizationSlugResponseAllowedReleaseChannelsGa V1OrganizationSlugResponseAllowedReleaseChannels = "ga" + V1OrganizationSlugResponseAllowedReleaseChannelsInternal V1OrganizationSlugResponseAllowedReleaseChannels = "internal" + V1OrganizationSlugResponseAllowedReleaseChannelsPreview V1OrganizationSlugResponseAllowedReleaseChannels = "preview" + V1OrganizationSlugResponseAllowedReleaseChannelsWithdrawn V1OrganizationSlugResponseAllowedReleaseChannels = "withdrawn" ) // Defines values for V1OrganizationSlugResponseOptInTags. @@ -381,11 +753,79 @@ const ( 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 +866,11 @@ const ( V1ProjectWithDatabaseResponseStatusUPGRADING V1ProjectWithDatabaseResponseStatus = "UPGRADING" ) +// Defines values for V1ServiceHealthResponseInfo0Name. +const ( + GoTrue V1ServiceHealthResponseInfo0Name = "GoTrue" +) + // Defines values for V1ServiceHealthResponseName. const ( V1ServiceHealthResponseNameAuth V1ServiceHealthResponseName = "auth" @@ -438,9 +883,9 @@ const ( // Defines values for V1ServiceHealthResponseStatus. const ( - ACTIVEHEALTHY V1ServiceHealthResponseStatus = "ACTIVE_HEALTHY" - COMINGUP V1ServiceHealthResponseStatus = "COMING_UP" - UNHEALTHY V1ServiceHealthResponseStatus = "UNHEALTHY" + V1ServiceHealthResponseStatusACTIVEHEALTHY V1ServiceHealthResponseStatus = "ACTIVE_HEALTHY" + V1ServiceHealthResponseStatusCOMINGUP V1ServiceHealthResponseStatus = "COMING_UP" + V1ServiceHealthResponseStatusUNHEALTHY V1ServiceHealthResponseStatus = "UNHEALTHY" ) // Defines values for VanitySubdomainConfigResponseStatus. @@ -464,14 +909,25 @@ const ( Sha256 V1AuthorizeUserParamsCodeChallengeMethod = "sha256" ) +// Defines values for GetApiCountsParamsInterval. +const ( + N15min GetApiCountsParamsInterval = "15min" + N1day GetApiCountsParamsInterval = "1day" + N1hr GetApiCountsParamsInterval = "1hr" + N30min GetApiCountsParamsInterval = "30min" + N3day GetApiCountsParamsInterval = "3day" + N3hr GetApiCountsParamsInterval = "3hr" + N7day GetApiCountsParamsInterval = "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 +947,277 @@ 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 string `json:"api_key"` + 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[struct { + Role string `json:"role"` + }] `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"` + 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[string] `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"` @@ -774,12 +1259,15 @@ 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"` Id string `json:"id"` @@ -797,22 +1285,32 @@ 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"` + 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[struct { + Role string `json:"role"` + }] `json:"secret_jwt_template,omitempty"` + Type CreateApiKeyBodyType `json:"type"` } // CreateApiKeyBodyType defines model for CreateApiKeyBody.Type. @@ -820,28 +1318,56 @@ 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"` + 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"` } -// 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 +1378,145 @@ 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"` -} - -// 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"` -} - -// 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"` +// CreateSigningKeyBody defines model for CreateSigningKeyBody. +type CreateSigningKeyBody struct { + Algorithm CreateSigningKeyBodyAlgorithm `json:"algorithm"` + Status *CreateSigningKeyBodyStatus `json:"status,omitempty"` } -// DatabaseUpgradeStatusError defines model for DatabaseUpgradeStatus.Error. -type DatabaseUpgradeStatusError string +// CreateSigningKeyBodyAlgorithm defines model for CreateSigningKeyBody.Algorithm. +type CreateSigningKeyBodyAlgorithm string -// DatabaseUpgradeStatusProgress defines model for DatabaseUpgradeStatus.Progress. -type DatabaseUpgradeStatusProgress string +// CreateSigningKeyBodyStatus defines model for CreateSigningKeyBody.Status. +type CreateSigningKeyBodyStatus string -// DatabaseUpgradeStatusStatus defines model for DatabaseUpgradeStatus.Status. -type DatabaseUpgradeStatusStatus int +// 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 *DatabaseUpgradeStatus `json:"databaseUpgradeStatus"` + 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 *[]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"` } // 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"` + 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"` } // DeployFunctionResponseStatus defines model for DeployFunctionResponse.Status. type DeployFunctionResponseStatus string -// DesiredInstanceSize defines model for DesiredInstanceSize. -type DesiredInstanceSize 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"` -} - // FunctionDeployBody defines model for FunctionDeployBody. type FunctionDeployBody struct { - File []openapi_types.File `json:"file"` - Metadata FunctionDeployMetadata `json:"metadata"` -} - -// 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"` + 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"` + 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 +1524,17 @@ 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"` + 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 +1542,198 @@ 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"` +} + +// 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 +1741,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 +1758,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 +1779,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,13 +1788,13 @@ 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"` } // OAuthTokenBodyGrantType defines model for OAuthTokenBody.GrantType. @@ -1086,7 +1803,7 @@ type OAuthTokenBodyGrantType 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 +1811,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 +1892,56 @@ 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"` + 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 []struct { + AppVersion string `json:"app_version"` + PostgresVersion ProjectUpgradeEligibilityResponseTargetUpgradeVersionsPostgresVersion `json:"postgres_version"` + ReleaseChannel ProjectUpgradeEligibilityResponseTargetUpgradeVersionsReleaseChannel `json:"release_channel"` + } `json:"target_upgrade_versions"` +} + +// 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 +1949,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 +1960,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 +1976,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 +2076,36 @@ 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"` + Features struct { + ImageTransformation struct { + Enabled bool `json:"enabled"` + } `json:"imageTransformation"` + S3Protocol struct { + Enabled bool `json:"enabled"` + } `json:"s3Protocol"` + } `json:"features"` + FileSizeLimit int64 `json:"fileSizeLimit"` } -// 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"` -} +// StreamableFile defines model for StreamableFile. +type StreamableFile = map[string]interface{} // SubdomainAvailabilityResponse defines model for SubdomainAvailabilityResponse. type SubdomainAvailabilityResponse struct { @@ -1375,16 +2114,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 +2135,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,186 +2153,197 @@ 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[struct { + Role string `json:"role"` + }] `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"` + 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[string] `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"` @@ -1616,9 +2366,35 @@ 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. @@ -1660,125 +2436,133 @@ 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"` + Features *struct { + ImageTransformation struct { + Enabled bool `json:"enabled"` + } `json:"imageTransformation"` + S3Protocol struct { + Enabled bool `json:"enabled"` + } `json:"s3Protocol"` + } `json:"features,omitempty"` + FileSizeLimit *int64 `json:"fileSizeLimit,omitempty"` } // 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"` + ReleaseChannel *UpgradeDatabaseBodyReleaseChannel `json:"release_channel,omitempty"` + 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"` -} - -// 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"` +} + +// V1CreateMigrationBody defines model for V1CreateMigrationBody. +type V1CreateMigrationBody struct { + Name *string `json:"name,omitempty"` + Query string `json:"query"` } -// V1CreateProjectBodyDto defines model for V1CreateProjectBodyDto. -type V1CreateProjectBodyDto struct { +// 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 +2576,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 +// V1CreateProjectBodyDesiredInstanceSize defines model for V1CreateProjectBody.DesiredInstanceSize. +type V1CreateProjectBodyDesiredInstanceSize string -// V1CreateProjectBodyDtoPlan Subscription Plan is now set on organization level and is ignored in this request -type V1CreateProjectBodyDtoPlan string +// V1CreateProjectBodyPlan Subscription Plan is now set on organization level and is ignored in this request +type V1CreateProjectBodyPlan string -// V1CreateProjectBodyDtoRegion Region you want your server to reside in -type V1CreateProjectBodyDtoRegion string +// V1CreateProjectBodyRegion Region you want your server to reside in +type V1CreateProjectBodyRegion string -// V1DatabaseResponse defines model for V1DatabaseResponse. -type V1DatabaseResponse 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"` +// V1ListMigrationsResponse defines model for V1ListMigrationsResponse. +type V1ListMigrationsResponse = []struct { + Name *string `json:"name,omitempty"` + Version string `json:"version"` } // V1OrganizationMemberResponse defines model for V1OrganizationMemberResponse. @@ -1836,16 +2611,22 @@ 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"` @@ -1858,25 +2639,57 @@ type V1PgbouncerConfigResponse struct { // 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 +2719,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"` @@ -1933,7 +2758,8 @@ type V1RestorePitrBody struct { // 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 +2771,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 @@ -1968,21 +2811,17 @@ type V1StorageBucketResponse struct { // 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"` -} - -// ValidationRecord defines model for ValidationRecord. -type ValidationRecord struct { - TxtName string `json:"txt_name"` - TxtValue string `json:"txt_value"` +// 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"` } // VanitySubdomainBody defines model for VanitySubdomainBody. @@ -2001,7 +2840,7 @@ type VanitySubdomainConfigResponseStatus string // 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"` @@ -2019,71 +2858,95 @@ 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"` + 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"` } +// GetApiCountsParams defines parameters for GetApiCounts. +type GetApiCountsParams struct { + Interval *GetApiCountsParamsInterval `form:"interval,omitempty" json:"interval,omitempty"` +} + +// GetApiCountsParamsInterval defines parameters for GetApiCounts. +type GetApiCountsParamsInterval 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"` } // CreateApiKeyParams defines parameters for CreateApiKey. type CreateApiKeyParams struct { - Reveal bool `form:"reveal" json:"reveal"` + // 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"` + // Reveal Boolean string, true or false + Reveal *bool `form:"reveal,omitempty" json:"reveal,omitempty"` } // GetApiKeyParams defines parameters for GetApiKey. type GetApiKeyParams struct { - Reveal bool `form:"reveal" json:"reveal"` + // Reveal Boolean string, true or false + Reveal *bool `form:"reveal,omitempty" json:"reveal,omitempty"` } // UpdateApiKeyParams defines parameters for UpdateApiKey. type UpdateApiKeyParams struct { - Reveal bool `form:"reveal" json:"reveal"` + // Reveal Boolean string, true or false + Reveal *bool `form:"reveal,omitempty" json:"reveal,omitempty"` +} + +// 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"` } // 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"` +} // 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"` } // 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 +2955,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 +2967,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,17 +2984,26 @@ 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 // CreateApiKeyJSONRequestBody defines body for CreateApiKey for application/json ContentType. type CreateApiKeyJSONRequestBody = CreateApiKeyBody @@ -2141,12 +3011,21 @@ type CreateApiKeyJSONRequestBody = CreateApiKeyBody // 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 // V1UpdateAuthServiceConfigJSONRequestBody defines body for V1UpdateAuthServiceConfig for application/json ContentType. type V1UpdateAuthServiceConfigJSONRequestBody = UpdateAuthConfigBody +// CreateSigningKeyForProjectJSONRequestBody defines body for CreateSigningKeyForProject for application/json ContentType. +type CreateSigningKeyForProjectJSONRequestBody = CreateSigningKeyBody + +// PatchSigningKeyJSONRequestBody defines body for PatchSigningKey for application/json ContentType. +type PatchSigningKeyJSONRequestBody = UpdateSigningKeyBody + // V1CreateASsoProviderJSONRequestBody defines body for V1CreateASsoProvider for application/json ContentType. type V1CreateASsoProviderJSONRequestBody = CreateProviderBody @@ -2156,8 +3035,8 @@ type V1UpdateASsoProviderJSONRequestBody = UpdateProviderBody // CreateTPAForProjectJSONRequestBody defines body for CreateTPAForProject for application/json ContentType. type CreateTPAForProjectJSONRequestBody = 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 +3050,9 @@ type V1UpdateHostnameConfigJSONRequestBody = UpdateCustomHostnameBody // V1RestorePitrBackupJSONRequestBody defines body for V1RestorePitrBackup for application/json ContentType. type V1RestorePitrBackupJSONRequestBody = V1RestorePitrBody +// V1ApplyAMigrationJSONRequestBody defines body for V1ApplyAMigration for application/json ContentType. +type V1ApplyAMigrationJSONRequestBody = V1CreateMigrationBody + // V1RunAQueryJSONRequestBody defines body for V1RunAQuery for application/json ContentType. type V1RunAQueryJSONRequestBody = V1RunQueryBody @@ -2178,7 +3060,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 +3078,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 +3086,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 +3104,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 +3151,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 +3170,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 +3225,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 +3249,84 @@ 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 +} + +// 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 +} + +// 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 + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// 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 +} + +// 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 +} + +// 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 + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +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 } -// FromAttributeValueDefault0 overwrites any union data inside the AttributeValue_Default as the provided AttributeValueDefault0 -func (t *AttributeValue_Default) FromAttributeValueDefault0(v AttributeValueDefault0) 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 } -// MergeAttributeValueDefault0 performs a merge with any union data inside the AttributeValue_Default, using the provided AttributeValueDefault0 -func (t *AttributeValue_Default) MergeAttributeValueDefault0(v AttributeValueDefault0) 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 @@ -2396,22 +3337,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 +// 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 } -// FromAttributeValueDefault1 overwrites any union data inside the AttributeValue_Default as the provided AttributeValueDefault1 -func (t *AttributeValue_Default) FromAttributeValueDefault1(v AttributeValueDefault1) 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 } -// MergeAttributeValueDefault1 performs a merge with any union data inside the AttributeValue_Default, using the provided AttributeValueDefault1 -func (t *AttributeValue_Default) MergeAttributeValueDefault1(v AttributeValueDefault1) 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 @@ -2422,22 +3363,22 @@ 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 +// 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 } -// FromAttributeValueDefault2 overwrites any union data inside the AttributeValue_Default as the provided AttributeValueDefault2 -func (t *AttributeValue_Default) FromAttributeValueDefault2(v AttributeValueDefault2) error { +// 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 } -// MergeAttributeValueDefault2 performs a merge with any union data inside the AttributeValue_Default, using the provided AttributeValueDefault2 -func (t *AttributeValue_Default) MergeAttributeValueDefault2(v AttributeValueDefault2) error { +// 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 @@ -2448,22 +3389,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 +// 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 } -// FromAttributeValueDefault3 overwrites any union data inside the AttributeValue_Default as the provided AttributeValueDefault3 -func (t *AttributeValue_Default) FromAttributeValueDefault3(v AttributeValueDefault3) error { +// 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 } -// MergeAttributeValueDefault3 performs a merge with any union data inside the AttributeValue_Default, using the provided AttributeValueDefault3 -func (t *AttributeValue_Default) MergeAttributeValueDefault3(v AttributeValueDefault3) error { +// 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 @@ -2474,32 +3415,354 @@ func (t *AttributeValue_Default) MergeAttributeValueDefault3(v AttributeValueDef return err } -func (t AttributeValue_Default) MarshalJSON() ([]byte, error) { +func (t ApplyProjectAddonBody_AddonVariant) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *AttributeValue_Default) UnmarshalJSON(b []byte) error { +func (t *ApplyProjectAddonBody_AddonVariant) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } -// AsV1AnalyticsResponseError0 returns the union data inside the V1AnalyticsResponse_Error as a V1AnalyticsResponseError0 -func (t V1AnalyticsResponse_Error) AsV1AnalyticsResponseError0() (V1AnalyticsResponseError0, error) { - var body V1AnalyticsResponseError0 +// 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 +} + +// 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 +3773,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 +3799,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 +3835,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 43b175bf28..50194af1bc 100644 --- a/pkg/config/auth.go +++ b/pkg/config/auth.go @@ -6,6 +6,7 @@ import ( "time" "github.com/go-errors/errors" + "github.com/oapi-codegen/nullable" v1API "github.com/supabase/cli/pkg/api" "github.com/supabase/cli/pkg/cast" "github.com/supabase/cli/pkg/diff" @@ -31,22 +32,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 @@ -91,6 +92,7 @@ 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 Secret `toml:"jwt_secret"` @@ -116,6 +118,7 @@ type ( TokenVerifications uint `toml:"token_verifications"` EmailSent uint `toml:"email_sent"` SmsSent uint `toml:"sms_sent"` + Web3 uint `toml:"web3"` } tpaFirebase struct { @@ -264,25 +267,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 +305,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 +332,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,54 +371,54 @@ 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.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) } } } @@ -413,96 +428,96 @@ func (h *hook) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) { 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.Hours())) - body.SessionsInactivityTimeout = cast.Ptr(int(s.InactivityTimeout.Hours())) + 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.Hour - s.InactivityTimeout = time.Duration(cast.Val(remoteConfig.SessionsInactivityTimeout, 0)) * time.Hour + 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 +527,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 +689,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 +708,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, "") + 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 +725,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 +828,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 +993,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 +1236,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..1bab298474 100644 --- a/pkg/config/auth_test.go +++ b/pkg/config/auth_test.go @@ -7,6 +7,7 @@ import ( "time" "github.com/go-errors/errors" + "github.com/oapi-codegen/nullable" "github.com/stretchr/testify/assert" v1API "github.com/supabase/cli/pkg/api" "github.com/supabase/cli/pkg/cast" @@ -50,16 +51,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 +81,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 +102,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 +132,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 +153,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 +174,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 +190,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 +201,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) @@ -253,20 +254,20 @@ 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"), + 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) @@ -295,19 +296,19 @@ 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"), + 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) @@ -345,17 +346,17 @@ 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), + 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) @@ -373,11 +374,11 @@ 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), + 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 +411,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 +443,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 +471,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) @@ -539,32 +540,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("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) @@ -620,18 +621,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 +657,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("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) @@ -718,13 +719,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 +754,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 +788,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 +826,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 +854,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 +878,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 +891,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 +927,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 +1045,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 +1088,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 +1130,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 +1155,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 +1175,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/storage.go b/pkg/config/storage.go index fdb3b27ff3..fa575653a3 100644 --- a/pkg/config/storage.go +++ b/pkg/config/storage.go @@ -44,11 +44,15 @@ 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 { + 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 77a1045a51..f1458637eb 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -1,18 +1,18 @@ # Exposed for updates by .github/dependabot.yml -FROM supabase/postgres:17.4.1.031 AS pg +FROM supabase/postgres:17.4.1.038 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.12 AS postgrest -FROM supabase/postgres-meta:v0.89.0 AS pgmeta -FROM supabase/studio:2025.05.19-sha-3487831 AS studio +FROM supabase/postgres-meta:v0.89.3 AS pgmeta +FROM supabase/studio:2025.06.02-sha-8f2993d AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.67.4 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.5.1 AS supavisor -FROM supabase/gotrue:v2.172.1 AS gotrue -FROM supabase/realtime:v2.35.3 AS realtime -FROM supabase/storage-api:v1.22.17 AS storage +FROM supabase/gotrue:v2.174.0 AS gotrue +FROM supabase/realtime:v2.36.7 AS realtime +FROM supabase/storage-api:v1.23.0 AS storage FROM supabase/logflare:1.12.0 AS logflare # Append to JobImages when adding new dependencies below FROM supabase/pgadmin-schema-diff:cli-0.0.5 AS differ diff --git a/pkg/config/templates/config.toml b/pkg/config/templates/config.toml index 9f48426aa8..c8aa68ad19 100644 --- a/pkg/config/templates/config.toml +++ b/pkg/config/templates/config.toml @@ -140,6 +140,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] @@ -252,6 +254,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/TestCaptchaDiff/local_disabled_remote_enabled.diff b/pkg/config/testdata/TestCaptchaDiff/local_disabled_remote_enabled.diff index 33e424e856..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] -@@ -22,7 +22,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 9b8e0a2cc4..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] -@@ -22,9 +22,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 9c65fd39e0..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] -@@ -43,13 +43,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 aac657d910..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] -@@ -43,36 +43,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 e1c72aea2a..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] -@@ -83,7 +83,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 = "" -@@ -90,9 +90,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 -@@ -139,7 +139,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 2f58f73486..459c58f422 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] -@@ -23,19 +23,19 @@ +@@ -24,19 +24,19 @@ [hook] [hook.mfa_verification_attempt] diff --git a/pkg/config/testdata/TestHookDiff/local_enabled_remote_disabled.diff b/pkg/config/testdata/TestHookDiff/local_enabled_remote_disabled.diff index ca8d99e1e1..6065f9d203 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] -@@ -23,20 +23,20 @@ +@@ -24,20 +24,20 @@ [hook] [hook.mfa_verification_attempt] diff --git a/pkg/config/testdata/TestMfaDiff/local_enabled_and_disabled.diff b/pkg/config/testdata/TestMfaDiff/local_enabled_and_disabled.diff index 66918e27bd..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] -@@ -24,16 +24,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 04a638630d..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 @@ -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 27c9d143dd..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] -@@ -52,7 +52,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 6cf27da6ea..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] -@@ -52,12 +52,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 = "" -@@ -80,8 +80,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 3cbb49a40b..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] -@@ -52,12 +52,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 = "" -@@ -67,9 +67,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 = "" -@@ -80,6 +80,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..98ad26ecf7 100644 --- a/pkg/config/testdata/config.toml +++ b/pkg/config/testdata/config.toml @@ -140,6 +140,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] @@ -253,6 +255,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_test.go b/pkg/config/updater_test.go index 05a5d91d73..bad62f4dd2 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,22 @@ func TestUpdateStorageConfig(t *testing.T) { updater := NewConfigUpdater(*client) // Setup mock server defer gock.Off() + mockStorage := v1API.StorageConfigResponse{ + FileSizeLimit: 100, + Features: struct { + 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/function/api.go b/pkg/function/api.go index 1070744e47..9b3aa50e79 100644 --- a/pkg/function/api.go +++ b/pkg/function/api.go @@ -14,8 +14,16 @@ 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"` +} + 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 8cb902bdb4..19aa4818a0 100644 --- a/pkg/function/batch.go +++ b/pkg/function/batch.go @@ -45,7 +45,7 @@ func (s *EdgeRuntimeAPI) UpsertFunctions(ctx context.Context, functionConfig con for _, f := range result { exists[f.Slug] = struct{}{} } - var toUpdate []api.BulkUpdateFunctionBody + var toUpdate api.BulkUpdateFunctionBody OUTER: for slug, function := range functionConfig { if !function.Enabled { @@ -80,7 +80,7 @@ OUTER: if err != nil { return err } - toUpdate = append(toUpdate, result) + toUpdate = append(toUpdate, result...) policy.Reset() } if len(toUpdate) > 1 { @@ -98,7 +98,7 @@ OUTER: 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, @@ -109,7 +109,7 @@ func (s *EdgeRuntimeAPI) updateFunction(ctx context.Context, slug string, meta a } 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, @@ -120,10 +120,10 @@ 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 + }}, 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, @@ -136,7 +136,7 @@ func (s *EdgeRuntimeAPI) createFunction(ctx context.Context, slug string, meta a } 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, @@ -147,5 +147,5 @@ 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 + }}, nil } diff --git a/pkg/function/batch_test.go b/pkg/function/batch_test.go index 81e151e8ab..cc6437ec36 100644 --- a/pkg/function/batch_test.go +++ b/pkg/function/batch_test.go @@ -10,7 +10,6 @@ import ( "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/pkg/api" "github.com/supabase/cli/pkg/config" ) @@ -18,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, @@ -74,7 +73,8 @@ func TestUpsertFunctions(t *testing.T) { }) // Check error assert.NoError(t, err) - assert.Empty(t, apitest.ListUnmatchedRequests()) + assert.Empty(t, gock.Pending()) + assert.Empty(t, gock.GetUnmatchedRequests()) }) t.Run("handles concurrent deploy", func(t *testing.T) { @@ -98,7 +98,8 @@ func TestUpsertFunctions(t *testing.T) { }) // Check error assert.NoError(t, err) - assert.Empty(t, apitest.ListUnmatchedRequests()) + assert.Empty(t, gock.Pending()) + assert.Empty(t, gock.GetUnmatchedRequests()) }) t.Run("retries on network failure", func(t *testing.T) { @@ -117,7 +118,8 @@ func TestUpsertFunctions(t *testing.T) { err := client.UpsertFunctions(context.Background(), nil) // Check error assert.ErrorContains(t, err, "unexpected list functions status 400:") - assert.Empty(t, apitest.ListUnmatchedRequests()) + assert.Empty(t, gock.Pending()) + assert.Empty(t, gock.GetUnmatchedRequests()) }) t.Run("retries on create failure", func(t *testing.T) { @@ -143,7 +145,8 @@ func TestUpsertFunctions(t *testing.T) { }) // Check error assert.NoError(t, err) - assert.Empty(t, apitest.ListUnmatchedRequests()) + assert.Empty(t, gock.Pending()) + assert.Empty(t, gock.GetUnmatchedRequests()) }) t.Run("retries on update failure", func(t *testing.T) { @@ -169,6 +172,7 @@ func TestUpsertFunctions(t *testing.T) { }) // Check error assert.NoError(t, err) - assert.Empty(t, apitest.ListUnmatchedRequests()) + assert.Empty(t, gock.Pending()) + assert.Empty(t, gock.GetUnmatchedRequests()) }) } diff --git a/pkg/function/bundle.go b/pkg/function/bundle.go index 27e4d7660e..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" ) @@ -37,7 +36,7 @@ var ( } ) -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 @@ -79,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/deploy.go b/pkg/function/deploy.go index ed105b6681..d2e302debb 100644 --- a/pkg/function/deploy.go +++ b/pkg/function/deploy.go @@ -24,13 +24,13 @@ func (s *EdgeRuntimeAPI) Deploy(ctx context.Context, functionConfig config.Funct return s.UpsertFunctions(ctx, functionConfig) } // Convert all paths in functions config to relative when using api deploy - var toDeploy []api.FunctionDeployMetadata + 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: toRelPath(fc.Entrypoint), ImportMapPath: cast.Ptr(toRelPath(fc.ImportMap)), @@ -64,9 +64,9 @@ func toRelPath(fp string) string { return filepath.ToSlash(fp) } -func (s *EdgeRuntimeAPI) bulkUpload(ctx context.Context, toDeploy []api.FunctionDeployMetadata, fsys fs.FS) error { +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 { param := api.V1DeployAFunctionParams{ Slug: meta.Name, @@ -105,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) @@ -129,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) diff --git a/pkg/function/deploy_test.go b/pkg/function/deploy_test.go index 5655697fa7..50e2e859e5 100644 --- a/pkg/function/deploy_test.go +++ b/pkg/function/deploy_test.go @@ -36,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", @@ -55,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 @@ -69,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/go.mod b/pkg/go.mod new file mode 100644 index 0000000000..6fb1fec236 --- /dev/null +++ b/pkg/go.mod @@ -0,0 +1,61 @@ +module github.com/supabase/cli/pkg + +go 1.24.2 + +require ( + github.com/BurntSushi/toml v1.5.0 + github.com/andybalholm/brotli v1.1.1 + 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.2.1 + github.com/golang-jwt/jwt/v5 v5.2.2 + 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.1 + 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.24.0 + google.golang.org/grpc v1.72.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/go-cmp v0.7.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.37.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/text v0.24.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) 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 4aacc641dc..ff2f1b22b8 100644 --- a/pkg/migration/queries/drop.sql +++ b/pkg/migration/queries/drop.sql @@ -103,7 +103,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/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()) }) } }