snaptrade-typescript-sdk 6.2.0 → 6.3.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 (42) hide show
  1. package/.konfig/generate-id.txt +1 -1
  2. package/README.md +3 -2
  3. package/api/account-information-api.ts +40 -72
  4. package/api/api-disclaimer-api.ts +7 -10
  5. package/api/api-status-api.ts +4 -5
  6. package/api/authentication-api.ts +29 -47
  7. package/api/connections-api.ts +126 -26
  8. package/api/error-logs-api.ts +5 -9
  9. package/api/options-api.ts +29 -47
  10. package/api/portfolio-management-api.ts +181 -305
  11. package/api/reference-data-api.ts +59 -101
  12. package/api/trading-api.ts +60 -95
  13. package/api/transactions-and-reporting-api.ts +24 -20
  14. package/common.ts +9 -4
  15. package/configuration.ts +3 -2
  16. package/dist/api/api-disclaimer-api.js +2 -1
  17. package/dist/api/authentication-api.js +4 -2
  18. package/dist/api/connections-api.d.ts +54 -0
  19. package/dist/api/connections-api.js +109 -0
  20. package/dist/api/options-api.js +4 -2
  21. package/dist/api/portfolio-management-api.js +16 -8
  22. package/dist/api/reference-data-api.js +4 -2
  23. package/dist/api/trading-api.js +10 -5
  24. package/dist/api/transactions-and-reporting-api.d.ts +8 -1
  25. package/dist/api/transactions-and-reporting-api.js +6 -2
  26. package/dist/common.d.ts +2 -1
  27. package/dist/common.js +12 -10
  28. package/dist/configuration.js +3 -2
  29. package/dist/models/connections-session-events200-response-inner.d.ts +17 -0
  30. package/dist/models/connections-session-events200-response-inner.js +15 -0
  31. package/dist/models/index.d.ts +2 -0
  32. package/dist/models/index.js +2 -0
  33. package/dist/models/session-event.d.ts +59 -0
  34. package/dist/models/session-event.js +25 -0
  35. package/dist/requestBeforeHook.d.ts +1 -0
  36. package/docs/ConnectionsApi.md +55 -0
  37. package/docs/TransactionsAndReportingApi.md +2 -0
  38. package/models/connections-session-events200-response-inner.ts +25 -0
  39. package/models/index.ts +2 -0
  40. package/models/session-event.ts +68 -0
  41. package/package.json +1 -1
  42. package/requestBeforeHook.ts +1 -0
@@ -152,13 +152,14 @@ var TradingApiAxiosParamCreator = function (configuration) {
152
152
  localVarHeaderParameter['Content-Type'] = 'application/json';
153
153
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
154
154
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
155
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tradingCancelUserAccountOrderRequest, localVarRequestOptions, configuration);
156
155
  (0, requestBeforeHook_1.requestBeforeHook)({
156
+ requestBody: tradingCancelUserAccountOrderRequest,
157
157
  queryParameters: localVarQueryParameter,
158
158
  requestConfig: localVarRequestOptions,
159
159
  path: localVarPath,
160
160
  configuration: configuration
161
161
  });
162
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tradingCancelUserAccountOrderRequest, localVarRequestOptions, configuration);
162
163
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
163
164
  return [2 /*return*/, {
164
165
  url: (0, common_1.toPathString)(localVarUrlObj),
@@ -360,13 +361,14 @@ var TradingApiAxiosParamCreator = function (configuration) {
360
361
  localVarHeaderParameter['Content-Type'] = 'application/json';
361
362
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
362
363
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
363
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(manualTradeForm, localVarRequestOptions, configuration);
364
364
  (0, requestBeforeHook_1.requestBeforeHook)({
365
+ requestBody: manualTradeForm,
365
366
  queryParameters: localVarQueryParameter,
366
367
  requestConfig: localVarRequestOptions,
367
368
  path: localVarPath,
368
369
  configuration: configuration
369
370
  });
371
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(manualTradeForm, localVarRequestOptions, configuration);
370
372
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
371
373
  return [2 /*return*/, {
372
374
  url: (0, common_1.toPathString)(localVarUrlObj),
@@ -515,13 +517,14 @@ var TradingApiAxiosParamCreator = function (configuration) {
515
517
  localVarHeaderParameter['Content-Type'] = 'application/json';
516
518
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
517
519
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
518
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(trade, localVarRequestOptions, configuration);
519
520
  (0, requestBeforeHook_1.requestBeforeHook)({
521
+ requestBody: trade,
520
522
  queryParameters: localVarQueryParameter,
521
523
  requestConfig: localVarRequestOptions,
522
524
  path: localVarPath,
523
525
  configuration: configuration
524
526
  });
527
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(trade, localVarRequestOptions, configuration);
525
528
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
526
529
  return [2 /*return*/, {
527
530
  url: (0, common_1.toPathString)(localVarUrlObj),
@@ -654,13 +657,14 @@ var TradingApiAxiosParamCreator = function (configuration) {
654
657
  localVarHeaderParameter['Content-Type'] = 'application/json';
655
658
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
656
659
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
657
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(manualTradeForm, localVarRequestOptions, configuration);
658
660
  (0, requestBeforeHook_1.requestBeforeHook)({
661
+ requestBody: manualTradeForm,
659
662
  queryParameters: localVarQueryParameter,
660
663
  requestConfig: localVarRequestOptions,
661
664
  path: localVarPath,
662
665
  configuration: configuration
663
666
  });
667
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(manualTradeForm, localVarRequestOptions, configuration);
664
668
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
665
669
  return [2 /*return*/, {
666
670
  url: (0, common_1.toPathString)(localVarUrlObj),
@@ -728,13 +732,14 @@ var TradingApiAxiosParamCreator = function (configuration) {
728
732
  localVarHeaderParameter['Content-Type'] = 'application/json';
729
733
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
730
734
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
731
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tradingPlaceOCOOrderRequest, localVarRequestOptions, configuration);
732
735
  (0, requestBeforeHook_1.requestBeforeHook)({
736
+ requestBody: tradingPlaceOCOOrderRequest,
733
737
  queryParameters: localVarQueryParameter,
734
738
  requestConfig: localVarRequestOptions,
735
739
  path: localVarPath,
736
740
  configuration: configuration
737
741
  });
742
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tradingPlaceOCOOrderRequest, localVarRequestOptions, configuration);
738
743
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
739
744
  return [2 /*return*/, {
740
745
  url: (0, common_1.toPathString)(localVarUrlObj),
@@ -27,10 +27,11 @@ export declare const TransactionsAndReportingApiAxiosParamCreator: (configuratio
27
27
  * @param {string} [startDate]
28
28
  * @param {string} [endDate]
29
29
  * @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
30
+ * @param {string} [brokerageAuthorizations] Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
30
31
  * @param {*} [options] Override http request option.
31
32
  * @throws {RequiredError}
32
33
  */
33
- getActivities: (userId: string, userSecret: string, startDate?: string, endDate?: string, accounts?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
34
+ getActivities: (userId: string, userSecret: string, startDate?: string, endDate?: string, accounts?: string, brokerageAuthorizations?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
34
35
  /**
35
36
  * Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
36
37
  * @summary Get performance information for a specific timeframe
@@ -126,6 +127,12 @@ export type TransactionsAndReportingApiGetActivitiesRequest = {
126
127
  * @memberof TransactionsAndReportingApiGetActivities
127
128
  */
128
129
  readonly accounts?: string;
130
+ /**
131
+ * Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
132
+ * @type {string}
133
+ * @memberof TransactionsAndReportingApiGetActivities
134
+ */
135
+ readonly brokerageAuthorizations?: string;
129
136
  };
130
137
  /**
131
138
  * Request parameters for getReportingCustomRange operation in TransactionsAndReportingApi.
@@ -98,10 +98,11 @@ var TransactionsAndReportingApiAxiosParamCreator = function (configuration) {
98
98
  * @param {string} [startDate]
99
99
  * @param {string} [endDate]
100
100
  * @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
101
+ * @param {string} [brokerageAuthorizations] Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
101
102
  * @param {*} [options] Override http request option.
102
103
  * @throws {RequiredError}
103
104
  */
104
- getActivities: function (userId, userSecret, startDate, endDate, accounts, options) {
105
+ getActivities: function (userId, userSecret, startDate, endDate, accounts, brokerageAuthorizations, options) {
105
106
  if (options === void 0) { options = {}; }
106
107
  return __awaiter(_this, void 0, void 0, function () {
107
108
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -148,6 +149,9 @@ var TransactionsAndReportingApiAxiosParamCreator = function (configuration) {
148
149
  if (accounts !== undefined) {
149
150
  localVarQueryParameter['accounts'] = accounts;
150
151
  }
152
+ if (brokerageAuthorizations !== undefined) {
153
+ localVarQueryParameter['brokerageAuthorizations'] = brokerageAuthorizations;
154
+ }
151
155
  if (userId !== undefined) {
152
156
  localVarQueryParameter['userId'] = userId;
153
157
  }
@@ -286,7 +290,7 @@ var TransactionsAndReportingApiFp = function (configuration) {
286
290
  var localVarAxiosArgs;
287
291
  return __generator(this, function (_a) {
288
292
  switch (_a.label) {
289
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActivities(requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, options)];
293
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getActivities(requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, requestParameters.brokerageAuthorizations, options)];
290
294
  case 1:
291
295
  localVarAxiosArgs = _a.sent();
292
296
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
package/dist/common.d.ts CHANGED
@@ -27,12 +27,13 @@ export declare const assertParamExists: (functionName: string, paramName: string
27
27
  *
28
28
  * @export
29
29
  */
30
- export declare const setApiKeyToObject: ({ object, key, type, keyParamName, configuration, }: {
30
+ export declare const setApiKeyToObject: ({ object, key, type, keyParamName, configuration, prefix }: {
31
31
  object: any;
32
32
  key?: string;
33
33
  type?: "Cookie";
34
34
  keyParamName: string;
35
35
  configuration?: Configuration;
36
+ prefix?: string;
36
37
  }) => Promise<void>;
37
38
  /**
38
39
  *
package/dist/common.js CHANGED
@@ -84,32 +84,34 @@ exports.assertParamExists = assertParamExists;
84
84
  * @export
85
85
  */
86
86
  var setApiKeyToObject = function (_a) {
87
- var object = _a.object, key = _a.key, type = _a.type, keyParamName = _a.keyParamName, configuration = _a.configuration;
87
+ var object = _a.object, key = _a.key, type = _a.type, keyParamName = _a.keyParamName, configuration = _a.configuration, prefix = _a.prefix;
88
88
  return __awaiter(this, void 0, void 0, function () {
89
- var _b, _c;
90
- return __generator(this, function (_d) {
91
- switch (_d.label) {
89
+ var apiKey;
90
+ return __generator(this, function (_b) {
91
+ switch (_b.label) {
92
92
  case 0:
93
93
  key = key ? key : keyParamName;
94
+ apiKey = null;
94
95
  if (!(configuration && configuration.apiKey)) return [3 /*break*/, 3];
95
96
  if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
96
- _b = object;
97
- _c = key;
98
97
  return [4 /*yield*/, configuration.apiKey(keyParamName)];
99
98
  case 1:
100
- _b[_c] = _d.sent();
99
+ apiKey = _b.sent();
101
100
  return [3 /*break*/, 3];
102
101
  case 2:
103
102
  if (typeof configuration.apiKey === 'string')
104
- object[key] = configuration.apiKey;
103
+ apiKey = configuration.apiKey;
105
104
  else if (typeof configuration.apiKey === 'object') {
106
105
  if (keyParamName in configuration.apiKey)
107
- object[key] = configuration.apiKey[keyParamName];
106
+ apiKey = configuration.apiKey[keyParamName];
108
107
  }
109
108
  else
110
109
  throw Error("Unexpected type ".concat(typeof configuration.apiKey, " for Configuration.apiKey"));
111
- _d.label = 3;
110
+ _b.label = 3;
112
111
  case 3:
112
+ if (!apiKey)
113
+ return [2 /*return*/];
114
+ object[key] = prefix !== undefined ? "".concat(prefix).concat(apiKey) : apiKey;
113
115
  if (type === "Cookie")
114
116
  object[key] = "".concat(keyParamName, "=").concat(object[key]);
115
117
  return [2 /*return*/];
@@ -17,6 +17,7 @@ exports.Configuration = void 0;
17
17
  var Configuration = /** @class */ (function () {
18
18
  function Configuration(param) {
19
19
  if (param === void 0) { param = {}; }
20
+ var _a;
20
21
  this.consumerKey = param.consumerKey;
21
22
  this.apiKey = param.apiKey;
22
23
  if (this.apiKey === undefined) {
@@ -32,8 +33,8 @@ var Configuration = /** @class */ (function () {
32
33
  this.password = param.password;
33
34
  this.accessToken = param.accessToken;
34
35
  this.basePath = param.basePath;
35
- this.baseOptions = param.baseOptions;
36
- this.userAgent = param.userAgent === undefined ? "Konfig/6.2.0/typescript" : param.userAgent;
36
+ this.baseOptions = (_a = param.baseOptions) !== null && _a !== void 0 ? _a : {};
37
+ this.userAgent = param.userAgent === undefined ? "Konfig/6.3.0/typescript" : param.userAgent;
37
38
  this.formDataCtor = param.formDataCtor;
38
39
  }
39
40
  /**
@@ -0,0 +1,17 @@
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 { SessionEvent } from './session-event';
13
+ /**
14
+ * @type ConnectionsSessionEvents200ResponseInner
15
+ * @export
16
+ */
17
+ export type ConnectionsSessionEvents200ResponseInner = SessionEvent;
@@ -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 });
@@ -16,6 +16,7 @@ export * from './brokerage-symbol';
16
16
  export * from './brokerage-type';
17
17
  export * from './calculated-trade';
18
18
  export * from './cash-restriction';
19
+ export * from './connections-session-events200-response-inner';
19
20
  export * from './currency';
20
21
  export * from './delete-user-response';
21
22
  export * from './dividend-at-date';
@@ -68,6 +69,7 @@ export * from './position';
68
69
  export * from './position-symbol';
69
70
  export * from './redirect-tokenand-pin';
70
71
  export * from './security-type';
72
+ export * from './session-event';
71
73
  export * from './snap-trade-apidisclaimer-accept-status';
72
74
  export * from './snap-trade-holdings-account';
73
75
  export * from './snap-trade-holdings-total-value';
@@ -32,6 +32,7 @@ __exportStar(require("./brokerage-symbol"), exports);
32
32
  __exportStar(require("./brokerage-type"), exports);
33
33
  __exportStar(require("./calculated-trade"), exports);
34
34
  __exportStar(require("./cash-restriction"), exports);
35
+ __exportStar(require("./connections-session-events200-response-inner"), exports);
35
36
  __exportStar(require("./currency"), exports);
36
37
  __exportStar(require("./delete-user-response"), exports);
37
38
  __exportStar(require("./dividend-at-date"), exports);
@@ -84,6 +85,7 @@ __exportStar(require("./position"), exports);
84
85
  __exportStar(require("./position-symbol"), exports);
85
86
  __exportStar(require("./redirect-tokenand-pin"), exports);
86
87
  __exportStar(require("./security-type"), exports);
88
+ __exportStar(require("./session-event"), exports);
87
89
  __exportStar(require("./snap-trade-apidisclaimer-accept-status"), exports);
88
90
  __exportStar(require("./snap-trade-holdings-account"), exports);
89
91
  __exportStar(require("./snap-trade-holdings-total-value"), exports);
@@ -0,0 +1,59 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface SessionEvent
16
+ */
17
+ export interface SessionEvent {
18
+ [key: string]: any;
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof SessionEvent
23
+ */
24
+ 'id'?: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof SessionEvent
29
+ */
30
+ 'session_event_type'?: SessionEventSessionEventTypeEnum;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof SessionEvent
35
+ */
36
+ 'session_id'?: string;
37
+ /**
38
+ * SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it\'s unique to a user
39
+ * @type {string}
40
+ * @memberof SessionEvent
41
+ */
42
+ 'user_id'?: string;
43
+ /**
44
+ * Time
45
+ * @type {string}
46
+ * @memberof SessionEvent
47
+ */
48
+ 'created_date'?: string;
49
+ }
50
+ export declare const SessionEventSessionEventTypeEnum: {
51
+ readonly DisclaimerAccepted: "DISCLAIMER_ACCEPTED";
52
+ readonly BrokerageConnectionInitiated: "BROKERAGE_CONNECTION_INITIATED";
53
+ readonly BrokerageAuthentication: "BROKERAGE_AUTHENTICATION";
54
+ readonly MfaAuthorization: "MFA_AUTHORIZATION";
55
+ readonly ConnectionSuccessful: "CONNECTION_SUCCESSFUL";
56
+ readonly ConnectionFailed: "CONNECTION_FAILED";
57
+ readonly PartnerRedirect: "PARTNER_REDIRECT";
58
+ };
59
+ export type SessionEventSessionEventTypeEnum = typeof SessionEventSessionEventTypeEnum[keyof typeof SessionEventSessionEventTypeEnum];
@@ -0,0 +1,25 @@
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 });
16
+ exports.SessionEventSessionEventTypeEnum = void 0;
17
+ exports.SessionEventSessionEventTypeEnum = {
18
+ DisclaimerAccepted: 'DISCLAIMER_ACCEPTED',
19
+ BrokerageConnectionInitiated: 'BROKERAGE_CONNECTION_INITIATED',
20
+ BrokerageAuthentication: 'BROKERAGE_AUTHENTICATION',
21
+ MfaAuthorization: 'MFA_AUTHORIZATION',
22
+ ConnectionSuccessful: 'CONNECTION_SUCCESSFUL',
23
+ ConnectionFailed: 'CONNECTION_FAILED',
24
+ PartnerRedirect: 'PARTNER_REDIRECT'
25
+ };
@@ -1,6 +1,7 @@
1
1
  import { Configuration } from "./configuration";
2
2
  import { AxiosRequestConfig } from "axios";
3
3
  export declare function requestBeforeHook(request: {
4
+ requestBody?: any;
4
5
  queryParameters: Record<string, any>;
5
6
  path: string;
6
7
  requestConfig: AxiosRequestConfig;
@@ -7,6 +7,7 @@ Method | HTTP request | Description
7
7
  [**detailBrokerageAuthorization**](ConnectionsApi.md#detailBrokerageAuthorization) | **GET** /authorizations/{authorizationId} | Get detail of a specific brokerage authorizations for the user
8
8
  [**listBrokerageAuthorizations**](ConnectionsApi.md#listBrokerageAuthorizations) | **GET** /authorizations | List all brokerage authorizations for the user
9
9
  [**removeBrokerageAuthorization**](ConnectionsApi.md#removeBrokerageAuthorization) | **DELETE** /authorizations/{authorizationId} | Remove a brokerage authorization.
10
+ [**sessionEvents**](ConnectionsApi.md#sessionEvents) | **GET** /sessionEvents | List all session events for the partner
10
11
 
11
12
 
12
13
  # **detailBrokerageAuthorization**
@@ -177,4 +178,58 @@ void (empty response body)
177
178
 
178
179
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
179
180
 
181
+ # **sessionEvents**
182
+
183
+ #### **GET** /sessionEvents
184
+
185
+
186
+ ### Example
187
+
188
+
189
+ ```typescript
190
+ import { Snaptrade } from "snaptrade-typescript-sdk"
191
+
192
+ const snaptrade = new Snaptrade({
193
+ // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
194
+ // basePath: "https://api.snaptrade.com/api/v1",
195
+ consumerKey: "YOUR_CONSUMER_KEY",
196
+ clientId: "YOUR_CLIENT_ID",
197
+ })
198
+
199
+ const sessionEventsResponse = await snaptrade.connections.sessionEvents({
200
+ "partnerClientId": "PASSIVTEST",
201
+ "userId": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
202
+ })
203
+
204
+ console.log(sessionEventsResponse)
205
+
206
+ ```
207
+
208
+
209
+ ### Parameters
210
+
211
+ Name | Type | Description | Notes
212
+ ------------- | ------------- | ------------- | -------------
213
+ **partnerClientId** | [**string**] | | defaults to undefined
214
+ **userId** | [**string**] | Optional comma seperated list of user IDs used to filter the request on specific users | (optional) defaults to undefined
215
+
216
+
217
+ ### Return type
218
+
219
+ **Array<ConnectionsSessionEvents200ResponseInner>**
220
+
221
+ ### HTTP request headers
222
+
223
+ - **Content-Type**: Not defined
224
+ - **Accept**: application/json
225
+
226
+
227
+ ### HTTP response details
228
+ | Status code | Description | Response headers |
229
+ |-------------|-------------|------------------|
230
+ **200** | A list of all Session Events for the Partner. | - |
231
+ **0** | Unexpected error. | - |
232
+
233
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
234
+
180
235
 
@@ -32,6 +32,7 @@ const getActivitiesResponse = await snaptrade.transactionsAndReporting.getActivi
32
32
  "startDate": "2022-01-24",
33
33
  "endDate": "2022-01-24",
34
34
  "accounts": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
35
+ "brokerageAuthorizations": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
35
36
  "userId": "John.doe@snaptrade.com",
36
37
  "userSecret": "USERSECRET123",
37
38
  })
@@ -50,6 +51,7 @@ Name | Type | Description | Notes
50
51
  **startDate** | [**string**] | | (optional) defaults to undefined
51
52
  **endDate** | [**string**] | | (optional) defaults to undefined
52
53
  **accounts** | [**string**] | Optional comma seperated list of account IDs used to filter the request on specific accounts | (optional) defaults to undefined
54
+ **brokerageAuthorizations** | [**string**] | Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations | (optional) defaults to undefined
53
55
 
54
56
 
55
57
  ### Return type
@@ -0,0 +1,25 @@
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 { SessionEvent } from './session-event';
18
+
19
+ /**
20
+ * @type ConnectionsSessionEvents200ResponseInner
21
+ * @export
22
+ */
23
+ export type ConnectionsSessionEvents200ResponseInner = SessionEvent;
24
+
25
+
package/models/index.ts CHANGED
@@ -16,6 +16,7 @@ export * from './brokerage-symbol';
16
16
  export * from './brokerage-type';
17
17
  export * from './calculated-trade';
18
18
  export * from './cash-restriction';
19
+ export * from './connections-session-events200-response-inner';
19
20
  export * from './currency';
20
21
  export * from './delete-user-response';
21
22
  export * from './dividend-at-date';
@@ -68,6 +69,7 @@ export * from './position';
68
69
  export * from './position-symbol';
69
70
  export * from './redirect-tokenand-pin';
70
71
  export * from './security-type';
72
+ export * from './session-event';
71
73
  export * from './snap-trade-apidisclaimer-accept-status';
72
74
  export * from './snap-trade-holdings-account';
73
75
  export * from './snap-trade-holdings-total-value';
@@ -0,0 +1,68 @@
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
+
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface SessionEvent
20
+ */
21
+ export interface SessionEvent {
22
+ [key: string]: any;
23
+
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof SessionEvent
28
+ */
29
+ 'id'?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof SessionEvent
34
+ */
35
+ 'session_event_type'?: SessionEventSessionEventTypeEnum;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof SessionEvent
40
+ */
41
+ 'session_id'?: string;
42
+ /**
43
+ * SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it\'s unique to a user
44
+ * @type {string}
45
+ * @memberof SessionEvent
46
+ */
47
+ 'user_id'?: string;
48
+ /**
49
+ * Time
50
+ * @type {string}
51
+ * @memberof SessionEvent
52
+ */
53
+ 'created_date'?: string;
54
+ }
55
+
56
+ export const SessionEventSessionEventTypeEnum = {
57
+ DisclaimerAccepted: 'DISCLAIMER_ACCEPTED',
58
+ BrokerageConnectionInitiated: 'BROKERAGE_CONNECTION_INITIATED',
59
+ BrokerageAuthentication: 'BROKERAGE_AUTHENTICATION',
60
+ MfaAuthorization: 'MFA_AUTHORIZATION',
61
+ ConnectionSuccessful: 'CONNECTION_SUCCESSFUL',
62
+ ConnectionFailed: 'CONNECTION_FAILED',
63
+ PartnerRedirect: 'PARTNER_REDIRECT'
64
+ } as const;
65
+
66
+ export type SessionEventSessionEventTypeEnum = typeof SessionEventSessionEventTypeEnum[keyof typeof SessionEventSessionEventTypeEnum];
67
+
68
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "6.2.0",
3
+ "version": "6.3.0",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "repository": {
@@ -2,6 +2,7 @@ import { Configuration } from "./configuration";
2
2
  import { AxiosRequestConfig } from "axios";
3
3
 
4
4
  export function requestBeforeHook(request: {
5
+ requestBody?: any;
5
6
  queryParameters: Record<string, any>;
6
7
  path: string;
7
8
  requestConfig: AxiosRequestConfig;