@brokerize/client 1.3.8 → 1.3.10
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/authorizedApiContext.d.ts +21 -22
- package/dist/authorizedApiContext.js +36 -41
- package/dist/client.d.ts +746 -393
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/modelExports.d.ts +1 -0
- package/dist/swagger/apis/DecoupledOperationsApi.d.ts +35 -0
- package/dist/swagger/apis/DecoupledOperationsApi.js +86 -0
- package/dist/swagger/apis/DemobrokerApi.d.ts +2 -2
- package/dist/swagger/apis/DemobrokerApi.js +2 -2
- package/dist/swagger/apis/{ChangeOrderApi.d.ts → OrderApi.d.ts} +35 -2
- package/dist/swagger/apis/{ChangeOrderApi.js → OrderApi.js} +117 -2
- package/dist/swagger/apis/{DefaultApi.d.ts → PortfolioApi.d.ts} +2 -160
- package/dist/swagger/apis/{DefaultApi.js → PortfolioApi.js} +2 -568
- package/dist/swagger/apis/SessionApi.d.ts +146 -0
- package/dist/swagger/apis/SessionApi.js +474 -0
- package/dist/swagger/apis/UserApi.d.ts +89 -1
- package/dist/swagger/apis/UserApi.js +309 -1
- package/dist/swagger/apis/WebsocketApi.d.ts +24 -0
- package/dist/swagger/apis/WebsocketApi.js +38 -0
- package/dist/swagger/apis/index.d.ts +5 -4
- package/dist/swagger/apis/index.js +5 -4
- package/dist/swagger/models/CheckRecoveryPhrase200Response.d.ts +27 -0
- package/dist/swagger/models/CheckRecoveryPhrase200Response.js +37 -0
- package/dist/swagger/models/CreateRecoveryPhraseParams.d.ts +28 -0
- package/dist/swagger/models/CreateRecoveryPhraseParams.js +37 -0
- package/dist/swagger/models/CreateRecoveryPhraseResult.d.ts +27 -0
- package/dist/swagger/models/CreateRecoveryPhraseResult.js +37 -0
- package/dist/swagger/models/GetRecoveryPhrasesResponse.d.ts +28 -0
- package/dist/swagger/models/GetRecoveryPhrasesResponse.js +38 -0
- package/dist/swagger/models/GetUserResponse.d.ts +6 -0
- package/dist/swagger/models/GetUserResponse.js +2 -0
- package/dist/swagger/models/LogoutOkResponseBody.d.ts +33 -0
- package/dist/swagger/models/LogoutOkResponseBody.js +42 -0
- package/dist/swagger/models/ObtainTokenByRecoveryPhraseParams.d.ts +27 -0
- package/dist/swagger/models/ObtainTokenByRecoveryPhraseParams.js +37 -0
- package/dist/swagger/models/RecoveryPhraseItem.d.ts +51 -0
- package/dist/swagger/models/RecoveryPhraseItem.js +45 -0
- package/dist/swagger/models/index.d.ts +7 -0
- package/dist/swagger/models/index.js +7 -0
- package/package.json +1 -1
- package/dist/swagger/apis/BrokerLoginApi.d.ts +0 -59
- package/dist/swagger/apis/BrokerLoginApi.js +0 -169
- package/dist/swagger/apis/CancelOrderApi.d.ts +0 -41
- package/dist/swagger/apis/CancelOrderApi.js +0 -101
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brokerize
|
|
3
|
+
* The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
8
|
+
* https://openapi-generator.tech
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*/
|
|
11
|
+
import * as runtime from "../runtime";
|
|
12
|
+
import { AddSessionCompleteChallengeParams, AddSessionParams, Challenge, ConfirmOAuthParams, ConfirmOAuthResponse, CreateTanChallengeParams, DecoupledOperationStatus, EnableSessionTanParams, EnableSessionTanResponse, EndSessionTanResponse, LoginResponse, LoginResponseReady, LogoutOkResponseBody, OkResponseBody, PrepareOAuthRedirectParams, PrepareOAuthRedirectResponse, SessionResponse } from "../models";
|
|
13
|
+
export interface AddSessionRequest {
|
|
14
|
+
addSessionParams: AddSessionParams;
|
|
15
|
+
}
|
|
16
|
+
export interface AddSessionCompleteChallengeRequest {
|
|
17
|
+
addSessionCompleteChallengeParams: AddSessionCompleteChallengeParams;
|
|
18
|
+
}
|
|
19
|
+
export interface CancelDecoupledOperationLegacyRequest {
|
|
20
|
+
sessionId: string;
|
|
21
|
+
decoupledOperationId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ConfirmOAuthRequest {
|
|
24
|
+
confirmOAuthParams: ConfirmOAuthParams;
|
|
25
|
+
}
|
|
26
|
+
export interface CreateSessionTanChallengeRequest {
|
|
27
|
+
sessionId: string;
|
|
28
|
+
createTanChallengeParams: CreateTanChallengeParams;
|
|
29
|
+
}
|
|
30
|
+
export interface EnableSessionTanRequest {
|
|
31
|
+
sessionId: string;
|
|
32
|
+
enableSessionTanParams: EnableSessionTanParams;
|
|
33
|
+
}
|
|
34
|
+
export interface EndSessionTanRequest {
|
|
35
|
+
sessionId: string;
|
|
36
|
+
}
|
|
37
|
+
export interface GetDecoupledOperationStatusLegacyRequest {
|
|
38
|
+
sessionId: string;
|
|
39
|
+
decoupledOperationId: string;
|
|
40
|
+
}
|
|
41
|
+
export interface LogoutSessionRequest {
|
|
42
|
+
sessionId: string;
|
|
43
|
+
}
|
|
44
|
+
export interface PrepareOAuthRedirectRequest {
|
|
45
|
+
prepareOAuthRedirectParams: PrepareOAuthRedirectParams;
|
|
46
|
+
}
|
|
47
|
+
export interface TriggerSessionSyncRequest {
|
|
48
|
+
sessionId: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
export declare class SessionApi extends runtime.BaseAPI {
|
|
54
|
+
/**
|
|
55
|
+
*/
|
|
56
|
+
addSessionRaw(requestParameters: AddSessionRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<LoginResponse>>;
|
|
57
|
+
/**
|
|
58
|
+
*/
|
|
59
|
+
addSession(requestParameters: AddSessionRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<LoginResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* If login returns the state `challenge`, the login must be completed by providing a challenge response first.
|
|
62
|
+
*/
|
|
63
|
+
addSessionCompleteChallengeRaw(requestParameters: AddSessionCompleteChallengeRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<LoginResponseReady>>;
|
|
64
|
+
/**
|
|
65
|
+
* If login returns the state `challenge`, the login must be completed by providing a challenge response first.
|
|
66
|
+
*/
|
|
67
|
+
addSessionCompleteChallenge(requestParameters: AddSessionCompleteChallengeRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<LoginResponseReady>;
|
|
68
|
+
/**
|
|
69
|
+
* Cancel a decoupled operation. This is deprecated, use the new `CancelDecoupledOperation` instead (which does not require the sessionId anymore).
|
|
70
|
+
*/
|
|
71
|
+
cancelDecoupledOperationLegacyRaw(requestParameters: CancelDecoupledOperationLegacyRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
|
|
72
|
+
/**
|
|
73
|
+
* Cancel a decoupled operation. This is deprecated, use the new `CancelDecoupledOperation` instead (which does not require the sessionId anymore).
|
|
74
|
+
*/
|
|
75
|
+
cancelDecoupledOperationLegacy(requestParameters: CancelDecoupledOperationLegacyRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* For brokers with OAuth login processes, this adds the session to the user\'s account after redirects happen. Only the user that is redirected from the broker login in the browser will receive the `code`. This step ensures that the logged-in user at brokerize is actually the one that has gone through the broker OAuth steps.
|
|
78
|
+
*/
|
|
79
|
+
confirmOAuthRaw(requestParameters: ConfirmOAuthRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<ConfirmOAuthResponse>>;
|
|
80
|
+
/**
|
|
81
|
+
* For brokers with OAuth login processes, this adds the session to the user\'s account after redirects happen. Only the user that is redirected from the broker login in the browser will receive the `code`. This step ensures that the logged-in user at brokerize is actually the one that has gone through the broker OAuth steps.
|
|
82
|
+
*/
|
|
83
|
+
confirmOAuth(requestParameters: ConfirmOAuthRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<ConfirmOAuthResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* If the user chose an auth method from `GetAuthInfo` with the flow `CHALLENGE_RESPONSE`, before enabling session TAN, a challenge must be requested first.
|
|
86
|
+
*/
|
|
87
|
+
createSessionTanChallengeRaw(requestParameters: CreateSessionTanChallengeRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<Challenge>>;
|
|
88
|
+
/**
|
|
89
|
+
* If the user chose an auth method from `GetAuthInfo` with the flow `CHALLENGE_RESPONSE`, before enabling session TAN, a challenge must be requested first.
|
|
90
|
+
*/
|
|
91
|
+
createSessionTanChallenge(requestParameters: CreateSessionTanChallengeRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<Challenge>;
|
|
92
|
+
/**
|
|
93
|
+
*/
|
|
94
|
+
enableSessionTanRaw(requestParameters: EnableSessionTanRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<EnableSessionTanResponse>>;
|
|
95
|
+
/**
|
|
96
|
+
*/
|
|
97
|
+
enableSessionTan(requestParameters: EnableSessionTanRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<EnableSessionTanResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* End Session TAN for the given broker session. If applicable, the broker may return a message with a confirmation code which can be looked up in the initial activation SMS. If message is present in the response, it should be displayed to the user.
|
|
100
|
+
*/
|
|
101
|
+
endSessionTanRaw(requestParameters: EndSessionTanRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<EndSessionTanResponse>>;
|
|
102
|
+
/**
|
|
103
|
+
* End Session TAN for the given broker session. If applicable, the broker may return a message with a confirmation code which can be looked up in the initial activation SMS. If message is present in the response, it should be displayed to the user.
|
|
104
|
+
*/
|
|
105
|
+
endSessionTan(requestParameters: EndSessionTanRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<EndSessionTanResponse>;
|
|
106
|
+
/**
|
|
107
|
+
* Get the status of a decoupled operation. This is deprecated, use the new `GetDecoupledOperation` instead, which does not require the `sessionId` any more.
|
|
108
|
+
*/
|
|
109
|
+
getDecoupledOperationStatusLegacyRaw(requestParameters: GetDecoupledOperationStatusLegacyRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<DecoupledOperationStatus>>;
|
|
110
|
+
/**
|
|
111
|
+
* Get the status of a decoupled operation. This is deprecated, use the new `GetDecoupledOperation` instead, which does not require the `sessionId` any more.
|
|
112
|
+
*/
|
|
113
|
+
getDecoupledOperationStatusLegacy(requestParameters: GetDecoupledOperationStatusLegacyRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<DecoupledOperationStatus>;
|
|
114
|
+
/**
|
|
115
|
+
* Get the currently active broker sessions of the user\'s account.
|
|
116
|
+
*/
|
|
117
|
+
getSessionsRaw(initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<SessionResponse>>;
|
|
118
|
+
/**
|
|
119
|
+
* Get the currently active broker sessions of the user\'s account.
|
|
120
|
+
*/
|
|
121
|
+
getSessions(initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<SessionResponse>;
|
|
122
|
+
/**
|
|
123
|
+
* Log out from the given broker session.
|
|
124
|
+
*/
|
|
125
|
+
logoutSessionRaw(requestParameters: LogoutSessionRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<LogoutOkResponseBody>>;
|
|
126
|
+
/**
|
|
127
|
+
* Log out from the given broker session.
|
|
128
|
+
*/
|
|
129
|
+
logoutSession(requestParameters: LogoutSessionRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<LogoutOkResponseBody>;
|
|
130
|
+
/**
|
|
131
|
+
* For brokers with `isOAuth`, sessions can not be created using `AddSession`. This is how a session can be added for an OAuth-based login process: 1. use `prepareOAuthRedirect` to obtain a URL to redirect to. You can provide a `returnTo` URL which will be redirected to later. Note that a list of allowed URLs has to be configured for the client. 2. redirect the user\'s browser to the `redirectTo` URL 3. after the user has logged in at the broker\'s interface, a redirect to `returnTo` with the URL query parameters `verifysession=1`, `code` and `ticketId` will happen 4. the `returnTo` page must call `confirmOAuth` with the given `ticketId` and `code` to finally add the session to the user\'s account
|
|
132
|
+
*/
|
|
133
|
+
prepareOAuthRedirectRaw(requestParameters: PrepareOAuthRedirectRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<PrepareOAuthRedirectResponse>>;
|
|
134
|
+
/**
|
|
135
|
+
* For brokers with `isOAuth`, sessions can not be created using `AddSession`. This is how a session can be added for an OAuth-based login process: 1. use `prepareOAuthRedirect` to obtain a URL to redirect to. You can provide a `returnTo` URL which will be redirected to later. Note that a list of allowed URLs has to be configured for the client. 2. redirect the user\'s browser to the `redirectTo` URL 3. after the user has logged in at the broker\'s interface, a redirect to `returnTo` with the URL query parameters `verifysession=1`, `code` and `ticketId` will happen 4. the `returnTo` page must call `confirmOAuth` with the given `ticketId` and `code` to finally add the session to the user\'s account
|
|
136
|
+
*/
|
|
137
|
+
prepareOAuthRedirect(requestParameters: PrepareOAuthRedirectRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<PrepareOAuthRedirectResponse>;
|
|
138
|
+
/**
|
|
139
|
+
* Trigger a background sync process for the given broker session. This means that a sync will be scheduled as soon as possible. All data related to the portfolio (e.g. positions and orders) will be loaded into the brokerize database.
|
|
140
|
+
*/
|
|
141
|
+
triggerSessionSyncRaw(requestParameters: TriggerSessionSyncRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<OkResponseBody>>;
|
|
142
|
+
/**
|
|
143
|
+
* Trigger a background sync process for the given broker session. This means that a sync will be scheduled as soon as possible. All data related to the portfolio (e.g. positions and orders) will be loaded into the brokerize database.
|
|
144
|
+
*/
|
|
145
|
+
triggerSessionSync(requestParameters: TriggerSessionSyncRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<OkResponseBody>;
|
|
146
|
+
}
|
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* brokerize
|
|
5
|
+
* The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
import * as runtime from "../runtime";
|
|
14
|
+
import { AddSessionCompleteChallengeParamsToJSON, AddSessionParamsToJSON, ChallengeFromJSON, ConfirmOAuthParamsToJSON, ConfirmOAuthResponseFromJSON, CreateTanChallengeParamsToJSON, DecoupledOperationStatusFromJSON, EnableSessionTanParamsToJSON, EnableSessionTanResponseFromJSON, EndSessionTanResponseFromJSON, LoginResponseFromJSON, LoginResponseReadyFromJSON, LogoutOkResponseBodyFromJSON, OkResponseBodyFromJSON, PrepareOAuthRedirectParamsToJSON, PrepareOAuthRedirectResponseFromJSON, SessionResponseFromJSON, } from "../models";
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export class SessionApi extends runtime.BaseAPI {
|
|
19
|
+
/**
|
|
20
|
+
*/
|
|
21
|
+
async addSessionRaw(requestParameters, initOverrides) {
|
|
22
|
+
if (requestParameters.addSessionParams === null ||
|
|
23
|
+
requestParameters.addSessionParams === undefined) {
|
|
24
|
+
throw new runtime.RequiredError("addSessionParams", "Required parameter requestParameters.addSessionParams was null or undefined when calling addSession.");
|
|
25
|
+
}
|
|
26
|
+
const queryParameters = {};
|
|
27
|
+
const headerParameters = {};
|
|
28
|
+
headerParameters["Content-Type"] = "application/json";
|
|
29
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
30
|
+
headerParameters["x-brkrz-client-id"] =
|
|
31
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
32
|
+
}
|
|
33
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
34
|
+
const token = this.configuration.accessToken;
|
|
35
|
+
const tokenString = await token("idToken", []);
|
|
36
|
+
if (tokenString) {
|
|
37
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const response = await this.request({
|
|
41
|
+
path: `/sessions`,
|
|
42
|
+
method: "POST",
|
|
43
|
+
headers: headerParameters,
|
|
44
|
+
query: queryParameters,
|
|
45
|
+
body: AddSessionParamsToJSON(requestParameters.addSessionParams),
|
|
46
|
+
}, initOverrides);
|
|
47
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LoginResponseFromJSON(jsonValue));
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
*/
|
|
51
|
+
async addSession(requestParameters, initOverrides) {
|
|
52
|
+
const response = await this.addSessionRaw(requestParameters, initOverrides);
|
|
53
|
+
return await response.value();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* If login returns the state `challenge`, the login must be completed by providing a challenge response first.
|
|
57
|
+
*/
|
|
58
|
+
async addSessionCompleteChallengeRaw(requestParameters, initOverrides) {
|
|
59
|
+
if (requestParameters.addSessionCompleteChallengeParams === null ||
|
|
60
|
+
requestParameters.addSessionCompleteChallengeParams === undefined) {
|
|
61
|
+
throw new runtime.RequiredError("addSessionCompleteChallengeParams", "Required parameter requestParameters.addSessionCompleteChallengeParams was null or undefined when calling addSessionCompleteChallenge.");
|
|
62
|
+
}
|
|
63
|
+
const queryParameters = {};
|
|
64
|
+
const headerParameters = {};
|
|
65
|
+
headerParameters["Content-Type"] = "application/json";
|
|
66
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
67
|
+
headerParameters["x-brkrz-client-id"] =
|
|
68
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
69
|
+
}
|
|
70
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
71
|
+
const token = this.configuration.accessToken;
|
|
72
|
+
const tokenString = await token("idToken", []);
|
|
73
|
+
if (tokenString) {
|
|
74
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const response = await this.request({
|
|
78
|
+
path: `/sessions/completeLogin`,
|
|
79
|
+
method: "POST",
|
|
80
|
+
headers: headerParameters,
|
|
81
|
+
query: queryParameters,
|
|
82
|
+
body: AddSessionCompleteChallengeParamsToJSON(requestParameters.addSessionCompleteChallengeParams),
|
|
83
|
+
}, initOverrides);
|
|
84
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LoginResponseReadyFromJSON(jsonValue));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* If login returns the state `challenge`, the login must be completed by providing a challenge response first.
|
|
88
|
+
*/
|
|
89
|
+
async addSessionCompleteChallenge(requestParameters, initOverrides) {
|
|
90
|
+
const response = await this.addSessionCompleteChallengeRaw(requestParameters, initOverrides);
|
|
91
|
+
return await response.value();
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Cancel a decoupled operation. This is deprecated, use the new `CancelDecoupledOperation` instead (which does not require the sessionId anymore).
|
|
95
|
+
*/
|
|
96
|
+
async cancelDecoupledOperationLegacyRaw(requestParameters, initOverrides) {
|
|
97
|
+
if (requestParameters.sessionId === null ||
|
|
98
|
+
requestParameters.sessionId === undefined) {
|
|
99
|
+
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling cancelDecoupledOperationLegacy.");
|
|
100
|
+
}
|
|
101
|
+
if (requestParameters.decoupledOperationId === null ||
|
|
102
|
+
requestParameters.decoupledOperationId === undefined) {
|
|
103
|
+
throw new runtime.RequiredError("decoupledOperationId", "Required parameter requestParameters.decoupledOperationId was null or undefined when calling cancelDecoupledOperationLegacy.");
|
|
104
|
+
}
|
|
105
|
+
const queryParameters = {};
|
|
106
|
+
const headerParameters = {};
|
|
107
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
108
|
+
headerParameters["x-brkrz-client-id"] =
|
|
109
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
110
|
+
}
|
|
111
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
112
|
+
const token = this.configuration.accessToken;
|
|
113
|
+
const tokenString = await token("idToken", []);
|
|
114
|
+
if (tokenString) {
|
|
115
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const response = await this.request({
|
|
119
|
+
path: `/sessions/{sessionId}/decoupledOperation/{decoupledOperationId}`
|
|
120
|
+
.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters.sessionId)))
|
|
121
|
+
.replace(`{${"decoupledOperationId"}}`, encodeURIComponent(String(requestParameters.decoupledOperationId))),
|
|
122
|
+
method: "DELETE",
|
|
123
|
+
headers: headerParameters,
|
|
124
|
+
query: queryParameters,
|
|
125
|
+
}, initOverrides);
|
|
126
|
+
return new runtime.VoidApiResponse(response);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Cancel a decoupled operation. This is deprecated, use the new `CancelDecoupledOperation` instead (which does not require the sessionId anymore).
|
|
130
|
+
*/
|
|
131
|
+
async cancelDecoupledOperationLegacy(requestParameters, initOverrides) {
|
|
132
|
+
await this.cancelDecoupledOperationLegacyRaw(requestParameters, initOverrides);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* For brokers with OAuth login processes, this adds the session to the user\'s account after redirects happen. Only the user that is redirected from the broker login in the browser will receive the `code`. This step ensures that the logged-in user at brokerize is actually the one that has gone through the broker OAuth steps.
|
|
136
|
+
*/
|
|
137
|
+
async confirmOAuthRaw(requestParameters, initOverrides) {
|
|
138
|
+
if (requestParameters.confirmOAuthParams === null ||
|
|
139
|
+
requestParameters.confirmOAuthParams === undefined) {
|
|
140
|
+
throw new runtime.RequiredError("confirmOAuthParams", "Required parameter requestParameters.confirmOAuthParams was null or undefined when calling confirmOAuth.");
|
|
141
|
+
}
|
|
142
|
+
const queryParameters = {};
|
|
143
|
+
const headerParameters = {};
|
|
144
|
+
headerParameters["Content-Type"] = "application/json";
|
|
145
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
146
|
+
headerParameters["x-brkrz-client-id"] =
|
|
147
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
148
|
+
}
|
|
149
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
150
|
+
const token = this.configuration.accessToken;
|
|
151
|
+
const tokenString = await token("idToken", []);
|
|
152
|
+
if (tokenString) {
|
|
153
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const response = await this.request({
|
|
157
|
+
path: `/sessions/confirmOAuth`,
|
|
158
|
+
method: "POST",
|
|
159
|
+
headers: headerParameters,
|
|
160
|
+
query: queryParameters,
|
|
161
|
+
body: ConfirmOAuthParamsToJSON(requestParameters.confirmOAuthParams),
|
|
162
|
+
}, initOverrides);
|
|
163
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ConfirmOAuthResponseFromJSON(jsonValue));
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* For brokers with OAuth login processes, this adds the session to the user\'s account after redirects happen. Only the user that is redirected from the broker login in the browser will receive the `code`. This step ensures that the logged-in user at brokerize is actually the one that has gone through the broker OAuth steps.
|
|
167
|
+
*/
|
|
168
|
+
async confirmOAuth(requestParameters, initOverrides) {
|
|
169
|
+
const response = await this.confirmOAuthRaw(requestParameters, initOverrides);
|
|
170
|
+
return await response.value();
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* If the user chose an auth method from `GetAuthInfo` with the flow `CHALLENGE_RESPONSE`, before enabling session TAN, a challenge must be requested first.
|
|
174
|
+
*/
|
|
175
|
+
async createSessionTanChallengeRaw(requestParameters, initOverrides) {
|
|
176
|
+
if (requestParameters.sessionId === null ||
|
|
177
|
+
requestParameters.sessionId === undefined) {
|
|
178
|
+
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling createSessionTanChallenge.");
|
|
179
|
+
}
|
|
180
|
+
if (requestParameters.createTanChallengeParams === null ||
|
|
181
|
+
requestParameters.createTanChallengeParams === undefined) {
|
|
182
|
+
throw new runtime.RequiredError("createTanChallengeParams", "Required parameter requestParameters.createTanChallengeParams was null or undefined when calling createSessionTanChallenge.");
|
|
183
|
+
}
|
|
184
|
+
const queryParameters = {};
|
|
185
|
+
const headerParameters = {};
|
|
186
|
+
headerParameters["Content-Type"] = "application/json";
|
|
187
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
188
|
+
headerParameters["x-brkrz-client-id"] =
|
|
189
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
190
|
+
}
|
|
191
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
192
|
+
const token = this.configuration.accessToken;
|
|
193
|
+
const tokenString = await token("idToken", []);
|
|
194
|
+
if (tokenString) {
|
|
195
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
const response = await this.request({
|
|
199
|
+
path: `/sessions/{sessionId}/sessiontanchallenge`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters.sessionId))),
|
|
200
|
+
method: "POST",
|
|
201
|
+
headers: headerParameters,
|
|
202
|
+
query: queryParameters,
|
|
203
|
+
body: CreateTanChallengeParamsToJSON(requestParameters.createTanChallengeParams),
|
|
204
|
+
}, initOverrides);
|
|
205
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChallengeFromJSON(jsonValue));
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* If the user chose an auth method from `GetAuthInfo` with the flow `CHALLENGE_RESPONSE`, before enabling session TAN, a challenge must be requested first.
|
|
209
|
+
*/
|
|
210
|
+
async createSessionTanChallenge(requestParameters, initOverrides) {
|
|
211
|
+
const response = await this.createSessionTanChallengeRaw(requestParameters, initOverrides);
|
|
212
|
+
return await response.value();
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
*/
|
|
216
|
+
async enableSessionTanRaw(requestParameters, initOverrides) {
|
|
217
|
+
if (requestParameters.sessionId === null ||
|
|
218
|
+
requestParameters.sessionId === undefined) {
|
|
219
|
+
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling enableSessionTan.");
|
|
220
|
+
}
|
|
221
|
+
if (requestParameters.enableSessionTanParams === null ||
|
|
222
|
+
requestParameters.enableSessionTanParams === undefined) {
|
|
223
|
+
throw new runtime.RequiredError("enableSessionTanParams", "Required parameter requestParameters.enableSessionTanParams was null or undefined when calling enableSessionTan.");
|
|
224
|
+
}
|
|
225
|
+
const queryParameters = {};
|
|
226
|
+
const headerParameters = {};
|
|
227
|
+
headerParameters["Content-Type"] = "application/json";
|
|
228
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
229
|
+
headerParameters["x-brkrz-client-id"] =
|
|
230
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
231
|
+
}
|
|
232
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
233
|
+
const token = this.configuration.accessToken;
|
|
234
|
+
const tokenString = await token("idToken", []);
|
|
235
|
+
if (tokenString) {
|
|
236
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
const response = await this.request({
|
|
240
|
+
path: `/sessions/{sessionId}/sessiontan`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters.sessionId))),
|
|
241
|
+
method: "POST",
|
|
242
|
+
headers: headerParameters,
|
|
243
|
+
query: queryParameters,
|
|
244
|
+
body: EnableSessionTanParamsToJSON(requestParameters.enableSessionTanParams),
|
|
245
|
+
}, initOverrides);
|
|
246
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => EnableSessionTanResponseFromJSON(jsonValue));
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
*/
|
|
250
|
+
async enableSessionTan(requestParameters, initOverrides) {
|
|
251
|
+
const response = await this.enableSessionTanRaw(requestParameters, initOverrides);
|
|
252
|
+
return await response.value();
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* End Session TAN for the given broker session. If applicable, the broker may return a message with a confirmation code which can be looked up in the initial activation SMS. If message is present in the response, it should be displayed to the user.
|
|
256
|
+
*/
|
|
257
|
+
async endSessionTanRaw(requestParameters, initOverrides) {
|
|
258
|
+
if (requestParameters.sessionId === null ||
|
|
259
|
+
requestParameters.sessionId === undefined) {
|
|
260
|
+
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling endSessionTan.");
|
|
261
|
+
}
|
|
262
|
+
const queryParameters = {};
|
|
263
|
+
const headerParameters = {};
|
|
264
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
265
|
+
headerParameters["x-brkrz-client-id"] =
|
|
266
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
267
|
+
}
|
|
268
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
269
|
+
const token = this.configuration.accessToken;
|
|
270
|
+
const tokenString = await token("idToken", []);
|
|
271
|
+
if (tokenString) {
|
|
272
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
const response = await this.request({
|
|
276
|
+
path: `/sessions/{sessionId}/sessiontan`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters.sessionId))),
|
|
277
|
+
method: "DELETE",
|
|
278
|
+
headers: headerParameters,
|
|
279
|
+
query: queryParameters,
|
|
280
|
+
}, initOverrides);
|
|
281
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => EndSessionTanResponseFromJSON(jsonValue));
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* End Session TAN for the given broker session. If applicable, the broker may return a message with a confirmation code which can be looked up in the initial activation SMS. If message is present in the response, it should be displayed to the user.
|
|
285
|
+
*/
|
|
286
|
+
async endSessionTan(requestParameters, initOverrides) {
|
|
287
|
+
const response = await this.endSessionTanRaw(requestParameters, initOverrides);
|
|
288
|
+
return await response.value();
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Get the status of a decoupled operation. This is deprecated, use the new `GetDecoupledOperation` instead, which does not require the `sessionId` any more.
|
|
292
|
+
*/
|
|
293
|
+
async getDecoupledOperationStatusLegacyRaw(requestParameters, initOverrides) {
|
|
294
|
+
if (requestParameters.sessionId === null ||
|
|
295
|
+
requestParameters.sessionId === undefined) {
|
|
296
|
+
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling getDecoupledOperationStatusLegacy.");
|
|
297
|
+
}
|
|
298
|
+
if (requestParameters.decoupledOperationId === null ||
|
|
299
|
+
requestParameters.decoupledOperationId === undefined) {
|
|
300
|
+
throw new runtime.RequiredError("decoupledOperationId", "Required parameter requestParameters.decoupledOperationId was null or undefined when calling getDecoupledOperationStatusLegacy.");
|
|
301
|
+
}
|
|
302
|
+
const queryParameters = {};
|
|
303
|
+
const headerParameters = {};
|
|
304
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
305
|
+
headerParameters["x-brkrz-client-id"] =
|
|
306
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
307
|
+
}
|
|
308
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
309
|
+
const token = this.configuration.accessToken;
|
|
310
|
+
const tokenString = await token("idToken", []);
|
|
311
|
+
if (tokenString) {
|
|
312
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
const response = await this.request({
|
|
316
|
+
path: `/sessions/{sessionId}/decoupledOperation/{decoupledOperationId}`
|
|
317
|
+
.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters.sessionId)))
|
|
318
|
+
.replace(`{${"decoupledOperationId"}}`, encodeURIComponent(String(requestParameters.decoupledOperationId))),
|
|
319
|
+
method: "GET",
|
|
320
|
+
headers: headerParameters,
|
|
321
|
+
query: queryParameters,
|
|
322
|
+
}, initOverrides);
|
|
323
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DecoupledOperationStatusFromJSON(jsonValue));
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Get the status of a decoupled operation. This is deprecated, use the new `GetDecoupledOperation` instead, which does not require the `sessionId` any more.
|
|
327
|
+
*/
|
|
328
|
+
async getDecoupledOperationStatusLegacy(requestParameters, initOverrides) {
|
|
329
|
+
const response = await this.getDecoupledOperationStatusLegacyRaw(requestParameters, initOverrides);
|
|
330
|
+
return await response.value();
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Get the currently active broker sessions of the user\'s account.
|
|
334
|
+
*/
|
|
335
|
+
async getSessionsRaw(initOverrides) {
|
|
336
|
+
const queryParameters = {};
|
|
337
|
+
const headerParameters = {};
|
|
338
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
339
|
+
headerParameters["x-brkrz-client-id"] =
|
|
340
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
341
|
+
}
|
|
342
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
343
|
+
const token = this.configuration.accessToken;
|
|
344
|
+
const tokenString = await token("idToken", []);
|
|
345
|
+
if (tokenString) {
|
|
346
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
const response = await this.request({
|
|
350
|
+
path: `/sessions`,
|
|
351
|
+
method: "GET",
|
|
352
|
+
headers: headerParameters,
|
|
353
|
+
query: queryParameters,
|
|
354
|
+
}, initOverrides);
|
|
355
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SessionResponseFromJSON(jsonValue));
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Get the currently active broker sessions of the user\'s account.
|
|
359
|
+
*/
|
|
360
|
+
async getSessions(initOverrides) {
|
|
361
|
+
const response = await this.getSessionsRaw(initOverrides);
|
|
362
|
+
return await response.value();
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Log out from the given broker session.
|
|
366
|
+
*/
|
|
367
|
+
async logoutSessionRaw(requestParameters, initOverrides) {
|
|
368
|
+
if (requestParameters.sessionId === null ||
|
|
369
|
+
requestParameters.sessionId === undefined) {
|
|
370
|
+
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling logoutSession.");
|
|
371
|
+
}
|
|
372
|
+
const queryParameters = {};
|
|
373
|
+
const headerParameters = {};
|
|
374
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
375
|
+
headerParameters["x-brkrz-client-id"] =
|
|
376
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
377
|
+
}
|
|
378
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
379
|
+
const token = this.configuration.accessToken;
|
|
380
|
+
const tokenString = await token("idToken", []);
|
|
381
|
+
if (tokenString) {
|
|
382
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
const response = await this.request({
|
|
386
|
+
path: `/sessions/{sessionId}`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters.sessionId))),
|
|
387
|
+
method: "DELETE",
|
|
388
|
+
headers: headerParameters,
|
|
389
|
+
query: queryParameters,
|
|
390
|
+
}, initOverrides);
|
|
391
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LogoutOkResponseBodyFromJSON(jsonValue));
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Log out from the given broker session.
|
|
395
|
+
*/
|
|
396
|
+
async logoutSession(requestParameters, initOverrides) {
|
|
397
|
+
const response = await this.logoutSessionRaw(requestParameters, initOverrides);
|
|
398
|
+
return await response.value();
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* For brokers with `isOAuth`, sessions can not be created using `AddSession`. This is how a session can be added for an OAuth-based login process: 1. use `prepareOAuthRedirect` to obtain a URL to redirect to. You can provide a `returnTo` URL which will be redirected to later. Note that a list of allowed URLs has to be configured for the client. 2. redirect the user\'s browser to the `redirectTo` URL 3. after the user has logged in at the broker\'s interface, a redirect to `returnTo` with the URL query parameters `verifysession=1`, `code` and `ticketId` will happen 4. the `returnTo` page must call `confirmOAuth` with the given `ticketId` and `code` to finally add the session to the user\'s account
|
|
402
|
+
*/
|
|
403
|
+
async prepareOAuthRedirectRaw(requestParameters, initOverrides) {
|
|
404
|
+
if (requestParameters.prepareOAuthRedirectParams === null ||
|
|
405
|
+
requestParameters.prepareOAuthRedirectParams === undefined) {
|
|
406
|
+
throw new runtime.RequiredError("prepareOAuthRedirectParams", "Required parameter requestParameters.prepareOAuthRedirectParams was null or undefined when calling prepareOAuthRedirect.");
|
|
407
|
+
}
|
|
408
|
+
const queryParameters = {};
|
|
409
|
+
const headerParameters = {};
|
|
410
|
+
headerParameters["Content-Type"] = "application/json";
|
|
411
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
412
|
+
headerParameters["x-brkrz-client-id"] =
|
|
413
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
414
|
+
}
|
|
415
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
416
|
+
const token = this.configuration.accessToken;
|
|
417
|
+
const tokenString = await token("idToken", []);
|
|
418
|
+
if (tokenString) {
|
|
419
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
const response = await this.request({
|
|
423
|
+
path: `/sessions/prepareOAuthRedirect`,
|
|
424
|
+
method: "POST",
|
|
425
|
+
headers: headerParameters,
|
|
426
|
+
query: queryParameters,
|
|
427
|
+
body: PrepareOAuthRedirectParamsToJSON(requestParameters.prepareOAuthRedirectParams),
|
|
428
|
+
}, initOverrides);
|
|
429
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PrepareOAuthRedirectResponseFromJSON(jsonValue));
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* For brokers with `isOAuth`, sessions can not be created using `AddSession`. This is how a session can be added for an OAuth-based login process: 1. use `prepareOAuthRedirect` to obtain a URL to redirect to. You can provide a `returnTo` URL which will be redirected to later. Note that a list of allowed URLs has to be configured for the client. 2. redirect the user\'s browser to the `redirectTo` URL 3. after the user has logged in at the broker\'s interface, a redirect to `returnTo` with the URL query parameters `verifysession=1`, `code` and `ticketId` will happen 4. the `returnTo` page must call `confirmOAuth` with the given `ticketId` and `code` to finally add the session to the user\'s account
|
|
433
|
+
*/
|
|
434
|
+
async prepareOAuthRedirect(requestParameters, initOverrides) {
|
|
435
|
+
const response = await this.prepareOAuthRedirectRaw(requestParameters, initOverrides);
|
|
436
|
+
return await response.value();
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Trigger a background sync process for the given broker session. This means that a sync will be scheduled as soon as possible. All data related to the portfolio (e.g. positions and orders) will be loaded into the brokerize database.
|
|
440
|
+
*/
|
|
441
|
+
async triggerSessionSyncRaw(requestParameters, initOverrides) {
|
|
442
|
+
if (requestParameters.sessionId === null ||
|
|
443
|
+
requestParameters.sessionId === undefined) {
|
|
444
|
+
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling triggerSessionSync.");
|
|
445
|
+
}
|
|
446
|
+
const queryParameters = {};
|
|
447
|
+
const headerParameters = {};
|
|
448
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
449
|
+
headerParameters["x-brkrz-client-id"] =
|
|
450
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
451
|
+
}
|
|
452
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
453
|
+
const token = this.configuration.accessToken;
|
|
454
|
+
const tokenString = await token("idToken", []);
|
|
455
|
+
if (tokenString) {
|
|
456
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
const response = await this.request({
|
|
460
|
+
path: `/sessions/{sessionId}/sync`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters.sessionId))),
|
|
461
|
+
method: "POST",
|
|
462
|
+
headers: headerParameters,
|
|
463
|
+
query: queryParameters,
|
|
464
|
+
}, initOverrides);
|
|
465
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => OkResponseBodyFromJSON(jsonValue));
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Trigger a background sync process for the given broker session. This means that a sync will be scheduled as soon as possible. All data related to the portfolio (e.g. positions and orders) will be loaded into the brokerize database.
|
|
469
|
+
*/
|
|
470
|
+
async triggerSessionSync(requestParameters, initOverrides) {
|
|
471
|
+
const response = await this.triggerSessionSyncRaw(requestParameters, initOverrides);
|
|
472
|
+
return await response.value();
|
|
473
|
+
}
|
|
474
|
+
}
|