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/dist/common.js CHANGED
@@ -83,31 +83,36 @@ exports.assertParamExists = assertParamExists;
83
83
  *
84
84
  * @export
85
85
  */
86
- var setApiKeyToObject = function (object, keyParamName, configuration) {
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 _a, _b;
89
- return __generator(this, function (_c) {
90
- switch (_c.label) {
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 === "function")) return [3 /*break*/, 2];
94
- _a = object;
95
- _b = keyParamName;
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
- _a[_b] = _c.sent();
100
+ _b[_c] = _d.sent();
99
101
  return [3 /*break*/, 3];
100
102
  case 2:
101
- if (typeof configuration.apiKey === "string")
102
- object[keyParamName] = configuration.apiKey;
103
- else if (typeof configuration.apiKey === "object") {
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[keyParamName] = configuration.apiKey[keyParamName];
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
- _c.label = 3;
110
- case 3: return [2 /*return*/];
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
  });
@@ -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.1.0/typescript" : param.userAgent;
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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "6.1.0",
3
+ "version": "6.2.0",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "repository": {