import { AuthenticationService, Endpoint, GoogleOIDCProvider } from 'wirejs-resources'; import { Chat } from './apps/chat.js'; import { Todos } from './apps/todos.js'; import { Wiki } from './apps/wiki.js'; import { Store } from './apps/store.js'; import { Admin } from './apps/admin.js'; import { LLM } from './apps/llm/index.js'; import { Mailer } from './apps/email.js'; export type * from './apps/llm/index.js'; export type * from './apps/todos.js'; export type * from './apps/store.js'; export type * from './apps/admin.js'; const authService = new AuthenticationService('app', 'core-users', { oidcProviders: [ GoogleOIDCProvider ] }); export const auth = authService.buildApi(); export const chat = Chat(auth); export const todos = Todos(auth); export const wiki = Wiki(auth); export const store = Store(auth); export const admin = Admin(auth); export const llm = LLM(auth); export const mailer = Mailer(auth); new Endpoint('app', 'sample-endpoint', { description: "Sample endpoint to show programmatic endpoint creation.", handle(context) { context.responseHeaders['Content-Type'] = 'text/html; charset=utf-8'; return "
Hello!
Back."; } }); new Endpoint('app', 'sample-wildcard-endpoint', { path: 'wildcard-endpoint/%', description: "Sample endpoint to show programmatic wildcard endpoint creation.", handle(context) { context.responseHeaders['Content-Type'] = 'text/html; charset=utf-8'; return `
Back. `; } });