@tradecafe/offer-service-sdk 0.0.36 → 0.0.38

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 (86) hide show
  1. package/.openapi-generator/FILES +41 -38
  2. package/dist/api/apis.d.ts +20 -20
  3. package/dist/api/apis.js +56 -56
  4. package/dist/api/automatedOffersApi.d.ts +112 -112
  5. package/dist/api/automatedOffersApi.js +876 -876
  6. package/dist/api/futureBidsApi.d.ts +65 -65
  7. package/dist/api/futureBidsApi.js +456 -456
  8. package/dist/api/healthApi.d.ts +32 -32
  9. package/dist/api/healthApi.js +174 -174
  10. package/dist/api/matchedOffersApi.d.ts +177 -177
  11. package/dist/api/matchedOffersApi.js +1410 -1410
  12. package/dist/api/offersApi.d.ts +184 -184
  13. package/dist/api/offersApi.js +1469 -1469
  14. package/dist/api.d.ts +2 -2
  15. package/dist/api.js +18 -18
  16. package/dist/model/addFutureBidDto.d.ts +17 -17
  17. package/dist/model/addFutureBidDto.js +35 -35
  18. package/dist/model/createAutomatedOfferDto.d.ts +117 -115
  19. package/dist/model/createAutomatedOfferDto.js +396 -391
  20. package/dist/model/createAutomatedOfferDto.js.map +1 -1
  21. package/dist/model/createMatchedOfferDto.d.ts +83 -83
  22. package/dist/model/createMatchedOfferDto.js +310 -310
  23. package/dist/model/createOfferDto.d.ts +107 -105
  24. package/dist/model/createOfferDto.js +377 -372
  25. package/dist/model/createOfferDto.js.map +1 -1
  26. package/dist/model/createOfferDtoAttributes.d.ts +49 -49
  27. package/dist/model/createOfferDtoAttributes.js +159 -159
  28. package/dist/model/createOfferDtoFormula.d.ts +19 -19
  29. package/dist/model/createOfferDtoFormula.js +40 -40
  30. package/dist/model/createOfferDtoPacking.d.ts +17 -17
  31. package/dist/model/createOfferDtoPacking.js +35 -35
  32. package/dist/model/createOfferDtoWeight.d.ts +15 -15
  33. package/dist/model/createOfferDtoWeight.js +25 -25
  34. package/dist/model/formulaDto.d.ts +19 -19
  35. package/dist/model/formulaDto.js +40 -40
  36. package/dist/model/formulaLineDto.d.ts +17 -17
  37. package/dist/model/formulaLineDto.js +35 -35
  38. package/dist/model/generalAddressDto.d.ts +43 -43
  39. package/dist/model/generalAddressDto.js +165 -165
  40. package/dist/model/healthControllerPing200Response.d.ts +24 -24
  41. package/dist/model/healthControllerPing200Response.js +35 -35
  42. package/dist/model/healthControllerPing200ResponseInfoValue.d.ts +10 -10
  43. package/dist/model/healthControllerPing200ResponseInfoValue.js +36 -36
  44. package/dist/model/healthControllerPing503Response.d.ts +24 -24
  45. package/dist/model/healthControllerPing503Response.js +35 -35
  46. package/dist/model/models.d.ts +74 -71
  47. package/dist/model/models.js +316 -307
  48. package/dist/model/models.js.map +1 -1
  49. package/dist/model/offerAttributesDto.d.ts +49 -49
  50. package/dist/model/offerAttributesDto.js +159 -159
  51. package/dist/model/offerAttributesDtoEstablishment.d.ts +43 -43
  52. package/dist/model/offerAttributesDtoEstablishment.js +165 -165
  53. package/dist/model/overwriteItemDto.d.ts +21 -0
  54. package/dist/model/overwriteItemDto.js +51 -0
  55. package/dist/model/overwriteItemDto.js.map +1 -0
  56. package/dist/model/overwriteItemDtoWeight.d.ts +14 -0
  57. package/dist/model/overwriteItemDtoWeight.js +21 -0
  58. package/dist/model/overwriteItemDtoWeight.js.map +1 -0
  59. package/dist/model/packing.d.ts +17 -17
  60. package/dist/model/packing.js +35 -35
  61. package/dist/model/pinActionDto.d.ts +14 -14
  62. package/dist/model/pinActionDto.js +20 -20
  63. package/dist/model/relistingConfigDto.d.ts +17 -17
  64. package/dist/model/relistingConfigDto.js +35 -35
  65. package/dist/model/relistingDetailDto.d.ts +31 -31
  66. package/dist/model/relistingDetailDto.js +62 -62
  67. package/dist/model/relistingDetailDtoRandomConfig.d.ts +19 -19
  68. package/dist/model/relistingDetailDtoRandomConfig.js +45 -45
  69. package/dist/model/relistingRandomConfigDto.d.ts +19 -19
  70. package/dist/model/relistingRandomConfigDto.js +45 -45
  71. package/dist/model/updateFutureBidDto.d.ts +17 -17
  72. package/dist/model/updateFutureBidDto.js +35 -35
  73. package/dist/model/userPin.d.ts +15 -15
  74. package/dist/model/userPin.js +25 -25
  75. package/dist/model/weight.d.ts +15 -15
  76. package/dist/model/weight.js +25 -25
  77. package/dist/model/weightDto.d.ts +14 -0
  78. package/dist/model/weightDto.js +21 -0
  79. package/dist/model/weightDto.js.map +1 -0
  80. package/model/createAutomatedOfferDto.ts +10 -0
  81. package/model/createOfferDto.ts +10 -0
  82. package/model/models.ts +9 -0
  83. package/model/overwriteItemDto.ts +86 -0
  84. package/model/overwriteItemDtoWeight.ts +38 -0
  85. package/model/weightDto.ts +34 -0
  86. package/package.json +1 -1
@@ -1,308 +1,317 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.VoidAuth = exports.OAuth = exports.ApiKeyAuth = exports.HttpBearerAuth = exports.HttpBasicAuth = exports.ObjectSerializer = void 0;
18
- __exportStar(require("./addFutureBidDto"), exports);
19
- __exportStar(require("./createAutomatedOfferDto"), exports);
20
- __exportStar(require("./createMatchedOfferDto"), exports);
21
- __exportStar(require("./createOfferDto"), exports);
22
- __exportStar(require("./createOfferDtoAttributes"), exports);
23
- __exportStar(require("./createOfferDtoFormula"), exports);
24
- __exportStar(require("./createOfferDtoPacking"), exports);
25
- __exportStar(require("./createOfferDtoWeight"), exports);
26
- __exportStar(require("./formulaDto"), exports);
27
- __exportStar(require("./formulaLineDto"), exports);
28
- __exportStar(require("./generalAddressDto"), exports);
29
- __exportStar(require("./healthControllerPing200Response"), exports);
30
- __exportStar(require("./healthControllerPing200ResponseInfoValue"), exports);
31
- __exportStar(require("./healthControllerPing503Response"), exports);
32
- __exportStar(require("./offerAttributesDto"), exports);
33
- __exportStar(require("./offerAttributesDtoEstablishment"), exports);
34
- __exportStar(require("./packing"), exports);
35
- __exportStar(require("./pinActionDto"), exports);
36
- __exportStar(require("./relistingConfigDto"), exports);
37
- __exportStar(require("./relistingDetailDto"), exports);
38
- __exportStar(require("./relistingDetailDtoRandomConfig"), exports);
39
- __exportStar(require("./relistingRandomConfigDto"), exports);
40
- __exportStar(require("./updateFutureBidDto"), exports);
41
- __exportStar(require("./userPin"), exports);
42
- __exportStar(require("./weight"), exports);
43
- var addFutureBidDto_1 = require("./addFutureBidDto");
44
- var createAutomatedOfferDto_1 = require("./createAutomatedOfferDto");
45
- var createMatchedOfferDto_1 = require("./createMatchedOfferDto");
46
- var createOfferDto_1 = require("./createOfferDto");
47
- var createOfferDtoAttributes_1 = require("./createOfferDtoAttributes");
48
- var createOfferDtoFormula_1 = require("./createOfferDtoFormula");
49
- var createOfferDtoPacking_1 = require("./createOfferDtoPacking");
50
- var createOfferDtoWeight_1 = require("./createOfferDtoWeight");
51
- var formulaDto_1 = require("./formulaDto");
52
- var formulaLineDto_1 = require("./formulaLineDto");
53
- var generalAddressDto_1 = require("./generalAddressDto");
54
- var healthControllerPing200Response_1 = require("./healthControllerPing200Response");
55
- var healthControllerPing200ResponseInfoValue_1 = require("./healthControllerPing200ResponseInfoValue");
56
- var healthControllerPing503Response_1 = require("./healthControllerPing503Response");
57
- var offerAttributesDto_1 = require("./offerAttributesDto");
58
- var offerAttributesDtoEstablishment_1 = require("./offerAttributesDtoEstablishment");
59
- var packing_1 = require("./packing");
60
- var pinActionDto_1 = require("./pinActionDto");
61
- var relistingConfigDto_1 = require("./relistingConfigDto");
62
- var relistingDetailDto_1 = require("./relistingDetailDto");
63
- var relistingDetailDtoRandomConfig_1 = require("./relistingDetailDtoRandomConfig");
64
- var relistingRandomConfigDto_1 = require("./relistingRandomConfigDto");
65
- var updateFutureBidDto_1 = require("./updateFutureBidDto");
66
- var userPin_1 = require("./userPin");
67
- var weight_1 = require("./weight");
68
- var primitives = [
69
- "string",
70
- "boolean",
71
- "double",
72
- "integer",
73
- "long",
74
- "float",
75
- "number",
76
- "any"
77
- ];
78
- var enumsMap = {
79
- "CreateAutomatedOfferDto.TypeEnum": createAutomatedOfferDto_1.CreateAutomatedOfferDto.TypeEnum,
80
- "CreateAutomatedOfferDto.StatusEnum": createAutomatedOfferDto_1.CreateAutomatedOfferDto.StatusEnum,
81
- "CreateAutomatedOfferDto.AutomatedOfferStatusEnum": createAutomatedOfferDto_1.CreateAutomatedOfferDto.AutomatedOfferStatusEnum,
82
- "CreateMatchedOfferDto.StatusEnum": createMatchedOfferDto_1.CreateMatchedOfferDto.StatusEnum,
83
- "CreateOfferDto.TypeEnum": createOfferDto_1.CreateOfferDto.TypeEnum,
84
- "CreateOfferDto.StatusEnum": createOfferDto_1.CreateOfferDto.StatusEnum,
85
- "CreateOfferDtoAttributes.DeliveryPreferenceEnum": createOfferDtoAttributes_1.CreateOfferDtoAttributes.DeliveryPreferenceEnum,
86
- "OfferAttributesDto.DeliveryPreferenceEnum": offerAttributesDto_1.OfferAttributesDto.DeliveryPreferenceEnum,
87
- "RelistingDetailDto.StatusEnum": relistingDetailDto_1.RelistingDetailDto.StatusEnum,
88
- };
89
- var typeMap = {
90
- "AddFutureBidDto": addFutureBidDto_1.AddFutureBidDto,
91
- "CreateAutomatedOfferDto": createAutomatedOfferDto_1.CreateAutomatedOfferDto,
92
- "CreateMatchedOfferDto": createMatchedOfferDto_1.CreateMatchedOfferDto,
93
- "CreateOfferDto": createOfferDto_1.CreateOfferDto,
94
- "CreateOfferDtoAttributes": createOfferDtoAttributes_1.CreateOfferDtoAttributes,
95
- "CreateOfferDtoFormula": createOfferDtoFormula_1.CreateOfferDtoFormula,
96
- "CreateOfferDtoPacking": createOfferDtoPacking_1.CreateOfferDtoPacking,
97
- "CreateOfferDtoWeight": createOfferDtoWeight_1.CreateOfferDtoWeight,
98
- "FormulaDto": formulaDto_1.FormulaDto,
99
- "FormulaLineDto": formulaLineDto_1.FormulaLineDto,
100
- "GeneralAddressDto": generalAddressDto_1.GeneralAddressDto,
101
- "HealthControllerPing200Response": healthControllerPing200Response_1.HealthControllerPing200Response,
102
- "HealthControllerPing200ResponseInfoValue": healthControllerPing200ResponseInfoValue_1.HealthControllerPing200ResponseInfoValue,
103
- "HealthControllerPing503Response": healthControllerPing503Response_1.HealthControllerPing503Response,
104
- "OfferAttributesDto": offerAttributesDto_1.OfferAttributesDto,
105
- "OfferAttributesDtoEstablishment": offerAttributesDtoEstablishment_1.OfferAttributesDtoEstablishment,
106
- "Packing": packing_1.Packing,
107
- "PinActionDto": pinActionDto_1.PinActionDto,
108
- "RelistingConfigDto": relistingConfigDto_1.RelistingConfigDto,
109
- "RelistingDetailDto": relistingDetailDto_1.RelistingDetailDto,
110
- "RelistingDetailDtoRandomConfig": relistingDetailDtoRandomConfig_1.RelistingDetailDtoRandomConfig,
111
- "RelistingRandomConfigDto": relistingRandomConfigDto_1.RelistingRandomConfigDto,
112
- "UpdateFutureBidDto": updateFutureBidDto_1.UpdateFutureBidDto,
113
- "UserPin": userPin_1.UserPin,
114
- "Weight": weight_1.Weight,
115
- };
116
- var ObjectSerializer = (function () {
117
- function ObjectSerializer() {
118
- }
119
- ObjectSerializer.findCorrectType = function (data, expectedType) {
120
- if (data == undefined) {
121
- return expectedType;
122
- }
123
- else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
124
- return expectedType;
125
- }
126
- else if (expectedType === "Date") {
127
- return expectedType;
128
- }
129
- else {
130
- if (enumsMap[expectedType]) {
131
- return expectedType;
132
- }
133
- if (!typeMap[expectedType]) {
134
- return expectedType;
135
- }
136
- var discriminatorProperty = typeMap[expectedType].discriminator;
137
- if (discriminatorProperty == null) {
138
- return expectedType;
139
- }
140
- else {
141
- if (data[discriminatorProperty]) {
142
- var discriminatorType = data[discriminatorProperty];
143
- if (typeMap[discriminatorType]) {
144
- return discriminatorType;
145
- }
146
- else {
147
- return expectedType;
148
- }
149
- }
150
- else {
151
- return expectedType;
152
- }
153
- }
154
- }
155
- };
156
- ObjectSerializer.serialize = function (data, type) {
157
- if (data == undefined) {
158
- return data;
159
- }
160
- else if (primitives.indexOf(type.toLowerCase()) !== -1) {
161
- return data;
162
- }
163
- else if (type.lastIndexOf("Array<", 0) === 0) {
164
- var subType = type.replace("Array<", "");
165
- subType = subType.substring(0, subType.length - 1);
166
- var transformedData = [];
167
- for (var index = 0; index < data.length; index++) {
168
- var datum = data[index];
169
- transformedData.push(ObjectSerializer.serialize(datum, subType));
170
- }
171
- return transformedData;
172
- }
173
- else if (type === "Date") {
174
- return data.toISOString();
175
- }
176
- else {
177
- if (enumsMap[type]) {
178
- return data;
179
- }
180
- if (!typeMap[type]) {
181
- return data;
182
- }
183
- type = this.findCorrectType(data, type);
184
- var attributeTypes = typeMap[type].getAttributeTypeMap();
185
- var instance = {};
186
- for (var index = 0; index < attributeTypes.length; index++) {
187
- var attributeType = attributeTypes[index];
188
- instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
189
- }
190
- return instance;
191
- }
192
- };
193
- ObjectSerializer.deserialize = function (data, type) {
194
- type = ObjectSerializer.findCorrectType(data, type);
195
- if (data == undefined) {
196
- return data;
197
- }
198
- else if (primitives.indexOf(type.toLowerCase()) !== -1) {
199
- return data;
200
- }
201
- else if (type.lastIndexOf("Array<", 0) === 0) {
202
- var subType = type.replace("Array<", "");
203
- subType = subType.substring(0, subType.length - 1);
204
- var transformedData = [];
205
- for (var index = 0; index < data.length; index++) {
206
- var datum = data[index];
207
- transformedData.push(ObjectSerializer.deserialize(datum, subType));
208
- }
209
- return transformedData;
210
- }
211
- else if (type === "Date") {
212
- return new Date(data);
213
- }
214
- else {
215
- if (enumsMap[type]) {
216
- return data;
217
- }
218
- if (!typeMap[type]) {
219
- return data;
220
- }
221
- var instance = new typeMap[type]();
222
- var attributeTypes = typeMap[type].getAttributeTypeMap();
223
- for (var index = 0; index < attributeTypes.length; index++) {
224
- var attributeType = attributeTypes[index];
225
- instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
226
- }
227
- return instance;
228
- }
229
- };
230
- return ObjectSerializer;
231
- }());
232
- exports.ObjectSerializer = ObjectSerializer;
233
- var HttpBasicAuth = (function () {
234
- function HttpBasicAuth() {
235
- this.username = '';
236
- this.password = '';
237
- }
238
- HttpBasicAuth.prototype.applyToRequest = function (requestOptions) {
239
- requestOptions.auth = {
240
- username: this.username, password: this.password
241
- };
242
- };
243
- return HttpBasicAuth;
244
- }());
245
- exports.HttpBasicAuth = HttpBasicAuth;
246
- var HttpBearerAuth = (function () {
247
- function HttpBearerAuth() {
248
- this.accessToken = '';
249
- }
250
- HttpBearerAuth.prototype.applyToRequest = function (requestOptions) {
251
- if (requestOptions && requestOptions.headers) {
252
- var accessToken = typeof this.accessToken === 'function'
253
- ? this.accessToken()
254
- : this.accessToken;
255
- requestOptions.headers["Authorization"] = "Bearer " + accessToken;
256
- }
257
- };
258
- return HttpBearerAuth;
259
- }());
260
- exports.HttpBearerAuth = HttpBearerAuth;
261
- var ApiKeyAuth = (function () {
262
- function ApiKeyAuth(location, paramName) {
263
- this.location = location;
264
- this.paramName = paramName;
265
- this.apiKey = '';
266
- }
267
- ApiKeyAuth.prototype.applyToRequest = function (requestOptions) {
268
- if (this.location == "query") {
269
- requestOptions.qs[this.paramName] = this.apiKey;
270
- }
271
- else if (this.location == "header" && requestOptions && requestOptions.headers) {
272
- requestOptions.headers[this.paramName] = this.apiKey;
273
- }
274
- else if (this.location == 'cookie' && requestOptions && requestOptions.headers) {
275
- if (requestOptions.headers['Cookie']) {
276
- requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey);
277
- }
278
- else {
279
- requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey);
280
- }
281
- }
282
- };
283
- return ApiKeyAuth;
284
- }());
285
- exports.ApiKeyAuth = ApiKeyAuth;
286
- var OAuth = (function () {
287
- function OAuth() {
288
- this.accessToken = '';
289
- }
290
- OAuth.prototype.applyToRequest = function (requestOptions) {
291
- if (requestOptions && requestOptions.headers) {
292
- requestOptions.headers["Authorization"] = "Bearer " + this.accessToken;
293
- }
294
- };
295
- return OAuth;
296
- }());
297
- exports.OAuth = OAuth;
298
- var VoidAuth = (function () {
299
- function VoidAuth() {
300
- this.username = '';
301
- this.password = '';
302
- }
303
- VoidAuth.prototype.applyToRequest = function (_) {
304
- };
305
- return VoidAuth;
306
- }());
307
- exports.VoidAuth = VoidAuth;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.VoidAuth = exports.OAuth = exports.ApiKeyAuth = exports.HttpBearerAuth = exports.HttpBasicAuth = exports.ObjectSerializer = void 0;
18
+ __exportStar(require("./addFutureBidDto"), exports);
19
+ __exportStar(require("./createAutomatedOfferDto"), exports);
20
+ __exportStar(require("./createMatchedOfferDto"), exports);
21
+ __exportStar(require("./createOfferDto"), exports);
22
+ __exportStar(require("./createOfferDtoAttributes"), exports);
23
+ __exportStar(require("./createOfferDtoFormula"), exports);
24
+ __exportStar(require("./createOfferDtoPacking"), exports);
25
+ __exportStar(require("./createOfferDtoWeight"), exports);
26
+ __exportStar(require("./formulaDto"), exports);
27
+ __exportStar(require("./formulaLineDto"), exports);
28
+ __exportStar(require("./generalAddressDto"), exports);
29
+ __exportStar(require("./healthControllerPing200Response"), exports);
30
+ __exportStar(require("./healthControllerPing200ResponseInfoValue"), exports);
31
+ __exportStar(require("./healthControllerPing503Response"), exports);
32
+ __exportStar(require("./offerAttributesDto"), exports);
33
+ __exportStar(require("./offerAttributesDtoEstablishment"), exports);
34
+ __exportStar(require("./overwriteItemDto"), exports);
35
+ __exportStar(require("./overwriteItemDtoWeight"), exports);
36
+ __exportStar(require("./packing"), exports);
37
+ __exportStar(require("./pinActionDto"), exports);
38
+ __exportStar(require("./relistingConfigDto"), exports);
39
+ __exportStar(require("./relistingDetailDto"), exports);
40
+ __exportStar(require("./relistingDetailDtoRandomConfig"), exports);
41
+ __exportStar(require("./relistingRandomConfigDto"), exports);
42
+ __exportStar(require("./updateFutureBidDto"), exports);
43
+ __exportStar(require("./userPin"), exports);
44
+ __exportStar(require("./weight"), exports);
45
+ __exportStar(require("./weightDto"), exports);
46
+ var addFutureBidDto_1 = require("./addFutureBidDto");
47
+ var createAutomatedOfferDto_1 = require("./createAutomatedOfferDto");
48
+ var createMatchedOfferDto_1 = require("./createMatchedOfferDto");
49
+ var createOfferDto_1 = require("./createOfferDto");
50
+ var createOfferDtoAttributes_1 = require("./createOfferDtoAttributes");
51
+ var createOfferDtoFormula_1 = require("./createOfferDtoFormula");
52
+ var createOfferDtoPacking_1 = require("./createOfferDtoPacking");
53
+ var createOfferDtoWeight_1 = require("./createOfferDtoWeight");
54
+ var formulaDto_1 = require("./formulaDto");
55
+ var formulaLineDto_1 = require("./formulaLineDto");
56
+ var generalAddressDto_1 = require("./generalAddressDto");
57
+ var healthControllerPing200Response_1 = require("./healthControllerPing200Response");
58
+ var healthControllerPing200ResponseInfoValue_1 = require("./healthControllerPing200ResponseInfoValue");
59
+ var healthControllerPing503Response_1 = require("./healthControllerPing503Response");
60
+ var offerAttributesDto_1 = require("./offerAttributesDto");
61
+ var offerAttributesDtoEstablishment_1 = require("./offerAttributesDtoEstablishment");
62
+ var overwriteItemDto_1 = require("./overwriteItemDto");
63
+ var overwriteItemDtoWeight_1 = require("./overwriteItemDtoWeight");
64
+ var packing_1 = require("./packing");
65
+ var pinActionDto_1 = require("./pinActionDto");
66
+ var relistingConfigDto_1 = require("./relistingConfigDto");
67
+ var relistingDetailDto_1 = require("./relistingDetailDto");
68
+ var relistingDetailDtoRandomConfig_1 = require("./relistingDetailDtoRandomConfig");
69
+ var relistingRandomConfigDto_1 = require("./relistingRandomConfigDto");
70
+ var updateFutureBidDto_1 = require("./updateFutureBidDto");
71
+ var userPin_1 = require("./userPin");
72
+ var weight_1 = require("./weight");
73
+ var weightDto_1 = require("./weightDto");
74
+ var primitives = [
75
+ "string",
76
+ "boolean",
77
+ "double",
78
+ "integer",
79
+ "long",
80
+ "float",
81
+ "number",
82
+ "any"
83
+ ];
84
+ var enumsMap = {
85
+ "CreateAutomatedOfferDto.TypeEnum": createAutomatedOfferDto_1.CreateAutomatedOfferDto.TypeEnum,
86
+ "CreateAutomatedOfferDto.StatusEnum": createAutomatedOfferDto_1.CreateAutomatedOfferDto.StatusEnum,
87
+ "CreateAutomatedOfferDto.AutomatedOfferStatusEnum": createAutomatedOfferDto_1.CreateAutomatedOfferDto.AutomatedOfferStatusEnum,
88
+ "CreateMatchedOfferDto.StatusEnum": createMatchedOfferDto_1.CreateMatchedOfferDto.StatusEnum,
89
+ "CreateOfferDto.TypeEnum": createOfferDto_1.CreateOfferDto.TypeEnum,
90
+ "CreateOfferDto.StatusEnum": createOfferDto_1.CreateOfferDto.StatusEnum,
91
+ "CreateOfferDtoAttributes.DeliveryPreferenceEnum": createOfferDtoAttributes_1.CreateOfferDtoAttributes.DeliveryPreferenceEnum,
92
+ "OfferAttributesDto.DeliveryPreferenceEnum": offerAttributesDto_1.OfferAttributesDto.DeliveryPreferenceEnum,
93
+ "RelistingDetailDto.StatusEnum": relistingDetailDto_1.RelistingDetailDto.StatusEnum,
94
+ };
95
+ var typeMap = {
96
+ "AddFutureBidDto": addFutureBidDto_1.AddFutureBidDto,
97
+ "CreateAutomatedOfferDto": createAutomatedOfferDto_1.CreateAutomatedOfferDto,
98
+ "CreateMatchedOfferDto": createMatchedOfferDto_1.CreateMatchedOfferDto,
99
+ "CreateOfferDto": createOfferDto_1.CreateOfferDto,
100
+ "CreateOfferDtoAttributes": createOfferDtoAttributes_1.CreateOfferDtoAttributes,
101
+ "CreateOfferDtoFormula": createOfferDtoFormula_1.CreateOfferDtoFormula,
102
+ "CreateOfferDtoPacking": createOfferDtoPacking_1.CreateOfferDtoPacking,
103
+ "CreateOfferDtoWeight": createOfferDtoWeight_1.CreateOfferDtoWeight,
104
+ "FormulaDto": formulaDto_1.FormulaDto,
105
+ "FormulaLineDto": formulaLineDto_1.FormulaLineDto,
106
+ "GeneralAddressDto": generalAddressDto_1.GeneralAddressDto,
107
+ "HealthControllerPing200Response": healthControllerPing200Response_1.HealthControllerPing200Response,
108
+ "HealthControllerPing200ResponseInfoValue": healthControllerPing200ResponseInfoValue_1.HealthControllerPing200ResponseInfoValue,
109
+ "HealthControllerPing503Response": healthControllerPing503Response_1.HealthControllerPing503Response,
110
+ "OfferAttributesDto": offerAttributesDto_1.OfferAttributesDto,
111
+ "OfferAttributesDtoEstablishment": offerAttributesDtoEstablishment_1.OfferAttributesDtoEstablishment,
112
+ "OverwriteItemDto": overwriteItemDto_1.OverwriteItemDto,
113
+ "OverwriteItemDtoWeight": overwriteItemDtoWeight_1.OverwriteItemDtoWeight,
114
+ "Packing": packing_1.Packing,
115
+ "PinActionDto": pinActionDto_1.PinActionDto,
116
+ "RelistingConfigDto": relistingConfigDto_1.RelistingConfigDto,
117
+ "RelistingDetailDto": relistingDetailDto_1.RelistingDetailDto,
118
+ "RelistingDetailDtoRandomConfig": relistingDetailDtoRandomConfig_1.RelistingDetailDtoRandomConfig,
119
+ "RelistingRandomConfigDto": relistingRandomConfigDto_1.RelistingRandomConfigDto,
120
+ "UpdateFutureBidDto": updateFutureBidDto_1.UpdateFutureBidDto,
121
+ "UserPin": userPin_1.UserPin,
122
+ "Weight": weight_1.Weight,
123
+ "WeightDto": weightDto_1.WeightDto,
124
+ };
125
+ var ObjectSerializer = (function () {
126
+ function ObjectSerializer() {
127
+ }
128
+ ObjectSerializer.findCorrectType = function (data, expectedType) {
129
+ if (data == undefined) {
130
+ return expectedType;
131
+ }
132
+ else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
133
+ return expectedType;
134
+ }
135
+ else if (expectedType === "Date") {
136
+ return expectedType;
137
+ }
138
+ else {
139
+ if (enumsMap[expectedType]) {
140
+ return expectedType;
141
+ }
142
+ if (!typeMap[expectedType]) {
143
+ return expectedType;
144
+ }
145
+ var discriminatorProperty = typeMap[expectedType].discriminator;
146
+ if (discriminatorProperty == null) {
147
+ return expectedType;
148
+ }
149
+ else {
150
+ if (data[discriminatorProperty]) {
151
+ var discriminatorType = data[discriminatorProperty];
152
+ if (typeMap[discriminatorType]) {
153
+ return discriminatorType;
154
+ }
155
+ else {
156
+ return expectedType;
157
+ }
158
+ }
159
+ else {
160
+ return expectedType;
161
+ }
162
+ }
163
+ }
164
+ };
165
+ ObjectSerializer.serialize = function (data, type) {
166
+ if (data == undefined) {
167
+ return data;
168
+ }
169
+ else if (primitives.indexOf(type.toLowerCase()) !== -1) {
170
+ return data;
171
+ }
172
+ else if (type.lastIndexOf("Array<", 0) === 0) {
173
+ var subType = type.replace("Array<", "");
174
+ subType = subType.substring(0, subType.length - 1);
175
+ var transformedData = [];
176
+ for (var index = 0; index < data.length; index++) {
177
+ var datum = data[index];
178
+ transformedData.push(ObjectSerializer.serialize(datum, subType));
179
+ }
180
+ return transformedData;
181
+ }
182
+ else if (type === "Date") {
183
+ return data.toISOString();
184
+ }
185
+ else {
186
+ if (enumsMap[type]) {
187
+ return data;
188
+ }
189
+ if (!typeMap[type]) {
190
+ return data;
191
+ }
192
+ type = this.findCorrectType(data, type);
193
+ var attributeTypes = typeMap[type].getAttributeTypeMap();
194
+ var instance = {};
195
+ for (var index = 0; index < attributeTypes.length; index++) {
196
+ var attributeType = attributeTypes[index];
197
+ instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);
198
+ }
199
+ return instance;
200
+ }
201
+ };
202
+ ObjectSerializer.deserialize = function (data, type) {
203
+ type = ObjectSerializer.findCorrectType(data, type);
204
+ if (data == undefined) {
205
+ return data;
206
+ }
207
+ else if (primitives.indexOf(type.toLowerCase()) !== -1) {
208
+ return data;
209
+ }
210
+ else if (type.lastIndexOf("Array<", 0) === 0) {
211
+ var subType = type.replace("Array<", "");
212
+ subType = subType.substring(0, subType.length - 1);
213
+ var transformedData = [];
214
+ for (var index = 0; index < data.length; index++) {
215
+ var datum = data[index];
216
+ transformedData.push(ObjectSerializer.deserialize(datum, subType));
217
+ }
218
+ return transformedData;
219
+ }
220
+ else if (type === "Date") {
221
+ return new Date(data);
222
+ }
223
+ else {
224
+ if (enumsMap[type]) {
225
+ return data;
226
+ }
227
+ if (!typeMap[type]) {
228
+ return data;
229
+ }
230
+ var instance = new typeMap[type]();
231
+ var attributeTypes = typeMap[type].getAttributeTypeMap();
232
+ for (var index = 0; index < attributeTypes.length; index++) {
233
+ var attributeType = attributeTypes[index];
234
+ instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);
235
+ }
236
+ return instance;
237
+ }
238
+ };
239
+ return ObjectSerializer;
240
+ }());
241
+ exports.ObjectSerializer = ObjectSerializer;
242
+ var HttpBasicAuth = (function () {
243
+ function HttpBasicAuth() {
244
+ this.username = '';
245
+ this.password = '';
246
+ }
247
+ HttpBasicAuth.prototype.applyToRequest = function (requestOptions) {
248
+ requestOptions.auth = {
249
+ username: this.username, password: this.password
250
+ };
251
+ };
252
+ return HttpBasicAuth;
253
+ }());
254
+ exports.HttpBasicAuth = HttpBasicAuth;
255
+ var HttpBearerAuth = (function () {
256
+ function HttpBearerAuth() {
257
+ this.accessToken = '';
258
+ }
259
+ HttpBearerAuth.prototype.applyToRequest = function (requestOptions) {
260
+ if (requestOptions && requestOptions.headers) {
261
+ var accessToken = typeof this.accessToken === 'function'
262
+ ? this.accessToken()
263
+ : this.accessToken;
264
+ requestOptions.headers["Authorization"] = "Bearer " + accessToken;
265
+ }
266
+ };
267
+ return HttpBearerAuth;
268
+ }());
269
+ exports.HttpBearerAuth = HttpBearerAuth;
270
+ var ApiKeyAuth = (function () {
271
+ function ApiKeyAuth(location, paramName) {
272
+ this.location = location;
273
+ this.paramName = paramName;
274
+ this.apiKey = '';
275
+ }
276
+ ApiKeyAuth.prototype.applyToRequest = function (requestOptions) {
277
+ if (this.location == "query") {
278
+ requestOptions.qs[this.paramName] = this.apiKey;
279
+ }
280
+ else if (this.location == "header" && requestOptions && requestOptions.headers) {
281
+ requestOptions.headers[this.paramName] = this.apiKey;
282
+ }
283
+ else if (this.location == 'cookie' && requestOptions && requestOptions.headers) {
284
+ if (requestOptions.headers['Cookie']) {
285
+ requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey);
286
+ }
287
+ else {
288
+ requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey);
289
+ }
290
+ }
291
+ };
292
+ return ApiKeyAuth;
293
+ }());
294
+ exports.ApiKeyAuth = ApiKeyAuth;
295
+ var OAuth = (function () {
296
+ function OAuth() {
297
+ this.accessToken = '';
298
+ }
299
+ OAuth.prototype.applyToRequest = function (requestOptions) {
300
+ if (requestOptions && requestOptions.headers) {
301
+ requestOptions.headers["Authorization"] = "Bearer " + this.accessToken;
302
+ }
303
+ };
304
+ return OAuth;
305
+ }());
306
+ exports.OAuth = OAuth;
307
+ var VoidAuth = (function () {
308
+ function VoidAuth() {
309
+ this.username = '';
310
+ this.password = '';
311
+ }
312
+ VoidAuth.prototype.applyToRequest = function (_) {
313
+ };
314
+ return VoidAuth;
315
+ }());
316
+ exports.VoidAuth = VoidAuth;
308
317
  //# sourceMappingURL=models.js.map