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",
|
2026-07-05 16:32:03 +08:00
|
|
|
uiActions: "ui/actions",
|
2026-07-04 22:51:52 +08:00
|
|
|
dashboardSummary: "dashboard/summary",
|
2026-07-11 22:27:35 +08:00
|
|
|
contract: "contract",
|
2026-07-04 22:51:52 +08:00
|
|
|
profiles: "profiles",
|
2026-07-05 13:37:26 +08:00
|
|
|
profile: (profileId: string) => `profiles/${profileId}`,
|
2026-07-05 17:28:16 +08:00
|
|
|
profileArchive: (profileId: string) => `profiles/${profileId}/archive`,
|
2026-07-04 22:51:52 +08:00
|
|
|
quickProfileDraft: "profiles/quick-draft",
|
2026-07-07 02:58:12 +08:00
|
|
|
quickProfileDraftSave: "profiles/quick-draft/save",
|
2026-07-05 13:46:58 +08:00
|
|
|
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`,
|
2026-07-08 02:25:50 +08:00
|
|
|
workflowExecuteCharacter: (workflowId: string) => `workflows/${workflowId}/execute-character`,
|
2026-07-05 13:46:58 +08:00
|
|
|
workflowNodes: (workflowId: string) => `workflows/${workflowId}/nodes`,
|
2026-07-05 13:59:10 +08:00
|
|
|
workflowBranches: (workflowId: string) => `workflows/${workflowId}/branches`,
|
|
|
|
|
workflowSwitchBranch: (workflowId: string) => `workflows/${workflowId}/switch-branch`,
|
|
|
|
|
workflowHistory: (workflowId: string) => `workflows/${workflowId}/history`,
|
2026-07-05 14:26:39 +08:00
|
|
|
node: (nodeId: string) => `nodes/${nodeId}`,
|
2026-07-11 22:27:35 +08:00
|
|
|
nodeDependencyContext: (nodeId: string) => `nodes/${nodeId}/dependency-context`,
|
2026-07-05 13:51:10 +08:00
|
|
|
nodeGenerate: (nodeId: string) => `nodes/${nodeId}/generate`,
|
2026-07-05 15:03:05 +08:00
|
|
|
nodeRetry: (nodeId: string) => `nodes/${nodeId}/retry`,
|
|
|
|
|
nodeComplete: (nodeId: string) => `nodes/${nodeId}/complete`,
|
2026-07-05 17:28:16 +08:00
|
|
|
nodeMarkCompleted: (nodeId: string) => `nodes/${nodeId}/mark-completed`,
|
2026-07-05 13:51:10 +08:00
|
|
|
nodeSelectImage: (nodeId: string) => `nodes/${nodeId}/select-image`,
|
|
|
|
|
nodeAdoptImage: (nodeId: string) => `nodes/${nodeId}/adopt-image`,
|
2026-07-05 19:24:20 +08:00
|
|
|
reviewPolicy: "review/policy",
|
|
|
|
|
reviewPolicyValidate: "review/policy/validate",
|
2026-07-05 21:10:21 +08:00
|
|
|
reviewPolicySave: "review/policy/save",
|
2026-07-11 22:27:35 +08:00
|
|
|
promptsExpand: "prompts/expand",
|
2026-07-12 02:54:45 +08:00
|
|
|
promptGovernancePreview: "prompts/governance-preview",
|
2026-07-05 14:10:14 +08:00
|
|
|
nodeReview: (nodeId: string) => `nodes/${nodeId}/review`,
|
2026-07-05 13:51:10 +08:00
|
|
|
nodeImages: (nodeId: string) => `nodes/${nodeId}/images`,
|
2026-07-05 14:10:14 +08:00
|
|
|
workflowReview: (workflowId: string) => `workflows/${workflowId}/review`,
|
2026-07-11 21:50:34 +08:00
|
|
|
images: "images",
|
2026-07-05 13:51:10 +08:00
|
|
|
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-11 22:27:35 +08:00
|
|
|
imageSafeDelete: (imageId: string) => `images/${imageId}/safe-delete`,
|
|
|
|
|
imageDelete: (imageId: string) => `images/${imageId}`,
|
2026-07-04 22:51:52 +08:00
|
|
|
jobs: "jobs",
|
2026-07-05 13:55:03 +08:00
|
|
|
job: (taskId: string) => `jobs/${taskId}`,
|
2026-07-05 11:11:59 +08:00
|
|
|
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-11 21:50:34 +08:00
|
|
|
costUsage: "costs/usage",
|
2026-07-11 22:27:35 +08:00
|
|
|
costGuard: "costs/guard",
|
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",
|
2026-07-05 11:11:59 +08:00
|
|
|
settingsReload: "settings/reload",
|
|
|
|
|
settingsExport: "settings/export",
|
2026-07-05 14:13:30 +08:00
|
|
|
settingsImport: "settings/import",
|
2026-07-05 14:59:43 +08:00
|
|
|
settingsSnapshots: "settings/snapshots",
|
2026-07-05 15:33:47 +08:00
|
|
|
settingsSnapshot: (snapshotId: string) => `settings/snapshots/${snapshotId}`,
|
2026-07-05 14:59:43 +08:00
|
|
|
settingsRollback: "settings/rollback",
|
2026-07-11 22:27:35 +08:00
|
|
|
backups: "backups",
|
|
|
|
|
backup: (backupId: string) => `backups/${backupId}`,
|
|
|
|
|
backupRestore: (backupId: string) => `backups/${backupId}/restore`,
|
2026-07-04 22:51:52 +08:00
|
|
|
storageStatus: "storage/status",
|
2026-07-05 18:58:00 +08:00
|
|
|
storageMigrate: "storage/migrate",
|
2026-07-04 22:51:52 +08:00
|
|
|
mediaSign: "media/sign",
|
2026-07-11 22:27:35 +08:00
|
|
|
mediaIndex: "media/index",
|
|
|
|
|
mediaOrphans: "media/orphans",
|
2026-07-05 11:11:59 +08:00
|
|
|
materialCategories: "material-categories",
|
2026-07-05 14:16:49 +08:00
|
|
|
materialCategory: (categoryId: string) => `material-categories/${categoryId}`,
|
2026-07-05 11:11:59 +08:00
|
|
|
materials: "materials",
|
2026-07-05 15:06:02 +08:00
|
|
|
materialUpload: "materials/upload",
|
2026-07-05 11:11:59 +08:00
|
|
|
material: (materialId: string) => `materials/${materialId}`,
|
|
|
|
|
materialRecognize: (materialId: string) => `materials/${materialId}/recognize`,
|
2026-07-05 17:28:16 +08:00
|
|
|
materialReRecognize: (materialId: string) => `materials/${materialId}/re-recognize`,
|
2026-07-05 11:11:59 +08:00
|
|
|
materialConfirm: (materialId: string) => `materials/${materialId}/confirm`,
|
2026-07-05 19:31:35 +08:00
|
|
|
assetImportPack: "assets/import-pack",
|
2026-07-05 11:11:59 +08:00
|
|
|
wardrobe: (profileId: string) => `profiles/${profileId}/wardrobe`,
|
2026-07-05 13:18:16 +08:00
|
|
|
wardrobeImportMaterial: (profileId: string) => `profiles/${profileId}/wardrobe/import-material`,
|
2026-07-05 17:28:16 +08:00
|
|
|
wardrobeItems: (profileId: string) => `profiles/${profileId}/wardrobe/items`,
|
|
|
|
|
wardrobeItem: (profileId: string, wardrobeItemId: string) => `profiles/${profileId}/wardrobe/items/${wardrobeItemId}`,
|
|
|
|
|
wardrobeLegacyItem: (profileId: string, wardrobeItemId: string) => `profiles/${profileId}/wardrobe/${wardrobeItemId}`,
|
2026-07-05 11:11:59 +08:00
|
|
|
wardrobeMatch: (profileId: string) => `profiles/${profileId}/wardrobe/match`,
|
2026-07-12 02:54:45 +08:00
|
|
|
wardrobeTemplates: (profileId: string) => `profiles/${profileId}/wardrobe-templates`,
|
|
|
|
|
wardrobeTemplate: (profileId: string, templateId: string) => `profiles/${profileId}/wardrobe-templates/${templateId}`,
|
|
|
|
|
wardrobeTemplateApply: (profileId: string, templateId: string) => `profiles/${profileId}/wardrobe-templates/${templateId}/apply`,
|
|
|
|
|
materialAnalytics: "materials/analytics",
|
|
|
|
|
materialRenormalizeBatch: "materials/renormalize-batch",
|
|
|
|
|
materialRenormalize: (materialId: string) => `materials/${materialId}/renormalize`,
|
2026-07-05 13:41:59 +08:00
|
|
|
privateCompanionDailyOutfit: "integrations/private-companion/daily-outfit",
|
2026-07-11 22:27:35 +08:00
|
|
|
privateCompanionToken: "integrations/private-companion/token",
|
|
|
|
|
privateCompanionTokenRotate: "integrations/private-companion/token/rotate",
|
2026-07-05 13:41:59 +08:00
|
|
|
integrationEventLogs: "integrations/logs",
|
2026-07-05 11:11:59 +08:00
|
|
|
apiDiscoveryDialects: "api-discovery/dialects",
|
2026-07-05 14:29:46 +08:00
|
|
|
apiDiscoveryProbeProvider: "api-discovery/probe-provider",
|
2026-07-05 11:11:59 +08:00
|
|
|
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",
|
2026-07-05 11:19:21 +08:00
|
|
|
generationLogs: "logs/generation",
|
|
|
|
|
workflowLogs: "logs/workflows",
|
|
|
|
|
errorLogs: "logs/errors",
|
|
|
|
|
integrationLogs: "logs/integrations",
|
|
|
|
|
auditLogs: "security/audit-logs",
|
2026-07-05 16:23:47 +08:00
|
|
|
eventStream: "events/stream",
|
2026-07-05 09:24:00 +08:00
|
|
|
webManifest: "web/manifest",
|
2026-07-04 22:51:52 +08:00
|
|
|
} as const
|