1export async function pollEnabledStatus() {
2 // this shouldn't run forever just b/c someone forgot to close their browser tab with the demo in it
3 const interval = 1000; // 10000;
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function PdfContent({ data, content }) {
4 // const { content, contentURL, docsURL } = config;
5 // console.log("content: ", content);
21
22// Type guards
23export function isApiError(data: DemoData): data is ApiErrorResponse {
24 return 'message' in data && 'status' in data;
25}
26
27export function isNotionPage(data: DemoData): data is NotionPage {
28 return 'object' in data && data.object === 'page';
29}
44
45// Prepare initial data
46async function prepareInitialData(): Promise<{
47 demoData: DemoData | null;
48 loading: boolean;
91
92// Initialize the app
93async function initializeApp() {
94 const root = document.getElementById("root");
95 if (!root) {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function IframeContent({ data, content }) {
4 // const { content, contentURL, docsURL } = config;
5 // console.log("content: ", content);
8});
9
10function buildData(response) {
11 return {
12 status: "connected",
23// we present that at root and embed that into Notion
24// to show everyone that the connection is healthy btw Notion and val.town
25export default async function (interval: Interval) {
26 const blobKey = await blobKeyForDemoCache(import.meta.url, "healthCheck");
27 try {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function GettingStartedContent({ data, title }) {
4 // const { content, contentURL, docsURL } = config;
5 // console.log("data: ", data);
6});
7
8export async function getRelatedPagesFromDatabase(
9 pageId: string // the /demo page
10) {
6});
7
8export async function getPage(id: string) {
9 // get page
10 try {
6});
7
8export async function getDatabase(id: string) {
9 // get database
10 try {
6});
7
8export async function getAllInteractionsPages() {
9 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
10
36}
37
38export async function getAllInteractionsPagesWithPagination() {
39 const databaseId = Deno.env.get("GLANCE_INTERACTIONS_DB_ID");
40
A helper function to build a file's email
Simple functional CSS library for Val Town
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.