astrbot_plugin_imagestudio/frontend/shared/api/endpoints.ts

60 行
3 KiB
TypeScript

2026-07-04 22:51:52 +08:00
export const API_BASE = "/api/v1/plugins/extensions/astrbot_plugin_imagestudio"
export const endpoints = {
uiBootstrap: "ui/bootstrap",
dashboardSummary: "dashboard/summary",
profiles: "profiles",
2026-07-05 13:37:26 +08:00
profile: (profileId: string) => `profiles/${profileId}`,
2026-07-04 22:51:52 +08:00
quickProfileDraft: "profiles/quick-draft",
profileWorkflows: (profileId: string) => `profiles/${profileId}/workflows`,
workflow: (workflowId: string) => `workflows/${workflowId}`,
workflowStart: (workflowId: string) => `workflows/${workflowId}/start`,
workflowCancel: (workflowId: string) => `workflows/${workflowId}/cancel`,
workflowArchive: (workflowId: string) => `workflows/${workflowId}/archive`,
workflowNodes: (workflowId: string) => `workflows/${workflowId}/nodes`,
2026-07-05 13:51:10 +08:00
nodeGenerate: (nodeId: string) => `nodes/${nodeId}/generate`,
nodeSelectImage: (nodeId: string) => `nodes/${nodeId}/select-image`,
nodeAdoptImage: (nodeId: string) => `nodes/${nodeId}/adopt-image`,
nodeImages: (nodeId: string) => `nodes/${nodeId}/images`,
image: (imageId: string) => `images/${imageId}`,
imageSelect: (imageId: string) => `images/${imageId}/select`,
imageUnselect: (imageId: string) => `images/${imageId}/unselect`,
imageArchive: (imageId: string) => `images/${imageId}/archive`,
2026-07-04 22:51:52 +08:00
jobs: "jobs",
jobCancel: (taskId: string) => `jobs/${taskId}/cancel`,
jobRetry: (taskId: string) => `jobs/${taskId}/retry`,
jobDeadLetterRetry: "jobs/dead-letter/retry",
jobDeadLetterMoveFailed: "jobs/dead-letter/move-failed",
2026-07-04 22:51:52 +08:00
settingsSchema: "settings/schema",
settingsCurrent: "settings/current",
2026-07-05 13:00:08 +08:00
settingsValidate: "settings/validate",
settingsDiff: "settings/diff",
settingsSave: "settings/save",
settingsReload: "settings/reload",
settingsExport: "settings/export",
2026-07-04 22:51:52 +08:00
storageStatus: "storage/status",
mediaSign: "media/sign",
materialCategories: "material-categories",
materials: "materials",
material: (materialId: string) => `materials/${materialId}`,
materialRecognize: (materialId: string) => `materials/${materialId}/recognize`,
materialConfirm: (materialId: string) => `materials/${materialId}/confirm`,
wardrobe: (profileId: string) => `profiles/${profileId}/wardrobe`,
2026-07-05 13:18:16 +08:00
wardrobeImportMaterial: (profileId: string) => `profiles/${profileId}/wardrobe/import-material`,
wardrobeItem: (profileId: string, wardrobeItemId: string) => `profiles/${profileId}/wardrobe/${wardrobeItemId}`,
wardrobeMatch: (profileId: string) => `profiles/${profileId}/wardrobe/match`,
2026-07-05 13:41:59 +08:00
privateCompanionDailyOutfit: "integrations/private-companion/daily-outfit",
integrationEventLogs: "integrations/logs",
apiDiscoveryDialects: "api-discovery/dialects",
apiDiscoveryProbeModel: "api-discovery/probe-model",
apiDiscoveryCapabilities: "api-discovery/capabilities",
apiDiscoveryManualOverride: "api-discovery/manual-override",
2026-07-05 13:21:07 +08:00
apiDiscoveryValidateRenderPlan: "api-discovery/validate-render-plan",
generationLogs: "logs/generation",
workflowLogs: "logs/workflows",
errorLogs: "logs/errors",
integrationLogs: "logs/integrations",
auditLogs: "security/audit-logs",
2026-07-05 09:24:00 +08:00
webManifest: "web/manifest",
2026-07-04 22:51:52 +08:00
} as const