interface.d.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /// <reference types="node" />
  2. interface Iamount {
  3. total: number;
  4. currency?: string;
  5. }
  6. interface Idetail {
  7. cost_price?: number;
  8. invoice_id?: string;
  9. goods_detail?: IgoodsDetail[];
  10. }
  11. interface IgoodsDetail {
  12. merchant_goods_id: string;
  13. wechatpay_goods_id?: string;
  14. goods_name?: string;
  15. quantity: number;
  16. unit_price: number;
  17. }
  18. interface Ipayer {
  19. openid: string;
  20. }
  21. interface IsceneInfoH5 {
  22. payer_client_ip: string;
  23. device_id?: string;
  24. store_info?: IstoreInfo;
  25. h5_info: Ih5Info;
  26. }
  27. interface IsceneInfoNative {
  28. payer_client_ip: string;
  29. device_id?: string;
  30. store_info?: IstoreInfo;
  31. }
  32. interface IstoreInfo {
  33. id: string;
  34. name?: string;
  35. area_code?: string;
  36. address?: string;
  37. }
  38. interface Ih5Info {
  39. type: string;
  40. app_name: string;
  41. app_url?: string;
  42. bundle_id?: string;
  43. package_name?: string;
  44. }
  45. export interface Ioptions {
  46. userAgent?: string;
  47. authType?: string;
  48. key?: string;
  49. serial_no?: string;
  50. }
  51. export interface Ipay {
  52. appid: string;
  53. mchid: string;
  54. serial_no?: string;
  55. publicKey: Buffer;
  56. privateKey: Buffer;
  57. authType?: string;
  58. userAgent?: string;
  59. key?: string;
  60. }
  61. export interface Ih5 {
  62. description: string;
  63. out_trade_no: string;
  64. time_expire?: string;
  65. attach?: string;
  66. notify_url: string;
  67. goods_tag?: string;
  68. amount: Iamount;
  69. detail?: Idetail;
  70. scene_info: IsceneInfoH5;
  71. }
  72. export interface Inative {
  73. description: string;
  74. out_trade_no: string;
  75. time_expire?: string;
  76. attach?: string;
  77. notify_url: string;
  78. goods_tag?: string;
  79. amount: Iamount;
  80. detail?: Idetail;
  81. scene_info?: IsceneInfoNative;
  82. }
  83. export interface Ijsapi {
  84. description: string;
  85. out_trade_no: string;
  86. time_expire?: string;
  87. attach?: string;
  88. notify_url: string;
  89. goods_tag?: string;
  90. amount: Iamount;
  91. payer: Ipayer;
  92. detail?: Idetail;
  93. scene_info?: IsceneInfoNative;
  94. }
  95. export interface Iapp {
  96. description: string;
  97. out_trade_no: string;
  98. time_expire?: string;
  99. attach?: string;
  100. notify_url: string;
  101. goods_tag?: string;
  102. amount: Iamount;
  103. detail?: Idetail;
  104. scene_info?: IsceneInfoNative;
  105. }
  106. export interface Iquery1 {
  107. transaction_id: string;
  108. out_trade_no?: string;
  109. }
  110. export interface Iquery2 {
  111. transaction_id?: string;
  112. out_trade_no: string;
  113. }
  114. export interface Itradebill {
  115. bill_date: string;
  116. sub_mchid?: string;
  117. bill_type: string;
  118. tar_type?: string;
  119. }
  120. export interface Ifundflowbill {
  121. bill_date: string;
  122. account_type: string;
  123. tar_type?: string;
  124. }
  125. export interface Irefunds {
  126. out_refund_no: string;
  127. reason?: string;
  128. notify_url?: string;
  129. funds_account?: string;
  130. amount: IRamount;
  131. goods_detail?: IRgoodsDetail[];
  132. }
  133. export interface Irefunds1 extends Irefunds {
  134. transaction_id: string;
  135. out_trade_no?: string;
  136. }
  137. export interface Irefunds2 extends Irefunds {
  138. transaction_id?: string;
  139. out_trade_no: string;
  140. }
  141. interface IRamount {
  142. total: number;
  143. currency: string;
  144. refund: number;
  145. }
  146. interface IRgoodsDetail {
  147. merchant_goods_id: string;
  148. wechatpay_goods_id?: string;
  149. goods_name?: string;
  150. refund_quantity: number;
  151. unit_price: number;
  152. refund_amount: number;
  153. }
  154. /**
  155. * 证书信息
  156. */
  157. export interface ICertificates {
  158. effective_time: string;
  159. expire_time: string;
  160. serial_no: string;
  161. publicKey?: string;
  162. encrypt_certificate: {
  163. algorithm: string;
  164. associated_data: string;
  165. ciphertext: string;
  166. nonce: string;
  167. };
  168. }
  169. export {};