From 07dd2e36bb88e72d2b6337d2c2fb9a3559408a03 Mon Sep 17 00:00:00 2001 From: Copple <10214025+kiwicopple@users.noreply.github.com> Date: Sun, 27 Mar 2022 20:57:09 +0200 Subject: [PATCH] prepares the ts pipeline --- web/spec/Makefile | 11 +- web/spec/combined.json | 562 ++++++++++++++++++++++++++++++++++++++++ web/spec/functions.json | 562 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1132 insertions(+), 3 deletions(-) create mode 100644 web/spec/functions.json diff --git a/web/spec/Makefile b/web/spec/Makefile index 091d4f9d585..da72c81c5d8 100644 --- a/web/spec/Makefile +++ b/web/spec/Makefile @@ -2,7 +2,7 @@ REPO_DIR=$(shell pwd) run: download combine -download: supabase gotrue postgrest realtime storage +download: supabase gotrue postgrest realtime storage functions supabase: curl -sS https://supabase.github.io/supabase-js/spec.json \ @@ -24,11 +24,16 @@ storage: curl -sS https://supabase.github.io/storage-js/spec.json \ > $(REPO_DIR)/storage.json +functions: + curl -sS https://supabase.github.io/functions-js/spec.json \ + > $(REPO_DIR)/functions.json + combine: - jq -s '{ name: "Combined Specs", children: [.[0], .[1], .[2], .[3], .[4]] }' \ + jq -s '{ name: "Combined Specs", children: [.[0], .[1], .[2], .[3], .[4], .[5]] }' \ $(REPO_DIR)/supabase.json \ $(REPO_DIR)/gotrue.json \ $(REPO_DIR)/postgrest.json \ $(REPO_DIR)/realtime.json \ $(REPO_DIR)/storage.json \ - > $(REPO_DIR)/combined.json \ No newline at end of file + $(REPO_DIR)/functions.json \ + > $(REPO_DIR)/combined.json diff --git a/web/spec/combined.json b/web/spec/combined.json index 1d16c29ceaa..f083ba5e5cc 100644 --- a/web/spec/combined.json +++ b/web/spec/combined.json @@ -65670,6 +65670,568 @@ ] } ] + }, + { + "id": 0, + "name": "@supabase/functions-js", + "kind": 1, + "kindString": "Project", + "flags": {}, + "originalName": "", + "children": [ + { + "id": 1, + "name": "FunctionsClient", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 2, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 9, + "character": 2 + } + ], + "signatures": [ + { + "id": 3, + "name": "new FunctionsClient", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 4, + "name": "url", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 5, + "name": "headers", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 6, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 7, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 8, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + } + }, + { + "id": 9, + "name": "customFetch", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 10, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 11, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 12, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 13, + "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" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 1, + "name": "FunctionsClient" + } + } + ] + }, + { + "id": 19, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/index.ts", + "line": 7, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 20, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 21, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 22, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 23, + "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": 15, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/index.ts", + "line": 6, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 16, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 17, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 18, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + } + }, + { + "id": 14, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/index.ts", + "line": 5, + "character": 12 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 27, + "name": "invoke", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 32, + "character": 8 + } + ], + "signatures": [ + { + "id": 28, + "name": "invoke", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Invokes a function" + }, + "parameters": [ + { + "id": 29, + "name": "functionName", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "the name of the function to invoke" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 30, + "name": "invokeOptions", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "object with the following properties\n`headers`: object representing the headers to send with the request\n`body`: the body of the request\n`responseType`: how the response should be parsed. The default is `json`\n" + }, + "type": { + "type": "reference", + "name": "FunctionInvokeOptions" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reflection", + "declaration": { + "id": 31, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 32, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 35, + "character": 15 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + }, + { + "id": 33, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 35, + "character": 36 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reference", + "qualifiedName": "Error", + "package": "typescript", + "name": "Error" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 32, + 33 + ] + } + ] + } + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 24, + "name": "setAuth", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 20, + "character": 2 + } + ], + "signatures": [ + { + "id": 25, + "name": "setAuth", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Updates the authorization header", + "tags": [ + { + "tag": "params", + "text": "token - the new jwt token sent in the authorisation header\n" + } + ] + }, + "parameters": [ + { + "id": 26, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 2 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 19, + 15, + 14 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 27, + 24 + ] + } + ], + "sources": [ + { + "fileName": "src/index.ts", + "line": 4, + "character": 13 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 1 + ] + } + ], + "sources": [ + { + "fileName": "src/index.ts", + "line": 1, + "character": 0 + } + ] } ] } diff --git a/web/spec/functions.json b/web/spec/functions.json new file mode 100644 index 00000000000..106190c70ff --- /dev/null +++ b/web/spec/functions.json @@ -0,0 +1,562 @@ +{ + "id": 0, + "name": "@supabase/functions-js", + "kind": 1, + "kindString": "Project", + "flags": {}, + "originalName": "", + "children": [ + { + "id": 1, + "name": "FunctionsClient", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 2, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 9, + "character": 2 + } + ], + "signatures": [ + { + "id": 3, + "name": "new FunctionsClient", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 4, + "name": "url", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 5, + "name": "headers", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 6, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 7, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 8, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + } + }, + { + "id": 9, + "name": "customFetch", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 10, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 11, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 12, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 13, + "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" + } + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 1, + "name": "FunctionsClient" + } + } + ] + }, + { + "id": 19, + "name": "fetch", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/index.ts", + "line": 7, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 20, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 21, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 22, + "name": "input", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "qualifiedName": "RequestInfo", + "package": "typescript", + "name": "RequestInfo" + } + }, + { + "id": 23, + "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": 15, + "name": "headers", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/index.ts", + "line": 6, + "character": 12 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 16, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "indexSignature": { + "id": 17, + "name": "__index", + "kind": 8192, + "kindString": "Index signature", + "flags": {}, + "parameters": [ + { + "id": 18, + "name": "key", + "kind": 32768, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + } + } + }, + { + "id": 14, + "name": "url", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "sources": [ + { + "fileName": "src/index.ts", + "line": 5, + "character": 12 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 27, + "name": "invoke", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 32, + "character": 8 + } + ], + "signatures": [ + { + "id": 28, + "name": "invoke", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Invokes a function" + }, + "parameters": [ + { + "id": 29, + "name": "functionName", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "the name of the function to invoke" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 30, + "name": "invokeOptions", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isOptional": true + }, + "comment": { + "shortText": "object with the following properties\n`headers`: object representing the headers to send with the request\n`body`: the body of the request\n`responseType`: how the response should be parsed. The default is `json`\n" + }, + "type": { + "type": "reference", + "name": "FunctionInvokeOptions" + } + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "reflection", + "declaration": { + "id": 31, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 32, + "name": "data", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 35, + "character": 15 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "intrinsic", + "name": "string" + } + ] + } + }, + { + "id": 33, + "name": "error", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 35, + "character": 36 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": null + }, + { + "type": "reference", + "qualifiedName": "Error", + "package": "typescript", + "name": "Error" + } + ] + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 32, + 33 + ] + } + ] + } + } + ], + "qualifiedName": "Promise", + "package": "typescript", + "name": "Promise" + } + } + ] + }, + { + "id": 24, + "name": "setAuth", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "sources": [ + { + "fileName": "src/index.ts", + "line": 20, + "character": 2 + } + ], + "signatures": [ + { + "id": 25, + "name": "setAuth", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Updates the authorization header", + "tags": [ + { + "tag": "params", + "text": "token - the new jwt token sent in the authorisation header\n" + } + ] + }, + "parameters": [ + { + "id": 26, + "name": "token", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 2 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 19, + 15, + 14 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 27, + 24 + ] + } + ], + "sources": [ + { + "fileName": "src/index.ts", + "line": 4, + "character": 13 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 1 + ] + } + ], + "sources": [ + { + "fileName": "src/index.ts", + "line": 1, + "character": 0 + } + ] +} \ No newline at end of file