moves the generator into the spec folder - keep the repo tidier

This commit is contained in:
Copple committed 2022-09-07 15:05:44 +02:00
1 parent 11b7f06690
commit d45db3271e
48 files changed
+99412 -113584

No files matched your search

@@ -1,24 +0,0 @@
type params = { name: string; description: string; tabs: string; note: string; }
const Example = ({name, description = '', tabs = '', note = ''}: params) => {
if (note !== '') {
const [noteTitle, ...noteText] = note.split('\n');
console.log(noteText);
note = `
:::note ${noteTitle}
${noteText.join('\n')}
:::
`;
}
return `
### ${name}
${description}
${tabs}
${note}
`.trim()
}
export default Example
+42 -24
View File
@@ -2,32 +2,10 @@ REPO_DIR=$(shell pwd)
run: download transform format
# Format everything - easier for git to track changes
format:
npx prettier --write .
# Transform docs into working files
transform:
npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/api_v0_openapi_deparsed.json $(REPO_DIR)/api_v0_openapi.json
npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/storage_v0_openapi_deparsed.json $(REPO_DIR)/storage_v0_openapi.json
cd $(REPO_DIR)/../packages/generator && npm run tsdoc:dereference:functions
cd $(REPO_DIR)/../packages/generator && npm run tsdoc:dereference:gotrue
cd $(REPO_DIR)/../packages/generator && npm run tsdoc:dereference:postgrest
cd $(REPO_DIR)/../packages/generator && npm run tsdoc:dereference:realtime
cd $(REPO_DIR)/../packages/generator && npm run tsdoc:dereference:storage
cd $(REPO_DIR)/../packages/generator && npm run tsdoc:dereference:supabase
jq -s '{ name: "Combined Specs", children: [.[0], .[1], .[2], .[3], .[4], .[5]] }' \
$(REPO_DIR)/enrichments/tsdoc_v2/supabase_dereferenced.json \
$(REPO_DIR)/enrichments/tsdoc_v2/gotrue_dereferenced.json \
$(REPO_DIR)/enrichments/tsdoc_v2/postgrest_dereferenced.json \
$(REPO_DIR)/enrichments/tsdoc_v2/realtime_dereferenced.json \
$(REPO_DIR)/enrichments/tsdoc_v2/storage_dereferenced.json \
$(REPO_DIR)/enrichments/tsdoc_v2/functions_dereferenced.json \
> $(REPO_DIR)/enrichments/tsdoc_v2/combined.json
###############################################################################
# Download all the specs
###############################################################################
download: download.api.v1 download.storage.v1 download.tsdoc.v1
download.api.v1:
@@ -52,3 +30,43 @@ download.tsdoc.v1:
$(REPO_DIR)/enrichments/tsdoc_v1/storage.json \
$(REPO_DIR)/enrichments/tsdoc_v1/functions.json \
> $(REPO_DIR)/enrichments/tsdoc_v1/combined.json
###############################################################################
# Transform docs into working files
###############################################################################
transform: dereference.api.v0 dereference.storage.v0 dereference.tsdoc combine.tsdoc
dereference.api.v0:
npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/api_v0_openapi_deparsed.json $(REPO_DIR)/api_v0_openapi.json
dereference.storage.v0:
npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/storage_v0_openapi_deparsed.json $(REPO_DIR)/storage_v0_openapi.json
dereference.tsdoc:
cd $(REPO_DIR)/generator && npm run tsdoc:dereference:functions
cd $(REPO_DIR)/generator && npm run tsdoc:dereference:gotrue
cd $(REPO_DIR)/generator && npm run tsdoc:dereference:postgrest
cd $(REPO_DIR)/generator && npm run tsdoc:dereference:realtime
cd $(REPO_DIR)/generator && npm run tsdoc:dereference:storage
cd $(REPO_DIR)/generator && npm run tsdoc:dereference:supabase
combine.tsdoc:
jq -s '{ name: "Combined Specs", children: [.[0], .[1], .[2], .[3], .[4], .[5]] }' \
$(REPO_DIR)/enrichments/tsdoc_v2/supabase_dereferenced.json \
$(REPO_DIR)/enrichments/tsdoc_v2/gotrue_dereferenced.json \
$(REPO_DIR)/enrichments/tsdoc_v2/postgrest_dereferenced.json \
$(REPO_DIR)/enrichments/tsdoc_v2/realtime_dereferenced.json \
$(REPO_DIR)/enrichments/tsdoc_v2/storage_dereferenced.json \
$(REPO_DIR)/enrichments/tsdoc_v2/functions_dereferenced.json \
> $(REPO_DIR)/enrichments/tsdoc_v2/combined.json
###############################################################################
# Format everything - easier for git to track changes
###############################################################################
format:
npx prettier --write .
###############################################################################
# Generate the docs
###############################################################################
+23 -14
View File
@@ -121,10 +121,11 @@
}
}
},
"403": { "description": "" },
"500": { "description": "Failed to retrieve project's functions" }
},
"tags": ["projects"],
"security": [{ "bearer": [] }]
"security": [{ "apiKeyHeader": [], "apiKeyParam": [] }, { "bearer": [] }]
},
"post": {
"operationId": "createFunction",
@@ -152,10 +153,11 @@
"application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } }
}
},
"403": { "description": "" },
"500": { "description": "Failed to create project's function" }
},
"tags": ["projects"],
"security": [{ "bearer": [] }]
"security": [{ "apiKeyHeader": [], "apiKeyParam": [] }, { "bearer": [] }]
}
},
"/v1/projects/{ref}/functions/{function_slug}": {
@@ -182,7 +184,7 @@
"required": true,
"in": "path",
"description": "Function slug",
"schema": { "pattern": {}, "type": "string" }
"schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" }
}
],
"responses": {
@@ -194,10 +196,11 @@
}
}
},
"403": { "description": "" },
"500": { "description": "Failed to retrieve function with given slug" }
},
"tags": ["projects"],
"security": [{ "bearer": [] }]
"security": [{ "apiKeyHeader": [], "apiKeyParam": [] }, { "bearer": [] }]
},
"patch": {
"operationId": "UpdateFunction",
@@ -216,7 +219,7 @@
"required": true,
"in": "path",
"description": "Function slug",
"schema": { "pattern": {}, "type": "string" }
"schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" }
}
],
"requestBody": {
@@ -232,10 +235,11 @@
"application/json": { "schema": { "$ref": "#/components/schemas/FunctionResponse" } }
}
},
"403": { "description": "" },
"500": { "description": "Failed to update function with given slug" }
},
"tags": ["projects"],
"security": [{ "bearer": [] }]
"security": [{ "apiKeyHeader": [], "apiKeyParam": [] }, { "bearer": [] }]
},
"delete": {
"operationId": "deleteFunction",
@@ -254,15 +258,16 @@
"required": true,
"in": "path",
"description": "Function slug",
"schema": { "pattern": {}, "type": "string" }
"schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" }
}
],
"responses": {
"200": { "description": "" },
"403": { "description": "" },
"500": { "description": "Failed to delete function with given slug" }
},
"tags": ["projects"],
"security": [{ "bearer": [] }]
"security": [{ "apiKeyHeader": [], "apiKeyParam": [] }, { "bearer": [] }]
}
},
"/v1/projects/{ref}/secrets": {
@@ -291,10 +296,11 @@
}
}
},
"403": { "description": "" },
"500": { "description": "Failed to retrieve project's secrets" }
},
"tags": ["projects"],
"security": [{ "bearer": [] }]
"security": [{ "apiKeyHeader": [], "apiKeyParam": [] }, { "bearer": [] }]
},
"post": {
"operationId": "createSecrets",
@@ -322,10 +328,11 @@
},
"responses": {
"201": { "description": "" },
"403": { "description": "" },
"500": { "description": "Failed to create project's secrets" }
},
"tags": ["projects"],
"security": [{ "bearer": [] }]
"security": [{ "apiKeyHeader": [], "apiKeyParam": [] }, { "bearer": [] }]
},
"delete": {
"operationId": "deleteSecrets",
@@ -351,10 +358,11 @@
"description": "",
"content": { "application/json": { "schema": { "type": "object" } } }
},
"403": { "description": "" },
"500": { "description": "Failed to delete secrets with given names" }
},
"tags": ["projects"],
"security": [{ "bearer": [] }]
"security": [{ "apiKeyHeader": [], "apiKeyParam": [] }, { "bearer": [] }]
}
},
"/v1/projects/{ref}/pgsodium": {
@@ -457,7 +465,8 @@
"ap-south-1",
"sa-east-1"
]
}
},
"kps_enabled": { "type": "boolean" }
},
"required": ["db_pass", "name", "organization_id", "plan", "region"]
},
@@ -488,7 +497,7 @@
"CreateFunctionBody": {
"type": "object",
"properties": {
"slug": { "type": "string", "pattern": {} },
"slug": { "type": "string", "pattern": "/^[A-Za-z0-9_-]+$/" },
"name": { "type": "string" },
"body": { "type": "string" },
"verify_jwt": { "type": "boolean" }
@@ -527,7 +536,7 @@
"type": "object",
"properties": {
"name": { "type": "string" },
"value": { "type": "string", "pattern": {} }
"value": { "type": "string", "pattern": "/^(?!SUPABASE_).*/" }
},
"required": ["name", "value"]
},
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
@@ -257,10 +257,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
49,
48
]
"children": [49, 48]
}
]
}
@@ -636,10 +633,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
41,
37
]
"children": [41, 37]
}
],
"sources": [
@@ -730,26 +724,17 @@
{
"title": "Constructors",
"kind": 512,
"children": [
43
]
"children": [43]
},
{
"title": "Properties",
"kind": 1024,
"children": [
56,
55,
54
]
"children": [56, 55, 54]
},
{
"title": "Methods",
"kind": 2048,
"children": [
64,
61
]
"children": [64, 61]
}
],
"sources": [
@@ -765,20 +750,12 @@
{
"title": "References",
"kind": 16777216,
"children": [
69,
70,
71,
72,
73
]
"children": [69, 70, 71, 72, 73]
},
{
"title": "Classes",
"kind": 128,
"children": [
42
]
"children": [42]
}
],
"sources": [
@@ -900,16 +877,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [
14
]
"children": [14]
},
{
"title": "Properties",
"kind": 1024,
"children": [
19
]
"children": [19]
}
],
"sources": [
@@ -1031,16 +1004,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [
21
]
"children": [21]
},
{
"title": "Properties",
"kind": 1024,
"children": [
24
]
"children": [24]
}
],
"sources": [
@@ -1144,16 +1113,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [
31
]
"children": [31]
},
{
"title": "Properties",
"kind": 1024,
"children": [
34
]
"children": [34]
}
],
"sources": [
@@ -1257,16 +1222,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [
26
]
"children": [26]
},
{
"title": "Properties",
"kind": 1024,
"children": [
29
]
"children": [29]
}
],
"sources": [
@@ -1332,10 +1293,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
9,
10
]
"children": [9, 10]
}
],
"sources": [
@@ -1398,10 +1356,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
5,
6
]
"children": [5, 6]
}
],
"sources": [
@@ -1613,10 +1568,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
41,
37
]
"children": [41, 37]
}
],
"sources": [
@@ -1679,29 +1631,17 @@
{
"title": "Classes",
"kind": 128,
"children": [
13,
20,
30,
25
]
"children": [13, 20, 30, 25]
},
{
"title": "Interfaces",
"kind": 256,
"children": [
8,
4
]
"children": [8, 4]
},
{
"title": "Type Aliases",
"kind": 4194304,
"children": [
3,
35,
11
]
"children": [3, 35, 11]
}
],
"sources": [
@@ -1717,10 +1657,7 @@
{
"title": "Modules",
"kind": 2,
"children": [
1,
2
]
"children": [1, 2]
}
]
}
}
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
@@ -75,32 +75,17 @@
{
"title": "Constructors",
"kind": 512,
"children": [
482
]
"children": [482]
},
{
"title": "Properties",
"kind": 1024,
"children": [
498,
490,
493,
488,
486,
489,
491,
492,
487
]
"children": [498, 490, 493, 488, 486, 489, 491, 492, 487]
},
{
"title": "Methods",
"kind": 2048,
"children": [
501,
499
]
"children": [501, 499]
}
],
"sources": [
@@ -733,32 +718,17 @@
{
"title": "Constructors",
"kind": 512,
"children": [
482
]
"children": [482]
},
{
"title": "Properties",
"kind": 1024,
"children": [
498,
490,
493,
488,
486,
489,
491,
492,
487
]
"children": [498, 490, 493, 488, 486, 489, 491, 492, 487]
},
{
"title": "Methods",
"kind": 2048,
"children": [
501,
499
]
"children": [501, 499]
}
],
"sources": [
@@ -1112,11 +1082,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
12,
10,
11
]
"children": [12, 10, 11]
}
]
}
@@ -1601,11 +1567,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
41,
40,
42
]
"children": [41, 40, 42]
}
]
}
@@ -1718,27 +1680,17 @@
{
"title": "Constructors",
"kind": 512,
"children": [
2
]
"children": [2]
},
{
"title": "Properties",
"kind": 1024,
"children": [
20,
18,
19,
17
]
"children": [20, 18, 19, 17]
},
{
"title": "Methods",
"kind": 2048,
"children": [
25,
32
]
"children": [25, 32]
}
],
"sources": [
@@ -2584,32 +2536,17 @@
{
"title": "Constructors",
"kind": 512,
"children": [
482
]
"children": [482]
},
{
"title": "Properties",
"kind": 1024,
"children": [
498,
490,
493,
488,
486,
489,
491,
492,
487
]
"children": [498, 490, 493, 488, 486, 489, 491, 492, 487]
},
{
"title": "Methods",
"kind": 2048,
"children": [
501,
499
]
"children": [501, 499]
}
],
"sources": [
@@ -3830,13 +3767,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
358,
361,
360,
359,
362
]
"children": [358, 361, 360, 359, 362]
}
]
}
@@ -5216,9 +5147,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
335
]
"children": [335]
}
]
}
@@ -6142,9 +6071,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
132
]
"children": [132]
}
]
}
@@ -6307,11 +6234,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
320,
322,
321
]
"children": [320, 322, 321]
}
]
}
@@ -6439,11 +6362,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
327,
329,
328
]
"children": [327, 329, 328]
}
]
}
@@ -6745,9 +6664,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
342
]
"children": [342]
}
]
}
@@ -7792,10 +7709,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
284,
285
]
"children": [284, 285]
}
]
}
@@ -7924,10 +7838,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
291,
292
]
"children": [291, 292]
}
]
}
@@ -8257,64 +8168,19 @@
{
"title": "Constructors",
"kind": 512,
"children": [
112
]
"children": [112]
},
{
"title": "Properties",
"kind": 1024,
"children": [
375,
367,
370,
365,
363,
366,
368,
369,
364
]
"children": [375, 367, 370, 365, 363, 366, 368, 369, 364]
},
{
"title": "Methods",
"kind": 2048,
"children": [
343,
221,
213,
350,
133,
354,
293,
352,
149,
157,
189,
205,
197,
181,
330,
165,
173,
303,
348,
141,
117,
127,
314,
269,
336,
261,
237,
245,
229,
253,
309,
346,
277,
378,
376
343, 221, 213, 350, 133, 354, 293, 352, 149, 157, 189, 205, 197, 181, 330, 165, 173,
303, 348, 141, 117, 127, 314, 269, 336, 261, 237, 245, 229, 253, 309, 346, 277, 378, 376
]
}
],
@@ -8582,11 +8448,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
55,
53,
54
]
"children": [55, 53, 54]
}
]
}
@@ -8882,10 +8744,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
108,
109
]
"children": [108, 109]
}
]
}
@@ -9075,10 +8934,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
84,
85
]
"children": [84, 85]
}
]
}
@@ -9296,10 +9152,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
77,
76
]
"children": [77, 76]
}
]
}
@@ -9478,10 +9331,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
102,
103
]
"children": [102, 103]
}
]
}
@@ -9717,12 +9567,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
93,
94,
92,
95
]
"children": [93, 94, 92, 95]
}
]
}
@@ -9761,31 +9606,17 @@
{
"title": "Constructors",
"kind": 512,
"children": [
47
]
"children": [47]
},
{
"title": "Properties",
"kind": 1024,
"children": [
64,
61,
62,
63,
60
]
"children": [64, 61, 62, 63, 60]
},
{
"title": "Methods",
"kind": 2048,
"children": [
104,
78,
69,
96,
86
]
"children": [104, 78, 69, 96, 86]
}
],
"sources": [
@@ -10523,32 +10354,17 @@
{
"title": "Constructors",
"kind": 512,
"children": [
482
]
"children": [482]
},
{
"title": "Properties",
"kind": 1024,
"children": [
498,
490,
493,
488,
486,
489,
491,
492,
487
]
"children": [498, 490, 493, 488, 486, 489, 491, 492, 487]
},
{
"title": "Methods",
"kind": 2048,
"children": [
501,
499
]
"children": [501, 499]
}
],
"sources": [
@@ -11202,13 +11018,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
447,
450,
449,
448,
451
]
"children": [447, 450, 449, 448, 451]
}
]
}
@@ -11389,9 +11199,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
424
]
"children": [424]
}
]
}
@@ -11600,11 +11408,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
409,
411,
410
]
"children": [409, 411, 410]
}
]
}
@@ -11727,11 +11531,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
416,
418,
417
]
"children": [416, 418, 417]
}
]
}
@@ -11854,9 +11654,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
431
]
"children": [431]
}
]
}
@@ -12352,42 +12150,17 @@
{
"title": "Constructors",
"kind": 512,
"children": [
393
]
"children": [393]
},
{
"title": "Properties",
"kind": 1024,
"children": [
464,
456,
459,
454,
452,
455,
457,
458,
453
]
"children": [464, 456, 459, 454, 452, 455, 457, 458, 453]
},
{
"title": "Methods",
"kind": 2048,
"children": [
432,
439,
443,
441,
419,
437,
403,
425,
398,
435,
467,
465
]
"children": [432, 439, 443, 441, 419, 437, 403, 425, 398, 435, 467, 465]
}
],
"sources": [
@@ -12554,12 +12327,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
525,
523,
524,
522
]
"children": [525, 523, 524, 522]
}
],
"sources": [
@@ -12707,23 +12475,12 @@
{
"title": "Classes",
"kind": 128,
"children": [
481,
1,
111,
46,
392
]
"children": [481, 1, 111, 46, 392]
},
{
"title": "Type Aliases",
"kind": 4194304,
"children": [
520,
518,
514,
516
]
"children": [520, 518, 514, 516]
}
],
"sources": [
@@ -12733,4 +12490,4 @@
"character": 0
}
]
}
}
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
@@ -190,11 +190,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
391,
390,
392
]
"children": [391, 390, 392]
}
]
}
@@ -207,23 +203,17 @@
{
"title": "Constructors",
"kind": 512,
"children": [
382
]
"children": [382]
},
{
"title": "Properties",
"kind": 1024,
"children": [
386
]
"children": [386]
},
{
"title": "Methods",
"kind": 2048,
"children": [
387
]
"children": [387]
}
],
"sources": [
@@ -492,9 +482,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
297
]
"children": [297]
}
]
}
@@ -571,10 +559,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
299,
300
]
"children": [299, 300]
}
]
}
@@ -630,10 +615,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
302,
303
]
"children": [302, 303]
}
]
}
@@ -757,9 +739,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
335
]
"children": [335]
}
]
}
@@ -788,10 +768,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
333,
336
]
"children": [333, 336]
}
]
}
@@ -847,10 +824,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
338,
339
]
"children": [338, 339]
}
]
}
@@ -974,9 +948,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
324
]
"children": [324]
}
]
}
@@ -1005,10 +977,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
322,
325
]
"children": [322, 325]
}
]
}
@@ -1064,10 +1033,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
327,
328
]
"children": [327, 328]
}
]
}
@@ -1235,10 +1201,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
287,
288
]
"children": [287, 288]
}
]
}
@@ -1294,10 +1257,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
290,
291
]
"children": [290, 291]
}
]
}
@@ -1405,10 +1365,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
278,
279
]
"children": [278, 279]
}
]
}
@@ -1464,10 +1421,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
281,
282
]
"children": [281, 282]
}
]
}
@@ -1571,9 +1525,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
309
]
"children": [309]
}
]
}
@@ -1640,9 +1592,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
313
]
"children": [313]
}
]
}
@@ -1671,10 +1621,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
311,
314
]
"children": [311, 314]
}
]
}
@@ -1730,10 +1677,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
316,
317
]
"children": [316, 317]
}
]
}
@@ -1763,22 +1707,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [
250
]
"children": [250]
},
{
"title": "Methods",
"kind": 2048,
"children": [
292,
329,
318,
262,
283,
275,
304
]
"children": [292, 329, 318, 262, 283, 275, 304]
}
],
"sources": [
@@ -1857,9 +1791,7 @@
{
"title": "Constructors",
"kind": 512,
"children": [
377
]
"children": [377]
}
],
"sources": [
@@ -1982,16 +1914,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [
395
]
"children": [395]
},
{
"title": "Properties",
"kind": 1024,
"children": [
399
]
"children": [399]
}
],
"sources": [
@@ -2129,14 +2057,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
344,
341,
342,
343,
346,
345
]
"children": [344, 341, 342, 343, 346, 345]
}
],
"sources": [
@@ -2184,9 +2105,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
370
]
"children": [370]
}
],
"sources": [
@@ -2384,17 +2303,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
349,
356,
353,
351,
354,
355,
348,
350,
352
]
"children": [349, 356, 353, 351, 354, 355, 348, 350, 352]
}
],
"sources": [
@@ -2486,11 +2395,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
361,
362,
363
]
"children": [361, 362, 363]
}
],
"sources": [
@@ -2531,9 +2436,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
372
]
"children": [372]
}
],
"sources": [
@@ -2649,12 +2552,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
365,
366,
368,
367
]
"children": [365, 366, 368, 367]
}
],
"sources": [
@@ -2717,10 +2615,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
358,
359
]
"children": [358, 359]
}
],
"sources": [
@@ -2782,32 +2677,17 @@
{
"title": "Classes",
"kind": 128,
"children": [
381,
249,
376,
394
]
"children": [381, 249, 376, 394]
},
{
"title": "Interfaces",
"kind": 256,
"children": [
340,
369,
347,
360,
371,
364,
357
]
"children": [340, 369, 347, 360, 371, 364, 357]
},
{
"title": "Functions",
"kind": 64,
"children": [
373
]
"children": [373]
}
],
"sources": [
@@ -3066,9 +2946,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
48
]
"children": [48]
}
]
}
@@ -3145,10 +3023,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
50,
51
]
"children": [50, 51]
}
]
}
@@ -3204,10 +3079,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
53,
54
]
"children": [53, 54]
}
]
}
@@ -3321,9 +3193,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
86
]
"children": [86]
}
]
}
@@ -3352,10 +3222,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
84,
87
]
"children": [84, 87]
}
]
}
@@ -3411,10 +3278,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
89,
90
]
"children": [89, 90]
}
]
}
@@ -3528,9 +3392,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
75
]
"children": [75]
}
]
}
@@ -3559,10 +3421,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
73,
76
]
"children": [73, 76]
}
]
}
@@ -3618,10 +3477,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
78,
79
]
"children": [78, 79]
}
]
}
@@ -3732,10 +3588,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
38,
39
]
"children": [38, 39]
}
]
}
@@ -3791,10 +3644,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
41,
42
]
"children": [41, 42]
}
]
}
@@ -3892,10 +3742,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
29,
30
]
"children": [29, 30]
}
]
}
@@ -3951,10 +3798,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
32,
33
]
"children": [32, 33]
}
]
}
@@ -4048,9 +3892,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
60
]
"children": [60]
}
]
}
@@ -4117,9 +3959,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
64
]
"children": [64]
}
]
}
@@ -4148,10 +3988,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
62,
65
]
"children": [62, 65]
}
]
}
@@ -4207,10 +4044,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
67,
68
]
"children": [67, 68]
}
]
}
@@ -4230,21 +4064,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [
4
]
"children": [4]
},
{
"title": "Methods",
"kind": 2048,
"children": [
43,
80,
69,
34,
26,
55
]
"children": [43, 80, 69, 34, 26, 55]
}
],
"sources": [
@@ -4267,9 +4092,7 @@
{
"title": "Classes",
"kind": 128,
"children": [
3
]
"children": [3]
}
],
"sources": [
@@ -4574,9 +4397,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
176
]
"children": [176]
}
]
}
@@ -4605,10 +4426,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
174,
177
]
"children": [174, 177]
}
]
}
@@ -4664,10 +4482,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
179,
180
]
"children": [179, 180]
}
]
}
@@ -4795,9 +4610,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
188
]
"children": [188]
}
]
}
@@ -4826,10 +4639,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
186,
189
]
"children": [186, 189]
}
]
}
@@ -4885,10 +4695,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
191,
192
]
"children": [191, 192]
}
]
}
@@ -5075,11 +4882,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
200,
201,
202
]
"children": [200, 201, 202]
}
]
}
@@ -5109,10 +4912,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
198,
203
]
"children": [198, 203]
}
]
}
@@ -5168,10 +4968,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
205,
206
]
"children": [205, 206]
}
]
}
@@ -5283,10 +5080,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
211,
212
]
"children": [211, 212]
}
]
}
@@ -5342,10 +5136,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
214,
215
]
"children": [214, 215]
}
]
}
@@ -5453,9 +5244,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
222
]
"children": [222]
}
]
}
@@ -5466,9 +5255,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
220
]
"children": [220]
}
]
}
@@ -5633,12 +5420,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
365,
366,
368,
367
]
"children": [365, 366, 368, 367]
}
],
"sources": [
@@ -5700,9 +5482,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
370
]
"children": [370]
}
],
"sources": [
@@ -5776,10 +5556,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
238,
239
]
"children": [238, 239]
}
]
}
@@ -5835,10 +5612,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
241,
242
]
"children": [241, 242]
}
]
}
@@ -5966,9 +5740,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
164
]
"children": [164]
}
]
}
@@ -5997,10 +5769,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
162,
165
]
"children": [162, 165]
}
]
}
@@ -6056,10 +5825,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
167,
168
]
"children": [167, 168]
}
]
}
@@ -6176,10 +5942,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
227,
228
]
"children": [227, 228]
}
]
}
@@ -6235,10 +5998,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
230,
231
]
"children": [230, 231]
}
]
}
@@ -6465,11 +6225,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
361,
362,
363
]
"children": [361, 362, 363]
}
],
"sources": [
@@ -6543,9 +6299,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
152
]
"children": [152]
}
]
}
@@ -6574,10 +6328,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
150,
153
]
"children": [150, 153]
}
]
}
@@ -6633,10 +6384,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
155,
156
]
"children": [155, 156]
}
]
}
@@ -6863,11 +6611,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
361,
362,
363
]
"children": [361, 362, 363]
}
],
"sources": [
@@ -6941,9 +6685,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
139
]
"children": [139]
}
]
}
@@ -6972,10 +6714,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
137,
140
]
"children": [137, 140]
}
]
}
@@ -7031,10 +6770,7 @@
{
"title": "Properties",
"kind": 1024,
"children": [
142,
143
]
"children": [142, 143]
}
]
}
@@ -7054,25 +6790,12 @@
{
"title": "Constructors",
"kind": 512,
"children": [
93
]
"children": [93]
},
{
"title": "Methods",
"kind": 2048,
"children": [
169,
181,
193,
207,
216,
232,
157,
223,
144,
131
]
"children": [169, 181, 193, 207, 216, 232, 157, 223, 144, 131]
}
],
"sources": [
@@ -7088,9 +6811,7 @@
{
"title": "Classes",
"kind": 128,
"children": [
92
]
"children": [92]
}
],
"sources": [
@@ -7106,11 +6827,7 @@
{
"title": "Modules",
"kind": 2,
"children": [
1,
2,
91
]
"children": [1, 2, 91]
}
]
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -10,10 +10,6 @@ main(argv['_'], argv)
function handleInput(command: string, options: any) {
switch (command) {
case 'validate':
console.log('Not yet implemented')
break
case 'gen':
DocGenerator(options)
break
File renamed without changes.
@@ -6,31 +6,31 @@
"license": "MIT",
"scripts": {
"api:gen": "npm-run-all api:gen:api",
"api:gen:api": "ts-node ./index.ts gen --type api --url https://api.supabase.com --input ../../spec/transforms/api_v0_openapi_deparsed.json --output ../../apps/reference/_api/usage.mdx",
"api:gen:api": "ts-node ./index.ts gen --type api --url https://api.supabase.com --input ../transforms/api_v0_openapi_deparsed.json --output ../../apps/reference/_api/usage.mdx",
"cli:gen": "npm-run-all cli:gen:commands cli:gen:config",
"cli:gen:commands": "ts-node ./index.ts gen --type cli --input ../../spec/cli_v1_commands.yaml --output ../../apps/reference/_cli/generated/usage.mdx ",
"cli:gen:config": "ts-node ./index.ts gen --type config --input ../../spec/cli_v1_config.yaml --output ../../apps/reference/_cli/generated/config.mdx",
"cli:gen:commands": "ts-node ./index.ts gen --type cli --input ../cli_v1_commands.yaml --output ../../apps/reference/_cli/generated/usage.mdx ",
"cli:gen:config": "ts-node ./index.ts gen --type config --input ../cli_v1_config.yaml --output ../../apps/reference/_cli/generated/config.mdx",
"gotrue:gen": "npm-run-all gotrue:gen:config",
"gotrue:gen:config": "ts-node ./index.ts gen --type config --input ../../spec/gotrue_v1_config.yaml --output ../../apps/reference/_gotrue/config.mdx",
"gotrue:gen:config": "ts-node ./index.ts gen --type config --input ../gotrue_v1_config.yaml --output ../../apps/reference/_gotrue/config.mdx",
"storage:gen": "npm-run-all storage:gen:api storage:gen:config",
"storage:gen:api": "ts-node ./index.ts gen --type api --input ../../spec/transforms/storage_v0_openapi_deparsed.json --output ../../apps/reference/_storage/generated/usage.mdx",
"storage:gen:config": "ts-node ./index.ts gen --type config --input ../../spec/storage_v1_config.yaml --output ../../apps/reference/_storage/generated/config.mdx",
"storage:gen:api": "ts-node ./index.ts gen --type api --input ../transforms/storage_v0_openapi_deparsed.json --output ../../apps/reference/_storage/generated/usage.mdx",
"storage:gen:config": "ts-node ./index.ts gen --type config --input ../storage_v1_config.yaml --output ../../apps/reference/_storage/generated/config.mdx",
"supabase-dart:format": "prettier --write ../../apps/reference/_supabase_dart/**/*.mdx",
"supabase-dart:v1": "npm-run-all supabase-dart:v1:ref supabase-dart:v1:olddocs supabase-dart:format",
"supabase-dart:v1:ref": "ts-node ./LegacyReferenceGenerator.ts -o ../../apps/reference/_supabase_dart/generated ../../spec/supabase_dart_v1_legacy.yml",
"supabase-dart:v1:olddocs": "ts-node ./LegacyReferenceGenerator.ts -o ../../web/docs/reference/dart ../../spec/supabase_dart_v1_legacy.yml",
"supabase-dart:v1:ref": "ts-node ./LegacyReferenceGenerator.ts -o ../../apps/reference/_supabase_dart/generated ../supabase_dart_v1_legacy.yml",
"supabase-dart:v1:olddocs": "ts-node ./LegacyReferenceGenerator.ts -o ../../web/docs/reference/dart ../supabase_dart_v1_legacy.yml",
"supabase-js:format": "prettier --write ../../apps/reference/_supabase_js/**/*.mdx && prettier --write ../../apps/reference/_supabase_js_versioned_docs/**/*.mdx",
"supabase-js:v1": "npm-run-all supabase-js:v1:ref supabase-js:v1:olddocs supabase-js:format",
"supabase-js:v1:ref": "ts-node ./LegacyReferenceGenerator.ts -o ../../apps/reference/_supabase_js_versioned_docs/version-v1 ../../spec/supabase_js_v1_legacy.yml",
"supabase-js:v1:olddocs": "ts-node ./LegacyReferenceGenerator.ts -o ../../web/docs/reference/javascript ../../spec/supabase_dart_v1_legacy.yml",
"supabase-js:v1:ref": "ts-node ./LegacyReferenceGenerator.ts -o ../../apps/reference/_supabase_js_versioned_docs/version-v1 ../supabase_js_v1_legacy.yml",
"supabase-js:v1:olddocs": "ts-node ./LegacyReferenceGenerator.ts -o ../../web/docs/reference/javascript ../supabase_dart_v1_legacy.yml",
"supabase-js:v2": "npm-run-all supabase-js:v2:ref supabase-js:format",
"supabase-js:v2:ref": "ts-node ./LegacyReferenceGenerator.ts -o ../../apps/reference/_supabase_js/generated ../../spec/supabase_js_v2_legacy.yml",
"tsdoc:dereference:functions": "ts-node ./tsdoc.ts dereference --input ../../spec/enrichments/tsdoc_v2/functions.json --output ../../spec/enrichments/tsdoc_v2/functions_dereferenced.json",
"tsdoc:dereference:gotrue": "ts-node ./tsdoc.ts dereference --input ../../spec/enrichments/tsdoc_v2/gotrue.json --output ../../spec/enrichments/tsdoc_v2/gotrue_dereferenced.json",
"tsdoc:dereference:postgrest": "ts-node ./tsdoc.ts dereference --input ../../spec/enrichments/tsdoc_v2/postgrest.json --output ../../spec/enrichments/tsdoc_v2/postgrest_dereferenced.json",
"tsdoc:dereference:realtime": "ts-node ./tsdoc.ts dereference --input ../../spec/enrichments/tsdoc_v2/realtime.json --output ../../spec/enrichments/tsdoc_v2/realtime_dereferenced.json",
"tsdoc:dereference:storage": "ts-node ./tsdoc.ts dereference --input ../../spec/enrichments/tsdoc_v2/storage.json --output ../../spec/enrichments/tsdoc_v2/storage_dereferenced.json",
"tsdoc:dereference:supabase": "ts-node ./tsdoc.ts dereference --input ../../spec/enrichments/tsdoc_v2/supabase.json --output ../../spec/enrichments/tsdoc_v2/supabase_dereferenced.json"
"supabase-js:v2:ref": "ts-node ./LegacyReferenceGenerator.ts -o ../../apps/reference/_supabase_js/generated ../supabase_js_v2_legacy.yml",
"tsdoc:dereference:functions": "ts-node ./tsdoc.ts dereference --input ../enrichments/tsdoc_v2/functions.json --output ../enrichments/tsdoc_v2/functions_dereferenced.json",
"tsdoc:dereference:gotrue": "ts-node ./tsdoc.ts dereference --input ../enrichments/tsdoc_v2/gotrue.json --output ../enrichments/tsdoc_v2/gotrue_dereferenced.json",
"tsdoc:dereference:postgrest": "ts-node ./tsdoc.ts dereference --input ../enrichments/tsdoc_v2/postgrest.json --output ../enrichments/tsdoc_v2/postgrest_dereferenced.json",
"tsdoc:dereference:realtime": "ts-node ./tsdoc.ts dereference --input ../enrichments/tsdoc_v2/realtime.json --output ../enrichments/tsdoc_v2/realtime_dereferenced.json",
"tsdoc:dereference:storage": "ts-node ./tsdoc.ts dereference --input ../enrichments/tsdoc_v2/storage.json --output ../enrichments/tsdoc_v2/storage_dereferenced.json",
"tsdoc:dereference:supabase": "ts-node ./tsdoc.ts dereference --input ../enrichments/tsdoc_v2/supabase.json --output ../enrichments/tsdoc_v2/supabase_dereferenced.json"
},
"devDependencies": {
"@apidevtools/swagger-cli": "^4.0.4",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,24 @@
type params = { name: string; description: string; tabs: string; note: string }
const Example = ({ name, description = '', tabs = '', note = '' }: params) => {
if (note !== '') {
const [noteTitle, ...noteText] = note.split('\n')
console.log(noteText)
note = `
:::note ${noteTitle}
${noteText.join('\n')}
:::
`
}
return `
### ${name}
${description}
${tabs}
${note}
`.trim()
}
export default Example
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+111 -190
View File
@@ -33,22 +33,14 @@
"type": "string"
}
},
"required": [
"id",
"organization_id",
"name",
"region",
"created_at"
]
"required": ["id", "organization_id", "name", "region", "created_at"]
}
}
}
}
}
},
"tags": [
"projects"
],
"tags": ["projects"],
"security": [
{
"bearer": []
@@ -77,10 +69,7 @@
},
"plan": {
"type": "string",
"enum": [
"free",
"pro"
]
"enum": ["free", "pro"]
},
"region": {
"type": "string",
@@ -98,15 +87,12 @@
"ap-south-1",
"sa-east-1"
]
},
"kps_enabled": {
"type": "boolean"
}
},
"required": [
"db_pass",
"name",
"organization_id",
"plan",
"region"
]
"required": ["db_pass", "name", "organization_id", "plan", "region"]
}
}
}
@@ -135,21 +121,13 @@
"type": "string"
}
},
"required": [
"id",
"organization_id",
"name",
"region",
"created_at"
]
"required": ["id", "organization_id", "name", "region", "created_at"]
}
}
}
}
},
"tags": [
"projects"
],
"tags": ["projects"],
"security": [
{
"bearer": []
@@ -180,10 +158,7 @@
"type": "string"
}
},
"required": [
"id",
"name"
]
"required": ["id", "name"]
}
}
}
@@ -193,9 +168,7 @@
"description": "Unexpected error listing organizations"
}
},
"tags": [
"organizations"
],
"tags": ["organizations"],
"security": [
{
"bearer": []
@@ -217,9 +190,7 @@
"type": "string"
}
},
"required": [
"name"
]
"required": ["name"]
}
}
}
@@ -239,10 +210,7 @@
"type": "string"
}
},
"required": [
"id",
"name"
]
"required": ["id", "name"]
}
}
}
@@ -251,9 +219,7 @@
"description": "Unexpected error creating an organization"
}
},
"tags": [
"organizations"
],
"tags": ["organizations"],
"security": [
{
"bearer": []
@@ -299,11 +265,7 @@
"type": "string"
},
"status": {
"enum": [
"ACTIVE",
"REMOVED",
"THROTTLED"
],
"enum": ["ACTIVE", "REMOVED", "THROTTLED"],
"type": "string"
},
"version": {
@@ -333,14 +295,19 @@
}
}
},
"403": {
"description": ""
},
"500": {
"description": "Failed to retrieve project's functions"
}
},
"tags": [
"projects"
],
"tags": ["projects"],
"security": [
{
"apiKeyHeader": [],
"apiKeyParam": []
},
{
"bearer": []
}
@@ -372,7 +339,7 @@
"properties": {
"slug": {
"type": "string",
"pattern": {}
"pattern": "/^[A-Za-z0-9_-]+$/"
},
"name": {
"type": "string"
@@ -384,11 +351,7 @@
"type": "boolean"
}
},
"required": [
"slug",
"name",
"body"
]
"required": ["slug", "name", "body"]
}
}
}
@@ -411,11 +374,7 @@
"type": "string"
},
"status": {
"enum": [
"ACTIVE",
"REMOVED",
"THROTTLED"
],
"enum": ["ACTIVE", "REMOVED", "THROTTLED"],
"type": "string"
},
"version": {
@@ -444,14 +403,19 @@
}
}
},
"403": {
"description": ""
},
"500": {
"description": "Failed to create project's function"
}
},
"tags": [
"projects"
],
"tags": ["projects"],
"security": [
{
"apiKeyHeader": [],
"apiKeyParam": []
},
{
"bearer": []
}
@@ -489,7 +453,7 @@
"in": "path",
"description": "Function slug",
"schema": {
"pattern": {},
"pattern": "/^[A-Za-z0-9_-]+$/",
"type": "string"
}
}
@@ -512,11 +476,7 @@
"type": "string"
},
"status": {
"enum": [
"ACTIVE",
"REMOVED",
"THROTTLED"
],
"enum": ["ACTIVE", "REMOVED", "THROTTLED"],
"type": "string"
},
"version": {
@@ -548,14 +508,19 @@
}
}
},
"403": {
"description": ""
},
"500": {
"description": "Failed to retrieve function with given slug"
}
},
"tags": [
"projects"
],
"tags": ["projects"],
"security": [
{
"apiKeyHeader": [],
"apiKeyParam": []
},
{
"bearer": []
}
@@ -583,7 +548,7 @@
"in": "path",
"description": "Function slug",
"schema": {
"pattern": {},
"pattern": "/^[A-Za-z0-9_-]+$/",
"type": "string"
}
}
@@ -627,11 +592,7 @@
"type": "string"
},
"status": {
"enum": [
"ACTIVE",
"REMOVED",
"THROTTLED"
],
"enum": ["ACTIVE", "REMOVED", "THROTTLED"],
"type": "string"
},
"version": {
@@ -660,14 +621,19 @@
}
}
},
"403": {
"description": ""
},
"500": {
"description": "Failed to update function with given slug"
}
},
"tags": [
"projects"
],
"tags": ["projects"],
"security": [
{
"apiKeyHeader": [],
"apiKeyParam": []
},
{
"bearer": []
}
@@ -695,7 +661,7 @@
"in": "path",
"description": "Function slug",
"schema": {
"pattern": {},
"pattern": "/^[A-Za-z0-9_-]+$/",
"type": "string"
}
}
@@ -704,14 +670,19 @@
"200": {
"description": ""
},
"403": {
"description": ""
},
"500": {
"description": "Failed to delete function with given slug"
}
},
"tags": [
"projects"
],
"tags": ["projects"],
"security": [
{
"apiKeyHeader": [],
"apiKeyParam": []
},
{
"bearer": []
}
@@ -753,23 +724,25 @@
"type": "string"
}
},
"required": [
"name",
"value"
]
"required": ["name", "value"]
}
}
}
}
},
"403": {
"description": ""
},
"500": {
"description": "Failed to retrieve project's secrets"
}
},
"tags": [
"projects"
],
"tags": ["projects"],
"security": [
{
"apiKeyHeader": [],
"apiKeyParam": []
},
{
"bearer": []
}
@@ -806,13 +779,10 @@
},
"value": {
"type": "string",
"pattern": {}
"pattern": "/^(?!SUPABASE_).*/"
}
},
"required": [
"name",
"value"
]
"required": ["name", "value"]
}
}
}
@@ -822,14 +792,19 @@
"201": {
"description": ""
},
"403": {
"description": ""
},
"500": {
"description": "Failed to create project's secrets"
}
},
"tags": [
"projects"
],
"tags": ["projects"],
"security": [
{
"apiKeyHeader": [],
"apiKeyParam": []
},
{
"bearer": []
}
@@ -876,14 +851,19 @@
}
}
},
"403": {
"description": ""
},
"500": {
"description": "Failed to delete secrets with given names"
}
},
"tags": [
"projects"
],
"tags": ["projects"],
"security": [
{
"apiKeyHeader": [],
"apiKeyParam": []
},
{
"bearer": []
}
@@ -925,9 +905,7 @@
"description": "Failed to retrieve project's pgsodium config"
}
},
"tags": [
"pgsodium (beta)"
],
"tags": ["pgsodium (beta)"],
"security": [
{
"bearer": []
@@ -961,9 +939,7 @@
"type": "string"
}
},
"required": [
"root_key"
]
"required": ["root_key"]
}
}
}
@@ -986,9 +962,7 @@
"description": "Failed to update project's pgsodium config"
}
},
"tags": [
"pgsodium (beta)"
],
"tags": ["pgsodium (beta)"],
"security": [
{
"bearer": []
@@ -1042,13 +1016,7 @@
"type": "string"
}
},
"required": [
"id",
"organization_id",
"name",
"region",
"created_at"
]
"required": ["id", "organization_id", "name", "region", "created_at"]
},
"CreateProjectBody": {
"type": "object",
@@ -1064,10 +1032,7 @@
},
"plan": {
"type": "string",
"enum": [
"free",
"pro"
]
"enum": ["free", "pro"]
},
"region": {
"type": "string",
@@ -1085,15 +1050,12 @@
"ap-south-1",
"sa-east-1"
]
},
"kps_enabled": {
"type": "boolean"
}
},
"required": [
"db_pass",
"name",
"organization_id",
"plan",
"region"
]
"required": ["db_pass", "name", "organization_id", "plan", "region"]
},
"OrganizationResponse": {
"type": "object",
@@ -1105,10 +1067,7 @@
"type": "string"
}
},
"required": [
"id",
"name"
]
"required": ["id", "name"]
},
"CreateOrganizationBody": {
"type": "object",
@@ -1117,9 +1076,7 @@
"type": "string"
}
},
"required": [
"name"
]
"required": ["name"]
},
"FunctionResponse": {
"type": "object",
@@ -1134,11 +1091,7 @@
"type": "string"
},
"status": {
"enum": [
"ACTIVE",
"REMOVED",
"THROTTLED"
],
"enum": ["ACTIVE", "REMOVED", "THROTTLED"],
"type": "string"
},
"version": {
@@ -1154,22 +1107,14 @@
"type": "boolean"
}
},
"required": [
"id",
"slug",
"name",
"status",
"version",
"created_at",
"updated_at"
]
"required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"]
},
"CreateFunctionBody": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"pattern": {}
"pattern": "/^[A-Za-z0-9_-]+$/"
},
"name": {
"type": "string"
@@ -1181,11 +1126,7 @@
"type": "boolean"
}
},
"required": [
"slug",
"name",
"body"
]
"required": ["slug", "name", "body"]
},
"FunctionSlugResponse": {
"type": "object",
@@ -1200,11 +1141,7 @@
"type": "string"
},
"status": {
"enum": [
"ACTIVE",
"REMOVED",
"THROTTLED"
],
"enum": ["ACTIVE", "REMOVED", "THROTTLED"],
"type": "string"
},
"version": {
@@ -1223,15 +1160,7 @@
"type": "string"
}
},
"required": [
"id",
"slug",
"name",
"status",
"version",
"created_at",
"updated_at"
]
"required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"]
},
"UpdateFunctionBody": {
"type": "object",
@@ -1257,10 +1186,7 @@
"type": "string"
}
},
"required": [
"name",
"value"
]
"required": ["name", "value"]
},
"CreateSecretBody": {
"type": "object",
@@ -1270,13 +1196,10 @@
},
"value": {
"type": "string",
"pattern": {}
"pattern": "/^(?!SUPABASE_).*/"
}
},
"required": [
"name",
"value"
]
"required": ["name", "value"]
},
"UpdatePgsodiumConfigBody": {
"type": "object",
@@ -1285,9 +1208,7 @@
"type": "string"
}
},
"required": [
"root_key"
]
"required": ["root_key"]
}
}
}
+68 -263
View File
@@ -15,9 +15,7 @@
"example": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs"
}
},
"required": [
"authorization"
],
"required": ["authorization"],
"title": "authSchema"
},
"def-1": {
@@ -33,11 +31,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -46,9 +40,7 @@
"/bucket/": {
"post": {
"summary": "Create a bucket",
"tags": [
"bucket"
],
"tags": ["bucket"],
"requestBody": {
"content": {
"application/json": {
@@ -68,9 +60,7 @@
"example": false
}
},
"required": [
"name"
]
"required": ["name"]
}
}
},
@@ -101,9 +91,7 @@
"example": "avatars"
}
},
"required": [
"name"
]
"required": ["name"]
}
}
}
@@ -126,11 +114,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -140,9 +124,7 @@
},
"get": {
"summary": "Gets all buckets",
"tags": [
"bucket"
],
"tags": ["bucket"],
"parameters": [
{
"in": "header",
@@ -184,10 +166,7 @@
"type": "string"
}
},
"required": [
"id",
"name"
],
"required": ["id", "name"],
"additionalProperties": false,
"title": "bucketSchema",
"example": {
@@ -238,11 +217,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -254,9 +229,7 @@
"/bucket/{bucketId}/empty": {
"post": {
"summary": "Empty a bucket",
"tags": [
"bucket"
],
"tags": ["bucket"],
"parameters": [
{
"schema": {
@@ -314,11 +287,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -330,9 +299,7 @@
"/bucket/{bucketId}": {
"get": {
"summary": "Get details of a bucket",
"tags": [
"bucket"
],
"tags": ["bucket"],
"parameters": [
{
"schema": {
@@ -382,10 +349,7 @@
"type": "string"
}
},
"required": [
"id",
"name"
],
"required": ["id", "name"],
"additionalProperties": false,
"example": {
"id": "bucket2",
@@ -423,11 +387,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -437,9 +397,7 @@
},
"put": {
"summary": "Update properties of a bucket",
"tags": [
"bucket"
],
"tags": ["bucket"],
"requestBody": {
"content": {
"application/json": {
@@ -480,9 +438,7 @@
"example": "Successfully updated"
}
},
"required": [
"message"
]
"required": ["message"]
}
}
}
@@ -505,11 +461,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -519,9 +471,7 @@
},
"delete": {
"summary": "Delete a bucket",
"tags": [
"bucket"
],
"tags": ["bucket"],
"parameters": [
{
"schema": {
@@ -579,11 +529,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -595,9 +541,7 @@
"/object/{bucketName}/{wildcard}": {
"delete": {
"summary": "Delete an object",
"tags": [
"object"
],
"tags": ["object"],
"parameters": [
{
"schema": {
@@ -665,11 +609,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -679,9 +619,7 @@
},
"get": {
"summary": "Get object",
"tags": [
"deprecated"
],
"tags": ["deprecated"],
"description": "use GET /object/authenticated/{bucketName} instead",
"parameters": [
{
@@ -732,11 +670,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -746,9 +680,7 @@
},
"put": {
"summary": "Update the object at an existing key",
"tags": [
"object"
],
"tags": ["object"],
"parameters": [
{
"schema": {
@@ -794,9 +726,7 @@
"example": "projectref/avatars/folder/cat.png"
}
},
"required": [
"Key"
]
"required": ["Key"]
}
}
}
@@ -819,11 +749,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -833,9 +759,7 @@
},
"post": {
"summary": "Upload a new object",
"tags": [
"object"
],
"tags": ["object"],
"parameters": [
{
"schema": {
@@ -881,9 +805,7 @@
"example": "avatars/folder/cat.png"
}
},
"required": [
"Key"
]
"required": ["Key"]
}
}
}
@@ -906,11 +828,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -922,9 +840,7 @@
"/object/{bucketName}": {
"delete": {
"summary": "Delete multiple objects",
"tags": [
"object"
],
"tags": ["object"],
"requestBody": {
"content": {
"application/json": {
@@ -937,15 +853,10 @@
"type": "string"
},
"minItems": 1,
"example": [
"folder/cat.png",
"folder/morecats.png"
]
"example": ["folder/cat.png", "folder/morecats.png"]
}
},
"required": [
"prefixes"
]
"required": ["prefixes"]
}
}
},
@@ -1065,10 +976,7 @@
"type": "string"
}
},
"required": [
"id",
"name"
],
"required": ["id", "name"],
"additionalProperties": false,
"example": {
"id": "bucket2",
@@ -1079,9 +987,7 @@
}
}
},
"required": [
"name"
],
"required": ["name"],
"additionalProperties": false,
"title": "objectSchema",
"example": {
@@ -1119,11 +1025,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -1135,9 +1037,7 @@
"/object/authenticated/{bucketName}/{wildcard}": {
"get": {
"summary": "Retrieve an object",
"tags": [
"object"
],
"tags": ["object"],
"parameters": [
{
"schema": {
@@ -1188,11 +1088,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -1204,9 +1100,7 @@
"/object/sign/{bucketName}/{wildcard}": {
"post": {
"summary": "Generate a presigned url to retrieve an object",
"tags": [
"object"
],
"tags": ["object"],
"requestBody": {
"content": {
"application/json": {
@@ -1219,9 +1113,7 @@
"example": 60000
}
},
"required": [
"expiresIn"
]
"required": ["expiresIn"]
}
}
},
@@ -1272,9 +1164,7 @@
"example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
}
},
"required": [
"signedURL"
]
"required": ["signedURL"]
}
}
}
@@ -1297,11 +1187,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -1311,9 +1197,7 @@
},
"get": {
"summary": "Retrieve an object via a presigned URL",
"tags": [
"object"
],
"tags": ["object"],
"parameters": [
{
"schema": {
@@ -1365,11 +1249,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -1381,9 +1261,7 @@
"/object/sign/{bucketName}": {
"post": {
"summary": "Generate presigned urls to retrieve objects",
"tags": [
"object"
],
"tags": ["object"],
"requestBody": {
"content": {
"application/json": {
@@ -1401,16 +1279,10 @@
"type": "string"
},
"minItems": 1,
"example": [
"folder/cat.png",
"folder/morecats.png"
]
"example": ["folder/cat.png", "folder/morecats.png"]
}
},
"required": [
"expiresIn",
"paths"
]
"required": ["expiresIn", "paths"]
}
}
},
@@ -1449,10 +1321,7 @@
"type": "object",
"properties": {
"error": {
"error": [
"string",
"null"
],
"error": ["string", "null"],
"example": "Either the object does not exist or you do not have access to it"
},
"path": {
@@ -1460,18 +1329,11 @@
"example": "folder/cat.png"
},
"signedURL": {
"type": [
"string",
"null"
],
"type": ["string", "null"],
"example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
}
},
"required": [
"error",
"path",
"signedURL"
]
"required": ["error", "path", "signedURL"]
}
}
}
@@ -1495,11 +1357,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -1511,9 +1369,7 @@
"/object/move": {
"post": {
"summary": "Moves an object",
"tags": [
"object"
],
"tags": ["object"],
"requestBody": {
"content": {
"application/json": {
@@ -1533,11 +1389,7 @@
"example": "folder/newcat.png"
}
},
"required": [
"bucketId",
"sourceKey",
"destinationKey"
]
"required": ["bucketId", "sourceKey", "destinationKey"]
}
}
},
@@ -1568,9 +1420,7 @@
"example": "Successfully moved"
}
},
"required": [
"message"
]
"required": ["message"]
}
}
}
@@ -1593,11 +1443,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -1609,9 +1455,7 @@
"/object/list/{bucketName}": {
"post": {
"summary": "Search for objects under a prefix",
"tags": [
"object"
],
"tags": ["object"],
"requestBody": {
"content": {
"application/json": {
@@ -1637,32 +1481,20 @@
"properties": {
"column": {
"type": "string",
"enum": [
"name",
"updated_at",
"created_at",
"last_accessed_at"
]
"enum": ["name", "updated_at", "created_at", "last_accessed_at"]
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
]
"enum": ["asc", "desc"]
}
},
"required": [
"column"
]
"required": ["column"]
},
"search": {
"type": "string"
}
},
"required": [
"prefix"
]
"required": ["prefix"]
}
}
},
@@ -1780,10 +1612,7 @@
"type": "string"
}
},
"required": [
"id",
"name"
],
"required": ["id", "name"],
"additionalProperties": false,
"example": {
"id": "bucket2",
@@ -1794,9 +1623,7 @@
}
}
},
"required": [
"name"
],
"required": ["name"],
"additionalProperties": false,
"example": {
"name": "folder/cat.png",
@@ -1833,11 +1660,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -1849,9 +1672,7 @@
"/object/copy": {
"post": {
"summary": "Copies an object",
"tags": [
"object"
],
"tags": ["object"],
"requestBody": {
"content": {
"application/json": {
@@ -1871,11 +1692,7 @@
"example": "folder/destination.png"
}
},
"required": [
"sourceKey",
"bucketId",
"destinationKey"
]
"required": ["sourceKey", "bucketId", "destinationKey"]
}
}
},
@@ -1906,9 +1723,7 @@
"example": "folder/destination.png"
}
},
"required": [
"Key"
]
"required": ["Key"]
}
}
}
@@ -1931,11 +1746,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}
@@ -1947,9 +1758,7 @@
"/object/public/{bucketName}/{wildcard}": {
"get": {
"summary": "Retrieve an object from a public bucket",
"tags": [
"object"
],
"tags": ["object"],
"parameters": [
{
"schema": {
@@ -1991,11 +1800,7 @@
"type": "string"
}
},
"required": [
"statusCode",
"error",
"message"
],
"required": ["statusCode", "error", "message"],
"title": "errorSchema"
}
}