落地《契约规范》§8/§9/§12,全工程唯一来源: - InboundHandlers 枚举:45 入站 handler 名,原样拼写(finsh/canclevibrator/opensaoma 等) - OutboundHandlers 枚举:21 出站 handler 名,含命名陷阱(getphoneinfo≠getphoneInfo、 getBattery≠getbattery、backgameData-末尾连字符) - PayloadType:入站/出站 raw|json 标注表 + 入站同步返回类型 + 查询函数 - DTO interface ×17(§12 字段同名同义):Sharetype/Maplocation/PhoneInfo/savephoto/ videoinfo/Othervideoinfo/GamePay/PayState/ShareLogin/ShareSuccess 等 - Result<T> + Errors(ErrorKind/LocationErrorCode/AppError) - 经 entry 临时 smoke 全量引用,CompileArkTS 编译通过 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
21 lines
1.2 KiB
Plaintext
21 lines
1.2 KiB
Plaintext
// contracts HAR —— 契约类型 SSOT(全工程唯一来源)
|
|
// 落地《TSGame_原生与H5接口契约总规范》§8/§9/§12 的 handler 名、DTO、错误与返回类型。
|
|
|
|
// —— Handler 名(原样拼写,不可纠正)——
|
|
export { InboundHandlers } from './src/main/ets/handlers/InboundHandlers';
|
|
export { OutboundHandlers } from './src/main/ets/handlers/OutboundHandlers';
|
|
|
|
// —— 载荷类型标注(raw / json)——
|
|
export { PayloadType, InboundPayload, InboundSyncReturn, OutboundPayload,
|
|
inboundPayloadType, outboundPayloadType } from './src/main/ets/handlers/PayloadType';
|
|
|
|
// —— 数据结构 DTO(§12,字段同名同义)——
|
|
export { SharetypeBean, MaplocationInfo, PhoneInfoBean, SavephotoURLBean,
|
|
VideoinfoBean, OthervideoinfoBean, GamePayReq, PayStateResp, ShareLoginResp,
|
|
ShareSuccessResp, OpenUrlTitleDataReq, OpenApplyDownloadReq, SwitchOverGameReq,
|
|
MediaTypeAudioReq, SrcIsLoopReq, GetAudioUrlResp, WifiLevelResp } from './src/main/ets/dto/Dtos';
|
|
|
|
// —— 错误与统一返回 ——
|
|
export { LocationErrorCode, ErrorKind, AppError, makeError } from './src/main/ets/result/Errors';
|
|
export { Result } from './src/main/ets/result/Result';
|