snaptrade-typescript-sdk 6.1.0 → 6.2.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 +2 -2
- package/api/account-information-api.ts +25 -25
- package/api/api-disclaimer-api.ts +4 -4
- package/api/api-status-api.ts +1 -1
- package/api/authentication-api.ts +16 -16
- package/api/connections-api.ts +10 -10
- package/api/error-logs-api.ts +4 -4
- package/api/options-api.ts +16 -16
- package/api/portfolio-management-api.ts +100 -100
- package/api/reference-data-api.ts +34 -34
- package/api/trading-api.ts +31 -31
- package/api/transactions-and-reporting-api.ts +7 -7
- package/common.ts +30 -15
- package/configuration.ts +1 -1
- package/dist/api/account-information-api.js +24 -24
- package/dist/api/api-disclaimer-api.js +3 -3
- package/dist/api/authentication-api.js +15 -15
- package/dist/api/connections-api.js +9 -9
- package/dist/api/error-logs-api.js +3 -3
- package/dist/api/options-api.js +15 -15
- package/dist/api/portfolio-management-api.js +99 -99
- package/dist/api/reference-data-api.js +33 -33
- package/dist/api/trading-api.js +30 -30
- package/dist/api/transactions-and-reporting-api.js +6 -6
- package/dist/common.d.ts +7 -1
- package/dist/common.js +19 -14
- package/dist/configuration.js +1 -1
- package/dist/models/account-order-record.d.ts +7 -0
- package/models/account-order-record.ts +9 -0
- package/package.json +1 -1
package/dist/common.js
CHANGED
|
@@ -83,31 +83,36 @@ exports.assertParamExists = assertParamExists;
|
|
|
83
83
|
*
|
|
84
84
|
* @export
|
|
85
85
|
*/
|
|
86
|
-
var setApiKeyToObject = function (
|
|
86
|
+
var setApiKeyToObject = function (_a) {
|
|
87
|
+
var object = _a.object, key = _a.key, type = _a.type, keyParamName = _a.keyParamName, configuration = _a.configuration;
|
|
87
88
|
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
-
var
|
|
89
|
-
return __generator(this, function (
|
|
90
|
-
switch (
|
|
89
|
+
var _b, _c;
|
|
90
|
+
return __generator(this, function (_d) {
|
|
91
|
+
switch (_d.label) {
|
|
91
92
|
case 0:
|
|
93
|
+
key = key ? key : keyParamName;
|
|
92
94
|
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 3];
|
|
93
|
-
if (!(typeof configuration.apiKey ===
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
|
|
96
|
+
_b = object;
|
|
97
|
+
_c = key;
|
|
96
98
|
return [4 /*yield*/, configuration.apiKey(keyParamName)];
|
|
97
99
|
case 1:
|
|
98
|
-
|
|
100
|
+
_b[_c] = _d.sent();
|
|
99
101
|
return [3 /*break*/, 3];
|
|
100
102
|
case 2:
|
|
101
|
-
if (typeof configuration.apiKey ===
|
|
102
|
-
object[
|
|
103
|
-
else if (typeof configuration.apiKey ===
|
|
103
|
+
if (typeof configuration.apiKey === 'string')
|
|
104
|
+
object[key] = configuration.apiKey;
|
|
105
|
+
else if (typeof configuration.apiKey === 'object') {
|
|
104
106
|
if (keyParamName in configuration.apiKey)
|
|
105
|
-
object[
|
|
107
|
+
object[key] = configuration.apiKey[keyParamName];
|
|
106
108
|
}
|
|
107
109
|
else
|
|
108
110
|
throw Error("Unexpected type ".concat(typeof configuration.apiKey, " for Configuration.apiKey"));
|
|
109
|
-
|
|
110
|
-
case 3:
|
|
111
|
+
_d.label = 3;
|
|
112
|
+
case 3:
|
|
113
|
+
if (type === "Cookie")
|
|
114
|
+
object[key] = "".concat(keyParamName, "=").concat(object[key]);
|
|
115
|
+
return [2 /*return*/];
|
|
111
116
|
}
|
|
112
117
|
});
|
|
113
118
|
});
|
package/dist/configuration.js
CHANGED
|
@@ -33,7 +33,7 @@ var Configuration = /** @class */ (function () {
|
|
|
33
33
|
this.accessToken = param.accessToken;
|
|
34
34
|
this.basePath = param.basePath;
|
|
35
35
|
this.baseOptions = param.baseOptions;
|
|
36
|
-
this.userAgent = param.userAgent === undefined ? "Konfig/6.
|
|
36
|
+
this.userAgent = param.userAgent === undefined ? "Konfig/6.2.0/typescript" : param.userAgent;
|
|
37
37
|
this.formDataCtor = param.formDataCtor;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { AccountOrderRecordStatus } from './account-order-record-status';
|
|
13
13
|
import { Action } from './action';
|
|
14
|
+
import { OptionsSymbol } from './options-symbol';
|
|
14
15
|
import { OrderType } from './order-type';
|
|
15
16
|
import { TimeInForce } from './time-in-force';
|
|
16
17
|
import { UniversalSymbol } from './universal-symbol';
|
|
@@ -45,6 +46,12 @@ export interface AccountOrderRecord {
|
|
|
45
46
|
* @memberof AccountOrderRecord
|
|
46
47
|
*/
|
|
47
48
|
'universal_symbol'?: UniversalSymbol;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {OptionsSymbol}
|
|
52
|
+
* @memberof AccountOrderRecord
|
|
53
|
+
*/
|
|
54
|
+
'option_symbol'?: OptionsSymbol;
|
|
48
55
|
/**
|
|
49
56
|
*
|
|
50
57
|
* @type {Action}
|
|
@@ -20,6 +20,9 @@ import { AccountOrderRecordStatus } from './account-order-record-status';
|
|
|
20
20
|
import { Action } from './action';
|
|
21
21
|
// May contain unused imports in some cases
|
|
22
22
|
// @ts-ignore
|
|
23
|
+
import { OptionsSymbol } from './options-symbol';
|
|
24
|
+
// May contain unused imports in some cases
|
|
25
|
+
// @ts-ignore
|
|
23
26
|
import { OrderType } from './order-type';
|
|
24
27
|
// May contain unused imports in some cases
|
|
25
28
|
// @ts-ignore
|
|
@@ -60,6 +63,12 @@ export interface AccountOrderRecord {
|
|
|
60
63
|
* @memberof AccountOrderRecord
|
|
61
64
|
*/
|
|
62
65
|
'universal_symbol'?: UniversalSymbol;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {OptionsSymbol}
|
|
69
|
+
* @memberof AccountOrderRecord
|
|
70
|
+
*/
|
|
71
|
+
'option_symbol'?: OptionsSymbol;
|
|
63
72
|
/**
|
|
64
73
|
*
|
|
65
74
|
* @type {Action}
|