@brokerize/client 1.1.4 → 1.2.0
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/README.md +1 -1
- package/dist/authorizedApiContext.d.ts +2 -2
- package/dist/client.d.ts +278 -15
- package/dist/swagger/apis/CancelOrderApi.d.ts +5 -5
- package/dist/swagger/apis/CancelOrderApi.js +6 -5
- package/dist/swagger/apis/ChangeOrderApi.d.ts +3 -3
- package/dist/swagger/apis/ChangeOrderApi.js +4 -3
- package/dist/swagger/apis/DefaultApi.d.ts +22 -0
- package/dist/swagger/apis/DefaultApi.js +79 -8
- package/dist/swagger/apis/TradeApi.d.ts +2 -2
- package/dist/swagger/apis/TradeApi.js +2 -2
- package/dist/swagger/models/AuthMethodDecoupled.d.ts +1 -2
- package/dist/swagger/models/CancelOrderDecoupled.d.ts +40 -0
- package/dist/swagger/models/CancelOrderDecoupled.js +46 -0
- package/dist/swagger/models/CancelOrderDecoupledAllOf.d.ts +34 -0
- package/dist/swagger/models/CancelOrderDecoupledAllOf.js +44 -0
- package/dist/swagger/models/CancelOrderDecoupledSpecifics.d.ts +27 -0
- package/dist/swagger/models/CancelOrderDecoupledSpecifics.js +38 -0
- package/dist/swagger/models/CancelOrderParams.d.ts +3 -0
- package/dist/swagger/models/CancelOrderParams.js +5 -0
- package/dist/swagger/models/CancelOrderParamsMode.d.ts +1 -0
- package/dist/swagger/models/CancelOrderParamsMode.js +1 -0
- package/dist/swagger/models/CancelOrderResponse.d.ts +28 -0
- package/dist/swagger/models/CancelOrderResponse.js +40 -0
- package/dist/swagger/models/ChangeOrderResponse.d.ts +28 -0
- package/dist/swagger/models/ChangeOrderResponse.js +40 -0
- package/dist/swagger/models/CreateTradeResponse.d.ts +9 -1
- package/dist/swagger/models/CreateTradeResponse.js +4 -0
- package/dist/swagger/models/DecoupledOperationStatus.d.ts +14 -0
- package/dist/swagger/models/DecoupledOperationStatus.js +4 -0
- package/dist/swagger/models/index.d.ts +5 -0
- package/dist/swagger/models/index.js +5 -0
- package/package.json +1 -1
|
@@ -19,13 +19,47 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
19
19
|
/**
|
|
20
20
|
*/
|
|
21
21
|
async cancelDecoupledOperationRaw(requestParameters, initOverrides) {
|
|
22
|
+
if (requestParameters.decoupledOperationId === null ||
|
|
23
|
+
requestParameters.decoupledOperationId === undefined) {
|
|
24
|
+
throw new runtime.RequiredError("decoupledOperationId", "Required parameter requestParameters.decoupledOperationId was null or undefined when calling cancelDecoupledOperation.");
|
|
25
|
+
}
|
|
26
|
+
const queryParameters = {};
|
|
27
|
+
const headerParameters = {};
|
|
28
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
29
|
+
headerParameters["x-brkrz-client-id"] =
|
|
30
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
31
|
+
}
|
|
32
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
33
|
+
const token = this.configuration.accessToken;
|
|
34
|
+
const tokenString = await token("idToken", []);
|
|
35
|
+
if (tokenString) {
|
|
36
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const response = await this.request({
|
|
40
|
+
path: `/decoupledOperations/{decoupledOperationId}`.replace(`{${"decoupledOperationId"}}`, encodeURIComponent(String(requestParameters.decoupledOperationId))),
|
|
41
|
+
method: "DELETE",
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
}, initOverrides);
|
|
45
|
+
return new runtime.VoidApiResponse(response);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
*/
|
|
49
|
+
async cancelDecoupledOperation(requestParameters, initOverrides) {
|
|
50
|
+
await this.cancelDecoupledOperationRaw(requestParameters, initOverrides);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Cancel a decoupled operation. This is deprecated, use the new `CancelDecoupledOperation` instead (which does not require the sessionId anymore).
|
|
54
|
+
*/
|
|
55
|
+
async cancelDecoupledOperationLegacyRaw(requestParameters, initOverrides) {
|
|
22
56
|
if (requestParameters.sessionId === null ||
|
|
23
57
|
requestParameters.sessionId === undefined) {
|
|
24
|
-
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling
|
|
58
|
+
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling cancelDecoupledOperationLegacy.");
|
|
25
59
|
}
|
|
26
60
|
if (requestParameters.decoupledOperationId === null ||
|
|
27
61
|
requestParameters.decoupledOperationId === undefined) {
|
|
28
|
-
throw new runtime.RequiredError("decoupledOperationId", "Required parameter requestParameters.decoupledOperationId was null or undefined when calling
|
|
62
|
+
throw new runtime.RequiredError("decoupledOperationId", "Required parameter requestParameters.decoupledOperationId was null or undefined when calling cancelDecoupledOperationLegacy.");
|
|
29
63
|
}
|
|
30
64
|
const queryParameters = {};
|
|
31
65
|
const headerParameters = {};
|
|
@@ -51,9 +85,10 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
51
85
|
return new runtime.VoidApiResponse(response);
|
|
52
86
|
}
|
|
53
87
|
/**
|
|
88
|
+
* Cancel a decoupled operation. This is deprecated, use the new `CancelDecoupledOperation` instead (which does not require the sessionId anymore).
|
|
54
89
|
*/
|
|
55
|
-
async
|
|
56
|
-
await this.
|
|
90
|
+
async cancelDecoupledOperationLegacy(requestParameters, initOverrides) {
|
|
91
|
+
await this.cancelDecoupledOperationLegacyRaw(requestParameters, initOverrides);
|
|
57
92
|
}
|
|
58
93
|
/**
|
|
59
94
|
* Create a guest user and return a token which can be used to access resources. The lifetime of the generated temporary user as well as the returned `access_token` depend on the client configuration. It is usually around 24 hours. For some clients, tokens can be expired earlier based on inactivity. If the client has configured a longer lifetime for their guest users, a `refresh_token` is included in the response. This token can be used to renew the `access_token` after it has expired. The `refresh_token` can be used to obtain a new `access_token` after the original token has expired using the `/user/token` endpoint.
|
|
@@ -302,13 +337,48 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
302
337
|
/**
|
|
303
338
|
*/
|
|
304
339
|
async getDecoupledOperationStatusRaw(requestParameters, initOverrides) {
|
|
340
|
+
if (requestParameters.decoupledOperationId === null ||
|
|
341
|
+
requestParameters.decoupledOperationId === undefined) {
|
|
342
|
+
throw new runtime.RequiredError("decoupledOperationId", "Required parameter requestParameters.decoupledOperationId was null or undefined when calling getDecoupledOperationStatus.");
|
|
343
|
+
}
|
|
344
|
+
const queryParameters = {};
|
|
345
|
+
const headerParameters = {};
|
|
346
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
347
|
+
headerParameters["x-brkrz-client-id"] =
|
|
348
|
+
this.configuration.apiKey("x-brkrz-client-id"); // clientId authentication
|
|
349
|
+
}
|
|
350
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
351
|
+
const token = this.configuration.accessToken;
|
|
352
|
+
const tokenString = await token("idToken", []);
|
|
353
|
+
if (tokenString) {
|
|
354
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
const response = await this.request({
|
|
358
|
+
path: `/decoupledOperations/{decoupledOperationId}`.replace(`{${"decoupledOperationId"}}`, encodeURIComponent(String(requestParameters.decoupledOperationId))),
|
|
359
|
+
method: "GET",
|
|
360
|
+
headers: headerParameters,
|
|
361
|
+
query: queryParameters,
|
|
362
|
+
}, initOverrides);
|
|
363
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DecoupledOperationStatusFromJSON(jsonValue));
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
*/
|
|
367
|
+
async getDecoupledOperationStatus(requestParameters, initOverrides) {
|
|
368
|
+
const response = await this.getDecoupledOperationStatusRaw(requestParameters, initOverrides);
|
|
369
|
+
return await response.value();
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Get the status of a decoupled operation. This is deprecated, use the new `GetDecoupledOperation` instead, which does not require the `sessionId` any more.
|
|
373
|
+
*/
|
|
374
|
+
async getDecoupledOperationStatusLegacyRaw(requestParameters, initOverrides) {
|
|
305
375
|
if (requestParameters.sessionId === null ||
|
|
306
376
|
requestParameters.sessionId === undefined) {
|
|
307
|
-
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling
|
|
377
|
+
throw new runtime.RequiredError("sessionId", "Required parameter requestParameters.sessionId was null or undefined when calling getDecoupledOperationStatusLegacy.");
|
|
308
378
|
}
|
|
309
379
|
if (requestParameters.decoupledOperationId === null ||
|
|
310
380
|
requestParameters.decoupledOperationId === undefined) {
|
|
311
|
-
throw new runtime.RequiredError("decoupledOperationId", "Required parameter requestParameters.decoupledOperationId was null or undefined when calling
|
|
381
|
+
throw new runtime.RequiredError("decoupledOperationId", "Required parameter requestParameters.decoupledOperationId was null or undefined when calling getDecoupledOperationStatusLegacy.");
|
|
312
382
|
}
|
|
313
383
|
const queryParameters = {};
|
|
314
384
|
const headerParameters = {};
|
|
@@ -334,9 +404,10 @@ export class DefaultApi extends runtime.BaseAPI {
|
|
|
334
404
|
return new runtime.JSONApiResponse(response, (jsonValue) => DecoupledOperationStatusFromJSON(jsonValue));
|
|
335
405
|
}
|
|
336
406
|
/**
|
|
407
|
+
* Get the status of a decoupled operation. This is deprecated, use the new `GetDecoupledOperation` instead, which does not require the `sessionId` any more.
|
|
337
408
|
*/
|
|
338
|
-
async
|
|
339
|
-
const response = await this.
|
|
409
|
+
async getDecoupledOperationStatusLegacy(requestParameters, initOverrides) {
|
|
410
|
+
const response = await this.getDecoupledOperationStatusLegacyRaw(requestParameters, initOverrides);
|
|
340
411
|
return await response.value();
|
|
341
412
|
}
|
|
342
413
|
/**
|
|
@@ -42,11 +42,11 @@ export interface PrepareTradeRequest {
|
|
|
42
42
|
*/
|
|
43
43
|
export declare class TradeApi extends runtime.BaseAPI {
|
|
44
44
|
/**
|
|
45
|
-
* Create a trade. It is possible that the broker rejects the order because of some extra hints that the user must accept (which can not be figured out in `prepareTrade`, e.g. because the order volume has to be determined first). In
|
|
45
|
+
* Create a trade. It is possible that the broker rejects the order because of some extra hints that the user must accept (which can not be figured out in `prepareTrade`, e.g. because the order volume has to be determined first). In this case, the `MUST_ACCEPT_HINT` error code is returned. The user can choose to accept that hint. If that is the case, the request can be retried with the `acceptHintId` parameter.
|
|
46
46
|
*/
|
|
47
47
|
createTradeRaw(requestParameters: CreateTradeRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<CreateTradeResponse>>;
|
|
48
48
|
/**
|
|
49
|
-
* Create a trade. It is possible that the broker rejects the order because of some extra hints that the user must accept (which can not be figured out in `prepareTrade`, e.g. because the order volume has to be determined first). In
|
|
49
|
+
* Create a trade. It is possible that the broker rejects the order because of some extra hints that the user must accept (which can not be figured out in `prepareTrade`, e.g. because the order volume has to be determined first). In this case, the `MUST_ACCEPT_HINT` error code is returned. The user can choose to accept that hint. If that is the case, the request can be retried with the `acceptHintId` parameter.
|
|
50
50
|
*/
|
|
51
51
|
createTrade(requestParameters: CreateTradeRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<CreateTradeResponse>;
|
|
52
52
|
/**
|
|
@@ -17,7 +17,7 @@ import { ChallengeFromJSON, CreateOrderChallengeParamsToJSON, CreateOrderParamsT
|
|
|
17
17
|
*/
|
|
18
18
|
export class TradeApi extends runtime.BaseAPI {
|
|
19
19
|
/**
|
|
20
|
-
* Create a trade. It is possible that the broker rejects the order because of some extra hints that the user must accept (which can not be figured out in `prepareTrade`, e.g. because the order volume has to be determined first). In
|
|
20
|
+
* Create a trade. It is possible that the broker rejects the order because of some extra hints that the user must accept (which can not be figured out in `prepareTrade`, e.g. because the order volume has to be determined first). In this case, the `MUST_ACCEPT_HINT` error code is returned. The user can choose to accept that hint. If that is the case, the request can be retried with the `acceptHintId` parameter.
|
|
21
21
|
*/
|
|
22
22
|
async createTradeRaw(requestParameters, initOverrides) {
|
|
23
23
|
if (requestParameters.createOrderParams === null ||
|
|
@@ -48,7 +48,7 @@ export class TradeApi extends runtime.BaseAPI {
|
|
|
48
48
|
return new runtime.JSONApiResponse(response, (jsonValue) => CreateTradeResponseFromJSON(jsonValue));
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* Create a trade. It is possible that the broker rejects the order because of some extra hints that the user must accept (which can not be figured out in `prepareTrade`, e.g. because the order volume has to be determined first). In
|
|
51
|
+
* Create a trade. It is possible that the broker rejects the order because of some extra hints that the user must accept (which can not be figured out in `prepareTrade`, e.g. because the order volume has to be determined first). In this case, the `MUST_ACCEPT_HINT` error code is returned. The user can choose to accept that hint. If that is the case, the request can be retried with the `acceptHintId` parameter.
|
|
52
52
|
*/
|
|
53
53
|
async createTrade(requestParameters, initOverrides) {
|
|
54
54
|
const response = await this.createTradeRaw(requestParameters, initOverrides);
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
/**
|
|
12
12
|
* With the `DECOUPLED` flow, the operation is created right away without creating a challenge first. The operation's
|
|
13
13
|
* response will include a `decoupledOperationId` which can be subscribed to using `GetDecoupledOperationStatus` and via
|
|
14
|
-
* a WebSocket subscription. Also, the operation can be cancelled by the user using `CancelDecoupledOperation`.
|
|
15
|
-
* this flow is only implemented for `EnableSessionTan`.
|
|
14
|
+
* a WebSocket subscription. Also, the operation can be cancelled by the user using `CancelDecoupledOperation`.
|
|
16
15
|
* @export
|
|
17
16
|
* @interface AuthMethodDecoupled
|
|
18
17
|
*/
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @export
|
|
14
|
+
* @interface CancelOrderDecoupled
|
|
15
|
+
*/
|
|
16
|
+
export interface CancelOrderDecoupled {
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @type {string}
|
|
20
|
+
* @memberof CancelOrderDecoupled
|
|
21
|
+
*/
|
|
22
|
+
mode: CancelOrderDecoupledModeEnum;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof CancelOrderDecoupled
|
|
27
|
+
*/
|
|
28
|
+
authMethod?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
export declare const CancelOrderDecoupledModeEnum: {
|
|
34
|
+
readonly Decoupled: "decoupled";
|
|
35
|
+
};
|
|
36
|
+
export type CancelOrderDecoupledModeEnum = (typeof CancelOrderDecoupledModeEnum)[keyof typeof CancelOrderDecoupledModeEnum];
|
|
37
|
+
export declare function CancelOrderDecoupledFromJSON(json: any): CancelOrderDecoupled;
|
|
38
|
+
export declare function CancelOrderDecoupledFromJSONTyped(json: any, ignoreDiscriminator: boolean): CancelOrderDecoupled;
|
|
39
|
+
export declare function CancelOrderDecoupledToJSONRecursive(value?: CancelOrderDecoupled | null, ignoreParent?: boolean): any;
|
|
40
|
+
export declare function CancelOrderDecoupledToJSON(value?: CancelOrderDecoupled | null): any;
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { exists } from "../runtime";
|
|
14
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const CancelOrderDecoupledModeEnum = {
|
|
18
|
+
Decoupled: "decoupled",
|
|
19
|
+
};
|
|
20
|
+
export function CancelOrderDecoupledFromJSON(json) {
|
|
21
|
+
return CancelOrderDecoupledFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function CancelOrderDecoupledFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json === undefined || json === null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
mode: json["mode"],
|
|
29
|
+
authMethod: !exists(json, "authMethod") ? undefined : json["authMethod"],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export function CancelOrderDecoupledToJSONRecursive(value, ignoreParent = false) {
|
|
33
|
+
if (value === undefined) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
if (value === null) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
mode: value.mode,
|
|
41
|
+
authMethod: value.authMethod,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export function CancelOrderDecoupledToJSON(value) {
|
|
45
|
+
return CancelOrderDecoupledToJSONRecursive(value, false);
|
|
46
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @export
|
|
14
|
+
* @interface CancelOrderDecoupledAllOf
|
|
15
|
+
*/
|
|
16
|
+
export interface CancelOrderDecoupledAllOf {
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @type {string}
|
|
20
|
+
* @memberof CancelOrderDecoupledAllOf
|
|
21
|
+
*/
|
|
22
|
+
mode?: CancelOrderDecoupledAllOfModeEnum;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
export declare const CancelOrderDecoupledAllOfModeEnum: {
|
|
28
|
+
readonly Decoupled: "decoupled";
|
|
29
|
+
};
|
|
30
|
+
export type CancelOrderDecoupledAllOfModeEnum = (typeof CancelOrderDecoupledAllOfModeEnum)[keyof typeof CancelOrderDecoupledAllOfModeEnum];
|
|
31
|
+
export declare function CancelOrderDecoupledAllOfFromJSON(json: any): CancelOrderDecoupledAllOf;
|
|
32
|
+
export declare function CancelOrderDecoupledAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): CancelOrderDecoupledAllOf;
|
|
33
|
+
export declare function CancelOrderDecoupledAllOfToJSONRecursive(value?: CancelOrderDecoupledAllOf | null, ignoreParent?: boolean): any;
|
|
34
|
+
export declare function CancelOrderDecoupledAllOfToJSON(value?: CancelOrderDecoupledAllOf | null): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { exists } from "../runtime";
|
|
14
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const CancelOrderDecoupledAllOfModeEnum = {
|
|
18
|
+
Decoupled: "decoupled",
|
|
19
|
+
};
|
|
20
|
+
export function CancelOrderDecoupledAllOfFromJSON(json) {
|
|
21
|
+
return CancelOrderDecoupledAllOfFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function CancelOrderDecoupledAllOfFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json === undefined || json === null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
mode: !exists(json, "mode") ? undefined : json["mode"],
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function CancelOrderDecoupledAllOfToJSONRecursive(value, ignoreParent = false) {
|
|
32
|
+
if (value === undefined) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
if (value === null) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
mode: value.mode,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function CancelOrderDecoupledAllOfToJSON(value) {
|
|
43
|
+
return CancelOrderDecoupledAllOfToJSONRecursive(value, false);
|
|
44
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @export
|
|
14
|
+
* @interface CancelOrderDecoupledSpecifics
|
|
15
|
+
*/
|
|
16
|
+
export interface CancelOrderDecoupledSpecifics {
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @type {string}
|
|
20
|
+
* @memberof CancelOrderDecoupledSpecifics
|
|
21
|
+
*/
|
|
22
|
+
authMethod?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function CancelOrderDecoupledSpecificsFromJSON(json: any): CancelOrderDecoupledSpecifics;
|
|
25
|
+
export declare function CancelOrderDecoupledSpecificsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CancelOrderDecoupledSpecifics;
|
|
26
|
+
export declare function CancelOrderDecoupledSpecificsToJSONRecursive(value?: CancelOrderDecoupledSpecifics | null, ignoreParent?: boolean): any;
|
|
27
|
+
export declare function CancelOrderDecoupledSpecificsToJSON(value?: CancelOrderDecoupledSpecifics | null): any;
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { exists } from "../runtime";
|
|
14
|
+
export function CancelOrderDecoupledSpecificsFromJSON(json) {
|
|
15
|
+
return CancelOrderDecoupledSpecificsFromJSONTyped(json, false);
|
|
16
|
+
}
|
|
17
|
+
export function CancelOrderDecoupledSpecificsFromJSONTyped(json, ignoreDiscriminator) {
|
|
18
|
+
if (json === undefined || json === null) {
|
|
19
|
+
return json;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
authMethod: !exists(json, "authMethod") ? undefined : json["authMethod"],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function CancelOrderDecoupledSpecificsToJSONRecursive(value, ignoreParent = false) {
|
|
26
|
+
if (value === undefined) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
if (value === null) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
authMethod: value.authMethod,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function CancelOrderDecoupledSpecificsToJSON(value) {
|
|
37
|
+
return CancelOrderDecoupledSpecificsToJSONRecursive(value, false);
|
|
38
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* Do not edit the class manually.
|
|
10
10
|
*/
|
|
11
11
|
import { CancelOrderChallengeResponse } from "./CancelOrderChallengeResponse";
|
|
12
|
+
import { CancelOrderDecoupled } from "./CancelOrderDecoupled";
|
|
12
13
|
import { CreateModeSessionTan } from "./CreateModeSessionTan";
|
|
13
14
|
/**
|
|
14
15
|
* @type CancelOrderParams
|
|
@@ -18,6 +19,8 @@ import { CreateModeSessionTan } from "./CreateModeSessionTan";
|
|
|
18
19
|
export type CancelOrderParams = ({
|
|
19
20
|
mode: "challengeResponse";
|
|
20
21
|
} & CancelOrderChallengeResponse) | ({
|
|
22
|
+
mode: "decoupled";
|
|
23
|
+
} & CancelOrderDecoupled) | ({
|
|
21
24
|
mode: "sessionTan";
|
|
22
25
|
} & CreateModeSessionTan);
|
|
23
26
|
export declare function CancelOrderParamsFromJSON(json: any): CancelOrderParams;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* Do not edit the class manually.
|
|
12
12
|
*/
|
|
13
13
|
import { CancelOrderChallengeResponseFromJSONTyped, CancelOrderChallengeResponseToJSON, } from "./CancelOrderChallengeResponse";
|
|
14
|
+
import { CancelOrderDecoupledFromJSONTyped, CancelOrderDecoupledToJSON, } from "./CancelOrderDecoupled";
|
|
14
15
|
import { CreateModeSessionTanFromJSONTyped, CreateModeSessionTanToJSON, } from "./CreateModeSessionTan";
|
|
15
16
|
export function CancelOrderParamsFromJSON(json) {
|
|
16
17
|
return CancelOrderParamsFromJSONTyped(json, false);
|
|
@@ -22,6 +23,8 @@ export function CancelOrderParamsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
22
23
|
switch (json["mode"]) {
|
|
23
24
|
case "challengeResponse":
|
|
24
25
|
return Object.assign(Object.assign({}, CancelOrderChallengeResponseFromJSONTyped(json, true)), { mode: "challengeResponse" });
|
|
26
|
+
case "decoupled":
|
|
27
|
+
return Object.assign(Object.assign({}, CancelOrderDecoupledFromJSONTyped(json, true)), { mode: "decoupled" });
|
|
25
28
|
case "sessionTan":
|
|
26
29
|
return Object.assign(Object.assign({}, CreateModeSessionTanFromJSONTyped(json, true)), { mode: "sessionTan" });
|
|
27
30
|
default:
|
|
@@ -38,6 +41,8 @@ export function CancelOrderParamsToJSON(value) {
|
|
|
38
41
|
switch (value["mode"]) {
|
|
39
42
|
case "challengeResponse":
|
|
40
43
|
return CancelOrderChallengeResponseToJSON(value);
|
|
44
|
+
case "decoupled":
|
|
45
|
+
return CancelOrderDecoupledToJSON(value);
|
|
41
46
|
case "sessionTan":
|
|
42
47
|
return CreateModeSessionTanToJSON(value);
|
|
43
48
|
default:
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
export declare const CancelOrderParamsMode: {
|
|
16
16
|
readonly SessionTan: "sessionTan";
|
|
17
17
|
readonly ChallengeResponse: "challengeResponse";
|
|
18
|
+
readonly Decoupled: "decoupled";
|
|
18
19
|
};
|
|
19
20
|
export type CancelOrderParamsMode = (typeof CancelOrderParamsMode)[keyof typeof CancelOrderParamsMode];
|
|
20
21
|
export declare function CancelOrderParamsModeFromJSON(json: any): CancelOrderParamsMode;
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
export const CancelOrderParamsMode = {
|
|
18
18
|
SessionTan: "sessionTan",
|
|
19
19
|
ChallengeResponse: "challengeResponse",
|
|
20
|
+
Decoupled: "decoupled",
|
|
20
21
|
};
|
|
21
22
|
export function CancelOrderParamsModeFromJSON(json) {
|
|
22
23
|
return CancelOrderParamsModeFromJSONTyped(json, false);
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @export
|
|
14
|
+
* @interface CancelOrderResponse
|
|
15
|
+
*/
|
|
16
|
+
export interface CancelOrderResponse {
|
|
17
|
+
/**
|
|
18
|
+
* If a decoupled method is used to cancel the order, the cancellation process can be observed through the
|
|
19
|
+
* `decoupledOperationId`.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CancelOrderResponse
|
|
22
|
+
*/
|
|
23
|
+
decoupledOperationId?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function CancelOrderResponseFromJSON(json: any): CancelOrderResponse;
|
|
26
|
+
export declare function CancelOrderResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CancelOrderResponse;
|
|
27
|
+
export declare function CancelOrderResponseToJSONRecursive(value?: CancelOrderResponse | null, ignoreParent?: boolean): any;
|
|
28
|
+
export declare function CancelOrderResponseToJSON(value?: CancelOrderResponse | null): any;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { exists } from "../runtime";
|
|
14
|
+
export function CancelOrderResponseFromJSON(json) {
|
|
15
|
+
return CancelOrderResponseFromJSONTyped(json, false);
|
|
16
|
+
}
|
|
17
|
+
export function CancelOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
18
|
+
if (json === undefined || json === null) {
|
|
19
|
+
return json;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
decoupledOperationId: !exists(json, "decoupledOperationId")
|
|
23
|
+
? undefined
|
|
24
|
+
: json["decoupledOperationId"],
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export function CancelOrderResponseToJSONRecursive(value, ignoreParent = false) {
|
|
28
|
+
if (value === undefined) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
if (value === null) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
decoupledOperationId: value.decoupledOperationId,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function CancelOrderResponseToJSON(value) {
|
|
39
|
+
return CancelOrderResponseToJSONRecursive(value, false);
|
|
40
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @export
|
|
14
|
+
* @interface ChangeOrderResponse
|
|
15
|
+
*/
|
|
16
|
+
export interface ChangeOrderResponse {
|
|
17
|
+
/**
|
|
18
|
+
* If a decoupled method is used to change the order, the cancellation process can be observed through the
|
|
19
|
+
* `decoupledOperationId`.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChangeOrderResponse
|
|
22
|
+
*/
|
|
23
|
+
decoupledOperationId?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function ChangeOrderResponseFromJSON(json: any): ChangeOrderResponse;
|
|
26
|
+
export declare function ChangeOrderResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeOrderResponse;
|
|
27
|
+
export declare function ChangeOrderResponseToJSONRecursive(value?: ChangeOrderResponse | null, ignoreParent?: boolean): any;
|
|
28
|
+
export declare function ChangeOrderResponseToJSON(value?: ChangeOrderResponse | null): any;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { exists } from "../runtime";
|
|
14
|
+
export function ChangeOrderResponseFromJSON(json) {
|
|
15
|
+
return ChangeOrderResponseFromJSONTyped(json, false);
|
|
16
|
+
}
|
|
17
|
+
export function ChangeOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
18
|
+
if (json === undefined || json === null) {
|
|
19
|
+
return json;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
decoupledOperationId: !exists(json, "decoupledOperationId")
|
|
23
|
+
? undefined
|
|
24
|
+
: json["decoupledOperationId"],
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export function ChangeOrderResponseToJSONRecursive(value, ignoreParent = false) {
|
|
28
|
+
if (value === undefined) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
if (value === null) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
decoupledOperationId: value.decoupledOperationId,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function ChangeOrderResponseToJSON(value) {
|
|
39
|
+
return ChangeOrderResponseToJSONRecursive(value, false);
|
|
40
|
+
}
|
|
@@ -15,7 +15,15 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export interface CreateTradeResponse {
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* If a decoupled method is used to create the trade, the creation process can be observed through the
|
|
19
|
+
* `decoupledOperationId`. In this case, no `orderId` is returned.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateTradeResponse
|
|
22
|
+
*/
|
|
23
|
+
decoupledOperationId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The id of the created order, if applicable. Some brokers don't return an orderId in all cases, so
|
|
26
|
+
* frontends should be able to just show a generic "order has been created" message in this case.
|
|
19
27
|
* @type {string}
|
|
20
28
|
* @memberof CreateTradeResponse
|
|
21
29
|
*/
|
|
@@ -19,6 +19,9 @@ export function CreateTradeResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
19
19
|
return json;
|
|
20
20
|
}
|
|
21
21
|
return {
|
|
22
|
+
decoupledOperationId: !exists(json, "decoupledOperationId")
|
|
23
|
+
? undefined
|
|
24
|
+
: json["decoupledOperationId"],
|
|
22
25
|
orderId: !exists(json, "orderId") ? undefined : json["orderId"],
|
|
23
26
|
};
|
|
24
27
|
}
|
|
@@ -30,6 +33,7 @@ export function CreateTradeResponseToJSONRecursive(value, ignoreParent = false)
|
|
|
30
33
|
return null;
|
|
31
34
|
}
|
|
32
35
|
return {
|
|
36
|
+
decoupledOperationId: value.decoupledOperationId,
|
|
33
37
|
orderId: value.orderId,
|
|
34
38
|
};
|
|
35
39
|
}
|