snaptrade-typescript-sdk 8.4.0 → 8.6.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.
@@ -1 +1 @@
1
- ac5d7b34-8d5b-40f0-84ba-50095219ac7b
1
+ b943c377-1fe4-4a39-ac00-cb4924fe07a5
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## snaptrade-typescript-sdk@8.4.0
1
+ ## snaptrade-typescript-sdk@8.6.0
2
2
  Connect brokerage accounts to your app for live positions and trading
3
3
 
4
4
 
@@ -24,6 +24,8 @@ import { Account } from '../models';
24
24
  // @ts-ignore
25
25
  import { AccountHoldings } from '../models';
26
26
  // @ts-ignore
27
+ import { AccountHoldingsAccount } from '../models';
28
+ // @ts-ignore
27
29
  import { AccountOrderRecord } from '../models';
28
30
  // @ts-ignore
29
31
  import { Balance } from '../models';
@@ -596,7 +598,7 @@ export const AccountInformationApiFp = function(configuration?: Configuration) {
596
598
  * @param {*} [options] Override http request option.
597
599
  * @throws {RequiredError}
598
600
  */
599
- async getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountHoldings>> {
601
+ async getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountHoldingsAccount>> {
600
602
  const localVarAxiosArgs = await localVarAxiosParamCreator.getUserHoldings(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options);
601
603
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
602
604
  },
@@ -689,7 +691,7 @@ export const AccountInformationApiFactory = function (configuration?: Configurat
689
691
  * @param {*} [options] Override http request option.
690
692
  * @throws {RequiredError}
691
693
  */
692
- getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<AccountHoldings> {
694
+ getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<AccountHoldingsAccount> {
693
695
  return localVarFp.getUserHoldings(requestParameters, options).then((request) => request(axios, basePath));
694
696
  },
695
697
  /**
@@ -213,10 +213,11 @@ export const ConnectionsApiAxiosParamCreator = function (configuration?: Configu
213
213
  * @summary List all session events for the partner
214
214
  * @param {string} partnerClientId
215
215
  * @param {string} [userId] Optional comma seperated list of user IDs used to filter the request on specific users
216
+ * @param {string} [sessionId] Optional comma seperated list of session IDs used to filter the request on specific users
216
217
  * @param {*} [options] Override http request option.
217
218
  * @throws {RequiredError}
218
219
  */
219
- sessionEvents: async (partnerClientId: string, userId?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
220
+ sessionEvents: async (partnerClientId: string, userId?: string, sessionId?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
220
221
  // verify required parameter 'partnerClientId' is not null or undefined
221
222
  assertParamExists('sessionEvents', 'partnerClientId', partnerClientId)
222
223
  const localVarPath = `/sessionEvents`;
@@ -245,6 +246,10 @@ export const ConnectionsApiAxiosParamCreator = function (configuration?: Configu
245
246
  localVarQueryParameter['userId'] = userId;
246
247
  }
247
248
 
249
+ if (sessionId !== undefined) {
250
+ localVarQueryParameter['sessionId'] = sessionId;
251
+ }
252
+
248
253
 
249
254
 
250
255
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -313,7 +318,7 @@ export const ConnectionsApiFp = function(configuration?: Configuration) {
313
318
  * @throws {RequiredError}
314
319
  */
315
320
  async sessionEvents(requestParameters: ConnectionsApiSessionEventsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ConnectionsSessionEvents200ResponseInner>>> {
316
- const localVarAxiosArgs = await localVarAxiosParamCreator.sessionEvents(requestParameters.partnerClientId, requestParameters.userId, options);
321
+ const localVarAxiosArgs = await localVarAxiosParamCreator.sessionEvents(requestParameters.partnerClientId, requestParameters.userId, requestParameters.sessionId, options);
317
322
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
318
323
  },
319
324
  }
@@ -473,6 +478,13 @@ export type ConnectionsApiSessionEventsRequest = {
473
478
  */
474
479
  readonly userId?: string
475
480
 
481
+ /**
482
+ * Optional comma seperated list of session IDs used to filter the request on specific users
483
+ * @type {string}
484
+ * @memberof ConnectionsApiSessionEvents
485
+ */
486
+ readonly sessionId?: string
487
+
476
488
  }
477
489
 
478
490
  /**
package/configuration.ts CHANGED
@@ -110,7 +110,7 @@ export class Configuration {
110
110
  this.accessToken = param.accessToken;
111
111
  this.basePath = param.basePath;
112
112
  this.baseOptions = param.baseOptions ?? {};
113
- this.userAgent = param.userAgent === undefined ? "Konfig/8.4.0/typescript" : param.userAgent;
113
+ this.userAgent = param.userAgent === undefined ? "Konfig/8.6.0/typescript" : param.userAgent;
114
114
  this.formDataCtor = param.formDataCtor;
115
115
  }
116
116
 
@@ -14,6 +14,7 @@ import { Configuration } from '../configuration';
14
14
  import { RequestArgs } from '../base';
15
15
  import { Account } from '../models';
16
16
  import { AccountHoldings } from '../models';
17
+ import { AccountHoldingsAccount } from '../models';
17
18
  import { AccountOrderRecord } from '../models';
18
19
  import { Balance } from '../models';
19
20
  import { Position } from '../models';
@@ -156,7 +157,7 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
156
157
  * @param {*} [options] Override http request option.
157
158
  * @throws {RequiredError}
158
159
  */
159
- getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountHoldings>>;
160
+ getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountHoldingsAccount>>;
160
161
  /**
161
162
  *
162
163
  * @summary List all investment accounts for the user
@@ -226,7 +227,7 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
226
227
  * @param {*} [options] Override http request option.
227
228
  * @throws {RequiredError}
228
229
  */
229
- getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<AccountHoldings>;
230
+ getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<AccountHoldingsAccount>;
230
231
  /**
231
232
  *
232
233
  * @summary List all investment accounts for the user
@@ -504,7 +505,7 @@ export declare class AccountInformationApi extends AccountInformationApiCustom {
504
505
  * @throws {RequiredError}
505
506
  * @memberof AccountInformationApi
506
507
  */
507
- getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountHoldings, any>>;
508
+ getUserHoldings(requestParameters: AccountInformationApiGetUserHoldingsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountHoldingsAccount, any>>;
508
509
  /**
509
510
  *
510
511
  * @summary List all investment accounts for the user
@@ -54,10 +54,11 @@ export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configura
54
54
  * @summary List all session events for the partner
55
55
  * @param {string} partnerClientId
56
56
  * @param {string} [userId] Optional comma seperated list of user IDs used to filter the request on specific users
57
+ * @param {string} [sessionId] Optional comma seperated list of session IDs used to filter the request on specific users
57
58
  * @param {*} [options] Override http request option.
58
59
  * @throws {RequiredError}
59
60
  */
60
- sessionEvents: (partnerClientId: string, userId?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
61
+ sessionEvents: (partnerClientId: string, userId?: string, sessionId?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
61
62
  };
62
63
  /**
63
64
  * ConnectionsApi - functional programming interface
@@ -222,6 +223,12 @@ export type ConnectionsApiSessionEventsRequest = {
222
223
  * @memberof ConnectionsApiSessionEvents
223
224
  */
224
225
  readonly userId?: string;
226
+ /**
227
+ * Optional comma seperated list of session IDs used to filter the request on specific users
228
+ * @type {string}
229
+ * @memberof ConnectionsApiSessionEvents
230
+ */
231
+ readonly sessionId?: string;
225
232
  };
226
233
  /**
227
234
  * ConnectionsApi - object-oriented interface
@@ -311,10 +311,11 @@ var ConnectionsApiAxiosParamCreator = function (configuration) {
311
311
  * @summary List all session events for the partner
312
312
  * @param {string} partnerClientId
313
313
  * @param {string} [userId] Optional comma seperated list of user IDs used to filter the request on specific users
314
+ * @param {string} [sessionId] Optional comma seperated list of session IDs used to filter the request on specific users
314
315
  * @param {*} [options] Override http request option.
315
316
  * @throws {RequiredError}
316
317
  */
317
- sessionEvents: function (partnerClientId, userId, options) {
318
+ sessionEvents: function (partnerClientId, userId, sessionId, options) {
318
319
  if (options === void 0) { options = {}; }
319
320
  return __awaiter(_this, void 0, void 0, function () {
320
321
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -356,6 +357,9 @@ var ConnectionsApiAxiosParamCreator = function (configuration) {
356
357
  if (userId !== undefined) {
357
358
  localVarQueryParameter['userId'] = userId;
358
359
  }
360
+ if (sessionId !== undefined) {
361
+ localVarQueryParameter['sessionId'] = sessionId;
362
+ }
359
363
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
360
364
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
361
365
  (0, requestBeforeHook_1.requestBeforeHook)({
@@ -455,7 +459,7 @@ var ConnectionsApiFp = function (configuration) {
455
459
  var localVarAxiosArgs;
456
460
  return __generator(this, function (_a) {
457
461
  switch (_a.label) {
458
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.sessionEvents(requestParameters.partnerClientId, requestParameters.userId, options)];
462
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.sessionEvents(requestParameters.partnerClientId, requestParameters.userId, requestParameters.sessionId, options)];
459
463
  case 1:
460
464
  localVarAxiosArgs = _a.sent();
461
465
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -34,7 +34,7 @@ var Configuration = /** @class */ (function () {
34
34
  this.accessToken = param.accessToken;
35
35
  this.basePath = param.basePath;
36
36
  this.baseOptions = (_a = param.baseOptions) !== null && _a !== void 0 ? _a : {};
37
- this.userAgent = param.userAgent === undefined ? "Konfig/8.4.0/typescript" : param.userAgent;
37
+ this.userAgent = param.userAgent === undefined ? "Konfig/8.6.0/typescript" : param.userAgent;
38
38
  this.formDataCtor = param.formDataCtor;
39
39
  }
40
40
  /**
@@ -0,0 +1,47 @@
1
+ /**
2
+ * SnapTrade
3
+ * Connect brokerage accounts to your app for live positions and trading
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: api@snaptrade.com
7
+ *
8
+ * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
9
+ * https://konfigthis.com
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Balance } from './balance';
13
+ import { Position } from './position';
14
+ import { SnapTradeHoldingsAccountAccountId } from './snap-trade-holdings-account-account-id';
15
+ import { SnapTradeHoldingsTotalValue } from './snap-trade-holdings-total-value';
16
+ /**
17
+ * Account Holdings with Account ID
18
+ * @export
19
+ * @interface AccountHoldingsAccount
20
+ */
21
+ export interface AccountHoldingsAccount {
22
+ [key: string]: any;
23
+ /**
24
+ *
25
+ * @type {SnapTradeHoldingsAccountAccountId}
26
+ * @memberof AccountHoldingsAccount
27
+ */
28
+ 'account'?: SnapTradeHoldingsAccountAccountId;
29
+ /**
30
+ *
31
+ * @type {Array<Balance>}
32
+ * @memberof AccountHoldingsAccount
33
+ */
34
+ 'balances'?: Array<Balance>;
35
+ /**
36
+ *
37
+ * @type {Array<Position>}
38
+ * @memberof AccountHoldingsAccount
39
+ */
40
+ 'positions'?: Array<Position>;
41
+ /**
42
+ *
43
+ * @type {SnapTradeHoldingsTotalValue}
44
+ * @memberof AccountHoldingsAccount
45
+ */
46
+ 'total_value'?: SnapTradeHoldingsTotalValue;
47
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * SnapTrade
6
+ * Connect brokerage accounts to your app for live positions and trading
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: api@snaptrade.com
10
+ *
11
+ * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
12
+ * https://konfigthis.com
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
1
1
  export * from './apidisclaimer-accept-request';
2
2
  export * from './account';
3
3
  export * from './account-holdings';
4
+ export * from './account-holdings-account';
4
5
  export * from './account-order-record';
5
6
  export * from './account-order-record-status';
6
7
  export * from './account-simple';
@@ -73,6 +74,7 @@ export * from './security-type';
73
74
  export * from './session-event';
74
75
  export * from './snap-trade-apidisclaimer-accept-status';
75
76
  export * from './snap-trade-holdings-account';
77
+ export * from './snap-trade-holdings-account-account-id';
76
78
  export * from './snap-trade-holdings-total-value';
77
79
  export * from './snap-trade-login-user-request-body';
78
80
  export * from './snap-trade-register-user-request-body';
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./apidisclaimer-accept-request"), exports);
18
18
  __exportStar(require("./account"), exports);
19
19
  __exportStar(require("./account-holdings"), exports);
20
+ __exportStar(require("./account-holdings-account"), exports);
20
21
  __exportStar(require("./account-order-record"), exports);
21
22
  __exportStar(require("./account-order-record-status"), exports);
22
23
  __exportStar(require("./account-simple"), exports);
@@ -89,6 +90,7 @@ __exportStar(require("./security-type"), exports);
89
90
  __exportStar(require("./session-event"), exports);
90
91
  __exportStar(require("./snap-trade-apidisclaimer-accept-status"), exports);
91
92
  __exportStar(require("./snap-trade-holdings-account"), exports);
93
+ __exportStar(require("./snap-trade-holdings-account-account-id"), exports);
92
94
  __exportStar(require("./snap-trade-holdings-total-value"), exports);
93
95
  __exportStar(require("./snap-trade-login-user-request-body"), exports);
94
96
  __exportStar(require("./snap-trade-register-user-request-body"), exports);
@@ -53,5 +53,5 @@ export interface OptionsHoldings {
53
53
  * @type {number}
54
54
  * @memberof OptionsHoldings
55
55
  */
56
- 'average_purchase_price'?: number;
56
+ 'average_purchase_price'?: number | null;
57
57
  }
@@ -59,5 +59,5 @@ export interface OptionsPosition {
59
59
  * @type {number}
60
60
  * @memberof OptionsPosition
61
61
  */
62
- 'average_purchase_price'?: number;
62
+ 'average_purchase_price'?: number | null;
63
63
  }
@@ -52,5 +52,5 @@ export interface Position {
52
52
  * @type {number}
53
53
  * @memberof Position
54
54
  */
55
- 'average_purchase_price'?: number;
55
+ 'average_purchase_price'?: number | null;
56
56
  }
@@ -46,14 +46,20 @@ export interface SessionEvent {
46
46
  * @memberof SessionEvent
47
47
  */
48
48
  'created_date'?: string;
49
+ /**
50
+ *
51
+ * @type {number}
52
+ * @memberof SessionEvent
53
+ */
54
+ 'brokerage_status_code'?: number | null;
49
55
  }
50
56
  export declare const SessionEventSessionEventTypeEnum: {
57
+ readonly ConnectionFailed: "CONNECTION_FAILED";
51
58
  readonly DisclaimerAccepted: "DISCLAIMER_ACCEPTED";
52
59
  readonly BrokerageConnectionInitiated: "BROKERAGE_CONNECTION_INITIATED";
53
60
  readonly BrokerageAuthentication: "BROKERAGE_AUTHENTICATION";
54
61
  readonly MfaAuthorization: "MFA_AUTHORIZATION";
55
62
  readonly ConnectionSuccessful: "CONNECTION_SUCCESSFUL";
56
- readonly ConnectionFailed: "CONNECTION_FAILED";
57
63
  readonly PartnerRedirect: "PARTNER_REDIRECT";
58
64
  };
59
65
  export type SessionEventSessionEventTypeEnum = typeof SessionEventSessionEventTypeEnum[keyof typeof SessionEventSessionEventTypeEnum];
@@ -15,11 +15,11 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.SessionEventSessionEventTypeEnum = void 0;
17
17
  exports.SessionEventSessionEventTypeEnum = {
18
+ ConnectionFailed: 'CONNECTION_FAILED',
18
19
  DisclaimerAccepted: 'DISCLAIMER_ACCEPTED',
19
20
  BrokerageConnectionInitiated: 'BROKERAGE_CONNECTION_INITIATED',
20
21
  BrokerageAuthentication: 'BROKERAGE_AUTHENTICATION',
21
22
  MfaAuthorization: 'MFA_AUTHORIZATION',
22
23
  ConnectionSuccessful: 'CONNECTION_SUCCESSFUL',
23
- ConnectionFailed: 'CONNECTION_FAILED',
24
24
  PartnerRedirect: 'PARTNER_REDIRECT'
25
25
  };
@@ -0,0 +1,76 @@
1
+ /**
2
+ * SnapTrade
3
+ * Connect brokerage accounts to your app for live positions and trading
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: api@snaptrade.com
7
+ *
8
+ * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
9
+ * https://konfigthis.com
10
+ * Do not edit the class manually.
11
+ */
12
+ import { CashRestriction } from './cash-restriction';
13
+ /**
14
+ * Holdings with account ID
15
+ * @export
16
+ * @interface SnapTradeHoldingsAccountAccountId
17
+ */
18
+ export interface SnapTradeHoldingsAccountAccountId {
19
+ [key: string]: any;
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof SnapTradeHoldingsAccountAccountId
24
+ */
25
+ 'id'?: string;
26
+ /**
27
+ *
28
+ * @type {string}
29
+ * @memberof SnapTradeHoldingsAccountAccountId
30
+ */
31
+ 'brokerage_authorization'?: string;
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof SnapTradeHoldingsAccountAccountId
36
+ */
37
+ 'portfolio_group'?: string;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof SnapTradeHoldingsAccountAccountId
42
+ */
43
+ 'name'?: string | null;
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof SnapTradeHoldingsAccountAccountId
48
+ */
49
+ 'number'?: string;
50
+ /**
51
+ *
52
+ * @type {string}
53
+ * @memberof SnapTradeHoldingsAccountAccountId
54
+ */
55
+ 'institution_name'?: string;
56
+ /**
57
+ *
58
+ * @type {{ [key: string]: any; }}
59
+ * @memberof SnapTradeHoldingsAccountAccountId
60
+ */
61
+ 'meta'?: {
62
+ [key: string]: any;
63
+ };
64
+ /**
65
+ *
66
+ * @type {Array<CashRestriction>}
67
+ * @memberof SnapTradeHoldingsAccountAccountId
68
+ */
69
+ 'cash_restrictions'?: Array<CashRestriction>;
70
+ /**
71
+ * Time
72
+ * @type {string}
73
+ * @memberof SnapTradeHoldingsAccountAccountId
74
+ */
75
+ 'created_date'?: string;
76
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * SnapTrade
6
+ * Connect brokerage accounts to your app for live positions and trading
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: api@snaptrade.com
10
+ *
11
+ * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
12
+ * https://konfigthis.com
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { AccountSyncStatus } from './account-sync-status';
13
+ import { BrokerageAuthorization } from './brokerage-authorization';
13
14
  /**
14
15
  * SnapTradeUser Investment Account
15
16
  * @export
@@ -25,10 +26,10 @@ export interface SnapTradeHoldingsAccount {
25
26
  'id'?: string;
26
27
  /**
27
28
  *
28
- * @type {string}
29
+ * @type {BrokerageAuthorization}
29
30
  * @memberof SnapTradeHoldingsAccount
30
31
  */
31
- 'brokerage_authorization'?: string;
32
+ 'brokerage_authorization'?: BrokerageAuthorization;
32
33
  /**
33
34
  *
34
35
  * @type {string}
@@ -338,7 +338,7 @@ Name | Type | Description | Notes
338
338
 
339
339
  ### Return type
340
340
 
341
- **AccountHoldings**
341
+ **AccountHoldingsAccount**
342
342
 
343
343
  ### HTTP request headers
344
344
 
@@ -199,6 +199,7 @@ const snaptrade = new Snaptrade({
199
199
  const sessionEventsResponse = await snaptrade.connections.sessionEvents({
200
200
  "partnerClientId": "PASSIVTEST",
201
201
  "userId": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
202
+ "sessionId": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
202
203
  })
203
204
 
204
205
  console.log(sessionEventsResponse)
@@ -212,6 +213,7 @@ Name | Type | Description | Notes
212
213
  ------------- | ------------- | ------------- | -------------
213
214
  **partnerClientId** | [**string**] | | defaults to undefined
214
215
  **userId** | [**string**] | Optional comma seperated list of user IDs used to filter the request on specific users | (optional) defaults to undefined
216
+ **sessionId** | [**string**] | Optional comma seperated list of session IDs used to filter the request on specific users | (optional) defaults to undefined
215
217
 
216
218
 
217
219
  ### Return type
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * SnapTrade
5
+ * Connect brokerage accounts to your app for live positions and trading
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: api@snaptrade.com
9
+ *
10
+ * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
11
+ * https://konfigthis.com
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ // May contain unused imports in some cases
16
+ // @ts-ignore
17
+ import { Balance } from './balance';
18
+ // May contain unused imports in some cases
19
+ // @ts-ignore
20
+ import { Position } from './position';
21
+ // May contain unused imports in some cases
22
+ // @ts-ignore
23
+ import { SnapTradeHoldingsAccountAccountId } from './snap-trade-holdings-account-account-id';
24
+ // May contain unused imports in some cases
25
+ // @ts-ignore
26
+ import { SnapTradeHoldingsTotalValue } from './snap-trade-holdings-total-value';
27
+
28
+ /**
29
+ * Account Holdings with Account ID
30
+ * @export
31
+ * @interface AccountHoldingsAccount
32
+ */
33
+ export interface AccountHoldingsAccount {
34
+ [key: string]: any;
35
+
36
+ /**
37
+ *
38
+ * @type {SnapTradeHoldingsAccountAccountId}
39
+ * @memberof AccountHoldingsAccount
40
+ */
41
+ 'account'?: SnapTradeHoldingsAccountAccountId;
42
+ /**
43
+ *
44
+ * @type {Array<Balance>}
45
+ * @memberof AccountHoldingsAccount
46
+ */
47
+ 'balances'?: Array<Balance>;
48
+ /**
49
+ *
50
+ * @type {Array<Position>}
51
+ * @memberof AccountHoldingsAccount
52
+ */
53
+ 'positions'?: Array<Position>;
54
+ /**
55
+ *
56
+ * @type {SnapTradeHoldingsTotalValue}
57
+ * @memberof AccountHoldingsAccount
58
+ */
59
+ 'total_value'?: SnapTradeHoldingsTotalValue;
60
+ }
61
+
package/models/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './apidisclaimer-accept-request';
2
2
  export * from './account';
3
3
  export * from './account-holdings';
4
+ export * from './account-holdings-account';
4
5
  export * from './account-order-record';
5
6
  export * from './account-order-record-status';
6
7
  export * from './account-simple';
@@ -73,6 +74,7 @@ export * from './security-type';
73
74
  export * from './session-event';
74
75
  export * from './snap-trade-apidisclaimer-accept-status';
75
76
  export * from './snap-trade-holdings-account';
77
+ export * from './snap-trade-holdings-account-account-id';
76
78
  export * from './snap-trade-holdings-total-value';
77
79
  export * from './snap-trade-login-user-request-body';
78
80
  export * from './snap-trade-register-user-request-body';
@@ -62,6 +62,6 @@ export interface OptionsHoldings {
62
62
  * @type {number}
63
63
  * @memberof OptionsHoldings
64
64
  */
65
- 'average_purchase_price'?: number;
65
+ 'average_purchase_price'?: number | null;
66
66
  }
67
67
 
@@ -68,6 +68,6 @@ export interface OptionsPosition {
68
68
  * @type {number}
69
69
  * @memberof OptionsPosition
70
70
  */
71
- 'average_purchase_price'?: number;
71
+ 'average_purchase_price'?: number | null;
72
72
  }
73
73
 
@@ -59,6 +59,6 @@ export interface Position {
59
59
  * @type {number}
60
60
  * @memberof Position
61
61
  */
62
- 'average_purchase_price'?: number;
62
+ 'average_purchase_price'?: number | null;
63
63
  }
64
64
 
@@ -51,15 +51,21 @@ export interface SessionEvent {
51
51
  * @memberof SessionEvent
52
52
  */
53
53
  'created_date'?: string;
54
+ /**
55
+ *
56
+ * @type {number}
57
+ * @memberof SessionEvent
58
+ */
59
+ 'brokerage_status_code'?: number | null;
54
60
  }
55
61
 
56
62
  export const SessionEventSessionEventTypeEnum = {
63
+ ConnectionFailed: 'CONNECTION_FAILED',
57
64
  DisclaimerAccepted: 'DISCLAIMER_ACCEPTED',
58
65
  BrokerageConnectionInitiated: 'BROKERAGE_CONNECTION_INITIATED',
59
66
  BrokerageAuthentication: 'BROKERAGE_AUTHENTICATION',
60
67
  MfaAuthorization: 'MFA_AUTHORIZATION',
61
68
  ConnectionSuccessful: 'CONNECTION_SUCCESSFUL',
62
- ConnectionFailed: 'CONNECTION_FAILED',
63
69
  PartnerRedirect: 'PARTNER_REDIRECT'
64
70
  } as const;
65
71
 
@@ -0,0 +1,82 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * SnapTrade
5
+ * Connect brokerage accounts to your app for live positions and trading
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: api@snaptrade.com
9
+ *
10
+ * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
11
+ * https://konfigthis.com
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ // May contain unused imports in some cases
16
+ // @ts-ignore
17
+ import { CashRestriction } from './cash-restriction';
18
+
19
+ /**
20
+ * Holdings with account ID
21
+ * @export
22
+ * @interface SnapTradeHoldingsAccountAccountId
23
+ */
24
+ export interface SnapTradeHoldingsAccountAccountId {
25
+ [key: string]: any;
26
+
27
+ /**
28
+ *
29
+ * @type {string}
30
+ * @memberof SnapTradeHoldingsAccountAccountId
31
+ */
32
+ 'id'?: string;
33
+ /**
34
+ *
35
+ * @type {string}
36
+ * @memberof SnapTradeHoldingsAccountAccountId
37
+ */
38
+ 'brokerage_authorization'?: string;
39
+ /**
40
+ *
41
+ * @type {string}
42
+ * @memberof SnapTradeHoldingsAccountAccountId
43
+ */
44
+ 'portfolio_group'?: string;
45
+ /**
46
+ *
47
+ * @type {string}
48
+ * @memberof SnapTradeHoldingsAccountAccountId
49
+ */
50
+ 'name'?: string | null;
51
+ /**
52
+ *
53
+ * @type {string}
54
+ * @memberof SnapTradeHoldingsAccountAccountId
55
+ */
56
+ 'number'?: string;
57
+ /**
58
+ *
59
+ * @type {string}
60
+ * @memberof SnapTradeHoldingsAccountAccountId
61
+ */
62
+ 'institution_name'?: string;
63
+ /**
64
+ *
65
+ * @type {{ [key: string]: any; }}
66
+ * @memberof SnapTradeHoldingsAccountAccountId
67
+ */
68
+ 'meta'?: { [key: string]: any; };
69
+ /**
70
+ *
71
+ * @type {Array<CashRestriction>}
72
+ * @memberof SnapTradeHoldingsAccountAccountId
73
+ */
74
+ 'cash_restrictions'?: Array<CashRestriction>;
75
+ /**
76
+ * Time
77
+ * @type {string}
78
+ * @memberof SnapTradeHoldingsAccountAccountId
79
+ */
80
+ 'created_date'?: string;
81
+ }
82
+
@@ -15,6 +15,9 @@
15
15
  // May contain unused imports in some cases
16
16
  // @ts-ignore
17
17
  import { AccountSyncStatus } from './account-sync-status';
18
+ // May contain unused imports in some cases
19
+ // @ts-ignore
20
+ import { BrokerageAuthorization } from './brokerage-authorization';
18
21
 
19
22
  /**
20
23
  * SnapTradeUser Investment Account
@@ -32,10 +35,10 @@ export interface SnapTradeHoldingsAccount {
32
35
  'id'?: string;
33
36
  /**
34
37
  *
35
- * @type {string}
38
+ * @type {BrokerageAuthorization}
36
39
  * @memberof SnapTradeHoldingsAccount
37
40
  */
38
- 'brokerage_authorization'?: string;
41
+ 'brokerage_authorization'?: BrokerageAuthorization;
39
42
  /**
40
43
  *
41
44
  * @type {string}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "8.4.0",
3
+ "version": "8.6.0",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "engines": {