bitbadgesjs-sdk 0.3.49 → 0.3.50

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 (32) hide show
  1. package/dist/api-indexer/BitBadgesAddressList.d.ts +4 -4
  2. package/dist/api-indexer/BitBadgesAddressList.d.ts.map +1 -1
  3. package/dist/api-indexer/BitBadgesAddressList.js +540 -8
  4. package/dist/api-indexer/BitBadgesAddressList.js.map +1 -1
  5. package/dist/api-indexer/BitBadgesApi.d.ts +3 -1
  6. package/dist/api-indexer/BitBadgesApi.d.ts.map +1 -1
  7. package/dist/api-indexer/BitBadgesApi.js +6254 -0
  8. package/dist/api-indexer/BitBadgesApi.js.map +1 -1
  9. package/dist/api-indexer/BitBadgesCollection.d.ts.map +1 -1
  10. package/dist/api-indexer/BitBadgesCollection.js +557 -0
  11. package/dist/api-indexer/BitBadgesCollection.js.map +1 -1
  12. package/dist/api-indexer/BitBadgesUserInfo.d.ts +2 -2
  13. package/dist/api-indexer/BitBadgesUserInfo.d.ts.map +1 -1
  14. package/dist/api-indexer/BitBadgesUserInfo.js +218 -0
  15. package/dist/api-indexer/BitBadgesUserInfo.js.map +1 -1
  16. package/dist/api-indexer/metadata/metadataIds.d.ts.map +1 -1
  17. package/dist/api-indexer/requests/collections.d.ts +18 -0
  18. package/dist/api-indexer/requests/collections.d.ts.map +1 -1
  19. package/dist/api-indexer/requests/collections.js +9 -1
  20. package/dist/api-indexer/requests/collections.js.map +1 -1
  21. package/dist/api-indexer/requests/requests.d.ts +1 -1
  22. package/dist/api-indexer/requests/requests.d.ts.map +1 -1
  23. package/dist/api-indexer/requests/requests.js.map +1 -1
  24. package/dist/api-indexer/requests/routes.d.ts +1 -0
  25. package/dist/api-indexer/requests/routes.d.ts.map +1 -1
  26. package/dist/api-indexer/requests/routes.js +1 -0
  27. package/dist/api-indexer/requests/routes.js.map +1 -1
  28. package/dist/core/approval-utils.d.ts.map +1 -1
  29. package/dist/core/balances.d.ts.map +1 -1
  30. package/dist/core/transfers.d.ts.map +1 -1
  31. package/dist/tsconfig.build.tsbuildinfo +1 -1
  32. package/package.json +8 -4
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.convertCollectionMap = exports.BitBadgesCollection = void 0;
4
7
  const base_1 = require("../common/base");
@@ -22,6 +25,7 @@ const requests_1 = require("./requests");
22
25
  const collections_1 = require("./requests/collections");
23
26
  const routes_1 = require("./requests/routes");
24
27
  const __1 = require("..");
28
+ const typia_1 = __importDefault(require("typia"));
25
29
  const NEW_COLLECTION_ID = 0n;
26
30
  class BitBadgesCollection extends docs_1.CollectionDoc {
27
31
  collectionApprovals;
@@ -257,6 +261,305 @@ class BitBadgesCollection extends docs_1.CollectionDoc {
257
261
  }
258
262
  static async GetCollections(api, body) {
259
263
  try {
264
+ const validateRes = (input => {
265
+ const errors = [];
266
+ const __is = input => {
267
+ const $ip0 = input => {
268
+ const array = input;
269
+ const top = input[0];
270
+ if (0 === input.length)
271
+ return true;
272
+ const arrayPredicators = [
273
+ [
274
+ top => "object" === typeof top && null !== top && $io6(top),
275
+ entire => entire.every(elem => "object" === typeof elem && null !== elem && $io6(elem))
276
+ ],
277
+ [
278
+ top => "string" === typeof top || "number" === typeof top || "bigint" === typeof top,
279
+ entire => entire.every(elem => "string" === typeof elem || "number" === typeof elem || "bigint" === typeof elem)
280
+ ]
281
+ ];
282
+ const passed = arrayPredicators.filter(pred => pred[0](top));
283
+ if (1 === passed.length)
284
+ return passed[0][1](array);
285
+ else if (1 < passed.length)
286
+ for (const pred of passed)
287
+ if (array.every(value => true === pred[0](value)))
288
+ return pred[1](array);
289
+ return false;
290
+ };
291
+ const $io0 = input => Array.isArray(input.collectionsToFetch) && input.collectionsToFetch.every(elem => "object" === typeof elem && null !== elem && $io1(elem));
292
+ const $io1 = input => (undefined === input.viewsToFetch || Array.isArray(input.viewsToFetch) && input.viewsToFetch.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && (undefined === input.fetchTotalAndMintBalances || "boolean" === typeof input.fetchTotalAndMintBalances) && (undefined === input.challengeTrackersToFetch || Array.isArray(input.challengeTrackersToFetch) && input.challengeTrackersToFetch.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.approvalTrackersToFetch || Array.isArray(input.approvalTrackersToFetch) && input.approvalTrackersToFetch.every(elem => "object" === typeof elem && null !== elem && $io4(elem))) && (undefined === input.handleAllAndAppendDefaults || "boolean" === typeof input.handleAllAndAppendDefaults) && (undefined === input.fetchPrivateParams || "boolean" === typeof input.fetchPrivateParams) && (undefined === input.metadataToFetch || "object" === typeof input.metadataToFetch && null !== input.metadataToFetch && false === Array.isArray(input.metadataToFetch) && $io5(input.metadataToFetch)) && ("string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId);
293
+ const $io2 = input => ("transferActivity" === input.viewType || "reviews" === input.viewType || "owners" === input.viewType || "amountTrackers" === input.viewType || "challengeTrackers" === input.viewType) && "string" === typeof input.viewId && "string" === typeof input.bookmark && (undefined === input.oldestFirst || "boolean" === typeof input.oldestFirst) && (undefined === input.cosmosAddress || "string" === typeof input.cosmosAddress);
294
+ const $io3 = input => ("string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId) && "string" === typeof input.approvalId && "string" === typeof input.challengeTrackerId && ("" === input.approvalLevel || "collection" === input.approvalLevel || "incoming" === input.approvalLevel || "outgoing" === input.approvalLevel) && "string" === typeof input.approverAddress;
295
+ const $io4 = input => ("string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId) && "string" === typeof input.approvalId && "string" === typeof input.amountTrackerId && "string" === typeof input.approvalLevel && "string" === typeof input.approverAddress && "string" === typeof input.trackerType && "string" === typeof input.approvedAddress;
296
+ const $io5 = input => (undefined === input.doNotFetchCollectionMetadata || "boolean" === typeof input.doNotFetchCollectionMetadata) && (undefined === input.uris || Array.isArray(input.uris) && input.uris.every(elem => "string" === typeof elem)) && (undefined === input.badgeIds || Array.isArray(input.badgeIds) && ($ip0(input.badgeIds) || false));
297
+ const $io6 = input => ("string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start) && ("string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end);
298
+ return "object" === typeof input && null !== input && $io0(input);
299
+ };
300
+ if (false === __is(input)) {
301
+ const $report = typia_1.default.validate.report(errors);
302
+ ((input, _path, _exceptionable = true) => {
303
+ const $vp0 = (input, _path, _exceptionable = true) => {
304
+ const array = input;
305
+ const top = input[0];
306
+ if (0 === input.length)
307
+ return true;
308
+ const arrayPredicators = [
309
+ [
310
+ top => "object" === typeof top && null !== top && $vo6(top, _path, false && _exceptionable),
311
+ entire => entire.map((elem, _index8) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
312
+ path: _path + "[" + _index8 + "]",
313
+ expected: "iUintRange<NumberType>",
314
+ value: elem
315
+ })) && $vo6(elem, _path + "[" + _index8 + "]", true && _exceptionable) || $report(_exceptionable, {
316
+ path: _path + "[" + _index8 + "]",
317
+ expected: "iUintRange<NumberType>",
318
+ value: elem
319
+ })).every(flag => flag)
320
+ ],
321
+ [
322
+ top => "string" === typeof top || "number" === typeof top || "bigint" === typeof top,
323
+ entire => entire.map((elem, _index9) => "string" === typeof elem || "number" === typeof elem || "bigint" === typeof elem || $report(_exceptionable, {
324
+ path: _path + "[" + _index9 + "]",
325
+ expected: "(bigint | number | string)",
326
+ value: elem
327
+ })).every(flag => flag)
328
+ ]
329
+ ];
330
+ const passed = arrayPredicators.filter(pred => pred[0](top));
331
+ if (1 === passed.length)
332
+ return passed[0][1](array);
333
+ else if (1 < passed.length)
334
+ for (const pred of passed)
335
+ if (array.every(value => true === pred[0](value)))
336
+ return pred[1](array);
337
+ return $report(_exceptionable, {
338
+ path: _path,
339
+ expected: "(Array<iUintRange<NumberType>> | Array<NumberType>)",
340
+ value: input
341
+ });
342
+ };
343
+ const $vo0 = (input, _path, _exceptionable = true) => [(Array.isArray(input.collectionsToFetch) || $report(_exceptionable, {
344
+ path: _path + ".collectionsToFetch",
345
+ expected: "Array<GetCollectionRequestBody>",
346
+ value: input.collectionsToFetch
347
+ })) && input.collectionsToFetch.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
348
+ path: _path + ".collectionsToFetch[" + _index1 + "]",
349
+ expected: "GetCollectionRequestBody",
350
+ value: elem
351
+ })) && $vo1(elem, _path + ".collectionsToFetch[" + _index1 + "]", true && _exceptionable) || $report(_exceptionable, {
352
+ path: _path + ".collectionsToFetch[" + _index1 + "]",
353
+ expected: "GetCollectionRequestBody",
354
+ value: elem
355
+ })).every(flag => flag) || $report(_exceptionable, {
356
+ path: _path + ".collectionsToFetch",
357
+ expected: "Array<GetCollectionRequestBody>",
358
+ value: input.collectionsToFetch
359
+ })].every(flag => flag);
360
+ const $vo1 = (input, _path, _exceptionable = true) => [undefined === input.viewsToFetch || (Array.isArray(input.viewsToFetch) || $report(_exceptionable, {
361
+ path: _path + ".viewsToFetch",
362
+ expected: "(Array<__type> | undefined)",
363
+ value: input.viewsToFetch
364
+ })) && input.viewsToFetch.map((elem, _index2) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
365
+ path: _path + ".viewsToFetch[" + _index2 + "]",
366
+ expected: "__type",
367
+ value: elem
368
+ })) && $vo2(elem, _path + ".viewsToFetch[" + _index2 + "]", true && _exceptionable) || $report(_exceptionable, {
369
+ path: _path + ".viewsToFetch[" + _index2 + "]",
370
+ expected: "__type",
371
+ value: elem
372
+ })).every(flag => flag) || $report(_exceptionable, {
373
+ path: _path + ".viewsToFetch",
374
+ expected: "(Array<__type> | undefined)",
375
+ value: input.viewsToFetch
376
+ }), undefined === input.fetchTotalAndMintBalances || "boolean" === typeof input.fetchTotalAndMintBalances || $report(_exceptionable, {
377
+ path: _path + ".fetchTotalAndMintBalances",
378
+ expected: "(boolean | undefined)",
379
+ value: input.fetchTotalAndMintBalances
380
+ }), undefined === input.challengeTrackersToFetch || (Array.isArray(input.challengeTrackersToFetch) || $report(_exceptionable, {
381
+ path: _path + ".challengeTrackersToFetch",
382
+ expected: "(Array<iChallengeTrackerIdDetails<NumberType>> | undefined)",
383
+ value: input.challengeTrackersToFetch
384
+ })) && input.challengeTrackersToFetch.map((elem, _index3) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
385
+ path: _path + ".challengeTrackersToFetch[" + _index3 + "]",
386
+ expected: "iChallengeTrackerIdDetails<NumberType>",
387
+ value: elem
388
+ })) && $vo3(elem, _path + ".challengeTrackersToFetch[" + _index3 + "]", true && _exceptionable) || $report(_exceptionable, {
389
+ path: _path + ".challengeTrackersToFetch[" + _index3 + "]",
390
+ expected: "iChallengeTrackerIdDetails<NumberType>",
391
+ value: elem
392
+ })).every(flag => flag) || $report(_exceptionable, {
393
+ path: _path + ".challengeTrackersToFetch",
394
+ expected: "(Array<iChallengeTrackerIdDetails<NumberType>> | undefined)",
395
+ value: input.challengeTrackersToFetch
396
+ }), undefined === input.approvalTrackersToFetch || (Array.isArray(input.approvalTrackersToFetch) || $report(_exceptionable, {
397
+ path: _path + ".approvalTrackersToFetch",
398
+ expected: "(Array<iAmountTrackerIdDetails<NumberType>> | undefined)",
399
+ value: input.approvalTrackersToFetch
400
+ })) && input.approvalTrackersToFetch.map((elem, _index4) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
401
+ path: _path + ".approvalTrackersToFetch[" + _index4 + "]",
402
+ expected: "iAmountTrackerIdDetails<NumberType>",
403
+ value: elem
404
+ })) && $vo4(elem, _path + ".approvalTrackersToFetch[" + _index4 + "]", true && _exceptionable) || $report(_exceptionable, {
405
+ path: _path + ".approvalTrackersToFetch[" + _index4 + "]",
406
+ expected: "iAmountTrackerIdDetails<NumberType>",
407
+ value: elem
408
+ })).every(flag => flag) || $report(_exceptionable, {
409
+ path: _path + ".approvalTrackersToFetch",
410
+ expected: "(Array<iAmountTrackerIdDetails<NumberType>> | undefined)",
411
+ value: input.approvalTrackersToFetch
412
+ }), undefined === input.handleAllAndAppendDefaults || "boolean" === typeof input.handleAllAndAppendDefaults || $report(_exceptionable, {
413
+ path: _path + ".handleAllAndAppendDefaults",
414
+ expected: "(boolean | undefined)",
415
+ value: input.handleAllAndAppendDefaults
416
+ }), undefined === input.fetchPrivateParams || "boolean" === typeof input.fetchPrivateParams || $report(_exceptionable, {
417
+ path: _path + ".fetchPrivateParams",
418
+ expected: "(boolean | undefined)",
419
+ value: input.fetchPrivateParams
420
+ }), undefined === input.metadataToFetch || ("object" === typeof input.metadataToFetch && null !== input.metadataToFetch && false === Array.isArray(input.metadataToFetch) || $report(_exceptionable, {
421
+ path: _path + ".metadataToFetch",
422
+ expected: "(MetadataFetchOptions | undefined)",
423
+ value: input.metadataToFetch
424
+ })) && $vo5(input.metadataToFetch, _path + ".metadataToFetch", true && _exceptionable) || $report(_exceptionable, {
425
+ path: _path + ".metadataToFetch",
426
+ expected: "(MetadataFetchOptions | undefined)",
427
+ value: input.metadataToFetch
428
+ }), "string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId || $report(_exceptionable, {
429
+ path: _path + ".collectionId",
430
+ expected: "(bigint | number | string)",
431
+ value: input.collectionId
432
+ })].every(flag => flag);
433
+ const $vo2 = (input, _path, _exceptionable = true) => ["transferActivity" === input.viewType || "reviews" === input.viewType || "owners" === input.viewType || "amountTrackers" === input.viewType || "challengeTrackers" === input.viewType || $report(_exceptionable, {
434
+ path: _path + ".viewType",
435
+ expected: "(\"amountTrackers\" | \"challengeTrackers\" | \"owners\" | \"reviews\" | \"transferActivity\")",
436
+ value: input.viewType
437
+ }), "string" === typeof input.viewId || $report(_exceptionable, {
438
+ path: _path + ".viewId",
439
+ expected: "string",
440
+ value: input.viewId
441
+ }), "string" === typeof input.bookmark || $report(_exceptionable, {
442
+ path: _path + ".bookmark",
443
+ expected: "string",
444
+ value: input.bookmark
445
+ }), undefined === input.oldestFirst || "boolean" === typeof input.oldestFirst || $report(_exceptionable, {
446
+ path: _path + ".oldestFirst",
447
+ expected: "(boolean | undefined)",
448
+ value: input.oldestFirst
449
+ }), undefined === input.cosmosAddress || "string" === typeof input.cosmosAddress || $report(_exceptionable, {
450
+ path: _path + ".cosmosAddress",
451
+ expected: "(string | undefined)",
452
+ value: input.cosmosAddress
453
+ })].every(flag => flag);
454
+ const $vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId || $report(_exceptionable, {
455
+ path: _path + ".collectionId",
456
+ expected: "(bigint | number | string)",
457
+ value: input.collectionId
458
+ }), "string" === typeof input.approvalId || $report(_exceptionable, {
459
+ path: _path + ".approvalId",
460
+ expected: "string",
461
+ value: input.approvalId
462
+ }), "string" === typeof input.challengeTrackerId || $report(_exceptionable, {
463
+ path: _path + ".challengeTrackerId",
464
+ expected: "string",
465
+ value: input.challengeTrackerId
466
+ }), "" === input.approvalLevel || "collection" === input.approvalLevel || "incoming" === input.approvalLevel || "outgoing" === input.approvalLevel || $report(_exceptionable, {
467
+ path: _path + ".approvalLevel",
468
+ expected: "(\"\" | \"collection\" | \"incoming\" | \"outgoing\")",
469
+ value: input.approvalLevel
470
+ }), "string" === typeof input.approverAddress || $report(_exceptionable, {
471
+ path: _path + ".approverAddress",
472
+ expected: "string",
473
+ value: input.approverAddress
474
+ })].every(flag => flag);
475
+ const $vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId || $report(_exceptionable, {
476
+ path: _path + ".collectionId",
477
+ expected: "(bigint | number | string)",
478
+ value: input.collectionId
479
+ }), "string" === typeof input.approvalId || $report(_exceptionable, {
480
+ path: _path + ".approvalId",
481
+ expected: "string",
482
+ value: input.approvalId
483
+ }), "string" === typeof input.amountTrackerId || $report(_exceptionable, {
484
+ path: _path + ".amountTrackerId",
485
+ expected: "string",
486
+ value: input.amountTrackerId
487
+ }), "string" === typeof input.approvalLevel || $report(_exceptionable, {
488
+ path: _path + ".approvalLevel",
489
+ expected: "string",
490
+ value: input.approvalLevel
491
+ }), "string" === typeof input.approverAddress || $report(_exceptionable, {
492
+ path: _path + ".approverAddress",
493
+ expected: "string",
494
+ value: input.approverAddress
495
+ }), "string" === typeof input.trackerType || $report(_exceptionable, {
496
+ path: _path + ".trackerType",
497
+ expected: "string",
498
+ value: input.trackerType
499
+ }), "string" === typeof input.approvedAddress || $report(_exceptionable, {
500
+ path: _path + ".approvedAddress",
501
+ expected: "string",
502
+ value: input.approvedAddress
503
+ })].every(flag => flag);
504
+ const $vo5 = (input, _path, _exceptionable = true) => [undefined === input.doNotFetchCollectionMetadata || "boolean" === typeof input.doNotFetchCollectionMetadata || $report(_exceptionable, {
505
+ path: _path + ".doNotFetchCollectionMetadata",
506
+ expected: "(boolean | undefined)",
507
+ value: input.doNotFetchCollectionMetadata
508
+ }), undefined === input.uris || (Array.isArray(input.uris) || $report(_exceptionable, {
509
+ path: _path + ".uris",
510
+ expected: "(Array<string> | undefined)",
511
+ value: input.uris
512
+ })) && input.uris.map((elem, _index5) => "string" === typeof elem || $report(_exceptionable, {
513
+ path: _path + ".uris[" + _index5 + "]",
514
+ expected: "string",
515
+ value: elem
516
+ })).every(flag => flag) || $report(_exceptionable, {
517
+ path: _path + ".uris",
518
+ expected: "(Array<string> | undefined)",
519
+ value: input.uris
520
+ }), undefined === input.badgeIds || (Array.isArray(input.badgeIds) || $report(_exceptionable, {
521
+ path: _path + ".badgeIds",
522
+ expected: "(Array<NumberType> | Array<iUintRange<NumberType>> | undefined)",
523
+ value: input.badgeIds
524
+ })) && ($vp0(input.badgeIds, _path + ".badgeIds", true && _exceptionable) || $report(_exceptionable, {
525
+ path: _path + ".badgeIds",
526
+ expected: "Array<iUintRange<NumberType>> | Array<NumberType>",
527
+ value: input.badgeIds
528
+ })) || $report(_exceptionable, {
529
+ path: _path + ".badgeIds",
530
+ expected: "(Array<NumberType> | Array<iUintRange<NumberType>> | undefined)",
531
+ value: input.badgeIds
532
+ })].every(flag => flag);
533
+ const $vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start || $report(_exceptionable, {
534
+ path: _path + ".start",
535
+ expected: "(bigint | number | string)",
536
+ value: input.start
537
+ }), "string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end || $report(_exceptionable, {
538
+ path: _path + ".end",
539
+ expected: "(bigint | number | string)",
540
+ value: input.end
541
+ })].every(flag => flag);
542
+ return ("object" === typeof input && null !== input || $report(true, {
543
+ path: _path + "",
544
+ expected: "GetCollectionsPayload",
545
+ value: input
546
+ })) && $vo0(input, _path + "", true) || $report(true, {
547
+ path: _path + "",
548
+ expected: "GetCollectionsPayload",
549
+ value: input
550
+ });
551
+ })(input, "$input", true);
552
+ }
553
+ const success = 0 === errors.length;
554
+ return {
555
+ success,
556
+ errors,
557
+ data: success ? input : undefined
558
+ };
559
+ })(body ?? {});
560
+ if (!validateRes.success) {
561
+ throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
562
+ }
260
563
  const response = await api.axios.post(`${api.BACKEND_URL}${routes_1.BitBadgesApiRoutes.GetCollectionsRoute()}`, body);
261
564
  return new collections_1.GetCollectionsSuccessResponse(response.data).convert(api.ConvertFunction);
262
565
  }
@@ -267,6 +570,41 @@ class BitBadgesCollection extends docs_1.CollectionDoc {
267
570
  }
268
571
  static async GetBadgeBalanceByAddress(api, collectionId, cosmosAddress, body) {
269
572
  try {
573
+ const validateRes = (input => {
574
+ const errors = [];
575
+ const __is = input => {
576
+ const $io0 = input => undefined === input.fetchPrivateParams || "boolean" === typeof input.fetchPrivateParams;
577
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
578
+ };
579
+ if (false === __is(input)) {
580
+ const $report = typia_1.default.validate.report(errors);
581
+ ((input, _path, _exceptionable = true) => {
582
+ const $vo0 = (input, _path, _exceptionable = true) => [undefined === input.fetchPrivateParams || "boolean" === typeof input.fetchPrivateParams || $report(_exceptionable, {
583
+ path: _path + ".fetchPrivateParams",
584
+ expected: "(boolean | undefined)",
585
+ value: input.fetchPrivateParams
586
+ })].every(flag => flag);
587
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $report(true, {
588
+ path: _path + "",
589
+ expected: "GetBadgeBalanceByAddressPayload",
590
+ value: input
591
+ })) && $vo0(input, _path + "", true) || $report(true, {
592
+ path: _path + "",
593
+ expected: "GetBadgeBalanceByAddressPayload",
594
+ value: input
595
+ });
596
+ })(input, "$input", true);
597
+ }
598
+ const success = 0 === errors.length;
599
+ return {
600
+ success,
601
+ errors,
602
+ data: success ? input : undefined
603
+ };
604
+ })(body ?? {});
605
+ if (!validateRes.success) {
606
+ throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
607
+ }
270
608
  api.assertPositiveInteger(collectionId);
271
609
  const response = await api.axios.post(`${api.BACKEND_URL}${routes_1.BitBadgesApiRoutes.GetBadgeBalanceByAddressRoute(collectionId, cosmosAddress)}`, body);
272
610
  return new collections_1.GetBadgeBalanceByAddressSuccessResponse(response.data).convert(api.ConvertFunction);
@@ -478,6 +816,36 @@ class BitBadgesCollection extends docs_1.CollectionDoc {
478
816
  }
479
817
  static async RefreshMetadata(api, collectionId, body) {
480
818
  try {
819
+ const validateRes = (input => {
820
+ const errors = [];
821
+ const __is = input => {
822
+ return "object" === typeof input && null !== input && true;
823
+ };
824
+ if (false === __is(input)) {
825
+ const $report = typia_1.default.validate.report(errors);
826
+ ((input, _path, _exceptionable = true) => {
827
+ const $vo0 = (input, _path, _exceptionable = true) => true;
828
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $report(true, {
829
+ path: _path + "",
830
+ expected: "RefreshMetadataPayload",
831
+ value: input
832
+ })) && $vo0(input, _path + "", true) || $report(true, {
833
+ path: _path + "",
834
+ expected: "RefreshMetadataPayload",
835
+ value: input
836
+ });
837
+ })(input, "$input", true);
838
+ }
839
+ const success = 0 === errors.length;
840
+ return {
841
+ success,
842
+ errors,
843
+ data: success ? input : undefined
844
+ };
845
+ })(body ?? {});
846
+ if (!validateRes.success) {
847
+ throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
848
+ }
481
849
  api.assertPositiveInteger(collectionId);
482
850
  const response = await api.axios.post(`${api.BACKEND_URL}${routes_1.BitBadgesApiRoutes.RefreshMetadataRoute(collectionId)}`, body);
483
851
  return new collections_1.RefreshMetadataSuccessResponse(response.data);
@@ -492,6 +860,45 @@ class BitBadgesCollection extends docs_1.CollectionDoc {
492
860
  }
493
861
  static async GetBadgeActivity(api, collectionId, badgeId, body) {
494
862
  try {
863
+ const validateRes = (input => {
864
+ const errors = [];
865
+ const __is = input => {
866
+ const $io0 = input => (undefined === input.bookmark || "string" === typeof input.bookmark) && (undefined === input.cosmosAddress || "string" === typeof input.cosmosAddress);
867
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
868
+ };
869
+ if (false === __is(input)) {
870
+ const $report = typia_1.default.validate.report(errors);
871
+ ((input, _path, _exceptionable = true) => {
872
+ const $vo0 = (input, _path, _exceptionable = true) => [undefined === input.bookmark || "string" === typeof input.bookmark || $report(_exceptionable, {
873
+ path: _path + ".bookmark",
874
+ expected: "(string | undefined)",
875
+ value: input.bookmark
876
+ }), undefined === input.cosmosAddress || "string" === typeof input.cosmosAddress || $report(_exceptionable, {
877
+ path: _path + ".cosmosAddress",
878
+ expected: "(string | undefined)",
879
+ value: input.cosmosAddress
880
+ })].every(flag => flag);
881
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $report(true, {
882
+ path: _path + "",
883
+ expected: "GetBadgeActivityPayload",
884
+ value: input
885
+ })) && $vo0(input, _path + "", true) || $report(true, {
886
+ path: _path + "",
887
+ expected: "GetBadgeActivityPayload",
888
+ value: input
889
+ });
890
+ })(input, "$input", true);
891
+ }
892
+ const success = 0 === errors.length;
893
+ return {
894
+ success,
895
+ errors,
896
+ data: success ? input : undefined
897
+ };
898
+ })(body ?? {});
899
+ if (!validateRes.success) {
900
+ throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
901
+ }
495
902
  api.assertPositiveInteger(collectionId);
496
903
  api.assertPositiveInteger(badgeId);
497
904
  const response = await api.axios.post(`${api.BACKEND_URL}${routes_1.BitBadgesApiRoutes.GetBadgeActivityRoute(collectionId, badgeId)}`, body);
@@ -507,6 +914,41 @@ class BitBadgesCollection extends docs_1.CollectionDoc {
507
914
  }
508
915
  static async GetOwnersForBadge(api, collectionId, badgeId, body) {
509
916
  try {
917
+ const validateRes = (input => {
918
+ const errors = [];
919
+ const __is = input => {
920
+ const $io0 = input => undefined === input.bookmark || "string" === typeof input.bookmark;
921
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
922
+ };
923
+ if (false === __is(input)) {
924
+ const $report = typia_1.default.validate.report(errors);
925
+ ((input, _path, _exceptionable = true) => {
926
+ const $vo0 = (input, _path, _exceptionable = true) => [undefined === input.bookmark || "string" === typeof input.bookmark || $report(_exceptionable, {
927
+ path: _path + ".bookmark",
928
+ expected: "(string | undefined)",
929
+ value: input.bookmark
930
+ })].every(flag => flag);
931
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $report(true, {
932
+ path: _path + "",
933
+ expected: "GetOwnersForBadgePayload",
934
+ value: input
935
+ })) && $vo0(input, _path + "", true) || $report(true, {
936
+ path: _path + "",
937
+ expected: "GetOwnersForBadgePayload",
938
+ value: input
939
+ });
940
+ })(input, "$input", true);
941
+ }
942
+ const success = 0 === errors.length;
943
+ return {
944
+ success,
945
+ errors,
946
+ data: success ? input : undefined
947
+ };
948
+ })(body ?? {});
949
+ if (!validateRes.success) {
950
+ throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
951
+ }
510
952
  api.assertPositiveInteger(collectionId);
511
953
  api.assertPositiveInteger(badgeId);
512
954
  const response = await api.axios.post(`${api.BACKEND_URL}${routes_1.BitBadgesApiRoutes.GetOwnersForBadgeRoute(collectionId, badgeId)}`, body);
@@ -522,6 +964,121 @@ class BitBadgesCollection extends docs_1.CollectionDoc {
522
964
  }
523
965
  static async FilterBadgesInCollection(api, collectionId, body) {
524
966
  try {
967
+ const validateRes = (input => {
968
+ const errors = [];
969
+ const __is = input => {
970
+ const $io0 = input => (undefined === input.badgeIds || Array.isArray(input.badgeIds) && input.badgeIds.every(elem => "object" === typeof elem && null !== elem && $io1(elem))) && (undefined === input.categories || Array.isArray(input.categories) && input.categories.every(elem => "string" === typeof elem)) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.mostViewed || "daily" === input.mostViewed || "allTime" === input.mostViewed || "weekly" === input.mostViewed || "monthly" === input.mostViewed || "yearly" === input.mostViewed) && (undefined === input.bookmark || "string" === typeof input.bookmark) && (undefined === input.attributes || Array.isArray(input.attributes) && input.attributes.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
971
+ const $io1 = input => ("string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start) && ("string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end);
972
+ const $io2 = input => "string" === typeof input.name && ("string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value);
973
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
974
+ };
975
+ if (false === __is(input)) {
976
+ const $report = typia_1.default.validate.report(errors);
977
+ ((input, _path, _exceptionable = true) => {
978
+ const $vo0 = (input, _path, _exceptionable = true) => [undefined === input.badgeIds || (Array.isArray(input.badgeIds) || $report(_exceptionable, {
979
+ path: _path + ".badgeIds",
980
+ expected: "(Array<iUintRange<NumberType>> | undefined)",
981
+ value: input.badgeIds
982
+ })) && input.badgeIds.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
983
+ path: _path + ".badgeIds[" + _index1 + "]",
984
+ expected: "iUintRange<NumberType>",
985
+ value: elem
986
+ })) && $vo1(elem, _path + ".badgeIds[" + _index1 + "]", true && _exceptionable) || $report(_exceptionable, {
987
+ path: _path + ".badgeIds[" + _index1 + "]",
988
+ expected: "iUintRange<NumberType>",
989
+ value: elem
990
+ })).every(flag => flag) || $report(_exceptionable, {
991
+ path: _path + ".badgeIds",
992
+ expected: "(Array<iUintRange<NumberType>> | undefined)",
993
+ value: input.badgeIds
994
+ }), undefined === input.categories || (Array.isArray(input.categories) || $report(_exceptionable, {
995
+ path: _path + ".categories",
996
+ expected: "(Array<string> | undefined)",
997
+ value: input.categories
998
+ })) && input.categories.map((elem, _index2) => "string" === typeof elem || $report(_exceptionable, {
999
+ path: _path + ".categories[" + _index2 + "]",
1000
+ expected: "string",
1001
+ value: elem
1002
+ })).every(flag => flag) || $report(_exceptionable, {
1003
+ path: _path + ".categories",
1004
+ expected: "(Array<string> | undefined)",
1005
+ value: input.categories
1006
+ }), undefined === input.tags || (Array.isArray(input.tags) || $report(_exceptionable, {
1007
+ path: _path + ".tags",
1008
+ expected: "(Array<string> | undefined)",
1009
+ value: input.tags
1010
+ })) && input.tags.map((elem, _index3) => "string" === typeof elem || $report(_exceptionable, {
1011
+ path: _path + ".tags[" + _index3 + "]",
1012
+ expected: "string",
1013
+ value: elem
1014
+ })).every(flag => flag) || $report(_exceptionable, {
1015
+ path: _path + ".tags",
1016
+ expected: "(Array<string> | undefined)",
1017
+ value: input.tags
1018
+ }), undefined === input.mostViewed || "daily" === input.mostViewed || "allTime" === input.mostViewed || "weekly" === input.mostViewed || "monthly" === input.mostViewed || "yearly" === input.mostViewed || $report(_exceptionable, {
1019
+ path: _path + ".mostViewed",
1020
+ expected: "(\"allTime\" | \"daily\" | \"monthly\" | \"weekly\" | \"yearly\" | undefined)",
1021
+ value: input.mostViewed
1022
+ }), undefined === input.bookmark || "string" === typeof input.bookmark || $report(_exceptionable, {
1023
+ path: _path + ".bookmark",
1024
+ expected: "(string | undefined)",
1025
+ value: input.bookmark
1026
+ }), undefined === input.attributes || (Array.isArray(input.attributes) || $report(_exceptionable, {
1027
+ path: _path + ".attributes",
1028
+ expected: "(Array<__type> | undefined)",
1029
+ value: input.attributes
1030
+ })) && input.attributes.map((elem, _index4) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
1031
+ path: _path + ".attributes[" + _index4 + "]",
1032
+ expected: "__type",
1033
+ value: elem
1034
+ })) && $vo2(elem, _path + ".attributes[" + _index4 + "]", true && _exceptionable) || $report(_exceptionable, {
1035
+ path: _path + ".attributes[" + _index4 + "]",
1036
+ expected: "__type",
1037
+ value: elem
1038
+ })).every(flag => flag) || $report(_exceptionable, {
1039
+ path: _path + ".attributes",
1040
+ expected: "(Array<__type> | undefined)",
1041
+ value: input.attributes
1042
+ })].every(flag => flag);
1043
+ const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start || $report(_exceptionable, {
1044
+ path: _path + ".start",
1045
+ expected: "(bigint | number | string)",
1046
+ value: input.start
1047
+ }), "string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end || $report(_exceptionable, {
1048
+ path: _path + ".end",
1049
+ expected: "(bigint | number | string)",
1050
+ value: input.end
1051
+ })].every(flag => flag);
1052
+ const $vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || $report(_exceptionable, {
1053
+ path: _path + ".name",
1054
+ expected: "string",
1055
+ value: input.name
1056
+ }), "string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value || $report(_exceptionable, {
1057
+ path: _path + ".value",
1058
+ expected: "(boolean | number | string)",
1059
+ value: input.value
1060
+ })].every(flag => flag);
1061
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $report(true, {
1062
+ path: _path + "",
1063
+ expected: "FilterBadgesInCollectionPayload",
1064
+ value: input
1065
+ })) && $vo0(input, _path + "", true) || $report(true, {
1066
+ path: _path + "",
1067
+ expected: "FilterBadgesInCollectionPayload",
1068
+ value: input
1069
+ });
1070
+ })(input, "$input", true);
1071
+ }
1072
+ const success = 0 === errors.length;
1073
+ return {
1074
+ success,
1075
+ errors,
1076
+ data: success ? input : undefined
1077
+ };
1078
+ })(body ?? {});
1079
+ if (!validateRes.success) {
1080
+ throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
1081
+ }
525
1082
  const response = await api.axios.post(`${api.BACKEND_URL}${routes_1.BitBadgesApiRoutes.FilterBadgesInCollectionRoute(collectionId)}`, body);
526
1083
  return new collections_1.FilterBadgesInCollectionSuccessResponse(response.data).convert(api.ConvertFunction);
527
1084
  }