anchor-sdk 0.1.42-beta.1 → 0.1.42-beta.2

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.
Files changed (36) hide show
  1. package/dist/AnchorApiClientV2.d.ts +8 -4
  2. package/dist/AnchorApiClientV2.js +316 -0
  3. package/dist/AnchorERC1155Client.d.ts +0 -1
  4. package/dist/AnchorERC1155Client.js +301 -0
  5. package/dist/AnchorPayClient.d.ts +0 -1
  6. package/dist/AnchorPayClient.js +908 -0
  7. package/dist/abi/AnchorERC1155.d.ts +0 -1
  8. package/dist/abi/AnchorERC1155.js +1122 -0
  9. package/dist/abi/AnchorPay.json +578 -0
  10. package/dist/constants.d.ts +1 -2
  11. package/dist/constants.js +367 -0
  12. package/dist/generated/Api.d.ts +692 -606
  13. package/dist/generated/Api.js +794 -0
  14. package/dist/index.d.ts +7 -7
  15. package/dist/index.js +1379 -3
  16. package/dist/react/AnchorReactSDK.d.ts +59 -0
  17. package/dist/react/AnchorReactSDK.js +192 -0
  18. package/dist/react/index.d.ts +1 -0
  19. package/dist/react/index.js +8 -0
  20. package/dist/typechain/AnchorERC1155.d.ts +2 -3
  21. package/dist/typechain/AnchorERC1155.js +2 -0
  22. package/dist/typechain/AnchorPay.d.ts +2 -3
  23. package/dist/typechain/AnchorPay.js +2 -0
  24. package/dist/typechain/common.d.ts +1 -2
  25. package/dist/typechain/common.js +2 -0
  26. package/dist/typechain/factories/AnchorERC1155__factory.d.ts +0 -1
  27. package/dist/typechain/factories/AnchorERC1155__factory.js +1766 -0
  28. package/dist/typechain/factories/AnchorPay__factory.d.ts +0 -1
  29. package/dist/typechain/factories/AnchorPay__factory.js +469 -0
  30. package/dist/typechain/factories/index.d.ts +0 -1
  31. package/dist/typechain/factories/index.js +10 -0
  32. package/dist/typechain/index.d.ts +0 -1
  33. package/dist/typechain/index.js +41 -0
  34. package/dist/types.d.ts +0 -1
  35. package/dist/types.js +2 -0
  36. package/package.json +1 -1
@@ -0,0 +1,794 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ // @ts-nocheck
5
+ /*
6
+ * ---------------------------------------------------------------
7
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
8
+ * ## ##
9
+ * ## AUTHOR: acacode ##
10
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
11
+ * ---------------------------------------------------------------
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Api = exports.HttpClient = exports.ContentType = void 0;
15
+ var ContentType;
16
+ (function (ContentType) {
17
+ ContentType["Json"] = "application/json";
18
+ ContentType["JsonApi"] = "application/vnd.api+json";
19
+ ContentType["FormData"] = "multipart/form-data";
20
+ ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
21
+ ContentType["Text"] = "text/plain";
22
+ })(ContentType || (exports.ContentType = ContentType = {}));
23
+ class HttpClient {
24
+ constructor(apiConfig = {}) {
25
+ this.baseUrl = "https://anchordev.dipbit.xyz/";
26
+ this.securityData = null;
27
+ this.abortControllers = new Map();
28
+ this.customFetch = (...fetchParams) => fetch(...fetchParams);
29
+ this.baseApiParams = {
30
+ credentials: "same-origin",
31
+ headers: {},
32
+ redirect: "follow",
33
+ referrerPolicy: "no-referrer",
34
+ };
35
+ this.setSecurityData = (data) => {
36
+ this.securityData = data;
37
+ };
38
+ this.contentFormatters = {
39
+ [ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string")
40
+ ? JSON.stringify(input)
41
+ : input,
42
+ [ContentType.JsonApi]: (input) => input !== null && (typeof input === "object" || typeof input === "string")
43
+ ? JSON.stringify(input)
44
+ : input,
45
+ [ContentType.Text]: (input) => input !== null && typeof input !== "string"
46
+ ? JSON.stringify(input)
47
+ : input,
48
+ [ContentType.FormData]: (input) => {
49
+ if (input instanceof FormData) {
50
+ return input;
51
+ }
52
+ return Object.keys(input || {}).reduce((formData, key) => {
53
+ const property = input[key];
54
+ formData.append(key, property instanceof Blob
55
+ ? property
56
+ : typeof property === "object" && property !== null
57
+ ? JSON.stringify(property)
58
+ : `${property}`);
59
+ return formData;
60
+ }, new FormData());
61
+ },
62
+ [ContentType.UrlEncoded]: (input) => this.toQueryString(input),
63
+ };
64
+ this.createAbortSignal = (cancelToken) => {
65
+ if (this.abortControllers.has(cancelToken)) {
66
+ const abortController = this.abortControllers.get(cancelToken);
67
+ if (abortController) {
68
+ return abortController.signal;
69
+ }
70
+ return void 0;
71
+ }
72
+ const abortController = new AbortController();
73
+ this.abortControllers.set(cancelToken, abortController);
74
+ return abortController.signal;
75
+ };
76
+ this.abortRequest = (cancelToken) => {
77
+ const abortController = this.abortControllers.get(cancelToken);
78
+ if (abortController) {
79
+ abortController.abort();
80
+ this.abortControllers.delete(cancelToken);
81
+ }
82
+ };
83
+ this.request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {
84
+ const secureParams = ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
85
+ this.securityWorker &&
86
+ (await this.securityWorker(this.securityData))) ||
87
+ {};
88
+ const requestParams = this.mergeRequestParams(params, secureParams);
89
+ const queryString = query && this.toQueryString(query);
90
+ const payloadFormatter = this.contentFormatters[type || ContentType.Json];
91
+ const responseFormat = format || requestParams.format;
92
+ return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
93
+ ...requestParams,
94
+ headers: {
95
+ ...(requestParams.headers || {}),
96
+ ...(type && type !== ContentType.FormData
97
+ ? { "Content-Type": type }
98
+ : {}),
99
+ },
100
+ signal: (cancelToken
101
+ ? this.createAbortSignal(cancelToken)
102
+ : requestParams.signal) || null,
103
+ body: typeof body === "undefined" || body === null
104
+ ? null
105
+ : payloadFormatter(body),
106
+ }).then(async (response) => {
107
+ const r = response;
108
+ r.data = null;
109
+ r.error = null;
110
+ const responseToParse = responseFormat ? response.clone() : response;
111
+ const data = !responseFormat
112
+ ? r
113
+ : await responseToParse[responseFormat]()
114
+ .then((data) => {
115
+ if (r.ok) {
116
+ r.data = data;
117
+ }
118
+ else {
119
+ r.error = data;
120
+ }
121
+ return r;
122
+ })
123
+ .catch((e) => {
124
+ r.error = e;
125
+ return r;
126
+ });
127
+ if (cancelToken) {
128
+ this.abortControllers.delete(cancelToken);
129
+ }
130
+ if (!response.ok)
131
+ throw data;
132
+ return data;
133
+ });
134
+ };
135
+ Object.assign(this, apiConfig);
136
+ }
137
+ encodeQueryParam(key, value) {
138
+ const encodedKey = encodeURIComponent(key);
139
+ return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
140
+ }
141
+ addQueryParam(query, key) {
142
+ return this.encodeQueryParam(key, query[key]);
143
+ }
144
+ addArrayQueryParam(query, key) {
145
+ const value = query[key];
146
+ return value.map((v) => this.encodeQueryParam(key, v)).join("&");
147
+ }
148
+ toQueryString(rawQuery) {
149
+ const query = rawQuery || {};
150
+ const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
151
+ return keys
152
+ .map((key) => Array.isArray(query[key])
153
+ ? this.addArrayQueryParam(query, key)
154
+ : this.addQueryParam(query, key))
155
+ .join("&");
156
+ }
157
+ addQueryParams(rawQuery) {
158
+ const queryString = this.toQueryString(rawQuery);
159
+ return queryString ? `?${queryString}` : "";
160
+ }
161
+ mergeRequestParams(params1, params2) {
162
+ return {
163
+ ...this.baseApiParams,
164
+ ...params1,
165
+ ...(params2 || {}),
166
+ headers: {
167
+ ...(this.baseApiParams.headers || {}),
168
+ ...(params1.headers || {}),
169
+ ...((params2 && params2.headers) || {}),
170
+ },
171
+ };
172
+ }
173
+ }
174
+ exports.HttpClient = HttpClient;
175
+ /**
176
+ * @title Anchor OpenApi
177
+ * @version V1.0
178
+ * @license Apache 2.0 (http://springdoc.org)
179
+ * @baseUrl https://anchordev.dipbit.xyz/
180
+ */
181
+ class Api extends HttpClient {
182
+ constructor() {
183
+ super(...arguments);
184
+ this.v1 = {
185
+ /**
186
+ * @description get nft series by id
187
+ *
188
+ * @tags Anchor
189
+ * @name GetNftSeriesById
190
+ * @summary get nft series by id
191
+ * @request GET:/v1/series/{type}/{series}
192
+ */
193
+ getNftSeriesById: (type, series, query, params = {}) => this.request({
194
+ path: `/v1/series/${type}/${series}`,
195
+ method: "GET",
196
+ query: query,
197
+ format: "json",
198
+ ...params,
199
+ }),
200
+ /**
201
+ * @description 获取团队排行榜,支持分页查询,返回个人团队信息
202
+ *
203
+ * @tags TeamV1
204
+ * @name GetTeamLeaderboard
205
+ * @summary Get team leaderboard
206
+ * @request GET:/v1/teams/leaderboard
207
+ */
208
+ getTeamLeaderboard: (query, params = {}) => this.request({
209
+ path: `/v1/teams/leaderboard`,
210
+ method: "GET",
211
+ query: query,
212
+ format: "json",
213
+ ...params,
214
+ }),
215
+ /**
216
+ * @description anchor check
217
+ *
218
+ * @tags Anchor
219
+ * @name Check
220
+ * @summary anchor check
221
+ * @request POST:/v1/check/{type}
222
+ */
223
+ check: (type, params = {}) => this.request({
224
+ path: `/v1/check/${type}`,
225
+ method: "POST",
226
+ format: "json",
227
+ ...params,
228
+ }),
229
+ /**
230
+ * @description get check result
231
+ *
232
+ * @tags Anchor
233
+ * @name GetCheckResult
234
+ * @summary get check result
235
+ * @request GET:/v1/check/{type}
236
+ */
237
+ getCheckResult: (type, params = {}) => this.request({
238
+ path: `/v1/check/${type}`,
239
+ method: "GET",
240
+ format: "json",
241
+ ...params,
242
+ }),
243
+ /**
244
+ * @description 获取团队详情,包含已解锁的徽章信息
245
+ *
246
+ * @tags TeamV1
247
+ * @name GetTeamDetail
248
+ * @summary Get team detail
249
+ * @request GET:/v1/teams/{teamId}/detail
250
+ */
251
+ getTeamDetail: (teamId, params = {}) => this.request({
252
+ path: `/v1/teams/${teamId}/detail`,
253
+ method: "GET",
254
+ format: "json",
255
+ ...params,
256
+ }),
257
+ /**
258
+ * @description 标记指定通知为已读状态
259
+ *
260
+ * @tags TeamV1
261
+ * @name MarkNotificationRead
262
+ * @summary Mark notification as read
263
+ * @request POST:/v1/notifications/{notificationId}/read
264
+ */
265
+ markNotificationRead: (notificationId, params = {}) => this.request({
266
+ path: `/v1/notifications/${notificationId}/read`,
267
+ method: "POST",
268
+ format: "json",
269
+ ...params,
270
+ }),
271
+ /**
272
+ * @description list season config
273
+ *
274
+ * @tags Season
275
+ * @name ListSeasonConfig
276
+ * @summary list season config
277
+ * @request GET:/v1/seasons
278
+ */
279
+ listSeasonConfig: (params = {}) => this.request({
280
+ path: `/v1/seasons`,
281
+ method: "GET",
282
+ format: "json",
283
+ ...params,
284
+ }),
285
+ /**
286
+ * @description 获取指定徽章的贡献者列表
287
+ *
288
+ * @tags TeamV1
289
+ * @name GetBadgeContributors
290
+ * @summary Get badge contributors
291
+ * @request GET:/v1/teams/badges/{badgeId}/contributors
292
+ */
293
+ getBadgeContributors: (badgeId, params = {}) => this.request({
294
+ path: `/v1/teams/badges/${badgeId}/contributors`,
295
+ method: "GET",
296
+ format: "json",
297
+ ...params,
298
+ }),
299
+ /**
300
+ * @description query user claimable or claimed Badges
301
+ *
302
+ * @tags Anchor
303
+ * @name BadgeAssets
304
+ * @summary query user claimable or claimed Badges
305
+ * @request GET:/v1/badges
306
+ */
307
+ badgeAssets: (query, params = {}) => this.request({
308
+ path: `/v1/badges`,
309
+ method: "GET",
310
+ query: query,
311
+ format: "json",
312
+ ...params,
313
+ }),
314
+ /**
315
+ * @description 获取团队内成员贡献排行榜
316
+ *
317
+ * @tags TeamV1
318
+ * @name GetTeamMemberRanking
319
+ * @summary Get team member ranking
320
+ * @request GET:/v1/teams/{teamId}/members/ranking
321
+ */
322
+ getTeamMemberRanking: (teamId, query, params = {}) => this.request({
323
+ path: `/v1/teams/${teamId}/members/ranking`,
324
+ method: "GET",
325
+ query: query,
326
+ format: "json",
327
+ ...params,
328
+ }),
329
+ /**
330
+ * @description 前端监听到合约成功事件,调用加快后端事件处理
331
+ *
332
+ * @tags Transaction
333
+ * @name UserOpHashProcess
334
+ * @summary userOpHash process
335
+ * @request POST:/v1/transaction/process/userOpHash
336
+ */
337
+ userOpHashProcess: (data, params = {}) => this.request({
338
+ path: `/v1/transaction/process/userOpHash`,
339
+ method: "POST",
340
+ body: data,
341
+ type: ContentType.Json,
342
+ format: "json",
343
+ ...params,
344
+ }),
345
+ /**
346
+ * @description 获取团队所有徽章的状态信息,支持按状态筛选
347
+ *
348
+ * @tags TeamV1
349
+ * @name GetTeamBadges
350
+ * @summary Get team badges
351
+ * @request GET:/v1/teams/badges
352
+ */
353
+ getTeamBadges: (query, params = {}) => this.request({
354
+ path: `/v1/teams/badges`,
355
+ method: "GET",
356
+ query: query,
357
+ format: "json",
358
+ ...params,
359
+ }),
360
+ /**
361
+ * @description get nft series
362
+ *
363
+ * @tags Anchor
364
+ * @name NftSeries
365
+ * @summary get nft series
366
+ * @request GET:/v1/series/{type}
367
+ */
368
+ nftSeries: (type, params = {}) => this.request({
369
+ path: `/v1/series/${type}`,
370
+ method: "GET",
371
+ format: "json",
372
+ ...params,
373
+ }),
374
+ /**
375
+ * @description 获取当前用户的个人概况信息
376
+ *
377
+ * @tags TeamV1
378
+ * @name GetMyTeamProfile
379
+ * @summary Get my team profile
380
+ * @request GET:/v1/teams/members/me
381
+ */
382
+ getMyTeamProfile: (params = {}) => this.request({
383
+ path: `/v1/teams/members/me`,
384
+ method: "GET",
385
+ format: "json",
386
+ ...params,
387
+ }),
388
+ /**
389
+ * @description 获取用户的通知列表
390
+ *
391
+ * @tags TeamV1
392
+ * @name GetNotifications
393
+ * @summary Get notifications
394
+ * @request GET:/v1/notifications
395
+ */
396
+ getNotifications: (query, params = {}) => this.request({
397
+ path: `/v1/notifications`,
398
+ method: "GET",
399
+ query: query,
400
+ format: "json",
401
+ ...params,
402
+ }),
403
+ /**
404
+ * @description 前端监听到合约成功事件,调用加快后端事件处理
405
+ *
406
+ * @tags Transaction
407
+ * @name TransactionHashProcess
408
+ * @summary speed up transaction
409
+ * @request POST:/v1/transaction/process/{txHash}
410
+ */
411
+ transactionHashProcess: (txHash, params = {}) => this.request({
412
+ path: `/v1/transaction/process/${txHash}`,
413
+ method: "POST",
414
+ format: "json",
415
+ ...params,
416
+ }),
417
+ };
418
+ this.v2 = {
419
+ /**
420
+ * @description Get badges that the user can claim
421
+ *
422
+ * @tags BadgeV2
423
+ * @name GetUserClaimableBadges
424
+ * @summary Get user claimable badges
425
+ * @request GET:/v2/badges/claimable
426
+ */
427
+ getUserClaimableBadges: (query, params = {}) => this.request({
428
+ path: `/v2/badges/claimable`,
429
+ method: "GET",
430
+ query: query,
431
+ format: "json",
432
+ ...params,
433
+ }),
434
+ /**
435
+ * @description Get detailed information of a specific badge series
436
+ *
437
+ * @tags BadgeV2
438
+ * @name GetBadgeSeriesDetail
439
+ * @summary Get badge series detail
440
+ * @request GET:/v2/badges/series/{series}
441
+ */
442
+ getBadgeSeriesDetail: (series, query, params = {}) => this.request({
443
+ path: `/v2/badges/series/${series}`,
444
+ method: "GET",
445
+ query: query,
446
+ format: "json",
447
+ ...params,
448
+ }),
449
+ /**
450
+ * @description Get user's claimed and claimable badge assets
451
+ *
452
+ * @tags BadgeV2
453
+ * @name GetUserBadgeAssets
454
+ * @summary Get user badge assets
455
+ * @request GET:/v2/badges/assets
456
+ */
457
+ getUserBadgeAssets: (query, params = {}) => this.request({
458
+ path: `/v2/badges/assets`,
459
+ method: "GET",
460
+ query: query,
461
+ format: "json",
462
+ ...params,
463
+ }),
464
+ /**
465
+ * @description Get verifiers for badge conditions based on platform and type
466
+ *
467
+ * @tags BadgeV2
468
+ * @name GetBadgeVerifiers
469
+ * @summary Get badge verifiers
470
+ * @request GET:/v2/badges/verifiers
471
+ */
472
+ getBadgeVerifiers: (query, params = {}) => this.request({
473
+ path: `/v2/badges/verifiers`,
474
+ method: "GET",
475
+ query: query,
476
+ format: "json",
477
+ ...params,
478
+ }),
479
+ /**
480
+ * @description Check which badges the user can claim
481
+ *
482
+ * @tags BadgeV2
483
+ * @name CheckUserClaimableBadges
484
+ * @summary Check user claimable badges
485
+ * @request POST:/v2/badges
486
+ */
487
+ checkUserClaimableBadges: (data, params = {}) => this.request({
488
+ path: `/v2/badges`,
489
+ method: "POST",
490
+ body: data,
491
+ type: ContentType.Json,
492
+ format: "json",
493
+ ...params,
494
+ }),
495
+ /**
496
+ * @description query user badges
497
+ *
498
+ * @tags BadgeV2
499
+ * @name QueryUserBadges
500
+ * @summary query user badges
501
+ * @request GET:/v2/badges
502
+ */
503
+ queryUserBadges: (query, params = {}) => this.request({
504
+ path: `/v2/badges`,
505
+ method: "GET",
506
+ query: query,
507
+ format: "json",
508
+ ...params,
509
+ }),
510
+ /**
511
+ * @description Query badge series with optional filtering conditions
512
+ *
513
+ * @tags BadgeV2
514
+ * @name GetBadgeSeries
515
+ * @summary Query badge series with conditions
516
+ * @request GET:/v2/badges/series
517
+ */
518
+ getBadgeSeries: (query, params = {}) => this.request({
519
+ path: `/v2/badges/series`,
520
+ method: "GET",
521
+ query: query,
522
+ format: "json",
523
+ ...params,
524
+ }),
525
+ /**
526
+ * @description anchor mint
527
+ *
528
+ * @tags AnchorV2
529
+ * @name Mint
530
+ * @summary anchor mint
531
+ * @request POST:/v2/mint/{type}
532
+ */
533
+ mint: (type, data, params = {}) => this.request({
534
+ path: `/v2/mint/${type}`,
535
+ method: "POST",
536
+ body: data,
537
+ type: ContentType.Json,
538
+ format: "json",
539
+ ...params,
540
+ }),
541
+ /**
542
+ * @description anchor batch mint
543
+ *
544
+ * @tags AnchorV2
545
+ * @name BatchMint
546
+ * @summary anchor batch mint
547
+ * @request POST:/v2/batch/mint/{type}
548
+ */
549
+ batchMint: (type, data, params = {}) => this.request({
550
+ path: `/v2/batch/mint/${type}`,
551
+ method: "POST",
552
+ body: data,
553
+ type: ContentType.Json,
554
+ format: "json",
555
+ ...params,
556
+ }),
557
+ /**
558
+ * @description Get signatures required for claiming badges
559
+ *
560
+ * @tags BadgeV2
561
+ * @name GetBadgeClaimSignatures
562
+ * @summary Get badge claim signatures
563
+ * @request POST:/v2/badges/signatures
564
+ */
565
+ getBadgeClaimSignatures: (data, params = {}) => this.request({
566
+ path: `/v2/badges/signatures`,
567
+ method: "POST",
568
+ body: data,
569
+ type: ContentType.Json,
570
+ format: "json",
571
+ ...params,
572
+ }),
573
+ /**
574
+ * @description Check if a specific badge is claimable for the user
575
+ *
576
+ * @tags BadgeV2
577
+ * @name CheckSingleBadgeClaimable
578
+ * @summary Check single badge claimable status
579
+ * @request POST:/v2/badges/{badgeId}
580
+ */
581
+ checkSingleBadgeClaimable: (badgeId, data, params = {}) => this.request({
582
+ path: `/v2/badges/${badgeId}`,
583
+ method: "POST",
584
+ body: data,
585
+ type: ContentType.Json,
586
+ format: "json",
587
+ ...params,
588
+ }),
589
+ /**
590
+ * @description Get detailed information of a specific badge
591
+ *
592
+ * @tags BadgeV2
593
+ * @name GetBadgeDetail
594
+ * @summary Get badge detail
595
+ * @request GET:/v2/badges/{badgeId}
596
+ */
597
+ getBadgeDetail: (badgeId, params = {}) => this.request({
598
+ path: `/v2/badges/${badgeId}`,
599
+ method: "GET",
600
+ format: "json",
601
+ ...params,
602
+ }),
603
+ };
604
+ this.s1 = {
605
+ /**
606
+ * @description query badges holders
607
+ *
608
+ * @tags AnchorS2S
609
+ * @name QueryBadgesHolders
610
+ * @summary query badges holders
611
+ * @request GET:/s1/badges/holders
612
+ */
613
+ queryBadgesHolders: (query, params = {}) => this.request({
614
+ path: `/s1/badges/holders`,
615
+ method: "GET",
616
+ query: query,
617
+ format: "json",
618
+ ...params,
619
+ }),
620
+ /**
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
636
+ *
637
+ * @tags AnchorS2S
638
+ * @name JoinTeam
639
+ * @summary Join team
640
+ * @request POST:/s1/teams/join
641
+ */
642
+ joinTeam: (data, params = {}) => this.request({
643
+ path: `/s1/teams/join`,
644
+ method: "POST",
645
+ body: data,
646
+ type: ContentType.Json,
647
+ format: "json",
648
+ ...params,
649
+ }),
650
+ /**
651
+ * @description get nft series by id
652
+ *
653
+ * @tags AnchorS2S
654
+ * @name GetNftSeriesDetail
655
+ * @summary get nft series by id
656
+ * @request GET:/s1/series/{type}/{series}
657
+ */
658
+ getNftSeriesDetail: (type, series, query, params = {}) => this.request({
659
+ path: `/s1/series/${type}/${series}`,
660
+ method: "GET",
661
+ query: query,
662
+ format: "json",
663
+ ...params,
664
+ }),
665
+ /**
666
+ * @description 队长移除团队成员
667
+ *
668
+ * @tags AnchorS2S
669
+ * @name RemoveTeamMember
670
+ * @summary Remove member by captain
671
+ * @request DELETE:/s1/teams/remove/{captainUserId}/{userId}
672
+ */
673
+ removeTeamMember: (captainUserId, userId, params = {}) => this.request({
674
+ path: `/s1/teams/remove/${captainUserId}/${userId}`,
675
+ method: "DELETE",
676
+ format: "json",
677
+ ...params,
678
+ }),
679
+ /**
680
+ * @description 重制探测徽章冷却时间
681
+ *
682
+ * @tags AnchorS2S
683
+ * @name IntervalReset
684
+ * @summary interval reset
685
+ * @request POST:/s1/interval/reset
686
+ */
687
+ intervalReset: (data, params = {}) => this.request({
688
+ path: `/s1/interval/reset`,
689
+ method: "POST",
690
+ body: data,
691
+ type: ContentType.Json,
692
+ format: "json",
693
+ ...params,
694
+ }),
695
+ /**
696
+ * @description grant badge
697
+ *
698
+ * @tags AnchorS2S
699
+ * @name GrantBadge
700
+ * @summary grant badge
701
+ * @request POST:/s1/badges
702
+ */
703
+ grantBadge: (data, params = {}) => this.request({
704
+ path: `/s1/badges`,
705
+ method: "POST",
706
+ body: data,
707
+ type: ContentType.Json,
708
+ format: "json",
709
+ ...params,
710
+ }),
711
+ /**
712
+ * @description purchase mint with signature
713
+ *
714
+ * @tags AnchorS2S
715
+ * @name PurchaseMint
716
+ * @summary purchase mint with signature
717
+ * @request POST:/s1/purchase/{type}
718
+ */
719
+ purchaseMint: (type, data, params = {}) => this.request({
720
+ path: `/s1/purchase/${type}`,
721
+ method: "POST",
722
+ body: data,
723
+ type: ContentType.Json,
724
+ format: "json",
725
+ ...params,
726
+ }),
727
+ /**
728
+ * @description assets of badge
729
+ *
730
+ * @tags AnchorS2S
731
+ * @name QueryAssets
732
+ * @summary assets of badge
733
+ * @request POST:/s1/assets/{type}
734
+ */
735
+ queryAssets: (type, data, params = {}) => this.request({
736
+ path: `/s1/assets/${type}`,
737
+ method: "POST",
738
+ body: data,
739
+ type: ContentType.Json,
740
+ format: "json",
741
+ ...params,
742
+ }),
743
+ /**
744
+ * @description 创建新团队,支持设置背景图
745
+ *
746
+ * @tags AnchorS2S
747
+ * @name CreateTeam
748
+ * @summary Create team
749
+ * @request POST:/s1/teams
750
+ */
751
+ createTeam: (data, params = {}) => this.request({
752
+ path: `/s1/teams`,
753
+ method: "POST",
754
+ body: data,
755
+ type: ContentType.Json,
756
+ format: "json",
757
+ ...params,
758
+ }),
759
+ /**
760
+ * @description check by event
761
+ *
762
+ * @tags AnchorS2S
763
+ * @name CheckByEvent
764
+ * @summary check by event
765
+ * @request POST:/s1/check/event
766
+ */
767
+ checkByEvent: (data, params = {}) => this.request({
768
+ path: `/s1/check/event`,
769
+ method: "POST",
770
+ body: data,
771
+ type: ContentType.Json,
772
+ format: "json",
773
+ ...params,
774
+ }),
775
+ /**
776
+ * @description badges check
777
+ *
778
+ * @tags AnchorS2S
779
+ * @name BadgesCheck
780
+ * @summary badges check
781
+ * @request POST:/s1/badges/check
782
+ */
783
+ badgesCheck: (data, params = {}) => this.request({
784
+ path: `/s1/badges/check`,
785
+ method: "POST",
786
+ body: data,
787
+ type: ContentType.Json,
788
+ format: "json",
789
+ ...params,
790
+ }),
791
+ };
792
+ }
793
+ }
794
+ exports.Api = Api;