snaptrade-typescript-sdk 6.1.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.
- package/.konfig/generate-id.txt +1 -1
- package/README.md +3 -2
- package/api/account-information-api.ts +57 -89
- package/api/api-disclaimer-api.ts +10 -13
- package/api/api-status-api.ts +5 -6
- package/api/authentication-api.ts +40 -58
- package/api/connections-api.ts +133 -33
- package/api/error-logs-api.ts +8 -12
- package/api/options-api.ts +40 -58
- package/api/portfolio-management-api.ts +248 -372
- package/api/reference-data-api.ts +82 -124
- package/api/trading-api.ts +81 -116
- package/api/transactions-and-reporting-api.ts +29 -25
- package/common.ts +35 -15
- package/configuration.ts +3 -2
- package/dist/api/account-information-api.js +24 -24
- package/dist/api/api-disclaimer-api.js +5 -4
- package/dist/api/authentication-api.js +19 -17
- package/dist/api/connections-api.d.ts +54 -0
- package/dist/api/connections-api.js +118 -9
- package/dist/api/error-logs-api.js +3 -3
- package/dist/api/options-api.js +19 -17
- package/dist/api/portfolio-management-api.js +115 -107
- package/dist/api/reference-data-api.js +37 -35
- package/dist/api/trading-api.js +40 -35
- package/dist/api/transactions-and-reporting-api.d.ts +8 -1
- package/dist/api/transactions-and-reporting-api.js +12 -8
- package/dist/common.d.ts +8 -1
- package/dist/common.js +21 -14
- package/dist/configuration.js +3 -2
- package/dist/models/account-order-record.d.ts +7 -0
- package/dist/models/connections-session-events200-response-inner.d.ts +17 -0
- package/dist/models/connections-session-events200-response-inner.js +15 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/session-event.d.ts +59 -0
- package/dist/models/session-event.js +25 -0
- package/dist/requestBeforeHook.d.ts +1 -0
- package/docs/ConnectionsApi.md +55 -0
- package/docs/TransactionsAndReportingApi.md +2 -0
- package/models/account-order-record.ts +9 -0
- package/models/connections-session-events200-response-inner.ts +25 -0
- package/models/index.ts +2 -0
- package/models/session-event.ts +68 -0
- package/package.json +1 -1
- package/requestBeforeHook.ts +1 -0
package/api/trading-api.ts
CHANGED
|
@@ -16,7 +16,7 @@ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'ax
|
|
|
16
16
|
import { Configuration } from '../configuration';
|
|
17
17
|
// Some imports not used depending on template conditions
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject,
|
|
19
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
22
22
|
// @ts-ignore
|
|
@@ -82,14 +82,11 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
82
82
|
const localVarQueryParameter = {} as any;
|
|
83
83
|
|
|
84
84
|
// authentication PartnerClientId required
|
|
85
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
86
|
-
|
|
85
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
87
86
|
// authentication PartnerSignature required
|
|
88
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
89
|
-
|
|
87
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
90
88
|
// authentication PartnerTimestamp required
|
|
91
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
92
|
-
|
|
89
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
93
90
|
if (userId !== undefined) {
|
|
94
91
|
localVarQueryParameter['userId'] = userId;
|
|
95
92
|
}
|
|
@@ -104,14 +101,14 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
104
101
|
|
|
105
102
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
106
103
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
107
|
-
localVarRequestOptions.data = serializeDataIfNeeded(tradingCancelUserAccountOrderRequest, localVarRequestOptions, configuration)
|
|
108
|
-
|
|
109
104
|
requestBeforeHook({
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
requestBody: tradingCancelUserAccountOrderRequest,
|
|
106
|
+
queryParameters: localVarQueryParameter,
|
|
107
|
+
requestConfig: localVarRequestOptions,
|
|
108
|
+
path: localVarPath,
|
|
109
|
+
configuration
|
|
114
110
|
});
|
|
111
|
+
localVarRequestOptions.data = serializeDataIfNeeded(tradingCancelUserAccountOrderRequest, localVarRequestOptions, configuration)
|
|
115
112
|
|
|
116
113
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
117
114
|
return {
|
|
@@ -151,24 +148,20 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
151
148
|
const localVarQueryParameter = {} as any;
|
|
152
149
|
|
|
153
150
|
// authentication PartnerClientId required
|
|
154
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
155
|
-
|
|
151
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
156
152
|
// authentication PartnerSignature required
|
|
157
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
158
|
-
|
|
153
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
159
154
|
// authentication PartnerTimestamp required
|
|
160
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
161
|
-
|
|
155
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
162
156
|
|
|
163
157
|
|
|
164
158
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
165
159
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
166
|
-
|
|
167
160
|
requestBeforeHook({
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
161
|
+
queryParameters: localVarQueryParameter,
|
|
162
|
+
requestConfig: localVarRequestOptions,
|
|
163
|
+
path: localVarPath,
|
|
164
|
+
configuration
|
|
172
165
|
});
|
|
173
166
|
|
|
174
167
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -205,24 +198,20 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
205
198
|
const localVarQueryParameter = {} as any;
|
|
206
199
|
|
|
207
200
|
// authentication PartnerClientId required
|
|
208
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
209
|
-
|
|
201
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
210
202
|
// authentication PartnerSignature required
|
|
211
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
212
|
-
|
|
203
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
213
204
|
// authentication PartnerTimestamp required
|
|
214
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
215
|
-
|
|
205
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
216
206
|
|
|
217
207
|
|
|
218
208
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
219
209
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
220
|
-
|
|
221
210
|
requestBeforeHook({
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
211
|
+
queryParameters: localVarQueryParameter,
|
|
212
|
+
requestConfig: localVarRequestOptions,
|
|
213
|
+
path: localVarPath,
|
|
214
|
+
configuration
|
|
226
215
|
});
|
|
227
216
|
|
|
228
217
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -260,14 +249,11 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
260
249
|
const localVarQueryParameter = {} as any;
|
|
261
250
|
|
|
262
251
|
// authentication PartnerClientId required
|
|
263
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
264
|
-
|
|
252
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
265
253
|
// authentication PartnerSignature required
|
|
266
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
267
|
-
|
|
254
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
268
255
|
// authentication PartnerTimestamp required
|
|
269
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
270
|
-
|
|
256
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
271
257
|
if (userId !== undefined) {
|
|
272
258
|
localVarQueryParameter['userId'] = userId;
|
|
273
259
|
}
|
|
@@ -282,14 +268,14 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
282
268
|
|
|
283
269
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
284
270
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
285
|
-
localVarRequestOptions.data = serializeDataIfNeeded(manualTradeForm, localVarRequestOptions, configuration)
|
|
286
|
-
|
|
287
271
|
requestBeforeHook({
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
272
|
+
requestBody: manualTradeForm,
|
|
273
|
+
queryParameters: localVarQueryParameter,
|
|
274
|
+
requestConfig: localVarRequestOptions,
|
|
275
|
+
path: localVarPath,
|
|
276
|
+
configuration
|
|
292
277
|
});
|
|
278
|
+
localVarRequestOptions.data = serializeDataIfNeeded(manualTradeForm, localVarRequestOptions, configuration)
|
|
293
279
|
|
|
294
280
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
295
281
|
return {
|
|
@@ -331,14 +317,11 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
331
317
|
const localVarQueryParameter = {} as any;
|
|
332
318
|
|
|
333
319
|
// authentication PartnerClientId required
|
|
334
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
335
|
-
|
|
320
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
336
321
|
// authentication PartnerSignature required
|
|
337
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
338
|
-
|
|
322
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
339
323
|
// authentication PartnerTimestamp required
|
|
340
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
341
|
-
|
|
324
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
342
325
|
if (userId !== undefined) {
|
|
343
326
|
localVarQueryParameter['userId'] = userId;
|
|
344
327
|
}
|
|
@@ -359,12 +342,11 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
359
342
|
|
|
360
343
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
361
344
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
362
|
-
|
|
363
345
|
requestBeforeHook({
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
346
|
+
queryParameters: localVarQueryParameter,
|
|
347
|
+
requestConfig: localVarRequestOptions,
|
|
348
|
+
path: localVarPath,
|
|
349
|
+
configuration
|
|
368
350
|
});
|
|
369
351
|
|
|
370
352
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -406,28 +388,25 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
406
388
|
const localVarQueryParameter = {} as any;
|
|
407
389
|
|
|
408
390
|
// authentication PartnerClientId required
|
|
409
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
410
|
-
|
|
391
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
411
392
|
// authentication PartnerSignature required
|
|
412
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
413
|
-
|
|
393
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
414
394
|
// authentication PartnerTimestamp required
|
|
415
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
416
|
-
|
|
395
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
417
396
|
|
|
418
397
|
|
|
419
398
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
420
399
|
|
|
421
400
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
422
401
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
423
|
-
localVarRequestOptions.data = serializeDataIfNeeded(trade, localVarRequestOptions, configuration)
|
|
424
|
-
|
|
425
402
|
requestBeforeHook({
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
403
|
+
requestBody: trade,
|
|
404
|
+
queryParameters: localVarQueryParameter,
|
|
405
|
+
requestConfig: localVarRequestOptions,
|
|
406
|
+
path: localVarPath,
|
|
407
|
+
configuration
|
|
430
408
|
});
|
|
409
|
+
localVarRequestOptions.data = serializeDataIfNeeded(trade, localVarRequestOptions, configuration)
|
|
431
410
|
|
|
432
411
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
433
412
|
return {
|
|
@@ -463,24 +442,20 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
463
442
|
const localVarQueryParameter = {} as any;
|
|
464
443
|
|
|
465
444
|
// authentication PartnerClientId required
|
|
466
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
467
|
-
|
|
445
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
468
446
|
// authentication PartnerSignature required
|
|
469
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
470
|
-
|
|
447
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
471
448
|
// authentication PartnerTimestamp required
|
|
472
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
473
|
-
|
|
449
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
474
450
|
|
|
475
451
|
|
|
476
452
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
477
453
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
478
|
-
|
|
479
454
|
requestBeforeHook({
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
455
|
+
queryParameters: localVarQueryParameter,
|
|
456
|
+
requestConfig: localVarRequestOptions,
|
|
457
|
+
path: localVarPath,
|
|
458
|
+
configuration
|
|
484
459
|
});
|
|
485
460
|
|
|
486
461
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -518,14 +493,11 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
518
493
|
const localVarQueryParameter = {} as any;
|
|
519
494
|
|
|
520
495
|
// authentication PartnerClientId required
|
|
521
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
522
|
-
|
|
496
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
523
497
|
// authentication PartnerSignature required
|
|
524
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
525
|
-
|
|
498
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
526
499
|
// authentication PartnerTimestamp required
|
|
527
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
528
|
-
|
|
500
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
529
501
|
if (userId !== undefined) {
|
|
530
502
|
localVarQueryParameter['userId'] = userId;
|
|
531
503
|
}
|
|
@@ -540,14 +512,14 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
540
512
|
|
|
541
513
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
542
514
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
543
|
-
localVarRequestOptions.data = serializeDataIfNeeded(manualTradeForm, localVarRequestOptions, configuration)
|
|
544
|
-
|
|
545
515
|
requestBeforeHook({
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
516
|
+
requestBody: manualTradeForm,
|
|
517
|
+
queryParameters: localVarQueryParameter,
|
|
518
|
+
requestConfig: localVarRequestOptions,
|
|
519
|
+
path: localVarPath,
|
|
520
|
+
configuration
|
|
550
521
|
});
|
|
522
|
+
localVarRequestOptions.data = serializeDataIfNeeded(manualTradeForm, localVarRequestOptions, configuration)
|
|
551
523
|
|
|
552
524
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
553
525
|
return {
|
|
@@ -584,14 +556,11 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
584
556
|
const localVarQueryParameter = {} as any;
|
|
585
557
|
|
|
586
558
|
// authentication PartnerClientId required
|
|
587
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
588
|
-
|
|
559
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
589
560
|
// authentication PartnerSignature required
|
|
590
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
591
|
-
|
|
561
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
592
562
|
// authentication PartnerTimestamp required
|
|
593
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
594
|
-
|
|
563
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
595
564
|
if (userId !== undefined) {
|
|
596
565
|
localVarQueryParameter['userId'] = userId;
|
|
597
566
|
}
|
|
@@ -606,14 +575,14 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
606
575
|
|
|
607
576
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
608
577
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
609
|
-
localVarRequestOptions.data = serializeDataIfNeeded(tradingPlaceOCOOrderRequest, localVarRequestOptions, configuration)
|
|
610
|
-
|
|
611
578
|
requestBeforeHook({
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
579
|
+
requestBody: tradingPlaceOCOOrderRequest,
|
|
580
|
+
queryParameters: localVarQueryParameter,
|
|
581
|
+
requestConfig: localVarRequestOptions,
|
|
582
|
+
path: localVarPath,
|
|
583
|
+
configuration
|
|
616
584
|
});
|
|
585
|
+
localVarRequestOptions.data = serializeDataIfNeeded(tradingPlaceOCOOrderRequest, localVarRequestOptions, configuration)
|
|
617
586
|
|
|
618
587
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
619
588
|
return {
|
|
@@ -651,14 +620,11 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
651
620
|
const localVarQueryParameter = {} as any;
|
|
652
621
|
|
|
653
622
|
// authentication PartnerClientId required
|
|
654
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
655
|
-
|
|
623
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
656
624
|
// authentication PartnerSignature required
|
|
657
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
658
|
-
|
|
625
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
659
626
|
// authentication PartnerTimestamp required
|
|
660
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
661
|
-
|
|
627
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
662
628
|
if (userId !== undefined) {
|
|
663
629
|
localVarQueryParameter['userId'] = userId;
|
|
664
630
|
}
|
|
@@ -671,12 +637,11 @@ export const TradingApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
671
637
|
|
|
672
638
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
673
639
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
674
|
-
|
|
675
640
|
requestBeforeHook({
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
641
|
+
queryParameters: localVarQueryParameter,
|
|
642
|
+
requestConfig: localVarRequestOptions,
|
|
643
|
+
path: localVarPath,
|
|
644
|
+
configuration
|
|
680
645
|
});
|
|
681
646
|
|
|
682
647
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -16,7 +16,7 @@ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'ax
|
|
|
16
16
|
import { Configuration } from '../configuration';
|
|
17
17
|
// Some imports not used depending on template conditions
|
|
18
18
|
// @ts-ignore
|
|
19
|
-
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject,
|
|
19
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
22
22
|
// @ts-ignore
|
|
@@ -39,10 +39,11 @@ export const TransactionsAndReportingApiAxiosParamCreator = function (configurat
|
|
|
39
39
|
* @param {string} [startDate]
|
|
40
40
|
* @param {string} [endDate]
|
|
41
41
|
* @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
|
|
42
|
+
* @param {string} [brokerageAuthorizations] Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
|
|
42
43
|
* @param {*} [options] Override http request option.
|
|
43
44
|
* @throws {RequiredError}
|
|
44
45
|
*/
|
|
45
|
-
getActivities: async (userId: string, userSecret: string, startDate?: string, endDate?: string, accounts?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
|
+
getActivities: async (userId: string, userSecret: string, startDate?: string, endDate?: string, accounts?: string, brokerageAuthorizations?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
47
|
// verify required parameter 'userId' is not null or undefined
|
|
47
48
|
assertParamExists('getActivities', 'userId', userId)
|
|
48
49
|
// verify required parameter 'userSecret' is not null or undefined
|
|
@@ -60,14 +61,11 @@ export const TransactionsAndReportingApiAxiosParamCreator = function (configurat
|
|
|
60
61
|
const localVarQueryParameter = {} as any;
|
|
61
62
|
|
|
62
63
|
// authentication PartnerClientId required
|
|
63
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
64
|
-
|
|
64
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
65
65
|
// authentication PartnerSignature required
|
|
66
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
67
|
-
|
|
66
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
68
67
|
// authentication PartnerTimestamp required
|
|
69
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
70
|
-
|
|
68
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
71
69
|
if (startDate !== undefined) {
|
|
72
70
|
localVarQueryParameter['startDate'] = startDate;
|
|
73
71
|
}
|
|
@@ -80,6 +78,10 @@ export const TransactionsAndReportingApiAxiosParamCreator = function (configurat
|
|
|
80
78
|
localVarQueryParameter['accounts'] = accounts;
|
|
81
79
|
}
|
|
82
80
|
|
|
81
|
+
if (brokerageAuthorizations !== undefined) {
|
|
82
|
+
localVarQueryParameter['brokerageAuthorizations'] = brokerageAuthorizations;
|
|
83
|
+
}
|
|
84
|
+
|
|
83
85
|
if (userId !== undefined) {
|
|
84
86
|
localVarQueryParameter['userId'] = userId;
|
|
85
87
|
}
|
|
@@ -92,12 +94,11 @@ export const TransactionsAndReportingApiAxiosParamCreator = function (configurat
|
|
|
92
94
|
|
|
93
95
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
94
96
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
95
|
-
|
|
96
97
|
requestBeforeHook({
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
queryParameters: localVarQueryParameter,
|
|
99
|
+
requestConfig: localVarRequestOptions,
|
|
100
|
+
path: localVarPath,
|
|
101
|
+
configuration
|
|
101
102
|
});
|
|
102
103
|
|
|
103
104
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -141,14 +142,11 @@ export const TransactionsAndReportingApiAxiosParamCreator = function (configurat
|
|
|
141
142
|
const localVarQueryParameter = {} as any;
|
|
142
143
|
|
|
143
144
|
// authentication PartnerClientId required
|
|
144
|
-
await setApiKeyToObject(localVarQueryParameter, "clientId", configuration)
|
|
145
|
-
|
|
145
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
146
146
|
// authentication PartnerSignature required
|
|
147
|
-
await setApiKeyToObject(localVarHeaderParameter, "Signature", configuration)
|
|
148
|
-
|
|
147
|
+
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
149
148
|
// authentication PartnerTimestamp required
|
|
150
|
-
await setApiKeyToObject(localVarQueryParameter, "timestamp", configuration)
|
|
151
|
-
|
|
149
|
+
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
152
150
|
if (startDate !== undefined) {
|
|
153
151
|
localVarQueryParameter['startDate'] = startDate;
|
|
154
152
|
}
|
|
@@ -181,12 +179,11 @@ export const TransactionsAndReportingApiAxiosParamCreator = function (configurat
|
|
|
181
179
|
|
|
182
180
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
183
181
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
184
|
-
|
|
185
182
|
requestBeforeHook({
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
queryParameters: localVarQueryParameter,
|
|
184
|
+
requestConfig: localVarRequestOptions,
|
|
185
|
+
path: localVarPath,
|
|
186
|
+
configuration
|
|
190
187
|
});
|
|
191
188
|
|
|
192
189
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -213,7 +210,7 @@ export const TransactionsAndReportingApiFp = function(configuration?: Configurat
|
|
|
213
210
|
* @throws {RequiredError}
|
|
214
211
|
*/
|
|
215
212
|
async getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UniversalActivity>>> {
|
|
216
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, options);
|
|
213
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, requestParameters.brokerageAuthorizations, options);
|
|
217
214
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
218
215
|
},
|
|
219
216
|
/**
|
|
@@ -302,6 +299,13 @@ export type TransactionsAndReportingApiGetActivitiesRequest = {
|
|
|
302
299
|
*/
|
|
303
300
|
readonly accounts?: string
|
|
304
301
|
|
|
302
|
+
/**
|
|
303
|
+
* Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
|
|
304
|
+
* @type {string}
|
|
305
|
+
* @memberof TransactionsAndReportingApiGetActivities
|
|
306
|
+
*/
|
|
307
|
+
readonly brokerageAuthorizations?: string
|
|
308
|
+
|
|
305
309
|
}
|
|
306
310
|
|
|
307
311
|
/**
|
package/common.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import { Configuration } from "./configuration";
|
|
16
16
|
import { RequiredError, RequestArgs } from "./base";
|
|
17
|
-
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
17
|
+
import axios, { AxiosInstance, AxiosResponse } from 'axios';
|
|
18
18
|
import { requestAfterHook } from "./requestAfterHook";
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -38,20 +38,40 @@ export const assertParamExists = function (functionName: string, paramName: stri
|
|
|
38
38
|
*
|
|
39
39
|
* @export
|
|
40
40
|
*/
|
|
41
|
-
export const setApiKeyToObject = async function (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
export const setApiKeyToObject = async function ({
|
|
42
|
+
object,
|
|
43
|
+
key,
|
|
44
|
+
type,
|
|
45
|
+
keyParamName,
|
|
46
|
+
configuration,
|
|
47
|
+
prefix
|
|
48
|
+
}: {
|
|
49
|
+
object: any
|
|
50
|
+
key?: string
|
|
51
|
+
type?: "Cookie"
|
|
52
|
+
keyParamName: string
|
|
53
|
+
configuration?: Configuration
|
|
54
|
+
prefix?: string
|
|
55
|
+
}) {
|
|
56
|
+
key = key ? key : keyParamName
|
|
57
|
+
let apiKey: string | null | undefined = null
|
|
58
|
+
if (configuration && configuration.apiKey) {
|
|
59
|
+
if (typeof configuration.apiKey === 'function')
|
|
60
|
+
apiKey = await configuration.apiKey(keyParamName)
|
|
61
|
+
else if (typeof configuration.apiKey === 'string')
|
|
62
|
+
apiKey = configuration.apiKey
|
|
63
|
+
else if (typeof configuration.apiKey === 'object') {
|
|
64
|
+
if (keyParamName in configuration.apiKey)
|
|
65
|
+
apiKey = configuration.apiKey[keyParamName]
|
|
66
|
+
} else
|
|
67
|
+
throw Error(
|
|
68
|
+
`Unexpected type ${typeof configuration.apiKey} for Configuration.apiKey`
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
if (!apiKey) return
|
|
72
|
+
object[key] = prefix !== undefined ? `${prefix}${apiKey}` : apiKey
|
|
73
|
+
if (type === "Cookie")
|
|
74
|
+
object[key] = `${keyParamName}=${object[key]}`
|
|
55
75
|
}
|
|
56
76
|
|
|
57
77
|
/**
|
package/configuration.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
type ApiKey =
|
|
16
17
|
| string
|
|
17
18
|
| ((keyParamName: string) => string)
|
|
@@ -108,8 +109,8 @@ export class Configuration {
|
|
|
108
109
|
this.password = param.password;
|
|
109
110
|
this.accessToken = param.accessToken;
|
|
110
111
|
this.basePath = param.basePath;
|
|
111
|
-
this.baseOptions = param.baseOptions;
|
|
112
|
-
this.userAgent = param.userAgent === undefined ? "Konfig/6.
|
|
112
|
+
this.baseOptions = param.baseOptions ?? {};
|
|
113
|
+
this.userAgent = param.userAgent === undefined ? "Konfig/6.3.0/typescript" : param.userAgent;
|
|
113
114
|
this.formDataCtor = param.formDataCtor;
|
|
114
115
|
}
|
|
115
116
|
|