bitbadgesjs-sdk 0.3.65 → 0.3.67
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 +2 -4
- package/dist/api-indexer/BitBadgesApi.d.ts.map +1 -1
- package/dist/api-indexer/BitBadgesApi.js +66 -189
- package/dist/api-indexer/BitBadgesApi.js.map +1 -1
- package/dist/api-indexer/docs/docs.d.ts +4 -1
- package/dist/api-indexer/docs/docs.d.ts.map +1 -1
- package/dist/api-indexer/docs/docs.js +6 -2
- 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/docs/interfaces.js.map +1 -1
- package/dist/api-indexer/requests/requests.d.ts +2 -26
- package/dist/api-indexer/requests/requests.d.ts.map +1 -1
- package/dist/api-indexer/requests/requests.js +1 -12
- package/dist/api-indexer/requests/requests.js.map +1 -1
- package/dist/api-indexer/requests/routes.d.ts +0 -2
- package/dist/api-indexer/requests/routes.d.ts.map +1 -1
- package/dist/api-indexer/requests/routes.js +0 -2
- package/dist/api-indexer/requests/routes.js.map +1 -1
- package/dist/chain-drivers/verifySig.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5,9 +5,9 @@ import type { GetAccountsPayload, GetAccountsSuccessResponse, GetFollowDetailsPa
|
|
|
5
5
|
import type { iBitBadgesApi } from './base';
|
|
6
6
|
import { BaseBitBadgesApi } from './base';
|
|
7
7
|
import type { FilterBadgesInCollectionPayload, FilterBadgesInCollectionSuccessResponse, FilterSuggestionsPayload, GetBadgeActivityPayload, GetBadgeActivitySuccessResponse, GetBadgeBalanceByAddressPayload, GetBadgeBalanceByAddressSuccessResponse, GetCollectionsPayload, GetCollectionsSuccessResponse, GetOwnersForBadgePayload, GetOwnersForBadgeSuccessResponse, RefreshMetadataPayload, RefreshMetadataSuccessResponse, RefreshStatusSuccessResponse } from './requests/collections';
|
|
8
|
-
import { GetMapsPayload, GetMapsSuccessResponse } from './requests/maps';
|
|
9
8
|
import { FilterSuggestionsSuccessResponse } from './requests/collections';
|
|
10
|
-
import {
|
|
9
|
+
import { GetMapsPayload, GetMapsSuccessResponse } from './requests/maps';
|
|
10
|
+
import { AddApprovalDetailsToOffChainStoragePayload, AddApprovalDetailsToOffChainStorageSuccessResponse, AddBalancesToOffChainStoragePayload, AddBalancesToOffChainStorageSuccessResponse, AddReviewPayload, AddReviewSuccessResponse, AddToIpfsPayload, AddToIpfsSuccessResponse, BroadcastTxPayload, BroadcastTxSuccessResponse, CheckSignInStatusPayload, CheckSignInStatusSuccessResponse, CompleteClaimPayload, CompleteClaimSuccessResponse, CreateAttestationPayload, CreateAttestationProofPayload, CreateAttestationProofSuccessResponse, CreateAttestationSuccessResponse, CreateClaimPayload, CreateClaimSuccessResponse, CreateDeveloperAppPayload, CreateDeveloperAppSuccessResponse, CreatePluginPayload, CreatePluginSuccessResponse, CreateSIWBBRequestPayload, CreateSIWBBRequestSuccessResponse, DeleteAttestationPayload, DeleteAttestationProofPayload, DeleteAttestationProofSuccessResponse, DeleteAttestationSuccessResponse, DeleteClaimPayload, DeleteClaimSuccessResponse, DeleteDeveloperAppPayload, DeleteDeveloperAppSuccessResponse, DeletePluginPayload, DeletePluginSuccessResponse, DeleteReviewPayload, DeleteReviewSuccessResponse, DeleteSIWBBRequestPayload, DeleteSIWBBRequestSuccessResponse, ExchangeSIWBBAuthorizationCodePayload, ExchangeSIWBBAuthorizationCodeSuccessResponse, FetchMetadataDirectlyPayload, FetchMetadataDirectlySuccessResponse, GenerateAppleWalletPassPayload, GenerateAppleWalletPassSuccessResponse, GenericBlockinVerifyPayload, GenericBlockinVerifySuccessResponse, GenericVerifyAssetsPayload, GenericVerifyAssetsSuccessResponse, GetActiveAuthorizationsPayload, GetActiveAuthorizationsSuccessResponse, GetAttestationPayload, GetAttestationProofPayload, GetAttestationProofSuccessResponse, GetAttestationSuccessResponse, GetBrowseCollectionsPayload, GetBrowseCollectionsSuccessResponse, GetClaimAlertsForCollectionPayload, GetClaimAlertsForCollectionSuccessResponse, GetClaimAttemptStatusSuccessResponse, GetClaimsPayload, GetClaimsSuccessResponse, GetDeveloperAppPayload, GetDeveloperAppSuccessResponse, GetPluginPayload, GetPluginSuccessResponse, GetReservedClaimCodesPayload, GetReservedClaimCodesSuccessResponse, GetSIWBBRequestsForDeveloperAppPayload, GetSIWBBRequestsForDeveloperAppSuccessResponse, GetSearchPayload, GetSearchSuccessResponse, GetSignInChallengePayload, GetSignInChallengeSuccessResponse, GetStatusSuccessResponse, GetTokensFromFaucetPayload, GetTokensFromFaucetSuccessResponse, OauthRevokePayload, OauthRevokeSuccessResponse, RotateSIWBBRequestPayload, RotateSIWBBRequestSuccessResponse, SendClaimAlertsPayload, SendClaimAlertsSuccessResponse, SignOutPayload, SignOutSuccessResponse, SimulateClaimPayload, SimulateClaimSuccessResponse, SimulateTxPayload, SimulateTxSuccessResponse, UpdateAccountInfoPayload, UpdateAccountInfoSuccessResponse, UpdateAttestationPayload, UpdateAttestationSuccessResponse, UpdateClaimPayload, UpdateClaimSuccessResponse, UpdateDeveloperAppPayload, UpdateDeveloperAppSuccessResponse, UpdatePluginPayload, UpdatePluginSuccessResponse, VerifySignInPayload, VerifySignInSuccessResponse } from './requests/requests';
|
|
11
11
|
export declare class BitBadgesAPI<T extends NumberType> extends BaseBitBadgesApi<T> {
|
|
12
12
|
constructor(apiDetails: iBitBadgesApi<T>);
|
|
13
13
|
getStatus(): Promise<GetStatusSuccessResponse<T>>;
|
|
@@ -55,8 +55,6 @@ export declare class BitBadgesAPI<T extends NumberType> extends BaseBitBadgesApi
|
|
|
55
55
|
createClaim(payload: CreateClaimPayload): Promise<CreateClaimSuccessResponse>;
|
|
56
56
|
deleteClaim(payload: DeleteClaimPayload): Promise<DeleteClaimSuccessResponse>;
|
|
57
57
|
updateClaim(payload: UpdateClaimPayload): Promise<UpdateClaimSuccessResponse>;
|
|
58
|
-
getOauthAuthorizationCode(payload: OauthAuthorizePayload): Promise<OauthAuthorizeSuccessResponse>;
|
|
59
|
-
getOauthAccessToken(payload: OauthTokenPayload): Promise<OauthTokenSuccessResponse>;
|
|
60
58
|
revokeOauthAuthorization(payload: OauthRevokePayload): Promise<OauthRevokeSuccessResponse>;
|
|
61
59
|
addBalancesToOffChainStorage(payload: AddBalancesToOffChainStoragePayload): Promise<AddBalancesToOffChainStorageSuccessResponse>;
|
|
62
60
|
getAttestationProof(payload: GetAttestationProofPayload): Promise<GetAttestationProofSuccessResponse<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitBadgesApi.d.ts","sourceRoot":"","sources":["../../src/api-indexer/BitBadgesApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"BitBadgesApi.d.ts","sourceRoot":"","sources":["../../src/api-indexer/BitBadgesApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAK1D,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,KAAK,EACV,yBAAyB,EACzB,iCAAiC,EACjC,yBAAyB,EACzB,iCAAiC,EACjC,sBAAsB,EACtB,8BAA8B,EAC9B,yBAAyB,EACzB,iCAAiC,EAClC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEpJ,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EACV,+BAA+B,EAC/B,uCAAuC,EACvC,wBAAwB,EACxB,uBAAuB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,GAAG,OAAO,CAAC,sCAAsC,CAAC;IA0BjH,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC,CAAC,CAAC;IA+B9G,mBAAmB,CAAC,OAAO,CAAC,EAAE,0BAA0B,GAAG,OAAO,CAAC,kCAAkC,CAAC;IAgCtG,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IA6BvE,mCAAmC,CAC9C,OAAO,EAAE,0CAA0C,GAClD,OAAO,CAAC,kDAAkD,CAAC;IAkCjD,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC;IAgCrG,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAuBhF,OAAO,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAchF;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -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);
|
|
@@ -458,10 +458,10 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
458
458
|
const $io1 = input => ("string" === typeof input.collectionId || "number" === typeof input.collectionId || "bigint" === typeof input.collectionId) && (Array.isArray(input.badgeIds) && input.badgeIds.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
|
|
459
459
|
const $io2 = 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);
|
|
460
460
|
const $io3 = input => "string" === typeof input.title && "string" === typeof input.url && "string" === typeof input.image;
|
|
461
|
-
const $io4 = input => Array.isArray(input.badges) && input.badges.every(elem => "object" === typeof elem && null !== elem && $io5(elem)) && (Array.isArray(input.lists) && input.lists.every(elem => "object" === typeof elem && null !== elem && $io6(elem)));
|
|
461
|
+
const $io4 = input => Array.isArray(input.badges) && input.badges.every(elem => "object" === typeof elem && null !== elem && $io5(elem)) && (Array.isArray(input.lists) && input.lists.every(elem => "object" === typeof elem && null !== elem && $io6(elem))) && (Array.isArray(input.attestations) && input.attestations.every(elem => "object" === typeof elem && null !== elem && $io6(elem)));
|
|
462
462
|
const $io5 = input => "string" === typeof input.title && "string" === typeof input.description && (Array.isArray(input.items) && input.items.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
463
463
|
const $io6 = input => "string" === typeof input.title && "string" === typeof input.description && (Array.isArray(input.items) && input.items.every(elem => "string" === typeof elem));
|
|
464
|
-
const $io7 = input => Array.isArray(input.badges) && input.badges.every(elem => "object" === typeof elem && null !== elem && $io5(elem)) && (Array.isArray(input.lists) && input.lists.every(elem => "object" === typeof elem && null !== elem && $io6(elem)));
|
|
464
|
+
const $io7 = input => Array.isArray(input.badges) && input.badges.every(elem => "object" === typeof elem && null !== elem && $io5(elem)) && (Array.isArray(input.lists) && input.lists.every(elem => "object" === typeof elem && null !== elem && $io6(elem))) && (Array.isArray(input.attestations) && input.attestations.every(elem => "object" === typeof elem && null !== elem && $io6(elem)));
|
|
465
465
|
const $io8 = input => (undefined === input.email || "string" === typeof input.email) && (undefined === input.discord || "object" === typeof input.discord && null !== input.discord && $io9(input.discord)) && (undefined === input.antiPhishingCode || "string" === typeof input.antiPhishingCode) && (undefined === input.preferences || "object" === typeof input.preferences && null !== input.preferences && false === Array.isArray(input.preferences) && $io10(input.preferences));
|
|
466
466
|
const $io9 = input => "string" === typeof input.id && "string" === typeof input.username && (undefined === input.discriminator || "string" === typeof input.discriminator);
|
|
467
467
|
const $io10 = input => (undefined === input.listActivity || "boolean" === typeof input.listActivity) && (undefined === input.transferActivity || "boolean" === typeof input.transferActivity) && (undefined === input.claimAlerts || "boolean" === typeof input.claimAlerts) && (undefined === input.ignoreIfInitiator || "boolean" === typeof input.ignoreIfInitiator);
|
|
@@ -675,6 +675,22 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
675
675
|
path: _path + ".lists",
|
|
676
676
|
expected: "Array<iCustomListPage>",
|
|
677
677
|
value: input.lists
|
|
678
|
+
}), (Array.isArray(input.attestations) || $report(_exceptionable, {
|
|
679
|
+
path: _path + ".attestations",
|
|
680
|
+
expected: "Array<iCustomListPage>",
|
|
681
|
+
value: input.attestations
|
|
682
|
+
})) && input.attestations.map((elem, _index7) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
683
|
+
path: _path + ".attestations[" + _index7 + "]",
|
|
684
|
+
expected: "iCustomListPage",
|
|
685
|
+
value: elem
|
|
686
|
+
})) && $vo6(elem, _path + ".attestations[" + _index7 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
687
|
+
path: _path + ".attestations[" + _index7 + "]",
|
|
688
|
+
expected: "iCustomListPage",
|
|
689
|
+
value: elem
|
|
690
|
+
})).every(flag => flag) || $report(_exceptionable, {
|
|
691
|
+
path: _path + ".attestations",
|
|
692
|
+
expected: "Array<iCustomListPage>",
|
|
693
|
+
value: input.attestations
|
|
678
694
|
})].every(flag => flag);
|
|
679
695
|
const $vo5 = (input, _path, _exceptionable = true) => ["string" === typeof input.title || $report(_exceptionable, {
|
|
680
696
|
path: _path + ".title",
|
|
@@ -688,12 +704,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
688
704
|
path: _path + ".items",
|
|
689
705
|
expected: "Array<iBatchBadgeDetails<NumberType>>",
|
|
690
706
|
value: input.items
|
|
691
|
-
})) && input.items.map((elem,
|
|
692
|
-
path: _path + ".items[" +
|
|
707
|
+
})) && input.items.map((elem, _index8) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
708
|
+
path: _path + ".items[" + _index8 + "]",
|
|
693
709
|
expected: "iBatchBadgeDetails<NumberType>",
|
|
694
710
|
value: elem
|
|
695
|
-
})) && $vo1(elem, _path + ".items[" +
|
|
696
|
-
path: _path + ".items[" +
|
|
711
|
+
})) && $vo1(elem, _path + ".items[" + _index8 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
712
|
+
path: _path + ".items[" + _index8 + "]",
|
|
697
713
|
expected: "iBatchBadgeDetails<NumberType>",
|
|
698
714
|
value: elem
|
|
699
715
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -713,8 +729,8 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
713
729
|
path: _path + ".items",
|
|
714
730
|
expected: "Array<string>",
|
|
715
731
|
value: input.items
|
|
716
|
-
})) && input.items.map((elem,
|
|
717
|
-
path: _path + ".items[" +
|
|
732
|
+
})) && input.items.map((elem, _index9) => "string" === typeof elem || $report(_exceptionable, {
|
|
733
|
+
path: _path + ".items[" + _index9 + "]",
|
|
718
734
|
expected: "string",
|
|
719
735
|
value: elem
|
|
720
736
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -726,12 +742,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
726
742
|
path: _path + ".badges",
|
|
727
743
|
expected: "Array<iCustomPage<NumberType>>",
|
|
728
744
|
value: input.badges
|
|
729
|
-
})) && input.badges.map((elem,
|
|
730
|
-
path: _path + ".badges[" +
|
|
745
|
+
})) && input.badges.map((elem, _index10) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
746
|
+
path: _path + ".badges[" + _index10 + "]",
|
|
731
747
|
expected: "iCustomPage<NumberType>",
|
|
732
748
|
value: elem
|
|
733
|
-
})) && $vo5(elem, _path + ".badges[" +
|
|
734
|
-
path: _path + ".badges[" +
|
|
749
|
+
})) && $vo5(elem, _path + ".badges[" + _index10 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
750
|
+
path: _path + ".badges[" + _index10 + "]",
|
|
735
751
|
expected: "iCustomPage<NumberType>",
|
|
736
752
|
value: elem
|
|
737
753
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -742,18 +758,34 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
742
758
|
path: _path + ".lists",
|
|
743
759
|
expected: "Array<iCustomListPage>",
|
|
744
760
|
value: input.lists
|
|
745
|
-
})) && input.lists.map((elem,
|
|
746
|
-
path: _path + ".lists[" +
|
|
761
|
+
})) && input.lists.map((elem, _index11) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
762
|
+
path: _path + ".lists[" + _index11 + "]",
|
|
747
763
|
expected: "iCustomListPage",
|
|
748
764
|
value: elem
|
|
749
|
-
})) && $vo6(elem, _path + ".lists[" +
|
|
750
|
-
path: _path + ".lists[" +
|
|
765
|
+
})) && $vo6(elem, _path + ".lists[" + _index11 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
766
|
+
path: _path + ".lists[" + _index11 + "]",
|
|
751
767
|
expected: "iCustomListPage",
|
|
752
768
|
value: elem
|
|
753
769
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
754
770
|
path: _path + ".lists",
|
|
755
771
|
expected: "Array<iCustomListPage>",
|
|
756
772
|
value: input.lists
|
|
773
|
+
}), (Array.isArray(input.attestations) || $report(_exceptionable, {
|
|
774
|
+
path: _path + ".attestations",
|
|
775
|
+
expected: "Array<iCustomListPage>",
|
|
776
|
+
value: input.attestations
|
|
777
|
+
})) && input.attestations.map((elem, _index12) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
778
|
+
path: _path + ".attestations[" + _index12 + "]",
|
|
779
|
+
expected: "iCustomListPage",
|
|
780
|
+
value: elem
|
|
781
|
+
})) && $vo6(elem, _path + ".attestations[" + _index12 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
782
|
+
path: _path + ".attestations[" + _index12 + "]",
|
|
783
|
+
expected: "iCustomListPage",
|
|
784
|
+
value: elem
|
|
785
|
+
})).every(flag => flag) || $report(_exceptionable, {
|
|
786
|
+
path: _path + ".attestations",
|
|
787
|
+
expected: "Array<iCustomListPage>",
|
|
788
|
+
value: input.attestations
|
|
757
789
|
})].every(flag => flag);
|
|
758
790
|
const $vo8 = (input, _path, _exceptionable = true) => [undefined === input.email || "string" === typeof input.email || $report(_exceptionable, {
|
|
759
791
|
path: _path + ".email",
|
|
@@ -847,12 +879,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
847
879
|
path: _path + ".scopes",
|
|
848
880
|
expected: "Array<OAuthScopeDetails>",
|
|
849
881
|
value: input.scopes
|
|
850
|
-
})) && input.scopes.map((elem,
|
|
851
|
-
path: _path + ".scopes[" +
|
|
882
|
+
})) && input.scopes.map((elem, _index13) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
883
|
+
path: _path + ".scopes[" + _index13 + "]",
|
|
852
884
|
expected: "OAuthScopeDetails",
|
|
853
885
|
value: elem
|
|
854
|
-
})) && $vo13(elem, _path + ".scopes[" +
|
|
855
|
-
path: _path + ".scopes[" +
|
|
886
|
+
})) && $vo13(elem, _path + ".scopes[" + _index13 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
887
|
+
path: _path + ".scopes[" + _index13 + "]",
|
|
856
888
|
expected: "OAuthScopeDetails",
|
|
857
889
|
value: elem
|
|
858
890
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -890,12 +922,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
890
922
|
path: _path + ".scopes",
|
|
891
923
|
expected: "Array<OAuthScopeDetails>",
|
|
892
924
|
value: input.scopes
|
|
893
|
-
})) && input.scopes.map((elem,
|
|
894
|
-
path: _path + ".scopes[" +
|
|
925
|
+
})) && input.scopes.map((elem, _index14) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
926
|
+
path: _path + ".scopes[" + _index14 + "]",
|
|
895
927
|
expected: "OAuthScopeDetails",
|
|
896
928
|
value: elem
|
|
897
|
-
})) && $vo13(elem, _path + ".scopes[" +
|
|
898
|
-
path: _path + ".scopes[" +
|
|
929
|
+
})) && $vo13(elem, _path + ".scopes[" + _index14 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
930
|
+
path: _path + ".scopes[" + _index14 + "]",
|
|
899
931
|
expected: "OAuthScopeDetails",
|
|
900
932
|
value: elem
|
|
901
933
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -915,12 +947,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
915
947
|
path: _path + ".scopes",
|
|
916
948
|
expected: "Array<OAuthScopeDetails>",
|
|
917
949
|
value: input.scopes
|
|
918
|
-
})) && input.scopes.map((elem,
|
|
919
|
-
path: _path + ".scopes[" +
|
|
950
|
+
})) && input.scopes.map((elem, _index15) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
951
|
+
path: _path + ".scopes[" + _index15 + "]",
|
|
920
952
|
expected: "OAuthScopeDetails",
|
|
921
953
|
value: elem
|
|
922
|
-
})) && $vo13(elem, _path + ".scopes[" +
|
|
923
|
-
path: _path + ".scopes[" +
|
|
954
|
+
})) && $vo13(elem, _path + ".scopes[" + _index15 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
955
|
+
path: _path + ".scopes[" + _index15 + "]",
|
|
924
956
|
expected: "OAuthScopeDetails",
|
|
925
957
|
value: elem
|
|
926
958
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -940,12 +972,12 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
940
972
|
path: _path + ".scopes",
|
|
941
973
|
expected: "Array<OAuthScopeDetails>",
|
|
942
974
|
value: input.scopes
|
|
943
|
-
})) && input.scopes.map((elem,
|
|
944
|
-
path: _path + ".scopes[" +
|
|
975
|
+
})) && input.scopes.map((elem, _index16) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
976
|
+
path: _path + ".scopes[" + _index16 + "]",
|
|
945
977
|
expected: "OAuthScopeDetails",
|
|
946
978
|
value: elem
|
|
947
|
-
})) && $vo13(elem, _path + ".scopes[" +
|
|
948
|
-
path: _path + ".scopes[" +
|
|
979
|
+
})) && $vo13(elem, _path + ".scopes[" + _index16 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
980
|
+
path: _path + ".scopes[" + _index16 + "]",
|
|
949
981
|
expected: "OAuthScopeDetails",
|
|
950
982
|
value: elem
|
|
951
983
|
})).every(flag => flag) || $report(_exceptionable, {
|
|
@@ -4443,161 +4475,6 @@ class BitBadgesAPI extends base_1.BaseBitBadgesApi {
|
|
|
4443
4475
|
return Promise.reject(error);
|
|
4444
4476
|
}
|
|
4445
4477
|
}
|
|
4446
|
-
async getOauthAuthorizationCode(payload) {
|
|
4447
|
-
try {
|
|
4448
|
-
const validateRes = (input => {
|
|
4449
|
-
const errors = [];
|
|
4450
|
-
const __is = input => {
|
|
4451
|
-
const $io0 = input => "string" === typeof input.response_type && (Array.isArray(input.scopes) && input.scopes.every(elem => "object" === typeof elem && null !== elem && $io1(elem))) && "string" === typeof input.client_id && "string" === typeof input.redirect_uri && (undefined === input.state || "string" === typeof input.state);
|
|
4452
|
-
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));
|
|
4453
|
-
const $io2 = input => true;
|
|
4454
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
4455
|
-
};
|
|
4456
|
-
if (false === __is(input)) {
|
|
4457
|
-
const $report = typia_1.default.validate.report(errors);
|
|
4458
|
-
((input, _path, _exceptionable = true) => {
|
|
4459
|
-
const $vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.response_type || $report(_exceptionable, {
|
|
4460
|
-
path: _path + ".response_type",
|
|
4461
|
-
expected: "string",
|
|
4462
|
-
value: input.response_type
|
|
4463
|
-
}), (Array.isArray(input.scopes) || $report(_exceptionable, {
|
|
4464
|
-
path: _path + ".scopes",
|
|
4465
|
-
expected: "Array<OAuthScopeDetails>",
|
|
4466
|
-
value: input.scopes
|
|
4467
|
-
})) && input.scopes.map((elem, _index1) => ("object" === typeof elem && null !== elem || $report(_exceptionable, {
|
|
4468
|
-
path: _path + ".scopes[" + _index1 + "]",
|
|
4469
|
-
expected: "OAuthScopeDetails",
|
|
4470
|
-
value: elem
|
|
4471
|
-
})) && $vo1(elem, _path + ".scopes[" + _index1 + "]", true && _exceptionable) || $report(_exceptionable, {
|
|
4472
|
-
path: _path + ".scopes[" + _index1 + "]",
|
|
4473
|
-
expected: "OAuthScopeDetails",
|
|
4474
|
-
value: elem
|
|
4475
|
-
})).every(flag => flag) || $report(_exceptionable, {
|
|
4476
|
-
path: _path + ".scopes",
|
|
4477
|
-
expected: "Array<OAuthScopeDetails>",
|
|
4478
|
-
value: input.scopes
|
|
4479
|
-
}), "string" === typeof input.client_id || $report(_exceptionable, {
|
|
4480
|
-
path: _path + ".client_id",
|
|
4481
|
-
expected: "string",
|
|
4482
|
-
value: input.client_id
|
|
4483
|
-
}), "string" === typeof input.redirect_uri || $report(_exceptionable, {
|
|
4484
|
-
path: _path + ".redirect_uri",
|
|
4485
|
-
expected: "string",
|
|
4486
|
-
value: input.redirect_uri
|
|
4487
|
-
}), undefined === input.state || "string" === typeof input.state || $report(_exceptionable, {
|
|
4488
|
-
path: _path + ".state",
|
|
4489
|
-
expected: "(string | undefined)",
|
|
4490
|
-
value: input.state
|
|
4491
|
-
})].every(flag => flag);
|
|
4492
|
-
const $vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.scopeName || $report(_exceptionable, {
|
|
4493
|
-
path: _path + ".scopeName",
|
|
4494
|
-
expected: "string",
|
|
4495
|
-
value: input.scopeName
|
|
4496
|
-
}), undefined === input.options || ("object" === typeof input.options && null !== input.options && false === Array.isArray(input.options) || $report(_exceptionable, {
|
|
4497
|
-
path: _path + ".options",
|
|
4498
|
-
expected: "(object | undefined)",
|
|
4499
|
-
value: input.options
|
|
4500
|
-
})) && $vo2(input.options, _path + ".options", true && _exceptionable) || $report(_exceptionable, {
|
|
4501
|
-
path: _path + ".options",
|
|
4502
|
-
expected: "(object | undefined)",
|
|
4503
|
-
value: input.options
|
|
4504
|
-
})].every(flag => flag);
|
|
4505
|
-
const $vo2 = (input, _path, _exceptionable = true) => true;
|
|
4506
|
-
return ("object" === typeof input && null !== input || $report(true, {
|
|
4507
|
-
path: _path + "",
|
|
4508
|
-
expected: "OauthAuthorizePayload",
|
|
4509
|
-
value: input
|
|
4510
|
-
})) && $vo0(input, _path + "", true) || $report(true, {
|
|
4511
|
-
path: _path + "",
|
|
4512
|
-
expected: "OauthAuthorizePayload",
|
|
4513
|
-
value: input
|
|
4514
|
-
});
|
|
4515
|
-
})(input, "$input", true);
|
|
4516
|
-
}
|
|
4517
|
-
const success = 0 === errors.length;
|
|
4518
|
-
return {
|
|
4519
|
-
success,
|
|
4520
|
-
errors,
|
|
4521
|
-
data: success ? input : undefined
|
|
4522
|
-
};
|
|
4523
|
-
})(payload ?? {});
|
|
4524
|
-
if (!validateRes.success) {
|
|
4525
|
-
throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
|
|
4526
|
-
}
|
|
4527
|
-
const response = await this.axios.post(`${this.BACKEND_URL}${routes_1.BitBadgesApiRoutes.OauthAuthorizeRoute()}`, payload);
|
|
4528
|
-
console.log(response.data);
|
|
4529
|
-
return new requests_1.OauthAuthorizeSuccessResponse(response.data);
|
|
4530
|
-
}
|
|
4531
|
-
catch (error) {
|
|
4532
|
-
await this.handleApiError(error);
|
|
4533
|
-
return Promise.reject(error);
|
|
4534
|
-
}
|
|
4535
|
-
}
|
|
4536
|
-
async getOauthAccessToken(payload) {
|
|
4537
|
-
try {
|
|
4538
|
-
const validateRes = (input => {
|
|
4539
|
-
const errors = [];
|
|
4540
|
-
const __is = input => {
|
|
4541
|
-
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);
|
|
4542
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
4543
|
-
};
|
|
4544
|
-
if (false === __is(input)) {
|
|
4545
|
-
const $report = typia_1.default.validate.report(errors);
|
|
4546
|
-
((input, _path, _exceptionable = true) => {
|
|
4547
|
-
const $vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.grant_type || $report(_exceptionable, {
|
|
4548
|
-
path: _path + ".grant_type",
|
|
4549
|
-
expected: "string",
|
|
4550
|
-
value: input.grant_type
|
|
4551
|
-
}), "string" === typeof input.client_id || $report(_exceptionable, {
|
|
4552
|
-
path: _path + ".client_id",
|
|
4553
|
-
expected: "string",
|
|
4554
|
-
value: input.client_id
|
|
4555
|
-
}), "string" === typeof input.client_secret || $report(_exceptionable, {
|
|
4556
|
-
path: _path + ".client_secret",
|
|
4557
|
-
expected: "string",
|
|
4558
|
-
value: input.client_secret
|
|
4559
|
-
}), undefined === input.code || "string" === typeof input.code || $report(_exceptionable, {
|
|
4560
|
-
path: _path + ".code",
|
|
4561
|
-
expected: "(string | undefined)",
|
|
4562
|
-
value: input.code
|
|
4563
|
-
}), undefined === input.redirect_uri || "string" === typeof input.redirect_uri || $report(_exceptionable, {
|
|
4564
|
-
path: _path + ".redirect_uri",
|
|
4565
|
-
expected: "(string | undefined)",
|
|
4566
|
-
value: input.redirect_uri
|
|
4567
|
-
}), undefined === input.refresh_token || "string" === typeof input.refresh_token || $report(_exceptionable, {
|
|
4568
|
-
path: _path + ".refresh_token",
|
|
4569
|
-
expected: "(string | undefined)",
|
|
4570
|
-
value: input.refresh_token
|
|
4571
|
-
})].every(flag => flag);
|
|
4572
|
-
return ("object" === typeof input && null !== input || $report(true, {
|
|
4573
|
-
path: _path + "",
|
|
4574
|
-
expected: "OauthTokenPayload",
|
|
4575
|
-
value: input
|
|
4576
|
-
})) && $vo0(input, _path + "", true) || $report(true, {
|
|
4577
|
-
path: _path + "",
|
|
4578
|
-
expected: "OauthTokenPayload",
|
|
4579
|
-
value: input
|
|
4580
|
-
});
|
|
4581
|
-
})(input, "$input", true);
|
|
4582
|
-
}
|
|
4583
|
-
const success = 0 === errors.length;
|
|
4584
|
-
return {
|
|
4585
|
-
success,
|
|
4586
|
-
errors,
|
|
4587
|
-
data: success ? input : undefined
|
|
4588
|
-
};
|
|
4589
|
-
})(payload ?? {});
|
|
4590
|
-
if (!validateRes.success) {
|
|
4591
|
-
throw new Error('Invalid payload: ' + JSON.stringify(validateRes.errors));
|
|
4592
|
-
}
|
|
4593
|
-
const response = await this.axios.post(`${this.BACKEND_URL}${routes_1.BitBadgesApiRoutes.OauthTokenRoute()}`, payload);
|
|
4594
|
-
return new requests_1.OauthTokenSuccessResponse(response.data);
|
|
4595
|
-
}
|
|
4596
|
-
catch (error) {
|
|
4597
|
-
await this.handleApiError(error);
|
|
4598
|
-
return Promise.reject(error);
|
|
4599
|
-
}
|
|
4600
|
-
}
|
|
4601
4478
|
async revokeOauthAuthorization(payload) {
|
|
4602
4479
|
try {
|
|
4603
4480
|
const validateRes = (input => {
|