@openfort/openfort-node 0.6.59 → 0.6.61
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/CHANGELOG.md +10 -0
- package/dist/apis/inventoriesApiWrapper.d.ts +10 -0
- package/dist/apis/inventoriesApiWrapper.js +14 -0
- package/dist/apis/inventoriesApiWrapper.js.map +1 -1
- package/dist/apis/transactionIntentsApiWrapper.d.ts +4 -1
- package/dist/apis/transactionIntentsApiWrapper.js +5 -2
- package/dist/apis/transactionIntentsApiWrapper.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/AuthenticationApi.d.ts +28 -7
- package/dist/generated/apis/AuthenticationApi.js +84 -7
- package/dist/generated/apis/AuthenticationApi.js.map +1 -1
- package/dist/generated/apis/ContractsApi.d.ts +2 -2
- package/dist/generated/apis/ContractsApi.js +2 -2
- package/dist/generated/apis/TransactionIntentsApi.d.ts +2 -1
- package/dist/generated/apis/TransactionIntentsApi.js +4 -1
- package/dist/generated/apis/TransactionIntentsApi.js.map +1 -1
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/index.js +6 -6
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/models/Authorize200Response.d.ts +43 -0
- package/dist/generated/models/Authorize200Response.js +68 -0
- package/dist/generated/models/Authorize200Response.js.map +1 -0
- package/dist/generated/models/AuthorizePlayerRequest.d.ts +31 -0
- package/dist/generated/models/AuthorizePlayerRequest.js +32 -0
- package/dist/generated/models/AuthorizePlayerRequest.js.map +1 -0
- package/dist/generated/models/ChildProjectListResponse.d.ts +35 -0
- package/dist/generated/models/ChildProjectListResponse.js +62 -0
- package/dist/generated/models/ChildProjectListResponse.js.map +1 -0
- package/dist/generated/models/ChildProjectResponse.d.ts +32 -0
- package/dist/generated/models/ChildProjectResponse.js +50 -0
- package/dist/generated/models/ChildProjectResponse.js.map +1 -0
- package/dist/generated/models/CreateDeviceRequest.d.ts +1 -1
- package/dist/generated/models/CreateEcosystemConfigurationRequest.d.ts +47 -0
- package/dist/generated/models/CreateEcosystemConfigurationRequest.js +56 -0
- package/dist/generated/models/CreateEcosystemConfigurationRequest.js.map +1 -0
- package/dist/generated/models/CreatePaymasterRequest.d.ts +5 -1
- package/dist/generated/models/CreatePaymasterRequest.js +6 -0
- package/dist/generated/models/CreatePaymasterRequest.js.map +1 -1
- package/dist/generated/models/{CreateSMTPConfigRequest.d.ts → EcosystemConfigurationResponse.d.ts} +11 -15
- package/dist/generated/models/EcosystemConfigurationResponse.js +56 -0
- package/dist/generated/models/EcosystemConfigurationResponse.js.map +1 -0
- package/dist/generated/models/OAuthInitRequestOptions.d.ts +0 -8
- package/dist/generated/models/OAuthInitRequestOptions.js +0 -12
- package/dist/generated/models/OAuthInitRequestOptions.js.map +1 -1
- package/dist/generated/models/ObjectSerializer.d.ts +7 -2
- package/dist/generated/models/ObjectSerializer.js +21 -6
- package/dist/generated/models/ObjectSerializer.js.map +1 -1
- package/dist/generated/models/ProjectResponse.d.ts +3 -0
- package/dist/generated/models/ProjectResponse.js +12 -0
- package/dist/generated/models/ProjectResponse.js.map +1 -1
- package/dist/generated/models/SMTPConfigResponse.d.ts +1 -3
- package/dist/generated/models/SMTPConfigResponse.js +6 -18
- package/dist/generated/models/SMTPConfigResponse.js.map +1 -1
- package/dist/generated/models/SessionResponse.d.ts +5 -5
- package/dist/generated/models/SubmitWeb3ActionRequest.d.ts +1 -1
- package/dist/generated/models/{UpdateSMTPConfigRequest.d.ts → UpsertSMTPConfigRequest.d.ts} +5 -1
- package/dist/generated/models/{CreateSMTPConfigRequest.js → UpsertSMTPConfigRequest.js} +7 -7
- package/dist/generated/models/{CreateSMTPConfigRequest.js.map → UpsertSMTPConfigRequest.js.map} +1 -1
- package/dist/generated/models/all.d.ts +7 -2
- package/dist/generated/models/all.js +7 -2
- package/dist/generated/models/all.js.map +1 -1
- package/dist/generated/types/ObjectParamAPI.d.ts +65 -3
- package/dist/generated/types/ObjectParamAPI.js +17 -11
- package/dist/generated/types/ObjectParamAPI.js.map +1 -1
- package/dist/generated/types/ObservableAPI.d.ts +25 -11
- package/dist/generated/types/ObservableAPI.js +46 -19
- package/dist/generated/types/ObservableAPI.js.map +1 -1
- package/dist/generated/types/PromiseAPI.d.ts +25 -11
- package/dist/generated/types/PromiseAPI.js +34 -19
- package/dist/generated/types/PromiseAPI.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/models/readContractRequest.d.ts +1 -1
- package/dist/utilities/signer.d.ts +1 -0
- package/dist/utilities/signer.js +11 -0
- package/dist/utilities/signer.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/generated/models/UpdateSMTPConfigRequest.js +0 -56
- package/dist/generated/models/UpdateSMTPConfigRequest.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.6.60] - 2024-06-10
|
|
9
|
+
### Added
|
|
10
|
+
- Nonce signature using secret key
|
|
@@ -8,6 +8,16 @@ import { GetAccountInventoryRequest } from "../models/getAccountInventoryRequest
|
|
|
8
8
|
export declare class InventoriesApiWrapper extends BaseApiWrapper<InventoriesApi> {
|
|
9
9
|
static type: string;
|
|
10
10
|
constructor(accessToken: string, basePath?: string);
|
|
11
|
+
/**
|
|
12
|
+
* For development purposes only. Under higher load scenarios, this endpoint may be rate limited.
|
|
13
|
+
* Get NFTs list of player.
|
|
14
|
+
*/
|
|
15
|
+
getPlayerNftInventory(req: PlayerInventoryListQueries): Promise<InventoryListResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* For development purposes only. Under higher load scenarios, this endpoint may be rate limited.
|
|
18
|
+
* Retrieves the NFT assets of an existing account.
|
|
19
|
+
*/
|
|
20
|
+
getAccountNftInventory(req: AccountInventoryListQueries): Promise<InventoryListResponse>;
|
|
11
21
|
/**
|
|
12
22
|
* Retrieves the native assets list of an existing player. Supply the unique player ID from either a player creation request or the player list, and Openfort will return the corresponding player information.
|
|
13
23
|
*/
|
|
@@ -17,6 +17,20 @@ let InventoriesApiWrapper = class InventoriesApiWrapper extends baseApiWrapper_1
|
|
|
17
17
|
constructor(accessToken, basePath) {
|
|
18
18
|
super(generated_1.InventoriesApi, accessToken, basePath);
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* For development purposes only. Under higher load scenarios, this endpoint may be rate limited.
|
|
22
|
+
* Get NFTs list of player.
|
|
23
|
+
*/
|
|
24
|
+
async getPlayerNftInventory(req) {
|
|
25
|
+
return await this.api.getPlayerNftInventory(req.id, req.chainId, req.limit, req.skip, req.order, req.contract);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* For development purposes only. Under higher load scenarios, this endpoint may be rate limited.
|
|
29
|
+
* Retrieves the NFT assets of an existing account.
|
|
30
|
+
*/
|
|
31
|
+
async getAccountNftInventory(req) {
|
|
32
|
+
return await this.api.getAccountNftInventory(req.id, req.limit, req.skip, req.order, req.contractId);
|
|
33
|
+
}
|
|
20
34
|
/**
|
|
21
35
|
* Retrieves the native assets list of an existing player. Supply the unique player ID from either a player creation request or the player list, and Openfort will return the corresponding player information.
|
|
22
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inventoriesApiWrapper.js","sourceRoot":"","sources":["../../src/apis/inventoriesApiWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDAAkD;AAClD,4CAA8C;AAC9C,oEAAiE;AAO1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AAC,EAAE,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,yBAAyB,CAAC,GAA+B;QAClE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;;AAvDM,0BAAI,GAAG,aAAa,CAAC;AADnB,qBAAqB;IADjC,mCAAgB;;GACJ,qBAAqB,CAyDjC;AAzDY,sDAAqB"}
|
|
@@ -3,6 +3,8 @@ import { BaseApiWrapper } from "./baseApiWrapper";
|
|
|
3
3
|
import { TransactionIntentsApi } from "../generated";
|
|
4
4
|
export declare class TransactionIntentsApiWrapper extends BaseApiWrapper<TransactionIntentsApi> {
|
|
5
5
|
static type: string;
|
|
6
|
+
private readonly accessToken;
|
|
7
|
+
private readonly basePath?;
|
|
6
8
|
constructor(accessToken: string, basePath?: string);
|
|
7
9
|
/**
|
|
8
10
|
* Estimate the gas cost of creating a transaction intent and putting it onchain.
|
|
@@ -12,8 +14,9 @@ export declare class TransactionIntentsApiWrapper extends BaseApiWrapper<Transac
|
|
|
12
14
|
/**
|
|
13
15
|
* Creates a transaction intent object.
|
|
14
16
|
* @param req Parameters to create transaction intent
|
|
17
|
+
* @param behalfOf In case of ecosystems, the publishable key of the game wants to create the transaction intent
|
|
15
18
|
*/
|
|
16
|
-
create(req: CreateTransactionIntentRequest): Promise<TransactionIntentResponse>;
|
|
19
|
+
create(req: CreateTransactionIntentRequest, behalfOf?: string): Promise<TransactionIntentResponse>;
|
|
17
20
|
/**
|
|
18
21
|
* Retrieves a transaction intent object.
|
|
19
22
|
* @param req Parameters to retrieve transaction intent
|
|
@@ -16,6 +16,8 @@ const httpErrorHandler_1 = require("../utilities/httpErrorHandler");
|
|
|
16
16
|
let TransactionIntentsApiWrapper = class TransactionIntentsApiWrapper extends baseApiWrapper_1.BaseApiWrapper {
|
|
17
17
|
constructor(accessToken, basePath) {
|
|
18
18
|
super(generated_1.TransactionIntentsApi, accessToken, basePath);
|
|
19
|
+
this.accessToken = accessToken;
|
|
20
|
+
this.basePath = basePath;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Estimate the gas cost of creating a transaction intent and putting it onchain.
|
|
@@ -27,9 +29,10 @@ let TransactionIntentsApiWrapper = class TransactionIntentsApiWrapper extends ba
|
|
|
27
29
|
/**
|
|
28
30
|
* Creates a transaction intent object.
|
|
29
31
|
* @param req Parameters to create transaction intent
|
|
32
|
+
* @param behalfOf In case of ecosystems, the publishable key of the game wants to create the transaction intent
|
|
30
33
|
*/
|
|
31
|
-
async create(req) {
|
|
32
|
-
return await this.api.createTransactionIntent(req);
|
|
34
|
+
async create(req, behalfOf) {
|
|
35
|
+
return await this.api.createTransactionIntent(req, behalfOf);
|
|
33
36
|
}
|
|
34
37
|
/**
|
|
35
38
|
* Retrieves a transaction intent object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactionIntentsApiWrapper.js","sourceRoot":"","sources":["../../src/apis/transactionIntentsApiWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,qDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"transactionIntentsApiWrapper.js","sourceRoot":"","sources":["../../src/apis/transactionIntentsApiWrapper.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,qDAAkD;AAClD,4CAAgH;AAChH,oEAAiE;AAG1D,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,+BAAqC;IAKnF,YAAY,WAAmB,EAAE,QAAiB;QAC9C,KAAK,CAAC,iCAAqB,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;QACpD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,YAAY,CAAC,GAAmC;QACzD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,6BAA6B,CAAC,GAAG,CAAC,CAAC;IAC7D,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,GAAmC,EAAE,QAAiB;QACtE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACjE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,GAAG,CAAC,GAAgC;QAC7C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI,CAAC,GAAkC;QAChD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,qBAAqB,CACvC,GAAG,EAAE,KAAK,EACV,GAAG,EAAE,IAAI,EACT,GAAG,EAAE,KAAK,EACV,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,CACd,CAAC;IACN,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,SAAS,CAAC,GAAsC;QACzD,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,GAAG,CAAC;QAC5B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAC9C,CAAC;;AA5DM,iCAAI,GAAG,oBAAoB,CAAC;AAD1B,4BAA4B;IADxC,mCAAgB;;GACJ,4BAA4B,CA8DxC;AA9DY,oEAA4B"}
|
|
@@ -69,7 +69,7 @@ export declare class AccountsApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
69
69
|
*/
|
|
70
70
|
requestTransferOwnership(id: string, transferOwnershipRequest: TransferOwnershipRequest, _options?: Configuration): Promise<RequestContext>;
|
|
71
71
|
/**
|
|
72
|
-
* **Custodial Accounts only** - Signs the typed
|
|
72
|
+
* **Custodial Accounts only** - Signs the typed repositories value with types repositories structure for domain using the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) specification.
|
|
73
73
|
* Sign a given payload
|
|
74
74
|
* @param id Specifies the unique account ID (starts with acc_).
|
|
75
75
|
* @param signPayloadRequest
|
|
@@ -296,7 +296,7 @@ class AccountsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
296
296
|
return requestContext;
|
|
297
297
|
}
|
|
298
298
|
/**
|
|
299
|
-
* **Custodial Accounts only** - Signs the typed
|
|
299
|
+
* **Custodial Accounts only** - Signs the typed repositories value with types repositories structure for domain using the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) specification.
|
|
300
300
|
* Sign a given payload
|
|
301
301
|
* @param id Specifies the unique account ID (starts with acc_).
|
|
302
302
|
* @param signPayloadRequest
|
|
@@ -5,6 +5,8 @@ import { AuthPlayerResponse } from '../models/AuthPlayerResponse';
|
|
|
5
5
|
import { AuthProvider } from '../models/AuthProvider';
|
|
6
6
|
import { AuthResponse } from '../models/AuthResponse';
|
|
7
7
|
import { AuthenticateOAuthRequest } from '../models/AuthenticateOAuthRequest';
|
|
8
|
+
import { Authorize200Response } from '../models/Authorize200Response';
|
|
9
|
+
import { AuthorizePlayerRequest } from '../models/AuthorizePlayerRequest';
|
|
8
10
|
import { DeprecatedAuthenticatedPlayerResponse } from '../models/DeprecatedAuthenticatedPlayerResponse';
|
|
9
11
|
import { JwtKeyResponse } from '../models/JwtKeyResponse';
|
|
10
12
|
import { LoginRequest } from '../models/LoginRequest';
|
|
@@ -40,6 +42,10 @@ export declare class AuthenticationApiRequestFactory extends BaseAPIRequestFacto
|
|
|
40
42
|
* @param sIWEAuthenticateRequest
|
|
41
43
|
*/
|
|
42
44
|
authenticateSIWE(sIWEAuthenticateRequest: SIWEAuthenticateRequest, _options?: Configuration): Promise<RequestContext>;
|
|
45
|
+
/**
|
|
46
|
+
* @param authorizePlayerRequest
|
|
47
|
+
*/
|
|
48
|
+
authorize(authorizePlayerRequest: AuthorizePlayerRequest, _options?: Configuration): Promise<RequestContext>;
|
|
43
49
|
/**
|
|
44
50
|
* 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.
|
|
45
51
|
* Authorize player with token.
|
|
@@ -56,23 +62,27 @@ export declare class AuthenticationApiRequestFactory extends BaseAPIRequestFacto
|
|
|
56
62
|
/**
|
|
57
63
|
* Initialize OAuth.
|
|
58
64
|
* @param oAuthInitRequest
|
|
65
|
+
* @param xGame
|
|
59
66
|
*/
|
|
60
|
-
initOAuth(oAuthInitRequest: OAuthInitRequest, _options?: Configuration): Promise<RequestContext>;
|
|
67
|
+
initOAuth(oAuthInitRequest: OAuthInitRequest, xGame?: string, _options?: Configuration): Promise<RequestContext>;
|
|
61
68
|
/**
|
|
62
69
|
* Create a challenge to link external wallet to the player.
|
|
63
70
|
* Initialize SIWE.
|
|
64
71
|
* @param sIWERequest
|
|
72
|
+
* @param xGame
|
|
65
73
|
*/
|
|
66
|
-
initSIWE(sIWERequest: SIWERequest, _options?: Configuration): Promise<RequestContext>;
|
|
74
|
+
initSIWE(sIWERequest: SIWERequest, xGame?: string, _options?: Configuration): Promise<RequestContext>;
|
|
67
75
|
/**
|
|
68
76
|
* @param loginRequest
|
|
77
|
+
* @param xGame
|
|
69
78
|
*/
|
|
70
|
-
linkEmail(loginRequest: LoginRequest, _options?: Configuration): Promise<RequestContext>;
|
|
79
|
+
linkEmail(loginRequest: LoginRequest, xGame?: string, _options?: Configuration): Promise<RequestContext>;
|
|
71
80
|
/**
|
|
72
81
|
* Initialize Link OAuth.
|
|
73
82
|
* @param oAuthInitRequest
|
|
83
|
+
* @param xGame
|
|
74
84
|
*/
|
|
75
|
-
linkOAuth(oAuthInitRequest: OAuthInitRequest, _options?: Configuration): Promise<RequestContext>;
|
|
85
|
+
linkOAuth(oAuthInitRequest: OAuthInitRequest, xGame?: string, _options?: Configuration): Promise<RequestContext>;
|
|
76
86
|
/**
|
|
77
87
|
* Link external wallet.
|
|
78
88
|
* @param sIWEAuthenticateRequest
|
|
@@ -82,8 +92,9 @@ export declare class AuthenticationApiRequestFactory extends BaseAPIRequestFacto
|
|
|
82
92
|
* Authenticate a player based on email and password.
|
|
83
93
|
* Email and password login.
|
|
84
94
|
* @param loginRequest
|
|
95
|
+
* @param xGame
|
|
85
96
|
*/
|
|
86
|
-
loginEmailPassword(loginRequest: LoginRequest, _options?: Configuration): Promise<RequestContext>;
|
|
97
|
+
loginEmailPassword(loginRequest: LoginRequest, xGame?: string, _options?: Configuration): Promise<RequestContext>;
|
|
87
98
|
/**
|
|
88
99
|
* When using Openfort Auth, the endpoint logs out the player.
|
|
89
100
|
* Log out a player.
|
|
@@ -126,13 +137,15 @@ export declare class AuthenticationApiRequestFactory extends BaseAPIRequestFacto
|
|
|
126
137
|
* Create and authenticate a player based on email and password.
|
|
127
138
|
* Email and password signup.
|
|
128
139
|
* @param signupRequest
|
|
140
|
+
* @param xGame
|
|
129
141
|
*/
|
|
130
|
-
signupEmailPassword(signupRequest: SignupRequest, _options?: Configuration): Promise<RequestContext>;
|
|
142
|
+
signupEmailPassword(signupRequest: SignupRequest, xGame?: string, _options?: Configuration): Promise<RequestContext>;
|
|
131
143
|
/**
|
|
132
144
|
* Verify oauth token of a third party auth provider.
|
|
133
145
|
* @param thirdPartyOAuthRequest
|
|
146
|
+
* @param xGame
|
|
134
147
|
*/
|
|
135
|
-
thirdParty(thirdPartyOAuthRequest: ThirdPartyOAuthRequest, _options?: Configuration): Promise<RequestContext>;
|
|
148
|
+
thirdParty(thirdPartyOAuthRequest: ThirdPartyOAuthRequest, xGame?: string, _options?: Configuration): Promise<RequestContext>;
|
|
136
149
|
/**
|
|
137
150
|
* @param unlinkEmailRequest
|
|
138
151
|
*/
|
|
@@ -184,6 +197,14 @@ export declare class AuthenticationApiResponseProcessor {
|
|
|
184
197
|
* @throws ApiException if the response code was not in [200, 299]
|
|
185
198
|
*/
|
|
186
199
|
authenticateSIWE(response: ResponseContext): Promise<void | AuthResponse>;
|
|
200
|
+
/**
|
|
201
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
202
|
+
* to the expected objects
|
|
203
|
+
*
|
|
204
|
+
* @params response Response returned by the server for a request to authorize
|
|
205
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
206
|
+
*/
|
|
207
|
+
authorize(response: ResponseContext): Promise<Authorize200Response>;
|
|
187
208
|
/**
|
|
188
209
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
189
210
|
* to the expected objects
|
|
@@ -80,6 +80,39 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
80
80
|
}
|
|
81
81
|
return requestContext;
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* @param authorizePlayerRequest
|
|
85
|
+
*/
|
|
86
|
+
async authorize(authorizePlayerRequest, _options) {
|
|
87
|
+
let _config = _options || this.configuration;
|
|
88
|
+
// verify required parameter 'authorizePlayerRequest' is not null or undefined
|
|
89
|
+
if (authorizePlayerRequest === null || authorizePlayerRequest === undefined) {
|
|
90
|
+
throw new baseapi_1.RequiredError("AuthenticationApi", "authorize", "authorizePlayerRequest");
|
|
91
|
+
}
|
|
92
|
+
// Path Params
|
|
93
|
+
const localVarPath = '/iam/v1/authorize';
|
|
94
|
+
// Make Request Context
|
|
95
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
96
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
97
|
+
// Body Params
|
|
98
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
99
|
+
"application/json"
|
|
100
|
+
]);
|
|
101
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
102
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(authorizePlayerRequest, "AuthorizePlayerRequest", ""), contentType);
|
|
103
|
+
requestContext.setBody(serializedBody);
|
|
104
|
+
let authMethod;
|
|
105
|
+
// Apply auth methods
|
|
106
|
+
authMethod = _config.authMethods["sk"];
|
|
107
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
108
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
109
|
+
}
|
|
110
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
111
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
112
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
113
|
+
}
|
|
114
|
+
return requestContext;
|
|
115
|
+
}
|
|
83
116
|
/**
|
|
84
117
|
* 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.
|
|
85
118
|
* Authorize player with token.
|
|
@@ -152,8 +185,9 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
152
185
|
/**
|
|
153
186
|
* Initialize OAuth.
|
|
154
187
|
* @param oAuthInitRequest
|
|
188
|
+
* @param xGame
|
|
155
189
|
*/
|
|
156
|
-
async initOAuth(oAuthInitRequest, _options) {
|
|
190
|
+
async initOAuth(oAuthInitRequest, xGame, _options) {
|
|
157
191
|
let _config = _options || this.configuration;
|
|
158
192
|
// verify required parameter 'oAuthInitRequest' is not null or undefined
|
|
159
193
|
if (oAuthInitRequest === null || oAuthInitRequest === undefined) {
|
|
@@ -164,6 +198,8 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
164
198
|
// Make Request Context
|
|
165
199
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
166
200
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
201
|
+
// Header Params
|
|
202
|
+
requestContext.setHeaderParam("x-game", ObjectSerializer_1.ObjectSerializer.serialize(xGame, "string", ""));
|
|
167
203
|
// Body Params
|
|
168
204
|
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
169
205
|
"application/json"
|
|
@@ -187,8 +223,9 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
187
223
|
* Create a challenge to link external wallet to the player.
|
|
188
224
|
* Initialize SIWE.
|
|
189
225
|
* @param sIWERequest
|
|
226
|
+
* @param xGame
|
|
190
227
|
*/
|
|
191
|
-
async initSIWE(sIWERequest, _options) {
|
|
228
|
+
async initSIWE(sIWERequest, xGame, _options) {
|
|
192
229
|
let _config = _options || this.configuration;
|
|
193
230
|
// verify required parameter 'sIWERequest' is not null or undefined
|
|
194
231
|
if (sIWERequest === null || sIWERequest === undefined) {
|
|
@@ -199,6 +236,8 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
199
236
|
// Make Request Context
|
|
200
237
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
201
238
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
239
|
+
// Header Params
|
|
240
|
+
requestContext.setHeaderParam("x-game", ObjectSerializer_1.ObjectSerializer.serialize(xGame, "string", ""));
|
|
202
241
|
// Body Params
|
|
203
242
|
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
204
243
|
"application/json"
|
|
@@ -220,8 +259,9 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
220
259
|
}
|
|
221
260
|
/**
|
|
222
261
|
* @param loginRequest
|
|
262
|
+
* @param xGame
|
|
223
263
|
*/
|
|
224
|
-
async linkEmail(loginRequest, _options) {
|
|
264
|
+
async linkEmail(loginRequest, xGame, _options) {
|
|
225
265
|
let _config = _options || this.configuration;
|
|
226
266
|
// verify required parameter 'loginRequest' is not null or undefined
|
|
227
267
|
if (loginRequest === null || loginRequest === undefined) {
|
|
@@ -232,6 +272,8 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
232
272
|
// Make Request Context
|
|
233
273
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
234
274
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
275
|
+
// Header Params
|
|
276
|
+
requestContext.setHeaderParam("x-game", ObjectSerializer_1.ObjectSerializer.serialize(xGame, "string", ""));
|
|
235
277
|
// Body Params
|
|
236
278
|
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
237
279
|
"application/json"
|
|
@@ -248,8 +290,9 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
248
290
|
/**
|
|
249
291
|
* Initialize Link OAuth.
|
|
250
292
|
* @param oAuthInitRequest
|
|
293
|
+
* @param xGame
|
|
251
294
|
*/
|
|
252
|
-
async linkOAuth(oAuthInitRequest, _options) {
|
|
295
|
+
async linkOAuth(oAuthInitRequest, xGame, _options) {
|
|
253
296
|
let _config = _options || this.configuration;
|
|
254
297
|
// verify required parameter 'oAuthInitRequest' is not null or undefined
|
|
255
298
|
if (oAuthInitRequest === null || oAuthInitRequest === undefined) {
|
|
@@ -260,6 +303,8 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
260
303
|
// Make Request Context
|
|
261
304
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
262
305
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
306
|
+
// Header Params
|
|
307
|
+
requestContext.setHeaderParam("x-game", ObjectSerializer_1.ObjectSerializer.serialize(xGame, "string", ""));
|
|
263
308
|
// Body Params
|
|
264
309
|
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
265
310
|
"application/json"
|
|
@@ -305,8 +350,9 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
305
350
|
* Authenticate a player based on email and password.
|
|
306
351
|
* Email and password login.
|
|
307
352
|
* @param loginRequest
|
|
353
|
+
* @param xGame
|
|
308
354
|
*/
|
|
309
|
-
async loginEmailPassword(loginRequest, _options) {
|
|
355
|
+
async loginEmailPassword(loginRequest, xGame, _options) {
|
|
310
356
|
let _config = _options || this.configuration;
|
|
311
357
|
// verify required parameter 'loginRequest' is not null or undefined
|
|
312
358
|
if (loginRequest === null || loginRequest === undefined) {
|
|
@@ -317,6 +363,8 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
317
363
|
// Make Request Context
|
|
318
364
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
319
365
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
366
|
+
// Header Params
|
|
367
|
+
requestContext.setHeaderParam("x-game", ObjectSerializer_1.ObjectSerializer.serialize(xGame, "string", ""));
|
|
320
368
|
// Body Params
|
|
321
369
|
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
322
370
|
"application/json"
|
|
@@ -555,8 +603,9 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
555
603
|
* Create and authenticate a player based on email and password.
|
|
556
604
|
* Email and password signup.
|
|
557
605
|
* @param signupRequest
|
|
606
|
+
* @param xGame
|
|
558
607
|
*/
|
|
559
|
-
async signupEmailPassword(signupRequest, _options) {
|
|
608
|
+
async signupEmailPassword(signupRequest, xGame, _options) {
|
|
560
609
|
let _config = _options || this.configuration;
|
|
561
610
|
// verify required parameter 'signupRequest' is not null or undefined
|
|
562
611
|
if (signupRequest === null || signupRequest === undefined) {
|
|
@@ -567,6 +616,8 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
567
616
|
// Make Request Context
|
|
568
617
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
569
618
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
619
|
+
// Header Params
|
|
620
|
+
requestContext.setHeaderParam("x-game", ObjectSerializer_1.ObjectSerializer.serialize(xGame, "string", ""));
|
|
570
621
|
// Body Params
|
|
571
622
|
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
572
623
|
"application/json"
|
|
@@ -589,8 +640,9 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
589
640
|
/**
|
|
590
641
|
* Verify oauth token of a third party auth provider.
|
|
591
642
|
* @param thirdPartyOAuthRequest
|
|
643
|
+
* @param xGame
|
|
592
644
|
*/
|
|
593
|
-
async thirdParty(thirdPartyOAuthRequest, _options) {
|
|
645
|
+
async thirdParty(thirdPartyOAuthRequest, xGame, _options) {
|
|
594
646
|
let _config = _options || this.configuration;
|
|
595
647
|
// verify required parameter 'thirdPartyOAuthRequest' is not null or undefined
|
|
596
648
|
if (thirdPartyOAuthRequest === null || thirdPartyOAuthRequest === undefined) {
|
|
@@ -601,6 +653,8 @@ class AuthenticationApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
601
653
|
// Make Request Context
|
|
602
654
|
const requestContext = _config.baseServer.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
603
655
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
|
|
656
|
+
// Header Params
|
|
657
|
+
requestContext.setHeaderParam("x-game", ObjectSerializer_1.ObjectSerializer.serialize(xGame, "string", ""));
|
|
604
658
|
// Body Params
|
|
605
659
|
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
606
660
|
"application/json"
|
|
@@ -866,6 +920,29 @@ class AuthenticationApiResponseProcessor {
|
|
|
866
920
|
}
|
|
867
921
|
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
868
922
|
}
|
|
923
|
+
/**
|
|
924
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
925
|
+
* to the expected objects
|
|
926
|
+
*
|
|
927
|
+
* @params response Response returned by the server for a request to authorize
|
|
928
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
929
|
+
*/
|
|
930
|
+
async authorize(response) {
|
|
931
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
932
|
+
if ((0, util_1.isCodeInRange)("200", response.httpStatusCode)) {
|
|
933
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Authorize200Response", "");
|
|
934
|
+
return body;
|
|
935
|
+
}
|
|
936
|
+
if ((0, util_1.isCodeInRange)("401", response.httpStatusCode)) {
|
|
937
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Error response.", undefined, response.headers);
|
|
938
|
+
}
|
|
939
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
940
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
941
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(await response.body.text(), contentType), "Authorize200Response", "");
|
|
942
|
+
return body;
|
|
943
|
+
}
|
|
944
|
+
throw new exception_1.ApiException(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
945
|
+
}
|
|
869
946
|
/**
|
|
870
947
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
871
948
|
* to the expected objects
|