@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.
- package/.openapi-generator/FILES +77 -69
- package/api/apis.ts +3 -1
- package/api/matchedOffersApi.ts +260 -0
- package/api/promoTextsApi.ts +426 -0
- package/dist/api/apis.d.ts +22 -20
- package/dist/api/apis.js +58 -56
- package/dist/api/apis.js.map +1 -1
- package/dist/api/automatedOffersApi.d.ts +156 -156
- package/dist/api/automatedOffersApi.js +1218 -1218
- package/dist/api/futureBidsApi.d.ts +65 -65
- package/dist/api/futureBidsApi.js +456 -456
- package/dist/api/healthApi.d.ts +32 -32
- package/dist/api/healthApi.js +174 -174
- package/dist/api/matchedOffersApi.d.ts +301 -267
- package/dist/api/matchedOffersApi.js +2330 -2074
- package/dist/api/matchedOffersApi.js.map +1 -1
- package/dist/api/offersApi.d.ts +200 -200
- package/dist/api/offersApi.js +1605 -1605
- package/dist/api/promoTextsApi.d.ts +67 -0
- package/dist/api/promoTextsApi.js +436 -0
- package/dist/api/promoTextsApi.js.map +1 -0
- package/dist/api.d.ts +2 -2
- package/dist/api.js +18 -18
- package/dist/model/addFutureBidDto.d.ts +17 -17
- package/dist/model/addFutureBidDto.js +35 -35
- package/dist/model/addMatchedDeliveryDateDto.d.ts +14 -14
- package/dist/model/addMatchedDeliveryDateDto.js +20 -20
- package/dist/model/archivePromoTextDto.d.ts +14 -0
- package/dist/model/archivePromoTextDto.js +21 -0
- package/dist/model/archivePromoTextDto.js.map +1 -0
- package/dist/model/associatedCostDto.d.ts +16 -16
- package/dist/model/associatedCostDto.js +30 -30
- package/dist/model/bulkAddRelistingDto.d.ts +16 -16
- package/dist/model/bulkAddRelistingDto.js +25 -25
- package/dist/model/bulkAddTertiaryCostsDto.d.ts +16 -16
- package/dist/model/bulkAddTertiaryCostsDto.js +25 -25
- package/dist/model/bulkCancelPromotionDto.d.ts +16 -0
- package/dist/model/bulkCancelPromotionDto.js +31 -0
- package/dist/model/bulkCancelPromotionDto.js.map +1 -0
- package/dist/model/bulkChangeDestinationLocationDto.d.ts +16 -16
- package/dist/model/bulkChangeDestinationLocationDto.js +30 -30
- package/dist/model/bulkChangeFreightRatesDto.d.ts +19 -19
- package/dist/model/bulkChangeFreightRatesDto.js +40 -40
- package/dist/model/bulkChangeIncotermDto.d.ts +16 -16
- package/dist/model/bulkChangeIncotermDto.js +30 -30
- package/dist/model/bulkChangeSellPriceItemDto.d.ts +20 -20
- package/dist/model/bulkChangeSellPriceItemDto.js +45 -45
- package/dist/model/bulkChangeSellPricesDto.d.ts +23 -23
- package/dist/model/bulkChangeSellPricesDto.js +55 -55
- package/dist/model/bulkChangeSellingTraderDto.d.ts +16 -16
- package/dist/model/bulkChangeSellingTraderDto.js +30 -30
- package/dist/model/bulkDeleteBuyerSpecialInstructionsDto.d.ts +15 -15
- package/dist/model/bulkDeleteBuyerSpecialInstructionsDto.js +25 -25
- package/dist/model/bulkPromoteDto.d.ts +17 -0
- package/dist/model/bulkPromoteDto.js +36 -0
- package/dist/model/bulkPromoteDto.js.map +1 -0
- package/dist/model/bulkUpdateBuyerSpecialInstructionsDto.d.ts +19 -19
- package/dist/model/bulkUpdateBuyerSpecialInstructionsDto.js +45 -45
- package/dist/model/bulkUpdateDeliveryDatesDto.d.ts +16 -16
- package/dist/model/bulkUpdateDeliveryDatesDto.js +30 -30
- package/dist/model/bulkUpdateDocsCountryDto.d.ts +16 -16
- package/dist/model/bulkUpdateDocsCountryDto.js +30 -30
- package/dist/model/bulkUpdateMatchedDeliveryDatesDto.d.ts +15 -15
- package/dist/model/bulkUpdateMatchedDeliveryDatesDto.js +25 -25
- package/dist/model/costAmountDto.d.ts +17 -17
- package/dist/model/costAmountDto.js +35 -35
- package/dist/model/costAttributesDto.d.ts +32 -32
- package/dist/model/costAttributesDto.js +100 -100
- package/dist/model/costAttributesDtoAssociated.d.ts +16 -16
- package/dist/model/costAttributesDtoAssociated.js +30 -30
- package/dist/model/costAttributesDtoDefaultCost.d.ts +18 -18
- package/dist/model/costAttributesDtoDefaultCost.js +40 -40
- package/dist/model/costDto.d.ts +35 -35
- package/dist/model/costDto.js +110 -110
- package/dist/model/costDtoAmount.d.ts +17 -17
- package/dist/model/costDtoAmount.js +35 -35
- package/dist/model/costDtoAttributes.d.ts +32 -32
- package/dist/model/costDtoAttributes.js +100 -100
- package/dist/model/costDtoSource.d.ts +15 -15
- package/dist/model/costDtoSource.js +25 -25
- package/dist/model/costSourceDto.d.ts +15 -15
- package/dist/model/costSourceDto.js +25 -25
- package/dist/model/createAutomatedOfferDto.d.ts +124 -124
- package/dist/model/createAutomatedOfferDto.js +419 -419
- package/dist/model/createMatchedOfferDto.d.ts +85 -85
- package/dist/model/createMatchedOfferDto.js +315 -315
- package/dist/model/createMatchedOfferDtoAttributes.d.ts +34 -34
- package/dist/model/createMatchedOfferDtoAttributes.js +94 -94
- package/dist/model/createOfferDto.d.ts +111 -111
- package/dist/model/createOfferDto.js +397 -397
- package/dist/model/createOfferDtoAttributes.d.ts +52 -52
- package/dist/model/createOfferDtoAttributes.js +174 -174
- package/dist/model/createOfferDtoFormula.d.ts +19 -19
- package/dist/model/createOfferDtoFormula.js +40 -40
- package/dist/model/createOfferDtoPacking.d.ts +17 -17
- package/dist/model/createOfferDtoPacking.js +35 -35
- package/dist/model/createOfferDtoWeight.d.ts +15 -15
- package/dist/model/createOfferDtoWeight.js +25 -25
- package/dist/model/createPromoTextDto.d.ts +17 -0
- package/dist/model/createPromoTextDto.js +31 -0
- package/dist/model/createPromoTextDto.js.map +1 -0
- package/dist/model/defaultCostDto.d.ts +18 -18
- package/dist/model/defaultCostDto.js +40 -40
- package/dist/model/formulaDto.d.ts +19 -19
- package/dist/model/formulaDto.js +40 -40
- package/dist/model/formulaLineDto.d.ts +17 -17
- package/dist/model/formulaLineDto.js +35 -35
- package/dist/model/generalAddressDto.d.ts +43 -43
- package/dist/model/generalAddressDto.js +165 -165
- 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/matchedOfferAttributesDto.d.ts +34 -34
- package/dist/model/matchedOfferAttributesDto.js +94 -94
- package/dist/model/models.d.ts +109 -102
- package/dist/model/models.js +424 -402
- package/dist/model/models.js.map +1 -1
- package/dist/model/offerAttributesDto.d.ts +52 -52
- package/dist/model/offerAttributesDto.js +174 -174
- package/dist/model/offerAttributesDtoEstablishment.d.ts +43 -43
- package/dist/model/offerAttributesDtoEstablishment.js +165 -165
- package/dist/model/overwriteItemDto.d.ts +22 -22
- package/dist/model/overwriteItemDto.js +55 -55
- package/dist/model/overwriteItemDtoWeight.d.ts +14 -14
- package/dist/model/overwriteItemDtoWeight.js +20 -20
- package/dist/model/packing.d.ts +17 -17
- package/dist/model/packing.js +35 -35
- package/dist/model/pinActionDto.d.ts +14 -14
- package/dist/model/pinActionDto.js +20 -20
- package/dist/model/promoTextPairDto.d.ts +24 -0
- package/dist/model/promoTextPairDto.js +41 -0
- package/dist/model/promoTextPairDto.js.map +1 -0
- package/dist/model/relistingConfigDto.d.ts +17 -17
- package/dist/model/relistingConfigDto.js +35 -35
- package/dist/model/relistingDetailDto.d.ts +31 -31
- package/dist/model/relistingDetailDto.js +62 -62
- package/dist/model/relistingDetailDtoRandomConfig.d.ts +19 -19
- package/dist/model/relistingDetailDtoRandomConfig.js +45 -45
- package/dist/model/relistingRandomConfigDto.d.ts +19 -19
- package/dist/model/relistingRandomConfigDto.js +45 -45
- package/dist/model/searchPromoTextDto.d.ts +15 -0
- package/dist/model/searchPromoTextDto.js +26 -0
- package/dist/model/searchPromoTextDto.js.map +1 -0
- package/dist/model/updateFutureBidDto.d.ts +17 -17
- package/dist/model/updateFutureBidDto.js +35 -35
- package/dist/model/updateMatchedDeliveryDateDto.d.ts +15 -15
- package/dist/model/updateMatchedDeliveryDateDto.js +25 -25
- package/dist/model/updatePromoTextDto.d.ts +17 -0
- package/dist/model/updatePromoTextDto.js +31 -0
- package/dist/model/updatePromoTextDto.js.map +1 -0
- package/dist/model/userPin.d.ts +15 -15
- package/dist/model/userPin.js +25 -25
- package/dist/model/weight.d.ts +15 -15
- package/dist/model/weight.js +25 -25
- package/dist/model/weightDto.d.ts +14 -14
- package/dist/model/weightDto.js +20 -20
- package/model/archivePromoTextDto.ts +34 -0
- package/model/bulkCancelPromotionDto.ts +49 -0
- package/model/bulkPromoteDto.ts +55 -0
- package/model/createPromoTextDto.ts +53 -0
- package/model/models.ts +22 -0
- package/model/promoTextPairDto.ts +60 -0
- package/model/searchPromoTextDto.ts +43 -0
- package/model/updatePromoTextDto.ts +47 -0
- package/package.json +1 -1
|
@@ -0,0 +1,426 @@
|
|
|
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
|
+
import { ArchivePromoTextDto } from '../model/archivePromoTextDto';
|
|
19
|
+
import { CreatePromoTextDto } from '../model/createPromoTextDto';
|
|
20
|
+
import { SearchPromoTextDto } from '../model/searchPromoTextDto';
|
|
21
|
+
import { UpdatePromoTextDto } from '../model/updatePromoTextDto';
|
|
22
|
+
|
|
23
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
24
|
+
|
|
25
|
+
import { HttpError, RequestFile } from './apis';
|
|
26
|
+
|
|
27
|
+
let defaultBasePath = 'http://localhost';
|
|
28
|
+
|
|
29
|
+
// ===============================================
|
|
30
|
+
// This file is autogenerated - Please do not edit
|
|
31
|
+
// ===============================================
|
|
32
|
+
|
|
33
|
+
export enum PromoTextsApiApiKeys {
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class PromoTextsApi {
|
|
37
|
+
protected _basePath = defaultBasePath;
|
|
38
|
+
protected _defaultHeaders : any = {};
|
|
39
|
+
protected _useQuerystring : boolean = false;
|
|
40
|
+
|
|
41
|
+
protected authentications = {
|
|
42
|
+
'default': <Authentication>new VoidAuth(),
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
protected interceptors: Interceptor[] = [];
|
|
46
|
+
|
|
47
|
+
constructor(basePath?: string);
|
|
48
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
49
|
+
if (password) {
|
|
50
|
+
if (basePath) {
|
|
51
|
+
this.basePath = basePath;
|
|
52
|
+
}
|
|
53
|
+
} else {
|
|
54
|
+
if (basePathOrUsername) {
|
|
55
|
+
this.basePath = basePathOrUsername
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
set useQuerystring(value: boolean) {
|
|
61
|
+
this._useQuerystring = value;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
set basePath(basePath: string) {
|
|
65
|
+
this._basePath = basePath;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
69
|
+
this._defaultHeaders = defaultHeaders;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
get defaultHeaders() {
|
|
73
|
+
return this._defaultHeaders;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
get basePath() {
|
|
77
|
+
return this._basePath;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
81
|
+
this.authentications.default = auth;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
public setApiKey(key: PromoTextsApiApiKeys, value: string) {
|
|
85
|
+
(this.authentications as any)[PromoTextsApiApiKeys[key]].apiKey = value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
89
|
+
this.interceptors.push(interceptor);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @summary Archives a promo text and cancels every promotion built on it
|
|
95
|
+
* @param promoTextId
|
|
96
|
+
* @param archivePromoTextDto
|
|
97
|
+
*/
|
|
98
|
+
public async promoTextsControllerArchive (promoTextId: string, archivePromoTextDto: ArchivePromoTextDto, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
99
|
+
const localVarPath = this.basePath + '/promo-texts/{promoTextId}'
|
|
100
|
+
.replace('{' + 'promoTextId' + '}', encodeURIComponent(String(promoTextId)));
|
|
101
|
+
let localVarQueryParameters: any = {};
|
|
102
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
103
|
+
let localVarFormParams: any = {};
|
|
104
|
+
|
|
105
|
+
// verify required parameter 'promoTextId' is not null or undefined
|
|
106
|
+
if (promoTextId === null || promoTextId === undefined) {
|
|
107
|
+
throw new Error('Required parameter promoTextId was null or undefined when calling promoTextsControllerArchive.');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// verify required parameter 'archivePromoTextDto' is not null or undefined
|
|
111
|
+
if (archivePromoTextDto === null || archivePromoTextDto === undefined) {
|
|
112
|
+
throw new Error('Required parameter archivePromoTextDto was null or undefined when calling promoTextsControllerArchive.');
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
116
|
+
|
|
117
|
+
let localVarUseFormData = false;
|
|
118
|
+
|
|
119
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
120
|
+
method: 'DELETE',
|
|
121
|
+
qs: localVarQueryParameters,
|
|
122
|
+
headers: localVarHeaderParams,
|
|
123
|
+
uri: localVarPath,
|
|
124
|
+
useQuerystring: this._useQuerystring,
|
|
125
|
+
json: true,
|
|
126
|
+
body: ObjectSerializer.serialize(archivePromoTextDto, "ArchivePromoTextDto")
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
let authenticationPromise = Promise.resolve();
|
|
130
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
131
|
+
|
|
132
|
+
let interceptorPromise = authenticationPromise;
|
|
133
|
+
for (const interceptor of this.interceptors) {
|
|
134
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return interceptorPromise.then(() => {
|
|
138
|
+
if (Object.keys(localVarFormParams).length) {
|
|
139
|
+
if (localVarUseFormData) {
|
|
140
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
141
|
+
} else {
|
|
142
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
146
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
147
|
+
if (error) {
|
|
148
|
+
reject(error);
|
|
149
|
+
} else {
|
|
150
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
151
|
+
resolve({ response: response, body: body });
|
|
152
|
+
} else {
|
|
153
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
* @summary Creates a promo text; seeds the first pair from the name in English
|
|
163
|
+
* @param createPromoTextDto
|
|
164
|
+
*/
|
|
165
|
+
public async promoTextsControllerCreate (createPromoTextDto: CreatePromoTextDto, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
166
|
+
const localVarPath = this.basePath + '/promo-texts';
|
|
167
|
+
let localVarQueryParameters: any = {};
|
|
168
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
169
|
+
let localVarFormParams: any = {};
|
|
170
|
+
|
|
171
|
+
// verify required parameter 'createPromoTextDto' is not null or undefined
|
|
172
|
+
if (createPromoTextDto === null || createPromoTextDto === undefined) {
|
|
173
|
+
throw new Error('Required parameter createPromoTextDto was null or undefined when calling promoTextsControllerCreate.');
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
177
|
+
|
|
178
|
+
let localVarUseFormData = false;
|
|
179
|
+
|
|
180
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
181
|
+
method: 'POST',
|
|
182
|
+
qs: localVarQueryParameters,
|
|
183
|
+
headers: localVarHeaderParams,
|
|
184
|
+
uri: localVarPath,
|
|
185
|
+
useQuerystring: this._useQuerystring,
|
|
186
|
+
json: true,
|
|
187
|
+
body: ObjectSerializer.serialize(createPromoTextDto, "CreatePromoTextDto")
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
let authenticationPromise = Promise.resolve();
|
|
191
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
192
|
+
|
|
193
|
+
let interceptorPromise = authenticationPromise;
|
|
194
|
+
for (const interceptor of this.interceptors) {
|
|
195
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return interceptorPromise.then(() => {
|
|
199
|
+
if (Object.keys(localVarFormParams).length) {
|
|
200
|
+
if (localVarUseFormData) {
|
|
201
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
202
|
+
} else {
|
|
203
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
207
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
208
|
+
if (error) {
|
|
209
|
+
reject(error);
|
|
210
|
+
} else {
|
|
211
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
212
|
+
resolve({ response: response, body: body });
|
|
213
|
+
} else {
|
|
214
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
*
|
|
223
|
+
* @summary Retrieves a single promo text
|
|
224
|
+
* @param promoTextId
|
|
225
|
+
*/
|
|
226
|
+
public async promoTextsControllerFindone (promoTextId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
227
|
+
const localVarPath = this.basePath + '/promo-texts/{promoTextId}'
|
|
228
|
+
.replace('{' + 'promoTextId' + '}', encodeURIComponent(String(promoTextId)));
|
|
229
|
+
let localVarQueryParameters: any = {};
|
|
230
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
231
|
+
let localVarFormParams: any = {};
|
|
232
|
+
|
|
233
|
+
// verify required parameter 'promoTextId' is not null or undefined
|
|
234
|
+
if (promoTextId === null || promoTextId === undefined) {
|
|
235
|
+
throw new Error('Required parameter promoTextId was null or undefined when calling promoTextsControllerFindone.');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
239
|
+
|
|
240
|
+
let localVarUseFormData = false;
|
|
241
|
+
|
|
242
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
243
|
+
method: 'GET',
|
|
244
|
+
qs: localVarQueryParameters,
|
|
245
|
+
headers: localVarHeaderParams,
|
|
246
|
+
uri: localVarPath,
|
|
247
|
+
useQuerystring: this._useQuerystring,
|
|
248
|
+
json: true,
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
let authenticationPromise = Promise.resolve();
|
|
252
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
253
|
+
|
|
254
|
+
let interceptorPromise = authenticationPromise;
|
|
255
|
+
for (const interceptor of this.interceptors) {
|
|
256
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return interceptorPromise.then(() => {
|
|
260
|
+
if (Object.keys(localVarFormParams).length) {
|
|
261
|
+
if (localVarUseFormData) {
|
|
262
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
263
|
+
} else {
|
|
264
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
268
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
269
|
+
if (error) {
|
|
270
|
+
reject(error);
|
|
271
|
+
} else {
|
|
272
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
273
|
+
resolve({ response: response, body: body });
|
|
274
|
+
} else {
|
|
275
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
*
|
|
284
|
+
* @summary Lists promo texts; excludes archived ones unless asked for
|
|
285
|
+
* @param skip
|
|
286
|
+
* @param limit
|
|
287
|
+
* @param sort
|
|
288
|
+
* @param fields Fields to include in the response. If not specified, all fields are returned.
|
|
289
|
+
* @param searchPromoTextDto
|
|
290
|
+
*/
|
|
291
|
+
public async promoTextsControllerSearch (skip?: number, limit?: number, sort?: string, fields?: Array<string>, searchPromoTextDto?: SearchPromoTextDto, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
292
|
+
const localVarPath = this.basePath + '/promo-texts/search';
|
|
293
|
+
let localVarQueryParameters: any = {};
|
|
294
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
295
|
+
let localVarFormParams: any = {};
|
|
296
|
+
|
|
297
|
+
if (skip !== undefined) {
|
|
298
|
+
localVarQueryParameters['skip'] = ObjectSerializer.serialize(skip, "number");
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
if (limit !== undefined) {
|
|
302
|
+
localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number");
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if (sort !== undefined) {
|
|
306
|
+
localVarQueryParameters['sort'] = ObjectSerializer.serialize(sort, "string");
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (fields !== undefined) {
|
|
310
|
+
localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array<string>");
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
314
|
+
|
|
315
|
+
let localVarUseFormData = false;
|
|
316
|
+
|
|
317
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
318
|
+
method: 'POST',
|
|
319
|
+
qs: localVarQueryParameters,
|
|
320
|
+
headers: localVarHeaderParams,
|
|
321
|
+
uri: localVarPath,
|
|
322
|
+
useQuerystring: this._useQuerystring,
|
|
323
|
+
json: true,
|
|
324
|
+
body: ObjectSerializer.serialize(searchPromoTextDto, "SearchPromoTextDto")
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
let authenticationPromise = Promise.resolve();
|
|
328
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
329
|
+
|
|
330
|
+
let interceptorPromise = authenticationPromise;
|
|
331
|
+
for (const interceptor of this.interceptors) {
|
|
332
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
return interceptorPromise.then(() => {
|
|
336
|
+
if (Object.keys(localVarFormParams).length) {
|
|
337
|
+
if (localVarUseFormData) {
|
|
338
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
339
|
+
} else {
|
|
340
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
344
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
345
|
+
if (error) {
|
|
346
|
+
reject(error);
|
|
347
|
+
} else {
|
|
348
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
349
|
+
resolve({ response: response, body: body });
|
|
350
|
+
} else {
|
|
351
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
*
|
|
360
|
+
* @summary Edits a promo text and propagates the change to promoted offers
|
|
361
|
+
* @param promoTextId
|
|
362
|
+
* @param updatePromoTextDto
|
|
363
|
+
*/
|
|
364
|
+
public async promoTextsControllerUpdate (promoTextId: string, updatePromoTextDto: UpdatePromoTextDto, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
365
|
+
const localVarPath = this.basePath + '/promo-texts/{promoTextId}'
|
|
366
|
+
.replace('{' + 'promoTextId' + '}', encodeURIComponent(String(promoTextId)));
|
|
367
|
+
let localVarQueryParameters: any = {};
|
|
368
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
369
|
+
let localVarFormParams: any = {};
|
|
370
|
+
|
|
371
|
+
// verify required parameter 'promoTextId' is not null or undefined
|
|
372
|
+
if (promoTextId === null || promoTextId === undefined) {
|
|
373
|
+
throw new Error('Required parameter promoTextId was null or undefined when calling promoTextsControllerUpdate.');
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// verify required parameter 'updatePromoTextDto' is not null or undefined
|
|
377
|
+
if (updatePromoTextDto === null || updatePromoTextDto === undefined) {
|
|
378
|
+
throw new Error('Required parameter updatePromoTextDto was null or undefined when calling promoTextsControllerUpdate.');
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
382
|
+
|
|
383
|
+
let localVarUseFormData = false;
|
|
384
|
+
|
|
385
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
386
|
+
method: 'PUT',
|
|
387
|
+
qs: localVarQueryParameters,
|
|
388
|
+
headers: localVarHeaderParams,
|
|
389
|
+
uri: localVarPath,
|
|
390
|
+
useQuerystring: this._useQuerystring,
|
|
391
|
+
json: true,
|
|
392
|
+
body: ObjectSerializer.serialize(updatePromoTextDto, "UpdatePromoTextDto")
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
let authenticationPromise = Promise.resolve();
|
|
396
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
397
|
+
|
|
398
|
+
let interceptorPromise = authenticationPromise;
|
|
399
|
+
for (const interceptor of this.interceptors) {
|
|
400
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
return interceptorPromise.then(() => {
|
|
404
|
+
if (Object.keys(localVarFormParams).length) {
|
|
405
|
+
if (localVarUseFormData) {
|
|
406
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
407
|
+
} else {
|
|
408
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
412
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
413
|
+
if (error) {
|
|
414
|
+
reject(error);
|
|
415
|
+
} else {
|
|
416
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
417
|
+
resolve({ response: response, body: body });
|
|
418
|
+
} else {
|
|
419
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
}
|
package/dist/api/apis.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
+
export * from './promoTextsApi';
|
|
13
|
+
import { PromoTextsApi } from './promoTextsApi';
|
|
14
|
+
import * as http from 'http';
|
|
15
|
+
export declare class HttpError extends Error {
|
|
16
|
+
response: http.IncomingMessage;
|
|
17
|
+
body: any;
|
|
18
|
+
statusCode?: number | undefined;
|
|
19
|
+
constructor(response: http.IncomingMessage, body: any, statusCode?: number | undefined);
|
|
20
|
+
}
|
|
21
|
+
export { RequestFile } from '../model/models';
|
|
22
|
+
export declare const APIS: (typeof AutomatedOffersApi | typeof FutureBidsApi | typeof HealthApi | typeof MatchedOffersApi | typeof OffersApi | typeof PromoTextsApi)[];
|
package/dist/api/apis.js
CHANGED
|
@@ -1,57 +1,59 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.APIS = exports.HttpError = void 0;
|
|
33
|
-
__exportStar(require("./automatedOffersApi"), exports);
|
|
34
|
-
var automatedOffersApi_1 = require("./automatedOffersApi");
|
|
35
|
-
__exportStar(require("./futureBidsApi"), exports);
|
|
36
|
-
var futureBidsApi_1 = require("./futureBidsApi");
|
|
37
|
-
__exportStar(require("./healthApi"), exports);
|
|
38
|
-
var healthApi_1 = require("./healthApi");
|
|
39
|
-
__exportStar(require("./matchedOffersApi"), exports);
|
|
40
|
-
var matchedOffersApi_1 = require("./matchedOffersApi");
|
|
41
|
-
__exportStar(require("./offersApi"), exports);
|
|
42
|
-
var offersApi_1 = require("./offersApi");
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
_this
|
|
49
|
-
_this.
|
|
50
|
-
_this.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.APIS = exports.HttpError = void 0;
|
|
33
|
+
__exportStar(require("./automatedOffersApi"), exports);
|
|
34
|
+
var automatedOffersApi_1 = require("./automatedOffersApi");
|
|
35
|
+
__exportStar(require("./futureBidsApi"), exports);
|
|
36
|
+
var futureBidsApi_1 = require("./futureBidsApi");
|
|
37
|
+
__exportStar(require("./healthApi"), exports);
|
|
38
|
+
var healthApi_1 = require("./healthApi");
|
|
39
|
+
__exportStar(require("./matchedOffersApi"), exports);
|
|
40
|
+
var matchedOffersApi_1 = require("./matchedOffersApi");
|
|
41
|
+
__exportStar(require("./offersApi"), exports);
|
|
42
|
+
var offersApi_1 = require("./offersApi");
|
|
43
|
+
__exportStar(require("./promoTextsApi"), exports);
|
|
44
|
+
var promoTextsApi_1 = require("./promoTextsApi");
|
|
45
|
+
var HttpError = (function (_super) {
|
|
46
|
+
__extends(HttpError, _super);
|
|
47
|
+
function HttpError(response, body, statusCode) {
|
|
48
|
+
var _this = _super.call(this, 'HTTP request failed') || this;
|
|
49
|
+
_this.response = response;
|
|
50
|
+
_this.body = body;
|
|
51
|
+
_this.statusCode = statusCode;
|
|
52
|
+
_this.name = 'HttpError';
|
|
53
|
+
return _this;
|
|
54
|
+
}
|
|
55
|
+
return HttpError;
|
|
56
|
+
}(Error));
|
|
57
|
+
exports.HttpError = HttpError;
|
|
58
|
+
exports.APIS = [automatedOffersApi_1.AutomatedOffersApi, futureBidsApi_1.FutureBidsApi, healthApi_1.HealthApi, matchedOffersApi_1.MatchedOffersApi, offersApi_1.OffersApi, promoTextsApi_1.PromoTextsApi];
|
|
57
59
|
//# sourceMappingURL=apis.js.map
|
package/dist/api/apis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apis.js","sourceRoot":"","sources":["../../api/apis.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,2DAA0D;AAC1D,kDAAgC;AAChC,iDAAgD;AAChD,8CAA4B;AAC5B,yCAAwC;AACxC,qDAAmC;AACnC,uDAAsD;AACtD,8CAA4B;AAC5B,yCAAwC;
|
|
1
|
+
{"version":3,"file":"apis.js","sourceRoot":"","sources":["../../api/apis.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,2DAA0D;AAC1D,kDAAgC;AAChC,iDAAgD;AAChD,8CAA4B;AAC5B,yCAAwC;AACxC,qDAAmC;AACnC,uDAAsD;AACtD,8CAA4B;AAC5B,yCAAwC;AACxC,kDAAgC;AAChC,iDAAgD;AAGhD;IAA+B,6BAAK;IAChC,mBAAoB,QAA8B,EAAS,IAAS,EAAS,UAAmB;QAAhG,YACI,kBAAM,qBAAqB,CAAC,SAE/B;QAHmB,cAAQ,GAAR,QAAQ,CAAsB;QAAS,UAAI,GAAJ,IAAI,CAAK;QAAS,gBAAU,GAAV,UAAU,CAAS;QAE5F,KAAI,CAAC,IAAI,GAAG,WAAW,CAAC;;IAC5B,CAAC;IACL,gBAAC;AAAD,CAAC,AALD,CAA+B,KAAK,GAKnC;AALY,8BAAS;AAST,QAAA,IAAI,GAAG,CAAC,uCAAkB,EAAE,6BAAa,EAAE,qBAAS,EAAE,mCAAgB,EAAE,qBAAS,EAAE,6BAAa,CAAC,CAAC"}
|