View.ts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. /* eslint-disable */
  2. /* tslint:disable */
  3. /*
  4. * ---------------------------------------------------------------
  5. * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
  6. * ## ##
  7. * ## AUTHOR: acacode ##
  8. * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
  9. * ---------------------------------------------------------------
  10. */
  11. import { AxiosResponse } from 'axios'
  12. import {
  13. ResultOutputInt64,
  14. ResultOutputListViewListOutput,
  15. ResultOutputViewGetOutput,
  16. ViewAddInput,
  17. ViewSyncInput,
  18. ViewUpdateInput,
  19. } from './data-contracts'
  20. import { ContentType, HttpClient, RequestParams } from './http-client'
  21. export class ViewApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  22. /**
  23. * No description
  24. *
  25. * @tags view
  26. * @name Get
  27. * @summary 查询
  28. * @request GET:/api/admin/view/get
  29. * @secure
  30. */
  31. get = (
  32. query?: {
  33. /** @format int64 */
  34. id?: number
  35. },
  36. params: RequestParams = {}
  37. ) =>
  38. this.request<ResultOutputViewGetOutput, any>({
  39. path: `/api/admin/view/get`,
  40. method: 'GET',
  41. query: query,
  42. secure: true,
  43. format: 'json',
  44. ...params,
  45. })
  46. /**
  47. * No description
  48. *
  49. * @tags view
  50. * @name GetList
  51. * @summary 查询列表
  52. * @request GET:/api/admin/view/get-list
  53. * @secure
  54. */
  55. getList = (
  56. query?: {
  57. key?: string
  58. },
  59. params: RequestParams = {}
  60. ) =>
  61. this.request<ResultOutputListViewListOutput, any>({
  62. path: `/api/admin/view/get-list`,
  63. method: 'GET',
  64. query: query,
  65. secure: true,
  66. format: 'json',
  67. ...params,
  68. })
  69. /**
  70. * No description
  71. *
  72. * @tags view
  73. * @name Add
  74. * @summary 新增
  75. * @request POST:/api/admin/view/add
  76. * @secure
  77. */
  78. add = (data: ViewAddInput, params: RequestParams = {}) =>
  79. this.request<ResultOutputInt64, any>({
  80. path: `/api/admin/view/add`,
  81. method: 'POST',
  82. body: data,
  83. secure: true,
  84. type: ContentType.Json,
  85. format: 'json',
  86. ...params,
  87. })
  88. /**
  89. * No description
  90. *
  91. * @tags view
  92. * @name Update
  93. * @summary 修改
  94. * @request PUT:/api/admin/view/update
  95. * @secure
  96. */
  97. update = (data: ViewUpdateInput, params: RequestParams = {}) =>
  98. this.request<AxiosResponse, any>({
  99. path: `/api/admin/view/update`,
  100. method: 'PUT',
  101. body: data,
  102. secure: true,
  103. type: ContentType.Json,
  104. ...params,
  105. })
  106. /**
  107. * No description
  108. *
  109. * @tags view
  110. * @name Delete
  111. * @summary 彻底删除
  112. * @request DELETE:/api/admin/view/delete
  113. * @secure
  114. */
  115. delete = (
  116. query?: {
  117. /** @format int64 */
  118. id?: number
  119. },
  120. params: RequestParams = {}
  121. ) =>
  122. this.request<AxiosResponse, any>({
  123. path: `/api/admin/view/delete`,
  124. method: 'DELETE',
  125. query: query,
  126. secure: true,
  127. ...params,
  128. })
  129. /**
  130. * No description
  131. *
  132. * @tags view
  133. * @name BatchDelete
  134. * @summary 批量彻底删除
  135. * @request PUT:/api/admin/view/batch-delete
  136. * @secure
  137. */
  138. batchDelete = (data: number[], params: RequestParams = {}) =>
  139. this.request<AxiosResponse, any>({
  140. path: `/api/admin/view/batch-delete`,
  141. method: 'PUT',
  142. body: data,
  143. secure: true,
  144. type: ContentType.Json,
  145. ...params,
  146. })
  147. /**
  148. * No description
  149. *
  150. * @tags view
  151. * @name SoftDelete
  152. * @summary 删除
  153. * @request DELETE:/api/admin/view/soft-delete
  154. * @secure
  155. */
  156. softDelete = (
  157. query?: {
  158. /** @format int64 */
  159. id?: number
  160. },
  161. params: RequestParams = {}
  162. ) =>
  163. this.request<AxiosResponse, any>({
  164. path: `/api/admin/view/soft-delete`,
  165. method: 'DELETE',
  166. query: query,
  167. secure: true,
  168. ...params,
  169. })
  170. /**
  171. * No description
  172. *
  173. * @tags view
  174. * @name BatchSoftDelete
  175. * @summary 批量删除
  176. * @request PUT:/api/admin/view/batch-soft-delete
  177. * @secure
  178. */
  179. batchSoftDelete = (data: number[], params: RequestParams = {}) =>
  180. this.request<AxiosResponse, any>({
  181. path: `/api/admin/view/batch-soft-delete`,
  182. method: 'PUT',
  183. body: data,
  184. secure: true,
  185. type: ContentType.Json,
  186. ...params,
  187. })
  188. /**
  189. * No description
  190. *
  191. * @tags view
  192. * @name Sync
  193. * @summary 同步
  194. * @request POST:/api/admin/view/sync
  195. * @secure
  196. */
  197. sync = (data: ViewSyncInput, params: RequestParams = {}) =>
  198. this.request<AxiosResponse, any>({
  199. path: `/api/admin/view/sync`,
  200. method: 'POST',
  201. body: data,
  202. secure: true,
  203. type: ContentType.Json,
  204. ...params,
  205. })
  206. }