anchor-sdk 0.1.42 → 0.1.43-beta.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/AnchorApiClientV2.d.ts +40 -1
- package/dist/AnchorApiClientV2.js +45 -3
- package/dist/generated/Api.d.ts +1699 -1454
- package/dist/generated/Api.js +376 -316
- 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,175 @@ 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: `/
|
|
324
|
-
method: "
|
|
325
|
-
|
|
334
|
+
createTeam: (data, params = {}) => this.request({
|
|
335
|
+
path: `/s1/teams`,
|
|
336
|
+
method: "POST",
|
|
337
|
+
body: data,
|
|
338
|
+
type: ContentType.Json,
|
|
326
339
|
format: "json",
|
|
327
340
|
...params,
|
|
328
341
|
}),
|
|
329
342
|
/**
|
|
330
|
-
* @description
|
|
343
|
+
* @description 加入团队,支持通过邀请码或直接指定团队ID
|
|
331
344
|
*
|
|
332
|
-
* @tags
|
|
333
|
-
* @name
|
|
334
|
-
* @summary
|
|
335
|
-
* @request POST:/
|
|
345
|
+
* @tags AnchorS2S
|
|
346
|
+
* @name JoinTeam
|
|
347
|
+
* @summary Join team
|
|
348
|
+
* @request POST:/s1/teams/join
|
|
336
349
|
*/
|
|
337
|
-
|
|
338
|
-
path: `/
|
|
350
|
+
joinTeam: (data, params = {}) => this.request({
|
|
351
|
+
path: `/s1/teams/join`,
|
|
339
352
|
method: "POST",
|
|
340
353
|
body: data,
|
|
341
354
|
type: ContentType.Json,
|
|
@@ -343,45 +356,91 @@ class Api extends HttpClient {
|
|
|
343
356
|
...params,
|
|
344
357
|
}),
|
|
345
358
|
/**
|
|
346
|
-
* @description
|
|
359
|
+
* @description 退出当前团队
|
|
347
360
|
*
|
|
348
|
-
* @tags
|
|
349
|
-
* @name
|
|
350
|
-
* @summary
|
|
351
|
-
* @request
|
|
361
|
+
* @tags AnchorS2S
|
|
362
|
+
* @name LeaveTeam
|
|
363
|
+
* @summary Leave team (self)
|
|
364
|
+
* @request DELETE:/s1/teams/leave/{userId}
|
|
352
365
|
*/
|
|
353
|
-
|
|
354
|
-
path: `/
|
|
366
|
+
leaveTeam: (userId, params = {}) => this.request({
|
|
367
|
+
path: `/s1/teams/leave/${userId}`,
|
|
368
|
+
method: "DELETE",
|
|
369
|
+
format: "json",
|
|
370
|
+
...params,
|
|
371
|
+
}),
|
|
372
|
+
/**
|
|
373
|
+
* @description 队长移除团队成员
|
|
374
|
+
*
|
|
375
|
+
* @tags AnchorS2S
|
|
376
|
+
* @name RemoveTeamMember
|
|
377
|
+
* @summary Remove member by captain
|
|
378
|
+
* @request DELETE:/s1/teams/remove/{captainUserId}/{userId}
|
|
379
|
+
*/
|
|
380
|
+
removeTeamMember: (captainUserId, userId, params = {}) => this.request({
|
|
381
|
+
path: `/s1/teams/remove/${captainUserId}/${userId}`,
|
|
382
|
+
method: "DELETE",
|
|
383
|
+
format: "json",
|
|
384
|
+
...params,
|
|
385
|
+
}),
|
|
386
|
+
/**
|
|
387
|
+
* @description 批量查询多个钱包地址的代币余额,透传调用RemoteInsightTokenService.GetTokenBalances
|
|
388
|
+
*
|
|
389
|
+
* @tags AnchorS2S
|
|
390
|
+
* @name GetTokenBalances
|
|
391
|
+
* @summary 批量查询代币余额
|
|
392
|
+
* @request POST:/s1/token/balances
|
|
393
|
+
*/
|
|
394
|
+
getTokenBalances: (data, params = {}) => this.request({
|
|
395
|
+
path: `/s1/token/balances`,
|
|
396
|
+
method: "POST",
|
|
397
|
+
body: data,
|
|
398
|
+
type: ContentType.Json,
|
|
399
|
+
format: "json",
|
|
400
|
+
...params,
|
|
401
|
+
}),
|
|
402
|
+
};
|
|
403
|
+
this.v1 = {
|
|
404
|
+
/**
|
|
405
|
+
* @description query user claimable or claimed Badges
|
|
406
|
+
*
|
|
407
|
+
* @tags Anchor
|
|
408
|
+
* @name BadgeAssets
|
|
409
|
+
* @summary query user claimable or claimed Badges
|
|
410
|
+
* @request GET:/v1/badges
|
|
411
|
+
*/
|
|
412
|
+
badgeAssets: (query, params = {}) => this.request({
|
|
413
|
+
path: `/v1/badges`,
|
|
355
414
|
method: "GET",
|
|
356
415
|
query: query,
|
|
357
416
|
format: "json",
|
|
358
417
|
...params,
|
|
359
418
|
}),
|
|
360
419
|
/**
|
|
361
|
-
* @description get
|
|
420
|
+
* @description get check result
|
|
362
421
|
*
|
|
363
422
|
* @tags Anchor
|
|
364
|
-
* @name
|
|
365
|
-
* @summary get
|
|
366
|
-
* @request GET:/v1/
|
|
423
|
+
* @name GetCheckResult
|
|
424
|
+
* @summary get check result
|
|
425
|
+
* @request GET:/v1/check/{type}
|
|
367
426
|
*/
|
|
368
|
-
|
|
369
|
-
path: `/v1/
|
|
427
|
+
getCheckResult: (type, params = {}) => this.request({
|
|
428
|
+
path: `/v1/check/${type}`,
|
|
370
429
|
method: "GET",
|
|
371
430
|
format: "json",
|
|
372
431
|
...params,
|
|
373
432
|
}),
|
|
374
433
|
/**
|
|
375
|
-
* @description
|
|
434
|
+
* @description anchor check
|
|
376
435
|
*
|
|
377
|
-
* @tags
|
|
378
|
-
* @name
|
|
379
|
-
* @summary
|
|
380
|
-
* @request
|
|
436
|
+
* @tags Anchor
|
|
437
|
+
* @name Check
|
|
438
|
+
* @summary anchor check
|
|
439
|
+
* @request POST:/v1/check/{type}
|
|
381
440
|
*/
|
|
382
|
-
|
|
383
|
-
path: `/v1/
|
|
384
|
-
method: "
|
|
441
|
+
check: (type, params = {}) => this.request({
|
|
442
|
+
path: `/v1/check/${type}`,
|
|
443
|
+
method: "POST",
|
|
385
444
|
format: "json",
|
|
386
445
|
...params,
|
|
387
446
|
}),
|
|
@@ -401,137 +460,159 @@ class Api extends HttpClient {
|
|
|
401
460
|
...params,
|
|
402
461
|
}),
|
|
403
462
|
/**
|
|
404
|
-
* @description
|
|
463
|
+
* @description 标记指定通知为已读状态
|
|
405
464
|
*
|
|
406
|
-
* @tags
|
|
407
|
-
* @name
|
|
408
|
-
* @summary
|
|
409
|
-
* @request POST:/v1/
|
|
465
|
+
* @tags TeamV1
|
|
466
|
+
* @name MarkNotificationRead
|
|
467
|
+
* @summary Mark notification as read
|
|
468
|
+
* @request POST:/v1/notifications/{notificationId}/read
|
|
410
469
|
*/
|
|
411
|
-
|
|
412
|
-
path: `/v1/
|
|
470
|
+
markNotificationRead: (notificationId, params = {}) => this.request({
|
|
471
|
+
path: `/v1/notifications/${notificationId}/read`,
|
|
413
472
|
method: "POST",
|
|
414
473
|
format: "json",
|
|
415
474
|
...params,
|
|
416
475
|
}),
|
|
417
|
-
};
|
|
418
|
-
this.v2 = {
|
|
419
476
|
/**
|
|
420
|
-
* @description
|
|
477
|
+
* @description list season config
|
|
421
478
|
*
|
|
422
|
-
* @tags
|
|
423
|
-
* @name
|
|
424
|
-
* @summary
|
|
425
|
-
* @request GET:/
|
|
479
|
+
* @tags Season
|
|
480
|
+
* @name ListSeasonConfig
|
|
481
|
+
* @summary list season config
|
|
482
|
+
* @request GET:/v1/seasons
|
|
426
483
|
*/
|
|
427
|
-
|
|
428
|
-
path: `/
|
|
484
|
+
listSeasonConfig: (params = {}) => this.request({
|
|
485
|
+
path: `/v1/seasons`,
|
|
429
486
|
method: "GET",
|
|
430
|
-
query: query,
|
|
431
487
|
format: "json",
|
|
432
488
|
...params,
|
|
433
489
|
}),
|
|
434
490
|
/**
|
|
435
|
-
* @description
|
|
491
|
+
* @description get nft series
|
|
436
492
|
*
|
|
437
|
-
* @tags
|
|
438
|
-
* @name
|
|
439
|
-
* @summary
|
|
440
|
-
* @request GET:/
|
|
493
|
+
* @tags Anchor
|
|
494
|
+
* @name NftSeries
|
|
495
|
+
* @summary get nft series
|
|
496
|
+
* @request GET:/v1/series/{type}
|
|
441
497
|
*/
|
|
442
|
-
|
|
443
|
-
path: `/
|
|
498
|
+
nftSeries: (type, params = {}) => this.request({
|
|
499
|
+
path: `/v1/series/${type}`,
|
|
444
500
|
method: "GET",
|
|
445
|
-
query: query,
|
|
446
501
|
format: "json",
|
|
447
502
|
...params,
|
|
448
503
|
}),
|
|
449
504
|
/**
|
|
450
|
-
* @description
|
|
505
|
+
* @description get nft series by id
|
|
451
506
|
*
|
|
452
|
-
* @tags
|
|
453
|
-
* @name
|
|
454
|
-
* @summary
|
|
455
|
-
* @request GET:/
|
|
507
|
+
* @tags Anchor
|
|
508
|
+
* @name GetNftSeriesById
|
|
509
|
+
* @summary get nft series by id
|
|
510
|
+
* @request GET:/v1/series/{type}/{series}
|
|
456
511
|
*/
|
|
457
|
-
|
|
458
|
-
path: `/
|
|
512
|
+
getNftSeriesById: (type, series, query, params = {}) => this.request({
|
|
513
|
+
path: `/v1/series/${type}/${series}`,
|
|
459
514
|
method: "GET",
|
|
460
515
|
query: query,
|
|
461
516
|
format: "json",
|
|
462
517
|
...params,
|
|
463
518
|
}),
|
|
464
519
|
/**
|
|
465
|
-
* @description
|
|
520
|
+
* @description 获取团队所有徽章的状态信息,支持按状态筛选
|
|
466
521
|
*
|
|
467
|
-
* @tags
|
|
468
|
-
* @name
|
|
469
|
-
* @summary Get
|
|
470
|
-
* @request GET:/
|
|
522
|
+
* @tags TeamV1
|
|
523
|
+
* @name GetTeamBadges
|
|
524
|
+
* @summary Get team badges
|
|
525
|
+
* @request GET:/v1/teams/badges
|
|
471
526
|
*/
|
|
472
|
-
|
|
473
|
-
path: `/
|
|
527
|
+
getTeamBadges: (query, params = {}) => this.request({
|
|
528
|
+
path: `/v1/teams/badges`,
|
|
474
529
|
method: "GET",
|
|
475
530
|
query: query,
|
|
476
531
|
format: "json",
|
|
477
532
|
...params,
|
|
478
533
|
}),
|
|
479
534
|
/**
|
|
480
|
-
* @description
|
|
535
|
+
* @description 获取指定徽章的贡献者列表
|
|
481
536
|
*
|
|
482
|
-
* @tags
|
|
483
|
-
* @name
|
|
484
|
-
* @summary
|
|
485
|
-
* @request
|
|
537
|
+
* @tags TeamV1
|
|
538
|
+
* @name GetBadgeContributors
|
|
539
|
+
* @summary Get badge contributors
|
|
540
|
+
* @request GET:/v1/teams/badges/{badgeId}/contributors
|
|
486
541
|
*/
|
|
487
|
-
|
|
488
|
-
path: `/
|
|
489
|
-
method: "
|
|
490
|
-
body: data,
|
|
491
|
-
type: ContentType.Json,
|
|
542
|
+
getBadgeContributors: (badgeId, params = {}) => this.request({
|
|
543
|
+
path: `/v1/teams/badges/${badgeId}/contributors`,
|
|
544
|
+
method: "GET",
|
|
492
545
|
format: "json",
|
|
493
546
|
...params,
|
|
494
547
|
}),
|
|
495
548
|
/**
|
|
496
|
-
* @description
|
|
549
|
+
* @description 获取团队排行榜,支持分页查询,返回个人团队信息
|
|
497
550
|
*
|
|
498
|
-
* @tags
|
|
499
|
-
* @name
|
|
500
|
-
* @summary
|
|
501
|
-
* @request GET:/
|
|
551
|
+
* @tags TeamV1
|
|
552
|
+
* @name GetTeamLeaderboard
|
|
553
|
+
* @summary Get team leaderboard
|
|
554
|
+
* @request GET:/v1/teams/leaderboard
|
|
502
555
|
*/
|
|
503
|
-
|
|
504
|
-
path: `/
|
|
556
|
+
getTeamLeaderboard: (query, params = {}) => this.request({
|
|
557
|
+
path: `/v1/teams/leaderboard`,
|
|
505
558
|
method: "GET",
|
|
506
559
|
query: query,
|
|
507
560
|
format: "json",
|
|
508
561
|
...params,
|
|
509
562
|
}),
|
|
510
563
|
/**
|
|
511
|
-
* @description
|
|
564
|
+
* @description 获取当前用户的个人概况信息
|
|
512
565
|
*
|
|
513
|
-
* @tags
|
|
514
|
-
* @name
|
|
515
|
-
* @summary
|
|
516
|
-
* @request GET:/
|
|
566
|
+
* @tags TeamV1
|
|
567
|
+
* @name GetMyTeamProfile
|
|
568
|
+
* @summary Get my team profile
|
|
569
|
+
* @request GET:/v1/teams/members/me
|
|
570
|
+
*/
|
|
571
|
+
getMyTeamProfile: (params = {}) => this.request({
|
|
572
|
+
path: `/v1/teams/members/me`,
|
|
573
|
+
method: "GET",
|
|
574
|
+
format: "json",
|
|
575
|
+
...params,
|
|
576
|
+
}),
|
|
577
|
+
/**
|
|
578
|
+
* @description 获取团队详情,包含已解锁的徽章信息
|
|
579
|
+
*
|
|
580
|
+
* @tags TeamV1
|
|
581
|
+
* @name GetTeamDetail
|
|
582
|
+
* @summary Get team detail
|
|
583
|
+
* @request GET:/v1/teams/{teamId}/detail
|
|
584
|
+
*/
|
|
585
|
+
getTeamDetail: (teamId, params = {}) => this.request({
|
|
586
|
+
path: `/v1/teams/${teamId}/detail`,
|
|
587
|
+
method: "GET",
|
|
588
|
+
format: "json",
|
|
589
|
+
...params,
|
|
590
|
+
}),
|
|
591
|
+
/**
|
|
592
|
+
* @description 获取团队内成员贡献排行榜
|
|
593
|
+
*
|
|
594
|
+
* @tags TeamV1
|
|
595
|
+
* @name GetTeamMemberRanking
|
|
596
|
+
* @summary Get team member ranking
|
|
597
|
+
* @request GET:/v1/teams/{teamId}/members/ranking
|
|
517
598
|
*/
|
|
518
|
-
|
|
519
|
-
path: `/
|
|
599
|
+
getTeamMemberRanking: (teamId, query, params = {}) => this.request({
|
|
600
|
+
path: `/v1/teams/${teamId}/members/ranking`,
|
|
520
601
|
method: "GET",
|
|
521
602
|
query: query,
|
|
522
603
|
format: "json",
|
|
523
604
|
...params,
|
|
524
605
|
}),
|
|
525
606
|
/**
|
|
526
|
-
* @description
|
|
607
|
+
* @description 前端监听到合约成功事件,调用加快后端事件处理
|
|
527
608
|
*
|
|
528
|
-
* @tags
|
|
529
|
-
* @name
|
|
530
|
-
* @summary
|
|
531
|
-
* @request POST:/
|
|
609
|
+
* @tags Transaction
|
|
610
|
+
* @name UserOpHashProcess
|
|
611
|
+
* @summary userOpHash process
|
|
612
|
+
* @request POST:/v1/transaction/process/userOpHash
|
|
532
613
|
*/
|
|
533
|
-
|
|
534
|
-
path: `/
|
|
614
|
+
userOpHashProcess: (data, params = {}) => this.request({
|
|
615
|
+
path: `/v1/transaction/process/userOpHash`,
|
|
535
616
|
method: "POST",
|
|
536
617
|
body: data,
|
|
537
618
|
type: ContentType.Json,
|
|
@@ -539,47 +620,46 @@ class Api extends HttpClient {
|
|
|
539
620
|
...params,
|
|
540
621
|
}),
|
|
541
622
|
/**
|
|
542
|
-
* @description
|
|
623
|
+
* @description 前端监听到合约成功事件,调用加快后端事件处理
|
|
543
624
|
*
|
|
544
|
-
* @tags
|
|
545
|
-
* @name
|
|
546
|
-
* @summary
|
|
547
|
-
* @request POST:/
|
|
625
|
+
* @tags Transaction
|
|
626
|
+
* @name TransactionHashProcess
|
|
627
|
+
* @summary speed up transaction
|
|
628
|
+
* @request POST:/v1/transaction/process/{txHash}
|
|
548
629
|
*/
|
|
549
|
-
|
|
550
|
-
path: `/
|
|
630
|
+
transactionHashProcess: (txHash, params = {}) => this.request({
|
|
631
|
+
path: `/v1/transaction/process/${txHash}`,
|
|
551
632
|
method: "POST",
|
|
552
|
-
body: data,
|
|
553
|
-
type: ContentType.Json,
|
|
554
633
|
format: "json",
|
|
555
634
|
...params,
|
|
556
635
|
}),
|
|
636
|
+
};
|
|
637
|
+
this.v2 = {
|
|
557
638
|
/**
|
|
558
|
-
* @description
|
|
639
|
+
* @description query badges by conditions
|
|
559
640
|
*
|
|
560
641
|
* @tags BadgeV2
|
|
561
|
-
* @name
|
|
562
|
-
* @summary
|
|
563
|
-
* @request
|
|
642
|
+
* @name QueryBadges
|
|
643
|
+
* @summary query badges by conditions
|
|
644
|
+
* @request GET:/v2/badges
|
|
564
645
|
*/
|
|
565
|
-
|
|
566
|
-
path: `/v2/badges
|
|
567
|
-
method: "
|
|
568
|
-
|
|
569
|
-
type: ContentType.Json,
|
|
646
|
+
queryBadges: (query, params = {}) => this.request({
|
|
647
|
+
path: `/v2/badges`,
|
|
648
|
+
method: "GET",
|
|
649
|
+
query: query,
|
|
570
650
|
format: "json",
|
|
571
651
|
...params,
|
|
572
652
|
}),
|
|
573
653
|
/**
|
|
574
|
-
* @description Check
|
|
654
|
+
* @description Check which badges the user can claim
|
|
575
655
|
*
|
|
576
656
|
* @tags BadgeV2
|
|
577
|
-
* @name
|
|
578
|
-
* @summary Check
|
|
579
|
-
* @request POST:/v2/badges
|
|
657
|
+
* @name CheckUserClaimableBadges
|
|
658
|
+
* @summary Check user claimable badges
|
|
659
|
+
* @request POST:/v2/badges
|
|
580
660
|
*/
|
|
581
|
-
|
|
582
|
-
path: `/v2/badges
|
|
661
|
+
checkUserClaimableBadges: (data, params = {}) => this.request({
|
|
662
|
+
path: `/v2/badges`,
|
|
583
663
|
method: "POST",
|
|
584
664
|
body: data,
|
|
585
665
|
type: ContentType.Json,
|
|
@@ -587,121 +667,104 @@ class Api extends HttpClient {
|
|
|
587
667
|
...params,
|
|
588
668
|
}),
|
|
589
669
|
/**
|
|
590
|
-
* @description Get
|
|
670
|
+
* @description Get user's claimed and claimable badge assets
|
|
591
671
|
*
|
|
592
672
|
* @tags BadgeV2
|
|
593
|
-
* @name
|
|
594
|
-
* @summary Get badge
|
|
595
|
-
* @request GET:/v2/badges/
|
|
673
|
+
* @name GetUserBadgeAssets
|
|
674
|
+
* @summary Get user badge assets
|
|
675
|
+
* @request GET:/v2/badges/assets
|
|
596
676
|
*/
|
|
597
|
-
|
|
598
|
-
path: `/v2/badges
|
|
677
|
+
getUserBadgeAssets: (query, params = {}) => this.request({
|
|
678
|
+
path: `/v2/badges/assets`,
|
|
599
679
|
method: "GET",
|
|
680
|
+
query: query,
|
|
600
681
|
format: "json",
|
|
601
682
|
...params,
|
|
602
683
|
}),
|
|
603
|
-
};
|
|
604
|
-
this.s1 = {
|
|
605
684
|
/**
|
|
606
|
-
* @description
|
|
685
|
+
* @description Query badge by category
|
|
607
686
|
*
|
|
608
|
-
* @tags
|
|
609
|
-
* @name
|
|
610
|
-
* @summary
|
|
611
|
-
* @request GET:/
|
|
687
|
+
* @tags BadgeV2
|
|
688
|
+
* @name CategoriesList
|
|
689
|
+
* @summary Query badge by category
|
|
690
|
+
* @request GET:/v2/badges/categories
|
|
612
691
|
*/
|
|
613
|
-
|
|
614
|
-
path: `/
|
|
692
|
+
categoriesList: (query, params = {}) => this.request({
|
|
693
|
+
path: `/v2/badges/categories`,
|
|
615
694
|
method: "GET",
|
|
616
695
|
query: query,
|
|
617
696
|
format: "json",
|
|
618
697
|
...params,
|
|
619
698
|
}),
|
|
620
699
|
/**
|
|
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
|
|
700
|
+
* @description Get detailed information of a specific badge category
|
|
636
701
|
*
|
|
637
|
-
* @tags
|
|
638
|
-
* @name
|
|
639
|
-
* @summary
|
|
640
|
-
* @request
|
|
702
|
+
* @tags BadgeV2
|
|
703
|
+
* @name CategoriesDetail
|
|
704
|
+
* @summary Get badge detail by category
|
|
705
|
+
* @request GET:/v2/badges/categories/{category}
|
|
641
706
|
*/
|
|
642
|
-
|
|
643
|
-
path: `/
|
|
644
|
-
method: "
|
|
645
|
-
body: data,
|
|
646
|
-
type: ContentType.Json,
|
|
707
|
+
categoriesDetail: (category, params = {}) => this.request({
|
|
708
|
+
path: `/v2/badges/categories/${category}`,
|
|
709
|
+
method: "GET",
|
|
647
710
|
format: "json",
|
|
648
711
|
...params,
|
|
649
712
|
}),
|
|
650
713
|
/**
|
|
651
|
-
* @description
|
|
714
|
+
* @description Get badges that the user can claim
|
|
652
715
|
*
|
|
653
|
-
* @tags
|
|
654
|
-
* @name
|
|
655
|
-
* @summary
|
|
656
|
-
* @request GET:/
|
|
716
|
+
* @tags BadgeV2
|
|
717
|
+
* @name GetUserClaimableBadges
|
|
718
|
+
* @summary Get user claimable badges
|
|
719
|
+
* @request GET:/v2/badges/claimable
|
|
657
720
|
*/
|
|
658
|
-
|
|
659
|
-
path: `/
|
|
721
|
+
getUserClaimableBadges: (query, params = {}) => this.request({
|
|
722
|
+
path: `/v2/badges/claimable`,
|
|
660
723
|
method: "GET",
|
|
661
724
|
query: query,
|
|
662
725
|
format: "json",
|
|
663
726
|
...params,
|
|
664
727
|
}),
|
|
665
728
|
/**
|
|
666
|
-
* @description
|
|
729
|
+
* @description Query badge series with optional filtering conditions
|
|
667
730
|
*
|
|
668
|
-
* @tags
|
|
669
|
-
* @name
|
|
670
|
-
* @summary
|
|
671
|
-
* @request
|
|
731
|
+
* @tags BadgeV2
|
|
732
|
+
* @name GetBadgeSeries
|
|
733
|
+
* @summary Query badge series with conditions
|
|
734
|
+
* @request GET:/v2/badges/series
|
|
672
735
|
*/
|
|
673
|
-
|
|
674
|
-
path: `/
|
|
675
|
-
method: "
|
|
736
|
+
getBadgeSeries: (query, params = {}) => this.request({
|
|
737
|
+
path: `/v2/badges/series`,
|
|
738
|
+
method: "GET",
|
|
739
|
+
query: query,
|
|
676
740
|
format: "json",
|
|
677
741
|
...params,
|
|
678
742
|
}),
|
|
679
743
|
/**
|
|
680
|
-
* @description
|
|
744
|
+
* @description Get detailed information of a specific badge series
|
|
681
745
|
*
|
|
682
|
-
* @tags
|
|
683
|
-
* @name
|
|
684
|
-
* @summary
|
|
685
|
-
* @request
|
|
746
|
+
* @tags BadgeV2
|
|
747
|
+
* @name GetBadgeSeriesDetail
|
|
748
|
+
* @summary Get badge series detail
|
|
749
|
+
* @request GET:/v2/badges/series/{series}
|
|
686
750
|
*/
|
|
687
|
-
|
|
688
|
-
path: `/
|
|
689
|
-
method: "
|
|
690
|
-
|
|
691
|
-
type: ContentType.Json,
|
|
751
|
+
getBadgeSeriesDetail: (series, query, params = {}) => this.request({
|
|
752
|
+
path: `/v2/badges/series/${series}`,
|
|
753
|
+
method: "GET",
|
|
754
|
+
query: query,
|
|
692
755
|
format: "json",
|
|
693
756
|
...params,
|
|
694
757
|
}),
|
|
695
758
|
/**
|
|
696
|
-
* @description
|
|
759
|
+
* @description Get signatures required for claiming badges
|
|
697
760
|
*
|
|
698
|
-
* @tags
|
|
699
|
-
* @name
|
|
700
|
-
* @summary
|
|
701
|
-
* @request POST:/
|
|
761
|
+
* @tags BadgeV2
|
|
762
|
+
* @name GetBadgeClaimSignatures
|
|
763
|
+
* @summary Get badge claim signatures
|
|
764
|
+
* @request POST:/v2/badges/signatures
|
|
702
765
|
*/
|
|
703
|
-
|
|
704
|
-
path: `/
|
|
766
|
+
getBadgeClaimSignatures: (data, params = {}) => this.request({
|
|
767
|
+
path: `/v2/badges/signatures`,
|
|
705
768
|
method: "POST",
|
|
706
769
|
body: data,
|
|
707
770
|
type: ContentType.Json,
|
|
@@ -709,47 +772,44 @@ class Api extends HttpClient {
|
|
|
709
772
|
...params,
|
|
710
773
|
}),
|
|
711
774
|
/**
|
|
712
|
-
* @description
|
|
775
|
+
* @description Get verifiers for badge conditions based on platform and type
|
|
713
776
|
*
|
|
714
|
-
* @tags
|
|
715
|
-
* @name
|
|
716
|
-
* @summary
|
|
717
|
-
* @request
|
|
777
|
+
* @tags BadgeV2
|
|
778
|
+
* @name GetBadgeVerifiers
|
|
779
|
+
* @summary Get badge verifiers
|
|
780
|
+
* @request GET:/v2/badges/verifiers
|
|
718
781
|
*/
|
|
719
|
-
|
|
720
|
-
path: `/
|
|
721
|
-
method: "
|
|
722
|
-
|
|
723
|
-
type: ContentType.Json,
|
|
782
|
+
getBadgeVerifiers: (query, params = {}) => this.request({
|
|
783
|
+
path: `/v2/badges/verifiers`,
|
|
784
|
+
method: "GET",
|
|
785
|
+
query: query,
|
|
724
786
|
format: "json",
|
|
725
787
|
...params,
|
|
726
788
|
}),
|
|
727
789
|
/**
|
|
728
|
-
* @description
|
|
790
|
+
* @description Get detailed information of a specific badge
|
|
729
791
|
*
|
|
730
|
-
* @tags
|
|
731
|
-
* @name
|
|
732
|
-
* @summary
|
|
733
|
-
* @request
|
|
792
|
+
* @tags BadgeV2
|
|
793
|
+
* @name GetBadgeDetail
|
|
794
|
+
* @summary Get badge detail
|
|
795
|
+
* @request GET:/v2/badges/{badgeId}
|
|
734
796
|
*/
|
|
735
|
-
|
|
736
|
-
path: `/
|
|
737
|
-
method: "
|
|
738
|
-
body: data,
|
|
739
|
-
type: ContentType.Json,
|
|
797
|
+
getBadgeDetail: (badgeId, params = {}) => this.request({
|
|
798
|
+
path: `/v2/badges/${badgeId}`,
|
|
799
|
+
method: "GET",
|
|
740
800
|
format: "json",
|
|
741
801
|
...params,
|
|
742
802
|
}),
|
|
743
803
|
/**
|
|
744
|
-
* @description
|
|
804
|
+
* @description Check if a specific badge is claimable for the user
|
|
745
805
|
*
|
|
746
|
-
* @tags
|
|
747
|
-
* @name
|
|
748
|
-
* @summary
|
|
749
|
-
* @request POST:/
|
|
806
|
+
* @tags BadgeV2
|
|
807
|
+
* @name CheckSingleBadgeClaimable
|
|
808
|
+
* @summary Check single badge claimable status
|
|
809
|
+
* @request POST:/v2/badges/{badgeId}
|
|
750
810
|
*/
|
|
751
|
-
|
|
752
|
-
path: `/
|
|
811
|
+
checkSingleBadgeClaimable: (badgeId, data, params = {}) => this.request({
|
|
812
|
+
path: `/v2/badges/${badgeId}`,
|
|
753
813
|
method: "POST",
|
|
754
814
|
body: data,
|
|
755
815
|
type: ContentType.Json,
|
|
@@ -757,15 +817,15 @@ class Api extends HttpClient {
|
|
|
757
817
|
...params,
|
|
758
818
|
}),
|
|
759
819
|
/**
|
|
760
|
-
* @description
|
|
820
|
+
* @description anchor batch mint
|
|
761
821
|
*
|
|
762
|
-
* @tags
|
|
763
|
-
* @name
|
|
764
|
-
* @summary
|
|
765
|
-
* @request POST:/
|
|
822
|
+
* @tags AnchorV2
|
|
823
|
+
* @name BatchMint
|
|
824
|
+
* @summary anchor batch mint
|
|
825
|
+
* @request POST:/v2/batch/mint/{type}
|
|
766
826
|
*/
|
|
767
|
-
|
|
768
|
-
path: `/
|
|
827
|
+
batchMint: (type, data, params = {}) => this.request({
|
|
828
|
+
path: `/v2/batch/mint/${type}`,
|
|
769
829
|
method: "POST",
|
|
770
830
|
body: data,
|
|
771
831
|
type: ContentType.Json,
|
|
@@ -773,15 +833,15 @@ class Api extends HttpClient {
|
|
|
773
833
|
...params,
|
|
774
834
|
}),
|
|
775
835
|
/**
|
|
776
|
-
* @description
|
|
836
|
+
* @description anchor mint
|
|
777
837
|
*
|
|
778
|
-
* @tags
|
|
779
|
-
* @name
|
|
780
|
-
* @summary
|
|
781
|
-
* @request POST:/
|
|
838
|
+
* @tags AnchorV2
|
|
839
|
+
* @name Mint
|
|
840
|
+
* @summary anchor mint
|
|
841
|
+
* @request POST:/v2/mint/{type}
|
|
782
842
|
*/
|
|
783
|
-
|
|
784
|
-
path: `/
|
|
843
|
+
mint: (type, data, params = {}) => this.request({
|
|
844
|
+
path: `/v2/mint/${type}`,
|
|
785
845
|
method: "POST",
|
|
786
846
|
body: data,
|
|
787
847
|
type: ContentType.Json,
|