/
githubmirror
/
strapi
Обзор
Документация
Войти
/
githubmirror
/
strapi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/core/admin/shared/contracts/ai.ts
62 строки
1 KB
Nico André
feat(core/*): introduce strapi.ai namespace (#25886)
17 апр 2026, 09:46
Не верифицирован
17 апр 2026, 09:46
bc0b0e9
Код
Авторство
О чём код?
import type { errors } from '@strapi/utils'; /** * GET /ai-token - Get an AI token for the current admin user */ export declare namespace GetAiToken { export interface Request { query: {}; body: {}; } export interface Response { data: { token: string; expiresAt?: string; }; error?: errors.ApplicationError; } } /** * GET /ai-usage - Get AI usage */ export declare namespace GetAiUsage { export interface Request { query: {}; body: {}; } export interface Response { cmsAiCreditsUsed: number; subscription: { subscriptionId: string; planPriceId: string; subscriptionStatus: string; isActiveSubscription: boolean; cmsAiEnabled: boolean; cmsAiCreditsBase: number; cmsAiCreditsMaxUsage: number; currentTermStart: string; currentTermEnd: string; }; } } /** * GET /ai-feature-config - Get AI feature config */ export declare namespace GetAiFeatureConfig { export interface Request { query: {}; body: {}; } export interface Response { data: { isAiI18nConfigured: boolean; isAiMediaLibraryConfigured: boolean; }; error?: errors.ApplicationError; } }