1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

doc: 修复生成文档预览问题

This commit is contained in:
jaywcjlove 2020-07-24 14:00:21 +08:00
parent 4d23f71b5a
commit a1ef27db98

285
index.d.ts vendored
View File

@ -2,162 +2,157 @@
/// <reference lib="esnext" />
/**
* React Native Android/iOS
*
* , https://docs.open.alipay.com/204/105301
*/
declare module "@uiw/react-native-alipay" {
/**
*
* , https://docs.open.alipay.com/204/105301
*/
export interface OrderResultStr {
alipay_trade_app_pay_response: {
/**
* 64 70501111111S001111119
*/
out_trade_no: string;
/**
* 6464 2014112400001000340011111118
*/
trade_no: string;
/**
* 32Id 2014072300007148
*/
app_id: string;
/**
* 9 RMB-Yuan[0.01,100000000.00] 9.00
*/
total_amount: number;
/**
* 16208816 20886894
*/
seller_id: string;
/**
* 16code返回结果的描述 success
*/
msg: string;
/**
* 16 utf-8
*/
charset: string;
/**
* 32 2016-10-11 17:43:36
*/
timestamp: string;
/**
* 16
*/
code: string;
},
sign: string;
sign_type: 'RSA2' | 'RSA';
}
/**
*
* @returns
*
* ```json
* {
* result: '{"alipay_trade_app_pay_response":{"code":"10000","msg":"Success","app_id":"2021001172656340","auth_app_id":"2021001172656340","charset":"UTF-8","timestamp":"2020-07-08 21:30:14","out_trade_no":"123123213123214","total_amount":"0.01","trade_no":"2020070822001414841426413774","seller_id":"2088421915791034"},"sign":"LY7wCsNLp+QnDqCq6VelY/RvyK7ZGY8wsXoKvS+Or7JjONLDUx5P6lDgqRKkpkng7br3y6GZzfGKaZ88Tf4eMnBMKyqU+huR2Um47xUxP383njvHlxuQZsSTLQZRswy4wmb/fPkFfvyH6Or6+oj0eboePOTu63bNr+h03w0QnP4znuHpfRuoVgWpsYh/6B1DL+4xfWRKJ21zm1SV9Feo9RWqnyTaGZyFVi6IKge0dUCYs9hXju95fOUVUOx5YflOFtSEnZafY9Ls4FCRQE1ANkjaKiKIE0+c4c4sEVEf/9Dwh88N+aSQOoLT+AV4RpjMoA8hF2k+vv2OKNeqr6SYGQ==","sign_type":"RSA2"}',
* resultStatus: '9000',
* memo: ''
* }
* ```
*
* @returns
*
* ```json
* {
* memo: "Error Domain=系统繁忙,请稍后再试 Code=1000 \"(null)\"",
* result: "",
* resultStatus: "4000",
* }
* ```
*/
export interface OrderResult {
export interface OrderResultStr {
alipay_trade_app_pay_response: {
/**
*
* [](https://opendocs.alipay.com/open/204/105301#%E8%BF%94%E5%9B%9E%E7%BB%93%E6%9E%9C%E7%A4%BA%E4%BE%8B%EF%BC%88iOS%7CAndroid%EF%BC%89)
* `JSON.parse` {@link OrderResultStr}
* @typeParam OrderResultStr
* @example
*
* ```json
* '{"alipay_trade_app_pay_response":{"code":"10000","msg":"Success","app_id":"2021001172656340","auth_app_id":"2021001172656340","charset":"UTF-8","timestamp":"2020-07-08 21:30:14","out_trade_no":"123123213123214","total_amount":"0.01","trade_no":"2020070822001414841426413774","seller_id":"2088421915791034"},"sign":"LY7wCsNLp+QnDqCq6VelY/RvyK7ZGY8wsXoKvS+Or7JjONLDUx5P6lDgqRKkpkng7br3y6GZzfGKaZ88Tf4eMnBMKyqU+huR2Um47xUxP383njvHlxuQZsSTLQZRswy4wmb/fPkFfvyH6Or6+oj0eboePOTu63bNr+h03w0QnP4znuHpfRuoVgWpsYh/6B1DL+4xfWRKJ21zm1SV9Feo9RWqnyTaGZyFVi6IKge0dUCYs9hXju95fOUVUOx5YflOFtSEnZafY9Ls4FCRQE1ANkjaKiKIE0+c4c4sEVEf/9Dwh88N+aSQOoLT+AV4RpjMoA8hF2k+vv2OKNeqr6SYGQ==","sign_type":"RSA2"}'
* ```
*
* 64 70501111111S001111119
*/
result?: string;
out_trade_no: string;
/**
*
* - 9000
* - 8000
* - 4000
* - 5000
* - 6001
* - 6002
* - 6004
* -
* 6464 2014112400001000340011111118
*/
resultStatus?: '9000' | '8000' | '4000' | '5000' | '6001' | '6002' | '6004' | string;
trade_no: string;
/**
*
* "Error Domain=系统繁忙,请稍后再试 Code=1000 "(null)""
* 32Id 2014072300007148
*/
memo: string;
}
/**
* [](https://opendocs.alipay.com/open/218/105327#%E8%BF%94%E5%9B%9E%E7%BB%93%E6%9E%9C%E8%AF%B4%E6%98%8E)
*
*/
export interface AuthResult {
app_id: string;
/**
* 144
* - `result_code` result_code状态代码resultStatus为9000result_code为200
* - `auth_code`
* @example `success=true&auth_code=9c11732de44f4f1790b63978b6fbOX53&result_code=200&alipay_open_id=20881001757376426161095132517425&user_id=2088003646494707`
* 9 RMB-Yuan[0.01,100000000.00] 9.00
*/
result: string;
total_amount: number;
/**
* 5resultStatus状态代码
* - 9000
* - 4000
* - 6001
* - 6002
* 16208816 20886894
*/
resultStatus: '9000' | '4000' | '6001' | '6002';
seller_id: string;
/**
*
* 16code返回结果的描述 success
*/
memo: string;
}
/**
*
* @param payInfo
* @returns result https://docs.open.alipay.com/204/105301
*/
export function alipay(payInfo: string): Promise<OrderResult>;
/**
*
* @param authInfoStr
* @returns result https://opendocs.alipay.com/open/218/105327
*/
export function authInfo(authInfoStr: string): Promise<AuthResult>;
/**
* SDK
* @return SDK
*/
export function getVersion(): Promise<string>;
/**
* Scheme iOS
* @param scheme scheme = `ap` + `APPID`
* @platform ios
*/
export function setAlipayScheme(scheme: string): void;
/**
* Android
* @param isSandBox
* @platform android
*/
export function setAlipaySandbox(isSandbox: boolean): void;
msg: string;
/**
* 16 utf-8
*/
charset: string;
/**
* 32 2016-10-11 17:43:36
*/
timestamp: string;
/**
* 16
*/
code: string;
},
sign: string;
sign_type: 'RSA2' | 'RSA';
}
/**
*
* @returns
*
* ```json
* {
* result: '{"alipay_trade_app_pay_response":{"code":"10000","msg":"Success","app_id":"2021001172656340","auth_app_id":"2021001172656340","charset":"UTF-8","timestamp":"2020-07-08 21:30:14","out_trade_no":"123123213123214","total_amount":"0.01","trade_no":"2020070822001414841426413774","seller_id":"2088421915791034"},"sign":"LY7wCsNLp+QnDqCq6VelY/RvyK7ZGY8wsXoKvS+Or7JjONLDUx5P6lDgqRKkpkng7br3y6GZzfGKaZ88Tf4eMnBMKyqU+huR2Um47xUxP383njvHlxuQZsSTLQZRswy4wmb/fPkFfvyH6Or6+oj0eboePOTu63bNr+h03w0QnP4znuHpfRuoVgWpsYh/6B1DL+4xfWRKJ21zm1SV9Feo9RWqnyTaGZyFVi6IKge0dUCYs9hXju95fOUVUOx5YflOFtSEnZafY9Ls4FCRQE1ANkjaKiKIE0+c4c4sEVEf/9Dwh88N+aSQOoLT+AV4RpjMoA8hF2k+vv2OKNeqr6SYGQ==","sign_type":"RSA2"}',
* resultStatus: '9000',
* memo: ''
* }
* ```
*
* @returns
*
* ```json
* {
* memo: "Error Domain=系统繁忙,请稍后再试 Code=1000 \"(null)\"",
* result: "",
* resultStatus: "4000",
* }
* ```
*/
export interface OrderResult {
/**
*
* [](https://opendocs.alipay.com/open/204/105301#%E8%BF%94%E5%9B%9E%E7%BB%93%E6%9E%9C%E7%A4%BA%E4%BE%8B%EF%BC%88iOS%7CAndroid%EF%BC%89)
* `JSON.parse` {@link OrderResultStr}
* @typeParam OrderResultStr
* @example
*
* ```json
* '{"alipay_trade_app_pay_response":{"code":"10000","msg":"Success","app_id":"2021001172656340","auth_app_id":"2021001172656340","charset":"UTF-8","timestamp":"2020-07-08 21:30:14","out_trade_no":"123123213123214","total_amount":"0.01","trade_no":"2020070822001414841426413774","seller_id":"2088421915791034"},"sign":"LY7wCsNLp+QnDqCq6VelY/RvyK7ZGY8wsXoKvS+Or7JjONLDUx5P6lDgqRKkpkng7br3y6GZzfGKaZ88Tf4eMnBMKyqU+huR2Um47xUxP383njvHlxuQZsSTLQZRswy4wmb/fPkFfvyH6Or6+oj0eboePOTu63bNr+h03w0QnP4znuHpfRuoVgWpsYh/6B1DL+4xfWRKJ21zm1SV9Feo9RWqnyTaGZyFVi6IKge0dUCYs9hXju95fOUVUOx5YflOFtSEnZafY9Ls4FCRQE1ANkjaKiKIE0+c4c4sEVEf/9Dwh88N+aSQOoLT+AV4RpjMoA8hF2k+vv2OKNeqr6SYGQ==","sign_type":"RSA2"}'
* ```
*
*/
result?: string;
/**
*
* - 9000
* - 8000
* - 4000
* - 5000
* - 6001
* - 6002
* - 6004
* -
*/
resultStatus?: '9000' | '8000' | '4000' | '5000' | '6001' | '6002' | '6004' | string;
/**
*
* "Error Domain=系统繁忙,请稍后再试 Code=1000 "(null)""
*/
memo: string;
}
/**
* [](https://opendocs.alipay.com/open/218/105327#%E8%BF%94%E5%9B%9E%E7%BB%93%E6%9E%9C%E8%AF%B4%E6%98%8E)
*
*/
export interface AuthResult {
/**
* 144
* - `result_code` result_code状态代码resultStatus为9000result_code为200
* - `auth_code`
* @example `success=true&auth_code=9c11732de44f4f1790b63978b6fbOX53&result_code=200&alipay_open_id=20881001757376426161095132517425&user_id=2088003646494707`
*/
result: string;
/**
* 5resultStatus状态代码
* - 9000
* - 4000
* - 6001
* - 6002
*/
resultStatus: '9000' | '4000' | '6001' | '6002';
/**
*
*/
memo: string;
}
/**
*
* @param payInfo
* @returns result https://docs.open.alipay.com/204/105301
*/
export function alipay(payInfo: string): Promise<OrderResult>;
/**
*
* @param authInfoStr
* @returns result https://opendocs.alipay.com/open/218/105327
*/
export function authInfo(authInfoStr: string): Promise<AuthResult>;
/**
* SDK
* @return SDK
*/
export function getVersion(): Promise<string>;
/**
* Scheme iOS
* @param scheme scheme = `ap` + `APPID`
* @platform ios
*/
export function setAlipayScheme(scheme: string): void;
/**
* Android
* @param isSandBox
* @platform android
*/
export function setAlipaySandbox(isSandbox: boolean): void;