@acosmi/sdk-ts 1.6.0 → 2.0.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 +178 -0
- package/README.md +1 -1
- package/dist/browser/index.mjs +394 -1
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.mjs +394 -1
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +397 -0
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +726 -1
- package/dist/node/index.d.ts +726 -1
- package/dist/node/index.mjs +394 -1
- package/dist/node/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/node/index.d.cts
CHANGED
|
@@ -3410,4 +3410,729 @@ declare module '@acosmi/sdk-ts' {
|
|
|
3410
3410
|
}
|
|
3411
3411
|
}
|
|
3412
3412
|
|
|
3413
|
-
|
|
3413
|
+
/** 订阅档位受众 */
|
|
3414
|
+
type SubscriptionAudience = 'PERSONAL' | 'ENTERPRISE';
|
|
3415
|
+
/** 滚存策略 */
|
|
3416
|
+
type RolloverPolicy = 'NONE' | 'PARTIAL' | 'FULL';
|
|
3417
|
+
/** 公开订阅计划 (字段白名单, 不含 feature_gate / seat_rule_json 等内部字段) */
|
|
3418
|
+
interface SubscriptionPlan {
|
|
3419
|
+
id: number;
|
|
3420
|
+
planCode: string;
|
|
3421
|
+
audience: SubscriptionAudience;
|
|
3422
|
+
tierLevel: number;
|
|
3423
|
+
planName: string;
|
|
3424
|
+
planDesc: string;
|
|
3425
|
+
billingCycle: string;
|
|
3426
|
+
basePriceFen: number;
|
|
3427
|
+
tokenQuota: number;
|
|
3428
|
+
seatMin?: number | null;
|
|
3429
|
+
seatMax?: number | null;
|
|
3430
|
+
rolloverPolicy?: RolloverPolicy | null;
|
|
3431
|
+
basePlanCode?: string | null;
|
|
3432
|
+
/** 与 base_plan_code 一组使用; v1 钉死 BASIC=null=1.0 / PRO=5 / PRO_MAX=20 / ULTRA=100 */
|
|
3433
|
+
tkMultiplier?: string | null;
|
|
3434
|
+
/** 同上; v1 钉死 BASIC=null=1.0 / PRO=3.3 / PRO_MAX=10 / ULTRA=33 */
|
|
3435
|
+
priceMultiplier?: string | null;
|
|
3436
|
+
/** grant_policy 摘要 (P3 商品中心补) */
|
|
3437
|
+
grantPolicyDigest?: Record<string, unknown> | null;
|
|
3438
|
+
}
|
|
3439
|
+
/** 用户当前订阅状态 (P3 商品中心会扩展) */
|
|
3440
|
+
interface UserSubscription {
|
|
3441
|
+
id: number;
|
|
3442
|
+
userId: string;
|
|
3443
|
+
planId: number;
|
|
3444
|
+
planCode?: string;
|
|
3445
|
+
audience?: SubscriptionAudience;
|
|
3446
|
+
/** active / paused / cancelled */
|
|
3447
|
+
status: string;
|
|
3448
|
+
/** ISO date — yyyy-MM-dd 字符串 (Java LocalDate.toString) */
|
|
3449
|
+
nextDeductDate?: string | null;
|
|
3450
|
+
agreementNo?: string | null;
|
|
3451
|
+
}
|
|
3452
|
+
|
|
3453
|
+
declare module '@acosmi/sdk-ts' {
|
|
3454
|
+
interface Client {
|
|
3455
|
+
/** 列出当前可售订阅计划; audience='PERSONAL'|'ENTERPRISE' 可选过滤 */
|
|
3456
|
+
listPlans(audience?: SubscriptionAudience, signal?: AbortSignal): Promise<SubscriptionPlan[]>;
|
|
3457
|
+
/** 列出当前用户已激活订阅 (跨档位; 通常 1 条 active) */
|
|
3458
|
+
listUserSubscriptions(signal?: AbortSignal): Promise<UserSubscription[]>;
|
|
3459
|
+
}
|
|
3460
|
+
}
|
|
3461
|
+
|
|
3462
|
+
/** 公开业务参数 (key → 字符串原值, caller 自解析数值/布尔). */
|
|
3463
|
+
type PricingConfig = Record<string, string>;
|
|
3464
|
+
/** 公开模型摘要 (P3 商品中心会扩展) */
|
|
3465
|
+
interface PublicModelSummary {
|
|
3466
|
+
id: string;
|
|
3467
|
+
name: string;
|
|
3468
|
+
modelId: string;
|
|
3469
|
+
provider: string;
|
|
3470
|
+
/** 商品化档位门控: 0=FREE 1=BASIC 2=PRO 3=PRO_MAX 4=ULTRA */
|
|
3471
|
+
minPlanTier?: number;
|
|
3472
|
+
isEnabled: boolean;
|
|
3473
|
+
}
|
|
3474
|
+
/** csign SKU benefit_type. */
|
|
3475
|
+
type ComplianceBenefitType = 'CONTRACT' | 'IDENTITY' | 'EVIDENCE' | 'SEAL';
|
|
3476
|
+
/** csign SKU 公开视图 (字段与 AppCompliancePricingController.PublicSkuResponse 同源).
|
|
3477
|
+
*
|
|
3478
|
+
* 不含 upstreamCostFen / status 等内部字段。 */
|
|
3479
|
+
interface ComplianceSku {
|
|
3480
|
+
skuCode: string;
|
|
3481
|
+
benefitType: ComplianceBenefitType | string;
|
|
3482
|
+
providerProduct?: string;
|
|
3483
|
+
unitPriceFen?: number;
|
|
3484
|
+
overagePriceFen?: number;
|
|
3485
|
+
regionScope?: string;
|
|
3486
|
+
description?: string;
|
|
3487
|
+
/** 套餐覆盖次数: {"PRO":10,"PRO_MAX":50,...} */
|
|
3488
|
+
includedInPlans?: Record<string, number>;
|
|
3489
|
+
}
|
|
3490
|
+
/** 匿名估价响应. 无用户态, 不查覆盖余额. */
|
|
3491
|
+
interface ComplianceQuoteResponse {
|
|
3492
|
+
skuCode: string;
|
|
3493
|
+
regionScope?: string;
|
|
3494
|
+
quantity?: number;
|
|
3495
|
+
unitPriceFen?: number;
|
|
3496
|
+
overagePriceFen?: number;
|
|
3497
|
+
subtotalFen?: number;
|
|
3498
|
+
available?: boolean;
|
|
3499
|
+
benefitType?: string;
|
|
3500
|
+
description?: string;
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
declare module '@acosmi/sdk-ts' {
|
|
3504
|
+
interface Client {
|
|
3505
|
+
/**
|
|
3506
|
+
* 查询公开业务参数. 不传 key → 默认返三件 (tk_to_fen_ratio/usd_cny_rate/freezone_reset_timezone);
|
|
3507
|
+
* 传 key (白名单内) → 仅返该 key. caller 自解析数值/布尔.
|
|
3508
|
+
*/
|
|
3509
|
+
getPricingConfig(key?: string, signal?: AbortSignal): Promise<PricingConfig>;
|
|
3510
|
+
/** 公开模型列表 (P3 商品中心会重做; P1 阶段后端 stub 返空数组) */
|
|
3511
|
+
listPublicModels(signal?: AbortSignal): Promise<PublicModelSummary[]>;
|
|
3512
|
+
/**
|
|
3513
|
+
* 列出 csign 公开 SKU (匿名可调用).
|
|
3514
|
+
* @param region 区域 CN / OS / GLOBAL (空 fallback CN, 同时返回 GLOBAL)
|
|
3515
|
+
*/
|
|
3516
|
+
listComplianceSkus(region?: string, signal?: AbortSignal): Promise<ComplianceSku[]>;
|
|
3517
|
+
/**
|
|
3518
|
+
* 匿名估价 (无用户态, 不查覆盖余额, 仅返回 overage 价 × 数量).
|
|
3519
|
+
* 真实用户报价含套餐覆盖需走登录后服务端 quote 端点。
|
|
3520
|
+
*/
|
|
3521
|
+
quoteCompliance(skuCode: string, quantity?: number, region?: string, signal?: AbortSignal): Promise<ComplianceQuoteResponse>;
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
|
|
3525
|
+
/** 商品族 (与 V47 dist_product_mapping.product_family 对齐) */
|
|
3526
|
+
type ProductFamily = 'MODEL_MEMBERSHIP' | 'TOKEN_PACK' | 'COMPLIANCE' | 'LEGAL' | 'DESIGN_AGENT' | 'ENTERPRISE';
|
|
3527
|
+
/** 受众 */
|
|
3528
|
+
type Audience = 'PERSONAL' | 'ENTERPRISE' | 'DEVELOPER';
|
|
3529
|
+
/** 计费模式 */
|
|
3530
|
+
type BillingMode = 'ONE_TIME' | 'SUBSCRIPTION' | 'METERED' | 'HYBRID';
|
|
3531
|
+
/** 地区范围 */
|
|
3532
|
+
type RegionScope = 'CN' | 'OS' | 'GLOBAL';
|
|
3533
|
+
/** 商品族枚举常量 (供 UI dropdown / 校验使用, 与后端 enum 严格对齐) */
|
|
3534
|
+
declare const ProductFamilyEnum: {
|
|
3535
|
+
readonly MODEL_MEMBERSHIP: "MODEL_MEMBERSHIP";
|
|
3536
|
+
readonly TOKEN_PACK: "TOKEN_PACK";
|
|
3537
|
+
readonly COMPLIANCE: "COMPLIANCE";
|
|
3538
|
+
readonly LEGAL: "LEGAL";
|
|
3539
|
+
readonly DESIGN_AGENT: "DESIGN_AGENT";
|
|
3540
|
+
readonly ENTERPRISE: "ENTERPRISE";
|
|
3541
|
+
};
|
|
3542
|
+
declare const AudienceEnum: {
|
|
3543
|
+
readonly PERSONAL: "PERSONAL";
|
|
3544
|
+
readonly ENTERPRISE: "ENTERPRISE";
|
|
3545
|
+
readonly DEVELOPER: "DEVELOPER";
|
|
3546
|
+
};
|
|
3547
|
+
declare const BillingModeEnum: {
|
|
3548
|
+
readonly ONE_TIME: "ONE_TIME";
|
|
3549
|
+
readonly SUBSCRIPTION: "SUBSCRIPTION";
|
|
3550
|
+
readonly METERED: "METERED";
|
|
3551
|
+
readonly HYBRID: "HYBRID";
|
|
3552
|
+
};
|
|
3553
|
+
declare const RegionScopeEnum: {
|
|
3554
|
+
readonly CN: "CN";
|
|
3555
|
+
readonly OS: "OS";
|
|
3556
|
+
readonly GLOBAL: "GLOBAL";
|
|
3557
|
+
};
|
|
3558
|
+
/**
|
|
3559
|
+
* 公开商品响应 (字段白名单严格).
|
|
3560
|
+
* <p>
|
|
3561
|
+
* 后端 toPublicResponse 仅输出以下字段; 不会出现 featureGateJson / retiredAt / salesChannelJson / priceSnapshotPolicy.
|
|
3562
|
+
* displayMetadataJson 是后端原文字符串 (caller 自 JSON.parse, 缺省可能为 null).
|
|
3563
|
+
*/
|
|
3564
|
+
interface Product {
|
|
3565
|
+
id: number;
|
|
3566
|
+
/** 公开 slug = biz_product_id (V1 建表 UNIQUE) */
|
|
3567
|
+
publicSlug: string;
|
|
3568
|
+
displayName: string;
|
|
3569
|
+
productFamily: ProductFamily | null;
|
|
3570
|
+
audience: Audience | null;
|
|
3571
|
+
billingMode: BillingMode | null;
|
|
3572
|
+
regionScope: RegionScope | null;
|
|
3573
|
+
basePriceFen: number | null;
|
|
3574
|
+
tokenQuota: number | null;
|
|
3575
|
+
/** 后端原文 JSON 字符串 (含 title/subtitle/badge/highlights/icon 等), 由 caller 自解析 */
|
|
3576
|
+
displayMetadataJson: string | null;
|
|
3577
|
+
}
|
|
3578
|
+
|
|
3579
|
+
declare module '@acosmi/sdk-ts' {
|
|
3580
|
+
interface Client {
|
|
3581
|
+
/**
|
|
3582
|
+
* 按商品族查询在售商品. 全参可空 (后端无过滤即返全部在售).
|
|
3583
|
+
* @param family 商品族 (MODEL_MEMBERSHIP / TOKEN_PACK / ...)
|
|
3584
|
+
* @param audience 受众 (PERSONAL / ENTERPRISE / DEVELOPER)
|
|
3585
|
+
* @param region 区域 (CN / OS / GLOBAL); 命中时同时返回 GLOBAL 商品
|
|
3586
|
+
*/
|
|
3587
|
+
listProductsByFamily(family?: ProductFamily, audience?: Audience, region?: RegionScope, signal?: AbortSignal): Promise<Product[]>;
|
|
3588
|
+
/**
|
|
3589
|
+
* 按 slug 查询单个在售商品. slug = biz_product_id (UNIQUE).
|
|
3590
|
+
* 找不到或已下架 → 抛 HTTP 404.
|
|
3591
|
+
*/
|
|
3592
|
+
getProductBySlug(slug: string, region?: RegionScope, signal?: AbortSignal): Promise<Product>;
|
|
3593
|
+
}
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3596
|
+
/** 律师档案公开视图 (L1 公开端点白名单, licenseNo 等 PII L3 字段已脱敏剥离). */
|
|
3597
|
+
interface LawyerSummary {
|
|
3598
|
+
id: number;
|
|
3599
|
+
realName: string;
|
|
3600
|
+
lawFirm?: string;
|
|
3601
|
+
/** 执业领域 (后端 practice_area_json 解析为数组). */
|
|
3602
|
+
practiceAreas?: string[];
|
|
3603
|
+
yearsOfPractice?: number;
|
|
3604
|
+
avatarUrl?: string;
|
|
3605
|
+
location?: string;
|
|
3606
|
+
languages?: string;
|
|
3607
|
+
rating?: number;
|
|
3608
|
+
caseHandledCount?: number;
|
|
3609
|
+
/** PENDING / VERIFIED / REJECTED / EXPIRED. */
|
|
3610
|
+
verificationStatus?: string;
|
|
3611
|
+
/** ACTIVE / DISABLED / SUSPENDED. */
|
|
3612
|
+
status?: string;
|
|
3613
|
+
}
|
|
3614
|
+
/** 案件线索创建请求 (用户提交). */
|
|
3615
|
+
interface SubmitCaseLeadRequest {
|
|
3616
|
+
/** CONSULTATION / DOC_REVIEW / CASE_REPRESENT. */
|
|
3617
|
+
caseType?: string;
|
|
3618
|
+
title: string;
|
|
3619
|
+
summary?: string;
|
|
3620
|
+
location?: string;
|
|
3621
|
+
/** LOW / NORMAL / URGENT. */
|
|
3622
|
+
urgency?: string;
|
|
3623
|
+
/** 预算 (分). */
|
|
3624
|
+
budgetFen?: number;
|
|
3625
|
+
/** ISO 日期 yyyy-MM-dd. */
|
|
3626
|
+
expectedAt?: string;
|
|
3627
|
+
}
|
|
3628
|
+
/** 案件线索 (用户视角) — summary 仅在自己的线索返回, 不在公开市场列表中。 */
|
|
3629
|
+
interface CaseLead {
|
|
3630
|
+
id: number;
|
|
3631
|
+
caseType?: string;
|
|
3632
|
+
title: string;
|
|
3633
|
+
summary?: string;
|
|
3634
|
+
location?: string;
|
|
3635
|
+
urgency?: string;
|
|
3636
|
+
budgetFen?: number;
|
|
3637
|
+
expectedAt?: string;
|
|
3638
|
+
/** OPEN / MATCHED / CLAIMED / CLOSED / EXPIRED. */
|
|
3639
|
+
status: string;
|
|
3640
|
+
claimCount?: number;
|
|
3641
|
+
matchedLawyerId?: number;
|
|
3642
|
+
expiresAt?: string;
|
|
3643
|
+
createTime?: string;
|
|
3644
|
+
}
|
|
3645
|
+
/** 案件 (委托人视角) — description 仅双方可见。 */
|
|
3646
|
+
interface CaseMatter {
|
|
3647
|
+
id: number;
|
|
3648
|
+
leadId?: number;
|
|
3649
|
+
lawyerId: number;
|
|
3650
|
+
matterType?: string;
|
|
3651
|
+
title: string;
|
|
3652
|
+
description?: string;
|
|
3653
|
+
/** ACTIVE / ON_HOLD / CLOSED / ARCHIVED. */
|
|
3654
|
+
status: string;
|
|
3655
|
+
/** WON / LOST / SETTLED / WITHDRAWN. */
|
|
3656
|
+
outcome?: string;
|
|
3657
|
+
startedAt?: string;
|
|
3658
|
+
closedAt?: string;
|
|
3659
|
+
}
|
|
3660
|
+
/** 法律咨询单 (双方视图). */
|
|
3661
|
+
interface LegalConsultation {
|
|
3662
|
+
id: number;
|
|
3663
|
+
lawyerId?: number;
|
|
3664
|
+
/** 命中 dist_compliance_sku.sku_code, benefit_type='LEGAL_SERVICE'. */
|
|
3665
|
+
skuCode: string;
|
|
3666
|
+
matterId?: number;
|
|
3667
|
+
durationMin?: number;
|
|
3668
|
+
scheduledAt?: string;
|
|
3669
|
+
startedAt?: string;
|
|
3670
|
+
endedAt?: string;
|
|
3671
|
+
/** PENDING / SCHEDULED / ONGOING / DONE / CANCELED. */
|
|
3672
|
+
status: string;
|
|
3673
|
+
rating?: number;
|
|
3674
|
+
}
|
|
3675
|
+
/** 法律咨询预约请求. */
|
|
3676
|
+
interface BookConsultationRequest {
|
|
3677
|
+
/** 必填: LEGAL_CONSULTATION_ONCE / LEGAL_CONSULTATION_60MIN. */
|
|
3678
|
+
skuCode: string;
|
|
3679
|
+
/** 可选: 指定律师, 留空走 AI 推荐池. */
|
|
3680
|
+
lawyerId?: number;
|
|
3681
|
+
/** ISO 时刻. */
|
|
3682
|
+
scheduledAt?: string;
|
|
3683
|
+
/** 关联案件. */
|
|
3684
|
+
matterId?: number;
|
|
3685
|
+
}
|
|
3686
|
+
/** 法律服务订单 (用户视角). */
|
|
3687
|
+
interface LegalServiceOrder {
|
|
3688
|
+
id: number;
|
|
3689
|
+
lawyerId?: number;
|
|
3690
|
+
skuCode: string;
|
|
3691
|
+
/** 跨模块松耦合关联 distribution 主订单。 */
|
|
3692
|
+
distributionOrderId?: number;
|
|
3693
|
+
amountFen: number;
|
|
3694
|
+
/** PENDING / PAID / FULFILLING / DONE / REFUNDED / CANCELED. */
|
|
3695
|
+
status: string;
|
|
3696
|
+
paidAt?: string;
|
|
3697
|
+
doneAt?: string;
|
|
3698
|
+
}
|
|
3699
|
+
/**
|
|
3700
|
+
* 律师自查执业证审核状态视图 (v2.0.0+ 新增, P5 Phase 3 复核 SDK Phase C).
|
|
3701
|
+
*
|
|
3702
|
+
* 端点 `GET /api/casehall/lawyer-credentials/my` — 律师身份调返自己的所有 credential.
|
|
3703
|
+
* 普通用户 (无 lawyer_profile 关联) 调返空 [], 不抛.
|
|
3704
|
+
*
|
|
3705
|
+
* 与 tk-dist `LawyerCredentialMyView` VO 对齐. 显式字段白名单, 已剔除 fields_json (PII L3)
|
|
3706
|
+
* + ocrRawJson (admin only) 等敏感字段.
|
|
3707
|
+
*/
|
|
3708
|
+
interface LawyerCredentialMyView {
|
|
3709
|
+
/** Credential 主键. */
|
|
3710
|
+
id: number;
|
|
3711
|
+
/** LICENSE / CERTIFICATE / FIRM_LETTER / DIPLOMA / OTHER. */
|
|
3712
|
+
credentialType?: string;
|
|
3713
|
+
/** PENDING / OCR_PARSED / MANUAL_REVIEW / APPROVED / REJECTED. */
|
|
3714
|
+
verificationStatus?: string;
|
|
3715
|
+
/** OCR 置信度 0~1; null/undefined 表示尚未 OCR. 后端 BigDecimal → number 序列化. */
|
|
3716
|
+
ocrConfidence?: number;
|
|
3717
|
+
/** 低置信度需 admin 人工复核. */
|
|
3718
|
+
manualReviewRequired?: boolean;
|
|
3719
|
+
/** 仅 REJECTED 时非空. */
|
|
3720
|
+
rejectionReason?: string;
|
|
3721
|
+
/** ISO-8601 = createTime. */
|
|
3722
|
+
submittedAt?: string;
|
|
3723
|
+
/** ISO-8601, admin 审核完成时间; null 表示尚未审核. */
|
|
3724
|
+
reviewedAt?: string;
|
|
3725
|
+
}
|
|
3726
|
+
/** 5 Legal SKU (与 dist_compliance_sku benefit_type='LEGAL_SERVICE' 同源). */
|
|
3727
|
+
type LegalSkuCode = 'LEGAL_CONSULTATION_ONCE' | 'LEGAL_CONSULTATION_60MIN' | 'LEGAL_DOC_REVIEW_HUMAN' | 'LEGAL_CASE_LEAD_CLAIM' | 'LEGAL_LAWYER_SERVICE_PKG';
|
|
3728
|
+
/** 法律服务 SKU 公开视图 (与 ComplianceSku 同 schema, 仅 benefit_type 收敛为 LEGAL_SERVICE). */
|
|
3729
|
+
interface LegalServiceSku {
|
|
3730
|
+
skuCode: string;
|
|
3731
|
+
/** 固定 'LEGAL_SERVICE'. */
|
|
3732
|
+
benefitType: 'LEGAL_SERVICE' | string;
|
|
3733
|
+
providerProduct?: string;
|
|
3734
|
+
unitPriceFen?: number;
|
|
3735
|
+
overagePriceFen?: number;
|
|
3736
|
+
regionScope?: string;
|
|
3737
|
+
description?: string;
|
|
3738
|
+
includedInPlans?: Record<string, number>;
|
|
3739
|
+
}
|
|
3740
|
+
|
|
3741
|
+
declare module '@acosmi/sdk-ts' {
|
|
3742
|
+
interface Client {
|
|
3743
|
+
/** 列出已认证律师 (公开端点, 仅返回 VERIFIED + ACTIVE 状态; PII L3 字段已脱敏). */
|
|
3744
|
+
listLawyers(params?: {
|
|
3745
|
+
practiceArea?: string;
|
|
3746
|
+
location?: string;
|
|
3747
|
+
pageNo?: number;
|
|
3748
|
+
pageSize?: number;
|
|
3749
|
+
}, signal?: AbortSignal): Promise<LawyerSummary[]>;
|
|
3750
|
+
/** 获取律师公开详情 (脱敏)。 */
|
|
3751
|
+
getLawyer(id: number, signal?: AbortSignal): Promise<LawyerSummary>;
|
|
3752
|
+
/** 提交案件线索 (登录态)。 */
|
|
3753
|
+
submitCaseLead(req: SubmitCaseLeadRequest, signal?: AbortSignal): Promise<{
|
|
3754
|
+
id: number;
|
|
3755
|
+
}>;
|
|
3756
|
+
/** 我的案件线索列表。 */
|
|
3757
|
+
listMyCaseLeads(signal?: AbortSignal): Promise<CaseLead[]>;
|
|
3758
|
+
/** 我的案件列表 (委托后)。 */
|
|
3759
|
+
getMyCases(signal?: AbortSignal): Promise<CaseMatter[]>;
|
|
3760
|
+
/** 预约法律咨询 (skuCode 必填; lawyerId 可选, 留空走 AI 推荐池)。 */
|
|
3761
|
+
bookConsultation(req: BookConsultationRequest, signal?: AbortSignal): Promise<{
|
|
3762
|
+
consultationId: number;
|
|
3763
|
+
}>;
|
|
3764
|
+
/** 我的咨询单列表。 */
|
|
3765
|
+
listMyConsultations(signal?: AbortSignal): Promise<LegalConsultation[]>;
|
|
3766
|
+
/** 我的法律服务订单列表。 */
|
|
3767
|
+
listMyLegalOrders(signal?: AbortSignal): Promise<LegalServiceOrder[]>;
|
|
3768
|
+
/** 列出公开的 LEGAL_SERVICE SKU (匿名可调用, 复用 dist_compliance_sku benefit_type='LEGAL_SERVICE')。 */
|
|
3769
|
+
listLegalSKUs(region?: string, signal?: AbortSignal): Promise<LegalServiceSku[]>;
|
|
3770
|
+
/**
|
|
3771
|
+
* 律师自查执业证审核状态 — 返回登录用户作为律师身份提交的所有 credential 列表.
|
|
3772
|
+
* 普通用户 (无 lawyer_profile) 调返 [] 不抛.
|
|
3773
|
+
*
|
|
3774
|
+
* v2.0.0+ 新增. 端点 `GET /api/casehall/lawyer-credentials/my`.
|
|
3775
|
+
* @returns 按 createTime 倒序的 credential 列表
|
|
3776
|
+
*/
|
|
3777
|
+
getMyLawyerCredentialStatus(signal?: AbortSignal): Promise<LawyerCredentialMyView[]>;
|
|
3778
|
+
}
|
|
3779
|
+
}
|
|
3780
|
+
|
|
3781
|
+
/** 企业组织公开视图 (PII L3 字段 contactPhone/Email 仅 OWNER/ADMIN 可见). */
|
|
3782
|
+
interface EnterpriseSummary {
|
|
3783
|
+
id: number;
|
|
3784
|
+
orgName: string;
|
|
3785
|
+
/** 工商注册号. */
|
|
3786
|
+
orgCode?: string;
|
|
3787
|
+
legalRepresentative?: string;
|
|
3788
|
+
/** 主联系人 user_id (UUID, 仅 OWNER 可见). */
|
|
3789
|
+
contactUserId?: string;
|
|
3790
|
+
contactPhone?: string;
|
|
3791
|
+
contactEmail?: string;
|
|
3792
|
+
/** 销售对接人 user_id (UUID, §-1.2.D ≥200 席自动绑定). */
|
|
3793
|
+
salesRepUserId?: string;
|
|
3794
|
+
/** CN / OVERSEAS. */
|
|
3795
|
+
regionScope?: string;
|
|
3796
|
+
/** ACTIVE / SUSPENDED / TERMINATED. */
|
|
3797
|
+
status?: string;
|
|
3798
|
+
}
|
|
3799
|
+
/** 企业成员视图. */
|
|
3800
|
+
interface EnterpriseMember {
|
|
3801
|
+
id: number;
|
|
3802
|
+
enterpriseId: number;
|
|
3803
|
+
/** UUID. */
|
|
3804
|
+
userId: string;
|
|
3805
|
+
/** OWNER / ADMIN / MEMBER. */
|
|
3806
|
+
role: string;
|
|
3807
|
+
department?: string;
|
|
3808
|
+
joinedAt?: string;
|
|
3809
|
+
leftAt?: string;
|
|
3810
|
+
/** ACTIVE / INACTIVE. */
|
|
3811
|
+
status?: string;
|
|
3812
|
+
}
|
|
3813
|
+
/** 企业订阅视图 — 派生计算字段 perSeatMonthlyCapTk / poolTotalTk 由后端在 createFromOrgOrder 写入. */
|
|
3814
|
+
interface OrgSubscription {
|
|
3815
|
+
id: number;
|
|
3816
|
+
enterpriseId: number;
|
|
3817
|
+
planId: number;
|
|
3818
|
+
/** ENT_PRO / ENT_ULTRA. */
|
|
3819
|
+
planCode: string;
|
|
3820
|
+
seatCountPurchased: number;
|
|
3821
|
+
seatCountAssigned: number;
|
|
3822
|
+
totalPriceFen: number;
|
|
3823
|
+
/** 阶梯折扣命中值 (0.85 = 15% off). */
|
|
3824
|
+
discountRate?: number;
|
|
3825
|
+
billingCycle?: string;
|
|
3826
|
+
/** §-1.3 W-3 字段名, 与个人订阅一致. */
|
|
3827
|
+
nextDeductDate?: string;
|
|
3828
|
+
/** §-1.2.D 钉死 3. */
|
|
3829
|
+
seatChangeMaxPerMonth: number;
|
|
3830
|
+
seatChangeUsedThisMonth: number;
|
|
3831
|
+
/** §-1.2.D 钉死 200. */
|
|
3832
|
+
salesTakeoverThreshold: number;
|
|
3833
|
+
/** 派生: pool/seats × 1.5. */
|
|
3834
|
+
perSeatMonthlyCapTk?: number;
|
|
3835
|
+
/** 派生: seats × Pro Max × 0.8. */
|
|
3836
|
+
poolTotalTk?: number;
|
|
3837
|
+
poolUsedTk?: number;
|
|
3838
|
+
/** SHARED / PER_SEAT / HYBRID (P6a 阶段仅 SHARED). */
|
|
3839
|
+
poolMode?: string;
|
|
3840
|
+
/** ACTIVE / PAUSED / EXPIRED / CANCELED. */
|
|
3841
|
+
status?: string;
|
|
3842
|
+
startedAt?: string;
|
|
3843
|
+
expiresAt?: string;
|
|
3844
|
+
}
|
|
3845
|
+
/** 企业席位视图. */
|
|
3846
|
+
interface OrgSeat {
|
|
3847
|
+
id: number;
|
|
3848
|
+
orgSubscriptionId: number;
|
|
3849
|
+
/** 1..N. */
|
|
3850
|
+
seatNo: number;
|
|
3851
|
+
/** AVAILABLE / ASSIGNED / REVOKED. */
|
|
3852
|
+
status: string;
|
|
3853
|
+
assignedMemberId?: number;
|
|
3854
|
+
/** UUID. */
|
|
3855
|
+
assignedUserId?: string;
|
|
3856
|
+
/** 单席位月度配额 override (NULL = 走订阅默认 perSeatMonthlyCapTk). */
|
|
3857
|
+
perSeatMonthlyCapTk?: number;
|
|
3858
|
+
usedTkThisMonth?: number;
|
|
3859
|
+
}
|
|
3860
|
+
/** 邀请成员请求 (P6a 简化: 直接 add, 不走邀请确认流程). */
|
|
3861
|
+
interface InviteMemberRequest {
|
|
3862
|
+
enterpriseId: number;
|
|
3863
|
+
userId: string;
|
|
3864
|
+
role?: 'OWNER' | 'ADMIN' | 'MEMBER';
|
|
3865
|
+
department?: string;
|
|
3866
|
+
}
|
|
3867
|
+
/** 分配席位请求. */
|
|
3868
|
+
interface AssignSeatRequest {
|
|
3869
|
+
subscriptionId: number;
|
|
3870
|
+
memberId: number;
|
|
3871
|
+
note?: string;
|
|
3872
|
+
}
|
|
3873
|
+
/** 企业消耗汇总视图 (P6a 简化: 订阅维度池子汇总; 完整账单留 P6b). */
|
|
3874
|
+
interface OrgConsumeReport {
|
|
3875
|
+
enterpriseId: number;
|
|
3876
|
+
subscriptionCount: number;
|
|
3877
|
+
totalPoolTk: number;
|
|
3878
|
+
totalUsedTk: number;
|
|
3879
|
+
totalPriceFen: number;
|
|
3880
|
+
note?: string;
|
|
3881
|
+
}
|
|
3882
|
+
/**
|
|
3883
|
+
* 企业 OWNER 自查 KYC 状态视图 (v2.0.0+ 新增, P6a Phase 3 复核 SDK Phase C).
|
|
3884
|
+
*
|
|
3885
|
+
* 端点 `GET /api/distribution/enterprise/kyc/my` — 登录用户作为 OWNER 调返其企业 KYC 状态.
|
|
3886
|
+
* 用户不是任何企业 OWNER 时返 `enterpriseId=null` 的空 view, 不抛.
|
|
3887
|
+
*
|
|
3888
|
+
* 与 tk-dist `EnterpriseKycMyStatusView` VO 对齐. 显式字段白名单, 已剔除 rawJson (PII L3,
|
|
3889
|
+
* `@FieldEncrypt`) + reviewerId + providerName + providerRequestId 等 admin 字段.
|
|
3890
|
+
*/
|
|
3891
|
+
interface EnterpriseKycMyStatusView {
|
|
3892
|
+
/** null 表示用户不是任何企业 OWNER. */
|
|
3893
|
+
enterpriseId?: number;
|
|
3894
|
+
/** PENDING / COMPLETED / FAILED. */
|
|
3895
|
+
status?: string;
|
|
3896
|
+
/** LOW / MEDIUM / HIGH / UNKNOWN. */
|
|
3897
|
+
riskLevel?: string;
|
|
3898
|
+
/** 反洗钱命中标志, default false. */
|
|
3899
|
+
sanctionsHit?: boolean;
|
|
3900
|
+
/** admin override 后填充: APPROVED / REJECTED. */
|
|
3901
|
+
overrideDecision?: string;
|
|
3902
|
+
/** 仅 admin override 时填 (= overrideReason). */
|
|
3903
|
+
reviewerNotes?: string;
|
|
3904
|
+
/** ISO-8601, admin override 时间. */
|
|
3905
|
+
reviewedAt?: string;
|
|
3906
|
+
}
|
|
3907
|
+
|
|
3908
|
+
declare module '@acosmi/sdk-ts' {
|
|
3909
|
+
interface Client {
|
|
3910
|
+
/** 列出我所在的企业 (用户作为成员加入的企业列表). */
|
|
3911
|
+
listMyEnterprises(signal?: AbortSignal): Promise<EnterpriseSummary[]>;
|
|
3912
|
+
/** 获取企业详情. */
|
|
3913
|
+
getEnterprise(id: number, signal?: AbortSignal): Promise<EnterpriseSummary>;
|
|
3914
|
+
/** 邀请成员加入 (P6a 简化: 直接 add, OWNER/ADMIN 可调用). */
|
|
3915
|
+
inviteMember(req: InviteMemberRequest, signal?: AbortSignal): Promise<EnterpriseMember>;
|
|
3916
|
+
/** 列出企业成员. */
|
|
3917
|
+
listEnterpriseMembers(enterpriseId: number, signal?: AbortSignal): Promise<EnterpriseMember[]>;
|
|
3918
|
+
/** 列出企业订阅. */
|
|
3919
|
+
listOrgSubscriptions(enterpriseId: number, signal?: AbortSignal): Promise<OrgSubscription[]>;
|
|
3920
|
+
/** 列出订阅下的席位 (1 订阅 N 席, seat_no 1..N). */
|
|
3921
|
+
listSeats(orgSubscriptionId: number, signal?: AbortSignal): Promise<OrgSeat[]>;
|
|
3922
|
+
/** 分配席位 (月度变更次数 +1, 超 3 次返 41xxx 业务码 §-1.2.D 钉死). */
|
|
3923
|
+
assignSeat(req: AssignSeatRequest, signal?: AbortSignal): Promise<OrgSeat>;
|
|
3924
|
+
/** 收回席位 (席位状态 → AVAILABLE, 累计用量保留). */
|
|
3925
|
+
revokeSeat(seatId: number, note?: string, signal?: AbortSignal): Promise<void>;
|
|
3926
|
+
/** 企业消耗汇总 (订阅维度池子合计; 完整账单留 P6b). */
|
|
3927
|
+
getOrgConsumeReport(enterpriseId: number, signal?: AbortSignal): Promise<OrgConsumeReport>;
|
|
3928
|
+
/**
|
|
3929
|
+
* 企业 OWNER 自查 KYC 状态 — 返回登录用户作为 OWNER 的企业的最新 KYC 状态.
|
|
3930
|
+
* 用户不是任何企业 OWNER 时返 `{enterpriseId:undefined}` 的空 view, 不抛.
|
|
3931
|
+
*
|
|
3932
|
+
* v2.0.0+ 新增. 端点 `GET /api/distribution/enterprise/kyc/my`.
|
|
3933
|
+
* 单 OWNER 单企业假设; 多企业取第一个 ACTIVE OWNER 企业.
|
|
3934
|
+
*/
|
|
3935
|
+
getMyEnterpriseKycStatus(signal?: AbortSignal): Promise<EnterpriseKycMyStatusView>;
|
|
3936
|
+
}
|
|
3937
|
+
}
|
|
3938
|
+
|
|
3939
|
+
/**
|
|
3940
|
+
* 发票视图 (P7).
|
|
3941
|
+
*
|
|
3942
|
+
* P2-016 PII 分级说明 (与 tk-dist `DistInvoiceDO` `@Sensitive` 注解严格对齐):
|
|
3943
|
+
* - L0 公开/系统: id / invoiceNo / orderId / enterpriseId / invoiceType / amountFen /
|
|
3944
|
+
* taxRate / taxAmountFen / status / issuedAt / pdfUrl
|
|
3945
|
+
* - L2 登录态半遮: title / contactAddress
|
|
3946
|
+
* - L3 仅 admin/自己解密读: taxId / bankAccount / contactPhone / bankName
|
|
3947
|
+
*
|
|
3948
|
+
* listMyInvoices() 由后端 VO 视图返脱敏值 ("130********9876" 等), SDK 类型不强制 PII 级
|
|
3949
|
+
* 是因服务端已脱敏; 但 admin 直读 mapper 时该接口仍承载明文 — 调用方 (Web/Desktop) 必须
|
|
3950
|
+
* 自行判定上下文, 不要在公开页直接渲染 L3 字段.
|
|
3951
|
+
*
|
|
3952
|
+
* ---
|
|
3953
|
+
*
|
|
3954
|
+
* **v1.9.0+ 真落盘加密** (主仓 K10a PII Aspect IMPL-A→IMPL-F 闭环):
|
|
3955
|
+
*
|
|
3956
|
+
* - V51 finance 7 表族 (`dist_invoice` / `dist_corporate_transfer` / `dist_refund_record` 等)
|
|
3957
|
+
* 敏感列改走 `@FieldEncrypt` 切面真加密落盘 (此前是 ALL明文); V63 列宽 VARCHAR→TEXT
|
|
3958
|
+
* 兜密文; V64 backfill 老明文 → v2 payload. 切硬模式需运维显式设
|
|
3959
|
+
* `ENCRYPTION_STRICT_MODE=true`, 默认 fail-OPEN 兼容老明文读取直至切换.
|
|
3960
|
+
*
|
|
3961
|
+
* - **payload 协议 keyVersion v1/v2** (调用方无感, 仅 debug dump DB 可见):
|
|
3962
|
+
* - v1 格式: `enc::v1::wrap::iv::ct`, AAD = `"field"` (旧版兜底)
|
|
3963
|
+
* - v2 格式: `enc::v2::wrap::iv::ct::aad`, AAD = `"acosmi:pii:" + tableName.columnName`
|
|
3964
|
+
* (新版, 跨字段 ciphertext 不互换, 跨表/列加密上下文绑定防 confused-deputy 攻击)
|
|
3965
|
+
*
|
|
3966
|
+
* - **角色严格化** (v1.9.0+, 主仓 SensitiveSerializer.normalizeAuthority):
|
|
3967
|
+
* yudao 通用 `ROLE_ADMIN` 不再被识别为 `platform_admin` 视角 (旧别名 fail-OPEN 已根治).
|
|
3968
|
+
* 调用方传 token 必须真有以下角色之一才能解密 L3 字段:
|
|
3969
|
+
* - `ROLE_PLATFORM_ADMIN` — 平台管理员 (跨租户 admin)
|
|
3970
|
+
* - `ROLE_S2S` — 服务对服务调用
|
|
3971
|
+
* - `ROLE_LAWYER` — 律师 (仅自己 L1/L2, L3 仍脱敏)
|
|
3972
|
+
* - `ROLE_CONSUMER` — 消费者 (仅自己 L1/L2, L3 仍脱敏)
|
|
3973
|
+
*
|
|
3974
|
+
* 未匹配上述任一者 → 视同 guest, L2/L3 全脱敏返回.
|
|
3975
|
+
* 详细矩阵见 `docs/pii-role-matrix.md`.
|
|
3976
|
+
*/
|
|
3977
|
+
interface Invoice {
|
|
3978
|
+
id: number;
|
|
3979
|
+
/** 发票号 (开票后回写). L0. */
|
|
3980
|
+
invoiceNo?: string;
|
|
3981
|
+
orderId?: number;
|
|
3982
|
+
/** UUID. L0 (用户对自己可见, admin 跨用户聚合视为 L2). */
|
|
3983
|
+
userId?: string;
|
|
3984
|
+
enterpriseId?: number;
|
|
3985
|
+
/** NORMAL / VAT_GENERAL / VAT_SPECIAL. L0. */
|
|
3986
|
+
invoiceType?: string;
|
|
3987
|
+
/** 抬头. L2. */
|
|
3988
|
+
title?: string;
|
|
3989
|
+
/** 税号. L3 — 服务端按上下文脱敏/加密. */
|
|
3990
|
+
taxId?: string;
|
|
3991
|
+
/** 开户行. L3. */
|
|
3992
|
+
bankName?: string;
|
|
3993
|
+
/** 银行账号. L3 — `@FieldEncrypt` 存储加密. */
|
|
3994
|
+
bankAccount?: string;
|
|
3995
|
+
/** 收件地址. L2. */
|
|
3996
|
+
contactAddress?: string;
|
|
3997
|
+
/** 联系手机. L3 — `@FieldEncrypt` 存储加密. */
|
|
3998
|
+
contactPhone?: string;
|
|
3999
|
+
amountFen?: number;
|
|
4000
|
+
/** 6% 默认. */
|
|
4001
|
+
taxRate?: number;
|
|
4002
|
+
taxAmountFen?: number;
|
|
4003
|
+
/** PENDING / ISSUED / VOIDED / REISSUED. */
|
|
4004
|
+
status?: string;
|
|
4005
|
+
issuedAt?: string;
|
|
4006
|
+
pdfUrl?: string;
|
|
4007
|
+
}
|
|
4008
|
+
/** 开票申请 request. */
|
|
4009
|
+
interface RequestInvoiceInput {
|
|
4010
|
+
orderId?: number;
|
|
4011
|
+
enterpriseId?: number;
|
|
4012
|
+
invoiceType?: 'NORMAL' | 'VAT_GENERAL' | 'VAT_SPECIAL';
|
|
4013
|
+
title: string;
|
|
4014
|
+
taxId?: string;
|
|
4015
|
+
bankName?: string;
|
|
4016
|
+
bankAccount?: string;
|
|
4017
|
+
contactAddress?: string;
|
|
4018
|
+
contactPhone?: string;
|
|
4019
|
+
amountFen: number;
|
|
4020
|
+
taxRate?: number;
|
|
4021
|
+
}
|
|
4022
|
+
/** 退款规则字典 (决策 15). */
|
|
4023
|
+
interface RefundPolicy {
|
|
4024
|
+
id: number;
|
|
4025
|
+
/** SUBSCRIPTION_NO_REFUND / TOKEN_PACK_7DAY_UNUSED / ... */
|
|
4026
|
+
policyCode: string;
|
|
4027
|
+
/** MODEL_MEMBERSHIP / TOKEN_PACK / COMPLIANCE / LEGAL_SERVICE. */
|
|
4028
|
+
productFamily?: string;
|
|
4029
|
+
/** 退款窗口期 (NULL = 不退). */
|
|
4030
|
+
refundWindowDays?: number;
|
|
4031
|
+
/** NO_REFUND / FULL_IF_UNUSED / PRORATA_UNUSED. */
|
|
4032
|
+
refundRule?: string;
|
|
4033
|
+
requireProof?: boolean;
|
|
4034
|
+
status?: string;
|
|
4035
|
+
description?: string;
|
|
4036
|
+
}
|
|
4037
|
+
/** 退款记录. */
|
|
4038
|
+
interface RefundRecord {
|
|
4039
|
+
id: number;
|
|
4040
|
+
orderId: number;
|
|
4041
|
+
/** UUID. */
|
|
4042
|
+
userId: string;
|
|
4043
|
+
policyCode?: string;
|
|
4044
|
+
requestedAmountFen?: number;
|
|
4045
|
+
approvedAmountFen?: number;
|
|
4046
|
+
/** 实退 (扣已用). */
|
|
4047
|
+
actualAmountFen?: number;
|
|
4048
|
+
reason?: string;
|
|
4049
|
+
/** PENDING / APPROVED / REFUNDED / REJECTED. */
|
|
4050
|
+
status?: string;
|
|
4051
|
+
/** UUID. */
|
|
4052
|
+
operatorUserId?: string;
|
|
4053
|
+
refundedAt?: string;
|
|
4054
|
+
rejectedReason?: string;
|
|
4055
|
+
}
|
|
4056
|
+
/** 退款申请 request. */
|
|
4057
|
+
interface RequestRefundInput {
|
|
4058
|
+
orderId: number;
|
|
4059
|
+
/** 直传 policyCode; 留空可用 productFamily + anyUsage 派生. */
|
|
4060
|
+
policyCode?: string;
|
|
4061
|
+
productFamily?: 'MODEL_MEMBERSHIP' | 'TOKEN_PACK' | 'COMPLIANCE' | 'LEGAL_SERVICE';
|
|
4062
|
+
anyUsage?: boolean;
|
|
4063
|
+
requestedAmountFen: number;
|
|
4064
|
+
reason?: string;
|
|
4065
|
+
}
|
|
4066
|
+
/** 对公转账记录 (决策 14). */
|
|
4067
|
+
interface CorporateTransfer {
|
|
4068
|
+
id: number;
|
|
4069
|
+
orderId?: number;
|
|
4070
|
+
contractId?: number;
|
|
4071
|
+
/** UUID. */
|
|
4072
|
+
userId?: string;
|
|
4073
|
+
enterpriseId?: number;
|
|
4074
|
+
amountFen?: number;
|
|
4075
|
+
payerBank?: string;
|
|
4076
|
+
payerAccount?: string;
|
|
4077
|
+
receiverBank?: string;
|
|
4078
|
+
receiverAccount?: string;
|
|
4079
|
+
/** UUID. */
|
|
4080
|
+
salesRepUserId?: string;
|
|
4081
|
+
/** UUID. */
|
|
4082
|
+
financeUserId?: string;
|
|
4083
|
+
wechatGroupUrl?: string;
|
|
4084
|
+
/** INITIATED / WAITING_PROOF / PROOF_RECEIVED / CONFIRMED / FAILED. */
|
|
4085
|
+
status?: string;
|
|
4086
|
+
proofUrl?: string;
|
|
4087
|
+
confirmedAt?: string;
|
|
4088
|
+
note?: string;
|
|
4089
|
+
}
|
|
4090
|
+
/** 对公转账发起 request. */
|
|
4091
|
+
interface InitiateCorporateTransferInput {
|
|
4092
|
+
orderId?: number;
|
|
4093
|
+
enterpriseId?: number;
|
|
4094
|
+
contractId?: number;
|
|
4095
|
+
amountFen: number;
|
|
4096
|
+
payerBank?: string;
|
|
4097
|
+
payerAccount?: string;
|
|
4098
|
+
note?: string;
|
|
4099
|
+
}
|
|
4100
|
+
/**
|
|
4101
|
+
* 对公转账发起 response (决策 14).
|
|
4102
|
+
* 前端拿到 qrUrl + salesWechatId + financeEmail 后渲染弹窗,
|
|
4103
|
+
* 引导用户加销售企微 / 邮件财务对接, 零银行 API 路径.
|
|
4104
|
+
*/
|
|
4105
|
+
interface InitiateCorporateTransferResult {
|
|
4106
|
+
id: number;
|
|
4107
|
+
/** 销售名片二维码 URL (ops 配置). */
|
|
4108
|
+
qrUrl?: string;
|
|
4109
|
+
/** 销售企微 ID. */
|
|
4110
|
+
salesWechatId?: string;
|
|
4111
|
+
/** 财务对接邮箱. */
|
|
4112
|
+
financeEmail?: string;
|
|
4113
|
+
}
|
|
4114
|
+
|
|
4115
|
+
declare module '@acosmi/sdk-ts' {
|
|
4116
|
+
interface Client {
|
|
4117
|
+
/** 申请退款 (决策 15: 按 policyCode 自动判定; NO_REFUND 即时拒)。 */
|
|
4118
|
+
requestRefund(req: RequestRefundInput, signal?: AbortSignal): Promise<RefundRecord>;
|
|
4119
|
+
/** 我的退款记录。 */
|
|
4120
|
+
listMyRefunds(signal?: AbortSignal): Promise<RefundRecord[]>;
|
|
4121
|
+
/** 申请开票。 */
|
|
4122
|
+
requestInvoice(req: RequestInvoiceInput, signal?: AbortSignal): Promise<Invoice>;
|
|
4123
|
+
/** 我的发票列表。 */
|
|
4124
|
+
listMyInvoices(signal?: AbortSignal): Promise<Invoice[]>;
|
|
4125
|
+
/**
|
|
4126
|
+
* 发起对公转账 — 决策 14:
|
|
4127
|
+
* 服务端创建 INITIATED 记录, 返回销售名片二维码 + 销售企微 ID + 财务邮箱,
|
|
4128
|
+
* 前端据此渲染弹窗引导用户加销售企微, 零银行 API.
|
|
4129
|
+
*/
|
|
4130
|
+
initiateCorporateTransfer(req: InitiateCorporateTransferInput, signal?: AbortSignal): Promise<InitiateCorporateTransferResult>;
|
|
4131
|
+
/** 上传对公转账凭证 URL。 */
|
|
4132
|
+
uploadCorporateTransferProof(id: number, proofUrl: string, signal?: AbortSignal): Promise<boolean>;
|
|
4133
|
+
/** 我的对公转账记录。 */
|
|
4134
|
+
listMyCorporateTransfers(signal?: AbortSignal): Promise<CorporateTransfer[]>;
|
|
4135
|
+
}
|
|
4136
|
+
}
|
|
4137
|
+
|
|
4138
|
+
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 AssignSeatRequest, type Audience, AudienceEnum, type AuthorizeResult, type BalanceDetail, type BillingMode, BillingModeEnum, type BillingPreflightResult, type BlockMeta, type BookConsultationRequest, type BrowserRefreshMode, type BugReportResult, type BugView, BusinessError, type CancelSealApprovalQuery, type CaseLead, type CaseMatter, type CertificationStatus, ChatRequest, ChatResponse, 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, 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, InMemoryTokenStore, type InitiateCorporateTransferInput, type InitiateCorporateTransferResult, InputModality, 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, 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 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 RegionScope, RegionScopeEnum, type RegisterWebOAuthClientOptions, type RejectSealApprovalQuery, type ReportDownload, type ReportPageItem, type RequestInvoiceInput, type RequestRefundInput, type RetryAdvice, type RetryAdviceReason, type RetryPolicy, type RetryRequestInfo, type RolloverPolicy, 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 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, 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, isSSECommentLine, isSSLError, maxEndUserIdLength, modelScopes, modelSupportsImageInput, modelSupportsInputModality, newFileTokenStore, newTokenSet, parseNotificationEvent, refreshToken, register, registerWebOAuthClient, retryReasonForComplianceKey, retryReasonForOAuthError, revokeToken, skillScopes, tokenSetIsExpired, uniqueMerge, validateEndUserId };
|