@acosmi/sdk-ts 1.9.0 → 2.0.1

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.
@@ -3696,6 +3696,33 @@ interface LegalServiceOrder {
3696
3696
  paidAt?: string;
3697
3697
  doneAt?: string;
3698
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
+ }
3699
3726
  /** 5 Legal SKU (与 dist_compliance_sku benefit_type='LEGAL_SERVICE' 同源). */
3700
3727
  type LegalSkuCode = 'LEGAL_CONSULTATION_ONCE' | 'LEGAL_CONSULTATION_60MIN' | 'LEGAL_DOC_REVIEW_HUMAN' | 'LEGAL_CASE_LEAD_CLAIM' | 'LEGAL_LAWYER_SERVICE_PKG';
3701
3728
  /** 法律服务 SKU 公开视图 (与 ComplianceSku 同 schema, 仅 benefit_type 收敛为 LEGAL_SERVICE). */
@@ -3740,6 +3767,14 @@ declare module '@acosmi/sdk-ts' {
3740
3767
  listMyLegalOrders(signal?: AbortSignal): Promise<LegalServiceOrder[]>;
3741
3768
  /** 列出公开的 LEGAL_SERVICE SKU (匿名可调用, 复用 dist_compliance_sku benefit_type='LEGAL_SERVICE')。 */
3742
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[]>;
3743
3778
  }
3744
3779
  }
3745
3780
 
@@ -3844,6 +3879,31 @@ interface OrgConsumeReport {
3844
3879
  totalPriceFen: number;
3845
3880
  note?: string;
3846
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
+ }
3847
3907
 
3848
3908
  declare module '@acosmi/sdk-ts' {
3849
3909
  interface Client {
@@ -3865,25 +3925,76 @@ declare module '@acosmi/sdk-ts' {
3865
3925
  revokeSeat(seatId: number, note?: string, signal?: AbortSignal): Promise<void>;
3866
3926
  /** 企业消耗汇总 (订阅维度池子合计; 完整账单留 P6b). */
3867
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>;
3868
3936
  }
3869
3937
  }
3870
3938
 
3871
- /** 发票视图 (P7). */
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
+ */
3872
3977
  interface Invoice {
3873
3978
  id: number;
3874
- /** 发票号 (开票后回写). */
3979
+ /** 发票号 (开票后回写). L0. */
3875
3980
  invoiceNo?: string;
3876
3981
  orderId?: number;
3877
- /** UUID. */
3982
+ /** UUID. L0 (用户对自己可见, admin 跨用户聚合视为 L2). */
3878
3983
  userId?: string;
3879
3984
  enterpriseId?: number;
3880
- /** NORMAL / VAT_GENERAL / VAT_SPECIAL. */
3985
+ /** NORMAL / VAT_GENERAL / VAT_SPECIAL. L0. */
3881
3986
  invoiceType?: string;
3987
+ /** 抬头. L2. */
3882
3988
  title?: string;
3989
+ /** 税号. L3 — 服务端按上下文脱敏/加密. */
3883
3990
  taxId?: string;
3991
+ /** 开户行. L3. */
3884
3992
  bankName?: string;
3993
+ /** 银行账号. L3 — `@FieldEncrypt` 存储加密. */
3885
3994
  bankAccount?: string;
3995
+ /** 收件地址. L2. */
3886
3996
  contactAddress?: string;
3997
+ /** 联系手机. L3 — `@FieldEncrypt` 存储加密. */
3887
3998
  contactPhone?: string;
3888
3999
  amountFen?: number;
3889
4000
  /** 6% 默认. */
@@ -4024,4 +4135,4 @@ declare module '@acosmi/sdk-ts' {
4024
4135
  }
4025
4136
  }
4026
4137
 
4027
- 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 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 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 };
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 };
@@ -3696,6 +3696,33 @@ interface LegalServiceOrder {
3696
3696
  paidAt?: string;
3697
3697
  doneAt?: string;
3698
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
+ }
3699
3726
  /** 5 Legal SKU (与 dist_compliance_sku benefit_type='LEGAL_SERVICE' 同源). */
3700
3727
  type LegalSkuCode = 'LEGAL_CONSULTATION_ONCE' | 'LEGAL_CONSULTATION_60MIN' | 'LEGAL_DOC_REVIEW_HUMAN' | 'LEGAL_CASE_LEAD_CLAIM' | 'LEGAL_LAWYER_SERVICE_PKG';
3701
3728
  /** 法律服务 SKU 公开视图 (与 ComplianceSku 同 schema, 仅 benefit_type 收敛为 LEGAL_SERVICE). */
@@ -3740,6 +3767,14 @@ declare module '@acosmi/sdk-ts' {
3740
3767
  listMyLegalOrders(signal?: AbortSignal): Promise<LegalServiceOrder[]>;
3741
3768
  /** 列出公开的 LEGAL_SERVICE SKU (匿名可调用, 复用 dist_compliance_sku benefit_type='LEGAL_SERVICE')。 */
3742
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[]>;
3743
3778
  }
3744
3779
  }
3745
3780
 
@@ -3844,6 +3879,31 @@ interface OrgConsumeReport {
3844
3879
  totalPriceFen: number;
3845
3880
  note?: string;
3846
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
+ }
3847
3907
 
3848
3908
  declare module '@acosmi/sdk-ts' {
3849
3909
  interface Client {
@@ -3865,25 +3925,76 @@ declare module '@acosmi/sdk-ts' {
3865
3925
  revokeSeat(seatId: number, note?: string, signal?: AbortSignal): Promise<void>;
3866
3926
  /** 企业消耗汇总 (订阅维度池子合计; 完整账单留 P6b). */
3867
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>;
3868
3936
  }
3869
3937
  }
3870
3938
 
3871
- /** 发票视图 (P7). */
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
+ */
3872
3977
  interface Invoice {
3873
3978
  id: number;
3874
- /** 发票号 (开票后回写). */
3979
+ /** 发票号 (开票后回写). L0. */
3875
3980
  invoiceNo?: string;
3876
3981
  orderId?: number;
3877
- /** UUID. */
3982
+ /** UUID. L0 (用户对自己可见, admin 跨用户聚合视为 L2). */
3878
3983
  userId?: string;
3879
3984
  enterpriseId?: number;
3880
- /** NORMAL / VAT_GENERAL / VAT_SPECIAL. */
3985
+ /** NORMAL / VAT_GENERAL / VAT_SPECIAL. L0. */
3881
3986
  invoiceType?: string;
3987
+ /** 抬头. L2. */
3882
3988
  title?: string;
3989
+ /** 税号. L3 — 服务端按上下文脱敏/加密. */
3883
3990
  taxId?: string;
3991
+ /** 开户行. L3. */
3884
3992
  bankName?: string;
3993
+ /** 银行账号. L3 — `@FieldEncrypt` 存储加密. */
3885
3994
  bankAccount?: string;
3995
+ /** 收件地址. L2. */
3886
3996
  contactAddress?: string;
3997
+ /** 联系手机. L3 — `@FieldEncrypt` 存储加密. */
3887
3998
  contactPhone?: string;
3888
3999
  amountFen?: number;
3889
4000
  /** 6% 默认. */
@@ -4024,4 +4135,4 @@ declare module '@acosmi/sdk-ts' {
4024
4135
  }
4025
4136
  }
4026
4137
 
4027
- 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 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 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 };
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 };
@@ -6341,6 +6341,15 @@ Client.prototype.listLegalSKUs = async function(region, signal) {
6341
6341
  );
6342
6342
  return resp.data ?? [];
6343
6343
  };
6344
+ Client.prototype.getMyLawyerCredentialStatus = async function(signal) {
6345
+ const resp = await this.doJSON(
6346
+ "GET",
6347
+ `/api/casehall/lawyer-credentials/my`,
6348
+ null,
6349
+ signal
6350
+ );
6351
+ return resp.data ?? [];
6352
+ };
6344
6353
 
6345
6354
  // src/enterprise/client.ts
6346
6355
  Client.prototype.listMyEnterprises = async function(signal) {
@@ -6436,6 +6445,15 @@ Client.prototype.getOrgConsumeReport = async function(enterpriseId, signal) {
6436
6445
  }
6437
6446
  return resp.data;
6438
6447
  };
6448
+ Client.prototype.getMyEnterpriseKycStatus = async function(signal) {
6449
+ const resp = await this.doJSON(
6450
+ "GET",
6451
+ `/api/distribution/enterprise/kyc/my`,
6452
+ null,
6453
+ signal
6454
+ );
6455
+ return resp.data ?? {};
6456
+ };
6439
6457
 
6440
6458
  // src/finance/client.ts
6441
6459
  Client.prototype.requestRefund = async function(req, signal) {
@@ -6487,13 +6505,8 @@ Client.prototype.initiateCorporateTransfer = async function(req, signal) {
6487
6505
  return resp.data;
6488
6506
  };
6489
6507
  Client.prototype.uploadCorporateTransferProof = async function(id, proofUrl, signal) {
6490
- const qs = new URLSearchParams({ proofUrl });
6491
- const resp = await this.doJSON(
6492
- "POST",
6493
- `/api/distribution/finance/corporate-transfer/${id}/upload-proof?${qs.toString()}`,
6494
- null,
6495
- signal
6496
- );
6508
+ const path = `/api/distribution/finance/corporate-transfer/${encodeURIComponent(String(id))}/upload-proof?proofUrl=${encodeURIComponent(proofUrl)}`;
6509
+ const resp = await this.doJSON("POST", path, null, signal);
6497
6510
  return resp.data ?? false;
6498
6511
  };
6499
6512
  Client.prototype.listMyCorporateTransfers = async function(signal) {