vayu-ts 0.2.7 → 0.2.9
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/README.md +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/openapi/apis/AuthApi.js +1 -1
- package/dist/openapi/apis/ContractsApi.js +4 -4
- package/dist/openapi/apis/CreditsApi.js +3 -3
- package/dist/openapi/apis/CustomersApi.js +7 -7
- package/dist/openapi/apis/EventsApi.js +5 -5
- package/dist/openapi/apis/IntegrationsApi.js +2 -2
- package/dist/openapi/apis/InvoicesApi.js +2 -2
- package/dist/openapi/apis/MetersApi.js +4 -4
- package/dist/openapi/apis/PlansApi.js +3 -3
- package/dist/openapi/apis/ProductConsumptionsApi.js +1 -1
- package/dist/openapi/apis/ReportsApi.js +2 -2
- package/dist/openapi/apis/WebhooksApi.js +1 -1
- package/dist/openapi/configuration.d.ts +2 -8
- package/dist/openapi/index.d.ts +2 -3
- package/dist/openapi/index.js +1 -3
- package/dist/openapi/types/ObservableAPI.d.ts +71 -71
- package/dist/openapi/types/ObservableAPI.js +105 -1085
- package/dist/openapi/types/PromiseAPI.d.ts +71 -71
- package/dist/openapi/types/PromiseAPI.js +70 -771
- package/dist/openapi-v2/apis/AuthenticationApi.js +1 -1
- package/dist/openapi-v2/apis/CustomersApi.js +6 -6
- package/dist/openapi-v2/apis/EntitlementsApi.js +3 -3
- package/dist/openapi-v2/apis/EventsApi.js +4 -4
- package/dist/openapi-v2/apis/InvoicesApi.js +6 -6
- package/dist/openapi-v2/apis/ProductsApi.js +5 -5
- package/dist/openapi-v2/configuration.d.ts +2 -8
- package/dist/openapi-v2/index.d.ts +2 -3
- package/dist/openapi-v2/index.js +1 -3
- package/dist/openapi-v2/types/ObservableAPI.d.ts +51 -51
- package/dist/openapi-v2/types/ObservableAPI.js +75 -775
- package/dist/openapi-v2/types/PromiseAPI.d.ts +51 -51
- package/dist/openapi-v2/types/PromiseAPI.js +50 -551
- package/dist/sdk/clients/CustomersClient.d.ts +1 -0
- package/dist/sdk/clients/CustomersClient.js +3 -0
- package/package.json +1 -1
|
@@ -14,44 +14,16 @@ class ObservableAuthenticationApi {
|
|
|
14
14
|
* @param loginRequest
|
|
15
15
|
*/
|
|
16
16
|
loginWithHttpInfo(loginRequest, _options) {
|
|
17
|
-
|
|
18
|
-
let allMiddleware = [];
|
|
19
|
-
if (_options && _options.middleware) {
|
|
20
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
21
|
-
// call-time middleware provided
|
|
22
|
-
const calltimeMiddleware = _options.middleware;
|
|
23
|
-
switch (middlewareMergeStrategy) {
|
|
24
|
-
case 'append':
|
|
25
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
26
|
-
break;
|
|
27
|
-
case 'prepend':
|
|
28
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
29
|
-
break;
|
|
30
|
-
case 'replace':
|
|
31
|
-
allMiddleware = calltimeMiddleware;
|
|
32
|
-
break;
|
|
33
|
-
default:
|
|
34
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (_options) {
|
|
38
|
-
_config = {
|
|
39
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
40
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
41
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
42
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const requestContextPromise = this.requestFactory.login(loginRequest, _config);
|
|
17
|
+
const requestContextPromise = this.requestFactory.login(loginRequest, _options);
|
|
46
18
|
// build promise chain
|
|
47
19
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
48
|
-
for (const middleware of
|
|
20
|
+
for (const middleware of this.configuration.middleware) {
|
|
49
21
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
50
22
|
}
|
|
51
23
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
52
24
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
53
25
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
54
|
-
for (const middleware of
|
|
26
|
+
for (const middleware of this.configuration.middleware) {
|
|
55
27
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
56
28
|
}
|
|
57
29
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.loginWithHttpInfo(rsp)));
|
|
@@ -77,44 +49,16 @@ class ObservableCustomersApi {
|
|
|
77
49
|
* @param aPICreateCustomerPayload - The details of the customer to create.
|
|
78
50
|
*/
|
|
79
51
|
createCustomerWithHttpInfo(aPICreateCustomerPayload, _options) {
|
|
80
|
-
|
|
81
|
-
let allMiddleware = [];
|
|
82
|
-
if (_options && _options.middleware) {
|
|
83
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
84
|
-
// call-time middleware provided
|
|
85
|
-
const calltimeMiddleware = _options.middleware;
|
|
86
|
-
switch (middlewareMergeStrategy) {
|
|
87
|
-
case 'append':
|
|
88
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
89
|
-
break;
|
|
90
|
-
case 'prepend':
|
|
91
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
92
|
-
break;
|
|
93
|
-
case 'replace':
|
|
94
|
-
allMiddleware = calltimeMiddleware;
|
|
95
|
-
break;
|
|
96
|
-
default:
|
|
97
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
if (_options) {
|
|
101
|
-
_config = {
|
|
102
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
103
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
104
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
105
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
const requestContextPromise = this.requestFactory.createCustomer(aPICreateCustomerPayload, _config);
|
|
52
|
+
const requestContextPromise = this.requestFactory.createCustomer(aPICreateCustomerPayload, _options);
|
|
109
53
|
// build promise chain
|
|
110
54
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
111
|
-
for (const middleware of
|
|
55
|
+
for (const middleware of this.configuration.middleware) {
|
|
112
56
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
113
57
|
}
|
|
114
58
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
115
59
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
116
60
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
117
|
-
for (const middleware of
|
|
61
|
+
for (const middleware of this.configuration.middleware) {
|
|
118
62
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
119
63
|
}
|
|
120
64
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.createCustomerWithHttpInfo(rsp)));
|
|
@@ -132,44 +76,16 @@ class ObservableCustomersApi {
|
|
|
132
76
|
* @param id - The ID of the customer to delete.
|
|
133
77
|
*/
|
|
134
78
|
deleteCustomerWithHttpInfo(id, _options) {
|
|
135
|
-
|
|
136
|
-
let allMiddleware = [];
|
|
137
|
-
if (_options && _options.middleware) {
|
|
138
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
139
|
-
// call-time middleware provided
|
|
140
|
-
const calltimeMiddleware = _options.middleware;
|
|
141
|
-
switch (middlewareMergeStrategy) {
|
|
142
|
-
case 'append':
|
|
143
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
144
|
-
break;
|
|
145
|
-
case 'prepend':
|
|
146
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
147
|
-
break;
|
|
148
|
-
case 'replace':
|
|
149
|
-
allMiddleware = calltimeMiddleware;
|
|
150
|
-
break;
|
|
151
|
-
default:
|
|
152
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (_options) {
|
|
156
|
-
_config = {
|
|
157
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
158
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
159
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
160
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
const requestContextPromise = this.requestFactory.deleteCustomer(id, _config);
|
|
79
|
+
const requestContextPromise = this.requestFactory.deleteCustomer(id, _options);
|
|
164
80
|
// build promise chain
|
|
165
81
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
166
|
-
for (const middleware of
|
|
82
|
+
for (const middleware of this.configuration.middleware) {
|
|
167
83
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
168
84
|
}
|
|
169
85
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
170
86
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
171
87
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
172
|
-
for (const middleware of
|
|
88
|
+
for (const middleware of this.configuration.middleware) {
|
|
173
89
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
174
90
|
}
|
|
175
91
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteCustomerWithHttpInfo(rsp)));
|
|
@@ -187,44 +103,16 @@ class ObservableCustomersApi {
|
|
|
187
103
|
* @param id - The ID of the customer to fetch.
|
|
188
104
|
*/
|
|
189
105
|
getCustomerWithHttpInfo(id, _options) {
|
|
190
|
-
|
|
191
|
-
let allMiddleware = [];
|
|
192
|
-
if (_options && _options.middleware) {
|
|
193
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
194
|
-
// call-time middleware provided
|
|
195
|
-
const calltimeMiddleware = _options.middleware;
|
|
196
|
-
switch (middlewareMergeStrategy) {
|
|
197
|
-
case 'append':
|
|
198
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
199
|
-
break;
|
|
200
|
-
case 'prepend':
|
|
201
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
202
|
-
break;
|
|
203
|
-
case 'replace':
|
|
204
|
-
allMiddleware = calltimeMiddleware;
|
|
205
|
-
break;
|
|
206
|
-
default:
|
|
207
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
if (_options) {
|
|
211
|
-
_config = {
|
|
212
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
213
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
214
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
215
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
const requestContextPromise = this.requestFactory.getCustomer(id, _config);
|
|
106
|
+
const requestContextPromise = this.requestFactory.getCustomer(id, _options);
|
|
219
107
|
// build promise chain
|
|
220
108
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
221
|
-
for (const middleware of
|
|
109
|
+
for (const middleware of this.configuration.middleware) {
|
|
222
110
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
223
111
|
}
|
|
224
112
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
225
113
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
226
114
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
227
|
-
for (const middleware of
|
|
115
|
+
for (const middleware of this.configuration.middleware) {
|
|
228
116
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
229
117
|
}
|
|
230
118
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getCustomerWithHttpInfo(rsp)));
|
|
@@ -242,44 +130,16 @@ class ObservableCustomersApi {
|
|
|
242
130
|
* @param aPIQueryPayloadAPICustomer - The query filters and pagination options.
|
|
243
131
|
*/
|
|
244
132
|
queryCustomersWithHttpInfo(aPIQueryPayloadAPICustomer, _options) {
|
|
245
|
-
|
|
246
|
-
let allMiddleware = [];
|
|
247
|
-
if (_options && _options.middleware) {
|
|
248
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
249
|
-
// call-time middleware provided
|
|
250
|
-
const calltimeMiddleware = _options.middleware;
|
|
251
|
-
switch (middlewareMergeStrategy) {
|
|
252
|
-
case 'append':
|
|
253
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
254
|
-
break;
|
|
255
|
-
case 'prepend':
|
|
256
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
257
|
-
break;
|
|
258
|
-
case 'replace':
|
|
259
|
-
allMiddleware = calltimeMiddleware;
|
|
260
|
-
break;
|
|
261
|
-
default:
|
|
262
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
if (_options) {
|
|
266
|
-
_config = {
|
|
267
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
268
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
269
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
270
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
const requestContextPromise = this.requestFactory.queryCustomers(aPIQueryPayloadAPICustomer, _config);
|
|
133
|
+
const requestContextPromise = this.requestFactory.queryCustomers(aPIQueryPayloadAPICustomer, _options);
|
|
274
134
|
// build promise chain
|
|
275
135
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
276
|
-
for (const middleware of
|
|
136
|
+
for (const middleware of this.configuration.middleware) {
|
|
277
137
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
278
138
|
}
|
|
279
139
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
280
140
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
281
141
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
282
|
-
for (const middleware of
|
|
142
|
+
for (const middleware of this.configuration.middleware) {
|
|
283
143
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
284
144
|
}
|
|
285
145
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.queryCustomersWithHttpInfo(rsp)));
|
|
@@ -299,44 +159,16 @@ class ObservableCustomersApi {
|
|
|
299
159
|
* @param productId - The ID of the product to revise.
|
|
300
160
|
*/
|
|
301
161
|
updateACustomersProductWithHttpInfo(body, id, productId, _options) {
|
|
302
|
-
|
|
303
|
-
let allMiddleware = [];
|
|
304
|
-
if (_options && _options.middleware) {
|
|
305
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
306
|
-
// call-time middleware provided
|
|
307
|
-
const calltimeMiddleware = _options.middleware;
|
|
308
|
-
switch (middlewareMergeStrategy) {
|
|
309
|
-
case 'append':
|
|
310
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
311
|
-
break;
|
|
312
|
-
case 'prepend':
|
|
313
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
314
|
-
break;
|
|
315
|
-
case 'replace':
|
|
316
|
-
allMiddleware = calltimeMiddleware;
|
|
317
|
-
break;
|
|
318
|
-
default:
|
|
319
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
if (_options) {
|
|
323
|
-
_config = {
|
|
324
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
325
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
326
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
327
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
const requestContextPromise = this.requestFactory.updateACustomersProduct(body, id, productId, _config);
|
|
162
|
+
const requestContextPromise = this.requestFactory.updateACustomersProduct(body, id, productId, _options);
|
|
331
163
|
// build promise chain
|
|
332
164
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
333
|
-
for (const middleware of
|
|
165
|
+
for (const middleware of this.configuration.middleware) {
|
|
334
166
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
335
167
|
}
|
|
336
168
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
337
169
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
338
170
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
339
|
-
for (const middleware of
|
|
171
|
+
for (const middleware of this.configuration.middleware) {
|
|
340
172
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
341
173
|
}
|
|
342
174
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.updateACustomersProductWithHttpInfo(rsp)));
|
|
@@ -357,44 +189,16 @@ class ObservableCustomersApi {
|
|
|
357
189
|
* @param id - The ID of the customer to update.
|
|
358
190
|
*/
|
|
359
191
|
updateCustomerWithHttpInfo(aPIUpdateCustomerPayload, id, _options) {
|
|
360
|
-
|
|
361
|
-
let allMiddleware = [];
|
|
362
|
-
if (_options && _options.middleware) {
|
|
363
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
364
|
-
// call-time middleware provided
|
|
365
|
-
const calltimeMiddleware = _options.middleware;
|
|
366
|
-
switch (middlewareMergeStrategy) {
|
|
367
|
-
case 'append':
|
|
368
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
369
|
-
break;
|
|
370
|
-
case 'prepend':
|
|
371
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
372
|
-
break;
|
|
373
|
-
case 'replace':
|
|
374
|
-
allMiddleware = calltimeMiddleware;
|
|
375
|
-
break;
|
|
376
|
-
default:
|
|
377
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
if (_options) {
|
|
381
|
-
_config = {
|
|
382
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
383
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
384
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
385
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
const requestContextPromise = this.requestFactory.updateCustomer(aPIUpdateCustomerPayload, id, _config);
|
|
192
|
+
const requestContextPromise = this.requestFactory.updateCustomer(aPIUpdateCustomerPayload, id, _options);
|
|
389
193
|
// build promise chain
|
|
390
194
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
391
|
-
for (const middleware of
|
|
195
|
+
for (const middleware of this.configuration.middleware) {
|
|
392
196
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
393
197
|
}
|
|
394
198
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
395
199
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
396
200
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
397
|
-
for (const middleware of
|
|
201
|
+
for (const middleware of this.configuration.middleware) {
|
|
398
202
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
399
203
|
}
|
|
400
204
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.updateCustomerWithHttpInfo(rsp)));
|
|
@@ -422,44 +226,16 @@ class ObservableEntitlementsApi {
|
|
|
422
226
|
* @param id - The ID of the entitlement to delete.
|
|
423
227
|
*/
|
|
424
228
|
deleteEntitlementWithHttpInfo(id, _options) {
|
|
425
|
-
|
|
426
|
-
let allMiddleware = [];
|
|
427
|
-
if (_options && _options.middleware) {
|
|
428
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
429
|
-
// call-time middleware provided
|
|
430
|
-
const calltimeMiddleware = _options.middleware;
|
|
431
|
-
switch (middlewareMergeStrategy) {
|
|
432
|
-
case 'append':
|
|
433
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
434
|
-
break;
|
|
435
|
-
case 'prepend':
|
|
436
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
437
|
-
break;
|
|
438
|
-
case 'replace':
|
|
439
|
-
allMiddleware = calltimeMiddleware;
|
|
440
|
-
break;
|
|
441
|
-
default:
|
|
442
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
if (_options) {
|
|
446
|
-
_config = {
|
|
447
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
448
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
449
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
450
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
const requestContextPromise = this.requestFactory.deleteEntitlement(id, _config);
|
|
229
|
+
const requestContextPromise = this.requestFactory.deleteEntitlement(id, _options);
|
|
454
230
|
// build promise chain
|
|
455
231
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
456
|
-
for (const middleware of
|
|
232
|
+
for (const middleware of this.configuration.middleware) {
|
|
457
233
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
458
234
|
}
|
|
459
235
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
460
236
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
461
237
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
462
|
-
for (const middleware of
|
|
238
|
+
for (const middleware of this.configuration.middleware) {
|
|
463
239
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
464
240
|
}
|
|
465
241
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteEntitlementWithHttpInfo(rsp)));
|
|
@@ -477,44 +253,16 @@ class ObservableEntitlementsApi {
|
|
|
477
253
|
* @param id - The ID of the entitlement to fetch.
|
|
478
254
|
*/
|
|
479
255
|
getEntitlementWithHttpInfo(id, _options) {
|
|
480
|
-
|
|
481
|
-
let allMiddleware = [];
|
|
482
|
-
if (_options && _options.middleware) {
|
|
483
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
484
|
-
// call-time middleware provided
|
|
485
|
-
const calltimeMiddleware = _options.middleware;
|
|
486
|
-
switch (middlewareMergeStrategy) {
|
|
487
|
-
case 'append':
|
|
488
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
489
|
-
break;
|
|
490
|
-
case 'prepend':
|
|
491
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
492
|
-
break;
|
|
493
|
-
case 'replace':
|
|
494
|
-
allMiddleware = calltimeMiddleware;
|
|
495
|
-
break;
|
|
496
|
-
default:
|
|
497
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
if (_options) {
|
|
501
|
-
_config = {
|
|
502
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
503
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
504
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
505
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
const requestContextPromise = this.requestFactory.getEntitlement(id, _config);
|
|
256
|
+
const requestContextPromise = this.requestFactory.getEntitlement(id, _options);
|
|
509
257
|
// build promise chain
|
|
510
258
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
511
|
-
for (const middleware of
|
|
259
|
+
for (const middleware of this.configuration.middleware) {
|
|
512
260
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
513
261
|
}
|
|
514
262
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
515
263
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
516
264
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
517
|
-
for (const middleware of
|
|
265
|
+
for (const middleware of this.configuration.middleware) {
|
|
518
266
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
519
267
|
}
|
|
520
268
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getEntitlementWithHttpInfo(rsp)));
|
|
@@ -532,44 +280,16 @@ class ObservableEntitlementsApi {
|
|
|
532
280
|
* @param aPIQueryPayloadAPIEntitlement - The query filters and pagination options.
|
|
533
281
|
*/
|
|
534
282
|
queryEntitlementsWithHttpInfo(aPIQueryPayloadAPIEntitlement, _options) {
|
|
535
|
-
|
|
536
|
-
let allMiddleware = [];
|
|
537
|
-
if (_options && _options.middleware) {
|
|
538
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
539
|
-
// call-time middleware provided
|
|
540
|
-
const calltimeMiddleware = _options.middleware;
|
|
541
|
-
switch (middlewareMergeStrategy) {
|
|
542
|
-
case 'append':
|
|
543
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
544
|
-
break;
|
|
545
|
-
case 'prepend':
|
|
546
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
547
|
-
break;
|
|
548
|
-
case 'replace':
|
|
549
|
-
allMiddleware = calltimeMiddleware;
|
|
550
|
-
break;
|
|
551
|
-
default:
|
|
552
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
if (_options) {
|
|
556
|
-
_config = {
|
|
557
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
558
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
559
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
560
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
const requestContextPromise = this.requestFactory.queryEntitlements(aPIQueryPayloadAPIEntitlement, _config);
|
|
283
|
+
const requestContextPromise = this.requestFactory.queryEntitlements(aPIQueryPayloadAPIEntitlement, _options);
|
|
564
284
|
// build promise chain
|
|
565
285
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
566
|
-
for (const middleware of
|
|
286
|
+
for (const middleware of this.configuration.middleware) {
|
|
567
287
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
568
288
|
}
|
|
569
289
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
570
290
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
571
291
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
572
|
-
for (const middleware of
|
|
292
|
+
for (const middleware of this.configuration.middleware) {
|
|
573
293
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
574
294
|
}
|
|
575
295
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.queryEntitlementsWithHttpInfo(rsp)));
|
|
@@ -596,44 +316,16 @@ class ObservableEventsApi {
|
|
|
596
316
|
* @param id - The ID of the event to delete.
|
|
597
317
|
*/
|
|
598
318
|
deleteEventWithHttpInfo(id, _options) {
|
|
599
|
-
|
|
600
|
-
let allMiddleware = [];
|
|
601
|
-
if (_options && _options.middleware) {
|
|
602
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
603
|
-
// call-time middleware provided
|
|
604
|
-
const calltimeMiddleware = _options.middleware;
|
|
605
|
-
switch (middlewareMergeStrategy) {
|
|
606
|
-
case 'append':
|
|
607
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
608
|
-
break;
|
|
609
|
-
case 'prepend':
|
|
610
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
611
|
-
break;
|
|
612
|
-
case 'replace':
|
|
613
|
-
allMiddleware = calltimeMiddleware;
|
|
614
|
-
break;
|
|
615
|
-
default:
|
|
616
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
if (_options) {
|
|
620
|
-
_config = {
|
|
621
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
622
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
623
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
624
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
625
|
-
};
|
|
626
|
-
}
|
|
627
|
-
const requestContextPromise = this.requestFactory.deleteEvent(id, _config);
|
|
319
|
+
const requestContextPromise = this.requestFactory.deleteEvent(id, _options);
|
|
628
320
|
// build promise chain
|
|
629
321
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
630
|
-
for (const middleware of
|
|
322
|
+
for (const middleware of this.configuration.middleware) {
|
|
631
323
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
632
324
|
}
|
|
633
325
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
634
326
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
635
327
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
636
|
-
for (const middleware of
|
|
328
|
+
for (const middleware of this.configuration.middleware) {
|
|
637
329
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
638
330
|
}
|
|
639
331
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteEventWithHttpInfo(rsp)));
|
|
@@ -651,44 +343,16 @@ class ObservableEventsApi {
|
|
|
651
343
|
* @param id - The ID of the event to fetch.
|
|
652
344
|
*/
|
|
653
345
|
getEventWithHttpInfo(id, _options) {
|
|
654
|
-
|
|
655
|
-
let allMiddleware = [];
|
|
656
|
-
if (_options && _options.middleware) {
|
|
657
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
658
|
-
// call-time middleware provided
|
|
659
|
-
const calltimeMiddleware = _options.middleware;
|
|
660
|
-
switch (middlewareMergeStrategy) {
|
|
661
|
-
case 'append':
|
|
662
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
663
|
-
break;
|
|
664
|
-
case 'prepend':
|
|
665
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
666
|
-
break;
|
|
667
|
-
case 'replace':
|
|
668
|
-
allMiddleware = calltimeMiddleware;
|
|
669
|
-
break;
|
|
670
|
-
default:
|
|
671
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
if (_options) {
|
|
675
|
-
_config = {
|
|
676
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
677
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
678
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
679
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
const requestContextPromise = this.requestFactory.getEvent(id, _config);
|
|
346
|
+
const requestContextPromise = this.requestFactory.getEvent(id, _options);
|
|
683
347
|
// build promise chain
|
|
684
348
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
685
|
-
for (const middleware of
|
|
349
|
+
for (const middleware of this.configuration.middleware) {
|
|
686
350
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
687
351
|
}
|
|
688
352
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
689
353
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
690
354
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
691
|
-
for (const middleware of
|
|
355
|
+
for (const middleware of this.configuration.middleware) {
|
|
692
356
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
693
357
|
}
|
|
694
358
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getEventWithHttpInfo(rsp)));
|
|
@@ -706,44 +370,16 @@ class ObservableEventsApi {
|
|
|
706
370
|
* @param aPIIngestEventPayload - The events to ingest
|
|
707
371
|
*/
|
|
708
372
|
ingestEventToTheSystemWithHttpInfo(aPIIngestEventPayload, _options) {
|
|
709
|
-
|
|
710
|
-
let allMiddleware = [];
|
|
711
|
-
if (_options && _options.middleware) {
|
|
712
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
713
|
-
// call-time middleware provided
|
|
714
|
-
const calltimeMiddleware = _options.middleware;
|
|
715
|
-
switch (middlewareMergeStrategy) {
|
|
716
|
-
case 'append':
|
|
717
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
718
|
-
break;
|
|
719
|
-
case 'prepend':
|
|
720
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
721
|
-
break;
|
|
722
|
-
case 'replace':
|
|
723
|
-
allMiddleware = calltimeMiddleware;
|
|
724
|
-
break;
|
|
725
|
-
default:
|
|
726
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
if (_options) {
|
|
730
|
-
_config = {
|
|
731
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
732
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
733
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
734
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
const requestContextPromise = this.requestFactory.ingestEventToTheSystem(aPIIngestEventPayload, _config);
|
|
373
|
+
const requestContextPromise = this.requestFactory.ingestEventToTheSystem(aPIIngestEventPayload, _options);
|
|
738
374
|
// build promise chain
|
|
739
375
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
740
|
-
for (const middleware of
|
|
376
|
+
for (const middleware of this.configuration.middleware) {
|
|
741
377
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
742
378
|
}
|
|
743
379
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
744
380
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
745
381
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
746
|
-
for (const middleware of
|
|
382
|
+
for (const middleware of this.configuration.middleware) {
|
|
747
383
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
748
384
|
}
|
|
749
385
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.ingestEventToTheSystemWithHttpInfo(rsp)));
|
|
@@ -761,44 +397,16 @@ class ObservableEventsApi {
|
|
|
761
397
|
* @param aPIQueryPayloadAPIEvent - The query filters and pagination options.
|
|
762
398
|
*/
|
|
763
399
|
queryEventsWithHttpInfo(aPIQueryPayloadAPIEvent, _options) {
|
|
764
|
-
|
|
765
|
-
let allMiddleware = [];
|
|
766
|
-
if (_options && _options.middleware) {
|
|
767
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
768
|
-
// call-time middleware provided
|
|
769
|
-
const calltimeMiddleware = _options.middleware;
|
|
770
|
-
switch (middlewareMergeStrategy) {
|
|
771
|
-
case 'append':
|
|
772
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
773
|
-
break;
|
|
774
|
-
case 'prepend':
|
|
775
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
776
|
-
break;
|
|
777
|
-
case 'replace':
|
|
778
|
-
allMiddleware = calltimeMiddleware;
|
|
779
|
-
break;
|
|
780
|
-
default:
|
|
781
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
if (_options) {
|
|
785
|
-
_config = {
|
|
786
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
787
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
788
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
789
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
790
|
-
};
|
|
791
|
-
}
|
|
792
|
-
const requestContextPromise = this.requestFactory.queryEvents(aPIQueryPayloadAPIEvent, _config);
|
|
400
|
+
const requestContextPromise = this.requestFactory.queryEvents(aPIQueryPayloadAPIEvent, _options);
|
|
793
401
|
// build promise chain
|
|
794
402
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
795
|
-
for (const middleware of
|
|
403
|
+
for (const middleware of this.configuration.middleware) {
|
|
796
404
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
797
405
|
}
|
|
798
406
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
799
407
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
800
408
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
801
|
-
for (const middleware of
|
|
409
|
+
for (const middleware of this.configuration.middleware) {
|
|
802
410
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
803
411
|
}
|
|
804
412
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.queryEventsWithHttpInfo(rsp)));
|
|
@@ -825,44 +433,16 @@ class ObservableInvoicesApi {
|
|
|
825
433
|
* @param id - The ID of the invoice to calculate.
|
|
826
434
|
*/
|
|
827
435
|
calculateInvoiceWithHttpInfo(id, _options) {
|
|
828
|
-
|
|
829
|
-
let allMiddleware = [];
|
|
830
|
-
if (_options && _options.middleware) {
|
|
831
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
832
|
-
// call-time middleware provided
|
|
833
|
-
const calltimeMiddleware = _options.middleware;
|
|
834
|
-
switch (middlewareMergeStrategy) {
|
|
835
|
-
case 'append':
|
|
836
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
837
|
-
break;
|
|
838
|
-
case 'prepend':
|
|
839
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
840
|
-
break;
|
|
841
|
-
case 'replace':
|
|
842
|
-
allMiddleware = calltimeMiddleware;
|
|
843
|
-
break;
|
|
844
|
-
default:
|
|
845
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
846
|
-
}
|
|
847
|
-
}
|
|
848
|
-
if (_options) {
|
|
849
|
-
_config = {
|
|
850
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
851
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
852
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
853
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
854
|
-
};
|
|
855
|
-
}
|
|
856
|
-
const requestContextPromise = this.requestFactory.calculateInvoice(id, _config);
|
|
436
|
+
const requestContextPromise = this.requestFactory.calculateInvoice(id, _options);
|
|
857
437
|
// build promise chain
|
|
858
438
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
859
|
-
for (const middleware of
|
|
439
|
+
for (const middleware of this.configuration.middleware) {
|
|
860
440
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
861
441
|
}
|
|
862
442
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
863
443
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
864
444
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
865
|
-
for (const middleware of
|
|
445
|
+
for (const middleware of this.configuration.middleware) {
|
|
866
446
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
867
447
|
}
|
|
868
448
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.calculateInvoiceWithHttpInfo(rsp)));
|
|
@@ -880,44 +460,16 @@ class ObservableInvoicesApi {
|
|
|
880
460
|
* @param aPICreateInvoicePayload - The details of the invoice to create.
|
|
881
461
|
*/
|
|
882
462
|
createInvoiceWithHttpInfo(aPICreateInvoicePayload, _options) {
|
|
883
|
-
|
|
884
|
-
let allMiddleware = [];
|
|
885
|
-
if (_options && _options.middleware) {
|
|
886
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
887
|
-
// call-time middleware provided
|
|
888
|
-
const calltimeMiddleware = _options.middleware;
|
|
889
|
-
switch (middlewareMergeStrategy) {
|
|
890
|
-
case 'append':
|
|
891
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
892
|
-
break;
|
|
893
|
-
case 'prepend':
|
|
894
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
895
|
-
break;
|
|
896
|
-
case 'replace':
|
|
897
|
-
allMiddleware = calltimeMiddleware;
|
|
898
|
-
break;
|
|
899
|
-
default:
|
|
900
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
if (_options) {
|
|
904
|
-
_config = {
|
|
905
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
906
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
907
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
908
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
909
|
-
};
|
|
910
|
-
}
|
|
911
|
-
const requestContextPromise = this.requestFactory.createInvoice(aPICreateInvoicePayload, _config);
|
|
463
|
+
const requestContextPromise = this.requestFactory.createInvoice(aPICreateInvoicePayload, _options);
|
|
912
464
|
// build promise chain
|
|
913
465
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
914
|
-
for (const middleware of
|
|
466
|
+
for (const middleware of this.configuration.middleware) {
|
|
915
467
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
916
468
|
}
|
|
917
469
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
918
470
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
919
471
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
920
|
-
for (const middleware of
|
|
472
|
+
for (const middleware of this.configuration.middleware) {
|
|
921
473
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
922
474
|
}
|
|
923
475
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.createInvoiceWithHttpInfo(rsp)));
|
|
@@ -935,44 +487,16 @@ class ObservableInvoicesApi {
|
|
|
935
487
|
* @param id - The ID of the invoice to delete.
|
|
936
488
|
*/
|
|
937
489
|
deleteInvoiceWithHttpInfo(id, _options) {
|
|
938
|
-
|
|
939
|
-
let allMiddleware = [];
|
|
940
|
-
if (_options && _options.middleware) {
|
|
941
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
942
|
-
// call-time middleware provided
|
|
943
|
-
const calltimeMiddleware = _options.middleware;
|
|
944
|
-
switch (middlewareMergeStrategy) {
|
|
945
|
-
case 'append':
|
|
946
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
947
|
-
break;
|
|
948
|
-
case 'prepend':
|
|
949
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
950
|
-
break;
|
|
951
|
-
case 'replace':
|
|
952
|
-
allMiddleware = calltimeMiddleware;
|
|
953
|
-
break;
|
|
954
|
-
default:
|
|
955
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
if (_options) {
|
|
959
|
-
_config = {
|
|
960
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
961
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
962
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
963
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
964
|
-
};
|
|
965
|
-
}
|
|
966
|
-
const requestContextPromise = this.requestFactory.deleteInvoice(id, _config);
|
|
490
|
+
const requestContextPromise = this.requestFactory.deleteInvoice(id, _options);
|
|
967
491
|
// build promise chain
|
|
968
492
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
969
|
-
for (const middleware of
|
|
493
|
+
for (const middleware of this.configuration.middleware) {
|
|
970
494
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
971
495
|
}
|
|
972
496
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
973
497
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
974
498
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
975
|
-
for (const middleware of
|
|
499
|
+
for (const middleware of this.configuration.middleware) {
|
|
976
500
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
977
501
|
}
|
|
978
502
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteInvoiceWithHttpInfo(rsp)));
|
|
@@ -990,44 +514,16 @@ class ObservableInvoicesApi {
|
|
|
990
514
|
* @param id - The ID of the invoice to fetch.
|
|
991
515
|
*/
|
|
992
516
|
getInvoiceWithHttpInfo(id, _options) {
|
|
993
|
-
|
|
994
|
-
let allMiddleware = [];
|
|
995
|
-
if (_options && _options.middleware) {
|
|
996
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
997
|
-
// call-time middleware provided
|
|
998
|
-
const calltimeMiddleware = _options.middleware;
|
|
999
|
-
switch (middlewareMergeStrategy) {
|
|
1000
|
-
case 'append':
|
|
1001
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1002
|
-
break;
|
|
1003
|
-
case 'prepend':
|
|
1004
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1005
|
-
break;
|
|
1006
|
-
case 'replace':
|
|
1007
|
-
allMiddleware = calltimeMiddleware;
|
|
1008
|
-
break;
|
|
1009
|
-
default:
|
|
1010
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
if (_options) {
|
|
1014
|
-
_config = {
|
|
1015
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1016
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1017
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1018
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1019
|
-
};
|
|
1020
|
-
}
|
|
1021
|
-
const requestContextPromise = this.requestFactory.getInvoice(id, _config);
|
|
517
|
+
const requestContextPromise = this.requestFactory.getInvoice(id, _options);
|
|
1022
518
|
// build promise chain
|
|
1023
519
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1024
|
-
for (const middleware of
|
|
520
|
+
for (const middleware of this.configuration.middleware) {
|
|
1025
521
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1026
522
|
}
|
|
1027
523
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1028
524
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1029
525
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1030
|
-
for (const middleware of
|
|
526
|
+
for (const middleware of this.configuration.middleware) {
|
|
1031
527
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1032
528
|
}
|
|
1033
529
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getInvoiceWithHttpInfo(rsp)));
|
|
@@ -1045,44 +541,16 @@ class ObservableInvoicesApi {
|
|
|
1045
541
|
* @param aPIQueryPayloadAPIInvoice - The query filters and pagination options.
|
|
1046
542
|
*/
|
|
1047
543
|
queryInvoicesWithHttpInfo(aPIQueryPayloadAPIInvoice, _options) {
|
|
1048
|
-
|
|
1049
|
-
let allMiddleware = [];
|
|
1050
|
-
if (_options && _options.middleware) {
|
|
1051
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1052
|
-
// call-time middleware provided
|
|
1053
|
-
const calltimeMiddleware = _options.middleware;
|
|
1054
|
-
switch (middlewareMergeStrategy) {
|
|
1055
|
-
case 'append':
|
|
1056
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1057
|
-
break;
|
|
1058
|
-
case 'prepend':
|
|
1059
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1060
|
-
break;
|
|
1061
|
-
case 'replace':
|
|
1062
|
-
allMiddleware = calltimeMiddleware;
|
|
1063
|
-
break;
|
|
1064
|
-
default:
|
|
1065
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
if (_options) {
|
|
1069
|
-
_config = {
|
|
1070
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1071
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1072
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1073
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1074
|
-
};
|
|
1075
|
-
}
|
|
1076
|
-
const requestContextPromise = this.requestFactory.queryInvoices(aPIQueryPayloadAPIInvoice, _config);
|
|
544
|
+
const requestContextPromise = this.requestFactory.queryInvoices(aPIQueryPayloadAPIInvoice, _options);
|
|
1077
545
|
// build promise chain
|
|
1078
546
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1079
|
-
for (const middleware of
|
|
547
|
+
for (const middleware of this.configuration.middleware) {
|
|
1080
548
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1081
549
|
}
|
|
1082
550
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1083
551
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1084
552
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1085
|
-
for (const middleware of
|
|
553
|
+
for (const middleware of this.configuration.middleware) {
|
|
1086
554
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1087
555
|
}
|
|
1088
556
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.queryInvoicesWithHttpInfo(rsp)));
|
|
@@ -1101,44 +569,16 @@ class ObservableInvoicesApi {
|
|
|
1101
569
|
* @param id - The ID of the invoice to update.
|
|
1102
570
|
*/
|
|
1103
571
|
updateInvoiceWithHttpInfo(aPIUpdateInvoicePayload, id, _options) {
|
|
1104
|
-
|
|
1105
|
-
let allMiddleware = [];
|
|
1106
|
-
if (_options && _options.middleware) {
|
|
1107
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1108
|
-
// call-time middleware provided
|
|
1109
|
-
const calltimeMiddleware = _options.middleware;
|
|
1110
|
-
switch (middlewareMergeStrategy) {
|
|
1111
|
-
case 'append':
|
|
1112
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1113
|
-
break;
|
|
1114
|
-
case 'prepend':
|
|
1115
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1116
|
-
break;
|
|
1117
|
-
case 'replace':
|
|
1118
|
-
allMiddleware = calltimeMiddleware;
|
|
1119
|
-
break;
|
|
1120
|
-
default:
|
|
1121
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
if (_options) {
|
|
1125
|
-
_config = {
|
|
1126
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1127
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1128
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1129
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1130
|
-
};
|
|
1131
|
-
}
|
|
1132
|
-
const requestContextPromise = this.requestFactory.updateInvoice(aPIUpdateInvoicePayload, id, _config);
|
|
572
|
+
const requestContextPromise = this.requestFactory.updateInvoice(aPIUpdateInvoicePayload, id, _options);
|
|
1133
573
|
// build promise chain
|
|
1134
574
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1135
|
-
for (const middleware of
|
|
575
|
+
for (const middleware of this.configuration.middleware) {
|
|
1136
576
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1137
577
|
}
|
|
1138
578
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1139
579
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1140
580
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1141
|
-
for (const middleware of
|
|
581
|
+
for (const middleware of this.configuration.middleware) {
|
|
1142
582
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1143
583
|
}
|
|
1144
584
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.updateInvoiceWithHttpInfo(rsp)));
|
|
@@ -1166,44 +606,16 @@ class ObservableProductsApi {
|
|
|
1166
606
|
* @param aPICreateProductPayload - The details of the product to create.
|
|
1167
607
|
*/
|
|
1168
608
|
createProductWithHttpInfo(aPICreateProductPayload, _options) {
|
|
1169
|
-
|
|
1170
|
-
let allMiddleware = [];
|
|
1171
|
-
if (_options && _options.middleware) {
|
|
1172
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1173
|
-
// call-time middleware provided
|
|
1174
|
-
const calltimeMiddleware = _options.middleware;
|
|
1175
|
-
switch (middlewareMergeStrategy) {
|
|
1176
|
-
case 'append':
|
|
1177
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1178
|
-
break;
|
|
1179
|
-
case 'prepend':
|
|
1180
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1181
|
-
break;
|
|
1182
|
-
case 'replace':
|
|
1183
|
-
allMiddleware = calltimeMiddleware;
|
|
1184
|
-
break;
|
|
1185
|
-
default:
|
|
1186
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
if (_options) {
|
|
1190
|
-
_config = {
|
|
1191
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1192
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1193
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1194
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1195
|
-
};
|
|
1196
|
-
}
|
|
1197
|
-
const requestContextPromise = this.requestFactory.createProduct(aPICreateProductPayload, _config);
|
|
609
|
+
const requestContextPromise = this.requestFactory.createProduct(aPICreateProductPayload, _options);
|
|
1198
610
|
// build promise chain
|
|
1199
611
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1200
|
-
for (const middleware of
|
|
612
|
+
for (const middleware of this.configuration.middleware) {
|
|
1201
613
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1202
614
|
}
|
|
1203
615
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1204
616
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1205
617
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1206
|
-
for (const middleware of
|
|
618
|
+
for (const middleware of this.configuration.middleware) {
|
|
1207
619
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1208
620
|
}
|
|
1209
621
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.createProductWithHttpInfo(rsp)));
|
|
@@ -1221,44 +633,16 @@ class ObservableProductsApi {
|
|
|
1221
633
|
* @param id - The ID of the product to delete.
|
|
1222
634
|
*/
|
|
1223
635
|
deleteProductWithHttpInfo(id, _options) {
|
|
1224
|
-
|
|
1225
|
-
let allMiddleware = [];
|
|
1226
|
-
if (_options && _options.middleware) {
|
|
1227
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1228
|
-
// call-time middleware provided
|
|
1229
|
-
const calltimeMiddleware = _options.middleware;
|
|
1230
|
-
switch (middlewareMergeStrategy) {
|
|
1231
|
-
case 'append':
|
|
1232
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1233
|
-
break;
|
|
1234
|
-
case 'prepend':
|
|
1235
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1236
|
-
break;
|
|
1237
|
-
case 'replace':
|
|
1238
|
-
allMiddleware = calltimeMiddleware;
|
|
1239
|
-
break;
|
|
1240
|
-
default:
|
|
1241
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
if (_options) {
|
|
1245
|
-
_config = {
|
|
1246
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1247
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1248
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1249
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1250
|
-
};
|
|
1251
|
-
}
|
|
1252
|
-
const requestContextPromise = this.requestFactory.deleteProduct(id, _config);
|
|
636
|
+
const requestContextPromise = this.requestFactory.deleteProduct(id, _options);
|
|
1253
637
|
// build promise chain
|
|
1254
638
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1255
|
-
for (const middleware of
|
|
639
|
+
for (const middleware of this.configuration.middleware) {
|
|
1256
640
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1257
641
|
}
|
|
1258
642
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1259
643
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1260
644
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1261
|
-
for (const middleware of
|
|
645
|
+
for (const middleware of this.configuration.middleware) {
|
|
1262
646
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1263
647
|
}
|
|
1264
648
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteProductWithHttpInfo(rsp)));
|
|
@@ -1276,44 +660,16 @@ class ObservableProductsApi {
|
|
|
1276
660
|
* @param id - The ID of the product to fetch.
|
|
1277
661
|
*/
|
|
1278
662
|
getProductWithHttpInfo(id, _options) {
|
|
1279
|
-
|
|
1280
|
-
let allMiddleware = [];
|
|
1281
|
-
if (_options && _options.middleware) {
|
|
1282
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1283
|
-
// call-time middleware provided
|
|
1284
|
-
const calltimeMiddleware = _options.middleware;
|
|
1285
|
-
switch (middlewareMergeStrategy) {
|
|
1286
|
-
case 'append':
|
|
1287
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1288
|
-
break;
|
|
1289
|
-
case 'prepend':
|
|
1290
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1291
|
-
break;
|
|
1292
|
-
case 'replace':
|
|
1293
|
-
allMiddleware = calltimeMiddleware;
|
|
1294
|
-
break;
|
|
1295
|
-
default:
|
|
1296
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
if (_options) {
|
|
1300
|
-
_config = {
|
|
1301
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1302
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1303
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1304
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1305
|
-
};
|
|
1306
|
-
}
|
|
1307
|
-
const requestContextPromise = this.requestFactory.getProduct(id, _config);
|
|
663
|
+
const requestContextPromise = this.requestFactory.getProduct(id, _options);
|
|
1308
664
|
// build promise chain
|
|
1309
665
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1310
|
-
for (const middleware of
|
|
666
|
+
for (const middleware of this.configuration.middleware) {
|
|
1311
667
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1312
668
|
}
|
|
1313
669
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1314
670
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1315
671
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1316
|
-
for (const middleware of
|
|
672
|
+
for (const middleware of this.configuration.middleware) {
|
|
1317
673
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1318
674
|
}
|
|
1319
675
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getProductWithHttpInfo(rsp)));
|
|
@@ -1331,44 +687,16 @@ class ObservableProductsApi {
|
|
|
1331
687
|
* @param aPIQueryPayloadAPIProduct - The query filters and pagination details.
|
|
1332
688
|
*/
|
|
1333
689
|
queryProductsWithHttpInfo(aPIQueryPayloadAPIProduct, _options) {
|
|
1334
|
-
|
|
1335
|
-
let allMiddleware = [];
|
|
1336
|
-
if (_options && _options.middleware) {
|
|
1337
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1338
|
-
// call-time middleware provided
|
|
1339
|
-
const calltimeMiddleware = _options.middleware;
|
|
1340
|
-
switch (middlewareMergeStrategy) {
|
|
1341
|
-
case 'append':
|
|
1342
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1343
|
-
break;
|
|
1344
|
-
case 'prepend':
|
|
1345
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1346
|
-
break;
|
|
1347
|
-
case 'replace':
|
|
1348
|
-
allMiddleware = calltimeMiddleware;
|
|
1349
|
-
break;
|
|
1350
|
-
default:
|
|
1351
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
if (_options) {
|
|
1355
|
-
_config = {
|
|
1356
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1357
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1358
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1359
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1360
|
-
};
|
|
1361
|
-
}
|
|
1362
|
-
const requestContextPromise = this.requestFactory.queryProducts(aPIQueryPayloadAPIProduct, _config);
|
|
690
|
+
const requestContextPromise = this.requestFactory.queryProducts(aPIQueryPayloadAPIProduct, _options);
|
|
1363
691
|
// build promise chain
|
|
1364
692
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1365
|
-
for (const middleware of
|
|
693
|
+
for (const middleware of this.configuration.middleware) {
|
|
1366
694
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1367
695
|
}
|
|
1368
696
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1369
697
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1370
698
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1371
|
-
for (const middleware of
|
|
699
|
+
for (const middleware of this.configuration.middleware) {
|
|
1372
700
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1373
701
|
}
|
|
1374
702
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.queryProductsWithHttpInfo(rsp)));
|
|
@@ -1387,44 +715,16 @@ class ObservableProductsApi {
|
|
|
1387
715
|
* @param id - The ID of the product to update.
|
|
1388
716
|
*/
|
|
1389
717
|
updateProductWithHttpInfo(aPIUpdateProductPayload, id, _options) {
|
|
1390
|
-
|
|
1391
|
-
let allMiddleware = [];
|
|
1392
|
-
if (_options && _options.middleware) {
|
|
1393
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1394
|
-
// call-time middleware provided
|
|
1395
|
-
const calltimeMiddleware = _options.middleware;
|
|
1396
|
-
switch (middlewareMergeStrategy) {
|
|
1397
|
-
case 'append':
|
|
1398
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1399
|
-
break;
|
|
1400
|
-
case 'prepend':
|
|
1401
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1402
|
-
break;
|
|
1403
|
-
case 'replace':
|
|
1404
|
-
allMiddleware = calltimeMiddleware;
|
|
1405
|
-
break;
|
|
1406
|
-
default:
|
|
1407
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
if (_options) {
|
|
1411
|
-
_config = {
|
|
1412
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1413
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1414
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1415
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1416
|
-
};
|
|
1417
|
-
}
|
|
1418
|
-
const requestContextPromise = this.requestFactory.updateProduct(aPIUpdateProductPayload, id, _config);
|
|
718
|
+
const requestContextPromise = this.requestFactory.updateProduct(aPIUpdateProductPayload, id, _options);
|
|
1419
719
|
// build promise chain
|
|
1420
720
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1421
|
-
for (const middleware of
|
|
721
|
+
for (const middleware of this.configuration.middleware) {
|
|
1422
722
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1423
723
|
}
|
|
1424
724
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1425
725
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1426
726
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1427
|
-
for (const middleware of
|
|
727
|
+
for (const middleware of this.configuration.middleware) {
|
|
1428
728
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1429
729
|
}
|
|
1430
730
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.updateProductWithHttpInfo(rsp)));
|