update spec files

This commit is contained in:
Jonathan Summers-Muir committed 2022-12-08 11:59:42 +08:00
1 parent 37af70ec72
commit 6d2e59d6ee
9 files changed
+2306 -2262

No files matched your search

+12 -12
View File
@@ -48,12 +48,6 @@
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/auth</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/blog/</loc>
<changefreq>weekly</changefreq>
@@ -72,6 +66,18 @@
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/auth</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/launch-week/ticket-image</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/database</loc>
<changefreq>weekly</changefreq>
@@ -84,12 +90,6 @@
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/launch-week/ticket-image</loc>
<changefreq>weekly</changefreq>
<changefreq>0.5</changefreq>
</url>
<url>
<loc>https://supabase.com/legal/dpa</loc>
<changefreq>weekly</changefreq>
+161 -7
View File
@@ -120,8 +120,23 @@
"required": false,
"in": "query",
"schema": { "type": "boolean" }
},
{
"name": "import_map",
"required": false,
"in": "query",
"schema": { "type": "boolean" }
}
],
"requestBody": {
"required": true,
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/CreateFunctionBody" } },
"application/vnd.denoland.eszip": {
"schema": { "$ref": "#/components/schemas/CreateFunctionBody" }
}
}
},
"responses": {
"201": {
"description": "",
@@ -183,12 +198,6 @@
"summary": "Retrieve a function",
"description": "Retrieves a function with the specified slug and project.",
"parameters": [
{
"name": "include_body",
"required": false,
"in": "query",
"schema": { "type": "boolean" }
},
{
"name": "ref",
"required": true,
@@ -250,8 +259,23 @@
"required": false,
"in": "query",
"schema": { "type": "boolean" }
},
{
"name": "import_map",
"required": false,
"in": "query",
"schema": { "type": "boolean" }
}
],
"requestBody": {
"required": true,
"content": {
"application/json": { "schema": { "$ref": "#/components/schemas/UpdateFunctionBody" } },
"application/vnd.denoland.eszip": {
"schema": { "$ref": "#/components/schemas/UpdateFunctionBody" }
}
}
},
"responses": {
"200": {
"description": "",
@@ -294,6 +318,36 @@
"security": [{ "apiKeyHeader": [], "apiKeyParam": [] }, { "bearer": [] }]
}
},
"/v1/projects/{ref}/functions/{function_slug}/body": {
"get": {
"operationId": "getFunctionBody",
"summary": "Retrieve a function body",
"description": "Retrieves a function body for the specified slug and project.",
"parameters": [
{
"name": "ref",
"required": true,
"in": "path",
"description": "Project ref",
"schema": { "minLength": 20, "maxLength": 20, "type": "string" }
},
{
"name": "function_slug",
"required": true,
"in": "path",
"description": "Function slug",
"schema": { "pattern": "/^[A-Za-z0-9_-]+$/", "type": "string" }
}
],
"responses": {
"200": { "description": "" },
"403": { "description": "" },
"500": { "description": "Failed to retrieve function body with given slug" }
},
"tags": ["projects"],
"security": [{ "apiKeyHeader": [], "apiKeyParam": [] }, { "bearer": [] }]
}
},
"/v1/projects/{ref}/custom-hostname": {
"get": {
"operationId": "getCustomHostnameConfig",
@@ -683,6 +737,72 @@
"tags": ["network bans (beta)"],
"security": [{ "bearer": [] }]
}
},
"/v1/projects/{ref}/network-restrictions": {
"get": {
"operationId": "getNetworkRestrictions",
"summary": "Gets project's network restrictions",
"parameters": [
{
"name": "ref",
"required": true,
"in": "path",
"description": "Project ref",
"schema": { "minLength": 20, "maxLength": 20, "type": "string" }
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/NetworkRestrictionsResponse" }
}
}
},
"403": { "description": "" },
"500": { "description": "Failed to retrieve project's network restrictions" }
},
"tags": ["network restrictions (beta)"],
"security": [{ "bearer": [] }]
}
},
"/v1/projects/{ref}/network-restrictions/apply": {
"post": {
"operationId": "applyNetworkRestrictions",
"summary": "Updates project's network restrictions",
"parameters": [
{
"name": "ref",
"required": true,
"in": "path",
"description": "Project ref",
"schema": { "minLength": 20, "maxLength": 20, "type": "string" }
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/NetworkRestrictionsRequest" }
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/NetworkRestrictionsResponse" }
}
}
},
"403": { "description": "" },
"500": { "description": "Failed to update project network restrictions" }
},
"tags": ["network restrictions (beta)"],
"security": [{ "bearer": [] }]
}
}
},
"info": { "title": "Supabase API (v1)", "description": "", "version": "1.0.0", "contact": {} },
@@ -750,6 +870,16 @@
"properties": { "name": { "type": "string" } },
"required": ["name"]
},
"CreateFunctionBody": {
"type": "object",
"properties": {
"slug": { "type": "string", "pattern": "/^[A-Za-z0-9_-]+$/" },
"name": { "type": "string" },
"body": { "type": "string" },
"verify_jwt": { "type": "boolean" }
},
"required": ["slug", "name", "body"]
},
"FunctionResponse": {
"type": "object",
"properties": {
@@ -760,7 +890,8 @@
"version": { "type": "number" },
"created_at": { "type": "number" },
"updated_at": { "type": "number" },
"verify_jwt": { "type": "boolean" }
"verify_jwt": { "type": "boolean" },
"import_map": { "type": "boolean" }
},
"required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"]
},
@@ -775,10 +906,19 @@
"created_at": { "type": "number" },
"updated_at": { "type": "number" },
"verify_jwt": { "type": "boolean" },
"import_map": { "type": "boolean" },
"body": { "type": "string" }
},
"required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"]
},
"UpdateFunctionBody": {
"type": "object",
"properties": {
"name": { "type": "string" },
"body": { "type": "string" },
"verify_jwt": { "type": "boolean" }
}
},
"UpdateCustomHostnameResponse": {
"type": "object",
"properties": {
@@ -836,6 +976,20 @@
"type": "object",
"properties": { "ipv4_addresses": { "type": "array", "items": { "type": "string" } } },
"required": ["ipv4_addresses"]
},
"NetworkRestrictionsRequest": {
"type": "object",
"properties": { "dbAllowedCidrs": { "type": "array", "items": { "type": "string" } } },
"required": ["dbAllowedCidrs"]
},
"NetworkRestrictionsResponse": {
"type": "object",
"properties": {
"entitlement": { "enum": ["disallowed", "allowed"], "type": "string" },
"config": { "$ref": "#/components/schemas/NetworkRestrictionsRequest" },
"status": { "enum": ["stored", "applied"], "type": "string" }
},
"required": ["entitlement", "config", "status"]
}
}
}
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
+5 -5
View File
@@ -8,14 +8,12 @@
"name": "@supabase/generator",
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"lodash": "^4.17.21"
},
"devDependencies": {
"@apidevtools/swagger-cli": "^4.0.4",
"@types/json-stringify-safe": "^5.0.0",
"@types/lodash": "^4.14.185",
"json-stringify-safe": "^5.0.1",
"lodash": "^4.17.21",
"prettier": "^2.7.1",
"ts-node": "^10.9.1"
}
@@ -469,7 +467,8 @@
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"node_modules/make-error": {
"version": "1.3.6",
@@ -1131,7 +1130,8 @@
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"make-error": {
"version": "1.3.6",
+9 -1
View File
@@ -718,7 +718,15 @@
"schema": {
"type": "object",
"properties": {
"expiresIn": { "type": "integer", "minimum": 1, "example": 60000 }
"expiresIn": { "type": "integer", "minimum": 1, "example": 60000 },
"transform": {
"type": "object",
"properties": {
"height": { "type": "integer", "minimum": 0, "example": 100 },
"width": { "type": "integer", "minimum": 0, "example": 100 },
"resize": { "type": "string", "enum": ["cover", "contain", "fill"] }
}
}
},
"required": ["expiresIn"]
}
+391 -8
View File
@@ -293,8 +293,63 @@
"schema": {
"type": "boolean"
}
},
{
"name": "import_map",
"required": false,
"in": "query",
"schema": {
"type": "boolean"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"pattern": "/^[A-Za-z0-9_-]+$/"
},
"name": {
"type": "string"
},
"body": {
"type": "string"
},
"verify_jwt": {
"type": "boolean"
}
},
"required": ["slug", "name", "body"]
}
},
"application/vnd.denoland.eszip": {
"schema": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"pattern": "/^[A-Za-z0-9_-]+$/"
},
"name": {
"type": "string"
},
"body": {
"type": "string"
},
"verify_jwt": {
"type": "boolean"
}
},
"required": ["slug", "name", "body"]
}
}
}
},
"responses": {
"201": {
"description": "",
@@ -327,6 +382,9 @@
},
"verify_jwt": {
"type": "boolean"
},
"import_map": {
"type": "boolean"
}
},
"required": [
@@ -418,6 +476,9 @@
},
"verify_jwt": {
"type": "boolean"
},
"import_map": {
"type": "boolean"
}
},
"required": [
@@ -466,14 +527,6 @@
"summary": "Retrieve a function",
"description": "Retrieves a function with the specified slug and project.",
"parameters": [
{
"name": "include_body",
"required": false,
"in": "query",
"schema": {
"type": "boolean"
}
},
{
"name": "ref",
"required": true,
@@ -529,6 +582,9 @@
"verify_jwt": {
"type": "boolean"
},
"import_map": {
"type": "boolean"
},
"body": {
"type": "string"
}
@@ -614,8 +670,53 @@
"schema": {
"type": "boolean"
}
},
{
"name": "import_map",
"required": false,
"in": "query",
"schema": {
"type": "boolean"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"body": {
"type": "string"
},
"verify_jwt": {
"type": "boolean"
}
}
}
},
"application/vnd.denoland.eszip": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"body": {
"type": "string"
},
"verify_jwt": {
"type": "boolean"
}
}
}
}
}
},
"responses": {
"200": {
"description": "",
@@ -648,6 +749,9 @@
},
"verify_jwt": {
"type": "boolean"
},
"import_map": {
"type": "boolean"
}
},
"required": [
@@ -731,6 +835,57 @@
]
}
},
"/v1/projects/{ref}/functions/{function_slug}/body": {
"get": {
"operationId": "getFunctionBody",
"summary": "Retrieve a function body",
"description": "Retrieves a function body for the specified slug and project.",
"parameters": [
{
"name": "ref",
"required": true,
"in": "path",
"description": "Project ref",
"schema": {
"minLength": 20,
"maxLength": 20,
"type": "string"
}
},
{
"name": "function_slug",
"required": true,
"in": "path",
"description": "Function slug",
"schema": {
"pattern": "/^[A-Za-z0-9_-]+$/",
"type": "string"
}
}
],
"responses": {
"200": {
"description": ""
},
"403": {
"description": ""
},
"500": {
"description": "Failed to retrieve function body with given slug"
}
},
"tags": ["projects"],
"security": [
{
"apiKeyHeader": [],
"apiKeyParam": []
},
{
"bearer": []
}
]
}
},
"/v1/projects/{ref}/custom-hostname": {
"get": {
"operationId": "getCustomHostnameConfig",
@@ -1479,6 +1634,157 @@
}
]
}
},
"/v1/projects/{ref}/network-restrictions": {
"get": {
"operationId": "getNetworkRestrictions",
"summary": "Gets project's network restrictions",
"parameters": [
{
"name": "ref",
"required": true,
"in": "path",
"description": "Project ref",
"schema": {
"minLength": 20,
"maxLength": 20,
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"entitlement": {
"enum": ["disallowed", "allowed"],
"type": "string"
},
"config": {
"type": "object",
"properties": {
"dbAllowedCidrs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["dbAllowedCidrs"]
},
"status": {
"enum": ["stored", "applied"],
"type": "string"
}
},
"required": ["entitlement", "config", "status"]
}
}
}
},
"403": {
"description": ""
},
"500": {
"description": "Failed to retrieve project's network restrictions"
}
},
"tags": ["network restrictions (beta)"],
"security": [
{
"bearer": []
}
]
}
},
"/v1/projects/{ref}/network-restrictions/apply": {
"post": {
"operationId": "applyNetworkRestrictions",
"summary": "Updates project's network restrictions",
"parameters": [
{
"name": "ref",
"required": true,
"in": "path",
"description": "Project ref",
"schema": {
"minLength": 20,
"maxLength": 20,
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dbAllowedCidrs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["dbAllowedCidrs"]
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"entitlement": {
"enum": ["disallowed", "allowed"],
"type": "string"
},
"config": {
"type": "object",
"properties": {
"dbAllowedCidrs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["dbAllowedCidrs"]
},
"status": {
"enum": ["stored", "applied"],
"type": "string"
}
},
"required": ["entitlement", "config", "status"]
}
}
}
},
"403": {
"description": ""
},
"500": {
"description": "Failed to update project network restrictions"
}
},
"tags": ["network restrictions (beta)"],
"security": [
{
"bearer": []
}
]
}
}
},
"info": {
@@ -1613,6 +1919,25 @@
},
"required": ["name"]
},
"CreateFunctionBody": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"pattern": "/^[A-Za-z0-9_-]+$/"
},
"name": {
"type": "string"
},
"body": {
"type": "string"
},
"verify_jwt": {
"type": "boolean"
}
},
"required": ["slug", "name", "body"]
},
"FunctionResponse": {
"type": "object",
"properties": {
@@ -1640,6 +1965,9 @@
},
"verify_jwt": {
"type": "boolean"
},
"import_map": {
"type": "boolean"
}
},
"required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"]
@@ -1672,12 +2000,29 @@
"verify_jwt": {
"type": "boolean"
},
"import_map": {
"type": "boolean"
},
"body": {
"type": "string"
}
},
"required": ["id", "slug", "name", "status", "version", "created_at", "updated_at"]
},
"UpdateFunctionBody": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"body": {
"type": "string"
},
"verify_jwt": {
"type": "boolean"
}
}
},
"UpdateCustomHostnameResponse": {
"type": "object",
"properties": {
@@ -1775,6 +2120,44 @@
}
},
"required": ["ipv4_addresses"]
},
"NetworkRestrictionsRequest": {
"type": "object",
"properties": {
"dbAllowedCidrs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["dbAllowedCidrs"]
},
"NetworkRestrictionsResponse": {
"type": "object",
"properties": {
"entitlement": {
"enum": ["disallowed", "allowed"],
"type": "string"
},
"config": {
"type": "object",
"properties": {
"dbAllowedCidrs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["dbAllowedCidrs"]
},
"status": {
"enum": ["stored", "applied"],
"type": "string"
}
},
"required": ["entitlement", "config", "status"]
}
}
}
@@ -1111,6 +1111,25 @@
"type": "integer",
"minimum": 1,
"example": 60000
},
"transform": {
"type": "object",
"properties": {
"height": {
"type": "integer",
"minimum": 0,
"example": 100
},
"width": {
"type": "integer",
"minimum": 0,
"example": 100
},
"resize": {
"type": "string",
"enum": ["cover", "contain", "fill"]
}
}
}
},
"required": ["expiresIn"]