Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: switch to new slug based invoice endpoints (#26693)

Kevin Grünebergf6fe8238d869
diff --git a/.misspell-fixer.ignore b/.misspell-fixer.ignore
index 105b2fccda8..2bfab3e9e99 100644
--- a/.misspell-fixer.ignore
+++ b/.misspell-fixer.ignore
@@ -1 +1,2 @@
-^./i18n
\ No newline at end of file
+^./i18n
+^./packages/api-types
\ No newline at end of file
diff --git a/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx b/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx
index 23c71c1048e..b695ec0924e 100644
--- a/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx
+++ b/apps/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx
@@ -23,17 +23,15 @@ const InvoicesSettings = () => {
const [page, setPage] = useState(1)
const selectedOrganization = useSelectedOrganization()
- const { stripe_customer_id, slug } = selectedOrganization ?? {}
+ const { slug } = selectedOrganization ?? {}
const offset = (page - 1) * PAGE_LIMIT
const canReadInvoices = useCheckPermissions(PermissionAction.READ, 'invoices')
const { data: count, isError: isErrorCount } = useInvoicesCountQuery({
- customerId: stripe_customer_id,
slug,
})
const { data, error, isLoading, isError, isSuccess } = useInvoicesQuery({
- customerId: stripe_customer_id,
slug,
offset,
limit: PAGE_LIMIT,
@@ -46,7 +44,7 @@ const InvoicesSettings = () => {
const fetchInvoice = async (id: string) => {
try {
- const invoice = await getInvoice({ id })
+ const invoice = await getInvoice({ invoiceId: id, slug })
if (invoice?.invoice_pdf) window.open(invoice.invoice_pdf, '_blank')
} catch (error: any) {
toast.error(`Failed to fetch the selected invoice: ${error.message}`)
diff --git a/apps/studio/components/interfaces/SQLEditor/SQLEditor.queries.ts b/apps/studio/components/interfaces/SQLEditor/SQLEditor.queries.ts
index 302144170b0..f76dff002ad 100644
--- a/apps/studio/components/interfaces/SQLEditor/SQLEditor.queries.ts
+++ b/apps/studio/components/interfaces/SQLEditor/SQLEditor.queries.ts
@@ -693,7 +693,7 @@ create trigger on_auth_user_created
/**
* CUSTOMERS
-* Note: this is a private table that contains a mapping of user IDs to Strip customer IDs.
+* Note: this is a private table that contains a mapping of user IDs to Stripe customer IDs.
*/
create table customers (
-- UUID from auth.users
diff --git a/apps/studio/data/invoices/invoice-query.ts b/apps/studio/data/invoices/invoice-query.ts
index bcf912e072a..770957f5bed 100644
--- a/apps/studio/data/invoices/invoice-query.ts
+++ b/apps/studio/data/invoices/invoice-query.ts
@@ -4,14 +4,16 @@ import type { ResponseError } from 'types'
import { invoicesKeys } from './keys'
export type InvoiceVariables = {
- id?: string
+ invoiceId?: string
+ slug?: string
}
-export async function getInvoice({ id }: InvoiceVariables, signal?: AbortSignal) {
- if (!id) throw new Error('Invoice ID is required')
+export async function getInvoice({ invoiceId, slug }: InvoiceVariables, signal?: AbortSignal) {
+ if (!invoiceId) throw new Error('Invoice ID is required')
+ if (!slug) throw new Error('Slug is required')
- const { data, error } = await get(`/platform/stripe/invoices/{id}`, {
- params: { path: { id } },
+ const { data, error } = await get(`/platform/organizations/{slug}/billing/invoices/{invoiceId}`, {
+ params: { path: { invoiceId, slug } },
signal,
})
@@ -23,12 +25,12 @@ export type InvoiceData = Awaited<ReturnType<typeof getInvoice>>
export type InvoiceError = ResponseError
export const useInvoiceQuery = <TData = InvoiceData>(
- { id }: InvoiceVariables,
+ { invoiceId: id }: InvoiceVariables,
{ enabled = true, ...options }: UseQueryOptions<InvoiceData, InvoiceError, TData> = {}
) =>
useQuery<InvoiceData, InvoiceError, TData>(
invoicesKeys.invoice(id),
- ({ signal }) => getInvoice({ id }, signal),
+ ({ signal }) => getInvoice({ invoiceId: id }, signal),
{
enabled: enabled && typeof id !== 'undefined',
...options,
diff --git a/apps/studio/data/invoices/invoices-count-query.ts b/apps/studio/data/invoices/invoices-count-query.ts
index f301925b87d..0491e361c49 100644
--- a/apps/studio/data/invoices/invoices-count-query.ts
+++ b/apps/studio/data/invoices/invoices-count-query.ts
@@ -4,19 +4,14 @@ import type { ResponseError } from 'types'
import { invoicesKeys } from './keys'
export type InvoicesCountVariables = {
- customerId?: string
slug?: string
}
-export async function getInvoicesCount(
- { customerId, slug }: InvoicesCountVariables,
- signal?: AbortSignal
-) {
- if (!customerId) throw new Error('Customer ID is required')
+export async function getInvoicesCount({ slug }: InvoicesCountVariables, signal?: AbortSignal) {
if (!slug) throw new Error('Slug is required')
- const res = await head(`/platform/stripe/invoices`, {
- params: { query: { customer: customerId, slug } },
+ const res = await head('/platform/organizations/{slug}/billing/invoices', {
+ params: { path: { slug } },
signal,
parseAs: 'text',
})
@@ -29,14 +24,14 @@ export type InvoicesCountData = Awaited<ReturnType<typeof getInvoicesCount>>
export type InvoicesCountError = ResponseError
export const useInvoicesCountQuery = <TData = InvoicesCountData>(
- { customerId, slug }: InvoicesCountVariables,
+ { slug }: InvoicesCountVariables,
{ enabled = true, ...options }: UseQueryOptions<InvoicesCountData, InvoicesCountError, TData> = {}
) =>
useQuery<InvoicesCountData, InvoicesCountError, TData>(
- invoicesKeys.count(customerId, slug),
- ({ signal }) => getInvoicesCount({ customerId, slug }, signal),
+ invoicesKeys.count(slug),
+ ({ signal }) => getInvoicesCount({ slug }, signal),
{
- enabled: enabled && typeof customerId !== 'undefined' && typeof slug !== 'undefined',
+ enabled: enabled && typeof slug !== 'undefined',
...options,
}
)
diff --git a/apps/studio/data/invoices/invoices-query.ts b/apps/studio/data/invoices/invoices-query.ts
index 54519b4c297..88f8699d40a 100644
--- a/apps/studio/data/invoices/invoices-query.ts
+++ b/apps/studio/data/invoices/invoices-query.ts
@@ -4,23 +4,21 @@ import type { ResponseError } from 'types'
import { invoicesKeys } from './keys'
export type InvoicesVariables = {
- customerId?: string
slug?: string
offset?: number
limit?: number
}
export async function getInvoices(
- { customerId, slug, offset = 0, limit = 10 }: InvoicesVariables,
+ { slug, offset = 0, limit = 10 }: InvoicesVariables,
signal?: AbortSignal
) {
- if (!customerId) throw new Error('Customer ID is required')
if (!slug) throw new Error('Org slug is required')
- const { data, error } = await get(`/platform/stripe/invoices`, {
+ const { data, error } = await get(`/platform/organizations/{slug}/billing/invoices`, {
params: {
- // @ts-ignore: [Joshen] Might be API spec wrong
- query: { offset: offset.toString(), limit: limit.toString(), customer: customerId, slug },
+ path: { slug },
+ query: { offset: offset.toString(), limit: limit.toString() },
},
signal,
})
@@ -33,15 +31,15 @@ export type InvoicesData = Awaited<ReturnType<typeof getInvoices>>
export type InvoicesError = ResponseError
export const useInvoicesQuery = <TData = InvoicesData>(
- { customerId, slug, offset, limit }: InvoicesVariables,
+ { slug, offset, limit }: InvoicesVariables,
{ enabled = true, ...options }: UseQueryOptions<InvoicesData, InvoicesError, TData> = {}
) =>
// [Joshen] Switch to useInfiniteQuery
useQuery<InvoicesData, InvoicesError, TData>(
- invoicesKeys.list(customerId, slug, offset),
- ({ signal }) => getInvoices({ customerId, slug, offset, limit }, signal),
+ invoicesKeys.list(slug, offset),
+ ({ signal }) => getInvoices({ slug, offset, limit }, signal),
{
- enabled: enabled && typeof customerId !== 'undefined' && typeof slug !== 'undefined',
+ enabled: enabled && typeof slug !== 'undefined',
...options,
}
)
diff --git a/apps/studio/data/invoices/keys.ts b/apps/studio/data/invoices/keys.ts
index 4c4ebe67a92..e83637097ec 100644
--- a/apps/studio/data/invoices/keys.ts
+++ b/apps/studio/data/invoices/keys.ts
@@ -2,10 +2,9 @@ export const invoicesKeys = {
overdueInvoices: () => ['invoices', 'overdue'] as const,
invoice: (id: string | undefined) => ['invoice', id] as const,
- list: (customerId: string | undefined, slug: string | undefined, offset: number | undefined) =>
- ['invoices', customerId, slug, offset] as const,
- count: (customerId: string | undefined, slug: string | undefined) =>
- ['invoices', customerId, slug, 'count'] as const,
+ list: (slug: string | undefined, offset: number | undefined) =>
+ ['invoices', slug, offset] as const,
+ count: (slug: string | undefined) => ['invoices', slug, 'count'] as const,
projectInvoices: (projectRef: string | undefined, offset: number | undefined) =>
['invoices', projectRef, offset] as const,
diff --git a/apps/studio/package.json b/apps/studio/package.json
index b62809298f8..8f7bbcb431a 100644
--- a/apps/studio/package.json
+++ b/apps/studio/package.json
@@ -14,8 +14,7 @@
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"prettier:check": "prettier --check .",
- "prettier:write": "prettier --write .",
- "codegen": "openapi-typescript http://localhost:8080/api-json -o data/api.d.ts && prettier --write data/api.d.ts"
+ "prettier:write": "prettier --write ."
},
"dependencies": {
"@aws-crypto/sha256-browser": "^3.0.0",
diff --git a/apps/studio/types/base.ts b/apps/studio/types/base.ts
index 23c593e2307..118c9591ee1 100644
--- a/apps/studio/types/base.ts
+++ b/apps/studio/types/base.ts
@@ -7,7 +7,6 @@ export interface Organization {
name: string
billing_email: string
is_owner?: boolean
- stripe_customer_id?: string
opt_in_tags: string[]
subscription_id?: string | null
restriction_status: 'grace_period' | 'grace_period_over' | 'restricted' | null
diff --git a/packages/api-types/types/api.d.ts b/packages/api-types/types/api.d.ts
index 472b8f6e3e3..f4c190210a0 100644
--- a/packages/api-types/types/api.d.ts
+++ b/packages/api-types/types/api.d.ts
@@ -160,7 +160,7 @@ export interface paths {
}
'/platform/organizations/{slug}/roles': {
/** Gets the given organization's roles */
- get: operations['OrganizationRolesController_getAllRolesV2']
+ get: operations['OrganizationRolesController_addMember']
}
'/platform/organizations/{slug}/tax-ids': {
/** Gets the given organization's tax IDs */
@@ -199,34 +199,27 @@ export interface paths {
get: operations['OrgAuditLogsController_getAuditLogs']
}
'/platform/organizations/{slug}/members/invite': {
- /**
- * Gets invited users
- * @deprecated
- */
+ /** Gets invited users */
get: operations['OrganizationInviteController_getInvitedUsers']
- /**
- * Invites user
- * @deprecated
- */
+ /** Invites user */
post: operations['OrganizationInviteController_inviteUser']
- /**
- * Delete invited user
- * @deprecated
- */
+ /** Delete invited user */
delete: operations['OrganizationInviteController_deleteInvitedUser']
}
'/platform/organizations/{slug}/members/join': {
- /**
- * Gets invite
- * @deprecated
- */
+ /** Gets invite */
get: operations['JoinController_getInvite']
- /**
- * Joins organization
- * @deprecated
- */
+ /** Joins organization */
post: operations['JoinController_joinOrganization']
}
+ '/platform/organizations/{slug}/members/leave': {
+ /** Leaves the given organization */
+ post: operations['MembersDeprecatedController_leaveOrganization']
+ }
+ '/platform/organizations/{slug}/members/remove': {
+ /** Leaves the given organization */
+ delete: operations['MembersDeprecatedController_removeMember']
+ }
'/platform/organizations/{slug}/members': {
/** Gets organization's members */
get: operations['MembersController_getMembers']
@@ -234,33 +227,13 @@ export interface paths {
'/platform/organizations/{slug}/members/{gotrue_id}': {
/** Removes organization member */
delete: operations['MembersController_deleteMember']
- /** Updates organization member role */
- patch: operations['MembersController_updateMemberRoleV2']
- }
- '/platform/organizations/{slug}/members/{gotrue_id}/roles/{role_id}': {
- /** Removes organization member */
- delete: operations['MembersController_deleteMemberRole']
+ /** Updates organization member */
+ patch: operations['MembersController_updateMember']
}
'/platform/organizations/{slug}/members/reached-free-project-limit': {
/** Gets organization members who have reached their free project limit */
get: operations['ReachedFreeProjectLimitController_getMembersWhoReachedFreeProjectLimit']
}
- '/platform/organizations/{slug}/members/invitations': {
- /** Gets organization invitations */
- get: operations['InvitationsController_getAllInvitations']
- /** Creates organization invitation */
- post: operations['InvitationsController_createInvitation']
- }
- '/platform/organizations/{slug}/members/invitations/{token}': {
- /** Gets organization invitation by token */
- get: operations['InvitationsController_getInvitationByToken']
- /** Accepts organization invitation by token */
- post: operations['InvitationsController_acceptInvitationByToken']
- }
- '/platform/organizations/{slug}/members/invitations/{id}': {
- /** Deletes organization invitation with given id */
- delete: operations['InvitationsController_deleteInvitation']
- }
'/platform/organizations/{slug}/payments': {
/** Gets Stripe payment methods for the given organization */
get: operations['PaymentsController_getPaymentMethods']
@@ -293,6 +266,16 @@ export interface paths {
/** Gets the upcoming invoice */
get: operations['OrgInvoicesController_getUpcomingInvoice']
}
+ '/platform/organizations/{slug}/billing/invoices': {
+ /** Gets invoices for the given organization */
+ get: operations['OrgInvoicesController_getInvoices']
+ /** Gets the total count of invoices for the given organization */
+ head: operations['OrgInvoicesController_countInvoices']
+ }
+ '/platform/organizations/{slug}/billing/invoices/{invoiceId}': {
+ /** Gets invoice with the given invoice ID */
+ get: operations['OrgInvoicesController_getInvoice']
+ }
'/platform/pg-meta/{ref}/column-privileges': {
/** Retrieve column privileges */
get: operations['ColumnPrivilegesController_getColumnPrivileges']
@@ -684,6 +667,16 @@ export interface paths {
/** Lists project's warehouse queries from logflare */
get: operations['WarehouseQueryController_runQuery']
}
+ '/platform/projects/{ref}/billing/addons': {
+ /** Gets project addons */
+ get: operations['ProjectAddonController_getProjectAddons']
+ /** Updates project addon */
+ post: operations['ProjectAddonController_updateAddon']
+ }
+ '/platform/projects/{ref}/billing/addons/{addon_variant}': {
+ /** Removes project addon */
+ delete: operations['ProjectAddonController_removeAddon']
+ }
'/platform/projects/{ref}/config/pgbouncer': {
/** Gets project's pgbouncer config */
get: operations['PgbouncerConfigController_getPgbouncerConfig']
@@ -722,16 +715,6 @@ export interface paths {
/** Updates project's supavisor config */
patch: operations['SupavisorConfigController_updateSupavisorConfig']
}
- '/platform/projects/{ref}/billing/addons': {
- /** Gets project addons */
- get: operations['ProjectAddonController_getProjectAddons']
- /** Updates project addon */
- post: operations['ProjectAddonController_updateAddon']
- }
- '/platform/projects/{ref}/billing/addons/{addon_variant}': {
- /** Removes project addon */
- delete: operations['ProjectAddonController_removeAddon']
- }
'/platform/props/project/{ref}/api': {
/**
* Gets project's api info
@@ -811,9 +794,15 @@ export interface paths {
delete: operations['StorageS3CredentialsController_deleteCredential']
}
'/platform/stripe/invoices': {
- /** Gets invoices for the given customer */
+ /**
+ * Gets invoices for the given customer
+ * @deprecated
+ */
get: operations['InvoicesController_getInvoices']
- /** Gets the total count of invoices for the given customer */
+ /**
+ * Gets the total count of invoices for the given customer
+ * @deprecated
+ */
head: operations['InvoicesController_countInvoices']
}
'/platform/stripe/invoices/overdue': {
@@ -821,7 +810,10 @@ export interface paths {
get: operations['InvoicesController_getOverdueInvoices']
}
'/platform/stripe/invoices/{id}': {
- /** Gets invoice with the given invoice ID */
+ /**
+ * Gets invoice with the given invoice ID
+ * @deprecated
+ */
get: operations['InvoicesController_getInvoice']
}
'/platform/stripe/setup-intent': {
@@ -1180,35 +1172,20 @@ export interface paths {
}
'/v0/organizations/{slug}/roles': {
/** Gets the given organization's roles */
- get: operations['OrganizationRolesController_getAllRolesV2']
+ get: operations['OrganizationRolesController_addMember']
}
'/v0/organizations/{slug}/members/invite': {
- /**
- * Gets invited users
- * @deprecated
- */
+ /** Gets invited users */
get: operations['OrganizationInviteController_getInvitedUsers']
- /**
- * Invites user
- * @deprecated
- */
+ /** Invites user */
post: operations['OrganizationInviteController_inviteUser']
- /**
- * Delete invited user
- * @deprecated
- */
+ /** Delete invited user */
delete: operations['OrganizationInviteController_deleteInvitedUser']
}
'/v0/organizations/{slug}/members/join': {
- /**
- * Gets invite
- * @deprecated
- */
+ /** Gets invite */
get: operations['JoinController_getInvite']
- /**
- * Joins organization
- * @deprecated
- */
+ /** Joins organization */
post: operations['JoinController_joinOrganization']
}
'/v0/organizations/{slug}/members': {
@@ -1218,12 +1195,8 @@ export interface paths {
'/v0/organizations/{slug}/members/{gotrue_id}': {
/** Removes organization member */
delete: operations['MembersController_deleteMember']
- /** Updates organization member role */
- patch: operations['MembersController_updateMemberRoleV2']
- }
- '/v0/organizations/{slug}/members/{gotrue_id}/roles/{role_id}': {
- /** Removes organization member */
- delete: operations['MembersController_deleteMemberRole']
+ /** Updates organization member */
+ patch: operations['MembersController_updateMember']
}
'/v0/pg-meta/{ref}/column-privileges': {
/** Retrieve column privileges */
@@ -2603,21 +2576,9 @@ export interface components {
stripeAccount?: string
}
}
- OrganizationRole: {
- id: number
- name: string
- description: string
- }
- OrganizationRoleV2: {
+ Role: {
id: number
name: string
- description: string
- project_ids: number[]
- base_role_id: number
- }
- OrganizationRoleResponseV2: {
- org_scoped_roles: components['schemas']['OrganizationRoleV2'][]
- project_scoped_roles: components['schemas']['OrganizationRoleV2'][]
}
TaxId: {
id: string
@@ -2777,6 +2738,9 @@ export interface components {
slug: string
stripe_customer_id: string
}
+ RemoveMemberBody: {
+ member_id: number
+ }
Member: {
gotrue_id: string
primary_email: string | null
@@ -2787,37 +2751,11 @@ export interface components {
UpdateMemberBody: {
role_id: number
}
- UpdateMemberRoleBodyV2: {
- role_id: number
- role_scoped_projects?: string[]
- }
MemberWithFreeProjectLimit: {
free_project_limit: number
primary_email: string
username: string
}
- Invitation: {
- id: number
- invited_at: string
- invited_email: string
- role_id: number
- }
- InvitationResponse: {
- invitations: components['schemas']['Invitation'][]
- }
- InvitationByTokenResponse: {
- organization_name: string
- invite_id?: number
- token_does_not_exist: boolean
- email_match: boolean
- authorized_user: boolean
- expired_token: boolean
- }
- CreateInvitationBody: {
- email: string
- role_id: number
- role_scoped_projects?: string[]
- }
Payment: {
id: string
object: string
@@ -3110,6 +3048,15 @@ export interface components {
plans: components['schemas']['PlanResponse'][]
}
UpcomingInvoice: Record<string, never>
+ Invoice: {
+ id: string
+ invoice_pdf: string
+ subscription: string | null
+ subtotal: number
+ number: string
+ period_end: number
+ status: string
+ }
ColumnPrivilege: {
grantor: string
grantee: string
@@ -4051,12 +3998,15 @@ export interface components {
| 'function_search_path_mutable'
| 'rls_disabled_in_public'
| 'extension_in_public'
+ | 'rls_references_user_metadata'
+ | 'materialized_view_in_api'
+ | 'foreign_table_in_api'
| 'auth_otp_long_expiry'
| 'auth_otp_short_length'
- | 'rls_references_user_metadata'
/** @enum {string} */
level: 'ERROR' | 'WARN' | 'INFO'
categories: ('PERFORMANCE' | 'SECURITY')[]
+ title: string
facing: string
description: string
detail: string
@@ -4237,6 +4187,13 @@ export interface components {
}
LFUser: {
token: string
+ email: string | null
+ bigquery_project_id: string | null
+ bigquery_dataset_location: string | null
+ bigquery_dataset_id: string | null
+ email_me_product: string | null
+ phone: string | null
+ company: string | null
metadata: {
project_ref?: string
}
@@ -4245,6 +4202,12 @@ export interface components {
token: string
id: number
name: string
+ favourite: boolean
+ webhook_notification_url: string | null
+ slack_hook_url: string | null
+ bigquery_table_ttl: number
+ public_token: string | null
+ custom_event_message_keys: string | null
}
LFAccessToken: {
token: string
@@ -4266,6 +4229,20 @@ export interface components {
max_limit: number
enable_auth: number
}
+ AvailableAddonResponse: {
+ type: components['schemas']['ProjectAddonType']
+ name: string
+ variants: components['schemas']['ProjectAddonVariantResponse'][]
+ }
+ ProjectAddonsResponse: {
+ ref: string
+ selected_addons: components['schemas']['SelectedAddonResponse'][]
+ available_addons: components['schemas']['AvailableAddonResponse'][]
+ }
+ UpdateAddonBody: {
+ addon_variant: components['schemas']['AddonVariantId']
+ addon_type: components['schemas']['ProjectAddonType']
+ }
PgbouncerConfigResponse: {
default_pool_size?: number
ignore_startup_parameters?: string
@@ -4403,20 +4380,6 @@ export interface components {
/** @enum {string} */
pool_mode: 'transaction' | 'session' | 'statement'
}
- AvailableAddonResponse: {
- type: components['schemas']['ProjectAddonType']
- name: string
- variants: components['schemas']['ProjectAddonVariantResponse'][]
- }
- ProjectAddonsResponse: {
- ref: string
- selected_addons: components['schemas']['SelectedAddonResponse'][]
- available_addons: components['schemas']['AvailableAddonResponse'][]
- }
- UpdateAddonBody: {
- addon_variant: components['schemas']['AddonVariantId']
- addon_type: components['schemas']['ProjectAddonType']
- }
ServiceApiKey: {
api_key_encrypted?: string
tags: string
@@ -4623,15 +4586,6 @@ export interface components {
secret_key: string
description: string
}
- Invoice: {
- id: string
- invoice_pdf: string
- subscription: string
- subtotal: number
- number: string
- period_end: number
- status: string
- }
OverdueInvoiceCount: {
organization_id: number
overdue_invoice_count: number
@@ -4842,6 +4796,8 @@ export interface components {
repository: components['schemas']['ListGitHubConnectionsRepository']
user: components['schemas']['ListGitHubConnectionsUser'] | null
workdir: string
+ supabase_changes_only: boolean
+ branch_limit: number
}
ListGitHubConnectionsResponse: {
connections: components['schemas']['ListGitHubConnectionsConnection'][]
@@ -4854,6 +4810,7 @@ export interface components {
UpdateGitHubConnectionsBody: {
workdir?: string
supabase_changes_only?: boolean
+ branch_limit?: number
}
CreateCliLoginSessionBody: {
session_id: string
@@ -5499,7 +5456,7 @@ export interface components {
jwt_exp: number | null
mailer_allow_unverified_email_sign_ins: boolean | null
mailer_autoconfirm: boolean | null
- mailer_otp_exp: number | null
+ mailer_otp_exp: number
mailer_otp_length: number | null
mailer_secure_email_change_enabled: boolean | null
mailer_subjects_confirmation: string | null
@@ -5541,7 +5498,7 @@ export interface components {
sms_messagebird_access_key: string | null
sms_messagebird_originator: string | null
sms_otp_exp: number | null
- sms_otp_length: number | null
+ sms_otp_length: number
sms_provider: string | null
sms_template: string | null
sms_test_otp: string | null
@@ -6974,7 +6931,7 @@ export interface operations {
}
}
/** Gets the given organization's roles */
- OrganizationRolesController_getAllRolesV2: {
+ OrganizationRolesController_addMember: {
parameters: {
path: {
/** @description Organization slug */
@@ -6984,7 +6941,7 @@ export interface operations {
responses: {
200: {
content: {
- 'application/json': components['schemas']['OrganizationRoleResponseV2']
+ 'application/json': components['schemas']['Role'][]
}
}
/** @description Failed to retrieve the organization's roles */
@@ -7243,10 +7200,7 @@ export interface operations {
}
}
}
- /**
- * Gets invited users
- * @deprecated
- */
+ /** Gets invited users */
OrganizationInviteController_getInvitedUsers: {
parameters: {
path: {
@@ -7266,10 +7220,7 @@ export interface operations {
}
}
}
- /**
- * Invites user
- * @deprecated
- */
+ /** Invites user */
OrganizationInviteController_inviteUser: {
parameters: {
path: {
@@ -7294,10 +7245,7 @@ export interface operations {
}
}
}
- /**
- * Delete invited user
- * @deprecated
- */
+ /** Delete invited user */
OrganizationInviteController_deleteInvitedUser: {
parameters: {
query: {
@@ -7318,10 +7266,7 @@ export interface operations {
}
}
}
- /**
- * Gets invite
- * @deprecated
- */
+ /** Gets invite */
JoinController_getInvite: {
parameters: {
query: {
@@ -7344,10 +7289,7 @@ export interface operations {
}
}
}
- /**
- * Joins organization
- * @deprecated
- */
+ /** Joins organization */
JoinController_joinOrganization: {
parameters: {
query: {
@@ -7370,8 +7312,8 @@ export interface operations {
}
}
}
- /** Gets organization's members */
- MembersController_getMembers: {
+ /** Leaves the given organization */
+ MembersDeprecatedController_leaveOrganization: {
parameters: {
path: {
/** @description Organization slug */
@@ -7379,82 +7321,44 @@ export interface operations {
}
}
responses: {
- 200: {
+ 201: {
content: {
- 'application/json': components['schemas']['Member'][]
+ 'application/json': Record<string, never>
}
}
- /** @description Failed to retrieve organization's members */
- 500: {
- content: never
- }
- }
- }
- /** Removes organization member */
- MembersController_deleteMember: {
- parameters: {
- path: {
- /** @description Organization slug */
- slug: string
- gotrue_id: string
- }
- }
- responses: {
- 200: {
- content: never
- }
- /** @description Failed to remove organization member */
+ /** @description Failed to leave organization */
500: {
content: never
}
}
}
- /** Updates organization member role */
- MembersController_updateMemberRoleV2: {
+ /** Leaves the given organization */
+ MembersDeprecatedController_removeMember: {
parameters: {
path: {
/** @description Organization slug */
slug: string
- gotrue_id: string
}
}
requestBody: {
content: {
- 'application/json': components['schemas']['UpdateMemberRoleBodyV2']
+ 'application/json': components['schemas']['RemoveMemberBody']
}
}
responses: {
200: {
- content: never
- }
- /** @description Failed to update organization member role */
- 500: {
- content: never
- }
- }
- }
- /** Removes organization member */
- MembersController_deleteMemberRole: {
- parameters: {
- path: {
- /** @description Organization slug */
- slug: string
- gotrue_id: string
- role_id: string
- }
- }
- responses: {
- 200: {
- content: never
+ content: {
+ 'application/json': Record<string, never>
+ }
}
- /** @description Failed to remove organization member */
+ /** @description Failed to leave organization */
500: {
content: never
}
}
}
- /** Gets organization members who have reached their free project limit */
- ReachedFreeProjectLimitController_getMembersWhoReachedFreeProjectLimit: {
+ /** Gets organization's members */
+ MembersController_getMembers: {
parameters: {
path: {
/** @description Organization slug */
@@ -7464,112 +7368,73 @@ export interface operations {
responses: {
200: {
content: {
- 'application/json': components['schemas']['MemberWithFreeProjectLimit'][]
+ 'application/json': components['schemas']['Member'][]
}
}
- /** @description Failed to retrieve organization members who have reached their free project limit */
+ /** @description Failed to retrieve organization's members */
500: {
content: never
}
}
}
- /** Gets organization invitations */
- InvitationsController_getAllInvitations: {
+ /** Removes organization member */
+ MembersController_deleteMember: {
parameters: {
path: {
/** @description Organization slug */
slug: string
+ gotrue_id: string
}
}
responses: {
200: {
- content: {
- 'application/json': components['schemas']['InvitationResponse']
- }
+ content: never
}
- /** @description Failed to get organization invitations */
+ /** @description Failed to remove organization member */
500: {
content: never
}
}
}
- /** Creates organization invitation */
- InvitationsController_createInvitation: {
+ /** Updates organization member */
+ MembersController_updateMember: {
parameters: {
path: {
/** @description Organization slug */
slug: string
+ gotrue_id: string
}
}
requestBody: {
content: {
- 'application/json': components['schemas']['CreateInvitationBody']
+ 'application/json': components['schemas']['UpdateMemberBody']
}
}
responses: {
- 201: {
+ 200: {
content: never
}
- /** @description Failed to create organization invitation */
+ /** @description Failed to update organization member */
500: {
content: never
}
}
}
- /** Gets organization invitation by token */
- InvitationsController_getInvitationByToken: {
+ /** Gets organization members who have reached their free project limit */
+ ReachedFreeProjectLimitController_getMembersWhoReachedFreeProjectLimit: {
parameters: {
path: {
/** @description Organization slug */
slug: string
- token: string
}
}
responses: {
200: {
content: {
- 'application/json': components['schemas']['InvitationByTokenResponse']
+ 'application/json': components['schemas']['MemberWithFreeProjectLimit'][]
}
}
- /** @description Failed to get organization invitation by token */
- 500: {
- content: never
- }
- }
- }
- /** Accepts organization invitation by token */
- InvitationsController_acceptInvitationByToken: {
- parameters: {
- path: {
- /** @description Organization slug */
- slug: string
- token: string
- }
- }
- responses: {
- 201: {
- content: never
- }
- /** @description Failed to accept organization invitation by token */
- 500: {
- content: never
- }
- }
- }
- /** Deletes organization invitation with given id */
- InvitationsController_deleteInvitation: {
- parameters: {
- path: {
- /** @description Organization slug */
- slug: string
- id: number
- }
- }
- responses: {
- 200: {
- content: never
- }
- /** @description Failed to delete organization invitation with given id */
+ /** @description Failed to retrieve organization members who have reached their free project limit */
500: {
content: never
}
@@ -7790,6 +7655,82 @@ export interface operations {
}
}
}
+ /** Gets invoices for the given organization */
+ OrgInvoicesController_getInvoices: {
+ parameters: {
+ query: {
+ limit: string
+ offset: string
+ }
+ path: {
+ /** @description Organization slug */
+ slug: string
+ }
+ }
+ responses: {
+ 200: {
+ content: {
+ 'application/json': components['schemas']['Invoice'][]
+ }
+ }
+ 403: {
+ content: never
+ }
+ /** @description Failed to retrieve invoices */
+ 500: {
+ content: never
+ }
+ }
+ }
+ /** Gets the total count of invoices for the given organization */
+ OrgInvoicesController_countInvoices: {
+ parameters: {
+ path: {
+ /** @description Organization slug */
+ slug: string
+ }
+ }
+ responses: {
+ 200: {
+ headers: {
+ /** @description total count value */
+ 'X-Total-Count'?: unknown
+ }
+ content: never
+ }
+ 403: {
+ content: never
+ }
+ /** @description Failed to retrieve the total count of invoices */
+ 500: {
+ content: never
+ }
+ }
+ }
+ /** Gets invoice with the given invoice ID */
+ OrgInvoicesController_getInvoice: {
+ parameters: {
+ path: {
+ /** @description Organization slug */
+ slug: string
+ invoiceId: string
+ }
+ }
+ responses: {
+ 200: {
+ content: {
+ 'application/json': components['schemas']['Invoice']
+ }
+ }
+ 403: {
+ content: never
+ }
+ /** @description Failed to retrieve invoice */
+ 500: {
+ content: never
+ }
+ }
+ }
/** Retrieve column privileges */
ColumnPrivilegesController_getColumnPrivileges: {
parameters: {
@@ -10792,6 +10733,77 @@ export interface operations {
}
}
}
+ /** Gets project addons */
+ ProjectAddonController_getProjectAddons: {
+ parameters: {
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ }
+ responses: {
+ 200: {
+ content: {
+ 'application/json': components['schemas']['ProjectAddonsResponse']
+ }
+ }
+ 403: {
+ content: never
+ }
+ /** @description Failed to get project addons */
+ 500: {
+ content: never
+ }
+ }
+ }
+ /** Updates project addon */
+ ProjectAddonController_updateAddon: {
+ parameters: {
+ path: {
+ /** @description Project ref */
+ ref: string
+ }
+ }
+ requestBody: {
+ content: {
+ 'application/json': components['schemas']['UpdateAddonBody']
+ }
+ }
+ responses: {
+ 201: {
+ content: never
+ }
+ 403: {
+ content: never
+ }
+ /** @description Failed to update project addon */
+ 500: {
+ content: never
+ }
+ }
+ }
+ /** Removes project addon */
+ ProjectAddonController_removeAddon: {
+ parameters: {
+ path: {
+ /** @description Project ref */
+ ref: string
+ addon_variant: components['schemas']['AddonVariantId']
+ }
+ }
+ responses: {
+ 200: {
+ content: never
+ }
+ 403: {
+ content: never
+ }
+ /** @description Failed to remove project addon */
+ 500: {
+ content: never
+ }
+ }
+ }
/** Gets project's pgbouncer config */
PgbouncerConfigController_getPgbouncerConfig: {
parameters: {
@@ -11080,77 +11092,6 @@ export interface operations {
}
}
}
- /** Gets project addons */
- ProjectAddonController_getProjectAddons: {
- parameters: {
- path: {
- /** @description Project ref */
- ref: string
- }
- }
- responses: {
- 200: {
- content: {
- 'application/json': components['schemas']['ProjectAddonsResponse']
- }
- }
- 403: {
- content: never
- }
- /** @description Failed to get project addons */
- 500: {
- content: never
- }
- }
- }
- /** Updates project addon */
- ProjectAddonController_updateAddon: {
- parameters: {
- path: {
- /** @description Project ref */
- ref: string
- }
- }
- requestBody: {
- content: {
- 'application/json': components['schemas']['UpdateAddonBody']
- }
- }
- responses: {
- 201: {
- content: never
- }
- 403: {
- content: never
- }
- /** @description Failed to update project addon */
- 500: {
- content: never
- }
- }
- }
- /** Removes project addon */
- ProjectAddonController_removeAddon: {
- parameters: {
- path: {
- /** @description Project ref */
- ref: string
- addon_variant: components['schemas']['AddonVariantId']
- }
- }
- responses: {
- 200: {
- content: never
- }
- 403: {
- content: never
- }
- /** @description Failed to remove project addon */
- 500: {
- content: never
- }
- }
- }
/**
* Gets project's api info
* @deprecated
@@ -11675,12 +11616,15 @@ export interface operations {
}
}
}
- /** Gets invoices for the given customer */
+ /**
+ * Gets invoices for the given customer
+ * @deprecated
+ */
InvoicesController_getInvoices: {
parameters: {
query: {
- customer: string
- slug?: string
+ customer?: string
+ slug: string
limit: string
offset: string
}
@@ -11697,12 +11641,15 @@ export interface operations {
}
}
}
- /** Gets the total count of invoices for the given customer */
+ /**
+ * Gets the total count of invoices for the given customer
+ * @deprecated
+ */
InvoicesController_countInvoices: {
parameters: {
query: {
- customer: string
- slug?: string
+ customer?: string
+ slug: string
}
}
responses: {
@@ -11729,7 +11676,10 @@ export interface operations {
}
}
}
- /** Gets invoice with the given invoice ID */
+ /**
+ * Gets invoice with the given invoice ID
+ * @deprecated
+ */
InvoicesController_getInvoice: {
parameters: {
path: {