{
    "openapi": "3.1.0",
    "info": {
        "title": "Cloudsign OpenAPI · 应用分发",
        "version": "1.22.0-preview.1",
        "description": "通过用户开放 API 管理自己账号下已授权的企业签名和应用分发资源，完成上传、签名、发布、查询和订单处理。接入前请在开发者中心创建 API 应用并配置权限。\n按产品筛选操作的契约，请求字段、默认值和权限与完整契约一致。应用分发列表须显式传 module=distribution。"
    },
    "servers": [
        {
            "url": "https://{host}",
            "variables": {
                "host": {
                    "default": "www.fenfa.im",
                    "description": "调用业务 API 的网站 HTTPS 主域名。"
                }
            }
        }
    ],
    "security": [
        {
            "AccessKeySignature": []
        }
    ],
    "components": {
        "parameters": {
            "Date": {
                "name": "X-Api-Date",
                "in": "header",
                "required": true,
                "schema": {
                    "type": "string",
                    "format": "date-time"
                },
                "description": "UTC，YYYY-MM-DDTHH:mm:ssZ，前后 300 秒窗口"
            },
            "Nonce": {
                "name": "X-Api-Nonce",
                "in": "header",
                "required": true,
                "schema": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{32}$"
                }
            },
            "BodyHash": {
                "name": "X-Api-Content-Sha256",
                "in": "header",
                "required": true,
                "schema": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                },
                "description": "实际请求体字节的 SHA-256；GET 为零字节摘要"
            },
            "Environment": {
                "name": "X-Api-Environment",
                "in": "header",
                "required": true,
                "schema": {
                    "type": "string",
                    "const": "production"
                }
            },
            "SecurityToken": {
                "name": "X-Api-Security-Token",
                "in": "header",
                "required": false,
                "schema": {
                    "type": "string",
                    "pattern": "^CST_[A-Za-z0-9_-]{43}$"
                },
                "description": "Required only for AKT credentials; append SHA256(token) to the canonical string. AKP requests must omit it."
            },
            "Idempotency": {
                "name": "X-Api-Idempotency-Key",
                "in": "header",
                "required": true,
                "schema": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{16,64}$"
                },
                "description": "同一次业务重试保持原值及原始请求体，更换 nonce 重新签名。有效记录保留 90 天。"
            },
            "FinancialIdempotency": {
                "name": "X-Api-Idempotency-Key",
                "in": "header",
                "required": true,
                "schema": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{16,64}$"
                },
                "description": "同一次财务操作保留原幂等键与确认字段。同一 API 应用轮换密钥后继续使用原键，JSON 字段顺序可变化。每次使用新 nonce 重新签名。一份报价只能支付一次。结果不明时先查询原报价或原订单。"
            }
        },
        "schemas": {
            "App": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "name",
                    "bundle_id",
                    "platform",
                    "version",
                    "build",
                    "size_bytes",
                    "module",
                    "updated_at"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "name": {
                        "type": "string"
                    },
                    "bundle_id": {
                        "type": "string"
                    },
                    "platform": {
                        "type": "string",
                        "enum": [
                            "ipa",
                            "apk"
                        ]
                    },
                    "version": {
                        "type": "string"
                    },
                    "build": {
                        "type": "string"
                    },
                    "size_bytes": {
                        "type": "integer"
                    },
                    "module": {
                        "type": "string",
                        "enum": [
                            "enterprise",
                            "distribution"
                        ]
                    },
                    "updated_at": {
                        "type": "integer",
                        "description": "Unix 秒"
                    }
                }
            },
            "Error": {
                "type": "object",
                "required": [
                    "request_id",
                    "error"
                ],
                "properties": {
                    "request_id": {
                        "type": "string"
                    },
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "message"
                        ],
                        "properties": {
                            "code": {
                                "type": "string"
                            },
                            "message": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "Creation": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "state",
                    "module",
                    "platform",
                    "expires_at"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "awaiting_upload",
                            "ready",
                            "expired"
                        ]
                    },
                    "module": {
                        "type": "string"
                    },
                    "platform": {
                        "type": "string"
                    },
                    "expires_at": {
                        "type": "integer",
                        "minimum": 0
                    }
                }
            },
            "Version": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "app_id",
                    "bundle_id",
                    "platform",
                    "version",
                    "build",
                    "size_bytes",
                    "package_type",
                    "is_current",
                    "created_at"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^V[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "bundle_id": {
                        "type": "string"
                    },
                    "platform": {
                        "type": "string",
                        "enum": [
                            "ipa",
                            "apk"
                        ]
                    },
                    "version": {
                        "type": "string"
                    },
                    "build": {
                        "type": "string"
                    },
                    "size_bytes": {
                        "type": "integer"
                    },
                    "package_type": {
                        "type": "string",
                        "enum": [
                            "original",
                            "signed"
                        ]
                    },
                    "is_current": {
                        "type": "boolean",
                        "description": "该类型安装包的当前发布标记；原包与签名包可各自为当前版本"
                    },
                    "created_at": {
                        "type": "integer",
                        "description": "Unix 秒；无法解析的旧时间为 0"
                    }
                }
            },
            "Upload": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "app_id",
                    "state",
                    "size_bytes",
                    "expires_at",
                    "version_id",
                    "error_code"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^U[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "uploading",
                            "validating",
                            "succeeded",
                            "failed",
                            "cancelled"
                        ]
                    },
                    "size_bytes": {
                        "type": "integer",
                        "minimum": 22
                    },
                    "expires_at": {
                        "type": "integer"
                    },
                    "version_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^V[a-f0-9]{32}$"
                    },
                    "error_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "transfer_mode": {
                        "type": "string",
                        "enum": [
                            "single",
                            "multipart"
                        ]
                    },
                    "format": {
                        "type": "string",
                        "enum": [
                            "ipa",
                            "apk"
                        ]
                    },
                    "part_size_bytes": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "part_count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1024
                    }
                }
            },
            "UploadInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "file_name",
                    "size_bytes",
                    "sha256",
                    "md5"
                ],
                "properties": {
                    "file_name": {
                        "type": "string",
                        "maxLength": 160,
                        "description": "IPA 文件名",
                        "pattern": "^[^/\\\\:]+\\.(?:ipa|apk)$"
                    },
                    "size_bytes": {
                        "type": "integer",
                        "minimum": 22,
                        "maximum": 5368709120
                    },
                    "sha256": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                    },
                    "md5": {
                        "type": "string",
                        "description": "16 字节 MD5 的标准 Base64"
                    }
                }
            },
            "MultipartUploadInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "file_name",
                    "size_bytes",
                    "transfer_mode"
                ],
                "properties": {
                    "file_name": {
                        "type": "string",
                        "maxLength": 160,
                        "description": "IPA 文件名",
                        "pattern": "^[^/\\\\:]+\\.(?:ipa|apk)$"
                    },
                    "size_bytes": {
                        "type": "integer",
                        "minimum": 22,
                        "maximum": 17179869184
                    },
                    "transfer_mode": {
                        "const": "multipart",
                        "type": "string"
                    }
                }
            },
            "UploadTicket": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "upload_id",
                    "ticket"
                ],
                "properties": {
                    "upload_id": {
                        "type": "string",
                        "pattern": "^U[a-f0-9]{32}$"
                    },
                    "ticket": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "url",
                            "method",
                            "headers",
                            "expires_at"
                        ],
                        "properties": {
                            "url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "method": {
                                "type": "string",
                                "const": "PUT"
                            },
                            "headers": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "string"
                                }
                            },
                            "expires_at": {
                                "type": "integer"
                            }
                        }
                    }
                }
            },
            "UploadParts": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "items",
                    "next_after"
                ],
                "properties": {
                    "items": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/UploadPart"
                        }
                    },
                    "next_after": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "pattern": "^[1-9][0-9]{0,3}$"
                    }
                }
            },
            "UploadPart": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "part_number",
                    "size_bytes",
                    "sha256",
                    "uploaded"
                ],
                "properties": {
                    "part_number": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1024
                    },
                    "size_bytes": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 33554432
                    },
                    "sha256": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                    },
                    "uploaded": {
                        "type": "boolean",
                        "description": "已确认暂存对象存在；最终内容校验与合并在异步 validating 阶段执行。查询 U.state=succeeded 之后才表示版本发布完成。"
                    }
                }
            },
            "UploadPartInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "part_number",
                    "sha256"
                ],
                "properties": {
                    "part_number": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1024
                    },
                    "sha256": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                    }
                }
            },
            "UploadPartTicket": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "upload_id",
                    "ticket",
                    "part_number"
                ],
                "properties": {
                    "upload_id": {
                        "type": "string",
                        "pattern": "^U[a-f0-9]{32}$"
                    },
                    "ticket": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "url",
                            "method",
                            "headers",
                            "expires_at"
                        ],
                        "properties": {
                            "url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "method": {
                                "type": "string",
                                "enum": [
                                    "PUT",
                                    "POST"
                                ]
                            },
                            "headers": {
                                "type": "object",
                                "additionalProperties": {
                                    "type": "string"
                                }
                            },
                            "expires_at": {
                                "type": "integer"
                            },
                            "kind": {
                                "type": "string",
                                "description": "可选的兼容标识。请将完整凭证原样交给 SDK。自行传输时使用 method、url、headers 和表单字段。"
                            },
                            "encoding": {
                                "type": "string",
                                "const": "multipart"
                            },
                            "fields": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "key",
                                    "token"
                                ],
                                "properties": {
                                    "key": {
                                        "type": "string"
                                    },
                                    "token": {
                                        "type": "string",
                                        "x-sensitive": true
                                    }
                                }
                            }
                        },
                        "description": "平台返回该片的短期上传指令，由 SDK 按方法、请求头或表单字段自动传输。自行实现 HTTP 时，按返回指令发送；浏览器的 Content-Length 由浏览器根据文件字节生成。分片确认只表示暂存成功，整个安装包校验并返回版本 ID 后才可使用。"
                    },
                    "part_number": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1024
                    }
                }
            },
            "DownloadReceipt": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "app_id",
                    "version_id",
                    "package_type",
                    "platform",
                    "size_bytes",
                    "file_name",
                    "created_at",
                    "expires_at",
                    "ticket"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^D[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "version_id": {
                        "type": "string",
                        "pattern": "^V[a-f0-9]{32}$"
                    },
                    "package_type": {
                        "type": "string",
                        "enum": [
                            "original",
                            "signed"
                        ]
                    },
                    "platform": {
                        "type": "string",
                        "enum": [
                            "ipa",
                            "apk"
                        ]
                    },
                    "size_bytes": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "file_name": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}-V[a-f0-9]{32}\\.(ipa|apk)$"
                    },
                    "created_at": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "expires_at": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "ticket": {
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "$ref": "#/components/schemas/DownloadTicket"
                            }
                        ]
                    }
                }
            },
            "DownloadTicket": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "url",
                    "method",
                    "headers",
                    "expires_at"
                ],
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "description": "短期文件下载链接。只用凭证要求的请求头下载，并避免记录或公开此链接。",
                        "x-sensitive": true
                    },
                    "method": {
                        "type": "string",
                        "const": "GET"
                    },
                    "headers": {
                        "type": "object",
                        "additionalProperties": false
                    },
                    "expires_at": {
                        "type": "integer",
                        "minimum": 1
                    }
                }
            },
            "DistributionSettings": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "revision",
                    "template_id",
                    "language",
                    "introduction",
                    "available_template_ids",
                    "available_languages"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "revision": {
                        "type": "string",
                        "pattern": "^R[a-f0-9]{64}$"
                    },
                    "template_id": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 8
                    },
                    "language": {
                        "type": "string",
                        "enum": [
                            "auto",
                            "zh",
                            "en",
                            "zh-tw",
                            "vi",
                            "ru",
                            "th",
                            "ja",
                            "ko",
                            "es",
                            "pt",
                            "fr",
                            "de",
                            "it",
                            "id",
                            "ms",
                            "ar",
                            "hi",
                            "tr"
                        ]
                    },
                    "introduction": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "available_template_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 8
                        }
                    },
                    "available_languages": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "auto",
                                "zh",
                                "en",
                                "zh-tw",
                                "vi",
                                "ru",
                                "th",
                                "ja",
                                "ko",
                                "es",
                                "pt",
                                "fr",
                                "de",
                                "it",
                                "id",
                                "ms",
                                "ar",
                                "hi",
                                "tr"
                            ]
                        }
                    }
                }
            },
            "DistributionSettingsUpdated": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "settings",
                    "replayed"
                ],
                "properties": {
                    "settings": {
                        "$ref": "#/components/schemas/DistributionSettings"
                    },
                    "replayed": {
                        "type": "boolean"
                    }
                }
            },
            "DistributionSettingsInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "revision",
                    "template_id",
                    "language",
                    "introduction"
                ],
                "properties": {
                    "revision": {
                        "type": "string",
                        "pattern": "^R[a-f0-9]{64}$"
                    },
                    "template_id": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 8
                    },
                    "language": {
                        "type": "string",
                        "enum": [
                            "auto",
                            "zh",
                            "en",
                            "zh-tw",
                            "vi",
                            "ru",
                            "th",
                            "ja",
                            "ko",
                            "es",
                            "pt",
                            "fr",
                            "de",
                            "it",
                            "id",
                            "ms",
                            "ar",
                            "hi",
                            "tr"
                        ]
                    },
                    "introduction": {
                        "type": "string",
                        "maxLength": 255
                    }
                }
            },
            "AppStatistics": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "module",
                    "generated_at",
                    "timezone",
                    "record_scope",
                    "window",
                    "downloads",
                    "installation_statistics_state",
                    "installations",
                    "launches",
                    "daily"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "module": {
                        "type": "string",
                        "enum": [
                            "enterprise",
                            "distribution"
                        ]
                    },
                    "generated_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "timezone": {
                        "type": "string",
                        "const": "Asia/Shanghai"
                    },
                    "record_scope": {
                        "type": "string",
                        "const": "current_retained_counters"
                    },
                    "window": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "start_date",
                            "end_date",
                            "start_at",
                            "end_at"
                        ],
                        "properties": {
                            "start_date": {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "end_date": {
                                "type": "string",
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                            },
                            "start_at": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "end_at": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            }
                        }
                    },
                    "downloads": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "unit",
                            "total",
                            "today",
                            "yesterday",
                            "last_7_days",
                            "last_30_days"
                        ],
                        "properties": {
                            "unit": {
                                "type": "string",
                                "const": "admitted_downloads"
                            },
                            "total": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "today": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "yesterday": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "last_7_days": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "last_30_days": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            }
                        }
                    },
                    "installation_statistics_state": {
                        "type": "string",
                        "enum": [
                            "available",
                            "not_initialized",
                            "not_applicable"
                        ]
                    },
                    "installations": {
                        "oneOf": [
                            {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "unit",
                                    "total",
                                    "today",
                                    "yesterday",
                                    "last_7_days",
                                    "last_30_days",
                                    "cross_version_deduplicated"
                                ],
                                "properties": {
                                    "unit": {
                                        "type": "string",
                                        "const": "unique_admitted_device_fingerprints"
                                    },
                                    "total": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "today": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "yesterday": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "last_7_days": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "last_30_days": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "cross_version_deduplicated": {
                                        "type": "boolean",
                                        "const": true
                                    }
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "launches": {
                        "oneOf": [
                            {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "unit",
                                    "total",
                                    "today",
                                    "today_estimated",
                                    "current_rules_include_first_open",
                                    "legacy_totals_may_exclude_first_open"
                                ],
                                "properties": {
                                    "unit": {
                                        "type": "string",
                                        "const": "recorded_launch_events"
                                    },
                                    "total": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "today": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                    },
                                    "today_estimated": {
                                        "type": "boolean"
                                    },
                                    "current_rules_include_first_open": {
                                        "type": "boolean",
                                        "const": true
                                    },
                                    "legacy_totals_may_exclude_first_open": {
                                        "type": "boolean",
                                        "const": true
                                    }
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "daily": {
                        "type": "array",
                        "minItems": 30,
                        "maxItems": 30,
                        "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                                "date",
                                "downloads",
                                "new_installations"
                            ],
                            "properties": {
                                "date": {
                                    "type": "string",
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                                },
                                "downloads": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                },
                                "new_installations": {
                                    "oneOf": [
                                        {
                                            "type": "integer",
                                            "minimum": 0,
                                            "maximum": 9007199254740991
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "AppPricing": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "module",
                    "generated_at",
                    "pricing_revision",
                    "reference_only",
                    "payment_api_available",
                    "currency",
                    "products",
                    "daily",
                    "refund_policy"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "module": {
                        "type": "string",
                        "enum": [
                            "enterprise",
                            "distribution"
                        ]
                    },
                    "generated_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "pricing_revision": {
                        "type": "string",
                        "pattern": "^P[a-f0-9]{64}$"
                    },
                    "reference_only": {
                        "type": "boolean",
                        "const": true
                    },
                    "payment_api_available": {
                        "type": "boolean",
                        "const": false
                    },
                    "currency": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "code",
                            "unit",
                            "prefix",
                            "suffix",
                            "external_settlement"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "enum": [
                                    "CNY",
                                    "USD",
                                    "EUR",
                                    "HKD",
                                    "GBP",
                                    "POINT",
                                    "CUSTOM"
                                ]
                            },
                            "unit": {
                                "type": "string"
                            },
                            "prefix": {
                                "type": "string"
                            },
                            "suffix": {
                                "type": "string"
                            },
                            "external_settlement": {
                                "type": "string",
                                "const": "payment_provider"
                            }
                        }
                    },
                    "products": {
                        "type": "array",
                        "minItems": 6,
                        "maxItems": 12,
                        "items": {
                            "$ref": "#/components/schemas/PricedProduct"
                        }
                    },
                    "daily": {
                        "type": "array",
                        "maxItems": 3,
                        "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                                "sku",
                                "plan_id",
                                "enabled",
                                "unit_amount",
                                "min_days",
                                "max_days"
                            ],
                            "properties": {
                                "sku": {
                                    "type": "string",
                                    "pattern": "^day[123]$"
                                },
                                "plan_id": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 3
                                },
                                "enabled": {
                                    "type": "boolean"
                                },
                                "unit_amount": {
                                    "type": "string",
                                    "pattern": "^(?:0|[1-9][0-9]{0,9})\\.[0-9]{2}$"
                                },
                                "min_days": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 3650
                                },
                                "max_days": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 3650
                                }
                            }
                        }
                    },
                    "refund_policy": {
                        "oneOf": [
                            {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "window_seconds",
                                    "daily_supported",
                                    "redemption_supported",
                                    "other_rules_apply"
                                ],
                                "properties": {
                                    "window_seconds": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 315360000
                                    },
                                    "daily_supported": {
                                        "type": "boolean"
                                    },
                                    "redemption_supported": {
                                        "type": "boolean",
                                        "const": false
                                    },
                                    "other_rules_apply": {
                                        "type": "boolean",
                                        "const": true
                                    }
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                }
            },
            "PricedProduct": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "sku",
                    "category",
                    "name",
                    "amount",
                    "plan_id",
                    "quantity",
                    "quantity_unit",
                    "service_days"
                ],
                "properties": {
                    "sku": {
                        "type": "string",
                        "pattern": "^(?:[1-6]|100[1-4]|300[1-4]|day[123])$"
                    },
                    "category": {
                        "type": "string",
                        "enum": [
                            "enterprise_signature",
                            "distribution_points",
                            "distribution_membership"
                        ]
                    },
                    "name": {
                        "type": "string"
                    },
                    "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,9})\\.[0-9]{2}$"
                    },
                    "plan_id": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 3
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                    },
                    "quantity_unit": {
                        "type": "string",
                        "enum": [
                            "days",
                            "months",
                            "download_points",
                            "years"
                        ]
                    },
                    "service_days": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 3650
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                }
            },
            "AppQuote": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "module",
                    "generated_at",
                    "pricing_revision",
                    "reference_only",
                    "payment_api_available",
                    "currency",
                    "product"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "module": {
                        "type": "string",
                        "enum": [
                            "enterprise",
                            "distribution"
                        ]
                    },
                    "generated_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "pricing_revision": {
                        "type": "string",
                        "pattern": "^P[a-f0-9]{64}$"
                    },
                    "reference_only": {
                        "type": "boolean",
                        "const": true
                    },
                    "payment_api_available": {
                        "type": "boolean",
                        "const": false
                    },
                    "currency": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "code",
                            "unit",
                            "prefix",
                            "suffix",
                            "external_settlement"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "enum": [
                                    "CNY",
                                    "USD",
                                    "EUR",
                                    "HKD",
                                    "GBP",
                                    "POINT",
                                    "CUSTOM"
                                ]
                            },
                            "unit": {
                                "type": "string"
                            },
                            "prefix": {
                                "type": "string"
                            },
                            "suffix": {
                                "type": "string"
                            },
                            "external_settlement": {
                                "type": "string",
                                "const": "payment_provider"
                            }
                        }
                    },
                    "product": {
                        "$ref": "#/components/schemas/PricedProduct"
                    }
                }
            },
            "AppMetadata": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "name",
                    "remark",
                    "revision"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "name": {
                        "type": "string"
                    },
                    "remark": {
                        "type": "string"
                    },
                    "revision": {
                        "type": "string"
                    }
                }
            },
            "PublishedVersion": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "version_id",
                    "previous_version_id",
                    "published_at"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "version_id": {
                        "type": "string"
                    },
                    "previous_version_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "published_at": {
                        "type": "integer",
                        "minimum": 0
                    }
                }
            },
            "TrashedApp": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "state",
                    "files_retained"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "state": {
                        "type": "string"
                    },
                    "files_retained": {
                        "type": "boolean"
                    }
                }
            },
            "PurchaseQuote": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "app_id",
                    "module",
                    "state",
                    "product",
                    "amount",
                    "currency",
                    "pricing_revision",
                    "created_at",
                    "expires_at",
                    "price_reserved",
                    "funds_reserved",
                    "automatic_signing",
                    "receipt"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^Q[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "module": {
                        "type": "string",
                        "enum": [
                            "enterprise",
                            "distribution"
                        ]
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "awaiting_payment",
                            "paid",
                            "expired"
                        ]
                    },
                    "product": {
                        "$ref": "#/components/schemas/PricedProduct"
                    },
                    "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,8})\\.[0-9]{2}$"
                    },
                    "currency": {
                        "$ref": "#/components/schemas/PurchaseCurrency"
                    },
                    "pricing_revision": {
                        "type": "string",
                        "pattern": "^P[a-f0-9]{64}$"
                    },
                    "created_at": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "expires_at": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "price_reserved": {
                        "type": "boolean",
                        "const": true
                    },
                    "funds_reserved": {
                        "type": "boolean",
                        "const": false
                    },
                    "automatic_signing": {
                        "type": "boolean",
                        "const": false
                    },
                    "receipt": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/PurchaseReceipt"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                }
            },
            "PurchaseCurrency": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "code",
                    "unit",
                    "external_settlement",
                    "revision"
                ],
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "unit": {
                        "type": "string"
                    },
                    "external_settlement": {
                        "type": "string",
                        "const": "payment_provider"
                    },
                    "revision": {
                        "type": "string",
                        "pattern": "^C[a-f0-9]{64}$"
                    }
                }
            },
            "PurchaseReceipt": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "quote_id",
                    "app_id",
                    "order_id",
                    "state",
                    "payment_method",
                    "amount",
                    "currency",
                    "balance_before",
                    "balance_after",
                    "paid_at",
                    "automatic_signing",
                    "entitlement"
                ],
                "properties": {
                    "quote_id": {
                        "type": "string",
                        "pattern": "^Q[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "order_id": {
                        "type": "string",
                        "pattern": "^O[a-f0-9]{32}$"
                    },
                    "state": {
                        "type": "string",
                        "const": "paid"
                    },
                    "payment_method": {
                        "type": "string",
                        "const": "balance"
                    },
                    "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,8})\\.[0-9]{2}$"
                    },
                    "currency": {
                        "$ref": "#/components/schemas/PurchaseCurrency"
                    },
                    "balance_before": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,8})\\.[0-9]{2}$"
                    },
                    "balance_after": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,8})\\.[0-9]{2}$"
                    },
                    "paid_at": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "automatic_signing": {
                        "type": "boolean",
                        "const": false
                    },
                    "entitlement": {
                        "$ref": "#/components/schemas/PurchaseEntitlement"
                    }
                }
            },
            "PurchaseEntitlement": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "scope",
                    "sign_expires_at",
                    "sign_plan",
                    "download_points",
                    "membership_tier",
                    "membership_expires_at"
                ],
                "properties": {
                    "scope": {
                        "type": "string",
                        "enum": [
                            "application",
                            "account"
                        ]
                    },
                    "sign_expires_at": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 0
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "sign_plan": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "enum": [
                                    1,
                                    2,
                                    3
                                ]
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "download_points": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 0
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "membership_tier": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 3
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "membership_expires_at": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 0
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                }
            },
            "PurchaseQuoteInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "sku"
                ],
                "properties": {
                    "sku": {
                        "type": "string",
                        "pattern": "^(?:[1-6]|100[1-4]|300[1-4]|day[123])$"
                    },
                    "days": {
                        "type": "string",
                        "pattern": "^[1-9][0-9]{0,3}$"
                    }
                }
            },
            "PurchaseConfirmation": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "payment_method",
                    "amount",
                    "pricing_revision",
                    "currency_revision"
                ],
                "properties": {
                    "payment_method": {
                        "type": "string",
                        "const": "balance"
                    },
                    "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,8})\\.[0-9]{2}$"
                    },
                    "pricing_revision": {
                        "type": "string",
                        "pattern": "^P[a-f0-9]{64}$"
                    },
                    "currency_revision": {
                        "type": "string",
                        "pattern": "^C[a-f0-9]{64}$"
                    }
                }
            }
        },
        "responses": {
            "Error": {
                "description": "400 请求格式；401 凭据无效/过期；403 未授权；404 资源不存在或不可见；405 方法不支持；409 nonce 重放；429 限流（Retry-After 秒）；503 平台关闭或依赖不可用。通过验签的失败请求也须使用新 nonce 重试。",
                "headers": {
                    "X-Request-Id": {
                        "schema": {
                            "type": "string"
                        }
                    },
                    "Retry-After": {
                        "schema": {
                            "type": "integer"
                        }
                    }
                },
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            }
        },
        "securitySchemes": {
            "AccessKeySignature": {
                "type": "apiKey",
                "in": "header",
                "name": "Authorization",
                "description": "CS1-HMAC-SHA256 Credential=AKP<40hex> 或 AKT<40hex>,Signature=<64hex>。签入 Host、路径、规范查询和 X-Api-* 字段。AKT 必须携带 X-Api-Security-Token，并在 canonical 原有结尾追加换行和 Token 的 SHA-256 摘要；AKP 不携带该头。Secret 不发送给 API。"
            }
        }
    },
    "paths": {
        "/api/v1/apps": {
            "get": {
                "operationId": "listApps",
                "summary": "列出已授权应用",
                "description": "查询自己在企业签名或普通分发中的已授权应用。对应产品分别使用 enterprise:ReadApps 或 distribution:ReadApps。首次省略 cursor，响应中的 next_cursor 为空时结束分页。空列表表示当前筛选与授权范围内没有应用。\n\nsearch 用名称、Bundle ID 和备注做关键词搜索，忽略首尾空格，最多 256 个 UTF-8 字节。% 和 _ 按普通字符匹配。bundle_id 用于匹配完整包名，最多 255 个 ASCII 字符，建议原样使用已有包名。两个条件同时填写时返回同时匹配的应用。翻页保持 module、search、bundle_id 和 limit。改变条件后从第一页重新读。",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "module",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "enterprise",
                                "distribution"
                            ],
                            "default": "enterprise"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 50
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        },
                        "description": "上一页 next_cursor；不传为第一页"
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 256
                        },
                        "description": "名称、Bundle ID 或备注关键词。最多 256 个 UTF-8 字节；百分号及下划线按字面匹配；空值不筛选。"
                    },
                    {
                        "name": "bundle_id",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "maxLength": 255,
                            "pattern": "^(?:[A-Za-z0-9][A-Za-z0-9._-]*)?$"
                        },
                        "description": "完整 Bundle ID，精确匹配；空值不筛选。与 search 同时指定时取交集。"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "按公开 ID 升序，游标分页",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "required": [
                                                "items",
                                                "next_cursor"
                                            ],
                                            "properties": {
                                                "items": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/App"
                                                    }
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            },
            "post": {
                "operationId": "createApp",
                "summary": "预留新应用",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    }
                ],
                "description": "创建上传前的应用预留，立即返回 A 标识。24 小时内为该 A 上传首包。包名及平台校验成功后才生成可管理的正式应用。每个账号同时最多保留 10 个待完成预留。企业签名选 ipa，普通分发可选 ipa 或 apk。",
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Creation"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "module",
                                    "platform",
                                    "name",
                                    "bundle_id"
                                ],
                                "properties": {
                                    "module": {
                                        "type": "string"
                                    },
                                    "platform": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": "string"
                                    },
                                    "bundle_id": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{id}": {
            "get": {
                "operationId": "getApp",
                "summary": "查询应用详情",
                "description": "使用应用列表返回的完整应用 ID，查询名称、包名、平台、版本、Build、文件大小和更新时间。需要获取某个安装包时，先查询该应用的版本，再申请相应的下载凭证。\n\n凭据须有对应产品的 ReadApps 动作和目标应用授权。此接口没有查询参数。",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "应用详情",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/App"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/versions": {
            "get": {
                "operationId": "listVersions",
                "summary": "列出应用历史版本",
                "description": "查询应用保留的版本，较新的版本先返回。按 package_type 区分原包和签名包，使用 is_current 确认该包类型当前发布的版本。保存目标记录的完整 id，后续作为版本 ID 使用。\n\n需要 enterprise:ReadVersions 或 distribution:ReadVersions，并须有目标应用授权。后续请求沿用筛选条件，传入上一页的 next_cursor。游标为 null 时结束。遍历期间版本可能变化。收到 InvalidCursor 时从第一页重新查询，并按版本 ID 去重。",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 50
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "pattern": "^V[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "package_type",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "original",
                                "signed"
                            ]
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "返回版本列表和下一页游标。",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "type": "object",
                                            "required": [
                                                "items",
                                                "next_cursor"
                                            ],
                                            "additionalProperties": false,
                                            "properties": {
                                                "items": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Version"
                                                    }
                                                },
                                                "next_cursor": {
                                                    "oneOf": [
                                                        {
                                                            "type": "null"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "pattern": "^V[a-f0-9]{32}$"
                                                        }
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/versions/{version_id}": {
            "get": {
                "operationId": "getVersion",
                "summary": "查询指定版本",
                "description": "使用应用 ID 和该应用版本列表返回的完整版本 ID，读取指定版本。核对包类型、Build 和文件大小，后续按该版本申请下载凭证。\n\n需要 enterprise:ReadVersions 或 distribution:ReadVersions，并须有目标应用授权。此接口没有查询参数。",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "version_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^V[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "返回指定版本的资料。",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Version"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/uploads": {
            "post": {
                "operationId": "createUpload",
                "summary": "创建版本上传",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "description": "为企业签名或普通分发应用创建上传任务。使用 SDK 上传助手时，传入应用 ID、原始安装包和已经保存的幂等键，助手会申请上传凭证并确认传输。自行发起 HTTP 请求时，建议选择分片上传，并显式传入 transfer_mode=multipart。选择整包上传时按请求体定义填写文件摘要。\n\n保存返回的 data.id，这就是后续查询、申请上传凭证、确认分片或恢复上传使用的完整上传任务 ID。提交校验后，等到 state=succeeded 且取得 version_id，原包版本才可使用。",
                "responses": {
                    "200": {
                        "description": "成功受理；异步操作须继续查询状态",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Upload"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "oneOf": [
                                    {
                                        "$ref": "#/components/schemas/UploadInput"
                                    },
                                    {
                                        "$ref": "#/components/schemas/MultipartUploadInput"
                                    }
                                ]
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            },
            "get": {
                "operationId": "listUploads",
                "summary": "列出应用上传任务",
                "description": "分页查询该应用的上传任务，可按 state 筛选。记录按较新的 created_at 和上传任务 ID 优先返回。每页 1–100 条。找到原上传任务后，保存其完整 ID 并查询进度。\n\n凭据须有对应产品的 UploadVersions 动作及上传能力。结果限于同一个 API 应用创建的任务。临时只读凭据不能调用。OAuth 还须有终端上传授权，并限用户选定的已有应用。首次创建时，使用预留返回的应用 ID 查询。\n\n翻页使用上一页的 next_cursor。任务状态变化不使游标失效。游标失效或属于其他应用时返回 InvalidCursor，重新从第一页查询并按上传任务 ID 去重。",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 50
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "pattern": "^U[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "state",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "uploading",
                                "validating",
                                "succeeded",
                                "failed",
                                "cancelled"
                            ]
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "返回上传任务列表和下一页游标。",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "type": "object",
                                            "required": [
                                                "items",
                                                "next_cursor"
                                            ],
                                            "additionalProperties": false,
                                            "properties": {
                                                "items": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/Upload"
                                                    }
                                                },
                                                "next_cursor": {
                                                    "oneOf": [
                                                        {
                                                            "type": "null"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "pattern": "^U[a-f0-9]{32}$"
                                                        }
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/uploads/{upload_id}": {
            "get": {
                "operationId": "getUpload",
                "summary": "查询上传和校验进度",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "upload_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^U[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "description": "通过创建上传响应 data.id 中的上传任务 ID查看 state、expires_at 和 version_id。提交整包校验后查询此接口，取得版本 ID 后再发布或签名。如果失败，保留 error_code 和 request_id。",
                "responses": {
                    "200": {
                        "description": "成功受理；异步操作须继续查询状态",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Upload"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/uploads/{upload_id}/ticket": {
            "get": {
                "operationId": "getUploadTicket",
                "summary": "获取整包上传凭证",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "upload_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^U[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "description": "为整包上传申请短期凭证。按 ticket 返回的 url、method 和 headers 发送原始文件字节，然后提交安装包校验。文件传输请求只携带凭证要求的请求头。",
                "responses": {
                    "200": {
                        "description": "成功受理；异步操作须继续查询状态",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/UploadTicket"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/uploads/{upload_id}/complete": {
            "post": {
                "operationId": "completeUpload",
                "summary": "提交整包校验",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "upload_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^U[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "description": "文件传输结束后，使用原上传任务 ID 和保持不变的幂等键提交空 JSON 对象。分片上传先确认每一片。提交后继续查询任务状态，在 state=succeeded 时读取可用的 version_id。",
                "responses": {
                    "200": {
                        "description": "成功受理；异步操作须继续查询状态",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Upload"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [],
                                "properties": {}
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/uploads/{upload_id}/abort": {
            "post": {
                "operationId": "abortUpload",
                "summary": "取消未完成上传",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "upload_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^U[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "description": "用户放弃上传时，使用原 U 和一个独立的幂等键取消。先查上传状态，已进入后续处理的上传可能无法取消。",
                "responses": {
                    "200": {
                        "description": "成功受理；异步操作须继续查询状态",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Upload"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [],
                                "properties": {}
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/uploads/{upload_id}/parts": {
            "get": {
                "operationId": "listUploadParts",
                "summary": "查询已申报的分片",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "upload_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^U[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 100
                        }
                    },
                    {
                        "name": "after",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1024,
                            "default": 0
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "description": "断点续传时按 U 查询分片序号、摘要和 uploaded。只跳过已经确认且摘要匹配的分片。继续分页时传 next_after，确认完所有分片再提交整包校验。",
                "responses": {
                    "200": {
                        "description": "成功受理；异步操作须继续查询状态",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/UploadParts"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            },
            "post": {
                "operationId": "declareUploadPart",
                "summary": "申报分片摘要",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "upload_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^U[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "description": "按任务返回的 part_size_bytes 切分原始文件，从 1 开始为每片计算 SHA-256 并申报。同一 U 下同一序号的内容应始终一致，随后为该片申请上传凭证。",
                "responses": {
                    "200": {
                        "description": "成功受理；异步操作须继续查询状态",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/UploadPart"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UploadPartInput"
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/uploads/{upload_id}/parts/{part_number}/ticket": {
            "get": {
                "operationId": "getUploadPartTicket",
                "summary": "获取分片上传凭证",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "upload_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^U[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "part_number",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 1024
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "description": "为一个已经声明的分片申请短期上传凭证。使用 SDK 时将凭证交给上传助手。自行调用 HTTP 时按返回的地址、方法、请求头或表单字段发送该分片。传输结束后，继续调用分片确认接口。",
                "responses": {
                    "200": {
                        "description": "成功受理；异步操作须继续查询状态",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/UploadPartTicket"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/uploads/{upload_id}/parts/{part_number}/complete": {
            "post": {
                "operationId": "completeUploadPart",
                "summary": "确认分片已上传",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "upload_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^U[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    },
                    {
                        "name": "part_number",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 1024
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "description": "分片传输后，使用原上传任务 ID、分片序号和幂等键确认结果。传输响应丢失时，可先确认同一分片。如果返回 PartMissing，为该分片重新申请上传凭证并补传原字节。所有分片确认后，再提交安装包校验。",
                "responses": {
                    "200": {
                        "description": "成功受理；异步操作须继续查询状态",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/UploadPart"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [],
                                "properties": {}
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/download-tickets": {
            "post": {
                "operationId": "createDownloadTicket",
                "summary": "申请原包或签名包下载链接",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "description": "指定自己的应用、目标版本和 package_type，申请该安装包的短期下载凭证。首次返回的 ticket 可按其中的 method、url 和 headers 使用。下载后比对 size_bytes，如需完整性校验，使用自己记录中可信的文件摘要。\n\n账号须开通对应的下载能力。原包使用 DownloadOriginal，签名包使用 DownloadSigned，均需目标应用和版本授权。duration_seconds 为 60–300 秒，受账号可用上限和长期 AccessKey 到期时间限制。请使用长期 AccessKey。本接口适用于企业签名和普通分发应用。\n\n幂等重放可取得原回执，返回 ticket=null 时需要重新申请才能获得链接。确认需要新凭证时使用新的业务幂等键。已签发的链接在有效期内可使用，撤销 AccessKey 后也可能持续到链接过期。过期后不能发起新的下载。下载请求失败时，先核对目标版本和凭证有效期。",
                "responses": {
                    "200": {
                        "description": "首次返回短期链接；重复请求返回相同回执且 ticket=null。响应不得缓存。",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/DownloadReceipt"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "version_id",
                                    "package_type",
                                    "duration_seconds"
                                ],
                                "properties": {
                                    "version_id": {
                                        "type": "string",
                                        "pattern": "^V[a-f0-9]{32}$"
                                    },
                                    "package_type": {
                                        "type": "string",
                                        "enum": [
                                            "original",
                                            "signed"
                                        ]
                                    },
                                    "duration_seconds": {
                                        "type": "integer",
                                        "minimum": 60,
                                        "maximum": 300
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/distribution-settings": {
            "get": {
                "operationId": "getDistributionSettings",
                "summary": "读取分发下载页设置",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功；响应禁止缓存。版本冲突须重新读取并由调用方确认，禁止 SDK 自动覆盖。",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/DistributionSettings"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "查询当前模板、语言、介绍和 revision。下拉选择请使用返回的 available_template_ids 和 available_languages，保存设置时带回 revision。\n\n须单独授予 distribution:ReadSettings。只支持普通应用分发，返回当前模板、语言、纯文本介绍、内容版本标识和可用选项；可使用显式授予此动作的指定应用只读 AKT。",
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "distribution"
                ]
            },
            "post": {
                "operationId": "updateDistributionSettings",
                "summary": "修改分发下载页设置",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功；响应禁止缓存。版本冲突须重新读取并由调用方确认，禁止 SDK 自动覆盖。",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/DistributionSettingsUpdated"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DistributionSettingsInput"
                            }
                        }
                    }
                },
                "description": "先读取当前下载页设置，取得 revision、模板、语言和介绍。修改时提交全部四项。模板与语言从查询返回的可选值中选择，介绍使用纯文本，转义后最多 255 个字符。\n\n长期 AccessKey 需要 distribution:UpdateSettings 和账号分发设置修改能力，且目标应用应可操作。读取设置需要独立的 distribution:ReadSettings。\n\n收到 RevisionConflict 时读取最新设置并重新确认。相同幂等键与原请求重放返回先前回执并标记 replayed=true，判断当前展示时重新查询并打开分发页。",
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/statistics": {
            "get": {
                "operationId": "getAppStatistics",
                "summary": "查询应用安装、启动与下载统计",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存。daily 为升序 30 日；end_date 含今日，end_at 为明日 00:00 的排他上界。",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/AppStatistics"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "查看累计、今日和近 30 日趋势。应用总安装按准入设备指纹跨版本去重，启动是联网记录的事件次数。查看 installation_statistics_state 区分可用、未初始化、不适用，null 表示无可用计数。\n\n账号需开通统计查询，并显式授予 enterprise:ReadStatistics 或 distribution:ReadStatistics。固定近 30 个 Asia/Shanghai 自然日，不接受查询参数。允许显式授予统计动作的指定应用 AKT。下载为现有准入计数，非下载完成或唯一设备；安装按应用设备指纹去重，不累加版本计数。首次打开计入当前启动规则；历史总启动可能不含首次，迁移当日标注估计。不返回历史每日启动以免伪造趋势。计数受现有重置与留存影响，不承诺永久累计。未初始化安装统计返回 null/state；缺失表/索引、超查询上限或不安全数值返回 StatisticsUnavailable(503)，不扫描设备表补算。账号默认关闭、10 次/分钟，可设 1–60；全局统计 600 次/分钟，并继续受一般限流。",
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/pricing": {
            "get": {
                "operationId": "getAppPricing",
                "summary": "列出套餐和按天价格",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存。产品 SKU 必须在对应模块使用；签名月套餐每月按现有 30 日计算，分发会员按一年服务规则。",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/AppPricing"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "查询该应用可用的套餐、SKU、按天范围、金额单位和退款规则。根据返回值展示价格。选择 SKU 后可查询参考价格，确定购买时另行创建购买报价。\n\n需要对应产品的 ReadPricing，支持具有该动作的单应用临时只读凭据。每账号最多 30 次/分钟，仍受一般限流。金额为两位小数字符串，currency 为站内金额单位。reference_only=true 表示当前返回的是参考结果。",
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/quote": {
            "get": {
                "operationId": "getAppQuote",
                "summary": "查询套餐参考价",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    },
                    {
                        "name": "sku",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:[1-6]|100[1-4]|300[1-4]|day[123])$"
                        }
                    },
                    {
                        "name": "days",
                        "in": "query",
                        "required": false,
                        "description": "仅 day1/day2/day3 必须提供；实际范围取当前配置，其他套餐禁止携带。",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 3650
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存。产品 SKU 必须在对应模块使用；签名月套餐每月按现有 30 日计算，分发会员按一年服务规则。",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/AppQuote"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "传入价格列表返回的 sku，按天套餐同时传入 days。可以用返回的金额和 currency 在界面展示试算价格。实际购买前另行创建购买报价，展示报价并取得确认。\n\n需要对应产品的 ReadPricing，支持具有该动作的单应用临时只读凭据。每账号最多 30 次/分钟，仍受一般限流。reference_only=true 和 payment_api_available=false 说明本次结果仅用于试算。",
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/creation": {
            "get": {
                "operationId": "getAppCreation",
                "summary": "查询应用创建进度",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    }
                ],
                "description": "使用预留新应用返回的 A 标识查询预留状态及截止时间。首次上传完成后，用同一 A 查询正式应用详情。请使用创建该预留的 API 应用。",
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/Creation"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/metadata": {
            "get": {
                "operationId": "getAppMetadata",
                "summary": "读取名称、备注与修订号",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    }
                ],
                "description": "修改应用资料前调用，保存返回的 revision、name 和 remark。提交修改时带回该 revision，以免覆盖网页或其他接入程序的新改动。",
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/AppMetadata"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            },
            "post": {
                "operationId": "updateAppMetadata",
                "summary": "修改应用名称与备注",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    }
                ],
                "description": "先读取最新资料，再同时提交 revision、name、remark。已开通企业签名的应用只可修改备注，此时 name 传原名称。成功后保存新的 revision。",
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/AppMetadata"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "revision",
                                    "name",
                                    "remark"
                                ],
                                "properties": {
                                    "revision": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": "string"
                                    },
                                    "remark": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/publish": {
            "post": {
                "operationId": "publishVersion",
                "summary": "发布或回滚指定版本",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    }
                ],
                "description": "从目标应用的版本列表取得要发布的 version_id 和刚读取的 current_version_id。确实没有当前版本时，current_version_id 传空字符串。普通分发选择原包。企业签名可切换到仍可用、证书一致且具有独立安装验证的已签名历史版本。\n\n分别需要 distribution:PublishVersions 或 enterprise:PublishVersions、目标应用授权及应用管理能力。用户确认后提交；收到 RevisionConflict 时先重新读取当前版本并确认差异。提交后查询目标版本的 is_current。",
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/PublishedVersion"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "version_id",
                                    "current_version_id"
                                ],
                                "properties": {
                                    "version_id": {
                                        "type": "string"
                                    },
                                    "current_version_id": {
                                        "type": "string",
                                        "pattern": "^(?:V[a-f0-9]{32})?$"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/trash": {
            "post": {
                "operationId": "trashApp",
                "summary": "确认删除应用",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    }
                ],
                "description": "请先让使用者核对应用名称、包名和完整应用 ID。提交时填写 confirm_app_id，值与路径中的应用 ID 完全相同。成功后应用从用户列表移除。企业签名应用进入回收站。\n\n普通分发使用 distribution:TrashApps，企业签名使用 enterprise:TrashApps。账号须具备对应的应用管理能力。保留回执，查看 state 和 files_retained 确认处理结果。",
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/TrashedApp"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "confirm_app_id"
                                ],
                                "properties": {
                                    "confirm_app_id": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/purchase-quotes": {
            "post": {
                "operationId": "createPurchaseQuote",
                "summary": "创建开通或续费报价",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    }
                ],
                "description": "购买前，按价格列表中的 sku 创建有效期为五分钟的报价。按天套餐还应提供字符串 days。保存报价 ID、原金额、pricing_revision 和 currency.revision。向用户展示金额、单位和有效期，确认后按原报价付款。\n\n使用长期 AccessKey，并具备相应产品的 ReadPricing 和 CreatePurchaseQuotes、目标应用权限、账号付款能力及 API 应用预算。报价不预扣余额。普通分发购买后，点数或会员权益计入该账号。每个账号最多保留 100 个未使用报价。\n\n收到 PaymentQuarantined 时，保留现有报价或订单和 request_id，联系平台核实后再继续付款。签名需要在开通后另行提交。",
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/PurchaseQuote"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PurchaseQuoteInput"
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/purchase-quotes/{quote_id}": {
            "get": {
                "operationId": "getPurchaseQuote",
                "summary": "查询购买报价及付款结果",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "quote_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^Q[a-f0-9]{32}$"
                        }
                    }
                ],
                "description": "按 Q 查询报价是否到期或已消费。付款响应丢失时先查原报价。包含完整付款回执还须具备付款动作且来源 IP 满足付款条件。\n\n仅限父 AKP；账号付款许可、用户 API 应用预算、显式动作及资源归属独立校验。新能力默认关闭，既有密钥不自动获得权限。报价和付款均不自动提交签名任务；签名须另外授予 CreateJobs 并显式提交。 须对应模块 CreatePurchaseQuotes，只能查询本 API 应用创建的报价。已付款回执是付款时快照，后续网页退款以订单状态与当前应用权益为准；不会重新发放权益。 已支付报价的完整 receipt 包含付款时余额，额外要求当前模块 PayOrders 与明确付款 IP 白名单；仅报价权限时返回 paid 状态和 receipt=null。回执为历史快照，不能替代当前权益查询。",
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/PurchaseQuote"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/purchase-quotes/{quote_id}/pay": {
            "post": {
                "operationId": "payPurchaseQuote",
                "summary": "使用余额支付购买报价",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "quote_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^Q[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/FinancialIdempotency"
                    }
                ],
                "description": "取得使用者对原报价的确认后，提交 balance、原金额字符串、pricing_revision 和 currency.revision。成功时返回付款回执、订单 ID 和新增权益。企业签名还需要另行提交签名任务。\n\n使用长期 AccessKey，账号须具备付款能力和两层可用预算，对应应用须具备 PayOrders 动作。请求来源匹配 IPv4 /24 或 IPv6 /64 及更精确的授权。预算按 Asia/Shanghai 计算，退款不恢复 API 付款预算。\n\n如果返回余额或预算不足、报价过期、金额单位已变或应用不可用，先按错误原因核对。请求超时后查询原报价。恢复同一次付款时传原确认字段与原幂等键。暂停新付款时，符合现有授权的请求仍能查询已成功的付款回执。",
                "responses": {
                    "200": {
                        "description": "成功；禁止缓存",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/PurchaseReceipt"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PurchaseConfirmation"
                            }
                        }
                    }
                },
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        }
    },
    "x-cloudsign-webhooks": "webhooks-v1.json",
    "tags": [
        {
            "name": "应用分发",
            "description": "普通 IPA / APK 应用的创建、更新上传、版本发布、下载页设置、套餐购买与用量查询。应用分发业务 API 需要授权，面向安装用户的下载页面可免登录访问。"
        }
    ],
    "x-cloudsign-product": "distribution"
}
