@tradecafe/offer-service-sdk 0.0.26 → 0.0.27

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 (166) hide show
  1. package/.openapi-generator/FILES +49 -16
  2. package/api/automatedOffersApi.ts +13 -12
  3. package/api/futureBidsApi.ts +20 -18
  4. package/api/matchedOffersApi.ts +26 -24
  5. package/api/offersApi.ts +13 -12
  6. package/dist/api/apis.d.ts +20 -20
  7. package/dist/api/apis.js +56 -56
  8. package/dist/api/automatedOffersApi.d.ts +104 -103
  9. package/dist/api/automatedOffersApi.js +798 -798
  10. package/dist/api/automatedOffersApi.js.map +1 -1
  11. package/dist/api/futureBidsApi.d.ts +65 -63
  12. package/dist/api/futureBidsApi.js +455 -455
  13. package/dist/api/futureBidsApi.js.map +1 -1
  14. package/dist/api/healthApi.d.ts +32 -32
  15. package/dist/api/healthApi.js +174 -174
  16. package/dist/api/matchedOffersApi.d.ts +177 -175
  17. package/dist/api/matchedOffersApi.js +1401 -1401
  18. package/dist/api/matchedOffersApi.js.map +1 -1
  19. package/dist/api/offersApi.d.ts +184 -183
  20. package/dist/api/offersApi.js +1460 -1460
  21. package/dist/api/offersApi.js.map +1 -1
  22. package/dist/api.d.ts +2 -2
  23. package/dist/api.js +18 -18
  24. package/dist/model/addFutureBidDto.d.ts +17 -0
  25. package/dist/model/addFutureBidDto.js +36 -0
  26. package/dist/model/addFutureBidDto.js.map +1 -0
  27. package/dist/model/bidDto.d.ts +46 -0
  28. package/dist/model/bidDto.js +156 -0
  29. package/dist/model/bidDto.js.map +1 -0
  30. package/dist/model/bidDtoPacking.d.ts +15 -0
  31. package/dist/model/bidDtoPacking.js +26 -0
  32. package/dist/model/bidDtoPacking.js.map +1 -0
  33. package/dist/model/bidDtoWeight.d.ts +15 -0
  34. package/dist/model/bidDtoWeight.js +26 -0
  35. package/dist/model/bidDtoWeight.js.map +1 -0
  36. package/dist/model/bidNoteAttributesDto.d.ts +15 -0
  37. package/dist/model/bidNoteAttributesDto.js +26 -0
  38. package/dist/model/bidNoteAttributesDto.js.map +1 -0
  39. package/dist/model/bidNoteDto.d.ts +24 -0
  40. package/dist/model/bidNoteDto.js +61 -0
  41. package/dist/model/bidNoteDto.js.map +1 -0
  42. package/dist/model/bidNoteDtoAccount.d.ts +13 -0
  43. package/dist/model/bidNoteDtoAccount.js +15 -0
  44. package/dist/model/bidNoteDtoAccount.js.map +1 -0
  45. package/dist/model/bidNoteDtoAttributes.d.ts +15 -0
  46. package/dist/model/bidNoteDtoAttributes.js +26 -0
  47. package/dist/model/bidNoteDtoAttributes.js.map +1 -0
  48. package/dist/model/bidPackingDto.d.ts +15 -0
  49. package/dist/model/bidPackingDto.js +26 -0
  50. package/dist/model/bidPackingDto.js.map +1 -0
  51. package/dist/model/bidWeightDto.d.ts +15 -0
  52. package/dist/model/bidWeightDto.js +26 -0
  53. package/dist/model/bidWeightDto.js.map +1 -0
  54. package/dist/model/createAutomatedOfferDto.d.ts +107 -0
  55. package/dist/model/createAutomatedOfferDto.js +352 -0
  56. package/dist/model/createAutomatedOfferDto.js.map +1 -0
  57. package/dist/model/createMatchedOfferDto.d.ts +84 -0
  58. package/dist/model/createMatchedOfferDto.js +311 -0
  59. package/dist/model/createMatchedOfferDto.js.map +1 -0
  60. package/dist/model/createMatchedOfferDtoBid.d.ts +46 -0
  61. package/dist/model/createMatchedOfferDtoBid.js +156 -0
  62. package/dist/model/createMatchedOfferDtoBid.js.map +1 -0
  63. package/dist/model/createOfferDto.d.ts +97 -0
  64. package/dist/model/createOfferDto.js +333 -0
  65. package/dist/model/createOfferDto.js.map +1 -0
  66. package/dist/model/createOfferDtoAttributes.d.ts +49 -0
  67. package/dist/model/createOfferDtoAttributes.js +155 -0
  68. package/dist/model/createOfferDtoAttributes.js.map +1 -0
  69. package/dist/model/createOfferDtoFormula.d.ts +19 -0
  70. package/dist/model/createOfferDtoFormula.js +41 -0
  71. package/dist/model/createOfferDtoFormula.js.map +1 -0
  72. package/dist/model/createOfferDtoPacking.d.ts +17 -0
  73. package/dist/model/createOfferDtoPacking.js +36 -0
  74. package/dist/model/createOfferDtoPacking.js.map +1 -0
  75. package/dist/model/createOfferDtoWeight.d.ts +15 -0
  76. package/dist/model/createOfferDtoWeight.js +26 -0
  77. package/dist/model/createOfferDtoWeight.js.map +1 -0
  78. package/dist/model/dealProductBatchDto.d.ts +20 -0
  79. package/dist/model/dealProductBatchDto.js +51 -0
  80. package/dist/model/dealProductBatchDto.js.map +1 -0
  81. package/dist/model/formulaDto.d.ts +19 -0
  82. package/dist/model/formulaDto.js +41 -0
  83. package/dist/model/formulaDto.js.map +1 -0
  84. package/dist/model/formulaLineDto.d.ts +17 -0
  85. package/dist/model/formulaLineDto.js +36 -0
  86. package/dist/model/formulaLineDto.js.map +1 -0
  87. package/dist/model/generalAddressDto.d.ts +19 -0
  88. package/dist/model/generalAddressDto.js +46 -0
  89. package/dist/model/generalAddressDto.js.map +1 -0
  90. package/dist/model/healthControllerPing200Response.d.ts +24 -24
  91. package/dist/model/healthControllerPing200Response.js +35 -35
  92. package/dist/model/healthControllerPing200ResponseInfoValue.d.ts +10 -10
  93. package/dist/model/healthControllerPing200ResponseInfoValue.js +36 -36
  94. package/dist/model/healthControllerPing503Response.d.ts +24 -24
  95. package/dist/model/healthControllerPing503Response.js +35 -35
  96. package/dist/model/models.d.ts +82 -49
  97. package/dist/model/models.js +340 -231
  98. package/dist/model/models.js.map +1 -1
  99. package/dist/model/offerAttributesDto.d.ts +49 -0
  100. package/dist/model/offerAttributesDto.js +155 -0
  101. package/dist/model/offerAttributesDto.js.map +1 -0
  102. package/dist/model/offerAttributesDtoEstablishment.d.ts +19 -0
  103. package/dist/model/offerAttributesDtoEstablishment.js +46 -0
  104. package/dist/model/offerAttributesDtoEstablishment.js.map +1 -0
  105. package/dist/model/packing.d.ts +17 -0
  106. package/dist/model/packing.js +36 -0
  107. package/dist/model/packing.js.map +1 -0
  108. package/dist/model/pinActionDto.d.ts +14 -0
  109. package/dist/model/pinActionDto.js +21 -0
  110. package/dist/model/pinActionDto.js.map +1 -0
  111. package/dist/model/relistingConfigDto.d.ts +17 -0
  112. package/dist/model/relistingConfigDto.js +36 -0
  113. package/dist/model/relistingConfigDto.js.map +1 -0
  114. package/dist/model/relistingDetailDto.d.ts +31 -0
  115. package/dist/model/relistingDetailDto.js +63 -0
  116. package/dist/model/relistingDetailDto.js.map +1 -0
  117. package/dist/model/relistingDetailDtoRandomConfig.d.ts +19 -0
  118. package/dist/model/relistingDetailDtoRandomConfig.js +46 -0
  119. package/dist/model/relistingDetailDtoRandomConfig.js.map +1 -0
  120. package/dist/model/relistingRandomConfigDto.d.ts +19 -0
  121. package/dist/model/relistingRandomConfigDto.js +46 -0
  122. package/dist/model/relistingRandomConfigDto.js.map +1 -0
  123. package/dist/model/updateFutureBidDto.d.ts +17 -0
  124. package/dist/model/updateFutureBidDto.js +36 -0
  125. package/dist/model/updateFutureBidDto.js.map +1 -0
  126. package/dist/model/userPin.d.ts +15 -0
  127. package/dist/model/userPin.js +26 -0
  128. package/dist/model/userPin.js.map +1 -0
  129. package/dist/model/weight.d.ts +15 -0
  130. package/dist/model/weight.js +26 -0
  131. package/dist/model/weight.js.map +1 -0
  132. package/model/addFutureBidDto.ts +61 -0
  133. package/model/bidDto.ts +270 -0
  134. package/model/bidDtoPacking.ts +47 -0
  135. package/model/bidDtoWeight.ts +47 -0
  136. package/model/bidNoteAttributesDto.ts +43 -0
  137. package/model/bidNoteDto.ts +102 -0
  138. package/model/bidNoteDtoAccount.ts +29 -0
  139. package/model/bidNoteDtoAttributes.ts +47 -0
  140. package/model/bidPackingDto.ts +43 -0
  141. package/model/bidWeightDto.ts +43 -0
  142. package/model/createAutomatedOfferDto.ts +579 -0
  143. package/model/createMatchedOfferDto.ts +541 -0
  144. package/model/createMatchedOfferDtoBid.ts +274 -0
  145. package/model/createOfferDto.ts +553 -0
  146. package/model/createOfferDtoAttributes.ts +270 -0
  147. package/model/createOfferDtoFormula.ts +75 -0
  148. package/model/createOfferDtoPacking.ts +65 -0
  149. package/model/createOfferDtoWeight.ts +47 -0
  150. package/model/dealProductBatchDto.ts +88 -0
  151. package/model/formulaDto.ts +71 -0
  152. package/model/formulaLineDto.ts +61 -0
  153. package/model/generalAddressDto.ts +79 -0
  154. package/model/models.ts +108 -0
  155. package/model/offerAttributesDto.ts +266 -0
  156. package/model/offerAttributesDtoEstablishment.ts +83 -0
  157. package/model/packing.ts +61 -0
  158. package/model/pinActionDto.ts +34 -0
  159. package/model/relistingConfigDto.ts +61 -0
  160. package/model/relistingDetailDto.ts +96 -0
  161. package/model/relistingDetailDtoRandomConfig.ts +83 -0
  162. package/model/relistingRandomConfigDto.ts +79 -0
  163. package/model/updateFutureBidDto.ts +61 -0
  164. package/model/userPin.ts +43 -0
  165. package/model/weight.ts +43 -0
  166. package/package.json +1 -1
@@ -1,456 +1,456 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.FutureBidsApi = exports.FutureBidsApiApiKeys = void 0;
43
- var request_1 = __importDefault(require("request"));
44
- var models_1 = require("../model/models");
45
- var apis_1 = require("./apis");
46
- var defaultBasePath = 'http://localhost';
47
- var FutureBidsApiApiKeys;
48
- (function (FutureBidsApiApiKeys) {
49
- })(FutureBidsApiApiKeys = exports.FutureBidsApiApiKeys || (exports.FutureBidsApiApiKeys = {}));
50
- var FutureBidsApi = (function () {
51
- function FutureBidsApi(basePathOrUsername, password, basePath) {
52
- this._basePath = defaultBasePath;
53
- this._defaultHeaders = {};
54
- this._useQuerystring = false;
55
- this.authentications = {
56
- 'default': new models_1.VoidAuth(),
57
- };
58
- this.interceptors = [];
59
- if (password) {
60
- if (basePath) {
61
- this.basePath = basePath;
62
- }
63
- }
64
- else {
65
- if (basePathOrUsername) {
66
- this.basePath = basePathOrUsername;
67
- }
68
- }
69
- }
70
- Object.defineProperty(FutureBidsApi.prototype, "useQuerystring", {
71
- set: function (value) {
72
- this._useQuerystring = value;
73
- },
74
- enumerable: false,
75
- configurable: true
76
- });
77
- Object.defineProperty(FutureBidsApi.prototype, "basePath", {
78
- get: function () {
79
- return this._basePath;
80
- },
81
- set: function (basePath) {
82
- this._basePath = basePath;
83
- },
84
- enumerable: false,
85
- configurable: true
86
- });
87
- Object.defineProperty(FutureBidsApi.prototype, "defaultHeaders", {
88
- get: function () {
89
- return this._defaultHeaders;
90
- },
91
- set: function (defaultHeaders) {
92
- this._defaultHeaders = defaultHeaders;
93
- },
94
- enumerable: false,
95
- configurable: true
96
- });
97
- FutureBidsApi.prototype.setDefaultAuthentication = function (auth) {
98
- this.authentications.default = auth;
99
- };
100
- FutureBidsApi.prototype.setApiKey = function (key, value) {
101
- this.authentications[FutureBidsApiApiKeys[key]].apiKey = value;
102
- };
103
- FutureBidsApi.prototype.addInterceptor = function (interceptor) {
104
- this.interceptors.push(interceptor);
105
- };
106
- FutureBidsApi.prototype.futureBidsControllerAddfuturebid = function (matchedOfferId, userId, account, body, options) {
107
- if (options === void 0) { options = { headers: {} }; }
108
- return __awaiter(this, void 0, void 0, function () {
109
- var localVarPath, localVarQueryParameters, localVarHeaderParams, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_1, _i, _a, interceptor;
110
- var _this = this;
111
- return __generator(this, function (_b) {
112
- localVarPath = this.basePath + '/future-bids/{account}/{matchedOfferId}/{userId}'
113
- .replace('{' + 'matchedOfferId' + '}', encodeURIComponent(String(matchedOfferId)))
114
- .replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
115
- .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
116
- localVarQueryParameters = {};
117
- localVarHeaderParams = Object.assign({}, this._defaultHeaders);
118
- localVarFormParams = {};
119
- if (matchedOfferId === null || matchedOfferId === undefined) {
120
- throw new Error('Required parameter matchedOfferId was null or undefined when calling futureBidsControllerAddfuturebid.');
121
- }
122
- if (userId === null || userId === undefined) {
123
- throw new Error('Required parameter userId was null or undefined when calling futureBidsControllerAddfuturebid.');
124
- }
125
- if (account === null || account === undefined) {
126
- throw new Error('Required parameter account was null or undefined when calling futureBidsControllerAddfuturebid.');
127
- }
128
- if (body === null || body === undefined) {
129
- throw new Error('Required parameter body was null or undefined when calling futureBidsControllerAddfuturebid.');
130
- }
131
- Object.assign(localVarHeaderParams, options.headers);
132
- localVarUseFormData = false;
133
- localVarRequestOptions = {
134
- method: 'POST',
135
- qs: localVarQueryParameters,
136
- headers: localVarHeaderParams,
137
- uri: localVarPath,
138
- useQuerystring: this._useQuerystring,
139
- json: true,
140
- body: models_1.ObjectSerializer.serialize(body, "object")
141
- };
142
- authenticationPromise = Promise.resolve();
143
- authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
144
- interceptorPromise = authenticationPromise;
145
- _loop_1 = function (interceptor) {
146
- interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
147
- };
148
- for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
149
- interceptor = _a[_i];
150
- _loop_1(interceptor);
151
- }
152
- return [2, interceptorPromise.then(function () {
153
- if (Object.keys(localVarFormParams).length) {
154
- if (localVarUseFormData) {
155
- localVarRequestOptions.formData = localVarFormParams;
156
- }
157
- else {
158
- localVarRequestOptions.form = localVarFormParams;
159
- }
160
- }
161
- return new Promise(function (resolve, reject) {
162
- (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
163
- if (error) {
164
- reject(error);
165
- }
166
- else {
167
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
168
- resolve({ response: response, body: body });
169
- }
170
- else {
171
- reject(new apis_1.HttpError(response, body, response.statusCode));
172
- }
173
- }
174
- });
175
- });
176
- })];
177
- });
178
- });
179
- };
180
- FutureBidsApi.prototype.futureBidsControllerFindall = function (account, body, skip, limit, sort, options) {
181
- if (options === void 0) { options = { headers: {} }; }
182
- return __awaiter(this, void 0, void 0, function () {
183
- var localVarPath, localVarQueryParameters, localVarHeaderParams, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_2, _i, _a, interceptor;
184
- var _this = this;
185
- return __generator(this, function (_b) {
186
- localVarPath = this.basePath + '/future-bids/{account}'
187
- .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
188
- localVarQueryParameters = {};
189
- localVarHeaderParams = Object.assign({}, this._defaultHeaders);
190
- localVarFormParams = {};
191
- if (account === null || account === undefined) {
192
- throw new Error('Required parameter account was null or undefined when calling futureBidsControllerFindall.');
193
- }
194
- if (body === null || body === undefined) {
195
- throw new Error('Required parameter body was null or undefined when calling futureBidsControllerFindall.');
196
- }
197
- if (skip !== undefined) {
198
- localVarQueryParameters['skip'] = models_1.ObjectSerializer.serialize(skip, "number");
199
- }
200
- if (limit !== undefined) {
201
- localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
202
- }
203
- if (sort !== undefined) {
204
- localVarQueryParameters['sort'] = models_1.ObjectSerializer.serialize(sort, "string");
205
- }
206
- Object.assign(localVarHeaderParams, options.headers);
207
- localVarUseFormData = false;
208
- localVarRequestOptions = {
209
- method: 'POST',
210
- qs: localVarQueryParameters,
211
- headers: localVarHeaderParams,
212
- uri: localVarPath,
213
- useQuerystring: this._useQuerystring,
214
- json: true,
215
- body: models_1.ObjectSerializer.serialize(body, "object")
216
- };
217
- authenticationPromise = Promise.resolve();
218
- authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
219
- interceptorPromise = authenticationPromise;
220
- _loop_2 = function (interceptor) {
221
- interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
222
- };
223
- for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
224
- interceptor = _a[_i];
225
- _loop_2(interceptor);
226
- }
227
- return [2, interceptorPromise.then(function () {
228
- if (Object.keys(localVarFormParams).length) {
229
- if (localVarUseFormData) {
230
- localVarRequestOptions.formData = localVarFormParams;
231
- }
232
- else {
233
- localVarRequestOptions.form = localVarFormParams;
234
- }
235
- }
236
- return new Promise(function (resolve, reject) {
237
- (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
238
- if (error) {
239
- reject(error);
240
- }
241
- else {
242
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
243
- resolve({ response: response, body: body });
244
- }
245
- else {
246
- reject(new apis_1.HttpError(response, body, response.statusCode));
247
- }
248
- }
249
- });
250
- });
251
- })];
252
- });
253
- });
254
- };
255
- FutureBidsApi.prototype.futureBidsControllerGetstats = function (account, options) {
256
- if (options === void 0) { options = { headers: {} }; }
257
- return __awaiter(this, void 0, void 0, function () {
258
- var localVarPath, localVarQueryParameters, localVarHeaderParams, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_3, _i, _a, interceptor;
259
- var _this = this;
260
- return __generator(this, function (_b) {
261
- localVarPath = this.basePath + '/future-bids/{account}/statistics'
262
- .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
263
- localVarQueryParameters = {};
264
- localVarHeaderParams = Object.assign({}, this._defaultHeaders);
265
- localVarFormParams = {};
266
- if (account === null || account === undefined) {
267
- throw new Error('Required parameter account was null or undefined when calling futureBidsControllerGetstats.');
268
- }
269
- Object.assign(localVarHeaderParams, options.headers);
270
- localVarUseFormData = false;
271
- localVarRequestOptions = {
272
- method: 'POST',
273
- qs: localVarQueryParameters,
274
- headers: localVarHeaderParams,
275
- uri: localVarPath,
276
- useQuerystring: this._useQuerystring,
277
- json: true,
278
- };
279
- authenticationPromise = Promise.resolve();
280
- authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
281
- interceptorPromise = authenticationPromise;
282
- _loop_3 = function (interceptor) {
283
- interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
284
- };
285
- for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
286
- interceptor = _a[_i];
287
- _loop_3(interceptor);
288
- }
289
- return [2, interceptorPromise.then(function () {
290
- if (Object.keys(localVarFormParams).length) {
291
- if (localVarUseFormData) {
292
- localVarRequestOptions.formData = localVarFormParams;
293
- }
294
- else {
295
- localVarRequestOptions.form = localVarFormParams;
296
- }
297
- }
298
- return new Promise(function (resolve, reject) {
299
- (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
300
- if (error) {
301
- reject(error);
302
- }
303
- else {
304
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
305
- resolve({ response: response, body: body });
306
- }
307
- else {
308
- reject(new apis_1.HttpError(response, body, response.statusCode));
309
- }
310
- }
311
- });
312
- });
313
- })];
314
- });
315
- });
316
- };
317
- FutureBidsApi.prototype.futureBidsControllerRemovefuturebid = function (id, account, options) {
318
- if (options === void 0) { options = { headers: {} }; }
319
- return __awaiter(this, void 0, void 0, function () {
320
- var localVarPath, localVarQueryParameters, localVarHeaderParams, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_4, _i, _a, interceptor;
321
- var _this = this;
322
- return __generator(this, function (_b) {
323
- localVarPath = this.basePath + '/future-bids/{account}/{id}'
324
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)))
325
- .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
326
- localVarQueryParameters = {};
327
- localVarHeaderParams = Object.assign({}, this._defaultHeaders);
328
- localVarFormParams = {};
329
- if (id === null || id === undefined) {
330
- throw new Error('Required parameter id was null or undefined when calling futureBidsControllerRemovefuturebid.');
331
- }
332
- if (account === null || account === undefined) {
333
- throw new Error('Required parameter account was null or undefined when calling futureBidsControllerRemovefuturebid.');
334
- }
335
- Object.assign(localVarHeaderParams, options.headers);
336
- localVarUseFormData = false;
337
- localVarRequestOptions = {
338
- method: 'DELETE',
339
- qs: localVarQueryParameters,
340
- headers: localVarHeaderParams,
341
- uri: localVarPath,
342
- useQuerystring: this._useQuerystring,
343
- json: true,
344
- };
345
- authenticationPromise = Promise.resolve();
346
- authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
347
- interceptorPromise = authenticationPromise;
348
- _loop_4 = function (interceptor) {
349
- interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
350
- };
351
- for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
352
- interceptor = _a[_i];
353
- _loop_4(interceptor);
354
- }
355
- return [2, interceptorPromise.then(function () {
356
- if (Object.keys(localVarFormParams).length) {
357
- if (localVarUseFormData) {
358
- localVarRequestOptions.formData = localVarFormParams;
359
- }
360
- else {
361
- localVarRequestOptions.form = localVarFormParams;
362
- }
363
- }
364
- return new Promise(function (resolve, reject) {
365
- (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
366
- if (error) {
367
- reject(error);
368
- }
369
- else {
370
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
371
- resolve({ response: response, body: body });
372
- }
373
- else {
374
- reject(new apis_1.HttpError(response, body, response.statusCode));
375
- }
376
- }
377
- });
378
- });
379
- })];
380
- });
381
- });
382
- };
383
- FutureBidsApi.prototype.futureBidsControllerUpdate = function (id, account, body, options) {
384
- if (options === void 0) { options = { headers: {} }; }
385
- return __awaiter(this, void 0, void 0, function () {
386
- var localVarPath, localVarQueryParameters, localVarHeaderParams, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_5, _i, _a, interceptor;
387
- var _this = this;
388
- return __generator(this, function (_b) {
389
- localVarPath = this.basePath + '/future-bids/{account}/{id}'
390
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)))
391
- .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
392
- localVarQueryParameters = {};
393
- localVarHeaderParams = Object.assign({}, this._defaultHeaders);
394
- localVarFormParams = {};
395
- if (id === null || id === undefined) {
396
- throw new Error('Required parameter id was null or undefined when calling futureBidsControllerUpdate.');
397
- }
398
- if (account === null || account === undefined) {
399
- throw new Error('Required parameter account was null or undefined when calling futureBidsControllerUpdate.');
400
- }
401
- if (body === null || body === undefined) {
402
- throw new Error('Required parameter body was null or undefined when calling futureBidsControllerUpdate.');
403
- }
404
- Object.assign(localVarHeaderParams, options.headers);
405
- localVarUseFormData = false;
406
- localVarRequestOptions = {
407
- method: 'PUT',
408
- qs: localVarQueryParameters,
409
- headers: localVarHeaderParams,
410
- uri: localVarPath,
411
- useQuerystring: this._useQuerystring,
412
- json: true,
413
- body: models_1.ObjectSerializer.serialize(body, "object")
414
- };
415
- authenticationPromise = Promise.resolve();
416
- authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
417
- interceptorPromise = authenticationPromise;
418
- _loop_5 = function (interceptor) {
419
- interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
420
- };
421
- for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
422
- interceptor = _a[_i];
423
- _loop_5(interceptor);
424
- }
425
- return [2, interceptorPromise.then(function () {
426
- if (Object.keys(localVarFormParams).length) {
427
- if (localVarUseFormData) {
428
- localVarRequestOptions.formData = localVarFormParams;
429
- }
430
- else {
431
- localVarRequestOptions.form = localVarFormParams;
432
- }
433
- }
434
- return new Promise(function (resolve, reject) {
435
- (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
436
- if (error) {
437
- reject(error);
438
- }
439
- else {
440
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
441
- resolve({ response: response, body: body });
442
- }
443
- else {
444
- reject(new apis_1.HttpError(response, body, response.statusCode));
445
- }
446
- }
447
- });
448
- });
449
- })];
450
- });
451
- });
452
- };
453
- return FutureBidsApi;
454
- }());
455
- exports.FutureBidsApi = FutureBidsApi;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.FutureBidsApi = exports.FutureBidsApiApiKeys = void 0;
43
+ var request_1 = __importDefault(require("request"));
44
+ var models_1 = require("../model/models");
45
+ var apis_1 = require("./apis");
46
+ var defaultBasePath = 'http://localhost';
47
+ var FutureBidsApiApiKeys;
48
+ (function (FutureBidsApiApiKeys) {
49
+ })(FutureBidsApiApiKeys = exports.FutureBidsApiApiKeys || (exports.FutureBidsApiApiKeys = {}));
50
+ var FutureBidsApi = (function () {
51
+ function FutureBidsApi(basePathOrUsername, password, basePath) {
52
+ this._basePath = defaultBasePath;
53
+ this._defaultHeaders = {};
54
+ this._useQuerystring = false;
55
+ this.authentications = {
56
+ 'default': new models_1.VoidAuth(),
57
+ };
58
+ this.interceptors = [];
59
+ if (password) {
60
+ if (basePath) {
61
+ this.basePath = basePath;
62
+ }
63
+ }
64
+ else {
65
+ if (basePathOrUsername) {
66
+ this.basePath = basePathOrUsername;
67
+ }
68
+ }
69
+ }
70
+ Object.defineProperty(FutureBidsApi.prototype, "useQuerystring", {
71
+ set: function (value) {
72
+ this._useQuerystring = value;
73
+ },
74
+ enumerable: false,
75
+ configurable: true
76
+ });
77
+ Object.defineProperty(FutureBidsApi.prototype, "basePath", {
78
+ get: function () {
79
+ return this._basePath;
80
+ },
81
+ set: function (basePath) {
82
+ this._basePath = basePath;
83
+ },
84
+ enumerable: false,
85
+ configurable: true
86
+ });
87
+ Object.defineProperty(FutureBidsApi.prototype, "defaultHeaders", {
88
+ get: function () {
89
+ return this._defaultHeaders;
90
+ },
91
+ set: function (defaultHeaders) {
92
+ this._defaultHeaders = defaultHeaders;
93
+ },
94
+ enumerable: false,
95
+ configurable: true
96
+ });
97
+ FutureBidsApi.prototype.setDefaultAuthentication = function (auth) {
98
+ this.authentications.default = auth;
99
+ };
100
+ FutureBidsApi.prototype.setApiKey = function (key, value) {
101
+ this.authentications[FutureBidsApiApiKeys[key]].apiKey = value;
102
+ };
103
+ FutureBidsApi.prototype.addInterceptor = function (interceptor) {
104
+ this.interceptors.push(interceptor);
105
+ };
106
+ FutureBidsApi.prototype.futureBidsControllerAddfuturebid = function (matchedOfferId, userId, account, addFutureBidDto, options) {
107
+ if (options === void 0) { options = { headers: {} }; }
108
+ return __awaiter(this, void 0, void 0, function () {
109
+ var localVarPath, localVarQueryParameters, localVarHeaderParams, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_1, _i, _a, interceptor;
110
+ var _this = this;
111
+ return __generator(this, function (_b) {
112
+ localVarPath = this.basePath + '/future-bids/{account}/{matchedOfferId}/{userId}'
113
+ .replace('{' + 'matchedOfferId' + '}', encodeURIComponent(String(matchedOfferId)))
114
+ .replace('{' + 'userId' + '}', encodeURIComponent(String(userId)))
115
+ .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
116
+ localVarQueryParameters = {};
117
+ localVarHeaderParams = Object.assign({}, this._defaultHeaders);
118
+ localVarFormParams = {};
119
+ if (matchedOfferId === null || matchedOfferId === undefined) {
120
+ throw new Error('Required parameter matchedOfferId was null or undefined when calling futureBidsControllerAddfuturebid.');
121
+ }
122
+ if (userId === null || userId === undefined) {
123
+ throw new Error('Required parameter userId was null or undefined when calling futureBidsControllerAddfuturebid.');
124
+ }
125
+ if (account === null || account === undefined) {
126
+ throw new Error('Required parameter account was null or undefined when calling futureBidsControllerAddfuturebid.');
127
+ }
128
+ if (addFutureBidDto === null || addFutureBidDto === undefined) {
129
+ throw new Error('Required parameter addFutureBidDto was null or undefined when calling futureBidsControllerAddfuturebid.');
130
+ }
131
+ Object.assign(localVarHeaderParams, options.headers);
132
+ localVarUseFormData = false;
133
+ localVarRequestOptions = {
134
+ method: 'POST',
135
+ qs: localVarQueryParameters,
136
+ headers: localVarHeaderParams,
137
+ uri: localVarPath,
138
+ useQuerystring: this._useQuerystring,
139
+ json: true,
140
+ body: models_1.ObjectSerializer.serialize(addFutureBidDto, "AddFutureBidDto")
141
+ };
142
+ authenticationPromise = Promise.resolve();
143
+ authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
144
+ interceptorPromise = authenticationPromise;
145
+ _loop_1 = function (interceptor) {
146
+ interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
147
+ };
148
+ for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
149
+ interceptor = _a[_i];
150
+ _loop_1(interceptor);
151
+ }
152
+ return [2, interceptorPromise.then(function () {
153
+ if (Object.keys(localVarFormParams).length) {
154
+ if (localVarUseFormData) {
155
+ localVarRequestOptions.formData = localVarFormParams;
156
+ }
157
+ else {
158
+ localVarRequestOptions.form = localVarFormParams;
159
+ }
160
+ }
161
+ return new Promise(function (resolve, reject) {
162
+ (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
163
+ if (error) {
164
+ reject(error);
165
+ }
166
+ else {
167
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
168
+ resolve({ response: response, body: body });
169
+ }
170
+ else {
171
+ reject(new apis_1.HttpError(response, body, response.statusCode));
172
+ }
173
+ }
174
+ });
175
+ });
176
+ })];
177
+ });
178
+ });
179
+ };
180
+ FutureBidsApi.prototype.futureBidsControllerFindall = function (account, addFutureBidDto, skip, limit, sort, options) {
181
+ if (options === void 0) { options = { headers: {} }; }
182
+ return __awaiter(this, void 0, void 0, function () {
183
+ var localVarPath, localVarQueryParameters, localVarHeaderParams, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_2, _i, _a, interceptor;
184
+ var _this = this;
185
+ return __generator(this, function (_b) {
186
+ localVarPath = this.basePath + '/future-bids/{account}'
187
+ .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
188
+ localVarQueryParameters = {};
189
+ localVarHeaderParams = Object.assign({}, this._defaultHeaders);
190
+ localVarFormParams = {};
191
+ if (account === null || account === undefined) {
192
+ throw new Error('Required parameter account was null or undefined when calling futureBidsControllerFindall.');
193
+ }
194
+ if (addFutureBidDto === null || addFutureBidDto === undefined) {
195
+ throw new Error('Required parameter addFutureBidDto was null or undefined when calling futureBidsControllerFindall.');
196
+ }
197
+ if (skip !== undefined) {
198
+ localVarQueryParameters['skip'] = models_1.ObjectSerializer.serialize(skip, "number");
199
+ }
200
+ if (limit !== undefined) {
201
+ localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, "number");
202
+ }
203
+ if (sort !== undefined) {
204
+ localVarQueryParameters['sort'] = models_1.ObjectSerializer.serialize(sort, "string");
205
+ }
206
+ Object.assign(localVarHeaderParams, options.headers);
207
+ localVarUseFormData = false;
208
+ localVarRequestOptions = {
209
+ method: 'POST',
210
+ qs: localVarQueryParameters,
211
+ headers: localVarHeaderParams,
212
+ uri: localVarPath,
213
+ useQuerystring: this._useQuerystring,
214
+ json: true,
215
+ body: models_1.ObjectSerializer.serialize(addFutureBidDto, "AddFutureBidDto")
216
+ };
217
+ authenticationPromise = Promise.resolve();
218
+ authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
219
+ interceptorPromise = authenticationPromise;
220
+ _loop_2 = function (interceptor) {
221
+ interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
222
+ };
223
+ for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
224
+ interceptor = _a[_i];
225
+ _loop_2(interceptor);
226
+ }
227
+ return [2, interceptorPromise.then(function () {
228
+ if (Object.keys(localVarFormParams).length) {
229
+ if (localVarUseFormData) {
230
+ localVarRequestOptions.formData = localVarFormParams;
231
+ }
232
+ else {
233
+ localVarRequestOptions.form = localVarFormParams;
234
+ }
235
+ }
236
+ return new Promise(function (resolve, reject) {
237
+ (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
238
+ if (error) {
239
+ reject(error);
240
+ }
241
+ else {
242
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
243
+ resolve({ response: response, body: body });
244
+ }
245
+ else {
246
+ reject(new apis_1.HttpError(response, body, response.statusCode));
247
+ }
248
+ }
249
+ });
250
+ });
251
+ })];
252
+ });
253
+ });
254
+ };
255
+ FutureBidsApi.prototype.futureBidsControllerGetstats = function (account, options) {
256
+ if (options === void 0) { options = { headers: {} }; }
257
+ return __awaiter(this, void 0, void 0, function () {
258
+ var localVarPath, localVarQueryParameters, localVarHeaderParams, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_3, _i, _a, interceptor;
259
+ var _this = this;
260
+ return __generator(this, function (_b) {
261
+ localVarPath = this.basePath + '/future-bids/{account}/statistics'
262
+ .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
263
+ localVarQueryParameters = {};
264
+ localVarHeaderParams = Object.assign({}, this._defaultHeaders);
265
+ localVarFormParams = {};
266
+ if (account === null || account === undefined) {
267
+ throw new Error('Required parameter account was null or undefined when calling futureBidsControllerGetstats.');
268
+ }
269
+ Object.assign(localVarHeaderParams, options.headers);
270
+ localVarUseFormData = false;
271
+ localVarRequestOptions = {
272
+ method: 'POST',
273
+ qs: localVarQueryParameters,
274
+ headers: localVarHeaderParams,
275
+ uri: localVarPath,
276
+ useQuerystring: this._useQuerystring,
277
+ json: true,
278
+ };
279
+ authenticationPromise = Promise.resolve();
280
+ authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
281
+ interceptorPromise = authenticationPromise;
282
+ _loop_3 = function (interceptor) {
283
+ interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
284
+ };
285
+ for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
286
+ interceptor = _a[_i];
287
+ _loop_3(interceptor);
288
+ }
289
+ return [2, interceptorPromise.then(function () {
290
+ if (Object.keys(localVarFormParams).length) {
291
+ if (localVarUseFormData) {
292
+ localVarRequestOptions.formData = localVarFormParams;
293
+ }
294
+ else {
295
+ localVarRequestOptions.form = localVarFormParams;
296
+ }
297
+ }
298
+ return new Promise(function (resolve, reject) {
299
+ (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
300
+ if (error) {
301
+ reject(error);
302
+ }
303
+ else {
304
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
305
+ resolve({ response: response, body: body });
306
+ }
307
+ else {
308
+ reject(new apis_1.HttpError(response, body, response.statusCode));
309
+ }
310
+ }
311
+ });
312
+ });
313
+ })];
314
+ });
315
+ });
316
+ };
317
+ FutureBidsApi.prototype.futureBidsControllerRemovefuturebid = function (id, account, options) {
318
+ if (options === void 0) { options = { headers: {} }; }
319
+ return __awaiter(this, void 0, void 0, function () {
320
+ var localVarPath, localVarQueryParameters, localVarHeaderParams, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_4, _i, _a, interceptor;
321
+ var _this = this;
322
+ return __generator(this, function (_b) {
323
+ localVarPath = this.basePath + '/future-bids/{account}/{id}'
324
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)))
325
+ .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
326
+ localVarQueryParameters = {};
327
+ localVarHeaderParams = Object.assign({}, this._defaultHeaders);
328
+ localVarFormParams = {};
329
+ if (id === null || id === undefined) {
330
+ throw new Error('Required parameter id was null or undefined when calling futureBidsControllerRemovefuturebid.');
331
+ }
332
+ if (account === null || account === undefined) {
333
+ throw new Error('Required parameter account was null or undefined when calling futureBidsControllerRemovefuturebid.');
334
+ }
335
+ Object.assign(localVarHeaderParams, options.headers);
336
+ localVarUseFormData = false;
337
+ localVarRequestOptions = {
338
+ method: 'DELETE',
339
+ qs: localVarQueryParameters,
340
+ headers: localVarHeaderParams,
341
+ uri: localVarPath,
342
+ useQuerystring: this._useQuerystring,
343
+ json: true,
344
+ };
345
+ authenticationPromise = Promise.resolve();
346
+ authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
347
+ interceptorPromise = authenticationPromise;
348
+ _loop_4 = function (interceptor) {
349
+ interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
350
+ };
351
+ for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
352
+ interceptor = _a[_i];
353
+ _loop_4(interceptor);
354
+ }
355
+ return [2, interceptorPromise.then(function () {
356
+ if (Object.keys(localVarFormParams).length) {
357
+ if (localVarUseFormData) {
358
+ localVarRequestOptions.formData = localVarFormParams;
359
+ }
360
+ else {
361
+ localVarRequestOptions.form = localVarFormParams;
362
+ }
363
+ }
364
+ return new Promise(function (resolve, reject) {
365
+ (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
366
+ if (error) {
367
+ reject(error);
368
+ }
369
+ else {
370
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
371
+ resolve({ response: response, body: body });
372
+ }
373
+ else {
374
+ reject(new apis_1.HttpError(response, body, response.statusCode));
375
+ }
376
+ }
377
+ });
378
+ });
379
+ })];
380
+ });
381
+ });
382
+ };
383
+ FutureBidsApi.prototype.futureBidsControllerUpdate = function (id, account, updateFutureBidDto, options) {
384
+ if (options === void 0) { options = { headers: {} }; }
385
+ return __awaiter(this, void 0, void 0, function () {
386
+ var localVarPath, localVarQueryParameters, localVarHeaderParams, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_5, _i, _a, interceptor;
387
+ var _this = this;
388
+ return __generator(this, function (_b) {
389
+ localVarPath = this.basePath + '/future-bids/{account}/{id}'
390
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)))
391
+ .replace('{' + 'account' + '}', encodeURIComponent(String(account)));
392
+ localVarQueryParameters = {};
393
+ localVarHeaderParams = Object.assign({}, this._defaultHeaders);
394
+ localVarFormParams = {};
395
+ if (id === null || id === undefined) {
396
+ throw new Error('Required parameter id was null or undefined when calling futureBidsControllerUpdate.');
397
+ }
398
+ if (account === null || account === undefined) {
399
+ throw new Error('Required parameter account was null or undefined when calling futureBidsControllerUpdate.');
400
+ }
401
+ if (updateFutureBidDto === null || updateFutureBidDto === undefined) {
402
+ throw new Error('Required parameter updateFutureBidDto was null or undefined when calling futureBidsControllerUpdate.');
403
+ }
404
+ Object.assign(localVarHeaderParams, options.headers);
405
+ localVarUseFormData = false;
406
+ localVarRequestOptions = {
407
+ method: 'PUT',
408
+ qs: localVarQueryParameters,
409
+ headers: localVarHeaderParams,
410
+ uri: localVarPath,
411
+ useQuerystring: this._useQuerystring,
412
+ json: true,
413
+ body: models_1.ObjectSerializer.serialize(updateFutureBidDto, "UpdateFutureBidDto")
414
+ };
415
+ authenticationPromise = Promise.resolve();
416
+ authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
417
+ interceptorPromise = authenticationPromise;
418
+ _loop_5 = function (interceptor) {
419
+ interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
420
+ };
421
+ for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
422
+ interceptor = _a[_i];
423
+ _loop_5(interceptor);
424
+ }
425
+ return [2, interceptorPromise.then(function () {
426
+ if (Object.keys(localVarFormParams).length) {
427
+ if (localVarUseFormData) {
428
+ localVarRequestOptions.formData = localVarFormParams;
429
+ }
430
+ else {
431
+ localVarRequestOptions.form = localVarFormParams;
432
+ }
433
+ }
434
+ return new Promise(function (resolve, reject) {
435
+ (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
436
+ if (error) {
437
+ reject(error);
438
+ }
439
+ else {
440
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
441
+ resolve({ response: response, body: body });
442
+ }
443
+ else {
444
+ reject(new apis_1.HttpError(response, body, response.statusCode));
445
+ }
446
+ }
447
+ });
448
+ });
449
+ })];
450
+ });
451
+ });
452
+ };
453
+ return FutureBidsApi;
454
+ }());
455
+ exports.FutureBidsApi = FutureBidsApi;
456
456
  //# sourceMappingURL=futureBidsApi.js.map