alchemy 0.67.0 → 0.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/alchemy.js +25563 -26265
- package/bin/alchemy.ts +6 -2
- package/bin/commands/configure.ts +194 -0
- package/bin/commands/login.ts +99 -55
- package/bin/commands/logout.ts +66 -0
- package/bin/trpc.ts +27 -2
- package/lib/apply.d.ts +2 -2
- package/lib/apply.d.ts.map +1 -1
- package/lib/apply.js +18 -15
- package/lib/apply.js.map +1 -1
- package/lib/auth.d.ts +72 -0
- package/lib/auth.d.ts.map +1 -0
- package/lib/auth.js +163 -0
- package/lib/auth.js.map +1 -0
- package/lib/aws/bucket.d.ts +12 -3
- package/lib/aws/bucket.d.ts.map +1 -1
- package/lib/aws/bucket.js +2 -2
- package/lib/aws/bucket.js.map +1 -1
- package/lib/aws/control/resource.d.ts +34 -3
- package/lib/aws/control/resource.d.ts.map +1 -1
- package/lib/aws/control/resource.js +3 -3
- package/lib/aws/control/resource.js.map +1 -1
- package/lib/aws/ec2/internet-gateway-attachment.d.ts +1 -2
- package/lib/aws/ec2/internet-gateway-attachment.d.ts.map +1 -1
- package/lib/aws/ec2/internet-gateway-attachment.js +4 -4
- package/lib/aws/ec2/internet-gateway-attachment.js.map +1 -1
- package/lib/aws/ec2/internet-gateway.d.ts +1 -2
- package/lib/aws/ec2/internet-gateway.d.ts.map +1 -1
- package/lib/aws/ec2/internet-gateway.js +2 -2
- package/lib/aws/ec2/internet-gateway.js.map +1 -1
- package/lib/aws/ec2/nat-gateway.d.ts +1 -2
- package/lib/aws/ec2/nat-gateway.d.ts.map +1 -1
- package/lib/aws/ec2/nat-gateway.js +2 -2
- package/lib/aws/ec2/nat-gateway.js.map +1 -1
- package/lib/aws/ec2/route-table-association.d.ts +1 -2
- package/lib/aws/ec2/route-table-association.d.ts.map +1 -1
- package/lib/aws/ec2/route-table-association.js +2 -2
- package/lib/aws/ec2/route-table-association.js.map +1 -1
- package/lib/aws/ec2/route-table.d.ts +1 -2
- package/lib/aws/ec2/route-table.d.ts.map +1 -1
- package/lib/aws/ec2/route-table.js +2 -2
- package/lib/aws/ec2/route-table.js.map +1 -1
- package/lib/aws/ec2/route.d.ts +1 -2
- package/lib/aws/ec2/route.d.ts.map +1 -1
- package/lib/aws/ec2/route.js +2 -2
- package/lib/aws/ec2/route.js.map +1 -1
- package/lib/aws/ec2/security-group-rule.d.ts +1 -2
- package/lib/aws/ec2/security-group-rule.d.ts.map +1 -1
- package/lib/aws/ec2/security-group-rule.js +2 -2
- package/lib/aws/ec2/security-group-rule.js.map +1 -1
- package/lib/aws/ec2/security-group.d.ts +1 -2
- package/lib/aws/ec2/security-group.d.ts.map +1 -1
- package/lib/aws/ec2/security-group.js +2 -2
- package/lib/aws/ec2/security-group.js.map +1 -1
- package/lib/aws/ec2/subnet.d.ts +1 -2
- package/lib/aws/ec2/subnet.d.ts.map +1 -1
- package/lib/aws/ec2/subnet.js +2 -2
- package/lib/aws/ec2/subnet.js.map +1 -1
- package/lib/aws/ec2/vpc.d.ts +1 -2
- package/lib/aws/ec2/vpc.d.ts.map +1 -1
- package/lib/aws/ec2/vpc.js +2 -2
- package/lib/aws/ec2/vpc.js.map +1 -1
- package/lib/aws/function.d.ts +116 -3
- package/lib/aws/function.d.ts.map +1 -1
- package/lib/aws/function.js +2 -2
- package/lib/aws/function.js.map +1 -1
- package/lib/aws/oidc/github-oidc-provider.d.ts +13 -2
- package/lib/aws/oidc/github-oidc-provider.d.ts.map +1 -1
- package/lib/aws/oidc/oidc-provider.d.ts +48 -3
- package/lib/aws/oidc/oidc-provider.d.ts.map +1 -1
- package/lib/aws/oidc/oidc-provider.js +2 -2
- package/lib/aws/oidc/oidc-provider.js.map +1 -1
- package/lib/aws/policy-attachment.d.ts +2 -3
- package/lib/aws/policy-attachment.d.ts.map +1 -1
- package/lib/aws/policy-attachment.js +1 -1
- package/lib/aws/policy-attachment.js.map +1 -1
- package/lib/aws/policy.d.ts +1 -2
- package/lib/aws/policy.d.ts.map +1 -1
- package/lib/aws/policy.js +4 -4
- package/lib/aws/policy.js.map +1 -1
- package/lib/aws/queue.d.ts +1 -2
- package/lib/aws/queue.d.ts.map +1 -1
- package/lib/aws/queue.js +4 -4
- package/lib/aws/queue.js.map +1 -1
- package/lib/aws/role.d.ts +1 -2
- package/lib/aws/role.d.ts.map +1 -1
- package/lib/aws/role.js +2 -2
- package/lib/aws/role.js.map +1 -1
- package/lib/aws/ses.d.ts +1 -2
- package/lib/aws/ses.d.ts.map +1 -1
- package/lib/aws/ses.js +2 -2
- package/lib/aws/ses.js.map +1 -1
- package/lib/aws/ssm-parameter.d.ts +1 -2
- package/lib/aws/ssm-parameter.d.ts.map +1 -1
- package/lib/aws/ssm-parameter.js +2 -2
- package/lib/aws/ssm-parameter.js.map +1 -1
- package/lib/aws/table.d.ts +1 -2
- package/lib/aws/table.d.ts.map +1 -1
- package/lib/aws/table.js +2 -2
- package/lib/aws/table.js.map +1 -1
- package/lib/cloudflare/account-api-token.d.ts +1 -2
- package/lib/cloudflare/account-api-token.d.ts.map +1 -1
- package/lib/cloudflare/account-api-token.js +2 -2
- package/lib/cloudflare/account-api-token.js.map +1 -1
- package/lib/cloudflare/ai-gateway.d.ts +1 -2
- package/lib/cloudflare/ai-gateway.d.ts.map +1 -1
- package/lib/cloudflare/ai-gateway.js +2 -2
- package/lib/cloudflare/ai-gateway.js.map +1 -1
- package/lib/cloudflare/api-gateway-operation.d.ts +1 -2
- package/lib/cloudflare/api-gateway-operation.d.ts.map +1 -1
- package/lib/cloudflare/api-gateway-operation.js +2 -2
- package/lib/cloudflare/api-gateway-operation.js.map +1 -1
- package/lib/cloudflare/api-schema.d.ts +1 -2
- package/lib/cloudflare/api-schema.d.ts.map +1 -1
- package/lib/cloudflare/api-schema.js +2 -2
- package/lib/cloudflare/api-schema.js.map +1 -1
- package/lib/cloudflare/api-shield.d.ts +1 -2
- package/lib/cloudflare/api-shield.d.ts.map +1 -1
- package/lib/cloudflare/api-shield.js +2 -2
- package/lib/cloudflare/api-shield.js.map +1 -1
- package/lib/cloudflare/api.d.ts +18 -10
- package/lib/cloudflare/api.d.ts.map +1 -1
- package/lib/cloudflare/api.js +93 -38
- package/lib/cloudflare/api.js.map +1 -1
- package/lib/cloudflare/assets.d.ts +21 -43
- package/lib/cloudflare/assets.d.ts.map +1 -1
- package/lib/cloudflare/assets.js +78 -70
- package/lib/cloudflare/assets.js.map +1 -1
- package/lib/cloudflare/auth.d.ts +91 -17
- package/lib/cloudflare/auth.d.ts.map +1 -1
- package/lib/cloudflare/auth.js +141 -62
- package/lib/cloudflare/auth.js.map +1 -1
- package/lib/cloudflare/bound.d.ts +1 -1
- package/lib/cloudflare/bound.d.ts.map +1 -1
- package/lib/cloudflare/bucket.d.ts +60 -8
- package/lib/cloudflare/bucket.d.ts.map +1 -1
- package/lib/cloudflare/bucket.js +161 -18
- package/lib/cloudflare/bucket.js.map +1 -1
- package/lib/cloudflare/bundle/plugin-wasm.js +4 -2
- package/lib/cloudflare/bundle/plugin-wasm.js.map +1 -1
- package/lib/cloudflare/certificate-pack.d.ts +1 -2
- package/lib/cloudflare/certificate-pack.d.ts.map +1 -1
- package/lib/cloudflare/certificate-pack.js +4 -4
- package/lib/cloudflare/certificate-pack.js.map +1 -1
- package/lib/cloudflare/compatibility-date.gen.d.ts +1 -1
- package/lib/cloudflare/compatibility-date.gen.js +1 -1
- package/lib/cloudflare/container.d.ts +1 -2
- package/lib/cloudflare/container.d.ts.map +1 -1
- package/lib/cloudflare/container.js +6 -6
- package/lib/cloudflare/container.js.map +1 -1
- package/lib/cloudflare/custom-domain.d.ts +1 -2
- package/lib/cloudflare/custom-domain.d.ts.map +1 -1
- package/lib/cloudflare/custom-domain.js +2 -2
- package/lib/cloudflare/custom-domain.js.map +1 -1
- package/lib/cloudflare/d1-database.d.ts +2 -3
- package/lib/cloudflare/d1-database.d.ts.map +1 -1
- package/lib/cloudflare/d1-database.js +5 -5
- package/lib/cloudflare/d1-database.js.map +1 -1
- package/lib/cloudflare/dispatch-namespace.d.ts +2 -3
- package/lib/cloudflare/dispatch-namespace.d.ts.map +1 -1
- package/lib/cloudflare/dispatch-namespace.js +3 -3
- package/lib/cloudflare/dispatch-namespace.js.map +1 -1
- package/lib/cloudflare/dns-records.d.ts +1 -2
- package/lib/cloudflare/dns-records.d.ts.map +1 -1
- package/lib/cloudflare/dns-records.js +4 -4
- package/lib/cloudflare/dns-records.js.map +1 -1
- package/lib/cloudflare/email-address.d.ts +1 -2
- package/lib/cloudflare/email-address.d.ts.map +1 -1
- package/lib/cloudflare/email-address.js +6 -6
- package/lib/cloudflare/email-address.js.map +1 -1
- package/lib/cloudflare/email-catch-all.d.ts +1 -2
- package/lib/cloudflare/email-catch-all.d.ts.map +1 -1
- package/lib/cloudflare/email-catch-all.js +4 -4
- package/lib/cloudflare/email-catch-all.js.map +1 -1
- package/lib/cloudflare/email-routing.d.ts +1 -2
- package/lib/cloudflare/email-routing.d.ts.map +1 -1
- package/lib/cloudflare/email-routing.js +4 -4
- package/lib/cloudflare/email-routing.js.map +1 -1
- package/lib/cloudflare/email-rule.d.ts +1 -2
- package/lib/cloudflare/email-rule.d.ts.map +1 -1
- package/lib/cloudflare/email-rule.js +4 -4
- package/lib/cloudflare/email-rule.js.map +1 -1
- package/lib/cloudflare/hyperdrive.d.ts +1 -2
- package/lib/cloudflare/hyperdrive.d.ts.map +1 -1
- package/lib/cloudflare/hyperdrive.js +4 -4
- package/lib/cloudflare/hyperdrive.js.map +1 -1
- package/lib/cloudflare/kv-namespace.d.ts +2 -3
- package/lib/cloudflare/kv-namespace.d.ts.map +1 -1
- package/lib/cloudflare/kv-namespace.js +5 -5
- package/lib/cloudflare/kv-namespace.js.map +1 -1
- package/lib/cloudflare/miniflare/delete.js +1 -1
- package/lib/cloudflare/miniflare/delete.js.map +1 -1
- package/lib/cloudflare/miniflare/miniflare-worker-proxy.d.ts.map +1 -1
- package/lib/cloudflare/miniflare/miniflare-worker-proxy.js +2 -7
- package/lib/cloudflare/miniflare/miniflare-worker-proxy.js.map +1 -1
- package/lib/cloudflare/miniflare/remote-binding-proxy.d.ts.map +1 -1
- package/lib/cloudflare/miniflare/remote-binding-proxy.js +15 -4
- package/lib/cloudflare/miniflare/remote-binding-proxy.js.map +1 -1
- package/lib/cloudflare/permission-groups.d.ts +1 -2
- package/lib/cloudflare/permission-groups.d.ts.map +1 -1
- package/lib/cloudflare/permission-groups.js +1 -1
- package/lib/cloudflare/permission-groups.js.map +1 -1
- package/lib/cloudflare/pipeline.d.ts +2 -3
- package/lib/cloudflare/pipeline.d.ts.map +1 -1
- package/lib/cloudflare/pipeline.js +5 -5
- package/lib/cloudflare/pipeline.js.map +1 -1
- package/lib/cloudflare/queue-consumer.d.ts +1 -2
- package/lib/cloudflare/queue-consumer.d.ts.map +1 -1
- package/lib/cloudflare/queue-consumer.js +4 -4
- package/lib/cloudflare/queue-consumer.js.map +1 -1
- package/lib/cloudflare/queue.d.ts +1 -2
- package/lib/cloudflare/queue.d.ts.map +1 -1
- package/lib/cloudflare/queue.js +4 -4
- package/lib/cloudflare/queue.js.map +1 -1
- package/lib/cloudflare/react-router/plugin.d.ts.map +1 -1
- package/lib/cloudflare/react-router/plugin.js +13 -0
- package/lib/cloudflare/react-router/plugin.js.map +1 -1
- package/lib/cloudflare/redirect-rule.d.ts +1 -2
- package/lib/cloudflare/redirect-rule.d.ts.map +1 -1
- package/lib/cloudflare/redirect-rule.js +4 -4
- package/lib/cloudflare/redirect-rule.js.map +1 -1
- package/lib/cloudflare/route.d.ts +1 -2
- package/lib/cloudflare/route.d.ts.map +1 -1
- package/lib/cloudflare/route.js +4 -4
- package/lib/cloudflare/route.js.map +1 -1
- package/lib/cloudflare/ruleset.d.ts +1 -2
- package/lib/cloudflare/ruleset.d.ts.map +1 -1
- package/lib/cloudflare/ruleset.js +2 -2
- package/lib/cloudflare/ruleset.js.map +1 -1
- package/lib/cloudflare/secret.d.ts +2 -3
- package/lib/cloudflare/secret.d.ts.map +1 -1
- package/lib/cloudflare/secret.js +3 -3
- package/lib/cloudflare/secret.js.map +1 -1
- package/lib/cloudflare/secrets-store.d.ts +2 -3
- package/lib/cloudflare/secrets-store.d.ts.map +1 -1
- package/lib/cloudflare/secrets-store.js +3 -3
- package/lib/cloudflare/secrets-store.js.map +1 -1
- package/lib/cloudflare/tunnel.d.ts +2 -3
- package/lib/cloudflare/tunnel.d.ts.map +1 -1
- package/lib/cloudflare/tunnel.js +3 -3
- package/lib/cloudflare/tunnel.js.map +1 -1
- package/lib/cloudflare/user.d.ts +3 -2
- package/lib/cloudflare/user.d.ts.map +1 -1
- package/lib/cloudflare/user.js +7 -5
- package/lib/cloudflare/user.js.map +1 -1
- package/lib/cloudflare/vectorize-index.d.ts +2 -3
- package/lib/cloudflare/vectorize-index.d.ts.map +1 -1
- package/lib/cloudflare/vectorize-index.js +6 -6
- package/lib/cloudflare/vectorize-index.js.map +1 -1
- package/lib/cloudflare/vectorize-metadata-index.d.ts +2 -3
- package/lib/cloudflare/vectorize-metadata-index.d.ts.map +1 -1
- package/lib/cloudflare/vectorize-metadata-index.js +4 -4
- package/lib/cloudflare/vectorize-metadata-index.js.map +1 -1
- package/lib/cloudflare/website.js +1 -1
- package/lib/cloudflare/website.js.map +1 -1
- package/lib/cloudflare/worker-assets.d.ts +1 -29
- package/lib/cloudflare/worker-assets.d.ts.map +1 -1
- package/lib/cloudflare/worker-assets.js +9 -42
- package/lib/cloudflare/worker-assets.js.map +1 -1
- package/lib/cloudflare/worker-stub.d.ts +2 -3
- package/lib/cloudflare/worker-stub.d.ts.map +1 -1
- package/lib/cloudflare/worker-stub.js +3 -3
- package/lib/cloudflare/worker-stub.js.map +1 -1
- package/lib/cloudflare/worker-subdomain.d.ts +4 -3
- package/lib/cloudflare/worker-subdomain.d.ts.map +1 -1
- package/lib/cloudflare/worker-subdomain.js +5 -5
- package/lib/cloudflare/worker-subdomain.js.map +1 -1
- package/lib/cloudflare/worker.d.ts +3 -4
- package/lib/cloudflare/worker.d.ts.map +1 -1
- package/lib/cloudflare/worker.js +6 -5
- package/lib/cloudflare/worker.js.map +1 -1
- package/lib/cloudflare/zone.d.ts +1 -2
- package/lib/cloudflare/zone.d.ts.map +1 -1
- package/lib/cloudflare/zone.js +2 -2
- package/lib/cloudflare/zone.js.map +1 -1
- package/lib/context.d.ts +8 -8
- package/lib/context.d.ts.map +1 -1
- package/lib/context.js.map +1 -1
- package/lib/destroy.d.ts +1 -1
- package/lib/destroy.d.ts.map +1 -1
- package/lib/destroy.js.map +1 -1
- package/lib/dns/import-dns.d.ts +1 -2
- package/lib/dns/import-dns.d.ts.map +1 -1
- package/lib/dns/import-dns.js +2 -2
- package/lib/dns/import-dns.js.map +1 -1
- package/lib/docker/container.d.ts +1 -2
- package/lib/docker/container.d.ts.map +1 -1
- package/lib/docker/container.js +2 -3
- package/lib/docker/container.js.map +1 -1
- package/lib/docker/image.d.ts +1 -2
- package/lib/docker/image.d.ts.map +1 -1
- package/lib/docker/image.js +9 -9
- package/lib/docker/image.js.map +1 -1
- package/lib/docker/network.d.ts +1 -2
- package/lib/docker/network.d.ts.map +1 -1
- package/lib/docker/network.js +2 -3
- package/lib/docker/network.js.map +1 -1
- package/lib/docker/remote-image.d.ts +1 -2
- package/lib/docker/remote-image.d.ts.map +1 -1
- package/lib/docker/remote-image.js +2 -3
- package/lib/docker/remote-image.js.map +1 -1
- package/lib/docker/volume.d.ts +1 -2
- package/lib/docker/volume.d.ts.map +1 -1
- package/lib/docker/volume.js +2 -3
- package/lib/docker/volume.js.map +1 -1
- package/lib/esbuild/bundle.d.ts +1 -2
- package/lib/esbuild/bundle.d.ts.map +1 -1
- package/lib/esbuild/bundle.js +4 -4
- package/lib/esbuild/bundle.js.map +1 -1
- package/lib/fs/copy-file.d.ts +1 -2
- package/lib/fs/copy-file.d.ts.map +1 -1
- package/lib/fs/copy-file.js +2 -2
- package/lib/fs/copy-file.js.map +1 -1
- package/lib/fs/file.d.ts +1 -2
- package/lib/fs/file.d.ts.map +1 -1
- package/lib/fs/file.js +2 -2
- package/lib/fs/file.js.map +1 -1
- package/lib/fs/folder.d.ts +1 -2
- package/lib/fs/folder.d.ts.map +1 -1
- package/lib/fs/folder.js +2 -2
- package/lib/fs/folder.js.map +1 -1
- package/lib/github/comment.d.ts +1 -2
- package/lib/github/comment.d.ts.map +1 -1
- package/lib/github/comment.js +4 -4
- package/lib/github/comment.js.map +1 -1
- package/lib/github/repository-environment.d.ts +1 -2
- package/lib/github/repository-environment.d.ts.map +1 -1
- package/lib/github/repository-environment.js +2 -2
- package/lib/github/repository-environment.js.map +1 -1
- package/lib/github/repository-webhook.d.ts +1 -2
- package/lib/github/repository-webhook.d.ts.map +1 -1
- package/lib/github/repository-webhook.js +2 -2
- package/lib/github/repository-webhook.js.map +1 -1
- package/lib/github/secret.d.ts +1 -2
- package/lib/github/secret.d.ts.map +1 -1
- package/lib/github/secret.js +2 -2
- package/lib/github/secret.js.map +1 -1
- package/lib/neon/api/client.gen.d.ts +13 -0
- package/lib/neon/api/client.gen.d.ts.map +1 -0
- package/lib/neon/api/client.gen.js +7 -0
- package/lib/neon/api/client.gen.js.map +1 -0
- package/lib/neon/api/sdk.gen.d.ts +880 -0
- package/lib/neon/api/sdk.gen.d.ts.map +1 -0
- package/lib/neon/api/sdk.gen.js +1527 -0
- package/lib/neon/api/sdk.gen.js.map +1 -0
- package/lib/neon/api/types.gen.d.ts +7250 -0
- package/lib/neon/api/types.gen.d.ts.map +1 -0
- package/lib/neon/api/types.gen.js +2 -0
- package/lib/neon/api/types.gen.js.map +1 -0
- package/lib/neon/api.d.ts +14 -49
- package/lib/neon/api.d.ts.map +1 -1
- package/lib/neon/api.js +36 -114
- package/lib/neon/api.js.map +1 -1
- package/lib/neon/branch.d.ts +141 -0
- package/lib/neon/branch.d.ts.map +1 -0
- package/lib/neon/branch.js +112 -0
- package/lib/neon/branch.js.map +1 -0
- package/lib/neon/index.d.ts +1 -1
- package/lib/neon/index.d.ts.map +1 -1
- package/lib/neon/index.js +1 -1
- package/lib/neon/index.js.map +1 -1
- package/lib/neon/project.d.ts +32 -242
- package/lib/neon/project.d.ts.map +1 -1
- package/lib/neon/project.js +90 -269
- package/lib/neon/project.js.map +1 -1
- package/lib/neon/utils.d.ts +49 -0
- package/lib/neon/utils.d.ts.map +1 -0
- package/lib/neon/utils.js +44 -0
- package/lib/neon/utils.js.map +1 -0
- package/lib/os/exec.d.ts +1 -2
- package/lib/os/exec.d.ts.map +1 -1
- package/lib/os/exec.js +2 -2
- package/lib/os/exec.js.map +1 -1
- package/lib/planetscale/api/client.gen.d.ts +12 -1749
- package/lib/planetscale/api/client.gen.d.ts.map +1 -1
- package/lib/planetscale/api/client.gen.js +6 -2400
- package/lib/planetscale/api/client.gen.js.map +1 -1
- package/lib/planetscale/api/sdk.gen.d.ts +1582 -0
- package/lib/planetscale/api/sdk.gen.d.ts.map +1 -0
- package/lib/planetscale/api/sdk.gen.js +2219 -0
- package/lib/planetscale/api/sdk.gen.js.map +1 -0
- package/lib/planetscale/api/types.gen.d.ts +594 -449
- package/lib/planetscale/api/types.gen.d.ts.map +1 -1
- package/lib/planetscale/api.d.ts +43 -0
- package/lib/planetscale/api.d.ts.map +1 -0
- package/lib/planetscale/api.js +53 -0
- package/lib/planetscale/api.js.map +1 -0
- package/lib/planetscale/branch.d.ts +2 -3
- package/lib/planetscale/branch.d.ts.map +1 -1
- package/lib/planetscale/branch.js +17 -15
- package/lib/planetscale/branch.js.map +1 -1
- package/lib/planetscale/database.d.ts +2 -3
- package/lib/planetscale/database.d.ts.map +1 -1
- package/lib/planetscale/database.js +34 -34
- package/lib/planetscale/database.js.map +1 -1
- package/lib/planetscale/index.d.ts +1 -1
- package/lib/planetscale/index.d.ts.map +1 -1
- package/lib/planetscale/index.js +1 -1
- package/lib/planetscale/index.js.map +1 -1
- package/lib/planetscale/password.d.ts +2 -3
- package/lib/planetscale/password.d.ts.map +1 -1
- package/lib/planetscale/password.js +11 -11
- package/lib/planetscale/password.js.map +1 -1
- package/lib/planetscale/role.d.ts +2 -3
- package/lib/planetscale/role.d.ts.map +1 -1
- package/lib/planetscale/role.js +18 -18
- package/lib/planetscale/role.js.map +1 -1
- package/lib/planetscale/utils.d.ts +1 -1
- package/lib/planetscale/utils.d.ts.map +1 -1
- package/lib/planetscale/utils.js +17 -33
- package/lib/planetscale/utils.js.map +1 -1
- package/lib/random/random-string.d.ts +1 -2
- package/lib/random/random-string.d.ts.map +1 -1
- package/lib/random/random-string.js +3 -3
- package/lib/random/random-string.js.map +1 -1
- package/lib/resource.d.ts +4 -1
- package/lib/resource.d.ts.map +1 -1
- package/lib/resource.js.map +1 -1
- package/lib/sentry/client-key.d.ts +1 -2
- package/lib/sentry/client-key.d.ts.map +1 -1
- package/lib/sentry/client-key.js +2 -2
- package/lib/sentry/client-key.js.map +1 -1
- package/lib/sentry/project.d.ts +1 -2
- package/lib/sentry/project.d.ts.map +1 -1
- package/lib/sentry/project.js +2 -2
- package/lib/sentry/project.js.map +1 -1
- package/lib/sentry/team.d.ts +1 -2
- package/lib/sentry/team.d.ts.map +1 -1
- package/lib/sentry/team.js +2 -2
- package/lib/sentry/team.js.map +1 -1
- package/lib/state/r2-rest-state-store.d.ts +1 -0
- package/lib/state/r2-rest-state-store.d.ts.map +1 -1
- package/lib/state/r2-rest-state-store.js +15 -34
- package/lib/state/r2-rest-state-store.js.map +1 -1
- package/lib/stripe/card.d.ts +1 -2
- package/lib/stripe/card.d.ts.map +1 -1
- package/lib/stripe/card.js +2 -2
- package/lib/stripe/card.js.map +1 -1
- package/lib/stripe/coupon.d.ts +1 -2
- package/lib/stripe/coupon.d.ts.map +1 -1
- package/lib/stripe/coupon.js +2 -2
- package/lib/stripe/coupon.js.map +1 -1
- package/lib/stripe/customer.d.ts +1 -2
- package/lib/stripe/customer.d.ts.map +1 -1
- package/lib/stripe/customer.js +2 -2
- package/lib/stripe/customer.js.map +1 -1
- package/lib/stripe/entitlements-feature.d.ts +1 -2
- package/lib/stripe/entitlements-feature.d.ts.map +1 -1
- package/lib/stripe/entitlements-feature.js +2 -2
- package/lib/stripe/entitlements-feature.js.map +1 -1
- package/lib/stripe/file.d.ts +1 -2
- package/lib/stripe/file.d.ts.map +1 -1
- package/lib/stripe/file.js +2 -2
- package/lib/stripe/file.js.map +1 -1
- package/lib/stripe/meter.d.ts +1 -2
- package/lib/stripe/meter.d.ts.map +1 -1
- package/lib/stripe/meter.js +1 -1
- package/lib/stripe/meter.js.map +1 -1
- package/lib/stripe/portal-configuration.d.ts +1 -2
- package/lib/stripe/portal-configuration.d.ts.map +1 -1
- package/lib/stripe/portal-configuration.js +2 -2
- package/lib/stripe/portal-configuration.js.map +1 -1
- package/lib/stripe/price.d.ts +1 -2
- package/lib/stripe/price.d.ts.map +1 -1
- package/lib/stripe/price.js +2 -2
- package/lib/stripe/price.js.map +1 -1
- package/lib/stripe/product-feature.d.ts +1 -2
- package/lib/stripe/product-feature.d.ts.map +1 -1
- package/lib/stripe/product-feature.js +2 -2
- package/lib/stripe/product-feature.js.map +1 -1
- package/lib/stripe/product.d.ts +1 -2
- package/lib/stripe/product.d.ts.map +1 -1
- package/lib/stripe/product.js +2 -2
- package/lib/stripe/product.js.map +1 -1
- package/lib/stripe/promotion-code.d.ts +1 -2
- package/lib/stripe/promotion-code.d.ts.map +1 -1
- package/lib/stripe/promotion-code.js +2 -2
- package/lib/stripe/promotion-code.js.map +1 -1
- package/lib/stripe/shipping-rate.d.ts +1 -2
- package/lib/stripe/shipping-rate.d.ts.map +1 -1
- package/lib/stripe/shipping-rate.js +2 -2
- package/lib/stripe/shipping-rate.js.map +1 -1
- package/lib/stripe/tax-rate.d.ts +1 -2
- package/lib/stripe/tax-rate.d.ts.map +1 -1
- package/lib/stripe/tax-rate.js +2 -2
- package/lib/stripe/tax-rate.js.map +1 -1
- package/lib/stripe/webhook.d.ts +16 -3
- package/lib/stripe/webhook.d.ts.map +1 -1
- package/lib/stripe/webhook.js +2 -2
- package/lib/stripe/webhook.js.map +1 -1
- package/lib/test/bun.d.ts.map +1 -1
- package/lib/test/bun.js +1 -0
- package/lib/test/bun.js.map +1 -1
- package/lib/test/options.d.ts +5 -0
- package/lib/test/options.d.ts.map +1 -1
- package/lib/test/vitest.d.ts.map +1 -1
- package/lib/test/vitest.js +1 -0
- package/lib/test/vitest.js.map +1 -1
- package/lib/upstash/redis.d.ts +1 -2
- package/lib/upstash/redis.d.ts.map +1 -1
- package/lib/upstash/redis.js.map +1 -1
- package/lib/util/api/client/client.gen.d.ts +3 -0
- package/lib/util/api/client/client.gen.d.ts.map +1 -0
- package/lib/util/api/client/client.gen.js +205 -0
- package/lib/util/api/client/client.gen.js.map +1 -0
- package/lib/util/api/client/index.d.ts +8 -0
- package/lib/util/api/client/index.d.ts.map +1 -0
- package/lib/util/api/client/index.js +6 -0
- package/lib/util/api/client/index.js.map +1 -0
- package/lib/util/api/client/types.gen.d.ts +125 -0
- package/lib/util/api/client/types.gen.d.ts.map +1 -0
- package/lib/util/api/client/types.gen.js +2 -0
- package/lib/util/api/client/types.gen.js.map +1 -0
- package/lib/util/api/client/utils.gen.d.ts +34 -0
- package/lib/util/api/client/utils.gen.d.ts.map +1 -0
- package/lib/util/api/client/utils.gen.js +231 -0
- package/lib/util/api/client/utils.gen.js.map +1 -0
- package/lib/util/api/core/auth.gen.d.ts +19 -0
- package/lib/util/api/core/auth.gen.d.ts.map +1 -0
- package/lib/util/api/core/auth.gen.js +15 -0
- package/lib/util/api/core/auth.gen.js.map +1 -0
- package/lib/util/api/core/bodySerializer.gen.d.ts +18 -0
- package/lib/util/api/core/bodySerializer.gen.d.ts.map +1 -0
- package/lib/util/api/core/bodySerializer.gen.js +58 -0
- package/lib/util/api/core/bodySerializer.gen.js.map +1 -0
- package/lib/util/api/core/params.gen.d.ts +34 -0
- package/lib/util/api/core/params.gen.d.ts.map +1 -0
- package/lib/util/api/core/params.gen.js +89 -0
- package/lib/util/api/core/params.gen.js.map +1 -0
- package/lib/util/api/core/pathSerializer.gen.d.ts +34 -0
- package/lib/util/api/core/pathSerializer.gen.d.ts.map +1 -0
- package/lib/util/api/core/pathSerializer.gen.js +115 -0
- package/lib/util/api/core/pathSerializer.gen.js.map +1 -0
- package/lib/util/api/core/serverSentEvents.gen.d.ts +72 -0
- package/lib/util/api/core/serverSentEvents.gen.d.ts.map +1 -0
- package/lib/util/api/core/serverSentEvents.gen.js +136 -0
- package/lib/util/api/core/serverSentEvents.gen.js.map +1 -0
- package/lib/util/api/core/types.gen.d.ts +79 -0
- package/lib/util/api/core/types.gen.d.ts.map +1 -0
- package/lib/util/api/core/types.gen.js +2 -0
- package/lib/util/api/core/types.gen.js.map +1 -0
- package/lib/util/api/core/utils.gen.d.ts +20 -0
- package/lib/util/api/core/utils.gen.d.ts.map +1 -0
- package/lib/util/api/core/utils.gen.js +88 -0
- package/lib/util/api/core/utils.gen.js.map +1 -0
- package/lib/util/http.d.ts +7 -2
- package/lib/util/http.d.ts.map +1 -1
- package/lib/util/http.js +29 -11
- package/lib/util/http.js.map +1 -1
- package/lib/util/lock.d.ts +20 -0
- package/lib/util/lock.d.ts.map +1 -0
- package/lib/util/lock.js +45 -0
- package/lib/util/lock.js.map +1 -0
- package/lib/util/memoize.d.ts +6 -0
- package/lib/util/memoize.d.ts.map +1 -1
- package/lib/util/memoize.js +23 -0
- package/lib/util/memoize.js.map +1 -1
- package/lib/util/oauth-client.d.ts +71 -0
- package/lib/util/oauth-client.d.ts.map +1 -0
- package/lib/util/oauth-client.js +188 -0
- package/lib/util/oauth-client.js.map +1 -0
- package/lib/util/poll.d.ts +33 -0
- package/lib/util/poll.d.ts.map +1 -0
- package/lib/util/poll.js +19 -0
- package/lib/util/poll.js.map +1 -0
- package/lib/vercel/project-domain.d.ts +1 -2
- package/lib/vercel/project-domain.d.ts.map +1 -1
- package/lib/vercel/project-domain.js.map +1 -1
- package/lib/vercel/project.d.ts +1 -2
- package/lib/vercel/project.d.ts.map +1 -1
- package/lib/vercel/project.js +2 -2
- package/lib/vercel/project.js.map +1 -1
- package/package.json +5 -1
- package/src/apply.ts +32 -29
- package/src/auth.ts +253 -0
- package/src/aws/bucket.ts +3 -3
- package/src/aws/control/resource.ts +4 -6
- package/src/aws/ec2/internet-gateway-attachment.ts +5 -6
- package/src/aws/ec2/internet-gateway.ts +3 -5
- package/src/aws/ec2/nat-gateway.ts +3 -5
- package/src/aws/ec2/route-table-association.ts +3 -5
- package/src/aws/ec2/route-table.ts +3 -5
- package/src/aws/ec2/route.ts +3 -3
- package/src/aws/ec2/security-group-rule.ts +3 -5
- package/src/aws/ec2/security-group.ts +3 -5
- package/src/aws/ec2/subnet.ts +3 -3
- package/src/aws/ec2/vpc.ts +3 -3
- package/src/aws/function.ts +3 -3
- package/src/aws/oidc/oidc-provider.ts +3 -5
- package/src/aws/policy-attachment.ts +2 -4
- package/src/aws/policy.ts +5 -5
- package/src/aws/queue.ts +5 -5
- package/src/aws/role.ts +3 -3
- package/src/aws/ses.ts +3 -3
- package/src/aws/ssm-parameter.ts +3 -3
- package/src/aws/table.ts +3 -3
- package/src/cloudflare/account-api-token.ts +3 -4
- package/src/cloudflare/ai-gateway.ts +3 -5
- package/src/cloudflare/api-gateway-operation.ts +3 -4
- package/src/cloudflare/api-schema.ts +25 -26
- package/src/cloudflare/api-shield.ts +3 -4
- package/src/cloudflare/api.ts +122 -57
- package/src/cloudflare/assets.ts +95 -136
- package/src/cloudflare/auth.ts +160 -95
- package/src/cloudflare/bound.ts +1 -1
- package/src/cloudflare/bucket.ts +321 -58
- package/src/cloudflare/bundle/plugin-wasm.ts +5 -5
- package/src/cloudflare/certificate-pack.ts +5 -6
- package/src/cloudflare/compatibility-date.gen.ts +1 -1
- package/src/cloudflare/container.ts +7 -8
- package/src/cloudflare/custom-domain.ts +3 -5
- package/src/cloudflare/d1-database.ts +33 -34
- package/src/cloudflare/dispatch-namespace.ts +5 -6
- package/src/cloudflare/dns-records.ts +5 -5
- package/src/cloudflare/email-address.ts +7 -7
- package/src/cloudflare/email-catch-all.ts +6 -6
- package/src/cloudflare/email-routing.ts +5 -5
- package/src/cloudflare/email-rule.ts +5 -5
- package/src/cloudflare/hyperdrive.ts +35 -36
- package/src/cloudflare/kv-namespace.ts +31 -32
- package/src/cloudflare/miniflare/delete.ts +1 -1
- package/src/cloudflare/miniflare/miniflare-worker-proxy.ts +2 -7
- package/src/cloudflare/miniflare/remote-binding-proxy.ts +16 -4
- package/src/cloudflare/permission-groups.ts +4 -6
- package/src/cloudflare/pipeline.ts +29 -30
- package/src/cloudflare/queue-consumer.ts +5 -7
- package/src/cloudflare/queue.ts +42 -43
- package/src/cloudflare/react-router/plugin.ts +20 -0
- package/src/cloudflare/redirect-rule.ts +5 -5
- package/src/cloudflare/route.ts +5 -5
- package/src/cloudflare/ruleset.ts +3 -4
- package/src/cloudflare/secret.ts +35 -36
- package/src/cloudflare/secrets-store.ts +5 -8
- package/src/cloudflare/tunnel.ts +5 -7
- package/src/cloudflare/user.ts +12 -9
- package/src/cloudflare/vectorize-index.ts +8 -12
- package/src/cloudflare/vectorize-metadata-index.ts +6 -8
- package/src/cloudflare/website.ts +1 -1
- package/src/cloudflare/worker-assets.ts +10 -56
- package/src/cloudflare/worker-stub.ts +5 -5
- package/src/cloudflare/worker-subdomain.ts +6 -7
- package/src/cloudflare/worker.ts +91 -91
- package/src/cloudflare/zone.ts +3 -3
- package/src/context.ts +9 -7
- package/src/destroy.ts +2 -2
- package/src/dns/import-dns.ts +3 -5
- package/src/docker/container.ts +3 -6
- package/src/docker/image.ts +13 -13
- package/src/docker/network.ts +3 -4
- package/src/docker/remote-image.ts +3 -6
- package/src/docker/volume.ts +3 -4
- package/src/esbuild/bundle.ts +10 -8
- package/src/fs/copy-file.ts +3 -3
- package/src/fs/file.ts +3 -3
- package/src/fs/folder.ts +3 -3
- package/src/github/comment.ts +5 -7
- package/src/github/repository-environment.ts +3 -5
- package/src/github/repository-webhook.ts +3 -5
- package/src/github/secret.ts +3 -5
- package/src/neon/api/client.gen.ts +28 -0
- package/src/neon/api/sdk.gen.ts +2596 -0
- package/src/neon/api/types.gen.ts +8287 -0
- package/src/neon/api.ts +51 -147
- package/src/neon/branch.ts +278 -0
- package/src/neon/index.ts +1 -1
- package/src/neon/project.ts +136 -721
- package/src/neon/utils.ts +105 -0
- package/src/os/exec.ts +3 -3
- package/src/planetscale/api/client.gen.ts +28 -2882
- package/src/planetscale/api/sdk.gen.ts +3336 -0
- package/src/planetscale/api/types.gen.ts +778 -450
- package/src/planetscale/api.ts +101 -0
- package/src/planetscale/branch.ts +20 -19
- package/src/planetscale/database.ts +69 -70
- package/src/planetscale/index.ts +1 -1
- package/src/planetscale/password.ts +18 -22
- package/src/planetscale/role.ts +21 -21
- package/src/planetscale/utils.ts +20 -74
- package/src/random/random-string.ts +4 -4
- package/src/resource.ts +6 -2
- package/src/sentry/client-key.ts +3 -5
- package/src/sentry/project.ts +3 -5
- package/src/sentry/team.ts +3 -3
- package/src/state/r2-rest-state-store.ts +15 -57
- package/src/stripe/card.ts +3 -3
- package/src/stripe/coupon.ts +3 -3
- package/src/stripe/customer.ts +3 -3
- package/src/stripe/entitlements-feature.ts +3 -5
- package/src/stripe/file.ts +3 -3
- package/src/stripe/meter.ts +3 -3
- package/src/stripe/portal-configuration.ts +3 -5
- package/src/stripe/price.ts +3 -3
- package/src/stripe/product-feature.ts +3 -5
- package/src/stripe/product.ts +3 -3
- package/src/stripe/promotion-code.ts +3 -5
- package/src/stripe/shipping-rate.ts +3 -5
- package/src/stripe/tax-rate.ts +3 -3
- package/src/stripe/webhook.ts +3 -5
- package/src/test/bun.ts +1 -0
- package/src/test/options.ts +6 -0
- package/src/test/vitest.ts +1 -0
- package/src/upstash/redis.ts +1 -3
- package/src/util/api/client/client.gen.ts +268 -0
- package/src/util/api/client/index.ts +25 -0
- package/src/util/api/client/types.gen.ts +268 -0
- package/src/util/api/client/utils.gen.ts +331 -0
- package/src/util/api/core/auth.gen.ts +42 -0
- package/src/util/api/core/bodySerializer.gen.ts +92 -0
- package/src/util/api/core/params.gen.ts +153 -0
- package/src/util/api/core/pathSerializer.gen.ts +181 -0
- package/src/util/api/core/serverSentEvents.gen.ts +264 -0
- package/src/util/api/core/types.gen.ts +118 -0
- package/src/util/api/core/utils.gen.ts +143 -0
- package/src/util/http.ts +38 -11
- package/src/util/lock.ts +48 -0
- package/src/util/memoize.ts +26 -0
- package/src/util/oauth-client.ts +238 -0
- package/src/util/poll.ts +55 -0
- package/src/vercel/project-domain.ts +1 -3
- package/src/vercel/project.ts +3 -3
- package/workers/cloudflare-state-store.js +8 -5619
- package/workers/dofs-state-store.js +2 -802
- package/workers/remote-binding-proxy.js +3 -39
- package/workers/remote-binding-proxy.ts +126 -35
- package/workers/tunnel-proxy.js +6 -73
- package/lib/cloudflare/asset-manifest.d.ts +0 -15
- package/lib/cloudflare/asset-manifest.d.ts.map +0 -1
- package/lib/cloudflare/asset-manifest.js +0 -1
- package/lib/cloudflare/asset-manifest.js.map +0 -1
- package/lib/cloudflare/oauth.d.ts +0 -22
- package/lib/cloudflare/oauth.d.ts.map +0 -1
- package/lib/cloudflare/oauth.js +0 -214
- package/lib/cloudflare/oauth.js.map +0 -1
- package/lib/neon/api-error.d.ts +0 -31
- package/lib/neon/api-error.d.ts.map +0 -1
- package/lib/neon/api-error.js +0 -73
- package/lib/neon/api-error.js.map +0 -1
- package/lib/planetscale/api/index.d.ts +0 -3
- package/lib/planetscale/api/index.d.ts.map +0 -1
- package/lib/planetscale/api/index.js +0 -4
- package/lib/planetscale/api/index.js.map +0 -1
- package/lib/util/neverthrow.d.ts +0 -16
- package/lib/util/neverthrow.d.ts.map +0 -1
- package/lib/util/neverthrow.js +0 -46
- package/lib/util/neverthrow.js.map +0 -1
- package/src/cloudflare/asset-manifest.ts +0 -16
- package/src/cloudflare/oauth.ts +0 -301
- package/src/neon/api-error.ts +0 -81
- package/src/planetscale/api/index.ts +0 -4
- package/src/util/neverthrow.ts +0 -64
|
@@ -1,2401 +1,7 @@
|
|
|
1
|
-
// This file is auto-generated by
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super(`A request to the PlanetScale API failed (${props.status} ${props.code}): ${props.message}`);
|
|
9
|
-
this.code = props.code;
|
|
10
|
-
this.status = props.status;
|
|
11
|
-
this.url = props.url;
|
|
12
|
-
this.method = props.method;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export class PlanetScaleClient {
|
|
16
|
-
baseUrl;
|
|
17
|
-
token;
|
|
18
|
-
constructor(props = {}) {
|
|
19
|
-
this.baseUrl = props.baseUrl ?? "https://api.planetscale.com/v1";
|
|
20
|
-
if (props.apiKey) {
|
|
21
|
-
this.token = props.apiKey.unencrypted;
|
|
22
|
-
}
|
|
23
|
-
else if (props.serviceTokenId && props.serviceToken) {
|
|
24
|
-
this.token = `${props.serviceTokenId.unencrypted}:${props.serviceToken.unencrypted}`;
|
|
25
|
-
}
|
|
26
|
-
else if (process.env.PLANETSCALE_API_TOKEN) {
|
|
27
|
-
this.token = process.env.PLANETSCALE_API_TOKEN;
|
|
28
|
-
}
|
|
29
|
-
else if (process.env.PLANETSCALE_SERVICE_TOKEN_ID &&
|
|
30
|
-
process.env.PLANETSCALE_SERVICE_TOKEN) {
|
|
31
|
-
this.token = `${process.env.PLANETSCALE_SERVICE_TOKEN_ID}:${process.env.PLANETSCALE_SERVICE_TOKEN}`;
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
throw new Error("No authentication token provided for PlanetScale. Please provide an API key, service token ID and secret, or set the PLANETSCALE_SERVICE_TOKEN_ID and PLANETSCALE_SERVICE_TOKEN environment variables.");
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
async request(input) {
|
|
38
|
-
const url = formatURL({
|
|
39
|
-
url: this.baseUrl + input.path,
|
|
40
|
-
path: input.params?.path,
|
|
41
|
-
query: input.params?.query,
|
|
42
|
-
});
|
|
43
|
-
const res = await fetch(url, {
|
|
44
|
-
method: input.method,
|
|
45
|
-
headers: {
|
|
46
|
-
Authorization: this.token,
|
|
47
|
-
...(input.params?.body ? { "Content-Type": "application/json" } : {}),
|
|
48
|
-
},
|
|
49
|
-
...(input.params?.body
|
|
50
|
-
? { body: JSON.stringify(input.params.body) }
|
|
51
|
-
: {}),
|
|
52
|
-
});
|
|
53
|
-
if (!res.ok) {
|
|
54
|
-
const json = (await res.json());
|
|
55
|
-
const error = new PlanetScaleError({
|
|
56
|
-
code: json.code,
|
|
57
|
-
message: json.message,
|
|
58
|
-
status: res.status,
|
|
59
|
-
url,
|
|
60
|
-
method: input.method,
|
|
61
|
-
});
|
|
62
|
-
if (input.params?.result === "full") {
|
|
63
|
-
return {
|
|
64
|
-
status: res.status,
|
|
65
|
-
data: null,
|
|
66
|
-
error,
|
|
67
|
-
response: res,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
throw error;
|
|
71
|
-
}
|
|
72
|
-
const json = res.status === 204 ? null : (await res.json());
|
|
73
|
-
return (input.params?.result === "full"
|
|
74
|
-
? { status: res.status, data: json, error: null, response: res }
|
|
75
|
-
: json);
|
|
76
|
-
}
|
|
77
|
-
organizations = {
|
|
78
|
-
/**
|
|
79
|
-
* List organizations
|
|
80
|
-
*
|
|
81
|
-
* @description When using a service token, returns the list of organizations the service token has access to. When using an OAuth token, returns the list of organizations the user has access to.
|
|
82
|
-
* ### Authorization
|
|
83
|
-
* A OAuth token must have at least one of the following scopes in order to use this API endpoint:
|
|
84
|
-
*
|
|
85
|
-
* **OAuth Scopes**
|
|
86
|
-
*
|
|
87
|
-
* | Resource | Scopes |
|
|
88
|
-
* | :------- | :---------- |
|
|
89
|
-
* | User | `read_organizations` |
|
|
90
|
-
*/
|
|
91
|
-
list: async (params) => {
|
|
92
|
-
return await this.request({
|
|
93
|
-
method: "GET",
|
|
94
|
-
path: "/organizations",
|
|
95
|
-
params,
|
|
96
|
-
});
|
|
97
|
-
},
|
|
98
|
-
/**
|
|
99
|
-
* Get an organization
|
|
100
|
-
*
|
|
101
|
-
* @description ### Authorization
|
|
102
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
103
|
-
*
|
|
104
|
-
* **Service Token Accesses**
|
|
105
|
-
* `read_organization`
|
|
106
|
-
*
|
|
107
|
-
* **OAuth Scopes**
|
|
108
|
-
*
|
|
109
|
-
* | Resource | Scopes |
|
|
110
|
-
* | :------- | :---------- |
|
|
111
|
-
* | User | `read_organizations` |
|
|
112
|
-
* | Organization | `read_organization` |
|
|
113
|
-
*/
|
|
114
|
-
get: async (params) => {
|
|
115
|
-
return await this.request({
|
|
116
|
-
method: "GET",
|
|
117
|
-
path: "/organizations/{name}",
|
|
118
|
-
params,
|
|
119
|
-
});
|
|
120
|
-
},
|
|
121
|
-
/**
|
|
122
|
-
* Update an organization
|
|
123
|
-
*
|
|
124
|
-
* @description ### Authorization
|
|
125
|
-
* A OAuth token must have at least one of the following scopes in order to use this API endpoint:
|
|
126
|
-
*
|
|
127
|
-
* **OAuth Scopes**
|
|
128
|
-
*
|
|
129
|
-
* | Resource | Scopes |
|
|
130
|
-
* | :------- | :---------- |
|
|
131
|
-
* | Organization | `write_organization` |
|
|
132
|
-
*/
|
|
133
|
-
patch: async (params) => {
|
|
134
|
-
return await this.request({
|
|
135
|
-
method: "PATCH",
|
|
136
|
-
path: "/organizations/{name}",
|
|
137
|
-
params,
|
|
138
|
-
});
|
|
139
|
-
},
|
|
140
|
-
auditLog: {
|
|
141
|
-
/**
|
|
142
|
-
* List audit logs
|
|
143
|
-
*
|
|
144
|
-
* @description ### Authorization
|
|
145
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
146
|
-
*
|
|
147
|
-
* **Service Token Accesses**
|
|
148
|
-
* `read_audit_logs`
|
|
149
|
-
*/
|
|
150
|
-
list: async (params) => {
|
|
151
|
-
return await this.request({
|
|
152
|
-
method: "GET",
|
|
153
|
-
path: "/organizations/{name}/audit-log",
|
|
154
|
-
params,
|
|
155
|
-
});
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
regions: {
|
|
159
|
-
/**
|
|
160
|
-
* List regions for an organization
|
|
161
|
-
*
|
|
162
|
-
* @description ### Authorization
|
|
163
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
164
|
-
*
|
|
165
|
-
* **Service Token Accesses**
|
|
166
|
-
* `read_organization`
|
|
167
|
-
*
|
|
168
|
-
* **OAuth Scopes**
|
|
169
|
-
*
|
|
170
|
-
* | Resource | Scopes |
|
|
171
|
-
* | :------- | :---------- |
|
|
172
|
-
* | User | `read_organizations` |
|
|
173
|
-
* | Organization | `read_organization` |
|
|
174
|
-
*/
|
|
175
|
-
list: async (params) => {
|
|
176
|
-
return await this.request({
|
|
177
|
-
method: "GET",
|
|
178
|
-
path: "/organizations/{name}/regions",
|
|
179
|
-
params,
|
|
180
|
-
});
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
databases: {
|
|
184
|
-
/**
|
|
185
|
-
* List databases
|
|
186
|
-
*
|
|
187
|
-
* @description ### Authorization
|
|
188
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
189
|
-
*
|
|
190
|
-
* **Service Token Accesses**
|
|
191
|
-
* `read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `delete_branch_password`, `delete_production_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_schema_recommendations`, `close_schema_recommendations`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
|
|
192
|
-
*
|
|
193
|
-
* **OAuth Scopes**
|
|
194
|
-
*
|
|
195
|
-
* | Resource | Scopes |
|
|
196
|
-
* | :------- | :---------- |
|
|
197
|
-
* | Organization | `read_databases` |
|
|
198
|
-
*/
|
|
199
|
-
list: async (params) => {
|
|
200
|
-
return await this.request({
|
|
201
|
-
method: "GET",
|
|
202
|
-
path: "/organizations/{organization}/databases",
|
|
203
|
-
params,
|
|
204
|
-
});
|
|
205
|
-
},
|
|
206
|
-
/**
|
|
207
|
-
* Create a database
|
|
208
|
-
*
|
|
209
|
-
* @description ### Authorization
|
|
210
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
211
|
-
*
|
|
212
|
-
* **Service Token Accesses**
|
|
213
|
-
* `create_databases`
|
|
214
|
-
*
|
|
215
|
-
* **OAuth Scopes**
|
|
216
|
-
*
|
|
217
|
-
* | Resource | Scopes |
|
|
218
|
-
* | :------- | :---------- |
|
|
219
|
-
* | Organization | `create_databases` |
|
|
220
|
-
*/
|
|
221
|
-
post: async (params) => {
|
|
222
|
-
return await this.request({
|
|
223
|
-
method: "POST",
|
|
224
|
-
path: "/organizations/{organization}/databases",
|
|
225
|
-
params,
|
|
226
|
-
});
|
|
227
|
-
},
|
|
228
|
-
branches: {
|
|
229
|
-
/**
|
|
230
|
-
* List branches
|
|
231
|
-
*
|
|
232
|
-
* @description ### Authorization
|
|
233
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
234
|
-
*
|
|
235
|
-
* **Service Token Accesses**
|
|
236
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
237
|
-
*
|
|
238
|
-
* **OAuth Scopes**
|
|
239
|
-
*
|
|
240
|
-
* | Resource | Scopes |
|
|
241
|
-
* | :------- | :---------- |
|
|
242
|
-
* | Organization | `read_branches` |
|
|
243
|
-
* | Database | `read_branches` |
|
|
244
|
-
* | Branch | `read_branch` |
|
|
245
|
-
*/
|
|
246
|
-
list: async (params) => {
|
|
247
|
-
return await this.request({
|
|
248
|
-
method: "GET",
|
|
249
|
-
path: "/organizations/{organization}/databases/{database}/branches",
|
|
250
|
-
params,
|
|
251
|
-
});
|
|
252
|
-
},
|
|
253
|
-
/**
|
|
254
|
-
* Create a branch
|
|
255
|
-
*
|
|
256
|
-
* @description ### Authorization
|
|
257
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
258
|
-
*
|
|
259
|
-
* **Service Token Accesses**
|
|
260
|
-
* `create_branch`, `restore_production_branch_backup`, `restore_backup`
|
|
261
|
-
*
|
|
262
|
-
* **OAuth Scopes**
|
|
263
|
-
*
|
|
264
|
-
* | Resource | Scopes |
|
|
265
|
-
* | :------- | :---------- |
|
|
266
|
-
* | Organization | `write_branches`, `restore_production_branch_backups`, `restore_backups` |
|
|
267
|
-
* | Database | `write_branches`, `restore_production_branch_backups`, `restore_backups` |
|
|
268
|
-
* | Branch | `restore_backups` |
|
|
269
|
-
*/
|
|
270
|
-
post: async (params) => {
|
|
271
|
-
return await this.request({
|
|
272
|
-
method: "POST",
|
|
273
|
-
path: "/organizations/{organization}/databases/{database}/branches",
|
|
274
|
-
params,
|
|
275
|
-
});
|
|
276
|
-
},
|
|
277
|
-
backups: {
|
|
278
|
-
/**
|
|
279
|
-
* List backups
|
|
280
|
-
*
|
|
281
|
-
* @description ### Authorization
|
|
282
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
283
|
-
*
|
|
284
|
-
* **Service Token Accesses**
|
|
285
|
-
* `read_backups`
|
|
286
|
-
*
|
|
287
|
-
* **OAuth Scopes**
|
|
288
|
-
*
|
|
289
|
-
* | Resource | Scopes |
|
|
290
|
-
* | :------- | :---------- |
|
|
291
|
-
* | Organization | `read_backups` |
|
|
292
|
-
* | Database | `read_backups` |
|
|
293
|
-
* | Branch | `read_backups` |
|
|
294
|
-
*/
|
|
295
|
-
list: async (params) => {
|
|
296
|
-
return await this.request({
|
|
297
|
-
method: "GET",
|
|
298
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/backups",
|
|
299
|
-
params,
|
|
300
|
-
});
|
|
301
|
-
},
|
|
302
|
-
/**
|
|
303
|
-
* Create a backup
|
|
304
|
-
*
|
|
305
|
-
* @description ### Authorization
|
|
306
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
307
|
-
*
|
|
308
|
-
* **Service Token Accesses**
|
|
309
|
-
* `write_backups`
|
|
310
|
-
*
|
|
311
|
-
* **OAuth Scopes**
|
|
312
|
-
*
|
|
313
|
-
* | Resource | Scopes |
|
|
314
|
-
* | :------- | :---------- |
|
|
315
|
-
* | Organization | `write_backups` |
|
|
316
|
-
* | Database | `write_backups` |
|
|
317
|
-
* | Branch | `write_backups` |
|
|
318
|
-
*/
|
|
319
|
-
post: async (params) => {
|
|
320
|
-
return await this.request({
|
|
321
|
-
method: "POST",
|
|
322
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/backups",
|
|
323
|
-
params,
|
|
324
|
-
});
|
|
325
|
-
},
|
|
326
|
-
/**
|
|
327
|
-
* Get a backup
|
|
328
|
-
*
|
|
329
|
-
* @description ### Authorization
|
|
330
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
331
|
-
*
|
|
332
|
-
* **Service Token Accesses**
|
|
333
|
-
* `read_backups`
|
|
334
|
-
*
|
|
335
|
-
* **OAuth Scopes**
|
|
336
|
-
*
|
|
337
|
-
* | Resource | Scopes |
|
|
338
|
-
* | :------- | :---------- |
|
|
339
|
-
* | Organization | `read_backups` |
|
|
340
|
-
* | Database | `read_backups` |
|
|
341
|
-
* | Branch | `read_backups` |
|
|
342
|
-
*/
|
|
343
|
-
get: async (params) => {
|
|
344
|
-
return await this.request({
|
|
345
|
-
method: "GET",
|
|
346
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/backups/{id}",
|
|
347
|
-
params,
|
|
348
|
-
});
|
|
349
|
-
},
|
|
350
|
-
/**
|
|
351
|
-
* Update a backup
|
|
352
|
-
*
|
|
353
|
-
* @description ### Authorization
|
|
354
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
355
|
-
*
|
|
356
|
-
* **Service Token Accesses**
|
|
357
|
-
* `write_backups`
|
|
358
|
-
*
|
|
359
|
-
* **OAuth Scopes**
|
|
360
|
-
*
|
|
361
|
-
* | Resource | Scopes |
|
|
362
|
-
* | :------- | :---------- |
|
|
363
|
-
* | Organization | `write_backups` |
|
|
364
|
-
* | Database | `write_backups` |
|
|
365
|
-
* | Branch | `write_backups` |
|
|
366
|
-
*/
|
|
367
|
-
patch: async (params) => {
|
|
368
|
-
return await this.request({
|
|
369
|
-
method: "PATCH",
|
|
370
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/backups/{id}",
|
|
371
|
-
params,
|
|
372
|
-
});
|
|
373
|
-
},
|
|
374
|
-
/**
|
|
375
|
-
* Delete a backup
|
|
376
|
-
*
|
|
377
|
-
* @description ### Authorization
|
|
378
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
379
|
-
*
|
|
380
|
-
* **Service Token Accesses**
|
|
381
|
-
* `delete_backups`, `delete_production_branch_backups`
|
|
382
|
-
*
|
|
383
|
-
* **OAuth Scopes**
|
|
384
|
-
*
|
|
385
|
-
* | Resource | Scopes |
|
|
386
|
-
* | :------- | :---------- |
|
|
387
|
-
* | Organization | `delete_backups`, `delete_production_branch_backups` |
|
|
388
|
-
* | Database | `delete_backups`, `delete_production_branch_backups` |
|
|
389
|
-
* | Branch | `delete_backups` |
|
|
390
|
-
*/
|
|
391
|
-
delete: async (params) => {
|
|
392
|
-
return await this.request({
|
|
393
|
-
method: "DELETE",
|
|
394
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/backups/{id}",
|
|
395
|
-
params,
|
|
396
|
-
});
|
|
397
|
-
},
|
|
398
|
-
},
|
|
399
|
-
changes: {
|
|
400
|
-
/**
|
|
401
|
-
* Get branch change requests
|
|
402
|
-
*
|
|
403
|
-
* @description ### Authorization
|
|
404
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
405
|
-
*
|
|
406
|
-
* **Service Token Accesses**
|
|
407
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
408
|
-
*
|
|
409
|
-
* **OAuth Scopes**
|
|
410
|
-
*
|
|
411
|
-
* | Resource | Scopes |
|
|
412
|
-
* | :------- | :---------- |
|
|
413
|
-
* | Organization | `read_branches` |
|
|
414
|
-
* | Database | `read_branches` |
|
|
415
|
-
* | Branch | `read_branch` |
|
|
416
|
-
*/
|
|
417
|
-
list: async (params) => {
|
|
418
|
-
return await this.request({
|
|
419
|
-
method: "GET",
|
|
420
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/changes",
|
|
421
|
-
params,
|
|
422
|
-
});
|
|
423
|
-
},
|
|
424
|
-
/**
|
|
425
|
-
* Upsert a change request
|
|
426
|
-
*
|
|
427
|
-
* @description ### Authorization
|
|
428
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
429
|
-
*
|
|
430
|
-
* **Service Token Accesses**
|
|
431
|
-
* `write_database`
|
|
432
|
-
*
|
|
433
|
-
* **OAuth Scopes**
|
|
434
|
-
*
|
|
435
|
-
* | Resource | Scopes |
|
|
436
|
-
* | :------- | :---------- |
|
|
437
|
-
* | Organization | `write_databases` |
|
|
438
|
-
* | Database | `write_database` |
|
|
439
|
-
*/
|
|
440
|
-
patch: async (params) => {
|
|
441
|
-
return await this.request({
|
|
442
|
-
method: "PATCH",
|
|
443
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/changes",
|
|
444
|
-
params,
|
|
445
|
-
});
|
|
446
|
-
},
|
|
447
|
-
},
|
|
448
|
-
extensions: {
|
|
449
|
-
/**
|
|
450
|
-
* List cluster extensions
|
|
451
|
-
*
|
|
452
|
-
* @description ### Authorization
|
|
453
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
454
|
-
*
|
|
455
|
-
* **Service Token Accesses**
|
|
456
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
457
|
-
*
|
|
458
|
-
* **OAuth Scopes**
|
|
459
|
-
*
|
|
460
|
-
* | Resource | Scopes |
|
|
461
|
-
* | :------- | :---------- |
|
|
462
|
-
* | Organization | `read_branches` |
|
|
463
|
-
* | Database | `read_branches` |
|
|
464
|
-
* | Branch | `read_branch` |
|
|
465
|
-
*/
|
|
466
|
-
list: async (params) => {
|
|
467
|
-
return await this.request({
|
|
468
|
-
method: "GET",
|
|
469
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/extensions",
|
|
470
|
-
params,
|
|
471
|
-
});
|
|
472
|
-
},
|
|
473
|
-
},
|
|
474
|
-
keyspaces: {
|
|
475
|
-
/**
|
|
476
|
-
* Get keyspaces
|
|
477
|
-
*
|
|
478
|
-
*/
|
|
479
|
-
list: async (params) => {
|
|
480
|
-
return await this.request({
|
|
481
|
-
method: "GET",
|
|
482
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces",
|
|
483
|
-
params,
|
|
484
|
-
});
|
|
485
|
-
},
|
|
486
|
-
/**
|
|
487
|
-
* Create a keyspace
|
|
488
|
-
*
|
|
489
|
-
*/
|
|
490
|
-
post: async (params) => {
|
|
491
|
-
return await this.request({
|
|
492
|
-
method: "POST",
|
|
493
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces",
|
|
494
|
-
params,
|
|
495
|
-
});
|
|
496
|
-
},
|
|
497
|
-
vschema: {
|
|
498
|
-
/**
|
|
499
|
-
* Get the VSchema for the keyspace
|
|
500
|
-
*
|
|
501
|
-
* @description ### Authorization
|
|
502
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
503
|
-
*
|
|
504
|
-
* **Service Token Accesses**
|
|
505
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
506
|
-
*/
|
|
507
|
-
get: async (params) => {
|
|
508
|
-
return await this.request({
|
|
509
|
-
method: "GET",
|
|
510
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{keyspace}/vschema",
|
|
511
|
-
params,
|
|
512
|
-
});
|
|
513
|
-
},
|
|
514
|
-
/**
|
|
515
|
-
* Update the VSchema for the keyspace
|
|
516
|
-
*
|
|
517
|
-
* @description ### Authorization
|
|
518
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
519
|
-
*
|
|
520
|
-
* **Service Token Accesses**
|
|
521
|
-
* `write_production_branch_vschema`, `write_branch_vschema`
|
|
522
|
-
*/
|
|
523
|
-
patch: async (params) => {
|
|
524
|
-
return await this.request({
|
|
525
|
-
method: "PATCH",
|
|
526
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{keyspace}/vschema",
|
|
527
|
-
params,
|
|
528
|
-
});
|
|
529
|
-
},
|
|
530
|
-
},
|
|
531
|
-
/**
|
|
532
|
-
* Get a keyspace
|
|
533
|
-
*
|
|
534
|
-
*/
|
|
535
|
-
get: async (params) => {
|
|
536
|
-
return await this.request({
|
|
537
|
-
method: "GET",
|
|
538
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{name}",
|
|
539
|
-
params,
|
|
540
|
-
});
|
|
541
|
-
},
|
|
542
|
-
/**
|
|
543
|
-
* Configure keyspace settings
|
|
544
|
-
*
|
|
545
|
-
*/
|
|
546
|
-
patch: async (params) => {
|
|
547
|
-
return await this.request({
|
|
548
|
-
method: "PATCH",
|
|
549
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{name}",
|
|
550
|
-
params,
|
|
551
|
-
});
|
|
552
|
-
},
|
|
553
|
-
/**
|
|
554
|
-
* Delete a keyspace
|
|
555
|
-
*
|
|
556
|
-
*/
|
|
557
|
-
delete: async (params) => {
|
|
558
|
-
return await this.request({
|
|
559
|
-
method: "DELETE",
|
|
560
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{name}",
|
|
561
|
-
params,
|
|
562
|
-
});
|
|
563
|
-
},
|
|
564
|
-
rolloutStatus: {
|
|
565
|
-
/**
|
|
566
|
-
* Get keyspace rollout status
|
|
567
|
-
*
|
|
568
|
-
*/
|
|
569
|
-
get: async (params) => {
|
|
570
|
-
return await this.request({
|
|
571
|
-
method: "GET",
|
|
572
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{name}/rollout-status",
|
|
573
|
-
params,
|
|
574
|
-
});
|
|
575
|
-
},
|
|
576
|
-
},
|
|
577
|
-
resizes: {
|
|
578
|
-
/**
|
|
579
|
-
* List keyspace resizes
|
|
580
|
-
*
|
|
581
|
-
*/
|
|
582
|
-
list: async (params) => {
|
|
583
|
-
return await this.request({
|
|
584
|
-
method: "GET",
|
|
585
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/keyspaces/{name}/resizes",
|
|
586
|
-
params,
|
|
587
|
-
});
|
|
588
|
-
},
|
|
589
|
-
},
|
|
590
|
-
},
|
|
591
|
-
parameters: {
|
|
592
|
-
/**
|
|
593
|
-
* List cluster parameters
|
|
594
|
-
*
|
|
595
|
-
* @description ### Authorization
|
|
596
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
597
|
-
*
|
|
598
|
-
* **Service Token Accesses**
|
|
599
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
600
|
-
*
|
|
601
|
-
* **OAuth Scopes**
|
|
602
|
-
*
|
|
603
|
-
* | Resource | Scopes |
|
|
604
|
-
* | :------- | :---------- |
|
|
605
|
-
* | Organization | `read_branches` |
|
|
606
|
-
* | Database | `read_branches` |
|
|
607
|
-
* | Branch | `read_branch` |
|
|
608
|
-
*/
|
|
609
|
-
list: async (params) => {
|
|
610
|
-
return await this.request({
|
|
611
|
-
method: "GET",
|
|
612
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/parameters",
|
|
613
|
-
params,
|
|
614
|
-
});
|
|
615
|
-
},
|
|
616
|
-
},
|
|
617
|
-
passwords: {
|
|
618
|
-
/**
|
|
619
|
-
* List passwords
|
|
620
|
-
*
|
|
621
|
-
* @description ### Authorization
|
|
622
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
623
|
-
*
|
|
624
|
-
* **Service Token Accesses**
|
|
625
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
626
|
-
*
|
|
627
|
-
* **OAuth Scopes**
|
|
628
|
-
*
|
|
629
|
-
* | Resource | Scopes |
|
|
630
|
-
* | :------- | :---------- |
|
|
631
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
632
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
633
|
-
* | Branch | `manage_passwords` |
|
|
634
|
-
*/
|
|
635
|
-
list: async (params) => {
|
|
636
|
-
return await this.request({
|
|
637
|
-
method: "GET",
|
|
638
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords",
|
|
639
|
-
params,
|
|
640
|
-
});
|
|
641
|
-
},
|
|
642
|
-
/**
|
|
643
|
-
* Create a password
|
|
644
|
-
*
|
|
645
|
-
* @description ### Authorization
|
|
646
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
647
|
-
*
|
|
648
|
-
* **Service Token Accesses**
|
|
649
|
-
* `connect_production_branch`, `connect_branch`
|
|
650
|
-
*
|
|
651
|
-
* **OAuth Scopes**
|
|
652
|
-
*
|
|
653
|
-
* | Resource | Scopes |
|
|
654
|
-
* | :------- | :---------- |
|
|
655
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
656
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
657
|
-
* | Branch | `manage_passwords` |
|
|
658
|
-
*/
|
|
659
|
-
post: async (params) => {
|
|
660
|
-
return await this.request({
|
|
661
|
-
method: "POST",
|
|
662
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords",
|
|
663
|
-
params,
|
|
664
|
-
});
|
|
665
|
-
},
|
|
666
|
-
/**
|
|
667
|
-
* Get a password
|
|
668
|
-
*
|
|
669
|
-
* @description ### Authorization
|
|
670
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
671
|
-
*
|
|
672
|
-
* **Service Token Accesses**
|
|
673
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
674
|
-
*
|
|
675
|
-
* **OAuth Scopes**
|
|
676
|
-
*
|
|
677
|
-
* | Resource | Scopes |
|
|
678
|
-
* | :------- | :---------- |
|
|
679
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
680
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
681
|
-
* | Branch | `manage_passwords` |
|
|
682
|
-
*/
|
|
683
|
-
get: async (params) => {
|
|
684
|
-
return await this.request({
|
|
685
|
-
method: "GET",
|
|
686
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords/{id}",
|
|
687
|
-
params,
|
|
688
|
-
});
|
|
689
|
-
},
|
|
690
|
-
/**
|
|
691
|
-
* Update a password
|
|
692
|
-
*
|
|
693
|
-
* @description ### Authorization
|
|
694
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
695
|
-
*
|
|
696
|
-
* **Service Token Accesses**
|
|
697
|
-
* `connect_production_branch`, `connect_branch`
|
|
698
|
-
*
|
|
699
|
-
* **OAuth Scopes**
|
|
700
|
-
*
|
|
701
|
-
* | Resource | Scopes |
|
|
702
|
-
* | :------- | :---------- |
|
|
703
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
704
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
705
|
-
* | Branch | `manage_passwords` |
|
|
706
|
-
*/
|
|
707
|
-
patch: async (params) => {
|
|
708
|
-
return await this.request({
|
|
709
|
-
method: "PATCH",
|
|
710
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords/{id}",
|
|
711
|
-
params,
|
|
712
|
-
});
|
|
713
|
-
},
|
|
714
|
-
/**
|
|
715
|
-
* Delete a password
|
|
716
|
-
*
|
|
717
|
-
* @description ### Authorization
|
|
718
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
719
|
-
*
|
|
720
|
-
* **Service Token Accesses**
|
|
721
|
-
* `delete_production_branch_password`, `delete_branch_password`
|
|
722
|
-
*
|
|
723
|
-
* **OAuth Scopes**
|
|
724
|
-
*
|
|
725
|
-
* | Resource | Scopes |
|
|
726
|
-
* | :------- | :---------- |
|
|
727
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
728
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
729
|
-
* | Branch | `manage_passwords` |
|
|
730
|
-
*/
|
|
731
|
-
delete: async (params) => {
|
|
732
|
-
return await this.request({
|
|
733
|
-
method: "DELETE",
|
|
734
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords/{id}",
|
|
735
|
-
params,
|
|
736
|
-
});
|
|
737
|
-
},
|
|
738
|
-
renew: {
|
|
739
|
-
/**
|
|
740
|
-
* Renew a password
|
|
741
|
-
*
|
|
742
|
-
* @description ### Authorization
|
|
743
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
744
|
-
*
|
|
745
|
-
* **Service Token Accesses**
|
|
746
|
-
* `connect_production_branch`, `connect_branch`
|
|
747
|
-
*
|
|
748
|
-
* **OAuth Scopes**
|
|
749
|
-
*
|
|
750
|
-
* | Resource | Scopes |
|
|
751
|
-
* | :------- | :---------- |
|
|
752
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
753
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
754
|
-
* | Branch | `manage_passwords` |
|
|
755
|
-
*/
|
|
756
|
-
post: async (params) => {
|
|
757
|
-
return await this.request({
|
|
758
|
-
method: "POST",
|
|
759
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/passwords/{id}/renew",
|
|
760
|
-
params,
|
|
761
|
-
});
|
|
762
|
-
},
|
|
763
|
-
},
|
|
764
|
-
},
|
|
765
|
-
queryPatterns: {
|
|
766
|
-
/**
|
|
767
|
-
* List generated query patterns reports
|
|
768
|
-
*
|
|
769
|
-
* @description ### Authorization
|
|
770
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
771
|
-
*
|
|
772
|
-
* **Service Token Accesses**
|
|
773
|
-
* `read_branch`
|
|
774
|
-
*
|
|
775
|
-
* **OAuth Scopes**
|
|
776
|
-
*
|
|
777
|
-
* | Resource | Scopes |
|
|
778
|
-
* | :------- | :---------- |
|
|
779
|
-
* | Organization | `read_branches` |
|
|
780
|
-
* | Database | `read_branches` |
|
|
781
|
-
* | Branch | `read_branch` |
|
|
782
|
-
*/
|
|
783
|
-
list: async (params) => {
|
|
784
|
-
return await this.request({
|
|
785
|
-
method: "GET",
|
|
786
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/query-patterns",
|
|
787
|
-
params,
|
|
788
|
-
});
|
|
789
|
-
},
|
|
790
|
-
/**
|
|
791
|
-
* Create a new query patterns report
|
|
792
|
-
*
|
|
793
|
-
* @description ### Authorization
|
|
794
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
795
|
-
*
|
|
796
|
-
* **Service Token Accesses**
|
|
797
|
-
* `read_branch`
|
|
798
|
-
*
|
|
799
|
-
* **OAuth Scopes**
|
|
800
|
-
*
|
|
801
|
-
* | Resource | Scopes |
|
|
802
|
-
* | :------- | :---------- |
|
|
803
|
-
* | Organization | `read_branches` |
|
|
804
|
-
* | Database | `read_branches` |
|
|
805
|
-
* | Branch | `read_branch` |
|
|
806
|
-
*/
|
|
807
|
-
post: async (params) => {
|
|
808
|
-
return await this.request({
|
|
809
|
-
method: "POST",
|
|
810
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/query-patterns",
|
|
811
|
-
params,
|
|
812
|
-
});
|
|
813
|
-
},
|
|
814
|
-
/**
|
|
815
|
-
* Show the status of a query patterns report
|
|
816
|
-
*
|
|
817
|
-
* @description ### Authorization
|
|
818
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
819
|
-
*
|
|
820
|
-
* **Service Token Accesses**
|
|
821
|
-
* `read_branch`
|
|
822
|
-
*
|
|
823
|
-
* **OAuth Scopes**
|
|
824
|
-
*
|
|
825
|
-
* | Resource | Scopes |
|
|
826
|
-
* | :------- | :---------- |
|
|
827
|
-
* | Organization | `read_branches` |
|
|
828
|
-
* | Database | `read_branches` |
|
|
829
|
-
* | Branch | `read_branch` |
|
|
830
|
-
*/
|
|
831
|
-
get: async (params) => {
|
|
832
|
-
return await this.request({
|
|
833
|
-
method: "GET",
|
|
834
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/query-patterns/{id}",
|
|
835
|
-
params,
|
|
836
|
-
});
|
|
837
|
-
},
|
|
838
|
-
/**
|
|
839
|
-
* Delete a query patterns report
|
|
840
|
-
*
|
|
841
|
-
* @description ### Authorization
|
|
842
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
843
|
-
*
|
|
844
|
-
* **Service Token Accesses**
|
|
845
|
-
* `read_branch`
|
|
846
|
-
*
|
|
847
|
-
* **OAuth Scopes**
|
|
848
|
-
*
|
|
849
|
-
* | Resource | Scopes |
|
|
850
|
-
* | :------- | :---------- |
|
|
851
|
-
* | Organization | `read_branches` |
|
|
852
|
-
* | Database | `read_branches` |
|
|
853
|
-
* | Branch | `read_branch` |
|
|
854
|
-
*/
|
|
855
|
-
delete: async (params) => {
|
|
856
|
-
return await this.request({
|
|
857
|
-
method: "DELETE",
|
|
858
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/query-patterns/{id}",
|
|
859
|
-
params,
|
|
860
|
-
});
|
|
861
|
-
},
|
|
862
|
-
download: {
|
|
863
|
-
/**
|
|
864
|
-
* Download a finished query patterns report
|
|
865
|
-
*
|
|
866
|
-
* @description ### Authorization
|
|
867
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
868
|
-
*
|
|
869
|
-
* **Service Token Accesses**
|
|
870
|
-
* `read_branch`
|
|
871
|
-
*
|
|
872
|
-
* **OAuth Scopes**
|
|
873
|
-
*
|
|
874
|
-
* | Resource | Scopes |
|
|
875
|
-
* | :------- | :---------- |
|
|
876
|
-
* | Organization | `read_branches` |
|
|
877
|
-
* | Database | `read_branches` |
|
|
878
|
-
* | Branch | `read_branch` |
|
|
879
|
-
*/
|
|
880
|
-
get: async (params) => {
|
|
881
|
-
return await this.request({
|
|
882
|
-
method: "GET",
|
|
883
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/query-patterns/{id}/download",
|
|
884
|
-
params,
|
|
885
|
-
});
|
|
886
|
-
},
|
|
887
|
-
},
|
|
888
|
-
},
|
|
889
|
-
resizes: {
|
|
890
|
-
/**
|
|
891
|
-
* Cancel a change request
|
|
892
|
-
*
|
|
893
|
-
* @description ### Authorization
|
|
894
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
895
|
-
*
|
|
896
|
-
* **Service Token Accesses**
|
|
897
|
-
* `write_database`
|
|
898
|
-
*
|
|
899
|
-
* **OAuth Scopes**
|
|
900
|
-
*
|
|
901
|
-
* | Resource | Scopes |
|
|
902
|
-
* | :------- | :---------- |
|
|
903
|
-
* | Organization | `write_databases` |
|
|
904
|
-
* | Database | `write_database` |
|
|
905
|
-
*/
|
|
906
|
-
delete: async (params) => {
|
|
907
|
-
return await this.request({
|
|
908
|
-
method: "DELETE",
|
|
909
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/resizes",
|
|
910
|
-
params,
|
|
911
|
-
});
|
|
912
|
-
},
|
|
913
|
-
},
|
|
914
|
-
roles: {
|
|
915
|
-
/**
|
|
916
|
-
* List roles
|
|
917
|
-
*
|
|
918
|
-
* @description ### Authorization
|
|
919
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
920
|
-
*
|
|
921
|
-
* **Service Token Accesses**
|
|
922
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
923
|
-
*
|
|
924
|
-
* **OAuth Scopes**
|
|
925
|
-
*
|
|
926
|
-
* | Resource | Scopes |
|
|
927
|
-
* | :------- | :---------- |
|
|
928
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
929
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
930
|
-
* | Branch | `manage_passwords` |
|
|
931
|
-
*/
|
|
932
|
-
list: async (params) => {
|
|
933
|
-
return await this.request({
|
|
934
|
-
method: "GET",
|
|
935
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/roles",
|
|
936
|
-
params,
|
|
937
|
-
});
|
|
938
|
-
},
|
|
939
|
-
/**
|
|
940
|
-
* Create role credentials
|
|
941
|
-
*
|
|
942
|
-
* @description ### Authorization
|
|
943
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
944
|
-
*
|
|
945
|
-
* **Service Token Accesses**
|
|
946
|
-
* `create_production_branch_password`, `create_branch_password`
|
|
947
|
-
*
|
|
948
|
-
* **OAuth Scopes**
|
|
949
|
-
*
|
|
950
|
-
* | Resource | Scopes |
|
|
951
|
-
* | :------- | :---------- |
|
|
952
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
953
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
954
|
-
* | Branch | `manage_passwords` |
|
|
955
|
-
*/
|
|
956
|
-
post: async (params) => {
|
|
957
|
-
return await this.request({
|
|
958
|
-
method: "POST",
|
|
959
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/roles",
|
|
960
|
-
params,
|
|
961
|
-
});
|
|
962
|
-
},
|
|
963
|
-
/**
|
|
964
|
-
* Get a role
|
|
965
|
-
*
|
|
966
|
-
* @description ### Authorization
|
|
967
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
968
|
-
*
|
|
969
|
-
* **Service Token Accesses**
|
|
970
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
971
|
-
*
|
|
972
|
-
* **OAuth Scopes**
|
|
973
|
-
*
|
|
974
|
-
* | Resource | Scopes |
|
|
975
|
-
* | :------- | :---------- |
|
|
976
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
977
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
978
|
-
* | Branch | `manage_passwords` |
|
|
979
|
-
*/
|
|
980
|
-
get: async (params) => {
|
|
981
|
-
return await this.request({
|
|
982
|
-
method: "GET",
|
|
983
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/roles/{id}",
|
|
984
|
-
params,
|
|
985
|
-
});
|
|
986
|
-
},
|
|
987
|
-
/**
|
|
988
|
-
* Update role name
|
|
989
|
-
*
|
|
990
|
-
* @description ### Authorization
|
|
991
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
992
|
-
*
|
|
993
|
-
* **Service Token Accesses**
|
|
994
|
-
* `create_production_branch_password`, `create_branch_password`
|
|
995
|
-
*
|
|
996
|
-
* **OAuth Scopes**
|
|
997
|
-
*
|
|
998
|
-
* | Resource | Scopes |
|
|
999
|
-
* | :------- | :---------- |
|
|
1000
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
1001
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
1002
|
-
* | Branch | `manage_passwords` |
|
|
1003
|
-
*/
|
|
1004
|
-
patch: async (params) => {
|
|
1005
|
-
return await this.request({
|
|
1006
|
-
method: "PATCH",
|
|
1007
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/roles/{id}",
|
|
1008
|
-
params,
|
|
1009
|
-
});
|
|
1010
|
-
},
|
|
1011
|
-
/**
|
|
1012
|
-
* Delete role credentials
|
|
1013
|
-
*
|
|
1014
|
-
* @description ### Authorization
|
|
1015
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1016
|
-
*
|
|
1017
|
-
* **Service Token Accesses**
|
|
1018
|
-
* `delete_production_branch_password`, `delete_branch_password`
|
|
1019
|
-
*
|
|
1020
|
-
* **OAuth Scopes**
|
|
1021
|
-
*
|
|
1022
|
-
* | Resource | Scopes |
|
|
1023
|
-
* | :------- | :---------- |
|
|
1024
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
1025
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
1026
|
-
* | Branch | `manage_passwords` |
|
|
1027
|
-
*/
|
|
1028
|
-
delete: async (params) => {
|
|
1029
|
-
return await this.request({
|
|
1030
|
-
method: "DELETE",
|
|
1031
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/roles/{id}",
|
|
1032
|
-
params,
|
|
1033
|
-
});
|
|
1034
|
-
},
|
|
1035
|
-
renew: {
|
|
1036
|
-
/**
|
|
1037
|
-
* Renew role expiration
|
|
1038
|
-
*
|
|
1039
|
-
* @description ### Authorization
|
|
1040
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1041
|
-
*
|
|
1042
|
-
* **Service Token Accesses**
|
|
1043
|
-
* `create_production_branch_password`, `create_branch_password`
|
|
1044
|
-
*
|
|
1045
|
-
* **OAuth Scopes**
|
|
1046
|
-
*
|
|
1047
|
-
* | Resource | Scopes |
|
|
1048
|
-
* | :------- | :---------- |
|
|
1049
|
-
* | Organization | `manage_passwords`, `manage_production_branch_passwords` |
|
|
1050
|
-
* | Database | `manage_passwords`, `manage_production_branch_passwords` |
|
|
1051
|
-
* | Branch | `manage_passwords` |
|
|
1052
|
-
*/
|
|
1053
|
-
post: async (params) => {
|
|
1054
|
-
return await this.request({
|
|
1055
|
-
method: "POST",
|
|
1056
|
-
path: "/organizations/{organization}/databases/{database}/branches/{branch}/roles/{id}/renew",
|
|
1057
|
-
params,
|
|
1058
|
-
});
|
|
1059
|
-
},
|
|
1060
|
-
},
|
|
1061
|
-
},
|
|
1062
|
-
/**
|
|
1063
|
-
* Get a branch
|
|
1064
|
-
*
|
|
1065
|
-
* @description ### Authorization
|
|
1066
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1067
|
-
*
|
|
1068
|
-
* **Service Token Accesses**
|
|
1069
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
1070
|
-
*
|
|
1071
|
-
* **OAuth Scopes**
|
|
1072
|
-
*
|
|
1073
|
-
* | Resource | Scopes |
|
|
1074
|
-
* | :------- | :---------- |
|
|
1075
|
-
* | Organization | `read_branches` |
|
|
1076
|
-
* | Database | `read_branches` |
|
|
1077
|
-
* | Branch | `read_branch` |
|
|
1078
|
-
*/
|
|
1079
|
-
get: async (params) => {
|
|
1080
|
-
return await this.request({
|
|
1081
|
-
method: "GET",
|
|
1082
|
-
path: "/organizations/{organization}/databases/{database}/branches/{name}",
|
|
1083
|
-
params,
|
|
1084
|
-
});
|
|
1085
|
-
},
|
|
1086
|
-
/**
|
|
1087
|
-
* Delete a branch
|
|
1088
|
-
*
|
|
1089
|
-
* @description ### Authorization
|
|
1090
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1091
|
-
*
|
|
1092
|
-
* **Service Token Accesses**
|
|
1093
|
-
* `delete_branch`
|
|
1094
|
-
*
|
|
1095
|
-
* **OAuth Scopes**
|
|
1096
|
-
*
|
|
1097
|
-
* | Resource | Scopes |
|
|
1098
|
-
* | :------- | :---------- |
|
|
1099
|
-
* | Organization | `delete_branches`, `delete_production_branches` |
|
|
1100
|
-
* | Database | `delete_branches`, `delete_production_branches` |
|
|
1101
|
-
* | Branch | `delete_branch` |
|
|
1102
|
-
*/
|
|
1103
|
-
delete: async (params) => {
|
|
1104
|
-
return await this.request({
|
|
1105
|
-
method: "DELETE",
|
|
1106
|
-
path: "/organizations/{organization}/databases/{database}/branches/{name}",
|
|
1107
|
-
params,
|
|
1108
|
-
});
|
|
1109
|
-
},
|
|
1110
|
-
cluster: {
|
|
1111
|
-
/**
|
|
1112
|
-
* Change a branch cluster configuration
|
|
1113
|
-
*
|
|
1114
|
-
* @description ### Authorization
|
|
1115
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
1116
|
-
*
|
|
1117
|
-
* **Service Token Accesses**
|
|
1118
|
-
* `write_database`
|
|
1119
|
-
*/
|
|
1120
|
-
patch: async (params) => {
|
|
1121
|
-
return await this.request({
|
|
1122
|
-
method: "PATCH",
|
|
1123
|
-
path: "/organizations/{organization}/databases/{database}/branches/{name}/cluster",
|
|
1124
|
-
params,
|
|
1125
|
-
});
|
|
1126
|
-
},
|
|
1127
|
-
},
|
|
1128
|
-
demote: {
|
|
1129
|
-
/**
|
|
1130
|
-
* Demote a branch
|
|
1131
|
-
*
|
|
1132
|
-
* @description Demotes a branch from production to development
|
|
1133
|
-
* ### Authorization
|
|
1134
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1135
|
-
*
|
|
1136
|
-
* **Service Token Accesses**
|
|
1137
|
-
* `connect_production_branch`, `demote_branches`
|
|
1138
|
-
*
|
|
1139
|
-
* **OAuth Scopes**
|
|
1140
|
-
*
|
|
1141
|
-
* | Resource | Scopes |
|
|
1142
|
-
* | :------- | :---------- |
|
|
1143
|
-
* | Organization | `demote_branches` |
|
|
1144
|
-
* | Database | `demote_branches` |
|
|
1145
|
-
*/
|
|
1146
|
-
post: async (params) => {
|
|
1147
|
-
return await this.request({
|
|
1148
|
-
method: "POST",
|
|
1149
|
-
path: "/organizations/{organization}/databases/{database}/branches/{name}/demote",
|
|
1150
|
-
params,
|
|
1151
|
-
});
|
|
1152
|
-
},
|
|
1153
|
-
},
|
|
1154
|
-
promote: {
|
|
1155
|
-
/**
|
|
1156
|
-
* Promote a branch
|
|
1157
|
-
*
|
|
1158
|
-
* @description Promotes a branch from development to production
|
|
1159
|
-
* ### Authorization
|
|
1160
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1161
|
-
*
|
|
1162
|
-
* **Service Token Accesses**
|
|
1163
|
-
* `connect_production_branch`, `promote_branches`
|
|
1164
|
-
*
|
|
1165
|
-
* **OAuth Scopes**
|
|
1166
|
-
*
|
|
1167
|
-
* | Resource | Scopes |
|
|
1168
|
-
* | :------- | :---------- |
|
|
1169
|
-
* | Organization | `promote_branches` |
|
|
1170
|
-
* | Database | `promote_branches` |
|
|
1171
|
-
*/
|
|
1172
|
-
post: async (params) => {
|
|
1173
|
-
return await this.request({
|
|
1174
|
-
method: "POST",
|
|
1175
|
-
path: "/organizations/{organization}/databases/{database}/branches/{name}/promote",
|
|
1176
|
-
params,
|
|
1177
|
-
});
|
|
1178
|
-
},
|
|
1179
|
-
},
|
|
1180
|
-
safeMigrations: {
|
|
1181
|
-
/**
|
|
1182
|
-
* Enable safe migrations for a branch
|
|
1183
|
-
*
|
|
1184
|
-
*/
|
|
1185
|
-
post: async (params) => {
|
|
1186
|
-
return await this.request({
|
|
1187
|
-
method: "POST",
|
|
1188
|
-
path: "/organizations/{organization}/databases/{database}/branches/{name}/safe-migrations",
|
|
1189
|
-
params,
|
|
1190
|
-
});
|
|
1191
|
-
},
|
|
1192
|
-
/**
|
|
1193
|
-
* Disable safe migrations for a branch
|
|
1194
|
-
*
|
|
1195
|
-
*/
|
|
1196
|
-
delete: async (params) => {
|
|
1197
|
-
return await this.request({
|
|
1198
|
-
method: "DELETE",
|
|
1199
|
-
path: "/organizations/{organization}/databases/{database}/branches/{name}/safe-migrations",
|
|
1200
|
-
params,
|
|
1201
|
-
});
|
|
1202
|
-
},
|
|
1203
|
-
},
|
|
1204
|
-
schema: {
|
|
1205
|
-
/**
|
|
1206
|
-
* Get a branch schema
|
|
1207
|
-
*
|
|
1208
|
-
* @description ### Authorization
|
|
1209
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1210
|
-
*
|
|
1211
|
-
* **Service Token Accesses**
|
|
1212
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
1213
|
-
*
|
|
1214
|
-
* **OAuth Scopes**
|
|
1215
|
-
*
|
|
1216
|
-
* | Resource | Scopes |
|
|
1217
|
-
* | :------- | :---------- |
|
|
1218
|
-
* | Organization | `read_branches` |
|
|
1219
|
-
* | Database | `read_branches` |
|
|
1220
|
-
* | Branch | `read_branch` |
|
|
1221
|
-
*/
|
|
1222
|
-
get: async (params) => {
|
|
1223
|
-
return await this.request({
|
|
1224
|
-
method: "GET",
|
|
1225
|
-
path: "/organizations/{organization}/databases/{database}/branches/{name}/schema",
|
|
1226
|
-
params,
|
|
1227
|
-
});
|
|
1228
|
-
},
|
|
1229
|
-
lint: {
|
|
1230
|
-
/**
|
|
1231
|
-
* Lint a branch schema
|
|
1232
|
-
*
|
|
1233
|
-
* @description ### Authorization
|
|
1234
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1235
|
-
*
|
|
1236
|
-
* **Service Token Accesses**
|
|
1237
|
-
* `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`
|
|
1238
|
-
*
|
|
1239
|
-
* **OAuth Scopes**
|
|
1240
|
-
*
|
|
1241
|
-
* | Resource | Scopes |
|
|
1242
|
-
* | :------- | :---------- |
|
|
1243
|
-
* | Organization | `read_branches` |
|
|
1244
|
-
* | Database | `read_branches` |
|
|
1245
|
-
* | Branch | `read_branch` |
|
|
1246
|
-
*/
|
|
1247
|
-
get: async (params) => {
|
|
1248
|
-
return await this.request({
|
|
1249
|
-
method: "GET",
|
|
1250
|
-
path: "/organizations/{organization}/databases/{database}/branches/{name}/schema/lint",
|
|
1251
|
-
params,
|
|
1252
|
-
});
|
|
1253
|
-
},
|
|
1254
|
-
},
|
|
1255
|
-
},
|
|
1256
|
-
},
|
|
1257
|
-
deployQueue: {
|
|
1258
|
-
/**
|
|
1259
|
-
* Get the deploy queue
|
|
1260
|
-
*
|
|
1261
|
-
* @description The deploy queue returns the current list of deploy requests in the order they will be deployed.
|
|
1262
|
-
*/
|
|
1263
|
-
get: async (params) => {
|
|
1264
|
-
return await this.request({
|
|
1265
|
-
method: "GET",
|
|
1266
|
-
path: "/organizations/{organization}/databases/{database}/deploy-queue",
|
|
1267
|
-
params,
|
|
1268
|
-
});
|
|
1269
|
-
},
|
|
1270
|
-
},
|
|
1271
|
-
deployRequests: {
|
|
1272
|
-
/**
|
|
1273
|
-
* List deploy requests
|
|
1274
|
-
*
|
|
1275
|
-
* @description List deploy requests for a database
|
|
1276
|
-
* ### Authorization
|
|
1277
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1278
|
-
*
|
|
1279
|
-
* **Service Token Accesses**
|
|
1280
|
-
* `read_deploy_request`
|
|
1281
|
-
*
|
|
1282
|
-
* **OAuth Scopes**
|
|
1283
|
-
*
|
|
1284
|
-
* | Resource | Scopes |
|
|
1285
|
-
* | :------- | :---------- |
|
|
1286
|
-
* | Organization | `read_deploy_requests` |
|
|
1287
|
-
* | Database | `read_deploy_requests` |
|
|
1288
|
-
*/
|
|
1289
|
-
list: async (params) => {
|
|
1290
|
-
return await this.request({
|
|
1291
|
-
method: "GET",
|
|
1292
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests",
|
|
1293
|
-
params,
|
|
1294
|
-
});
|
|
1295
|
-
},
|
|
1296
|
-
/**
|
|
1297
|
-
* Create a deploy request
|
|
1298
|
-
*
|
|
1299
|
-
* @description ### Authorization
|
|
1300
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1301
|
-
*
|
|
1302
|
-
* **Service Token Accesses**
|
|
1303
|
-
* `read_deploy_request`, `create_deploy_requests`
|
|
1304
|
-
*
|
|
1305
|
-
* **OAuth Scopes**
|
|
1306
|
-
*
|
|
1307
|
-
* | Resource | Scopes |
|
|
1308
|
-
* | :------- | :---------- |
|
|
1309
|
-
* | Organization | `write_deploy_requests` |
|
|
1310
|
-
* | Database | `write_deploy_requests` |
|
|
1311
|
-
*/
|
|
1312
|
-
post: async (params) => {
|
|
1313
|
-
return await this.request({
|
|
1314
|
-
method: "POST",
|
|
1315
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests",
|
|
1316
|
-
params,
|
|
1317
|
-
});
|
|
1318
|
-
},
|
|
1319
|
-
/**
|
|
1320
|
-
* Get a deploy request
|
|
1321
|
-
*
|
|
1322
|
-
* @description ### Authorization
|
|
1323
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1324
|
-
*
|
|
1325
|
-
* **Service Token Accesses**
|
|
1326
|
-
* `read_deploy_request`
|
|
1327
|
-
*
|
|
1328
|
-
* **OAuth Scopes**
|
|
1329
|
-
*
|
|
1330
|
-
* | Resource | Scopes |
|
|
1331
|
-
* | :------- | :---------- |
|
|
1332
|
-
* | Organization | `read_deploy_requests` |
|
|
1333
|
-
* | Database | `read_deploy_requests` |
|
|
1334
|
-
*/
|
|
1335
|
-
get: async (params) => {
|
|
1336
|
-
return await this.request({
|
|
1337
|
-
method: "GET",
|
|
1338
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}",
|
|
1339
|
-
params,
|
|
1340
|
-
});
|
|
1341
|
-
},
|
|
1342
|
-
/**
|
|
1343
|
-
* Close a deploy request
|
|
1344
|
-
*
|
|
1345
|
-
* @description ### Authorization
|
|
1346
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1347
|
-
*
|
|
1348
|
-
* **Service Token Accesses**
|
|
1349
|
-
* `read_deploy_request`
|
|
1350
|
-
*
|
|
1351
|
-
* **OAuth Scopes**
|
|
1352
|
-
*
|
|
1353
|
-
* | Resource | Scopes |
|
|
1354
|
-
* | :------- | :---------- |
|
|
1355
|
-
* | Organization | `write_deploy_requests` |
|
|
1356
|
-
* | Database | `write_deploy_requests` |
|
|
1357
|
-
*/
|
|
1358
|
-
patch: async (params) => {
|
|
1359
|
-
return await this.request({
|
|
1360
|
-
method: "PATCH",
|
|
1361
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}",
|
|
1362
|
-
params,
|
|
1363
|
-
});
|
|
1364
|
-
},
|
|
1365
|
-
applyDeploy: {
|
|
1366
|
-
/**
|
|
1367
|
-
* Complete a gated deploy request
|
|
1368
|
-
*
|
|
1369
|
-
* @description ### Authorization
|
|
1370
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1371
|
-
*
|
|
1372
|
-
* **Service Token Accesses**
|
|
1373
|
-
* `read_deploy_request`, `create_deploy_request`
|
|
1374
|
-
*
|
|
1375
|
-
* **OAuth Scopes**
|
|
1376
|
-
*
|
|
1377
|
-
* | Resource | Scopes |
|
|
1378
|
-
* | :------- | :---------- |
|
|
1379
|
-
* | Organization | `deploy_deploy_requests` |
|
|
1380
|
-
* | Database | `deploy_deploy_requests` |
|
|
1381
|
-
*/
|
|
1382
|
-
post: async (params) => {
|
|
1383
|
-
return await this.request({
|
|
1384
|
-
method: "POST",
|
|
1385
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/apply-deploy",
|
|
1386
|
-
params,
|
|
1387
|
-
});
|
|
1388
|
-
},
|
|
1389
|
-
},
|
|
1390
|
-
autoApply: {
|
|
1391
|
-
/**
|
|
1392
|
-
* Update auto-apply for deploy request
|
|
1393
|
-
*
|
|
1394
|
-
* @description Enables or disabled the auto-apply setting for a deploy request
|
|
1395
|
-
* ### Authorization
|
|
1396
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1397
|
-
*
|
|
1398
|
-
* **Service Token Accesses**
|
|
1399
|
-
* `read_deploy_request`, `create_deploy_request`
|
|
1400
|
-
*
|
|
1401
|
-
* **OAuth Scopes**
|
|
1402
|
-
*
|
|
1403
|
-
* | Resource | Scopes |
|
|
1404
|
-
* | :------- | :---------- |
|
|
1405
|
-
* | Organization | `deploy_deploy_requests` |
|
|
1406
|
-
* | Database | `deploy_deploy_requests` |
|
|
1407
|
-
*/
|
|
1408
|
-
put: async (params) => {
|
|
1409
|
-
return await this.request({
|
|
1410
|
-
method: "PUT",
|
|
1411
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/auto-apply",
|
|
1412
|
-
params,
|
|
1413
|
-
});
|
|
1414
|
-
},
|
|
1415
|
-
},
|
|
1416
|
-
cancel: {
|
|
1417
|
-
/**
|
|
1418
|
-
* Cancel a queued deploy request
|
|
1419
|
-
*
|
|
1420
|
-
* @description ### Authorization
|
|
1421
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1422
|
-
*
|
|
1423
|
-
* **Service Token Accesses**
|
|
1424
|
-
* `read_deploy_request`, `create_deploy_request`
|
|
1425
|
-
*
|
|
1426
|
-
* **OAuth Scopes**
|
|
1427
|
-
*
|
|
1428
|
-
* | Resource | Scopes |
|
|
1429
|
-
* | :------- | :---------- |
|
|
1430
|
-
* | Organization | `deploy_deploy_requests` |
|
|
1431
|
-
* | Database | `deploy_deploy_requests` |
|
|
1432
|
-
*/
|
|
1433
|
-
post: async (params) => {
|
|
1434
|
-
return await this.request({
|
|
1435
|
-
method: "POST",
|
|
1436
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/cancel",
|
|
1437
|
-
params,
|
|
1438
|
-
});
|
|
1439
|
-
},
|
|
1440
|
-
},
|
|
1441
|
-
completeDeploy: {
|
|
1442
|
-
/**
|
|
1443
|
-
* Complete an errored deploy
|
|
1444
|
-
*
|
|
1445
|
-
* @description ### Authorization
|
|
1446
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1447
|
-
*
|
|
1448
|
-
* **Service Token Accesses**
|
|
1449
|
-
* `read_deploy_request`, `create_deploy_request`
|
|
1450
|
-
*
|
|
1451
|
-
* **OAuth Scopes**
|
|
1452
|
-
*
|
|
1453
|
-
* | Resource | Scopes |
|
|
1454
|
-
* | :------- | :---------- |
|
|
1455
|
-
* | Organization | `deploy_deploy_requests` |
|
|
1456
|
-
* | Database | `deploy_deploy_requests` |
|
|
1457
|
-
*/
|
|
1458
|
-
post: async (params) => {
|
|
1459
|
-
return await this.request({
|
|
1460
|
-
method: "POST",
|
|
1461
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/complete-deploy",
|
|
1462
|
-
params,
|
|
1463
|
-
});
|
|
1464
|
-
},
|
|
1465
|
-
},
|
|
1466
|
-
deploy: {
|
|
1467
|
-
/**
|
|
1468
|
-
* Queue a deploy request
|
|
1469
|
-
*
|
|
1470
|
-
* @description ### Authorization
|
|
1471
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1472
|
-
*
|
|
1473
|
-
* **Service Token Accesses**
|
|
1474
|
-
* `read_deploy_request`, `create_deploy_request`
|
|
1475
|
-
*
|
|
1476
|
-
* **OAuth Scopes**
|
|
1477
|
-
*
|
|
1478
|
-
* | Resource | Scopes |
|
|
1479
|
-
* | :------- | :---------- |
|
|
1480
|
-
* | Organization | `deploy_deploy_requests` |
|
|
1481
|
-
* | Database | `deploy_deploy_requests` |
|
|
1482
|
-
*/
|
|
1483
|
-
post: async (params) => {
|
|
1484
|
-
return await this.request({
|
|
1485
|
-
method: "POST",
|
|
1486
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/deploy",
|
|
1487
|
-
params,
|
|
1488
|
-
});
|
|
1489
|
-
},
|
|
1490
|
-
},
|
|
1491
|
-
deployment: {
|
|
1492
|
-
/**
|
|
1493
|
-
* Get a deployment
|
|
1494
|
-
*
|
|
1495
|
-
* @description Get the deployment for a deploy request
|
|
1496
|
-
* ### Authorization
|
|
1497
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1498
|
-
*
|
|
1499
|
-
* **Service Token Accesses**
|
|
1500
|
-
* `read_deploy_request`
|
|
1501
|
-
*
|
|
1502
|
-
* **OAuth Scopes**
|
|
1503
|
-
*
|
|
1504
|
-
* | Resource | Scopes |
|
|
1505
|
-
* | :------- | :---------- |
|
|
1506
|
-
* | Organization | `read_deploy_requests` |
|
|
1507
|
-
* | Database | `read_deploy_requests` |
|
|
1508
|
-
*/
|
|
1509
|
-
get: async (params) => {
|
|
1510
|
-
return await this.request({
|
|
1511
|
-
method: "GET",
|
|
1512
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/deployment",
|
|
1513
|
-
params,
|
|
1514
|
-
});
|
|
1515
|
-
},
|
|
1516
|
-
},
|
|
1517
|
-
operations: {
|
|
1518
|
-
/**
|
|
1519
|
-
* List deploy operations
|
|
1520
|
-
*
|
|
1521
|
-
* @description List deploy operations for a deploy request
|
|
1522
|
-
* ### Authorization
|
|
1523
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1524
|
-
*
|
|
1525
|
-
* **Service Token Accesses**
|
|
1526
|
-
* `read_deploy_request`
|
|
1527
|
-
*
|
|
1528
|
-
* **OAuth Scopes**
|
|
1529
|
-
*
|
|
1530
|
-
* | Resource | Scopes |
|
|
1531
|
-
* | :------- | :---------- |
|
|
1532
|
-
* | Organization | `read_deploy_requests` |
|
|
1533
|
-
* | Database | `read_deploy_requests` |
|
|
1534
|
-
*/
|
|
1535
|
-
list: async (params) => {
|
|
1536
|
-
return await this.request({
|
|
1537
|
-
method: "GET",
|
|
1538
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/operations",
|
|
1539
|
-
params,
|
|
1540
|
-
});
|
|
1541
|
-
},
|
|
1542
|
-
},
|
|
1543
|
-
revert: {
|
|
1544
|
-
/**
|
|
1545
|
-
* Complete a revert
|
|
1546
|
-
*
|
|
1547
|
-
* @description ### Authorization
|
|
1548
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1549
|
-
*
|
|
1550
|
-
* **Service Token Accesses**
|
|
1551
|
-
* `read_deploy_request`, `create_deploy_request`
|
|
1552
|
-
*
|
|
1553
|
-
* **OAuth Scopes**
|
|
1554
|
-
*
|
|
1555
|
-
* | Resource | Scopes |
|
|
1556
|
-
* | :------- | :---------- |
|
|
1557
|
-
* | Organization | `deploy_deploy_requests` |
|
|
1558
|
-
* | Database | `deploy_deploy_requests` |
|
|
1559
|
-
*/
|
|
1560
|
-
post: async (params) => {
|
|
1561
|
-
return await this.request({
|
|
1562
|
-
method: "POST",
|
|
1563
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/revert",
|
|
1564
|
-
params,
|
|
1565
|
-
});
|
|
1566
|
-
},
|
|
1567
|
-
},
|
|
1568
|
-
reviews: {
|
|
1569
|
-
/**
|
|
1570
|
-
* List deploy request reviews
|
|
1571
|
-
*
|
|
1572
|
-
* @description ### Authorization
|
|
1573
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1574
|
-
*
|
|
1575
|
-
* **Service Token Accesses**
|
|
1576
|
-
* `read_deploy_request`
|
|
1577
|
-
*
|
|
1578
|
-
* **OAuth Scopes**
|
|
1579
|
-
*
|
|
1580
|
-
* | Resource | Scopes |
|
|
1581
|
-
* | :------- | :---------- |
|
|
1582
|
-
* | Organization | `read_deploy_requests` |
|
|
1583
|
-
* | Database | `read_deploy_requests` |
|
|
1584
|
-
*/
|
|
1585
|
-
list: async (params) => {
|
|
1586
|
-
return await this.request({
|
|
1587
|
-
method: "GET",
|
|
1588
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/reviews",
|
|
1589
|
-
params,
|
|
1590
|
-
});
|
|
1591
|
-
},
|
|
1592
|
-
/**
|
|
1593
|
-
* Review a deploy request
|
|
1594
|
-
*
|
|
1595
|
-
* @description Review a deploy request by either approving or commenting on the deploy request
|
|
1596
|
-
* ### Authorization
|
|
1597
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1598
|
-
*
|
|
1599
|
-
* **Service Token Accesses**
|
|
1600
|
-
* `approve_deploy_request`, `review_deploy_request`
|
|
1601
|
-
*
|
|
1602
|
-
* **OAuth Scopes**
|
|
1603
|
-
*
|
|
1604
|
-
* | Resource | Scopes |
|
|
1605
|
-
* | :------- | :---------- |
|
|
1606
|
-
* | Organization | `approve_deploy_requests` |
|
|
1607
|
-
* | Database | `approve_deploy_requests` |
|
|
1608
|
-
*/
|
|
1609
|
-
post: async (params) => {
|
|
1610
|
-
return await this.request({
|
|
1611
|
-
method: "POST",
|
|
1612
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/reviews",
|
|
1613
|
-
params,
|
|
1614
|
-
});
|
|
1615
|
-
},
|
|
1616
|
-
},
|
|
1617
|
-
skipRevert: {
|
|
1618
|
-
/**
|
|
1619
|
-
* Skip revert period
|
|
1620
|
-
*
|
|
1621
|
-
* @description Skips the revert period for a deploy request
|
|
1622
|
-
* ### Authorization
|
|
1623
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1624
|
-
*
|
|
1625
|
-
* **Service Token Accesses**
|
|
1626
|
-
* `read_deploy_request`, `create_deploy_request`
|
|
1627
|
-
*
|
|
1628
|
-
* **OAuth Scopes**
|
|
1629
|
-
*
|
|
1630
|
-
* | Resource | Scopes |
|
|
1631
|
-
* | :------- | :---------- |
|
|
1632
|
-
* | Organization | `deploy_deploy_requests` |
|
|
1633
|
-
* | Database | `deploy_deploy_requests` |
|
|
1634
|
-
*/
|
|
1635
|
-
post: async (params) => {
|
|
1636
|
-
return await this.request({
|
|
1637
|
-
method: "POST",
|
|
1638
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/skip-revert",
|
|
1639
|
-
params,
|
|
1640
|
-
});
|
|
1641
|
-
},
|
|
1642
|
-
},
|
|
1643
|
-
throttler: {
|
|
1644
|
-
/**
|
|
1645
|
-
* Get deploy request throttler configurations
|
|
1646
|
-
*
|
|
1647
|
-
* @description ### Authorization
|
|
1648
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1649
|
-
*
|
|
1650
|
-
* **Service Token Accesses**
|
|
1651
|
-
* `read_deploy_request`
|
|
1652
|
-
*
|
|
1653
|
-
* **OAuth Scopes**
|
|
1654
|
-
*
|
|
1655
|
-
* | Resource | Scopes |
|
|
1656
|
-
* | :------- | :---------- |
|
|
1657
|
-
* | Organization | `read_deploy_requests` |
|
|
1658
|
-
* | Database | `read_deploy_requests` |
|
|
1659
|
-
*/
|
|
1660
|
-
get: async (params) => {
|
|
1661
|
-
return await this.request({
|
|
1662
|
-
method: "GET",
|
|
1663
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/throttler",
|
|
1664
|
-
params,
|
|
1665
|
-
});
|
|
1666
|
-
},
|
|
1667
|
-
/**
|
|
1668
|
-
* Update deploy request throttler configurations
|
|
1669
|
-
*
|
|
1670
|
-
* @description ### Authorization
|
|
1671
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1672
|
-
*
|
|
1673
|
-
* **Service Token Accesses**
|
|
1674
|
-
* `read_deploy_request`, `create_deploy_request`
|
|
1675
|
-
*
|
|
1676
|
-
* **OAuth Scopes**
|
|
1677
|
-
*
|
|
1678
|
-
* | Resource | Scopes |
|
|
1679
|
-
* | :------- | :---------- |
|
|
1680
|
-
* | Organization | `deploy_deploy_requests` |
|
|
1681
|
-
* | Database | `deploy_deploy_requests` |
|
|
1682
|
-
*/
|
|
1683
|
-
patch: async (params) => {
|
|
1684
|
-
return await this.request({
|
|
1685
|
-
method: "PATCH",
|
|
1686
|
-
path: "/organizations/{organization}/databases/{database}/deploy-requests/{number}/throttler",
|
|
1687
|
-
params,
|
|
1688
|
-
});
|
|
1689
|
-
},
|
|
1690
|
-
},
|
|
1691
|
-
},
|
|
1692
|
-
throttler: {
|
|
1693
|
-
/**
|
|
1694
|
-
* Get database throttler configurations
|
|
1695
|
-
*
|
|
1696
|
-
* @description ### Authorization
|
|
1697
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1698
|
-
*
|
|
1699
|
-
* **Service Token Accesses**
|
|
1700
|
-
* `read_deploy_request`, `create_deploy_request`
|
|
1701
|
-
*
|
|
1702
|
-
* **OAuth Scopes**
|
|
1703
|
-
*
|
|
1704
|
-
* | Resource | Scopes |
|
|
1705
|
-
* | :------- | :---------- |
|
|
1706
|
-
* | Organization | `read_databases` |
|
|
1707
|
-
* | Database | `read_database` |
|
|
1708
|
-
*/
|
|
1709
|
-
get: async (params) => {
|
|
1710
|
-
return await this.request({
|
|
1711
|
-
method: "GET",
|
|
1712
|
-
path: "/organizations/{organization}/databases/{database}/throttler",
|
|
1713
|
-
params,
|
|
1714
|
-
});
|
|
1715
|
-
},
|
|
1716
|
-
/**
|
|
1717
|
-
* Update database throttler configurations
|
|
1718
|
-
*
|
|
1719
|
-
* @description ### Authorization
|
|
1720
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1721
|
-
*
|
|
1722
|
-
* **Service Token Accesses**
|
|
1723
|
-
* `read_deploy_request`, `create_deploy_request`
|
|
1724
|
-
*
|
|
1725
|
-
* **OAuth Scopes**
|
|
1726
|
-
*
|
|
1727
|
-
* | Resource | Scopes |
|
|
1728
|
-
* | :------- | :---------- |
|
|
1729
|
-
* | Organization | `deploy_deploy_requests` |
|
|
1730
|
-
* | Database | `deploy_deploy_requests` |
|
|
1731
|
-
*/
|
|
1732
|
-
patch: async (params) => {
|
|
1733
|
-
return await this.request({
|
|
1734
|
-
method: "PATCH",
|
|
1735
|
-
path: "/organizations/{organization}/databases/{database}/throttler",
|
|
1736
|
-
params,
|
|
1737
|
-
});
|
|
1738
|
-
},
|
|
1739
|
-
},
|
|
1740
|
-
webhooks: {
|
|
1741
|
-
/**
|
|
1742
|
-
* List webhooks
|
|
1743
|
-
*
|
|
1744
|
-
* @description List webhooks for a database
|
|
1745
|
-
* ### Authorization
|
|
1746
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1747
|
-
*
|
|
1748
|
-
* **Service Token Accesses**
|
|
1749
|
-
* `read_database`
|
|
1750
|
-
*
|
|
1751
|
-
* **OAuth Scopes**
|
|
1752
|
-
*
|
|
1753
|
-
* | Resource | Scopes |
|
|
1754
|
-
* | :------- | :---------- |
|
|
1755
|
-
* | Organization | `read_databases` |
|
|
1756
|
-
* | Database | `read_database` |
|
|
1757
|
-
*/
|
|
1758
|
-
list: async (params) => {
|
|
1759
|
-
return await this.request({
|
|
1760
|
-
method: "GET",
|
|
1761
|
-
path: "/organizations/{organization}/databases/{database}/webhooks",
|
|
1762
|
-
params,
|
|
1763
|
-
});
|
|
1764
|
-
},
|
|
1765
|
-
/**
|
|
1766
|
-
* Create a webhook
|
|
1767
|
-
*
|
|
1768
|
-
* @description ### Authorization
|
|
1769
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1770
|
-
*
|
|
1771
|
-
* **Service Token Accesses**
|
|
1772
|
-
* `write_database`
|
|
1773
|
-
*
|
|
1774
|
-
* **OAuth Scopes**
|
|
1775
|
-
*
|
|
1776
|
-
* | Resource | Scopes |
|
|
1777
|
-
* | :------- | :---------- |
|
|
1778
|
-
* | Organization | `write_databases` |
|
|
1779
|
-
* | Database | `write_database` |
|
|
1780
|
-
*/
|
|
1781
|
-
post: async (params) => {
|
|
1782
|
-
return await this.request({
|
|
1783
|
-
method: "POST",
|
|
1784
|
-
path: "/organizations/{organization}/databases/{database}/webhooks",
|
|
1785
|
-
params,
|
|
1786
|
-
});
|
|
1787
|
-
},
|
|
1788
|
-
/**
|
|
1789
|
-
* Get a webhook
|
|
1790
|
-
*
|
|
1791
|
-
* @description ### Authorization
|
|
1792
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1793
|
-
*
|
|
1794
|
-
* **Service Token Accesses**
|
|
1795
|
-
* `read_database`
|
|
1796
|
-
*
|
|
1797
|
-
* **OAuth Scopes**
|
|
1798
|
-
*
|
|
1799
|
-
* | Resource | Scopes |
|
|
1800
|
-
* | :------- | :---------- |
|
|
1801
|
-
* | Organization | `read_databases` |
|
|
1802
|
-
* | Database | `read_database` |
|
|
1803
|
-
*/
|
|
1804
|
-
get: async (params) => {
|
|
1805
|
-
return await this.request({
|
|
1806
|
-
method: "GET",
|
|
1807
|
-
path: "/organizations/{organization}/databases/{database}/webhooks/{id}",
|
|
1808
|
-
params,
|
|
1809
|
-
});
|
|
1810
|
-
},
|
|
1811
|
-
/**
|
|
1812
|
-
* Update a webhook
|
|
1813
|
-
*
|
|
1814
|
-
* @description ### Authorization
|
|
1815
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1816
|
-
*
|
|
1817
|
-
* **Service Token Accesses**
|
|
1818
|
-
* `write_database`
|
|
1819
|
-
*
|
|
1820
|
-
* **OAuth Scopes**
|
|
1821
|
-
*
|
|
1822
|
-
* | Resource | Scopes |
|
|
1823
|
-
* | :------- | :---------- |
|
|
1824
|
-
* | Organization | `write_databases` |
|
|
1825
|
-
* | Database | `write_database` |
|
|
1826
|
-
*/
|
|
1827
|
-
patch: async (params) => {
|
|
1828
|
-
return await this.request({
|
|
1829
|
-
method: "PATCH",
|
|
1830
|
-
path: "/organizations/{organization}/databases/{database}/webhooks/{id}",
|
|
1831
|
-
params,
|
|
1832
|
-
});
|
|
1833
|
-
},
|
|
1834
|
-
/**
|
|
1835
|
-
* Delete a webhook
|
|
1836
|
-
*
|
|
1837
|
-
* @description ### Authorization
|
|
1838
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1839
|
-
*
|
|
1840
|
-
* **Service Token Accesses**
|
|
1841
|
-
* `write_database`
|
|
1842
|
-
*
|
|
1843
|
-
* **OAuth Scopes**
|
|
1844
|
-
*
|
|
1845
|
-
* | Resource | Scopes |
|
|
1846
|
-
* | :------- | :---------- |
|
|
1847
|
-
* | Organization | `write_databases` |
|
|
1848
|
-
* | Database | `write_database` |
|
|
1849
|
-
*/
|
|
1850
|
-
delete: async (params) => {
|
|
1851
|
-
return await this.request({
|
|
1852
|
-
method: "DELETE",
|
|
1853
|
-
path: "/organizations/{organization}/databases/{database}/webhooks/{id}",
|
|
1854
|
-
params,
|
|
1855
|
-
});
|
|
1856
|
-
},
|
|
1857
|
-
test: {
|
|
1858
|
-
/**
|
|
1859
|
-
* Test a webhook
|
|
1860
|
-
*
|
|
1861
|
-
* @description Sends a test event to the webhook
|
|
1862
|
-
* ### Authorization
|
|
1863
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
1864
|
-
*
|
|
1865
|
-
* **Service Token Accesses**
|
|
1866
|
-
* `write_database`
|
|
1867
|
-
*
|
|
1868
|
-
* **OAuth Scopes**
|
|
1869
|
-
*
|
|
1870
|
-
* | Resource | Scopes |
|
|
1871
|
-
* | :------- | :---------- |
|
|
1872
|
-
* | Organization | `write_databases` |
|
|
1873
|
-
* | Database | `write_database` |
|
|
1874
|
-
*/
|
|
1875
|
-
post: async (params) => {
|
|
1876
|
-
return await this.request({
|
|
1877
|
-
method: "POST",
|
|
1878
|
-
path: "/organizations/{organization}/databases/{database}/webhooks/{id}/test",
|
|
1879
|
-
params,
|
|
1880
|
-
});
|
|
1881
|
-
},
|
|
1882
|
-
},
|
|
1883
|
-
},
|
|
1884
|
-
workflows: {
|
|
1885
|
-
/**
|
|
1886
|
-
* List workflows
|
|
1887
|
-
*
|
|
1888
|
-
*/
|
|
1889
|
-
list: async (params) => {
|
|
1890
|
-
return await this.request({
|
|
1891
|
-
method: "GET",
|
|
1892
|
-
path: "/organizations/{organization}/databases/{database}/workflows",
|
|
1893
|
-
params,
|
|
1894
|
-
});
|
|
1895
|
-
},
|
|
1896
|
-
/**
|
|
1897
|
-
* Create a workflow
|
|
1898
|
-
*
|
|
1899
|
-
*/
|
|
1900
|
-
post: async (params) => {
|
|
1901
|
-
return await this.request({
|
|
1902
|
-
method: "POST",
|
|
1903
|
-
path: "/organizations/{organization}/databases/{database}/workflows",
|
|
1904
|
-
params,
|
|
1905
|
-
});
|
|
1906
|
-
},
|
|
1907
|
-
/**
|
|
1908
|
-
* Get a workflow
|
|
1909
|
-
*
|
|
1910
|
-
*/
|
|
1911
|
-
get: async (params) => {
|
|
1912
|
-
return await this.request({
|
|
1913
|
-
method: "GET",
|
|
1914
|
-
path: "/organizations/{organization}/databases/{database}/workflows/{number}",
|
|
1915
|
-
params,
|
|
1916
|
-
});
|
|
1917
|
-
},
|
|
1918
|
-
/**
|
|
1919
|
-
* Cancel a workflow
|
|
1920
|
-
*
|
|
1921
|
-
*/
|
|
1922
|
-
delete: async (params) => {
|
|
1923
|
-
return await this.request({
|
|
1924
|
-
method: "DELETE",
|
|
1925
|
-
path: "/organizations/{organization}/databases/{database}/workflows/{number}",
|
|
1926
|
-
params,
|
|
1927
|
-
});
|
|
1928
|
-
},
|
|
1929
|
-
complete: {
|
|
1930
|
-
/**
|
|
1931
|
-
* Complete a workflow
|
|
1932
|
-
*
|
|
1933
|
-
*/
|
|
1934
|
-
patch: async (params) => {
|
|
1935
|
-
return await this.request({
|
|
1936
|
-
method: "PATCH",
|
|
1937
|
-
path: "/organizations/{organization}/databases/{database}/workflows/{number}/complete",
|
|
1938
|
-
params,
|
|
1939
|
-
});
|
|
1940
|
-
},
|
|
1941
|
-
},
|
|
1942
|
-
cutover: {
|
|
1943
|
-
/**
|
|
1944
|
-
* Cutover traffic
|
|
1945
|
-
*
|
|
1946
|
-
*/
|
|
1947
|
-
patch: async (params) => {
|
|
1948
|
-
return await this.request({
|
|
1949
|
-
method: "PATCH",
|
|
1950
|
-
path: "/organizations/{organization}/databases/{database}/workflows/{number}/cutover",
|
|
1951
|
-
params,
|
|
1952
|
-
});
|
|
1953
|
-
},
|
|
1954
|
-
},
|
|
1955
|
-
retry: {
|
|
1956
|
-
/**
|
|
1957
|
-
* Retry a failed workflow
|
|
1958
|
-
*
|
|
1959
|
-
*/
|
|
1960
|
-
patch: async (params) => {
|
|
1961
|
-
return await this.request({
|
|
1962
|
-
method: "PATCH",
|
|
1963
|
-
path: "/organizations/{organization}/databases/{database}/workflows/{number}/retry",
|
|
1964
|
-
params,
|
|
1965
|
-
});
|
|
1966
|
-
},
|
|
1967
|
-
},
|
|
1968
|
-
reverseCutover: {
|
|
1969
|
-
/**
|
|
1970
|
-
* Reverse traffic cutover
|
|
1971
|
-
*
|
|
1972
|
-
*/
|
|
1973
|
-
patch: async (params) => {
|
|
1974
|
-
return await this.request({
|
|
1975
|
-
method: "PATCH",
|
|
1976
|
-
path: "/organizations/{organization}/databases/{database}/workflows/{number}/reverse-cutover",
|
|
1977
|
-
params,
|
|
1978
|
-
});
|
|
1979
|
-
},
|
|
1980
|
-
},
|
|
1981
|
-
reverseTraffic: {
|
|
1982
|
-
/**
|
|
1983
|
-
* Reverse traffic
|
|
1984
|
-
*
|
|
1985
|
-
*/
|
|
1986
|
-
patch: async (params) => {
|
|
1987
|
-
return await this.request({
|
|
1988
|
-
method: "PATCH",
|
|
1989
|
-
path: "/organizations/{organization}/databases/{database}/workflows/{number}/reverse-traffic",
|
|
1990
|
-
params,
|
|
1991
|
-
});
|
|
1992
|
-
},
|
|
1993
|
-
},
|
|
1994
|
-
switchPrimaries: {
|
|
1995
|
-
/**
|
|
1996
|
-
* Switch primary traffic
|
|
1997
|
-
*
|
|
1998
|
-
*/
|
|
1999
|
-
patch: async (params) => {
|
|
2000
|
-
return await this.request({
|
|
2001
|
-
method: "PATCH",
|
|
2002
|
-
path: "/organizations/{organization}/databases/{database}/workflows/{number}/switch-primaries",
|
|
2003
|
-
params,
|
|
2004
|
-
});
|
|
2005
|
-
},
|
|
2006
|
-
},
|
|
2007
|
-
switchReplicas: {
|
|
2008
|
-
/**
|
|
2009
|
-
* Switch replica traffic
|
|
2010
|
-
*
|
|
2011
|
-
*/
|
|
2012
|
-
patch: async (params) => {
|
|
2013
|
-
return await this.request({
|
|
2014
|
-
method: "PATCH",
|
|
2015
|
-
path: "/organizations/{organization}/databases/{database}/workflows/{number}/switch-replicas",
|
|
2016
|
-
params,
|
|
2017
|
-
});
|
|
2018
|
-
},
|
|
2019
|
-
},
|
|
2020
|
-
verifyData: {
|
|
2021
|
-
/**
|
|
2022
|
-
* Verify workflow data
|
|
2023
|
-
*
|
|
2024
|
-
*/
|
|
2025
|
-
patch: async (params) => {
|
|
2026
|
-
return await this.request({
|
|
2027
|
-
method: "PATCH",
|
|
2028
|
-
path: "/organizations/{organization}/databases/{database}/workflows/{number}/verify-data",
|
|
2029
|
-
params,
|
|
2030
|
-
});
|
|
2031
|
-
},
|
|
2032
|
-
},
|
|
2033
|
-
},
|
|
2034
|
-
/**
|
|
2035
|
-
* Get a database
|
|
2036
|
-
*
|
|
2037
|
-
* @description ### Authorization
|
|
2038
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
2039
|
-
*
|
|
2040
|
-
* **Service Token Accesses**
|
|
2041
|
-
* `read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `delete_branch_password`, `delete_production_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_schema_recommendations`, `close_schema_recommendations`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
|
|
2042
|
-
*
|
|
2043
|
-
* **OAuth Scopes**
|
|
2044
|
-
*
|
|
2045
|
-
* | Resource | Scopes |
|
|
2046
|
-
* | :------- | :---------- |
|
|
2047
|
-
* | Organization | `read_databases` |
|
|
2048
|
-
* | Database | `read_database` |
|
|
2049
|
-
*/
|
|
2050
|
-
get: async (params) => {
|
|
2051
|
-
return await this.request({
|
|
2052
|
-
method: "GET",
|
|
2053
|
-
path: "/organizations/{organization}/databases/{name}",
|
|
2054
|
-
params,
|
|
2055
|
-
});
|
|
2056
|
-
},
|
|
2057
|
-
/**
|
|
2058
|
-
* Update database settings
|
|
2059
|
-
*
|
|
2060
|
-
* @description ### Authorization
|
|
2061
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
2062
|
-
*
|
|
2063
|
-
* **Service Token Accesses**
|
|
2064
|
-
* `write_database`
|
|
2065
|
-
*
|
|
2066
|
-
* **OAuth Scopes**
|
|
2067
|
-
*
|
|
2068
|
-
* | Resource | Scopes |
|
|
2069
|
-
* | :------- | :---------- |
|
|
2070
|
-
* | Organization | `write_databases` |
|
|
2071
|
-
* | Database | `write_database` |
|
|
2072
|
-
*/
|
|
2073
|
-
patch: async (params) => {
|
|
2074
|
-
return await this.request({
|
|
2075
|
-
method: "PATCH",
|
|
2076
|
-
path: "/organizations/{organization}/databases/{name}",
|
|
2077
|
-
params,
|
|
2078
|
-
});
|
|
2079
|
-
},
|
|
2080
|
-
/**
|
|
2081
|
-
* Delete a database
|
|
2082
|
-
*
|
|
2083
|
-
* @description ### Authorization
|
|
2084
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
2085
|
-
*
|
|
2086
|
-
* **Service Token Accesses**
|
|
2087
|
-
* `delete_database`
|
|
2088
|
-
*
|
|
2089
|
-
* **OAuth Scopes**
|
|
2090
|
-
*
|
|
2091
|
-
* | Resource | Scopes |
|
|
2092
|
-
* | :------- | :---------- |
|
|
2093
|
-
* | Organization | `delete_databases` |
|
|
2094
|
-
* | Database | `delete_database` |
|
|
2095
|
-
*/
|
|
2096
|
-
delete: async (params) => {
|
|
2097
|
-
return await this.request({
|
|
2098
|
-
method: "DELETE",
|
|
2099
|
-
path: "/organizations/{organization}/databases/{name}",
|
|
2100
|
-
params,
|
|
2101
|
-
});
|
|
2102
|
-
},
|
|
2103
|
-
readOnlyRegions: {
|
|
2104
|
-
/**
|
|
2105
|
-
* List read-only regions
|
|
2106
|
-
*
|
|
2107
|
-
* @description List read-only regions for the database's default branch
|
|
2108
|
-
* ### Authorization
|
|
2109
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
2110
|
-
*
|
|
2111
|
-
* **Service Token Accesses**
|
|
2112
|
-
* `read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `delete_branch_password`, `delete_production_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_schema_recommendations`, `close_schema_recommendations`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
|
|
2113
|
-
*
|
|
2114
|
-
* **OAuth Scopes**
|
|
2115
|
-
*
|
|
2116
|
-
* | Resource | Scopes |
|
|
2117
|
-
* | :------- | :---------- |
|
|
2118
|
-
* | Organization | `read_branches` |
|
|
2119
|
-
* | Database | `read_branches` |
|
|
2120
|
-
*/
|
|
2121
|
-
list: async (params) => {
|
|
2122
|
-
return await this.request({
|
|
2123
|
-
method: "GET",
|
|
2124
|
-
path: "/organizations/{organization}/databases/{name}/read-only-regions",
|
|
2125
|
-
params,
|
|
2126
|
-
});
|
|
2127
|
-
},
|
|
2128
|
-
},
|
|
2129
|
-
regions: {
|
|
2130
|
-
/**
|
|
2131
|
-
* List database regions
|
|
2132
|
-
*
|
|
2133
|
-
* @description ### Authorization
|
|
2134
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
2135
|
-
*
|
|
2136
|
-
* **Service Token Accesses**
|
|
2137
|
-
* `read_database`, `delete_database`, `write_database`, `read_branch`, `delete_branch`, `create_branch`, `delete_production_branch`, `connect_branch`, `connect_production_branch`, `delete_branch_password`, `delete_production_branch_password`, `read_deploy_request`, `create_deploy_request`, `approve_deploy_request`, `read_schema_recommendations`, `close_schema_recommendations`, `read_comment`, `create_comment`, `restore_backup`, `restore_production_branch_backup`, `read_backups`, `write_backups`, `delete_backups`, `delete_production_branch_backups`, `write_branch_vschema`, `write_production_branch_vschema`
|
|
2138
|
-
*
|
|
2139
|
-
* **OAuth Scopes**
|
|
2140
|
-
*
|
|
2141
|
-
* | Resource | Scopes |
|
|
2142
|
-
* | :------- | :---------- |
|
|
2143
|
-
* | Organization | `read_databases` |
|
|
2144
|
-
* | Database | `read_database` |
|
|
2145
|
-
*/
|
|
2146
|
-
list: async (params) => {
|
|
2147
|
-
return await this.request({
|
|
2148
|
-
method: "GET",
|
|
2149
|
-
path: "/organizations/{organization}/databases/{name}/regions",
|
|
2150
|
-
params,
|
|
2151
|
-
});
|
|
2152
|
-
},
|
|
2153
|
-
},
|
|
2154
|
-
},
|
|
2155
|
-
invoices: {
|
|
2156
|
-
/**
|
|
2157
|
-
* Get invoices
|
|
2158
|
-
*
|
|
2159
|
-
* @description Get the invoices for an organization
|
|
2160
|
-
* ### Authorization
|
|
2161
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
2162
|
-
*
|
|
2163
|
-
* **Service Token Accesses**
|
|
2164
|
-
* `read_invoices`
|
|
2165
|
-
*
|
|
2166
|
-
* **OAuth Scopes**
|
|
2167
|
-
*
|
|
2168
|
-
* | Resource | Scopes |
|
|
2169
|
-
* | :------- | :---------- |
|
|
2170
|
-
* | Organization | `read_invoices` |
|
|
2171
|
-
*/
|
|
2172
|
-
list: async (params) => {
|
|
2173
|
-
return await this.request({
|
|
2174
|
-
method: "GET",
|
|
2175
|
-
path: "/organizations/{organization}/invoices",
|
|
2176
|
-
params,
|
|
2177
|
-
});
|
|
2178
|
-
},
|
|
2179
|
-
/**
|
|
2180
|
-
* Get an invoice
|
|
2181
|
-
*
|
|
2182
|
-
* @description ### Authorization
|
|
2183
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
2184
|
-
*
|
|
2185
|
-
* **Service Token Accesses**
|
|
2186
|
-
* `read_invoices`
|
|
2187
|
-
*
|
|
2188
|
-
* **OAuth Scopes**
|
|
2189
|
-
*
|
|
2190
|
-
* | Resource | Scopes |
|
|
2191
|
-
* | :------- | :---------- |
|
|
2192
|
-
* | Organization | `read_invoices` |
|
|
2193
|
-
*/
|
|
2194
|
-
get: async (params) => {
|
|
2195
|
-
return await this.request({
|
|
2196
|
-
method: "GET",
|
|
2197
|
-
path: "/organizations/{organization}/invoices/{id}",
|
|
2198
|
-
params,
|
|
2199
|
-
});
|
|
2200
|
-
},
|
|
2201
|
-
lineItems: {
|
|
2202
|
-
/**
|
|
2203
|
-
* Get invoice line items
|
|
2204
|
-
*
|
|
2205
|
-
* @description Get the line items for an invoice
|
|
2206
|
-
* ### Authorization
|
|
2207
|
-
* A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:
|
|
2208
|
-
*
|
|
2209
|
-
* **Service Token Accesses**
|
|
2210
|
-
* `read_invoices`
|
|
2211
|
-
*
|
|
2212
|
-
* **OAuth Scopes**
|
|
2213
|
-
*
|
|
2214
|
-
* | Resource | Scopes |
|
|
2215
|
-
* | :------- | :---------- |
|
|
2216
|
-
* | Organization | `read_invoices` |
|
|
2217
|
-
*/
|
|
2218
|
-
get: async (params) => {
|
|
2219
|
-
return await this.request({
|
|
2220
|
-
method: "GET",
|
|
2221
|
-
path: "/organizations/{organization}/invoices/{id}/line-items",
|
|
2222
|
-
params,
|
|
2223
|
-
});
|
|
2224
|
-
},
|
|
2225
|
-
},
|
|
2226
|
-
},
|
|
2227
|
-
members: {
|
|
2228
|
-
/**
|
|
2229
|
-
* List organization members
|
|
2230
|
-
*
|
|
2231
|
-
* @description ### Authorization
|
|
2232
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
2233
|
-
*
|
|
2234
|
-
* **Service Token Accesses**
|
|
2235
|
-
* `read_organization`
|
|
2236
|
-
*/
|
|
2237
|
-
list: async (params) => {
|
|
2238
|
-
return await this.request({
|
|
2239
|
-
method: "GET",
|
|
2240
|
-
path: "/organizations/{organization}/members",
|
|
2241
|
-
params,
|
|
2242
|
-
});
|
|
2243
|
-
},
|
|
2244
|
-
},
|
|
2245
|
-
oauthApplications: {
|
|
2246
|
-
/**
|
|
2247
|
-
* List OAuth applications
|
|
2248
|
-
*
|
|
2249
|
-
* @description ### Authorization
|
|
2250
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
2251
|
-
*
|
|
2252
|
-
* **Service Token Accesses**
|
|
2253
|
-
* `read_oauth_applications`
|
|
2254
|
-
*/
|
|
2255
|
-
list: async (params) => {
|
|
2256
|
-
return await this.request({
|
|
2257
|
-
method: "GET",
|
|
2258
|
-
path: "/organizations/{organization}/oauth-applications",
|
|
2259
|
-
params,
|
|
2260
|
-
});
|
|
2261
|
-
},
|
|
2262
|
-
/**
|
|
2263
|
-
* Get an OAuth application
|
|
2264
|
-
*
|
|
2265
|
-
* @description ### Authorization
|
|
2266
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
2267
|
-
*
|
|
2268
|
-
* **Service Token Accesses**
|
|
2269
|
-
* `read_oauth_applications`
|
|
2270
|
-
*/
|
|
2271
|
-
get: async (params) => {
|
|
2272
|
-
return await this.request({
|
|
2273
|
-
method: "GET",
|
|
2274
|
-
path: "/organizations/{organization}/oauth-applications/{application_id}",
|
|
2275
|
-
params,
|
|
2276
|
-
});
|
|
2277
|
-
},
|
|
2278
|
-
tokens: {
|
|
2279
|
-
/**
|
|
2280
|
-
* List OAuth tokens
|
|
2281
|
-
*
|
|
2282
|
-
* @description List OAuth tokens created by an OAuth application
|
|
2283
|
-
* ### Authorization
|
|
2284
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
2285
|
-
*
|
|
2286
|
-
* **Service Token Accesses**
|
|
2287
|
-
* `read_oauth_tokens`
|
|
2288
|
-
*/
|
|
2289
|
-
list: async (params) => {
|
|
2290
|
-
return await this.request({
|
|
2291
|
-
method: "GET",
|
|
2292
|
-
path: "/organizations/{organization}/oauth-applications/{application_id}/tokens",
|
|
2293
|
-
params,
|
|
2294
|
-
});
|
|
2295
|
-
},
|
|
2296
|
-
/**
|
|
2297
|
-
* Get an OAuth token
|
|
2298
|
-
*
|
|
2299
|
-
* @description ### Authorization
|
|
2300
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
2301
|
-
*
|
|
2302
|
-
* **Service Token Accesses**
|
|
2303
|
-
* `read_oauth_tokens`
|
|
2304
|
-
*/
|
|
2305
|
-
get: async (params) => {
|
|
2306
|
-
return await this.request({
|
|
2307
|
-
method: "GET",
|
|
2308
|
-
path: "/organizations/{organization}/oauth-applications/{application_id}/tokens/{token_id}",
|
|
2309
|
-
params,
|
|
2310
|
-
});
|
|
2311
|
-
},
|
|
2312
|
-
/**
|
|
2313
|
-
* Delete an OAuth token
|
|
2314
|
-
*
|
|
2315
|
-
* @description ### Authorization
|
|
2316
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
2317
|
-
*
|
|
2318
|
-
* **Service Token Accesses**
|
|
2319
|
-
* `delete_oauth_tokens`
|
|
2320
|
-
*/
|
|
2321
|
-
delete: async (params) => {
|
|
2322
|
-
return await this.request({
|
|
2323
|
-
method: "DELETE",
|
|
2324
|
-
path: "/organizations/{organization}/oauth-applications/{application_id}/tokens/{token_id}",
|
|
2325
|
-
params,
|
|
2326
|
-
});
|
|
2327
|
-
},
|
|
2328
|
-
},
|
|
2329
|
-
token: {
|
|
2330
|
-
/**
|
|
2331
|
-
* Create or renew an OAuth token
|
|
2332
|
-
*
|
|
2333
|
-
* @description Create an OAuth token from an authorization grant code, or refresh an OAuth token from a refresh token
|
|
2334
|
-
* ### Authorization
|
|
2335
|
-
* A service token must have at least one of the following access in order to use this API endpoint:
|
|
2336
|
-
*
|
|
2337
|
-
* **Service Token Accesses**
|
|
2338
|
-
* `write_oauth_tokens`
|
|
2339
|
-
*/
|
|
2340
|
-
post: async (params) => {
|
|
2341
|
-
return await this.request({
|
|
2342
|
-
method: "POST",
|
|
2343
|
-
path: "/organizations/{organization}/oauth-applications/{id}/token",
|
|
2344
|
-
params,
|
|
2345
|
-
});
|
|
2346
|
-
},
|
|
2347
|
-
},
|
|
2348
|
-
},
|
|
2349
|
-
};
|
|
2350
|
-
regions = {
|
|
2351
|
-
/**
|
|
2352
|
-
* List public regions
|
|
2353
|
-
*
|
|
2354
|
-
* @description Endpoint is available without authentication.
|
|
2355
|
-
*/
|
|
2356
|
-
list: async (params) => {
|
|
2357
|
-
return await this.request({
|
|
2358
|
-
method: "GET",
|
|
2359
|
-
path: "/regions",
|
|
2360
|
-
params,
|
|
2361
|
-
});
|
|
2362
|
-
},
|
|
2363
|
-
};
|
|
2364
|
-
user = {
|
|
2365
|
-
/**
|
|
2366
|
-
* Get current user
|
|
2367
|
-
*
|
|
2368
|
-
* @description Get the user associated with this service token
|
|
2369
|
-
* ### Authorization
|
|
2370
|
-
* A OAuth token must have at least one of the following scopes in order to use this API endpoint:
|
|
2371
|
-
*
|
|
2372
|
-
* **OAuth Scopes**
|
|
2373
|
-
*
|
|
2374
|
-
* | Resource | Scopes |
|
|
2375
|
-
* | :------- | :---------- |
|
|
2376
|
-
* | User | `read_user` |
|
|
2377
|
-
*/
|
|
2378
|
-
get: async (params) => {
|
|
2379
|
-
return await this.request({
|
|
2380
|
-
method: "GET",
|
|
2381
|
-
path: "/user",
|
|
2382
|
-
params,
|
|
2383
|
-
});
|
|
2384
|
-
},
|
|
2385
|
-
};
|
|
2386
|
-
}
|
|
2387
|
-
const formatURL = (input) => {
|
|
2388
|
-
const url = new URL(input.url.replaceAll(/{(\w+)}/g, (_, key) => {
|
|
2389
|
-
if (!input.path?.[key]) {
|
|
2390
|
-
throw new Error(`Missing required parameter: ${key}`);
|
|
2391
|
-
}
|
|
2392
|
-
return input.path[key];
|
|
2393
|
-
}));
|
|
2394
|
-
if (input.query) {
|
|
2395
|
-
for (const [key, value] of Object.entries(input.query)) {
|
|
2396
|
-
url.searchParams.set(key, value.toString());
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
return url.toString();
|
|
2400
|
-
};
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { createClient, createConfig, } from "../../util/api/client/index.js";
|
|
3
|
+
export const client = createClient(createConfig({
|
|
4
|
+
baseUrl: "https://api.planetscale.com/v1",
|
|
5
|
+
throwOnError: true,
|
|
6
|
+
}));
|
|
2401
7
|
//# sourceMappingURL=client.gen.js.map
|