@acosmi/sdk-ts 2.4.0 → 2.6.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.
@@ -1,12 +1,12 @@
1
- import { a as AnthropicResponse } from './openai-xKHChcmG.cjs';
2
- export { A as AnthropicContentBlock, b as AnthropicUsage, O as OpenAIAdapter, d as anthropicResponseTextContent, e as anthropicResponseThinkingContent, f as anthropicResponseToolUseBlocks } from './openai-xKHChcmG.cjs';
3
- import { M as ManagedModel, Q as QuotaSummary, j as ModelCapabilities, e as ChatRequest, P as ProviderAdapter, f as ChatResponse, I as ImageGenerationRequest, h as ImageGenerationResponse, V as VideoGenerationRequest, u as VideoTaskResponse, n as StreamEvent, m as SourcesEvent, o as StreamSettlement, i as InputModality } from './index-CI7FM3xe.cjs';
4
- export { B as BucketClassCommercial, a as BucketClassGeneric, b as BucketInfo, c as BucketRow, C as ChatContentBlock, d as ChatMessage, g as ChatUsage, E as EffortConfig, G as GeoLoc, O as OutputConfig, k as ProviderFormat, S as ServerTool, l as ServerToolTypeWebSearch, T as ThinkingConfig, p as ThinkingHigh, q as ThinkingHighMinMaxTokens, r as ThinkingMax, s as ThinkingMaxFallbackMaxTokens, t as ThinkingOff, W as WebSearchConfig, v as WebSearchSource, w as bucketInfoIsCommercial, x as bucketRowIsCommercial, y as getAdapter, z as getAdapterForModel, A as newThinkingConfig, D as newWebSearchTool, F as parseSettlement, H as parseSourcesEvent } from './index-CI7FM3xe.cjs';
1
+ import { a as AnthropicResponse } from './openai-CeM2k04b.cjs';
2
+ export { A as AnthropicContentBlock, b as AnthropicUsage, O as OpenAIAdapter, d as anthropicResponseTextContent, e as anthropicResponseThinkingContent, f as anthropicResponseToolUseBlocks } from './openai-CeM2k04b.cjs';
3
+ import { M as ManagedModel, Q as QuotaSummary, j as ModelCapabilities, e as ChatRequest, P as ProviderAdapter, f as ChatResponse, I as ImageGenerationRequest, h as ImageGenerationResponse, V as VideoGenerationRequest, u as VideoTaskResponse, n as StreamEvent, m as SourcesEvent, o as StreamSettlement, i as InputModality } from './index-BrbgHn0E.cjs';
4
+ export { B as BucketClassCommercial, a as BucketClassGeneric, b as BucketInfo, c as BucketRow, C as ChatContentBlock, d as ChatMessage, g as ChatUsage, E as EffortConfig, G as GeoLoc, O as OutputConfig, k as ProviderFormat, S as ServerTool, l as ServerToolTypeWebSearch, T as ThinkingConfig, p as ThinkingHigh, q as ThinkingHighMinMaxTokens, r as ThinkingMax, s as ThinkingMaxFallbackMaxTokens, t as ThinkingOff, W as WebSearchConfig, v as WebSearchSource, w as bucketInfoIsCommercial, x as bucketRowIsCommercial, y as getAdapter, z as getAdapterForModel, A as newThinkingConfig, D as newWebSearchTool, F as parseSettlement, H as parseSourcesEvent } from './index-BrbgHn0E.cjs';
5
5
  import { M as MinimalSanitizeConfig } from './index-Bah9A83R.cjs';
6
6
  export { A as sanitize } from './index-Bah9A83R.cjs';
7
7
  export { AnthropicAdapter } from './adapters/anthropic.cjs';
8
8
 
9
- /** 权益余额 (聚合) */
9
+ /** 权益余额 (聚合)。token* 单位双体系: 免费=Token / 付费(TOKEN_PACKAGE,SUBSCRIPTION)=微Credits(÷1000=Credits)。 */
10
10
  interface EntitlementBalance {
11
11
  totalTokenQuota: number;
12
12
  totalTokenUsed: number;
@@ -16,9 +16,10 @@ interface EntitlementBalance {
16
16
  totalCallRemaining: number;
17
17
  activeEntitlements: number;
18
18
  }
19
- /** 单条权益明细 */
19
+ /** 单条权益明细。token* 单位由 type 决定: TOKEN_PACKAGE/SUBSCRIPTION=微Credits(÷1000=Credits), 其余=原始Token。 */
20
20
  interface EntitlementItem {
21
21
  id: string;
22
+ /** 权益类型, 也是额度单位判据: TOKEN_PACKAGE/SUBSCRIPTION → 付费(Credits 体系), 其余 → 免费(Token 体系)。 */
22
23
  type: string;
23
24
  status: string;
24
25
  tokenQuota: number;
@@ -31,18 +32,27 @@ interface EntitlementItem {
31
32
  sourceId?: string;
32
33
  sourceType?: string;
33
34
  remark?: string;
34
- createdAt: string;
35
+ /** 仅出现在 /grants map (toEntitlementMap 之外的 grants 端点)。 */
36
+ createdAt?: string;
37
+ /** list (toEntitlementMap) 与 grants 均返回 activatedAt。 */
38
+ activatedAt?: string;
35
39
  }
36
- /** 详细余额 (含每条权益明细) */
40
+ interface BalanceDetailEntitlement {
41
+ id: string;
42
+ sourceOrderId?: string;
43
+ status: string;
44
+ tokenQuota: number;
45
+ tokenUsed: number;
46
+ expiresAt?: string;
47
+ }
48
+ /** 详细余额 (含每条权益明细)。token* 单位双体系: 免费=Token / 付费=微Credits(÷1000=Credits), 按 entitlements[].id 对应权益 type 区分, 勿跨单位求和。 */
37
49
  interface BalanceDetail {
38
- totalTokenQuota: number;
39
- totalTokenUsed: number;
40
- totalTokenRemaining: number;
41
- totalCallQuota: number;
42
- totalCallUsed: number;
43
- totalCallRemaining: number;
44
- activeEntitlements: number;
45
- entitlements: EntitlementItem[];
50
+ userId: string;
51
+ tokenRemaining: number;
52
+ tokenTotal: number;
53
+ callRemaining: number;
54
+ callTotal: number;
55
+ entitlements: BalanceDetailEntitlement[];
46
56
  }
47
57
  /** 核销记录 */
48
58
  interface ConsumeRecord {
@@ -53,6 +63,12 @@ interface ConsumeRecord {
53
63
  tokensConsumed: number;
54
64
  status: string;
55
65
  createdAt: string;
66
+ reservedTokens?: number;
67
+ callsConsumed?: number;
68
+ inputTokens?: number;
69
+ outputTokens?: number;
70
+ cacheReadTokens?: number;
71
+ cacheCreateTokens?: number;
56
72
  }
57
73
  /** 核销记录分页响应 */
58
74
  interface ConsumeRecordPage {
@@ -92,6 +108,7 @@ interface ModelByQuotaResponse {
92
108
  primaryBucket?: ModelBucket;
93
109
  }
94
110
  /** 单条模型系数 (SDK TTL 8s 缓存源) */
111
+ /** @deprecated 系数管理已退役 (raw 1:1 计费)。网关 /entitlements/coefficients 永久返回 []。本类型仅为向后兼容保留。 */
95
112
  interface ModelCoefficient {
96
113
  modelId: string;
97
114
  tenantId: string;
@@ -102,49 +119,84 @@ interface ModelCoefficient {
102
119
  version: number;
103
120
  effectiveAt: string;
104
121
  }
105
- /** 流量包商品。price string (Go json.Number) 避免浮点精度丢失。 */
122
+ /** 流量包商品。形状对齐 ConsumerPublicController.toProductView (/api/products 端点, /token-packages 代理转发) */
106
123
  interface TokenPackage {
107
124
  id: string;
108
125
  name: string;
109
126
  description?: string;
110
- tokenQuota: number;
111
- callQuota?: number;
112
- price: string;
113
- validDays: number;
114
- isEnabled: boolean;
115
- sortOrder?: number;
116
- }
117
- /** 订单。amount 用 string (Go json.Number) 避免精度丢失。 */
118
- interface Order {
119
- id: string;
120
- packageId: string;
121
- packageName?: string;
122
- amount: string;
123
- status: string;
124
- payUrl?: string;
125
- createdAt: string;
126
- }
127
- /** 订单状态 */
128
- interface OrderStatus {
129
- orderId: string;
130
- status: string;
131
- }
127
+ originalPriceCent: number;
128
+ campaignPriceCent: number;
129
+ renewalPriceCent: number;
130
+ /** 折扣率 0~1 (BigDecimal, JSON 数字); 0 表示无折扣 */
131
+ discountRate: number;
132
+ modelsJson?: string;
133
+ productImage?: string;
134
+ features?: string[];
135
+ billingCycle: string;
136
+ featured: boolean;
137
+ eyebrow?: string;
138
+ promo?: string;
139
+ usage?: string;
140
+ sortOrder: number;
141
+ }
142
+ /** 支付方式枚举字面量 (来自 /payment-options)。 */
143
+ type PaymentMethod = 'WECHAT_NATIVE' | 'ALIPAY_PRECREATE' | 'BANK_TRANSFER';
132
144
  /** 下单请求 */
133
145
  interface PayPayload {
134
- payMethod?: string;
146
+ /** 支付方式枚举字面量 (来自 /payment-options)。字段名必须是 paymentMethod (后端 BuyRequest.paymentMethod)。 */
147
+ paymentMethod?: PaymentMethod;
148
+ deviceId?: string;
149
+ /** 幂等请求 ID */
150
+ clientRequestId?: string;
151
+ }
152
+ /** 下单 / 订单状态响应 (OrderPaymentService.BuyResponse, buy 与状态查询共用)。 */
153
+ interface BuyResponse {
154
+ orderId: number;
155
+ orderNo: string;
156
+ productId?: string;
157
+ productName?: string;
158
+ amountFen: number;
159
+ orderStatus: string;
160
+ paymentMethod: string;
161
+ paymentStatus: string;
162
+ qrCodeContent?: string;
163
+ payUrl?: string;
164
+ paymentExpiresAt?: string;
165
+ /** 对公转账信息 (BANK_TRANSFER 时), 形状为后端嵌套对象 */
166
+ bankTransferInfo?: Record<string, unknown>;
167
+ }
168
+ /** 我的订单列表行 (toOrderMap)。 */
169
+ interface OrderListItem {
170
+ id: string;
171
+ bizOrderId?: string;
172
+ productName?: string;
173
+ amountCent: number;
174
+ originalPriceCent?: number;
175
+ discountRate?: string;
176
+ paymentMethod?: string;
177
+ payStatus: string;
178
+ commissionStatus?: string;
179
+ issueStatus?: string;
180
+ channelCode?: string;
181
+ createdAt?: string;
182
+ payTime?: string;
135
183
  }
136
- /** 钱包统计。金额使用 string (Go json.Number) 避免浮点精度丢失 (金融安全) */
184
+ /** @deprecated 旧形状与任何真实端点都不符; buy/状态查询改用 BuyResponse, 列表用 OrderListItem。 */
185
+ type Order = BuyResponse;
186
+ /** @deprecated getOrderStatus 现返回 BuyResponse (无 status 字段)。 */
187
+ type OrderStatus = BuyResponse;
188
+ /** 钱包统计。 */
137
189
  interface WalletStats {
138
- balance: string;
139
- monthlyConsumption: string;
140
- monthlyRecharge: string;
190
+ balance: number;
191
+ monthlyConsumption: number;
192
+ monthlyRecharge: number;
141
193
  transactionCount: number;
142
194
  }
143
195
  /** 交易记录 */
144
196
  interface Transaction {
145
197
  id: string;
146
198
  type: string;
147
- amount: string;
199
+ amount: number;
148
200
  remark?: string;
149
201
  createdAt: string;
150
202
  }
@@ -178,6 +230,14 @@ interface TokenSet {
178
230
  }
179
231
  /** token 是否已过期 (提前 30 秒视为过期) */
180
232
  declare function tokenSetIsExpired(t: TokenSet): boolean;
233
+ /**
234
+ * 运行时校验任意值是否为合法 TokenSet 形状 (所有字段都是 string)。
235
+ *
236
+ * store 反序列化磁盘 / localStorage 的 JSON 后必须经此校验:
237
+ * 损坏文件、旧版本残留、缺字段都会被判为无效, 由 caller 当作"无 token"重新登录,
238
+ * 而不是把 `{}` / 缺字段对象直接 cast 成 TokenSet 后在 refresh 阶段炸出难懂的错误。
239
+ */
240
+ declare function isValidTokenSet(x: unknown): x is TokenSet;
181
241
  /** 动态注册响应 */
182
242
  interface ClientRegistration {
183
243
  client_id: string;
@@ -203,7 +263,7 @@ type OAuthMetadataProfile = 'web' | 'desktop';
203
263
  * profile='desktop' 对应桌面 loopback OAuth;profile='web' 对应浏览器 Web OAuth。
204
264
  * 内部 helper — `discover` / `discoverWebOAuthMetadata` 是其薄包装。
205
265
  */
206
- declare function discoverWithProfile(serverURL: string, profile: OAuthMetadataProfile, signal?: AbortSignal): Promise<ServerMetadata>;
266
+ declare function discoverWithProfile(serverURL: string, profile: OAuthMetadataProfile, signal?: AbortSignal, fetchImpl?: typeof fetch): Promise<ServerMetadata>;
207
267
  /**
208
268
  * 从 well-known 端点获取 Desktop OAuth 服务元数据。
209
269
  *
@@ -211,7 +271,7 @@ declare function discoverWithProfile(serverURL: string, profile: OAuthMetadataPr
211
271
  * well-known 端点按 RFC 8414 必须在 origin 根路径:
212
272
  * https://acosmi.ai/.well-known/oauth-authorization-server/desktop
213
273
  */
214
- declare function discover(serverURL: string, signal?: AbortSignal): Promise<ServerMetadata>;
274
+ declare function discover(serverURL: string, signal?: AbortSignal, fetchImpl?: typeof fetch): Promise<ServerMetadata>;
215
275
  /**
216
276
  * 从 well-known 端点获取 Web OAuth 服务元数据。
217
277
  *
@@ -222,9 +282,9 @@ declare function discover(serverURL: string, signal?: AbortSignal): Promise<Serv
222
282
  * 它返回 Web authorize/token 端点; `discover` 的 desktop profile 返回的是
223
283
  * 桌面 loopback 端点, 不可混用。
224
284
  */
225
- declare function discoverWebOAuthMetadata(serverURL: string, signal?: AbortSignal): Promise<ServerMetadata>;
285
+ declare function discoverWebOAuthMetadata(serverURL: string, signal?: AbortSignal, fetchImpl?: typeof fetch): Promise<ServerMetadata>;
226
286
  /** 动态注册桌面客户端,获取 client_id */
227
- declare function register(meta: ServerMetadata, appName: string, signal?: AbortSignal): Promise<ClientRegistration>;
287
+ declare function register(meta: ServerMetadata, appName: string, signal?: AbortSignal, fetchImpl?: typeof fetch): Promise<ClientRegistration>;
228
288
  /** Web OAuth 动态注册参数 */
229
289
  interface RegisterWebOAuthClientOptions {
230
290
  /** 客户端展示名 (RFC 7591 client_name) */
@@ -241,7 +301,7 @@ interface RegisterWebOAuthClientOptions {
241
301
  * 本函数允许传入任意 Web redirect_uri,供 csign 等第一方 Web 应用使用。
242
302
  * `token_endpoint_auth_method` 仍为 `none` (PKCE public client)。
243
303
  */
244
- declare function registerWebOAuthClient(meta: ServerMetadata, opts: RegisterWebOAuthClientOptions, signal?: AbortSignal): Promise<ClientRegistration>;
304
+ declare function registerWebOAuthClient(meta: ServerMetadata, opts: RegisterWebOAuthClientOptions, signal?: AbortSignal, fetchImpl?: typeof fetch): Promise<ClientRegistration>;
245
305
  /**
246
306
  * 生成 OAuth `state` 参数 — 32 字节加密随机数, base64url 无填充。
247
307
  *
@@ -377,12 +437,12 @@ interface WebAuthorizationCallbackParams {
377
437
  * state 不匹配时抛错 (CSRF 防护)。内部依次:
378
438
  * discoverWebOAuthMetadata(pending.serverURL) → exchangeCode(...) → newTokenSet(...)。
379
439
  */
380
- declare function completeWebAuthorizationRequest(pending: WebAuthorizationPending, params: WebAuthorizationCallbackParams, signal?: AbortSignal): Promise<TokenSet>;
381
- declare function exchangeCode(meta: ServerMetadata, clientID: string, code: string, redirectURI: string, codeVerifier: string, signal?: AbortSignal): Promise<TokenResponse>;
440
+ declare function completeWebAuthorizationRequest(pending: WebAuthorizationPending, params: WebAuthorizationCallbackParams, signal?: AbortSignal, fetchImpl?: typeof fetch): Promise<TokenSet>;
441
+ declare function exchangeCode(meta: ServerMetadata, clientID: string, code: string, redirectURI: string, codeVerifier: string, signal?: AbortSignal, fetchImpl?: typeof fetch): Promise<TokenResponse>;
382
442
  /** 刷新 access_token */
383
- declare function refreshToken(meta: ServerMetadata, clientID: string, refreshTokenValue: string, signal?: AbortSignal): Promise<TokenResponse>;
443
+ declare function refreshToken(meta: ServerMetadata, clientID: string, refreshTokenValue: string, signal?: AbortSignal, fetchImpl?: typeof fetch): Promise<TokenResponse>;
384
444
  /** 吊销 token. 服务端不支持吊销时静默跳过. */
385
- declare function revokeToken(meta: ServerMetadata, token: string, signal?: AbortSignal): Promise<void>;
445
+ declare function revokeToken(meta: ServerMetadata, token: string, signal?: AbortSignal, fetchImpl?: typeof fetch): Promise<void>;
386
446
  /**
387
447
  * 从 TokenResponse 构造可持久化的 TokenSet
388
448
  *
@@ -588,6 +648,23 @@ declare const DEFAULT_GATEWAY_BASE_URL = "https://acosmi.com";
588
648
  * 都应在写入 Acosmi base 之前调用它一次,避免 ws/wss 误入 SDK API client。
589
649
  */
590
650
  declare function normalizeGatewayBaseURL(input: unknown): string;
651
+ /**
652
+ * normalizeOverrideBaseURL — 校验并归一化 override base URL (complianceBaseURL / apiBaseURL)。
653
+ *
654
+ * 与 `normalizeGatewayBaseURL` 同级的健壮性校验, 但用于 compliance / 开放 API 的同源直连 base:
655
+ * 1. 必须是 string 且非空。
656
+ * 2. 必须可被 `new URL()` 解析, 且协议为 `http:` / `https:` (ws/wss 不允许)。
657
+ * 3. host 必须非空; 不允许 query / hash (override base 不带 query)。
658
+ * 4. 返回值去尾随 `/` (origin + pathname)。
659
+ *
660
+ * 注意: helper 只校验 base URL 合法性, 不强加路径后缀 — compliance 走 `/admin-api`、
661
+ * apiBaseURL 走 `/api/v4` 都由各自 `complianceURL()` / `apiURL()` 在 base 之上追加,
662
+ * base 本身不含这些子路径。
663
+ *
664
+ * @param raw 原始配置值
665
+ * @param label 出错信息里的字段名 (如 'complianceBaseURL')
666
+ */
667
+ declare function normalizeOverrideBaseURL(raw: string, label: string): string;
591
668
  /** 客户端配置 */
592
669
  interface Config {
593
670
  /**
@@ -685,6 +762,14 @@ type BrowserRefreshMode = 'direct' | 'server-proxy' | 'none';
685
762
  declare const ErrOAuthCORSBlocked: "oauth_cors_blocked";
686
763
  declare const ErrRefreshProxyFailed: "refresh_proxy_failed";
687
764
  declare const ErrTokenExpired: "token_expired";
765
+ /**
766
+ * 非流式 JSON API 请求的默认超时 (毫秒)。
767
+ *
768
+ * 子 client (agent-runs / compliance) 的同步 JSON 调用未传 signal 时套用此上限,
769
+ * 避免上游 hang 导致 Promise 永不 settle。流式 (SSE) / 下载等长连接路径**不**套此超时,
770
+ * 以保留长连接语义。与 core doJSONFullInternal 的 30s 量级一致。
771
+ */
772
+ declare const DEFAULT_API_TIMEOUT_MS = 60000;
688
773
  interface Deferred<T> {
689
774
  promise: Promise<T>;
690
775
  resolve: (v: T) => void;
@@ -970,6 +1055,16 @@ declare class Client {
970
1055
  * 不做 401 重试 (公共端点不应要求认证)
971
1056
  */
972
1057
  doPublicJSON<T>(method: string, path: string, body: unknown | null, signal?: AbortSignal): Promise<T>;
1058
+ /**
1059
+ * 给子 client (agent-runs / compliance) 用的请求超时组合器。
1060
+ *
1061
+ * 返回一个 controller, 其 `signal` 同时受默认/指定超时与外部 `parent` signal 约束 —
1062
+ * 二者任一触发都会 abort (用户传入的 signal 仍然生效)。调用方**必须**在 finally 里
1063
+ * `dispose()` 清掉定时器与监听, 否则 timer 泄漏。
1064
+ *
1065
+ * 仅用于非流式 JSON 请求; 流式 (SSE) / 下载路径不应套短超时 (会切断长连接)。
1066
+ */
1067
+ withRequestTimeout(ms: number, parent?: AbortSignal): ReqTimeoutCtl;
973
1068
  /**
974
1069
  * fetch 包装 — 错误经 classifyTransport 转 NetworkError
975
1070
  * 6 处原始 fetch() 全部走此 helper
@@ -997,6 +1092,10 @@ declare class Client {
997
1092
  body?: string;
998
1093
  }, signal?: AbortSignal): Promise<Response>;
999
1094
  }
1095
+ interface ReqTimeoutCtl {
1096
+ signal: AbortSignal;
1097
+ dispose(): void;
1098
+ }
1000
1099
 
1001
1100
  declare module '@acosmi/sdk-ts' {
1002
1101
  interface Client {
@@ -1464,6 +1563,14 @@ declare const ScopeRemoteControlAgentRun = "remote_control:agent-run";
1464
1563
  declare const ScopeRemoteControlSessionControl = "remote_control:session-control";
1465
1564
  /** 代表用户提交远控权限审批响应 (allow / deny / timeout). */
1466
1565
  declare const ScopeRemoteControlPermissionResponse = "remote_control:permission-response";
1566
+ /** 第三方聊天集成桥接 (分组 scope, 服务端 ScopeExpansion 展开为 read/write/rotate)。凭证管理高风险, 不进 allScopes()。 */
1567
+ declare const ScopeChatBridge = "chat_bridge";
1568
+ /** 查询 integration / session / 凭证元数据 (仅 ref+fingerprint)。 */
1569
+ declare const ScopeChatBridgeRead = "chat_bridge:read";
1570
+ /** 创建 / 更新 integration 与凭证。 */
1571
+ declare const ScopeChatBridgeWrite = "chat_bridge:write";
1572
+ /** 轮换 / 吊销凭证 (高风险)。 */
1573
+ declare const ScopeChatBridgeRotate = "chat_bridge:rotate";
1467
1574
  /** @deprecated 旧细粒度 scope, 保留向后兼容, 新代码请用分组 scope */
1468
1575
  declare const ScopeModels = "models";
1469
1576
  /** @deprecated */
@@ -1497,6 +1604,10 @@ declare function skillScopes(): string[];
1497
1604
  * 为 3 个子 scope. 调用方需显式申请, allScopes() 不包含本项 (避免桌面登录自动获权).
1498
1605
  */
1499
1606
  declare function remoteControlScopes(): string[];
1607
+ /**
1608
+ * 聊天桥接 scope (推荐). 仅返回分组 ScopeChatBridge; 服务端展开为 3 子 scope。调用方需显式申请, allScopes() 不含。
1609
+ */
1610
+ declare function chatBridgeScopes(): string[];
1500
1611
 
1501
1612
  interface OpenAIChatResponse {
1502
1613
  id: string;
@@ -1660,8 +1771,10 @@ declare module '@acosmi/sdk-ts' {
1660
1771
  getByModel(modelID: string, signal?: AbortSignal): Promise<ModelByQuotaResponse>;
1661
1772
  /** 列出当前用户的全部桶 */
1662
1773
  listBuckets(signal?: AbortSignal): Promise<ModelBucket[]>;
1774
+ /** @deprecated 系数已退役, 网关恒返回 []。*/
1663
1775
  /** 拉取模型系数表; SDK 自带 8s TTL 内存缓存以减小调用风暴. */
1664
1776
  listCoefficients(signal?: AbortSignal): Promise<ModelCoefficient[]>;
1777
+ /** @deprecated 系数已退役, 网关恒返回 []。*/
1665
1778
  /** 手动失效系数缓存 (admin 调价后建议立即调一次) */
1666
1779
  invalidateCoefficientCache(): void;
1667
1780
  }
@@ -1674,17 +1787,18 @@ declare module '@acosmi/sdk-ts' {
1674
1787
  /** 获取流量包详情 */
1675
1788
  getTokenPackageDetail(packageID: string, signal?: AbortSignal): Promise<TokenPackage>;
1676
1789
  /** 购买流量包 (创建订单) */
1677
- buyTokenPackage(packageID: string, payload: PayPayload | null, signal?: AbortSignal): Promise<Order>;
1790
+ buyTokenPackage(packageID: string, payload: PayPayload | null, signal?: AbortSignal): Promise<BuyResponse>;
1678
1791
  /** 查询订单支付状态 */
1679
- getOrderStatus(orderID: string, signal?: AbortSignal): Promise<OrderStatus>;
1792
+ getOrderStatus(orderID: string, signal?: AbortSignal): Promise<BuyResponse>;
1680
1793
  /** 查询我的订单列表 */
1681
- listMyOrders(signal?: AbortSignal): Promise<Order[]>;
1794
+ listMyOrders(signal?: AbortSignal): Promise<OrderListItem[]>;
1682
1795
  /**
1683
1796
  * 轮询订单支付状态直到终态
1684
- * 成功支付返回 status; 终态失败抛 OrderTerminalError
1797
+ * 成功支付返回 BuyResponse; 终态失败抛 OrderTerminalError
1798
+ * 终态判定基于 paymentStatus (回退 orderStatus)
1685
1799
  * pollIntervalMs <= 0 时默认 2 秒
1686
1800
  */
1687
- waitForPayment(orderID: string, pollIntervalMs: number, signal?: AbortSignal): Promise<OrderStatus>;
1801
+ waitForPayment(orderID: string, pollIntervalMs: number, signal?: AbortSignal): Promise<BuyResponse>;
1688
1802
  }
1689
1803
  }
1690
1804
 
@@ -1968,12 +2082,16 @@ declare module '@acosmi/sdk-ts' {
1968
2082
  /** 删除通知 */
1969
2083
  deleteNotification(id: string, signal?: AbortSignal): Promise<void>;
1970
2084
  /** 注册推送设备 token */
2085
+ /** @experimental 网关尚未提供 /devices/* 与 /notification-preferences/* 端点, 调用将 404。后端实现落地前请勿在生产使用。 */
1971
2086
  registerDevice(reg: DeviceRegistration, signal?: AbortSignal): Promise<void>;
1972
2087
  /** 注销推送设备 token */
2088
+ /** @experimental 网关尚未提供 /devices/* 与 /notification-preferences/* 端点, 调用将 404。后端实现落地前请勿在生产使用。 */
1973
2089
  unregisterDevice(token: string, signal?: AbortSignal): Promise<void>;
1974
2090
  /** 获取通知偏好设置 */
2091
+ /** @experimental 网关尚未提供 /devices/* 与 /notification-preferences/* 端点, 调用将 404。后端实现落地前请勿在生产使用。 */
1975
2092
  listNotificationPreferences(signal?: AbortSignal): Promise<NotificationPreference[]>;
1976
2093
  /** 更新通知偏好 */
2094
+ /** @experimental 网关尚未提供 /devices/* 与 /notification-preferences/* 端点, 调用将 404。后端实现落地前请勿在生产使用。 */
1977
2095
  updateNotificationPreference(typeCode: string, pref: NotificationPreference, signal?: AbortSignal): Promise<void>;
1978
2096
  }
1979
2097
  }
@@ -2385,6 +2503,7 @@ declare class AgentRunsClient {
2385
2503
  private streamGen;
2386
2504
  private requestAPI;
2387
2505
  private requestRaw;
2506
+ private requestRawInner;
2388
2507
  }
2389
2508
 
2390
2509
  declare const ScopeComplianceEvidenceRead = "compliance:evidence:read";
@@ -3633,6 +3752,7 @@ declare class ComplianceClient {
3633
3752
  */
3634
3753
  private write;
3635
3754
  private executeJson;
3755
+ private executeJsonInner;
3636
3756
  private poll;
3637
3757
  }
3638
3758
 
@@ -3708,6 +3828,7 @@ interface SubscriptionPlan {
3708
3828
  planDesc: string;
3709
3829
  billingCycle: string;
3710
3830
  basePriceFen: number;
3831
+ /** 档位标准额度。付费档单位 = 微 Credits (÷1000 = Credits): BASIC 0.6亿 / PRO 3亿 / PRO_MAX 9亿 / ULTRA 24亿 Credits。 */
3711
3832
  tokenQuota: number;
3712
3833
  seatMin?: number | null;
3713
3834
  seatMax?: number | null;
@@ -3720,7 +3841,31 @@ interface SubscriptionPlan {
3720
3841
  /** grant_policy 摘要 (P3 商品中心补) */
3721
3842
  grantPolicyDigest?: Record<string, unknown> | null;
3722
3843
  }
3723
- /** 用户当前订阅状态 (P3 商品中心会扩展) */
3844
+ /** C 端会员中心订阅概览 — 严格对齐网关 GET /entitlements/membership (membership.go membershipResponse) */
3845
+ interface Membership {
3846
+ hasActive: boolean;
3847
+ planCode: string;
3848
+ planName: string;
3849
+ tier: string;
3850
+ billingCycle: string;
3851
+ status: string;
3852
+ expiresAt: string;
3853
+ priceFen: number;
3854
+ /** 周期总额度。有活跃付费订阅 (hasActive=true) 时单位 = 微 Credits (÷1000 = Credits 代币); 免费档 = 原始 Token。 */
3855
+ tokenQuota: number;
3856
+ /** 当前周期已用 (后端 float64)。单位同 tokenQuota: 付费=微Credits / 免费=Token。 */
3857
+ tokenUsed: number;
3858
+ periodStart: string;
3859
+ /** isFree = !hasActive (无活跃付费订阅即免费档) */
3860
+ isFree: boolean;
3861
+ }
3862
+ /** 由活跃权益推导的订阅层级 — 对齐网关 GET /entitlements/subscription (entitlement.go GetSubscription)。 */
3863
+ interface SubscriptionTier {
3864
+ /** "free" | "pro" (后端按权益类型推导) */
3865
+ subscriptionType: string;
3866
+ activeEntitlementTypes: string[];
3867
+ }
3868
+ /** @deprecated 网关未暴露订阅列表端点; 该形状不对应任何真实响应。请改用 Membership + getMembership()。保留仅为向后兼容。 */
3724
3869
  interface UserSubscription {
3725
3870
  id: number;
3726
3871
  userId: string;
@@ -3738,8 +3883,18 @@ declare module '@acosmi/sdk-ts' {
3738
3883
  interface Client {
3739
3884
  /** 列出当前可售订阅计划; audience='PERSONAL'|'ENTERPRISE' 可选过滤 */
3740
3885
  listPlans(audience?: SubscriptionAudience, signal?: AbortSignal): Promise<SubscriptionPlan[]>;
3741
- /** 列出当前用户已激活订阅 (跨档位; 通常 1 条 active) */
3742
- listUserSubscriptions(signal?: AbortSignal): Promise<UserSubscription[]>;
3886
+ /** 查询当前用户会员/订阅概览 (C 端会员中心)。无活跃订阅时 hasActive=false/isFree=true。 */
3887
+ getMembership(signal?: AbortSignal): Promise<Membership>;
3888
+ /** 由活跃权益推导订阅层级 (free/pro)。 */
3889
+ getSubscriptionTier(signal?: AbortSignal): Promise<SubscriptionTier>;
3890
+ /** 订阅支付前绑定硬闸。返回 {ok:true} 表示已绑定手机/邮箱可放行支付。
3891
+ * 未绑定时网关返回 HTTP 403 + 业务码 41001 (doJSON 抛 HTTPError), 调用方应据此引导用户先绑定联系方式再支付。 */
3892
+ subscriptionPrecheck(signal?: AbortSignal): Promise<{
3893
+ ok: boolean;
3894
+ }>;
3895
+ /** @deprecated 网关无订阅列表端点; 旧实现打 /distribution/user/subscriptions 恒 404。改用 getMembership()。
3896
+ * 本方法现委托 getMembership(): 有活跃订阅返回单元素数组, 否则空数组。 */
3897
+ listUserSubscriptions(signal?: AbortSignal): Promise<Membership[]>;
3743
3898
  /**
3744
3899
  * 按 planCode 精确取单个可售订阅计划 (V41 起 planCode 在 active 内唯一)。
3745
3900
  * 复用 listPlans 客户端过滤, 未命中返回 null。减少 C 端按字段手筛 (deep-review §12.3)。
@@ -4029,32 +4184,59 @@ interface LegalServiceSku {
4029
4184
 
4030
4185
  declare module '@acosmi/sdk-ts' {
4031
4186
  interface Client {
4032
- /** 列出已认证律师 (公开端点, 仅返回 VERIFIED + ACTIVE 状态; PII L3 字段已脱敏). */
4187
+ /**
4188
+ * 列出已认证律师 (公开端点, 仅返回 VERIFIED + ACTIVE 状态; PII L3 字段已脱敏).
4189
+ * @experimental 对应后端 consumer 端点尚未实现 (casehall 模块当前仅 getMyLawyerCredentialStatus 在产); 调用将返回 404。
4190
+ */
4033
4191
  listLawyers(params?: {
4034
4192
  practiceArea?: string;
4035
4193
  location?: string;
4036
4194
  pageNo?: number;
4037
4195
  pageSize?: number;
4038
4196
  }, signal?: AbortSignal): Promise<LawyerSummary[]>;
4039
- /** 获取律师公开详情 (脱敏)。 */
4197
+ /**
4198
+ * 获取律师公开详情 (脱敏)。
4199
+ * @experimental 对应后端 consumer 端点尚未实现 (casehall 模块当前仅 getMyLawyerCredentialStatus 在产); 调用将返回 404。
4200
+ */
4040
4201
  getLawyer(id: number, signal?: AbortSignal): Promise<LawyerSummary>;
4041
- /** 提交案件线索 (登录态)。 */
4202
+ /**
4203
+ * 提交案件线索 (登录态)。
4204
+ * @experimental 对应后端 consumer 端点尚未实现 (casehall 模块当前仅 getMyLawyerCredentialStatus 在产); 调用将返回 404。
4205
+ */
4042
4206
  submitCaseLead(req: SubmitCaseLeadRequest, signal?: AbortSignal): Promise<{
4043
4207
  id: number;
4044
4208
  }>;
4045
- /** 我的案件线索列表。 */
4209
+ /**
4210
+ * 我的案件线索列表。
4211
+ * @experimental 对应后端 consumer 端点尚未实现 (casehall 模块当前仅 getMyLawyerCredentialStatus 在产); 调用将返回 404。
4212
+ */
4046
4213
  listMyCaseLeads(signal?: AbortSignal): Promise<CaseLead[]>;
4047
- /** 我的案件列表 (委托后)。 */
4214
+ /**
4215
+ * 我的案件列表 (委托后)。
4216
+ * @experimental 对应后端 consumer 端点尚未实现 (casehall 模块当前仅 getMyLawyerCredentialStatus 在产); 调用将返回 404。
4217
+ */
4048
4218
  getMyCases(signal?: AbortSignal): Promise<CaseMatter[]>;
4049
- /** 预约法律咨询 (skuCode 必填; lawyerId 可选, 留空走 AI 推荐池)。 */
4219
+ /**
4220
+ * 预约法律咨询 (skuCode 必填; lawyerId 可选, 留空走 AI 推荐池)。
4221
+ * @experimental 对应后端 consumer 端点尚未实现 (casehall 模块当前仅 getMyLawyerCredentialStatus 在产); 调用将返回 404。
4222
+ */
4050
4223
  bookConsultation(req: BookConsultationRequest, signal?: AbortSignal): Promise<{
4051
4224
  consultationId: number;
4052
4225
  }>;
4053
- /** 我的咨询单列表。 */
4226
+ /**
4227
+ * 我的咨询单列表。
4228
+ * @experimental 对应后端 consumer 端点尚未实现 (casehall 模块当前仅 getMyLawyerCredentialStatus 在产); 调用将返回 404。
4229
+ */
4054
4230
  listMyConsultations(signal?: AbortSignal): Promise<LegalConsultation[]>;
4055
- /** 我的法律服务订单列表。 */
4231
+ /**
4232
+ * 我的法律服务订单列表。
4233
+ * @experimental 对应后端 consumer 端点尚未实现 (casehall 模块当前仅 getMyLawyerCredentialStatus 在产); 调用将返回 404。
4234
+ */
4056
4235
  listMyLegalOrders(signal?: AbortSignal): Promise<LegalServiceOrder[]>;
4057
- /** 列出公开的 LEGAL_SERVICE SKU (匿名可调用, 复用 dist_compliance_sku benefit_type='LEGAL_SERVICE')。 */
4236
+ /**
4237
+ * 列出公开的 LEGAL_SERVICE SKU (匿名可调用, 复用 dist_compliance_sku benefit_type='LEGAL_SERVICE')。
4238
+ * @experimental 对应后端 consumer 端点尚未实现 (casehall 模块当前仅 getMyLawyerCredentialStatus 在产); 调用将返回 404。
4239
+ */
4058
4240
  listLegalSKUs(region?: string, signal?: AbortSignal): Promise<LegalServiceSku[]>;
4059
4241
  /**
4060
4242
  * 律师自查执业证审核状态 — 返回登录用户作为律师身份提交的所有 credential 列表.
@@ -4621,4 +4803,4 @@ declare function isChannelInboundEvent(v: unknown): v is ChannelInboundEvent;
4621
4803
  */
4622
4804
  declare function asCredentialRef(s: string): CredentialRef;
4623
4805
 
4624
- export { ALL_INTEGRATION_STATUS, ALL_PLATFORMS, ALL_REGIONS, type APIResponse, type AdapterKind, 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 AgentRunRemoteCreateRequest, type AgentRunRunOptions, type AgentRunRuntime, type AgentRunSettlement, type AgentRunStatus, AgentRunStreamError, type AgentRunStreamEvent, type AgentRunStreamOptions, type AgentRunUsage, type AgentRunWithLocalToolsOptions, AgentRunsClient, AnthropicResponse, type ApiClientRef, type ApproveSealApprovalQuery, type AssignSeatRequest, type Audience, AudienceEnum, type AuthorizeResult, type BalanceDetail, type BillingMode, BillingModeEnum, type BillingPreflightResult, type BlockMeta, type BookConsultationRequest, type BridgeThreadRef, type BrowserRefreshMode, type BugReportResult, type BugView, BusinessError, type CancelSealApprovalQuery, type CaseLead, type CaseMatter, type CertificationStatus, type ChannelAttachment, type ChannelCard, type ChannelCardAction, type ChannelInboundEvent, type ChannelOutboundEvent, type ChatBridgeSession, type ChatCredentialPublic, type ChatIntegration, ChatRequest, ChatResponse, type ChatThread, Client, type ClientRegistration, type ComplianceAssetType, type ComplianceBenefitType, 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 ComplianceQuoteResponse, type ComplianceReport, type ComplianceScope, type ComplianceSealApprovalStatus, type ComplianceSku, type ComplianceTimestampVerificationStatus, type ComplianceWriteOptions, type Config, type ConsumeRecord, type ConsumeRecordPage, type ContractTemplateField, type ContractTemplateFieldType, type ContractTemplatePageItem, type ContractTemplateResp, type ContractTemplateStatus, type ContractTemplateVersion, type CorporateTransfer, type CreateContractTemplateRequest, type CreateEvidenceAssetRequest, type CreateH5SigningUrlRequest, type CreateReportRequest, type CreateSigningEnvelopeRequest, type CreateWebAuthorizationRequestOptions, type CredentialRef, DEFAULT_GATEWAY_BASE_URL, DefaultRetryPolicy, type DeviceRegistration, type EnterpriseKycMyStatusView, type EnterpriseMember, type EnterpriseSummary, 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, ImageGenerationRequest, ImageGenerationResponse, InMemoryTokenStore, type InitiateCorporateTransferInput, type InitiateCorporateTransferResult, InputModality, type IntegrationStatus, type InviteMemberRequest, type Invoice, type IssueTimestampRequest, type LawyerCredentialMyView, type LawyerSummary, type LegalConsultation, type LegalServiceOrder, type LegalServiceSku, type LegalSkuCode, 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, OAuthTokenEndpointError, 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 OrgConsumeReport, type OrgSeat, type OrgSubscription, type PageRequest, type PageResult, type PayPayload, type PermissionPolicy, type Platform, type PricingConfig, type PrincipalRef, type Product, type ProductFamily, ProductFamilyEnum, ProviderAdapter, type ProviderRequestStatus, type ProviderRequestStatusView, type PublicEvidenceVerifyResult, type PublicModelSummary, QuotaSummary, RETRY_ADVICE_REASONS, RateLimitError, type RefundPolicy, type RefundRecord, type Region, type RegionScope, RegionScopeEnum, type RegisterWebOAuthClientOptions, type RejectSealApprovalQuery, type RemoteControlDone, type RemoteControlError, type RemoteControlEvent, type RemoteControlEventType, type RemoteControlPermissionRequest, type RemoteControlPermissionResult, type RemoteControlReasoningDelta, type RemoteControlSettle, type RemoteControlStatus, type RemoteControlTextDelta, type RemoteControlToolCall, type RemoteControlToolResult, type RemoteControlUsage, type RemoteSessionPlacement, type RemoteSessionRef, type ReportDownload, type ReportPageItem, type RequestInvoiceInput, type RequestRefundInput, type RetryAdvice, type RetryAdviceReason, type RetryPolicy, type RetryRequestInfo, type RolloverPolicy, type RunnerKind, ScopeAI, ScopeAccount, ScopeComplianceContractSigningRead, ScopeComplianceContractSigningWrite, ScopeComplianceContractTemplateRead, ScopeComplianceContractTemplateWrite, ScopeComplianceEvidenceRead, ScopeComplianceEvidenceWrite, ScopeComplianceReportsPublish, ScopeComplianceReportsRead, ScopeComplianceReportsWrite, ScopeComplianceSealApprovalApprove, ScopeComplianceSealApprovalRequest, ScopeComplianceSealManage, ScopeComplianceSealUseExecute, ScopeComplianceTimestampIssue, ScopeComplianceTimestampVerify, ScopeEntitlements, ScopeModels, ScopeModelsChat, ScopeProfile, ScopeRemoteControl, ScopeRemoteControlAgentRun, ScopeRemoteControlPermissionResponse, ScopeRemoteControlSessionControl, 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 SubmitCaseLeadRequest, type SubmitSealApprovalRequest, type SubscriptionAudience, type SubscriptionPlan, 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 UserSubscription, type VerifyStatus, type VerifyTimestampRequest, VideoGenerationRequest, VideoTaskResponse, type VoidEnvelopeRequest, type WSConfig, type WSEvent, type WalletStats, type WebAuthorizationCallbackParams, type WebAuthorizationPending, type WebAuthorizationRequest, type WorkspacePolicy, type YudaoPageResult, allScopes, apiResponseBusinessError, apiResponseGetMessage, asCredentialRef, authorize, buildBetas, classifyComplianceError, commerceScopes, completeWebAuthorizationRequest, complianceErrorToRetryAdvice, complianceScopes, computeBackoff, createWebAuthorizationRequest, defaultRetryable, defaultSafeToRetry, discover, discoverWebOAuthMetadata, discoverWithProfile, effectivePolicy, exchangeCode, extractAnthropicBlockMeta, fileLockDefaults, findDesktopVisualUnderstandingModel, findFirstModelByInputModality, generateState, isBillingConfirmable, isChannelInboundEvent, isComplianceBusinessError, isComplianceTerminalError, isIntegrationStatus, isInvalidGrantError, isPlatform, isRegion, isSSECommentLine, isSSLError, isTerminalRemoteEvent, maxEndUserIdLength, modelScopes, modelSupportsImageInput, modelSupportsInputModality, newFileTokenStore, newTokenSet, normalizeGatewayBaseURL, parseNotificationEvent, parseRemoteControlEvent, refreshToken, register, registerWebOAuthClient, remoteControlScopes, retryReasonForComplianceKey, retryReasonForOAuthError, revokeToken, skillScopes, tokenSetIsExpired, uniqueMerge, validateEndUserId };
4806
+ export { ALL_INTEGRATION_STATUS, ALL_PLATFORMS, ALL_REGIONS, type APIResponse, type AdapterKind, 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 AgentRunRemoteCreateRequest, type AgentRunRunOptions, type AgentRunRuntime, type AgentRunSettlement, type AgentRunStatus, AgentRunStreamError, type AgentRunStreamEvent, type AgentRunStreamOptions, type AgentRunUsage, type AgentRunWithLocalToolsOptions, AgentRunsClient, AnthropicResponse, type ApiClientRef, type ApproveSealApprovalQuery, type AssignSeatRequest, type Audience, AudienceEnum, type AuthorizeResult, type BalanceDetail, type BalanceDetailEntitlement, type BillingMode, BillingModeEnum, type BillingPreflightResult, type BlockMeta, type BookConsultationRequest, type BridgeThreadRef, type BrowserRefreshMode, type BugReportResult, type BugView, BusinessError, type BuyResponse, type CancelSealApprovalQuery, type CaseLead, type CaseMatter, type CertificationStatus, type ChannelAttachment, type ChannelCard, type ChannelCardAction, type ChannelInboundEvent, type ChannelOutboundEvent, type ChatBridgeSession, type ChatCredentialPublic, type ChatIntegration, ChatRequest, ChatResponse, type ChatThread, Client, type ClientRegistration, type ComplianceAssetType, type ComplianceBenefitType, 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 ComplianceQuoteResponse, type ComplianceReport, type ComplianceScope, type ComplianceSealApprovalStatus, type ComplianceSku, type ComplianceTimestampVerificationStatus, type ComplianceWriteOptions, type Config, type ConsumeRecord, type ConsumeRecordPage, type ContractTemplateField, type ContractTemplateFieldType, type ContractTemplatePageItem, type ContractTemplateResp, type ContractTemplateStatus, type ContractTemplateVersion, type CorporateTransfer, type CreateContractTemplateRequest, type CreateEvidenceAssetRequest, type CreateH5SigningUrlRequest, type CreateReportRequest, type CreateSigningEnvelopeRequest, type CreateWebAuthorizationRequestOptions, type CredentialRef, DEFAULT_API_TIMEOUT_MS, DEFAULT_GATEWAY_BASE_URL, DefaultRetryPolicy, type DeviceRegistration, type EnterpriseKycMyStatusView, type EnterpriseMember, type EnterpriseSummary, 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, ImageGenerationRequest, ImageGenerationResponse, InMemoryTokenStore, type InitiateCorporateTransferInput, type InitiateCorporateTransferResult, InputModality, type IntegrationStatus, type InviteMemberRequest, type Invoice, type IssueTimestampRequest, type LawyerCredentialMyView, type LawyerSummary, type LegalConsultation, type LegalServiceOrder, type LegalServiceSku, type LegalSkuCode, 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 Membership, type ModelBucket, type ModelByQuotaResponse, ModelCapabilities, type ModelCoefficient, ModelNotFoundError, NetworkError, type Notification, type NotificationList, type NotificationPreference, type NotificationUnreadCount, type OAuthMetadataProfile, OAuthTokenEndpointError, 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 OrderListItem, type OrderStatus, OrderTerminalError, type OrgConsumeReport, type OrgSeat, type OrgSubscription, type PageRequest, type PageResult, type PayPayload, type PaymentMethod, type PermissionPolicy, type Platform, type PricingConfig, type PrincipalRef, type Product, type ProductFamily, ProductFamilyEnum, ProviderAdapter, type ProviderRequestStatus, type ProviderRequestStatusView, type PublicEvidenceVerifyResult, type PublicModelSummary, QuotaSummary, RETRY_ADVICE_REASONS, RateLimitError, type RefundPolicy, type RefundRecord, type Region, type RegionScope, RegionScopeEnum, type RegisterWebOAuthClientOptions, type RejectSealApprovalQuery, type RemoteControlDone, type RemoteControlError, type RemoteControlEvent, type RemoteControlEventType, type RemoteControlPermissionRequest, type RemoteControlPermissionResult, type RemoteControlReasoningDelta, type RemoteControlSettle, type RemoteControlStatus, type RemoteControlTextDelta, type RemoteControlToolCall, type RemoteControlToolResult, type RemoteControlUsage, type RemoteSessionPlacement, type RemoteSessionRef, type ReportDownload, type ReportPageItem, type ReqTimeoutCtl, type RequestInvoiceInput, type RequestRefundInput, type RetryAdvice, type RetryAdviceReason, type RetryPolicy, type RetryRequestInfo, type RolloverPolicy, type RunnerKind, ScopeAI, ScopeAccount, ScopeChatBridge, ScopeChatBridgeRead, ScopeChatBridgeRotate, ScopeChatBridgeWrite, ScopeComplianceContractSigningRead, ScopeComplianceContractSigningWrite, ScopeComplianceContractTemplateRead, ScopeComplianceContractTemplateWrite, ScopeComplianceEvidenceRead, ScopeComplianceEvidenceWrite, ScopeComplianceReportsPublish, ScopeComplianceReportsRead, ScopeComplianceReportsWrite, ScopeComplianceSealApprovalApprove, ScopeComplianceSealApprovalRequest, ScopeComplianceSealManage, ScopeComplianceSealUseExecute, ScopeComplianceTimestampIssue, ScopeComplianceTimestampVerify, ScopeEntitlements, ScopeModels, ScopeModelsChat, ScopeProfile, ScopeRemoteControl, ScopeRemoteControlAgentRun, ScopeRemoteControlPermissionResponse, ScopeRemoteControlSessionControl, 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 SubmitCaseLeadRequest, type SubmitSealApprovalRequest, type SubscriptionAudience, type SubscriptionPlan, type SubscriptionTier, 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 UserSubscription, type VerifyStatus, type VerifyTimestampRequest, VideoGenerationRequest, VideoTaskResponse, type VoidEnvelopeRequest, type WSConfig, type WSEvent, type WalletStats, type WebAuthorizationCallbackParams, type WebAuthorizationPending, type WebAuthorizationRequest, type WorkspacePolicy, type YudaoPageResult, allScopes, apiResponseBusinessError, apiResponseGetMessage, asCredentialRef, authorize, buildBetas, chatBridgeScopes, classifyComplianceError, commerceScopes, completeWebAuthorizationRequest, complianceErrorToRetryAdvice, complianceScopes, computeBackoff, createWebAuthorizationRequest, defaultRetryable, defaultSafeToRetry, discover, discoverWebOAuthMetadata, discoverWithProfile, effectivePolicy, exchangeCode, extractAnthropicBlockMeta, fileLockDefaults, findDesktopVisualUnderstandingModel, findFirstModelByInputModality, generateState, isBillingConfirmable, isChannelInboundEvent, isComplianceBusinessError, isComplianceTerminalError, isIntegrationStatus, isInvalidGrantError, isPlatform, isRegion, isSSECommentLine, isSSLError, isTerminalRemoteEvent, isValidTokenSet, maxEndUserIdLength, modelScopes, modelSupportsImageInput, modelSupportsInputModality, newFileTokenStore, newTokenSet, normalizeGatewayBaseURL, normalizeOverrideBaseURL, parseNotificationEvent, parseRemoteControlEvent, refreshToken, register, registerWebOAuthClient, remoteControlScopes, retryReasonForComplianceKey, retryReasonForOAuthError, revokeToken, skillScopes, tokenSetIsExpired, uniqueMerge, validateEndUserId };