{
    "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"
                    }
                }
            },
            "Job": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "app_id",
                    "status",
                    "progress",
                    "attempt",
                    "created_at",
                    "updated_at",
                    "terminal",
                    "error"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^J[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "preparing",
                            "ready",
                            "leased",
                            "running",
                            "verifying",
                            "publishing",
                            "succeeded",
                            "failed",
                            "cancelled",
                            "superseded",
                            "unknown"
                        ]
                    },
                    "progress": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100
                    },
                    "attempt": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "created_at": {
                        "type": "integer"
                    },
                    "updated_at": {
                        "type": "integer"
                    },
                    "terminal": {
                        "type": "boolean"
                    },
                    "error": {
                        "oneOf": [
                            {
                                "type": "null"
                            },
                            {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                    "code",
                                    "message"
                                ],
                                "properties": {
                                    "code": {
                                        "type": "string",
                                        "const": "SigningFailed"
                                    },
                                    "message": {
                                        "type": "string"
                                    }
                                }
                            }
                        ]
                    }
                }
            },
            "JobAccepted": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "app_id",
                    "accepted"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^J[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "accepted": {
                        "const": true,
                        "type": "boolean"
                    }
                }
            },
            "JobInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "source_version_id"
                ],
                "properties": {
                    "source_version_id": {
                        "type": "string",
                        "pattern": "^V[a-f0-9]{32}$"
                    },
                    "certificate_id": {
                        "type": "string",
                        "pattern": "^C[a-f0-9]{32}$"
                    }
                }
            },
            "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
                    }
                }
            },
            "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}$"
                    }
                }
            },
            "OrderRefund": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "order_id",
                    "state",
                    "eligible",
                    "amount",
                    "currency",
                    "days",
                    "deadline",
                    "message",
                    "receipt",
                    "refund_destination",
                    "budget_restored",
                    "confirmation"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "order_id": {
                        "type": "string",
                        "pattern": "^O[a-f0-9]{32}$"
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "eligible",
                            "unavailable",
                            "refunded"
                        ]
                    },
                    "eligible": {
                        "type": "boolean"
                    },
                    "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,8})\\.[0-9]{2}$"
                    },
                    "currency": {
                        "$ref": "#/components/schemas/PurchaseCurrency"
                    },
                    "days": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 1
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "deadline": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 0
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "message": {
                        "type": "string",
                        "maxLength": 400
                    },
                    "receipt": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/RefundReceipt"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "refund_destination": {
                        "type": "string",
                        "const": "site_balance"
                    },
                    "budget_restored": {
                        "type": "boolean",
                        "const": false
                    },
                    "confirmation": {
                        "type": "string",
                        "const": "revoke_order_entitlement"
                    }
                }
            },
            "RefundReceipt": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "app_id",
                    "order_id",
                    "quote_id",
                    "state",
                    "amount",
                    "currency",
                    "balance_before",
                    "balance_after",
                    "refunded_at",
                    "revoked_days",
                    "sign_expires_at",
                    "refund_destination",
                    "budget_restored"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^R[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "order_id": {
                        "type": "string",
                        "pattern": "^O[a-f0-9]{32}$"
                    },
                    "quote_id": {
                        "type": "string",
                        "pattern": "^Q[a-f0-9]{32}$"
                    },
                    "state": {
                        "type": "string",
                        "const": "refunded"
                    },
                    "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}$"
                    },
                    "refunded_at": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "revoked_days": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 3650
                    },
                    "sign_expires_at": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "refund_destination": {
                        "type": "string",
                        "const": "site_balance"
                    },
                    "budget_restored": {
                        "type": "boolean",
                        "const": false
                    }
                }
            },
            "RefundConfirmation": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "amount",
                    "currency_revision",
                    "confirmation"
                ],
                "properties": {
                    "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,8})\\.[0-9]{2}$"
                    },
                    "currency_revision": {
                        "type": "string",
                        "pattern": "^C[a-f0-9]{64}$"
                    },
                    "confirmation": {
                        "type": "string",
                        "const": "revoke_order_entitlement"
                    }
                }
            },
            "CapacityQuote": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "app_id",
                    "state",
                    "quantity",
                    "unit_price",
                    "amount",
                    "current_max",
                    "new_max",
                    "installed_devices",
                    "currency",
                    "pricing_revision",
                    "created_at",
                    "expires_at",
                    "price_reserved",
                    "funds_reserved",
                    "refund_supported",
                    "receipt"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^Q[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "awaiting_payment",
                            "expired",
                            "paid"
                        ]
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                    },
                    "unit_price": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,8})\\.[0-9]{2}$"
                    },
                    "amount": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,8})\\.[0-9]{2}$"
                    },
                    "current_max": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                    },
                    "new_max": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                    },
                    "installed_devices": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "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": false
                    },
                    "funds_reserved": {
                        "type": "boolean",
                        "const": false
                    },
                    "refund_supported": {
                        "type": "boolean",
                        "const": false
                    },
                    "receipt": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/CapacityReceipt"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                }
            },
            "CapacityReceipt": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "quote_id",
                    "app_id",
                    "order_id",
                    "state",
                    "payment_method",
                    "quantity",
                    "unit_price",
                    "amount",
                    "currency",
                    "balance_before",
                    "balance_after",
                    "paid_at",
                    "old_max",
                    "new_max",
                    "refund_supported"
                ],
                "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"
                    },
                    "quantity": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100000
                    },
                    "unit_price": {
                        "type": "string",
                        "pattern": "^(?:0|[1-9][0-9]{0,8})\\.[0-9]{2}$"
                    },
                    "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
                    },
                    "old_max": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                    },
                    "new_max": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 2147483647
                    },
                    "refund_supported": {
                        "type": "boolean",
                        "const": false
                    }
                }
            },
            "CapacityInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "quantity"
                ],
                "properties": {
                    "quantity": {
                        "type": "string",
                        "pattern": "^[1-9][0-9]{0,5}$",
                        "description": "增加 1–100000 台额度，超出范围由服务端拒绝。"
                    }
                }
            },
            "VersionStatistics": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "version_id",
                    "module",
                    "package_type",
                    "generated_at",
                    "timezone",
                    "date",
                    "record_scope",
                    "statistics_scope",
                    "installations",
                    "launches"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "version_id": {
                        "type": "string",
                        "pattern": "^V[a-f0-9]{32}$"
                    },
                    "module": {
                        "type": "string",
                        "const": "enterprise"
                    },
                    "package_type": {
                        "type": "string",
                        "enum": [
                            "original",
                            "signed"
                        ]
                    },
                    "generated_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "timezone": {
                        "type": "string",
                        "const": "Asia/Shanghai"
                    },
                    "date": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "record_scope": {
                        "type": "string",
                        "const": "current_retained_version_counters"
                    },
                    "statistics_scope": {
                        "type": "string",
                        "enum": [
                            "independent",
                            "merged",
                            "merged_member",
                            "disabled",
                            "source"
                        ]
                    },
                    "installations": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": false,
                        "required": [
                            "unit",
                            "total",
                            "today",
                            "cross_version_deduplicated"
                        ],
                        "properties": {
                            "unit": {
                                "type": "string",
                                "const": "unique_admitted_device_fingerprints_per_version"
                            },
                            "total": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "today": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                            },
                            "cross_version_deduplicated": {
                                "type": "boolean",
                                "const": false
                            }
                        }
                    },
                    "launches": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "additionalProperties": false,
                        "required": [
                            "unit",
                            "total",
                            "today",
                            "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
                            },
                            "current_rules_include_first_open": {
                                "type": "boolean",
                                "const": true
                            },
                            "legacy_totals_may_exclude_first_open": {
                                "type": "boolean"
                            }
                        }
                    }
                }
            },
            "SigningCertificates": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "items"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "items": {
                        "type": "array",
                        "maxItems": 1000,
                        "items": {
                            "$ref": "#/components/schemas/SigningCertificate"
                        }
                    }
                }
            },
            "SigningCertificate": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "label",
                    "team",
                    "certificate_expires",
                    "profile_expires",
                    "selected"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^C[a-f0-9]{32}$"
                    },
                    "label": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "team": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "certificate_expires": {
                        "type": "string",
                        "maxLength": 80
                    },
                    "profile_expires": {
                        "type": "string",
                        "maxLength": 80
                    },
                    "selected": {
                        "type": "boolean"
                    }
                }
            },
            "SigningParameters": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "revision",
                    "bundle_mode",
                    "keychain_mode",
                    "remove_plugins"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "revision": {
                        "type": "string",
                        "pattern": "^R[a-f0-9]{64}$"
                    },
                    "bundle_mode": {
                        "type": "string",
                        "enum": [
                            "original",
                            "certificate",
                            "administrator"
                        ]
                    },
                    "keychain_mode": {
                        "type": "string",
                        "enum": [
                            "off",
                            "certificate",
                            "custom"
                        ]
                    },
                    "remove_plugins": {
                        "type": "string",
                        "enum": [
                            "none",
                            "auto",
                            "selected"
                        ]
                    }
                }
            },
            "SigningParametersInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "revision",
                    "bundle_mode",
                    "keychain_mode",
                    "remove_plugins"
                ],
                "properties": {
                    "revision": {
                        "type": "string",
                        "pattern": "^R[a-f0-9]{64}$"
                    },
                    "bundle_mode": {
                        "type": "string",
                        "enum": [
                            "original",
                            "certificate",
                            "administrator"
                        ]
                    },
                    "keychain_mode": {
                        "type": "string",
                        "enum": [
                            "off",
                            "certificate",
                            "custom"
                        ]
                    },
                    "remove_plugins": {
                        "type": "string",
                        "enum": [
                            "none",
                            "auto",
                            "selected"
                        ]
                    }
                }
            },
            "SigningBatchAccepted": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "items",
                    "accepted"
                ],
                "properties": {
                    "items": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 10,
                        "items": {
                            "$ref": "#/components/schemas/JobAccepted"
                        }
                    },
                    "accepted": {
                        "type": "boolean",
                        "const": true
                    }
                }
            },
            "SigningBatchInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "items"
                ],
                "properties": {
                    "items": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 10,
                        "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                                "app_id",
                                "source_version_id"
                            ],
                            "properties": {
                                "app_id": {
                                    "type": "string",
                                    "pattern": "^A[a-f0-9]{32}$"
                                },
                                "source_version_id": {
                                    "type": "string",
                                    "pattern": "^V[a-f0-9]{32}$"
                                },
                                "certificate_id": {
                                    "type": "string",
                                    "pattern": "^C[a-f0-9]{32}$"
                                }
                            }
                        }
                    }
                }
            },
            "DeviceList": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "generated_at",
                    "source",
                    "device_identifier",
                    "network_visible",
                    "consistency",
                    "legacy_launches_may_exclude_first_open",
                    "items",
                    "next_cursor"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "generated_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "source": {
                        "type": "string",
                        "const": "devices"
                    },
                    "device_identifier": {
                        "type": "string",
                        "const": "retained_installation_identifier_not_hardware_attestation"
                    },
                    "network_visible": {
                        "type": "boolean"
                    },
                    "consistency": {
                        "type": "string",
                        "const": "live_retained_records"
                    },
                    "legacy_launches_may_exclude_first_open": {
                        "type": "boolean",
                        "const": true
                    },
                    "items": {
                        "type": "array",
                        "maxItems": 100,
                        "items": {
                            "$ref": "#/components/schemas/DeviceRecord"
                        }
                    },
                    "next_cursor": {
                        "oneOf": [
                            {
                                "type": "string",
                                "pattern": "^F(?:[a-f0-9]{24,64}|[a-f0-9]{8}-[a-f0-9]{16}|instance:[a-f0-9]{40})$"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                }
            },
            "DeviceRecord": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "device_id",
                    "ip",
                    "region",
                    "first_seen_at",
                    "last_seen_at",
                    "recorded_launches"
                ],
                "properties": {
                    "device_id": {
                        "type": "string",
                        "pattern": "^F(?:[a-f0-9]{24,64}|[a-f0-9]{8}-[a-f0-9]{16}|instance:[a-f0-9]{40})$"
                    },
                    "ip": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 45
                    },
                    "region": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "first_seen_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "last_seen_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "recorded_launches": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    }
                }
            },
            "OverflowDeviceList": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "generated_at",
                    "source",
                    "device_identifier",
                    "network_visible",
                    "consistency",
                    "legacy_launches_may_exclude_first_open",
                    "items",
                    "next_cursor"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "generated_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "source": {
                        "type": "string",
                        "const": "overflow"
                    },
                    "device_identifier": {
                        "type": "string",
                        "const": "retained_installation_identifier_not_hardware_attestation"
                    },
                    "network_visible": {
                        "type": "boolean"
                    },
                    "consistency": {
                        "type": "string",
                        "const": "live_retained_records"
                    },
                    "legacy_launches_may_exclude_first_open": {
                        "type": "boolean",
                        "const": true
                    },
                    "items": {
                        "type": "array",
                        "maxItems": 100,
                        "items": {
                            "$ref": "#/components/schemas/OverflowDeviceRecord"
                        }
                    },
                    "next_cursor": {
                        "oneOf": [
                            {
                                "type": "string",
                                "pattern": "^F(?:[a-f0-9]{24,64}|[a-f0-9]{8}-[a-f0-9]{16}|instance:[a-f0-9]{40})$"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                }
            },
            "OverflowDeviceRecord": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "device_id",
                    "ip",
                    "region",
                    "first_denied_at",
                    "last_denied_at",
                    "attempts",
                    "last_install_limit",
                    "admitted_at",
                    "state"
                ],
                "properties": {
                    "device_id": {
                        "type": "string",
                        "pattern": "^F(?:[a-f0-9]{24,64}|[a-f0-9]{8}-[a-f0-9]{16}|instance:[a-f0-9]{40})$"
                    },
                    "ip": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 45
                    },
                    "region": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "first_denied_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "last_denied_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "attempts": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "last_install_limit": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "admitted_at": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "recovered"
                        ]
                    }
                }
            },
            "DeviceExport": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "app_id",
                    "source",
                    "file_name",
                    "format",
                    "rows",
                    "next_cursor",
                    "sha256",
                    "content_base64"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^X[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "source": {
                        "type": "string",
                        "enum": [
                            "devices",
                            "overflow"
                        ]
                    },
                    "file_name": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}-(?:devices|overflow)\\.jsonl$"
                    },
                    "format": {
                        "type": "string",
                        "const": "jsonl"
                    },
                    "rows": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 500
                    },
                    "next_cursor": {
                        "oneOf": [
                            {
                                "type": "string",
                                "pattern": "^F(?:[a-f0-9]{24,64}|[a-f0-9]{8}-[a-f0-9]{16}|instance:[a-f0-9]{40})$"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "sha256": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                    },
                    "content_base64": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 1500000
                    }
                }
            },
            "DeviceExportInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "source",
                    "state",
                    "limit",
                    "cursor"
                ],
                "properties": {
                    "source": {
                        "type": "string",
                        "enum": [
                            "devices",
                            "overflow"
                        ]
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "all",
                            "pending",
                            "recovered"
                        ]
                    },
                    "limit": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 500
                    },
                    "cursor": {
                        "type": "string",
                        "pattern": "^(?:F(?:[a-f0-9]{24,64}|[a-f0-9]{8}-[a-f0-9]{16}|instance:[a-f0-9]{40}))?$"
                    }
                }
            },
            "SigningEntitlement": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "generated_at",
                    "state",
                    "plan_id",
                    "plan_name",
                    "sign_expires_at",
                    "remaining_seconds",
                    "first_recorded_activation_at",
                    "application_status",
                    "certificate",
                    "certificate_state",
                    "installation_limit",
                    "verification",
                    "refund_policy",
                    "statistics_state",
                    "statistics",
                    "signing_admission_rechecked"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "description": "当前账号授权的企业签名应用。",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "generated_at": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "查询时刻 UTC 秒，权益和准入仍会在后续写入时重新核实。"
                    },
                    "state": {
                        "type": "string",
                        "description": "not_activated 未开通、active 有效、expired 已到期；该状态不代表一定可以成功提交任务。",
                        "enum": [
                            "not_activated",
                            "active",
                            "expired"
                        ]
                    },
                    "plan_id": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "当前套餐编号，0 未分类、1 基础版、2 高级版、3 独立版。"
                    },
                    "plan_name": {
                        "type": "string",
                        "description": "当前套餐展示名称。"
                    },
                    "sign_expires_at": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "当前签名有效期到期 UTC 秒；0 表示未开通。"
                    },
                    "remaining_seconds": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "距到期的剩余秒数，不小于零。"
                    },
                    "first_recorded_activation_at": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 0,
                                "description": "当前权益台账中最早记录的开通时刻；旧数据缺少记录时为 null，不用上传时间冒充开通时间。"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "当前权益台账中最早记录的开通时刻；缺失为 null，不能拿上传时间代替。"
                    },
                    "application_status": {
                        "type": "string",
                        "description": "normal 正常、pending_review 待审核、blocked 被锁定。",
                        "enum": [
                            "normal",
                            "pending_review",
                            "blocked"
                        ]
                    },
                    "certificate": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/SigningCertificate"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "当前已分配的同套餐证书公开信息；缺失、重复或套餐不符为 null。"
                    },
                    "certificate_state": {
                        "type": "string",
                        "description": "assigned 当前已分配同套餐证书的公开信息；unavailable 表示缺失、重复或套餐不匹配。",
                        "enum": [
                            "assigned",
                            "unavailable"
                        ]
                    },
                    "installation_limit": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "maximum_devices",
                            "unlimited",
                            "cross_version_deduplicated"
                        ],
                        "properties": {
                            "maximum_devices": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "应用级唯一设备上限，0 表示不限；不逐版本重复计费。"
                            },
                            "unlimited": {
                                "type": "boolean",
                                "description": "上限为 0 时为 true。"
                            },
                            "cross_version_deduplicated": {
                                "type": "boolean",
                                "description": "同一应用跨版本按设备指纹去重，不是系统真实 UDID。",
                                "const": true
                            }
                        },
                        "description": "应用级安装量上限与跨版本去重规则。"
                    },
                    "verification": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "injection_enabled",
                            "ui_mode",
                            "ui_inherited",
                            "applies_to_next_signature"
                        ],
                        "properties": {
                            "injection_enabled": {
                                "type": "boolean",
                                "description": "后续签名是否注入平台验证库；不是授权通过状态。"
                            },
                            "ui_mode": {
                                "type": "integer",
                                "enum": [
                                    1,
                                    2,
                                    3
                                ],
                                "description": "后续签名生效的等待提示方案，不改变授权、到期和安装量规则。"
                            },
                            "ui_inherited": {
                                "type": "boolean",
                                "description": "是否跟随全局默认验证提示方式。"
                            },
                            "applies_to_next_signature": {
                                "type": "boolean",
                                "description": "上述配置用于后续签名，不能据此推断已有安装包所带配置。",
                                "const": true
                            }
                        },
                        "description": "后续签名使用的验证库与等待提示配置，不代表当前安装包授权结果。"
                    },
                    "refund_policy": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "window_seconds",
                            "daily_supported",
                            "redemption_supported",
                            "other_rules_apply"
                        ],
                        "properties": {
                            "window_seconds": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "当前全局余额订单退款窗口，仍需查询指定 API 订单资格。"
                            },
                            "daily_supported": {
                                "type": "boolean",
                                "description": "当前按天余额订单是否支持退款。"
                            },
                            "redemption_supported": {
                                "type": "boolean",
                                "description": "密钥开通固定不支持退款。",
                                "const": false
                            },
                            "other_rules_apply": {
                                "type": "boolean",
                                "description": "还需满足来源 API 应用、次数、安装量等退款规则；不是退款资格承诺。",
                                "const": true
                            }
                        },
                        "description": "网站当前全局退款政策；实际退款资格须查询指定原 API 订单。"
                    },
                    "statistics_state": {
                        "type": "string",
                        "description": "available 已按统计权限返回，not_authorized 未授统计动作，disabled 账号未批准统计，unavailable 统计暂不可用或被限流。",
                        "enum": [
                            "available",
                            "not_authorized",
                            "disabled",
                            "unavailable"
                        ]
                    },
                    "statistics": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/AppStatistics"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "同时获统计动作与账号统计审批时返回现有统计结构；否则为 null，不能当作零。"
                    },
                    "signing_admission_rechecked": {
                        "type": "boolean",
                        "description": "后续任务将重新检查期限、账号、应用、证书、源版本及并发/每日额度，当前详情不预留资格。",
                        "const": true
                    }
                }
            },
            "SigningRedemptionReceipt": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "id",
                    "app_id",
                    "state",
                    "redeemed_at",
                    "duration_days",
                    "plan_id",
                    "previous_expires_at",
                    "sign_expires_at",
                    "refund_supported",
                    "automatic_signing"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "持久核销回执 E 标识，绑定当前账号、业务应用及创建核销的 API 应用。",
                        "pattern": "^E[a-f0-9]{32}$"
                    },
                    "app_id": {
                        "type": "string",
                        "description": "目标业务应用 A。",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "state": {
                        "type": "string",
                        "description": "redeemed 表示密钥核销与权益已原子提交。",
                        "enum": [
                            "redeemed"
                        ]
                    },
                    "redeemed_at": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "实际核销 UTC 秒。"
                    },
                    "duration_days": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "本次授予天数：月/季/年密钥分别为 30/90/360 天。"
                    },
                    "plan_id": {
                        "type": "integer",
                        "enum": [
                            1,
                            2,
                            3
                        ],
                        "description": "密钥对应签名套餐：1 基础版、2 高级版、3 独立版。"
                    },
                    "previous_expires_at": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "本次核销前签名到期 UTC 秒，0 表示未开通。"
                    },
                    "sign_expires_at": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "核销后的签名到期 UTC 秒。原套餐仍有效时从原到期时间延长，否则从本次核销时间开始。"
                    },
                    "refund_supported": {
                        "type": "boolean",
                        "description": "密钥核销固定不支持退款。",
                        "const": false
                    },
                    "automatic_signing": {
                        "type": "boolean",
                        "description": "固定 false，核销不创建签名任务。另行授予 CreateJobs 并提交原包版本。",
                        "const": false
                    }
                }
            },
            "SigningRedemptionInput": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "code",
                    "confirm_non_refundable"
                ],
                "properties": {
                    "code": {
                        "type": "string",
                        "description": "完整企业签名开通密钥，不是 AccessKey Secret；套餐及 30/90/360 天时长由密钥决定。不要写入日志或浏览器源码。",
                        "pattern": "^[A-Za-z0-9_-]{6,128}$",
                        "writeOnly": true
                    },
                    "confirm_non_refundable": {
                        "type": "boolean",
                        "description": "必须明确确认密钥开通不支持退款。",
                        "const": true
                    }
                }
            },
            "JobResult": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "job_id",
                    "status",
                    "terminal",
                    "result_state",
                    "source_version",
                    "signed_version",
                    "published_at"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$",
                        "description": "当前账号拥有且获授权的企业签名应用完整 A 标识。"
                    },
                    "job_id": {
                        "type": "string",
                        "pattern": "^J[a-f0-9]{32}$",
                        "description": "本次查询的准确签名任务 J 标识。"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "preparing",
                            "ready",
                            "leased",
                            "running",
                            "verifying",
                            "publishing",
                            "succeeded",
                            "failed",
                            "cancelled",
                            "superseded"
                        ],
                        "description": "任务状态。succeeded 表示发布完成，仍须检查 result_state。"
                    },
                    "terminal": {
                        "type": "boolean",
                        "description": "是否为终态：succeeded、failed、cancelled、superseded。"
                    },
                    "result_state": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "available",
                            "not_produced",
                            "not_recorded",
                            "removed"
                        ],
                        "description": "pending 正在执行；available 可取准确签名 V；not_produced 任务未成功；not_recorded 旧任务无可信关联；removed 产物版本已清理。"
                    },
                    "source_version": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/Version"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "该 J 实际输入的原包版本。若已清理则为 null，不是签名包。"
                    },
                    "signed_version": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/Version"
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "仅 available 时返回准确的签名版本；其他状态为 null。id 用于 DownloadSigned 票据；不要求 is_current=true。"
                    },
                    "published_at": {
                        "oneOf": [
                            {
                                "type": "integer",
                                "minimum": 1
                            },
                            {
                                "type": "null"
                            }
                        ],
                        "description": "可信关联记录中的发布时间（Unix 秒）；尚未发布或旧记录缺失时为 null。"
                    }
                },
                "description": "以任务不可变关联查询的结果快照，不依赖版本列表顺序。"
            }
        },
        "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}/jobs": {
            "get": {
                "operationId": "listJobs",
                "summary": "列出应用签名任务",
                "description": "分页查询该企业签名应用的任务。需要 enterprise:ReadJobs 和目标应用授权。按状态筛选时，后续页面沿用原条件并传入 next_cursor。较新的任务先返回，游标为 null 时结束。若收到 InvalidCursor，从第一页重新查询并按签名任务 ID 去重。使用完整任务 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": "^J[a-f0-9]{32}$"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "preparing",
                                "ready",
                                "leased",
                                "running",
                                "verifying",
                                "publishing",
                                "succeeded",
                                "failed",
                                "cancelled",
                                "superseded"
                            ]
                        }
                    },
                    {
                        "$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/Job"
                                                    }
                                                },
                                                "next_cursor": {
                                                    "oneOf": [
                                                        {
                                                            "type": "null"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "pattern": "^J[a-f0-9]{32}$"
                                                        }
                                                    ]
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            },
            "post": {
                "operationId": "createJob",
                "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": "先确认签名套餐已开通，并从版本列表取最新可签原包的 V 标识。提交后立即保存返回的 J 标识，再查询任务进度。可以使用应用当前证书，或显式选择同套餐的可用证书。",
                "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/JobAccepted"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/JobInput"
                            }
                        }
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/jobs/{job_id}": {
            "get": {
                "operationId": "getJob",
                "summary": "查询签名任务进度",
                "description": "传入提交任务返回的 J 和对应的 A。用 terminal 判断是否已结束，再读取 status 和 error。进度百分比只供展示。成功后通过 getJobResult 查询该 J 对应的签名版本，避免并发任务取错包。\n\n需要 enterprise:ReadJobs 及应用范围；仅当前应用所有者发起的 enterprise 任务，不包含其他用户、prepare/device 任务或原始错误详情。按 created_at、随机任务 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": "job_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^J[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/Job"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/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}/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"
                ]
            }
        },
        "/api/v1/apps/{app_id}/orders/{order_id}/refund": {
            "get": {
                "operationId": "getOrderRefund",
                "summary": "查询订单退款资格",
                "description": "从原购买回执取得订单 ID，查询退款资格、deadline 和确认内容。适用于当前 API 应用付款的企业签名余额订单。查询需要长期 AccessKey、enterprise:ReadRefunds 及符合退款要求的来源 IP。\n\neligible 表示查询当时的资格。准备退款时，向使用者展示原金额、单位、退回去向和应撤销的权益。已经提交但响应丢失时，重新查询同一订单的 receipt。暂停新退款后，仍可按当前权限读取已有成功回执。",
                "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": "order_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^O[a-f0-9]{32}$"
                        }
                    }
                ],
                "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/OrderRefund"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            },
            "post": {
                "operationId": "refundOrder",
                "summary": "确认退款并撤销签名权益",
                "description": "先查询同一订单的退款资格，向用户展示退款金额、单位和将撤销的签名权益，再按确认内容提交。适用于当前 API 应用创建并使用余额支付的企业签名订单。\n\n使用长期 AccessKey 和 enterprise:RefundOrders。账号须具备退款能力，来源 IP 须符合退款要求。提交时重新检查退款时限、购买方式、次数、应用和使用情况。成功时全额退回原付款账号站内余额，撤销该笔权益并保留其他续费，API 付款预算不会增加。\n\n响应丢失后先查询原订单退款结果。需要恢复同一次退款时保留原请求和原幂等键。一笔订单只可完成一次退款。",
                "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": "order_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^O[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/FinancialIdempotency"
                    }
                ],
                "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/RefundReceipt"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/RefundConfirmation"
                            }
                        }
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/capacity-quotes": {
            "post": {
                "operationId": "createCapacityQuote",
                "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": "为可扩容的自有企业签名应用创建报价。填写要增加的设备数，范围为 1–100000。读取原上限、新上限、单价、总额和截止时间。报价有效五分钟，创建时不扣款。\n\n使用长期 AccessKey 和 enterprise:CreateCapacityQuotes，目标应用的签名服务须有效且安装量有上限。报价受账号扩容能力、当前应用与预算约束。增加安装额度的购买不支持退款。",
                "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/CapacityQuote"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CapacityInput"
                            }
                        }
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/capacity-quotes/{quote_id}": {
            "get": {
                "operationId": "getCapacityQuote",
                "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": "按原扩容报价 ID 查询状态、金额、单位和上限变化。使用长期 AccessKey、enterprise:CreateCapacityQuotes 及目标应用授权。具有 enterprise:PayCapacity 且请求来源满足付款条件时，可读取完整付款回执。\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/CapacityQuote"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/capacity-quotes/{quote_id}/pay": {
            "post": {
                "operationId": "payCapacityQuote",
                "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": "用户确认原扩容报价后，提交原金额和修订号。使用长期 AccessKey、enterprise:PayCapacity、目标应用授权和符合付款要求的来源 IP，并确认账号与 API 应用两层预算。\n\n成功后保存回执，核对 new_max。额度上限增加后，设备可按新上限再次验证。此操作保留签名到期时间，扩容购买不支持退款。若单价、金额单位、应用状态或原上限已变化，重新查询并确认报价。响应丢失时先查询原扩容报价，同一次付款保留原幂等键。",
                "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/CapacityReceipt"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/PurchaseConfirmation"
                            }
                        }
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/versions/{version_id}/statistics": {
            "get": {
                "operationId": "getVersionStatistics",
                "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": "version_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^V[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/VersionStatistics"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "用同一企业签名应用的 A 与 V 查询该次签名的今日和累计安装、启动量。当前规则包含首次打开。旧数据按 statistics_scope 标出合并口径，版本设备数相加不能得到应用的唯一设备数。\n\n仅企业签名；独立 enterprise:ReadVersionStatistics 动作、指定自有应用范围与账号统计准入，不隐含 ReadVersions 或应用级 ReadStatistics。绑定 A/V 标识，共用应用统计的分钟额度；允许显式授予此动作的单应用只读 AKT。返回该版本保留的总量和今日计数，首次打开计入当前启动规则；旧包 merged/merged_member 保留合并口径，disabled/source 无独立计数时返回 null。版本设备数跨版本不去重，不能相加替代应用唯一设备总量。不扫描或导出设备/IP，不补造历史日趋势；日期固定 Asia/Shanghai，缺表/索引或异常计数返回 StatisticsUnavailable 503。",
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/certificates": {
            "get": {
                "operationId": "listSigningCertificates",
                "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": "取得当前应用套餐可选的证书公开标识、备注和有效期。selected 标记当前选择。需要切换证书时，把返回的 C 标识用于提交签名任务。",
                "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/SigningCertificates"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/signing-parameters": {
            "get": {
                "operationId": "getSigningParameters",
                "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": "读取企业签名应用的 Bundle ID、Keychain 与去插件选项及 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/SigningParameters"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            },
            "post": {
                "operationId": "updateSigningParameters",
                "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 提交支持的参数值，成功后对新签名任务生效。需要签名时另行创建任务。遇到 RevisionConflict 时重新读取并核对差异。",
                "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/SigningParameters"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SigningParametersInput"
                            }
                        }
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/signing/batches": {
            "post": {
                "operationId": "createSigningBatch",
                "summary": "批量提交签名任务",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/Date"
                    },
                    {
                        "$ref": "#/components/parameters/Nonce"
                    },
                    {
                        "$ref": "#/components/parameters/BodyHash"
                    },
                    {
                        "$ref": "#/components/parameters/Environment"
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    }
                ],
                "description": "单次最多提交 10 个不同自有应用，各指定最新可签原包。整批通过后为每项返回 J 标识，任一项失败时整批回滚。用同一幂等键恢复一次批量提交的回执。",
                "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/SigningBatchAccepted"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SigningBatchInput"
                            }
                        }
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/devices": {
            "get": {
                "operationId": "listDevices",
                "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": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:F(?:[a-f0-9]{24,64}|[a-f0-9]{8}-[a-f0-9]{16}|instance:[a-f0-9]{40}))?$"
                        }
                    },
                    {
                        "name": "state",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all"
                            ]
                        }
                    },
                    {
                        "name": "ip",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 45
                        }
                    },
                    {
                        "name": "region",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 64
                        }
                    }
                ],
                "description": "按页读取应用内设备指纹、首次与最近记录和留存启动次数。每页最多 100 行。network_visible 表示能否读取网络字段，设备标识用于安装统计。",
                "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/DeviceList"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/overflow": {
            "get": {
                "operationId": "listOverflowDevices",
                "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": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:F(?:[a-f0-9]{24,64}|[a-f0-9]{8}-[a-f0-9]{16}|instance:[a-f0-9]{40}))?$"
                        }
                    },
                    {
                        "name": "state",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all",
                                "pending",
                                "recovered"
                            ]
                        }
                    },
                    {
                        "name": "ip",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 45
                        }
                    },
                    {
                        "name": "region",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "maxLength": 64
                        }
                    }
                ],
                "description": "查看安装量达到上限后的设备尝试，按 pending 或 recovered 区分尚待准入与已恢复的记录，分别读取设备标识和尝试次数。每页最多 100 行。",
                "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/OverflowDeviceList"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/devices/export": {
            "post": {
                "operationId": "exportDevices",
                "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": "选择登记或超限数据源，每次最多导出 500 行 JSONL。首次成功时解码 content_base64 并核对 SHA-256，保存 next_cursor 后再取下一页。幂等重放只返回回执。",
                "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/DeviceExport"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/DeviceExportInput"
                            }
                        }
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/signing-entitlement": {
            "get": {
                "operationId": "getSigningEntitlement",
                "summary": "查询完整签名权益",
                "description": "查询企业签名应用当前套餐、到期时间、可用状态、证书选项、安装量上限、验证设置和退款规则。使用长期 AccessKey 和 enterprise:ReadEntitlements。\n\n统计还需 enterprise:ReadStatistics 及账号统计能力。statistics 为 null 时显示未提供，不能按零安装量处理。首次开通时间未知时为 null。提交签名前按返回的当前权益确认是否满足条件。",
                "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}$"
                        }
                    }
                ],
                "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/SigningEntitlement"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/signing-redemptions": {
            "post": {
                "operationId": "redeemSigningKey",
                "summary": "核销密钥开通或续费签名",
                "description": "使用长期 AccessKey 核销企业签名开通密钥。需要账号具备核销和写入能力，目标应用须已授权 enterprise:RedeemKeys。来源 IP 使用 IPv4 /24 或 IPv6 /64 及更精确的范围。\n\n由开通密钥决定套餐和 30、90 或 360 天时长。向使用者明确说明核销后不支持退款，确认后传 confirm_non_refundable=true。每账号每分钟最多尝试五次，错误尝试也计入。\n\n核销后保存核销回执 ID，再查询应用的当前权益。提交响应丢失时保留原请求和原幂等键。有回执 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}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/FinancialIdempotency"
                    }
                ],
                "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/SigningRedemptionReceipt"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/SigningRedemptionInput"
                            }
                        }
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/signing-redemptions/{redemption_id}": {
            "get": {
                "operationId": "getSigningRedemption",
                "summary": "查询密钥核销回执",
                "description": "使用创建核销回执的同一个 API 应用，在本人应用范围内查询一次密钥开通结果。需要 enterprise:ReadRedemptions 和长期 AccessKey。同一 API 应用轮换密钥后可继续查询。\n\n回执记录当次授予的结果。需要确认当前有效期时，再查询 getSigningEntitlement。应用已删除、转移或不在授权范围内时，无法继续读取该回执。",
                "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": "redemption_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^E[a-f0-9]{32}$"
                        },
                        "description": "从本 API 应用原核销响应取得的完整 E 标识。"
                    }
                ],
                "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/SigningRedemptionReceipt"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/jobs/{job_id}/result": {
            "get": {
                "operationId": "getJobResult",
                "summary": "查询签名任务对应的准确产物",
                "description": "通过应用 ID 和提交时保存的签名任务 ID，查询该任务使用的原包及准确签名产物。需要 enterprise:ReadJobs 和 enterprise:ReadVersions，以及目标应用授权。支持授权范围内的临时只读凭据或 OAuth。\n\nresult_state=available 时，使用 signed_version.id 申请该签名包的下载凭证。pending 时继续查询原任务。not_produced 表示没有成功产物，not_recorded 表示旧任务无法关联产物，removed 表示该版本已经不可用。原包不再可用时 source_version 可为空。下载该签名版本需要长期 AccessKey、DownloadSigned 动作和下载能力。",
                "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": "job_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^J[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/SecurityToken"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "返回该 J 的结果快照；终态并不一定存在可下载产物",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/JobResult"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        }
    },
    "x-cloudsign-webhooks": "webhooks-v1.json",
    "tags": [
        {
            "name": "企业签名",
            "description": "从上传 IPA、开通权益、选择证书到提交签名、查询产物、退款与安装量管理。所有操作仅限本人账号获授权的企业签名应用。"
        }
    ],
    "x-cloudsign-product": "enterprise"
}
