From 3767deff7482e99a95c4ae1abafc3e6c1f91e74d Mon Sep 17 00:00:00 2001
From: Copple <10214025+kiwicopple@users.noreply.github.com>
Date: Mon, 10 Apr 2023 17:43:02 +0200
Subject: [PATCH 01/10] self-hosted functions
---
.../NavigationMenu.constants.ts | 14 +
.../NavigationMenu/NavigationMenu.tsx | 14 +
.../self-hosting-functions/introduction.mdx | 17 +
apps/docs/layouts/SiteLayout.tsx | 4 +
apps/docs/lib/mdx/getConfig.tsx | 14 +-
apps/docs/package.json | 5 +-
.../pages/reference/functions/[...slug].tsx | 167 +
.../docs/pages/reference/functions/config.tsx | 115 +
.../self-hosting-functions/[...slug].tsx | 24 +
.../img/icons/menu/reference-functions.svg | 6 +
.../icons/menu/references-functions-light.svg | 6 +
package-lock.json | 4 +-
spec/Makefile | 6 +
...ommon-self-hosting-functions-sections.json | 104 +
spec/functions_v0_config.yaml | 73 +
spec/functions_v0_openapi.json | 983 ++++++
.../functions_v0_openapi_deparsed.json | 2902 +++++++++++++++++
17 files changed, 4454 insertions(+), 4 deletions(-)
create mode 100644 apps/docs/docs/ref/self-hosting-functions/introduction.mdx
create mode 100644 apps/docs/pages/reference/functions/[...slug].tsx
create mode 100644 apps/docs/pages/reference/functions/config.tsx
create mode 100644 apps/docs/pages/reference/self-hosting-functions/[...slug].tsx
create mode 100644 apps/docs/public/img/icons/menu/reference-functions.svg
create mode 100644 apps/docs/public/img/icons/menu/references-functions-light.svg
create mode 100644 spec/common-self-hosting-functions-sections.json
create mode 100644 spec/functions_v0_config.yaml
create mode 100644 spec/functions_v0_openapi.json
create mode 100644 spec/transforms/functions_v0_openapi_deparsed.json
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 3cfece03ebd..c25afcfab74 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -856,6 +856,13 @@ export const self_hosting = {
{ name: 'Configuration', url: '/guides/self-hosting/analytics/config', items: [] },
],
},
+ {
+ name: 'Functions Server',
+ items: [
+ { name: 'Reference', url: '/reference/self-hosting-functions/introduction', items: [] },
+ { name: 'Configuration', url: '/guides/self-hosting/functions/config', items: [] },
+ ],
+ },
],
}
@@ -1090,6 +1097,13 @@ export const reference_self_hosting_analytics = {
parent: '/reference',
}
+export const reference_self_hosting_functions = {
+ icon: 'reference-functions',
+ title: 'Self-Hosting Functions',
+ url: '/guides/reference/self-hosting/functions',
+ parent: '/reference',
+}
+
// export const reference: [
// {
// label: 'Official'
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
index 945d817abcf..03670f64f95 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
@@ -25,6 +25,7 @@ import libCommonSections from '~/../../spec/common-client-libs-sections.json'
import authServerCommonSections from '~/../../spec/common-self-hosting-auth-sections.json'
import realtimeServerCommonSections from '~/../../spec/common-self-hosting-realtime-sections.json'
import analyticsServerCommonSections from '~/../../spec/common-self-hosting-analytics-sections.json'
+import functionsServerCommonSections from '~/../../spec/common-self-hosting-functions-sections.json'
import storageServerCommonSections from '~/../../spec/common-self-hosting-storage-sections.json'
import { flattenSections } from '~/lib/helpers'
import NavigationMenuHome from './HomeMenu'
@@ -64,6 +65,7 @@ export type RefIdOptions =
| 'reference_self_hosting_storage'
| 'reference_self_hosting_realtime'
| 'reference_self_hosting_analytics'
+ | 'reference_self_hosting_functions'
export type RefKeyOptions =
| 'javascript'
@@ -77,6 +79,7 @@ export type RefKeyOptions =
| 'self-hosting-storage'
| 'self-hosting-realtime'
| 'self-hosting-analytics'
+ | 'self-hosting-functions'
const NavigationMenu = () => {
const router = useRouter()
@@ -171,6 +174,9 @@ const NavigationMenu = () => {
case url.includes(`/docs/reference/self-hosting-analytics`) && url:
menuState.setMenuLevelId('reference_self_hosting_analytics')
break
+ case url.includes(`/docs/reference/self-hosting-functions`) && url:
+ menuState.setMenuLevelId('reference_self_hosting_functions')
+ break
default:
break
@@ -216,6 +222,7 @@ const NavigationMenu = () => {
const isReference_Self_Hosting_Storage = 'reference_self_hosting_storage' === level
const isReference_Self_Hosting_Realtime = 'reference_self_hosting_realtime' === level
const isReference_Self_Hosting_Analytics = 'reference_self_hosting_analytics' === level
+ const isReference_Self_Hosting_Functions = 'reference_self_hosting_functions' === level
return (
@@ -339,6 +346,13 @@ const NavigationMenu = () => {
commonSections={analyticsServerCommonSections}
lib="self-hosting-analytics"
/>
+
)
}
diff --git a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
new file mode 100644
index 00000000000..7695d1a3dc0
--- /dev/null
+++ b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
@@ -0,0 +1,17 @@
+---
+id: introduction
+title: Introduction
+hideTitle: true
+---
+
+
+
+
+
Self-Hosting Analytics
+
+
+
+
+
+
+The Supabase Functions
diff --git a/apps/docs/layouts/SiteLayout.tsx b/apps/docs/layouts/SiteLayout.tsx
index 0af5320a944..1c0c1182cb6 100644
--- a/apps/docs/layouts/SiteLayout.tsx
+++ b/apps/docs/layouts/SiteLayout.tsx
@@ -118,6 +118,10 @@ const levelsData = {
icon: '/docs/img/icons/menu/reference-analytics',
name: 'Analytics Server Reference',
},
+ reference_self_hosting_functions: {
+ icon: '/docs/img/icons/menu/reference-functions',
+ name: 'Functions Server Reference',
+ },
}
const MobileHeader = memo(function MobileHeader() {
diff --git a/apps/docs/lib/mdx/getConfig.tsx b/apps/docs/lib/mdx/getConfig.tsx
index d208d4243cc..4cd95686c7f 100644
--- a/apps/docs/lib/mdx/getConfig.tsx
+++ b/apps/docs/lib/mdx/getConfig.tsx
@@ -6,6 +6,8 @@ import specRealtimeV0 from '~/../../spec/realtime_v0_config.yaml' assert { type:
import specAuthV1 from '~/../../spec/gotrue_v1_config.yaml' assert { type: 'yml' }
// @ts-expect-error
import specAnalyticsV0 from '~/../../spec/analytics_v0_config.yaml' assert { type: 'yml' }
+// @ts-expect-error
+import specFunctionsV0 from '~/../../spec/functions_v0_config.yaml' assert { type: 'yml' }
function getStorageConfigV0() {
return { ...specStorageV0 }
@@ -23,4 +25,14 @@ function getAnalyticsConfigV0() {
return { ...specAnalyticsV0 }
}
-export { getStorageConfigV0, getRealtimeConfigV0, getAuthConfigV1, getAnalyticsConfigV0 }
+function getFunctionsConfigV0() {
+ return { ...specFunctionsV0 }
+}
+
+export {
+ getStorageConfigV0,
+ getRealtimeConfigV0,
+ getAuthConfigV1,
+ getAnalyticsConfigV0,
+ getFunctionsConfigV0,
+}
diff --git a/apps/docs/package.json b/apps/docs/package.json
index cfda86a3831..0e82a743e26 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -38,7 +38,10 @@
"gen:realtime:config": "ts-node ./generator/index.ts gen --type config --input ../../spec/realtime_v0_config.yaml --output ./docs/reference/realtime/generated/config.mdx",
"gen:analytics": "npm-run-all gen:analytics:config gen:analytics:usage",
"gen:analytics:config": "ts-node ./generator/index.ts gen --type config --input ../../spec/analytics_v0_config.yaml --output ./docs/reference/analytics/generated/config.mdx",
- "gen:analytics:usage": "ts-node ./generator/index.ts gen --type api --input ../../spec/transforms/analytics_v0_openapi_deparsed.json --output ./docs/reference/analytics/generated/usage.mdx"
+ "gen:analytics:usage": "ts-node ./generator/index.ts gen --type api --input ../../spec/transforms/analytics_v0_openapi_deparsed.json --output ./docs/reference/analytics/generated/usage.mdx",
+ "gen:functions": "npm-run-all gen:functions:config gen:functions:usage",
+ "gen:functions:config": "ts-node ./generator/index.ts gen --type config --input ../../spec/functions_v0_config.yaml --output ./docs/reference/functions/generated/config.mdx",
+ "gen:functions:usage": "ts-node ./generator/index.ts gen --type api --input ../../spec/transforms/functions_v0_openapi_deparsed.json --output ./docs/reference/functions/generated/usage.mdx"
},
"dependencies": {
"@algolia/autocomplete-js": "^1.7.2",
diff --git a/apps/docs/pages/reference/functions/[...slug].tsx b/apps/docs/pages/reference/functions/[...slug].tsx
new file mode 100644
index 00000000000..e04800c6279
--- /dev/null
+++ b/apps/docs/pages/reference/functions/[...slug].tsx
@@ -0,0 +1,167 @@
+import specFile from '~/../../spec/transforms/functions_v0_openapi_deparsed.json' assert { type: 'json' }
+import { gen_v3, enrichedOperation } from '~/lib/refGenerator/helpers'
+import { Tabs, CodeBlock } from 'ui'
+
+import RefSubLayout from '~/layouts/ref/RefSubLayout'
+
+export type AcceptedValue = {
+ id: string
+ name: string
+ type: 'string' | 'boolean' | 'object'
+ description?: string
+}
+
+export type Flag = {
+ id: string
+ name: string
+ description: string
+ default_value: string
+ accepted_values: AcceptedValue[]
+}
+
+export type ApiParameter = {
+ example: string
+ in: string
+ name: string
+ required: boolean
+ schema: {
+ type: string
+ example: string
+ }
+}
+// @ts-ignore
+const generatedSpec = gen_v3(specFile, 'wat', { apiUrl: 'apiv0' })
+
+export default function Config() {
+ return (
+
+
+
+
+
{generatedSpec.info.title}
+
{generatedSpec.info.description}
+
+
+
+ {generatedSpec.operations.map((operation: any) => (
+
+
+
+
+
+ {operation.operation}
+ {operation.fullPath}
+
+
+ {/* Path Parameters */}
+ {operation.parameters &&
+ operation.parameters.filter((parameter) => parameter.in === 'path').length >
+ 0 && (
+
+ )}
+
+ {/* Header Parameters */}
+ {operation.parameters &&
+ operation.parameters.filter((parameter) => parameter.in === 'header').length >
+ 0 && (
+
+ )}
+
+
+ {operation.responseList.length > 0 && (
+ <>
+ Responses
+
+ {operation.responseList.map((response: any) => (
+
+ {response.description}
+ {response?.content && response?.content['application/json'] && (
+
+
+ {JSON.stringify(response.content['application/json'], null, 2)}
+
+
+ )}
+
+ ))}
+
+ >
+ )}
+
+
+
+ ))}
+
+
+
+
+ )
+}
diff --git a/apps/docs/pages/reference/functions/config.tsx b/apps/docs/pages/reference/functions/config.tsx
new file mode 100644
index 00000000000..582a91f60c5
--- /dev/null
+++ b/apps/docs/pages/reference/functions/config.tsx
@@ -0,0 +1,115 @@
+import fs from 'fs'
+import matter from 'gray-matter'
+import components from '~/components/index'
+import { MDXRemote } from 'next-mdx-remote'
+import { serialize } from 'next-mdx-remote/serialize'
+
+// @ts-expect-error
+import specFile from '~/../../spec/functions_v0_config.yaml' assert { type: 'yml' }
+import { Parameter } from '~/lib/refGenerator/refTypes'
+
+import ReactMarkdown from 'react-markdown'
+
+// Parameters are grouped on the page by tag
+const TAGS = ['general', 'database']
+
+export default function Config(props) {
+ return (
+
+
+
+
{specFile.info.title} Configuration
+
{specFile.info.description}
+
+
+ {props.docs
+ .filter((doc) => doc.introPage)
+ .map((item) => (
+
+ ))}
+
+ {TAGS.map((tag) =>
+ specFile.parameters
+ .filter((param: Parameter) => param.tags[0] === tag)
+ .map((parameter: Parameter, index) => (
+
+ {index === 0 &&
{tag} Settings }
+
+
+
+ $
+ {parameter.title}
+
+
+
+
+
+ {parameter.description}
+
+
+
+ Required: {parameter.required.toString()}
+
+
+ Default:
+
+ {parameter.default ? parameter.default.toString() : 'None'}
+
+
+
+
+ {parameter.links &&
+ parameter.links.map((link) => (
+
+ ))}
+
+
+
+
+
+ ))
+ )}
+
+
+
+
+ )
+}
+export async function getServerSideProps() {
+ // an array of ids of the intro sections for this library
+ const introPages = ['functions']
+
+ const pages = [...introPages]
+
+ // Grab custom markdown intro page files
+ const allMarkdownDocs = await Promise.all(
+ pages.map(async (x: any, i) => {
+ const pathName = `docs/ref/functions/${x}.mdx`
+
+ const markdownExists = fs.existsSync(pathName)
+
+ const fileContents = markdownExists ? fs.readFileSync(pathName, 'utf8') : ''
+ const { data, content } = matter(fileContents)
+
+ return {
+ id: x,
+ title: x,
+ // ...content,
+ meta: data,
+ introPage: introPages.includes(x),
+ content: content ? await serialize(content || '') : null,
+ }
+ })
+ )
+
+ return {
+ props: {
+ docs: allMarkdownDocs,
+ },
+ }
+}
diff --git a/apps/docs/pages/reference/self-hosting-functions/[...slug].tsx b/apps/docs/pages/reference/self-hosting-functions/[...slug].tsx
new file mode 100644
index 00000000000..e64dd6b1ac5
--- /dev/null
+++ b/apps/docs/pages/reference/self-hosting-functions/[...slug].tsx
@@ -0,0 +1,24 @@
+import functionsSpec from '~/../../spec/transforms/functions_v0_openapi_deparsed.json' assert { type: 'json' }
+import selfHostingFunctionsCommonSections from '~/../../spec/common-self-hosting-functions-sections.json'
+import RefSectionHandler from '~/components/reference/RefSectionHandler'
+import { flattenSections } from '~/lib/helpers'
+import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'
+import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'
+import { gen_v3 } from '~/lib/refGenerator/helpers'
+
+const sections = flattenSections(selfHostingFunctionsCommonSections)
+
+// @ts-ignore
+const spec = gen_v3(functionsSpec, 'wat', { apiUrl: 'apiv0' })
+
+export default function JSReference(props) {
+ return
+}
+
+export async function getStaticProps() {
+ return handleRefStaticProps(sections, '/self-hosting-functions')
+}
+
+export function getStaticPaths() {
+ return handleRefGetStaticPaths()
+}
diff --git a/apps/docs/public/img/icons/menu/reference-functions.svg b/apps/docs/public/img/icons/menu/reference-functions.svg
new file mode 100644
index 00000000000..734a4c89e51
--- /dev/null
+++ b/apps/docs/public/img/icons/menu/reference-functions.svg
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/apps/docs/public/img/icons/menu/references-functions-light.svg b/apps/docs/public/img/icons/menu/references-functions-light.svg
new file mode 100644
index 00000000000..37dea5670d4
--- /dev/null
+++ b/apps/docs/public/img/icons/menu/references-functions-light.svg
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/package-lock.json b/package-lock.json
index 60f200cd147..f891be5d0ab 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -67632,7 +67632,7 @@
"react-markdown": "^8.0.3",
"react-syntax-highlighter": "^15.5.0",
"remark-gfm": "^3.0.1",
- "sql-formatter": "*",
+ "sql-formatter": "^12.2.0",
"sse.js": "^0.6.1",
"tailwind-merge": "^1.10.0",
"tailwindcss": "^3.0.15",
@@ -69355,7 +69355,7 @@
"framer-motion": "^6.5.1",
"globby": "^12.0.2",
"gray-matter": "^4.0.2",
- "lottie-react": "*",
+ "lottie-react": "^2.4.0",
"markdown-toc": "^1.2.0",
"marked": "^4.0.12",
"next": "12.3.2",
diff --git a/spec/Makefile b/spec/Makefile
index 4d435a6915a..6885dbc537e 100644
--- a/spec/Makefile
+++ b/spec/Makefile
@@ -71,6 +71,9 @@ dereference.storage.v0:
dereference.analytics.v0:
npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/analytics_v0_openapi_deparsed.json $(REPO_DIR)/analytics_v0_openapi.json
+dereference.functions.v0:
+ npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/functions_v0_openapi_deparsed.json $(REPO_DIR)/functions_v0_openapi.json
+
# No longer updated
# dereference.tsdoc.v1:
# cd $(REPO_DIR)/parser && npm run tsdoc:dereference:functions:v1
@@ -126,6 +129,9 @@ combine-raw.tsdoc.v2:
validate.analytics.v0:
npx swagger-cli validate --no-schema $(REPO_DIR)/analytics_v0_openapi.json
+validate.functions.v0:
+ npx swagger-cli validate --no-schema $(REPO_DIR)/functions_v0_openapi.json
+
###############################################################################
# Format everything - easier for git to track changes.
###############################################################################
diff --git a/spec/common-self-hosting-functions-sections.json b/spec/common-self-hosting-functions-sections.json
new file mode 100644
index 00000000000..21732ffa309
--- /dev/null
+++ b/spec/common-self-hosting-functions-sections.json
@@ -0,0 +1,104 @@
+[
+ {
+ "id": "introduction",
+ "title": "Introduction",
+ "slug": "introduction",
+ "summary": "Introduction",
+ "type": "markdown"
+ },
+ {
+ "title": "Management API",
+ "items": [
+ {
+ "id": "list-endpoints",
+ "slug": "list-endpoints",
+ "title": "List endpoints",
+ "type": "operation"
+ },
+ {
+ "id": "create-endpoint",
+ "slug": "create-endpoint",
+ "title": "Create endpoint",
+ "type": "operation"
+ },
+ {
+ "id": "delete-endpoint",
+ "slug": "delete-endpoint",
+ "title": "Delete endpoint",
+ "type": "operation"
+ },
+ {
+ "id": "fetch-endpoint",
+ "slug": "fetch-endpoint",
+ "title": "Fetch endpoint",
+ "type": "operation"
+ },
+ {
+ "id": "update-endpoint",
+ "slug": "update-endpoint",
+ "title": "Update endpoint",
+ "type": "operation"
+ },
+ {
+ "id": "list-sources",
+ "slug": "list-sources",
+ "title": "List sources",
+ "type": "operation"
+ },
+ {
+ "id": "create-source",
+ "slug": "create-source",
+ "title": "Create source",
+ "type": "operation"
+ },
+ {
+ "id": "delete-source",
+ "slug": "delete-source",
+ "title": "Delete source",
+ "type": "operation"
+ },
+ {
+ "id": "fetch-source",
+ "slug": "fetch-source",
+ "title": "Fetch source",
+ "type": "operation"
+ },
+ {
+ "id": "update-source",
+ "slug": "update-source",
+ "title": "Update source",
+ "type": "operation"
+ },
+ {
+ "id": "list-teams",
+ "slug": "list-teams",
+ "title": "List teams",
+ "type": "operation"
+ },
+ {
+ "id": "create-team",
+ "slug": "create-team",
+ "title": "Create team",
+ "type": "operation"
+ },
+ {
+ "id": "delete-team",
+ "slug": "delete-team",
+ "title": "Delete team",
+ "type": "operation"
+ },
+ {
+ "id": "fetch-team",
+ "slug": "fetch-team",
+ "title": "Fetch team",
+ "type": "operation"
+ },
+ {
+ "id": "update-team",
+ "slug": "update-team",
+ "title": "Update team",
+ "type": "operation"
+ }
+ ]
+ }
+]
diff --git a/spec/functions_v0_config.yaml b/spec/functions_v0_config.yaml
new file mode 100644
index 00000000000..6c73c5ce598
--- /dev/null
+++ b/spec/functions_v0_config.yaml
@@ -0,0 +1,73 @@
+configspec: '001'
+
+# This section outlines the general information for the tool.
+info:
+ id: 'functions' # {string} A unique ID for this tool.
+ version: 'next' # {string} The current version number of the tool.
+ title: 'Functions' # {string} A readable name.
+ source: 'https://github.com/supabase/edge-runtime' # {string} Where developers can find the source code.
+ bugs: 'https://github.com/supabase/edge-runtime/issues' # {string} Where developers can file bugs.
+ spec: 'https://github.com/supabase/supabase/blob/master/spec/realtime_v0_config.yml' # {string} Where developers can find this spec (to link directly in the docs).
+ description: |
+ You can use environment variables to configure your Functions Server.
+ tags:
+ - id: general
+ title: General Settings
+ description: General server settings.
+
+# This section is an array of public functions which a user might need to execute.
+parameters:
+ - id: 'LOGFLARE_SINGLE_TENANT' # {string} A unique identifier for this param.
+ title: 'LOGFLARE_SINGLE_TENANT' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'true'
+ type: 'boolean'
+ description: |
+ This is will seed a singular user into the database, and will disable browser authentication. All browser usage will default to this user. Inviting team users and other team-related functionality is currently not supported for self-hosted. Logflare self-hosted is currently intended for single-user experience only.
+ - id: 'LOGFLARE_API_KEY' # {string} A unique identifier for this param.
+ title: 'LOGFLARE_API_KEY' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: ''
+ type: 'string'
+ description: |
+ Allows you to pass in an API key that will used for authentication. This is intended for programmatic usage where an external program sets the API key. It is advised to use the UI to configure the access tokens instead. If this value is not provided, the default API key will be automatically generated.
+ - id: 'LOGFLARE_SUPABASE_MODE' # {string} A unique identifier for this param.
+ title: 'LOGFLARE_SUPABASE_MODE' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'false'
+ type: 'boolean'
+ description: |
+ This is a special mode for Logflare which will seed additional resources for usage with Supabase self-hosted.
+ - id: 'PHX_HTTP_PORT' # {string} A unique identifier for this param.
+ title: 'PHX_HTTP_PORT' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: '4000'
+ type: 'string'
+ description: |
+ Port which serves HTTP requests
+ - id: 'DB_SCHEMA' # {string} A unique identifier for this param.
+ title: 'DB_SCHEMA' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: ''
+ type: 'string'
+ description: |
+ This ENV variable sets the search path to a custom database schema. This allows you to customize the schema used on the database.
+ - id: 'LOGFLARE_LOG_LEVEL' # {string} A unique identifier for this param.
+ title: 'LOGFLARE_LOG_LEVEL' # {string} Any name.
+ tags: ['general'] # {string[]} These tags are useful for grouping parameters
+ links: [] # {string[]} These tags are useful for grouping parameters
+ required: true
+ default: 'info'
+ type: 'string'
+ description: |
+ Allows the setting of the log level at runtime. For production settings, we advise `warn`.
diff --git a/spec/functions_v0_openapi.json b/spec/functions_v0_openapi.json
new file mode 100644
index 00000000000..9322f478f8c
--- /dev/null
+++ b/spec/functions_v0_openapi.json
@@ -0,0 +1,983 @@
+{
+ "components": {
+ "responses": {},
+ "schemas": {
+ "Accepted": {
+ "title": "Accepted"
+ },
+ "Endpoint": {
+ "properties": {
+ "cache_duration_seconds": {
+ "type": "integer"
+ },
+ "enable_auth": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "max_limit": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proactive_requerying_seconds": {
+ "type": "integer"
+ },
+ "query": {
+ "type": "string"
+ },
+ "sandboxable": {
+ "type": "boolean"
+ },
+ "source_mapping": {
+ "type": "object"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": ["name", "query"],
+ "title": "Endpoint",
+ "type": "object"
+ },
+ "NotFound": {
+ "title": "NotFound"
+ },
+ "Notification": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "Source": {
+ "properties": {
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_table_ttl": {
+ "type": "integer"
+ },
+ "bq_table_id": {
+ "type": "string"
+ },
+ "bq_table_schema": {
+ "type": "object"
+ },
+ "custom_event_message_keys": {
+ "type": "string"
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "has_rejected_events": {
+ "type": "boolean"
+ },
+ "id": {},
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metrics": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "notifications": {
+ "items": {
+ "$ref": "#/components/schemas/Notification"
+ },
+ "type": "array"
+ },
+ "public_token": {
+ "type": "string"
+ },
+ "slack_hook_url": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webhook_notification_url": {
+ "type": "string"
+ }
+ },
+ "required": ["name"],
+ "title": "Source",
+ "type": "object"
+ },
+ "Team": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "team_users": {
+ "items": {
+ "$ref": "#/components/schemas/TeamUser"
+ },
+ "type": "array"
+ },
+ "token": {
+ "type": "string"
+ },
+ "user": {
+ "$ref": "#/components/schemas/User"
+ }
+ },
+ "required": ["name"],
+ "title": "Team",
+ "type": "object"
+ },
+ "TeamUser": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": ["email", "name"],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "User": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": ["email", "provider", "token", "provider_uid", "api_key"],
+ "title": "User",
+ "type": "object"
+ }
+ }
+ },
+ "info": {
+ "title": "logflare",
+ "version": "1.0.0"
+ },
+ "openapi": "3.0.0",
+ "paths": {
+ "/api/endpoints": {
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.index",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "items": {
+ "$ref": "#/components/schemas/Endpoint"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "description": "Endpoint List Response"
+ }
+ },
+ "summary": "List endpoints",
+ "tags": ["management"]
+ },
+ "post": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.create",
+ "parameters": [],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Endpoint"
+ }
+ }
+ },
+ "description": "Endpoint Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Endpoint"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Create endpoint",
+ "tags": ["management"]
+ }
+ },
+ "/api/endpoints/{token}": {
+ "delete": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.delete",
+ "parameters": [
+ {
+ "description": "Endpoint Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/Accepted"
+ }
+ }
+ },
+ "description": "Accepted Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Delete endpoint",
+ "tags": ["management", "management"]
+ },
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.show",
+ "parameters": [
+ {
+ "description": "Endpoint Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Endpoint"
+ }
+ }
+ },
+ "description": "Endpoint Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Fetch endpoint",
+ "tags": ["management"]
+ },
+ "patch": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.update",
+ "parameters": [
+ {
+ "description": "Endpoint Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Endpoint"
+ }
+ }
+ },
+ "description": "Endpoint Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Endpoint"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update endpoint",
+ "tags": ["management"]
+ },
+ "put": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.update (2)",
+ "parameters": [
+ {
+ "description": "Endpoint Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Endpoint"
+ }
+ }
+ },
+ "description": "Endpoint Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Endpoint"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update endpoint",
+ "tags": ["management"]
+ }
+ },
+ "/api/sources": {
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.index",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "items": {
+ "$ref": "#/components/schemas/Source"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "description": "Source List Response"
+ }
+ },
+ "summary": "List sources",
+ "tags": ["management"]
+ },
+ "post": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.create",
+ "parameters": [],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Source"
+ }
+ }
+ },
+ "description": "Source Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Source"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Create source",
+ "tags": ["management"]
+ }
+ },
+ "/api/sources/{token}": {
+ "delete": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.delete",
+ "parameters": [
+ {
+ "description": "Source Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/Accepted"
+ }
+ }
+ },
+ "description": "Accepted Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Delete source",
+ "tags": ["management"]
+ },
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.show",
+ "parameters": [
+ {
+ "description": "Source Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Source"
+ }
+ }
+ },
+ "description": "Source Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Fetch source",
+ "tags": ["management"]
+ },
+ "patch": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.update",
+ "parameters": [
+ {
+ "description": "Source Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Source"
+ }
+ }
+ },
+ "description": "Source Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Source"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update source",
+ "tags": ["management"]
+ },
+ "put": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.update (2)",
+ "parameters": [
+ {
+ "description": "Source Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Source"
+ }
+ }
+ },
+ "description": "Source Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Source"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update source",
+ "tags": ["management"]
+ }
+ },
+ "/api/teams": {
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.index",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "items": {
+ "$ref": "#/components/schemas/Team"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "description": "Team List Response"
+ }
+ },
+ "summary": "List teams",
+ "tags": ["management"]
+ },
+ "post": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.create",
+ "parameters": [],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Team"
+ }
+ }
+ },
+ "description": "Team Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Team"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Create Team",
+ "tags": ["management"]
+ }
+ },
+ "/api/teams/{token}": {
+ "delete": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.delete",
+ "parameters": [
+ {
+ "description": "Team Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/Accepted"
+ }
+ }
+ },
+ "description": "Accepted Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Delete Team",
+ "tags": ["management"]
+ },
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.show",
+ "parameters": [
+ {
+ "description": "Team Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Team"
+ }
+ }
+ },
+ "description": "Team Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Fetch team",
+ "tags": ["management"]
+ },
+ "patch": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.update",
+ "parameters": [
+ {
+ "description": "Team Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Team"
+ }
+ }
+ },
+ "description": "Team Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Team"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update team",
+ "tags": ["management"]
+ },
+ "put": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.update (2)",
+ "parameters": [
+ {
+ "description": "Team Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Team"
+ }
+ }
+ },
+ "description": "Team Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Team"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update team",
+ "tags": ["management"]
+ }
+ }
+ },
+ "security": [],
+ "servers": [
+ {
+ "url": "https://logflare.app",
+ "variables": {}
+ }
+ ],
+ "tags": []
+}
diff --git a/spec/transforms/functions_v0_openapi_deparsed.json b/spec/transforms/functions_v0_openapi_deparsed.json
new file mode 100644
index 00000000000..0f150f95c54
--- /dev/null
+++ b/spec/transforms/functions_v0_openapi_deparsed.json
@@ -0,0 +1,2902 @@
+{
+ "components": {
+ "responses": {},
+ "schemas": {
+ "Accepted": {
+ "title": "Accepted"
+ },
+ "Endpoint": {
+ "properties": {
+ "cache_duration_seconds": {
+ "type": "integer"
+ },
+ "enable_auth": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "max_limit": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proactive_requerying_seconds": {
+ "type": "integer"
+ },
+ "query": {
+ "type": "string"
+ },
+ "sandboxable": {
+ "type": "boolean"
+ },
+ "source_mapping": {
+ "type": "object"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "query"
+ ],
+ "title": "Endpoint",
+ "type": "object"
+ },
+ "NotFound": {
+ "title": "NotFound"
+ },
+ "Notification": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "Source": {
+ "properties": {
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_table_ttl": {
+ "type": "integer"
+ },
+ "bq_table_id": {
+ "type": "string"
+ },
+ "bq_table_schema": {
+ "type": "object"
+ },
+ "custom_event_message_keys": {
+ "type": "string"
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "has_rejected_events": {
+ "type": "boolean"
+ },
+ "id": {},
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metrics": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "notifications": {
+ "items": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "public_token": {
+ "type": "string"
+ },
+ "slack_hook_url": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webhook_notification_url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Source",
+ "type": "object"
+ },
+ "Team": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "team_users": {
+ "items": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "name"
+ ],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "token": {
+ "type": "string"
+ },
+ "user": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "provider",
+ "token",
+ "provider_uid",
+ "api_key"
+ ],
+ "title": "User",
+ "type": "object"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Team",
+ "type": "object"
+ },
+ "TeamUser": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "name"
+ ],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "User": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "provider",
+ "token",
+ "provider_uid",
+ "api_key"
+ ],
+ "title": "User",
+ "type": "object"
+ }
+ }
+ },
+ "info": {
+ "title": "logflare",
+ "version": "1.0.0"
+ },
+ "openapi": "3.0.0",
+ "paths": {
+ "/api/endpoints": {
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.index",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "items": {
+ "properties": {
+ "cache_duration_seconds": {
+ "type": "integer"
+ },
+ "enable_auth": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "max_limit": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proactive_requerying_seconds": {
+ "type": "integer"
+ },
+ "query": {
+ "type": "string"
+ },
+ "sandboxable": {
+ "type": "boolean"
+ },
+ "source_mapping": {
+ "type": "object"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "query"
+ ],
+ "title": "Endpoint",
+ "type": "object"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "description": "Endpoint List Response"
+ }
+ },
+ "summary": "List endpoints",
+ "tags": [
+ "management"
+ ]
+ },
+ "post": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.create",
+ "parameters": [],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "cache_duration_seconds": {
+ "type": "integer"
+ },
+ "enable_auth": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "max_limit": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proactive_requerying_seconds": {
+ "type": "integer"
+ },
+ "query": {
+ "type": "string"
+ },
+ "sandboxable": {
+ "type": "boolean"
+ },
+ "source_mapping": {
+ "type": "object"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "query"
+ ],
+ "title": "Endpoint",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Endpoint Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "cache_duration_seconds": {
+ "type": "integer"
+ },
+ "enable_auth": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "max_limit": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proactive_requerying_seconds": {
+ "type": "integer"
+ },
+ "query": {
+ "type": "string"
+ },
+ "sandboxable": {
+ "type": "boolean"
+ },
+ "source_mapping": {
+ "type": "object"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "query"
+ ],
+ "title": "Endpoint",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Create endpoint",
+ "tags": [
+ "management"
+ ]
+ }
+ },
+ "/api/endpoints/{token}": {
+ "delete": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.delete",
+ "parameters": [
+ {
+ "description": "Endpoint Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "Accepted"
+ }
+ }
+ },
+ "description": "Accepted Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Delete endpoint",
+ "tags": [
+ "management",
+ "management"
+ ]
+ },
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.show",
+ "parameters": [
+ {
+ "description": "Endpoint Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "cache_duration_seconds": {
+ "type": "integer"
+ },
+ "enable_auth": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "max_limit": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proactive_requerying_seconds": {
+ "type": "integer"
+ },
+ "query": {
+ "type": "string"
+ },
+ "sandboxable": {
+ "type": "boolean"
+ },
+ "source_mapping": {
+ "type": "object"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "query"
+ ],
+ "title": "Endpoint",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Endpoint Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Fetch endpoint",
+ "tags": [
+ "management"
+ ]
+ },
+ "patch": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.update",
+ "parameters": [
+ {
+ "description": "Endpoint Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "cache_duration_seconds": {
+ "type": "integer"
+ },
+ "enable_auth": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "max_limit": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proactive_requerying_seconds": {
+ "type": "integer"
+ },
+ "query": {
+ "type": "string"
+ },
+ "sandboxable": {
+ "type": "boolean"
+ },
+ "source_mapping": {
+ "type": "object"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "query"
+ ],
+ "title": "Endpoint",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Endpoint Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "cache_duration_seconds": {
+ "type": "integer"
+ },
+ "enable_auth": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "max_limit": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proactive_requerying_seconds": {
+ "type": "integer"
+ },
+ "query": {
+ "type": "string"
+ },
+ "sandboxable": {
+ "type": "boolean"
+ },
+ "source_mapping": {
+ "type": "object"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "query"
+ ],
+ "title": "Endpoint",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update endpoint",
+ "tags": [
+ "management"
+ ]
+ },
+ "put": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.EndpointController.update (2)",
+ "parameters": [
+ {
+ "description": "Endpoint Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "cache_duration_seconds": {
+ "type": "integer"
+ },
+ "enable_auth": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "max_limit": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proactive_requerying_seconds": {
+ "type": "integer"
+ },
+ "query": {
+ "type": "string"
+ },
+ "sandboxable": {
+ "type": "boolean"
+ },
+ "source_mapping": {
+ "type": "object"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "query"
+ ],
+ "title": "Endpoint",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Endpoint Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "cache_duration_seconds": {
+ "type": "integer"
+ },
+ "enable_auth": {
+ "type": "boolean"
+ },
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "max_limit": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "proactive_requerying_seconds": {
+ "type": "integer"
+ },
+ "query": {
+ "type": "string"
+ },
+ "sandboxable": {
+ "type": "boolean"
+ },
+ "source_mapping": {
+ "type": "object"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "query"
+ ],
+ "title": "Endpoint",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update endpoint",
+ "tags": [
+ "management"
+ ]
+ }
+ },
+ "/api/sources": {
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.index",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "items": {
+ "properties": {
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_table_ttl": {
+ "type": "integer"
+ },
+ "bq_table_id": {
+ "type": "string"
+ },
+ "bq_table_schema": {
+ "type": "object"
+ },
+ "custom_event_message_keys": {
+ "type": "string"
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "has_rejected_events": {
+ "type": "boolean"
+ },
+ "id": {},
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metrics": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "notifications": {
+ "items": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "public_token": {
+ "type": "string"
+ },
+ "slack_hook_url": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webhook_notification_url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Source",
+ "type": "object"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "description": "Source List Response"
+ }
+ },
+ "summary": "List sources",
+ "tags": [
+ "management"
+ ]
+ },
+ "post": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.create",
+ "parameters": [],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_table_ttl": {
+ "type": "integer"
+ },
+ "bq_table_id": {
+ "type": "string"
+ },
+ "bq_table_schema": {
+ "type": "object"
+ },
+ "custom_event_message_keys": {
+ "type": "string"
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "has_rejected_events": {
+ "type": "boolean"
+ },
+ "id": {},
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metrics": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "notifications": {
+ "items": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "public_token": {
+ "type": "string"
+ },
+ "slack_hook_url": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webhook_notification_url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Source",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Source Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_table_ttl": {
+ "type": "integer"
+ },
+ "bq_table_id": {
+ "type": "string"
+ },
+ "bq_table_schema": {
+ "type": "object"
+ },
+ "custom_event_message_keys": {
+ "type": "string"
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "has_rejected_events": {
+ "type": "boolean"
+ },
+ "id": {},
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metrics": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "notifications": {
+ "items": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "public_token": {
+ "type": "string"
+ },
+ "slack_hook_url": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webhook_notification_url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Source",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Create source",
+ "tags": [
+ "management"
+ ]
+ }
+ },
+ "/api/sources/{token}": {
+ "delete": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.delete",
+ "parameters": [
+ {
+ "description": "Source Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "Accepted"
+ }
+ }
+ },
+ "description": "Accepted Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Delete source",
+ "tags": [
+ "management"
+ ]
+ },
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.show",
+ "parameters": [
+ {
+ "description": "Source Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_table_ttl": {
+ "type": "integer"
+ },
+ "bq_table_id": {
+ "type": "string"
+ },
+ "bq_table_schema": {
+ "type": "object"
+ },
+ "custom_event_message_keys": {
+ "type": "string"
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "has_rejected_events": {
+ "type": "boolean"
+ },
+ "id": {},
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metrics": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "notifications": {
+ "items": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "public_token": {
+ "type": "string"
+ },
+ "slack_hook_url": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webhook_notification_url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Source",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Source Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Fetch source",
+ "tags": [
+ "management"
+ ]
+ },
+ "patch": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.update",
+ "parameters": [
+ {
+ "description": "Source Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_table_ttl": {
+ "type": "integer"
+ },
+ "bq_table_id": {
+ "type": "string"
+ },
+ "bq_table_schema": {
+ "type": "object"
+ },
+ "custom_event_message_keys": {
+ "type": "string"
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "has_rejected_events": {
+ "type": "boolean"
+ },
+ "id": {},
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metrics": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "notifications": {
+ "items": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "public_token": {
+ "type": "string"
+ },
+ "slack_hook_url": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webhook_notification_url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Source",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Source Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_table_ttl": {
+ "type": "integer"
+ },
+ "bq_table_id": {
+ "type": "string"
+ },
+ "bq_table_schema": {
+ "type": "object"
+ },
+ "custom_event_message_keys": {
+ "type": "string"
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "has_rejected_events": {
+ "type": "boolean"
+ },
+ "id": {},
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metrics": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "notifications": {
+ "items": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "public_token": {
+ "type": "string"
+ },
+ "slack_hook_url": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webhook_notification_url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Source",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update source",
+ "tags": [
+ "management"
+ ]
+ },
+ "put": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.SourceController.update (2)",
+ "parameters": [
+ {
+ "description": "Source Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_table_ttl": {
+ "type": "integer"
+ },
+ "bq_table_id": {
+ "type": "string"
+ },
+ "bq_table_schema": {
+ "type": "object"
+ },
+ "custom_event_message_keys": {
+ "type": "string"
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "has_rejected_events": {
+ "type": "boolean"
+ },
+ "id": {},
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metrics": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "notifications": {
+ "items": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "public_token": {
+ "type": "string"
+ },
+ "slack_hook_url": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webhook_notification_url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Source",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Source Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_table_ttl": {
+ "type": "integer"
+ },
+ "bq_table_id": {
+ "type": "string"
+ },
+ "bq_table_schema": {
+ "type": "object"
+ },
+ "custom_event_message_keys": {
+ "type": "string"
+ },
+ "favorite": {
+ "type": "boolean"
+ },
+ "has_rejected_events": {
+ "type": "boolean"
+ },
+ "id": {},
+ "inserted_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "metrics": {
+ "type": "object"
+ },
+ "name": {
+ "type": "string"
+ },
+ "notifications": {
+ "items": {
+ "properties": {
+ "other_email_notifications": {
+ "type": "string"
+ },
+ "team_user_ids_for_email": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_schema_updates": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "team_user_ids_for_sms": {
+ "allOf": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "user_email_notifications": {
+ "type": "boolean"
+ },
+ "user_schema_update_notifications": {
+ "type": "boolean"
+ },
+ "user_text_notifications": {
+ "type": "boolean"
+ }
+ },
+ "title": "Notification",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "public_token": {
+ "type": "string"
+ },
+ "slack_hook_url": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "updated_at": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "webhook_notification_url": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Source",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update source",
+ "tags": [
+ "management"
+ ]
+ }
+ },
+ "/api/teams": {
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.index",
+ "parameters": [],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "items": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "team_users": {
+ "items": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "name"
+ ],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "token": {
+ "type": "string"
+ },
+ "user": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "provider",
+ "token",
+ "provider_uid",
+ "api_key"
+ ],
+ "title": "User",
+ "type": "object"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Team",
+ "type": "object"
+ },
+ "type": "array"
+ }
+ }
+ },
+ "description": "Team List Response"
+ }
+ },
+ "summary": "List teams",
+ "tags": [
+ "management"
+ ]
+ },
+ "post": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.create",
+ "parameters": [],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "team_users": {
+ "items": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "name"
+ ],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "token": {
+ "type": "string"
+ },
+ "user": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "provider",
+ "token",
+ "provider_uid",
+ "api_key"
+ ],
+ "title": "User",
+ "type": "object"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Team",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Team Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "team_users": {
+ "items": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "name"
+ ],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "token": {
+ "type": "string"
+ },
+ "user": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "provider",
+ "token",
+ "provider_uid",
+ "api_key"
+ ],
+ "title": "User",
+ "type": "object"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Team",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Create Team",
+ "tags": [
+ "management"
+ ]
+ }
+ },
+ "/api/teams/{token}": {
+ "delete": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.delete",
+ "parameters": [
+ {
+ "description": "Team Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "Accepted"
+ }
+ }
+ },
+ "description": "Accepted Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Delete Team",
+ "tags": [
+ "management"
+ ]
+ },
+ "get": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.show",
+ "parameters": [
+ {
+ "description": "Team Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "team_users": {
+ "items": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "name"
+ ],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "token": {
+ "type": "string"
+ },
+ "user": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "provider",
+ "token",
+ "provider_uid",
+ "api_key"
+ ],
+ "title": "User",
+ "type": "object"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Team",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Team Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Fetch team",
+ "tags": [
+ "management"
+ ]
+ },
+ "patch": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.update",
+ "parameters": [
+ {
+ "description": "Team Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "team_users": {
+ "items": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "name"
+ ],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "token": {
+ "type": "string"
+ },
+ "user": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "provider",
+ "token",
+ "provider_uid",
+ "api_key"
+ ],
+ "title": "User",
+ "type": "object"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Team",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Team Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "team_users": {
+ "items": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "name"
+ ],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "token": {
+ "type": "string"
+ },
+ "user": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "provider",
+ "token",
+ "provider_uid",
+ "api_key"
+ ],
+ "title": "User",
+ "type": "object"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Team",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update team",
+ "tags": [
+ "management"
+ ]
+ },
+ "put": {
+ "callbacks": {},
+ "operationId": "LogflareWeb.Api.TeamController.update (2)",
+ "parameters": [
+ {
+ "description": "Team Token",
+ "in": "path",
+ "name": "token",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "team_users": {
+ "items": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "name"
+ ],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "token": {
+ "type": "string"
+ },
+ "user": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "provider",
+ "token",
+ "provider_uid",
+ "api_key"
+ ],
+ "title": "User",
+ "type": "object"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Team",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Team Parameters",
+ "required": false
+ },
+ "responses": {
+ "201": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "team_users": {
+ "items": {
+ "properties": {
+ "email": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "name"
+ ],
+ "title": "TeamUser",
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "token": {
+ "type": "string"
+ },
+ "user": {
+ "properties": {
+ "api_key": {
+ "type": "string"
+ },
+ "api_quota": {
+ "type": "integer"
+ },
+ "bigquery_dataset_id": {
+ "type": "string"
+ },
+ "bigquery_dataset_location": {
+ "type": "string"
+ },
+ "bigquery_project_id": {
+ "type": "string"
+ },
+ "company": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ },
+ "email_me_product": {
+ "type": "boolean"
+ },
+ "email_preferred": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "phone": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "email",
+ "provider",
+ "token",
+ "provider_uid",
+ "api_key"
+ ],
+ "title": "User",
+ "type": "object"
+ }
+ },
+ "required": [
+ "name"
+ ],
+ "title": "Team",
+ "type": "object"
+ }
+ }
+ },
+ "description": "Created Response"
+ },
+ "404": {
+ "content": {
+ "text/plain": {
+ "schema": {
+ "title": "NotFound"
+ }
+ }
+ },
+ "description": "Not found"
+ }
+ },
+ "summary": "Update team",
+ "tags": [
+ "management"
+ ]
+ }
+ }
+ },
+ "security": [],
+ "servers": [
+ {
+ "url": "https://logflare.app",
+ "variables": {}
+ }
+ ],
+ "tags": []
+}
From 988ea238b420ae71e988f01485f3a694c3064111 Mon Sep 17 00:00:00 2001
From: Copple <10214025+kiwicopple@users.noreply.github.com>
Date: Mon, 10 Apr 2023 17:53:34 +0200
Subject: [PATCH 02/10] fixes broken build
---
.../self-hosting-functions/introduction.mdx | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
index 7695d1a3dc0..76440809eee 100644
--- a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
+++ b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
@@ -7,7 +7,7 @@ hideTitle: true
-
Self-Hosting Analytics
+ Self-Hosting Functions
@@ -15,3 +15,20 @@ hideTitle: true
The Supabase Functions
+
+
+
+
+
+ ### Client libraries
+
+ - [JavaScript - Pino Transport](https://github.com/Logflare/pino-logflare)
+
+
+ ### Additional links
+
+ - [Source code](https://github.com/logflare/logflare)
+
+
+
+
From f86d70b134df89e7801f7d0f765e1a3b21c39bab Mon Sep 17 00:00:00 2001
From: Copple <10214025+kiwicopple@users.noreply.github.com>
Date: Mon, 10 Apr 2023 18:24:54 +0200
Subject: [PATCH 03/10] trying to fix the sidebar
---
...ommon-self-hosting-functions-sections.json | 78 -------------------
spec/functions_v0_config.yaml | 36 ---------
2 files changed, 114 deletions(-)
diff --git a/spec/common-self-hosting-functions-sections.json b/spec/common-self-hosting-functions-sections.json
index 21732ffa309..36d0aefad0e 100644
--- a/spec/common-self-hosting-functions-sections.json
+++ b/spec/common-self-hosting-functions-sections.json
@@ -20,84 +20,6 @@
"slug": "create-endpoint",
"title": "Create endpoint",
"type": "operation"
- },
- {
- "id": "delete-endpoint",
- "slug": "delete-endpoint",
- "title": "Delete endpoint",
- "type": "operation"
- },
- {
- "id": "fetch-endpoint",
- "slug": "fetch-endpoint",
- "title": "Fetch endpoint",
- "type": "operation"
- },
- {
- "id": "update-endpoint",
- "slug": "update-endpoint",
- "title": "Update endpoint",
- "type": "operation"
- },
- {
- "id": "list-sources",
- "slug": "list-sources",
- "title": "List sources",
- "type": "operation"
- },
- {
- "id": "create-source",
- "slug": "create-source",
- "title": "Create source",
- "type": "operation"
- },
- {
- "id": "delete-source",
- "slug": "delete-source",
- "title": "Delete source",
- "type": "operation"
- },
- {
- "id": "fetch-source",
- "slug": "fetch-source",
- "title": "Fetch source",
- "type": "operation"
- },
- {
- "id": "update-source",
- "slug": "update-source",
- "title": "Update source",
- "type": "operation"
- },
- {
- "id": "list-teams",
- "slug": "list-teams",
- "title": "List teams",
- "type": "operation"
- },
- {
- "id": "create-team",
- "slug": "create-team",
- "title": "Create team",
- "type": "operation"
- },
- {
- "id": "delete-team",
- "slug": "delete-team",
- "title": "Delete team",
- "type": "operation"
- },
- {
- "id": "fetch-team",
- "slug": "fetch-team",
- "title": "Fetch team",
- "type": "operation"
- },
- {
- "id": "update-team",
- "slug": "update-team",
- "title": "Update team",
- "type": "operation"
}
]
}
diff --git a/spec/functions_v0_config.yaml b/spec/functions_v0_config.yaml
index 6c73c5ce598..889b31075d3 100644
--- a/spec/functions_v0_config.yaml
+++ b/spec/functions_v0_config.yaml
@@ -35,39 +35,3 @@ parameters:
type: 'string'
description: |
Allows you to pass in an API key that will used for authentication. This is intended for programmatic usage where an external program sets the API key. It is advised to use the UI to configure the access tokens instead. If this value is not provided, the default API key will be automatically generated.
- - id: 'LOGFLARE_SUPABASE_MODE' # {string} A unique identifier for this param.
- title: 'LOGFLARE_SUPABASE_MODE' # {string} Any name.
- tags: ['general'] # {string[]} These tags are useful for grouping parameters
- links: [] # {string[]} These tags are useful for grouping parameters
- required: true
- default: 'false'
- type: 'boolean'
- description: |
- This is a special mode for Logflare which will seed additional resources for usage with Supabase self-hosted.
- - id: 'PHX_HTTP_PORT' # {string} A unique identifier for this param.
- title: 'PHX_HTTP_PORT' # {string} Any name.
- tags: ['general'] # {string[]} These tags are useful for grouping parameters
- links: [] # {string[]} These tags are useful for grouping parameters
- required: true
- default: '4000'
- type: 'string'
- description: |
- Port which serves HTTP requests
- - id: 'DB_SCHEMA' # {string} A unique identifier for this param.
- title: 'DB_SCHEMA' # {string} Any name.
- tags: ['general'] # {string[]} These tags are useful for grouping parameters
- links: [] # {string[]} These tags are useful for grouping parameters
- required: true
- default: ''
- type: 'string'
- description: |
- This ENV variable sets the search path to a custom database schema. This allows you to customize the schema used on the database.
- - id: 'LOGFLARE_LOG_LEVEL' # {string} A unique identifier for this param.
- title: 'LOGFLARE_LOG_LEVEL' # {string} Any name.
- tags: ['general'] # {string[]} These tags are useful for grouping parameters
- links: [] # {string[]} These tags are useful for grouping parameters
- required: true
- default: 'info'
- type: 'string'
- description: |
- Allows the setting of the log level at runtime. For production settings, we advise `warn`.
From 36f2ac8c698fe7eb05f60ef657e736cd2edc3071 Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Mon, 10 Apr 2023 14:23:45 -0230
Subject: [PATCH 04/10] Fix url root
---
.../components/Navigation/NavigationMenu/NavigationMenu.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
index 03670f64f95..85f1b9493ba 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.tsx
@@ -351,7 +351,7 @@ const NavigationMenu = () => {
id={'reference_self_hosting_functions'}
active={isReference_Self_Hosting_Functions}
commonSections={functionsServerCommonSections}
- lib="self-hosting-analytics"
+ lib="self-hosting-functions"
/>
)
From a750a3e0a7809f405eb4c52d678c0b40f17ca6cf Mon Sep 17 00:00:00 2001
From: Terry Sutton
Date: Mon, 10 Apr 2023 14:30:42 -0230
Subject: [PATCH 05/10] Fix light icon
---
.../public/img/icons/menu/reference-functions-light.svg | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 apps/docs/public/img/icons/menu/reference-functions-light.svg
diff --git a/apps/docs/public/img/icons/menu/reference-functions-light.svg b/apps/docs/public/img/icons/menu/reference-functions-light.svg
new file mode 100644
index 00000000000..37dea5670d4
--- /dev/null
+++ b/apps/docs/public/img/icons/menu/reference-functions-light.svg
@@ -0,0 +1,6 @@
+
+
+
+
+
+
From 124f477b84d52f725bb3a0865bdbc984adb1dee8 Mon Sep 17 00:00:00 2001
From: Inian
Date: Tue, 11 Apr 2023 12:50:58 +0800
Subject: [PATCH 06/10] update self hosting function docs
---
.../self-hosting-functions/introduction.mdx | 53 ++++++++++++++++---
...ommon-self-hosting-functions-sections.json | 17 ------
2 files changed, 47 insertions(+), 23 deletions(-)
diff --git a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
index 76440809eee..46ebfef9423 100644
--- a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
+++ b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
@@ -14,20 +14,61 @@ hideTitle: true
-The Supabase Functions
+A web server based on [Deno](https://deno.land) runtime, capable of running JavaScript, TypeScript, and WASM services.
+
+You can use it to:
+
+- Locally test and self-host Supabase's Edge Functions (or any Deno Edge Function)
+- As a programmable HTTP Proxy: You can intercept / route HTTP requests
+
+**WARNING: Beta Software. There will be breaking changes to APIs / Configuration Options**
+
+## How to run locally
+
+```bash
+./run.sh start --main-service /path/to/supabase/functions -p 9000
+```
+
+using Docker:
+
+```bash
+docker build -t edge-runtime .
+docker run -it --rm -p 9000:9000 -v /path/to/supabase/functions:/usr/services supabase/edge-runtime start --main-service /usr/services
+```
+
+## How to update to a newer Deno version
+
+- Select the Deno version to upgrade and visit its tag on GitHub (eg: https://github.com/denoland/deno/blob/v1.30.3/Cargo.toml)
+- Open the `Cargo.toml` at the root of of this repo and modify all `deno_*` modules to match to the selected tag of Deno.
+
+## Self hosting Edge Functions on Fly.io
+
+We have put together a demo on how to self-host edge functions on [Fly.io](http://Fly.io) (you can also use other providers like Digital Ocean or AWS).
+
+To try it yourself,
+
+- Sign up for an [Fly.io](http://Fly.io) account and install [flyctl](https://fly.io/docs/hands-on/install-flyctl/)
+- Clone the demo repository to your machine - https://github.com/supabase/self-hosted-edge-functions-demo
+- Copy your Edge Function into the `./functions` directory in the demo repo.
+- Update the Dockerfile to pull the latest edge-runtime image (check [releases](https://github.com/supabase/edge-runtime/pkgs/container/edge-runtime))
+- [Optional] Edit `./functions/main/index.ts`, adding any other request preprocessing logic (for example, you can enable JWT validation, handle CORS requests)
+- Run `fly launch` to create a new app to serve your Edge Functions
+- Access your Edge Function by visiting:
+ `https://{your-app-name}.fly.dev/{your-function-name}`
+
+You can view the logs for the Edge Runtime, by visiting Fly.io’s Dashboard > Your App > Metrics. Also, you can serve edge-runtime from multiple regions by running `fly regions add [REGION]`.
### Client libraries
+ - [JavaScript](https://supabase.com/docs/reference/javascript/functions-invoke)
+ - [Dart](https://supabase.com/docs/reference/dart/functions-invoke)
- - [JavaScript - Pino Transport](https://github.com/Logflare/pino-logflare)
+ ### Additional Links
-
- ### Additional links
-
- - [Source code](https://github.com/logflare/logflare)
+ - [Source code](https://github.com/supabase/edge-runtime/)
diff --git a/spec/common-self-hosting-functions-sections.json b/spec/common-self-hosting-functions-sections.json
index 36d0aefad0e..0ffa94e1b1a 100644
--- a/spec/common-self-hosting-functions-sections.json
+++ b/spec/common-self-hosting-functions-sections.json
@@ -5,22 +5,5 @@
"slug": "introduction",
"summary": "Introduction",
"type": "markdown"
- },
- {
- "title": "Management API",
- "items": [
- {
- "id": "list-endpoints",
- "slug": "list-endpoints",
- "title": "List endpoints",
- "type": "operation"
- },
- {
- "id": "create-endpoint",
- "slug": "create-endpoint",
- "title": "Create endpoint",
- "type": "operation"
- }
- ]
}
]
From d89be2682579cfb4d5539254dd3f8d74c6d138d6 Mon Sep 17 00:00:00 2001
From: Inian
Date: Tue, 11 Apr 2023 13:03:55 +0800
Subject: [PATCH 07/10] docs: changing warning to Admonition
---
apps/docs/docs/ref/self-hosting-functions/introduction.mdx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
index 46ebfef9423..82fb709de6a 100644
--- a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
+++ b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
@@ -21,7 +21,10 @@ You can use it to:
- Locally test and self-host Supabase's Edge Functions (or any Deno Edge Function)
- As a programmable HTTP Proxy: You can intercept / route HTTP requests
-**WARNING: Beta Software. There will be breaking changes to APIs / Configuration Options**
+
+ Self hosted Edge functions are in beta. There will be breaking changes to APIs / Configuration
+ Options.
+
## How to run locally
From a532150109aee21bb7ff16fd897f599c461b48f7 Mon Sep 17 00:00:00 2001
From: Inian
Date: Tue, 11 Apr 2023 13:16:11 +0800
Subject: [PATCH 08/10] remove unnecessary config reference for edge functions
---
.../NavigationMenu.constants.ts | 1 -
apps/docs/package.json | 5 +-
.../pages/reference/functions/[...slug].tsx | 167 ------------------
.../docs/pages/reference/functions/config.tsx | 115 ------------
.../self-hosting-functions/[...slug].tsx | 7 +-
spec/Makefile | 8 +-
6 files changed, 4 insertions(+), 299 deletions(-)
delete mode 100644 apps/docs/pages/reference/functions/[...slug].tsx
delete mode 100644 apps/docs/pages/reference/functions/config.tsx
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index c25afcfab74..c0a6546e6f2 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -860,7 +860,6 @@ export const self_hosting = {
name: 'Functions Server',
items: [
{ name: 'Reference', url: '/reference/self-hosting-functions/introduction', items: [] },
- { name: 'Configuration', url: '/guides/self-hosting/functions/config', items: [] },
],
},
],
diff --git a/apps/docs/package.json b/apps/docs/package.json
index 0e82a743e26..cfda86a3831 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -38,10 +38,7 @@
"gen:realtime:config": "ts-node ./generator/index.ts gen --type config --input ../../spec/realtime_v0_config.yaml --output ./docs/reference/realtime/generated/config.mdx",
"gen:analytics": "npm-run-all gen:analytics:config gen:analytics:usage",
"gen:analytics:config": "ts-node ./generator/index.ts gen --type config --input ../../spec/analytics_v0_config.yaml --output ./docs/reference/analytics/generated/config.mdx",
- "gen:analytics:usage": "ts-node ./generator/index.ts gen --type api --input ../../spec/transforms/analytics_v0_openapi_deparsed.json --output ./docs/reference/analytics/generated/usage.mdx",
- "gen:functions": "npm-run-all gen:functions:config gen:functions:usage",
- "gen:functions:config": "ts-node ./generator/index.ts gen --type config --input ../../spec/functions_v0_config.yaml --output ./docs/reference/functions/generated/config.mdx",
- "gen:functions:usage": "ts-node ./generator/index.ts gen --type api --input ../../spec/transforms/functions_v0_openapi_deparsed.json --output ./docs/reference/functions/generated/usage.mdx"
+ "gen:analytics:usage": "ts-node ./generator/index.ts gen --type api --input ../../spec/transforms/analytics_v0_openapi_deparsed.json --output ./docs/reference/analytics/generated/usage.mdx"
},
"dependencies": {
"@algolia/autocomplete-js": "^1.7.2",
diff --git a/apps/docs/pages/reference/functions/[...slug].tsx b/apps/docs/pages/reference/functions/[...slug].tsx
deleted file mode 100644
index e04800c6279..00000000000
--- a/apps/docs/pages/reference/functions/[...slug].tsx
+++ /dev/null
@@ -1,167 +0,0 @@
-import specFile from '~/../../spec/transforms/functions_v0_openapi_deparsed.json' assert { type: 'json' }
-import { gen_v3, enrichedOperation } from '~/lib/refGenerator/helpers'
-import { Tabs, CodeBlock } from 'ui'
-
-import RefSubLayout from '~/layouts/ref/RefSubLayout'
-
-export type AcceptedValue = {
- id: string
- name: string
- type: 'string' | 'boolean' | 'object'
- description?: string
-}
-
-export type Flag = {
- id: string
- name: string
- description: string
- default_value: string
- accepted_values: AcceptedValue[]
-}
-
-export type ApiParameter = {
- example: string
- in: string
- name: string
- required: boolean
- schema: {
- type: string
- example: string
- }
-}
-// @ts-ignore
-const generatedSpec = gen_v3(specFile, 'wat', { apiUrl: 'apiv0' })
-
-export default function Config() {
- return (
-
-
-
-
-
{generatedSpec.info.title}
-
{generatedSpec.info.description}
-
-
-
- {generatedSpec.operations.map((operation: any) => (
-
-
-
-
-
- {operation.operation}
- {operation.fullPath}
-
-
- {/* Path Parameters */}
- {operation.parameters &&
- operation.parameters.filter((parameter) => parameter.in === 'path').length >
- 0 && (
-
- )}
-
- {/* Header Parameters */}
- {operation.parameters &&
- operation.parameters.filter((parameter) => parameter.in === 'header').length >
- 0 && (
-
- )}
-
-
- {operation.responseList.length > 0 && (
- <>
- Responses
-
- {operation.responseList.map((response: any) => (
-
- {response.description}
- {response?.content && response?.content['application/json'] && (
-
-
- {JSON.stringify(response.content['application/json'], null, 2)}
-
-
- )}
-
- ))}
-
- >
- )}
-
-
-
- ))}
-
-
-
-
- )
-}
diff --git a/apps/docs/pages/reference/functions/config.tsx b/apps/docs/pages/reference/functions/config.tsx
deleted file mode 100644
index 582a91f60c5..00000000000
--- a/apps/docs/pages/reference/functions/config.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-import fs from 'fs'
-import matter from 'gray-matter'
-import components from '~/components/index'
-import { MDXRemote } from 'next-mdx-remote'
-import { serialize } from 'next-mdx-remote/serialize'
-
-// @ts-expect-error
-import specFile from '~/../../spec/functions_v0_config.yaml' assert { type: 'yml' }
-import { Parameter } from '~/lib/refGenerator/refTypes'
-
-import ReactMarkdown from 'react-markdown'
-
-// Parameters are grouped on the page by tag
-const TAGS = ['general', 'database']
-
-export default function Config(props) {
- return (
-
-
-
-
{specFile.info.title} Configuration
-
{specFile.info.description}
-
-
- {props.docs
- .filter((doc) => doc.introPage)
- .map((item) => (
-
- ))}
-
- {TAGS.map((tag) =>
- specFile.parameters
- .filter((param: Parameter) => param.tags[0] === tag)
- .map((parameter: Parameter, index) => (
-
- {index === 0 &&
{tag} Settings }
-
-
-
- $
- {parameter.title}
-
-
-
-
-
- {parameter.description}
-
-
-
- Required: {parameter.required.toString()}
-
-
- Default:
-
- {parameter.default ? parameter.default.toString() : 'None'}
-
-
-
-
- {parameter.links &&
- parameter.links.map((link) => (
-
- ))}
-
-
-
-
-
- ))
- )}
-
-
-
-
- )
-}
-export async function getServerSideProps() {
- // an array of ids of the intro sections for this library
- const introPages = ['functions']
-
- const pages = [...introPages]
-
- // Grab custom markdown intro page files
- const allMarkdownDocs = await Promise.all(
- pages.map(async (x: any, i) => {
- const pathName = `docs/ref/functions/${x}.mdx`
-
- const markdownExists = fs.existsSync(pathName)
-
- const fileContents = markdownExists ? fs.readFileSync(pathName, 'utf8') : ''
- const { data, content } = matter(fileContents)
-
- return {
- id: x,
- title: x,
- // ...content,
- meta: data,
- introPage: introPages.includes(x),
- content: content ? await serialize(content || '') : null,
- }
- })
- )
-
- return {
- props: {
- docs: allMarkdownDocs,
- },
- }
-}
diff --git a/apps/docs/pages/reference/self-hosting-functions/[...slug].tsx b/apps/docs/pages/reference/self-hosting-functions/[...slug].tsx
index e64dd6b1ac5..cf4639365fb 100644
--- a/apps/docs/pages/reference/self-hosting-functions/[...slug].tsx
+++ b/apps/docs/pages/reference/self-hosting-functions/[...slug].tsx
@@ -1,5 +1,5 @@
-import functionsSpec from '~/../../spec/transforms/functions_v0_openapi_deparsed.json' assert { type: 'json' }
import selfHostingFunctionsCommonSections from '~/../../spec/common-self-hosting-functions-sections.json'
+
import RefSectionHandler from '~/components/reference/RefSectionHandler'
import { flattenSections } from '~/lib/helpers'
import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'
@@ -8,11 +8,8 @@ import { gen_v3 } from '~/lib/refGenerator/helpers'
const sections = flattenSections(selfHostingFunctionsCommonSections)
-// @ts-ignore
-const spec = gen_v3(functionsSpec, 'wat', { apiUrl: 'apiv0' })
-
export default function JSReference(props) {
- return
+ return
}
export async function getStaticProps() {
diff --git a/spec/Makefile b/spec/Makefile
index 6885dbc537e..0b0a5114bae 100644
--- a/spec/Makefile
+++ b/spec/Makefile
@@ -57,7 +57,7 @@ download.analytics.v0:
###############################################################################
# Transform docs into working files
###############################################################################
-transform: dereference.api.v0 dereference.auth.v1 dereference.storage.v0 dereference.tsdoc.v2 combine.tsdoc.v2
+transform: dereference.api.v0 dereference.auth.v1 dereference.storage.v0 dereference.tsdoc.v2 combine.tsdoc.v2
dereference.api.v0:
npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/api_v0_openapi_deparsed.json $(REPO_DIR)/api_v0_openapi.json
@@ -71,9 +71,6 @@ dereference.storage.v0:
dereference.analytics.v0:
npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/analytics_v0_openapi_deparsed.json $(REPO_DIR)/analytics_v0_openapi.json
-dereference.functions.v0:
- npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/functions_v0_openapi_deparsed.json $(REPO_DIR)/functions_v0_openapi.json
-
# No longer updated
# dereference.tsdoc.v1:
# cd $(REPO_DIR)/parser && npm run tsdoc:dereference:functions:v1
@@ -129,9 +126,6 @@ combine-raw.tsdoc.v2:
validate.analytics.v0:
npx swagger-cli validate --no-schema $(REPO_DIR)/analytics_v0_openapi.json
-validate.functions.v0:
- npx swagger-cli validate --no-schema $(REPO_DIR)/functions_v0_openapi.json
-
###############################################################################
# Format everything - easier for git to track changes.
###############################################################################
From 30599dcae3030af8cae9e544e31768ab7e4f6bb8 Mon Sep 17 00:00:00 2001
From: Inian
Date: Tue, 11 Apr 2023 17:22:59 +0800
Subject: [PATCH 09/10] change to numbered bullets
---
.../ref/self-hosting-functions/introduction.mdx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
index 82fb709de6a..cea5d62f713 100644
--- a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
+++ b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
@@ -50,14 +50,14 @@ We have put together a demo on how to self-host edge functions on [Fly.io](http:
To try it yourself,
-- Sign up for an [Fly.io](http://Fly.io) account and install [flyctl](https://fly.io/docs/hands-on/install-flyctl/)
-- Clone the demo repository to your machine - https://github.com/supabase/self-hosted-edge-functions-demo
-- Copy your Edge Function into the `./functions` directory in the demo repo.
-- Update the Dockerfile to pull the latest edge-runtime image (check [releases](https://github.com/supabase/edge-runtime/pkgs/container/edge-runtime))
-- [Optional] Edit `./functions/main/index.ts`, adding any other request preprocessing logic (for example, you can enable JWT validation, handle CORS requests)
-- Run `fly launch` to create a new app to serve your Edge Functions
-- Access your Edge Function by visiting:
- `https://{your-app-name}.fly.dev/{your-function-name}`
+1. Sign up for an [Fly.io](http://Fly.io) account and install [flyctl](https://fly.io/docs/hands-on/install-flyctl/)
+2. Clone the demo repository to your machine - https://github.com/supabase/self-hosted-edge-functions-demo
+3. Copy your Edge Function into the `./functions` directory in the demo repo.
+4. Update the Dockerfile to pull the latest edge-runtime image (check [releases](https://github.com/supabase/edge-runtime/pkgs/container/edge-runtime))
+5. [Optional] Edit `./functions/main/index.ts`, adding any other request preprocessing logic (for example, you can enable JWT validation, handle CORS requests)
+6. Run `fly launch` to create a new app to serve your Edge Functions
+7. Access your Edge Function by visiting:
+ `https://{your-app-name}.fly.dev/{your-function-name}`
You can view the logs for the Edge Runtime, by visiting Fly.io’s Dashboard > Your App > Metrics. Also, you can serve edge-runtime from multiple regions by running `fly regions add [REGION]`.
From a14626e7f9a53e4307586e9359c2d06bcb3b5324 Mon Sep 17 00:00:00 2001
From: Greg Richardson
Date: Wed, 12 Apr 2023 08:40:31 -0600
Subject: [PATCH 10/10] docs: remove duplicate 'of'
---
apps/docs/docs/ref/self-hosting-functions/introduction.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
index cea5d62f713..f5624ed9f1f 100644
--- a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
+++ b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx
@@ -42,7 +42,7 @@ docker run -it --rm -p 9000:9000 -v /path/to/supabase/functions:/usr/services su
## How to update to a newer Deno version
- Select the Deno version to upgrade and visit its tag on GitHub (eg: https://github.com/denoland/deno/blob/v1.30.3/Cargo.toml)
-- Open the `Cargo.toml` at the root of of this repo and modify all `deno_*` modules to match to the selected tag of Deno.
+- Open the `Cargo.toml` at the root of this repo and modify all `deno_*` modules to match to the selected tag of Deno.
## Self hosting Edge Functions on Fly.io