@brokerize/client 1.7.0 → 1.8.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.
Files changed (28) hide show
  1. package/dist/cjs/modelExports.d.ts +2 -0
  2. package/dist/cjs/swagger/models/GetQuoteParams.d.ts +8 -0
  3. package/dist/cjs/swagger/models/GetQuoteParams.js +4 -0
  4. package/dist/cjs/swagger/models/OrderCreate.d.ts +8 -0
  5. package/dist/cjs/swagger/models/OrderCreate.js +4 -0
  6. package/dist/cjs/swagger/models/OrderFormLegalCheckbox.d.ts +45 -0
  7. package/dist/cjs/swagger/models/OrderFormLegalCheckbox.js +48 -0
  8. package/dist/cjs/swagger/models/OrderFormLegalCheckboxConstraint.d.ts +43 -0
  9. package/dist/cjs/swagger/models/OrderFormLegalCheckboxConstraint.js +58 -0
  10. package/dist/cjs/swagger/models/PreparedTrade.d.ts +8 -1
  11. package/dist/cjs/swagger/models/PreparedTrade.js +5 -0
  12. package/dist/cjs/swagger/models/index.d.ts +2 -0
  13. package/dist/cjs/swagger/models/index.js +2 -0
  14. package/dist/client.d.ts +111 -2
  15. package/dist/modelExports.d.ts +2 -0
  16. package/dist/swagger/models/GetQuoteParams.d.ts +8 -0
  17. package/dist/swagger/models/GetQuoteParams.js +4 -0
  18. package/dist/swagger/models/OrderCreate.d.ts +8 -0
  19. package/dist/swagger/models/OrderCreate.js +4 -0
  20. package/dist/swagger/models/OrderFormLegalCheckbox.d.ts +45 -0
  21. package/dist/swagger/models/OrderFormLegalCheckbox.js +42 -0
  22. package/dist/swagger/models/OrderFormLegalCheckboxConstraint.d.ts +43 -0
  23. package/dist/swagger/models/OrderFormLegalCheckboxConstraint.js +52 -0
  24. package/dist/swagger/models/PreparedTrade.d.ts +8 -1
  25. package/dist/swagger/models/PreparedTrade.js +5 -0
  26. package/dist/swagger/models/index.d.ts +2 -0
  27. package/dist/swagger/models/index.js +2 -0
  28. package/package.json +1 -1
@@ -169,3 +169,5 @@ export { CheckRecoveryPhrase200Response } from "./swagger/models/CheckRecoveryPh
169
169
  export { SyncHint } from "./swagger/models/SyncHint";
170
170
  export { SyncHintAssumeOrderExecuted } from "./swagger/models/SyncHintAssumeOrderExecuted";
171
171
  export { SyncHintManualReload } from "./swagger/models/SyncHintManualReload";
172
+ export { OrderFormLegalCheckbox } from "./swagger/models/OrderFormLegalCheckbox";
173
+ export { OrderFormLegalCheckboxConstraint } from "./swagger/models/OrderFormLegalCheckboxConstraint";
@@ -48,6 +48,14 @@ export interface GetQuoteParams {
48
48
  * @memberof GetQuoteParams
49
49
  */
50
50
  isin: string;
51
+ /**
52
+ * Whether the user checked the legal checkbox.
53
+ * Required if the preparedTrade's `legalCheckbox` has a constraint matching the
54
+ * current order values (send the selected value even if the user left it at the default).
55
+ * @type {boolean}
56
+ * @memberof GetQuoteParams
57
+ */
58
+ legalCheckboxChecked?: boolean;
51
59
  /**
52
60
  * If a list of sellPositions has been provided in `PrepareTrade`, this must contain the selected position id to sell from
53
61
  * @type {string}
@@ -35,6 +35,9 @@ function GetQuoteParamsFromJSONTyped(json, ignoreDiscriminator) {
35
35
  : json["cashAccountId"],
36
36
  direction: (0, Direction_1.DirectionFromJSON)(json["direction"]),
37
37
  isin: json["isin"],
38
+ legalCheckboxChecked: !(0, runtime_1.exists)(json, "legalCheckboxChecked")
39
+ ? undefined
40
+ : json["legalCheckboxChecked"],
38
41
  sellPositionId: !(0, runtime_1.exists)(json, "sellPositionId")
39
42
  ? undefined
40
43
  : json["sellPositionId"],
@@ -55,6 +58,7 @@ function GetQuoteParamsToJSONRecursive(value, ignoreParent = false) {
55
58
  cashAccountId: value.cashAccountId,
56
59
  direction: (0, Direction_1.DirectionToJSON)(value.direction),
57
60
  isin: value.isin,
61
+ legalCheckboxChecked: value.legalCheckboxChecked,
58
62
  sellPositionId: value.sellPositionId,
59
63
  size: value.size,
60
64
  sizeUnit: value.sizeUnit,
@@ -77,6 +77,14 @@ export interface OrderCreate {
77
77
  * @memberof OrderCreate
78
78
  */
79
79
  isin: string;
80
+ /**
81
+ * Whether the user checked the legal checkbox.
82
+ * Required if the preparedTrade's `legalCheckbox` has a constraint matching the
83
+ * current order values (send the selected value even if the user left it at the default).
84
+ * @type {boolean}
85
+ * @memberof OrderCreate
86
+ */
87
+ legalCheckboxChecked?: boolean;
80
88
  /**
81
89
  * The limit of an order specifies a maximum (direction buy) or minimum (direction sell) value to execute the
82
90
  * order at.
@@ -53,6 +53,9 @@ function OrderCreateFromJSONTyped(json, ignoreDiscriminator) {
53
53
  ifDoneLimit: !(0, runtime_1.exists)(json, "ifDoneLimit") ? undefined : json["ifDoneLimit"],
54
54
  intent: !(0, runtime_1.exists)(json, "intent") ? undefined : json["intent"],
55
55
  isin: json["isin"],
56
+ legalCheckboxChecked: !(0, runtime_1.exists)(json, "legalCheckboxChecked")
57
+ ? undefined
58
+ : json["legalCheckboxChecked"],
56
59
  limit: !(0, runtime_1.exists)(json, "limit") ? undefined : json["limit"],
57
60
  limitCurrencyIso: !(0, runtime_1.exists)(json, "limitCurrencyIso")
58
61
  ? undefined
@@ -101,6 +104,7 @@ function OrderCreateToJSONRecursive(value, ignoreParent = false) {
101
104
  ifDoneLimit: value.ifDoneLimit,
102
105
  intent: value.intent,
103
106
  isin: value.isin,
107
+ legalCheckboxChecked: value.legalCheckboxChecked,
104
108
  limit: value.limit,
105
109
  limitCurrencyIso: value.limitCurrencyIso,
106
110
  orderExtension: (0, OrderExtension_1.OrderExtensionToJSON)(value.orderExtension),
@@ -0,0 +1,45 @@
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 { OrderFormLegalCheckboxConstraint } from "./OrderFormLegalCheckboxConstraint";
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface OrderFormLegalCheckbox
16
+ */
17
+ export interface OrderFormLegalCheckbox {
18
+ /**
19
+ * Determines in which cases the legal checkbox must be shown. Iterate over the
20
+ * constraints; if at least one matches the current order values, the checkbox is
21
+ * applicable and must be presented. In that case `legalCheckboxChecked` must be sent
22
+ * with the order (even if the user did not change the default value).
23
+ * @type {Array<OrderFormLegalCheckboxConstraint>}
24
+ * @memberof OrderFormLegalCheckbox
25
+ */
26
+ constraints: Array<OrderFormLegalCheckboxConstraint>;
27
+ /**
28
+ * If `true`, the checkbox must be checked by default.
29
+ * If `false`, the checkbox must *not* be checked by default.
30
+ * @type {boolean}
31
+ * @memberof OrderFormLegalCheckbox
32
+ */
33
+ defaultChecked: boolean;
34
+ /**
35
+ * The text to show for the "legal checkbox". This must be displayed in the OrderForm before
36
+ * the order/getQuote button.
37
+ * @type {string}
38
+ * @memberof OrderFormLegalCheckbox
39
+ */
40
+ text: string;
41
+ }
42
+ export declare function OrderFormLegalCheckboxFromJSON(json: any): OrderFormLegalCheckbox;
43
+ export declare function OrderFormLegalCheckboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderFormLegalCheckbox;
44
+ export declare function OrderFormLegalCheckboxToJSONRecursive(value?: OrderFormLegalCheckbox | null, ignoreParent?: boolean): any;
45
+ export declare function OrderFormLegalCheckboxToJSON(value?: OrderFormLegalCheckbox | null): any;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brokerize
6
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
7
+ *
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.OrderFormLegalCheckboxFromJSON = OrderFormLegalCheckboxFromJSON;
16
+ exports.OrderFormLegalCheckboxFromJSONTyped = OrderFormLegalCheckboxFromJSONTyped;
17
+ exports.OrderFormLegalCheckboxToJSONRecursive = OrderFormLegalCheckboxToJSONRecursive;
18
+ exports.OrderFormLegalCheckboxToJSON = OrderFormLegalCheckboxToJSON;
19
+ const OrderFormLegalCheckboxConstraint_1 = require("./OrderFormLegalCheckboxConstraint");
20
+ function OrderFormLegalCheckboxFromJSON(json) {
21
+ return OrderFormLegalCheckboxFromJSONTyped(json, false);
22
+ }
23
+ function OrderFormLegalCheckboxFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json === undefined || json === null) {
25
+ return json;
26
+ }
27
+ return {
28
+ constraints: json["constraints"].map(OrderFormLegalCheckboxConstraint_1.OrderFormLegalCheckboxConstraintFromJSON),
29
+ defaultChecked: json["defaultChecked"],
30
+ text: json["text"],
31
+ };
32
+ }
33
+ function OrderFormLegalCheckboxToJSONRecursive(value, ignoreParent = false) {
34
+ if (value === undefined) {
35
+ return undefined;
36
+ }
37
+ if (value === null) {
38
+ return null;
39
+ }
40
+ return {
41
+ constraints: value.constraints.map(OrderFormLegalCheckboxConstraint_1.OrderFormLegalCheckboxConstraintToJSON),
42
+ defaultChecked: value.defaultChecked,
43
+ text: value.text,
44
+ };
45
+ }
46
+ function OrderFormLegalCheckboxToJSON(value) {
47
+ return OrderFormLegalCheckboxToJSONRecursive(value, false);
48
+ }
@@ -0,0 +1,43 @@
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 { Direction } from "./Direction";
12
+ import { OrderModel } from "./OrderModel";
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface OrderFormLegalCheckboxConstraint
17
+ */
18
+ export interface OrderFormLegalCheckboxConstraint {
19
+ /**
20
+ * If set, only consider this a match if the selected direction is contained in this list.
21
+ * @type {Array<Direction>}
22
+ * @memberof OrderFormLegalCheckboxConstraint
23
+ */
24
+ directions?: Array<Direction>;
25
+ /**
26
+ * If set, only consider this a match if the selected `Exchange.id` is contained in the list.
27
+ * @type {Array<string>}
28
+ * @memberof OrderFormLegalCheckboxConstraint
29
+ */
30
+ exchangeIds?: Array<string>;
31
+ /**
32
+ * If set, only consider this a match if the selected `orderModel` is contained in the list.
33
+ * If a matching constraint includes `'quote'`, the value must also be supplied to
34
+ * `GetQuote` (via `GetQuoteParams.legalCheckboxChecked`), not only at order creation.
35
+ * @type {Array<OrderModel>}
36
+ * @memberof OrderFormLegalCheckboxConstraint
37
+ */
38
+ orderModels?: Array<OrderModel>;
39
+ }
40
+ export declare function OrderFormLegalCheckboxConstraintFromJSON(json: any): OrderFormLegalCheckboxConstraint;
41
+ export declare function OrderFormLegalCheckboxConstraintFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderFormLegalCheckboxConstraint;
42
+ export declare function OrderFormLegalCheckboxConstraintToJSONRecursive(value?: OrderFormLegalCheckboxConstraint | null, ignoreParent?: boolean): any;
43
+ export declare function OrderFormLegalCheckboxConstraintToJSON(value?: OrderFormLegalCheckboxConstraint | null): any;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brokerize
6
+ * The brokerize API allows clients to implement multi-brokerage with a unified interface. For more information, visit brokerize.com
7
+ *
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.OrderFormLegalCheckboxConstraintFromJSON = OrderFormLegalCheckboxConstraintFromJSON;
16
+ exports.OrderFormLegalCheckboxConstraintFromJSONTyped = OrderFormLegalCheckboxConstraintFromJSONTyped;
17
+ exports.OrderFormLegalCheckboxConstraintToJSONRecursive = OrderFormLegalCheckboxConstraintToJSONRecursive;
18
+ exports.OrderFormLegalCheckboxConstraintToJSON = OrderFormLegalCheckboxConstraintToJSON;
19
+ const runtime_1 = require("../runtime");
20
+ const Direction_1 = require("./Direction");
21
+ const OrderModel_1 = require("./OrderModel");
22
+ function OrderFormLegalCheckboxConstraintFromJSON(json) {
23
+ return OrderFormLegalCheckboxConstraintFromJSONTyped(json, false);
24
+ }
25
+ function OrderFormLegalCheckboxConstraintFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json === undefined || json === null) {
27
+ return json;
28
+ }
29
+ return {
30
+ directions: !(0, runtime_1.exists)(json, "directions")
31
+ ? undefined
32
+ : json["directions"].map(Direction_1.DirectionFromJSON),
33
+ exchangeIds: !(0, runtime_1.exists)(json, "exchangeIds") ? undefined : json["exchangeIds"],
34
+ orderModels: !(0, runtime_1.exists)(json, "orderModels")
35
+ ? undefined
36
+ : json["orderModels"].map(OrderModel_1.OrderModelFromJSON),
37
+ };
38
+ }
39
+ function OrderFormLegalCheckboxConstraintToJSONRecursive(value, ignoreParent = false) {
40
+ if (value === undefined) {
41
+ return undefined;
42
+ }
43
+ if (value === null) {
44
+ return null;
45
+ }
46
+ return {
47
+ directions: value.directions === undefined
48
+ ? undefined
49
+ : value.directions.map(Direction_1.DirectionToJSON),
50
+ exchangeIds: value.exchangeIds,
51
+ orderModels: value.orderModels === undefined
52
+ ? undefined
53
+ : value.orderModels.map(OrderModel_1.OrderModelToJSON),
54
+ };
55
+ }
56
+ function OrderFormLegalCheckboxConstraintToJSON(value) {
57
+ return OrderFormLegalCheckboxConstraintToJSONRecursive(value, false);
58
+ }
@@ -9,6 +9,7 @@
9
9
  * Do not edit the class manually.
10
10
  */
11
11
  import { Exchange } from "./Exchange";
12
+ import { OrderFormLegalCheckbox } from "./OrderFormLegalCheckbox";
12
13
  import { OrderIntentAvailability } from "./OrderIntentAvailability";
13
14
  import { RiskClassInfo } from "./RiskClassInfo";
14
15
  import { Security } from "./Security";
@@ -56,7 +57,7 @@ export interface PreparedTrade {
56
57
  * (hence the flag name). However, in modern usage, `costDetailsLink` may be present instead.
57
58
  *
58
59
  * In that case, clients can render an action such as "Show detailed costs," which then loads the cost
59
- * estimartion and either displays the `detailedTable` or navigates to the `costDetailsLink` URL.
60
+ * estimation and either displays the `detailedTable` or navigates to the `costDetailsLink` URL.
60
61
  * @type {boolean}
61
62
  * @memberof PreparedTrade
62
63
  */
@@ -74,6 +75,12 @@ export interface PreparedTrade {
74
75
  * @memberof PreparedTrade
75
76
  */
76
77
  exchanges: Array<Exchange>;
78
+ /**
79
+ *
80
+ * @type {OrderFormLegalCheckbox}
81
+ * @memberof PreparedTrade
82
+ */
83
+ legalCheckbox?: OrderFormLegalCheckbox;
77
84
  /**
78
85
  * If this is true, frontends are not allowed to set an exchange default. Users must select an exchange explicitly.
79
86
  * @type {boolean}
@@ -18,6 +18,7 @@ exports.PreparedTradeToJSONRecursive = PreparedTradeToJSONRecursive;
18
18
  exports.PreparedTradeToJSON = PreparedTradeToJSON;
19
19
  const runtime_1 = require("../runtime");
20
20
  const Exchange_1 = require("./Exchange");
21
+ const OrderFormLegalCheckbox_1 = require("./OrderFormLegalCheckbox");
21
22
  const OrderIntentAvailability_1 = require("./OrderIntentAvailability");
22
23
  const RiskClassInfo_1 = require("./RiskClassInfo");
23
24
  const Security_1 = require("./Security");
@@ -45,6 +46,9 @@ function PreparedTradeFromJSONTyped(json, ignoreDiscriminator) {
45
46
  : json["costEstimationIsOnlyDetailedTable"],
46
47
  costEstimationMustBeShown: json["costEstimationMustBeShown"],
47
48
  exchanges: json["exchanges"].map(Exchange_1.ExchangeFromJSON),
49
+ legalCheckbox: !(0, runtime_1.exists)(json, "legalCheckbox")
50
+ ? undefined
51
+ : (0, OrderFormLegalCheckbox_1.OrderFormLegalCheckboxFromJSON)(json["legalCheckbox"]),
48
52
  noExchangeDefault: !(0, runtime_1.exists)(json, "noExchangeDefault")
49
53
  ? undefined
50
54
  : json["noExchangeDefault"],
@@ -91,6 +95,7 @@ function PreparedTradeToJSONRecursive(value, ignoreParent = false) {
91
95
  costEstimationIsOnlyDetailedTable: value.costEstimationIsOnlyDetailedTable,
92
96
  costEstimationMustBeShown: value.costEstimationMustBeShown,
93
97
  exchanges: value.exchanges.map(Exchange_1.ExchangeToJSON),
98
+ legalCheckbox: (0, OrderFormLegalCheckbox_1.OrderFormLegalCheckboxToJSON)(value.legalCheckbox),
94
99
  noExchangeDefault: value.noExchangeDefault,
95
100
  riskClassInfo: (0, RiskClassInfo_1.RiskClassInfoToJSON)(value.riskClassInfo),
96
101
  security: (0, Security_1.SecurityToJSON)(value.security),
@@ -169,6 +169,8 @@ export * from "./OrderCostEstimation";
169
169
  export * from "./OrderCreate";
170
170
  export * from "./OrderExecution";
171
171
  export * from "./OrderExtension";
172
+ export * from "./OrderFormLegalCheckbox";
173
+ export * from "./OrderFormLegalCheckboxConstraint";
172
174
  export * from "./OrderIntent";
173
175
  export * from "./OrderIntentAvailability";
174
176
  export * from "./OrderModel";
@@ -187,6 +187,8 @@ __exportStar(require("./OrderCostEstimation"), exports);
187
187
  __exportStar(require("./OrderCreate"), exports);
188
188
  __exportStar(require("./OrderExecution"), exports);
189
189
  __exportStar(require("./OrderExtension"), exports);
190
+ __exportStar(require("./OrderFormLegalCheckbox"), exports);
191
+ __exportStar(require("./OrderFormLegalCheckboxConstraint"), exports);
190
192
  __exportStar(require("./OrderIntent"), exports);
191
193
  __exportStar(require("./OrderIntentAvailability"), exports);
192
194
  __exportStar(require("./OrderModel"), exports);
package/dist/client.d.ts CHANGED
@@ -6941,6 +6941,14 @@ declare interface GetQuoteParams {
6941
6941
  * @memberof GetQuoteParams
6942
6942
  */
6943
6943
  isin: string;
6944
+ /**
6945
+ * Whether the user checked the legal checkbox.
6946
+ * Required if the preparedTrade's `legalCheckbox` has a constraint matching the
6947
+ * current order values (send the selected value even if the user left it at the default).
6948
+ * @type {boolean}
6949
+ * @memberof GetQuoteParams
6950
+ */
6951
+ legalCheckboxChecked?: boolean;
6944
6952
  /**
6945
6953
  * If a list of sellPositions has been provided in `PrepareTrade`, this must contain the selected position id to sell from
6946
6954
  * @type {string}
@@ -7920,7 +7928,9 @@ declare namespace Models {
7920
7928
  CheckRecoveryPhrase200Response,
7921
7929
  SyncHint,
7922
7930
  SyncHintAssumeOrderExecuted,
7923
- SyncHintManualReload
7931
+ SyncHintManualReload,
7932
+ OrderFormLegalCheckbox,
7933
+ OrderFormLegalCheckboxConstraint
7924
7934
  }
7925
7935
  }
7926
7936
  export { Models }
@@ -9071,6 +9081,16 @@ declare namespace openApiClient {
9071
9081
  OrderExtensionFromJSONTyped,
9072
9082
  OrderExtensionToJSON,
9073
9083
  OrderExtension,
9084
+ OrderFormLegalCheckboxFromJSON,
9085
+ OrderFormLegalCheckboxFromJSONTyped,
9086
+ OrderFormLegalCheckboxToJSONRecursive,
9087
+ OrderFormLegalCheckboxToJSON,
9088
+ OrderFormLegalCheckbox,
9089
+ OrderFormLegalCheckboxConstraintFromJSON,
9090
+ OrderFormLegalCheckboxConstraintFromJSONTyped,
9091
+ OrderFormLegalCheckboxConstraintToJSONRecursive,
9092
+ OrderFormLegalCheckboxConstraintToJSON,
9093
+ OrderFormLegalCheckboxConstraint,
9074
9094
  OrderIntentFromJSON,
9075
9095
  OrderIntentFromJSONTyped,
9076
9096
  OrderIntentToJSON,
@@ -10211,6 +10231,14 @@ declare interface OrderCreate {
10211
10231
  * @memberof OrderCreate
10212
10232
  */
10213
10233
  isin: string;
10234
+ /**
10235
+ * Whether the user checked the legal checkbox.
10236
+ * Required if the preparedTrade's `legalCheckbox` has a constraint matching the
10237
+ * current order values (send the selected value even if the user left it at the default).
10238
+ * @type {boolean}
10239
+ * @memberof OrderCreate
10240
+ */
10241
+ legalCheckboxChecked?: boolean;
10214
10242
  /**
10215
10243
  * The limit of an order specifies a maximum (direction buy) or minimum (direction sell) value to execute the
10216
10244
  * order at.
@@ -10454,6 +10482,81 @@ declare function OrderExtensionFromJSONTyped(json: any, ignoreDiscriminator: boo
10454
10482
 
10455
10483
  declare function OrderExtensionToJSON(value?: OrderExtension | null): any;
10456
10484
 
10485
+ /**
10486
+ *
10487
+ * @export
10488
+ * @interface OrderFormLegalCheckbox
10489
+ */
10490
+ declare interface OrderFormLegalCheckbox {
10491
+ /**
10492
+ * Determines in which cases the legal checkbox must be shown. Iterate over the
10493
+ * constraints; if at least one matches the current order values, the checkbox is
10494
+ * applicable and must be presented. In that case `legalCheckboxChecked` must be sent
10495
+ * with the order (even if the user did not change the default value).
10496
+ * @type {Array<OrderFormLegalCheckboxConstraint>}
10497
+ * @memberof OrderFormLegalCheckbox
10498
+ */
10499
+ constraints: Array<OrderFormLegalCheckboxConstraint>;
10500
+ /**
10501
+ * If `true`, the checkbox must be checked by default.
10502
+ * If `false`, the checkbox must *not* be checked by default.
10503
+ * @type {boolean}
10504
+ * @memberof OrderFormLegalCheckbox
10505
+ */
10506
+ defaultChecked: boolean;
10507
+ /**
10508
+ * The text to show for the "legal checkbox". This must be displayed in the OrderForm before
10509
+ * the order/getQuote button.
10510
+ * @type {string}
10511
+ * @memberof OrderFormLegalCheckbox
10512
+ */
10513
+ text: string;
10514
+ }
10515
+
10516
+ /**
10517
+ *
10518
+ * @export
10519
+ * @interface OrderFormLegalCheckboxConstraint
10520
+ */
10521
+ declare interface OrderFormLegalCheckboxConstraint {
10522
+ /**
10523
+ * If set, only consider this a match if the selected direction is contained in this list.
10524
+ * @type {Array<Direction>}
10525
+ * @memberof OrderFormLegalCheckboxConstraint
10526
+ */
10527
+ directions?: Array<Direction>;
10528
+ /**
10529
+ * If set, only consider this a match if the selected `Exchange.id` is contained in the list.
10530
+ * @type {Array<string>}
10531
+ * @memberof OrderFormLegalCheckboxConstraint
10532
+ */
10533
+ exchangeIds?: Array<string>;
10534
+ /**
10535
+ * If set, only consider this a match if the selected `orderModel` is contained in the list.
10536
+ * If a matching constraint includes `'quote'`, the value must also be supplied to
10537
+ * `GetQuote` (via `GetQuoteParams.legalCheckboxChecked`), not only at order creation.
10538
+ * @type {Array<OrderModel>}
10539
+ * @memberof OrderFormLegalCheckboxConstraint
10540
+ */
10541
+ orderModels?: Array<OrderModel>;
10542
+ }
10543
+
10544
+ declare function OrderFormLegalCheckboxConstraintFromJSON(json: any): OrderFormLegalCheckboxConstraint;
10545
+
10546
+ declare function OrderFormLegalCheckboxConstraintFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderFormLegalCheckboxConstraint;
10547
+
10548
+ declare function OrderFormLegalCheckboxConstraintToJSON(value?: OrderFormLegalCheckboxConstraint | null): any;
10549
+
10550
+ declare function OrderFormLegalCheckboxConstraintToJSONRecursive(value?: OrderFormLegalCheckboxConstraint | null, ignoreParent?: boolean): any;
10551
+
10552
+ declare function OrderFormLegalCheckboxFromJSON(json: any): OrderFormLegalCheckbox;
10553
+
10554
+ declare function OrderFormLegalCheckboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderFormLegalCheckbox;
10555
+
10556
+ declare function OrderFormLegalCheckboxToJSON(value?: OrderFormLegalCheckbox | null): any;
10557
+
10558
+ declare function OrderFormLegalCheckboxToJSONRecursive(value?: OrderFormLegalCheckbox | null, ignoreParent?: boolean): any;
10559
+
10457
10560
  declare function OrderFromJSON(json: any): Order;
10458
10561
 
10459
10562
  declare function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Order;
@@ -11855,7 +11958,7 @@ declare interface PreparedTrade {
11855
11958
  * (hence the flag name). However, in modern usage, `costDetailsLink` may be present instead.
11856
11959
  *
11857
11960
  * In that case, clients can render an action such as "Show detailed costs," which then loads the cost
11858
- * estimartion and either displays the `detailedTable` or navigates to the `costDetailsLink` URL.
11961
+ * estimation and either displays the `detailedTable` or navigates to the `costDetailsLink` URL.
11859
11962
  * @type {boolean}
11860
11963
  * @memberof PreparedTrade
11861
11964
  */
@@ -11873,6 +11976,12 @@ declare interface PreparedTrade {
11873
11976
  * @memberof PreparedTrade
11874
11977
  */
11875
11978
  exchanges: Array<Exchange>;
11979
+ /**
11980
+ *
11981
+ * @type {OrderFormLegalCheckbox}
11982
+ * @memberof PreparedTrade
11983
+ */
11984
+ legalCheckbox?: OrderFormLegalCheckbox;
11876
11985
  /**
11877
11986
  * If this is true, frontends are not allowed to set an exchange default. Users must select an exchange explicitly.
11878
11987
  * @type {boolean}
@@ -169,3 +169,5 @@ export { CheckRecoveryPhrase200Response } from "./swagger/models/CheckRecoveryPh
169
169
  export { SyncHint } from "./swagger/models/SyncHint";
170
170
  export { SyncHintAssumeOrderExecuted } from "./swagger/models/SyncHintAssumeOrderExecuted";
171
171
  export { SyncHintManualReload } from "./swagger/models/SyncHintManualReload";
172
+ export { OrderFormLegalCheckbox } from "./swagger/models/OrderFormLegalCheckbox";
173
+ export { OrderFormLegalCheckboxConstraint } from "./swagger/models/OrderFormLegalCheckboxConstraint";
@@ -48,6 +48,14 @@ export interface GetQuoteParams {
48
48
  * @memberof GetQuoteParams
49
49
  */
50
50
  isin: string;
51
+ /**
52
+ * Whether the user checked the legal checkbox.
53
+ * Required if the preparedTrade's `legalCheckbox` has a constraint matching the
54
+ * current order values (send the selected value even if the user left it at the default).
55
+ * @type {boolean}
56
+ * @memberof GetQuoteParams
57
+ */
58
+ legalCheckboxChecked?: boolean;
51
59
  /**
52
60
  * If a list of sellPositions has been provided in `PrepareTrade`, this must contain the selected position id to sell from
53
61
  * @type {string}
@@ -29,6 +29,9 @@ export function GetQuoteParamsFromJSONTyped(json, ignoreDiscriminator) {
29
29
  : json["cashAccountId"],
30
30
  direction: DirectionFromJSON(json["direction"]),
31
31
  isin: json["isin"],
32
+ legalCheckboxChecked: !exists(json, "legalCheckboxChecked")
33
+ ? undefined
34
+ : json["legalCheckboxChecked"],
32
35
  sellPositionId: !exists(json, "sellPositionId")
33
36
  ? undefined
34
37
  : json["sellPositionId"],
@@ -49,6 +52,7 @@ export function GetQuoteParamsToJSONRecursive(value, ignoreParent = false) {
49
52
  cashAccountId: value.cashAccountId,
50
53
  direction: DirectionToJSON(value.direction),
51
54
  isin: value.isin,
55
+ legalCheckboxChecked: value.legalCheckboxChecked,
52
56
  sellPositionId: value.sellPositionId,
53
57
  size: value.size,
54
58
  sizeUnit: value.sizeUnit,
@@ -77,6 +77,14 @@ export interface OrderCreate {
77
77
  * @memberof OrderCreate
78
78
  */
79
79
  isin: string;
80
+ /**
81
+ * Whether the user checked the legal checkbox.
82
+ * Required if the preparedTrade's `legalCheckbox` has a constraint matching the
83
+ * current order values (send the selected value even if the user left it at the default).
84
+ * @type {boolean}
85
+ * @memberof OrderCreate
86
+ */
87
+ legalCheckboxChecked?: boolean;
80
88
  /**
81
89
  * The limit of an order specifies a maximum (direction buy) or minimum (direction sell) value to execute the
82
90
  * order at.
@@ -46,6 +46,9 @@ export function OrderCreateFromJSONTyped(json, ignoreDiscriminator) {
46
46
  ifDoneLimit: !exists(json, "ifDoneLimit") ? undefined : json["ifDoneLimit"],
47
47
  intent: !exists(json, "intent") ? undefined : json["intent"],
48
48
  isin: json["isin"],
49
+ legalCheckboxChecked: !exists(json, "legalCheckboxChecked")
50
+ ? undefined
51
+ : json["legalCheckboxChecked"],
49
52
  limit: !exists(json, "limit") ? undefined : json["limit"],
50
53
  limitCurrencyIso: !exists(json, "limitCurrencyIso")
51
54
  ? undefined
@@ -94,6 +97,7 @@ export function OrderCreateToJSONRecursive(value, ignoreParent = false) {
94
97
  ifDoneLimit: value.ifDoneLimit,
95
98
  intent: value.intent,
96
99
  isin: value.isin,
100
+ legalCheckboxChecked: value.legalCheckboxChecked,
97
101
  limit: value.limit,
98
102
  limitCurrencyIso: value.limitCurrencyIso,
99
103
  orderExtension: OrderExtensionToJSON(value.orderExtension),
@@ -0,0 +1,45 @@
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 { OrderFormLegalCheckboxConstraint } from "./OrderFormLegalCheckboxConstraint";
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface OrderFormLegalCheckbox
16
+ */
17
+ export interface OrderFormLegalCheckbox {
18
+ /**
19
+ * Determines in which cases the legal checkbox must be shown. Iterate over the
20
+ * constraints; if at least one matches the current order values, the checkbox is
21
+ * applicable and must be presented. In that case `legalCheckboxChecked` must be sent
22
+ * with the order (even if the user did not change the default value).
23
+ * @type {Array<OrderFormLegalCheckboxConstraint>}
24
+ * @memberof OrderFormLegalCheckbox
25
+ */
26
+ constraints: Array<OrderFormLegalCheckboxConstraint>;
27
+ /**
28
+ * If `true`, the checkbox must be checked by default.
29
+ * If `false`, the checkbox must *not* be checked by default.
30
+ * @type {boolean}
31
+ * @memberof OrderFormLegalCheckbox
32
+ */
33
+ defaultChecked: boolean;
34
+ /**
35
+ * The text to show for the "legal checkbox". This must be displayed in the OrderForm before
36
+ * the order/getQuote button.
37
+ * @type {string}
38
+ * @memberof OrderFormLegalCheckbox
39
+ */
40
+ text: string;
41
+ }
42
+ export declare function OrderFormLegalCheckboxFromJSON(json: any): OrderFormLegalCheckbox;
43
+ export declare function OrderFormLegalCheckboxFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderFormLegalCheckbox;
44
+ export declare function OrderFormLegalCheckboxToJSONRecursive(value?: OrderFormLegalCheckbox | null, ignoreParent?: boolean): any;
45
+ export declare function OrderFormLegalCheckboxToJSON(value?: OrderFormLegalCheckbox | null): any;
@@ -0,0 +1,42 @@
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 { OrderFormLegalCheckboxConstraintFromJSON, OrderFormLegalCheckboxConstraintToJSON, } from "./OrderFormLegalCheckboxConstraint.js";
14
+ export function OrderFormLegalCheckboxFromJSON(json) {
15
+ return OrderFormLegalCheckboxFromJSONTyped(json, false);
16
+ }
17
+ export function OrderFormLegalCheckboxFromJSONTyped(json, ignoreDiscriminator) {
18
+ if (json === undefined || json === null) {
19
+ return json;
20
+ }
21
+ return {
22
+ constraints: json["constraints"].map(OrderFormLegalCheckboxConstraintFromJSON),
23
+ defaultChecked: json["defaultChecked"],
24
+ text: json["text"],
25
+ };
26
+ }
27
+ export function OrderFormLegalCheckboxToJSONRecursive(value, ignoreParent = false) {
28
+ if (value === undefined) {
29
+ return undefined;
30
+ }
31
+ if (value === null) {
32
+ return null;
33
+ }
34
+ return {
35
+ constraints: value.constraints.map(OrderFormLegalCheckboxConstraintToJSON),
36
+ defaultChecked: value.defaultChecked,
37
+ text: value.text,
38
+ };
39
+ }
40
+ export function OrderFormLegalCheckboxToJSON(value) {
41
+ return OrderFormLegalCheckboxToJSONRecursive(value, false);
42
+ }
@@ -0,0 +1,43 @@
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 { Direction } from "./Direction";
12
+ import { OrderModel } from "./OrderModel";
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface OrderFormLegalCheckboxConstraint
17
+ */
18
+ export interface OrderFormLegalCheckboxConstraint {
19
+ /**
20
+ * If set, only consider this a match if the selected direction is contained in this list.
21
+ * @type {Array<Direction>}
22
+ * @memberof OrderFormLegalCheckboxConstraint
23
+ */
24
+ directions?: Array<Direction>;
25
+ /**
26
+ * If set, only consider this a match if the selected `Exchange.id` is contained in the list.
27
+ * @type {Array<string>}
28
+ * @memberof OrderFormLegalCheckboxConstraint
29
+ */
30
+ exchangeIds?: Array<string>;
31
+ /**
32
+ * If set, only consider this a match if the selected `orderModel` is contained in the list.
33
+ * If a matching constraint includes `'quote'`, the value must also be supplied to
34
+ * `GetQuote` (via `GetQuoteParams.legalCheckboxChecked`), not only at order creation.
35
+ * @type {Array<OrderModel>}
36
+ * @memberof OrderFormLegalCheckboxConstraint
37
+ */
38
+ orderModels?: Array<OrderModel>;
39
+ }
40
+ export declare function OrderFormLegalCheckboxConstraintFromJSON(json: any): OrderFormLegalCheckboxConstraint;
41
+ export declare function OrderFormLegalCheckboxConstraintFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderFormLegalCheckboxConstraint;
42
+ export declare function OrderFormLegalCheckboxConstraintToJSONRecursive(value?: OrderFormLegalCheckboxConstraint | null, ignoreParent?: boolean): any;
43
+ export declare function OrderFormLegalCheckboxConstraintToJSON(value?: OrderFormLegalCheckboxConstraint | null): any;
@@ -0,0 +1,52 @@
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.js";
14
+ import { DirectionFromJSON, DirectionToJSON, } from "./Direction.js";
15
+ import { OrderModelFromJSON, OrderModelToJSON, } from "./OrderModel.js";
16
+ export function OrderFormLegalCheckboxConstraintFromJSON(json) {
17
+ return OrderFormLegalCheckboxConstraintFromJSONTyped(json, false);
18
+ }
19
+ export function OrderFormLegalCheckboxConstraintFromJSONTyped(json, ignoreDiscriminator) {
20
+ if (json === undefined || json === null) {
21
+ return json;
22
+ }
23
+ return {
24
+ directions: !exists(json, "directions")
25
+ ? undefined
26
+ : json["directions"].map(DirectionFromJSON),
27
+ exchangeIds: !exists(json, "exchangeIds") ? undefined : json["exchangeIds"],
28
+ orderModels: !exists(json, "orderModels")
29
+ ? undefined
30
+ : json["orderModels"].map(OrderModelFromJSON),
31
+ };
32
+ }
33
+ export function OrderFormLegalCheckboxConstraintToJSONRecursive(value, ignoreParent = false) {
34
+ if (value === undefined) {
35
+ return undefined;
36
+ }
37
+ if (value === null) {
38
+ return null;
39
+ }
40
+ return {
41
+ directions: value.directions === undefined
42
+ ? undefined
43
+ : value.directions.map(DirectionToJSON),
44
+ exchangeIds: value.exchangeIds,
45
+ orderModels: value.orderModels === undefined
46
+ ? undefined
47
+ : value.orderModels.map(OrderModelToJSON),
48
+ };
49
+ }
50
+ export function OrderFormLegalCheckboxConstraintToJSON(value) {
51
+ return OrderFormLegalCheckboxConstraintToJSONRecursive(value, false);
52
+ }
@@ -9,6 +9,7 @@
9
9
  * Do not edit the class manually.
10
10
  */
11
11
  import { Exchange } from "./Exchange";
12
+ import { OrderFormLegalCheckbox } from "./OrderFormLegalCheckbox";
12
13
  import { OrderIntentAvailability } from "./OrderIntentAvailability";
13
14
  import { RiskClassInfo } from "./RiskClassInfo";
14
15
  import { Security } from "./Security";
@@ -56,7 +57,7 @@ export interface PreparedTrade {
56
57
  * (hence the flag name). However, in modern usage, `costDetailsLink` may be present instead.
57
58
  *
58
59
  * In that case, clients can render an action such as "Show detailed costs," which then loads the cost
59
- * estimartion and either displays the `detailedTable` or navigates to the `costDetailsLink` URL.
60
+ * estimation and either displays the `detailedTable` or navigates to the `costDetailsLink` URL.
60
61
  * @type {boolean}
61
62
  * @memberof PreparedTrade
62
63
  */
@@ -74,6 +75,12 @@ export interface PreparedTrade {
74
75
  * @memberof PreparedTrade
75
76
  */
76
77
  exchanges: Array<Exchange>;
78
+ /**
79
+ *
80
+ * @type {OrderFormLegalCheckbox}
81
+ * @memberof PreparedTrade
82
+ */
83
+ legalCheckbox?: OrderFormLegalCheckbox;
77
84
  /**
78
85
  * If this is true, frontends are not allowed to set an exchange default. Users must select an exchange explicitly.
79
86
  * @type {boolean}
@@ -12,6 +12,7 @@
12
12
  */
13
13
  import { exists } from "../runtime.js";
14
14
  import { ExchangeFromJSON, ExchangeToJSON, } from "./Exchange.js";
15
+ import { OrderFormLegalCheckboxFromJSON, OrderFormLegalCheckboxToJSON, } from "./OrderFormLegalCheckbox.js";
15
16
  import { OrderIntentAvailabilityFromJSON, OrderIntentAvailabilityToJSON, } from "./OrderIntentAvailability.js";
16
17
  import { RiskClassInfoFromJSON, RiskClassInfoToJSON, } from "./RiskClassInfo.js";
17
18
  import { SecurityFromJSON, SecurityToJSON, } from "./Security.js";
@@ -39,6 +40,9 @@ export function PreparedTradeFromJSONTyped(json, ignoreDiscriminator) {
39
40
  : json["costEstimationIsOnlyDetailedTable"],
40
41
  costEstimationMustBeShown: json["costEstimationMustBeShown"],
41
42
  exchanges: json["exchanges"].map(ExchangeFromJSON),
43
+ legalCheckbox: !exists(json, "legalCheckbox")
44
+ ? undefined
45
+ : OrderFormLegalCheckboxFromJSON(json["legalCheckbox"]),
42
46
  noExchangeDefault: !exists(json, "noExchangeDefault")
43
47
  ? undefined
44
48
  : json["noExchangeDefault"],
@@ -85,6 +89,7 @@ export function PreparedTradeToJSONRecursive(value, ignoreParent = false) {
85
89
  costEstimationIsOnlyDetailedTable: value.costEstimationIsOnlyDetailedTable,
86
90
  costEstimationMustBeShown: value.costEstimationMustBeShown,
87
91
  exchanges: value.exchanges.map(ExchangeToJSON),
92
+ legalCheckbox: OrderFormLegalCheckboxToJSON(value.legalCheckbox),
88
93
  noExchangeDefault: value.noExchangeDefault,
89
94
  riskClassInfo: RiskClassInfoToJSON(value.riskClassInfo),
90
95
  security: SecurityToJSON(value.security),
@@ -169,6 +169,8 @@ export * from "./OrderCostEstimation";
169
169
  export * from "./OrderCreate";
170
170
  export * from "./OrderExecution";
171
171
  export * from "./OrderExtension";
172
+ export * from "./OrderFormLegalCheckbox";
173
+ export * from "./OrderFormLegalCheckboxConstraint";
172
174
  export * from "./OrderIntent";
173
175
  export * from "./OrderIntentAvailability";
174
176
  export * from "./OrderModel";
@@ -171,6 +171,8 @@ export * from "./OrderCostEstimation.js";
171
171
  export * from "./OrderCreate.js";
172
172
  export * from "./OrderExecution.js";
173
173
  export * from "./OrderExtension.js";
174
+ export * from "./OrderFormLegalCheckbox.js";
175
+ export * from "./OrderFormLegalCheckboxConstraint.js";
174
176
  export * from "./OrderIntent.js";
175
177
  export * from "./OrderIntentAvailability.js";
176
178
  export * from "./OrderModel.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brokerize/client",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "Client for the brokerize.com API",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/brokerize/client-js#readme",