@fxri/swagger2api 1.0.15 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api/index.js DELETED
@@ -1,665 +0,0 @@
1
- /* eslint-disable */
2
- /* tslint:disable */
3
- // @ts-nocheck
4
- /*
5
- * ---------------------------------------------------------------
6
- * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
7
- * ## ##
8
- * ## AUTHOR: acacode ##
9
- * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
10
- * ---------------------------------------------------------------
11
- */
12
- import axios from "axios";
13
- export var ContentType;
14
- (function (ContentType) {
15
- ContentType["Json"] = "application/json";
16
- ContentType["JsonApi"] = "application/vnd.api+json";
17
- ContentType["FormData"] = "multipart/form-data";
18
- ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
19
- ContentType["Text"] = "text/plain";
20
- })(ContentType || (ContentType = {}));
21
- export class HttpClient {
22
- instance;
23
- securityData = null;
24
- securityWorker;
25
- secure;
26
- format;
27
- constructor({ securityWorker, secure, format, ...axiosConfig } = {}) {
28
- this.instance = axios.create({
29
- ...axiosConfig,
30
- baseURL: axiosConfig.baseURL || "https://kjt.yunhesoft.top/api/admin",
31
- });
32
- this.secure = secure;
33
- this.format = format;
34
- this.securityWorker = securityWorker;
35
- }
36
- setSecurityData = (data) => {
37
- this.securityData = data;
38
- };
39
- mergeRequestParams(params1, params2) {
40
- const method = params1.method || (params2 && params2.method);
41
- return {
42
- ...this.instance.defaults,
43
- ...params1,
44
- ...(params2 || {}),
45
- headers: {
46
- ...((method &&
47
- this.instance.defaults.headers[method.toLowerCase()]) ||
48
- {}),
49
- ...(params1.headers || {}),
50
- ...((params2 && params2.headers) || {}),
51
- },
52
- };
53
- }
54
- stringifyFormItem(formItem) {
55
- if (typeof formItem === "object" && formItem !== null) {
56
- return JSON.stringify(formItem);
57
- }
58
- else {
59
- return `${formItem}`;
60
- }
61
- }
62
- createFormData(input) {
63
- if (input instanceof FormData) {
64
- return input;
65
- }
66
- return Object.keys(input || {}).reduce((formData, key) => {
67
- const property = input[key];
68
- const propertyContent = property instanceof Array ? property : [property];
69
- for (const formItem of propertyContent) {
70
- const isFileType = formItem instanceof Blob || formItem instanceof File;
71
- formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem));
72
- }
73
- return formData;
74
- }, new FormData());
75
- }
76
- request = async ({ secure, path, type, query, format, body, ...params }) => {
77
- const secureParams = ((typeof secure === "boolean" ? secure : this.secure) &&
78
- this.securityWorker &&
79
- (await this.securityWorker(this.securityData))) ||
80
- {};
81
- const requestParams = this.mergeRequestParams(params, secureParams);
82
- const responseFormat = format || this.format || undefined;
83
- if (type === ContentType.FormData &&
84
- body &&
85
- body !== null &&
86
- typeof body === "object") {
87
- body = this.createFormData(body);
88
- }
89
- if (type === ContentType.Text &&
90
- body &&
91
- body !== null &&
92
- typeof body !== "string") {
93
- body = JSON.stringify(body);
94
- }
95
- return this.instance.request({
96
- ...requestParams,
97
- headers: {
98
- ...(requestParams.headers || {}),
99
- ...(type ? { "Content-Type": type } : {}),
100
- },
101
- params: query,
102
- responseType: responseFormat,
103
- data: body,
104
- url: path,
105
- });
106
- };
107
- }
108
- /**
109
- * @title 凯聚通支付平台
110
- * @version v1.0
111
- * @baseUrl https://kjt.yunhesoft.top/api/admin
112
- * @contact 云鹤软件 <admin@yunhesoft.top>
113
- *
114
- * 凯聚通支付平台后端API文档
115
- */
116
- export class Api extends HttpClient {
117
- transaction = {
118
- /**
119
- * No description
120
- *
121
- * @tags 商户交易模块
122
- * @name BatchPayLaunchPost
123
- * @summary 发起批付
124
- * @request POST:/transaction/batch-pay/launch
125
- * @response `200` `ResponseMsgBatchPayLaunchRespVo` OK
126
- */
127
- batchPayLaunchPost: (data, params = {}) => this.request({
128
- path: `/transaction/batch-pay/launch`,
129
- method: "POST",
130
- body: data,
131
- type: ContentType.Json,
132
- ...params,
133
- }),
134
- /**
135
- * No description
136
- *
137
- * @tags 商户交易模块
138
- * @name BatchPayListGet
139
- * @summary 获取当前商户的批付列表,(指定商户时需要权限)
140
- * @request GET:/transaction/batch-pay/list
141
- * @response `200` `ResponseMsgPageDataJpBatchPayRespVo` OK
142
- */
143
- batchPayListGet: (query, params = {}) => this.request({
144
- path: `/transaction/batch-pay/list`,
145
- method: "GET",
146
- query: query,
147
- ...params,
148
- }),
149
- /**
150
- * No description
151
- *
152
- * @tags 商户交易模块
153
- * @name BatchPayGetGet
154
- * @summary 获取批付详情
155
- * @request GET:/transaction/batch-pay/get
156
- * @response `200` `ResponseMsgListTransferRespVo` OK
157
- */
158
- batchPayGetGet: (query, params = {}) => this.request({
159
- path: `/transaction/batch-pay/get`,
160
- method: "GET",
161
- query: query,
162
- ...params,
163
- }),
164
- };
165
- merchant = {
166
- /**
167
- * No description
168
- *
169
- * @tags 商户模块
170
- * @name CreatePost
171
- * @summary 创建商户
172
- * @request POST:/merchant/create
173
- * @response `200` `ResponseMsgMerchantVo` OK
174
- */
175
- createPost: (data, params = {}) => this.request({
176
- path: `/merchant/create`,
177
- method: "POST",
178
- body: data,
179
- type: ContentType.Json,
180
- ...params,
181
- }),
182
- /**
183
- * No description
184
- *
185
- * @tags 商户模块
186
- * @name BalanceUpdatePost
187
- * @summary 修改商户余额
188
- * @request POST:/merchant/balance/update
189
- * @response `200` `ResponseMsgString` OK
190
- */
191
- balanceUpdatePost: (data, params = {}) => this.request({
192
- path: `/merchant/balance/update`,
193
- method: "POST",
194
- body: data,
195
- type: ContentType.Json,
196
- ...params,
197
- }),
198
- /**
199
- * No description
200
- *
201
- * @tags 商户管理员模块
202
- * @name AdminUpdatePost
203
- * @summary 修改商户管理员信息
204
- * @request POST:/merchant/admin/update
205
- * @response `200` `ResponseMsgObject` OK
206
- */
207
- adminUpdatePost: (query, params = {}) => this.request({
208
- path: `/merchant/admin/update`,
209
- method: "POST",
210
- query: query,
211
- ...params,
212
- }),
213
- /**
214
- * No description
215
- *
216
- * @tags 商户管理员模块
217
- * @name AdminUpdatePhonePost
218
- * @summary 修改商户管理员手机号
219
- * @request POST:/merchant/admin/update/phone
220
- * @response `200` `ResponseMsgString` OK
221
- */
222
- adminUpdatePhonePost: (data, params = {}) => this.request({
223
- path: `/merchant/admin/update/phone`,
224
- method: "POST",
225
- body: data,
226
- type: ContentType.Json,
227
- ...params,
228
- }),
229
- /**
230
- * @description 登出当前登录的商户管理员
231
- *
232
- * @tags 商户管理员模块
233
- * @name AdminLogoutPost
234
- * @summary 登出
235
- * @request POST:/merchant/admin/logout
236
- * @response `200` `ResponseMsgString` OK
237
- */
238
- adminLogoutPost: (params = {}) => this.request({
239
- path: `/merchant/admin/logout`,
240
- method: "POST",
241
- ...params,
242
- }),
243
- /**
244
- * No description
245
- *
246
- * @tags 商户管理员模块
247
- * @name AdminLoginPhonePost
248
- * @summary 登录
249
- * @request POST:/merchant/admin/login/phone
250
- * @response `200` `ResponseMsgMerchantLoginRespVo` OK
251
- */
252
- adminLoginPhonePost: (data, params = {}) => this.request({
253
- path: `/merchant/admin/login/phone`,
254
- method: "POST",
255
- body: data,
256
- type: ContentType.Json,
257
- ...params,
258
- }),
259
- /**
260
- * No description
261
- *
262
- * @tags 商户管理员模块
263
- * @name AdminCreatePost
264
- * @summary 创建商户管理员
265
- * @request POST:/merchant/admin/create
266
- * @response `200` `ResponseMsgMerchantAdminVo` OK
267
- */
268
- adminCreatePost: (data, params = {}) => this.request({
269
- path: `/merchant/admin/create`,
270
- method: "POST",
271
- body: data,
272
- type: ContentType.Json,
273
- ...params,
274
- }),
275
- /**
276
- * No description
277
- *
278
- * @tags 商户模块
279
- * @name ListGet
280
- * @summary 获取商户列表
281
- * @request GET:/merchant/list
282
- * @response `200` `ResponseMsgPageDataMerchantVo` OK
283
- */
284
- listGet: (query, params = {}) => this.request({
285
- path: `/merchant/list`,
286
- method: "GET",
287
- query: query,
288
- ...params,
289
- }),
290
- /**
291
- * No description
292
- *
293
- * @tags 商户模块
294
- * @name GetGet
295
- * @summary 获取商户信息 (指定获取需要权限)
296
- * @request GET:/merchant/get
297
- * @response `200` `ResponseMsgMerchantVo` OK
298
- */
299
- getGet: (query, params = {}) => this.request({
300
- path: `/merchant/get`,
301
- method: "GET",
302
- query: query,
303
- ...params,
304
- }),
305
- /**
306
- * No description
307
- *
308
- * @tags 商户模块
309
- * @name BalanceLogGetGet
310
- * @summary 获取商户余额变动记录
311
- * @request GET:/merchant/balance/log/get
312
- * @response `200` `ResponseMsgPageDataMerchantBalanceLogRespVo` OK
313
- */
314
- balanceLogGetGet: (query, params = {}) => this.request({
315
- path: `/merchant/balance/log/get`,
316
- method: "GET",
317
- query: query,
318
- ...params,
319
- }),
320
- /**
321
- * No description
322
- *
323
- * @tags 商户管理员模块
324
- * @name AdminListGet
325
- * @summary 获取商户管理员列表
326
- * @request GET:/merchant/admin/list
327
- * @response `200` `ResponseMsgPageDataMerchantAdminVo` OK
328
- */
329
- adminListGet: (query, params = {}) => this.request({
330
- path: `/merchant/admin/list`,
331
- method: "GET",
332
- query: query,
333
- ...params,
334
- }),
335
- /**
336
- * No description
337
- *
338
- * @tags 商户管理员模块
339
- * @name AdminGetGet
340
- * @summary 获取商户管理员信息
341
- * @request GET:/merchant/admin/get
342
- * @response `200` `ResponseMsgMerchantAdminVo` OK
343
- */
344
- adminGetGet: (query, params = {}) => this.request({
345
- path: `/merchant/admin/get`,
346
- method: "GET",
347
- query: query,
348
- ...params,
349
- }),
350
- };
351
- joinpay = {
352
- /**
353
- * @description 平台与分账方之间转账
354
- *
355
- * @tags 汇聚支付-交易模块
356
- * @name TransactionTransferLaunchPost
357
- * @summary 发起转账
358
- * @request POST:/joinpay/transaction/transfer/launch
359
- * @response `200` `ResponseMsgJpTransferRespVo` OK
360
- */
361
- transactionTransferLaunchPost: (data, params = {}) => this.request({
362
- path: `/joinpay/transaction/transfer/launch`,
363
- method: "POST",
364
- body: data,
365
- type: ContentType.Json,
366
- ...params,
367
- }),
368
- /**
369
- * @description 平台转账至银行卡
370
- *
371
- * @tags 汇聚支付-交易模块
372
- * @name TransactionBatchPayLaunchPost
373
- * @summary 发起批量代付
374
- * @request POST:/joinpay/transaction/batch-pay/launch
375
- * @response `200` `ResponseMsgJpBatchPayRespVo` OK
376
- */
377
- transactionBatchPayLaunchPost: (data, params = {}) => this.request({
378
- path: `/joinpay/transaction/batch-pay/launch`,
379
- method: "POST",
380
- body: data,
381
- type: ContentType.Json,
382
- ...params,
383
- }),
384
- /**
385
- * No description
386
- *
387
- * @tags 汇聚支付-交易模块
388
- * @name TransactionTransferListGet
389
- * @summary 获取交易明细列表
390
- * @request GET:/joinpay/transaction/transfer/list
391
- * @response `200` `ResponseMsgPageDataJpTransferRespVo` OK
392
- */
393
- transactionTransferListGet: (query, params = {}) => this.request({
394
- path: `/joinpay/transaction/transfer/list`,
395
- method: "GET",
396
- query: query,
397
- ...params,
398
- }),
399
- /**
400
- * No description
401
- *
402
- * @tags 汇聚支付-交易模块
403
- * @name TransactionTransferGetGet
404
- * @summary 通过交易明细Id,获取交易明细详情
405
- * @request GET:/joinpay/transaction/transfer/get
406
- * @response `200` `ResponseMsgJpTransferRespVo` OK
407
- */
408
- transactionTransferGetGet: (query, params = {}) => this.request({
409
- path: `/joinpay/transaction/transfer/get`,
410
- method: "GET",
411
- query: query,
412
- ...params,
413
- }),
414
- /**
415
- * No description
416
- *
417
- * @tags 汇聚支付-交易模块
418
- * @name TransactionBatchPayListGet
419
- * @summary 获取批量代付列表
420
- * @request GET:/joinpay/transaction/batch-pay/list
421
- * @response `200` `ResponseMsgPageDataJpBatchPayRespVo` OK
422
- */
423
- transactionBatchPayListGet: (query, params = {}) => this.request({
424
- path: `/joinpay/transaction/batch-pay/list`,
425
- method: "GET",
426
- query: query,
427
- ...params,
428
- }),
429
- /**
430
- * No description
431
- *
432
- * @tags 汇聚支付-交易模块
433
- * @name TransactionBatchPayGetGet
434
- * @summary 获取批量代付详情
435
- * @request GET:/joinpay/transaction/batch-pay/get
436
- * @response `200` `ResponseMsgJpBatchPayRespVo` OK
437
- */
438
- transactionBatchPayGetGet: (query, params = {}) => this.request({
439
- path: `/joinpay/transaction/batch-pay/get`,
440
- method: "GET",
441
- query: query,
442
- ...params,
443
- }),
444
- /**
445
- * No description
446
- *
447
- * @tags 汇聚支付-商户模块
448
- * @name MerchantListGet
449
- * @summary 获取商户分页
450
- * @request GET:/joinpay/merchant/list
451
- * @response `200` `ResponseMsgPageDataJpMerchantRespVo` OK
452
- */
453
- merchantListGet: (query, params = {}) => this.request({
454
- path: `/joinpay/merchant/list`,
455
- method: "GET",
456
- query: query,
457
- ...params,
458
- }),
459
- };
460
- external = {
461
- /**
462
- * No description
463
- *
464
- * @tags 凯聚通API模块
465
- * @name V1SignPost
466
- * @request POST:/external/v1/sign
467
- * @response `200` `ResponseMsgExternalReqVo` OK
468
- */
469
- v1SignPost: (params = {}) => this.request({
470
- path: `/external/v1/sign`,
471
- method: "POST",
472
- ...params,
473
- }),
474
- /**
475
- * No description
476
- *
477
- * @tags 凯聚通API模块
478
- * @name V1InvokePost
479
- * @summary 统一入口
480
- * @request POST:/external/v1/invoke
481
- * @response `200` `ResponseMsgObject` OK
482
- */
483
- v1InvokePost: (data, params = {}) => this.request({
484
- path: `/external/v1/invoke`,
485
- method: "POST",
486
- body: data,
487
- type: ContentType.Json,
488
- ...params,
489
- }),
490
- };
491
- captcha = {
492
- /**
493
- * @description 5分钟内有效
494
- *
495
- * @tags 验证码模块
496
- * @name SmsPost
497
- * @summary 发送短信验证码
498
- * @request POST:/captcha/sms
499
- * @response `200` `ResponseMsgCaptchaSmsSendRespVo` OK
500
- */
501
- smsPost: (data, params = {}) => this.request({
502
- path: `/captcha/sms`,
503
- method: "POST",
504
- body: data,
505
- type: ContentType.Json,
506
- ...params,
507
- }),
508
- /**
509
- * @description 5分钟内有效
510
- *
511
- * @tags 验证码模块
512
- * @name ImageGenerateGet
513
- * @summary 生成图像验证码
514
- * @request GET:/captcha/image/generate
515
- * @response `200` `ResponseMsgCaptchaImageVo` OK
516
- */
517
- imageGenerateGet: (params = {}) => this.request({
518
- path: `/captcha/image/generate`,
519
- method: "GET",
520
- ...params,
521
- }),
522
- };
523
- admin = {
524
- /**
525
- * No description
526
- *
527
- * @tags 管理员模块
528
- * @name UpdatePost
529
- * @summary 更新管理员信息
530
- * @request POST:/admin/update
531
- * @response `200` `ResponseMsgObject` OK
532
- */
533
- updatePost: (data, params = {}) => this.request({
534
- path: `/admin/update`,
535
- method: "POST",
536
- body: data,
537
- type: ContentType.Json,
538
- ...params,
539
- }),
540
- /**
541
- * No description
542
- *
543
- * @tags 管理员模块
544
- * @name UpdatePhonePost
545
- * @summary 修改手机号码
546
- * @request POST:/admin/update/phone
547
- * @response `200` `ResponseMsgString` OK
548
- */
549
- updatePhonePost: (data, params = {}) => this.request({
550
- path: `/admin/update/phone`,
551
- method: "POST",
552
- body: data,
553
- type: ContentType.Json,
554
- ...params,
555
- }),
556
- /**
557
- * @description 登出当前登录的管理员
558
- *
559
- * @tags 管理员模块
560
- * @name LogoutPost
561
- * @summary 登出
562
- * @request POST:/admin/logout
563
- * @response `200` `ResponseMsgString` OK
564
- */
565
- logoutPost: (params = {}) => this.request({
566
- path: `/admin/logout`,
567
- method: "POST",
568
- ...params,
569
- }),
570
- /**
571
- * No description
572
- *
573
- * @tags 管理员模块
574
- * @name LoginPhonePost
575
- * @summary 通过手机验证登录
576
- * @request POST:/admin/login/phone
577
- * @response `200` `ResponseMsgAdminLoginRespVo` OK
578
- */
579
- loginPhonePost: (data, params = {}) => this.request({
580
- path: `/admin/login/phone`,
581
- method: "POST",
582
- body: data,
583
- type: ContentType.Json,
584
- ...params,
585
- }),
586
- /**
587
- * No description
588
- *
589
- * @tags 管理员模块
590
- * @name DeletePost
591
- * @summary 删除管理员(软删除)
592
- * @request POST:/admin/delete
593
- * @response `200` `ResponseMsgObject` OK
594
- */
595
- deletePost: (query, params = {}) => this.request({
596
- path: `/admin/delete`,
597
- method: "POST",
598
- query: query,
599
- ...params,
600
- }),
601
- /**
602
- * No description
603
- *
604
- * @tags 管理员模块
605
- * @name CreatePost
606
- * @summary 创建管理员
607
- * @request POST:/admin/create
608
- * @response `200` `ResponseMsgAdminVo` OK
609
- */
610
- createPost: (data, params = {}) => this.request({
611
- path: `/admin/create`,
612
- method: "POST",
613
- body: data,
614
- type: ContentType.Json,
615
- ...params,
616
- }),
617
- /**
618
- * No description
619
- *
620
- * @tags 管理员模块
621
- * @name ListGet
622
- * @summary 获取管理员列表
623
- * @request GET:/admin/list
624
- * @response `200` `ResponseMsgPageDataAdminVo` OK
625
- */
626
- listGet: (query, params = {}) => this.request({
627
- path: `/admin/list`,
628
- method: "GET",
629
- query: query,
630
- ...params,
631
- }),
632
- /**
633
- * No description
634
- *
635
- * @tags 管理员模块
636
- * @name GetGet
637
- * @summary 获取指定管理员信息
638
- * @request GET:/admin/get
639
- * @response `200` `ResponseMsgAdminVo` OK
640
- */
641
- getGet: (query, params = {}) => this.request({
642
- path: `/admin/get`,
643
- method: "GET",
644
- query: query,
645
- ...params,
646
- }),
647
- };
648
- common = {
649
- /**
650
- * No description
651
- *
652
- * @tags 通用模块
653
- * @name EnumListGet
654
- * @summary 获取枚举列表,多个请用,隔开
655
- * @request GET:/common/enum/list
656
- * @response `200` `ResponseMsgListEnumVo` OK
657
- */
658
- enumListGet: (query, params = {}) => this.request({
659
- path: `/common/enum/list`,
660
- method: "GET",
661
- query: query,
662
- ...params,
663
- }),
664
- };
665
- }