The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
self-hosted functions
Copple3767deff7482
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.tsindex 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.tsxindex 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')+ breakdefault:break@@ -216,6 +222,7 @@ const NavigationMenu = () => {const isReference_Self_Hosting_Storage = 'reference_self_hosting_storage' === levelconst isReference_Self_Hosting_Realtime = 'reference_self_hosting_realtime' === levelconst isReference_Self_Hosting_Analytics = 'reference_self_hosting_analytics' === level+ const isReference_Self_Hosting_Functions = 'reference_self_hosting_functions' === levelreturn (<div className={['flex relative', 'justify-center lg:justify-start'].join(' ')}>@@ -339,6 +346,13 @@ const NavigationMenu = () => {commonSections={analyticsServerCommonSections}lib="self-hosting-analytics"/>+ <NavigationMenuRefList+ key={'reference-self-hosting-functions-menu'}+ id={'reference_self_hosting_functions'}+ active={isReference_Self_Hosting_Functions}+ commonSections={functionsServerCommonSections}+ lib="self-hosting-analytics"+ /></div>)}diff --git a/apps/docs/docs/ref/self-hosting-functions/introduction.mdx b/apps/docs/docs/ref/self-hosting-functions/introduction.mdxnew file mode 100644index 00000000000..7695d1a3dc0--- /dev/null+++ b/apps/docs/docs/ref/self-hosting-functions/introduction.mdx@@ -0,0 +1,17 @@+---+id: introduction+title: Introduction+hideTitle: true+---++<div className="flex items-start gap-6 not-prose" id="introduction">+ <img src="/docs/img/icons/menu/reference-analytics.svg" className="w-8 h-8 rounded" />+ <div className="flex flex-col gap-2">+ <h1 className="text-3xl text-scale-1200 m-0">Self-Hosting Analytics</h1>+ </div>+</div>++<RefSubLayout.EducationRow>+ <RefSubLayout.Details>++The Supabase Functionsdiff --git a/apps/docs/layouts/SiteLayout.tsx b/apps/docs/layouts/SiteLayout.tsxindex 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.tsxindex 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-errorimport 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.jsonindex 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].tsxnew file mode 100644index 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 (+ <RefSubLayout>+ <div className="flex my-16">+ <div className="w-full">+ <div className="grid gap-16">+ <h1 className="text-4xl uppercase">{generatedSpec.info.title}</h1>+ <p>{generatedSpec.info.description}</p>+ </div>++ <div className="grid gap-32 mx-auto max-w-5xl mt-24">+ {generatedSpec.operations.map((operation: any) => (+ <div className="border-b pb-8">+ <RefSubLayout.Section+ slug={operation.id}+ title={operation.summary}+ id={operation.operationId}+ monoFont={false}+ >+ <RefSubLayout.Details>+ <div className="mt-4">+ <code className="text-md flex gap-4 text-md text-scale-900 break-all">+ <span className="uppercase whitespace-nowrap ">{operation.operation}</span>+ {operation.fullPath}+ </code>+ </div>+ {/* Path Parameters */}+ {operation.parameters &&+ operation.parameters.filter((parameter) => parameter.in === 'path').length >+ 0 && (+ <div className="mt-12">+ <h2 className="border-b pb-2 text-xl">Path parameters</h2>+ <ul className="mt-4">+ {operation.parameters &&+ operation.parameters+ .filter((parameter: any) => parameter.in === 'path')+ .map((parameter: any) => (+ <li className="mt-8 border-b pb-6">+ <div>+ <div className="flex gap-4 items-center">+ <span className="font-bold">{parameter.name}</span>+ <div className="font-mono text-xs break-all">+ {parameter.required && (+ <div className="text-[10px] border border-amber-700 bg-amber-300 text-amber-900 px-2 tracking-wide font-mono py-0.25 rounded-full">+ REQUIRED+ </div>+ )}+ </div>+ </div>+ <p className="mt-4">{parameter.description}</p>+ </div>+ {parameter.example && (+ <div className="mt-4 flex gap-4 items-center">+ <span>Example:</span>+ <span className="font-mono text-xs break-all">+ {parameter.example}+ </span>+ </div>+ )}+ </li>+ ))}+ </ul>+ </div>+ )}++ {/* Header Parameters */}+ {operation.parameters &&+ operation.parameters.filter((parameter) => parameter.in === 'header').length >+ 0 && (+ <div className="mt-12">+ <h2 className="border-b pb-2 text-xl">Header parameters</h2>+ <ul className="mt-4">+ {operation.parameters &&+ operation.parameters+ .filter((parameter: any) => parameter.in === 'header')+ .map((parameter: any) => (+ <li className="mt-8 border-b pb-6">+ <div className="flex gap-4 items-center">+ <span className="font-bold">{parameter.name}</span>+ <span className="font-mono text-xs break-all">+ {parameter.required && 'required'}+ </span>+ </div>+ <div className="mt-4 flex gap-4 items-center">+ <span>Example:</span>+ <span className="font-mono text-xs break-all">+ {parameter.example}+ </span>+ </div>+ </li>+ ))}+ </ul>+ </div>+ )}+ </RefSubLayout.Details>+ <RefSubLayout.Examples>+ {operation.responseList.length > 0 && (+ <>+ <h2 className="text-xl">Responses</h2>+ <Tabs+ scrollable+ size="small"+ type="underlined"+ defaultActiveId={+ operation.responseList[0].responseCode ??+ operation.responseList[0].responseCode+ }+ >+ {operation.responseList.map((response: any) => (+ <Tabs.Panel id={response.responseCode} label={response.responseCode}>+ <p>{response.description}</p>+ {response?.content && response?.content['application/json'] && (+ <div className="mt-8">+ <CodeBlock language="bash" className="relative">+ {JSON.stringify(response.content['application/json'], null, 2)}+ </CodeBlock>+ </div>+ )}+ </Tabs.Panel>+ ))}+ </Tabs>+ </>+ )}+ </RefSubLayout.Examples>+ </RefSubLayout.Section>+ </div>+ ))}+ </div>+ </div>+ </div>+ </RefSubLayout>+ )+}diff --git a/apps/docs/pages/reference/functions/config.tsx b/apps/docs/pages/reference/functions/config.tsxnew file mode 100644index 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 (+ <div>+ <div className="flex my-16">+ <div className="w-full prose">+ <h1 className="text-4xl mb-16">{specFile.info.title} Configuration</h1>+ <ReactMarkdown>{specFile.info.description}</ReactMarkdown>+ <div>+ <div>+ {props.docs+ .filter((doc) => doc.introPage)+ .map((item) => (+ <MDXRemote {...item.content} components={components} />+ ))}+ </div>+ {TAGS.map((tag) =>+ specFile.parameters+ .filter((param: Parameter) => param.tags[0] === tag)+ .map((parameter: Parameter, index) => (+ <div>+ {index === 0 && <h2 className="text-xl capitalize">{tag} Settings</h2>}+ <div className="mt-8">+ <div>+ <h2 className="text-xl font-medium text-scale-1200 font-mono">+ <span className="mr-2">$</span>+ {parameter.title}+ </h2>+ <div className="grid" id={parameter.id}>+ <div className="border-b pb-8" key={parameter.id}>+ <div className=" mb-16">+ <p className="mb-4 scroll-mt-16 mt-0 text-scale-1100 text-base">+ <ReactMarkdown>{parameter.description}</ReactMarkdown>+ </p>+ <div className="grid gap-2">+ <div className="flex gap-2">+ Required: <code>{parameter.required.toString()}</code>+ </div>+ <div className="flex gap-2">+ Default:+ <code>+ {parameter.default ? parameter.default.toString() : 'None'}+ </code>+ </div>+ </div>+ </div>+ {parameter.links &&+ parameter.links.map((link) => (+ <div>+ <h3>See also:</h3>+ <li>+ <a href={link.link}>{link.name}</a>+ </li>+ </div>+ ))}+ </div>+ </div>+ </div>+ </div>+ </div>+ ))+ )}+ </div>+ </div>+ </div>+ </div>+ )+}+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].tsxnew file mode 100644index 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 <RefSectionHandler sections={sections} spec={spec} pageProps={props} type="api" />+}++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.svgnew file mode 100644index 00000000000..734a4c89e51--- /dev/null+++ b/apps/docs/public/img/icons/menu/reference-functions.svg@@ -0,0 +1,6 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<circle cx="12.625" cy="3.43188" r="2" fill="#133929" stroke="#4CC38A" stroke-miterlimit="10" stroke-linejoin="bevel"/>+<circle cx="3.37109" cy="12.561" r="2" fill="#133929" stroke="#4CC38A" stroke-miterlimit="10" stroke-linejoin="bevel"/>+<path d="M1.85724 11.3593C1.31075 10.3621 1 9.21735 1 8C1 4.13401 4.13401 1 8 1C9.18025 1 10.2923 1.29209 11.2677 1.80794M4.77293 14.2134C5.73858 14.716 6.83612 15 8 15C11.866 15 15 11.866 15 8C15 6.81345 14.7048 5.69585 14.1838 4.71665" stroke="#4CC38A" stroke-miterlimit="10" stroke-linejoin="bevel"/>+<circle cx="8" cy="8" r="4.5" fill="#133929" stroke="#4CC38A" stroke-miterlimit="10" stroke-linejoin="bevel"/>+</svg>diff --git a/apps/docs/public/img/icons/menu/references-functions-light.svg b/apps/docs/public/img/icons/menu/references-functions-light.svgnew file mode 100644index 00000000000..37dea5670d4--- /dev/null+++ b/apps/docs/public/img/icons/menu/references-functions-light.svg@@ -0,0 +1,6 @@+<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">+<circle cx="12.625" cy="3.78271" r="2" fill="#92CEAC" stroke="#299764" stroke-miterlimit="10" stroke-linejoin="bevel"/>+<circle cx="3.37109" cy="12.9119" r="2" fill="#92CEAC" stroke="#299764" stroke-miterlimit="10" stroke-linejoin="bevel"/>+<path d="M1.85724 11.7101C1.31075 10.7129 1 9.56818 1 8.35083C1 4.48484 4.13401 1.35083 8 1.35083C9.18025 1.35083 10.2923 1.64292 11.2677 2.15877M4.77293 14.5642C5.73858 15.0668 6.83612 15.3508 8 15.3508C11.866 15.3508 15 12.2168 15 8.35083C15 7.16428 14.7048 6.04668 14.1838 5.06748" stroke="#299764" stroke-miterlimit="10" stroke-linejoin="bevel"/>+<circle cx="8" cy="8.35083" r="4.5" fill="#92CEAC" stroke="#299764" stroke-miterlimit="10" stroke-linejoin="bevel"/>+</svg>diff --git a/package-lock.json b/package-lock.jsonindex 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/Makefileindex 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.jsonnew file mode 100644index 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.yamlnew file mode 100644index 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.jsonnew file mode 100644index 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.jsonnew file mode 100644index 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": []+}