AstrBot-Desktop/docs/protocol/v1/schemas/file-transfer-plan.schema.json

115 行
2.4 KiB
JSON

{
"$defs": {
"ConflictAction": {
"enum": [
"copy",
"rename",
"skip",
"ask"
],
"type": "string"
},
"FileTransferPlanItem": {
"additionalProperties": false,
"properties": {
"categoryReason": {
"type": "string"
},
"conflictAction": {
"$ref": "#/$defs/ConflictAction"
},
"destinationRelativePath": {
"type": "string"
},
"displaySourcePath": {
"description": "Display-only value for local review; never used as an execution path.",
"type": "string"
},
"sizeBytes": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"sourcePathToken": {
"description": "Opaque, short-lived mapping held by the local client. Never a raw path.",
"type": "string"
}
},
"required": [
"sourcePathToken",
"displaySourcePath",
"destinationRelativePath",
"sizeBytes",
"categoryReason",
"conflictAction"
],
"type": "object"
},
"SourceCleanupPolicy": {
"enum": [
"keep",
"recycle"
],
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"conflictCount": {
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"expiresAt": {
"type": "string"
},
"items": {
"items": {
"$ref": "#/$defs/FileTransferPlanItem"
},
"type": "array"
},
"nasTargetId": {
"type": "string"
},
"planId": {
"type": "string"
},
"profileId": {
"description": "Locally bound profile. A remote value must never select the executor.",
"type": "string"
},
"sourceCleanupPolicy": {
"$ref": "#/$defs/SourceCleanupPolicy"
},
"sourceSelectionId": {
"type": "string"
},
"totalBytes": {
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"warningCount": {
"format": "uint32",
"minimum": 0,
"type": "integer"
}
},
"required": [
"planId",
"profileId",
"sourceSelectionId",
"nasTargetId",
"items",
"totalBytes",
"conflictCount",
"warningCount",
"sourceCleanupPolicy",
"expiresAt"
],
"title": "FileTransferPlan",
"type": "object"
}