Captcha.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 { ResultOutputCaptchaData, ResultOutputValidateResult, SlideTrack } from './data-contracts'
  12. import { ContentType, HttpClient, RequestParams } from './http-client'
  13. export class CaptchaApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
  14. /**
  15. * No description
  16. *
  17. * @tags captcha
  18. * @name Generate
  19. * @summary 生成
  20. * @request POST:/api/admin/captcha/generate
  21. * @secure
  22. */
  23. generate = (
  24. query?: {
  25. captchaId?: string
  26. },
  27. params: RequestParams = {}
  28. ) =>
  29. this.request<ResultOutputCaptchaData, any>({
  30. path: `/api/admin/captcha/generate`,
  31. method: 'POST',
  32. query: query,
  33. secure: true,
  34. format: 'json',
  35. ...params,
  36. })
  37. /**
  38. * No description
  39. *
  40. * @tags captcha
  41. * @name Check
  42. * @summary 验证
  43. * @request POST:/api/admin/captcha/check
  44. * @secure
  45. */
  46. check = (
  47. data: SlideTrack,
  48. query?: {
  49. id?: string
  50. },
  51. params: RequestParams = {}
  52. ) =>
  53. this.request<ResultOutputValidateResult, any>({
  54. path: `/api/admin/captcha/check`,
  55. method: 'POST',
  56. query: query,
  57. body: data,
  58. secure: true,
  59. type: ContentType.Json,
  60. format: 'json',
  61. ...params,
  62. })
  63. }