anchor-sdk 0.1.42 → 0.1.43-beta.1
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/AnchorApiClientV2.d.ts +40 -1
- package/dist/AnchorApiClientV2.js +45 -3
- package/dist/generated/Api.d.ts +1705 -1447
- package/dist/generated/Api.js +389 -315
- package/package.json +83 -83
package/dist/generated/Api.js
CHANGED
|
@@ -107,10 +107,9 @@ class HttpClient {
|
|
|
107
107
|
const r = response;
|
|
108
108
|
r.data = null;
|
|
109
109
|
r.error = null;
|
|
110
|
-
const responseToParse = responseFormat ? response.clone() : response;
|
|
111
110
|
const data = !responseFormat
|
|
112
111
|
? r
|
|
113
|
-
: await
|
|
112
|
+
: await response[responseFormat]()
|
|
114
113
|
.then((data) => {
|
|
115
114
|
if (r.ok) {
|
|
116
115
|
r.data = data;
|
|
@@ -181,161 +180,189 @@ exports.HttpClient = HttpClient;
|
|
|
181
180
|
class Api extends HttpClient {
|
|
182
181
|
constructor() {
|
|
183
182
|
super(...arguments);
|
|
184
|
-
this.
|
|
183
|
+
this.s1 = {
|
|
185
184
|
/**
|
|
186
|
-
* @description
|
|
185
|
+
* @description assets of badge
|
|
187
186
|
*
|
|
188
|
-
* @tags
|
|
189
|
-
* @name
|
|
190
|
-
* @summary
|
|
191
|
-
* @request
|
|
187
|
+
* @tags AnchorS2S
|
|
188
|
+
* @name QueryAssets
|
|
189
|
+
* @summary assets of badge
|
|
190
|
+
* @request POST:/s1/assets/{type}
|
|
192
191
|
*/
|
|
193
|
-
|
|
194
|
-
path: `/
|
|
195
|
-
method: "
|
|
196
|
-
|
|
192
|
+
queryAssets: (type, data, params = {}) => this.request({
|
|
193
|
+
path: `/s1/assets/${type}`,
|
|
194
|
+
method: "POST",
|
|
195
|
+
body: data,
|
|
196
|
+
type: ContentType.Json,
|
|
197
197
|
format: "json",
|
|
198
198
|
...params,
|
|
199
199
|
}),
|
|
200
200
|
/**
|
|
201
|
-
* @description
|
|
201
|
+
* @description grant badge
|
|
202
202
|
*
|
|
203
|
-
* @tags
|
|
204
|
-
* @name
|
|
205
|
-
* @summary
|
|
206
|
-
* @request
|
|
203
|
+
* @tags AnchorS2S
|
|
204
|
+
* @name GrantBadge
|
|
205
|
+
* @summary grant badge
|
|
206
|
+
* @request POST:/s1/badges
|
|
207
207
|
*/
|
|
208
|
-
|
|
209
|
-
path: `/
|
|
210
|
-
method: "
|
|
211
|
-
|
|
208
|
+
grantBadge: (data, params = {}) => this.request({
|
|
209
|
+
path: `/s1/badges`,
|
|
210
|
+
method: "POST",
|
|
211
|
+
body: data,
|
|
212
|
+
type: ContentType.Json,
|
|
212
213
|
format: "json",
|
|
213
214
|
...params,
|
|
214
215
|
}),
|
|
215
216
|
/**
|
|
216
|
-
* @description
|
|
217
|
+
* @description badges check
|
|
217
218
|
*
|
|
218
|
-
* @tags
|
|
219
|
-
* @name
|
|
220
|
-
* @summary
|
|
221
|
-
* @request POST:/
|
|
219
|
+
* @tags AnchorS2S
|
|
220
|
+
* @name BadgesCheck
|
|
221
|
+
* @summary badges check
|
|
222
|
+
* @request POST:/s1/badges/check
|
|
222
223
|
*/
|
|
223
|
-
|
|
224
|
-
path: `/
|
|
224
|
+
badgesCheck: (data, params = {}) => this.request({
|
|
225
|
+
path: `/s1/badges/check`,
|
|
225
226
|
method: "POST",
|
|
227
|
+
body: data,
|
|
228
|
+
type: ContentType.Json,
|
|
226
229
|
format: "json",
|
|
227
230
|
...params,
|
|
228
231
|
}),
|
|
229
232
|
/**
|
|
230
|
-
* @description
|
|
233
|
+
* @description query badges holders
|
|
231
234
|
*
|
|
232
|
-
* @tags
|
|
233
|
-
* @name
|
|
234
|
-
* @summary
|
|
235
|
-
* @request GET:/
|
|
235
|
+
* @tags AnchorS2S
|
|
236
|
+
* @name QueryBadgesHolders
|
|
237
|
+
* @summary query badges holders
|
|
238
|
+
* @request GET:/s1/badges/holders
|
|
236
239
|
*/
|
|
237
|
-
|
|
238
|
-
path: `/
|
|
240
|
+
queryBadgesHolders: (query, params = {}) => this.request({
|
|
241
|
+
path: `/s1/badges/holders`,
|
|
239
242
|
method: "GET",
|
|
243
|
+
query: query,
|
|
240
244
|
format: "json",
|
|
241
245
|
...params,
|
|
242
246
|
}),
|
|
243
247
|
/**
|
|
244
|
-
* @description
|
|
248
|
+
* @description check by event
|
|
245
249
|
*
|
|
246
|
-
* @tags
|
|
247
|
-
* @name
|
|
248
|
-
* @summary
|
|
249
|
-
* @request
|
|
250
|
+
* @tags AnchorS2S
|
|
251
|
+
* @name CheckByEvent
|
|
252
|
+
* @summary check by event
|
|
253
|
+
* @request POST:/s1/check/event
|
|
250
254
|
*/
|
|
251
|
-
|
|
252
|
-
path: `/
|
|
253
|
-
method: "
|
|
255
|
+
checkByEvent: (data, params = {}) => this.request({
|
|
256
|
+
path: `/s1/check/event`,
|
|
257
|
+
method: "POST",
|
|
258
|
+
body: data,
|
|
259
|
+
type: ContentType.Json,
|
|
254
260
|
format: "json",
|
|
255
261
|
...params,
|
|
256
262
|
}),
|
|
257
263
|
/**
|
|
258
|
-
* @description
|
|
264
|
+
* @description 重制探测徽章冷却时间
|
|
259
265
|
*
|
|
260
|
-
* @tags
|
|
261
|
-
* @name
|
|
262
|
-
* @summary
|
|
263
|
-
* @request POST:/
|
|
266
|
+
* @tags AnchorS2S
|
|
267
|
+
* @name IntervalReset
|
|
268
|
+
* @summary interval reset
|
|
269
|
+
* @request POST:/s1/interval/reset
|
|
264
270
|
*/
|
|
265
|
-
|
|
266
|
-
path: `/
|
|
271
|
+
intervalReset: (data, params = {}) => this.request({
|
|
272
|
+
path: `/s1/interval/reset`,
|
|
267
273
|
method: "POST",
|
|
274
|
+
body: data,
|
|
275
|
+
type: ContentType.Json,
|
|
268
276
|
format: "json",
|
|
269
277
|
...params,
|
|
270
278
|
}),
|
|
271
279
|
/**
|
|
272
|
-
* @description
|
|
280
|
+
* @description 查询钱包地址列表对应的NFT持有数量(持有时间超过指定时间戳),透传调用RemoteNftService.GetUserNftHoldingByDuration
|
|
273
281
|
*
|
|
274
|
-
* @tags
|
|
275
|
-
* @name
|
|
276
|
-
* @summary
|
|
277
|
-
* @request
|
|
282
|
+
* @tags AnchorS2S
|
|
283
|
+
* @name GetUserNftHoldingByDuration
|
|
284
|
+
* @summary 查询NFT持有数量(按持有时长)
|
|
285
|
+
* @request POST:/s1/nft/holding-by-duration
|
|
278
286
|
*/
|
|
279
|
-
|
|
280
|
-
path: `/
|
|
281
|
-
method: "
|
|
287
|
+
getUserNftHoldingByDuration: (data, params = {}) => this.request({
|
|
288
|
+
path: `/s1/nft/holding-by-duration`,
|
|
289
|
+
method: "POST",
|
|
290
|
+
body: data,
|
|
291
|
+
type: ContentType.Json,
|
|
282
292
|
format: "json",
|
|
283
293
|
...params,
|
|
284
294
|
}),
|
|
285
295
|
/**
|
|
286
|
-
* @description
|
|
296
|
+
* @description purchase mint with signature
|
|
287
297
|
*
|
|
288
|
-
* @tags
|
|
289
|
-
* @name
|
|
290
|
-
* @summary
|
|
291
|
-
* @request
|
|
298
|
+
* @tags AnchorS2S
|
|
299
|
+
* @name PurchaseMint
|
|
300
|
+
* @summary purchase mint with signature
|
|
301
|
+
* @request POST:/s1/purchase/{type}
|
|
292
302
|
*/
|
|
293
|
-
|
|
294
|
-
path: `/
|
|
295
|
-
method: "
|
|
303
|
+
purchaseMint: (type, data, params = {}) => this.request({
|
|
304
|
+
path: `/s1/purchase/${type}`,
|
|
305
|
+
method: "POST",
|
|
306
|
+
body: data,
|
|
307
|
+
type: ContentType.Json,
|
|
296
308
|
format: "json",
|
|
297
309
|
...params,
|
|
298
310
|
}),
|
|
299
311
|
/**
|
|
300
|
-
* @description
|
|
312
|
+
* @description get nft series by id
|
|
301
313
|
*
|
|
302
|
-
* @tags
|
|
303
|
-
* @name
|
|
304
|
-
* @summary
|
|
305
|
-
* @request GET:/
|
|
314
|
+
* @tags AnchorS2S
|
|
315
|
+
* @name GetNftSeriesDetail
|
|
316
|
+
* @summary get nft series by id
|
|
317
|
+
* @request GET:/s1/series/{type}/{series}
|
|
306
318
|
*/
|
|
307
|
-
|
|
308
|
-
path: `/
|
|
319
|
+
getNftSeriesDetail: (type, series, query, params = {}) => this.request({
|
|
320
|
+
path: `/s1/series/${type}/${series}`,
|
|
309
321
|
method: "GET",
|
|
310
322
|
query: query,
|
|
311
323
|
format: "json",
|
|
312
324
|
...params,
|
|
313
325
|
}),
|
|
314
326
|
/**
|
|
315
|
-
* @description
|
|
327
|
+
* @description 创建新团队,支持设置背景图
|
|
316
328
|
*
|
|
317
|
-
* @tags
|
|
318
|
-
* @name
|
|
319
|
-
* @summary
|
|
320
|
-
* @request
|
|
329
|
+
* @tags AnchorS2S
|
|
330
|
+
* @name CreateTeam
|
|
331
|
+
* @summary Create team
|
|
332
|
+
* @request POST:/s1/teams
|
|
321
333
|
*/
|
|
322
|
-
|
|
323
|
-
path: `/
|
|
334
|
+
createTeam: (data, params = {}) => this.request({
|
|
335
|
+
path: `/s1/teams`,
|
|
336
|
+
method: "POST",
|
|
337
|
+
body: data,
|
|
338
|
+
type: ContentType.Json,
|
|
339
|
+
format: "json",
|
|
340
|
+
...params,
|
|
341
|
+
}),
|
|
342
|
+
/**
|
|
343
|
+
* @description 查询我的团队信息
|
|
344
|
+
*
|
|
345
|
+
* @tags AnchorS2S
|
|
346
|
+
* @name TeamDetail
|
|
347
|
+
* @summary query my team info
|
|
348
|
+
* @request GET:/s1/teams/detail/{userId}
|
|
349
|
+
*/
|
|
350
|
+
teamDetail: (userId, params = {}) => this.request({
|
|
351
|
+
path: `/s1/teams/detail/${userId}`,
|
|
324
352
|
method: "GET",
|
|
325
|
-
query: query,
|
|
326
353
|
format: "json",
|
|
327
354
|
...params,
|
|
328
355
|
}),
|
|
329
356
|
/**
|
|
330
|
-
* @description
|
|
357
|
+
* @description 加入团队,支持通过邀请码或直接指定团队ID
|
|
331
358
|
*
|
|
332
|
-
* @tags
|
|
333
|
-
* @name
|
|
334
|
-
* @summary
|
|
335
|
-
* @request POST:/
|
|
359
|
+
* @tags AnchorS2S
|
|
360
|
+
* @name JoinTeam
|
|
361
|
+
* @summary Join team
|
|
362
|
+
* @request POST:/s1/teams/join
|
|
336
363
|
*/
|
|
337
|
-
|
|
338
|
-
path: `/
|
|
364
|
+
joinTeam: (data, params = {}) => this.request({
|
|
365
|
+
path: `/s1/teams/join`,
|
|
339
366
|
method: "POST",
|
|
340
367
|
body: data,
|
|
341
368
|
type: ContentType.Json,
|
|
@@ -343,45 +370,91 @@ class Api extends HttpClient {
|
|
|
343
370
|
...params,
|
|
344
371
|
}),
|
|
345
372
|
/**
|
|
346
|
-
* @description
|
|
373
|
+
* @description 退出当前团队
|
|
347
374
|
*
|
|
348
|
-
* @tags
|
|
349
|
-
* @name
|
|
350
|
-
* @summary
|
|
351
|
-
* @request
|
|
375
|
+
* @tags AnchorS2S
|
|
376
|
+
* @name LeaveTeam
|
|
377
|
+
* @summary Leave team (self)
|
|
378
|
+
* @request DELETE:/s1/teams/leave/{userId}
|
|
352
379
|
*/
|
|
353
|
-
|
|
354
|
-
path: `/
|
|
380
|
+
leaveTeam: (userId, params = {}) => this.request({
|
|
381
|
+
path: `/s1/teams/leave/${userId}`,
|
|
382
|
+
method: "DELETE",
|
|
383
|
+
format: "json",
|
|
384
|
+
...params,
|
|
385
|
+
}),
|
|
386
|
+
/**
|
|
387
|
+
* @description 队长移除团队成员
|
|
388
|
+
*
|
|
389
|
+
* @tags AnchorS2S
|
|
390
|
+
* @name RemoveTeamMember
|
|
391
|
+
* @summary Remove member by captain
|
|
392
|
+
* @request DELETE:/s1/teams/remove/{captainUserId}/{userId}
|
|
393
|
+
*/
|
|
394
|
+
removeTeamMember: (captainUserId, userId, params = {}) => this.request({
|
|
395
|
+
path: `/s1/teams/remove/${captainUserId}/${userId}`,
|
|
396
|
+
method: "DELETE",
|
|
397
|
+
format: "json",
|
|
398
|
+
...params,
|
|
399
|
+
}),
|
|
400
|
+
/**
|
|
401
|
+
* @description 批量查询多个钱包地址的代币余额,透传调用RemoteInsightTokenService.GetTokenBalances
|
|
402
|
+
*
|
|
403
|
+
* @tags AnchorS2S
|
|
404
|
+
* @name GetTokenBalances
|
|
405
|
+
* @summary 批量查询代币余额
|
|
406
|
+
* @request POST:/s1/token/balances
|
|
407
|
+
*/
|
|
408
|
+
getTokenBalances: (data, params = {}) => this.request({
|
|
409
|
+
path: `/s1/token/balances`,
|
|
410
|
+
method: "POST",
|
|
411
|
+
body: data,
|
|
412
|
+
type: ContentType.Json,
|
|
413
|
+
format: "json",
|
|
414
|
+
...params,
|
|
415
|
+
}),
|
|
416
|
+
};
|
|
417
|
+
this.v1 = {
|
|
418
|
+
/**
|
|
419
|
+
* @description query user claimable or claimed Badges
|
|
420
|
+
*
|
|
421
|
+
* @tags Anchor
|
|
422
|
+
* @name BadgeAssets
|
|
423
|
+
* @summary query user claimable or claimed Badges
|
|
424
|
+
* @request GET:/v1/badges
|
|
425
|
+
*/
|
|
426
|
+
badgeAssets: (query, params = {}) => this.request({
|
|
427
|
+
path: `/v1/badges`,
|
|
355
428
|
method: "GET",
|
|
356
429
|
query: query,
|
|
357
430
|
format: "json",
|
|
358
431
|
...params,
|
|
359
432
|
}),
|
|
360
433
|
/**
|
|
361
|
-
* @description get
|
|
434
|
+
* @description get check result
|
|
362
435
|
*
|
|
363
436
|
* @tags Anchor
|
|
364
|
-
* @name
|
|
365
|
-
* @summary get
|
|
366
|
-
* @request GET:/v1/
|
|
437
|
+
* @name GetCheckResult
|
|
438
|
+
* @summary get check result
|
|
439
|
+
* @request GET:/v1/check/{type}
|
|
367
440
|
*/
|
|
368
|
-
|
|
369
|
-
path: `/v1/
|
|
441
|
+
getCheckResult: (type, params = {}) => this.request({
|
|
442
|
+
path: `/v1/check/${type}`,
|
|
370
443
|
method: "GET",
|
|
371
444
|
format: "json",
|
|
372
445
|
...params,
|
|
373
446
|
}),
|
|
374
447
|
/**
|
|
375
|
-
* @description
|
|
448
|
+
* @description anchor check
|
|
376
449
|
*
|
|
377
|
-
* @tags
|
|
378
|
-
* @name
|
|
379
|
-
* @summary
|
|
380
|
-
* @request
|
|
450
|
+
* @tags Anchor
|
|
451
|
+
* @name Check
|
|
452
|
+
* @summary anchor check
|
|
453
|
+
* @request POST:/v1/check/{type}
|
|
381
454
|
*/
|
|
382
|
-
|
|
383
|
-
path: `/v1/
|
|
384
|
-
method: "
|
|
455
|
+
check: (type, params = {}) => this.request({
|
|
456
|
+
path: `/v1/check/${type}`,
|
|
457
|
+
method: "POST",
|
|
385
458
|
format: "json",
|
|
386
459
|
...params,
|
|
387
460
|
}),
|
|
@@ -401,137 +474,159 @@ class Api extends HttpClient {
|
|
|
401
474
|
...params,
|
|
402
475
|
}),
|
|
403
476
|
/**
|
|
404
|
-
* @description
|
|
477
|
+
* @description 标记指定通知为已读状态
|
|
405
478
|
*
|
|
406
|
-
* @tags
|
|
407
|
-
* @name
|
|
408
|
-
* @summary
|
|
409
|
-
* @request POST:/v1/
|
|
479
|
+
* @tags TeamV1
|
|
480
|
+
* @name MarkNotificationRead
|
|
481
|
+
* @summary Mark notification as read
|
|
482
|
+
* @request POST:/v1/notifications/{notificationId}/read
|
|
410
483
|
*/
|
|
411
|
-
|
|
412
|
-
path: `/v1/
|
|
484
|
+
markNotificationRead: (notificationId, params = {}) => this.request({
|
|
485
|
+
path: `/v1/notifications/${notificationId}/read`,
|
|
413
486
|
method: "POST",
|
|
414
487
|
format: "json",
|
|
415
488
|
...params,
|
|
416
489
|
}),
|
|
417
|
-
};
|
|
418
|
-
this.v2 = {
|
|
419
490
|
/**
|
|
420
|
-
* @description
|
|
491
|
+
* @description list season config
|
|
421
492
|
*
|
|
422
|
-
* @tags
|
|
423
|
-
* @name
|
|
424
|
-
* @summary
|
|
425
|
-
* @request GET:/
|
|
493
|
+
* @tags Season
|
|
494
|
+
* @name ListSeasonConfig
|
|
495
|
+
* @summary list season config
|
|
496
|
+
* @request GET:/v1/seasons
|
|
426
497
|
*/
|
|
427
|
-
|
|
428
|
-
path: `/
|
|
498
|
+
listSeasonConfig: (params = {}) => this.request({
|
|
499
|
+
path: `/v1/seasons`,
|
|
429
500
|
method: "GET",
|
|
430
|
-
query: query,
|
|
431
501
|
format: "json",
|
|
432
502
|
...params,
|
|
433
503
|
}),
|
|
434
504
|
/**
|
|
435
|
-
* @description
|
|
505
|
+
* @description get nft series
|
|
436
506
|
*
|
|
437
|
-
* @tags
|
|
438
|
-
* @name
|
|
439
|
-
* @summary
|
|
440
|
-
* @request GET:/
|
|
507
|
+
* @tags Anchor
|
|
508
|
+
* @name NftSeries
|
|
509
|
+
* @summary get nft series
|
|
510
|
+
* @request GET:/v1/series/{type}
|
|
441
511
|
*/
|
|
442
|
-
|
|
443
|
-
path: `/
|
|
512
|
+
nftSeries: (type, params = {}) => this.request({
|
|
513
|
+
path: `/v1/series/${type}`,
|
|
444
514
|
method: "GET",
|
|
445
|
-
query: query,
|
|
446
515
|
format: "json",
|
|
447
516
|
...params,
|
|
448
517
|
}),
|
|
449
518
|
/**
|
|
450
|
-
* @description
|
|
519
|
+
* @description get nft series by id
|
|
451
520
|
*
|
|
452
|
-
* @tags
|
|
453
|
-
* @name
|
|
454
|
-
* @summary
|
|
455
|
-
* @request GET:/
|
|
521
|
+
* @tags Anchor
|
|
522
|
+
* @name GetNftSeriesById
|
|
523
|
+
* @summary get nft series by id
|
|
524
|
+
* @request GET:/v1/series/{type}/{series}
|
|
456
525
|
*/
|
|
457
|
-
|
|
458
|
-
path: `/
|
|
526
|
+
getNftSeriesById: (type, series, query, params = {}) => this.request({
|
|
527
|
+
path: `/v1/series/${type}/${series}`,
|
|
459
528
|
method: "GET",
|
|
460
529
|
query: query,
|
|
461
530
|
format: "json",
|
|
462
531
|
...params,
|
|
463
532
|
}),
|
|
464
533
|
/**
|
|
465
|
-
* @description
|
|
534
|
+
* @description 获取团队所有徽章的状态信息,支持按状态筛选
|
|
466
535
|
*
|
|
467
|
-
* @tags
|
|
468
|
-
* @name
|
|
469
|
-
* @summary Get
|
|
470
|
-
* @request GET:/
|
|
536
|
+
* @tags TeamV1
|
|
537
|
+
* @name GetTeamBadges
|
|
538
|
+
* @summary Get team badges
|
|
539
|
+
* @request GET:/v1/teams/badges
|
|
471
540
|
*/
|
|
472
|
-
|
|
473
|
-
path: `/
|
|
541
|
+
getTeamBadges: (query, params = {}) => this.request({
|
|
542
|
+
path: `/v1/teams/badges`,
|
|
474
543
|
method: "GET",
|
|
475
544
|
query: query,
|
|
476
545
|
format: "json",
|
|
477
546
|
...params,
|
|
478
547
|
}),
|
|
479
548
|
/**
|
|
480
|
-
* @description
|
|
549
|
+
* @description 获取指定徽章的贡献者列表
|
|
481
550
|
*
|
|
482
|
-
* @tags
|
|
483
|
-
* @name
|
|
484
|
-
* @summary
|
|
485
|
-
* @request
|
|
551
|
+
* @tags TeamV1
|
|
552
|
+
* @name GetBadgeContributors
|
|
553
|
+
* @summary Get badge contributors
|
|
554
|
+
* @request GET:/v1/teams/badges/{badgeId}/contributors
|
|
486
555
|
*/
|
|
487
|
-
|
|
488
|
-
path: `/
|
|
489
|
-
method: "
|
|
490
|
-
body: data,
|
|
491
|
-
type: ContentType.Json,
|
|
556
|
+
getBadgeContributors: (badgeId, params = {}) => this.request({
|
|
557
|
+
path: `/v1/teams/badges/${badgeId}/contributors`,
|
|
558
|
+
method: "GET",
|
|
492
559
|
format: "json",
|
|
493
560
|
...params,
|
|
494
561
|
}),
|
|
495
562
|
/**
|
|
496
|
-
* @description
|
|
563
|
+
* @description 获取团队排行榜,支持分页查询,返回个人团队信息
|
|
497
564
|
*
|
|
498
|
-
* @tags
|
|
499
|
-
* @name
|
|
500
|
-
* @summary
|
|
501
|
-
* @request GET:/
|
|
565
|
+
* @tags TeamV1
|
|
566
|
+
* @name GetTeamLeaderboard
|
|
567
|
+
* @summary Get team leaderboard
|
|
568
|
+
* @request GET:/v1/teams/leaderboard
|
|
502
569
|
*/
|
|
503
|
-
|
|
504
|
-
path: `/
|
|
570
|
+
getTeamLeaderboard: (query, params = {}) => this.request({
|
|
571
|
+
path: `/v1/teams/leaderboard`,
|
|
505
572
|
method: "GET",
|
|
506
573
|
query: query,
|
|
507
574
|
format: "json",
|
|
508
575
|
...params,
|
|
509
576
|
}),
|
|
510
577
|
/**
|
|
511
|
-
* @description
|
|
578
|
+
* @description 获取当前用户的个人概况信息
|
|
512
579
|
*
|
|
513
|
-
* @tags
|
|
514
|
-
* @name
|
|
515
|
-
* @summary
|
|
516
|
-
* @request GET:/
|
|
580
|
+
* @tags TeamV1
|
|
581
|
+
* @name GetMyTeamProfile
|
|
582
|
+
* @summary Get my team profile
|
|
583
|
+
* @request GET:/v1/teams/members/me
|
|
584
|
+
*/
|
|
585
|
+
getMyTeamProfile: (params = {}) => this.request({
|
|
586
|
+
path: `/v1/teams/members/me`,
|
|
587
|
+
method: "GET",
|
|
588
|
+
format: "json",
|
|
589
|
+
...params,
|
|
590
|
+
}),
|
|
591
|
+
/**
|
|
592
|
+
* @description 获取团队详情,包含已解锁的徽章信息
|
|
593
|
+
*
|
|
594
|
+
* @tags TeamV1
|
|
595
|
+
* @name GetTeamDetail
|
|
596
|
+
* @summary Get team detail
|
|
597
|
+
* @request GET:/v1/teams/{teamId}/detail
|
|
598
|
+
*/
|
|
599
|
+
getTeamDetail: (teamId, params = {}) => this.request({
|
|
600
|
+
path: `/v1/teams/${teamId}/detail`,
|
|
601
|
+
method: "GET",
|
|
602
|
+
format: "json",
|
|
603
|
+
...params,
|
|
604
|
+
}),
|
|
605
|
+
/**
|
|
606
|
+
* @description 获取团队内成员贡献排行榜
|
|
607
|
+
*
|
|
608
|
+
* @tags TeamV1
|
|
609
|
+
* @name GetTeamMemberRanking
|
|
610
|
+
* @summary Get team member ranking
|
|
611
|
+
* @request GET:/v1/teams/{teamId}/members/ranking
|
|
517
612
|
*/
|
|
518
|
-
|
|
519
|
-
path: `/
|
|
613
|
+
getTeamMemberRanking: (teamId, query, params = {}) => this.request({
|
|
614
|
+
path: `/v1/teams/${teamId}/members/ranking`,
|
|
520
615
|
method: "GET",
|
|
521
616
|
query: query,
|
|
522
617
|
format: "json",
|
|
523
618
|
...params,
|
|
524
619
|
}),
|
|
525
620
|
/**
|
|
526
|
-
* @description
|
|
621
|
+
* @description 前端监听到合约成功事件,调用加快后端事件处理
|
|
527
622
|
*
|
|
528
|
-
* @tags
|
|
529
|
-
* @name
|
|
530
|
-
* @summary
|
|
531
|
-
* @request POST:/
|
|
623
|
+
* @tags Transaction
|
|
624
|
+
* @name UserOpHashProcess
|
|
625
|
+
* @summary userOpHash process
|
|
626
|
+
* @request POST:/v1/transaction/process/userOpHash
|
|
532
627
|
*/
|
|
533
|
-
|
|
534
|
-
path: `/
|
|
628
|
+
userOpHashProcess: (data, params = {}) => this.request({
|
|
629
|
+
path: `/v1/transaction/process/userOpHash`,
|
|
535
630
|
method: "POST",
|
|
536
631
|
body: data,
|
|
537
632
|
type: ContentType.Json,
|
|
@@ -539,47 +634,46 @@ class Api extends HttpClient {
|
|
|
539
634
|
...params,
|
|
540
635
|
}),
|
|
541
636
|
/**
|
|
542
|
-
* @description
|
|
637
|
+
* @description 前端监听到合约成功事件,调用加快后端事件处理
|
|
543
638
|
*
|
|
544
|
-
* @tags
|
|
545
|
-
* @name
|
|
546
|
-
* @summary
|
|
547
|
-
* @request POST:/
|
|
639
|
+
* @tags Transaction
|
|
640
|
+
* @name TransactionHashProcess
|
|
641
|
+
* @summary speed up transaction
|
|
642
|
+
* @request POST:/v1/transaction/process/{txHash}
|
|
548
643
|
*/
|
|
549
|
-
|
|
550
|
-
path: `/
|
|
644
|
+
transactionHashProcess: (txHash, params = {}) => this.request({
|
|
645
|
+
path: `/v1/transaction/process/${txHash}`,
|
|
551
646
|
method: "POST",
|
|
552
|
-
body: data,
|
|
553
|
-
type: ContentType.Json,
|
|
554
647
|
format: "json",
|
|
555
648
|
...params,
|
|
556
649
|
}),
|
|
650
|
+
};
|
|
651
|
+
this.v2 = {
|
|
557
652
|
/**
|
|
558
|
-
* @description
|
|
653
|
+
* @description query badges by conditions
|
|
559
654
|
*
|
|
560
655
|
* @tags BadgeV2
|
|
561
|
-
* @name
|
|
562
|
-
* @summary
|
|
563
|
-
* @request
|
|
656
|
+
* @name QueryBadges
|
|
657
|
+
* @summary query badges by conditions
|
|
658
|
+
* @request GET:/v2/badges
|
|
564
659
|
*/
|
|
565
|
-
|
|
566
|
-
path: `/v2/badges
|
|
567
|
-
method: "
|
|
568
|
-
|
|
569
|
-
type: ContentType.Json,
|
|
660
|
+
queryBadges: (query, params = {}) => this.request({
|
|
661
|
+
path: `/v2/badges`,
|
|
662
|
+
method: "GET",
|
|
663
|
+
query: query,
|
|
570
664
|
format: "json",
|
|
571
665
|
...params,
|
|
572
666
|
}),
|
|
573
667
|
/**
|
|
574
|
-
* @description Check
|
|
668
|
+
* @description Check which badges the user can claim
|
|
575
669
|
*
|
|
576
670
|
* @tags BadgeV2
|
|
577
|
-
* @name
|
|
578
|
-
* @summary Check
|
|
579
|
-
* @request POST:/v2/badges
|
|
671
|
+
* @name CheckUserClaimableBadges
|
|
672
|
+
* @summary Check user claimable badges
|
|
673
|
+
* @request POST:/v2/badges
|
|
580
674
|
*/
|
|
581
|
-
|
|
582
|
-
path: `/v2/badges
|
|
675
|
+
checkUserClaimableBadges: (data, params = {}) => this.request({
|
|
676
|
+
path: `/v2/badges`,
|
|
583
677
|
method: "POST",
|
|
584
678
|
body: data,
|
|
585
679
|
type: ContentType.Json,
|
|
@@ -587,121 +681,104 @@ class Api extends HttpClient {
|
|
|
587
681
|
...params,
|
|
588
682
|
}),
|
|
589
683
|
/**
|
|
590
|
-
* @description Get
|
|
684
|
+
* @description Get user's claimed and claimable badge assets
|
|
591
685
|
*
|
|
592
686
|
* @tags BadgeV2
|
|
593
|
-
* @name
|
|
594
|
-
* @summary Get badge
|
|
595
|
-
* @request GET:/v2/badges/
|
|
687
|
+
* @name GetUserBadgeAssets
|
|
688
|
+
* @summary Get user badge assets
|
|
689
|
+
* @request GET:/v2/badges/assets
|
|
596
690
|
*/
|
|
597
|
-
|
|
598
|
-
path: `/v2/badges
|
|
691
|
+
getUserBadgeAssets: (query, params = {}) => this.request({
|
|
692
|
+
path: `/v2/badges/assets`,
|
|
599
693
|
method: "GET",
|
|
694
|
+
query: query,
|
|
600
695
|
format: "json",
|
|
601
696
|
...params,
|
|
602
697
|
}),
|
|
603
|
-
};
|
|
604
|
-
this.s1 = {
|
|
605
698
|
/**
|
|
606
|
-
* @description
|
|
699
|
+
* @description Query badge by category
|
|
607
700
|
*
|
|
608
|
-
* @tags
|
|
609
|
-
* @name
|
|
610
|
-
* @summary
|
|
611
|
-
* @request GET:/
|
|
701
|
+
* @tags BadgeV2
|
|
702
|
+
* @name CategoriesList
|
|
703
|
+
* @summary Query badge by category
|
|
704
|
+
* @request GET:/v2/badges/categories
|
|
612
705
|
*/
|
|
613
|
-
|
|
614
|
-
path: `/
|
|
706
|
+
categoriesList: (query, params = {}) => this.request({
|
|
707
|
+
path: `/v2/badges/categories`,
|
|
615
708
|
method: "GET",
|
|
616
709
|
query: query,
|
|
617
710
|
format: "json",
|
|
618
711
|
...params,
|
|
619
712
|
}),
|
|
620
713
|
/**
|
|
621
|
-
* @description
|
|
622
|
-
*
|
|
623
|
-
* @tags AnchorS2S
|
|
624
|
-
* @name LeaveTeam
|
|
625
|
-
* @summary Leave team (self)
|
|
626
|
-
* @request DELETE:/s1/teams/leave/{userId}
|
|
627
|
-
*/
|
|
628
|
-
leaveTeam: (userId, params = {}) => this.request({
|
|
629
|
-
path: `/s1/teams/leave/${userId}`,
|
|
630
|
-
method: "DELETE",
|
|
631
|
-
format: "json",
|
|
632
|
-
...params,
|
|
633
|
-
}),
|
|
634
|
-
/**
|
|
635
|
-
* @description 加入团队,支持通过邀请码或直接指定团队ID
|
|
714
|
+
* @description Get detailed information of a specific badge category
|
|
636
715
|
*
|
|
637
|
-
* @tags
|
|
638
|
-
* @name
|
|
639
|
-
* @summary
|
|
640
|
-
* @request
|
|
716
|
+
* @tags BadgeV2
|
|
717
|
+
* @name CategoriesDetail
|
|
718
|
+
* @summary Get badge detail by category
|
|
719
|
+
* @request GET:/v2/badges/categories/{category}
|
|
641
720
|
*/
|
|
642
|
-
|
|
643
|
-
path: `/
|
|
644
|
-
method: "
|
|
645
|
-
body: data,
|
|
646
|
-
type: ContentType.Json,
|
|
721
|
+
categoriesDetail: (category, params = {}) => this.request({
|
|
722
|
+
path: `/v2/badges/categories/${category}`,
|
|
723
|
+
method: "GET",
|
|
647
724
|
format: "json",
|
|
648
725
|
...params,
|
|
649
726
|
}),
|
|
650
727
|
/**
|
|
651
|
-
* @description
|
|
728
|
+
* @description Get badges that the user can claim
|
|
652
729
|
*
|
|
653
|
-
* @tags
|
|
654
|
-
* @name
|
|
655
|
-
* @summary
|
|
656
|
-
* @request GET:/
|
|
730
|
+
* @tags BadgeV2
|
|
731
|
+
* @name GetUserClaimableBadges
|
|
732
|
+
* @summary Get user claimable badges
|
|
733
|
+
* @request GET:/v2/badges/claimable
|
|
657
734
|
*/
|
|
658
|
-
|
|
659
|
-
path: `/
|
|
735
|
+
getUserClaimableBadges: (query, params = {}) => this.request({
|
|
736
|
+
path: `/v2/badges/claimable`,
|
|
660
737
|
method: "GET",
|
|
661
738
|
query: query,
|
|
662
739
|
format: "json",
|
|
663
740
|
...params,
|
|
664
741
|
}),
|
|
665
742
|
/**
|
|
666
|
-
* @description
|
|
743
|
+
* @description Query badge series with optional filtering conditions
|
|
667
744
|
*
|
|
668
|
-
* @tags
|
|
669
|
-
* @name
|
|
670
|
-
* @summary
|
|
671
|
-
* @request
|
|
745
|
+
* @tags BadgeV2
|
|
746
|
+
* @name GetBadgeSeries
|
|
747
|
+
* @summary Query badge series with conditions
|
|
748
|
+
* @request GET:/v2/badges/series
|
|
672
749
|
*/
|
|
673
|
-
|
|
674
|
-
path: `/
|
|
675
|
-
method: "
|
|
750
|
+
getBadgeSeries: (query, params = {}) => this.request({
|
|
751
|
+
path: `/v2/badges/series`,
|
|
752
|
+
method: "GET",
|
|
753
|
+
query: query,
|
|
676
754
|
format: "json",
|
|
677
755
|
...params,
|
|
678
756
|
}),
|
|
679
757
|
/**
|
|
680
|
-
* @description
|
|
758
|
+
* @description Get detailed information of a specific badge series
|
|
681
759
|
*
|
|
682
|
-
* @tags
|
|
683
|
-
* @name
|
|
684
|
-
* @summary
|
|
685
|
-
* @request
|
|
760
|
+
* @tags BadgeV2
|
|
761
|
+
* @name GetBadgeSeriesDetail
|
|
762
|
+
* @summary Get badge series detail
|
|
763
|
+
* @request GET:/v2/badges/series/{series}
|
|
686
764
|
*/
|
|
687
|
-
|
|
688
|
-
path: `/
|
|
689
|
-
method: "
|
|
690
|
-
|
|
691
|
-
type: ContentType.Json,
|
|
765
|
+
getBadgeSeriesDetail: (series, query, params = {}) => this.request({
|
|
766
|
+
path: `/v2/badges/series/${series}`,
|
|
767
|
+
method: "GET",
|
|
768
|
+
query: query,
|
|
692
769
|
format: "json",
|
|
693
770
|
...params,
|
|
694
771
|
}),
|
|
695
772
|
/**
|
|
696
|
-
* @description
|
|
773
|
+
* @description Get signatures required for claiming badges
|
|
697
774
|
*
|
|
698
|
-
* @tags
|
|
699
|
-
* @name
|
|
700
|
-
* @summary
|
|
701
|
-
* @request POST:/
|
|
775
|
+
* @tags BadgeV2
|
|
776
|
+
* @name GetBadgeClaimSignatures
|
|
777
|
+
* @summary Get badge claim signatures
|
|
778
|
+
* @request POST:/v2/badges/signatures
|
|
702
779
|
*/
|
|
703
|
-
|
|
704
|
-
path: `/
|
|
780
|
+
getBadgeClaimSignatures: (data, params = {}) => this.request({
|
|
781
|
+
path: `/v2/badges/signatures`,
|
|
705
782
|
method: "POST",
|
|
706
783
|
body: data,
|
|
707
784
|
type: ContentType.Json,
|
|
@@ -709,47 +786,44 @@ class Api extends HttpClient {
|
|
|
709
786
|
...params,
|
|
710
787
|
}),
|
|
711
788
|
/**
|
|
712
|
-
* @description
|
|
789
|
+
* @description Get verifiers for badge conditions based on platform and type
|
|
713
790
|
*
|
|
714
|
-
* @tags
|
|
715
|
-
* @name
|
|
716
|
-
* @summary
|
|
717
|
-
* @request
|
|
791
|
+
* @tags BadgeV2
|
|
792
|
+
* @name GetBadgeVerifiers
|
|
793
|
+
* @summary Get badge verifiers
|
|
794
|
+
* @request GET:/v2/badges/verifiers
|
|
718
795
|
*/
|
|
719
|
-
|
|
720
|
-
path: `/
|
|
721
|
-
method: "
|
|
722
|
-
|
|
723
|
-
type: ContentType.Json,
|
|
796
|
+
getBadgeVerifiers: (query, params = {}) => this.request({
|
|
797
|
+
path: `/v2/badges/verifiers`,
|
|
798
|
+
method: "GET",
|
|
799
|
+
query: query,
|
|
724
800
|
format: "json",
|
|
725
801
|
...params,
|
|
726
802
|
}),
|
|
727
803
|
/**
|
|
728
|
-
* @description
|
|
804
|
+
* @description Get detailed information of a specific badge
|
|
729
805
|
*
|
|
730
|
-
* @tags
|
|
731
|
-
* @name
|
|
732
|
-
* @summary
|
|
733
|
-
* @request
|
|
806
|
+
* @tags BadgeV2
|
|
807
|
+
* @name GetBadgeDetail
|
|
808
|
+
* @summary Get badge detail
|
|
809
|
+
* @request GET:/v2/badges/{badgeId}
|
|
734
810
|
*/
|
|
735
|
-
|
|
736
|
-
path: `/
|
|
737
|
-
method: "
|
|
738
|
-
body: data,
|
|
739
|
-
type: ContentType.Json,
|
|
811
|
+
getBadgeDetail: (badgeId, params = {}) => this.request({
|
|
812
|
+
path: `/v2/badges/${badgeId}`,
|
|
813
|
+
method: "GET",
|
|
740
814
|
format: "json",
|
|
741
815
|
...params,
|
|
742
816
|
}),
|
|
743
817
|
/**
|
|
744
|
-
* @description
|
|
818
|
+
* @description Check if a specific badge is claimable for the user
|
|
745
819
|
*
|
|
746
|
-
* @tags
|
|
747
|
-
* @name
|
|
748
|
-
* @summary
|
|
749
|
-
* @request POST:/
|
|
820
|
+
* @tags BadgeV2
|
|
821
|
+
* @name CheckSingleBadgeClaimable
|
|
822
|
+
* @summary Check single badge claimable status
|
|
823
|
+
* @request POST:/v2/badges/{badgeId}
|
|
750
824
|
*/
|
|
751
|
-
|
|
752
|
-
path: `/
|
|
825
|
+
checkSingleBadgeClaimable: (badgeId, data, params = {}) => this.request({
|
|
826
|
+
path: `/v2/badges/${badgeId}`,
|
|
753
827
|
method: "POST",
|
|
754
828
|
body: data,
|
|
755
829
|
type: ContentType.Json,
|
|
@@ -757,15 +831,15 @@ class Api extends HttpClient {
|
|
|
757
831
|
...params,
|
|
758
832
|
}),
|
|
759
833
|
/**
|
|
760
|
-
* @description
|
|
834
|
+
* @description anchor batch mint
|
|
761
835
|
*
|
|
762
|
-
* @tags
|
|
763
|
-
* @name
|
|
764
|
-
* @summary
|
|
765
|
-
* @request POST:/
|
|
836
|
+
* @tags AnchorV2
|
|
837
|
+
* @name BatchMint
|
|
838
|
+
* @summary anchor batch mint
|
|
839
|
+
* @request POST:/v2/batch/mint/{type}
|
|
766
840
|
*/
|
|
767
|
-
|
|
768
|
-
path: `/
|
|
841
|
+
batchMint: (type, data, params = {}) => this.request({
|
|
842
|
+
path: `/v2/batch/mint/${type}`,
|
|
769
843
|
method: "POST",
|
|
770
844
|
body: data,
|
|
771
845
|
type: ContentType.Json,
|
|
@@ -773,15 +847,15 @@ class Api extends HttpClient {
|
|
|
773
847
|
...params,
|
|
774
848
|
}),
|
|
775
849
|
/**
|
|
776
|
-
* @description
|
|
850
|
+
* @description anchor mint
|
|
777
851
|
*
|
|
778
|
-
* @tags
|
|
779
|
-
* @name
|
|
780
|
-
* @summary
|
|
781
|
-
* @request POST:/
|
|
852
|
+
* @tags AnchorV2
|
|
853
|
+
* @name Mint
|
|
854
|
+
* @summary anchor mint
|
|
855
|
+
* @request POST:/v2/mint/{type}
|
|
782
856
|
*/
|
|
783
|
-
|
|
784
|
-
path: `/
|
|
857
|
+
mint: (type, data, params = {}) => this.request({
|
|
858
|
+
path: `/v2/mint/${type}`,
|
|
785
859
|
method: "POST",
|
|
786
860
|
body: data,
|
|
787
861
|
type: ContentType.Json,
|