@openfort/openfort-node 0.6.9 → 0.6.11
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/apis/policiesApiWrapper.d.ts +10 -0
- package/dist/apis/policiesApiWrapper.js +14 -0
- package/dist/apis/policiesApiWrapper.js.map +1 -1
- package/dist/generated/apis/AccountsApi.d.ts +1 -1
- package/dist/generated/apis/AccountsApi.js +1 -1
- package/dist/generated/apis/ContractsApi.d.ts +3 -3
- package/dist/generated/apis/ContractsApi.js +3 -3
- package/dist/generated/apis/InventoriesApi.d.ts +6 -6
- package/dist/generated/apis/InventoriesApi.js +6 -6
- package/dist/generated/apis/OAuthApi.d.ts +102 -0
- package/dist/generated/apis/OAuthApi.js +358 -0
- package/dist/generated/apis/OAuthApi.js.map +1 -0
- package/dist/generated/apis/PlayersApi.d.ts +8 -8
- package/dist/generated/apis/PlayersApi.js +8 -8
- package/dist/generated/apis/PoliciesApi.d.ts +34 -7
- package/dist/generated/apis/PoliciesApi.js +120 -7
- package/dist/generated/apis/PoliciesApi.js.map +1 -1
- package/dist/generated/apis/PolicyRulesApi.d.ts +1 -1
- package/dist/generated/apis/PolicyRulesApi.js +1 -1
- package/dist/generated/apis/SessionsApi.d.ts +3 -3
- package/dist/generated/apis/SessionsApi.js +3 -3
- package/dist/generated/apis/TransactionIntentsApi.d.ts +6 -6
- package/dist/generated/apis/TransactionIntentsApi.js +6 -6
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/index.js +2 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/models/AccelbyteOauthConfig.d.ts +48 -0
- package/dist/generated/models/AccelbyteOauthConfig.js +59 -0
- package/dist/generated/models/AccelbyteOauthConfig.js.map +1 -0
- package/dist/generated/models/AccountListQueries.d.ts +1 -1
- package/dist/generated/models/AuthResponse.d.ts +6 -0
- package/dist/generated/models/AuthResponse.js.map +1 -1
- package/dist/generated/models/CancelTransferOwnershipRequest.d.ts +1 -1
- package/dist/generated/models/CompleteRecoveryRequest.d.ts +1 -1
- package/dist/generated/models/CreateAccountRequest.d.ts +1 -1
- package/dist/generated/models/CreatePlayerSessionRequest.d.ts +1 -1
- package/dist/generated/models/CreateSessionRequest.d.ts +2 -2
- package/dist/generated/models/CreateTransactionIntentRequest.d.ts +2 -2
- package/dist/generated/models/EstimateTransactionIntentGasResult.d.ts +16 -0
- package/dist/generated/models/EstimateTransactionIntentGasResult.js +24 -0
- package/dist/generated/models/EstimateTransactionIntentGasResult.js.map +1 -1
- package/dist/generated/models/OAuthConfigListResponse.d.ts +35 -0
- package/dist/generated/models/OAuthConfigListResponse.js +35 -0
- package/dist/generated/models/OAuthConfigListResponse.js.map +1 -0
- package/dist/generated/models/OAuthConfigRequest.d.ts +32 -0
- package/dist/generated/models/OAuthConfigRequest.js +35 -0
- package/dist/generated/models/OAuthConfigRequest.js.map +1 -0
- package/dist/generated/models/OAuthConfigResponse.d.ts +32 -0
- package/dist/generated/models/OAuthConfigResponse.js +35 -0
- package/dist/generated/models/OAuthConfigResponse.js.map +1 -0
- package/dist/generated/models/OAuthProvider.d.ts +15 -0
- package/dist/generated/models/OAuthProvider.js +14 -0
- package/dist/generated/models/OAuthProvider.js.map +1 -0
- package/dist/generated/models/OAuthProviderACCELBYTE.d.ts +12 -0
- package/dist/generated/models/OAuthProviderACCELBYTE.js +14 -0
- package/dist/generated/models/OAuthProviderACCELBYTE.js.map +1 -0
- package/dist/generated/models/OAuthRequest.d.ts +34 -0
- package/dist/generated/models/OAuthRequest.js +35 -0
- package/dist/generated/models/OAuthRequest.js.map +1 -0
- package/dist/generated/models/ObjectSerializer.d.ts +7 -0
- package/dist/generated/models/ObjectSerializer.js +19 -0
- package/dist/generated/models/ObjectSerializer.js.map +1 -1
- package/dist/generated/models/PlayerCancelTransferOwnershipRequest.d.ts +1 -1
- package/dist/generated/models/PlayerInventoryListQueries.d.ts +1 -1
- package/dist/generated/models/PlayerTransferOwnershipRequest.d.ts +2 -2
- package/dist/generated/models/Policy.d.ts +1 -0
- package/dist/generated/models/Policy.js +6 -0
- package/dist/generated/models/Policy.js.map +1 -1
- package/dist/generated/models/PolicyListQueries.d.ts +4 -0
- package/dist/generated/models/PolicyListQueries.js +6 -0
- package/dist/generated/models/PolicyListQueries.js.map +1 -1
- package/dist/generated/models/PolicyResponse.d.ts +1 -0
- package/dist/generated/models/PolicyResponse.js +6 -0
- package/dist/generated/models/PolicyResponse.js.map +1 -1
- package/dist/generated/models/PolicyRuleListQueries.d.ts +1 -1
- package/dist/generated/models/PolicyStrategyRequest.d.ts +3 -3
- package/dist/generated/models/ResponseResponse.d.ts +2 -6
- package/dist/generated/models/ResponseResponse.js.map +1 -1
- package/dist/generated/models/RevokeSessionPlayerRequest.d.ts +1 -1
- package/dist/generated/models/RevokeSessionRequest.d.ts +2 -2
- package/dist/generated/models/SessionListQueries.d.ts +1 -1
- package/dist/generated/models/StartRecoveryRequest.d.ts +1 -1
- package/dist/generated/models/TransactionIntentListQueries.d.ts +2 -2
- package/dist/generated/models/TransactionIntentResponsePlayer.d.ts +1 -1
- package/dist/generated/models/TransactionIntentResponsePlayer.js +1 -1
- package/dist/generated/models/TransactionIntentResponsePolicy.d.ts +2 -1
- package/dist/generated/models/TransactionIntentResponsePolicy.js +7 -1
- package/dist/generated/models/TransactionIntentResponsePolicy.js.map +1 -1
- package/dist/generated/models/TransferOwnershipRequest.d.ts +1 -1
- package/dist/generated/models/all.d.ts +7 -0
- package/dist/generated/models/all.js +7 -0
- package/dist/generated/models/all.js.map +1 -1
- package/dist/generated/types/ObjectParamAPI.d.ts +172 -34
- package/dist/generated/types/ObjectParamAPI.js +84 -15
- package/dist/generated/types/ObjectParamAPI.js.map +1 -1
- package/dist/generated/types/ObservableAPI.d.ts +96 -35
- package/dist/generated/types/ObservableAPI.js +215 -37
- package/dist/generated/types/ObservableAPI.js.map +1 -1
- package/dist/generated/types/PromiseAPI.d.ts +94 -35
- package/dist/generated/types/PromiseAPI.js +128 -48
- package/dist/generated/types/PromiseAPI.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/rome.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObservableTransactionIntentsApi = exports.ObservableSessionsApi = exports.ObservablePolicyRulesApi = exports.ObservablePoliciesApi = exports.ObservablePlayersAuthenticationApi = exports.ObservablePlayersApi = exports.ObservableInventoriesApi = exports.ObservableGoogleAuthenticationApi = exports.ObservableContractsApi = exports.ObservableConfigAuthenticationApi = exports.ObservableAuthenticationApi = exports.ObservableAccountsApi = void 0;
|
|
3
|
+
exports.ObservableTransactionIntentsApi = exports.ObservableSessionsApi = exports.ObservablePolicyRulesApi = exports.ObservablePoliciesApi = exports.ObservablePlayersAuthenticationApi = exports.ObservablePlayersApi = exports.ObservableOAuthApi = exports.ObservableInventoriesApi = exports.ObservableGoogleAuthenticationApi = exports.ObservableContractsApi = exports.ObservableConfigAuthenticationApi = exports.ObservableAuthenticationApi = exports.ObservableAccountsApi = void 0;
|
|
4
4
|
const rxjsStub_1 = require("../rxjsStub");
|
|
5
5
|
const rxjsStub_2 = require("../rxjsStub");
|
|
6
6
|
const AccountsApi_1 = require("../apis/AccountsApi");
|
|
@@ -99,7 +99,7 @@ class ObservableAccountsApi {
|
|
|
99
99
|
/**
|
|
100
100
|
* Returns a list of accounts for the given player. The accounts are returned sorted by creation date, with the most recently created accounts appearing first. By default, a maximum of ten accounts are shown per page.
|
|
101
101
|
* List accounts of a player.
|
|
102
|
-
* @param player Specifies the unique player ID
|
|
102
|
+
* @param player Specifies the unique player ID (starts with pla_)
|
|
103
103
|
* @param limit Specifies the maximum number of records to return.
|
|
104
104
|
* @param skip Specifies the offset for the first records to return.
|
|
105
105
|
* @param order Specifies the order in which to sort the results.
|
|
@@ -336,7 +336,7 @@ class ObservableContractsApi {
|
|
|
336
336
|
/**
|
|
337
337
|
* Delete a contract from the project by providing its contract id.
|
|
338
338
|
* Deletes a contract object.
|
|
339
|
-
* @param id Specifies the unique contract ID.
|
|
339
|
+
* @param id Specifies the unique contract ID (starts with con_).
|
|
340
340
|
*/
|
|
341
341
|
deleteContract(id, _options) {
|
|
342
342
|
const requestContextPromise = this.requestFactory.deleteContract(id, _options);
|
|
@@ -357,7 +357,7 @@ class ObservableContractsApi {
|
|
|
357
357
|
/**
|
|
358
358
|
* Retrieve a contract by providing their contract id.
|
|
359
359
|
* Get a contract.
|
|
360
|
-
* @param id Specifies the unique contract ID.
|
|
360
|
+
* @param id Specifies the unique contract ID (starts with con_).
|
|
361
361
|
*/
|
|
362
362
|
getContract(id, _options) {
|
|
363
363
|
const requestContextPromise = this.requestFactory.getContract(id, _options);
|
|
@@ -404,7 +404,7 @@ class ObservableContractsApi {
|
|
|
404
404
|
}
|
|
405
405
|
/**
|
|
406
406
|
* Updates a contract object.
|
|
407
|
-
* @param id Specifies the unique contract ID.
|
|
407
|
+
* @param id Specifies the unique contract ID (starts with con_).
|
|
408
408
|
* @param updateContractRequest
|
|
409
409
|
*/
|
|
410
410
|
updateContract(id, updateContractRequest, _options) {
|
|
@@ -570,12 +570,12 @@ class ObservableInventoriesApi {
|
|
|
570
570
|
}
|
|
571
571
|
/**
|
|
572
572
|
* Get cryptocurrency list of player.
|
|
573
|
-
* @param id Specifies the unique player ID.
|
|
573
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
574
574
|
* @param chainId Filter by chain id.
|
|
575
575
|
* @param limit Specifies the maximum number of records to return.
|
|
576
576
|
* @param skip Specifies the offset for the first records to return.
|
|
577
577
|
* @param order Specifies the order in which to sort the results.
|
|
578
|
-
* @param contractId Filter by contract ID.
|
|
578
|
+
* @param contractId Filter by contract ID (starts with con_).
|
|
579
579
|
*/
|
|
580
580
|
getPlayerCryptoCurrencyInventory(id, chainId, limit, skip, order, contractId, _options) {
|
|
581
581
|
const requestContextPromise = this.requestFactory.getPlayerCryptoCurrencyInventory(id, chainId, limit, skip, order, contractId, _options);
|
|
@@ -595,7 +595,7 @@ class ObservableInventoriesApi {
|
|
|
595
595
|
}
|
|
596
596
|
/**
|
|
597
597
|
* Get inventory of player.
|
|
598
|
-
* @param id Specifies the unique player ID.
|
|
598
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
599
599
|
* @param chainId Filter by chain id.
|
|
600
600
|
*/
|
|
601
601
|
getPlayerInventory(id, chainId, _options) {
|
|
@@ -616,7 +616,7 @@ class ObservableInventoriesApi {
|
|
|
616
616
|
}
|
|
617
617
|
/**
|
|
618
618
|
* Get native token list of player.
|
|
619
|
-
* @param id Specifies the unique player ID.
|
|
619
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
620
620
|
* @param chainId Filter by chain id.
|
|
621
621
|
*/
|
|
622
622
|
getPlayerNativeInventory(id, chainId, _options) {
|
|
@@ -637,12 +637,12 @@ class ObservableInventoriesApi {
|
|
|
637
637
|
}
|
|
638
638
|
/**
|
|
639
639
|
* Get NFTs list of player.
|
|
640
|
-
* @param id Specifies the unique player ID.
|
|
640
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
641
641
|
* @param chainId Filter by chain id.
|
|
642
642
|
* @param limit Specifies the maximum number of records to return.
|
|
643
643
|
* @param skip Specifies the offset for the first records to return.
|
|
644
644
|
* @param order Specifies the order in which to sort the results.
|
|
645
|
-
* @param contractId Filter by contract ID.
|
|
645
|
+
* @param contractId Filter by contract ID (starts with con_).
|
|
646
646
|
*/
|
|
647
647
|
getPlayerNftInventory(id, chainId, limit, skip, order, contractId, _options) {
|
|
648
648
|
const requestContextPromise = this.requestFactory.getPlayerNftInventory(id, chainId, limit, skip, order, contractId, _options);
|
|
@@ -662,6 +662,143 @@ class ObservableInventoriesApi {
|
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
664
|
exports.ObservableInventoriesApi = ObservableInventoriesApi;
|
|
665
|
+
const OAuthApi_1 = require("../apis/OAuthApi");
|
|
666
|
+
class ObservableOAuthApi {
|
|
667
|
+
constructor(configuration, requestFactory, responseProcessor) {
|
|
668
|
+
this.configuration = configuration;
|
|
669
|
+
this.requestFactory = requestFactory || new OAuthApi_1.OAuthApiRequestFactory(configuration);
|
|
670
|
+
this.responseProcessor = responseProcessor || new OAuthApi_1.OAuthApiResponseProcessor();
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* The endpoint verifies the token generated by OAuth provider, creates or retrieves a player based on his email, and returns the jwt token for the player together with the player id.
|
|
674
|
+
* Authorize user with token.
|
|
675
|
+
* @param provider OAuth provider
|
|
676
|
+
* @param oAuthRequest Request body
|
|
677
|
+
*/
|
|
678
|
+
auth(provider, oAuthRequest, _options) {
|
|
679
|
+
const requestContextPromise = this.requestFactory.auth(provider, oAuthRequest, _options);
|
|
680
|
+
// build promise chain
|
|
681
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
682
|
+
for (let middleware of this.configuration.middleware) {
|
|
683
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
684
|
+
}
|
|
685
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
686
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
687
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
688
|
+
for (let middleware of this.configuration.middleware) {
|
|
689
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
690
|
+
}
|
|
691
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.auth(rsp)));
|
|
692
|
+
}));
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* The endpoint creates oauth configuration for the current project environment.
|
|
696
|
+
* Create oauth configuration.
|
|
697
|
+
* @param provider Specifies the oauth provider type.
|
|
698
|
+
* @param oAuthConfigRequest Specifies the oauth provider specific configuration.
|
|
699
|
+
*/
|
|
700
|
+
createOAuthConfig(provider, oAuthConfigRequest, _options) {
|
|
701
|
+
const requestContextPromise = this.requestFactory.createOAuthConfig(provider, oAuthConfigRequest, _options);
|
|
702
|
+
// build promise chain
|
|
703
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
704
|
+
for (let middleware of this.configuration.middleware) {
|
|
705
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
706
|
+
}
|
|
707
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
708
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
709
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
710
|
+
for (let middleware of this.configuration.middleware) {
|
|
711
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
712
|
+
}
|
|
713
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.createOAuthConfig(rsp)));
|
|
714
|
+
}));
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* The endpoint deletes oauth configuration for specified provider for the current project environment.
|
|
718
|
+
* Delete oauth configuration.
|
|
719
|
+
* @param provider Specifies the oauth provider type.
|
|
720
|
+
*/
|
|
721
|
+
deleteOAuthConfig(provider, _options) {
|
|
722
|
+
const requestContextPromise = this.requestFactory.deleteOAuthConfig(provider, _options);
|
|
723
|
+
// build promise chain
|
|
724
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
725
|
+
for (let middleware of this.configuration.middleware) {
|
|
726
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
727
|
+
}
|
|
728
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
729
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
730
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
731
|
+
for (let middleware of this.configuration.middleware) {
|
|
732
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
733
|
+
}
|
|
734
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteOAuthConfig(rsp)));
|
|
735
|
+
}));
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* The endpoint retrieves oauth configuration for specified provider for the current project environment.
|
|
739
|
+
* Get oauth configuration.
|
|
740
|
+
* @param provider Specifies the oauth provider type.
|
|
741
|
+
*/
|
|
742
|
+
getOAuthConfig(provider, _options) {
|
|
743
|
+
const requestContextPromise = this.requestFactory.getOAuthConfig(provider, _options);
|
|
744
|
+
// build promise chain
|
|
745
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
746
|
+
for (let middleware of this.configuration.middleware) {
|
|
747
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
748
|
+
}
|
|
749
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
750
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
751
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
752
|
+
for (let middleware of this.configuration.middleware) {
|
|
753
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
754
|
+
}
|
|
755
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getOAuthConfig(rsp)));
|
|
756
|
+
}));
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* The endpoint retrieves the list of oauth configurations for the current project environment.
|
|
760
|
+
* List of oauth configurations.
|
|
761
|
+
*/
|
|
762
|
+
listOAuthConfig(_options) {
|
|
763
|
+
const requestContextPromise = this.requestFactory.listOAuthConfig(_options);
|
|
764
|
+
// build promise chain
|
|
765
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
766
|
+
for (let middleware of this.configuration.middleware) {
|
|
767
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
768
|
+
}
|
|
769
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
770
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
771
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
772
|
+
for (let middleware of this.configuration.middleware) {
|
|
773
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
774
|
+
}
|
|
775
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listOAuthConfig(rsp)));
|
|
776
|
+
}));
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* The endpoint updates oauth configuration for specified provider for the current project environment.
|
|
780
|
+
* Update oauth configuration.
|
|
781
|
+
* @param provider Specifies the oauth provider type.
|
|
782
|
+
* @param oAuthConfigRequest Specifies the oauth provider specific configuration.
|
|
783
|
+
*/
|
|
784
|
+
updateOAuthConfig(provider, oAuthConfigRequest, _options) {
|
|
785
|
+
const requestContextPromise = this.requestFactory.updateOAuthConfig(provider, oAuthConfigRequest, _options);
|
|
786
|
+
// build promise chain
|
|
787
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
788
|
+
for (let middleware of this.configuration.middleware) {
|
|
789
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
790
|
+
}
|
|
791
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
792
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
793
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
794
|
+
for (let middleware of this.configuration.middleware) {
|
|
795
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
796
|
+
}
|
|
797
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.updateOAuthConfig(rsp)));
|
|
798
|
+
}));
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
exports.ObservableOAuthApi = ObservableOAuthApi;
|
|
665
802
|
const PlayersApi_1 = require("../apis/PlayersApi");
|
|
666
803
|
class ObservablePlayersApi {
|
|
667
804
|
constructor(configuration, requestFactory, responseProcessor) {
|
|
@@ -714,7 +851,7 @@ class ObservablePlayersApi {
|
|
|
714
851
|
}
|
|
715
852
|
/**
|
|
716
853
|
* Create account object for a player.
|
|
717
|
-
* @param id Specifies the unique player ID.
|
|
854
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
718
855
|
* @param createPlayerAccountRequest
|
|
719
856
|
*/
|
|
720
857
|
createPlayerAccount(id, createPlayerAccountRequest, _options) {
|
|
@@ -735,7 +872,7 @@ class ObservablePlayersApi {
|
|
|
735
872
|
}
|
|
736
873
|
/**
|
|
737
874
|
* Create session object for a player.
|
|
738
|
-
* @param id Specifies the unique player ID.
|
|
875
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
739
876
|
* @param createPlayerSessionRequest
|
|
740
877
|
*/
|
|
741
878
|
createPlayerSession(id, createPlayerSessionRequest, _options) {
|
|
@@ -756,7 +893,7 @@ class ObservablePlayersApi {
|
|
|
756
893
|
}
|
|
757
894
|
/**
|
|
758
895
|
* Retrieves the details of an existing player.
|
|
759
|
-
* @param id Specifies the unique player ID.
|
|
896
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
760
897
|
* @param expand Specifies the expandable fields.
|
|
761
898
|
*/
|
|
762
899
|
getPlayer(id, expand, _options) {
|
|
@@ -777,7 +914,7 @@ class ObservablePlayersApi {
|
|
|
777
914
|
}
|
|
778
915
|
/**
|
|
779
916
|
* List of accounts of a player.
|
|
780
|
-
* @param id Specifies the unique player ID.
|
|
917
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
781
918
|
* @param expand Specifies the expandable fields.
|
|
782
919
|
*/
|
|
783
920
|
getPlayerAccounts(id, expand, _options) {
|
|
@@ -846,7 +983,7 @@ class ObservablePlayersApi {
|
|
|
846
983
|
/**
|
|
847
984
|
* This endpoint allows you to perform a request to change the owner of an account. To perform an update on the owner of an account, first you must provide a new owner address. Once requested, the owner must accept to take ownership by calling `acceptOwnership()` in the smart contract account.
|
|
848
985
|
* Request transfer ownership of account.
|
|
849
|
-
* @param id Specifies the unique player ID.
|
|
986
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
850
987
|
* @param playerTransferOwnershipRequest
|
|
851
988
|
*/
|
|
852
989
|
obsoleteRequestTransferAccountOwnership(id, playerTransferOwnershipRequest, _options) {
|
|
@@ -868,7 +1005,7 @@ class ObservablePlayersApi {
|
|
|
868
1005
|
/**
|
|
869
1006
|
* This endpoint allows you to perform a request to change the owner of an account. To perform an update on the owner of an account, first you must provide a new owner address. Once requested, the owner must accept to take ownership by calling `acceptOwnership()` in the smart contract account.
|
|
870
1007
|
* Request transfer ownership of account.
|
|
871
|
-
* @param id Specifies the unique player ID.
|
|
1008
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
872
1009
|
* @param playerTransferOwnershipRequest
|
|
873
1010
|
*/
|
|
874
1011
|
requestTransferAccountOwnership(id, playerTransferOwnershipRequest, _options) {
|
|
@@ -889,7 +1026,7 @@ class ObservablePlayersApi {
|
|
|
889
1026
|
}
|
|
890
1027
|
/**
|
|
891
1028
|
* Revoke session object for a player.
|
|
892
|
-
* @param id Specifies the unique player ID.
|
|
1029
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
893
1030
|
* @param revokeSessionPlayerRequest
|
|
894
1031
|
*/
|
|
895
1032
|
revokePlayerSession(id, revokeSessionPlayerRequest, _options) {
|
|
@@ -910,7 +1047,7 @@ class ObservablePlayersApi {
|
|
|
910
1047
|
}
|
|
911
1048
|
/**
|
|
912
1049
|
* Updates a player object.
|
|
913
|
-
* @param id Specifies the unique player ID.
|
|
1050
|
+
* @param id Specifies the unique player ID (starts with pla_).
|
|
914
1051
|
* @param playerRequest
|
|
915
1052
|
*/
|
|
916
1053
|
updatePlayer(id, playerRequest, _options) {
|
|
@@ -992,7 +1129,7 @@ class ObservablePoliciesApi {
|
|
|
992
1129
|
}
|
|
993
1130
|
/**
|
|
994
1131
|
* Create a policy rule object for a policy.
|
|
995
|
-
* @param id Specifies the unique policy ID.
|
|
1132
|
+
* @param id Specifies the unique policy ID (starts with pol_).
|
|
996
1133
|
* @param createPolicyAllowFunctionRequest
|
|
997
1134
|
*/
|
|
998
1135
|
createPolicyAllowFunction(id, createPolicyAllowFunctionRequest, _options) {
|
|
@@ -1013,7 +1150,7 @@ class ObservablePoliciesApi {
|
|
|
1013
1150
|
}
|
|
1014
1151
|
/**
|
|
1015
1152
|
* Delete a policy object.
|
|
1016
|
-
* @param id Specifies the unique policy ID.
|
|
1153
|
+
* @param id Specifies the unique policy ID (starts with pol_).
|
|
1017
1154
|
*/
|
|
1018
1155
|
deletePolicy(id, _options) {
|
|
1019
1156
|
const requestContextPromise = this.requestFactory.deletePolicy(id, _options);
|
|
@@ -1031,6 +1168,46 @@ class ObservablePoliciesApi {
|
|
|
1031
1168
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deletePolicy(rsp)));
|
|
1032
1169
|
}));
|
|
1033
1170
|
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Disable a policy object.
|
|
1173
|
+
* @param id Specifies the unique policy ID (starts with pol_).
|
|
1174
|
+
*/
|
|
1175
|
+
disablePolicy(id, _options) {
|
|
1176
|
+
const requestContextPromise = this.requestFactory.disablePolicy(id, _options);
|
|
1177
|
+
// build promise chain
|
|
1178
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1179
|
+
for (let middleware of this.configuration.middleware) {
|
|
1180
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1181
|
+
}
|
|
1182
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1183
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1184
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1185
|
+
for (let middleware of this.configuration.middleware) {
|
|
1186
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1187
|
+
}
|
|
1188
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.disablePolicy(rsp)));
|
|
1189
|
+
}));
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* Enable a policy object.
|
|
1193
|
+
* @param id Specifies the unique policy ID (starts with pol_).
|
|
1194
|
+
*/
|
|
1195
|
+
enablePolicy(id, _options) {
|
|
1196
|
+
const requestContextPromise = this.requestFactory.enablePolicy(id, _options);
|
|
1197
|
+
// build promise chain
|
|
1198
|
+
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1199
|
+
for (let middleware of this.configuration.middleware) {
|
|
1200
|
+
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1201
|
+
}
|
|
1202
|
+
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1203
|
+
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1204
|
+
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1205
|
+
for (let middleware of this.configuration.middleware) {
|
|
1206
|
+
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1207
|
+
}
|
|
1208
|
+
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.enablePolicy(rsp)));
|
|
1209
|
+
}));
|
|
1210
|
+
}
|
|
1034
1211
|
/**
|
|
1035
1212
|
* List policies.
|
|
1036
1213
|
* @param limit Specifies the maximum number of records to return.
|
|
@@ -1040,9 +1217,10 @@ class ObservablePoliciesApi {
|
|
|
1040
1217
|
* @param name Specifies the name of the policy.
|
|
1041
1218
|
* @param deleted Specifies whether to include deleted contracts.
|
|
1042
1219
|
* @param chainId The chain ID of the policy.
|
|
1220
|
+
* @param enabled Specifies whether to include enabled contracts.
|
|
1043
1221
|
*/
|
|
1044
|
-
getPolicies(limit, skip, order, expand, name, deleted, chainId, _options) {
|
|
1045
|
-
const requestContextPromise = this.requestFactory.getPolicies(limit, skip, order, expand, name, deleted, chainId, _options);
|
|
1222
|
+
getPolicies(limit, skip, order, expand, name, deleted, chainId, enabled, _options) {
|
|
1223
|
+
const requestContextPromise = this.requestFactory.getPolicies(limit, skip, order, expand, name, deleted, chainId, enabled, _options);
|
|
1046
1224
|
// build promise chain
|
|
1047
1225
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1048
1226
|
for (let middleware of this.configuration.middleware) {
|
|
@@ -1059,7 +1237,7 @@ class ObservablePoliciesApi {
|
|
|
1059
1237
|
}
|
|
1060
1238
|
/**
|
|
1061
1239
|
* Get a policy object.
|
|
1062
|
-
* @param id Specifies the unique policy ID.
|
|
1240
|
+
* @param id Specifies the unique policy ID (starts with pol_).
|
|
1063
1241
|
* @param expand Specifies the fields to expand.
|
|
1064
1242
|
*/
|
|
1065
1243
|
getPolicy(id, expand, _options) {
|
|
@@ -1080,7 +1258,7 @@ class ObservablePoliciesApi {
|
|
|
1080
1258
|
}
|
|
1081
1259
|
/**
|
|
1082
1260
|
* List policy rules of a policy.
|
|
1083
|
-
* @param id Specifies the unique policy ID.
|
|
1261
|
+
* @param id Specifies the unique policy ID (starts with pol_).
|
|
1084
1262
|
* @param expand Specifies the fields to expand.
|
|
1085
1263
|
*/
|
|
1086
1264
|
getPolicyAllowFunctions(id, expand, _options) {
|
|
@@ -1101,7 +1279,7 @@ class ObservablePoliciesApi {
|
|
|
1101
1279
|
}
|
|
1102
1280
|
/**
|
|
1103
1281
|
* List all gas reports of a policy.
|
|
1104
|
-
* @param id Specifies the unique policy ID.
|
|
1282
|
+
* @param id Specifies the unique policy ID (starts with pol_).
|
|
1105
1283
|
*/
|
|
1106
1284
|
getPolicyTotalGasUsage(id, _options) {
|
|
1107
1285
|
const requestContextPromise = this.requestFactory.getPolicyTotalGasUsage(id, _options);
|
|
@@ -1121,7 +1299,7 @@ class ObservablePoliciesApi {
|
|
|
1121
1299
|
}
|
|
1122
1300
|
/**
|
|
1123
1301
|
* Update a policy object.
|
|
1124
|
-
* @param id Specifies the unique policy ID.
|
|
1302
|
+
* @param id Specifies the unique policy ID (starts with pol_).
|
|
1125
1303
|
* @param updatePolicyRequest
|
|
1126
1304
|
*/
|
|
1127
1305
|
updatePolicy(id, updatePolicyRequest, _options) {
|
|
@@ -1213,7 +1391,7 @@ class ObservablePolicyRulesApi {
|
|
|
1213
1391
|
}
|
|
1214
1392
|
/**
|
|
1215
1393
|
* List policy rules of a policy.
|
|
1216
|
-
* @param policy Specifies the unique policy ID.
|
|
1394
|
+
* @param policy Specifies the unique policy ID (starts with pol_).
|
|
1217
1395
|
* @param limit Specifies the maximum number of records to return.
|
|
1218
1396
|
* @param skip Specifies the offset for the first records to return.
|
|
1219
1397
|
* @param order Specifies the order in which to sort the results.
|
|
@@ -1287,7 +1465,7 @@ class ObservableSessionsApi {
|
|
|
1287
1465
|
}
|
|
1288
1466
|
/**
|
|
1289
1467
|
* List session keys of a player.
|
|
1290
|
-
* @param player The player ID
|
|
1468
|
+
* @param player The player ID (starts with pla_)
|
|
1291
1469
|
* @param limit Specifies the maximum number of records to return.
|
|
1292
1470
|
* @param skip Specifies the offset for the first records to return.
|
|
1293
1471
|
* @param order Specifies the order in which to sort the results.
|
|
@@ -1311,7 +1489,7 @@ class ObservableSessionsApi {
|
|
|
1311
1489
|
}
|
|
1312
1490
|
/**
|
|
1313
1491
|
* Returns a player session by session id
|
|
1314
|
-
* @param id Specifies the unique session ID.
|
|
1492
|
+
* @param id Specifies the unique session ID (starts with ses_).
|
|
1315
1493
|
* @param expand Specifies the fields to expand.
|
|
1316
1494
|
*/
|
|
1317
1495
|
getSession(id, expand, _options) {
|
|
@@ -1352,7 +1530,7 @@ class ObservableSessionsApi {
|
|
|
1352
1530
|
}
|
|
1353
1531
|
/**
|
|
1354
1532
|
* Confirms the creation of a session with an external owner.
|
|
1355
|
-
* @param id Specifies the unique session ID.
|
|
1533
|
+
* @param id Specifies the unique session ID (starts with ses_).
|
|
1356
1534
|
* @param signatureRequest
|
|
1357
1535
|
*/
|
|
1358
1536
|
signatureSession(id, signatureRequest, _options) {
|
|
@@ -1402,7 +1580,7 @@ class ObservableTransactionIntentsApi {
|
|
|
1402
1580
|
}));
|
|
1403
1581
|
}
|
|
1404
1582
|
/**
|
|
1405
|
-
* Estimate the gas cost of creating a transaction intent and putting it
|
|
1583
|
+
* Estimate the gas cost of creating a transaction intent and putting it on chain. If a policy that includes payment of gas in ERC-20 tokens is provided, an extra field `estimatedTXGasFeeToken` is returned with the estimated amount of tokens.
|
|
1406
1584
|
* Estimate gas cost of creating a transaction
|
|
1407
1585
|
* @param createTransactionIntentRequest
|
|
1408
1586
|
*/
|
|
@@ -1424,7 +1602,7 @@ class ObservableTransactionIntentsApi {
|
|
|
1424
1602
|
}
|
|
1425
1603
|
/**
|
|
1426
1604
|
* Get a transaction intent object.
|
|
1427
|
-
* @param id Specifies the unique transaction intent ID.
|
|
1605
|
+
* @param id Specifies the unique transaction intent ID (starts with tin_).
|
|
1428
1606
|
* @param expand Specifies the expandable fields.
|
|
1429
1607
|
*/
|
|
1430
1608
|
getTransactionIntent(id, expand, _options) {
|
|
@@ -1451,8 +1629,8 @@ class ObservableTransactionIntentsApi {
|
|
|
1451
1629
|
* @param expand Specifies the fields to expand in the response.
|
|
1452
1630
|
* @param chainId The chain ID.
|
|
1453
1631
|
* @param accountId Filter by account ID.
|
|
1454
|
-
* @param playerId Filter by player ID.
|
|
1455
|
-
* @param policyId Filter by policy ID.
|
|
1632
|
+
* @param playerId Filter by player ID (starts with pla_).
|
|
1633
|
+
* @param policyId Filter by policy ID (starts with pol_).
|
|
1456
1634
|
*/
|
|
1457
1635
|
getTransactionIntents(limit, skip, order, expand, chainId, accountId, playerId, policyId, _options) {
|
|
1458
1636
|
const requestContextPromise = this.requestFactory.getTransactionIntents(limit, skip, order, expand, chainId, accountId, playerId, policyId, _options);
|
|
@@ -1471,9 +1649,9 @@ class ObservableTransactionIntentsApi {
|
|
|
1471
1649
|
}));
|
|
1472
1650
|
}
|
|
1473
1651
|
/**
|
|
1474
|
-
* This endpoint is used to
|
|
1652
|
+
* This endpoint is used to send the signed userOperationHash. For non-custodial smart accounts, each on chain action using their wallet, they must sign the userOperationHash received from the `POST` API endpoint that creates a transactionIntent.
|
|
1475
1653
|
* Confirms the creation of a transaction intent with an external owner.
|
|
1476
|
-
* @param id Specifies the unique transaction intent ID.
|
|
1654
|
+
* @param id Specifies the unique transaction intent ID (starts with tin_).
|
|
1477
1655
|
* @param signatureRequest
|
|
1478
1656
|
*/
|
|
1479
1657
|
signature(id, signatureRequest, _options) {
|