qarpeo 0.1.18 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -96
- package/dist/chunks/auth-schema.mjs +3 -1
- package/dist/chunks/wrangler.mjs +22 -3
- package/dist/cli/index.mjs +448 -221
- package/dist/fate/index.d.ts +29 -22
- package/dist/fate/index.mjs +1 -3
- package/dist/module.d.ts +1 -1
- package/dist/module.mjs +103 -82
- package/dist/runtime/ai.d.ts +2 -2
- package/dist/runtime/app/components/BlobImage.vue +119 -107
- package/dist/runtime/app/components/CMSBlocks.vue +104 -93
- package/dist/runtime/app/components/CMSContent.vue +24 -23
- package/dist/runtime/app/components/CMSImage.vue +49 -49
- package/dist/runtime/app/components/CMSLocaleSwitcher.vue +110 -110
- package/dist/runtime/app/components/CMSPreviewBanner.vue +83 -79
- package/dist/runtime/app/components/CMSVersionBanner.vue +53 -49
- package/dist/runtime/app/components/CMSVersionSwitcher.vue +140 -140
- package/dist/runtime/app/components/ContentRenderer.vue +83 -80
- package/dist/runtime/app/components/FileUpload.vue +200 -196
- package/dist/runtime/app/components/ImpersonationBanner.vue +61 -57
- package/dist/runtime/app/components/QarpeoWelcome.vue +84 -84
- package/dist/runtime/app/components/SignedIn.vue +13 -13
- package/dist/runtime/app/components/SignedOut.vue +13 -13
- package/dist/runtime/app/components/shiki.css +34 -34
- package/dist/runtime/app/composables/ai.d.ts +22 -22
- package/dist/runtime/app/composables/ai.mjs +3 -7
- package/dist/runtime/app/composables/analytics.mjs +1 -1
- package/dist/runtime/app/composables/api-tokens.mjs +1 -1
- package/dist/runtime/app/composables/auth.d.ts +6 -7
- package/dist/runtime/app/composables/auth.mjs +6 -3
- package/dist/runtime/app/composables/chat.mjs +3 -7
- package/dist/runtime/app/composables/cms-preview.d.ts +3 -3
- package/dist/runtime/app/composables/cms-preview.mjs +1 -1
- package/dist/runtime/app/composables/cms.d.ts +3 -5
- package/dist/runtime/app/composables/cms.mjs +2 -2
- package/dist/runtime/app/composables/docs-version.d.ts +8 -7
- package/dist/runtime/app/composables/docs-version.mjs +3 -3
- package/dist/runtime/app/composables/impersonation.mjs +1 -1
- package/dist/runtime/app/composables/notifications.d.ts +5 -5
- package/dist/runtime/app/composables/notifications.mjs +4 -5
- package/dist/runtime/app/composables/organization.mjs +1 -1
- package/dist/runtime/app/composables/passkey.mjs +1 -1
- package/dist/runtime/app/composables/passwordless.mjs +1 -1
- package/dist/runtime/app/composables/payments.d.ts +2 -1
- package/dist/runtime/app/composables/payments.mjs +1 -1
- package/dist/runtime/app/composables/realtime.d.ts +13 -13
- package/dist/runtime/app/composables/realtime.mjs +2 -2
- package/dist/runtime/app/composables/resumable-upload.d.ts +11 -11
- package/dist/runtime/app/composables/resumable-upload.mjs +1 -1
- package/dist/runtime/app/composables/site.mjs +1 -1
- package/dist/runtime/app/composables/storage.d.ts +151 -11
- package/dist/runtime/app/composables/storage.mjs +291 -33
- package/dist/runtime/app/composables/turnstile.mjs +1 -1
- package/dist/runtime/app/composables/two-factor.mjs +1 -1
- package/dist/runtime/app/pages/devtools/agents.vue +716 -716
- package/dist/runtime/app/pages/devtools/analytics.vue +616 -616
- package/dist/runtime/app/pages/devtools/auth.vue +381 -350
- package/dist/runtime/app/pages/devtools/blob.vue +743 -744
- package/dist/runtime/app/pages/devtools/db.vue +545 -545
- package/dist/runtime/app/pages/devtools/domains.vue +771 -771
- package/dist/runtime/app/pages/devtools/kv.vue +827 -828
- package/dist/runtime/app/pages/devtools/logs.vue +649 -653
- package/dist/runtime/app/pages/devtools/mail.vue +388 -388
- package/dist/runtime/app/pages/devtools/overview.vue +391 -389
- package/dist/runtime/app/pages/devtools/realtime.vue +89 -27
- package/dist/runtime/app/pages/devtools/security.vue +20 -5
- package/dist/runtime/app/pages/devtools/settings.vue +559 -559
- package/dist/runtime/app/pages/devtools/tasks.vue +26 -10
- package/dist/runtime/app/pages/devtools.vue +176 -176
- package/dist/runtime/app/plugins/seo.mjs +1 -1
- package/dist/runtime/app/plugins/shortcuts.client.d.ts +1 -4
- package/dist/runtime/app/public/sw-notifications.mjs +47 -52
- package/dist/runtime/blob.mjs +11 -4
- package/dist/runtime/browser.d.ts +1 -1
- package/dist/runtime/browser.mjs +12 -2
- package/dist/runtime/cache.d.ts +2 -1
- package/dist/runtime/kv.mjs +4 -1
- package/dist/runtime/providers/qarpeo.d.ts +3 -3
- package/dist/runtime/server/durable-objects/agent.mjs +1 -1
- package/dist/runtime/server/durable-objects/room.d.ts +2 -2
- package/dist/runtime/server/durable-objects/room.mjs +5 -5
- package/dist/runtime/server/middleware/devtools.mjs +6 -2
- package/dist/runtime/server/plugins/cms.d.ts +4 -2
- package/dist/runtime/server/plugins/dev-proxy.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.mjs +4 -1
- package/dist/runtime/server/routes/__qarpeo/analytics/events.get.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.mjs +5 -1
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/logs.get.d.ts +4 -1
- package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.mjs +2 -2
- package/dist/runtime/server/routes/__qarpeo/overview.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/realtime/broadcast.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/realtime/broadcast.post.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/realtime/clear.post.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/realtime/clear.post.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/realtime/disconnect.post.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/realtime/disconnect.post.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/realtime/room.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/realtime/rooms.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/security/analytics.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/security/ban.post.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/security/clear.post.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/security/unban.post.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/settings.get.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/tasks/run.post.mjs +3 -1
- package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +8 -2
- package/dist/runtime/server/routes/agents/[agent]/clear.post.mjs +8 -2
- package/dist/runtime/server/routes/agents/[agent]/history.get.mjs +8 -2
- package/dist/runtime/server/routes/ai/embed.post.d.ts +1 -4
- package/dist/runtime/server/routes/ai/search.post.d.ts +2 -2
- package/dist/runtime/server/routes/auth/account.delete.mjs +1 -1
- package/dist/runtime/server/routes/auth/handler.mjs +6 -1
- package/dist/runtime/server/routes/auth/magic-link/verify.get.mjs +1 -1
- package/dist/runtime/server/routes/auth/organization/members/[id].delete.mjs +7 -1
- package/dist/runtime/server/routes/auth/otp/verify.post.mjs +1 -1
- package/dist/runtime/server/routes/auth/sso/login.get.mjs +7 -1
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.mjs +8 -2
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.mjs +7 -2
- package/dist/runtime/server/routes/auth/webauthn/login/options.post.mjs +1 -1
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.mjs +7 -2
- package/dist/runtime/server/routes/auth/webauthn/register/options.post.mjs +6 -1
- package/dist/runtime/server/routes/auth/webauthn/register/verify.post.mjs +6 -1
- package/dist/runtime/server/routes/browser/crawl.post.d.ts +1 -2
- package/dist/runtime/server/routes/browser/invoice.post.d.ts +1 -2
- package/dist/runtime/server/routes/browser/og-image.post.d.ts +2 -2
- package/dist/runtime/server/routes/browser/pdf.post.d.ts +1 -2
- package/dist/runtime/server/routes/browser/pdf.post.mjs +6 -1
- package/dist/runtime/server/routes/browser/screenshot.post.d.ts +2 -2
- package/dist/runtime/server/routes/browser/screenshot.post.mjs +5 -1
- package/dist/runtime/server/routes/cms/components/index.get.d.ts +2 -2
- package/dist/runtime/server/routes/cms/preview/disable.get.d.ts +4 -3
- package/dist/runtime/server/routes/cms/preview/enable.get.d.ts +8 -8
- package/dist/runtime/server/routes/cms/search.get.mjs +1 -1
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.d.ts +7 -7
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.mjs +9 -2
- package/dist/runtime/server/routes/docs/search.get.d.ts +9 -9
- package/dist/runtime/server/routes/fate.mjs +5 -8
- package/dist/runtime/server/routes/mail/bounce.post.d.ts +2 -2
- package/dist/runtime/server/routes/mail/unsubscribe.d.ts +2 -2
- package/dist/runtime/server/routes/mail/webhooks.post.d.ts +2 -2
- package/dist/runtime/server/routes/mail/webhooks.post.mjs +7 -1
- package/dist/runtime/server/routes/payments/usage.get.d.ts +8 -8
- package/dist/runtime/server/routes/payments/usage.post.d.ts +2 -2
- package/dist/runtime/server/routes/realtime/history.delete.d.ts +4 -3
- package/dist/runtime/server/routes/realtime/history.get.d.ts +7 -6
- package/dist/runtime/server/routes/realtime/ws.get.mjs +6 -1
- package/dist/runtime/server/routes/robots.txt.get.mjs +1 -1
- package/dist/runtime/server/routes/sitemap.xml.get.mjs +2 -1
- package/dist/runtime/server/routes/storage/multipart/abort.post.d.ts +2 -2
- package/dist/runtime/server/routes/storage/multipart/complete.post.d.ts +2 -2
- package/dist/runtime/server/routes/storage/multipart/complete.post.mjs +2 -2
- package/dist/runtime/server/routes/storage/multipart/create.post.d.ts +2 -2
- package/dist/runtime/server/routes/storage/multipart/create.post.mjs +7 -3
- package/dist/runtime/server/routes/storage/multipart/part.put.d.ts +2 -2
- package/dist/runtime/server/routes/storage/multipart/part.put.mjs +1 -1
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +2 -4
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +2 -4
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.mjs +1 -1
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.mjs +2 -4
- package/dist/runtime/server/tasks/cms/publish.mjs +1 -1
- package/dist/runtime/server/utils/ai.d.ts +9 -9
- package/dist/runtime/server/utils/ai.mjs +3 -3
- package/dist/runtime/server/utils/auth.d.ts +12 -16
- package/dist/runtime/server/utils/auth.mjs +15 -9
- package/dist/runtime/server/utils/bots.mjs +21 -7
- package/dist/runtime/server/utils/browser-utils.d.ts +44 -41
- package/dist/runtime/server/utils/browser-utils.mjs +14 -4
- package/dist/runtime/server/utils/cache.d.ts +5 -5
- package/dist/runtime/server/utils/cms/common.d.ts +26 -0
- package/dist/runtime/server/utils/cms/common.mjs +68 -0
- package/dist/runtime/server/utils/cms/git.d.ts +24 -0
- package/dist/runtime/server/utils/cms/git.mjs +240 -0
- package/dist/runtime/server/utils/cms/markdown.d.ts +22 -0
- package/dist/runtime/server/utils/cms/markdown.mjs +92 -0
- package/dist/runtime/server/utils/cms/path.d.ts +51 -0
- package/dist/runtime/server/utils/cms/path.mjs +127 -0
- package/dist/runtime/server/utils/cms/search.d.ts +22 -0
- package/dist/runtime/server/utils/cms/search.mjs +221 -0
- package/dist/runtime/server/utils/cms-events.d.ts +1 -1
- package/dist/runtime/server/utils/cms-events.mjs +2 -2
- package/dist/runtime/server/utils/cms-filter.mjs +2 -2
- package/dist/runtime/server/utils/cms.d.ts +17 -149
- package/dist/runtime/server/utils/cms.mjs +52 -761
- package/dist/runtime/server/utils/config.d.ts +5 -4
- package/dist/runtime/server/utils/domains.mjs +7 -4
- package/dist/runtime/server/utils/email-templates.d.ts +10 -7
- package/dist/runtime/server/utils/email-templates.mjs +20 -5
- package/dist/runtime/server/utils/feed.d.ts +2 -2
- package/dist/runtime/server/utils/feed.mjs +3 -1
- package/dist/runtime/server/utils/mail-suppression.d.ts +8 -24
- package/dist/runtime/server/utils/mail-suppression.mjs +2 -2
- package/dist/runtime/server/utils/mail.d.ts +7 -8
- package/dist/runtime/server/utils/mail.mjs +17 -12
- package/dist/runtime/server/utils/multipart-store.d.ts +2 -2
- package/dist/runtime/server/utils/notifications.d.ts +9 -23
- package/dist/runtime/server/utils/organization.mjs +4 -12
- package/dist/runtime/server/utils/passwordless.mjs +1 -1
- package/dist/runtime/server/utils/payments.d.ts +2 -6
- package/dist/runtime/server/utils/payments.mjs +1 -1
- package/dist/runtime/server/utils/queue.d.ts +21 -31
- package/dist/runtime/server/utils/rag.d.ts +4 -4
- package/dist/runtime/server/utils/rag.mjs +8 -8
- package/dist/runtime/server/utils/realtime-store.d.ts +2 -2
- package/dist/runtime/server/utils/realtime.d.ts +26 -28
- package/dist/runtime/server/utils/scheduled-task.d.ts +1 -3
- package/dist/runtime/server/utils/security-store.d.ts +2 -2
- package/dist/runtime/server/utils/session.d.ts +9 -11
- package/dist/runtime/server/utils/sso.d.ts +9 -15
- package/dist/runtime/server/utils/sso.mjs +4 -8
- package/dist/runtime/server/utils/storage.d.ts +19 -2
- package/dist/runtime/server/utils/storage.mjs +36 -7
- package/dist/runtime/server/utils/tenant.mjs +3 -1
- package/dist/runtime/server/utils/turnstile.d.ts +3 -5
- package/dist/runtime/server/utils/vapid.d.ts +5 -8
- package/dist/runtime/server/utils/vapid.mjs +26 -13
- package/dist/runtime/service.d.ts +13 -13
- package/dist/runtime/service.mjs +4 -2
- package/dist/runtime/test-utils.d.ts +20 -30
- package/dist/runtime/test-utils.mjs +5 -4
- package/dist/runtime/types/auth-globals.d.ts +14 -14
- package/dist/runtime/types/imports.d.ts +82 -82
- package/dist/runtime/types/index.d.ts +2 -2
- package/dist/runtime/types/r2.d.ts +5 -0
- package/dist/runtime/types/service.d.ts +11 -18
- package/dist/types.d.ts +100 -107
- package/dist/utils/auth-schema.d.ts +2 -2
- package/dist/utils/cms-sources.d.ts +3 -3
- package/dist/utils/local-db.d.ts +3 -3
- package/dist/utils/notifications-schema.d.ts +1 -3
- package/dist/utils/pkg.d.ts +7 -0
- package/dist/utils/queue.d.ts +3 -3
- package/dist/utils/tasks.d.ts +3 -2
- package/package.json +11 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { DurableObjectState } from "../../../types";
|
|
2
2
|
/**
|
|
3
3
|
* Cloudflare Durable Object implementing the WebSocket Hibernation API for Qarpeo Realtime rooms.
|
|
4
|
-
* Provides zero idle compute billing, instant peer-to-peer pub/sub, live presence tracking,
|
|
5
|
-
*
|
|
4
|
+
* Provides zero idle compute billing, instant peer-to-peer pub/sub, live presence tracking, and
|
|
5
|
+
* synchronized room state.
|
|
6
6
|
*/
|
|
7
7
|
export declare class QarpeoRoomDO {
|
|
8
8
|
ctx: DurableObjectState;
|
|
@@ -286,7 +286,7 @@ export class QarpeoRoomDO {
|
|
|
286
286
|
);
|
|
287
287
|
const lastMsgId = _url.searchParams.get("lastMessageId") || _url.searchParams.get("lastId") || request.headers.get("x-qarpeo-last-id");
|
|
288
288
|
const isReconnecting = lastSeq >= 0 || !!lastMsgId || sinceTime > 0;
|
|
289
|
-
this.loadHistory().then((history) => {
|
|
289
|
+
void this.loadHistory().then((history) => {
|
|
290
290
|
if (history.length > 0) {
|
|
291
291
|
let replayList = history;
|
|
292
292
|
if (lastSeq >= 0) {
|
|
@@ -313,7 +313,7 @@ export class QarpeoRoomDO {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
});
|
|
316
|
-
this.loadState().then((state) => {
|
|
316
|
+
void this.loadState().then((state) => {
|
|
317
317
|
if (Object.keys(state).length > 0) {
|
|
318
318
|
try {
|
|
319
319
|
server.send(
|
|
@@ -388,8 +388,8 @@ export class QarpeoRoomDO {
|
|
|
388
388
|
const attachment = getAttachment(ws) || {};
|
|
389
389
|
if (attachment.user) {
|
|
390
390
|
attachment.user.presence = {
|
|
391
|
-
...attachment.user.presence
|
|
392
|
-
...data.presence
|
|
391
|
+
...attachment.user.presence,
|
|
392
|
+
...data.presence
|
|
393
393
|
};
|
|
394
394
|
setAttachment(ws, attachment);
|
|
395
395
|
this.broadcast(
|
|
@@ -494,7 +494,7 @@ export class QarpeoRoomDO {
|
|
|
494
494
|
}
|
|
495
495
|
/** Broadcasts a message to all connected WebSockets in the room. */
|
|
496
496
|
broadcast(message, exclude) {
|
|
497
|
-
this.recordHistory(message);
|
|
497
|
+
void this.recordHistory(message);
|
|
498
498
|
const sockets = this.ctx.getWebSockets ? this.ctx.getWebSockets() : [];
|
|
499
499
|
const serialized = JSON.stringify(message);
|
|
500
500
|
for (const ws of sockets) {
|
|
@@ -33,8 +33,12 @@ export default defineEventHandler(async (event) => {
|
|
|
33
33
|
if (!devtoolsConfig.allowAnyIp) {
|
|
34
34
|
const rawIp = getRequestIP?.(event, { xForwardedFor: true }) || event.node?.req?.socket?.remoteAddress || event.node?.req?.headers?.["x-forwarded-for"]?.split(",")?.[0]?.trim() || "127.0.0.1";
|
|
35
35
|
const cleanIp = rawIp.replace(/^::ffff:/, "");
|
|
36
|
-
const allowedIps =
|
|
37
|
-
|
|
36
|
+
const allowedIps = new Set(
|
|
37
|
+
(devtoolsConfig.allowedIps || ["127.0.0.1", "::1", "localhost"]).map(
|
|
38
|
+
(ip) => ip.replace(/^::ffff:/, "")
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
const isAllowed = allowedIps.has(cleanIp) || allowedIps.has(rawIp) || allowedIps.has("*") || allowedIps.has("0.0.0.0");
|
|
38
42
|
if (!isAllowed) {
|
|
39
43
|
throw createError({
|
|
40
44
|
statusCode: 403,
|
|
@@ -2,7 +2,9 @@ import type { NitroApp } from "nitro/types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Nitro server plugin for Qarpeo CMS.
|
|
4
4
|
*
|
|
5
|
-
* - In development: creates CMS tables and synchronizes local `content/` files and `nuxt.config.ts`
|
|
6
|
-
*
|
|
5
|
+
* - In development: creates CMS tables and synchronizes local `content/` files and `nuxt.config.ts`
|
|
6
|
+
* collections into D1 on startup.
|
|
7
|
+
* - In production: creates CMS tables and seeds collections and pre-compiled manifest entries into D1
|
|
8
|
+
* on startup.
|
|
7
9
|
*/
|
|
8
10
|
export default function (_nitroApp?: NitroApp): void;
|
|
@@ -4,7 +4,7 @@ export default async function(nitroApp) {
|
|
|
4
4
|
if (proxy?.env) {
|
|
5
5
|
if (!proxy.env.AI) {
|
|
6
6
|
proxy.env.AI = {
|
|
7
|
-
run: async (model,
|
|
7
|
+
run: async (model, _input) => ({
|
|
8
8
|
response: `[Mock AI] Response for model "${model}" in local development. Set CLOUDFLARE_API_TOKEN to connect to live Cloudflare Workers AI.`
|
|
9
9
|
})
|
|
10
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* POST /_qarpeo/api/agents/chat Body: { agent: string, message: string, model?: string } Executes
|
|
3
|
-
*
|
|
2
|
+
* POST /_qarpeo/api/agents/chat Body: { agent: string, message: string, model?: string } Executes a
|
|
3
|
+
* chat interaction with an agent and stores the response in the session history.
|
|
4
4
|
*/
|
|
5
5
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
6
|
id: any;
|
|
@@ -31,7 +31,10 @@ export default defineEventHandler(async (event) => {
|
|
|
31
31
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
32
32
|
};
|
|
33
33
|
} catch (err) {
|
|
34
|
-
console.warn(
|
|
34
|
+
console.warn(
|
|
35
|
+
`[qarpeo:devtools] Falling back to mock store for agent "${agentId}":`,
|
|
36
|
+
err.message
|
|
37
|
+
);
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
const store = getDevMockAgentsStore();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GET /_qarpeo/api/analytics/events?range=7d
|
|
3
|
-
* DevTools Analytics events endpoint.
|
|
4
|
-
*/
|
|
1
|
+
/** GET /_qarpeo/api/analytics/events?range=7d DevTools Analytics events endpoint. */
|
|
5
2
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
3
|
events: import("../../../../../types").AnalyticsEventRecord[];
|
|
7
4
|
preview: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GET /_qarpeo/api/analytics/summary?range=7d
|
|
3
|
-
*
|
|
2
|
+
* GET /_qarpeo/api/analytics/summary?range=7d DevTools Analytics summary endpoint. Returns live AE
|
|
3
|
+
* summary or dev preview data with preview: true flag.
|
|
4
4
|
*/
|
|
5
5
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
6
|
totalPageviews: number;
|
|
@@ -23,7 +23,11 @@ export default defineEventHandler(async (event) => {
|
|
|
23
23
|
avgDurationMs: 0,
|
|
24
24
|
topPages: data.topPages.map((p) => ({ path: p.path, views: p.views })),
|
|
25
25
|
topReferrers: data.topReferrers.map((r) => ({ referrer: r.referrer, count: r.count })),
|
|
26
|
-
countries: data.countries.map((c) => ({
|
|
26
|
+
countries: data.countries.map((c) => ({
|
|
27
|
+
country: c.country,
|
|
28
|
+
code: c.country,
|
|
29
|
+
count: c.count
|
|
30
|
+
})),
|
|
27
31
|
devices: Object.entries(data.devices || {}).map(([name, count]) => ({
|
|
28
32
|
name,
|
|
29
33
|
count,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GET /_qarpeo/api/db/tables Lists all database tables, columns, and estimated row counts from D1
|
|
3
|
-
*
|
|
2
|
+
* GET /_qarpeo/api/db/tables Lists all database tables, columns, and estimated row counts from D1 /
|
|
3
|
+
* SQLite. Dev-only — guarded by import.meta.dev (build-time constant, always false in prod).
|
|
4
4
|
*/
|
|
5
5
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
6
|
tables: {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* GET /_qarpeo/api/logs Returns recent edge execution and request tail logs from real server ring
|
|
3
|
+
* buffer.
|
|
4
|
+
*/
|
|
2
5
|
declare const _default: import("nuxt/server").EventHandler<{
|
|
3
6
|
logs: import("../../utils/dev-logs").DevLogEntry[];
|
|
4
7
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineEventHandler, getQuery, getRouterParam, sendRedirect } from "nuxt/server";
|
|
2
|
-
import { recordEmailClick } from "../../../../../utils/mail.mjs";
|
|
3
2
|
import { sanitizeUrl } from "../../../../../utils/email-templates.mjs";
|
|
3
|
+
import { recordEmailClick } from "../../../../../utils/mail.mjs";
|
|
4
4
|
export default defineEventHandler(async (event) => {
|
|
5
5
|
const id = getRouterParam(event, "id");
|
|
6
6
|
const query = getQuery(event);
|
|
@@ -24,8 +24,8 @@ export default defineEventHandler(async (event) => {
|
|
|
24
24
|
"Content-Type": "image/gif",
|
|
25
25
|
"Content-Length": String(TRANSPARENT_GIF_PIXEL.length),
|
|
26
26
|
"Cache-Control": "no-store, no-cache, must-revalidate, proxy-revalidate",
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
Pragma: "no-cache",
|
|
28
|
+
Expires: "0"
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GET /_qarpeo/api/overview Returns system overview, active Cloudflare primitives, and enabled
|
|
3
|
-
*
|
|
2
|
+
* GET /_qarpeo/api/overview Returns system overview, active Cloudflare primitives, and enabled Tier
|
|
3
|
+
* 2 solutions.
|
|
4
4
|
*/
|
|
5
5
|
declare const _default: import("nuxt/server").EventHandler<{
|
|
6
6
|
environment: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* POST /_qarpeo/realtime/broadcast
|
|
3
|
-
*
|
|
2
|
+
* POST /_qarpeo/realtime/broadcast DevTools broadcast trigger to send messages into any room
|
|
3
|
+
* directly from DevTools inspector.
|
|
4
4
|
*/
|
|
5
5
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
6
|
ok: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineEventHandler, readBody, createError } from "nuxt/server";
|
|
2
|
-
import { trackRoomActivity } from "../../../utils/realtime-store.mjs";
|
|
3
2
|
import { broadcastToRoom } from "../../../utils/realtime.mjs";
|
|
3
|
+
import { trackRoomActivity } from "../../../utils/realtime-store.mjs";
|
|
4
4
|
export default defineEventHandler(async (event) => {
|
|
5
5
|
const body = await readBody(event);
|
|
6
6
|
if (!body || !body.room || !body.event) {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* POST /_qarpeo/realtime/clear
|
|
3
|
-
* Clears message history for a room in DevTools inspector.
|
|
4
|
-
*/
|
|
1
|
+
/** POST /_qarpeo/realtime/clear Clears message history for a room in DevTools inspector. */
|
|
5
2
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
3
|
ok: boolean;
|
|
7
4
|
cleared: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineEventHandler, readBody, createError } from "nuxt/server";
|
|
2
|
-
import { trackRoomActivity } from "../../../utils/realtime-store.mjs";
|
|
3
2
|
import { clearRoomHistory } from "../../../utils/realtime.mjs";
|
|
3
|
+
import { trackRoomActivity } from "../../../utils/realtime-store.mjs";
|
|
4
4
|
export default defineEventHandler(async (event) => {
|
|
5
5
|
const body = await readBody(event);
|
|
6
6
|
if (!body || !body.room) {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* POST /_qarpeo/realtime/disconnect
|
|
3
|
-
* Disconnects a user or peer from a room via DevTools inspector.
|
|
4
|
-
*/
|
|
1
|
+
/** POST /_qarpeo/realtime/disconnect Disconnects a user or peer from a room via DevTools inspector. */
|
|
5
2
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
3
|
ok: boolean;
|
|
7
4
|
disconnected: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineEventHandler, readBody, createError } from "nuxt/server";
|
|
2
|
-
import { trackRoomActivity } from "../../../utils/realtime-store.mjs";
|
|
3
2
|
import { disconnectRoomUser } from "../../../utils/realtime.mjs";
|
|
3
|
+
import { trackRoomActivity } from "../../../utils/realtime-store.mjs";
|
|
4
4
|
export default defineEventHandler(async (event) => {
|
|
5
5
|
const body = await readBody(event);
|
|
6
6
|
if (!body || !body.room || !body.userId) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GET /_qarpeo/realtime/room
|
|
3
|
-
*
|
|
2
|
+
* GET /_qarpeo/realtime/room Returns complete inspectable details for a given room: presence
|
|
3
|
+
* roster, synchronized state, and message stream.
|
|
4
4
|
*/
|
|
5
5
|
declare const _default: import("nuxt/server").EventHandler<{
|
|
6
6
|
room: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GET /_qarpeo/realtime/rooms
|
|
3
|
-
*
|
|
2
|
+
* GET /_qarpeo/realtime/rooms Returns all active or cached realtime rooms, active connections, and
|
|
3
|
+
* live presence counts.
|
|
4
4
|
*/
|
|
5
5
|
declare const _default: import("nuxt/server").EventHandler<{
|
|
6
6
|
rooms: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GET /_qarpeo/security/analytics
|
|
3
|
-
*
|
|
2
|
+
* GET /_qarpeo/security/analytics Returns security events, bot score statistics, banned IPs, and
|
|
3
|
+
* rate limit bucket stats.
|
|
4
4
|
*/
|
|
5
5
|
declare const _default: import("nuxt/server").EventHandler<{
|
|
6
6
|
events: import("../../../utils/security-store").SecurityEvent[];
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* POST /_qarpeo/security/ban
|
|
3
|
-
* Manually bans an IP address from DevTools inspector.
|
|
4
|
-
*/
|
|
1
|
+
/** POST /_qarpeo/security/ban Manually bans an IP address from DevTools inspector. */
|
|
5
2
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
3
|
ok: boolean;
|
|
7
4
|
banned: boolean;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* POST /_qarpeo/security/clear
|
|
3
|
-
* Clears security event telemetry logs in DevTools.
|
|
4
|
-
*/
|
|
1
|
+
/** POST /_qarpeo/security/clear Clears security event telemetry logs in DevTools. */
|
|
5
2
|
declare const _default: import("nuxt/server").EventHandler<{
|
|
6
3
|
ok: boolean;
|
|
7
4
|
cleared: boolean;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* POST /_qarpeo/security/unban
|
|
3
|
-
* Unbans an IP address in the local security registry.
|
|
4
|
-
*/
|
|
1
|
+
/** POST /_qarpeo/security/unban Unbans an IP address in the local security registry. */
|
|
5
2
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
3
|
ok: boolean;
|
|
7
4
|
removed: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineEventHandler } from "nuxt/server";
|
|
2
|
+
import { useRuntimeConfig } from "nuxt/server";
|
|
2
3
|
import { getDevMockBlobStore } from "../../utils/blob-store.mjs";
|
|
3
4
|
import { getDevMockKvStore } from "../../utils/kv-store.mjs";
|
|
4
5
|
import { listTenants } from "../../utils/tenant.mjs";
|
|
5
|
-
import { useRuntimeConfig } from "nuxt/server";
|
|
6
6
|
export default defineEventHandler(async (event) => {
|
|
7
7
|
let rc = {};
|
|
8
8
|
try {
|
|
@@ -9,7 +9,9 @@ export default defineEventHandler(async (event) => {
|
|
|
9
9
|
try {
|
|
10
10
|
const runTask = event.$runTask || event.context?.nitro?.runTask || globalThis.__nitro?.runTask;
|
|
11
11
|
if (typeof runTask !== "function") {
|
|
12
|
-
throw new Error(
|
|
12
|
+
throw new Error(
|
|
13
|
+
"Task runner not available. Make sure experimental.tasks is enabled in your Nuxt config."
|
|
14
|
+
);
|
|
13
15
|
}
|
|
14
16
|
const result = await runTask(taskName, { payload });
|
|
15
17
|
return { ok: true, task: taskName, result };
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
defineEventHandler,
|
|
3
|
+
getRouterParam,
|
|
4
|
+
readBody,
|
|
5
|
+
createError,
|
|
6
|
+
useRuntimeConfig
|
|
7
|
+
} from "nuxt/server";
|
|
3
8
|
import { useAgent } from "../../../utils/ai.mjs";
|
|
9
|
+
import { getAuthSession } from "../../../utils/session.mjs";
|
|
4
10
|
export default defineEventHandler(async (event) => {
|
|
5
11
|
const config = useRuntimeConfig();
|
|
6
12
|
const agentsConfig = config.qarpeo?.agents || {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
defineEventHandler,
|
|
3
|
+
getRouterParam,
|
|
4
|
+
readBody,
|
|
5
|
+
createError,
|
|
6
|
+
useRuntimeConfig
|
|
7
|
+
} from "nuxt/server";
|
|
3
8
|
import { useAgent } from "../../../utils/ai.mjs";
|
|
9
|
+
import { getAuthSession } from "../../../utils/session.mjs";
|
|
4
10
|
export default defineEventHandler(async (event) => {
|
|
5
11
|
const config = useRuntimeConfig();
|
|
6
12
|
const agentsConfig = config.qarpeo?.agents || {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
defineEventHandler,
|
|
3
|
+
getRouterParam,
|
|
4
|
+
getQuery,
|
|
5
|
+
createError,
|
|
6
|
+
useRuntimeConfig
|
|
7
|
+
} from "nuxt/server";
|
|
3
8
|
import { useAgent } from "../../../utils/ai.mjs";
|
|
9
|
+
import { getAuthSession } from "../../../utils/session.mjs";
|
|
4
10
|
export default defineEventHandler(async (event) => {
|
|
5
11
|
const config = useRuntimeConfig();
|
|
6
12
|
const agentsConfig = config.qarpeo?.agents || {};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* POST /api/ai/embed
|
|
3
|
-
* Generate text embeddings via Cloudflare Workers AI.
|
|
4
|
-
*/
|
|
1
|
+
/** POST /api/ai/embed Generate text embeddings via Cloudflare Workers AI. */
|
|
5
2
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
3
|
data: number[][];
|
|
7
4
|
embeddings: number[][];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* POST /api/ai/search
|
|
3
|
-
*
|
|
2
|
+
* POST /api/ai/search Semantic vector similarity search route powered by Cloudflare Vectorize and
|
|
3
|
+
* Workers AI embeddings.
|
|
4
4
|
*/
|
|
5
5
|
declare const _default: import("nuxt/server").EventHandler<Promise<{
|
|
6
6
|
matches: any[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineEventHandler, readBody, createError } from "nuxt/server";
|
|
2
|
+
import { deleteUserAccount } from "../../utils/auth.mjs";
|
|
2
3
|
import { getQarpeoConfig } from "../../utils/config.mjs";
|
|
3
4
|
import { requireAuthSession, clearAuthSession } from "../../utils/session.mjs";
|
|
4
|
-
import { deleteUserAccount } from "../../utils/auth.mjs";
|
|
5
5
|
import { requireTurnstile } from "../../utils/turnstile.mjs";
|
|
6
6
|
export default defineEventHandler(async (event) => {
|
|
7
7
|
const session = await requireAuthSession(event);
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
defineEventHandler,
|
|
3
|
+
getRequestURL,
|
|
4
|
+
getRequestHeaders,
|
|
5
|
+
readBody
|
|
6
|
+
} from "nuxt/server";
|
|
2
7
|
import { serverAuth } from "../../utils/auth.mjs";
|
|
3
8
|
export default defineEventHandler(async (event) => {
|
|
4
9
|
const auth = serverAuth(event);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineEventHandler, getQuery, sendRedirect } from "nuxt/server";
|
|
2
|
-
import { getQarpeoConfig } from "../../../utils/config.mjs";
|
|
3
2
|
import { getD1Binding } from "../../../../db.mjs";
|
|
4
3
|
import { ensureAuthTables } from "../../../utils/auth.mjs";
|
|
4
|
+
import { getQarpeoConfig } from "../../../utils/config.mjs";
|
|
5
5
|
import { verifyMagicLinkToken } from "../../../utils/passwordless.mjs";
|
|
6
6
|
import { createDeviceSession, setAuthSession } from "../../../utils/session.mjs";
|
|
7
7
|
export default defineEventHandler(async (event) => {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
defineEventHandler,
|
|
3
|
+
getRouterParam,
|
|
4
|
+
getQuery,
|
|
5
|
+
readBody,
|
|
6
|
+
createError
|
|
7
|
+
} from "nuxt/server";
|
|
2
8
|
import { removeOrganizationMember } from "../../../../utils/organization.mjs";
|
|
3
9
|
export default defineEventHandler(async (event) => {
|
|
4
10
|
const memberId = getRouterParam(event, "id");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineEventHandler, readBody, createError } from "nuxt/server";
|
|
2
|
-
import { getQarpeoConfig } from "../../../utils/config.mjs";
|
|
3
2
|
import { getD1Binding } from "../../../../db.mjs";
|
|
4
3
|
import { ensureAuthTables } from "../../../utils/auth.mjs";
|
|
4
|
+
import { getQarpeoConfig } from "../../../utils/config.mjs";
|
|
5
5
|
import { verifyOTPCode } from "../../../utils/passwordless.mjs";
|
|
6
6
|
import { createDeviceSession, setAuthSession } from "../../../utils/session.mjs";
|
|
7
7
|
export default defineEventHandler(async (event) => {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
defineEventHandler,
|
|
3
|
+
getQuery,
|
|
4
|
+
sendRedirect,
|
|
5
|
+
createError,
|
|
6
|
+
getRequestURL
|
|
7
|
+
} from "nuxt/server";
|
|
2
8
|
import { getD1Binding } from "../../../../db.mjs";
|
|
3
9
|
import { getKVBinding } from "../../../../kv.mjs";
|
|
4
10
|
import { buildSAMLAuthnRequestUrl, buildOIDCAuthUrl } from "../../../utils/sso.mjs";
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
defineEventHandler,
|
|
3
|
+
getQuery,
|
|
4
|
+
sendRedirect,
|
|
5
|
+
createError,
|
|
6
|
+
getRequestURL
|
|
7
|
+
} from "nuxt/server";
|
|
2
8
|
import { getD1Binding } from "../../../../../db.mjs";
|
|
3
9
|
import { getKVBinding } from "../../../../../kv.mjs";
|
|
4
|
-
import { exchangeOIDCCode } from "../../../../utils/sso.mjs";
|
|
5
10
|
import { setAuthSession, createDeviceSession } from "../../../../utils/session.mjs";
|
|
11
|
+
import { exchangeOIDCCode } from "../../../../utils/sso.mjs";
|
|
6
12
|
export default defineEventHandler(async (event) => {
|
|
7
13
|
const query = getQuery(event);
|
|
8
14
|
const code = query.code;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
defineEventHandler,
|
|
3
|
+
readBody,
|
|
4
|
+
sendRedirect,
|
|
5
|
+
createError
|
|
6
|
+
} from "nuxt/server";
|
|
2
7
|
import { getD1Binding } from "../../../../../db.mjs";
|
|
3
8
|
import { getKVBinding } from "../../../../../kv.mjs";
|
|
4
|
-
import { parseSAMLResponse, verifySAMLSignature } from "../../../../utils/sso.mjs";
|
|
5
9
|
import { setAuthSession, createDeviceSession } from "../../../../utils/session.mjs";
|
|
10
|
+
import { parseSAMLResponse, verifySAMLSignature } from "../../../../utils/sso.mjs";
|
|
6
11
|
export default defineEventHandler(async (event) => {
|
|
7
12
|
const body = await readBody(event);
|
|
8
13
|
const samlResponse = body?.SAMLResponse;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineEventHandler, getRequestURL } from "nuxt/server";
|
|
2
1
|
import { generateAuthenticationOptions } from "@simplewebauthn/server";
|
|
2
|
+
import { defineEventHandler, getRequestURL } from "nuxt/server";
|
|
3
3
|
import { getKVBinding } from "../../../../../kv.mjs";
|
|
4
4
|
export default defineEventHandler(async (event) => {
|
|
5
5
|
const reqUrl = getRequestURL(event);
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { defineEventHandler, readBody, createError, getRequestURL } from "nuxt/server";
|
|
2
1
|
import { verifyAuthenticationResponse } from "@simplewebauthn/server";
|
|
3
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
defineEventHandler,
|
|
4
|
+
readBody,
|
|
5
|
+
createError,
|
|
6
|
+
getRequestURL
|
|
7
|
+
} from "nuxt/server";
|
|
4
8
|
import { getD1Binding } from "../../../../../db.mjs";
|
|
5
9
|
import { getKVBinding } from "../../../../../kv.mjs";
|
|
10
|
+
import { getQarpeoConfig } from "../../../../utils/config.mjs";
|
|
6
11
|
import { createDeviceSession, setAuthSession } from "../../../../utils/session.mjs";
|
|
7
12
|
export default defineEventHandler(async (event) => {
|
|
8
13
|
const body = await readBody(event);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { defineEventHandler, createError, getRequestURL, useRuntimeConfig } from "nuxt/server";
|
|
2
1
|
import { generateRegistrationOptions } from "@simplewebauthn/server";
|
|
2
|
+
import {
|
|
3
|
+
defineEventHandler,
|
|
4
|
+
createError,
|
|
5
|
+
getRequestURL,
|
|
6
|
+
useRuntimeConfig
|
|
7
|
+
} from "nuxt/server";
|
|
3
8
|
import { getD1Binding } from "../../../../../db.mjs";
|
|
4
9
|
import { getKVBinding } from "../../../../../kv.mjs";
|
|
5
10
|
import { requireAuthSession } from "../../../../utils/session.mjs";
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { defineEventHandler, readBody, createError, getRequestURL } from "nuxt/server";
|
|
2
1
|
import { verifyRegistrationResponse } from "@simplewebauthn/server";
|
|
2
|
+
import {
|
|
3
|
+
defineEventHandler,
|
|
4
|
+
readBody,
|
|
5
|
+
createError,
|
|
6
|
+
getRequestURL
|
|
7
|
+
} from "nuxt/server";
|
|
3
8
|
import { getD1Binding } from "../../../../../db.mjs";
|
|
4
9
|
import { getKVBinding } from "../../../../../kv.mjs";
|
|
5
10
|
import { requireAuthSession } from "../../../../utils/session.mjs";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* POST /api/browser/crawl
|
|
3
3
|
*
|
|
4
|
-
* Body: { url: string; options?: CrawlOptions }
|
|
5
|
-
* Returns: { pages, durationMs }
|
|
4
|
+
* Body: { url: string; options?: CrawlOptions } Returns: { pages, durationMs }
|
|
6
5
|
*/
|
|
7
6
|
declare const _default: import("nuxt/server").EventHandler<Promise<import("../../..").CrawlResult>>;
|
|
8
7
|
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* POST /api/browser/invoice
|
|
3
3
|
*
|
|
4
|
-
* Body: GenerateInvoiceOptions
|
|
5
|
-
* Returns: PDF bytes with Content-Type: application/pdf
|
|
4
|
+
* Body: GenerateInvoiceOptions Returns: PDF bytes with Content-Type: application/pdf
|
|
6
5
|
*/
|
|
7
6
|
declare const _default: import("nuxt/server").EventHandler<Promise<Response>>;
|
|
8
7
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* POST /api/browser/og-image
|
|
3
3
|
*
|
|
4
|
-
* Body: OgSocialCardOptions
|
|
5
|
-
*
|
|
4
|
+
* Body: OgSocialCardOptions Returns: image bytes with Content-Type: image/png (or image/jpeg /
|
|
5
|
+
* image/webp)
|
|
6
6
|
*/
|
|
7
7
|
declare const _default: import("nuxt/server").EventHandler<Promise<Response>>;
|
|
8
8
|
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* POST /api/browser/pdf
|
|
3
3
|
*
|
|
4
|
-
* Body: { url?: string; html?: string; options?: PdfOptions }
|
|
5
|
-
* Returns: PDF bytes as application/pdf
|
|
4
|
+
* Body: { url?: string; html?: string; options?: PdfOptions } Returns: PDF bytes as application/pdf
|
|
6
5
|
*/
|
|
7
6
|
declare const _default: import("nuxt/server").EventHandler<Promise<Response>>;
|
|
8
7
|
export default _default;
|