{
    "openapi": "3.1.0",
    "info": {
        "title": "Cloudsign OpenAPI · OAuth Bearer",
        "version": "1.22.0-preview.1",
        "description": "使用 OAuth 访问令牌调用用户已授权的业务。上传和签名需独立终端写入许可，并已授权目标应用。应用分发列表请显式传 module=distribution。"
    },
    "servers": [
        {
            "url": "https://{host}",
            "variables": {
                "host": {
                    "default": "www.onesignios.com",
                    "description": "调用业务 API 的网站 HTTPS 主域名。"
                }
            }
        }
    ],
    "security": [
        {
            "OAuthBearer": []
        }
    ],
    "components": {
        "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"
                        }
                    }
                }
            }
        },
        "schemas": {
            "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"
                            }
                        }
                    }
                }
            },
            "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 秒"
                    }
                }
            },
            "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}$"
                    }
                }
            },
            "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
                    }
                }
            },
            "DistributionSettings": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "app_id",
                    "revision",
                    "template_id",
                    "language",
                    "introduction",
                    "available_template_ids",
                    "available_languages"
                ],
                "properties": {
                    "app_id": {
                        "type": "string",
                        "pattern": "^A[a-f0-9]{32}$"
                    },
                    "revision": {
                        "type": "string",
                        "pattern": "^R[a-f0-9]{64}$"
                    },
                    "template_id": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 8
                    },
                    "language": {
                        "type": "string",
                        "enum": [
                            "auto",
                            "zh",
                            "en",
                            "zh-tw",
                            "vi",
                            "ru",
                            "th",
                            "ja",
                            "ko",
                            "es",
                            "pt",
                            "fr",
                            "de",
                            "it",
                            "id",
                            "ms",
                            "ar",
                            "hi",
                            "tr"
                        ]
                    },
                    "introduction": {
                        "type": "string",
                        "maxLength": 255
                    },
                    "available_template_ids": {
                        "type": "array",
                        "items": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 8
                        }
                    },
                    "available_languages": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "auto",
                                "zh",
                                "en",
                                "zh-tw",
                                "vi",
                                "ru",
                                "th",
                                "ja",
                                "ko",
                                "es",
                                "pt",
                                "fr",
                                "de",
                                "it",
                                "id",
                                "ms",
                                "ar",
                                "hi",
                                "tr"
                            ]
                        }
                    }
                }
            },
            "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"
                    }
                }
            },
            "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"
                            }
                        }
                    }
                }
            },
            "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": "以任务不可变关联查询的结果快照，不依赖版本列表顺序。"
            }
        },
        "parameters": {
            "Idempotency": {
                "name": "X-Api-Idempotency-Key",
                "in": "header",
                "required": true,
                "schema": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{16,64}$"
                },
                "description": "同一次业务重试保持原值及原始请求体，更换 nonce 重新签名。有效记录保留 90 天。"
            }
        },
        "securitySchemes": {
            "OAuthBearer": {
                "type": "http",
                "scheme": "bearer",
                "description": "填写 OAuth 令牌响应中的 access_token。"
            }
        }
    },
    "paths": {
        "/api/v1/whoami": {
            "get": {
                "operationId": "getIdentity",
                "summary": "查询当前身份与权限",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "身份校验成功（不要求额外业务动作权限）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "owner_id": {
                                                    "type": "integer"
                                                },
                                                "actions": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "resources": {
                                                    "oneOf": [
                                                        {
                                                            "type": "string",
                                                            "const": "*"
                                                        },
                                                        {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "string"
                                                            }
                                                        }
                                                    ]
                                                },
                                                "environment": {
                                                    "type": "string",
                                                    "const": "production"
                                                }
                                            },
                                            "required": [
                                                "owner_id",
                                                "actions",
                                                "resources",
                                                "environment"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "查询当前凭据所属账号、已授权动作与应用范围摘要。\n\n使用有效凭据，查询所属账号、动作和应用范围摘要",
                "tags": [
                    "接入与授权"
                ],
                "x-cloudsign-products": [
                    "access"
                ]
            }
        },
        "/api/v1/apps": {
            "get": {
                "operationId": "listApps",
                "summary": "列出已授权应用",
                "description": "查询当前账号中允许通过 API 访问的应用。\n\nenterprise:ReadApps 或 distribution:ReadApps，按应用所属模块选择",
                "parameters": [
                    {
                        "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；不传为第一页"
                    },
                    {
                        "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"
                ]
            }
        },
        "/api/v1/apps/{id}": {
            "get": {
                "operationId": "getApp",
                "summary": "查询应用详情",
                "description": "查询应用名称、包名、平台和当前版本的基本信息。\n\nenterprise:ReadApps 或 distribution:ReadApps，按应用所属模块选择",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    }
                ],
                "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": "查询应用的历史版本，包括原包和签名包的版本信息。\n\nenterprise:ReadVersions 或 distribution:ReadVersions",
                "parameters": [
                    {
                        "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"
                            ]
                        }
                    }
                ],
                "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": "查询指定版本的包类型、大小和发布状态。\n\nenterprise:ReadVersions 或 distribution:ReadVersions",
                "parameters": [
                    {
                        "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}$"
                        }
                    }
                ],
                "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": "查询应用的企业签名任务。\n\nenterprise:ReadJobs",
                "parameters": [
                    {
                        "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"
                            ]
                        }
                    }
                ],
                "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": [
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    }
                ],
                "description": "为企业签名应用提交一次签名任务。\n\n需要 enterprise:CreateJobs 和目标应用的终端写入授权。提交时使用当前签名证书，正文提供原包版本 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/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": "查询签名任务的状态和进度。\n\nenterprise:ReadJobs",
                "parameters": [
                    {
                        "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}$"
                        }
                    }
                ],
                "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": [
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "$ref": "#/components/parameters/Idempotency"
                    }
                ],
                "description": "创建上传任务，用于向指定应用上传一个安装包。\n\nenterprise:UploadVersions 或 distribution:UploadVersions，账号须已开放写入\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/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": "查询某个应用的上传任务，找回未完成的上传。\n\nenterprise:UploadVersions 或 distribution:UploadVersions，账号须已开放写入\n\n需要终端写入许可，操作范围为用户已授权的现有应用。",
                "parameters": [
                    {
                        "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"
                            ]
                        }
                    }
                ],
                "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": [
                    {
                        "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}$"
                        }
                    }
                ],
                "description": "查询上传任务的传输和校验状态。\n\nenterprise:UploadVersions 或 distribution:UploadVersions，账号须已开放写入\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/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": [
                    {
                        "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}$"
                        }
                    }
                ],
                "description": "为整包上传申请临时上传凭证。\n\nenterprise:UploadVersions 或 distribution:UploadVersions，账号须已开放写入\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/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": [
                    {
                        "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"
                    }
                ],
                "description": "提交上传完成请求，让平台校验安装包并保存版本。\n\nenterprise:UploadVersions 或 distribution:UploadVersions，账号须已开放写入\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/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": [
                    {
                        "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"
                    }
                ],
                "description": "取消不再继续传输的上传任务。\n\nenterprise:UploadVersions 或 distribution:UploadVersions，账号须已开放写入\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/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": [
                    {
                        "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
                        }
                    }
                ],
                "description": "查询分片上传任务中已申报和已确认的分片。\n\nenterprise:UploadVersions 或 distribution:UploadVersions，账号须已开放写入\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/UploadParts"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "tags": [
                    "企业签名",
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            },
            "post": {
                "operationId": "declareUploadPart",
                "summary": "申报分片摘要",
                "parameters": [
                    {
                        "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"
                    }
                ],
                "description": "登记分片序号和摘要，确定该分片将上传的内容。\n\nenterprise:UploadVersions 或 distribution:UploadVersions，账号须已开放写入\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/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": [
                    {
                        "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
                        }
                    }
                ],
                "description": "为已申报的分片申请临时上传凭证。\n\nenterprise:UploadVersions 或 distribution:UploadVersions，账号须已开放写入\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/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": [
                    {
                        "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
                        }
                    }
                ],
                "description": "确认一个分片已经传输完成，让平台检查存储中的分片。\n\nenterprise:UploadVersions 或 distribution:UploadVersions，账号须已开放写入\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/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}/distribution-settings": {
            "get": {
                "operationId": "getDistributionSettings",
                "summary": "读取分发下载页设置",
                "parameters": [
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功；响应禁止缓存。版本冲突须重新读取并由调用方确认，禁止 SDK 自动覆盖。",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                        "request_id",
                                        "data"
                                    ],
                                    "properties": {
                                        "request_id": {
                                            "type": "string",
                                            "pattern": "^[a-f0-9]{32}$"
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/DistributionSettings"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "读取普通分发下载页的模板、语言和介绍。\n\ndistribution:ReadSettings",
                "tags": [
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/statistics": {
            "get": {
                "operationId": "getAppStatistics",
                "summary": "查询应用安装、启动与下载统计",
                "parameters": [
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    }
                ],
                "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": "查询应用安装、启动或下载的汇总统计。\n\nenterprise:ReadStatistics 或 distribution:ReadStatistics，账号须已开放统计查询",
                "tags": [
                    "企业签名",
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/pricing": {
            "get": {
                "operationId": "getAppPricing",
                "summary": "列出套餐和按天价格",
                "parameters": [
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    }
                ],
                "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": "查询应用可购买的套餐和当前价格。\n\nenterprise:ReadPricing 或 distribution:ReadPricing",
                "tags": [
                    "企业签名",
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/quote": {
            "get": {
                "operationId": "getAppQuote",
                "summary": "查询套餐参考价",
                "parameters": [
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    },
                    {
                        "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": "按所选套餐和时长查询参考价格。\n\nenterprise:ReadPricing 或 distribution:ReadPricing",
                "tags": [
                    "企业签名",
                    "应用分发"
                ],
                "x-cloudsign-products": [
                    "enterprise",
                    "distribution"
                ]
            }
        },
        "/api/v1/apps/{app_id}/metadata": {
            "get": {
                "operationId": "getAppMetadata",
                "summary": "读取名称、备注与修订号",
                "parameters": [
                    {
                        "name": "app_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^A[a-f0-9]{32}$"
                        }
                    }
                ],
                "description": "读取应用名称、备注和当前修订号。\n\nenterprise:ReadApps 或 distribution:ReadApps，按应用所属模块选择",
                "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"
                ]
            }
        },
        "/api/v1/apps/{app_id}/versions/{version_id}/statistics": {
            "get": {
                "operationId": "getVersionStatistics",
                "summary": "查询单个签名版本统计",
                "parameters": [
                    {
                        "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}$"
                        }
                    }
                ],
                "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": "查询企业签名应用指定版本的安装量和启动次数。\n\nenterprise:ReadVersionStatistics，账号须已开放统计查询",
                "tags": [
                    "企业签名"
                ],
                "x-cloudsign-products": [
                    "enterprise"
                ]
            }
        },
        "/api/v1/apps/{app_id}/jobs/{job_id}/result": {
            "get": {
                "operationId": "getJobResult",
                "summary": "查询签名任务对应的准确产物",
                "description": "查询一次签名任务使用的原包版本和实际生成的签名包版本。\n\n须同时授予 enterprise:ReadJobs 和 enterprise:ReadVersions；仅当前账号自己的 enterprise 任务",
                "parameters": [
                    {
                        "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}$"
                        }
                    }
                ],
                "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"
                ]
            }
        }
    },
    "tags": [
        {
            "name": "企业签名",
            "description": "从上传 IPA、开通权益、选择证书到提交签名、查询产物、退款与安装量管理。所有操作仅限本人账号获授权的企业签名应用。"
        },
        {
            "name": "应用分发",
            "description": "普通 IPA / APK 应用的创建、更新上传、版本发布、下载页设置、套餐购买与用量查询。应用分发业务 API 需要授权，面向安装用户的下载页面可免登录访问。"
        },
        {
            "name": "接入与授权",
            "description": "确认当前调用身份，管理本人应用范围内的只读临时凭据。AccessKey 签名、OAuth、Webhook 与沙箱说明见接入指南，各自遵守既有授权和准入。"
        }
    ]
}
