@brokerize/client 1.1.0 → 1.1.2

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/client.d.ts CHANGED
@@ -2404,6 +2404,13 @@ declare interface ClientConfig {
2404
2404
  * @memberof ClientConfig
2405
2405
  */
2406
2406
  cognitoClientIds: Array<string>;
2407
+ /**
2408
+ * If this is true, crypto trading is allowed for this client. If this is true, clients must send
2409
+ * some requests to the crypto trading service (for crypto orders) which is controlled by the flag `tradingViaCryptoService`.
2410
+ * @type {boolean}
2411
+ * @memberof ClientConfig
2412
+ */
2413
+ cryptoTradingAllowed?: boolean;
2407
2414
  /**
2408
2415
  *
2409
2416
  * @type {boolean}
@@ -2562,6 +2569,12 @@ declare interface ClientConfigUpdate {
2562
2569
  * @memberof ClientConfigUpdate
2563
2570
  */
2564
2571
  cognitoClientIds?: Array<string>;
2572
+ /**
2573
+ * If this is true, crypto trading is allowed for this client.
2574
+ * @type {boolean}
2575
+ * @memberof ClientConfigUpdate
2576
+ */
2577
+ cryptoTradingAllowed?: boolean;
2565
2578
  /**
2566
2579
  *
2567
2580
  * @type {boolean}
@@ -3899,6 +3912,15 @@ declare function DemoAccountFromJSONTyped(json: any, ignoreDiscriminator: boolea
3899
3912
  * @interface DemoAccountSettings
3900
3913
  */
3901
3914
  declare interface DemoAccountSettings {
3915
+ /**
3916
+ * Set an `authMethodStyle` to test different auth method behaviors. The following values are currently supported:
3917
+ * - `default`: the broker will have various methods with different flows
3918
+ * - `lazy`: the demo account reveals the complete list of auth methods only after the first session TAN challenge request. This also sets `allOperationsRequireSessionTan` to `true` for the account.
3919
+ * - `one-decoupled`: the account will have *one auth method* with flow `DECOUPLED` (also sets `allOperationsRequireSessionTan=true`)
3920
+ * @type {string}
3921
+ * @memberof DemoAccountSettings
3922
+ */
3923
+ authMethodStyle?: string;
3902
3924
  /**
3903
3925
  * Set this to `true` to create a single depot instead of the default two
3904
3926
  * @type {boolean}
@@ -3912,6 +3934,7 @@ declare interface DemoAccountSettings {
3912
3934
  * This also sets `allOperationsRequireSessionTan` to `true` for the account.
3913
3935
  * @type {boolean}
3914
3936
  * @memberof DemoAccountSettings
3937
+ * @deprecated
3915
3938
  */
3916
3939
  lazyAuthMethods?: boolean;
3917
3940
  /**
@@ -50,6 +50,13 @@ export interface ClientConfig {
50
50
  * @memberof ClientConfig
51
51
  */
52
52
  cognitoClientIds: Array<string>;
53
+ /**
54
+ * If this is true, crypto trading is allowed for this client. If this is true, clients must send
55
+ * some requests to the crypto trading service (for crypto orders) which is controlled by the flag `tradingViaCryptoService`.
56
+ * @type {boolean}
57
+ * @memberof ClientConfig
58
+ */
59
+ cryptoTradingAllowed?: boolean;
53
60
  /**
54
61
  *
55
62
  * @type {boolean}
@@ -30,6 +30,9 @@ export function ClientConfigFromJSONTyped(json, ignoreDiscriminator) {
30
30
  : json["allowedOriginsRegularExpressions"],
31
31
  brokerEnvFilter: mapValues(json["brokerEnvFilter"], BrokerEnvFilterTypeFromJSON),
32
32
  cognitoClientIds: json["cognitoClientIds"],
33
+ cryptoTradingAllowed: !exists(json, "cryptoTradingAllowed")
34
+ ? undefined
35
+ : json["cryptoTradingAllowed"],
33
36
  enabled: json["enabled"],
34
37
  guestUserInactivityTimeoutSeconds: !exists(json, "guestUserInactivityTimeoutSeconds")
35
38
  ? undefined
@@ -63,6 +66,7 @@ export function ClientConfigToJSONRecursive(value, ignoreParent = false) {
63
66
  allowedOriginsRegularExpressions: value.allowedOriginsRegularExpressions,
64
67
  brokerEnvFilter: mapValues(value.brokerEnvFilter, BrokerEnvFilterTypeToJSON),
65
68
  cognitoClientIds: value.cognitoClientIds,
69
+ cryptoTradingAllowed: value.cryptoTradingAllowed,
66
70
  enabled: value.enabled,
67
71
  guestUserInactivityTimeoutSeconds: value.guestUserInactivityTimeoutSeconds,
68
72
  guestUserLifetime: GuestUserLifetimeToJSON(value.guestUserLifetime),
@@ -65,6 +65,12 @@ export interface ClientConfigUpdate {
65
65
  * @memberof ClientConfigUpdate
66
66
  */
67
67
  cognitoClientIds?: Array<string>;
68
+ /**
69
+ * If this is true, crypto trading is allowed for this client.
70
+ * @type {boolean}
71
+ * @memberof ClientConfigUpdate
72
+ */
73
+ cryptoTradingAllowed?: boolean;
68
74
  /**
69
75
  *
70
76
  * @type {boolean}
@@ -47,6 +47,9 @@ export function ClientConfigUpdateFromJSONTyped(json, ignoreDiscriminator) {
47
47
  cognitoClientIds: !exists(json, "cognitoClientIds")
48
48
  ? undefined
49
49
  : json["cognitoClientIds"],
50
+ cryptoTradingAllowed: !exists(json, "cryptoTradingAllowed")
51
+ ? undefined
52
+ : json["cryptoTradingAllowed"],
50
53
  enabled: !exists(json, "enabled") ? undefined : json["enabled"],
51
54
  guestUserInactivityTimeoutSeconds: !exists(json, "guestUserInactivityTimeoutSeconds")
52
55
  ? undefined
@@ -101,6 +104,7 @@ export function ClientConfigUpdateToJSONRecursive(value, ignoreParent = false) {
101
104
  : mapValues(value.brokerEnvFilter, BrokerEnvFilterTypeToJSON),
102
105
  clientSecrets: value.clientSecrets,
103
106
  cognitoClientIds: value.cognitoClientIds,
107
+ cryptoTradingAllowed: value.cryptoTradingAllowed,
104
108
  enabled: value.enabled,
105
109
  guestUserInactivityTimeoutSeconds: value.guestUserInactivityTimeoutSeconds,
106
110
  guestUserLifetime: GuestUserLifetimeToJSON(value.guestUserLifetime),
@@ -14,6 +14,15 @@
14
14
  * @interface DemoAccountSettings
15
15
  */
16
16
  export interface DemoAccountSettings {
17
+ /**
18
+ * Set an `authMethodStyle` to test different auth method behaviors. The following values are currently supported:
19
+ * - `default`: the broker will have various methods with different flows
20
+ * - `lazy`: the demo account reveals the complete list of auth methods only after the first session TAN challenge request. This also sets `allOperationsRequireSessionTan` to `true` for the account.
21
+ * - `one-decoupled`: the account will have *one auth method* with flow `DECOUPLED` (also sets `allOperationsRequireSessionTan=true`)
22
+ * @type {string}
23
+ * @memberof DemoAccountSettings
24
+ */
25
+ authMethodStyle?: string;
17
26
  /**
18
27
  * Set this to `true` to create a single depot instead of the default two
19
28
  * @type {boolean}
@@ -27,6 +36,7 @@ export interface DemoAccountSettings {
27
36
  * This also sets `allOperationsRequireSessionTan` to `true` for the account.
28
37
  * @type {boolean}
29
38
  * @memberof DemoAccountSettings
39
+ * @deprecated
30
40
  */
31
41
  lazyAuthMethods?: boolean;
32
42
  /**
@@ -19,6 +19,9 @@ export function DemoAccountSettingsFromJSONTyped(json, ignoreDiscriminator) {
19
19
  return json;
20
20
  }
21
21
  return {
22
+ authMethodStyle: !exists(json, "authMethodStyle")
23
+ ? undefined
24
+ : json["authMethodStyle"],
22
25
  isSinglePortfolio: !exists(json, "isSinglePortfolio")
23
26
  ? undefined
24
27
  : json["isSinglePortfolio"],
@@ -39,6 +42,7 @@ export function DemoAccountSettingsToJSONRecursive(value, ignoreParent = false)
39
42
  return null;
40
43
  }
41
44
  return {
45
+ authMethodStyle: value.authMethodStyle,
42
46
  isSinglePortfolio: value.isSinglePortfolio,
43
47
  lazyAuthMethods: value.lazyAuthMethods,
44
48
  seedOrders: value.seedOrders,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brokerize/client",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Client for the brokerize.com API",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/brokerize/client-js#readme",