bitbadgesjs-sdk 0.3.188 → 0.3.190
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/cjs/api-indexer/BitBadgesApi.js +158 -44
- package/dist/cjs/api-indexer/BitBadgesApi.js.map +1 -1
- package/dist/cjs/api-indexer/docs/docs.d.ts +9 -7
- package/dist/cjs/api-indexer/docs/docs.d.ts.map +1 -1
- package/dist/cjs/api-indexer/docs/docs.js +1 -0
- package/dist/cjs/api-indexer/docs/docs.js.map +1 -1
- package/dist/cjs/api-indexer/docs/interfaces.d.ts +22 -9
- package/dist/cjs/api-indexer/docs/interfaces.d.ts.map +1 -1
- package/dist/cjs/api-indexer/docs/interfaces.js.map +1 -1
- package/dist/cjs/api-indexer/requests/requests.d.ts +14 -0
- package/dist/cjs/api-indexer/requests/requests.d.ts.map +1 -1
- package/dist/cjs/api-indexer/requests/requests.js +2 -0
- package/dist/cjs/api-indexer/requests/requests.js.map +1 -1
- package/dist/esm/api-indexer/BitBadgesApi.js +158 -44
- package/dist/esm/api-indexer/BitBadgesApi.js.map +1 -1
- package/dist/esm/api-indexer/docs/docs.d.ts +9 -7
- package/dist/esm/api-indexer/docs/docs.d.ts.map +1 -1
- package/dist/esm/api-indexer/docs/docs.js +2 -0
- package/dist/esm/api-indexer/docs/docs.js.map +1 -1
- package/dist/esm/api-indexer/docs/interfaces.d.ts +22 -9
- package/dist/esm/api-indexer/docs/interfaces.d.ts.map +1 -1
- package/dist/esm/api-indexer/docs/interfaces.js.map +1 -1
- package/dist/esm/api-indexer/requests/requests.d.ts +14 -0
- package/dist/esm/api-indexer/requests/requests.d.ts.map +1 -1
- package/dist/esm/api-indexer/requests/requests.js +4 -0
- package/dist/esm/api-indexer/requests/requests.js.map +1 -1
- package/package.json +1 -1
|
@@ -373,12 +373,13 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
373
373
|
const $io16 = input => Array.isArray(input.scopes) && input.scopes.every(elem => "object" === typeof elem && null !== elem && $io13(elem)) && "string" === typeof input.username && "string" === typeof input.id;
|
|
374
374
|
const $io17 = input => Array.isArray(input.scopes) && input.scopes.every(elem => "object" === typeof elem && null !== elem && $io13(elem)) && "string" === typeof input.username && "string" === typeof input.id;
|
|
375
375
|
const $io18 = input => "string" === typeof input.address && (Array.isArray(input.scopes) && input.scopes.every(elem => "object" === typeof elem && null !== elem && $io13(elem)));
|
|
376
|
-
const $io19 = input => (undefined === input.discord || "object" === typeof input.discord && null !== input.discord && $io20(input.discord)) && (undefined === input.twitter || "object" === typeof input.twitter && null !== input.twitter && $io21(input.twitter)) && (undefined === input.google || "object" === typeof input.google && null !== input.google && $io22(input.google)) && (undefined === input.github || "object" === typeof input.github && null !== input.github && $io23(input.github)) && (undefined === input.twitch || "object" === typeof input.twitch && null !== input.twitch && $io24(input.twitch));
|
|
376
|
+
const $io19 = input => (undefined === input.discord || "object" === typeof input.discord && null !== input.discord && $io20(input.discord)) && (undefined === input.twitter || "object" === typeof input.twitter && null !== input.twitter && $io21(input.twitter)) && (undefined === input.google || "object" === typeof input.google && null !== input.google && $io22(input.google)) && (undefined === input.github || "object" === typeof input.github && null !== input.github && $io23(input.github)) && (undefined === input.twitch || "object" === typeof input.twitch && null !== input.twitch && $io24(input.twitch)) && (undefined === input.strava || "object" === typeof input.strava && null !== input.strava && $io25(input.strava));
|
|
377
377
|
const $io20 = input => "string" === typeof input.username && "string" === typeof input.id && (undefined === input.discriminator || "string" === typeof input.discriminator) && ("string" === typeof input.lastUpdated || "number" === typeof input.lastUpdated || "bigint" === typeof input.lastUpdated);
|
|
378
378
|
const $io21 = input => "string" === typeof input.username && "string" === typeof input.id && ("string" === typeof input.lastUpdated || "number" === typeof input.lastUpdated || "bigint" === typeof input.lastUpdated);
|
|
379
379
|
const $io22 = input => "string" === typeof input.username && "string" === typeof input.id && ("string" === typeof input.lastUpdated || "number" === typeof input.lastUpdated || "bigint" === typeof input.lastUpdated);
|
|
380
380
|
const $io23 = input => "string" === typeof input.username && "string" === typeof input.id && ("string" === typeof input.lastUpdated || "number" === typeof input.lastUpdated || "bigint" === typeof input.lastUpdated);
|
|
381
381
|
const $io24 = input => "string" === typeof input.username && "string" === typeof input.id && ("string" === typeof input.lastUpdated || "number" === typeof input.lastUpdated || "bigint" === typeof input.lastUpdated);
|
|
382
|
+
const $io25 = input => "string" === typeof input.username && "string" === typeof input.id && ("string" === typeof input.lastUpdated || "number" === typeof input.lastUpdated || "bigint" === typeof input.lastUpdated);
|
|
382
383
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
383
384
|
};
|
|
384
385
|
if (false === __is(input)) {
|
|
@@ -971,6 +972,14 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
971
972
|
path: _path + ".twitch",
|
|
972
973
|
expected: "(__type.o15 | undefined)",
|
|
973
974
|
value: input.twitch
|
|
975
|
+
}), undefined === input.strava || ("object" === typeof input.strava && null !== input.strava || $report(_exceptionable, {
|
|
976
|
+
path: _path + ".strava",
|
|
977
|
+
expected: "(__type.o16 | undefined)",
|
|
978
|
+
value: input.strava
|
|
979
|
+
})) && $vo25(input.strava, _path + ".strava", true && _exceptionable) || $report(_exceptionable, {
|
|
980
|
+
path: _path + ".strava",
|
|
981
|
+
expected: "(__type.o16 | undefined)",
|
|
982
|
+
value: input.strava
|
|
974
983
|
})].every(flag => flag);
|
|
975
984
|
const $vo20 = (input, _path, _exceptionable = true) => ["string" === typeof input.username || $report(_exceptionable, {
|
|
976
985
|
path: _path + ".username",
|
|
@@ -1041,6 +1050,19 @@ class BitBadgesAPI extends base_js_1.BaseBitBadgesApi {
|
|
|
1041
1050
|
expected: "(bigint | number | string)",
|
|
1042
1051
|
value: input.lastUpdated
|
|
1043
1052
|
})].every(flag => flag);
|
|
1053
|
+
const $vo25 = (input, _path, _exceptionable = true) => ["string" === typeof input.username || $report(_exceptionable, {
|
|
1054
|
+
path: _path + ".username",
|
|
1055
|
+
expected: "string",
|
|
1056
|
+
value: input.username
|
|
1057
|
+
}), "string" === typeof input.id || $report(_exceptionable, {
|
|
1058
|
+
path: _path + ".id",
|
|
1059
|
+
expected: "string",
|
|
1060
|
+
value: input.id
|
|
1061
|
+
}), "string" === typeof input.lastUpdated || "number" === typeof input.lastUpdated || "bigint" === typeof input.lastUpdated || $report(_exceptionable, {
|
|
1062
|
+
path: _path + ".lastUpdated",
|
|
1063
|
+
expected: "(bigint | number | string)",
|
|
1064
|
+
value: input.lastUpdated
|
|
1065
|
+
})].every(flag => flag);
|
|
1044
1066
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $report(true, {
|
|
1045
1067
|
path: _path + "",
|
|
1046
1068
|
expected: "UpdateAccountInfoPayload",
|
|
@@ -5152,13 +5174,14 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5152
5174
|
const validateRes = (input => {
|
|
5153
5175
|
const errors = [];
|
|
5154
5176
|
const __is = input => {
|
|
5155
|
-
const $io0 = input => "string" === typeof input.pluginId && ("Stateless" === input.stateFunctionPreset || "Usernames" === input.stateFunctionPreset || "ClaimToken" === input.stateFunctionPreset || "CustomResponseHandler" === input.stateFunctionPreset || "CompletelyCustom" === input.stateFunctionPreset || "ClaimNumbers" === input.stateFunctionPreset || "StateTransitions" === input.stateFunctionPreset) && "boolean" === typeof input.duplicatesAllowed && (undefined === input.inviteCode || "string" === typeof input.inviteCode) && "boolean" === typeof input.reuseForNonIndexed && "boolean" === typeof input.reuseForLists && "boolean" === typeof input.requiresUserInputs && ("object" === typeof input.metadata && null !== input.metadata && $io1(input.metadata)) && (undefined === input.userInputRedirect || "object" === typeof input.userInputRedirect && null !== input.userInputRedirect && $io2(input.userInputRedirect)) && (undefined === input.userInputsSchema || Array.isArray(input.userInputsSchema) && input.userInputsSchema.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.claimCreatorRedirect || "object" === typeof input.claimCreatorRedirect && null !== input.claimCreatorRedirect && false === Array.isArray(input.claimCreatorRedirect) && $
|
|
5177
|
+
const $io0 = input => "string" === typeof input.pluginId && ("Stateless" === input.stateFunctionPreset || "Usernames" === input.stateFunctionPreset || "ClaimToken" === input.stateFunctionPreset || "CustomResponseHandler" === input.stateFunctionPreset || "CompletelyCustom" === input.stateFunctionPreset || "ClaimNumbers" === input.stateFunctionPreset || "StateTransitions" === input.stateFunctionPreset) && "boolean" === typeof input.duplicatesAllowed && (undefined === input.inviteCode || "string" === typeof input.inviteCode) && "boolean" === typeof input.reuseForNonIndexed && "boolean" === typeof input.reuseForLists && "boolean" === typeof input.requiresUserInputs && ("object" === typeof input.metadata && null !== input.metadata && $io1(input.metadata)) && (undefined === input.userInputRedirect || "object" === typeof input.userInputRedirect && null !== input.userInputRedirect && $io2(input.userInputRedirect)) && (undefined === input.userInputsSchema || Array.isArray(input.userInputsSchema) && input.userInputsSchema.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.claimCreatorRedirect || "object" === typeof input.claimCreatorRedirect && null !== input.claimCreatorRedirect && false === Array.isArray(input.claimCreatorRedirect) && $io5(input.claimCreatorRedirect)) && (undefined === input.publicParamsSchema || Array.isArray(input.publicParamsSchema) && input.publicParamsSchema.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.privateParamsSchema || Array.isArray(input.privateParamsSchema) && input.privateParamsSchema.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.verificationCall || "object" === typeof input.verificationCall && null !== input.verificationCall && $io6(input.verificationCall)) && "boolean" === typeof input.toPublish && (undefined === input.approvedUsers || Array.isArray(input.approvedUsers) && input.approvedUsers.every(elem => "string" === typeof elem));
|
|
5156
5178
|
const $io1 = input => "string" === typeof input.name && "string" === typeof input.description && "string" === typeof input.image && (undefined === input.documentation || "string" === typeof input.documentation) && (undefined === input.sourceCode || "string" === typeof input.sourceCode) && (undefined === input.supportLink || "string" === typeof input.supportLink) && "string" === typeof input.createdBy;
|
|
5157
5179
|
const $io2 = input => "string" === typeof input.baseUri;
|
|
5158
|
-
const $io3 = input => "string" === typeof input.key && "string" === typeof input.label && ("string" === input.type || "number" === input.type || "boolean" === input.type || "url" === input.type || "date" === input.type) && (undefined === input.helper || "string" === typeof input.helper) && (undefined === input.headerField || "boolean" === typeof input.headerField);
|
|
5159
|
-
const $io4 = input =>
|
|
5160
|
-
const $io5 = input =>
|
|
5161
|
-
const $io6 = input => "string" === typeof input.
|
|
5180
|
+
const $io3 = input => "string" === typeof input.key && "string" === typeof input.label && ("string" === input.type || "number" === input.type || "boolean" === input.type || "url" === input.type || "date" === input.type) && (undefined === input.helper || "string" === typeof input.helper) && (undefined === input.headerField || "boolean" === typeof input.headerField) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.defaultValue || "string" === typeof input.defaultValue || "number" === typeof input.defaultValue || "boolean" === typeof input.defaultValue) && (undefined === input.options || Array.isArray(input.options) && input.options.every(elem => "object" === typeof elem && null !== elem && $io4(elem))) && (undefined === input.arrayField || "boolean" === typeof input.arrayField);
|
|
5181
|
+
const $io4 = input => "string" === typeof input.label && ("string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value);
|
|
5182
|
+
const $io5 = input => (undefined === input.toolUri || "string" === typeof input.toolUri) && (undefined === input.tutorialUri || "string" === typeof input.tutorialUri);
|
|
5183
|
+
const $io6 = input => "string" === typeof input.uri && ("POST" === input.method || "GET" === input.method || "PUT" === input.method || "DELETE" === input.method) && (Array.isArray(input.hardcodedInputs) && input.hardcodedInputs.every(elem => "object" === typeof elem && null !== elem && $io7(elem))) && (undefined === input.passAddress || "boolean" === typeof input.passAddress) && (undefined === input.passDiscord || "boolean" === typeof input.passDiscord) && (undefined === input.passEmail || "boolean" === typeof input.passEmail) && (undefined === input.passTwitter || "boolean" === typeof input.passTwitter) && (undefined === input.passGoogle || "boolean" === typeof input.passGoogle) && (undefined === input.passGithub || "boolean" === typeof input.passGithub) && (undefined === input.passStrava || "boolean" === typeof input.passStrava) && (undefined === input.passTwitch || "boolean" === typeof input.passTwitch) && "string" === typeof input.postProcessingJs;
|
|
5184
|
+
const $io7 = input => "string" === typeof input.key && "string" === typeof input.label && (undefined === input.type || "url" === input.type || "date" === input.type) && ("string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value) && (undefined === input.headerField || "boolean" === typeof input.headerField);
|
|
5162
5185
|
return "object" === typeof input && null !== input && $io0(input);
|
|
5163
5186
|
};
|
|
5164
5187
|
if (false === __is(input)) {
|
|
@@ -5226,11 +5249,11 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5226
5249
|
value: input.userInputsSchema
|
|
5227
5250
|
}), undefined === input.claimCreatorRedirect || ("object" === typeof input.claimCreatorRedirect && null !== input.claimCreatorRedirect && false === Array.isArray(input.claimCreatorRedirect) || $report(_exceptionable, {
|
|
5228
5251
|
path: _path + ".claimCreatorRedirect",
|
|
5229
|
-
expected: "(__type.
|
|
5252
|
+
expected: "(__type.o3 | undefined)",
|
|
5230
5253
|
value: input.claimCreatorRedirect
|
|
5231
|
-
})) && $
|
|
5254
|
+
})) && $vo5(input.claimCreatorRedirect, _path + ".claimCreatorRedirect", true && _exceptionable) || $report(_exceptionable, {
|
|
5232
5255
|
path: _path + ".claimCreatorRedirect",
|
|
5233
|
-
expected: "(__type.
|
|
5256
|
+
expected: "(__type.o3 | undefined)",
|
|
5234
5257
|
value: input.claimCreatorRedirect
|
|
5235
5258
|
}), undefined === input.publicParamsSchema || (Array.isArray(input.publicParamsSchema) || $report(_exceptionable, {
|
|
5236
5259
|
path: _path + ".publicParamsSchema",
|
|
@@ -5266,11 +5289,11 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5266
5289
|
value: input.privateParamsSchema
|
|
5267
5290
|
}), undefined === input.verificationCall || ("object" === typeof input.verificationCall && null !== input.verificationCall || $report(_exceptionable, {
|
|
5268
5291
|
path: _path + ".verificationCall",
|
|
5269
|
-
expected: "(__type.
|
|
5292
|
+
expected: "(__type.o4 | undefined)",
|
|
5270
5293
|
value: input.verificationCall
|
|
5271
|
-
})) && $
|
|
5294
|
+
})) && $vo6(input.verificationCall, _path + ".verificationCall", true && _exceptionable) || $report(_exceptionable, {
|
|
5272
5295
|
path: _path + ".verificationCall",
|
|
5273
|
-
expected: "(__type.
|
|
5296
|
+
expected: "(__type.o4 | undefined)",
|
|
5274
5297
|
value: input.verificationCall
|
|
5275
5298
|
}), "boolean" === typeof input.toPublish || $report(_exceptionable, {
|
|
5276
5299
|
path: _path + ".toPublish",
|
|
@@ -5343,8 +5366,45 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5343
5366
|
path: _path + ".headerField",
|
|
5344
5367
|
expected: "(boolean | undefined)",
|
|
5345
5368
|
value: input.headerField
|
|
5369
|
+
}), undefined === input.required || "boolean" === typeof input.required || $report(_exceptionable, {
|
|
5370
|
+
path: _path + ".required",
|
|
5371
|
+
expected: "(boolean | undefined)",
|
|
5372
|
+
value: input.required
|
|
5373
|
+
}), undefined === input.defaultValue || "string" === typeof input.defaultValue || "number" === typeof input.defaultValue || "boolean" === typeof input.defaultValue || $report(_exceptionable, {
|
|
5374
|
+
path: _path + ".defaultValue",
|
|
5375
|
+
expected: "(boolean | number | string | undefined)",
|
|
5376
|
+
value: input.defaultValue
|
|
5377
|
+
}), undefined === input.options || (Array.isArray(input.options) || $report(_exceptionable, {
|
|
5378
|
+
path: _path + ".options",
|
|
5379
|
+
expected: "(Array<__type> | undefined)",
|
|
5380
|
+
value: input.options
|
|
5381
|
+
})) && input.options.map((elem, _index5) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
5382
|
+
path: _path + ".options[" + _index5 + "]",
|
|
5383
|
+
expected: "__type.o2",
|
|
5384
|
+
value: elem
|
|
5385
|
+
})) && $vo4(elem, _path + ".options[" + _index5 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
5386
|
+
path: _path + ".options[" + _index5 + "]",
|
|
5387
|
+
expected: "__type.o2",
|
|
5388
|
+
value: elem
|
|
5389
|
+
})).every(flag => flag) || $report(_exceptionable, {
|
|
5390
|
+
path: _path + ".options",
|
|
5391
|
+
expected: "(Array<__type> | undefined)",
|
|
5392
|
+
value: input.options
|
|
5393
|
+
}), undefined === input.arrayField || "boolean" === typeof input.arrayField || $report(_exceptionable, {
|
|
5394
|
+
path: _path + ".arrayField",
|
|
5395
|
+
expected: "(boolean | undefined)",
|
|
5396
|
+
value: input.arrayField
|
|
5397
|
+
})].every(flag => flag);
|
|
5398
|
+
const $vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.label || $report(_exceptionable, {
|
|
5399
|
+
path: _path + ".label",
|
|
5400
|
+
expected: "string",
|
|
5401
|
+
value: input.label
|
|
5402
|
+
}), "string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value || $report(_exceptionable, {
|
|
5403
|
+
path: _path + ".value",
|
|
5404
|
+
expected: "(boolean | number | string)",
|
|
5405
|
+
value: input.value
|
|
5346
5406
|
})].every(flag => flag);
|
|
5347
|
-
const $
|
|
5407
|
+
const $vo5 = (input, _path, _exceptionable = true) => [undefined === input.toolUri || "string" === typeof input.toolUri || $report(_exceptionable, {
|
|
5348
5408
|
path: _path + ".toolUri",
|
|
5349
5409
|
expected: "(string | undefined)",
|
|
5350
5410
|
value: input.toolUri
|
|
@@ -5353,7 +5413,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5353
5413
|
expected: "(string | undefined)",
|
|
5354
5414
|
value: input.tutorialUri
|
|
5355
5415
|
})].every(flag => flag);
|
|
5356
|
-
const $
|
|
5416
|
+
const $vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.uri || $report(_exceptionable, {
|
|
5357
5417
|
path: _path + ".uri",
|
|
5358
5418
|
expected: "string",
|
|
5359
5419
|
value: input.uri
|
|
@@ -5365,12 +5425,12 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5365
5425
|
path: _path + ".hardcodedInputs",
|
|
5366
5426
|
expected: "Array<JsonBodyInputWithValue>",
|
|
5367
5427
|
value: input.hardcodedInputs
|
|
5368
|
-
})) && input.hardcodedInputs.map((elem,
|
|
5369
|
-
path: _path + ".hardcodedInputs[" +
|
|
5428
|
+
})) && input.hardcodedInputs.map((elem, _index6) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
5429
|
+
path: _path + ".hardcodedInputs[" + _index6 + "]",
|
|
5370
5430
|
expected: "JsonBodyInputWithValue",
|
|
5371
5431
|
value: elem
|
|
5372
|
-
})) && $
|
|
5373
|
-
path: _path + ".hardcodedInputs[" +
|
|
5432
|
+
})) && $vo7(elem, _path + ".hardcodedInputs[" + _index6 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
5433
|
+
path: _path + ".hardcodedInputs[" + _index6 + "]",
|
|
5374
5434
|
expected: "JsonBodyInputWithValue",
|
|
5375
5435
|
value: elem
|
|
5376
5436
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -5401,6 +5461,10 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5401
5461
|
path: _path + ".passGithub",
|
|
5402
5462
|
expected: "(boolean | undefined)",
|
|
5403
5463
|
value: input.passGithub
|
|
5464
|
+
}), undefined === input.passStrava || "boolean" === typeof input.passStrava || $report(_exceptionable, {
|
|
5465
|
+
path: _path + ".passStrava",
|
|
5466
|
+
expected: "(boolean | undefined)",
|
|
5467
|
+
value: input.passStrava
|
|
5404
5468
|
}), undefined === input.passTwitch || "boolean" === typeof input.passTwitch || $report(_exceptionable, {
|
|
5405
5469
|
path: _path + ".passTwitch",
|
|
5406
5470
|
expected: "(boolean | undefined)",
|
|
@@ -5410,7 +5474,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5410
5474
|
expected: "string",
|
|
5411
5475
|
value: input.postProcessingJs
|
|
5412
5476
|
})].every(flag => flag);
|
|
5413
|
-
const $
|
|
5477
|
+
const $vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.key || $report(_exceptionable, {
|
|
5414
5478
|
path: _path + ".key",
|
|
5415
5479
|
expected: "string",
|
|
5416
5480
|
value: input.key
|
|
@@ -5465,13 +5529,14 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5465
5529
|
const validateRes = (input => {
|
|
5466
5530
|
const errors = [];
|
|
5467
5531
|
const __is = input => {
|
|
5468
|
-
const $io0 = input => "string" === typeof input.pluginId && (undefined === input.duplicatesAllowed || "boolean" === typeof input.duplicatesAllowed) && (undefined === input.reuseForNonIndexed || "boolean" === typeof input.reuseForNonIndexed) && (undefined === input.inviteCode || "string" === typeof input.inviteCode) && (undefined === input.removeSelfFromApprovedUsers || "boolean" === typeof input.removeSelfFromApprovedUsers) && (undefined === input.reuseForLists || "boolean" === typeof input.reuseForLists) && (undefined === input.requiresUserInputs || "boolean" === typeof input.requiresUserInputs) && (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && $io1(input.metadata)) && (undefined === input.userInputsSchema || Array.isArray(input.userInputsSchema) && input.userInputsSchema.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && (undefined === input.userInputRedirect || "object" === typeof input.userInputRedirect && null !== input.userInputRedirect && $
|
|
5532
|
+
const $io0 = input => "string" === typeof input.pluginId && (undefined === input.duplicatesAllowed || "boolean" === typeof input.duplicatesAllowed) && (undefined === input.reuseForNonIndexed || "boolean" === typeof input.reuseForNonIndexed) && (undefined === input.inviteCode || "string" === typeof input.inviteCode) && (undefined === input.removeSelfFromApprovedUsers || "boolean" === typeof input.removeSelfFromApprovedUsers) && (undefined === input.reuseForLists || "boolean" === typeof input.reuseForLists) && (undefined === input.requiresUserInputs || "boolean" === typeof input.requiresUserInputs) && (undefined === input.metadata || "object" === typeof input.metadata && null !== input.metadata && $io1(input.metadata)) && (undefined === input.userInputsSchema || Array.isArray(input.userInputsSchema) && input.userInputsSchema.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && (undefined === input.userInputRedirect || "object" === typeof input.userInputRedirect && null !== input.userInputRedirect && $io4(input.userInputRedirect)) && (undefined === input.claimCreatorRedirect || "object" === typeof input.claimCreatorRedirect && null !== input.claimCreatorRedirect && false === Array.isArray(input.claimCreatorRedirect) && $io5(input.claimCreatorRedirect)) && (undefined === input.publicParamsSchema || Array.isArray(input.publicParamsSchema) && input.publicParamsSchema.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && (undefined === input.privateParamsSchema || Array.isArray(input.privateParamsSchema) && input.privateParamsSchema.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && (undefined === input.verificationCall || "object" === typeof input.verificationCall && null !== input.verificationCall && $io6(input.verificationCall)) && (undefined === input.toPublish || "boolean" === typeof input.toPublish) && (undefined === input.approvedUsers || Array.isArray(input.approvedUsers) && input.approvedUsers.every(elem => "string" === typeof elem)) && (undefined === input.rotatePluginSecret || "boolean" === typeof input.rotatePluginSecret);
|
|
5469
5533
|
const $io1 = input => "string" === typeof input.name && "string" === typeof input.description && "string" === typeof input.image && (undefined === input.documentation || "string" === typeof input.documentation) && (undefined === input.sourceCode || "string" === typeof input.sourceCode) && (undefined === input.supportLink || "string" === typeof input.supportLink);
|
|
5470
|
-
const $io2 = input => "string" === typeof input.key && "string" === typeof input.label && ("string" === input.type || "number" === input.type || "boolean" === input.type || "url" === input.type || "date" === input.type) && (undefined === input.helper || "string" === typeof input.helper) && (undefined === input.headerField || "boolean" === typeof input.headerField);
|
|
5471
|
-
const $io3 = input => "string" === typeof input.
|
|
5472
|
-
const $io4 = input =>
|
|
5473
|
-
const $io5 = input =>
|
|
5474
|
-
const $io6 = input => "string" === typeof input.
|
|
5534
|
+
const $io2 = input => "string" === typeof input.key && "string" === typeof input.label && ("string" === input.type || "number" === input.type || "boolean" === input.type || "url" === input.type || "date" === input.type) && (undefined === input.helper || "string" === typeof input.helper) && (undefined === input.headerField || "boolean" === typeof input.headerField) && (undefined === input.required || "boolean" === typeof input.required) && (undefined === input.defaultValue || "string" === typeof input.defaultValue || "number" === typeof input.defaultValue || "boolean" === typeof input.defaultValue) && (undefined === input.options || Array.isArray(input.options) && input.options.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.arrayField || "boolean" === typeof input.arrayField);
|
|
5535
|
+
const $io3 = input => "string" === typeof input.label && ("string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value);
|
|
5536
|
+
const $io4 = input => "string" === typeof input.baseUri;
|
|
5537
|
+
const $io5 = input => (undefined === input.toolUri || "string" === typeof input.toolUri) && (undefined === input.tutorialUri || "string" === typeof input.tutorialUri);
|
|
5538
|
+
const $io6 = input => "string" === typeof input.uri && ("POST" === input.method || "GET" === input.method || "PUT" === input.method || "DELETE" === input.method) && (Array.isArray(input.hardcodedInputs) && input.hardcodedInputs.every(elem => "object" === typeof elem && null !== elem && $io7(elem))) && (undefined === input.passAddress || "boolean" === typeof input.passAddress) && (undefined === input.passDiscord || "boolean" === typeof input.passDiscord) && (undefined === input.passEmail || "boolean" === typeof input.passEmail) && (undefined === input.passTwitter || "boolean" === typeof input.passTwitter) && (undefined === input.passGoogle || "boolean" === typeof input.passGoogle) && (undefined === input.passGithub || "boolean" === typeof input.passGithub) && (undefined === input.passTwitch || "boolean" === typeof input.passTwitch) && (undefined === input.passStrava || "boolean" === typeof input.passStrava) && "string" === typeof input.postProcessingJs;
|
|
5539
|
+
const $io7 = input => "string" === typeof input.key && "string" === typeof input.label && (undefined === input.type || "url" === input.type || "date" === input.type) && ("string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value) && (undefined === input.headerField || "boolean" === typeof input.headerField);
|
|
5475
5540
|
return "object" === typeof input && null !== input && $io0(input);
|
|
5476
5541
|
};
|
|
5477
5542
|
if (false === __is(input)) {
|
|
@@ -5531,19 +5596,19 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5531
5596
|
value: input.userInputsSchema
|
|
5532
5597
|
}), undefined === input.userInputRedirect || ("object" === typeof input.userInputRedirect && null !== input.userInputRedirect || $report(_exceptionable, {
|
|
5533
5598
|
path: _path + ".userInputRedirect",
|
|
5534
|
-
expected: "(__type.
|
|
5599
|
+
expected: "(__type.o2 | undefined)",
|
|
5535
5600
|
value: input.userInputRedirect
|
|
5536
|
-
})) && $
|
|
5601
|
+
})) && $vo4(input.userInputRedirect, _path + ".userInputRedirect", true && _exceptionable) || $report(_exceptionable, {
|
|
5537
5602
|
path: _path + ".userInputRedirect",
|
|
5538
|
-
expected: "(__type.
|
|
5603
|
+
expected: "(__type.o2 | undefined)",
|
|
5539
5604
|
value: input.userInputRedirect
|
|
5540
5605
|
}), undefined === input.claimCreatorRedirect || ("object" === typeof input.claimCreatorRedirect && null !== input.claimCreatorRedirect && false === Array.isArray(input.claimCreatorRedirect) || $report(_exceptionable, {
|
|
5541
5606
|
path: _path + ".claimCreatorRedirect",
|
|
5542
|
-
expected: "(__type.
|
|
5607
|
+
expected: "(__type.o3 | undefined)",
|
|
5543
5608
|
value: input.claimCreatorRedirect
|
|
5544
|
-
})) && $
|
|
5609
|
+
})) && $vo5(input.claimCreatorRedirect, _path + ".claimCreatorRedirect", true && _exceptionable) || $report(_exceptionable, {
|
|
5545
5610
|
path: _path + ".claimCreatorRedirect",
|
|
5546
|
-
expected: "(__type.
|
|
5611
|
+
expected: "(__type.o3 | undefined)",
|
|
5547
5612
|
value: input.claimCreatorRedirect
|
|
5548
5613
|
}), undefined === input.publicParamsSchema || (Array.isArray(input.publicParamsSchema) || $report(_exceptionable, {
|
|
5549
5614
|
path: _path + ".publicParamsSchema",
|
|
@@ -5579,11 +5644,11 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5579
5644
|
value: input.privateParamsSchema
|
|
5580
5645
|
}), undefined === input.verificationCall || ("object" === typeof input.verificationCall && null !== input.verificationCall || $report(_exceptionable, {
|
|
5581
5646
|
path: _path + ".verificationCall",
|
|
5582
|
-
expected: "(__type.
|
|
5647
|
+
expected: "(__type.o4 | undefined)",
|
|
5583
5648
|
value: input.verificationCall
|
|
5584
|
-
})) && $
|
|
5649
|
+
})) && $vo6(input.verificationCall, _path + ".verificationCall", true && _exceptionable) || $report(_exceptionable, {
|
|
5585
5650
|
path: _path + ".verificationCall",
|
|
5586
|
-
expected: "(__type.
|
|
5651
|
+
expected: "(__type.o4 | undefined)",
|
|
5587
5652
|
value: input.verificationCall
|
|
5588
5653
|
}), undefined === input.toPublish || "boolean" === typeof input.toPublish || $report(_exceptionable, {
|
|
5589
5654
|
path: _path + ".toPublish",
|
|
@@ -5651,13 +5716,50 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5651
5716
|
path: _path + ".headerField",
|
|
5652
5717
|
expected: "(boolean | undefined)",
|
|
5653
5718
|
value: input.headerField
|
|
5719
|
+
}), undefined === input.required || "boolean" === typeof input.required || $report(_exceptionable, {
|
|
5720
|
+
path: _path + ".required",
|
|
5721
|
+
expected: "(boolean | undefined)",
|
|
5722
|
+
value: input.required
|
|
5723
|
+
}), undefined === input.defaultValue || "string" === typeof input.defaultValue || "number" === typeof input.defaultValue || "boolean" === typeof input.defaultValue || $report(_exceptionable, {
|
|
5724
|
+
path: _path + ".defaultValue",
|
|
5725
|
+
expected: "(boolean | number | string | undefined)",
|
|
5726
|
+
value: input.defaultValue
|
|
5727
|
+
}), undefined === input.options || (Array.isArray(input.options) || $report(_exceptionable, {
|
|
5728
|
+
path: _path + ".options",
|
|
5729
|
+
expected: "(Array<__type> | undefined)",
|
|
5730
|
+
value: input.options
|
|
5731
|
+
})) && input.options.map((elem, _index5) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
5732
|
+
path: _path + ".options[" + _index5 + "]",
|
|
5733
|
+
expected: "__type.o1",
|
|
5734
|
+
value: elem
|
|
5735
|
+
})) && $vo3(elem, _path + ".options[" + _index5 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
5736
|
+
path: _path + ".options[" + _index5 + "]",
|
|
5737
|
+
expected: "__type.o1",
|
|
5738
|
+
value: elem
|
|
5739
|
+
})).every(flag => flag) || $report(_exceptionable, {
|
|
5740
|
+
path: _path + ".options",
|
|
5741
|
+
expected: "(Array<__type> | undefined)",
|
|
5742
|
+
value: input.options
|
|
5743
|
+
}), undefined === input.arrayField || "boolean" === typeof input.arrayField || $report(_exceptionable, {
|
|
5744
|
+
path: _path + ".arrayField",
|
|
5745
|
+
expected: "(boolean | undefined)",
|
|
5746
|
+
value: input.arrayField
|
|
5747
|
+
})].every(flag => flag);
|
|
5748
|
+
const $vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.label || $report(_exceptionable, {
|
|
5749
|
+
path: _path + ".label",
|
|
5750
|
+
expected: "string",
|
|
5751
|
+
value: input.label
|
|
5752
|
+
}), "string" === typeof input.value || "number" === typeof input.value || "boolean" === typeof input.value || $report(_exceptionable, {
|
|
5753
|
+
path: _path + ".value",
|
|
5754
|
+
expected: "(boolean | number | string)",
|
|
5755
|
+
value: input.value
|
|
5654
5756
|
})].every(flag => flag);
|
|
5655
|
-
const $
|
|
5757
|
+
const $vo4 = (input, _path, _exceptionable = true) => ["string" === typeof input.baseUri || $report(_exceptionable, {
|
|
5656
5758
|
path: _path + ".baseUri",
|
|
5657
5759
|
expected: "string",
|
|
5658
5760
|
value: input.baseUri
|
|
5659
5761
|
})].every(flag => flag);
|
|
5660
|
-
const $
|
|
5762
|
+
const $vo5 = (input, _path, _exceptionable = true) => [undefined === input.toolUri || "string" === typeof input.toolUri || $report(_exceptionable, {
|
|
5661
5763
|
path: _path + ".toolUri",
|
|
5662
5764
|
expected: "(string | undefined)",
|
|
5663
5765
|
value: input.toolUri
|
|
@@ -5666,7 +5768,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5666
5768
|
expected: "(string | undefined)",
|
|
5667
5769
|
value: input.tutorialUri
|
|
5668
5770
|
})].every(flag => flag);
|
|
5669
|
-
const $
|
|
5771
|
+
const $vo6 = (input, _path, _exceptionable = true) => ["string" === typeof input.uri || $report(_exceptionable, {
|
|
5670
5772
|
path: _path + ".uri",
|
|
5671
5773
|
expected: "string",
|
|
5672
5774
|
value: input.uri
|
|
@@ -5678,12 +5780,12 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5678
5780
|
path: _path + ".hardcodedInputs",
|
|
5679
5781
|
expected: "Array<JsonBodyInputWithValue>",
|
|
5680
5782
|
value: input.hardcodedInputs
|
|
5681
|
-
})) && input.hardcodedInputs.map((elem,
|
|
5682
|
-
path: _path + ".hardcodedInputs[" +
|
|
5783
|
+
})) && input.hardcodedInputs.map((elem, _index6) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
5784
|
+
path: _path + ".hardcodedInputs[" + _index6 + "]",
|
|
5683
5785
|
expected: "JsonBodyInputWithValue",
|
|
5684
5786
|
value: elem
|
|
5685
|
-
})) && $
|
|
5686
|
-
path: _path + ".hardcodedInputs[" +
|
|
5787
|
+
})) && $vo7(elem, _path + ".hardcodedInputs[" + _index6 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
5788
|
+
path: _path + ".hardcodedInputs[" + _index6 + "]",
|
|
5687
5789
|
expected: "JsonBodyInputWithValue",
|
|
5688
5790
|
value: elem
|
|
5689
5791
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -5718,12 +5820,16 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
5718
5820
|
path: _path + ".passTwitch",
|
|
5719
5821
|
expected: "(boolean | undefined)",
|
|
5720
5822
|
value: input.passTwitch
|
|
5823
|
+
}), undefined === input.passStrava || "boolean" === typeof input.passStrava || $report(_exceptionable, {
|
|
5824
|
+
path: _path + ".passStrava",
|
|
5825
|
+
expected: "(boolean | undefined)",
|
|
5826
|
+
value: input.passStrava
|
|
5721
5827
|
}), "string" === typeof input.postProcessingJs || $report(_exceptionable, {
|
|
5722
5828
|
path: _path + ".postProcessingJs",
|
|
5723
5829
|
expected: "string",
|
|
5724
5830
|
value: input.postProcessingJs
|
|
5725
5831
|
})].every(flag => flag);
|
|
5726
|
-
const $
|
|
5832
|
+
const $vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.key || $report(_exceptionable, {
|
|
5727
5833
|
path: _path + ".key",
|
|
5728
5834
|
expected: "string",
|
|
5729
5835
|
value: input.key
|
|
@@ -6056,7 +6162,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6056
6162
|
const validateRes = (input => {
|
|
6057
6163
|
const errors = [];
|
|
6058
6164
|
const __is = input => {
|
|
6059
|
-
const $io0 = input => (undefined === input.createdPluginsOnly || "boolean" === typeof input.createdPluginsOnly) && (undefined === input.pluginId || "string" === typeof input.pluginId) && (undefined === input.inviteCode || "string" === typeof input.inviteCode);
|
|
6165
|
+
const $io0 = input => (undefined === input.createdPluginsOnly || "boolean" === typeof input.createdPluginsOnly) && (undefined === input.pluginId || "string" === typeof input.pluginId) && (undefined === input.inviteCode || "string" === typeof input.inviteCode) && (undefined === input.bookmark || "string" === typeof input.bookmark);
|
|
6060
6166
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
6061
6167
|
};
|
|
6062
6168
|
if (false === __is(input)) {
|
|
@@ -6074,6 +6180,10 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
6074
6180
|
path: _path + ".inviteCode",
|
|
6075
6181
|
expected: "(string | undefined)",
|
|
6076
6182
|
value: input.inviteCode
|
|
6183
|
+
}), undefined === input.bookmark || "string" === typeof input.bookmark || $report(_exceptionable, {
|
|
6184
|
+
path: _path + ".bookmark",
|
|
6185
|
+
expected: "(string | undefined)",
|
|
6186
|
+
value: input.bookmark
|
|
6077
6187
|
})].every(flag => flag);
|
|
6078
6188
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $report(true, {
|
|
6079
6189
|
path: _path + "",
|
|
@@ -7508,7 +7618,7 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
7508
7618
|
const validateRes = (input => {
|
|
7509
7619
|
const errors = [];
|
|
7510
7620
|
const __is = input => {
|
|
7511
|
-
const $io0 = input => "boolean" === typeof input.signOutBlockin && (undefined === input.signOutDiscord || "boolean" === typeof input.signOutDiscord) && (undefined === input.signOutTwitter || "boolean" === typeof input.signOutTwitter) && (undefined === input.signOutGoogle || "boolean" === typeof input.signOutGoogle) && (undefined === input.signOutGithub || "boolean" === typeof input.signOutGithub) && (undefined === input.signOutTwitch || "boolean" === typeof input.signOutTwitch);
|
|
7621
|
+
const $io0 = input => "boolean" === typeof input.signOutBlockin && (undefined === input.signOutDiscord || "boolean" === typeof input.signOutDiscord) && (undefined === input.signOutTwitter || "boolean" === typeof input.signOutTwitter) && (undefined === input.signOutGoogle || "boolean" === typeof input.signOutGoogle) && (undefined === input.signOutGithub || "boolean" === typeof input.signOutGithub) && (undefined === input.signOutTwitch || "boolean" === typeof input.signOutTwitch) && (undefined === input.signOutStrava || "boolean" === typeof input.signOutStrava);
|
|
7512
7622
|
return "object" === typeof input && null !== input && $io0(input);
|
|
7513
7623
|
};
|
|
7514
7624
|
if (false === __is(input)) {
|
|
@@ -7538,6 +7648,10 @@ class BitBadgesAdminAPI extends BitBadgesAPI {
|
|
|
7538
7648
|
path: _path + ".signOutTwitch",
|
|
7539
7649
|
expected: "(boolean | undefined)",
|
|
7540
7650
|
value: input.signOutTwitch
|
|
7651
|
+
}), undefined === input.signOutStrava || "boolean" === typeof input.signOutStrava || $report(_exceptionable, {
|
|
7652
|
+
path: _path + ".signOutStrava",
|
|
7653
|
+
expected: "(boolean | undefined)",
|
|
7654
|
+
value: input.signOutStrava
|
|
7541
7655
|
})].every(flag => flag);
|
|
7542
7656
|
return ("object" === typeof input && null !== input || $report(true, {
|
|
7543
7657
|
path: _path + "",
|