@tradecafe/offer-service-sdk 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +16 -15
- package/api/apis.ts +3 -1
- package/api/automatedOffersApi.ts +511 -0
- package/dist/api/apis.d.ts +20 -18
- package/dist/api/apis.js +56 -54
- package/dist/api/apis.js.map +1 -1
- package/dist/api/automatedOffersApi.d.ts +71 -0
- package/dist/api/automatedOffersApi.js +514 -0
- package/dist/api/automatedOffersApi.js.map +1 -0
- package/dist/api/futureBidsApi.d.ts +55 -55
- package/dist/api/futureBidsApi.js +393 -393
- package/dist/api/healthApi.d.ts +32 -32
- package/dist/api/healthApi.js +174 -174
- package/dist/api/matchedOffersApi.d.ts +151 -151
- package/dist/api/matchedOffersApi.js +1199 -1199
- package/dist/api/offersApi.d.ts +175 -175
- package/dist/api/offersApi.js +1397 -1397
- package/dist/api.d.ts +2 -2
- package/dist/api.js +18 -18
- package/dist/model/healthControllerPing200Response.d.ts +24 -24
- package/dist/model/healthControllerPing200Response.js +35 -35
- package/dist/model/healthControllerPing200ResponseInfoValue.d.ts +10 -10
- package/dist/model/healthControllerPing200ResponseInfoValue.js +36 -36
- package/dist/model/healthControllerPing503Response.d.ts +24 -24
- package/dist/model/healthControllerPing503Response.js +35 -35
- package/dist/model/models.d.ts +49 -49
- package/dist/model/models.js +231 -231
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
.gitignore
|
|
2
|
-
.openapi-generator-ignore
|
|
3
|
-
api.ts
|
|
4
|
-
api/apis.ts
|
|
5
|
-
api/
|
|
6
|
-
api/
|
|
7
|
-
api/
|
|
8
|
-
api/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
model/
|
|
12
|
-
model/
|
|
13
|
-
model/
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
.gitignore
|
|
2
|
+
.openapi-generator-ignore
|
|
3
|
+
api.ts
|
|
4
|
+
api/apis.ts
|
|
5
|
+
api/automatedOffersApi.ts
|
|
6
|
+
api/futureBidsApi.ts
|
|
7
|
+
api/healthApi.ts
|
|
8
|
+
api/matchedOffersApi.ts
|
|
9
|
+
api/offersApi.ts
|
|
10
|
+
git_push.sh
|
|
11
|
+
model/healthControllerPing200Response.ts
|
|
12
|
+
model/healthControllerPing200ResponseInfoValue.ts
|
|
13
|
+
model/healthControllerPing503Response.ts
|
|
14
|
+
model/models.ts
|
|
15
|
+
package.json
|
|
16
|
+
tsconfig.json
|
package/api/apis.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './automatedOffersApi';
|
|
2
|
+
import { AutomatedOffersApi } from './automatedOffersApi';
|
|
1
3
|
export * from './futureBidsApi';
|
|
2
4
|
import { FutureBidsApi } from './futureBidsApi';
|
|
3
5
|
export * from './healthApi';
|
|
@@ -17,4 +19,4 @@ export class HttpError extends Error {
|
|
|
17
19
|
|
|
18
20
|
export { RequestFile } from '../model/models';
|
|
19
21
|
|
|
20
|
-
export const APIS = [FutureBidsApi, HealthApi, MatchedOffersApi, OffersApi];
|
|
22
|
+
export const APIS = [AutomatedOffersApi, FutureBidsApi, HealthApi, MatchedOffersApi, OffersApi];
|
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TradeCafé Offer Service
|
|
3
|
+
* Offer Service allows supplies to submit product offers into the TradeCafe platform
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import localVarRequest from 'request';
|
|
15
|
+
import http from 'http';
|
|
16
|
+
|
|
17
|
+
/* tslint:disable:no-unused-locals */
|
|
18
|
+
|
|
19
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
20
|
+
|
|
21
|
+
import { HttpError, RequestFile } from './apis';
|
|
22
|
+
|
|
23
|
+
let defaultBasePath = 'http://localhost';
|
|
24
|
+
|
|
25
|
+
// ===============================================
|
|
26
|
+
// This file is autogenerated - Please do not edit
|
|
27
|
+
// ===============================================
|
|
28
|
+
|
|
29
|
+
export enum AutomatedOffersApiApiKeys {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export class AutomatedOffersApi {
|
|
33
|
+
protected _basePath = defaultBasePath;
|
|
34
|
+
protected _defaultHeaders : any = {};
|
|
35
|
+
protected _useQuerystring : boolean = false;
|
|
36
|
+
|
|
37
|
+
protected authentications = {
|
|
38
|
+
'default': <Authentication>new VoidAuth(),
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
protected interceptors: Interceptor[] = [];
|
|
42
|
+
|
|
43
|
+
constructor(basePath?: string);
|
|
44
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
45
|
+
if (password) {
|
|
46
|
+
if (basePath) {
|
|
47
|
+
this.basePath = basePath;
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
if (basePathOrUsername) {
|
|
51
|
+
this.basePath = basePathOrUsername
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
set useQuerystring(value: boolean) {
|
|
57
|
+
this._useQuerystring = value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
set basePath(basePath: string) {
|
|
61
|
+
this._basePath = basePath;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
65
|
+
this._defaultHeaders = defaultHeaders;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
get defaultHeaders() {
|
|
69
|
+
return this._defaultHeaders;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
get basePath() {
|
|
73
|
+
return this._basePath;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
77
|
+
this.authentications.default = auth;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
public setApiKey(key: AutomatedOffersApiApiKeys, value: string) {
|
|
81
|
+
(this.authentications as any)[AutomatedOffersApiApiKeys[key]].apiKey = value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
85
|
+
this.interceptors.push(interceptor);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @summary Creates a new automated offers
|
|
91
|
+
* @param account
|
|
92
|
+
* @param body
|
|
93
|
+
*/
|
|
94
|
+
public async automatedOffersControllerCreate (account: string, body: object, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
95
|
+
const localVarPath = this.basePath + '/automated-offers/{account}'
|
|
96
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
97
|
+
let localVarQueryParameters: any = {};
|
|
98
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
99
|
+
let localVarFormParams: any = {};
|
|
100
|
+
|
|
101
|
+
// verify required parameter 'account' is not null or undefined
|
|
102
|
+
if (account === null || account === undefined) {
|
|
103
|
+
throw new Error('Required parameter account was null or undefined when calling automatedOffersControllerCreate.');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// verify required parameter 'body' is not null or undefined
|
|
107
|
+
if (body === null || body === undefined) {
|
|
108
|
+
throw new Error('Required parameter body was null or undefined when calling automatedOffersControllerCreate.');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
112
|
+
|
|
113
|
+
let localVarUseFormData = false;
|
|
114
|
+
|
|
115
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
116
|
+
method: 'POST',
|
|
117
|
+
qs: localVarQueryParameters,
|
|
118
|
+
headers: localVarHeaderParams,
|
|
119
|
+
uri: localVarPath,
|
|
120
|
+
useQuerystring: this._useQuerystring,
|
|
121
|
+
json: true,
|
|
122
|
+
body: ObjectSerializer.serialize(body, "object")
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
let authenticationPromise = Promise.resolve();
|
|
126
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
127
|
+
|
|
128
|
+
let interceptorPromise = authenticationPromise;
|
|
129
|
+
for (const interceptor of this.interceptors) {
|
|
130
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return interceptorPromise.then(() => {
|
|
134
|
+
if (Object.keys(localVarFormParams).length) {
|
|
135
|
+
if (localVarUseFormData) {
|
|
136
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
137
|
+
} else {
|
|
138
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
142
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
143
|
+
if (error) {
|
|
144
|
+
reject(error);
|
|
145
|
+
} else {
|
|
146
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
147
|
+
resolve({ response: response, body: body });
|
|
148
|
+
} else {
|
|
149
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
*
|
|
158
|
+
* @summary Retrieves a list of all automated offer
|
|
159
|
+
* @param account
|
|
160
|
+
* @param body
|
|
161
|
+
* @param skip
|
|
162
|
+
* @param limit
|
|
163
|
+
* @param sort
|
|
164
|
+
*/
|
|
165
|
+
public async automatedOffersControllerFindall (account: string, body: object, skip?: number, limit?: number, sort?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
166
|
+
const localVarPath = this.basePath + '/automated-offers/{account}'
|
|
167
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
168
|
+
let localVarQueryParameters: any = {};
|
|
169
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
170
|
+
let localVarFormParams: any = {};
|
|
171
|
+
|
|
172
|
+
// verify required parameter 'account' is not null or undefined
|
|
173
|
+
if (account === null || account === undefined) {
|
|
174
|
+
throw new Error('Required parameter account was null or undefined when calling automatedOffersControllerFindall.');
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// verify required parameter 'body' is not null or undefined
|
|
178
|
+
if (body === null || body === undefined) {
|
|
179
|
+
throw new Error('Required parameter body was null or undefined when calling automatedOffersControllerFindall.');
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (skip !== undefined) {
|
|
183
|
+
localVarQueryParameters['skip'] = ObjectSerializer.serialize(skip, "number");
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (limit !== undefined) {
|
|
187
|
+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (sort !== undefined) {
|
|
191
|
+
localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "string");
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
195
|
+
|
|
196
|
+
let localVarUseFormData = false;
|
|
197
|
+
|
|
198
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
199
|
+
method: 'GET',
|
|
200
|
+
qs: localVarQueryParameters,
|
|
201
|
+
headers: localVarHeaderParams,
|
|
202
|
+
uri: localVarPath,
|
|
203
|
+
useQuerystring: this._useQuerystring,
|
|
204
|
+
json: true,
|
|
205
|
+
body: ObjectSerializer.serialize(body, "object")
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
let authenticationPromise = Promise.resolve();
|
|
209
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
210
|
+
|
|
211
|
+
let interceptorPromise = authenticationPromise;
|
|
212
|
+
for (const interceptor of this.interceptors) {
|
|
213
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
return interceptorPromise.then(() => {
|
|
217
|
+
if (Object.keys(localVarFormParams).length) {
|
|
218
|
+
if (localVarUseFormData) {
|
|
219
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
220
|
+
} else {
|
|
221
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
225
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
226
|
+
if (error) {
|
|
227
|
+
reject(error);
|
|
228
|
+
} else {
|
|
229
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
230
|
+
resolve({ response: response, body: body });
|
|
231
|
+
} else {
|
|
232
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @summary Retrieves the automated offer with the provided ID
|
|
242
|
+
* @param id
|
|
243
|
+
* @param account
|
|
244
|
+
*/
|
|
245
|
+
public async automatedOffersControllerFindone (id: string, account: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
246
|
+
const localVarPath = this.basePath + '/automated-offers/{account}/{id}'
|
|
247
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
248
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
249
|
+
let localVarQueryParameters: any = {};
|
|
250
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
251
|
+
let localVarFormParams: any = {};
|
|
252
|
+
|
|
253
|
+
// verify required parameter 'id' is not null or undefined
|
|
254
|
+
if (id === null || id === undefined) {
|
|
255
|
+
throw new Error('Required parameter id was null or undefined when calling automatedOffersControllerFindone.');
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// verify required parameter 'account' is not null or undefined
|
|
259
|
+
if (account === null || account === undefined) {
|
|
260
|
+
throw new Error('Required parameter account was null or undefined when calling automatedOffersControllerFindone.');
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
264
|
+
|
|
265
|
+
let localVarUseFormData = false;
|
|
266
|
+
|
|
267
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
268
|
+
method: 'GET',
|
|
269
|
+
qs: localVarQueryParameters,
|
|
270
|
+
headers: localVarHeaderParams,
|
|
271
|
+
uri: localVarPath,
|
|
272
|
+
useQuerystring: this._useQuerystring,
|
|
273
|
+
json: true,
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
let authenticationPromise = Promise.resolve();
|
|
277
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
278
|
+
|
|
279
|
+
let interceptorPromise = authenticationPromise;
|
|
280
|
+
for (const interceptor of this.interceptors) {
|
|
281
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
return interceptorPromise.then(() => {
|
|
285
|
+
if (Object.keys(localVarFormParams).length) {
|
|
286
|
+
if (localVarUseFormData) {
|
|
287
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
288
|
+
} else {
|
|
289
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
293
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
294
|
+
if (error) {
|
|
295
|
+
reject(error);
|
|
296
|
+
} else {
|
|
297
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
298
|
+
resolve({ response: response, body: body });
|
|
299
|
+
} else {
|
|
300
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
*
|
|
309
|
+
* @summary Retrieves the automated offers relistings
|
|
310
|
+
* @param account
|
|
311
|
+
*/
|
|
312
|
+
public async automatedOffersControllerGetrelistings (account: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
313
|
+
const localVarPath = this.basePath + '/automated-offers/{account}/relistings-for-execution'
|
|
314
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
315
|
+
let localVarQueryParameters: any = {};
|
|
316
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
317
|
+
let localVarFormParams: any = {};
|
|
318
|
+
|
|
319
|
+
// verify required parameter 'account' is not null or undefined
|
|
320
|
+
if (account === null || account === undefined) {
|
|
321
|
+
throw new Error('Required parameter account was null or undefined when calling automatedOffersControllerGetrelistings.');
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
325
|
+
|
|
326
|
+
let localVarUseFormData = false;
|
|
327
|
+
|
|
328
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
329
|
+
method: 'GET',
|
|
330
|
+
qs: localVarQueryParameters,
|
|
331
|
+
headers: localVarHeaderParams,
|
|
332
|
+
uri: localVarPath,
|
|
333
|
+
useQuerystring: this._useQuerystring,
|
|
334
|
+
json: true,
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
let authenticationPromise = Promise.resolve();
|
|
338
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
339
|
+
|
|
340
|
+
let interceptorPromise = authenticationPromise;
|
|
341
|
+
for (const interceptor of this.interceptors) {
|
|
342
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return interceptorPromise.then(() => {
|
|
346
|
+
if (Object.keys(localVarFormParams).length) {
|
|
347
|
+
if (localVarUseFormData) {
|
|
348
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
349
|
+
} else {
|
|
350
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
354
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
355
|
+
if (error) {
|
|
356
|
+
reject(error);
|
|
357
|
+
} else {
|
|
358
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
359
|
+
resolve({ response: response, body: body });
|
|
360
|
+
} else {
|
|
361
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
*
|
|
370
|
+
* @summary Removes the automated offer with the provided ID
|
|
371
|
+
* @param id
|
|
372
|
+
* @param account
|
|
373
|
+
*/
|
|
374
|
+
public async automatedOffersControllerRemove (id: string, account: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
375
|
+
const localVarPath = this.basePath + '/automated-offers/{account}/{id}'
|
|
376
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
377
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
378
|
+
let localVarQueryParameters: any = {};
|
|
379
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
380
|
+
let localVarFormParams: any = {};
|
|
381
|
+
|
|
382
|
+
// verify required parameter 'id' is not null or undefined
|
|
383
|
+
if (id === null || id === undefined) {
|
|
384
|
+
throw new Error('Required parameter id was null or undefined when calling automatedOffersControllerRemove.');
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// verify required parameter 'account' is not null or undefined
|
|
388
|
+
if (account === null || account === undefined) {
|
|
389
|
+
throw new Error('Required parameter account was null or undefined when calling automatedOffersControllerRemove.');
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
393
|
+
|
|
394
|
+
let localVarUseFormData = false;
|
|
395
|
+
|
|
396
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
397
|
+
method: 'DELETE',
|
|
398
|
+
qs: localVarQueryParameters,
|
|
399
|
+
headers: localVarHeaderParams,
|
|
400
|
+
uri: localVarPath,
|
|
401
|
+
useQuerystring: this._useQuerystring,
|
|
402
|
+
json: true,
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
let authenticationPromise = Promise.resolve();
|
|
406
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
407
|
+
|
|
408
|
+
let interceptorPromise = authenticationPromise;
|
|
409
|
+
for (const interceptor of this.interceptors) {
|
|
410
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
return interceptorPromise.then(() => {
|
|
414
|
+
if (Object.keys(localVarFormParams).length) {
|
|
415
|
+
if (localVarUseFormData) {
|
|
416
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
417
|
+
} else {
|
|
418
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
422
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
423
|
+
if (error) {
|
|
424
|
+
reject(error);
|
|
425
|
+
} else {
|
|
426
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
427
|
+
resolve({ response: response, body: body });
|
|
428
|
+
} else {
|
|
429
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
*
|
|
438
|
+
* @summary Updates the automated offer with the provided ID
|
|
439
|
+
* @param id
|
|
440
|
+
* @param account
|
|
441
|
+
* @param body
|
|
442
|
+
*/
|
|
443
|
+
public async automatedOffersControllerUpdate (id: string, account: string, body: object, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
444
|
+
const localVarPath = this.basePath + '/automated-offers/{account}/{id}'
|
|
445
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
|
|
446
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
447
|
+
let localVarQueryParameters: any = {};
|
|
448
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
449
|
+
let localVarFormParams: any = {};
|
|
450
|
+
|
|
451
|
+
// verify required parameter 'id' is not null or undefined
|
|
452
|
+
if (id === null || id === undefined) {
|
|
453
|
+
throw new Error('Required parameter id was null or undefined when calling automatedOffersControllerUpdate.');
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// verify required parameter 'account' is not null or undefined
|
|
457
|
+
if (account === null || account === undefined) {
|
|
458
|
+
throw new Error('Required parameter account was null or undefined when calling automatedOffersControllerUpdate.');
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// verify required parameter 'body' is not null or undefined
|
|
462
|
+
if (body === null || body === undefined) {
|
|
463
|
+
throw new Error('Required parameter body was null or undefined when calling automatedOffersControllerUpdate.');
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
467
|
+
|
|
468
|
+
let localVarUseFormData = false;
|
|
469
|
+
|
|
470
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
471
|
+
method: 'PUT',
|
|
472
|
+
qs: localVarQueryParameters,
|
|
473
|
+
headers: localVarHeaderParams,
|
|
474
|
+
uri: localVarPath,
|
|
475
|
+
useQuerystring: this._useQuerystring,
|
|
476
|
+
json: true,
|
|
477
|
+
body: ObjectSerializer.serialize(body, "object")
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
let authenticationPromise = Promise.resolve();
|
|
481
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
482
|
+
|
|
483
|
+
let interceptorPromise = authenticationPromise;
|
|
484
|
+
for (const interceptor of this.interceptors) {
|
|
485
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
return interceptorPromise.then(() => {
|
|
489
|
+
if (Object.keys(localVarFormParams).length) {
|
|
490
|
+
if (localVarUseFormData) {
|
|
491
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
492
|
+
} else {
|
|
493
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
497
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
498
|
+
if (error) {
|
|
499
|
+
reject(error);
|
|
500
|
+
} else {
|
|
501
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
502
|
+
resolve({ response: response, body: body });
|
|
503
|
+
} else {
|
|
504
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}
|
package/dist/api/apis.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
export * from './
|
|
3
|
-
import {
|
|
4
|
-
export * from './
|
|
5
|
-
import {
|
|
6
|
-
export * from './
|
|
7
|
-
import {
|
|
8
|
-
export * from './
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export * from './automatedOffersApi';
|
|
3
|
+
import { AutomatedOffersApi } from './automatedOffersApi';
|
|
4
|
+
export * from './futureBidsApi';
|
|
5
|
+
import { FutureBidsApi } from './futureBidsApi';
|
|
6
|
+
export * from './healthApi';
|
|
7
|
+
import { HealthApi } from './healthApi';
|
|
8
|
+
export * from './matchedOffersApi';
|
|
9
|
+
import { MatchedOffersApi } from './matchedOffersApi';
|
|
10
|
+
export * from './offersApi';
|
|
11
|
+
import { OffersApi } from './offersApi';
|
|
12
|
+
import * as http from 'http';
|
|
13
|
+
export declare class HttpError extends Error {
|
|
14
|
+
response: http.IncomingMessage;
|
|
15
|
+
body: any;
|
|
16
|
+
statusCode?: number | undefined;
|
|
17
|
+
constructor(response: http.IncomingMessage, body: any, statusCode?: number | undefined);
|
|
18
|
+
}
|
|
19
|
+
export { RequestFile } from '../model/models';
|
|
20
|
+
export declare const APIS: (typeof AutomatedOffersApi | typeof FutureBidsApi | typeof HealthApi | typeof MatchedOffersApi | typeof OffersApi)[];
|