sms.ts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. // @ts-ignore
  2. /* eslint-disable */
  3. import { request } from 'umi';
  4. /**
  5. * @author bianlanzhou
  6. * @since 2024-11-06
  7. * @desc sms 后端请求方法定义
  8. */
  9. /** 分页查询短信签名 */
  10. export async function pageQuerySmsSign(params: any, options?: { [key: string]: any }) {
  11. return request('/sms/sign/page', {
  12. method: 'GET',
  13. params: {
  14. ...params,
  15. },
  16. ...(options || {}),
  17. });
  18. }
  19. /** 查询短信签名 */
  20. export async function querySmsSign(params?: any, options?: { [key: string]: any }) {
  21. return request('/sms/sign/list', {
  22. method: 'GET',
  23. params: {
  24. ...params,
  25. },
  26. ...(options || {}),
  27. });
  28. }
  29. /** 更新/插入短信签名 */
  30. export async function upsertSmsSign(data: SMS.SignatureUpsertCmd, options?: { [key: string]: any }) {
  31. return request('/sms/sign/upsert', {
  32. method: 'POST',
  33. data: {
  34. ...data,
  35. },
  36. ...(options || {}),
  37. });
  38. }
  39. /** 分页查询短信模版 */
  40. export async function pageQuerySmsTemplate(params: any, options?: { [key: string]: any }) {
  41. return request('/sms/template/page', {
  42. method: 'GET',
  43. params: {
  44. ...params,
  45. },
  46. ...(options || {}),
  47. });
  48. }
  49. /** 查询短信模版 */
  50. export async function querySmsTemplate(params?: any, options?: { [key: string]: any }) {
  51. return request('/sms/template/list', {
  52. method: 'GET',
  53. params: {
  54. ...params,
  55. },
  56. ...(options || {}),
  57. });
  58. }
  59. /** 更新/插入短信模版 */
  60. export async function upsertSmsTemplate(data: SMS.TemplateUpsertCmd, options?: { [key: string]: any }) {
  61. return request('/sms/template/upsert', {
  62. method: 'POST',
  63. data: {
  64. ...data,
  65. },
  66. ...(options || {}),
  67. });
  68. }
  69. /** 分页查询短信服务 */
  70. export async function pageQuerySmsService(params: any, options?: { [key: string]: any }) {
  71. return request('/sms/service/page', {
  72. method: 'GET',
  73. params: {
  74. ...params,
  75. },
  76. ...(options || {}),
  77. });
  78. }
  79. /** 更新/插入短信服务 */
  80. export async function upsertSmsService(data: SMS.ServiceUpsertCmd, options?: { [key: string]: any }) {
  81. return request('/sms/service/upsert', {
  82. method: 'POST',
  83. data: {
  84. ...data,
  85. },
  86. ...(options || {}),
  87. });
  88. }
  89. /** 分页查询短信平台 */
  90. export async function pageQuerySmsPlatform(params: any, options?: { [key: string]: any }) {
  91. return request('/sms/platform/page', {
  92. method: 'GET',
  93. params: {
  94. ...params,
  95. },
  96. ...(options || {}),
  97. });
  98. }
  99. /** 查询短信平台 */
  100. export async function querySmsPlatform(params?: any, options?: { [key: string]: any }) {
  101. return request('/sms/platform/list', {
  102. method: 'GET',
  103. params: {
  104. ...params,
  105. },
  106. ...(options || {}),
  107. });
  108. }
  109. /** 更新/插入短信平台 */
  110. export async function upsertSmsPlatform(data: SMS.PlatformUpsertCmd, options?: { [key: string]: any }) {
  111. return request('/sms/platform/upsert', {
  112. method: 'POST',
  113. data: {
  114. ...data,
  115. },
  116. ...(options || {}),
  117. });
  118. }
  119. /** 分页查询短信通道 */
  120. export async function pageQuerySmsChannel(params: any, options?: { [key: string]: any }) {
  121. return request('/sms/channel/page', {
  122. method: 'GET',
  123. params: {
  124. ...params,
  125. },
  126. ...(options || {}),
  127. });
  128. }
  129. /** 分页查询短信通道 */
  130. export async function querySmsChannel(params: any, options?: { [key: string]: any }) {
  131. return request('/sms/channel/list', {
  132. method: 'GET',
  133. params: {
  134. ...params,
  135. },
  136. ...(options || {}),
  137. });
  138. }
  139. /** 更新/插入短信通道 */
  140. export async function upsertSmsChannel(data: SMS.ChannelUpsertCmd, options?: { [key: string]: any }) {
  141. return request('/sms/channel/upsert', {
  142. method: 'POST',
  143. data: {
  144. ...data,
  145. },
  146. ...(options || {}),
  147. });
  148. }