bitbadgesjs-sdk 0.3.64 → 0.3.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-indexer/BitBadgesApi.d.ts +4 -6
- package/dist/api-indexer/BitBadgesApi.d.ts.map +1 -1
- package/dist/api-indexer/BitBadgesApi.js +209 -324
- package/dist/api-indexer/BitBadgesApi.js.map +1 -1
- package/dist/api-indexer/BitBadgesUserInfo.js +2 -2
- package/dist/api-indexer/docs/docs.d.ts +3 -0
- package/dist/api-indexer/docs/docs.d.ts.map +1 -1
- package/dist/api-indexer/docs/docs.js +6 -0
- package/dist/api-indexer/docs/docs.js.map +1 -1
- package/dist/api-indexer/docs/interfaces.d.ts +3 -0
- package/dist/api-indexer/docs/interfaces.d.ts.map +1 -1
- package/dist/api-indexer/requests/requests.d.ts +53 -44
- package/dist/api-indexer/requests/requests.d.ts.map +1 -1
- package/dist/api-indexer/requests/requests.js +38 -20
- package/dist/api-indexer/requests/requests.js.map +1 -1
- package/dist/api-indexer/requests/routes.d.ts +1 -3
- package/dist/api-indexer/requests/routes.d.ts.map +1 -1
- package/dist/api-indexer/requests/routes.js +2 -4
- package/dist/api-indexer/requests/routes.js.map +1 -1
- package/dist/chain-drivers/verifySig.d.ts +1 -1
- package/dist/core/blockin.d.ts +1 -2
- package/dist/core/blockin.d.ts.map +1 -1
- package/dist/core/blockin.js +1 -5
- package/dist/core/blockin.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.BitBadgesAdminAPI = exports.BitBadgesAPI = void 0;
|
|
7
7
|
const joi_1 = __importDefault(require("joi"));
|
|
8
8
|
const BitBadgesCollection_1 = require("./BitBadgesCollection");
|
|
9
|
+
const typia_1 = __importDefault(require("typia"));
|
|
9
10
|
const BitBadgesAddressList_1 = require("./BitBadgesAddressList");
|
|
10
11
|
const BitBadgesUserInfo_1 = require("./BitBadgesUserInfo");
|
|
11
12
|
const base_1 = require("./base");
|
|
12
|
-
const maps_1 = require("./requests/maps");
|
|
13
13
|
const collections_1 = require("./requests/collections");
|
|
14
|
+
const maps_1 = require("./requests/maps");
|
|
14
15
|
const requests_1 = require("./requests/requests");
|
|
15
16
|
const routes_1 = require("./requests/routes");
|
|
16
|
-
const typia_1 = __importDefault(require("typia"));
|
|
17
17
|
class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
18
18
|
constructor(apiDetails) {
|
|
19
19
|
super(apiDetails);
|
|
@@ -1217,12 +1217,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1217
1217
|
async deleteAddressLists(payload) {
|
|
1218
1218
|
return await BitBadgesAddressList_1.BitBadgesAddressList.DeleteAddressList(this, payload);
|
|
1219
1219
|
}
|
|
1220
|
-
async
|
|
1220
|
+
async exchangeSIWBBAuthorizationCode(payload) {
|
|
1221
1221
|
try {
|
|
1222
1222
|
const validateRes = (input => {
|
|
1223
1223
|
const errors = [];
|
|
1224
1224
|
const __is = input => {
|
|
1225
|
-
const $io0 = input => "string" === typeof input.code && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && $io1(input.options)) && (undefined === input.client_secret || "string" === typeof input.client_secret) && (undefined === input.client_id || "string" === typeof input.client_id) && (undefined === input.redirect_uri || "string" === typeof input.redirect_uri) && (undefined === input.grant_type || "authorization_code" === input.grant_type);
|
|
1225
|
+
const $io0 = input => (undefined === input.code || "string" === typeof input.code) && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && $io1(input.options)) && (undefined === input.client_secret || "string" === typeof input.client_secret) && (undefined === input.client_id || "string" === typeof input.client_id) && (undefined === input.redirect_uri || "string" === typeof input.redirect_uri) && (undefined === input.grant_type || "authorization_code" === input.grant_type || "refresh_token" === input.grant_type) && (undefined === input.refresh_token || "string" === typeof input.refresh_token);
|
|
1226
1226
|
const $io1 = input => (undefined === input.ownershipRequirements || "object" === typeof input.ownershipRequirements && null !== input.ownershipRequirements && $iu0(input.ownershipRequirements)) && (undefined === input.otherSignIns || Array.isArray(input.otherSignIns) && input.otherSignIns.every(elem => "discord" === elem || "github" === elem || "google" === elem || "twitter" === elem)) && (undefined === input.issuedAtTimeWindowMs || "number" === typeof input.issuedAtTimeWindowMs) && (undefined === input.skipAssetVerification || "boolean" === typeof input.skipAssetVerification);
|
|
1227
1227
|
const $io2 = input => Array.isArray(input.$and) && input.$and.every(elem => "object" === typeof elem && null !== elem && $iu0(elem));
|
|
1228
1228
|
const $io3 = input => Array.isArray(input.$or) && input.$or.every(elem => "object" === typeof elem && null !== elem && $iu0(elem));
|
|
@@ -1240,14 +1240,14 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1240
1240
|
else
|
|
1241
1241
|
return false;
|
|
1242
1242
|
})();
|
|
1243
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
1243
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
1244
1244
|
};
|
|
1245
1245
|
if (false === __is(input)) {
|
|
1246
1246
|
const $report = typia_1.default.validate.report(errors);
|
|
1247
1247
|
((input, _path, _exceptionable = true) => {
|
|
1248
|
-
const $vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.code || $report(_exceptionable, {
|
|
1248
|
+
const $vo0 = (input, _path, _exceptionable = true) => [undefined === input.code || "string" === typeof input.code || $report(_exceptionable, {
|
|
1249
1249
|
path: _path + ".code",
|
|
1250
|
-
expected: "string",
|
|
1250
|
+
expected: "(string | undefined)",
|
|
1251
1251
|
value: input.code
|
|
1252
1252
|
}), undefined === input.options || ("object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) || $report(_exceptionable, {
|
|
1253
1253
|
path: _path + ".options",
|
|
@@ -1269,10 +1269,14 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1269
1269
|
path: _path + ".redirect_uri",
|
|
1270
1270
|
expected: "(string | undefined)",
|
|
1271
1271
|
value: input.redirect_uri
|
|
1272
|
-
}), undefined === input.grant_type || "authorization_code" === input.grant_type || $report(_exceptionable, {
|
|
1272
|
+
}), undefined === input.grant_type || "authorization_code" === input.grant_type || "refresh_token" === input.grant_type || $report(_exceptionable, {
|
|
1273
1273
|
path: _path + ".grant_type",
|
|
1274
|
-
expected: "(\"authorization_code\" | undefined)",
|
|
1274
|
+
expected: "(\"authorization_code\" | \"refresh_token\" | undefined)",
|
|
1275
1275
|
value: input.grant_type
|
|
1276
|
+
}), undefined === input.refresh_token || "string" === typeof input.refresh_token || $report(_exceptionable, {
|
|
1277
|
+
path: _path + ".refresh_token",
|
|
1278
|
+
expected: "(string | undefined)",
|
|
1279
|
+
value: input.refresh_token
|
|
1276
1280
|
})].every(flag => flag);
|
|
1277
1281
|
const $vo1 = (input, _path, _exceptionable = true) => [undefined === input.ownershipRequirements || ("object" === typeof input.ownershipRequirements && null !== input.ownershipRequirements || $report(_exceptionable, {
|
|
1278
1282
|
path: _path + ".ownershipRequirements",
|
|
@@ -1451,13 +1455,13 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1451
1455
|
value: input
|
|
1452
1456
|
});
|
|
1453
1457
|
})();
|
|
1454
|
-
return ("object" === typeof input && null !== input || $report(true, {
|
|
1458
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $report(true, {
|
|
1455
1459
|
path: _path + "",
|
|
1456
|
-
expected: "
|
|
1460
|
+
expected: "ExchangeSIWBBAuthorizationCodePayload",
|
|
1457
1461
|
value: input
|
|
1458
1462
|
})) && $vo0(input, _path + "", true) || $report(true, {
|
|
1459
1463
|
path: _path + "",
|
|
1460
|
-
expected: "
|
|
1464
|
+
expected: "ExchangeSIWBBAuthorizationCodePayload",
|
|
1461
1465
|
value: input
|
|
1462
1466
|
});
|
|
1463
1467
|
})(input, "$input", true);
|
|
@@ -1472,8 +1476,8 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1472
1476
|
if (!validateRes.success) {
|
|
1473
1477
|
throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
|
|
1474
1478
|
}
|
|
1475
|
-
const response = await this.axios.post(`${this.BACKEND_URL}${routes_1.BitBadgesApiRoutes.
|
|
1476
|
-
return new requests_1.
|
|
1479
|
+
const response = await this.axios.post(`${this.BACKEND_URL}${routes_1.BitBadgesApiRoutes.ExchangeSIWBBAuthorizationCodesRoute()}`, payload);
|
|
1480
|
+
return new requests_1.ExchangeSIWBBAuthorizationCodeSuccessResponse(response.data).convert(this.ConvertFunction);
|
|
1477
1481
|
}
|
|
1478
1482
|
catch (error) {
|
|
1479
1483
|
await this.handleApiError(error);
|
|
@@ -1502,11 +1506,11 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1502
1506
|
})].every(flag => flag);
|
|
1503
1507
|
return ("object" === typeof input && null !== input || $report(true, {
|
|
1504
1508
|
path: _path + "",
|
|
1505
|
-
expected: "
|
|
1509
|
+
expected: "GetSIWBBRequestsForDeveloperAppPayload",
|
|
1506
1510
|
value: input
|
|
1507
1511
|
})) && $vo0(input, _path + "", true) || $report(true, {
|
|
1508
1512
|
path: _path + "",
|
|
1509
|
-
expected: "
|
|
1513
|
+
expected: "GetSIWBBRequestsForDeveloperAppPayload",
|
|
1510
1514
|
value: input
|
|
1511
1515
|
});
|
|
1512
1516
|
})(input, "$input", true);
|
|
@@ -1522,7 +1526,7 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1522
1526
|
throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
|
|
1523
1527
|
}
|
|
1524
1528
|
const response = await this.axios.post(`${this.BACKEND_URL}${routes_1.BitBadgesApiRoutes.GetSIWBBRequestsForDeveloperAppRoute()}`, payload);
|
|
1525
|
-
return new requests_1.
|
|
1529
|
+
return new requests_1.GetSIWBBRequestsForDeveloperAppSuccessResponse(response.data).convert(this.ConvertFunction);
|
|
1526
1530
|
}
|
|
1527
1531
|
catch (error) {
|
|
1528
1532
|
await this.handleApiError(error);
|
|
@@ -1534,25 +1538,27 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1534
1538
|
const validateRes = (input => {
|
|
1535
1539
|
const errors = [];
|
|
1536
1540
|
const __is = input => {
|
|
1537
|
-
const $io0 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.image || "string" === typeof input.image) && (undefined === input.ownershipRequirements || "object" === typeof input.ownershipRequirements && null !== input.ownershipRequirements && $iu0(input.ownershipRequirements)) && (undefined === input.attestationsPresentations || Array.isArray(input.attestationsPresentations) && input.attestationsPresentations.every(elem => "object" === typeof elem && null !== elem && $
|
|
1538
|
-
const $io1 = input =>
|
|
1539
|
-
const $io2 = input =>
|
|
1540
|
-
const $io3 = input => Array.isArray(input
|
|
1541
|
-
const $io4 = input =>
|
|
1542
|
-
const $io5 = input => (
|
|
1543
|
-
const $io6 = input =>
|
|
1544
|
-
const $io7 = input => (
|
|
1545
|
-
const $io8 = input =>
|
|
1546
|
-
const $io9 = input => "string" === typeof input.
|
|
1547
|
-
const $io10 = input => "string" === typeof input.
|
|
1548
|
-
const $io11 = input =>
|
|
1541
|
+
const $io0 = input => "string" === typeof input.response_type && (Array.isArray(input.scopes) && input.scopes.every(elem => "object" === typeof elem && null !== elem && $io1(elem))) && (undefined === input.name || "string" === typeof input.name) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.image || "string" === typeof input.image) && (undefined === input.ownershipRequirements || "object" === typeof input.ownershipRequirements && null !== input.ownershipRequirements && $iu0(input.ownershipRequirements)) && (undefined === input.attestationsPresentations || Array.isArray(input.attestationsPresentations) && input.attestationsPresentations.every(elem => "object" === typeof elem && null !== elem && $io9(elem))) && "string" === typeof input.client_id && (undefined === input.otherSignIns || Array.isArray(input.otherSignIns) && input.otherSignIns.every(elem => "discord" === elem || "github" === elem || "google" === elem || "twitter" === elem)) && (undefined === input.redirect_uri || "string" === typeof input.redirect_uri) && (undefined === input.state || "string" === typeof input.state);
|
|
1542
|
+
const $io1 = input => "string" === typeof input.scopeName && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && $io2(input.options));
|
|
1543
|
+
const $io2 = input => true;
|
|
1544
|
+
const $io3 = input => Array.isArray(input.$and) && input.$and.every(elem => "object" === typeof elem && null !== elem && $iu0(elem));
|
|
1545
|
+
const $io4 = input => Array.isArray(input.$or) && input.$or.every(elem => "object" === typeof elem && null !== elem && $iu0(elem));
|
|
1546
|
+
const $io5 = input => Array.isArray(input.assets) && input.assets.every(elem => "object" === typeof elem && null !== elem && $io6(elem)) && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && $io8(input.options));
|
|
1547
|
+
const $io6 = input => "string" === typeof input.chain && ("string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId) && (Array.isArray(input.assetIds) && input.assetIds.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io7(elem)))) && (Array.isArray(input.ownershipTimes) && input.ownershipTimes.every(elem => "object" === typeof elem && null !== elem && $io7(elem))) && ("object" === typeof input.mustOwnAmounts && null !== input.mustOwnAmounts && $io7(input.mustOwnAmounts)) && (undefined === input.additionalCriteria || "string" === typeof input.additionalCriteria);
|
|
1548
|
+
const $io7 = 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);
|
|
1549
|
+
const $io8 = input => undefined === input.numMatchesForVerification || "string" === typeof input.numMatchesForVerification || "number" === typeof input.numMatchesForVerification || "bigint" === typeof input.numMatchesForVerification;
|
|
1550
|
+
const $io9 = input => (undefined === input.entropies || Array.isArray(input.entropies) && input.entropies.every(elem => "string" === typeof elem)) && (undefined === input.updateHistory || Array.isArray(input.updateHistory) && input.updateHistory.every(elem => "object" === typeof elem && null !== elem && $io10(elem))) && ("plaintext" === input.messageFormat || "json" === input.messageFormat) && "string" === typeof input.createdBy && ("string" === typeof input.createdAt || "number" === typeof input.createdAt || "bigint" === typeof input.createdAt) && ("object" === typeof input.proofOfIssuance && null !== input.proofOfIssuance && $io11(input.proofOfIssuance)) && ("bbs" === input.scheme || "standard" === input.scheme) && (Array.isArray(input.attestationMessages) && input.attestationMessages.every(elem => "string" === typeof elem)) && ("object" === typeof input.dataIntegrityProof && null !== input.dataIntegrityProof && $io12(input.dataIntegrityProof)) && "string" === typeof input.name && "string" === typeof input.image && "string" === typeof input.description && (undefined === input.anchors || Array.isArray(input.anchors) && input.anchors.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io13(elem)));
|
|
1551
|
+
const $io10 = input => "string" === typeof input.txHash && ("string" === typeof input.block || "number" === typeof input.block || "bigint" === typeof input.block) && ("string" === typeof input.blockTimestamp || "number" === typeof input.blockTimestamp || "bigint" === typeof input.blockTimestamp) && ("string" === typeof input.timestamp || "number" === typeof input.timestamp || "bigint" === typeof input.timestamp);
|
|
1552
|
+
const $io11 = input => "string" === typeof input.message && "string" === typeof input.signature && "string" === typeof input.signer && (undefined === input.publicKey || "string" === typeof input.publicKey);
|
|
1553
|
+
const $io12 = input => "string" === typeof input.signature && "string" === typeof input.signer && (undefined === input.publicKey || "string" === typeof input.publicKey);
|
|
1554
|
+
const $io13 = input => (undefined === input.txHash || "string" === typeof input.txHash) && (undefined === input.message || "string" === typeof input.message);
|
|
1549
1555
|
const $iu0 = input => (() => {
|
|
1550
1556
|
if (undefined !== input.$and)
|
|
1551
|
-
return $
|
|
1557
|
+
return $io3(input);
|
|
1552
1558
|
else if (undefined !== input.$or)
|
|
1553
|
-
return $
|
|
1559
|
+
return $io4(input);
|
|
1554
1560
|
else if (undefined !== input.assets)
|
|
1555
|
-
return $
|
|
1561
|
+
return $io5(input);
|
|
1556
1562
|
else
|
|
1557
1563
|
return false;
|
|
1558
1564
|
})();
|
|
@@ -1561,7 +1567,27 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1561
1567
|
if (false === __is(input)) {
|
|
1562
1568
|
const $report = typia_1.default.validate.report(errors);
|
|
1563
1569
|
((input, _path, _exceptionable = true) => {
|
|
1564
|
-
const $vo0 = (input, _path, _exceptionable = true) => [
|
|
1570
|
+
const $vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.response_type || $report(_exceptionable, {
|
|
1571
|
+
path: _path + ".response_type",
|
|
1572
|
+
expected: "string",
|
|
1573
|
+
value: input.response_type
|
|
1574
|
+
}), (Array.isArray(input.scopes) || $report(_exceptionable, {
|
|
1575
|
+
path: _path + ".scopes",
|
|
1576
|
+
expected: "Array<OAuthScopeDetails>",
|
|
1577
|
+
value: input.scopes
|
|
1578
|
+
})) && input.scopes.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
1579
|
+
path: _path + ".scopes[" + _index1 + "]",
|
|
1580
|
+
expected: "OAuthScopeDetails",
|
|
1581
|
+
value: elem
|
|
1582
|
+
})) && $vo1(elem, _path + ".scopes[" + _index1 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
1583
|
+
path: _path + ".scopes[" + _index1 + "]",
|
|
1584
|
+
expected: "OAuthScopeDetails",
|
|
1585
|
+
value: elem
|
|
1586
|
+
})).every(flag => flag) || $report(_exceptionable, {
|
|
1587
|
+
path: _path + ".scopes",
|
|
1588
|
+
expected: "Array<OAuthScopeDetails>",
|
|
1589
|
+
value: input.scopes
|
|
1590
|
+
}), undefined === input.name || "string" === typeof input.name || $report(_exceptionable, {
|
|
1565
1591
|
path: _path + ".name",
|
|
1566
1592
|
expected: "(string | undefined)",
|
|
1567
1593
|
value: input.name
|
|
@@ -1585,53 +1611,67 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1585
1611
|
path: _path + ".attestationsPresentations",
|
|
1586
1612
|
expected: "(Array<iAttestationsProof<NumberType>> | undefined)",
|
|
1587
1613
|
value: input.attestationsPresentations
|
|
1588
|
-
})) && input.attestationsPresentations.map((elem,
|
|
1589
|
-
path: _path + ".attestationsPresentations[" +
|
|
1614
|
+
})) && input.attestationsPresentations.map((elem, _index2) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
1615
|
+
path: _path + ".attestationsPresentations[" + _index2 + "]",
|
|
1590
1616
|
expected: "iAttestationsProof<NumberType>",
|
|
1591
1617
|
value: elem
|
|
1592
|
-
})) && $
|
|
1593
|
-
path: _path + ".attestationsPresentations[" +
|
|
1618
|
+
})) && $vo9(elem, _path + ".attestationsPresentations[" + _index2 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
1619
|
+
path: _path + ".attestationsPresentations[" + _index2 + "]",
|
|
1594
1620
|
expected: "iAttestationsProof<NumberType>",
|
|
1595
1621
|
value: elem
|
|
1596
1622
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
1597
1623
|
path: _path + ".attestationsPresentations",
|
|
1598
1624
|
expected: "(Array<iAttestationsProof<NumberType>> | undefined)",
|
|
1599
1625
|
value: input.attestationsPresentations
|
|
1600
|
-
}), "string" === typeof input.
|
|
1601
|
-
path: _path + ".
|
|
1626
|
+
}), "string" === typeof input.client_id || $report(_exceptionable, {
|
|
1627
|
+
path: _path + ".client_id",
|
|
1602
1628
|
expected: "string",
|
|
1603
|
-
value: input.
|
|
1629
|
+
value: input.client_id
|
|
1604
1630
|
}), undefined === input.otherSignIns || (Array.isArray(input.otherSignIns) || $report(_exceptionable, {
|
|
1605
1631
|
path: _path + ".otherSignIns",
|
|
1606
1632
|
expected: "(Array<\"discord\" | \"github\" | \"google\" | \"twitter\"> | undefined)",
|
|
1607
1633
|
value: input.otherSignIns
|
|
1608
|
-
})) && input.otherSignIns.map((elem,
|
|
1609
|
-
path: _path + ".otherSignIns[" +
|
|
1634
|
+
})) && input.otherSignIns.map((elem, _index3) => "discord" === elem || "github" === elem || "google" === elem || "twitter" === elem || $report(_exceptionable, {
|
|
1635
|
+
path: _path + ".otherSignIns[" + _index3 + "]",
|
|
1610
1636
|
expected: "(\"discord\" | \"github\" | \"google\" | \"twitter\")",
|
|
1611
1637
|
value: elem
|
|
1612
1638
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
1613
1639
|
path: _path + ".otherSignIns",
|
|
1614
1640
|
expected: "(Array<\"discord\" | \"github\" | \"google\" | \"twitter\"> | undefined)",
|
|
1615
1641
|
value: input.otherSignIns
|
|
1616
|
-
}), undefined === input.
|
|
1617
|
-
path: _path + ".
|
|
1642
|
+
}), undefined === input.redirect_uri || "string" === typeof input.redirect_uri || $report(_exceptionable, {
|
|
1643
|
+
path: _path + ".redirect_uri",
|
|
1618
1644
|
expected: "(string | undefined)",
|
|
1619
|
-
value: input.
|
|
1645
|
+
value: input.redirect_uri
|
|
1620
1646
|
}), undefined === input.state || "string" === typeof input.state || $report(_exceptionable, {
|
|
1621
1647
|
path: _path + ".state",
|
|
1622
1648
|
expected: "(string | undefined)",
|
|
1623
1649
|
value: input.state
|
|
1624
1650
|
})].every(flag => flag);
|
|
1625
|
-
const $vo1 = (input, _path, _exceptionable = true) => [
|
|
1651
|
+
const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.scopeName || $report(_exceptionable, {
|
|
1652
|
+
path: _path + ".scopeName",
|
|
1653
|
+
expected: "string",
|
|
1654
|
+
value: input.scopeName
|
|
1655
|
+
}), undefined === input.options || ("object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) || $report(_exceptionable, {
|
|
1656
|
+
path: _path + ".options",
|
|
1657
|
+
expected: "(object | undefined)",
|
|
1658
|
+
value: input.options
|
|
1659
|
+
})) && $vo2(input.options, _path + ".options", true && _exceptionable) || $report(_exceptionable, {
|
|
1660
|
+
path: _path + ".options",
|
|
1661
|
+
expected: "(object | undefined)",
|
|
1662
|
+
value: input.options
|
|
1663
|
+
})].every(flag => flag);
|
|
1664
|
+
const $vo2 = (input, _path, _exceptionable = true) => true;
|
|
1665
|
+
const $vo3 = (input, _path, _exceptionable = true) => [(Array.isArray(input.$and) || $report(_exceptionable, {
|
|
1626
1666
|
path: _path + ".$and",
|
|
1627
1667
|
expected: "Array<AssetConditionGroup<NumberType>>",
|
|
1628
1668
|
value: input.$and
|
|
1629
|
-
})) && input.$and.map((elem,
|
|
1630
|
-
path: _path + ".$and[" +
|
|
1669
|
+
})) && input.$and.map((elem, _index4) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
1670
|
+
path: _path + ".$and[" + _index4 + "]",
|
|
1631
1671
|
expected: "(AndGroup<NumberType> | OrGroup<NumberType> | OwnershipRequirements<NumberType>)",
|
|
1632
1672
|
value: elem
|
|
1633
|
-
})) && $vu0(elem, _path + ".$and[" +
|
|
1634
|
-
path: _path + ".$and[" +
|
|
1673
|
+
})) && $vu0(elem, _path + ".$and[" + _index4 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
1674
|
+
path: _path + ".$and[" + _index4 + "]",
|
|
1635
1675
|
expected: "(AndGroup<NumberType> | OrGroup<NumberType> | OwnershipRequirements<NumberType>)",
|
|
1636
1676
|
value: elem
|
|
1637
1677
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -1639,16 +1679,16 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1639
1679
|
expected: "Array<AssetConditionGroup<NumberType>>",
|
|
1640
1680
|
value: input.$and
|
|
1641
1681
|
})].every(flag => flag);
|
|
1642
|
-
const $
|
|
1682
|
+
const $vo4 = (input, _path, _exceptionable = true) => [(Array.isArray(input.$or) || $report(_exceptionable, {
|
|
1643
1683
|
path: _path + ".$or",
|
|
1644
1684
|
expected: "Array<AssetConditionGroup<NumberType>>",
|
|
1645
1685
|
value: input.$or
|
|
1646
|
-
})) && input.$or.map((elem,
|
|
1647
|
-
path: _path + ".$or[" +
|
|
1686
|
+
})) && input.$or.map((elem, _index5) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
1687
|
+
path: _path + ".$or[" + _index5 + "]",
|
|
1648
1688
|
expected: "(AndGroup<NumberType> | OrGroup<NumberType> | OwnershipRequirements<NumberType>)",
|
|
1649
1689
|
value: elem
|
|
1650
|
-
})) && $vu0(elem, _path + ".$or[" +
|
|
1651
|
-
path: _path + ".$or[" +
|
|
1690
|
+
})) && $vu0(elem, _path + ".$or[" + _index5 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
1691
|
+
path: _path + ".$or[" + _index5 + "]",
|
|
1652
1692
|
expected: "(AndGroup<NumberType> | OrGroup<NumberType> | OwnershipRequirements<NumberType>)",
|
|
1653
1693
|
value: elem
|
|
1654
1694
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -1656,16 +1696,16 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1656
1696
|
expected: "Array<AssetConditionGroup<NumberType>>",
|
|
1657
1697
|
value: input.$or
|
|
1658
1698
|
})].every(flag => flag);
|
|
1659
|
-
const $
|
|
1699
|
+
const $vo5 = (input, _path, _exceptionable = true) => [(Array.isArray(input.assets) || $report(_exceptionable, {
|
|
1660
1700
|
path: _path + ".assets",
|
|
1661
1701
|
expected: "Array<AssetDetails<NumberType>>",
|
|
1662
1702
|
value: input.assets
|
|
1663
|
-
})) && input.assets.map((elem,
|
|
1664
|
-
path: _path + ".assets[" +
|
|
1703
|
+
})) && input.assets.map((elem, _index6) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
1704
|
+
path: _path + ".assets[" + _index6 + "]",
|
|
1665
1705
|
expected: "AssetDetails<NumberType>",
|
|
1666
1706
|
value: elem
|
|
1667
|
-
})) && $
|
|
1668
|
-
path: _path + ".assets[" +
|
|
1707
|
+
})) && $vo6(elem, _path + ".assets[" + _index6 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
1708
|
+
path: _path + ".assets[" + _index6 + "]",
|
|
1669
1709
|
expected: "AssetDetails<NumberType>",
|
|
1670
1710
|
value: elem
|
|
1671
1711
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -1676,12 +1716,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1676
1716
|
path: _path + ".options",
|
|
1677
1717
|
expected: "(__type | undefined)",
|
|
1678
1718
|
value: input.options
|
|
1679
|
-
})) && $
|
|
1719
|
+
})) && $vo8(input.options, _path + ".options", true && _exceptionable) || $report(_exceptionable, {
|
|
1680
1720
|
path: _path + ".options",
|
|
1681
1721
|
expected: "(__type | undefined)",
|
|
1682
1722
|
value: input.options
|
|
1683
1723
|
})].every(flag => flag);
|
|
1684
|
-
const $
|
|
1724
|
+
const $vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.chain || $report(_exceptionable, {
|
|
1685
1725
|
path: _path + ".chain",
|
|
1686
1726
|
expected: "string",
|
|
1687
1727
|
value: input.chain
|
|
@@ -1693,20 +1733,20 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1693
1733
|
path: _path + ".assetIds",
|
|
1694
1734
|
expected: "Array<string | UintRange<NumberType>>",
|
|
1695
1735
|
value: input.assetIds
|
|
1696
|
-
})) && input.assetIds.map((elem,
|
|
1697
|
-
path: _path + ".assetIds[" +
|
|
1736
|
+
})) && input.assetIds.map((elem, _index7) => (null !== elem || $report(_exceptionable, {
|
|
1737
|
+
path: _path + ".assetIds[" + _index7 + "]",
|
|
1698
1738
|
expected: "(UintRange<NumberType> | string)",
|
|
1699
1739
|
value: elem
|
|
1700
1740
|
})) && (undefined !== elem || $report(_exceptionable, {
|
|
1701
|
-
path: _path + ".assetIds[" +
|
|
1741
|
+
path: _path + ".assetIds[" + _index7 + "]",
|
|
1702
1742
|
expected: "(UintRange<NumberType> | string)",
|
|
1703
1743
|
value: elem
|
|
1704
1744
|
})) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
1705
|
-
path: _path + ".assetIds[" +
|
|
1745
|
+
path: _path + ".assetIds[" + _index7 + "]",
|
|
1706
1746
|
expected: "(UintRange<NumberType> | string)",
|
|
1707
1747
|
value: elem
|
|
1708
|
-
})) && $
|
|
1709
|
-
path: _path + ".assetIds[" +
|
|
1748
|
+
})) && $vo7(elem, _path + ".assetIds[" + _index7 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
1749
|
+
path: _path + ".assetIds[" + _index7 + "]",
|
|
1710
1750
|
expected: "(UintRange<NumberType> | string)",
|
|
1711
1751
|
value: elem
|
|
1712
1752
|
}))).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -1717,12 +1757,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1717
1757
|
path: _path + ".ownershipTimes",
|
|
1718
1758
|
expected: "Array<UintRange<NumberType>>",
|
|
1719
1759
|
value: input.ownershipTimes
|
|
1720
|
-
})) && input.ownershipTimes.map((elem,
|
|
1721
|
-
path: _path + ".ownershipTimes[" +
|
|
1760
|
+
})) && input.ownershipTimes.map((elem, _index8) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
1761
|
+
path: _path + ".ownershipTimes[" + _index8 + "]",
|
|
1722
1762
|
expected: "UintRange<NumberType>",
|
|
1723
1763
|
value: elem
|
|
1724
|
-
})) && $
|
|
1725
|
-
path: _path + ".ownershipTimes[" +
|
|
1764
|
+
})) && $vo7(elem, _path + ".ownershipTimes[" + _index8 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
1765
|
+
path: _path + ".ownershipTimes[" + _index8 + "]",
|
|
1726
1766
|
expected: "UintRange<NumberType>",
|
|
1727
1767
|
value: elem
|
|
1728
1768
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -1733,7 +1773,7 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1733
1773
|
path: _path + ".mustOwnAmounts",
|
|
1734
1774
|
expected: "UintRange<NumberType>",
|
|
1735
1775
|
value: input.mustOwnAmounts
|
|
1736
|
-
})) && $
|
|
1776
|
+
})) && $vo7(input.mustOwnAmounts, _path + ".mustOwnAmounts", true && _exceptionable) || $report(_exceptionable, {
|
|
1737
1777
|
path: _path + ".mustOwnAmounts",
|
|
1738
1778
|
expected: "UintRange<NumberType>",
|
|
1739
1779
|
value: input.mustOwnAmounts
|
|
@@ -1742,7 +1782,7 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1742
1782
|
expected: "(string | undefined)",
|
|
1743
1783
|
value: input.additionalCriteria
|
|
1744
1784
|
})].every(flag => flag);
|
|
1745
|
-
const $
|
|
1785
|
+
const $vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start || $report(_exceptionable, {
|
|
1746
1786
|
path: _path + ".start",
|
|
1747
1787
|
expected: "(bigint | number | string)",
|
|
1748
1788
|
value: input.start
|
|
@@ -1751,17 +1791,17 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1751
1791
|
expected: "(bigint | number | string)",
|
|
1752
1792
|
value: input.end
|
|
1753
1793
|
})].every(flag => flag);
|
|
1754
|
-
const $
|
|
1794
|
+
const $vo8 = (input, _path, _exceptionable = true) => [undefined === input.numMatchesForVerification || "string" === typeof input.numMatchesForVerification || "number" === typeof input.numMatchesForVerification || "bigint" === typeof input.numMatchesForVerification || $report(_exceptionable, {
|
|
1755
1795
|
path: _path + ".numMatchesForVerification",
|
|
1756
1796
|
expected: "(bigint | number | string | undefined)",
|
|
1757
1797
|
value: input.numMatchesForVerification
|
|
1758
1798
|
})].every(flag => flag);
|
|
1759
|
-
const $
|
|
1799
|
+
const $vo9 = (input, _path, _exceptionable = true) => [undefined === input.entropies || (Array.isArray(input.entropies) || $report(_exceptionable, {
|
|
1760
1800
|
path: _path + ".entropies",
|
|
1761
1801
|
expected: "(Array<string> | undefined)",
|
|
1762
1802
|
value: input.entropies
|
|
1763
|
-
})) && input.entropies.map((elem,
|
|
1764
|
-
path: _path + ".entropies[" +
|
|
1803
|
+
})) && input.entropies.map((elem, _index9) => "string" === typeof elem || $report(_exceptionable, {
|
|
1804
|
+
path: _path + ".entropies[" + _index9 + "]",
|
|
1765
1805
|
expected: "string",
|
|
1766
1806
|
value: elem
|
|
1767
1807
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -1772,12 +1812,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1772
1812
|
path: _path + ".updateHistory",
|
|
1773
1813
|
expected: "(Array<iUpdateHistory<NumberType>> | undefined)",
|
|
1774
1814
|
value: input.updateHistory
|
|
1775
|
-
})) && input.updateHistory.map((elem,
|
|
1776
|
-
path: _path + ".updateHistory[" +
|
|
1815
|
+
})) && input.updateHistory.map((elem, _index10) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
1816
|
+
path: _path + ".updateHistory[" + _index10 + "]",
|
|
1777
1817
|
expected: "iUpdateHistory<NumberType>",
|
|
1778
1818
|
value: elem
|
|
1779
|
-
})) && $
|
|
1780
|
-
path: _path + ".updateHistory[" +
|
|
1819
|
+
})) && $vo10(elem, _path + ".updateHistory[" + _index10 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
1820
|
+
path: _path + ".updateHistory[" + _index10 + "]",
|
|
1781
1821
|
expected: "iUpdateHistory<NumberType>",
|
|
1782
1822
|
value: elem
|
|
1783
1823
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -1800,7 +1840,7 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1800
1840
|
path: _path + ".proofOfIssuance",
|
|
1801
1841
|
expected: "__type.o1",
|
|
1802
1842
|
value: input.proofOfIssuance
|
|
1803
|
-
})) && $
|
|
1843
|
+
})) && $vo11(input.proofOfIssuance, _path + ".proofOfIssuance", true && _exceptionable) || $report(_exceptionable, {
|
|
1804
1844
|
path: _path + ".proofOfIssuance",
|
|
1805
1845
|
expected: "__type.o1",
|
|
1806
1846
|
value: input.proofOfIssuance
|
|
@@ -1812,8 +1852,8 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1812
1852
|
path: _path + ".attestationMessages",
|
|
1813
1853
|
expected: "Array<string>",
|
|
1814
1854
|
value: input.attestationMessages
|
|
1815
|
-
})) && input.attestationMessages.map((elem,
|
|
1816
|
-
path: _path + ".attestationMessages[" +
|
|
1855
|
+
})) && input.attestationMessages.map((elem, _index11) => "string" === typeof elem || $report(_exceptionable, {
|
|
1856
|
+
path: _path + ".attestationMessages[" + _index11 + "]",
|
|
1817
1857
|
expected: "string",
|
|
1818
1858
|
value: elem
|
|
1819
1859
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -1824,7 +1864,7 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1824
1864
|
path: _path + ".dataIntegrityProof",
|
|
1825
1865
|
expected: "__type.o2",
|
|
1826
1866
|
value: input.dataIntegrityProof
|
|
1827
|
-
})) && $
|
|
1867
|
+
})) && $vo12(input.dataIntegrityProof, _path + ".dataIntegrityProof", true && _exceptionable) || $report(_exceptionable, {
|
|
1828
1868
|
path: _path + ".dataIntegrityProof",
|
|
1829
1869
|
expected: "__type.o2",
|
|
1830
1870
|
value: input.dataIntegrityProof
|
|
@@ -1844,12 +1884,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1844
1884
|
path: _path + ".anchors",
|
|
1845
1885
|
expected: "(Array<__type> | undefined)",
|
|
1846
1886
|
value: input.anchors
|
|
1847
|
-
})) && input.anchors.map((elem,
|
|
1848
|
-
path: _path + ".anchors[" +
|
|
1887
|
+
})) && input.anchors.map((elem, _index12) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $report(_exceptionable, {
|
|
1888
|
+
path: _path + ".anchors[" + _index12 + "]",
|
|
1849
1889
|
expected: "__type.o3",
|
|
1850
1890
|
value: elem
|
|
1851
|
-
})) && $
|
|
1852
|
-
path: _path + ".anchors[" +
|
|
1891
|
+
})) && $vo13(elem, _path + ".anchors[" + _index12 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
1892
|
+
path: _path + ".anchors[" + _index12 + "]",
|
|
1853
1893
|
expected: "__type.o3",
|
|
1854
1894
|
value: elem
|
|
1855
1895
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -1857,7 +1897,7 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1857
1897
|
expected: "(Array<__type> | undefined)",
|
|
1858
1898
|
value: input.anchors
|
|
1859
1899
|
})].every(flag => flag);
|
|
1860
|
-
const $
|
|
1900
|
+
const $vo10 = (input, _path, _exceptionable = true) => ["string" === typeof input.txHash || $report(_exceptionable, {
|
|
1861
1901
|
path: _path + ".txHash",
|
|
1862
1902
|
expected: "string",
|
|
1863
1903
|
value: input.txHash
|
|
@@ -1874,7 +1914,7 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1874
1914
|
expected: "(bigint | number | string)",
|
|
1875
1915
|
value: input.timestamp
|
|
1876
1916
|
})].every(flag => flag);
|
|
1877
|
-
const $
|
|
1917
|
+
const $vo11 = (input, _path, _exceptionable = true) => ["string" === typeof input.message || $report(_exceptionable, {
|
|
1878
1918
|
path: _path + ".message",
|
|
1879
1919
|
expected: "string",
|
|
1880
1920
|
value: input.message
|
|
@@ -1891,7 +1931,7 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1891
1931
|
expected: "(string | undefined)",
|
|
1892
1932
|
value: input.publicKey
|
|
1893
1933
|
})].every(flag => flag);
|
|
1894
|
-
const $
|
|
1934
|
+
const $vo12 = (input, _path, _exceptionable = true) => ["string" === typeof input.signature || $report(_exceptionable, {
|
|
1895
1935
|
path: _path + ".signature",
|
|
1896
1936
|
expected: "string",
|
|
1897
1937
|
value: input.signature
|
|
@@ -1904,7 +1944,7 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1904
1944
|
expected: "(string | undefined)",
|
|
1905
1945
|
value: input.publicKey
|
|
1906
1946
|
})].every(flag => flag);
|
|
1907
|
-
const $
|
|
1947
|
+
const $vo13 = (input, _path, _exceptionable = true) => [undefined === input.txHash || "string" === typeof input.txHash || $report(_exceptionable, {
|
|
1908
1948
|
path: _path + ".txHash",
|
|
1909
1949
|
expected: "(string | undefined)",
|
|
1910
1950
|
value: input.txHash
|
|
@@ -1915,11 +1955,11 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
1915
1955
|
})].every(flag => flag);
|
|
1916
1956
|
const $vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
1917
1957
|
if (undefined !== input.$and)
|
|
1918
|
-
return $
|
|
1958
|
+
return $vo3(input, _path, true && _exceptionable);
|
|
1919
1959
|
else if (undefined !== input.$or)
|
|
1920
|
-
return $
|
|
1960
|
+
return $vo4(input, _path, true && _exceptionable);
|
|
1921
1961
|
else if (undefined !== input.assets)
|
|
1922
|
-
return $
|
|
1962
|
+
return $vo5(input, _path, true && _exceptionable);
|
|
1923
1963
|
else
|
|
1924
1964
|
return $report(_exceptionable, {
|
|
1925
1965
|
path: _path,
|
|
@@ -4403,161 +4443,6 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
4403
4443
|
return Promise.reject(error);
|
|
4404
4444
|
}
|
|
4405
4445
|
}
|
|
4406
|
-
async getOauthAuthorizationCode(payload) {
|
|
4407
|
-
try {
|
|
4408
|
-
const validateRes = (input => {
|
|
4409
|
-
const errors = [];
|
|
4410
|
-
const __is = input => {
|
|
4411
|
-
const $io0 = input => "string" === typeof input.response_type && "string" === typeof input.client_id && "string" === typeof input.redirect_uri && (Array.isArray(input.scopes) && input.scopes.every(elem => "object" === typeof elem && null !== elem && $io1(elem))) && (undefined === input.state || "string" === typeof input.state);
|
|
4412
|
-
const $io1 = input => "string" === typeof input.scopeName && (undefined === input.options || "object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) && $io2(input.options));
|
|
4413
|
-
const $io2 = input => true;
|
|
4414
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
4415
|
-
};
|
|
4416
|
-
if (false === __is(input)) {
|
|
4417
|
-
const $report = typia_1.default.validate.report(errors);
|
|
4418
|
-
((input, _path, _exceptionable = true) => {
|
|
4419
|
-
const $vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.response_type || $report(_exceptionable, {
|
|
4420
|
-
path: _path + ".response_type",
|
|
4421
|
-
expected: "string",
|
|
4422
|
-
value: input.response_type
|
|
4423
|
-
}), "string" === typeof input.client_id || $report(_exceptionable, {
|
|
4424
|
-
path: _path + ".client_id",
|
|
4425
|
-
expected: "string",
|
|
4426
|
-
value: input.client_id
|
|
4427
|
-
}), "string" === typeof input.redirect_uri || $report(_exceptionable, {
|
|
4428
|
-
path: _path + ".redirect_uri",
|
|
4429
|
-
expected: "string",
|
|
4430
|
-
value: input.redirect_uri
|
|
4431
|
-
}), (Array.isArray(input.scopes) || $report(_exceptionable, {
|
|
4432
|
-
path: _path + ".scopes",
|
|
4433
|
-
expected: "Array<OAuthScopeDetails>",
|
|
4434
|
-
value: input.scopes
|
|
4435
|
-
})) && input.scopes.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
4436
|
-
path: _path + ".scopes[" + _index1 + "]",
|
|
4437
|
-
expected: "OAuthScopeDetails",
|
|
4438
|
-
value: elem
|
|
4439
|
-
})) && $vo1(elem, _path + ".scopes[" + _index1 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
4440
|
-
path: _path + ".scopes[" + _index1 + "]",
|
|
4441
|
-
expected: "OAuthScopeDetails",
|
|
4442
|
-
value: elem
|
|
4443
|
-
})).every(flag => flag) || $report(_exceptionable, {
|
|
4444
|
-
path: _path + ".scopes",
|
|
4445
|
-
expected: "Array<OAuthScopeDetails>",
|
|
4446
|
-
value: input.scopes
|
|
4447
|
-
}), undefined === input.state || "string" === typeof input.state || $report(_exceptionable, {
|
|
4448
|
-
path: _path + ".state",
|
|
4449
|
-
expected: "(string | undefined)",
|
|
4450
|
-
value: input.state
|
|
4451
|
-
})].every(flag => flag);
|
|
4452
|
-
const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.scopeName || $report(_exceptionable, {
|
|
4453
|
-
path: _path + ".scopeName",
|
|
4454
|
-
expected: "string",
|
|
4455
|
-
value: input.scopeName
|
|
4456
|
-
}), undefined === input.options || ("object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) || $report(_exceptionable, {
|
|
4457
|
-
path: _path + ".options",
|
|
4458
|
-
expected: "(object | undefined)",
|
|
4459
|
-
value: input.options
|
|
4460
|
-
})) && $vo2(input.options, _path + ".options", true && _exceptionable) || $report(_exceptionable, {
|
|
4461
|
-
path: _path + ".options",
|
|
4462
|
-
expected: "(object | undefined)",
|
|
4463
|
-
value: input.options
|
|
4464
|
-
})].every(flag => flag);
|
|
4465
|
-
const $vo2 = (input, _path, _exceptionable = true) => true;
|
|
4466
|
-
return ("object" === typeof input && null !== input || $report(true, {
|
|
4467
|
-
path: _path + "",
|
|
4468
|
-
expected: "OauthAuthorizePayload",
|
|
4469
|
-
value: input
|
|
4470
|
-
})) && $vo0(input, _path + "", true) || $report(true, {
|
|
4471
|
-
path: _path + "",
|
|
4472
|
-
expected: "OauthAuthorizePayload",
|
|
4473
|
-
value: input
|
|
4474
|
-
});
|
|
4475
|
-
})(input, "$input", true);
|
|
4476
|
-
}
|
|
4477
|
-
const success = 0 === errors.length;
|
|
4478
|
-
return {
|
|
4479
|
-
success,
|
|
4480
|
-
errors,
|
|
4481
|
-
data: success ? input : undefined
|
|
4482
|
-
};
|
|
4483
|
-
})(payload ?? {});
|
|
4484
|
-
if (!validateRes.success) {
|
|
4485
|
-
throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
|
|
4486
|
-
}
|
|
4487
|
-
const response = await this.axios.post(`${this.BACKEND_URL}${routes_1.BitBadgesApiRoutes.OauthAuthorizeRoute()}`, payload);
|
|
4488
|
-
console.log(response.data);
|
|
4489
|
-
return new requests_1.OauthAuthorizeSuccessResponse(response.data);
|
|
4490
|
-
}
|
|
4491
|
-
catch (error) {
|
|
4492
|
-
await this.handleApiError(error);
|
|
4493
|
-
return Promise.reject(error);
|
|
4494
|
-
}
|
|
4495
|
-
}
|
|
4496
|
-
async getOauthAccessToken(payload) {
|
|
4497
|
-
try {
|
|
4498
|
-
const validateRes = (input => {
|
|
4499
|
-
const errors = [];
|
|
4500
|
-
const __is = input => {
|
|
4501
|
-
const $io0 = input => "string" === typeof input.grant_type && "string" === typeof input.client_id && "string" === typeof input.client_secret && (undefined === input.code || "string" === typeof input.code) && (undefined === input.redirect_uri || "string" === typeof input.redirect_uri) && (undefined === input.refresh_token || "string" === typeof input.refresh_token);
|
|
4502
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
4503
|
-
};
|
|
4504
|
-
if (false === __is(input)) {
|
|
4505
|
-
const $report = typia_1.default.validate.report(errors);
|
|
4506
|
-
((input, _path, _exceptionable = true) => {
|
|
4507
|
-
const $vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.grant_type || $report(_exceptionable, {
|
|
4508
|
-
path: _path + ".grant_type",
|
|
4509
|
-
expected: "string",
|
|
4510
|
-
value: input.grant_type
|
|
4511
|
-
}), "string" === typeof input.client_id || $report(_exceptionable, {
|
|
4512
|
-
path: _path + ".client_id",
|
|
4513
|
-
expected: "string",
|
|
4514
|
-
value: input.client_id
|
|
4515
|
-
}), "string" === typeof input.client_secret || $report(_exceptionable, {
|
|
4516
|
-
path: _path + ".client_secret",
|
|
4517
|
-
expected: "string",
|
|
4518
|
-
value: input.client_secret
|
|
4519
|
-
}), undefined === input.code || "string" === typeof input.code || $report(_exceptionable, {
|
|
4520
|
-
path: _path + ".code",
|
|
4521
|
-
expected: "(string | undefined)",
|
|
4522
|
-
value: input.code
|
|
4523
|
-
}), undefined === input.redirect_uri || "string" === typeof input.redirect_uri || $report(_exceptionable, {
|
|
4524
|
-
path: _path + ".redirect_uri",
|
|
4525
|
-
expected: "(string | undefined)",
|
|
4526
|
-
value: input.redirect_uri
|
|
4527
|
-
}), undefined === input.refresh_token || "string" === typeof input.refresh_token || $report(_exceptionable, {
|
|
4528
|
-
path: _path + ".refresh_token",
|
|
4529
|
-
expected: "(string | undefined)",
|
|
4530
|
-
value: input.refresh_token
|
|
4531
|
-
})].every(flag => flag);
|
|
4532
|
-
return ("object" === typeof input && null !== input || $report(true, {
|
|
4533
|
-
path: _path + "",
|
|
4534
|
-
expected: "OauthTokenPayload",
|
|
4535
|
-
value: input
|
|
4536
|
-
})) && $vo0(input, _path + "", true) || $report(true, {
|
|
4537
|
-
path: _path + "",
|
|
4538
|
-
expected: "OauthTokenPayload",
|
|
4539
|
-
value: input
|
|
4540
|
-
});
|
|
4541
|
-
})(input, "$input", true);
|
|
4542
|
-
}
|
|
4543
|
-
const success = 0 === errors.length;
|
|
4544
|
-
return {
|
|
4545
|
-
success,
|
|
4546
|
-
errors,
|
|
4547
|
-
data: success ? input : undefined
|
|
4548
|
-
};
|
|
4549
|
-
})(payload ?? {});
|
|
4550
|
-
if (!validateRes.success) {
|
|
4551
|
-
throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
|
|
4552
|
-
}
|
|
4553
|
-
const response = await this.axios.post(`${this.BACKEND_URL}${routes_1.BitBadgesApiRoutes.OauthTokenRoute()}`, payload);
|
|
4554
|
-
return new requests_1.OauthTokenSuccessResponse(response.data);
|
|
4555
|
-
}
|
|
4556
|
-
catch (error) {
|
|
4557
|
-
await this.handleApiError(error);
|
|
4558
|
-
return Promise.reject(error);
|
|
4559
|
-
}
|
|
4560
|
-
}
|
|
4561
4446
|
async revokeOauthAuthorization(payload) {
|
|
4562
4447
|
try {
|
|
4563
4448
|
const validateRes = (input => {
|
|
@@ -6153,23 +6038,23 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6153
6038
|
const errors = [];
|
|
6154
6039
|
const __is = input => {
|
|
6155
6040
|
const $io0 = input => undefined === input.contents || Array.isArray(input.contents) && input.contents.every(elem => "object" === typeof elem && null !== elem && $iu0(elem));
|
|
6156
|
-
const $io1 = input =>
|
|
6157
|
-
const $io2 = input => ("string" === typeof input.
|
|
6158
|
-
const $io3 = input =>
|
|
6159
|
-
const $io4 = input => Object.keys(input).every(key => {
|
|
6041
|
+
const $io1 = input => (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && $io2(input.metadata)) && "string" === typeof input.uri && (undefined === input.fetchedUri || "string" === typeof input.fetchedUri) && "string" === typeof input.customData && (undefined === input.toUploadToIpfs || "boolean" === typeof input.toUploadToIpfs);
|
|
6042
|
+
const $io2 = input => "string" === typeof input.name && "string" === typeof input.description && "string" === typeof input.image && (undefined === input.video || "string" === typeof input.video) && (undefined === input.category || "string" === typeof input.category) && (undefined === input.externalUrl || "string" === typeof input.externalUrl) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (undefined === input.socials || "object" === typeof input.socials && null !== input.socials && false === Array.isArray(input.socials) && $io3(input.socials)) && (undefined === input.offChainTransferabilityInfo || "object" === typeof input.offChainTransferabilityInfo && null !== input.offChainTransferabilityInfo && $io4(input.offChainTransferabilityInfo)) && (undefined === input.attributes || Array.isArray(input.attributes) && input.attributes.every(elem => "object" === typeof elem && null !== elem && $io5(elem))) && (undefined === input.fetchedAtBlock || "string" === typeof input.fetchedAtBlock || "number" === typeof input.fetchedAtBlock || "bigint" === typeof input.fetchedAtBlock) && (undefined === input.fetchedAt || "string" === typeof input.fetchedAt || "number" === typeof input.fetchedAt || "bigint" === typeof input.fetchedAt) && (undefined === input._isUpdating || "boolean" === typeof input._isUpdating);
|
|
6043
|
+
const $io3 = input => Object.keys(input).every(key => {
|
|
6160
6044
|
const value = input[key];
|
|
6161
6045
|
if (undefined === value)
|
|
6162
6046
|
return true;
|
|
6163
6047
|
return "string" === typeof value;
|
|
6164
6048
|
});
|
|
6165
|
-
const $
|
|
6166
|
-
const $
|
|
6167
|
-
const $
|
|
6049
|
+
const $io4 = input => "string" === typeof input.host && "string" === typeof input.assignMethod;
|
|
6050
|
+
const $io5 = input => (undefined === input.type || "date" === input.type || "url" === input.type) && "string" === typeof input.name && ("string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value);
|
|
6051
|
+
const $io6 = input => Array.isArray(input.badgeIds) && input.badgeIds.every(elem => "object" === typeof elem && null !== elem && $io7(elem)) && (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && $io2(input.metadata)) && "string" === typeof input.uri && (undefined === input.fetchedUri || "string" === typeof input.fetchedUri) && "string" === typeof input.customData && (undefined === input.toUploadToIpfs || "boolean" === typeof input.toUploadToIpfs);
|
|
6052
|
+
const $io7 = 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);
|
|
6168
6053
|
const $io8 = input => Array.isArray(input.leaves) && input.leaves.every(elem => "string" === typeof elem) && "boolean" === typeof input.isHashed && (undefined === input.preimages || Array.isArray(input.preimages) && input.preimages.every(elem => "string" === typeof elem)) && (undefined === input.seedCode || "string" === typeof input.seedCode) && (undefined === input.tree || "object" === typeof input.tree && null !== input.tree && $io9(input.tree)) && (undefined === input.treeOptions || "object" === typeof input.treeOptions && null !== input.treeOptions && false === Array.isArray(input.treeOptions) && $io10(input.treeOptions)) && (undefined === input.numLeaves || "string" === typeof input.numLeaves || "number" === typeof input.numLeaves || "bigint" === typeof input.numLeaves) && (undefined === input.currCode || "string" === typeof input.currCode || "number" === typeof input.currCode || "bigint" === typeof input.currCode);
|
|
6169
6054
|
const $io9 = input => true;
|
|
6170
6055
|
const $io10 = input => (undefined === input.duplicateOdd || "boolean" === typeof input.duplicateOdd) && (undefined === input.hashLeaves || "boolean" === typeof input.hashLeaves) && (undefined === input.isBitcoinTree || "boolean" === typeof input.isBitcoinTree) && (undefined === input.sortLeaves || "boolean" === typeof input.sortLeaves) && (undefined === input.sortPairs || "boolean" === typeof input.sortPairs) && (undefined === input.sort || "boolean" === typeof input.sort) && (null !== input.fillDefaultHash && (undefined === input.fillDefaultHash || "function" === typeof input.fillDefaultHash || "string" === typeof input.fillDefaultHash || "object" === typeof input.fillDefaultHash && null !== input.fillDefaultHash && $io11(input.fillDefaultHash))) && (undefined === input.complete || "boolean" === typeof input.complete) && (undefined === input.concatenator || true);
|
|
6171
|
-
const $io11 = input => "number" === typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" === typeof input.byteLength && "number" === typeof input.byteOffset && "number" === typeof input.length && "Uint8Array" === input["__@toStringTag@
|
|
6172
|
-
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@
|
|
6056
|
+
const $io11 = input => "number" === typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" === typeof input.byteLength && "number" === typeof input.byteOffset && "number" === typeof input.length && "Uint8Array" === input["__@toStringTag@155"] && Object.keys(input).every(key => {
|
|
6057
|
+
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@155"].some(prop => key === prop))
|
|
6173
6058
|
return true;
|
|
6174
6059
|
const value = input[key];
|
|
6175
6060
|
if (undefined === value)
|
|
@@ -6179,14 +6064,14 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6179
6064
|
return true;
|
|
6180
6065
|
});
|
|
6181
6066
|
const $iu0 = input => (() => {
|
|
6182
|
-
if (undefined !== input.
|
|
6183
|
-
return $
|
|
6184
|
-
else if (undefined !== input.
|
|
6185
|
-
return $
|
|
6067
|
+
if (undefined !== input.name)
|
|
6068
|
+
return $io2(input);
|
|
6069
|
+
else if (undefined !== input.badgeIds)
|
|
6070
|
+
return $io6(input);
|
|
6186
6071
|
else if (undefined !== input.leaves)
|
|
6187
6072
|
return $io8(input);
|
|
6188
6073
|
else
|
|
6189
|
-
return $
|
|
6074
|
+
return $io1(input);
|
|
6190
6075
|
})();
|
|
6191
6076
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
6192
6077
|
};
|
|
@@ -6196,7 +6081,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6196
6081
|
const $join = typia_1.default.validate.join;
|
|
6197
6082
|
const $vo0 = (input, _path, _exceptionable = true) => [undefined === input.contents || (Array.isArray(input.contents) || $report(_exceptionable, {
|
|
6198
6083
|
path: _path + ".contents",
|
|
6199
|
-
expected: "(Array<
|
|
6084
|
+
expected: "(Array<iCollectionMetadataDetails<NumberType> | iMetadata<NumberType> | iBadgeMetadataDetails<NumberType> | iChallengeDetails<...>> | undefined)",
|
|
6200
6085
|
value: input.contents
|
|
6201
6086
|
})) && input.contents.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
6202
6087
|
path: _path + ".contents[" + _index1 + "]",
|
|
@@ -6208,30 +6093,14 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6208
6093
|
value: elem
|
|
6209
6094
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
6210
6095
|
path: _path + ".contents",
|
|
6211
|
-
expected: "(Array<
|
|
6096
|
+
expected: "(Array<iCollectionMetadataDetails<NumberType> | iMetadata<NumberType> | iBadgeMetadataDetails<NumberType> | iChallengeDetails<...>> | undefined)",
|
|
6212
6097
|
value: input.contents
|
|
6213
6098
|
})].every(flag => flag);
|
|
6214
|
-
const $vo1 = (input, _path, _exceptionable = true) => [
|
|
6215
|
-
path: _path + ".badgeIds",
|
|
6216
|
-
expected: "Array<iUintRange<NumberType>>",
|
|
6217
|
-
value: input.badgeIds
|
|
6218
|
-
})) && input.badgeIds.map((elem, _index2) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
6219
|
-
path: _path + ".badgeIds[" + _index2 + "]",
|
|
6220
|
-
expected: "iUintRange<NumberType>",
|
|
6221
|
-
value: elem
|
|
6222
|
-
})) && $vo2(elem, _path + ".badgeIds[" + _index2 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
6223
|
-
path: _path + ".badgeIds[" + _index2 + "]",
|
|
6224
|
-
expected: "iUintRange<NumberType>",
|
|
6225
|
-
value: elem
|
|
6226
|
-
})).every(flag => flag) || $report(_exceptionable, {
|
|
6227
|
-
path: _path + ".badgeIds",
|
|
6228
|
-
expected: "Array<iUintRange<NumberType>>",
|
|
6229
|
-
value: input.badgeIds
|
|
6230
|
-
}), undefined === input.metadata || ("object" === typeof input.metadata && null !== input.metadata || $report(_exceptionable, {
|
|
6099
|
+
const $vo1 = (input, _path, _exceptionable = true) => [undefined === input.metadata || ("object" === typeof input.metadata && null !== input.metadata || $report(_exceptionable, {
|
|
6231
6100
|
path: _path + ".metadata",
|
|
6232
6101
|
expected: "(iMetadata<NumberType> | undefined)",
|
|
6233
6102
|
value: input.metadata
|
|
6234
|
-
})) && $
|
|
6103
|
+
})) && $vo2(input.metadata, _path + ".metadata", true && _exceptionable) || $report(_exceptionable, {
|
|
6235
6104
|
path: _path + ".metadata",
|
|
6236
6105
|
expected: "(iMetadata<NumberType> | undefined)",
|
|
6237
6106
|
value: input.metadata
|
|
@@ -6252,16 +6121,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6252
6121
|
expected: "(boolean | undefined)",
|
|
6253
6122
|
value: input.toUploadToIpfs
|
|
6254
6123
|
})].every(flag => flag);
|
|
6255
|
-
const $vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.
|
|
6256
|
-
path: _path + ".start",
|
|
6257
|
-
expected: "(bigint | number | string)",
|
|
6258
|
-
value: input.start
|
|
6259
|
-
}), "string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end || $report(_exceptionable, {
|
|
6260
|
-
path: _path + ".end",
|
|
6261
|
-
expected: "(bigint | number | string)",
|
|
6262
|
-
value: input.end
|
|
6263
|
-
})].every(flag => flag);
|
|
6264
|
-
const $vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || $report(_exceptionable, {
|
|
6124
|
+
const $vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.name || $report(_exceptionable, {
|
|
6265
6125
|
path: _path + ".name",
|
|
6266
6126
|
expected: "string",
|
|
6267
6127
|
value: input.name
|
|
@@ -6289,8 +6149,8 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6289
6149
|
path: _path + ".tags",
|
|
6290
6150
|
expected: "(Array<string> | undefined)",
|
|
6291
6151
|
value: input.tags
|
|
6292
|
-
})) && input.tags.map((elem,
|
|
6293
|
-
path: _path + ".tags[" +
|
|
6152
|
+
})) && input.tags.map((elem, _index2) => "string" === typeof elem || $report(_exceptionable, {
|
|
6153
|
+
path: _path + ".tags[" + _index2 + "]",
|
|
6294
6154
|
expected: "string",
|
|
6295
6155
|
value: elem
|
|
6296
6156
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -6301,7 +6161,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6301
6161
|
path: _path + ".socials",
|
|
6302
6162
|
expected: "(__type | undefined)",
|
|
6303
6163
|
value: input.socials
|
|
6304
|
-
})) && $
|
|
6164
|
+
})) && $vo3(input.socials, _path + ".socials", true && _exceptionable) || $report(_exceptionable, {
|
|
6305
6165
|
path: _path + ".socials",
|
|
6306
6166
|
expected: "(__type | undefined)",
|
|
6307
6167
|
value: input.socials
|
|
@@ -6309,7 +6169,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6309
6169
|
path: _path + ".offChainTransferabilityInfo",
|
|
6310
6170
|
expected: "(__type.o1 | undefined)",
|
|
6311
6171
|
value: input.offChainTransferabilityInfo
|
|
6312
|
-
})) && $
|
|
6172
|
+
})) && $vo4(input.offChainTransferabilityInfo, _path + ".offChainTransferabilityInfo", true && _exceptionable) || $report(_exceptionable, {
|
|
6313
6173
|
path: _path + ".offChainTransferabilityInfo",
|
|
6314
6174
|
expected: "(__type.o1 | undefined)",
|
|
6315
6175
|
value: input.offChainTransferabilityInfo
|
|
@@ -6317,12 +6177,12 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6317
6177
|
path: _path + ".attributes",
|
|
6318
6178
|
expected: "(Array<__type> | undefined)",
|
|
6319
6179
|
value: input.attributes
|
|
6320
|
-
})) && input.attributes.map((elem,
|
|
6321
|
-
path: _path + ".attributes[" +
|
|
6180
|
+
})) && input.attributes.map((elem, _index3) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
6181
|
+
path: _path + ".attributes[" + _index3 + "]",
|
|
6322
6182
|
expected: "__type.o2",
|
|
6323
6183
|
value: elem
|
|
6324
|
-
})) && $
|
|
6325
|
-
path: _path + ".attributes[" +
|
|
6184
|
+
})) && $vo5(elem, _path + ".attributes[" + _index3 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
6185
|
+
path: _path + ".attributes[" + _index3 + "]",
|
|
6326
6186
|
expected: "__type.o2",
|
|
6327
6187
|
value: elem
|
|
6328
6188
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -6342,7 +6202,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6342
6202
|
expected: "(boolean | undefined)",
|
|
6343
6203
|
value: input._isUpdating
|
|
6344
6204
|
})].every(flag => flag);
|
|
6345
|
-
const $
|
|
6205
|
+
const $vo3 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map(key => {
|
|
6346
6206
|
const value = input[key];
|
|
6347
6207
|
if (undefined === value)
|
|
6348
6208
|
return true;
|
|
@@ -6352,7 +6212,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6352
6212
|
value: value
|
|
6353
6213
|
});
|
|
6354
6214
|
}).every(flag => flag)].every(flag => flag);
|
|
6355
|
-
const $
|
|
6215
|
+
const $vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.host || $report(_exceptionable, {
|
|
6356
6216
|
path: _path + ".host",
|
|
6357
6217
|
expected: "string",
|
|
6358
6218
|
value: input.host
|
|
@@ -6361,7 +6221,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6361
6221
|
expected: "string",
|
|
6362
6222
|
value: input.assignMethod
|
|
6363
6223
|
})].every(flag => flag);
|
|
6364
|
-
const $
|
|
6224
|
+
const $vo5 = (input, _path, _exceptionable = true) => [undefined === input.type || "date" === input.type || "url" === input.type || $report(_exceptionable, {
|
|
6365
6225
|
path: _path + ".type",
|
|
6366
6226
|
expected: "(\"date\" | \"url\" | undefined)",
|
|
6367
6227
|
value: input.type
|
|
@@ -6374,11 +6234,27 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6374
6234
|
expected: "(boolean | number | string)",
|
|
6375
6235
|
value: input.value
|
|
6376
6236
|
})].every(flag => flag);
|
|
6377
|
-
const $
|
|
6237
|
+
const $vo6 = (input, _path, _exceptionable = true) => [(Array.isArray(input.badgeIds) || $report(_exceptionable, {
|
|
6238
|
+
path: _path + ".badgeIds",
|
|
6239
|
+
expected: "Array<iUintRange<NumberType>>",
|
|
6240
|
+
value: input.badgeIds
|
|
6241
|
+
})) && input.badgeIds.map((elem, _index4) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
6242
|
+
path: _path + ".badgeIds[" + _index4 + "]",
|
|
6243
|
+
expected: "iUintRange<NumberType>",
|
|
6244
|
+
value: elem
|
|
6245
|
+
})) && $vo7(elem, _path + ".badgeIds[" + _index4 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
6246
|
+
path: _path + ".badgeIds[" + _index4 + "]",
|
|
6247
|
+
expected: "iUintRange<NumberType>",
|
|
6248
|
+
value: elem
|
|
6249
|
+
})).every(flag => flag) || $report(_exceptionable, {
|
|
6250
|
+
path: _path + ".badgeIds",
|
|
6251
|
+
expected: "Array<iUintRange<NumberType>>",
|
|
6252
|
+
value: input.badgeIds
|
|
6253
|
+
}), undefined === input.metadata || ("object" === typeof input.metadata && null !== input.metadata || $report(_exceptionable, {
|
|
6378
6254
|
path: _path + ".metadata",
|
|
6379
6255
|
expected: "(iMetadata<NumberType> | undefined)",
|
|
6380
6256
|
value: input.metadata
|
|
6381
|
-
})) && $
|
|
6257
|
+
})) && $vo2(input.metadata, _path + ".metadata", true && _exceptionable) || $report(_exceptionable, {
|
|
6382
6258
|
path: _path + ".metadata",
|
|
6383
6259
|
expected: "(iMetadata<NumberType> | undefined)",
|
|
6384
6260
|
value: input.metadata
|
|
@@ -6399,6 +6275,15 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6399
6275
|
expected: "(boolean | undefined)",
|
|
6400
6276
|
value: input.toUploadToIpfs
|
|
6401
6277
|
})].every(flag => flag);
|
|
6278
|
+
const $vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.start || "number" === typeof input.start || "bigint" === typeof input.start || $report(_exceptionable, {
|
|
6279
|
+
path: _path + ".start",
|
|
6280
|
+
expected: "(bigint | number | string)",
|
|
6281
|
+
value: input.start
|
|
6282
|
+
}), "string" === typeof input.end || "number" === typeof input.end || "bigint" === typeof input.end || $report(_exceptionable, {
|
|
6283
|
+
path: _path + ".end",
|
|
6284
|
+
expected: "(bigint | number | string)",
|
|
6285
|
+
value: input.end
|
|
6286
|
+
})].every(flag => flag);
|
|
6402
6287
|
const $vo8 = (input, _path, _exceptionable = true) => [(Array.isArray(input.leaves) || $report(_exceptionable, {
|
|
6403
6288
|
path: _path + ".leaves",
|
|
6404
6289
|
expected: "Array<string>",
|
|
@@ -6522,12 +6407,12 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6522
6407
|
path: _path + ".length",
|
|
6523
6408
|
expected: "number",
|
|
6524
6409
|
value: input.length
|
|
6525
|
-
}), "Uint8Array" === input["__@toStringTag@
|
|
6526
|
-
path: _path + "[\"__@toStringTag@
|
|
6410
|
+
}), "Uint8Array" === input["__@toStringTag@155"] || $report(_exceptionable, {
|
|
6411
|
+
path: _path + "[\"__@toStringTag@155\"]",
|
|
6527
6412
|
expected: "\"Uint8Array\"",
|
|
6528
|
-
value: input["__@toStringTag@
|
|
6413
|
+
value: input["__@toStringTag@155"]
|
|
6529
6414
|
}), false === _exceptionable || Object.keys(input).map(key => {
|
|
6530
|
-
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@
|
|
6415
|
+
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@155"].some(prop => key === prop))
|
|
6531
6416
|
return true;
|
|
6532
6417
|
const value = input[key];
|
|
6533
6418
|
if (undefined === value)
|
|
@@ -6541,14 +6426,14 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6541
6426
|
return true;
|
|
6542
6427
|
}).every(flag => flag)].every(flag => flag);
|
|
6543
6428
|
const $vu0 = (input, _path, _exceptionable = true) => (() => {
|
|
6544
|
-
if (undefined !== input.
|
|
6545
|
-
return $
|
|
6546
|
-
else if (undefined !== input.
|
|
6547
|
-
return $
|
|
6429
|
+
if (undefined !== input.name)
|
|
6430
|
+
return $vo2(input, _path, true && _exceptionable);
|
|
6431
|
+
else if (undefined !== input.badgeIds)
|
|
6432
|
+
return $vo6(input, _path, true && _exceptionable);
|
|
6548
6433
|
else if (undefined !== input.leaves)
|
|
6549
6434
|
return $vo8(input, _path, true && _exceptionable);
|
|
6550
6435
|
else
|
|
6551
|
-
return $
|
|
6436
|
+
return $vo1(input, _path, true && _exceptionable);
|
|
6552
6437
|
})();
|
|
6553
6438
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $report(true, {
|
|
6554
6439
|
path: _path + "",
|
|
@@ -6590,8 +6475,8 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6590
6475
|
const $io3 = input => Array.isArray(input.leaves) && input.leaves.every(elem => "string" === typeof elem) && "boolean" === typeof input.isHashed && (undefined === input.preimages || Array.isArray(input.preimages) && input.preimages.every(elem => "string" === typeof elem)) && (undefined === input.seedCode || "string" === typeof input.seedCode) && (undefined === input.tree || "object" === typeof input.tree && null !== input.tree && $io4(input.tree)) && (undefined === input.treeOptions || "object" === typeof input.treeOptions && null !== input.treeOptions && false === Array.isArray(input.treeOptions) && $io5(input.treeOptions)) && (undefined === input.numLeaves || "string" === typeof input.numLeaves || "number" === typeof input.numLeaves || "bigint" === typeof input.numLeaves) && (undefined === input.currCode || "string" === typeof input.currCode || "number" === typeof input.currCode || "bigint" === typeof input.currCode);
|
|
6591
6476
|
const $io4 = input => true;
|
|
6592
6477
|
const $io5 = input => (undefined === input.duplicateOdd || "boolean" === typeof input.duplicateOdd) && (undefined === input.hashLeaves || "boolean" === typeof input.hashLeaves) && (undefined === input.isBitcoinTree || "boolean" === typeof input.isBitcoinTree) && (undefined === input.sortLeaves || "boolean" === typeof input.sortLeaves) && (undefined === input.sortPairs || "boolean" === typeof input.sortPairs) && (undefined === input.sort || "boolean" === typeof input.sort) && (null !== input.fillDefaultHash && (undefined === input.fillDefaultHash || "function" === typeof input.fillDefaultHash || "string" === typeof input.fillDefaultHash || "object" === typeof input.fillDefaultHash && null !== input.fillDefaultHash && $io6(input.fillDefaultHash))) && (undefined === input.complete || "boolean" === typeof input.complete) && (undefined === input.concatenator || true);
|
|
6593
|
-
const $io6 = input => "number" === typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" === typeof input.byteLength && "number" === typeof input.byteOffset && "number" === typeof input.length && "Uint8Array" === input["__@toStringTag@
|
|
6594
|
-
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@
|
|
6478
|
+
const $io6 = input => "number" === typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" === typeof input.byteLength && "number" === typeof input.byteOffset && "number" === typeof input.length && "Uint8Array" === input["__@toStringTag@155"] && Object.keys(input).every(key => {
|
|
6479
|
+
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@155"].some(prop => key === prop))
|
|
6595
6480
|
return true;
|
|
6596
6481
|
const value = input[key];
|
|
6597
6482
|
if (undefined === value)
|
|
@@ -6805,12 +6690,12 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6805
6690
|
path: _path + ".length",
|
|
6806
6691
|
expected: "number",
|
|
6807
6692
|
value: input.length
|
|
6808
|
-
}), "Uint8Array" === input["__@toStringTag@
|
|
6809
|
-
path: _path + "[\"__@toStringTag@
|
|
6693
|
+
}), "Uint8Array" === input["__@toStringTag@155"] || $report(_exceptionable, {
|
|
6694
|
+
path: _path + "[\"__@toStringTag@155\"]",
|
|
6810
6695
|
expected: "\"Uint8Array\"",
|
|
6811
|
-
value: input["__@toStringTag@
|
|
6696
|
+
value: input["__@toStringTag@155"]
|
|
6812
6697
|
}), false === _exceptionable || Object.keys(input).map(key => {
|
|
6813
|
-
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@
|
|
6698
|
+
if (["BYTES_PER_ELEMENT", "buffer", "byteLength", "byteOffset", "length", "__@toStringTag@155"].some(prop => key === prop))
|
|
6814
6699
|
return true;
|
|
6815
6700
|
const value = input[key];
|
|
6816
6701
|
if (undefined === value)
|