Skip to content

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

fix: remove deprecated pages (#22382)

Charisbb46470b3fea
diff --git a/apps/docs/pages/reference/realtime/config.tsx b/apps/docs/pages/reference/realtime/config.tsx
deleted file mode 100644
index 8a25754c342..00000000000
--- a/apps/docs/pages/reference/realtime/config.tsx
+++ /dev/null
@@ -1,114 +0,0 @@
-import fs from 'fs'
-import matter from 'gray-matter'
-import components from '~/components/index'
-import { MDXRemote } from 'next-mdx-remote'
-import { serialize } from 'next-mdx-remote/serialize'
-
-import specFile from '~/spec/realtime_v0_config.yaml' assert { type: 'yml' }
-import { Parameter } from '~/lib/refGenerator/refTypes'
-
-import ReactMarkdown from 'react-markdown'
-
-// Parameters are grouped on the page by tag
-const TAGS = ['general', 'database']
-
-export default function Config(props) {
- return (
- <div>
- <div className="flex my-16">
- <div className="w-full prose">
- <h1 className="text-4xl mb-16">{specFile.info.title} Configuration</h1>
- <ReactMarkdown>{specFile.info.description}</ReactMarkdown>
- <div>
- <div>
- {props.docs
- .filter((doc) => doc.introPage)
- .map((item) => (
- <MDXRemote {...item.content} components={components} />
- ))}
- </div>
- {TAGS.map((tag) =>
- specFile.parameters
- .filter((param: Parameter) => param.tags[0] === tag)
- .map((parameter: Parameter, index) => (
- <div>
- {index === 0 && <h2 className="text-xl capitalize">{tag} Settings</h2>}
- <div className="mt-8">
- <div>
- <h2 className="text-xl font-medium text-foreground font-mono">
- <span className="mr-2">$</span>
- {parameter.title}
- </h2>
- <div className="grid" id={parameter.id}>
- <div className="border-b pb-8" key={parameter.id}>
- <div className=" mb-16">
- <p className="mb-4 scroll-mt-16 mt-0 text-foreground-light text-base">
- <ReactMarkdown>{parameter.description}</ReactMarkdown>
- </p>
- <div className="grid gap-2">
- <div className="flex gap-2">
- Required: <code>{parameter.required.toString()}</code>
- </div>
- <div className="flex gap-2">
- Default:
- <code>
- {parameter.default ? parameter.default.toString() : 'None'}
- </code>
- </div>
- </div>
- </div>
- {parameter.links &&
- parameter.links.map((link) => (
- <div>
- <h3>See also:</h3>
- <li>
- <a href={link.link}>{link.name}</a>
- </li>
- </div>
- ))}
- </div>
- </div>
- </div>
- </div>
- </div>
- ))
- )}
- </div>
- </div>
- </div>
- </div>
- )
-}
-export async function getServerSideProps() {
- // an array of ids of the intro sections for this library
- const introPages = ['realtime']
-
- const pages = [...introPages]
-
- // Grab custom markdown intro page files
- const allMarkdownDocs = await Promise.all(
- pages.map(async (x: any, i) => {
- const pathName = `docs/ref/realtime/${x}.mdx`
-
- const markdownExists = fs.existsSync(pathName)
-
- const fileContents = markdownExists ? fs.readFileSync(pathName, 'utf8') : ''
- const { data, content } = matter(fileContents)
-
- return {
- id: x,
- title: x,
- // ...content,
- meta: data,
- introPage: introPages.includes(x),
- content: content ? await serialize(content || '') : null,
- }
- })
- )
-
- return {
- props: {
- docs: allMarkdownDocs,
- },
- }
-}
diff --git a/apps/docs/pages/reference/storage/[...slug].tsx b/apps/docs/pages/reference/storage/[...slug].tsx
deleted file mode 100644
index 6e30ee79aa5..00000000000
--- a/apps/docs/pages/reference/storage/[...slug].tsx
+++ /dev/null
@@ -1,167 +0,0 @@
-import { CodeBlock, Tabs } from 'ui'
-import specFile from '~/spec/transforms/storage_v0_openapi_deparsed.json' assert { type: 'json' }
-import { gen_v3 } from '~/lib/refGenerator/helpers'
-
-import RefSubLayout from '~/layouts/ref/RefSubLayout'
-import React from 'react'
-
-export type AcceptedValue = {
- id: string
- name: string
- type: 'string' | 'boolean' | 'object'
- description?: string
-}
-
-export type Flag = {
- id: string
- name: string
- description: string
- default_value: string
- accepted_values: AcceptedValue[]
-}
-
-export type ApiParameter = {
- example: string
- in: string
- name: string
- required: boolean
- schema: {
- type: string
- example: string
- }
-}
-
-// @ts-ignore
-const generatedSpec = gen_v3(specFile, 'wat', { apiUrl: 'apiv0' })
-
-export default function Config() {
- return (
- <RefSubLayout>
- <div className="flex my-16">
- <div className="w-full">
- <div className="grid gap-16">
- <h1 className="text-4xl">{generatedSpec.info.title}</h1>
- <p>{generatedSpec.info.description}</p>
- </div>
-
- <div className="grid gap-32 mx-auto max-w-5xl mt-24">
- {generatedSpec.sections.map((section, i) => (
- <React.Fragment key={i}>
- <h2 className="text-3xl">{section.title}</h2>
- {section.operations.map((operation: any, index) => (
- <div key={index} className="border-b pb-8">
- <RefSubLayout.Section
- slug={operation.id}
- title={operation.summary}
- id={operation.operationId}
- monoFont={false}
- >
- <RefSubLayout.Details>
- <div className="mt-4">
- <code className="text-md flex gap-4 text-md text-foreground-lighter break-all">
- <span className="uppercase">{operation.operation}</span>
- {operation.fullPath}
- </code>
- </div>
- {/* Path Parameters */}
- {operation.parameters &&
- operation.parameters.filter((parameter) => parameter.in === 'path')
- .length > 0 && (
- <div className="mt-12">
- <h2 className="border-b pb-2 text-xl">Path parameters</h2>
- <ul className="mt-4">
- {operation.parameters &&
- operation.parameters
- .filter((parameter: any) => parameter.in === 'path')
- .map((parameter: any, indx: number) => (
- <li key={indx} className="mt-8 border-b pb-6">
- <div className="flex gap-4 items-center">
- <span className="font-bold">{parameter.name}</span>
- <span className="font-mono text-xs break-all">
- {parameter.required && (
- <div className="text-[10px] border border-amber-700 bg-amber-300 text-amber-900 px-2 tracking-wide font-mono py-0.25 rounded-full">
- REQUIRED
- </div>
- )}
- </span>
- </div>
- <div className="mt-4 flex gap-4 items-center">
- <span>Example:</span>
- <span className="font-mono text-xs break-all">
- {parameter.example}
- </span>
- </div>
- </li>
- ))}
- </ul>
- </div>
- )}
-
- {/* Header Parameters */}
- {operation.parameters &&
- operation.parameters.filter((parameter) => parameter.in === 'header')
- .length > 0 && (
- <div className="mt-12">
- <h2 className="border-b pb-2 text-xl">Header parameters</h2>
- <ul className="mt-4">
- {operation.parameters &&
- operation.parameters
- .filter((parameter: any) => parameter.in === 'header')
- .map((parameter: any, i: number) => (
- <li key={i} className="mt-8 border-b pb-6">
- <div className="flex gap-4 items-center">
- <span className="font-bold">{parameter.name}</span>
- <span className="font-mono text-xs break-all">
- {parameter.required && 'required'}
- </span>
- </div>
- <div className="mt-4 flex gap-4 items-center">
- <span>Example:</span>
- <span className="font-mono text-xs break-all">
- {parameter.example}
- </span>
- </div>
- </li>
- ))}
- </ul>
- </div>
- )}
- </RefSubLayout.Details>
- <RefSubLayout.Examples>
- <h2 className="text-xl">Responses</h2>
- <Tabs
- scrollable
- size="small"
- type="underlined"
- defaultActiveId={operation.responseList[0].responseCode}
- queryGroup="response-status"
- >
- {operation.responseList.map((response: any, i: number) => (
- <Tabs.Panel
- key={i}
- id={response.responseCode}
- label={response.responseCode}
- >
- <p>{response.description}</p>
- {response?.content && response?.content['application/json'] && (
- <div className="mt-8">
- <CodeBlock language="bash" className="relative">
- {JSON.stringify(response.content['application/json'], null, 2)}
- </CodeBlock>
- </div>
- )}
- </Tabs.Panel>
- ))}
- </Tabs>
- </RefSubLayout.Examples>
- </RefSubLayout.Section>
- </div>
- ))}
- </React.Fragment>
- ))}
- </div>
- </div>
- </div>
- </RefSubLayout>
- )
-}
diff --git a/apps/docs/pages/reference/storage/config.tsx b/apps/docs/pages/reference/storage/config.tsx
deleted file mode 100644
index ba26fafe1dd..00000000000
--- a/apps/docs/pages/reference/storage/config.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import specFile from '~/spec/storage_v0_config.yaml' assert { type: 'yml' }
-import { Parameter } from '~/lib/refGenerator/refTypes'
-
-import ReactMarkdown from 'react-markdown'
-
-// Parameters are grouped on the page by tag
-const TAGS = ['general', 'multitenant']
-// console.log(specFile)
-export default function Config() {
- return (
- <div>
- <div className="flex my-16">
- <div className="w-full prose">
- <h1 className="text-4xl mb-16">{specFile.info.title} Configuration</h1>
- <ReactMarkdown>{specFile.info.description}</ReactMarkdown>
- <div>
- {TAGS.map((tag) =>
- specFile.parameters
- .filter((param: Parameter) => param.tags[0] === tag)
- .map((parameter: Parameter, index) => (
- <div>
- {index === 0 && <h2 className="text-xl capitalize">{tag} Settings</h2>}
- <div className="mt-8">
- <div>
- <h2 className="text-xl font-medium text-foreground font-mono">
- <span className="mr-2">$</span>
- {parameter.title}
- </h2>
- <div className="grid" id={parameter.id}>
- <div className="border-b pb-8" key={parameter.id}>
- <div className=" mb-16">
- <p className="mb-4 scroll-mt-16 mt-0 text-foreground-light text-base">
- <ReactMarkdown>{parameter.description}</ReactMarkdown>
- </p>
- <div className="grid gap-2">
- <div className="flex gap-2">
- Required: <code>{parameter.required.toString()}</code>
- </div>
- <div className="flex gap-2">
- Default:
- <code>
- {parameter.default ? parameter.default.toString() : 'None'}
- </code>
- </div>
- </div>
- </div>
- {parameter.links &&
- parameter.links.map((link) => (
- <div>
- <h3>See also:</h3>
- <li>
- <a href={link.link}>{link.name}</a>
- </li>
- </div>
- ))}
- </div>
- </div>
- </div>
- </div>
- </div>
- ))
- )}
- </div>
- </div>
- </div>
- </div>
- )
-}