DictionaryType.ts 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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. DictionaryTypeAddInput,
  14. DictionaryTypeUpdateInput,
  15. PageInputDictionaryTypeGetPageDto,
  16. ResultOutputDictionaryTypeGetOutput,
  17. ResultOutputInt64,
  18. ResultOutputPageOutputDictionaryTypeListOutput,
  19. } from './data-contracts'
  20. import { ContentType, HttpClient, RequestParams } from './http-client'
  21. export class DictionaryTypeApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  22. /**
  23. * No description
  24. *
  25. * @tags dictionary-type
  26. * @name Get
  27. * @summary 查询字典类型
  28. * @request GET:/api/admin/dictionary-type/get
  29. * @secure
  30. */
  31. get = (
  32. query?: {
  33. /** @format int64 */
  34. id?: number
  35. },
  36. params: RequestParams = {}
  37. ) =>
  38. this.request<ResultOutputDictionaryTypeGetOutput, any>({
  39. path: `/api/admin/dictionary-type/get`,
  40. method: 'GET',
  41. query: query,
  42. secure: true,
  43. format: 'json',
  44. ...params,
  45. })
  46. /**
  47. * No description
  48. *
  49. * @tags dictionary-type
  50. * @name GetPage
  51. * @summary 查询字典类型列表
  52. * @request POST:/api/admin/dictionary-type/get-page
  53. * @secure
  54. */
  55. getPage = (data: PageInputDictionaryTypeGetPageDto, params: RequestParams = {}) =>
  56. this.request<ResultOutputPageOutputDictionaryTypeListOutput, any>({
  57. path: `/api/admin/dictionary-type/get-page`,
  58. method: 'POST',
  59. body: data,
  60. secure: true,
  61. type: ContentType.Json,
  62. format: 'json',
  63. ...params,
  64. })
  65. /**
  66. * No description
  67. *
  68. * @tags dictionary-type
  69. * @name Add
  70. * @summary 新增
  71. * @request POST:/api/admin/dictionary-type/add
  72. * @secure
  73. */
  74. add = (data: DictionaryTypeAddInput, params: RequestParams = {}) =>
  75. this.request<ResultOutputInt64, any>({
  76. path: `/api/admin/dictionary-type/add`,
  77. method: 'POST',
  78. body: data,
  79. secure: true,
  80. type: ContentType.Json,
  81. format: 'json',
  82. ...params,
  83. })
  84. /**
  85. * No description
  86. *
  87. * @tags dictionary-type
  88. * @name Update
  89. * @summary 修改
  90. * @request PUT:/api/admin/dictionary-type/update
  91. * @secure
  92. */
  93. update = (data: DictionaryTypeUpdateInput, params: RequestParams = {}) =>
  94. this.request<AxiosResponse, any>({
  95. path: `/api/admin/dictionary-type/update`,
  96. method: 'PUT',
  97. body: data,
  98. secure: true,
  99. type: ContentType.Json,
  100. ...params,
  101. })
  102. /**
  103. * No description
  104. *
  105. * @tags dictionary-type
  106. * @name Delete
  107. * @summary 彻底删除
  108. * @request DELETE:/api/admin/dictionary-type/delete
  109. * @secure
  110. */
  111. delete = (
  112. query?: {
  113. /** @format int64 */
  114. id?: number
  115. },
  116. params: RequestParams = {}
  117. ) =>
  118. this.request<AxiosResponse, any>({
  119. path: `/api/admin/dictionary-type/delete`,
  120. method: 'DELETE',
  121. query: query,
  122. secure: true,
  123. ...params,
  124. })
  125. /**
  126. * No description
  127. *
  128. * @tags dictionary-type
  129. * @name SoftDelete
  130. * @summary 删除
  131. * @request DELETE:/api/admin/dictionary-type/soft-delete
  132. * @secure
  133. */
  134. softDelete = (
  135. query?: {
  136. /** @format int64 */
  137. id?: number
  138. },
  139. params: RequestParams = {}
  140. ) =>
  141. this.request<AxiosResponse, any>({
  142. path: `/api/admin/dictionary-type/soft-delete`,
  143. method: 'DELETE',
  144. query: query,
  145. secure: true,
  146. ...params,
  147. })
  148. /**
  149. * No description
  150. *
  151. * @tags dictionary-type
  152. * @name BatchSoftDelete
  153. * @summary 批量删除
  154. * @request PUT:/api/admin/dictionary-type/batch-soft-delete
  155. * @secure
  156. */
  157. batchSoftDelete = (data: number[], params: RequestParams = {}) =>
  158. this.request<AxiosResponse, any>({
  159. path: `/api/admin/dictionary-type/batch-soft-delete`,
  160. method: 'PUT',
  161. body: data,
  162. secure: true,
  163. type: ContentType.Json,
  164. ...params,
  165. })
  166. }