astrbot_plugin_imagestudio/frontend/shared/api/endpoints.ts

71 行
3.8 KiB
TypeScript

export const API_BASE = "/api/v1/plugins/extensions/astrbot_plugin_imagestudio"
export const endpoints = {
uiBootstrap: "ui/bootstrap",
dashboardSummary: "dashboard/summary",
profiles: "profiles",
profile: (profileId: string) => `profiles/${profileId}`,
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`,
workflowBranches: (workflowId: string) => `workflows/${workflowId}/branches`,
workflowSwitchBranch: (workflowId: string) => `workflows/${workflowId}/switch-branch`,
workflowHistory: (workflowId: string) => `workflows/${workflowId}/history`,
node: (nodeId: string) => `nodes/${nodeId}`,
nodeGenerate: (nodeId: string) => `nodes/${nodeId}/generate`,
nodeSelectImage: (nodeId: string) => `nodes/${nodeId}/select-image`,
nodeAdoptImage: (nodeId: string) => `nodes/${nodeId}/adopt-image`,
nodeReview: (nodeId: string) => `nodes/${nodeId}/review`,
nodeImages: (nodeId: string) => `nodes/${nodeId}/images`,
workflowReview: (workflowId: string) => `workflows/${workflowId}/review`,
image: (imageId: string) => `images/${imageId}`,
imageSelect: (imageId: string) => `images/${imageId}/select`,
imageUnselect: (imageId: string) => `images/${imageId}/unselect`,
imageArchive: (imageId: string) => `images/${imageId}/archive`,
jobs: "jobs",
job: (taskId: string) => `jobs/${taskId}`,
jobCancel: (taskId: string) => `jobs/${taskId}/cancel`,
jobRetry: (taskId: string) => `jobs/${taskId}/retry`,
jobDeadLetterRetry: "jobs/dead-letter/retry",
jobDeadLetterMoveFailed: "jobs/dead-letter/move-failed",
settingsSchema: "settings/schema",
settingsCurrent: "settings/current",
settingsValidate: "settings/validate",
settingsDiff: "settings/diff",
settingsSave: "settings/save",
settingsReload: "settings/reload",
settingsExport: "settings/export",
settingsImport: "settings/import",
settingsSnapshots: "settings/snapshots",
settingsRollback: "settings/rollback",
storageStatus: "storage/status",
mediaSign: "media/sign",
materialCategories: "material-categories",
materialCategory: (categoryId: string) => `material-categories/${categoryId}`,
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`,
wardrobeImportMaterial: (profileId: string) => `profiles/${profileId}/wardrobe/import-material`,
wardrobeItem: (profileId: string, wardrobeItemId: string) => `profiles/${profileId}/wardrobe/${wardrobeItemId}`,
wardrobeMatch: (profileId: string) => `profiles/${profileId}/wardrobe/match`,
privateCompanionDailyOutfit: "integrations/private-companion/daily-outfit",
integrationEventLogs: "integrations/logs",
apiDiscoveryDialects: "api-discovery/dialects",
apiDiscoveryProbeProvider: "api-discovery/probe-provider",
apiDiscoveryProbeModel: "api-discovery/probe-model",
apiDiscoveryCapabilities: "api-discovery/capabilities",
apiDiscoveryManualOverride: "api-discovery/manual-override",
apiDiscoveryValidateRenderPlan: "api-discovery/validate-render-plan",
generationLogs: "logs/generation",
workflowLogs: "logs/workflows",
errorLogs: "logs/errors",
integrationLogs: "logs/integrations",
auditLogs: "security/audit-logs",
webManifest: "web/manifest",
} as const