@tradecafe/offer-service-sdk 0.0.58 → 0.0.62

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 (168) hide show
  1. package/.openapi-generator/FILES +77 -69
  2. package/api/apis.ts +3 -1
  3. package/api/matchedOffersApi.ts +260 -0
  4. package/api/promoTextsApi.ts +426 -0
  5. package/dist/api/apis.d.ts +22 -20
  6. package/dist/api/apis.js +58 -56
  7. package/dist/api/apis.js.map +1 -1
  8. package/dist/api/automatedOffersApi.d.ts +156 -156
  9. package/dist/api/automatedOffersApi.js +1218 -1218
  10. package/dist/api/futureBidsApi.d.ts +65 -65
  11. package/dist/api/futureBidsApi.js +456 -456
  12. package/dist/api/healthApi.d.ts +32 -32
  13. package/dist/api/healthApi.js +174 -174
  14. package/dist/api/matchedOffersApi.d.ts +301 -267
  15. package/dist/api/matchedOffersApi.js +2330 -2074
  16. package/dist/api/matchedOffersApi.js.map +1 -1
  17. package/dist/api/offersApi.d.ts +200 -200
  18. package/dist/api/offersApi.js +1605 -1605
  19. package/dist/api/promoTextsApi.d.ts +67 -0
  20. package/dist/api/promoTextsApi.js +436 -0
  21. package/dist/api/promoTextsApi.js.map +1 -0
  22. package/dist/api.d.ts +2 -2
  23. package/dist/api.js +18 -18
  24. package/dist/model/addFutureBidDto.d.ts +17 -17
  25. package/dist/model/addFutureBidDto.js +35 -35
  26. package/dist/model/addMatchedDeliveryDateDto.d.ts +14 -14
  27. package/dist/model/addMatchedDeliveryDateDto.js +20 -20
  28. package/dist/model/archivePromoTextDto.d.ts +14 -0
  29. package/dist/model/archivePromoTextDto.js +21 -0
  30. package/dist/model/archivePromoTextDto.js.map +1 -0
  31. package/dist/model/associatedCostDto.d.ts +16 -16
  32. package/dist/model/associatedCostDto.js +30 -30
  33. package/dist/model/bulkAddRelistingDto.d.ts +16 -16
  34. package/dist/model/bulkAddRelistingDto.js +25 -25
  35. package/dist/model/bulkAddTertiaryCostsDto.d.ts +16 -16
  36. package/dist/model/bulkAddTertiaryCostsDto.js +25 -25
  37. package/dist/model/bulkCancelPromotionDto.d.ts +16 -0
  38. package/dist/model/bulkCancelPromotionDto.js +31 -0
  39. package/dist/model/bulkCancelPromotionDto.js.map +1 -0
  40. package/dist/model/bulkChangeDestinationLocationDto.d.ts +16 -16
  41. package/dist/model/bulkChangeDestinationLocationDto.js +30 -30
  42. package/dist/model/bulkChangeFreightRatesDto.d.ts +19 -19
  43. package/dist/model/bulkChangeFreightRatesDto.js +40 -40
  44. package/dist/model/bulkChangeIncotermDto.d.ts +16 -16
  45. package/dist/model/bulkChangeIncotermDto.js +30 -30
  46. package/dist/model/bulkChangeSellPriceItemDto.d.ts +20 -20
  47. package/dist/model/bulkChangeSellPriceItemDto.js +45 -45
  48. package/dist/model/bulkChangeSellPricesDto.d.ts +23 -23
  49. package/dist/model/bulkChangeSellPricesDto.js +55 -55
  50. package/dist/model/bulkChangeSellingTraderDto.d.ts +16 -16
  51. package/dist/model/bulkChangeSellingTraderDto.js +30 -30
  52. package/dist/model/bulkDeleteBuyerSpecialInstructionsDto.d.ts +15 -15
  53. package/dist/model/bulkDeleteBuyerSpecialInstructionsDto.js +25 -25
  54. package/dist/model/bulkPromoteDto.d.ts +17 -0
  55. package/dist/model/bulkPromoteDto.js +36 -0
  56. package/dist/model/bulkPromoteDto.js.map +1 -0
  57. package/dist/model/bulkUpdateBuyerSpecialInstructionsDto.d.ts +19 -19
  58. package/dist/model/bulkUpdateBuyerSpecialInstructionsDto.js +45 -45
  59. package/dist/model/bulkUpdateDeliveryDatesDto.d.ts +16 -16
  60. package/dist/model/bulkUpdateDeliveryDatesDto.js +30 -30
  61. package/dist/model/bulkUpdateDocsCountryDto.d.ts +16 -16
  62. package/dist/model/bulkUpdateDocsCountryDto.js +30 -30
  63. package/dist/model/bulkUpdateMatchedDeliveryDatesDto.d.ts +15 -15
  64. package/dist/model/bulkUpdateMatchedDeliveryDatesDto.js +25 -25
  65. package/dist/model/costAmountDto.d.ts +17 -17
  66. package/dist/model/costAmountDto.js +35 -35
  67. package/dist/model/costAttributesDto.d.ts +32 -32
  68. package/dist/model/costAttributesDto.js +100 -100
  69. package/dist/model/costAttributesDtoAssociated.d.ts +16 -16
  70. package/dist/model/costAttributesDtoAssociated.js +30 -30
  71. package/dist/model/costAttributesDtoDefaultCost.d.ts +18 -18
  72. package/dist/model/costAttributesDtoDefaultCost.js +40 -40
  73. package/dist/model/costDto.d.ts +35 -35
  74. package/dist/model/costDto.js +110 -110
  75. package/dist/model/costDtoAmount.d.ts +17 -17
  76. package/dist/model/costDtoAmount.js +35 -35
  77. package/dist/model/costDtoAttributes.d.ts +32 -32
  78. package/dist/model/costDtoAttributes.js +100 -100
  79. package/dist/model/costDtoSource.d.ts +15 -15
  80. package/dist/model/costDtoSource.js +25 -25
  81. package/dist/model/costSourceDto.d.ts +15 -15
  82. package/dist/model/costSourceDto.js +25 -25
  83. package/dist/model/createAutomatedOfferDto.d.ts +124 -124
  84. package/dist/model/createAutomatedOfferDto.js +419 -419
  85. package/dist/model/createMatchedOfferDto.d.ts +85 -85
  86. package/dist/model/createMatchedOfferDto.js +315 -315
  87. package/dist/model/createMatchedOfferDtoAttributes.d.ts +34 -34
  88. package/dist/model/createMatchedOfferDtoAttributes.js +94 -94
  89. package/dist/model/createOfferDto.d.ts +111 -111
  90. package/dist/model/createOfferDto.js +397 -397
  91. package/dist/model/createOfferDtoAttributes.d.ts +52 -52
  92. package/dist/model/createOfferDtoAttributes.js +174 -174
  93. package/dist/model/createOfferDtoFormula.d.ts +19 -19
  94. package/dist/model/createOfferDtoFormula.js +40 -40
  95. package/dist/model/createOfferDtoPacking.d.ts +17 -17
  96. package/dist/model/createOfferDtoPacking.js +35 -35
  97. package/dist/model/createOfferDtoWeight.d.ts +15 -15
  98. package/dist/model/createOfferDtoWeight.js +25 -25
  99. package/dist/model/createPromoTextDto.d.ts +17 -0
  100. package/dist/model/createPromoTextDto.js +31 -0
  101. package/dist/model/createPromoTextDto.js.map +1 -0
  102. package/dist/model/defaultCostDto.d.ts +18 -18
  103. package/dist/model/defaultCostDto.js +40 -40
  104. package/dist/model/formulaDto.d.ts +19 -19
  105. package/dist/model/formulaDto.js +40 -40
  106. package/dist/model/formulaLineDto.d.ts +17 -17
  107. package/dist/model/formulaLineDto.js +35 -35
  108. package/dist/model/generalAddressDto.d.ts +43 -43
  109. package/dist/model/generalAddressDto.js +165 -165
  110. package/dist/model/healthControllerPing200Response.d.ts +24 -24
  111. package/dist/model/healthControllerPing200Response.js +35 -35
  112. package/dist/model/healthControllerPing200ResponseInfoValue.d.ts +10 -10
  113. package/dist/model/healthControllerPing200ResponseInfoValue.js +36 -36
  114. package/dist/model/healthControllerPing503Response.d.ts +24 -24
  115. package/dist/model/healthControllerPing503Response.js +35 -35
  116. package/dist/model/matchedOfferAttributesDto.d.ts +34 -34
  117. package/dist/model/matchedOfferAttributesDto.js +94 -94
  118. package/dist/model/models.d.ts +109 -102
  119. package/dist/model/models.js +424 -402
  120. package/dist/model/models.js.map +1 -1
  121. package/dist/model/offerAttributesDto.d.ts +52 -52
  122. package/dist/model/offerAttributesDto.js +174 -174
  123. package/dist/model/offerAttributesDtoEstablishment.d.ts +43 -43
  124. package/dist/model/offerAttributesDtoEstablishment.js +165 -165
  125. package/dist/model/overwriteItemDto.d.ts +22 -22
  126. package/dist/model/overwriteItemDto.js +55 -55
  127. package/dist/model/overwriteItemDtoWeight.d.ts +14 -14
  128. package/dist/model/overwriteItemDtoWeight.js +20 -20
  129. package/dist/model/packing.d.ts +17 -17
  130. package/dist/model/packing.js +35 -35
  131. package/dist/model/pinActionDto.d.ts +14 -14
  132. package/dist/model/pinActionDto.js +20 -20
  133. package/dist/model/promoTextPairDto.d.ts +24 -0
  134. package/dist/model/promoTextPairDto.js +41 -0
  135. package/dist/model/promoTextPairDto.js.map +1 -0
  136. package/dist/model/relistingConfigDto.d.ts +17 -17
  137. package/dist/model/relistingConfigDto.js +35 -35
  138. package/dist/model/relistingDetailDto.d.ts +31 -31
  139. package/dist/model/relistingDetailDto.js +62 -62
  140. package/dist/model/relistingDetailDtoRandomConfig.d.ts +19 -19
  141. package/dist/model/relistingDetailDtoRandomConfig.js +45 -45
  142. package/dist/model/relistingRandomConfigDto.d.ts +19 -19
  143. package/dist/model/relistingRandomConfigDto.js +45 -45
  144. package/dist/model/searchPromoTextDto.d.ts +15 -0
  145. package/dist/model/searchPromoTextDto.js +26 -0
  146. package/dist/model/searchPromoTextDto.js.map +1 -0
  147. package/dist/model/updateFutureBidDto.d.ts +17 -17
  148. package/dist/model/updateFutureBidDto.js +35 -35
  149. package/dist/model/updateMatchedDeliveryDateDto.d.ts +15 -15
  150. package/dist/model/updateMatchedDeliveryDateDto.js +25 -25
  151. package/dist/model/updatePromoTextDto.d.ts +17 -0
  152. package/dist/model/updatePromoTextDto.js +31 -0
  153. package/dist/model/updatePromoTextDto.js.map +1 -0
  154. package/dist/model/userPin.d.ts +15 -15
  155. package/dist/model/userPin.js +25 -25
  156. package/dist/model/weight.d.ts +15 -15
  157. package/dist/model/weight.js +25 -25
  158. package/dist/model/weightDto.d.ts +14 -14
  159. package/dist/model/weightDto.js +20 -20
  160. package/model/archivePromoTextDto.ts +34 -0
  161. package/model/bulkCancelPromotionDto.ts +49 -0
  162. package/model/bulkPromoteDto.ts +55 -0
  163. package/model/createPromoTextDto.ts +53 -0
  164. package/model/models.ts +22 -0
  165. package/model/promoTextPairDto.ts +60 -0
  166. package/model/searchPromoTextDto.ts +43 -0
  167. package/model/updatePromoTextDto.ts +47 -0
  168. package/package.json +1 -1
@@ -1,32 +1,32 @@
1
- /// <reference types="node" />
2
- import http from 'http';
3
- import { HealthControllerPing200Response } from '../model/healthControllerPing200Response';
4
- import { Authentication, Interceptor } from '../model/models';
5
- export declare enum HealthApiApiKeys {
6
- }
7
- export declare class HealthApi {
8
- protected _basePath: string;
9
- protected _defaultHeaders: any;
10
- protected _useQuerystring: boolean;
11
- protected authentications: {
12
- default: Authentication;
13
- };
14
- protected interceptors: Interceptor[];
15
- constructor(basePath?: string);
16
- set useQuerystring(value: boolean);
17
- set basePath(basePath: string);
18
- set defaultHeaders(defaultHeaders: any);
19
- get defaultHeaders(): any;
20
- get basePath(): string;
21
- setDefaultAuthentication(auth: Authentication): void;
22
- setApiKey(key: HealthApiApiKeys, value: string): void;
23
- addInterceptor(interceptor: Interceptor): void;
24
- healthControllerPing(options?: {
25
- headers: {
26
- [name: string]: string;
27
- };
28
- }): Promise<{
29
- response: http.IncomingMessage;
30
- body: HealthControllerPing200Response;
31
- }>;
32
- }
1
+ /// <reference types="node" />
2
+ import http from 'http';
3
+ import { HealthControllerPing200Response } from '../model/healthControllerPing200Response';
4
+ import { Authentication, Interceptor } from '../model/models';
5
+ export declare enum HealthApiApiKeys {
6
+ }
7
+ export declare class HealthApi {
8
+ protected _basePath: string;
9
+ protected _defaultHeaders: any;
10
+ protected _useQuerystring: boolean;
11
+ protected authentications: {
12
+ default: Authentication;
13
+ };
14
+ protected interceptors: Interceptor[];
15
+ constructor(basePath?: string);
16
+ set useQuerystring(value: boolean);
17
+ set basePath(basePath: string);
18
+ set defaultHeaders(defaultHeaders: any);
19
+ get defaultHeaders(): any;
20
+ get basePath(): string;
21
+ setDefaultAuthentication(auth: Authentication): void;
22
+ setApiKey(key: HealthApiApiKeys, value: string): void;
23
+ addInterceptor(interceptor: Interceptor): void;
24
+ healthControllerPing(options?: {
25
+ headers: {
26
+ [name: string]: string;
27
+ };
28
+ }): Promise<{
29
+ response: http.IncomingMessage;
30
+ body: HealthControllerPing200Response;
31
+ }>;
32
+ }
@@ -1,175 +1,175 @@
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.HealthApi = exports.HealthApiApiKeys = 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 HealthApiApiKeys;
48
- (function (HealthApiApiKeys) {
49
- })(HealthApiApiKeys = exports.HealthApiApiKeys || (exports.HealthApiApiKeys = {}));
50
- var HealthApi = (function () {
51
- function HealthApi(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(HealthApi.prototype, "useQuerystring", {
71
- set: function (value) {
72
- this._useQuerystring = value;
73
- },
74
- enumerable: false,
75
- configurable: true
76
- });
77
- Object.defineProperty(HealthApi.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(HealthApi.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
- HealthApi.prototype.setDefaultAuthentication = function (auth) {
98
- this.authentications.default = auth;
99
- };
100
- HealthApi.prototype.setApiKey = function (key, value) {
101
- this.authentications[HealthApiApiKeys[key]].apiKey = value;
102
- };
103
- HealthApi.prototype.addInterceptor = function (interceptor) {
104
- this.interceptors.push(interceptor);
105
- };
106
- HealthApi.prototype.healthControllerPing = function (options) {
107
- if (options === void 0) { options = { headers: {} }; }
108
- return __awaiter(this, void 0, void 0, function () {
109
- var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_1, _i, _a, interceptor;
110
- var _this = this;
111
- return __generator(this, function (_b) {
112
- localVarPath = this.basePath + '/ping';
113
- localVarQueryParameters = {};
114
- localVarHeaderParams = Object.assign({}, this._defaultHeaders);
115
- produces = ['application/json'];
116
- if (produces.indexOf('application/json') >= 0) {
117
- localVarHeaderParams.Accept = 'application/json';
118
- }
119
- else {
120
- localVarHeaderParams.Accept = produces.join(',');
121
- }
122
- localVarFormParams = {};
123
- Object.assign(localVarHeaderParams, options.headers);
124
- localVarUseFormData = false;
125
- localVarRequestOptions = {
126
- method: 'GET',
127
- qs: localVarQueryParameters,
128
- headers: localVarHeaderParams,
129
- uri: localVarPath,
130
- useQuerystring: this._useQuerystring,
131
- json: true,
132
- };
133
- authenticationPromise = Promise.resolve();
134
- authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
135
- interceptorPromise = authenticationPromise;
136
- _loop_1 = function (interceptor) {
137
- interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
138
- };
139
- for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
140
- interceptor = _a[_i];
141
- _loop_1(interceptor);
142
- }
143
- return [2, interceptorPromise.then(function () {
144
- if (Object.keys(localVarFormParams).length) {
145
- if (localVarUseFormData) {
146
- localVarRequestOptions.formData = localVarFormParams;
147
- }
148
- else {
149
- localVarRequestOptions.form = localVarFormParams;
150
- }
151
- }
152
- return new Promise(function (resolve, reject) {
153
- (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
154
- if (error) {
155
- reject(error);
156
- }
157
- else {
158
- if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
159
- body = models_1.ObjectSerializer.deserialize(body, "HealthControllerPing200Response");
160
- resolve({ response: response, body: body });
161
- }
162
- else {
163
- reject(new apis_1.HttpError(response, body, response.statusCode));
164
- }
165
- }
166
- });
167
- });
168
- })];
169
- });
170
- });
171
- };
172
- return HealthApi;
173
- }());
174
- exports.HealthApi = HealthApi;
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.HealthApi = exports.HealthApiApiKeys = 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 HealthApiApiKeys;
48
+ (function (HealthApiApiKeys) {
49
+ })(HealthApiApiKeys = exports.HealthApiApiKeys || (exports.HealthApiApiKeys = {}));
50
+ var HealthApi = (function () {
51
+ function HealthApi(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(HealthApi.prototype, "useQuerystring", {
71
+ set: function (value) {
72
+ this._useQuerystring = value;
73
+ },
74
+ enumerable: false,
75
+ configurable: true
76
+ });
77
+ Object.defineProperty(HealthApi.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(HealthApi.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
+ HealthApi.prototype.setDefaultAuthentication = function (auth) {
98
+ this.authentications.default = auth;
99
+ };
100
+ HealthApi.prototype.setApiKey = function (key, value) {
101
+ this.authentications[HealthApiApiKeys[key]].apiKey = value;
102
+ };
103
+ HealthApi.prototype.addInterceptor = function (interceptor) {
104
+ this.interceptors.push(interceptor);
105
+ };
106
+ HealthApi.prototype.healthControllerPing = function (options) {
107
+ if (options === void 0) { options = { headers: {} }; }
108
+ return __awaiter(this, void 0, void 0, function () {
109
+ var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_1, _i, _a, interceptor;
110
+ var _this = this;
111
+ return __generator(this, function (_b) {
112
+ localVarPath = this.basePath + '/ping';
113
+ localVarQueryParameters = {};
114
+ localVarHeaderParams = Object.assign({}, this._defaultHeaders);
115
+ produces = ['application/json'];
116
+ if (produces.indexOf('application/json') >= 0) {
117
+ localVarHeaderParams.Accept = 'application/json';
118
+ }
119
+ else {
120
+ localVarHeaderParams.Accept = produces.join(',');
121
+ }
122
+ localVarFormParams = {};
123
+ Object.assign(localVarHeaderParams, options.headers);
124
+ localVarUseFormData = false;
125
+ localVarRequestOptions = {
126
+ method: 'GET',
127
+ qs: localVarQueryParameters,
128
+ headers: localVarHeaderParams,
129
+ uri: localVarPath,
130
+ useQuerystring: this._useQuerystring,
131
+ json: true,
132
+ };
133
+ authenticationPromise = Promise.resolve();
134
+ authenticationPromise = authenticationPromise.then(function () { return _this.authentications.default.applyToRequest(localVarRequestOptions); });
135
+ interceptorPromise = authenticationPromise;
136
+ _loop_1 = function (interceptor) {
137
+ interceptorPromise = interceptorPromise.then(function () { return interceptor(localVarRequestOptions); });
138
+ };
139
+ for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
140
+ interceptor = _a[_i];
141
+ _loop_1(interceptor);
142
+ }
143
+ return [2, interceptorPromise.then(function () {
144
+ if (Object.keys(localVarFormParams).length) {
145
+ if (localVarUseFormData) {
146
+ localVarRequestOptions.formData = localVarFormParams;
147
+ }
148
+ else {
149
+ localVarRequestOptions.form = localVarFormParams;
150
+ }
151
+ }
152
+ return new Promise(function (resolve, reject) {
153
+ (0, request_1.default)(localVarRequestOptions, function (error, response, body) {
154
+ if (error) {
155
+ reject(error);
156
+ }
157
+ else {
158
+ if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
159
+ body = models_1.ObjectSerializer.deserialize(body, "HealthControllerPing200Response");
160
+ resolve({ response: response, body: body });
161
+ }
162
+ else {
163
+ reject(new apis_1.HttpError(response, body, response.statusCode));
164
+ }
165
+ }
166
+ });
167
+ });
168
+ })];
169
+ });
170
+ });
171
+ };
172
+ return HealthApi;
173
+ }());
174
+ exports.HealthApi = HealthApi;
175
175
  //# sourceMappingURL=healthApi.js.map