@acosmi/sdk-ts 1.4.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +132 -0
- package/README.md +91 -2
- package/dist/browser/index.mjs +521 -2
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.mjs +521 -2
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +527 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +1079 -31
- package/dist/node/index.d.ts +1079 -31
- package/dist/node/index.mjs +521 -2
- package/dist/node/index.mjs.map +1 -1
- package/docs/compliance.md +452 -2
- package/package.json +1 -1
package/dist/node/index.d.cts
CHANGED
|
@@ -1048,6 +1048,314 @@ interface YudaoPageResult<T> {
|
|
|
1048
1048
|
total: number;
|
|
1049
1049
|
}
|
|
1050
1050
|
|
|
1051
|
+
/** 排序方向。wire 上为小写字符串。 */
|
|
1052
|
+
type SortDirection = 'asc' | 'desc';
|
|
1053
|
+
/**
|
|
1054
|
+
* 跨域统一分页【请求】参数。
|
|
1055
|
+
*
|
|
1056
|
+
* 既有域(billing / compliance / skills / notifications)各自内联了
|
|
1057
|
+
* `page` / `pageNo` + `pageSize`,互不一致;本类型是为后续新命名空间
|
|
1058
|
+
* (平台控制面 / `compliance.list*`)提供的统一形态。
|
|
1059
|
+
*
|
|
1060
|
+
* 字段全部可选 —— 调用方省略时由服务端取默认页;排序字段白名单由各命名
|
|
1061
|
+
* 空间各自的 API 文档约定,SDK 不在客户端做字段校验。
|
|
1062
|
+
*/
|
|
1063
|
+
interface PageRequest {
|
|
1064
|
+
/** 1-based 页码。 */
|
|
1065
|
+
pageNo?: number;
|
|
1066
|
+
/** 每页条数。 */
|
|
1067
|
+
pageSize?: number;
|
|
1068
|
+
/** 排序字段名(领域字段,由各命名空间文档约定白名单)。 */
|
|
1069
|
+
sortBy?: string;
|
|
1070
|
+
/** 排序方向;省略时由服务端决定默认值。 */
|
|
1071
|
+
sortDirection?: SortDirection;
|
|
1072
|
+
}
|
|
1073
|
+
/**
|
|
1074
|
+
* 跨域统一分页【结果】。
|
|
1075
|
+
*
|
|
1076
|
+
* **刻意做成 `YudaoPageResult<T>` 的别名** —— 全 SDK 单一分页结果结构
|
|
1077
|
+
* `{ list, total }`。新命名空间统一用 `PageResult<T>` 这个对外名,
|
|
1078
|
+
* 底层与 tk-dist 代理透传的 yudao 分页结构完全等价、零转换、零双标准。
|
|
1079
|
+
*/
|
|
1080
|
+
type PageResult<T> = YudaoPageResult<T>;
|
|
1081
|
+
|
|
1082
|
+
type ComplianceProviderRequestStatus = 'PENDING' | 'SUCCESS' | 'FAILED' | 'UNKNOWN' | 'RETRYING';
|
|
1083
|
+
interface ProviderRequestStatusView {
|
|
1084
|
+
id: number;
|
|
1085
|
+
status: ComplianceProviderRequestStatus | string;
|
|
1086
|
+
/** SUCCESS / FAILED 终态。 */
|
|
1087
|
+
terminal: boolean;
|
|
1088
|
+
/** 当前状态是否允许 SDK 安全重试请求(仅对 RETRYING 为 true)。 */
|
|
1089
|
+
retryable: boolean;
|
|
1090
|
+
businessNo?: string | null;
|
|
1091
|
+
contractNo?: string | null;
|
|
1092
|
+
sealId?: string | null;
|
|
1093
|
+
attemptCount?: number | null;
|
|
1094
|
+
reconciliationStatus?: string | null;
|
|
1095
|
+
nextRetryAt?: string | null;
|
|
1096
|
+
requestedAt?: string | null;
|
|
1097
|
+
respondedAt?: string | null;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
/** 统一操作关联键。贯通控制台 / API / MCP / CrabCode / scheduler 各来源。 */
|
|
1101
|
+
type OperationId = string;
|
|
1102
|
+
/**
|
|
1103
|
+
* 操作来源。开放联合 —— 平台侧 5 种固定值,合规域可追加自定义来源字符串。
|
|
1104
|
+
* `(string & {})` 在保留 IDE 字面量补全的同时不拒绝未知来源(后端保留新增空间)。
|
|
1105
|
+
*/
|
|
1106
|
+
type OperationSource = 'console' | 'api' | 'scheduler' | 'crabcode' | 'mcp' | (string & NonNullable<unknown>);
|
|
1107
|
+
/**
|
|
1108
|
+
* 操作状态机。开放联合,后端保留新增空间。
|
|
1109
|
+
*
|
|
1110
|
+
* 与 `compliance/status.ts` 的 `ComplianceEnvelopeStatus` 等领域状态【正交】:
|
|
1111
|
+
* 领域状态描述某个履约对象的业务态,`OperationStatus` 描述【一次操作】本身
|
|
1112
|
+
* 的执行进度。
|
|
1113
|
+
*/
|
|
1114
|
+
type OperationStatus = 'pending' | 'running' | 'retrying' | 'awaiting_callback' | 'awaiting_verify' | 'succeeded' | 'failed' | 'canceled' | 'unknown' | (string & NonNullable<unknown>);
|
|
1115
|
+
/**
|
|
1116
|
+
* 本地 verify 状态(§6.4)。
|
|
1117
|
+
*
|
|
1118
|
+
* provider success 仅表示 provider request 终态;时间章 / 签署 / 验签 /
|
|
1119
|
+
* 证据包 / 报告发布须经后端本地 verify / evidence chain verify。`VerifyStatus`
|
|
1120
|
+
* 与 provider 状态是【两个独立维度】,operation projection 必须分别展示
|
|
1121
|
+
* (local verify failed → 业务 failed,不 billing settle)。
|
|
1122
|
+
*/
|
|
1123
|
+
type VerifyStatus = 'pending' | 'verified' | 'failed' | 'skipped' | 'unknown' | (string & NonNullable<unknown>);
|
|
1124
|
+
/**
|
|
1125
|
+
* 幂等键。作用域 = tenant + principal/client + action + product;同 key 同
|
|
1126
|
+
* canonical request 返回原结果,同 key 异 request 拒绝(§6.3 / §2 边界 9)。
|
|
1127
|
+
* SDK 写接口经 `IdempotencyKeyHeader` 透传,调用方必须【持久化】key。
|
|
1128
|
+
*/
|
|
1129
|
+
type IdempotencyKey = string;
|
|
1130
|
+
/** 幂等键 HTTP header 名 —— 全 SDK 写接口的单一真相源。 */
|
|
1131
|
+
declare const IdempotencyKeyHeader: "Idempotency-Key";
|
|
1132
|
+
/**
|
|
1133
|
+
* Provider request 状态。
|
|
1134
|
+
*
|
|
1135
|
+
* 复核约束(§9.4 勘误):**不另造同名近似类型** —— 直接复用
|
|
1136
|
+
* `compliance/provider/types.ts` 既有 `ComplianceProviderRequestStatus`
|
|
1137
|
+
* (`PENDING` / `SUCCESS` / `FAILED` / `UNKNOWN` / `RETRYING`)。
|
|
1138
|
+
*/
|
|
1139
|
+
type ProviderRequestStatus = ComplianceProviderRequestStatus;
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* SDK 内部 symbolic key;用于代码分支判断与文档。**不是 wire contract**。
|
|
1143
|
+
*/
|
|
1144
|
+
type ComplianceErrorKey = 'COMPLIANCE_UNAUTHORIZED' | 'COMPLIANCE_INSUFFICIENT_SCOPE' | 'COMPLIANCE_STEP_UP_REQUIRED' | 'COMPLIANCE_TOKEN_INVALID' | 'SUBJECT_SNAPSHOT_REQUIRED' | 'SUBJECT_SNAPSHOT_NOT_FOUND' | 'SUBJECT_SNAPSHOT_TENANT_MISMATCH' | 'EVIDENCE_ASSET_NOT_FOUND' | 'EVIDENCE_ASSET_HASH_MISMATCH' | 'EVIDENCE_ASSET_PAYLOAD_REQUIRED' | 'TIMESTAMP_TOKEN_NOT_FOUND' | 'TIMESTAMP_PROVIDER_FAILED' | 'TIMESTAMP_PROVIDER_UNKNOWN' | 'TIMESTAMP_LOCAL_VERIFY_FAILED' | 'TIMESTAMP_PROVIDER_NOT_AVAILABLE' | 'EVIDENCE_PACKAGE_NOT_FOUND' | 'EVIDENCE_PACKAGE_TIMESTAMP_REQUIRED' | 'EVIDENCE_PACKAGE_MANIFEST_HASH_MISMATCH' | 'REPORT_NOT_FOUND' | 'REPORT_ALREADY_PUBLISHED' | 'REPORT_DRAFT_REQUIRED' | 'EVIDENCE_VERIFY_TARGET_REQUIRED' | 'EVIDENCE_VERIFY_TARGET_NOT_FOUND' | 'PROVIDER_REQUEST_UNKNOWN_NO_RETRY' | 'PROVIDER_CALLBACK_SOURCE_INVALID' | 'PROVIDER_NOT_CONFIGURED' | 'PROVIDER_REQUEST_NOT_FOUND' | 'PROVIDER_REQUEST_IDEMPOTENCY_REQUIRED' | 'PROVIDER_REQUEST_STATUS_NOT_TERMINAL' | 'ENVELOPE_NOT_FOUND' | 'ENVELOPE_TENANT_MISMATCH' | 'ENVELOPE_STATE_NOT_ALLOWED' | 'ENVELOPE_GATE_CLOSED' | 'CONTRACT_NOT_FOUND' | 'CONTRACT_HASH_MISMATCH' | 'PROVIDER_AUTHORIZATION_NOT_CONFIRMED' | 'ENVELOPE_EVIDENCE_NOT_READY' | 'SEAL_ASSET_NOT_FOUND' | 'SEAL_APPROVAL_NOT_FOUND' | 'SEAL_APPROVAL_STATE_NOT_APPROVED' | 'SEAL_APPROVAL_EXPIRED' | 'SEAL_APPROVAL_ALREADY_USED' | 'SEAL_APPROVAL_NONCE_USED' | 'SEAL_APPROVAL_SEAL_MISMATCH' | 'SEAL_APPROVAL_LOCATION_MISMATCH' | 'SEAL_APPROVAL_TRANSACTOR_MISMATCH' | 'SEAL_APPROVAL_CONTRACT_HASH_MISMATCH' | 'SEAL_APPROVAL_INVALID_TRANSITION' | 'SEAL_USE_ALREADY_CONSUMED' | 'AUDIT_CHAIN_TAMPER_DETECTED' | 'BILLING_COMMIT_REQUIRES_LOCAL_VERIFY' | 'BILLING_COMMIT_REQUIRES_PROVIDER_SUCCESS' | 'BILLING_CALLBACK_CANNOT_COMMIT' | 'BILLING_PROVIDER_UNKNOWN_NOT_COMMITTABLE' | 'BILLING_S2S_FORBIDDEN' | 'UNKNOWN_COMPLIANCE_ERROR';
|
|
1145
|
+
/** 单个错误的 SDK 视图。 */
|
|
1146
|
+
interface ComplianceErrorInfo {
|
|
1147
|
+
/** Java numeric error code (wire contract)。 */
|
|
1148
|
+
code: number;
|
|
1149
|
+
/** 服务端原始 message(中文,可变);仅用于日志/展示。 */
|
|
1150
|
+
message: string;
|
|
1151
|
+
/** SDK 分支判断用 symbolic key。 */
|
|
1152
|
+
key: ComplianceErrorKey;
|
|
1153
|
+
/** 是否安全自动重试 — compliance 写接口几乎全为 false。 */
|
|
1154
|
+
retryable: boolean;
|
|
1155
|
+
/** 是否已经是终态 — 用户必须用新 idempotency-key 重新发起。 */
|
|
1156
|
+
terminal: boolean;
|
|
1157
|
+
/** 高风险动作需要 step-up / introspection。 */
|
|
1158
|
+
stepUpRequired: boolean;
|
|
1159
|
+
}
|
|
1160
|
+
/**
|
|
1161
|
+
* 把一个 BusinessError 分类为 compliance 视图。
|
|
1162
|
+
* 非 compliance 段位的错误码会回退到 UNKNOWN_COMPLIANCE_ERROR,调用方应该当作业务错误处理。
|
|
1163
|
+
*/
|
|
1164
|
+
declare function classifyComplianceError(err: BusinessError): ComplianceErrorInfo;
|
|
1165
|
+
/**
|
|
1166
|
+
* 判断 BusinessError 是否属于 compliance 段位(1-031-xxx-xxx)。
|
|
1167
|
+
* 不在段位的错误码可能来自其它 yudao 模块,按通用业务错误处理即可。
|
|
1168
|
+
*/
|
|
1169
|
+
declare function isComplianceBusinessError(err: BusinessError): boolean;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* 失败补救原因。开放枚举的【封闭】部分 —— 这 11 个值覆盖 §6.6 要求的全集。
|
|
1173
|
+
*
|
|
1174
|
+
* 其中 `gate_closed` / `step_up_required` / `tenant_mismatch` /
|
|
1175
|
+
* `insufficient_scope` 与既有错误码登记表同名概念一一对应(见下方映射表),
|
|
1176
|
+
* 不是新造的码。
|
|
1177
|
+
*/
|
|
1178
|
+
type RetryAdviceReason = 'unknown' | 'retrying' | 'failed' | 'gate_closed' | 'step_up_required' | 'tenant_mismatch' | 'insufficient_scope' | 'quota_exceeded' | 'provider_timeout' | 'local_verify_failed' | 'billing_preflight_failed';
|
|
1179
|
+
/** `RetryAdviceReason` 全集(11 项)—— 供迭代 / 校验使用。 */
|
|
1180
|
+
declare const RETRY_ADVICE_REASONS: readonly RetryAdviceReason[];
|
|
1181
|
+
/**
|
|
1182
|
+
* 失败补救建议统一模型(§6.6)。
|
|
1183
|
+
*
|
|
1184
|
+
* 高风险 / 收费动作失败后,后端 operation projection 产出本结构告诉调用方
|
|
1185
|
+
* 「能不能重试、要不要换幂等键、要不要人工介入」。
|
|
1186
|
+
*/
|
|
1187
|
+
interface RetryAdvice {
|
|
1188
|
+
/** 是否值得【自动】重试。compliance 写接口几乎恒为 false(双扣红线)。 */
|
|
1189
|
+
retryable: boolean;
|
|
1190
|
+
/** 建议的重试等待时长(秒);与 `HTTPError.retryAfter` 单位一致。 */
|
|
1191
|
+
retryAfter?: number;
|
|
1192
|
+
/**
|
|
1193
|
+
* 重试时是否必须沿用【同一】幂等键。
|
|
1194
|
+
* 同 key 同 canonical request → 服务端返回原结果(对账语义);
|
|
1195
|
+
* 终态错误须改用【新】幂等键重新发起(§6.3)。
|
|
1196
|
+
*/
|
|
1197
|
+
sameIdempotencyKeyRequired: boolean;
|
|
1198
|
+
/** 是否需要人工介入(重新登录 / step-up / 联系支持),不能纯自动恢复。 */
|
|
1199
|
+
manualActionRequired: boolean;
|
|
1200
|
+
/** 归一化失败原因。 */
|
|
1201
|
+
reason: RetryAdviceReason;
|
|
1202
|
+
/** 面向终端用户的提示文案(调用方可用自有 copy 表覆盖)。 */
|
|
1203
|
+
userMessage?: string;
|
|
1204
|
+
/** 面向开发者的诊断信息(如服务端原始 message)。 */
|
|
1205
|
+
developerMessage?: string;
|
|
1206
|
+
/** 支持工单关联码(如 `compliance:1031004004`)。 */
|
|
1207
|
+
supportCode?: string;
|
|
1208
|
+
}
|
|
1209
|
+
/** SDK compliance 符号 key → `RetryAdviceReason`。未知 key 兜底 `unknown`。 */
|
|
1210
|
+
declare function retryReasonForComplianceKey(key: ComplianceErrorKey): RetryAdviceReason;
|
|
1211
|
+
/** Go OAuth 标准错误字符串 → `RetryAdviceReason`。未登记的兜底 `unknown`。 */
|
|
1212
|
+
declare function retryReasonForOAuthError(oauthError: string): RetryAdviceReason;
|
|
1213
|
+
/**
|
|
1214
|
+
* 把 `ComplianceErrorInfo`(compliance/errors.ts `classifyComplianceError` 的产出)
|
|
1215
|
+
* 投影为统一 `RetryAdvice`。
|
|
1216
|
+
*
|
|
1217
|
+
* 语义:
|
|
1218
|
+
* - `retryable` 直接透传 `info.retryable`(compliance 写接口恒 false)。
|
|
1219
|
+
* - 终态错误(`info.terminal`)→ 须改用【新】幂等键 →
|
|
1220
|
+
* `sameIdempotencyKeyRequired=false`、`manualActionRequired=true`。
|
|
1221
|
+
* - step-up 错误 → 重新做 OAuth introspection 后用【同一】幂等键重试 →
|
|
1222
|
+
* `sameIdempotencyKeyRequired=true`、`manualActionRequired=true`。
|
|
1223
|
+
* - 其余(非终态、非 step-up)→ 沿用同一幂等键对账重发。
|
|
1224
|
+
*
|
|
1225
|
+
* 不读、不写 `ComplianceErrorInfo` 以外的状态;入参不被 mutate。
|
|
1226
|
+
*/
|
|
1227
|
+
declare function complianceErrorToRetryAdvice(info: ComplianceErrorInfo): RetryAdvice;
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* 租户轻量引用。
|
|
1231
|
+
*
|
|
1232
|
+
* 完整租户详情(状态 / 类型 / 产品开通 / 主体类型 / 地区 / 组织配置)见
|
|
1233
|
+
* 后续 `tenant` 命名空间。
|
|
1234
|
+
*/
|
|
1235
|
+
interface TenantRef {
|
|
1236
|
+
tenantId: string;
|
|
1237
|
+
/** 展示名;后端可省略。 */
|
|
1238
|
+
name?: string;
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* Principal(操作主体)轻量引用。
|
|
1242
|
+
*
|
|
1243
|
+
* 完整 principal 视图(脱敏联系方式 / 角色 / scope / 认证方式 / token jti /
|
|
1244
|
+
* 登录来源)见后续 `iam` 命名空间。前端【不自解 JWT】推断身份(§1.1 复核
|
|
1245
|
+
* 边界)—— 一律由 SDK 暴露稳定 principal。
|
|
1246
|
+
*/
|
|
1247
|
+
interface PrincipalRef {
|
|
1248
|
+
principalId: string;
|
|
1249
|
+
/** 关联用户 id;与 `principalId` 可能不同(同一用户多 principal)。 */
|
|
1250
|
+
userId?: string;
|
|
1251
|
+
/** 所属租户 id。 */
|
|
1252
|
+
tenantId?: string;
|
|
1253
|
+
/** 展示名;后端可省略。 */
|
|
1254
|
+
displayName?: string;
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* API client 轻量引用。
|
|
1258
|
+
*
|
|
1259
|
+
* 完整 API client 治理(CRUD / secret 轮换 / 回调域名 / IP 白名单 / 调用
|
|
1260
|
+
* 日志)见对外鉴权层独立计划范围 —— 本期不实现(用户决策 2026-05-22)。
|
|
1261
|
+
*/
|
|
1262
|
+
interface ApiClientRef {
|
|
1263
|
+
clientId: string;
|
|
1264
|
+
/** 展示名;后端可省略。 */
|
|
1265
|
+
name?: string;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* 高风险 / 收费动作的 gate 状态机(§U-6)。开放联合,后端保留新增空间。
|
|
1270
|
+
*
|
|
1271
|
+
* `gates.ts`(csign workbench)拿不到能力时 fail-closed 返回 `unknown` —
|
|
1272
|
+
* 与本枚举的 `unknown` 一致。
|
|
1273
|
+
*/
|
|
1274
|
+
type FeatureGateState = 'executable' | 'scope_missing' | 'not_provisioned' | 'quota_exceeded' | 'step_up_required' | 'gate_closed' | 'unknown' | (string & NonNullable<unknown>);
|
|
1275
|
+
/** 配额快照。`FeatureGateStatus.quota` 与 `BillingPreflightResult` 复用。 */
|
|
1276
|
+
interface GateQuota {
|
|
1277
|
+
/** 配额上限。 */
|
|
1278
|
+
limit?: number;
|
|
1279
|
+
/** 已用量。 */
|
|
1280
|
+
used?: number;
|
|
1281
|
+
/** 剩余量。 */
|
|
1282
|
+
remaining?: number;
|
|
1283
|
+
/** 配额单位(如 `etu` / `count`);后端可省略。 */
|
|
1284
|
+
unit?: string;
|
|
1285
|
+
}
|
|
1286
|
+
/**
|
|
1287
|
+
* step-up(高风险动作二次验证)状态(§6.1)。
|
|
1288
|
+
*
|
|
1289
|
+
* 字段形态先行沉淀;step-up 发起 / 校验的【后端运行期能力】随对外鉴权层
|
|
1290
|
+
* 计划本期不实施。
|
|
1291
|
+
*/
|
|
1292
|
+
interface StepUpStatus {
|
|
1293
|
+
/** 当前动作是否要求 step-up。 */
|
|
1294
|
+
required: boolean;
|
|
1295
|
+
/** 是否已满足(已完成且未过期)。 */
|
|
1296
|
+
satisfied: boolean;
|
|
1297
|
+
/** step-up 方式(如 `webauthn` / `oauth_introspection`);后端可省略。 */
|
|
1298
|
+
method?: string;
|
|
1299
|
+
/** 满足态过期时间(ISO 8601);未满足时省略。 */
|
|
1300
|
+
expiresAt?: string;
|
|
1301
|
+
/** 未满足 / 失败原因;满足时省略。 */
|
|
1302
|
+
reason?: string;
|
|
1303
|
+
}
|
|
1304
|
+
/**
|
|
1305
|
+
* gate / capability 查询结果(§U-6)。
|
|
1306
|
+
*
|
|
1307
|
+
* 高风险动作(signEnvelope / createH5SigningUrl / publishReport /
|
|
1308
|
+
* approveSealApproval / executeSealUse / claimLeadWithConflictOverride)执行前
|
|
1309
|
+
* 查询本结构,区分「可执行 / scope 缺失 / 未开通 / quota 不足 / 需 step-up /
|
|
1310
|
+
* gate closed」。拿不到时必须 fail-closed(`executable=false`,§2 边界 7)。
|
|
1311
|
+
*/
|
|
1312
|
+
interface FeatureGateStatus {
|
|
1313
|
+
/** 最终是否可执行。fail-closed:拿不到能力时为 false。 */
|
|
1314
|
+
executable: boolean;
|
|
1315
|
+
/** 不可执行的具体状态。 */
|
|
1316
|
+
state: FeatureGateState;
|
|
1317
|
+
/** 缺失 / 所需 OAuth scope。 */
|
|
1318
|
+
requiredScopes?: string[];
|
|
1319
|
+
/** 是否需要 step-up。 */
|
|
1320
|
+
requiredStepUp?: boolean;
|
|
1321
|
+
/** 缺失的 entitlement / feature 标识。 */
|
|
1322
|
+
missingEntitlements?: string[];
|
|
1323
|
+
/** 配额快照。 */
|
|
1324
|
+
quota?: GateQuota;
|
|
1325
|
+
/** 人类可读原因(诊断 / 展示)。 */
|
|
1326
|
+
reason?: string;
|
|
1327
|
+
/** 失败补救建议(叠加层,见 retry-advice.ts)。 */
|
|
1328
|
+
retryAdvice?: RetryAdvice;
|
|
1329
|
+
/** 关联 operation / preflight id。 */
|
|
1330
|
+
operationId?: OperationId;
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* 收费 / 高风险动作的 billing preflight 结果(§4.4 / §4.5)。
|
|
1334
|
+
*
|
|
1335
|
+
* 在动作执行【前】返回可执行性、预估扣费、所需 step-up / scopes。金额字段为
|
|
1336
|
+
* `string`(json.Number 端口,避免 JS number 精度损失 —— 金融安全红线)。
|
|
1337
|
+
*/
|
|
1338
|
+
interface BillingPreflightResult {
|
|
1339
|
+
/** 是否可执行(含 quota / entitlement / gate 综合判定)。 */
|
|
1340
|
+
executable: boolean;
|
|
1341
|
+
/** 预估扣费金额;`string` 表示,避免浮点精度丢失。 */
|
|
1342
|
+
estimatedCharge?: string;
|
|
1343
|
+
/** 计费单位 / 币种(如 `etu` / `CNY`)。 */
|
|
1344
|
+
currency?: string;
|
|
1345
|
+
/** 所需 OAuth scope。 */
|
|
1346
|
+
requiredScopes?: string[];
|
|
1347
|
+
/** 是否需要 step-up。 */
|
|
1348
|
+
requiredStepUp?: boolean;
|
|
1349
|
+
/** 配额快照。 */
|
|
1350
|
+
quota?: GateQuota;
|
|
1351
|
+
/** 失败补救建议。 */
|
|
1352
|
+
retryAdvice?: RetryAdvice;
|
|
1353
|
+
/** preflight 关联 id —— 后续真实扣费动作回填以串联 hold/settle/release。 */
|
|
1354
|
+
preflightId?: string;
|
|
1355
|
+
/** 不可执行原因(诊断 / 展示)。 */
|
|
1356
|
+
reason?: string;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1051
1359
|
declare const ScopeAI = "ai";
|
|
1052
1360
|
declare const ScopeSkills = "skills";
|
|
1053
1361
|
declare const ScopeAccount = "account";
|
|
@@ -1782,8 +2090,10 @@ declare const ScopeComplianceSealUseExecute = "compliance:seal_use:execute";
|
|
|
1782
2090
|
declare const ScopeComplianceReportsRead = "compliance:reports:read";
|
|
1783
2091
|
declare const ScopeComplianceReportsWrite = "compliance:reports:write";
|
|
1784
2092
|
declare const ScopeComplianceReportsPublish = "compliance:reports:publish";
|
|
2093
|
+
declare const ScopeComplianceContractTemplateRead = "compliance:contract_template:read";
|
|
2094
|
+
declare const ScopeComplianceContractTemplateWrite = "compliance:contract_template:write";
|
|
1785
2095
|
/** 类型联合:合规域细粒度 scope。Java compliance verifier 只按细粒度匹配, 不做分组展开。 */
|
|
1786
|
-
type ComplianceScope = typeof ScopeComplianceEvidenceRead | typeof ScopeComplianceEvidenceWrite | typeof ScopeComplianceTimestampIssue | typeof ScopeComplianceTimestampVerify | typeof ScopeComplianceContractSigningRead | typeof ScopeComplianceContractSigningWrite | typeof ScopeComplianceSealManage | typeof ScopeComplianceSealApprovalRequest | typeof ScopeComplianceSealApprovalApprove | typeof ScopeComplianceSealUseExecute | typeof ScopeComplianceReportsRead | typeof ScopeComplianceReportsWrite | typeof ScopeComplianceReportsPublish;
|
|
2096
|
+
type ComplianceScope = typeof ScopeComplianceEvidenceRead | typeof ScopeComplianceEvidenceWrite | typeof ScopeComplianceTimestampIssue | typeof ScopeComplianceTimestampVerify | typeof ScopeComplianceContractSigningRead | typeof ScopeComplianceContractSigningWrite | typeof ScopeComplianceSealManage | typeof ScopeComplianceSealApprovalRequest | typeof ScopeComplianceSealApprovalApprove | typeof ScopeComplianceSealUseExecute | typeof ScopeComplianceReportsRead | typeof ScopeComplianceReportsWrite | typeof ScopeComplianceReportsPublish | typeof ScopeComplianceContractTemplateRead | typeof ScopeComplianceContractTemplateWrite;
|
|
1787
2097
|
/** 全部合规域 scope。OAuth 申请合规权限时使用; 谨慎一次性申请全部, 推荐按业务最小集合申请。 */
|
|
1788
2098
|
declare function complianceScopes(): ComplianceScope[];
|
|
1789
2099
|
|
|
@@ -1928,6 +2238,77 @@ interface EvidencePackage {
|
|
|
1928
2238
|
packageHash: string;
|
|
1929
2239
|
status: string;
|
|
1930
2240
|
}
|
|
2241
|
+
/**
|
|
2242
|
+
* 证据资产分页【列表项】视图。对应后端 G1 `EvidenceAssetPageItem`。
|
|
2243
|
+
*
|
|
2244
|
+
* 与 {@link EvidenceAsset} 一致的 SDK-safe 子集 + `createTime`;时间字段为
|
|
2245
|
+
* ISO-8601 字符串。
|
|
2246
|
+
*/
|
|
2247
|
+
interface EvidenceAssetPageItem {
|
|
2248
|
+
id: number;
|
|
2249
|
+
evidenceNo: string;
|
|
2250
|
+
publicVerifyCode?: string | null;
|
|
2251
|
+
assetType: ComplianceAssetType | string;
|
|
2252
|
+
name: string;
|
|
2253
|
+
mimeType?: string | null;
|
|
2254
|
+
size?: number | null;
|
|
2255
|
+
hashAlgorithm: ComplianceHashAlgorithm | string;
|
|
2256
|
+
contentHash: string;
|
|
2257
|
+
canonicalizationProfile?: string | null;
|
|
2258
|
+
digestSource: ComplianceDigestSource | string;
|
|
2259
|
+
privacyLevel: CompliancePrivacyLevel | string;
|
|
2260
|
+
status: string;
|
|
2261
|
+
/** 创建时间 ISO-8601。 */
|
|
2262
|
+
createTime: string;
|
|
2263
|
+
}
|
|
2264
|
+
/**
|
|
2265
|
+
* `listEvidenceAssets` 请求参数。
|
|
2266
|
+
*
|
|
2267
|
+
* 继承 {@link PageRequest} 的 `pageNo` / `pageSize` / `sortBy` / `sortDirection`,
|
|
2268
|
+
* 全部可选;省略时由服务端取默认页。
|
|
2269
|
+
*
|
|
2270
|
+
* `createTimeStart` / `createTimeEnd` 为调用方提供的【原样字符串】,后端按
|
|
2271
|
+
* `yyyy-MM-dd HH:mm:ss` 解析(例如 `'2026-05-01 00:00:00'`);SDK 不做格式校验、
|
|
2272
|
+
* 不做时区转换,原样透传查询参数。
|
|
2273
|
+
*/
|
|
2274
|
+
interface ListEvidenceAssetsRequest extends PageRequest {
|
|
2275
|
+
/** 资产类型过滤(`AssetTypeEnum.name()`)。 */
|
|
2276
|
+
assetType?: ComplianceAssetType | string;
|
|
2277
|
+
/** 资产状态过滤。 */
|
|
2278
|
+
status?: string;
|
|
2279
|
+
/** 创建时间下界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2280
|
+
createTimeStart?: string;
|
|
2281
|
+
/** 创建时间上界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2282
|
+
createTimeEnd?: string;
|
|
2283
|
+
}
|
|
2284
|
+
/**
|
|
2285
|
+
* 证据包分页【列表项】视图。对应后端 G1 `EvidencePackagePageItem`。
|
|
2286
|
+
*/
|
|
2287
|
+
interface EvidencePackagePageItem {
|
|
2288
|
+
id: number;
|
|
2289
|
+
assetId: number;
|
|
2290
|
+
timestampTokenId?: number | null;
|
|
2291
|
+
chainId: string;
|
|
2292
|
+
packageVersion: string;
|
|
2293
|
+
hashAlgorithm: string;
|
|
2294
|
+
manifestHash: string;
|
|
2295
|
+
packageHash: string;
|
|
2296
|
+
status: string;
|
|
2297
|
+
/** 创建时间 ISO-8601。 */
|
|
2298
|
+
createTime: string;
|
|
2299
|
+
}
|
|
2300
|
+
/**
|
|
2301
|
+
* `listEvidencePackages` 请求参数。`createTimeStart` / `createTimeEnd` 语义见
|
|
2302
|
+
* {@link ListEvidenceAssetsRequest}。
|
|
2303
|
+
*/
|
|
2304
|
+
interface ListEvidencePackagesRequest extends PageRequest {
|
|
2305
|
+
/** 证据包状态过滤。 */
|
|
2306
|
+
status?: string;
|
|
2307
|
+
/** 创建时间下界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2308
|
+
createTimeStart?: string;
|
|
2309
|
+
/** 创建时间上界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2310
|
+
createTimeEnd?: string;
|
|
2311
|
+
}
|
|
1931
2312
|
|
|
1932
2313
|
type ComplianceTimestampVerificationStatus = 'PENDING' | 'VERIFIED' | 'FAILED' | 'LOCAL_VERIFY_FAILED' | 'UNKNOWN' | 'RETRYING';
|
|
1933
2314
|
/** 时间章 token 对外视图(不含 provider/object/tsa 内部字段)。 */
|
|
@@ -1960,6 +2341,70 @@ interface TimestampVerifyResult {
|
|
|
1960
2341
|
passed: boolean;
|
|
1961
2342
|
reason: string;
|
|
1962
2343
|
}
|
|
2344
|
+
/**
|
|
2345
|
+
* 时间章分页【列表项】视图。对应后端 G1 `TimestampPageItem`。
|
|
2346
|
+
*
|
|
2347
|
+
* 与 {@link TimestampToken} 一致的 SDK-safe 子集 + `createTime`;时间字段为
|
|
2348
|
+
* ISO-8601 字符串。
|
|
2349
|
+
*/
|
|
2350
|
+
interface TimestampPageItem {
|
|
2351
|
+
id: number;
|
|
2352
|
+
assetId: number;
|
|
2353
|
+
policyOid?: string | null;
|
|
2354
|
+
serialNumber?: string | null;
|
|
2355
|
+
genTime?: string | null;
|
|
2356
|
+
accuracy?: string | null;
|
|
2357
|
+
verificationStatus: ComplianceTimestampVerificationStatus | string;
|
|
2358
|
+
verifiedAt?: string | null;
|
|
2359
|
+
verificationError?: string | null;
|
|
2360
|
+
/** 创建时间 ISO-8601。 */
|
|
2361
|
+
createTime: string;
|
|
2362
|
+
}
|
|
2363
|
+
/**
|
|
2364
|
+
* `listTimestamps` 请求参数。
|
|
2365
|
+
*
|
|
2366
|
+
* 继承 {@link PageRequest} 分页 / 排序字段;全部可选。`createTimeStart` /
|
|
2367
|
+
* `createTimeEnd` 为调用方提供的【原样字符串】,后端按 `yyyy-MM-dd HH:mm:ss`
|
|
2368
|
+
* 解析;SDK 不做格式校验或时区转换。
|
|
2369
|
+
*/
|
|
2370
|
+
interface ListTimestampsRequest extends PageRequest {
|
|
2371
|
+
/** 时间章 provider 过滤(`TsaProviderEnum.name()` 之类)。 */
|
|
2372
|
+
provider?: string;
|
|
2373
|
+
/** 校验状态过滤。 */
|
|
2374
|
+
verificationStatus?: ComplianceTimestampVerificationStatus | string;
|
|
2375
|
+
/** 创建时间下界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2376
|
+
createTimeStart?: string;
|
|
2377
|
+
/** 创建时间上界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2378
|
+
createTimeEnd?: string;
|
|
2379
|
+
}
|
|
2380
|
+
/**
|
|
2381
|
+
* 时间章授权机构(TSA)provider 视图。对应后端 G3 `TsaProviderVO`。
|
|
2382
|
+
*
|
|
2383
|
+
* 描述某个 TSA provider 的对外可见状态——名称、所处环境、当前是否可用。
|
|
2384
|
+
* 只读视图:不含 provider 端点、凭证、证书或其它内部接入材料。
|
|
2385
|
+
*/
|
|
2386
|
+
interface TsaProvider {
|
|
2387
|
+
/** provider 名称(如 `TsaProviderEnum.name()`)。 */
|
|
2388
|
+
name: string;
|
|
2389
|
+
/** provider 所处环境(如 `production` / `sandbox`)。 */
|
|
2390
|
+
environment: string;
|
|
2391
|
+
/** 该 provider 当前是否可用。 */
|
|
2392
|
+
available: boolean;
|
|
2393
|
+
}
|
|
2394
|
+
/**
|
|
2395
|
+
* 时间章统计视图。对应后端 G3 `TsaStatsVO`。
|
|
2396
|
+
*
|
|
2397
|
+
* 只读聚合:时间章总数 + 按校验状态分桶的计数。
|
|
2398
|
+
*/
|
|
2399
|
+
interface TsaStats {
|
|
2400
|
+
/** 时间章总数。 */
|
|
2401
|
+
total: number;
|
|
2402
|
+
/**
|
|
2403
|
+
* 按校验状态分桶的计数。键为校验状态枚举名(如 `VERIFIED` / `PENDING` /
|
|
2404
|
+
* `FAILED`),值为该状态下的时间章数量。
|
|
2405
|
+
*/
|
|
2406
|
+
byVerificationStatus: Record<string, number>;
|
|
2407
|
+
}
|
|
1963
2408
|
|
|
1964
2409
|
interface ComplianceReport {
|
|
1965
2410
|
id: number;
|
|
@@ -1994,6 +2439,40 @@ interface ReportDownload {
|
|
|
1994
2439
|
timestampGenTime?: string | null;
|
|
1995
2440
|
timestampVerificationStatus?: string | null;
|
|
1996
2441
|
}
|
|
2442
|
+
/**
|
|
2443
|
+
* 证据报告分页【列表项】视图。对应后端 G1 `ReportPageItem`。
|
|
2444
|
+
*
|
|
2445
|
+
* 与 {@link ComplianceReport} 一致的 SDK-safe 子集 + `createTime`;时间字段为
|
|
2446
|
+
* ISO-8601 字符串。
|
|
2447
|
+
*/
|
|
2448
|
+
interface ReportPageItem {
|
|
2449
|
+
id: number;
|
|
2450
|
+
reportNo: string;
|
|
2451
|
+
reportType: string;
|
|
2452
|
+
status: string;
|
|
2453
|
+
assetId?: number | null;
|
|
2454
|
+
packageId?: number | null;
|
|
2455
|
+
publicUrlToken?: string | null;
|
|
2456
|
+
publishedAt?: string | null;
|
|
2457
|
+
bodyHash?: string | null;
|
|
2458
|
+
/** 创建时间 ISO-8601。 */
|
|
2459
|
+
createTime: string;
|
|
2460
|
+
}
|
|
2461
|
+
/**
|
|
2462
|
+
* `listReports` 请求参数。
|
|
2463
|
+
*
|
|
2464
|
+
* 继承 {@link PageRequest} 分页 / 排序字段;全部可选。`createTimeStart` /
|
|
2465
|
+
* `createTimeEnd` 为调用方提供的【原样字符串】,后端按 `yyyy-MM-dd HH:mm:ss`
|
|
2466
|
+
* 解析;SDK 不做格式校验或时区转换。
|
|
2467
|
+
*/
|
|
2468
|
+
interface ListReportsRequest extends PageRequest {
|
|
2469
|
+
/** 报告状态过滤。 */
|
|
2470
|
+
status?: string;
|
|
2471
|
+
/** 创建时间下界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2472
|
+
createTimeStart?: string;
|
|
2473
|
+
/** 创建时间上界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2474
|
+
createTimeEnd?: string;
|
|
2475
|
+
}
|
|
1997
2476
|
|
|
1998
2477
|
interface SigningEnvelope {
|
|
1999
2478
|
id: number;
|
|
@@ -2035,6 +2514,83 @@ interface SignEnvelopeRequest {
|
|
|
2035
2514
|
/** H5 短链请求。 */
|
|
2036
2515
|
interface CreateH5SigningUrlRequest extends SignEnvelopeRequest {
|
|
2037
2516
|
}
|
|
2517
|
+
/**
|
|
2518
|
+
* 签署 envelope 分页【列表项】视图。对应后端 G1 `SigningEnvelopePageItem`。
|
|
2519
|
+
*
|
|
2520
|
+
* 与 {@link SigningEnvelope} 一致的 SDK-safe 子集 + `createTime`;时间字段为
|
|
2521
|
+
* ISO-8601 字符串。
|
|
2522
|
+
*/
|
|
2523
|
+
interface SigningEnvelopePageItem {
|
|
2524
|
+
id: number;
|
|
2525
|
+
envelopeNo: string;
|
|
2526
|
+
applicantUserId?: string | null;
|
|
2527
|
+
status: string;
|
|
2528
|
+
primaryContractId?: number | null;
|
|
2529
|
+
contractHash?: string | null;
|
|
2530
|
+
hashAlgorithm?: string | null;
|
|
2531
|
+
billingGroupId?: string | null;
|
|
2532
|
+
chainId?: string | null;
|
|
2533
|
+
requestId?: string | null;
|
|
2534
|
+
pendingReason?: string | null;
|
|
2535
|
+
signedAt?: string | null;
|
|
2536
|
+
evidenceReadyAt?: string | null;
|
|
2537
|
+
committedAt?: string | null;
|
|
2538
|
+
/** 创建时间 ISO-8601。 */
|
|
2539
|
+
createTime: string;
|
|
2540
|
+
}
|
|
2541
|
+
/**
|
|
2542
|
+
* `listSigningEnvelopes` 请求参数。
|
|
2543
|
+
*
|
|
2544
|
+
* 继承 {@link PageRequest} 分页 / 排序字段;全部可选。`createTimeStart` /
|
|
2545
|
+
* `createTimeEnd` 为调用方提供的【原样字符串】,后端按 `yyyy-MM-dd HH:mm:ss`
|
|
2546
|
+
* 解析;SDK 不做格式校验或时区转换。
|
|
2547
|
+
*/
|
|
2548
|
+
interface ListSigningEnvelopesRequest extends PageRequest {
|
|
2549
|
+
/** envelope 状态过滤。 */
|
|
2550
|
+
status?: string;
|
|
2551
|
+
/** 创建时间下界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2552
|
+
createTimeStart?: string;
|
|
2553
|
+
/** 创建时间上界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2554
|
+
createTimeEnd?: string;
|
|
2555
|
+
}
|
|
2556
|
+
/**
|
|
2557
|
+
* 签署 envelope 下挂的合同【列表项】视图。对应后端 G4 `EnvelopeContractItem`。
|
|
2558
|
+
*
|
|
2559
|
+
* 一个 envelope 可挂多份合同;本视图描述合同的元数据与哈希指纹,便于离线复核。
|
|
2560
|
+
* SDK-safe 子集——不含合同原文 / storage key / provider raw payload。时间字段
|
|
2561
|
+
* 为 ISO-8601 字符串。
|
|
2562
|
+
*/
|
|
2563
|
+
interface EnvelopeContractItem {
|
|
2564
|
+
/** 合同行 id(数值主键)。 */
|
|
2565
|
+
id: number;
|
|
2566
|
+
/** 所属 envelope id。 */
|
|
2567
|
+
envelopeId: number;
|
|
2568
|
+
/** 合同编号。 */
|
|
2569
|
+
contractNo: string;
|
|
2570
|
+
/** 合同标题。 */
|
|
2571
|
+
title: string;
|
|
2572
|
+
/** 合同文件 MIME 类型。 */
|
|
2573
|
+
mimeType: string;
|
|
2574
|
+
/** 合同文件字节数。 */
|
|
2575
|
+
size: number;
|
|
2576
|
+
/** 哈希算法(如 `sha256`)。 */
|
|
2577
|
+
hashAlgorithm: string;
|
|
2578
|
+
/** 合同原文内容哈希。 */
|
|
2579
|
+
contentHash: string;
|
|
2580
|
+
/** 签署后内容哈希(未签署时缺省)。 */
|
|
2581
|
+
signedContentHash?: string;
|
|
2582
|
+
/** 合同状态。 */
|
|
2583
|
+
status: string;
|
|
2584
|
+
/** 创建时间 ISO-8601。 */
|
|
2585
|
+
createTime: string;
|
|
2586
|
+
}
|
|
2587
|
+
/**
|
|
2588
|
+
* `voidEnvelope` 请求体。作废一个签署 envelope,`reason` 为必填的作废原因。
|
|
2589
|
+
*/
|
|
2590
|
+
interface VoidEnvelopeRequest {
|
|
2591
|
+
/** 作废原因(必填,随 JSON body 提交)。 */
|
|
2592
|
+
reason: string;
|
|
2593
|
+
}
|
|
2038
2594
|
|
|
2039
2595
|
interface SealApproval {
|
|
2040
2596
|
id: number;
|
|
@@ -2078,54 +2634,344 @@ interface RejectSealApprovalQuery {
|
|
|
2078
2634
|
interface CancelSealApprovalQuery {
|
|
2079
2635
|
reason?: string;
|
|
2080
2636
|
}
|
|
2637
|
+
/**
|
|
2638
|
+
* 用印审批分页【列表项】视图。对应后端 G1 `SealApprovalPageItem`。
|
|
2639
|
+
*
|
|
2640
|
+
* 与 {@link SealApproval} 一致的 SDK-safe 子集 + `createTime`;时间字段为
|
|
2641
|
+
* ISO-8601 字符串。
|
|
2642
|
+
*/
|
|
2643
|
+
interface SealApprovalPageItem {
|
|
2644
|
+
id: number;
|
|
2645
|
+
envelopeId?: number | null;
|
|
2646
|
+
contractId?: number | null;
|
|
2647
|
+
contractHash?: string | null;
|
|
2648
|
+
hashAlgorithm?: string | null;
|
|
2649
|
+
sealId?: number | null;
|
|
2650
|
+
applicantUserId?: string | null;
|
|
2651
|
+
approverUserId?: string | null;
|
|
2652
|
+
transactorId?: number | null;
|
|
2653
|
+
signLocationType?: string | null;
|
|
2654
|
+
signLocationPayload?: string | null;
|
|
2655
|
+
reason?: string | null;
|
|
2656
|
+
expiresAt?: string | null;
|
|
2657
|
+
status: string;
|
|
2658
|
+
approvedAt?: string | null;
|
|
2659
|
+
rejectedAt?: string | null;
|
|
2660
|
+
canceledAt?: string | null;
|
|
2661
|
+
/** 创建时间 ISO-8601。 */
|
|
2662
|
+
createTime: string;
|
|
2663
|
+
}
|
|
2664
|
+
/**
|
|
2665
|
+
* `listSealApprovals` 请求参数。
|
|
2666
|
+
*
|
|
2667
|
+
* 继承 {@link PageRequest} 分页 / 排序字段;全部可选。`createTimeStart` /
|
|
2668
|
+
* `createTimeEnd` 为调用方提供的【原样字符串】,后端按 `yyyy-MM-dd HH:mm:ss`
|
|
2669
|
+
* 解析;SDK 不做格式校验或时区转换。
|
|
2670
|
+
*/
|
|
2671
|
+
interface ListSealApprovalsRequest extends PageRequest {
|
|
2672
|
+
/** 审批状态过滤。 */
|
|
2673
|
+
status?: string;
|
|
2674
|
+
/** 创建时间下界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2675
|
+
createTimeStart?: string;
|
|
2676
|
+
/** 创建时间上界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2677
|
+
createTimeEnd?: string;
|
|
2678
|
+
}
|
|
2679
|
+
/**
|
|
2680
|
+
* 用印执行记录分页【列表项】视图。对应后端 G6 `SealUsePageItem`。
|
|
2681
|
+
*
|
|
2682
|
+
* 一次用印执行(seal use)描述【该次盖章动作本身】的执行进度——envelope /
|
|
2683
|
+
* contract / seal / 审批联动后真正调用 provider 落章的那一笔记录,与
|
|
2684
|
+
* envelope 领域状态正交。SDK-safe 视图——不含 provider raw payload / 证书 /
|
|
2685
|
+
* storage key。时间字段为 ISO-8601 字符串。
|
|
2686
|
+
*/
|
|
2687
|
+
interface SealUsePageItem {
|
|
2688
|
+
id: number;
|
|
2689
|
+
envelopeId: number;
|
|
2690
|
+
contractId: number;
|
|
2691
|
+
sealId: number;
|
|
2692
|
+
/** 用印执行状态。 */
|
|
2693
|
+
usageStatus: string;
|
|
2694
|
+
/** 签署位置类型(坐标 / 关键字 / 域字段等)。 */
|
|
2695
|
+
signLocationType?: string | null;
|
|
2696
|
+
/** 调起时间 ISO-8601。 */
|
|
2697
|
+
invokedAt?: string | null;
|
|
2698
|
+
/** 成功落章时间 ISO-8601。 */
|
|
2699
|
+
consumedAt?: string | null;
|
|
2700
|
+
/** 失败时的错误原因(如有)。 */
|
|
2701
|
+
failureReason?: string | null;
|
|
2702
|
+
/** 创建时间 ISO-8601。 */
|
|
2703
|
+
createTime: string;
|
|
2704
|
+
}
|
|
2705
|
+
/**
|
|
2706
|
+
* `listSealUses` 请求参数。
|
|
2707
|
+
*
|
|
2708
|
+
* 继承 {@link PageRequest} 分页 / 排序字段;全部可选。`createTimeStart` /
|
|
2709
|
+
* `createTimeEnd` 为调用方提供的【原样字符串】,后端按 `yyyy-MM-dd HH:mm:ss`
|
|
2710
|
+
* 解析;SDK 不做格式校验或时区转换。
|
|
2711
|
+
*/
|
|
2712
|
+
interface ListSealUsesRequest extends PageRequest {
|
|
2713
|
+
/** 印章 id 过滤。 */
|
|
2714
|
+
sealId?: number;
|
|
2715
|
+
/** 签署 envelope id 过滤。 */
|
|
2716
|
+
envelopeId?: number;
|
|
2717
|
+
/** 用印执行状态过滤。 */
|
|
2718
|
+
usageStatus?: string;
|
|
2719
|
+
/** 创建时间下界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2720
|
+
createTimeStart?: string;
|
|
2721
|
+
/** 创建时间上界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2722
|
+
createTimeEnd?: string;
|
|
2723
|
+
}
|
|
2081
2724
|
|
|
2082
|
-
|
|
2083
|
-
|
|
2725
|
+
/**
|
|
2726
|
+
* 单个 compliance 高风险 / 收费动作的能力闸门视图。对应后端 G2 `CapabilityVO`。
|
|
2727
|
+
*
|
|
2728
|
+
* 后端为每个动作返回一条:`signEnvelope` / `createH5SigningUrl` /
|
|
2729
|
+
* `publishReport` / `approveSealApproval` / `executeSealUse` / `createSeal`。
|
|
2730
|
+
*
|
|
2731
|
+
* 拿不到能力时调用方必须 fail-closed(视为 `executable=false`)。`state` 复用
|
|
2732
|
+
* 跨域 {@link FeatureGateState} 开放联合——后端保留新增空间。
|
|
2733
|
+
*/
|
|
2734
|
+
interface ComplianceCapability {
|
|
2735
|
+
/** 动作标识(如 `signEnvelope` / `publishReport`)。 */
|
|
2736
|
+
action: string;
|
|
2737
|
+
/** 该动作当前是否可执行。fail-closed:拿不到能力时按 false 处理。 */
|
|
2738
|
+
executable: boolean;
|
|
2739
|
+
/**
|
|
2740
|
+
* 不可执行的具体状态。后端取值:`executable` / `scope_missing` /
|
|
2741
|
+
* `not_provisioned` / `step_up_required` / `gate_closed` / `unknown`。
|
|
2742
|
+
*/
|
|
2743
|
+
state: FeatureGateState;
|
|
2744
|
+
/** 该动作所需的 OAuth scope。 */
|
|
2745
|
+
requiredScopes: string[];
|
|
2746
|
+
/** 该动作是否需要 step-up(高风险动作二次验证)。 */
|
|
2747
|
+
requiredStepUp: boolean;
|
|
2748
|
+
/** 人类可读原因(诊断 / 展示)。 */
|
|
2749
|
+
reason: string;
|
|
2750
|
+
}
|
|
2751
|
+
/**
|
|
2752
|
+
* compliance 操作投影【列表项】视图。对应后端 G2 `OperationPageItem`。
|
|
2753
|
+
*
|
|
2754
|
+
* 与领域对象状态【正交】:描述【一次操作】本身的执行进度,而非某个履约对象的
|
|
2755
|
+
* 业务态。时间字段为 ISO-8601 字符串。
|
|
2756
|
+
*/
|
|
2757
|
+
interface OperationPageItem {
|
|
2758
|
+
/** 行 id(数值主键)。 */
|
|
2084
2759
|
id: number;
|
|
2085
|
-
|
|
2086
|
-
|
|
2760
|
+
/** 操作幂等键(跨来源统一关联键)。 */
|
|
2761
|
+
operationId: string;
|
|
2762
|
+
/** 操作状态。 */
|
|
2763
|
+
status: string;
|
|
2764
|
+
/** 是否终态。 */
|
|
2087
2765
|
terminal: boolean;
|
|
2088
|
-
/** 当前状态是否允许 SDK
|
|
2766
|
+
/** 当前状态是否允许 SDK 安全重试。 */
|
|
2089
2767
|
retryable: boolean;
|
|
2768
|
+
/** 已尝试次数。 */
|
|
2769
|
+
attemptCount: number;
|
|
2770
|
+
/** 关联业务编号。 */
|
|
2090
2771
|
businessNo?: string | null;
|
|
2772
|
+
/** 关联合同编号。 */
|
|
2091
2773
|
contractNo?: string | null;
|
|
2092
|
-
|
|
2093
|
-
|
|
2774
|
+
/** 关联印章 id。 */
|
|
2775
|
+
sealId?: number | null;
|
|
2776
|
+
/** 对账状态。 */
|
|
2094
2777
|
reconciliationStatus?: string | null;
|
|
2778
|
+
/** 下次重试时间 ISO-8601。 */
|
|
2095
2779
|
nextRetryAt?: string | null;
|
|
2780
|
+
/** 请求发起时间 ISO-8601。 */
|
|
2096
2781
|
requestedAt?: string | null;
|
|
2782
|
+
/** provider 响应时间 ISO-8601。 */
|
|
2097
2783
|
respondedAt?: string | null;
|
|
2784
|
+
/** 创建时间 ISO-8601。 */
|
|
2785
|
+
createTime: string;
|
|
2098
2786
|
}
|
|
2099
|
-
|
|
2100
2787
|
/**
|
|
2101
|
-
*
|
|
2788
|
+
* compliance 操作投影【详情】视图。对应后端 G2 `OperationDetail`。
|
|
2789
|
+
*
|
|
2790
|
+
* 当前与 {@link OperationPageItem} 字段一致——单独成类型以便后端在详情视图
|
|
2791
|
+
* 追加字段时不破坏列表项契约。
|
|
2102
2792
|
*/
|
|
2103
|
-
|
|
2104
|
-
/**
|
|
2105
|
-
|
|
2106
|
-
/**
|
|
2107
|
-
|
|
2108
|
-
/**
|
|
2109
|
-
|
|
2110
|
-
/**
|
|
2111
|
-
key: ComplianceErrorKey;
|
|
2112
|
-
/** 是否安全自动重试 — compliance 写接口几乎全为 false。 */
|
|
2113
|
-
retryable: boolean;
|
|
2114
|
-
/** 是否已经是终态 — 用户必须用新 idempotency-key 重新发起。 */
|
|
2793
|
+
interface OperationDetail {
|
|
2794
|
+
/** 行 id(数值主键)。 */
|
|
2795
|
+
id: number;
|
|
2796
|
+
/** 操作幂等键(跨来源统一关联键)。 */
|
|
2797
|
+
operationId: string;
|
|
2798
|
+
/** 操作状态。 */
|
|
2799
|
+
status: string;
|
|
2800
|
+
/** 是否终态。 */
|
|
2115
2801
|
terminal: boolean;
|
|
2116
|
-
/**
|
|
2117
|
-
|
|
2802
|
+
/** 当前状态是否允许 SDK 安全重试。 */
|
|
2803
|
+
retryable: boolean;
|
|
2804
|
+
/** 已尝试次数。 */
|
|
2805
|
+
attemptCount: number;
|
|
2806
|
+
/** 关联业务编号。 */
|
|
2807
|
+
businessNo?: string | null;
|
|
2808
|
+
/** 关联合同编号。 */
|
|
2809
|
+
contractNo?: string | null;
|
|
2810
|
+
/** 关联印章 id。 */
|
|
2811
|
+
sealId?: number | null;
|
|
2812
|
+
/** 对账状态。 */
|
|
2813
|
+
reconciliationStatus?: string | null;
|
|
2814
|
+
/** 下次重试时间 ISO-8601。 */
|
|
2815
|
+
nextRetryAt?: string | null;
|
|
2816
|
+
/** 请求发起时间 ISO-8601。 */
|
|
2817
|
+
requestedAt?: string | null;
|
|
2818
|
+
/** provider 响应时间 ISO-8601。 */
|
|
2819
|
+
respondedAt?: string | null;
|
|
2820
|
+
/** 创建时间 ISO-8601。 */
|
|
2821
|
+
createTime: string;
|
|
2118
2822
|
}
|
|
2119
2823
|
/**
|
|
2120
|
-
*
|
|
2121
|
-
*
|
|
2824
|
+
* `listOperations` 请求参数。
|
|
2825
|
+
*
|
|
2826
|
+
* 继承 {@link PageRequest} 分页 / 排序字段;全部可选。`createTimeStart` /
|
|
2827
|
+
* `createTimeEnd` 为调用方提供的【原样字符串】,后端按 `yyyy-MM-dd HH:mm:ss`
|
|
2828
|
+
* 解析;SDK 不做格式校验或时区转换。
|
|
2122
2829
|
*/
|
|
2123
|
-
|
|
2830
|
+
interface ListOperationsRequest extends PageRequest {
|
|
2831
|
+
/** 操作状态过滤。 */
|
|
2832
|
+
status?: string;
|
|
2833
|
+
/** 创建时间下界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2834
|
+
createTimeStart?: string;
|
|
2835
|
+
/** 创建时间上界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2836
|
+
createTimeEnd?: string;
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
/** 模板上的可填充字段类型:签名 / 印章 / 文本 / 日期 / 勾选。 */
|
|
2840
|
+
type ContractTemplateFieldType = 'signature' | 'seal' | 'text' | 'date' | 'check';
|
|
2124
2841
|
/**
|
|
2125
|
-
*
|
|
2126
|
-
*
|
|
2842
|
+
* 模板字段叠加项。一个模板包含一组字段——签名 / 印章 / 文本 / 日期 / 勾选——
|
|
2843
|
+
* 字段在 PDF 上的位置以 `page`(页码)+ `x`/`y`/`width`/`height`(坐标 / 尺寸)
|
|
2844
|
+
* 描述。SDK 不在客户端做几何 / 坐标系校验,原样透传给后端。
|
|
2127
2845
|
*/
|
|
2128
|
-
|
|
2846
|
+
interface ContractTemplateField {
|
|
2847
|
+
/** 字段稳定 key,调用方业务侧自定。 */
|
|
2848
|
+
key: string;
|
|
2849
|
+
/** 字段类型。 */
|
|
2850
|
+
type: ContractTemplateFieldType;
|
|
2851
|
+
/** 字段在 UI 上展示的标签。 */
|
|
2852
|
+
label: string;
|
|
2853
|
+
/** PDF 页码(1-based 或调用方约定,SDK 原样透传)。 */
|
|
2854
|
+
page: number;
|
|
2855
|
+
/** PDF 坐标系横坐标。 */
|
|
2856
|
+
x: number;
|
|
2857
|
+
/** PDF 坐标系纵坐标。 */
|
|
2858
|
+
y: number;
|
|
2859
|
+
/** 字段宽度。 */
|
|
2860
|
+
width: number;
|
|
2861
|
+
/** 字段高度。 */
|
|
2862
|
+
height: number;
|
|
2863
|
+
/** 字段绑定的角色(签署人角色 key,可选)。 */
|
|
2864
|
+
assignedRole?: string;
|
|
2865
|
+
/** 字段在模板内的排序键。 */
|
|
2866
|
+
order: number;
|
|
2867
|
+
/** 是否为必填字段。 */
|
|
2868
|
+
required: boolean;
|
|
2869
|
+
}
|
|
2870
|
+
/** 模板状态。DRAFT 可编辑 / 删除 / 上传 PDF / publish;PUBLISHED / ARCHIVED 只读。 */
|
|
2871
|
+
type ContractTemplateStatus = 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
|
|
2872
|
+
/**
|
|
2873
|
+
* 合同模板详情。对应后端 G5 `ContractTemplateResp`。
|
|
2874
|
+
*
|
|
2875
|
+
* - `pdfHash` / `pdfPageCount` 在【上传 PDF】之后才有值。
|
|
2876
|
+
* - `currentVersion` 记录【已发布】版本号;DRAFT 阶段为 0。
|
|
2877
|
+
* - `fields` 是【当前编辑中】的字段叠加快照——publish 时会同步固化进版本表。
|
|
2878
|
+
* - 时间字段 `createTime` 为 ISO-8601 字符串。
|
|
2879
|
+
*/
|
|
2880
|
+
interface ContractTemplateResp {
|
|
2881
|
+
id: number;
|
|
2882
|
+
/** 模板编号(业务编号,区别于数值主键 `id`)。 */
|
|
2883
|
+
templateNo: string;
|
|
2884
|
+
name: string;
|
|
2885
|
+
description?: string | null;
|
|
2886
|
+
status: ContractTemplateStatus;
|
|
2887
|
+
/** 已上传 PDF 的哈希;未上传时缺省。 */
|
|
2888
|
+
pdfHash?: string | null;
|
|
2889
|
+
/** 已上传 PDF 的页数;未上传时缺省。 */
|
|
2890
|
+
pdfPageCount?: number | null;
|
|
2891
|
+
fields: ContractTemplateField[];
|
|
2892
|
+
/** 已发布版本号;DRAFT 阶段为 0。 */
|
|
2893
|
+
currentVersion: number;
|
|
2894
|
+
/** 创建时间 ISO-8601。 */
|
|
2895
|
+
createTime: string;
|
|
2896
|
+
}
|
|
2897
|
+
/**
|
|
2898
|
+
* 合同模板分页【列表项】视图。对应后端 G5 `ContractTemplatePageItem`。
|
|
2899
|
+
*
|
|
2900
|
+
* 与 {@link ContractTemplateResp} 一致的 SDK-safe 子集,**不含 `fields`**——
|
|
2901
|
+
* 字段叠加只在详情 / 版本快照里返回,分页列表不下发,避免大对象 N+1。
|
|
2902
|
+
*/
|
|
2903
|
+
interface ContractTemplatePageItem {
|
|
2904
|
+
id: number;
|
|
2905
|
+
templateNo: string;
|
|
2906
|
+
name: string;
|
|
2907
|
+
description?: string | null;
|
|
2908
|
+
status: ContractTemplateStatus;
|
|
2909
|
+
pdfHash?: string | null;
|
|
2910
|
+
pdfPageCount?: number | null;
|
|
2911
|
+
currentVersion: number;
|
|
2912
|
+
/** 创建时间 ISO-8601。 */
|
|
2913
|
+
createTime: string;
|
|
2914
|
+
}
|
|
2915
|
+
/**
|
|
2916
|
+
* 合同模板版本快照。对应后端 G5 `ContractTemplateVersion`。
|
|
2917
|
+
*
|
|
2918
|
+
* 每次 publish 会落一个版本快照,记录当时的 `name` / `pdfHash` / `fields` /
|
|
2919
|
+
* `statusAtSnapshot`(publish 时模板的状态字面量)。版本是【不可变】的离线复核
|
|
2920
|
+
* 依据。
|
|
2921
|
+
*/
|
|
2922
|
+
interface ContractTemplateVersion {
|
|
2923
|
+
id: number;
|
|
2924
|
+
templateId: number;
|
|
2925
|
+
version: number;
|
|
2926
|
+
name: string;
|
|
2927
|
+
pdfHash?: string | null;
|
|
2928
|
+
fields: ContractTemplateField[];
|
|
2929
|
+
/** publish 时模板状态的字面量快照。 */
|
|
2930
|
+
statusAtSnapshot: string;
|
|
2931
|
+
/** 创建时间 ISO-8601。 */
|
|
2932
|
+
createTime: string;
|
|
2933
|
+
}
|
|
2934
|
+
/**
|
|
2935
|
+
* 创建合同模板请求。`fields` 可选——通常先在 DRAFT 状态创建模板、再上传 PDF、
|
|
2936
|
+
* 然后再单独 `updateContractTemplate` 设置 / 调整字段叠加。
|
|
2937
|
+
*/
|
|
2938
|
+
interface CreateContractTemplateRequest {
|
|
2939
|
+
name: string;
|
|
2940
|
+
description?: string;
|
|
2941
|
+
fields?: ContractTemplateField[];
|
|
2942
|
+
}
|
|
2943
|
+
/**
|
|
2944
|
+
* 更新合同模板请求。仅 DRAFT 状态下允许调用——服务端在 PUBLISHED / ARCHIVED
|
|
2945
|
+
* 状态下会拒绝更新。所有字段可选,缺省的字段视为【不修改】。
|
|
2946
|
+
*/
|
|
2947
|
+
interface UpdateContractTemplateRequest {
|
|
2948
|
+
name?: string;
|
|
2949
|
+
description?: string;
|
|
2950
|
+
fields?: ContractTemplateField[];
|
|
2951
|
+
}
|
|
2952
|
+
/**
|
|
2953
|
+
* 上传模板 PDF 请求。`pdfBase64` 为 base64 编码的 PDF 原文;SDK 不在客户端做
|
|
2954
|
+
* PDF 解析 / 几何校验。
|
|
2955
|
+
*/
|
|
2956
|
+
interface UploadContractTemplatePdfRequest {
|
|
2957
|
+
/** base64 编码的 PDF 原文。 */
|
|
2958
|
+
pdfBase64: string;
|
|
2959
|
+
}
|
|
2960
|
+
/**
|
|
2961
|
+
* `listContractTemplates` 请求参数。
|
|
2962
|
+
*
|
|
2963
|
+
* 继承 {@link PageRequest} 分页 / 排序字段;全部可选。`createTimeStart` /
|
|
2964
|
+
* `createTimeEnd` 为调用方提供的【原样字符串】,后端按 `yyyy-MM-dd HH:mm:ss`
|
|
2965
|
+
* 解析;SDK 不做格式校验或时区转换。
|
|
2966
|
+
*/
|
|
2967
|
+
interface ListContractTemplatesRequest extends PageRequest {
|
|
2968
|
+
/** 模板状态过滤。 */
|
|
2969
|
+
status?: ContractTemplateStatus | string;
|
|
2970
|
+
/** 创建时间下界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2971
|
+
createTimeStart?: string;
|
|
2972
|
+
/** 创建时间上界,`yyyy-MM-dd HH:mm:ss`。 */
|
|
2973
|
+
createTimeEnd?: string;
|
|
2974
|
+
}
|
|
2129
2975
|
|
|
2130
2976
|
declare module '@acosmi/sdk-ts' {
|
|
2131
2977
|
interface Client {
|
|
@@ -2151,6 +2997,14 @@ declare class ComplianceClient {
|
|
|
2151
2997
|
createEvidenceAsset(req: CreateEvidenceAssetRequest, opts?: ComplianceWriteOptions): Promise<EvidenceAsset>;
|
|
2152
2998
|
/** 读 — 证据资产详情。 */
|
|
2153
2999
|
getEvidenceAsset(id: number, signal?: AbortSignal): Promise<EvidenceAsset>;
|
|
3000
|
+
/**
|
|
3001
|
+
* 读 — 证据资产分页列表(compliance gateway S1)。
|
|
3002
|
+
*
|
|
3003
|
+
* 走 GET 读路径(允许 401 单次刷新重放)。返回 yudao `PageResult<T>`
|
|
3004
|
+
* (`{ total, list }`)。所有过滤项可选;`createTimeStart` / `createTimeEnd`
|
|
3005
|
+
* 由调用方按 `yyyy-MM-dd HH:mm:ss` 提供,SDK 原样透传。
|
|
3006
|
+
*/
|
|
3007
|
+
listEvidenceAssets(req?: ListEvidenceAssetsRequest, signal?: AbortSignal): Promise<PageResult<EvidenceAssetPageItem>>;
|
|
2154
3008
|
/**
|
|
2155
3009
|
* 公开 verify。隐私边界:返回字段不含 PII / 合同原文 / storage / provider raw。
|
|
2156
3010
|
*
|
|
@@ -2169,6 +3023,13 @@ declare class ComplianceClient {
|
|
|
2169
3023
|
issueTimestampForAsset(assetId: number, opts?: ComplianceWriteOptions): Promise<TimestampToken>;
|
|
2170
3024
|
/** 读 — 时间章 token 详情。 */
|
|
2171
3025
|
getTimestamp(id: number, signal?: AbortSignal): Promise<TimestampToken>;
|
|
3026
|
+
/**
|
|
3027
|
+
* 读 — 时间章分页列表(compliance gateway S1)。
|
|
3028
|
+
*
|
|
3029
|
+
* 走 GET 读路径。返回 yudao `PageResult<T>`。所有过滤项可选;`createTimeStart` /
|
|
3030
|
+
* `createTimeEnd` 由调用方按 `yyyy-MM-dd HH:mm:ss` 提供,SDK 原样透传。
|
|
3031
|
+
*/
|
|
3032
|
+
listTimestamps(req?: ListTimestampsRequest, signal?: AbortSignal): Promise<PageResult<TimestampPageItem>>;
|
|
2172
3033
|
/** verify — 本地离线校验已申请的时间章。 */
|
|
2173
3034
|
verifyTimestamp(req: VerifyTimestampRequest, opts?: ComplianceWriteOptions): Promise<TimestampVerifyResult>;
|
|
2174
3035
|
/**
|
|
@@ -2179,12 +3040,41 @@ declare class ComplianceClient {
|
|
|
2179
3040
|
* - timeout → 抛 {@link CompliancePollError} kind='timeout'。
|
|
2180
3041
|
*/
|
|
2181
3042
|
waitForTimestampVerified(id: number, opts?: CompliancePollOptions): Promise<TimestampToken>;
|
|
3043
|
+
/**
|
|
3044
|
+
* 读 — 时间章授权机构(TSA)provider 列表(compliance gateway S3)。
|
|
3045
|
+
*
|
|
3046
|
+
* 走 GET 读路径(允许 401 单次刷新重放)。后端 G3 为每个 TSA provider 返回
|
|
3047
|
+
* 一条 {@link TsaProvider}:名称、所处环境、当前是否可用。只读视图,不含
|
|
3048
|
+
* provider 端点 / 凭证 / 证书等内部接入材料。
|
|
3049
|
+
*/
|
|
3050
|
+
listTsaProviders(signal?: AbortSignal): Promise<TsaProvider[]>;
|
|
3051
|
+
/**
|
|
3052
|
+
* 读 — 时间章统计视图(compliance gateway S3)。
|
|
3053
|
+
*
|
|
3054
|
+
* 走 GET 读路径(允许 401 单次刷新重放)。返回 {@link TsaStats}:时间章总数
|
|
3055
|
+
* + 按校验状态分桶的计数。只读聚合视图。
|
|
3056
|
+
*/
|
|
3057
|
+
getTsaStats(signal?: AbortSignal): Promise<TsaStats>;
|
|
2182
3058
|
/** 构建证据包(写)。 */
|
|
2183
3059
|
buildEvidencePackage(assetId: number, timestampTokenId?: number, opts?: ComplianceWriteOptions): Promise<EvidencePackage>;
|
|
3060
|
+
/**
|
|
3061
|
+
* 读 — 证据包分页列表(compliance gateway S1)。
|
|
3062
|
+
*
|
|
3063
|
+
* 走 GET 读路径。返回 yudao `PageResult<T>`。所有过滤项可选;`createTimeStart` /
|
|
3064
|
+
* `createTimeEnd` 由调用方按 `yyyy-MM-dd HH:mm:ss` 提供,SDK 原样透传。
|
|
3065
|
+
*/
|
|
3066
|
+
listEvidencePackages(req?: ListEvidencePackagesRequest, signal?: AbortSignal): Promise<PageResult<EvidencePackagePageItem>>;
|
|
2184
3067
|
/** 创建证据报告(写)。 */
|
|
2185
3068
|
createReport(req: CreateReportRequest, opts?: ComplianceWriteOptions): Promise<ComplianceReport>;
|
|
2186
3069
|
/** 读 — 报告详情。 */
|
|
2187
3070
|
getReport(id: number, signal?: AbortSignal): Promise<ComplianceReport>;
|
|
3071
|
+
/**
|
|
3072
|
+
* 读 — 证据报告分页列表(compliance gateway S1)。
|
|
3073
|
+
*
|
|
3074
|
+
* 走 GET 读路径。返回 yudao `PageResult<T>`。所有过滤项可选;`createTimeStart` /
|
|
3075
|
+
* `createTimeEnd` 由调用方按 `yyyy-MM-dd HH:mm:ss` 提供,SDK 原样透传。
|
|
3076
|
+
*/
|
|
3077
|
+
listReports(req?: ListReportsRequest, signal?: AbortSignal): Promise<PageResult<ReportPageItem>>;
|
|
2188
3078
|
/**
|
|
2189
3079
|
* 发布报告(写,step-up 必须)。
|
|
2190
3080
|
*
|
|
@@ -2204,6 +3094,13 @@ declare class ComplianceClient {
|
|
|
2204
3094
|
createSigningEnvelope(req: CreateSigningEnvelopeRequest, opts?: ComplianceWriteOptions): Promise<number>;
|
|
2205
3095
|
/** 读 — envelope 详情。租户由服务端从 compliance token principal 推导。 */
|
|
2206
3096
|
getSigningEnvelope(envelopeId: number, signal?: AbortSignal): Promise<SigningEnvelope>;
|
|
3097
|
+
/**
|
|
3098
|
+
* 读 — 签署 envelope 分页列表(compliance gateway S1)。
|
|
3099
|
+
*
|
|
3100
|
+
* 走 GET 读路径。返回 yudao `PageResult<T>`。所有过滤项可选;`createTimeStart` /
|
|
3101
|
+
* `createTimeEnd` 由调用方按 `yyyy-MM-dd HH:mm:ss` 提供,SDK 原样透传。
|
|
3102
|
+
*/
|
|
3103
|
+
listSigningEnvelopes(req?: ListSigningEnvelopesRequest, signal?: AbortSignal): Promise<PageResult<SigningEnvelopePageItem>>;
|
|
2207
3104
|
/**
|
|
2208
3105
|
* 正式签署(写,step-up 必须)。
|
|
2209
3106
|
*
|
|
@@ -2219,6 +3116,31 @@ declare class ComplianceClient {
|
|
|
2219
3116
|
createH5SigningUrl(envelopeId: number, req: CreateH5SigningUrlRequest, opts?: ComplianceWriteOptions): Promise<string>;
|
|
2220
3117
|
/** 同步 provider 状态(写但只读对账,不创建新 provider 请求)。 */
|
|
2221
3118
|
syncSigningEnvelopeStatus(envelopeId: number, opts?: ComplianceWriteOptions): Promise<void>;
|
|
3119
|
+
/**
|
|
3120
|
+
* 读 — envelope 下挂的合同列表(compliance gateway S4)。
|
|
3121
|
+
*
|
|
3122
|
+
* 走 GET 读路径(允许 401 单次刷新重放)。后端 G4 为每份挂在该 envelope 上的
|
|
3123
|
+
* 合同返回一条 {@link EnvelopeContractItem}:编号 / 标题 / MIME / 大小 / 哈希
|
|
3124
|
+
* 指纹 / 状态。返回普通数组(非 `PageResult`)。SDK-safe 视图——不含合同原文 /
|
|
3125
|
+
* storage key / provider raw payload。
|
|
3126
|
+
*/
|
|
3127
|
+
listEnvelopeContracts(envelopeId: number, signal?: AbortSignal): Promise<EnvelopeContractItem[]>;
|
|
3128
|
+
/**
|
|
3129
|
+
* 读 — envelope 关联的 provider 请求列表(compliance gateway S4)。
|
|
3130
|
+
*
|
|
3131
|
+
* 走 GET 读路径(允许 401 单次刷新重放)。后端 G4 复用操作投影
|
|
3132
|
+
* {@link OperationPageItem}:描述每次 provider 请求本身的执行进度,与 envelope
|
|
3133
|
+
* 领域状态正交。返回普通数组(非 `PageResult`)。
|
|
3134
|
+
*/
|
|
3135
|
+
listEnvelopeProviderRequests(envelopeId: number, signal?: AbortSignal): Promise<OperationPageItem[]>;
|
|
3136
|
+
/**
|
|
3137
|
+
* 作废 envelope(写,compliance gateway S4)。
|
|
3138
|
+
*
|
|
3139
|
+
* 走 compliance 写路径——发送前 `ensureToken` 一次、不自动重试、`401` 不刷新
|
|
3140
|
+
* 重放;支持 `Idempotency-Key` header(强烈建议调用方持久化幂等键,重试 / 恢复
|
|
3141
|
+
* 时复用,避免重复作废)。`req.reason` 为必填的作废原因,随 JSON body 提交。
|
|
3142
|
+
*/
|
|
3143
|
+
voidEnvelope(envelopeId: number, req: VoidEnvelopeRequest, opts?: ComplianceWriteOptions): Promise<boolean>;
|
|
2222
3144
|
/**
|
|
2223
3145
|
* 提交用印审批申请(写)。
|
|
2224
3146
|
*
|
|
@@ -2238,6 +3160,28 @@ declare class ComplianceClient {
|
|
|
2238
3160
|
cancelSealApproval(id: number, query: CancelSealApprovalQuery, opts?: ComplianceWriteOptions): Promise<void>;
|
|
2239
3161
|
listPendingSealApprovals(signal?: AbortSignal): Promise<SealApproval[]>;
|
|
2240
3162
|
getSealApproval(id: number, signal?: AbortSignal): Promise<SealApproval>;
|
|
3163
|
+
/**
|
|
3164
|
+
* 读 — 用印审批分页列表(compliance gateway S1)。
|
|
3165
|
+
*
|
|
3166
|
+
* 与 {@link listPendingSealApprovals}(仅 pending、不分页)不同,本方法支持分页与
|
|
3167
|
+
* 状态 / 时间过滤。走 GET 读路径。返回 yudao `PageResult<T>`。所有过滤项可选;
|
|
3168
|
+
* `createTimeStart` / `createTimeEnd` 由调用方按 `yyyy-MM-dd HH:mm:ss` 提供,
|
|
3169
|
+
* SDK 原样透传。
|
|
3170
|
+
*/
|
|
3171
|
+
listSealApprovals(req?: ListSealApprovalsRequest, signal?: AbortSignal): Promise<PageResult<SealApprovalPageItem>>;
|
|
3172
|
+
/**
|
|
3173
|
+
* 读 — 用印执行记录分页列表(compliance gateway S6)。
|
|
3174
|
+
*
|
|
3175
|
+
* 走 GET 读路径(允许 401 单次刷新重放)。返回 yudao `PageResult<T>`
|
|
3176
|
+
* (`{ total, list }`)。一次用印执行(seal use)描述 envelope / contract /
|
|
3177
|
+
* seal / 审批联动后【真正调用 provider 落章】的那一笔记录,与 envelope
|
|
3178
|
+
* 领域状态正交。所有过滤项可选;`createTimeStart` / `createTimeEnd` 由调用方
|
|
3179
|
+
* 按 `yyyy-MM-dd HH:mm:ss` 提供,SDK 原样透传。
|
|
3180
|
+
*
|
|
3181
|
+
* 与后端复用同一只读 scope `CONTRACT_SIGNING_READ`
|
|
3182
|
+
*({@link ScopeComplianceContractSigningRead})——不引入新 scope。
|
|
3183
|
+
*/
|
|
3184
|
+
listSealUses(req?: ListSealUsesRequest, signal?: AbortSignal): Promise<PageResult<SealUsePageItem>>;
|
|
2241
3185
|
getProviderRequest(id: number, signal?: AbortSignal): Promise<ProviderRequestStatusView>;
|
|
2242
3186
|
/**
|
|
2243
3187
|
* 轮询 provider request 到 SUCCESS / FAILED 终态。
|
|
@@ -2248,6 +3192,110 @@ declare class ComplianceClient {
|
|
|
2248
3192
|
* SUCCESS 不代表 billing 已 commit;调用方仍需通过业务侧 envelope / asset 终态判断。
|
|
2249
3193
|
*/
|
|
2250
3194
|
waitForProviderRequestTerminal(id: number, opts?: CompliancePollOptions): Promise<ProviderRequestStatusView>;
|
|
3195
|
+
/**
|
|
3196
|
+
* 读 — compliance 能力闸门列表(compliance gateway S2)。
|
|
3197
|
+
*
|
|
3198
|
+
* 走 GET 读路径(允许 401 单次刷新重放)。后端 G2 为每个高风险 / 收费动作
|
|
3199
|
+
* (`signEnvelope` / `createH5SigningUrl` / `publishReport` /
|
|
3200
|
+
* `approveSealApproval` / `executeSealUse` / `createSeal`)返回一条
|
|
3201
|
+
* {@link ComplianceCapability}:是否可执行、所处状态、所需 scope / step-up。
|
|
3202
|
+
*
|
|
3203
|
+
* 调用方在高风险动作执行【前】查询本结果做门控;拿不到能力时必须 fail-closed
|
|
3204
|
+
*(按 `executable=false` 处理)。
|
|
3205
|
+
*/
|
|
3206
|
+
getCapabilities(signal?: AbortSignal): Promise<ComplianceCapability[]>;
|
|
3207
|
+
/**
|
|
3208
|
+
* 读 — 单个动作的能力闸门视图(便捷方法)。
|
|
3209
|
+
*
|
|
3210
|
+
* 拉取完整 {@link getCapabilities} 列表并返回 `action` 匹配的那一条,无匹配时
|
|
3211
|
+
* 返回 `undefined`。**每次调用产生一次网络请求**——需要门控多个动作时应改用
|
|
3212
|
+
* {@link getCapabilities} 一次性取回再本地查表,避免重复请求。
|
|
3213
|
+
*
|
|
3214
|
+
* 与 {@link getCapabilities} 一致走 GET 读路径(允许 401 单次刷新重放)。
|
|
3215
|
+
*/
|
|
3216
|
+
getFeatureGate(action: string, signal?: AbortSignal): Promise<ComplianceCapability | undefined>;
|
|
3217
|
+
/**
|
|
3218
|
+
* 读 — compliance 操作投影分页列表(compliance gateway S2)。
|
|
3219
|
+
*
|
|
3220
|
+
* 走 GET 读路径。返回 yudao `PageResult<T>`(`{ total, list }`)。所有过滤项
|
|
3221
|
+
* 可选;`createTimeStart` / `createTimeEnd` 由调用方按 `yyyy-MM-dd HH:mm:ss`
|
|
3222
|
+
* 提供,SDK 原样透传,不做格式校验或时区转换。
|
|
3223
|
+
*
|
|
3224
|
+
* 操作投影描述【一次操作】本身的执行进度,与履约对象的领域状态正交。
|
|
3225
|
+
*/
|
|
3226
|
+
listOperations(req?: ListOperationsRequest, signal?: AbortSignal): Promise<PageResult<OperationPageItem>>;
|
|
3227
|
+
/**
|
|
3228
|
+
* 读 — compliance 操作投影详情(compliance gateway S2)。
|
|
3229
|
+
*
|
|
3230
|
+
* `id` 为数值行主键(非 `operationId` 幂等键)。走 GET 读路径(允许 401 单次
|
|
3231
|
+
* 刷新重放)。
|
|
3232
|
+
*/
|
|
3233
|
+
getOperation(id: number, signal?: AbortSignal): Promise<OperationDetail>;
|
|
3234
|
+
/**
|
|
3235
|
+
* 创建合同模板(写)。
|
|
3236
|
+
*
|
|
3237
|
+
* 走 compliance 写路径——发送前 `ensureToken` 一次、不自动重试、`401` 不刷新
|
|
3238
|
+
* 重放;支持 `Idempotency-Key` header(强烈建议调用方持久化幂等键,重试 / 恢复
|
|
3239
|
+
* 时复用,避免重复创建模板)。模板创建后初始状态为 `DRAFT`。
|
|
3240
|
+
*/
|
|
3241
|
+
createContractTemplate(req: CreateContractTemplateRequest, opts?: ComplianceWriteOptions): Promise<ContractTemplateResp>;
|
|
3242
|
+
/**
|
|
3243
|
+
* 更新合同模板(写,仅 DRAFT 状态)。
|
|
3244
|
+
*
|
|
3245
|
+
* 走 compliance 写路径——`Idempotency-Key`、不重试、`401` 不刷新重放。所有字段
|
|
3246
|
+
* 可选,缺省字段视为不修改。服务端在 PUBLISHED / ARCHIVED 状态下会拒绝更新。
|
|
3247
|
+
*/
|
|
3248
|
+
updateContractTemplate(id: number, req: UpdateContractTemplateRequest, opts?: ComplianceWriteOptions): Promise<ContractTemplateResp>;
|
|
3249
|
+
/**
|
|
3250
|
+
* 删除合同模板(写,仅 DRAFT 状态)。
|
|
3251
|
+
*
|
|
3252
|
+
* 走 compliance 写路径——`Idempotency-Key`、不重试、`401` 不刷新重放。服务端
|
|
3253
|
+
* 在 PUBLISHED / ARCHIVED 状态下会拒绝删除——已发布的模板应改走 `archive`。
|
|
3254
|
+
*/
|
|
3255
|
+
deleteContractTemplate(id: number, opts?: ComplianceWriteOptions): Promise<void>;
|
|
3256
|
+
/** 读 — 合同模板详情。 */
|
|
3257
|
+
getContractTemplate(id: number, signal?: AbortSignal): Promise<ContractTemplateResp>;
|
|
3258
|
+
/**
|
|
3259
|
+
* 读 — 合同模板分页列表(compliance gateway S5)。
|
|
3260
|
+
*
|
|
3261
|
+
* 走 GET 读路径(允许 401 单次刷新重放)。返回 yudao `PageResult<T>`
|
|
3262
|
+
* (`{ total, list }`)。所有过滤项可选;`createTimeStart` / `createTimeEnd`
|
|
3263
|
+
* 由调用方按 `yyyy-MM-dd HH:mm:ss` 提供,SDK 原样透传。列表项视图
|
|
3264
|
+
* {@link ContractTemplatePageItem} 不含 `fields`——字段叠加只在详情 / 版本
|
|
3265
|
+
* 快照里返回。
|
|
3266
|
+
*/
|
|
3267
|
+
listContractTemplates(req?: ListContractTemplatesRequest, signal?: AbortSignal): Promise<PageResult<ContractTemplatePageItem>>;
|
|
3268
|
+
/**
|
|
3269
|
+
* 上传合同模板 PDF(写)。
|
|
3270
|
+
*
|
|
3271
|
+
* 走 compliance 写路径——`Idempotency-Key`、不重试、`401` 不刷新重放。请求体
|
|
3272
|
+
* 为 `{ pdfBase64 }`;SDK 不在客户端做 PDF 解析 / 几何校验,原样透传给后端。
|
|
3273
|
+
* 返回上传后的最新模板视图(含 `pdfHash` / `pdfPageCount`)。
|
|
3274
|
+
*/
|
|
3275
|
+
uploadContractTemplatePdf(id: number, req: UploadContractTemplatePdfRequest, opts?: ComplianceWriteOptions): Promise<ContractTemplateResp>;
|
|
3276
|
+
/**
|
|
3277
|
+
* 发布合同模板(写)。DRAFT → PUBLISHED,落版本快照。
|
|
3278
|
+
*
|
|
3279
|
+
* 走 compliance 写路径——`Idempotency-Key`、不重试、`401` 不刷新重放。
|
|
3280
|
+
* publish 后 `currentVersion` 递增,`fields` 与 `pdfHash` 同步固化进版本表。
|
|
3281
|
+
*/
|
|
3282
|
+
publishContractTemplate(id: number, opts?: ComplianceWriteOptions): Promise<ContractTemplateResp>;
|
|
3283
|
+
/**
|
|
3284
|
+
* 归档合同模板(写)。PUBLISHED → ARCHIVED。
|
|
3285
|
+
*
|
|
3286
|
+
* 走 compliance 写路径——`Idempotency-Key`、不重试、`401` 不刷新重放。
|
|
3287
|
+
* 已归档模板只读,不再允许 publish / 编辑 / 删除。
|
|
3288
|
+
*/
|
|
3289
|
+
archiveContractTemplate(id: number, opts?: ComplianceWriteOptions): Promise<ContractTemplateResp>;
|
|
3290
|
+
/**
|
|
3291
|
+
* 读 — 合同模板版本快照列表。
|
|
3292
|
+
*
|
|
3293
|
+
* 走 GET 读路径(允许 401 单次刷新重放)。返回 {@link ContractTemplateVersion}
|
|
3294
|
+
* 普通数组(非 `PageResult`)——每次 publish 落一个不可变快照,记录当时的
|
|
3295
|
+
* `name` / `pdfHash` / `fields` / `statusAtSnapshot`,是离线复核 / 版本对账
|
|
3296
|
+
* 的依据。
|
|
3297
|
+
*/
|
|
3298
|
+
listContractTemplateVersions(id: number, signal?: AbortSignal): Promise<ContractTemplateVersion[]>;
|
|
2251
3299
|
classifyError(err: unknown): ComplianceErrorInfo | null;
|
|
2252
3300
|
/**
|
|
2253
3301
|
* 读路径:GET / 公开 verify。允许 401 单次刷新后重放(GET 幂等安全)。
|
|
@@ -2336,4 +3384,4 @@ declare module '@acosmi/sdk-ts' {
|
|
|
2336
3384
|
}
|
|
2337
3385
|
}
|
|
2338
3386
|
|
|
2339
|
-
export { type APIResponse, type AgentRun, type AgentRunArtifact, type AgentRunArtifactList, type AgentRunArtifactPolicy, type AgentRunCreateRequest, type AgentRunCreateResponse, type AgentRunDownload, type AgentRunErrorPayload, type AgentRunLocalContextPolicy, type AgentRunLocalToolHandler, type AgentRunLocalToolHandlerContext, type AgentRunLocalToolResult, type AgentRunRunOptions, type AgentRunSettlement, type AgentRunStatus, AgentRunStreamError, type AgentRunStreamEvent, type AgentRunStreamOptions, type AgentRunUsage, type AgentRunWithLocalToolsOptions, AgentRunsClient, AnthropicResponse, type ApproveSealApprovalQuery, type AuthorizeResult, type BalanceDetail, type BlockMeta, type BrowserRefreshMode, type BugReportResult, type BugView, BusinessError, type CancelSealApprovalQuery, type CertificationStatus, ChatRequest, ChatResponse, Client, type ClientRegistration, type ComplianceAssetType, type ComplianceBillingDisplayStatus, ComplianceClient, type ComplianceClientErrorCode, type ComplianceDigestSource, type ComplianceEnvelopeStatus, type ComplianceErrorInfo, type ComplianceErrorKey, type ComplianceHashAlgorithm, CompliancePollError, type CompliancePollOptions, type CompliancePrivacyLevel, type ComplianceProviderRequestStatus, type ComplianceProviderStatus, type ComplianceReport, type ComplianceScope, type ComplianceSealApprovalStatus, type ComplianceTimestampVerificationStatus, type ComplianceWriteOptions, type Config, type ConsumeRecord, type ConsumeRecordPage, type CreateEvidenceAssetRequest, type CreateH5SigningUrlRequest, type CreateReportRequest, type CreateSigningEnvelopeRequest, type CreateWebAuthorizationRequestOptions, DefaultRetryPolicy, type DeviceRegistration, type EntitlementBalance, type EntitlementItem, ErrAuthDenied, ErrBillingCallbackCannotCommit, ErrBillingCommitRequiresLocalVerify, ErrBillingS2sForbidden, ErrBrowserOpen, ErrComplianceStepUpRequired, ErrDiscovery, ErrEnvelopeGateClosed, ErrOAuthCORSBlocked, ErrProviderNotConfigured, ErrProviderUnknownNoRetry, ErrRefreshProxyFailed, ErrRegistration, ErrSSLProxy, ErrSealApprovalContractHashMismatch, ErrSealApprovalExpired, ErrSealApprovalLocationMismatch, ErrSealApprovalNonceUsed, ErrSealApprovalNotApproved, ErrSealApprovalSealMismatch, ErrSealApprovalTransactorMismatch, ErrSealUseAlreadyConsumed, ErrStateMismatch, ErrTimeout, ErrTokenExchange, ErrTokenExpired, EventAuthURL, EventComplete, EventError, type EvidenceAsset, type EvidencePackage, FileTokenStore, type FilterStatus, FilterStatusAdminBypass, FilterStatusDisabledByFlag, FilterStatusFallbackMissingUser, FilterStatusFallbackNoBuckets, FilterStatusFallbackTkdistError, FilterStatusFallbackTkdistSkew, FilterStatusInternalBypass, FilterStatusOK, FilterStatusUnknown, type GenerateSkillRequest, type GenerateSkillResult, HTTPError, InMemoryTokenStore, InputModality, type IssueTimestampRequest, LocalStorageTokenStore, type LoginErrCode, type LoginEvent, type LoginEventType, type LoginOptions, ManagedModel, type ModelBucket, type ModelByQuotaResponse, ModelCapabilities, type ModelCoefficient, ModelNotFoundError, NetworkError, type Notification, type NotificationList, type NotificationPreference, type NotificationUnreadCount, type OAuthMetadataProfile, type OpenAIChatChoice, type OpenAIChatMessage, type OpenAIChatResponse, type OpenAIFunctionCall, type OpenAIStreamChoice, type OpenAIStreamChunk, type OpenAIStreamDelta, type OpenAIStreamToolCall, type OpenAIToolCall, type OpenAIUsage, type OptimizeSkillRequest, type OptimizeSkillResult, type Order, type OrderStatus, OrderTerminalError, type PayPayload, ProviderAdapter, type ProviderRequestStatusView, type PublicEvidenceVerifyResult, QuotaSummary, RateLimitError, type RegisterWebOAuthClientOptions, type RejectSealApprovalQuery, type ReportDownload, type RetryPolicy, type RetryRequestInfo, ScopeAI, ScopeAccount, ScopeComplianceContractSigningRead, ScopeComplianceContractSigningWrite, ScopeComplianceEvidenceRead, ScopeComplianceEvidenceWrite, ScopeComplianceReportsPublish, ScopeComplianceReportsRead, ScopeComplianceReportsWrite, ScopeComplianceSealApprovalApprove, ScopeComplianceSealApprovalRequest, ScopeComplianceSealManage, ScopeComplianceSealUseExecute, ScopeComplianceTimestampIssue, ScopeComplianceTimestampVerify, ScopeEntitlements, ScopeModels, ScopeModelsChat, ScopeProfile, ScopeSkillStore, ScopeSkills, ScopeTokenPackages, ScopeTools, ScopeToolsExecute, ScopeWallet, ScopeWalletReadonly, type SealApproval, type ServerMetadata, type SignEnvelopeRequest, type SigningEnvelope, type SkillBrowseListResponse, type SkillBrowseResponse, type SkillStoreItem, type SkillStoreListItem, type SkillStoreQuery, type SkillSummary, SourcesEvent, StreamError, StreamEvent, StreamSettlement, type SubmitSealApprovalRequest, type TimestampToken, type TimestampVerifyResult, type TokenPackage, type TokenResponse, type TokenSet, type TokenStore, type ToolListResponse, type ToolProvider, type ToolView, type Transaction, type VerifyTimestampRequest, type WSConfig, type WSEvent, type WalletStats, type WebAuthorizationCallbackParams, type WebAuthorizationPending, type WebAuthorizationRequest, type YudaoPageResult, allScopes, apiResponseBusinessError, apiResponseGetMessage, authorize, buildBetas, classifyComplianceError, commerceScopes, completeWebAuthorizationRequest, complianceScopes, computeBackoff, createWebAuthorizationRequest, defaultRetryable, defaultSafeToRetry, discover, discoverWebOAuthMetadata, discoverWithProfile, effectivePolicy, exchangeCode, extractAnthropicBlockMeta, fileLockDefaults, findDesktopVisualUnderstandingModel, findFirstModelByInputModality, generateState, isBillingConfirmable, isComplianceBusinessError, isComplianceTerminalError, isSSLError, modelScopes, modelSupportsImageInput, modelSupportsInputModality, newFileTokenStore, newTokenSet, parseNotificationEvent, refreshToken, register, registerWebOAuthClient, revokeToken, skillScopes, tokenSetIsExpired, uniqueMerge };
|
|
3387
|
+
export { type APIResponse, type AgentRun, type AgentRunArtifact, type AgentRunArtifactList, type AgentRunArtifactPolicy, type AgentRunCreateRequest, type AgentRunCreateResponse, type AgentRunDownload, type AgentRunErrorPayload, type AgentRunLocalContextPolicy, type AgentRunLocalToolHandler, type AgentRunLocalToolHandlerContext, type AgentRunLocalToolResult, type AgentRunRunOptions, type AgentRunSettlement, type AgentRunStatus, AgentRunStreamError, type AgentRunStreamEvent, type AgentRunStreamOptions, type AgentRunUsage, type AgentRunWithLocalToolsOptions, AgentRunsClient, AnthropicResponse, type ApiClientRef, type ApproveSealApprovalQuery, type AuthorizeResult, type BalanceDetail, type BillingPreflightResult, type BlockMeta, type BrowserRefreshMode, type BugReportResult, type BugView, BusinessError, type CancelSealApprovalQuery, type CertificationStatus, ChatRequest, ChatResponse, Client, type ClientRegistration, type ComplianceAssetType, type ComplianceBillingDisplayStatus, type ComplianceCapability, ComplianceClient, type ComplianceClientErrorCode, type ComplianceDigestSource, type ComplianceEnvelopeStatus, type ComplianceErrorInfo, type ComplianceErrorKey, type ComplianceHashAlgorithm, CompliancePollError, type CompliancePollOptions, type CompliancePrivacyLevel, type ComplianceProviderRequestStatus, type ComplianceProviderStatus, type ComplianceReport, type ComplianceScope, type ComplianceSealApprovalStatus, type ComplianceTimestampVerificationStatus, type ComplianceWriteOptions, type Config, type ConsumeRecord, type ConsumeRecordPage, type ContractTemplateField, type ContractTemplateFieldType, type ContractTemplatePageItem, type ContractTemplateResp, type ContractTemplateStatus, type ContractTemplateVersion, type CreateContractTemplateRequest, type CreateEvidenceAssetRequest, type CreateH5SigningUrlRequest, type CreateReportRequest, type CreateSigningEnvelopeRequest, type CreateWebAuthorizationRequestOptions, DefaultRetryPolicy, type DeviceRegistration, type EntitlementBalance, type EntitlementItem, type EnvelopeContractItem, ErrAuthDenied, ErrBillingCallbackCannotCommit, ErrBillingCommitRequiresLocalVerify, ErrBillingS2sForbidden, ErrBrowserOpen, ErrComplianceStepUpRequired, ErrDiscovery, ErrEnvelopeGateClosed, ErrOAuthCORSBlocked, ErrProviderNotConfigured, ErrProviderUnknownNoRetry, ErrRefreshProxyFailed, ErrRegistration, ErrSSLProxy, ErrSealApprovalContractHashMismatch, ErrSealApprovalExpired, ErrSealApprovalLocationMismatch, ErrSealApprovalNonceUsed, ErrSealApprovalNotApproved, ErrSealApprovalSealMismatch, ErrSealApprovalTransactorMismatch, ErrSealUseAlreadyConsumed, ErrStateMismatch, ErrTimeout, ErrTokenExchange, ErrTokenExpired, EventAuthURL, EventComplete, EventError, type EvidenceAsset, type EvidenceAssetPageItem, type EvidencePackage, type EvidencePackagePageItem, type FeatureGateState, type FeatureGateStatus, FileTokenStore, type FilterStatus, FilterStatusAdminBypass, FilterStatusDisabledByFlag, FilterStatusFallbackMissingUser, FilterStatusFallbackNoBuckets, FilterStatusFallbackTkdistError, FilterStatusFallbackTkdistSkew, FilterStatusInternalBypass, FilterStatusOK, FilterStatusUnknown, type GateQuota, type GenerateSkillRequest, type GenerateSkillResult, HTTPError, type IdempotencyKey, IdempotencyKeyHeader, InMemoryTokenStore, InputModality, type IssueTimestampRequest, type ListContractTemplatesRequest, type ListEvidenceAssetsRequest, type ListEvidencePackagesRequest, type ListOperationsRequest, type ListReportsRequest, type ListSealApprovalsRequest, type ListSealUsesRequest, type ListSigningEnvelopesRequest, type ListTimestampsRequest, LocalStorageTokenStore, type LoginErrCode, type LoginEvent, type LoginEventType, type LoginOptions, ManagedModel, type ModelBucket, type ModelByQuotaResponse, ModelCapabilities, type ModelCoefficient, ModelNotFoundError, NetworkError, type Notification, type NotificationList, type NotificationPreference, type NotificationUnreadCount, type OAuthMetadataProfile, type OpenAIChatChoice, type OpenAIChatMessage, type OpenAIChatResponse, type OpenAIFunctionCall, type OpenAIStreamChoice, type OpenAIStreamChunk, type OpenAIStreamDelta, type OpenAIStreamToolCall, type OpenAIToolCall, type OpenAIUsage, type OperationDetail, type OperationId, type OperationPageItem, type OperationSource, type OperationStatus, type OptimizeSkillRequest, type OptimizeSkillResult, type Order, type OrderStatus, OrderTerminalError, type PageRequest, type PageResult, type PayPayload, type PrincipalRef, ProviderAdapter, type ProviderRequestStatus, type ProviderRequestStatusView, type PublicEvidenceVerifyResult, QuotaSummary, RETRY_ADVICE_REASONS, RateLimitError, type RegisterWebOAuthClientOptions, type RejectSealApprovalQuery, type ReportDownload, type ReportPageItem, type RetryAdvice, type RetryAdviceReason, type RetryPolicy, type RetryRequestInfo, ScopeAI, ScopeAccount, ScopeComplianceContractSigningRead, ScopeComplianceContractSigningWrite, ScopeComplianceContractTemplateRead, ScopeComplianceContractTemplateWrite, ScopeComplianceEvidenceRead, ScopeComplianceEvidenceWrite, ScopeComplianceReportsPublish, ScopeComplianceReportsRead, ScopeComplianceReportsWrite, ScopeComplianceSealApprovalApprove, ScopeComplianceSealApprovalRequest, ScopeComplianceSealManage, ScopeComplianceSealUseExecute, ScopeComplianceTimestampIssue, ScopeComplianceTimestampVerify, ScopeEntitlements, ScopeModels, ScopeModelsChat, ScopeProfile, ScopeSkillStore, ScopeSkills, ScopeTokenPackages, ScopeTools, ScopeToolsExecute, ScopeWallet, ScopeWalletReadonly, type SealApproval, type SealApprovalPageItem, type SealUsePageItem, type ServerMetadata, type SignEnvelopeRequest, type SigningEnvelope, type SigningEnvelopePageItem, type SkillBrowseListResponse, type SkillBrowseResponse, type SkillStoreItem, type SkillStoreListItem, type SkillStoreQuery, type SkillSummary, type SortDirection, SourcesEvent, type StepUpStatus, StreamError, StreamEvent, StreamSettlement, type SubmitSealApprovalRequest, type TenantRef, type TimestampPageItem, type TimestampToken, type TimestampVerifyResult, type TokenPackage, type TokenResponse, type TokenSet, type TokenStore, type ToolListResponse, type ToolProvider, type ToolView, type Transaction, type TsaProvider, type TsaStats, type UpdateContractTemplateRequest, type UploadContractTemplatePdfRequest, type VerifyStatus, type VerifyTimestampRequest, type VoidEnvelopeRequest, type WSConfig, type WSEvent, type WalletStats, type WebAuthorizationCallbackParams, type WebAuthorizationPending, type WebAuthorizationRequest, type YudaoPageResult, allScopes, apiResponseBusinessError, apiResponseGetMessage, authorize, buildBetas, classifyComplianceError, commerceScopes, completeWebAuthorizationRequest, complianceErrorToRetryAdvice, complianceScopes, computeBackoff, createWebAuthorizationRequest, defaultRetryable, defaultSafeToRetry, discover, discoverWebOAuthMetadata, discoverWithProfile, effectivePolicy, exchangeCode, extractAnthropicBlockMeta, fileLockDefaults, findDesktopVisualUnderstandingModel, findFirstModelByInputModality, generateState, isBillingConfirmable, isComplianceBusinessError, isComplianceTerminalError, isSSLError, modelScopes, modelSupportsImageInput, modelSupportsInputModality, newFileTokenStore, newTokenSet, parseNotificationEvent, refreshToken, register, registerWebOAuthClient, retryReasonForComplianceKey, retryReasonForOAuthError, revokeToken, skillScopes, tokenSetIsExpired, uniqueMerge };
|