@lastbrain/module-ai 2.0.26 → 2.0.30
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 +52 -1
- package/dist/ai.build.config.d.ts.map +1 -1
- package/dist/ai.build.config.js +508 -9
- package/dist/api/admin/ai-provider-models/[id].d.ts +18 -0
- package/dist/api/admin/ai-provider-models/[id].d.ts.map +1 -0
- package/dist/api/admin/ai-provider-models/[id].js +58 -0
- package/dist/api/admin/ai-provider-models.d.ts +20 -0
- package/dist/api/admin/ai-provider-models.d.ts.map +1 -0
- package/dist/api/admin/ai-provider-models.js +26 -0
- package/dist/api/admin/ai-providers/[key].d.ts +18 -0
- package/dist/api/admin/ai-providers/[key].d.ts.map +1 -0
- package/dist/api/admin/ai-providers/[key].js +55 -0
- package/dist/api/admin/ai-providers.d.ts +20 -0
- package/dist/api/admin/ai-providers.d.ts.map +1 -0
- package/dist/api/admin/ai-providers.js +26 -0
- package/dist/api/admin/billing-analytics.d.ts +43 -0
- package/dist/api/admin/billing-analytics.d.ts.map +1 -0
- package/dist/api/admin/billing-analytics.js +144 -0
- package/dist/api/admin/global-ai-settings.d.ts +14 -0
- package/dist/api/admin/global-ai-settings.d.ts.map +1 -0
- package/dist/api/admin/global-ai-settings.js +63 -0
- package/dist/api/admin/token-packs/[id].d.ts.map +1 -1
- package/dist/api/admin/token-packs/[id].js +3 -2
- package/dist/api/admin/token-packs.d.ts.map +1 -1
- package/dist/api/admin/token-packs.js +3 -2
- package/dist/api/admin/user-monthly-details.d.ts +49 -0
- package/dist/api/admin/user-monthly-details.d.ts.map +1 -0
- package/dist/api/admin/user-monthly-details.js +140 -0
- package/dist/api/admin/user-quota.d.ts +21 -0
- package/dist/api/admin/user-quota.d.ts.map +1 -0
- package/dist/api/admin/user-quota.js +59 -0
- package/dist/api/admin/user-token/[id].d.ts.map +1 -1
- package/dist/api/admin/user-token/[id].js +2 -1
- package/dist/api/admin/user-token.d.ts +5 -2
- package/dist/api/admin/user-token.d.ts.map +1 -1
- package/dist/api/admin/user-token.js +91 -17
- package/dist/api/admin/user-usage-by-model.d.ts +22 -0
- package/dist/api/admin/user-usage-by-model.d.ts.map +1 -0
- package/dist/api/admin/user-usage-by-model.js +78 -0
- package/dist/api/admin/user-wallet-analytics.d.ts +15 -0
- package/dist/api/admin/user-wallet-analytics.d.ts.map +1 -0
- package/dist/api/admin/user-wallet-analytics.js +67 -0
- package/dist/api/admin/wallet-repair/route.d.ts +30 -0
- package/dist/api/admin/wallet-repair/route.d.ts.map +1 -0
- package/dist/api/admin/wallet-repair/route.js +63 -0
- package/dist/api/auth/ai-model-settings.d.ts +21 -0
- package/dist/api/auth/ai-model-settings.d.ts.map +1 -0
- package/dist/api/auth/ai-model-settings.js +86 -0
- package/dist/api/auth/ai-settings.d.ts +17 -0
- package/dist/api/auth/ai-settings.d.ts.map +1 -0
- package/dist/api/auth/ai-settings.js +87 -0
- package/dist/api/auth/api-keys/[id].d.ts +17 -0
- package/dist/api/auth/api-keys/[id].d.ts.map +1 -0
- package/dist/api/auth/api-keys/[id].js +66 -0
- package/dist/api/auth/api-keys.d.ts +19 -0
- package/dist/api/auth/api-keys.d.ts.map +1 -0
- package/dist/api/auth/api-keys.js +94 -0
- package/dist/api/auth/create-checkout.d.ts +1 -1
- package/dist/api/auth/create-checkout.d.ts.map +1 -1
- package/dist/api/auth/create-checkout.js +8 -6
- package/dist/api/auth/generate-image.d.ts +2 -2
- package/dist/api/auth/generate-image.d.ts.map +1 -1
- package/dist/api/auth/generate-image.js +404 -104
- package/dist/api/auth/generate-text.d.ts +3 -2
- package/dist/api/auth/generate-text.d.ts.map +1 -1
- package/dist/api/auth/generate-text.js +130 -58
- package/dist/api/auth/process-ocr.d.ts +9 -0
- package/dist/api/auth/process-ocr.d.ts.map +1 -0
- package/dist/api/auth/process-ocr.js +43 -0
- package/dist/api/auth/prompts/stats.d.ts +14 -0
- package/dist/api/auth/prompts/stats.d.ts.map +1 -0
- package/dist/api/auth/prompts/stats.js +46 -0
- package/dist/api/auth/prompts.d.ts +26 -0
- package/dist/api/auth/prompts.d.ts.map +1 -0
- package/dist/api/auth/prompts.js +175 -0
- package/dist/api/auth/token-balance.d.ts +26 -0
- package/dist/api/auth/token-balance.d.ts.map +1 -0
- package/dist/api/auth/token-balance.js +47 -0
- package/dist/api/auth/token-checkout.d.ts.map +1 -1
- package/dist/api/auth/token-checkout.js +22 -4
- package/dist/api/auth/token-packs.d.ts.map +1 -1
- package/dist/api/auth/token-packs.js +2 -1
- package/dist/api/auth/usage-by-model.d.ts +25 -0
- package/dist/api/auth/usage-by-model.d.ts.map +1 -0
- package/dist/api/auth/usage-by-model.js +95 -0
- package/dist/api/auth/usage.d.ts +26 -0
- package/dist/api/auth/usage.d.ts.map +1 -0
- package/dist/api/auth/usage.js +127 -0
- package/dist/api/auth/user-tokens.d.ts.map +1 -1
- package/dist/api/auth/user-tokens.js +36 -2
- package/dist/api/auth/wallet/route.d.ts +17 -0
- package/dist/api/auth/wallet/route.d.ts.map +1 -0
- package/dist/api/auth/wallet/route.js +68 -0
- package/dist/api/auth/wallet.d.ts +16 -0
- package/dist/api/auth/wallet.d.ts.map +1 -0
- package/dist/api/auth/wallet.js +71 -0
- package/dist/api/public/gateway-models.d.ts +25 -0
- package/dist/api/public/gateway-models.d.ts.map +1 -0
- package/dist/api/public/gateway-models.js +49 -0
- package/dist/api/public/pricing-summary.d.ts +46 -0
- package/dist/api/public/pricing-summary.d.ts.map +1 -0
- package/dist/api/public/pricing-summary.js +70 -0
- package/dist/api/public/prompts/[id]/stats.d.ts +15 -0
- package/dist/api/public/prompts/[id]/stats.d.ts.map +1 -0
- package/dist/api/public/prompts/[id]/stats.js +37 -0
- package/dist/api/public/prompts/[id]/view.d.ts +15 -0
- package/dist/api/public/prompts/[id]/view.d.ts.map +1 -0
- package/dist/api/public/prompts/[id]/view.js +41 -0
- package/dist/api/public/prompts/slug/[slug].d.ts +15 -0
- package/dist/api/public/prompts/slug/[slug].d.ts.map +1 -0
- package/dist/api/public/prompts/slug/[slug].js +40 -0
- package/dist/api/public/prompts/user/[username].d.ts +17 -0
- package/dist/api/public/prompts/user/[username].d.ts.map +1 -0
- package/dist/api/public/prompts/user/[username].js +51 -0
- package/dist/api/public/prompts.d.ts +15 -0
- package/dist/api/public/prompts.d.ts.map +1 -0
- package/dist/api/public/prompts.js +45 -0
- package/dist/api/public/token-packs.d.ts +11 -0
- package/dist/api/public/token-packs.d.ts.map +1 -0
- package/dist/api/public/token-packs.js +25 -0
- package/dist/api/public/token-pricing.d.ts +44 -0
- package/dist/api/public/token-pricing.d.ts.map +1 -0
- package/dist/api/public/token-pricing.js +168 -0
- package/dist/api/public/v1/_lib/artifacts.d.ts +52 -0
- package/dist/api/public/v1/_lib/artifacts.d.ts.map +1 -0
- package/dist/api/public/v1/_lib/artifacts.js +217 -0
- package/dist/api/public/v1/_lib/auth.d.ts +43 -0
- package/dist/api/public/v1/_lib/auth.d.ts.map +1 -0
- package/dist/api/public/v1/_lib/auth.js +108 -0
- package/dist/api/public/v1/_lib/errors.d.ts +17 -0
- package/dist/api/public/v1/_lib/errors.d.ts.map +1 -0
- package/dist/api/public/v1/_lib/errors.js +16 -0
- package/dist/api/public/v1/_lib/log.d.ts +29 -0
- package/dist/api/public/v1/_lib/log.d.ts.map +1 -0
- package/dist/api/public/v1/_lib/log.js +68 -0
- package/dist/api/public/v1/_lib/quota.d.ts +24 -0
- package/dist/api/public/v1/_lib/quota.d.ts.map +1 -0
- package/dist/api/public/v1/_lib/quota.js +118 -0
- package/dist/api/public/v1/_lib/router.d.ts +54 -0
- package/dist/api/public/v1/_lib/router.d.ts.map +1 -0
- package/dist/api/public/v1/_lib/router.js +119 -0
- package/dist/api/public/v1/connect.d.ts +20 -0
- package/dist/api/public/v1/connect.d.ts.map +1 -0
- package/dist/api/public/v1/connect.js +119 -0
- package/dist/api/public/v1/doc.d.ts +239 -0
- package/dist/api/public/v1/doc.d.ts.map +1 -0
- package/dist/api/public/v1/doc.js +253 -0
- package/dist/api/public/v1/history/[id].d.ts +92 -0
- package/dist/api/public/v1/history/[id].d.ts.map +1 -0
- package/dist/api/public/v1/history/[id].js +176 -0
- package/dist/api/public/v1/history.d.ts +30 -0
- package/dist/api/public/v1/history.d.ts.map +1 -0
- package/dist/api/public/v1/history.js +142 -0
- package/dist/api/public/v1/image-ai.d.ts +24 -0
- package/dist/api/public/v1/image-ai.d.ts.map +1 -0
- package/dist/api/public/v1/image-ai.js +233 -0
- package/dist/api/public/v1/prompts.d.ts +19 -0
- package/dist/api/public/v1/prompts.d.ts.map +1 -0
- package/dist/api/public/v1/prompts.js +107 -0
- package/dist/api/public/v1/provider.d.ts +16 -0
- package/dist/api/public/v1/provider.d.ts.map +1 -0
- package/dist/api/public/v1/provider.js +130 -0
- package/dist/api/public/v1/purchase.d.ts +11 -0
- package/dist/api/public/v1/purchase.d.ts.map +1 -0
- package/dist/api/public/v1/purchase.js +18 -0
- package/dist/api/public/v1/status.d.ts +35 -0
- package/dist/api/public/v1/status.d.ts.map +1 -0
- package/dist/api/public/v1/status.js +163 -0
- package/dist/api/public/v1/text-ai.d.ts +26 -0
- package/dist/api/public/v1/text-ai.d.ts.map +1 -0
- package/dist/api/public/v1/text-ai.js +239 -0
- package/dist/api/public/webhook.d.ts.map +1 -1
- package/dist/api/public/webhook.js +50 -39
- package/dist/api/track-usage.d.ts +12 -0
- package/dist/api/track-usage.d.ts.map +1 -0
- package/dist/api/track-usage.js +37 -0
- package/dist/components/Doc.d.ts.map +1 -1
- package/dist/components/Doc.js +1 -1
- package/dist/components/DocUsageCustom.js +6 -6
- package/dist/components/admin/UserTokenTab.d.ts.map +1 -1
- package/dist/components/admin/UserTokenTab.js +170 -23
- package/dist/components/auth/AuthDashboardAi.d.ts +2 -0
- package/dist/components/auth/AuthDashboardAi.d.ts.map +1 -0
- package/dist/components/auth/AuthDashboardAi.js +53 -0
- package/dist/docs/REFACTORING_BILLING_GUIDE.d.ts +277 -0
- package/dist/docs/REFACTORING_BILLING_GUIDE.d.ts.map +1 -0
- package/dist/docs/REFACTORING_BILLING_GUIDE.js +276 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -1
- package/dist/scripts/migrate-tokens-to-wallet.d.ts +13 -0
- package/dist/scripts/migrate-tokens-to-wallet.d.ts.map +1 -0
- package/dist/scripts/migrate-tokens-to-wallet.js +165 -0
- package/dist/server/__tests__/billing.test.d.ts +5 -0
- package/dist/server/__tests__/billing.test.d.ts.map +1 -0
- package/dist/server/__tests__/billing.test.js +223 -0
- package/dist/server/ai-client.d.ts +59 -0
- package/dist/server/ai-client.d.ts.map +1 -0
- package/dist/server/ai-client.js +111 -0
- package/dist/server/ai-generation-service.d.ts +66 -0
- package/dist/server/ai-generation-service.d.ts.map +1 -0
- package/dist/server/ai-generation-service.js +274 -0
- package/dist/server/billing.d.ts +200 -0
- package/dist/server/billing.d.ts.map +1 -0
- package/dist/server/billing.js +488 -0
- package/dist/server/gateway-service.d.ts +13 -0
- package/dist/server/gateway-service.d.ts.map +1 -0
- package/dist/server/gateway-service.js +161 -0
- package/dist/server/global-settings.d.ts +16 -0
- package/dist/server/global-settings.d.ts.map +1 -0
- package/dist/server/global-settings.js +42 -0
- package/dist/server/model-filter.d.ts +25 -0
- package/dist/server/model-filter.d.ts.map +1 -0
- package/dist/server/model-filter.js +240 -0
- package/dist/server/ocr.d.ts +39 -0
- package/dist/server/ocr.d.ts.map +1 -0
- package/dist/server/ocr.js +280 -0
- package/dist/server/openai-client.d.ts +19 -0
- package/dist/server/openai-client.d.ts.map +1 -0
- package/dist/server/openai-client.js +26 -0
- package/dist/server/pricing-config.d.ts +18 -0
- package/dist/server/pricing-config.d.ts.map +1 -0
- package/dist/server/pricing-config.js +94 -0
- package/dist/server/pricing-validator.d.ts +41 -0
- package/dist/server/pricing-validator.d.ts.map +1 -0
- package/dist/server/pricing-validator.js +113 -0
- package/dist/server/pricing.d.ts +121 -0
- package/dist/server/pricing.d.ts.map +1 -0
- package/dist/server/pricing.js +225 -0
- package/dist/server/quota.d.ts +66 -0
- package/dist/server/quota.d.ts.map +1 -0
- package/dist/server/quota.js +538 -0
- package/dist/server/wallet-repair.d.ts +32 -0
- package/dist/server/wallet-repair.d.ts.map +1 -0
- package/dist/server/wallet-repair.js +189 -0
- package/dist/server.d.ts +13 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +87 -16
- package/dist/sitemap/handlers/prompts.d.ts +6 -0
- package/dist/sitemap/handlers/prompts.d.ts.map +1 -0
- package/dist/sitemap/handlers/prompts.js +72 -0
- package/dist/sitemap/handlers/users.d.ts +6 -0
- package/dist/sitemap/handlers/users.d.ts.map +1 -0
- package/dist/sitemap/handlers/users.js +80 -0
- package/dist/sitemap/manifest.d.ts +8 -0
- package/dist/sitemap/manifest.d.ts.map +1 -0
- package/dist/sitemap/manifest.js +27 -0
- package/dist/types/gateway.d.ts +40 -0
- package/dist/types/gateway.d.ts.map +1 -0
- package/dist/types/gateway.js +4 -0
- package/dist/types/quota.d.ts +74 -0
- package/dist/types/quota.d.ts.map +1 -0
- package/dist/types/quota.js +11 -0
- package/dist/utils/date.d.ts +7 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/date.js +17 -0
- package/dist/web/admin/AdminTokenPacksPage.js +1 -1
- package/dist/web/admin/BillingAnalyticsPage.d.ts +2 -0
- package/dist/web/admin/BillingAnalyticsPage.d.ts.map +1 -0
- package/dist/web/admin/BillingAnalyticsPage.js +141 -0
- package/dist/web/admin/GlobalAISettingsPage.d.ts +2 -0
- package/dist/web/admin/GlobalAISettingsPage.d.ts.map +1 -0
- package/dist/web/admin/GlobalAISettingsPage.js +93 -0
- package/dist/web/admin/UserTokenPage.d.ts.map +1 -1
- package/dist/web/admin/UserTokenPage.js +20 -7
- package/dist/web/auth/AISettingsPage.d.ts +2 -0
- package/dist/web/auth/AISettingsPage.d.ts.map +1 -0
- package/dist/web/auth/AISettingsPage.js +258 -0
- package/dist/web/auth/APIKeysPage.d.ts +2 -0
- package/dist/web/auth/APIKeysPage.d.ts.map +1 -0
- package/dist/web/auth/APIKeysPage.js +154 -0
- package/dist/web/auth/HistoryPage.d.ts +2 -0
- package/dist/web/auth/HistoryPage.d.ts.map +1 -0
- package/dist/web/auth/HistoryPage.js +279 -0
- package/dist/web/auth/PromptsPage.d.ts +5 -0
- package/dist/web/auth/PromptsPage.d.ts.map +1 -0
- package/dist/web/auth/PromptsPage.js +137 -0
- package/dist/web/auth/TokenPage.d.ts.map +1 -1
- package/dist/web/auth/TokenPage.js +88 -31
- package/dist/web/auth/UsageAndTokensPage.d.ts +2 -0
- package/dist/web/auth/UsageAndTokensPage.d.ts.map +1 -0
- package/dist/web/auth/UsageAndTokensPage.js +157 -0
- package/dist/web/auth/UsagePage.d.ts +2 -0
- package/dist/web/auth/UsagePage.d.ts.map +1 -0
- package/dist/web/auth/UsagePage.js +62 -0
- package/dist/web/auth/components/ApiKeyFilterSelect.d.ts +13 -0
- package/dist/web/auth/components/ApiKeyFilterSelect.d.ts.map +1 -0
- package/dist/web/auth/components/ApiKeyFilterSelect.js +16 -0
- package/dist/web/auth/components/ModelUsageTable.d.ts +19 -0
- package/dist/web/auth/components/ModelUsageTable.d.ts.map +1 -0
- package/dist/web/auth/components/ModelUsageTable.js +37 -0
- package/dist/web/auth/components/PurchaseButton.d.ts +7 -0
- package/dist/web/auth/components/PurchaseButton.d.ts.map +1 -0
- package/dist/web/auth/components/PurchaseButton.js +13 -0
- package/dist/web/auth/components/TokenHistoryCard.d.ts +20 -0
- package/dist/web/auth/components/TokenHistoryCard.d.ts.map +1 -0
- package/dist/web/auth/components/TokenHistoryCard.js +76 -0
- package/dist/web/auth/components/TokenKpiGrid.d.ts +24 -0
- package/dist/web/auth/components/TokenKpiGrid.d.ts.map +1 -0
- package/dist/web/auth/components/TokenKpiGrid.js +38 -0
- package/dist/web/auth/components/UsageByDayChart.d.ts +11 -0
- package/dist/web/auth/components/UsageByDayChart.d.ts.map +1 -0
- package/dist/web/auth/components/UsageByDayChart.js +32 -0
- package/dist/web/auth/components/UsageByModelBarChart.d.ts +12 -0
- package/dist/web/auth/components/UsageByModelBarChart.d.ts.map +1 -0
- package/dist/web/auth/components/UsageByModelBarChart.js +32 -0
- package/dist/web/auth/components/WalletStatusCard.d.ts +9 -0
- package/dist/web/auth/components/WalletStatusCard.d.ts.map +1 -0
- package/dist/web/auth/components/WalletStatusCard.js +50 -0
- package/dist/web/components/ImageGenerative.d.ts +3 -1
- package/dist/web/components/ImageGenerative.d.ts.map +1 -1
- package/dist/web/components/ImageGenerative.js +139 -52
- package/dist/web/components/TextareaGenerative.d.ts +3 -1
- package/dist/web/components/TextareaGenerative.d.ts.map +1 -1
- package/dist/web/components/TextareaGenerative.js +10 -5
- package/dist/web/public/PromptDetailPage.d.ts +25 -0
- package/dist/web/public/PromptDetailPage.d.ts.map +1 -0
- package/dist/web/public/PromptDetailPage.js +71 -0
- package/dist/web/public/PromptDetailPageServer.d.ts +15 -0
- package/dist/web/public/PromptDetailPageServer.d.ts.map +1 -0
- package/dist/web/public/PromptDetailPageServer.js +68 -0
- package/dist/web/public/PublicPromptsPage.d.ts +5 -0
- package/dist/web/public/PublicPromptsPage.d.ts.map +1 -0
- package/dist/web/public/PublicPromptsPage.js +110 -0
- package/dist/web/public/PurchaseTokensPage.d.ts +2 -0
- package/dist/web/public/PurchaseTokensPage.d.ts.map +1 -0
- package/dist/web/public/PurchaseTokensPage.js +98 -0
- package/dist/web/public/UserAvatar.d.ts +13 -0
- package/dist/web/public/UserAvatar.d.ts.map +1 -0
- package/dist/web/public/UserAvatar.js +13 -0
- package/dist/web/public/UserDetailPageServer.d.ts +15 -0
- package/dist/web/public/UserDetailPageServer.d.ts.map +1 -0
- package/dist/web/public/UserDetailPageServer.js +31 -0
- package/dist/web/public/UserPromptsPage.d.ts +9 -0
- package/dist/web/public/UserPromptsPage.d.ts.map +1 -0
- package/dist/web/public/UserPromptsPage.js +112 -0
- package/dist/web/public/UserPromptsPageServer.d.ts +15 -0
- package/dist/web/public/UserPromptsPageServer.d.ts.map +1 -0
- package/dist/web/public/UserPromptsPageServer.js +31 -0
- package/package.json +18 -9
- package/supabase/migrations/20251125000000_ai_tokens.sql +7 -0
- package/supabase/migrations/20260123100002_user_token_quota_monthly copy.sql +173 -0
- package/supabase/migrations/20260128100003_update_and_add_table.sql +368 -0
- package/supabase/migrations/20260128120000_seed_providers_models.sql +78 -0
- package/supabase/migrations/20260128131405_add_api_key_id_to_ledgers.sql +41 -0
- package/supabase/migrations/20260128140000_ai_artifacts_storage.sql +99 -0
- package/supabase/migrations/20260128140002_ai_user_settings.sql +57 -0
- package/supabase/migrations/20260128150000_drop_ai_user_settings.sql +21 -0
- package/supabase/migrations/20260128160000_wallet_billing_system.sql +192 -0
- package/supabase/migrations/20260128160001_wallet_rpc_functions.sql +165 -0
- package/supabase/migrations/20260128170000_add_pack_coef_to_token_packs.sql +30 -0
- package/supabase/migrations/20260129120000_wallet_view_rpc.sql +41 -0
- package/supabase/migrations/20260129220003_update_pack_margins.sql +31 -0
- package/supabase/migrations/20260129330004_ai_user_prompts.sql +151 -0
- package/supabase/migrations/20260129330005_ai_prompts_ip_tracking.sql +92 -0
- package/supabase/migrations/20260129330006_ai_prompts_slug.sql +64 -0
- package/supabase/migrations/20260129330007_ai_prompts_view_slug.sql +26 -0
- package/supabase/migrations/20260129440000_ai_prompts_view_username.sql +33 -0
- package/supabase/migrations/20260129450000_ai_prompts_add_lang.sql +40 -0
- package/supabase/migrations/20260131000000_extract_model_prompt_in_ledger.sql +92 -0
- package/supabase/migrations/20260131140000_fix_duplicate_purchases.sql +64 -0
- package/supabase/migrations/20260201120000_module-ai_default_models.sql +63 -0
- package/supabase/migrations/20260201130000_module-ai_remove_provider_tables.sql +17 -0
- package/supabase/migrations-down/20251217120000_user_token_quota_monthly.sql +34 -0
- package/supabase/migrations-down/20260128131405_add_api_key_id_to_ledgers.sql +25 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET /api/public/v1/doc
|
|
3
|
+
* API documentation endpoint
|
|
4
|
+
*/
|
|
5
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
6
|
+
export declare function GET(request: NextRequest): Promise<NextResponse<{
|
|
7
|
+
request_id: `${string}-${string}-${string}-${string}-${string}`;
|
|
8
|
+
version: string;
|
|
9
|
+
endpoints: {
|
|
10
|
+
text_generation: {
|
|
11
|
+
method: string;
|
|
12
|
+
path: string;
|
|
13
|
+
description: string;
|
|
14
|
+
authentication: string;
|
|
15
|
+
required_scope: string;
|
|
16
|
+
request_body: {
|
|
17
|
+
prompt: {
|
|
18
|
+
type: string;
|
|
19
|
+
required: boolean;
|
|
20
|
+
min: number;
|
|
21
|
+
max: number;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
model: {
|
|
25
|
+
type: string;
|
|
26
|
+
required: boolean;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
max_tokens: {
|
|
30
|
+
type: string;
|
|
31
|
+
required: boolean;
|
|
32
|
+
min: number;
|
|
33
|
+
max: number;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
temperature: {
|
|
37
|
+
type: string;
|
|
38
|
+
required: boolean;
|
|
39
|
+
min: number;
|
|
40
|
+
max: number;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
system_prompt: {
|
|
44
|
+
type: string;
|
|
45
|
+
required: boolean;
|
|
46
|
+
max: number;
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
response: {
|
|
51
|
+
request_id: string;
|
|
52
|
+
text: string;
|
|
53
|
+
model: string;
|
|
54
|
+
provider: string;
|
|
55
|
+
tokens: {
|
|
56
|
+
input: string;
|
|
57
|
+
output: string;
|
|
58
|
+
total: string;
|
|
59
|
+
};
|
|
60
|
+
balance: {
|
|
61
|
+
remaining_quota: string;
|
|
62
|
+
remaining_purchased: string;
|
|
63
|
+
total: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
example: {
|
|
67
|
+
curl: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
image_generation: {
|
|
71
|
+
method: string;
|
|
72
|
+
path: string;
|
|
73
|
+
description: string;
|
|
74
|
+
authentication: string;
|
|
75
|
+
required_scope: string;
|
|
76
|
+
request_body: {
|
|
77
|
+
prompt: {
|
|
78
|
+
type: string;
|
|
79
|
+
required: boolean;
|
|
80
|
+
min: number;
|
|
81
|
+
max: number;
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
model: {
|
|
85
|
+
type: string;
|
|
86
|
+
required: boolean;
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
size: {
|
|
90
|
+
type: string;
|
|
91
|
+
required: boolean;
|
|
92
|
+
enum: string[];
|
|
93
|
+
description: string;
|
|
94
|
+
};
|
|
95
|
+
quality: {
|
|
96
|
+
type: string;
|
|
97
|
+
required: boolean;
|
|
98
|
+
enum: string[];
|
|
99
|
+
description: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
response: {
|
|
103
|
+
request_id: string;
|
|
104
|
+
image_url: string;
|
|
105
|
+
model: string;
|
|
106
|
+
provider: string;
|
|
107
|
+
tokens: {
|
|
108
|
+
used: string;
|
|
109
|
+
};
|
|
110
|
+
balance: {
|
|
111
|
+
remaining_quota: string;
|
|
112
|
+
remaining_purchased: string;
|
|
113
|
+
total: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
example: {
|
|
117
|
+
curl: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
status: {
|
|
121
|
+
method: string;
|
|
122
|
+
path: string;
|
|
123
|
+
description: string;
|
|
124
|
+
authentication: string;
|
|
125
|
+
required_scope: string;
|
|
126
|
+
response: {
|
|
127
|
+
request_id: string;
|
|
128
|
+
api_key: {
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
prefix: string;
|
|
132
|
+
env: string;
|
|
133
|
+
scopes: string;
|
|
134
|
+
rate_limit_rpm: string;
|
|
135
|
+
daily_token_limit: string;
|
|
136
|
+
created_at: string;
|
|
137
|
+
};
|
|
138
|
+
balance: {
|
|
139
|
+
purchased: string;
|
|
140
|
+
quota: string;
|
|
141
|
+
total: string;
|
|
142
|
+
};
|
|
143
|
+
quota: {
|
|
144
|
+
plan: string;
|
|
145
|
+
effective_quota: string;
|
|
146
|
+
used_quota: string;
|
|
147
|
+
remaining_quota: string;
|
|
148
|
+
period_start: string;
|
|
149
|
+
period_end: string;
|
|
150
|
+
is_active: string;
|
|
151
|
+
};
|
|
152
|
+
settings: {
|
|
153
|
+
mode: string;
|
|
154
|
+
max_tokens_per_call: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
example: {
|
|
158
|
+
curl: string;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
providers: {
|
|
162
|
+
method: string;
|
|
163
|
+
path: string;
|
|
164
|
+
description: string;
|
|
165
|
+
authentication: string;
|
|
166
|
+
required_scope: string;
|
|
167
|
+
query_parameters: {
|
|
168
|
+
kind: {
|
|
169
|
+
type: string;
|
|
170
|
+
required: boolean;
|
|
171
|
+
enum: string[];
|
|
172
|
+
description: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
response: {
|
|
176
|
+
request_id: string;
|
|
177
|
+
providers: string;
|
|
178
|
+
};
|
|
179
|
+
example: {
|
|
180
|
+
curl: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
connect: {
|
|
184
|
+
method: string;
|
|
185
|
+
path: string;
|
|
186
|
+
description: string;
|
|
187
|
+
authentication: string;
|
|
188
|
+
request_body: {
|
|
189
|
+
email: {
|
|
190
|
+
type: string;
|
|
191
|
+
required: boolean;
|
|
192
|
+
description: string;
|
|
193
|
+
};
|
|
194
|
+
password: {
|
|
195
|
+
type: string;
|
|
196
|
+
required: boolean;
|
|
197
|
+
description: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
response: {
|
|
201
|
+
request_id: string;
|
|
202
|
+
api_key: string;
|
|
203
|
+
prefix: string;
|
|
204
|
+
user_id: string;
|
|
205
|
+
};
|
|
206
|
+
example: {
|
|
207
|
+
curl: string;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
purchase: {
|
|
211
|
+
method: string;
|
|
212
|
+
path: string;
|
|
213
|
+
description: string;
|
|
214
|
+
authentication: string;
|
|
215
|
+
response: {
|
|
216
|
+
request_id: string;
|
|
217
|
+
purchase_url: string;
|
|
218
|
+
};
|
|
219
|
+
example: {
|
|
220
|
+
curl: string;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
error_codes: {
|
|
225
|
+
MISSING_API_KEY: string;
|
|
226
|
+
INVALID_API_KEY: string;
|
|
227
|
+
INACTIVE_API_KEY: string;
|
|
228
|
+
INSUFFICIENT_SCOPE: string;
|
|
229
|
+
INSUFFICIENT_TOKENS: string;
|
|
230
|
+
RATE_LIMIT_EXCEEDED: string;
|
|
231
|
+
DAILY_LIMIT_EXCEEDED: string;
|
|
232
|
+
VALIDATION_ERROR: string;
|
|
233
|
+
PROVIDER_ERROR: string;
|
|
234
|
+
INTERNAL_ERROR: string;
|
|
235
|
+
INVALID_CREDENTIALS: string;
|
|
236
|
+
USER_NOT_FOUND: string;
|
|
237
|
+
};
|
|
238
|
+
}>>;
|
|
239
|
+
//# sourceMappingURL=doc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc.d.ts","sourceRoot":"","sources":["../../../../src/api/public/v1/doc.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGxD,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyP7C"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET /api/public/v1/doc
|
|
3
|
+
* API documentation endpoint
|
|
4
|
+
*/
|
|
5
|
+
import { NextResponse } from "next/server";
|
|
6
|
+
import { randomUUID } from "crypto";
|
|
7
|
+
export async function GET(request) {
|
|
8
|
+
const requestId = randomUUID();
|
|
9
|
+
const documentation = {
|
|
10
|
+
request_id: requestId,
|
|
11
|
+
version: "1.0.0",
|
|
12
|
+
endpoints: {
|
|
13
|
+
text_generation: {
|
|
14
|
+
method: "POST",
|
|
15
|
+
path: "/api/public/v1/text-ai",
|
|
16
|
+
description: "Generate text using AI models",
|
|
17
|
+
authentication: "Bearer token required",
|
|
18
|
+
required_scope: "text",
|
|
19
|
+
request_body: {
|
|
20
|
+
prompt: {
|
|
21
|
+
type: "string",
|
|
22
|
+
required: true,
|
|
23
|
+
min: 1,
|
|
24
|
+
max: 10000,
|
|
25
|
+
description: "The prompt to generate text from",
|
|
26
|
+
},
|
|
27
|
+
model: {
|
|
28
|
+
type: "string",
|
|
29
|
+
required: false,
|
|
30
|
+
description: "AI model to use (default: user setting or gpt-4o-mini)",
|
|
31
|
+
},
|
|
32
|
+
max_tokens: {
|
|
33
|
+
type: "number",
|
|
34
|
+
required: false,
|
|
35
|
+
min: 1,
|
|
36
|
+
max: 32000,
|
|
37
|
+
description: "Maximum tokens to generate",
|
|
38
|
+
},
|
|
39
|
+
temperature: {
|
|
40
|
+
type: "number",
|
|
41
|
+
required: false,
|
|
42
|
+
min: 0,
|
|
43
|
+
max: 2,
|
|
44
|
+
description: "Temperature for generation (0-2)",
|
|
45
|
+
},
|
|
46
|
+
system_prompt: {
|
|
47
|
+
type: "string",
|
|
48
|
+
required: false,
|
|
49
|
+
max: 5000,
|
|
50
|
+
description: "System prompt to guide the AI",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
response: {
|
|
54
|
+
request_id: "string",
|
|
55
|
+
text: "string",
|
|
56
|
+
model: "string",
|
|
57
|
+
provider: "string",
|
|
58
|
+
tokens: {
|
|
59
|
+
input: "number",
|
|
60
|
+
output: "number",
|
|
61
|
+
total: "number",
|
|
62
|
+
},
|
|
63
|
+
balance: {
|
|
64
|
+
remaining_quota: "number",
|
|
65
|
+
remaining_purchased: "number",
|
|
66
|
+
total: "number",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
example: {
|
|
70
|
+
curl: `curl -X POST https://your-domain.com/api/public/v1/text-ai \\
|
|
71
|
+
-H "Authorization: Bearer your_api_key" \\
|
|
72
|
+
-H "Content-Type: application/json" \\
|
|
73
|
+
-d '{"prompt": "Write a haiku about coding", "max_tokens": 100}'`,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
image_generation: {
|
|
77
|
+
method: "POST",
|
|
78
|
+
path: "/api/public/v1/image-ai",
|
|
79
|
+
description: "Generate images using AI models",
|
|
80
|
+
authentication: "Bearer token required",
|
|
81
|
+
required_scope: "image",
|
|
82
|
+
request_body: {
|
|
83
|
+
prompt: {
|
|
84
|
+
type: "string",
|
|
85
|
+
required: true,
|
|
86
|
+
min: 1,
|
|
87
|
+
max: 5000,
|
|
88
|
+
description: "The prompt to generate image from",
|
|
89
|
+
},
|
|
90
|
+
model: {
|
|
91
|
+
type: "string",
|
|
92
|
+
required: false,
|
|
93
|
+
description: "AI model to use (default: user setting or dall-e-3)",
|
|
94
|
+
},
|
|
95
|
+
size: {
|
|
96
|
+
type: "string",
|
|
97
|
+
required: false,
|
|
98
|
+
enum: ["256x256", "512x512", "1024x1024", "1024x1792", "1792x1024"],
|
|
99
|
+
description: "Image size",
|
|
100
|
+
},
|
|
101
|
+
quality: {
|
|
102
|
+
type: "string",
|
|
103
|
+
required: false,
|
|
104
|
+
enum: ["standard", "hd"],
|
|
105
|
+
description: "Image quality",
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
response: {
|
|
109
|
+
request_id: "string",
|
|
110
|
+
image_url: "string",
|
|
111
|
+
model: "string",
|
|
112
|
+
provider: "string",
|
|
113
|
+
tokens: {
|
|
114
|
+
used: "number",
|
|
115
|
+
},
|
|
116
|
+
balance: {
|
|
117
|
+
remaining_quota: "number",
|
|
118
|
+
remaining_purchased: "number",
|
|
119
|
+
total: "number",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
example: {
|
|
123
|
+
curl: `curl -X POST https://your-domain.com/api/public/v1/image-ai \\
|
|
124
|
+
-H "Authorization: Bearer your_api_key" \\
|
|
125
|
+
-H "Content-Type: application/json" \\
|
|
126
|
+
-d '{"prompt": "A futuristic city at sunset", "size": "1024x1024"}'`,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
status: {
|
|
130
|
+
method: "GET",
|
|
131
|
+
path: "/api/public/v1/status",
|
|
132
|
+
description: "Get account status, balance, and quota information",
|
|
133
|
+
authentication: "Bearer token required",
|
|
134
|
+
required_scope: "none",
|
|
135
|
+
response: {
|
|
136
|
+
request_id: "string",
|
|
137
|
+
api_key: {
|
|
138
|
+
id: "string",
|
|
139
|
+
name: "string",
|
|
140
|
+
prefix: "string",
|
|
141
|
+
env: "string",
|
|
142
|
+
scopes: "array",
|
|
143
|
+
rate_limit_rpm: "number",
|
|
144
|
+
daily_token_limit: "number|null",
|
|
145
|
+
created_at: "string",
|
|
146
|
+
},
|
|
147
|
+
balance: {
|
|
148
|
+
purchased: "number",
|
|
149
|
+
quota: "number",
|
|
150
|
+
total: "number",
|
|
151
|
+
},
|
|
152
|
+
quota: {
|
|
153
|
+
plan: "string",
|
|
154
|
+
effective_quota: "number",
|
|
155
|
+
used_quota: "number",
|
|
156
|
+
remaining_quota: "number",
|
|
157
|
+
period_start: "string|null",
|
|
158
|
+
period_end: "string|null",
|
|
159
|
+
is_active: "boolean",
|
|
160
|
+
},
|
|
161
|
+
settings: {
|
|
162
|
+
mode: "string",
|
|
163
|
+
max_tokens_per_call: "number|null",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
example: {
|
|
167
|
+
curl: `curl -X GET https://your-domain.com/api/public/v1/status \\
|
|
168
|
+
-H "Authorization: Bearer your_api_key"`,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
providers: {
|
|
172
|
+
method: "GET",
|
|
173
|
+
path: "/api/public/v1/provider",
|
|
174
|
+
description: "List available AI providers and models",
|
|
175
|
+
authentication: "Bearer token required",
|
|
176
|
+
required_scope: "none",
|
|
177
|
+
query_parameters: {
|
|
178
|
+
kind: {
|
|
179
|
+
type: "string",
|
|
180
|
+
required: false,
|
|
181
|
+
enum: ["text", "image"],
|
|
182
|
+
description: "Filter by model kind",
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
response: {
|
|
186
|
+
request_id: "string",
|
|
187
|
+
providers: "array",
|
|
188
|
+
},
|
|
189
|
+
example: {
|
|
190
|
+
curl: `curl -X GET https://your-domain.com/api/public/v1/provider?kind=text \\
|
|
191
|
+
-H "Authorization: Bearer your_api_key"`,
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
connect: {
|
|
195
|
+
method: "POST",
|
|
196
|
+
path: "/api/public/v1/connect",
|
|
197
|
+
description: "Connect with email/password and receive API key",
|
|
198
|
+
authentication: "none (uses email/password)",
|
|
199
|
+
request_body: {
|
|
200
|
+
email: {
|
|
201
|
+
type: "string",
|
|
202
|
+
required: true,
|
|
203
|
+
description: "User email",
|
|
204
|
+
},
|
|
205
|
+
password: {
|
|
206
|
+
type: "string",
|
|
207
|
+
required: true,
|
|
208
|
+
description: "User password",
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
response: {
|
|
212
|
+
request_id: "string",
|
|
213
|
+
api_key: "string (returned only once)",
|
|
214
|
+
prefix: "string",
|
|
215
|
+
user_id: "string",
|
|
216
|
+
},
|
|
217
|
+
example: {
|
|
218
|
+
curl: `curl -X POST https://your-domain.com/api/public/v1/connect \\
|
|
219
|
+
-H "Content-Type: application/json" \\
|
|
220
|
+
-d '{"email": "user@example.com", "password": "your_password"}'`,
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
purchase: {
|
|
224
|
+
method: "GET",
|
|
225
|
+
path: "/api/public/v1/purchase",
|
|
226
|
+
description: "Get URL to purchase tokens",
|
|
227
|
+
authentication: "none",
|
|
228
|
+
response: {
|
|
229
|
+
request_id: "string",
|
|
230
|
+
purchase_url: "string",
|
|
231
|
+
},
|
|
232
|
+
example: {
|
|
233
|
+
curl: `curl -X GET https://your-domain.com/api/public/v1/purchase`,
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
error_codes: {
|
|
238
|
+
MISSING_API_KEY: "Authorization header is missing",
|
|
239
|
+
INVALID_API_KEY: "API key is invalid or not found",
|
|
240
|
+
INACTIVE_API_KEY: "API key has been deactivated",
|
|
241
|
+
INSUFFICIENT_SCOPE: "API key lacks required scope for this endpoint",
|
|
242
|
+
INSUFFICIENT_TOKENS: "Not enough tokens to complete request",
|
|
243
|
+
RATE_LIMIT_EXCEEDED: "Rate limit exceeded",
|
|
244
|
+
DAILY_LIMIT_EXCEEDED: "Daily token limit exceeded",
|
|
245
|
+
VALIDATION_ERROR: "Request validation failed",
|
|
246
|
+
PROVIDER_ERROR: "AI provider returned an error",
|
|
247
|
+
INTERNAL_ERROR: "Internal server error",
|
|
248
|
+
INVALID_CREDENTIALS: "Invalid email or password",
|
|
249
|
+
USER_NOT_FOUND: "User not found",
|
|
250
|
+
},
|
|
251
|
+
};
|
|
252
|
+
return NextResponse.json(documentation);
|
|
253
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET /api/public/v1/history/[id]
|
|
3
|
+
* Get detailed artifact with download URL for files
|
|
4
|
+
*
|
|
5
|
+
* DELETE /api/public/v1/history/[id]
|
|
6
|
+
* Delete artifact and its storage file
|
|
7
|
+
*/
|
|
8
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
9
|
+
export declare function GET(request: NextRequest, { params }: {
|
|
10
|
+
params: Promise<{
|
|
11
|
+
id: string;
|
|
12
|
+
}>;
|
|
13
|
+
}): Promise<NextResponse<import("../_lib/errors").ApiError> | NextResponse<{
|
|
14
|
+
request_id: `${string}-${string}-${string}-${string}-${string}`;
|
|
15
|
+
artifact: {
|
|
16
|
+
text_content: any;
|
|
17
|
+
id: any;
|
|
18
|
+
kind: any;
|
|
19
|
+
provider: any;
|
|
20
|
+
model: any;
|
|
21
|
+
endpoint: any;
|
|
22
|
+
tokens_total: any;
|
|
23
|
+
status_code: any;
|
|
24
|
+
mime_type: any;
|
|
25
|
+
storage_path: any;
|
|
26
|
+
size_bytes: any;
|
|
27
|
+
created_at: any;
|
|
28
|
+
meta: any;
|
|
29
|
+
};
|
|
30
|
+
}> | NextResponse<{
|
|
31
|
+
request_id: `${string}-${string}-${string}-${string}-${string}`;
|
|
32
|
+
artifact: {
|
|
33
|
+
download_error: string;
|
|
34
|
+
id: any;
|
|
35
|
+
kind: any;
|
|
36
|
+
provider: any;
|
|
37
|
+
model: any;
|
|
38
|
+
endpoint: any;
|
|
39
|
+
tokens_total: any;
|
|
40
|
+
status_code: any;
|
|
41
|
+
mime_type: any;
|
|
42
|
+
storage_path: any;
|
|
43
|
+
size_bytes: any;
|
|
44
|
+
created_at: any;
|
|
45
|
+
meta: any;
|
|
46
|
+
};
|
|
47
|
+
}> | NextResponse<{
|
|
48
|
+
request_id: `${string}-${string}-${string}-${string}-${string}`;
|
|
49
|
+
artifact: {
|
|
50
|
+
download_url: string;
|
|
51
|
+
expires_in: number;
|
|
52
|
+
id: any;
|
|
53
|
+
kind: any;
|
|
54
|
+
provider: any;
|
|
55
|
+
model: any;
|
|
56
|
+
endpoint: any;
|
|
57
|
+
tokens_total: any;
|
|
58
|
+
status_code: any;
|
|
59
|
+
mime_type: any;
|
|
60
|
+
storage_path: any;
|
|
61
|
+
size_bytes: any;
|
|
62
|
+
created_at: any;
|
|
63
|
+
meta: any;
|
|
64
|
+
};
|
|
65
|
+
}> | NextResponse<{
|
|
66
|
+
request_id: `${string}-${string}-${string}-${string}-${string}`;
|
|
67
|
+
artifact: {
|
|
68
|
+
note: string;
|
|
69
|
+
id: any;
|
|
70
|
+
kind: any;
|
|
71
|
+
provider: any;
|
|
72
|
+
model: any;
|
|
73
|
+
endpoint: any;
|
|
74
|
+
tokens_total: any;
|
|
75
|
+
status_code: any;
|
|
76
|
+
mime_type: any;
|
|
77
|
+
storage_path: any;
|
|
78
|
+
size_bytes: any;
|
|
79
|
+
created_at: any;
|
|
80
|
+
meta: any;
|
|
81
|
+
};
|
|
82
|
+
}>>;
|
|
83
|
+
export declare function DELETE(request: NextRequest, { params }: {
|
|
84
|
+
params: Promise<{
|
|
85
|
+
id: string;
|
|
86
|
+
}>;
|
|
87
|
+
}): Promise<NextResponse<import("../_lib/errors").ApiError> | NextResponse<{
|
|
88
|
+
request_id: `${string}-${string}-${string}-${string}-${string}`;
|
|
89
|
+
deleted: boolean;
|
|
90
|
+
artifact_id: string;
|
|
91
|
+
}>>;
|
|
92
|
+
//# sourceMappingURL=%5Bid%5D.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"[id].d.ts","sourceRoot":"","sources":["../../../../../src/api/public/v1/history/[id].ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQxD,wBAAsB,GAAG,CACvB,OAAO,EAAE,WAAW,EACpB,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2JhD;AAED,wBAAsB,MAAM,CAC1B,OAAO,EAAE,WAAW,EACpB,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE;;;;IAiFhD"}
|