docs: Regenerate specs for all API docs references (#33265)

* docs: Regenerate specs for all API docs references

* Fix the reference docs parsing.

* Update snapshots of docs tests.

* fix(ui): hide details panel for file params

* fix(ui): fix array display when inner type is not given

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2025-02-04 14:57:17 +01:00
1 parent 216df9b1eb
commit a67fcb1809
24 files changed
+71114 -46347

No files matched your search

@@ -32,6 +32,7 @@ export type ISchema =
| ISchemaEnum
| ISchemaBoolean
| ISchemaNumber
| ISchemaFile
| ISchemaArray
| ISchemaAllOf
| ISchemaAnyOf
@@ -67,6 +68,11 @@ interface ISchemaString extends ISchemaBase {
pattern?: string
}
interface ISchemaFile extends ISchemaBase {
type: 'file'
format?: 'binary'
}
interface ISchemaObject extends ISchemaBase {
type: 'object'
properties?: { [key: string]: ISchema }
@@ -165,6 +171,10 @@ export function getTypeDisplayFromSchema(schema: ISchema) {
return {
displayName: 'string',
}
} else if (schema.type === 'file') {
return {
displayName: 'file',
}
} else if (schema.type === 'array') {
return {
displayName: `Array<${getTypeDisplayFromSchema(schema.items).displayName}>`,
+8 -13
View File
@@ -1,15 +1,11 @@
import { isEqual } from 'lodash'
import { ChevronRight, XCircle } from 'lucide-react'
import type { HTMLAttributes, PropsWithChildren } from 'react'
import ReactMarkdown from 'react-markdown'
import {
Collapsible_Shadcn_,
CollapsibleContent_Shadcn_,
CollapsibleTrigger_Shadcn_,
cn,
CodeBlock,
} from 'ui'
import { cn, Collapsible_Shadcn_, CollapsibleContent_Shadcn_, CollapsibleTrigger_Shadcn_ } from 'ui'
import ApiSchema from '~/components/ApiSchema'
import { MDXRemoteBase } from '~/features/docs/MdxBase'
import { MDXRemoteRefs } from '~/features/docs/Reference.mdx'
import type {
@@ -23,8 +19,6 @@ import { ReferenceSectionWrapper } from '~/features/docs/Reference.ui.client'
import { normalizeMarkdown } from '~/features/docs/Reference.utils'
import { getTypeDisplayFromSchema, IApiEndPoint, type ISchema } from './Reference.api.utils'
import { API_REFERENCE_REQUEST_BODY_SCHEMA_DATA_ATTRIBUTES } from './Reference.ui.shared'
import ReactMarkdown from 'react-markdown'
import ApiSchema from '~/components/ApiSchema'
interface SectionProps extends PropsWithChildren {
link: string
@@ -479,7 +473,7 @@ export function ApiSchemaParamSubdetails({
!('minLength' in schema || 'maxLength' in schema || 'pattern' in schema)) ||
(schema.type === 'array' &&
'type' in schema.items &&
['boolean', 'number', 'integer', 'string'].includes(schema.items.type)))
['boolean', 'number', 'integer', 'string', 'file'].includes(schema.items.type)))
) {
return null
}
@@ -630,7 +624,8 @@ function getTypeName(parameter: object): string {
case 'array':
// Needs an extra level of wrapping to fake the wrapping parameter
// @ts-ignore
return `Array<${getTypeName({ type: type.elemType })}>`
const innerType = getTypeName({ type: type.elemType })
return innerType ? `Array<${innerType}>` : 'Array'
}
return ''
@@ -696,14 +691,14 @@ function getSubDetails(parentType: MethodTypes['params'][number] | MethodTypes['
}
break
case 'array':
if (parentType.type.elemType.type === 'union') {
if (parentType.type.elemType?.type === 'union') {
subDetails = parentType.type.elemType.subTypes.map((subType, index) => ({
name: `union option ${index + 1}`,
type: { ...subType },
isOptional: 'NA',
}))
}
if (parentType.type.elemType.type === 'object') {
if (parentType.type.elemType?.type === 'object') {
subDetails = parentType.type.elemType.properties
}
break
File diff suppressed because it is too large. Load diff
+87 -24
View File
@@ -2334,6 +2334,48 @@
"security": [{ "bearer": [] }]
}
},
"/v1/projects/{ref}/functions/deploy": {
"post": {
"operationId": "v1-deploy-a-function",
"summary": "Deploy a function",
"description": "A new endpoint to deploy functions. It will create if function does not exist.",
"parameters": [
{
"name": "ref",
"required": true,
"in": "path",
"description": "Project ref",
"schema": { "minLength": 20, "maxLength": 20, "type": "string" }
},
{
"name": "slug",
"required": false,
"in": "query",
"schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" }
}
],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": { "$ref": "#/components/schemas/FunctionDeployBody" }
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } }
}
},
"403": { "description": "" },
"500": { "description": "Failed to deploy function" }
},
"tags": ["Edge Functions"],
"security": [{ "bearer": [] }]
}
},
"/v1/projects/{ref}/functions/{function_slug}": {
"get": {
"operationId": "v1-get-a-function",
@@ -3051,20 +3093,11 @@
"format": "uri",
"description": "Template URL used to create the project from the CLI.",
"example": "https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone"
},
"release_channel": {
"type": "string",
"enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"],
"description": "Release channel. If not provided, GA will be used."
},
"postgres_engine": {
"type": "string",
"enum": ["15", "17-oriole"],
"description": "Postgres engine version. If not provided, the latest version will be used."
}
},
"required": ["db_pass", "name", "organization_id", "region"],
"additionalProperties": false
"additionalProperties": false,
"hideDefinitions": ["release_channel", "postgres_engine"]
},
"V1ProjectResponse": {
"type": "object",
@@ -4484,18 +4517,8 @@
},
"RestoreProjectBodyDto": {
"type": "object",
"properties": {
"release_channel": {
"type": "string",
"enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"],
"description": "Release channel version. If not provided, GeneralAvailability will be used."
},
"postgres_engine": {
"type": "string",
"enum": ["15", "17-oriole"],
"description": "Postgres engine version. If not provided, the latest version from the given release channel will be used."
}
}
"properties": {},
"hideDefinitions": ["release_channel", "postgres_engine"]
},
"V1AnalyticsResponse": {
"type": "object",
@@ -4537,7 +4560,23 @@
"properties": {
"databases": {
"type": "array",
"items": { "type": "object", "properties": {}, "additionalProperties": true }
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"schemas": {
"type": "array",
"items": {
"type": "object",
"properties": { "name": { "type": "string" } },
"required": ["name"],
"additionalProperties": true
}
}
},
"required": ["name", "schemas"],
"additionalProperties": true
}
}
},
"required": ["databases"]
@@ -4571,6 +4610,30 @@
},
"required": ["slug", "name", "body"]
},
"FunctionDeployBody": {
"type": "object",
"properties": {
"file": {
"type": "array",
"items": { "type": "file", "items": { "type": "string", "format": "binary" } }
},
"metadata": {
"type": "object",
"properties": {
"entrypoint_path": { "required": true, "type": "string" },
"import_map_path": { "required": false, "type": "string" },
"static_patterns": {
"required": false,
"type": "array",
"items": { "type": "string" }
},
"verify_jwt": { "required": false, "type": "boolean" },
"name": { "required": false, "type": "string" }
}
}
},
"required": ["file", "metadata"]
},
"FunctionSlugResponse": {
"type": "object",
"properties": {
+6
View File
@@ -237,6 +237,12 @@
"slug": "v1-delete-a-function",
"type": "operation"
},
{
"id": "v1-deploy-a-function",
"title": "Deploy a function",
"slug": "v1-deploy-a-function",
"type": "operation"
},
{
"id": "v1-get-a-function",
"title": "Get a function",
File diff suppressed because it is too large. Load diff
+240 -108
View File
@@ -7,14 +7,14 @@
"originalName": "",
"children": [
{
"id": 63,
"id": 67,
"name": "FunctionRegion",
"kind": 8,
"kindString": "Enumeration",
"flags": {},
"children": [
{
"id": 64,
"id": 68,
"name": "Any",
"kind": 16,
"kindString": "Enumeration Member",
@@ -33,7 +33,7 @@
"defaultValue": "\"any\""
},
{
"id": 65,
"id": 69,
"name": "ApNortheast1",
"kind": 16,
"kindString": "Enumeration Member",
@@ -52,7 +52,7 @@
"defaultValue": "\"ap-northeast-1\""
},
{
"id": 66,
"id": 70,
"name": "ApNortheast2",
"kind": 16,
"kindString": "Enumeration Member",
@@ -71,7 +71,7 @@
"defaultValue": "\"ap-northeast-2\""
},
{
"id": 67,
"id": 71,
"name": "ApSouth1",
"kind": 16,
"kindString": "Enumeration Member",
@@ -90,7 +90,7 @@
"defaultValue": "\"ap-south-1\""
},
{
"id": 68,
"id": 72,
"name": "ApSoutheast1",
"kind": 16,
"kindString": "Enumeration Member",
@@ -109,7 +109,7 @@
"defaultValue": "\"ap-southeast-1\""
},
{
"id": 69,
"id": 73,
"name": "ApSoutheast2",
"kind": 16,
"kindString": "Enumeration Member",
@@ -128,7 +128,7 @@
"defaultValue": "\"ap-southeast-2\""
},
{
"id": 70,
"id": 74,
"name": "CaCentral1",
"kind": 16,
"kindString": "Enumeration Member",
@@ -147,7 +147,7 @@
"defaultValue": "\"ca-central-1\""
},
{
"id": 71,
"id": 75,
"name": "EuCentral1",
"kind": 16,
"kindString": "Enumeration Member",
@@ -166,7 +166,7 @@
"defaultValue": "\"eu-central-1\""
},
{
"id": 72,
"id": 76,
"name": "EuWest1",
"kind": 16,
"kindString": "Enumeration Member",
@@ -185,7 +185,7 @@
"defaultValue": "\"eu-west-1\""
},
{
"id": 73,
"id": 77,
"name": "EuWest2",
"kind": 16,
"kindString": "Enumeration Member",
@@ -204,7 +204,7 @@
"defaultValue": "\"eu-west-2\""
},
{
"id": 74,
"id": 78,
"name": "EuWest3",
"kind": 16,
"kindString": "Enumeration Member",
@@ -223,7 +223,7 @@
"defaultValue": "\"eu-west-3\""
},
{
"id": 75,
"id": 79,
"name": "SaEast1",
"kind": 16,
"kindString": "Enumeration Member",
@@ -242,7 +242,7 @@
"defaultValue": "\"sa-east-1\""
},
{
"id": 76,
"id": 80,
"name": "UsEast1",
"kind": 16,
"kindString": "Enumeration Member",
@@ -261,7 +261,7 @@
"defaultValue": "\"us-east-1\""
},
{
"id": 77,
"id": 81,
"name": "UsWest1",
"kind": 16,
"kindString": "Enumeration Member",
@@ -280,7 +280,7 @@
"defaultValue": "\"us-west-1\""
},
{
"id": 78,
"id": 82,
"name": "UsWest2",
"kind": 16,
"kindString": "Enumeration Member",
@@ -303,7 +303,7 @@
{
"title": "Enumeration Members",
"kind": 16,
"children": [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78]
"children": [68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82]
}
],
"sources": [
@@ -453,6 +453,72 @@
"package": "typescript",
"name": "Promise"
}
},
{
"id": 13,
"name": "__type",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 14,
"name": "input",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "reference",
"qualifiedName": "Request",
"package": "typescript",
"name": "Request"
},
{
"type": "reference",
"qualifiedName": "URL",
"package": "typescript",
"name": "URL"
}
]
}
},
{
"id": 15,
"name": "init",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"type": {
"type": "reference",
"qualifiedName": "RequestInit",
"package": "typescript",
"name": "RequestInit"
}
}
],
"type": {
"type": "reference",
"typeArguments": [
{
"type": "reference",
"qualifiedName": "Response",
"package": "typescript",
"name": "Response"
}
],
"qualifiedName": "Promise",
"package": "typescript",
"name": "Promise"
}
}
]
}
@@ -491,7 +557,7 @@
}
},
{
"id": 13,
"id": 16,
"name": "region",
"kind": 1024,
"kindString": "Property",
@@ -507,7 +573,7 @@
],
"type": {
"type": "reference",
"id": 63,
"id": 67,
"name": "FunctionRegion"
}
}
@@ -516,7 +582,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [8, 7, 13]
"children": [8, 7, 16]
}
]
}
@@ -533,7 +599,7 @@
]
},
{
"id": 17,
"id": 20,
"name": "fetch",
"kind": 1024,
"kindString": "Property",
@@ -550,21 +616,21 @@
"type": {
"type": "reflection",
"declaration": {
"id": 18,
"id": 21,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"signatures": [
{
"id": 19,
"id": 22,
"name": "__type",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 20,
"id": 23,
"name": "input",
"kind": 32768,
"kindString": "Parameter",
@@ -588,7 +654,73 @@
}
},
{
"id": 21,
"id": 24,
"name": "init",
"kind": 32768,
"kindString": "Parameter",
"flags": {
"isOptional": true
},
"type": {
"type": "reference",
"qualifiedName": "RequestInit",
"package": "typescript",
"name": "RequestInit"
}
}
],
"type": {
"type": "reference",
"typeArguments": [
{
"type": "reference",
"qualifiedName": "Response",
"package": "typescript",
"name": "Response"
}
],
"qualifiedName": "Promise",
"package": "typescript",
"name": "Promise"
}
},
{
"id": 25,
"name": "__type",
"kind": 4096,
"kindString": "Call signature",
"flags": {},
"parameters": [
{
"id": 26,
"name": "input",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "reference",
"qualifiedName": "Request",
"package": "typescript",
"name": "Request"
},
{
"type": "reference",
"qualifiedName": "URL",
"package": "typescript",
"name": "URL"
}
]
}
},
{
"id": 27,
"name": "init",
"kind": 32768,
"kindString": "Parameter",
@@ -623,7 +755,7 @@
}
},
{
"id": 15,
"id": 18,
"name": "headers",
"kind": 1024,
"kindString": "Property",
@@ -655,7 +787,7 @@
}
},
{
"id": 16,
"id": 19,
"name": "region",
"kind": 1024,
"kindString": "Property",
@@ -671,12 +803,12 @@
],
"type": {
"type": "reference",
"id": 63,
"id": 67,
"name": "FunctionRegion"
}
},
{
"id": 14,
"id": 17,
"name": "url",
"kind": 1024,
"kindString": "Property",
@@ -696,7 +828,7 @@
}
},
{
"id": 25,
"id": 31,
"name": "invoke",
"kind": 2048,
"kindString": "Method",
@@ -710,7 +842,7 @@
],
"signatures": [
{
"id": 26,
"id": 32,
"name": "invoke",
"kind": 4096,
"kindString": "Call signature",
@@ -720,7 +852,7 @@
},
"typeParameter": [
{
"id": 27,
"id": 33,
"name": "T",
"kind": 131072,
"kindString": "Type parameter",
@@ -733,7 +865,7 @@
],
"parameters": [
{
"id": 28,
"id": 34,
"name": "functionName",
"kind": 32768,
"kindString": "Parameter",
@@ -747,7 +879,7 @@
}
},
{
"id": 29,
"id": 35,
"name": "options",
"kind": 32768,
"kindString": "Parameter",
@@ -757,7 +889,7 @@
},
"type": {
"type": "reference",
"id": 30,
"id": 36,
"name": "FunctionInvokeOptions"
},
"defaultValue": "{}"
@@ -768,11 +900,11 @@
"typeArguments": [
{
"type": "reference",
"id": 61,
"id": 83,
"typeArguments": [
{
"type": "reference",
"id": 27,
"id": 33,
"name": "T"
}
],
@@ -787,7 +919,7 @@
]
},
{
"id": 22,
"id": 28,
"name": "setAuth",
"kind": 2048,
"kindString": "Method",
@@ -801,7 +933,7 @@
],
"signatures": [
{
"id": 23,
"id": 29,
"name": "setAuth",
"kind": 4096,
"kindString": "Call signature",
@@ -811,7 +943,7 @@
},
"parameters": [
{
"id": 24,
"id": 30,
"name": "token",
"kind": 32768,
"kindString": "Parameter",
@@ -842,12 +974,12 @@
{
"title": "Properties",
"kind": 1024,
"children": [17, 15, 16, 14]
"children": [20, 18, 19, 17]
},
{
"title": "Methods",
"kind": 2048,
"children": [25, 22]
"children": [31, 28]
}
],
"sources": [
@@ -859,14 +991,14 @@
]
},
{
"id": 39,
"id": 45,
"name": "FunctionsError",
"kind": 128,
"kindString": "Class",
"flags": {},
"children": [
{
"id": 40,
"id": 46,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
@@ -880,14 +1012,14 @@
],
"signatures": [
{
"id": 41,
"id": 47,
"name": "new FunctionsError",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {},
"parameters": [
{
"id": 42,
"id": 48,
"name": "message",
"kind": 32768,
"kindString": "Parameter",
@@ -898,7 +1030,7 @@
}
},
{
"id": 43,
"id": 49,
"name": "name",
"kind": 32768,
"kindString": "Parameter",
@@ -910,7 +1042,7 @@
"defaultValue": "'FunctionsError'"
},
{
"id": 44,
"id": 50,
"name": "context",
"kind": 32768,
"kindString": "Parameter",
@@ -925,7 +1057,7 @@
],
"type": {
"type": "reference",
"id": 39,
"id": 45,
"name": "FunctionsError"
},
"overwrites": {
@@ -940,7 +1072,7 @@
}
},
{
"id": 45,
"id": 51,
"name": "context",
"kind": 1024,
"kindString": "Property",
@@ -962,12 +1094,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [40]
"children": [46]
},
{
"title": "Properties",
"kind": 1024,
"children": [45]
"children": [51]
}
],
"sources": [
@@ -988,30 +1120,30 @@
"extendedBy": [
{
"type": "reference",
"id": 46,
"id": 52,
"name": "FunctionsFetchError"
},
{
"type": "reference",
"id": 51,
"id": 57,
"name": "FunctionsHttpError"
},
{
"type": "reference",
"id": 56,
"id": 62,
"name": "FunctionsRelayError"
}
]
},
{
"id": 46,
"id": 52,
"name": "FunctionsFetchError",
"kind": 128,
"kindString": "Class",
"flags": {},
"children": [
{
"id": 47,
"id": 53,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
@@ -1025,14 +1157,14 @@
],
"signatures": [
{
"id": 48,
"id": 54,
"name": "new FunctionsFetchError",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {},
"parameters": [
{
"id": 49,
"id": 55,
"name": "context",
"kind": 32768,
"kindString": "Parameter",
@@ -1045,24 +1177,24 @@
],
"type": {
"type": "reference",
"id": 46,
"id": 52,
"name": "FunctionsFetchError"
},
"overwrites": {
"type": "reference",
"id": 41,
"id": 47,
"name": "FunctionsError.constructor"
}
}
],
"overwrites": {
"type": "reference",
"id": 40,
"id": 46,
"name": "FunctionsError.constructor"
}
},
{
"id": 50,
"id": 56,
"name": "context",
"kind": 1024,
"kindString": "Property",
@@ -1080,7 +1212,7 @@
},
"inheritedFrom": {
"type": "reference",
"id": 45,
"id": 51,
"name": "FunctionsError.context"
}
}
@@ -1089,12 +1221,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [47]
"children": [53]
},
{
"title": "Properties",
"kind": 1024,
"children": [50]
"children": [56]
}
],
"sources": [
@@ -1107,20 +1239,20 @@
"extendedTypes": [
{
"type": "reference",
"id": 39,
"id": 45,
"name": "FunctionsError"
}
]
},
{
"id": 51,
"id": 57,
"name": "FunctionsHttpError",
"kind": 128,
"kindString": "Class",
"flags": {},
"children": [
{
"id": 52,
"id": 58,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
@@ -1134,14 +1266,14 @@
],
"signatures": [
{
"id": 53,
"id": 59,
"name": "new FunctionsHttpError",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {},
"parameters": [
{
"id": 54,
"id": 60,
"name": "context",
"kind": 32768,
"kindString": "Parameter",
@@ -1154,24 +1286,24 @@
],
"type": {
"type": "reference",
"id": 51,
"id": 57,
"name": "FunctionsHttpError"
},
"overwrites": {
"type": "reference",
"id": 41,
"id": 47,
"name": "FunctionsError.constructor"
}
}
],
"overwrites": {
"type": "reference",
"id": 40,
"id": 46,
"name": "FunctionsError.constructor"
}
},
{
"id": 55,
"id": 61,
"name": "context",
"kind": 1024,
"kindString": "Property",
@@ -1189,7 +1321,7 @@
},
"inheritedFrom": {
"type": "reference",
"id": 45,
"id": 51,
"name": "FunctionsError.context"
}
}
@@ -1198,12 +1330,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [52]
"children": [58]
},
{
"title": "Properties",
"kind": 1024,
"children": [55]
"children": [61]
}
],
"sources": [
@@ -1216,20 +1348,20 @@
"extendedTypes": [
{
"type": "reference",
"id": 39,
"id": 45,
"name": "FunctionsError"
}
]
},
{
"id": 56,
"id": 62,
"name": "FunctionsRelayError",
"kind": 128,
"kindString": "Class",
"flags": {},
"children": [
{
"id": 57,
"id": 63,
"name": "constructor",
"kind": 512,
"kindString": "Constructor",
@@ -1243,14 +1375,14 @@
],
"signatures": [
{
"id": 58,
"id": 64,
"name": "new FunctionsRelayError",
"kind": 16384,
"kindString": "Constructor signature",
"flags": {},
"parameters": [
{
"id": 59,
"id": 65,
"name": "context",
"kind": 32768,
"kindString": "Parameter",
@@ -1263,24 +1395,24 @@
],
"type": {
"type": "reference",
"id": 56,
"id": 62,
"name": "FunctionsRelayError"
},
"overwrites": {
"type": "reference",
"id": 41,
"id": 47,
"name": "FunctionsError.constructor"
}
}
],
"overwrites": {
"type": "reference",
"id": 40,
"id": 46,
"name": "FunctionsError.constructor"
}
},
{
"id": 60,
"id": 66,
"name": "context",
"kind": 1024,
"kindString": "Property",
@@ -1298,7 +1430,7 @@
},
"inheritedFrom": {
"type": "reference",
"id": 45,
"id": 51,
"name": "FunctionsError.context"
}
}
@@ -1307,12 +1439,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [57]
"children": [63]
},
{
"title": "Properties",
"kind": 1024,
"children": [60]
"children": [66]
}
],
"sources": [
@@ -1325,13 +1457,13 @@
"extendedTypes": [
{
"type": "reference",
"id": 39,
"id": 45,
"name": "FunctionsError"
}
]
},
{
"id": 30,
"id": 36,
"name": "FunctionInvokeOptions",
"kind": 4194304,
"kindString": "Type alias",
@@ -1346,14 +1478,14 @@
"type": {
"type": "reflection",
"declaration": {
"id": 31,
"id": 37,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
"flags": {},
"children": [
{
"id": 38,
"id": 44,
"name": "body",
"kind": 1024,
"kindString": "Property",
@@ -1435,7 +1567,7 @@
}
},
{
"id": 32,
"id": 38,
"name": "headers",
"kind": 1024,
"kindString": "Property",
@@ -1455,7 +1587,7 @@
"type": {
"type": "reflection",
"declaration": {
"id": 33,
"id": 39,
"name": "__type",
"kind": 65536,
"kindString": "Type literal",
@@ -1468,14 +1600,14 @@
}
],
"indexSignature": {
"id": 34,
"id": 40,
"name": "__index",
"kind": 8192,
"kindString": "Index signature",
"flags": {},
"parameters": [
{
"id": 35,
"id": 41,
"name": "key",
"kind": 32768,
"flags": {},
@@ -1494,7 +1626,7 @@
}
},
{
"id": 36,
"id": 42,
"name": "method",
"kind": 1024,
"kindString": "Property",
@@ -1538,7 +1670,7 @@
}
},
{
"id": 37,
"id": 43,
"name": "region",
"kind": 1024,
"kindString": "Property",
@@ -1557,7 +1689,7 @@
],
"type": {
"type": "reference",
"id": 63,
"id": 67,
"name": "FunctionRegion"
}
}
@@ -1566,7 +1698,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [38, 32, 36, 37]
"children": [44, 38, 42, 43]
}
],
"sources": [
@@ -1580,7 +1712,7 @@
}
},
{
"id": 61,
"id": 83,
"name": "FunctionsResponse",
"kind": 4194304,
"kindString": "Type alias",
@@ -1594,7 +1726,7 @@
],
"typeParameter": [
{
"id": 62,
"id": 84,
"name": "T",
"kind": 131072,
"kindString": "Type parameter",
@@ -1609,7 +1741,7 @@
"typeArguments": [
{
"type": "reference",
"id": 62,
"id": 84,
"name": "T"
}
],
@@ -1627,17 +1759,17 @@
{
"title": "Enumerations",
"kind": 8,
"children": [63]
"children": [67]
},
{
"title": "Classes",
"kind": 128,
"children": [1, 39, 46, 51, 56]
"children": [1, 45, 52, 57, 62]
},
{
"title": "Type Aliases",
"kind": 4194304,
"children": [30, 61]
"children": [36, 83]
}
],
"sources": [
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+169 -33
View File
@@ -3,7 +3,7 @@
"info": {
"title": "Supabase Storage API",
"description": "API documentation for Supabase Storage",
"version": "0.0.1"
"version": "0.0.0"
},
"components": {
"schemas": {
@@ -37,12 +37,12 @@
"/upload/resumable/": {
"post": {
"summary": "Handle POST request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"responses": { "200": { "description": "Default Response" } }
},
"options": {
"summary": "Handle OPTIONS request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"description": "Handle OPTIONS request for TUS Resumable uploads",
"responses": { "200": { "description": "Default Response" } }
}
@@ -50,22 +50,68 @@
"/upload/resumable/{wildcard}": {
"post": {
"summary": "Handle POST request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"responses": { "200": { "description": "Default Response" } }
},
"put": {
"summary": "Handle PUT request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"responses": { "200": { "description": "Default Response" } }
},
"patch": {
"summary": "Handle PATCH request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"responses": { "200": { "description": "Default Response" } }
},
"delete": {
"summary": "Handle DELETE request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": { "200": { "description": "Default Response" } }
},
"options": {
"summary": "Handle OPTIONS request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"description": "Handle OPTIONS request for TUS Resumable uploads",
"responses": { "200": { "description": "Default Response" } }
}
},
"/upload/resumable/sign/": {
"post": {
"summary": "Handle POST request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": { "200": { "description": "Default Response" } }
},
"options": {
"summary": "Handle OPTIONS request for TUS Resumable uploads",
"tags": ["resumable"],
"description": "Handle OPTIONS request for TUS Resumable uploads",
"responses": { "200": { "description": "Default Response" } }
}
},
"/upload/resumable/sign/{wildcard}": {
"post": {
"summary": "Handle POST request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": { "200": { "description": "Default Response" } }
},
"put": {
"summary": "Handle PUT request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": { "200": { "description": "Default Response" } }
},
"patch": {
"summary": "Handle PATCH request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": { "200": { "description": "Default Response" } }
},
"delete": {
"summary": "Handle DELETE request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": { "200": { "description": "Default Response" } }
},
"options": {
"summary": "Handle OPTIONS request for TUS Resumable uploads",
"tags": ["resumable"],
"description": "Handle OPTIONS request for TUS Resumable uploads",
"responses": { "200": { "description": "Default Response" } }
}
@@ -486,8 +532,8 @@
},
"get": {
"summary": "Get object",
"tags": ["deprecated"],
"description": "use GET /object/authenticated/{bucketName} instead",
"tags": ["object"],
"description": "Serve objects",
"parameters": [
{
"schema": { "type": "string" },
@@ -502,13 +548,6 @@
"in": "path",
"name": "*",
"required": true
},
{
"schema": { "type": "string" },
"example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs",
"in": "header",
"name": "authorization",
"required": true
}
],
"responses": {
@@ -692,6 +731,12 @@
{ "type": "null" }
]
},
"user_metadata": {
"anyOf": [
{ "type": "object", "additionalProperties": true },
{ "type": "null" }
]
},
"buckets": {
"type": "object",
"properties": {
@@ -834,7 +879,8 @@
"examples": [
"/object/sign/upload/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
]
}
},
"token": { "type": "string" }
},
"required": ["url"]
}
@@ -1128,6 +1174,7 @@
"properties": {
"bucketId": { "type": "string", "examples": ["avatars"] },
"sourceKey": { "type": "string", "examples": ["folder/cat.png"] },
"destinationBucket": { "type": "string", "examples": ["users"] },
"destinationKey": { "type": "string", "examples": ["folder/newcat.png"] }
},
"required": ["bucketId", "sourceKey", "destinationKey"]
@@ -1240,6 +1287,12 @@
{ "type": "null" }
]
},
"user_metadata": {
"anyOf": [
{ "type": "object", "additionalProperties": true },
{ "type": "null" }
]
},
"buckets": {
"type": "object",
"properties": {
@@ -1343,8 +1396,8 @@
"/object/info/{bucketName}/{wildcard}": {
"get": {
"summary": "Retrieve object info",
"tags": ["deprecated"],
"description": "use HEAD /object/authenticated/{bucketName} instead",
"tags": ["object"],
"description": "Object Info",
"parameters": [
{
"schema": { "type": "string" },
@@ -1359,13 +1412,6 @@
"in": "path",
"name": "*",
"required": true
},
{
"schema": { "type": "string" },
"example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs",
"in": "header",
"name": "authorization",
"required": true
}
],
"responses": {
@@ -1388,9 +1434,18 @@
"schema": {
"type": "object",
"properties": {
"sourceKey": { "type": "string", "examples": ["folder/source.png"] },
"bucketId": { "type": "string", "examples": ["avatars"] },
"destinationKey": { "type": "string", "examples": ["folder/destination.png"] }
"sourceKey": { "type": "string", "examples": ["folder/source.png"] },
"destinationBucket": { "type": "string", "examples": ["users"] },
"destinationKey": { "type": "string", "examples": ["folder/destination.png"] },
"metadata": {
"type": "object",
"properties": {
"cacheControl": { "type": "string" },
"mimetype": { "type": "string" }
}
},
"copyMetadata": { "type": "boolean", "examples": [true] }
},
"required": ["sourceKey", "bucketId", "destinationKey"]
}
@@ -1416,7 +1471,59 @@
"description": "Successful response",
"type": "object",
"properties": {
"Key": { "type": "string", "examples": ["folder/destination.png"] }
"Id": { "type": "string" },
"Key": { "type": "string", "examples": ["folder/destination.png"] },
"name": { "type": "string" },
"bucket_id": { "type": "string" },
"owner": { "type": "string" },
"owner_id": { "type": "string" },
"version": { "type": "string" },
"id": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
"updated_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
"created_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
"last_accessed_at": { "anyOf": [{ "type": "string" }, { "type": "null" }] },
"metadata": {
"anyOf": [
{ "type": "object", "additionalProperties": true },
{ "type": "null" }
]
},
"user_metadata": {
"anyOf": [
{ "type": "object", "additionalProperties": true },
{ "type": "null" }
]
},
"buckets": {
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"owner": { "type": "string" },
"public": { "type": "boolean" },
"file_size_limit": { "type": ["null", "integer"] },
"allowed_mime_types": {
"type": ["null", "array"],
"items": { "type": "string" }
},
"created_at": { "type": "string" },
"updated_at": { "type": "string" }
},
"required": ["id", "name"],
"additionalProperties": false,
"examples": [
{
"id": "bucket2",
"name": "bucket2",
"public": false,
"file_size_limit": 1000000,
"allowed_mime_types": ["image/png", "image/jpeg"],
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
"created_at": "2021-02-17T04:43:32.770206+00:00",
"updated_at": "2021-02-17T04:43:32.770206+00:00"
}
]
}
},
"required": ["Key"]
}
@@ -1500,7 +1607,7 @@
"/render/image/authenticated/{bucketName}/{wildcard}": {
"get": {
"summary": "Render an authenticated image with the given transformations",
"tags": ["object"],
"tags": ["transformation"],
"parameters": [
{
"schema": { "type": "integer", "minimum": 0 },
@@ -1571,7 +1678,7 @@
"/render/image/sign/{bucketName}/{wildcard}": {
"get": {
"summary": "Render an authenticated image with the given transformations",
"tags": ["object"],
"tags": ["transformation"],
"parameters": [
{
"schema": { "type": "string" },
@@ -1617,7 +1724,7 @@
"/render/image/public/{bucketName}/{wildcard}": {
"get": {
"summary": "Render a public image with the given transformations",
"tags": ["object"],
"tags": ["transformation"],
"parameters": [
{
"schema": { "type": "integer", "minimum": 0 },
@@ -1684,11 +1791,40 @@
}
}
}
},
"/s3/{Bucket}/{wildcard}": {
"put": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } },
"post": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } },
"delete": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } },
"get": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } }
},
"/s3/{Bucket}": {
"delete": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } },
"put": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } },
"post": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } },
"get": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } }
},
"/s3/{Bucket}/": {
"delete": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } },
"put": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } },
"post": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } },
"get": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } }
},
"/s3/": {
"get": { "tags": ["s3"], "responses": { "200": { "description": "Default Response" } } }
},
"/health/": {
"get": {
"summary": "healthcheck",
"responses": { "200": { "description": "Default Response" } }
}
}
},
"tags": [
{ "name": "object", "description": "Object end-points" },
{ "name": "bucket", "description": "Bucket end-points" },
{ "name": "deprecated", "description": "Deprecated end-points" }
{ "name": "s3", "description": "S3 end-points" },
{ "name": "transformation", "description": "Image transformation" },
{ "name": "resumable", "description": "Resumable Upload end-points" }
]
}
@@ -605,20 +605,11 @@
"format": "uri",
"description": "Template URL used to create the project from the CLI.",
"example": "https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone"
},
"release_channel": {
"type": "string",
"enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"],
"description": "Release channel. If not provided, GA will be used."
},
"postgres_engine": {
"type": "string",
"enum": ["15", "17-oriole"],
"description": "Postgres engine version. If not provided, the latest version will be used."
}
},
"required": ["db_pass", "name", "organization_id", "region"],
"additionalProperties": false
"additionalProperties": false,
"hideDefinitions": ["release_channel", "postgres_engine"]
}
}
}
@@ -8285,18 +8276,8 @@
"application/json": {
"schema": {
"type": "object",
"properties": {
"release_channel": {
"type": "string",
"enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"],
"description": "Release channel version. If not provided, GeneralAvailability will be used."
},
"postgres_engine": {
"type": "string",
"enum": ["15", "17-oriole"],
"description": "Postgres engine version. If not provided, the latest version from the given release channel will be used."
}
}
"properties": {},
"hideDefinitions": ["release_channel", "postgres_engine"]
}
}
}
@@ -8581,7 +8562,25 @@
"type": "array",
"items": {
"type": "object",
"properties": {},
"properties": {
"name": {
"type": "string"
},
"schemas": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"additionalProperties": true
}
}
},
"required": ["name", "schemas"],
"additionalProperties": true
}
}
@@ -8908,6 +8907,160 @@
]
}
},
"/v1/projects/{ref}/functions/deploy": {
"post": {
"operationId": "v1-deploy-a-function",
"summary": "Deploy a function",
"description": "A new endpoint to deploy functions. It will create if function does not exist.",
"parameters": [
{
"name": "ref",
"required": true,
"in": "path",
"description": "Project ref",
"schema": {
"minLength": 20,
"maxLength": 20,
"type": "string"
}
},
{
"name": "slug",
"required": false,
"in": "query",
"schema": {
"pattern": "/^[A-Za-z0-9_-]+$/",
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "array",
"items": {
"type": "file",
"items": {
"type": "string",
"format": "binary"
}
}
},
"metadata": {
"type": "object",
"properties": {
"entrypoint_path": {
"required": true,
"type": "string"
},
"import_map_path": {
"required": false,
"type": "string"
},
"static_patterns": {
"required": false,
"type": "array",
"items": {
"type": "string"
}
},
"verify_jwt": {
"required": false,
"type": "boolean"
},
"name": {
"required": false,
"type": "string"
}
}
}
},
"required": ["file", "metadata"]
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"version": {
"type": "integer"
},
"created_at": {
"type": "integer",
"format": "int64"
},
"updated_at": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"enum": ["ACTIVE", "REMOVED", "THROTTLED"],
"type": "string"
},
"verify_jwt": {
"type": "boolean"
},
"import_map": {
"type": "boolean"
},
"entrypoint_path": {
"type": "string"
},
"import_map_path": {
"type": "string"
},
"compute_multiplier": {
"type": "number"
}
},
"required": [
"version",
"created_at",
"updated_at",
"id",
"slug",
"name",
"status"
]
}
}
}
},
"403": {
"description": ""
},
"500": {
"description": "Failed to deploy function"
}
},
"tags": ["Edge Functions"],
"security": [
{
"bearer": []
}
]
}
},
"/v1/projects/{ref}/functions/{function_slug}": {
"get": {
"operationId": "v1-get-a-function",
@@ -10832,20 +10985,11 @@
"format": "uri",
"description": "Template URL used to create the project from the CLI.",
"example": "https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone"
},
"release_channel": {
"type": "string",
"enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"],
"description": "Release channel. If not provided, GA will be used."
},
"postgres_engine": {
"type": "string",
"enum": ["15", "17-oriole"],
"description": "Postgres engine version. If not provided, the latest version will be used."
}
},
"required": ["db_pass", "name", "organization_id", "region"],
"additionalProperties": false
"additionalProperties": false,
"hideDefinitions": ["release_channel", "postgres_engine"]
},
"V1ProjectResponse": {
"type": "object",
@@ -14410,18 +14554,8 @@
},
"RestoreProjectBodyDto": {
"type": "object",
"properties": {
"release_channel": {
"type": "string",
"enum": ["internal", "alpha", "beta", "ga", "withdrawn", "preview"],
"description": "Release channel version. If not provided, GeneralAvailability will be used."
},
"postgres_engine": {
"type": "string",
"enum": ["15", "17-oriole"],
"description": "Postgres engine version. If not provided, the latest version from the given release channel will be used."
}
}
"properties": {},
"hideDefinitions": ["release_channel", "postgres_engine"]
},
"V1AnalyticsResponse": {
"type": "object",
@@ -14492,7 +14626,25 @@
"type": "array",
"items": {
"type": "object",
"properties": {},
"properties": {
"name": {
"type": "string"
},
"schemas": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"additionalProperties": true
}
}
},
"required": ["name", "schemas"],
"additionalProperties": true
}
}
@@ -14568,6 +14720,50 @@
},
"required": ["slug", "name", "body"]
},
"FunctionDeployBody": {
"type": "object",
"properties": {
"file": {
"type": "array",
"items": {
"type": "file",
"items": {
"type": "string",
"format": "binary"
}
}
},
"metadata": {
"type": "object",
"properties": {
"entrypoint_path": {
"required": true,
"type": "string"
},
"import_map_path": {
"required": false,
"type": "string"
},
"static_patterns": {
"required": false,
"type": "array",
"items": {
"type": "string"
}
},
"verify_jwt": {
"required": false,
"type": "boolean"
},
"name": {
"required": false,
"type": "string"
}
}
}
},
"required": ["file", "metadata"]
},
"FunctionSlugResponse": {
"type": "object",
"properties": {
@@ -1,6 +1,4 @@
{
"produces": ["application/json"],
"schemes": ["http", "https"],
"swagger": "2.0",
"info": {
"description": "Documentation of the gotrue API.",
@@ -9,6 +7,8 @@
},
"host": "localhost:9999",
"basePath": "/",
"schemes": ["http", "https"],
"produces": ["application/json"],
"paths": {
"/admin/generate_link": {
"post": {
@@ -3,41 +3,30 @@
"info": {
"title": "Supabase Storage API",
"description": "API documentation for Supabase Storage",
"version": "0.0.1"
"version": "0.0.0"
},
"components": {
"schemas": {
"def-0": {
"type": "object",
"properties": {
"authorization": {
"type": "string",
"examples": [
"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs"
]
}
},
"required": ["authorization"],
"title": "authSchema"
},
"def-1": {
"type": "object",
"properties": {
"statusCode": {
"type": "string"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
"tags": [
{
"name": "object",
"description": "Object end-points"
},
{
"name": "bucket",
"description": "Bucket end-points"
},
{
"name": "s3",
"description": "S3 end-points"
},
{
"name": "transformation",
"description": "Image transformation"
},
{
"name": "resumable",
"description": "Resumable Upload end-points"
}
},
],
"paths": {
"/metrics": {
"get": {
@@ -51,7 +40,7 @@
"/upload/resumable/": {
"post": {
"summary": "Handle POST request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"responses": {
"200": {
"description": "Default Response"
@@ -60,7 +49,7 @@
},
"options": {
"summary": "Handle OPTIONS request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"description": "Handle OPTIONS request for TUS Resumable uploads",
"responses": {
"200": {
@@ -72,7 +61,7 @@
"/upload/resumable/{wildcard}": {
"post": {
"summary": "Handle POST request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"responses": {
"200": {
"description": "Default Response"
@@ -81,7 +70,7 @@
},
"put": {
"summary": "Handle PUT request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"responses": {
"200": {
"description": "Default Response"
@@ -90,7 +79,16 @@
},
"patch": {
"summary": "Handle PATCH request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"delete": {
"summary": "Handle DELETE request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": {
"200": {
"description": "Default Response"
@@ -99,7 +97,76 @@
},
"options": {
"summary": "Handle OPTIONS request for TUS Resumable uploads",
"tags": ["object"],
"tags": ["resumable"],
"description": "Handle OPTIONS request for TUS Resumable uploads",
"responses": {
"200": {
"description": "Default Response"
}
}
}
},
"/upload/resumable/sign/": {
"post": {
"summary": "Handle POST request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"options": {
"summary": "Handle OPTIONS request for TUS Resumable uploads",
"tags": ["resumable"],
"description": "Handle OPTIONS request for TUS Resumable uploads",
"responses": {
"200": {
"description": "Default Response"
}
}
}
},
"/upload/resumable/sign/{wildcard}": {
"post": {
"summary": "Handle POST request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"put": {
"summary": "Handle PUT request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"patch": {
"summary": "Handle PATCH request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"delete": {
"summary": "Handle DELETE request for TUS Resumable uploads",
"tags": ["resumable"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"options": {
"summary": "Handle OPTIONS request for TUS Resumable uploads",
"tags": ["resumable"],
"description": "Handle OPTIONS request for TUS Resumable uploads",
"responses": {
"200": {
@@ -744,8 +811,8 @@
},
"get": {
"summary": "Get object",
"tags": ["deprecated"],
"description": "use GET /object/authenticated/{bucketName} instead",
"tags": ["object"],
"description": "Serve objects",
"parameters": [
{
"schema": {
@@ -764,15 +831,6 @@
"in": "path",
"name": "*",
"required": true
},
{
"schema": {
"type": "string"
},
"example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs",
"in": "header",
"name": "authorization",
"required": true
}
],
"responses": {
@@ -1084,6 +1142,17 @@
}
]
},
"user_metadata": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
]
},
"buckets": {
"type": "object",
"properties": {
@@ -1288,6 +1357,9 @@
"examples": [
"/object/sign/upload/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
]
},
"token": {
"type": "string"
}
},
"required": ["url"]
@@ -1730,6 +1802,10 @@
"type": "string",
"examples": ["folder/cat.png"]
},
"destinationBucket": {
"type": "string",
"examples": ["users"]
},
"destinationKey": {
"type": "string",
"examples": ["folder/newcat.png"]
@@ -1942,6 +2018,17 @@
}
]
},
"user_metadata": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
]
},
"buckets": {
"type": "object",
"properties": {
@@ -2101,8 +2188,8 @@
"/object/info/{bucketName}/{wildcard}": {
"get": {
"summary": "Retrieve object info",
"tags": ["deprecated"],
"description": "use HEAD /object/authenticated/{bucketName} instead",
"tags": ["object"],
"description": "Object Info",
"parameters": [
{
"schema": {
@@ -2121,15 +2208,6 @@
"in": "path",
"name": "*",
"required": true
},
{
"schema": {
"type": "string"
},
"example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs",
"in": "header",
"name": "authorization",
"required": true
}
],
"responses": {
@@ -2169,17 +2247,36 @@
"schema": {
"type": "object",
"properties": {
"sourceKey": {
"type": "string",
"examples": ["folder/source.png"]
},
"bucketId": {
"type": "string",
"examples": ["avatars"]
},
"sourceKey": {
"type": "string",
"examples": ["folder/source.png"]
},
"destinationBucket": {
"type": "string",
"examples": ["users"]
},
"destinationKey": {
"type": "string",
"examples": ["folder/destination.png"]
},
"metadata": {
"type": "object",
"properties": {
"cacheControl": {
"type": "string"
},
"mimetype": {
"type": "string"
}
}
},
"copyMetadata": {
"type": "boolean",
"examples": [true]
}
},
"required": ["sourceKey", "bucketId", "destinationKey"]
@@ -2208,9 +2305,135 @@
"description": "Successful response",
"type": "object",
"properties": {
"Id": {
"type": "string"
},
"Key": {
"type": "string",
"examples": ["folder/destination.png"]
},
"name": {
"type": "string"
},
"bucket_id": {
"type": "string"
},
"owner": {
"type": "string"
},
"owner_id": {
"type": "string"
},
"version": {
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"last_accessed_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
]
},
"user_metadata": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
]
},
"buckets": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"owner": {
"type": "string"
},
"public": {
"type": "boolean"
},
"file_size_limit": {
"type": ["null", "integer"]
},
"allowed_mime_types": {
"type": ["null", "array"],
"items": {
"type": "string"
}
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"required": ["id", "name"],
"additionalProperties": false,
"examples": [
{
"id": "bucket2",
"name": "bucket2",
"public": false,
"file_size_limit": 1000000,
"allowed_mime_types": ["image/png", "image/jpeg"],
"owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
"created_at": "2021-02-17T04:43:32.770206+00:00",
"updated_at": "2021-02-17T04:43:32.770206+00:00"
}
]
}
},
"required": ["Key"]
@@ -2352,7 +2575,7 @@
"/render/image/authenticated/{bucketName}/{wildcard}": {
"get": {
"summary": "Render an authenticated image with the given transformations",
"tags": ["object"],
"tags": ["transformation"],
"parameters": [
{
"schema": {
@@ -2461,7 +2684,7 @@
"/render/image/sign/{bucketName}/{wildcard}": {
"get": {
"summary": "Render an authenticated image with the given transformations",
"tags": ["object"],
"tags": ["transformation"],
"parameters": [
{
"schema": {
@@ -2531,7 +2754,7 @@
"/render/image/public/{bucketName}/{wildcard}": {
"get": {
"summary": "Render a public image with the given transformations",
"tags": ["object"],
"tags": ["transformation"],
"parameters": [
{
"schema": {
@@ -2636,20 +2859,161 @@
}
}
}
},
"/s3/{Bucket}/{wildcard}": {
"put": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"post": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"delete": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"get": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
}
},
"/s3/{Bucket}": {
"delete": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"put": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"post": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"get": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
}
},
"/s3/{Bucket}/": {
"delete": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"put": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"post": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
},
"get": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
}
},
"/s3/": {
"get": {
"tags": ["s3"],
"responses": {
"200": {
"description": "Default Response"
}
}
}
},
"/health/": {
"get": {
"summary": "healthcheck",
"responses": {
"200": {
"description": "Default Response"
}
}
}
}
},
"tags": [
{
"name": "object",
"description": "Object end-points"
},
{
"name": "bucket",
"description": "Bucket end-points"
},
{
"name": "deprecated",
"description": "Deprecated end-points"
"components": {
"schemas": {
"def-0": {
"type": "object",
"properties": {
"authorization": {
"type": "string",
"examples": [
"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs"
]
}
},
"required": ["authorization"],
"title": "authSchema"
},
"def-1": {
"type": "object",
"properties": {
"statusCode": {
"type": "string"
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
]
}
}
+1
View File
@@ -27,6 +27,7 @@
"@types/lodash": "^4.14.202",
"json-stringify-safe": "^5.0.1",
"lodash": "^4.17.21",
"tsconfig": "workspace:*",
"tsx": "^4.7.0"
}
}
+3
View File
@@ -1449,6 +1449,9 @@ importers:
lodash:
specifier: ^4.17.21
version: 4.17.21
tsconfig:
specifier: workspace:*
version: link:../tsconfig
tsx:
specifier: ^4.7.0
version: 4.7.0