diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/CreditCodeRedemption.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/CreditCodeRedemption.tsx index 745255c2207..488f0e6d011 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/CreditCodeRedemption.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/CreditCodeRedemption.tsx @@ -1,7 +1,7 @@ import HCaptcha from '@hcaptcha/react-hcaptcha' import { zodResolver } from '@hookform/resolvers/zod' import { PermissionAction } from '@supabase/shared-types/out/constants' -import { Calendar, PartyPopper } from 'lucide-react' +import { Calendar, Info, PartyPopper } from 'lucide-react' import Link from 'next/link' import { useRouter } from 'next/router' import { useEffect, useRef, useState } from 'react' @@ -215,7 +215,7 @@ export const CreditCodeRedemption = ({
- Expires on{' '} + Your credits expire on{' '} )} + {codeRedemptionResult.already_redeemed_partner_credits && ( +
+ + + You already redeemed $ + {codeRedemptionResult.already_redeemed_partner_credits / 100} of credits through + other deals + +
+ )} + {(!router.pathname.includes('/org/') || org?.plan.id === 'free') && (
diff --git a/packages/api-types/types/api-v2.d.ts b/packages/api-types/types/api-v2.d.ts index 1af3d1d68d9..156ba37b18b 100644 --- a/packages/api-types/types/api-v2.d.ts +++ b/packages/api-types/types/api-v2.d.ts @@ -4,6 +4,33 @@ */ export interface paths { + '/v1/webhooks/events': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + /** + * Publish event + * @description Ingests and schedules a new webhook event to be published out to all subscribed endpoints. + * + * In case of non-successful response status codes, early termination, networking issues, + * requests to this endpoint should be retried until it succeeds, otherwise there is a risk of + * loosing events. + * + * `meta.idempotency_key` is used to ensure idempotency when retrying the requests and so it + * must always be provided. + */ + post: operations['v1-webhooks-events-post'] + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } '/v2/organizations/{slug}/integrations/github/connections': { parameters: { query?: never @@ -2723,6 +2750,325 @@ export interface components { } export type $defs = Record export interface operations { + 'v1-webhooks-events-post': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + requestBody: { + content: { + 'application/json': { + data: { + attributes: { + /** + * @description Organization slug + * @example tsrqponmlkjihgfedcba + */ + organization_slug: string + /** @description Extra data to pass to consumers. `organization_slug` and `project_ref` (if applicable) are always provided by default. */ + payload?: { + [key: string]: unknown + } + /** @description Project's ref. If left unspecified or `null`, the event will published as organization-wide, only to organization-wide endpoints. */ + project_ref?: string | null + /** + * Format: date-time + * @description Optional timestamp of event publication. + */ + timestamp?: string + /** + * @description Webhook event type. + * @enum {string} + */ + type: + | 'v1.project.paused' + | 'v1.project.created' + | 'v1.project.restored' + | 'v1.project.transferred' + | 'v1.project.removed' + | 'v1.project.restarted' + | 'v1.project.status.changed' + | 'v1.project.backup.started' + | 'v1.project.branch.created' + | 'v1.project.branch.updated' + | 'v1.project.branch.removed' + | 'v1.organization.member.invitation.created' + | 'v1.organization.member.invitation.canceled' + | 'v1.organization.member.added' + | 'v1.organization.member.removed' + | 'v1.organization.member.role.assigned' + | 'v1.organization.member.role.removed' + | 'v1.organization.member.role.updated' + | 'v1.organization.billing.plan.upgraded' + | 'v1.organization.billing.plan.downgraded' + | 'project.v1.paused' + | 'project.v1.created' + | 'project.v1.restored' + | 'project.v1.transferred' + | 'project.v1.removed' + | 'project.v1.restarted' + | 'project.v1.status.changed' + | 'project.v1.backup.started' + | 'project.v1.branch.created' + | 'project.v1.branch.updated' + | 'project.v1.branch.removed' + | 'organization.v1.member.invitation.created' + | 'organization.v1.member.invitation.canceled' + | 'organization.v1.member.added' + | 'organization.v1.member.removed' + | 'organization.v1.member.role.assigned' + | 'organization.v1.member.role.removed' + | 'organization.v1.member.role.updated' + | 'organization.v1.billing.plan.upgraded' + | 'organization.v1.billing.plan.downgraded' + | 'project.v1.branch.deleted' + } + /** + * @description Resource type. + * @constant + */ + type: 'event' + } + meta: { + /** @description Idempotency key. */ + idempotency_key: string + } + } + } + } + responses: { + /** @description Events published */ + 201: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': { + data: { + id: string + /** + * @description Resource type. + * @constant + */ + type: 'ingress' + } + } + } + } + /** @description PermissionDenied */ + 403: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': { + error: { + /** @constant */ + code: 'forbidden' + description?: string + id?: string + issues?: components['schemas']['APIErrorObject'][] + links?: { + [key: string]: { + describedby?: string + href: string + meta?: { + [key: string]: unknown + } + rel?: string + title?: string + type?: string + } + } + /** @constant */ + message: 'Forbidden' + meta?: { + [key: string]: unknown + } + } + $defs: { + APIErrorObject: components['schemas']['APIErrorObject'] + } + } + } + } + /** @description GenericRequestTimeout */ + 408: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': { + error: { + /** @constant */ + code: 'request_timeout' + description?: string + id?: string + issues?: components['schemas']['APIErrorObject'][] + links?: { + [key: string]: { + describedby?: string + href: string + meta?: { + [key: string]: unknown + } + rel?: string + title?: string + type?: string + } + } + /** @constant */ + message: 'Request timed out' + meta?: { + [key: string]: unknown + } + } + $defs: { + APIErrorObject: components['schemas']['APIErrorObject'] + } + } + } + } + /** @description GenericTooManyRequests */ + 429: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': { + error: { + /** @constant */ + code: 'rate_limit_exceeded' + description?: string + id?: string + issues?: components['schemas']['APIErrorObject'][] + links?: { + [key: string]: { + describedby?: string + href: string + meta?: { + [key: string]: unknown + } + rel?: string + title?: string + type?: string + } + } + /** @constant */ + message: 'Rate limit exceeded' + meta?: { + [key: string]: unknown + } + } + $defs: { + APIErrorObject: components['schemas']['APIErrorObject'] + } + } + } + } + /** @description Multiple error responses */ + 500: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': { + error: + | { + /** @constant */ + code: 'internal_server_error' + description?: string + id?: string + issues?: components['schemas']['APIErrorObject'][] + links?: { + [key: string]: { + describedby?: string + href: string + meta?: { + [key: string]: unknown + } + rel?: string + title?: string + type?: string + } + } + /** @constant */ + message: 'Internal Server Error' + meta?: { + [key: string]: unknown + } + } + | { + /** @constant */ + code: 'event_ingress_failed' + description?: string + id?: string + issues?: components['schemas']['APIErrorObject'][] + links?: { + [key: string]: { + describedby?: string + href: string + meta?: { + [key: string]: unknown + } + rel?: string + title?: string + type?: string + } + } + /** @constant */ + message: 'Failed to ingress the event' + meta?: { + [key: string]: unknown + } + } + $defs: { + APIErrorObject: components['schemas']['APIErrorObject'] + } + } + } + } + /** @description TemporarilyDisabled */ + 503: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': { + error: { + /** @constant */ + code: 'webhooks_disabled' + description?: string + id?: string + issues?: components['schemas']['APIErrorObject'][] + links?: { + [key: string]: { + describedby?: string + href: string + meta?: { + [key: string]: unknown + } + rel?: string + title?: string + type?: string + } + } + /** @constant */ + message: 'Webhooks are temporarily disabled' + meta?: { + [key: string]: unknown + } + } + $defs: { + APIErrorObject: components['schemas']['APIErrorObject'] + } + } + } + } + } + } 'v2-list-organization-github-connections': { parameters: { query?: { @@ -3340,7 +3686,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -3357,14 +3703,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -3381,7 +3727,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -3401,7 +3747,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.delivery' + code: 'delivery_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -3418,7 +3764,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Delivery not found' + message: 'Webhook delivery not found' meta?: { [key: string]: unknown } @@ -3455,7 +3801,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -3475,7 +3821,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -3492,7 +3838,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -3621,7 +3967,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -3638,14 +3984,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -3662,7 +4008,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -3682,7 +4028,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.delivery' + code: 'delivery_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -3699,7 +4045,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Delivery not found' + message: 'Webhook delivery not found' meta?: { [key: string]: unknown } @@ -3736,7 +4082,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -3756,7 +4102,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -3773,7 +4119,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -4005,7 +4351,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -4022,14 +4368,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -4046,7 +4392,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -4083,7 +4429,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -4103,7 +4449,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -4120,7 +4466,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -4397,7 +4743,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -4414,14 +4760,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -4438,7 +4784,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -4475,7 +4821,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -4495,7 +4841,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -4512,7 +4858,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -4715,7 +5061,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -4732,14 +5078,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -4756,7 +5102,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -4793,7 +5139,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -4813,7 +5159,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -4830,7 +5176,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -5035,7 +5381,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5052,14 +5398,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5076,7 +5422,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -5096,7 +5442,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.endpoint' + code: 'endpoint_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5113,7 +5459,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Endpoint not found' + message: 'Webhook endpoint not found' meta?: { [key: string]: unknown } @@ -5150,7 +5496,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -5170,7 +5516,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5187,7 +5533,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -5392,7 +5738,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5409,14 +5755,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5433,7 +5779,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -5453,7 +5799,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.endpoint' + code: 'endpoint_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5470,7 +5816,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Endpoint not found' + message: 'Webhook endpoint not found' meta?: { [key: string]: unknown } @@ -5507,7 +5853,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -5527,7 +5873,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5544,7 +5890,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -5820,7 +6166,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5837,14 +6183,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5861,7 +6207,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -5881,7 +6227,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.endpoint' + code: 'endpoint_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5898,7 +6244,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Endpoint not found' + message: 'Webhook endpoint not found' meta?: { [key: string]: unknown } @@ -5935,7 +6281,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -5955,7 +6301,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -5972,7 +6318,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -6170,7 +6516,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -6187,14 +6533,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -6211,7 +6557,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -6231,7 +6577,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.endpoint' + code: 'endpoint_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -6248,7 +6594,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Endpoint not found' + message: 'Webhook endpoint not found' meta?: { [key: string]: unknown } @@ -6285,7 +6631,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -6305,7 +6651,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -6322,7 +6668,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -6474,7 +6820,7 @@ export interface operations { error: | { /** @constant */ - code: 'bad_request.endpoint.test.disabled' + code: 'endpoint_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -6491,14 +6837,14 @@ export interface operations { } } /** @constant */ - message: 'Bad Request: Endpoint is disabled' + message: 'Webhook endpoint is disabled' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'bad_request.endpoint.test.wrong_event_type' + code: 'endpoint_event_type_not_subscribed' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -6515,7 +6861,7 @@ export interface operations { } } /** @constant */ - message: 'Bad Request: Provided event type is not subscribed to by the endpoint' + message: 'Webhook endpoint is not subscribed to this event type' meta?: { [key: string]: unknown } @@ -6573,7 +6919,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -6590,14 +6936,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -6614,7 +6960,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -6634,7 +6980,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.endpoint' + code: 'endpoint_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -6651,7 +6997,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Endpoint not found' + message: 'Webhook endpoint not found' meta?: { [key: string]: unknown } @@ -6688,7 +7034,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -6708,7 +7054,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -6725,7 +7071,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -8345,7 +8691,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -8362,14 +8708,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -8386,7 +8732,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -8406,7 +8752,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.delivery' + code: 'delivery_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -8423,7 +8769,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Delivery not found' + message: 'Webhook delivery not found' meta?: { [key: string]: unknown } @@ -8460,7 +8806,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -8480,7 +8826,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -8497,7 +8843,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -8626,7 +8972,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -8643,14 +8989,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -8667,7 +9013,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -8687,7 +9033,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.delivery' + code: 'delivery_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -8704,7 +9050,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Delivery not found' + message: 'Webhook delivery not found' meta?: { [key: string]: unknown } @@ -8741,7 +9087,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -8761,7 +9107,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -8778,7 +9124,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -9010,7 +9356,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -9027,14 +9373,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -9051,7 +9397,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -9088,7 +9434,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -9108,7 +9454,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -9125,7 +9471,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -9402,7 +9748,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -9419,14 +9765,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -9443,7 +9789,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -9480,7 +9826,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -9500,7 +9846,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -9517,7 +9863,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -9720,7 +10066,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -9737,14 +10083,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -9761,7 +10107,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -9798,7 +10144,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -9818,7 +10164,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -9835,7 +10181,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -10040,7 +10386,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10057,14 +10403,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10081,7 +10427,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -10101,7 +10447,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.endpoint' + code: 'endpoint_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10118,7 +10464,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Endpoint not found' + message: 'Webhook endpoint not found' meta?: { [key: string]: unknown } @@ -10155,7 +10501,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -10175,7 +10521,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10192,7 +10538,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -10397,7 +10743,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10414,14 +10760,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10438,7 +10784,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -10458,7 +10804,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.endpoint' + code: 'endpoint_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10475,7 +10821,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Endpoint not found' + message: 'Webhook endpoint not found' meta?: { [key: string]: unknown } @@ -10512,7 +10858,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -10532,7 +10878,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10549,7 +10895,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -10825,7 +11171,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10842,14 +11188,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10866,7 +11212,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -10886,7 +11232,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.endpoint' + code: 'endpoint_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10903,7 +11249,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Endpoint not found' + message: 'Webhook endpoint not found' meta?: { [key: string]: unknown } @@ -10940,7 +11286,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -10960,7 +11306,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -10977,7 +11323,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -11175,7 +11521,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -11192,14 +11538,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -11216,7 +11562,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -11236,7 +11582,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.endpoint' + code: 'endpoint_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -11253,7 +11599,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Endpoint not found' + message: 'Webhook endpoint not found' meta?: { [key: string]: unknown } @@ -11290,7 +11636,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -11310,7 +11656,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -11327,7 +11673,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } @@ -11479,7 +11825,7 @@ export interface operations { error: | { /** @constant */ - code: 'bad_request.endpoint.test.disabled' + code: 'endpoint_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -11496,14 +11842,14 @@ export interface operations { } } /** @constant */ - message: 'Bad Request: Endpoint is disabled' + message: 'Webhook endpoint is disabled' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'bad_request.endpoint.test.wrong_event_type' + code: 'endpoint_event_type_not_subscribed' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -11520,7 +11866,7 @@ export interface operations { } } /** @constant */ - message: 'Bad Request: Provided event type is not subscribed to by the endpoint' + message: 'Webhook endpoint is not subscribed to this event type' meta?: { [key: string]: unknown } @@ -11578,7 +11924,7 @@ export interface operations { error: | { /** @constant */ - code: 'forbidden.permission_denied' + code: 'forbidden' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -11595,14 +11941,14 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Permission denied' + message: 'Forbidden' meta?: { [key: string]: unknown } } | { /** @constant */ - code: 'forbidden.access_disabled' + code: 'webhooks_access_disabled' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -11619,7 +11965,7 @@ export interface operations { } } /** @constant */ - message: 'Forbidden: Access disabled' + message: 'Webhooks access is disabled for this organization or project' meta?: { [key: string]: unknown } @@ -11639,7 +11985,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'not_found.endpoint' + code: 'endpoint_not_found' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -11656,7 +12002,7 @@ export interface operations { } } /** @constant */ - message: 'Not Found: Endpoint not found' + message: 'Webhook endpoint not found' meta?: { [key: string]: unknown } @@ -11693,7 +12039,7 @@ export interface operations { } } /** @constant */ - message: 'Request Timeout' + message: 'Request timed out' meta?: { [key: string]: unknown } @@ -11713,7 +12059,7 @@ export interface operations { 'application/json': { error: { /** @constant */ - code: 'too_many_requests' + code: 'rate_limit_exceeded' description?: string id?: string issues?: components['schemas']['APIErrorObject'][] @@ -11730,7 +12076,7 @@ export interface operations { } } /** @constant */ - message: 'Too Many Requests' + message: 'Rate limit exceeded' meta?: { [key: string]: unknown } diff --git a/packages/api-types/types/platform.d.ts b/packages/api-types/types/platform.d.ts index 7b37321ebba..5d99d23d05d 100644 --- a/packages/api-types/types/platform.d.ts +++ b/packages/api-types/types/platform.d.ts @@ -1279,6 +1279,23 @@ export interface paths { patch?: never trace?: never } + '/platform/organizations/{slug}/billing/credits/burndown': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + /** Retrieves the burndown of prepaid credit blocks for an organization */ + get: operations['OrgCreditsController_getBurndown'] + put?: never + post?: never + delete?: never + options?: never + head?: never + patch?: never + trace?: never + } '/platform/organizations/{slug}/billing/credits/preview': { parameters: { query?: never @@ -5210,6 +5227,26 @@ export interface paths { patch?: never trace?: never } + '/platform/warehouse/{ref}': { + parameters: { + query?: never + header?: never + path?: never + cookie?: never + } + get?: never + put?: never + post?: never + /** + * Disable Warehouse + * @description Asynchronously stop and delete Warehouse replication, remove its publication and FDW, and revoke external catalog access. Optionally delete the DuckLake catalog schema and managed Storage bucket with delete_data=true, requiring SQL and Storage admin write permissions on the configured destination. Poll setup-status for completion. Source tables are preserved. + */ + delete: operations['WarehouseController_deleteWarehouse'] + options?: never + head?: never + patch?: never + trace?: never + } '/platform/warehouse/{ref}/catalog': { parameters: { query?: never @@ -5265,7 +5302,7 @@ export interface paths { put?: never /** * Set up Warehouse - * @description Replace the Warehouse publication with the complete requested selection and start syncing. Optionally select another Supabase project for both the DuckLake PostgreSQL catalog and Storage using destination_project_ref; SQL and Storage admin write permissions are required on that project. The configured destination is reused on subsequent requests and cannot be changed through setup. Schema targets include the currently eligible tables in that schema. An empty targets array stops and deletes the Warehouse pipeline and publication, disables external catalog access, and uninstalls the Warehouse FDW and its dependent foreign tables. Warehouse FDW installation is opt-in, remains on the source project, and is ignored for an empty selection. + * @description Replace the Warehouse publication with the complete requested selection and start syncing. Optionally select another Supabase project for both the DuckLake PostgreSQL catalog and Storage using destination_project_ref; SQL and Storage admin write permissions are required on that project. The configured destination is reused on subsequent requests and cannot be changed through setup. Schema targets include the currently eligible tables in that schema. For backward compatibility, an empty targets array asynchronously stops and deletes the Warehouse pipeline and publication, disables external catalog access, and uninstalls the Warehouse FDW and its dependent foreign tables. Warehouse FDW installation is opt-in, remains on the source project, and is ignored for an empty selection. Prefer DELETE to disable Warehouse and optionally delete its data; poll setup-status for completion. */ post: operations['WarehouseController_setup'] delete?: never @@ -5283,7 +5320,7 @@ export interface paths { } /** * Get Warehouse setup status - * @description Return the async Warehouse setup status for the project. Overall completion follows the replication pipeline and table copy state; project database FDW markers are informational. + * @description Return Warehouse setup or disable status. During and after teardown, persisted lifecycle state is returned without querying ETL or inspecting the project FDW. Otherwise completion follows replication and table copy state. */ get: operations['WarehouseController_getSetupStatus'] put?: never @@ -7905,6 +7942,7 @@ export interface components { code: string } CreditRedemptionResponse_Output: { + already_redeemed_partner_credits: number amount_cents: number credits_expire_at: string | null } @@ -8802,6 +8840,17 @@ export interface components { private: number shared: number } + GetCreditBurndownResponse_Output: { + data: { + amount_cents: number + breakdown: { + amount_cents: number + item: string + }[] + day: string + ending_balance_cents: number + }[] + } GetGitHubConnectionConfigResponse_Output: { /** @description JSON representation of the parsed `supabase/config.toml`. Its shape is owned by the Supabase CLI and is passed through as-is. */ config: { @@ -16120,6 +16169,10 @@ export interface components { /** @description Whether external catalog access is enabled */ enabled: boolean } + WarehouseDeleteResponse_Output: { + /** @enum {string} */ + status: 'accepted' + } WarehouseSetupBody: { /** * @description Supabase project to use for both the DuckLake PostgreSQL catalog and Supabase Storage. Defaults to this project on first setup and to the configured destination on later requests. The destination must be active and healthy, and another project requires SQL and Storage admin write permissions. An existing destination cannot be changed through setup. Ignored when targets is empty. @@ -16131,7 +16184,7 @@ export interface components { * @example false */ install_fdw?: boolean - /** @description Complete selection of schemas and individual tables to copy, replacing the previous selection. Schema targets expand to the eligible tables present when the request is processed. An empty array disables Warehouse replication and external catalog access and uninstalls the Warehouse FDW. */ + /** @description Complete selection of schemas and individual tables to copy, replacing the previous selection. Schema targets expand to the eligible tables present when the request is processed. An empty array asynchronously disables Warehouse while retaining its data. Prefer DELETE to disable Warehouse; poll setup-status for completion. */ targets: ( | { /** @@ -16160,7 +16213,7 @@ export interface components { } WarehouseSetupResponse_Output: { /** - * @description Warehouse replication pipeline id, or null when Warehouse is disabled + * @description Warehouse replication pipeline id, or null when Warehouse disable has been requested * @example 101 */ pipeline_id: number | null @@ -16206,7 +16259,11 @@ export interface components { }[] } WarehouseSetupStatusResponse_Output: { - /** @description Project database FDW setup markers used to derive the Warehouse FDW phase */ + /** @description Whether the current disable request deletes DuckLake data. */ + delete_data?: boolean + /** @description Warehouse cleanup failure, when present. */ + error?: string + /** @description Project database FDW setup markers; null during or after teardown, when setup inspection is inapplicable. */ fdw_status: { /** * @description Whether fdw_warehouse is available to install on the project database instance @@ -16238,18 +16295,26 @@ export interface components { * @example true */ wrapper_installed: boolean - } + } | null /** * @description Warehouse replication pipeline id when it exists * @example 101 */ pipeline_id?: number /** - * @description Overall Warehouse setup status derived from replication state + * @description Overall Warehouse lifecycle status, using persisted state during teardown and replication state during setup * @example copying * @enum {string} */ - setup_status: 'not_started' | 'setting_up' | 'copying' | 'complete' | 'error' + setup_status: + | 'not_started' + | 'setting_up' + | 'copying' + | 'complete' + | 'error' + | 'disabling' + | 'disabled' + | 'deletion_failed' /** @description Warehouse setup phases in execution order */ steps: { /** @@ -17848,6 +17913,27 @@ export interface operations { 'application/json': components['schemas']['UpdateConversationCustomFieldsResponse_Output'] } } + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown + } + content?: never + } /** @description Failed to update conversation custom fields */ 500: { headers: { @@ -19169,6 +19255,27 @@ export interface operations { 'application/json': components['schemas']['GetOAuthAuthorizationResponse_Output'] } } + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown + } + content?: never + } } } OrganizationsController_getOrganizations: { @@ -20497,6 +20604,59 @@ export interface operations { } } } + OrgCreditsController_getBurndown: { + parameters: { + query?: { + end_date?: string + start_date?: string + } + header?: never + path: { + /** @description Organization slug */ + slug: string + } + cookie?: never + } + requestBody?: never + responses: { + 200: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['GetCreditBurndownResponse_Output'] + } + } + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Failed to retrieve prepaid credit block burndown */ + 500: { + headers: { + [name: string]: unknown + } + content?: never + } + } + } OrgCreditsController_previewTopUp: { parameters: { query?: never @@ -35126,6 +35286,83 @@ export interface operations { } } } + WarehouseController_deleteWarehouse: { + parameters: { + query?: { + /** @description Permanently delete the managed DuckLake catalog schema and Storage bucket. Defaults to false. */ + delete_data?: 'true' | 'false' + } + header?: never + path: { + /** @description Project ref */ + ref: string + } + cookie?: never + } + requestBody?: never + responses: { + /** @description Warehouse disable accepted. Poll setup-status for completion. */ + 202: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['WarehouseDeleteResponse_Output'] + } + } + /** @description Invalid deletion option or unmanaged Warehouse destination. */ + 400: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description This feature requires the Pro, Team, or Enterprise organization plan. */ + 402: { + headers: { + [name: string]: unknown + } + content: { + 'application/json': components['schemas']['PlanGateErrorBody'] + } + } + /** @description Forbidden action */ + 403: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Another Warehouse mutation is running or the cleanup policy cannot be changed. */ + 409: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Rate limit exceeded */ + 429: { + headers: { + [name: string]: unknown + } + content?: never + } + /** @description Failed to request Warehouse disable. */ + 500: { + headers: { + [name: string]: unknown + } + content?: never + } + } + } WarehouseController_getCatalog: { parameters: { query?: never