vayu-ts 0.2.7 → 0.2.8
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/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
|
@@ -16,44 +16,16 @@ class ObservableAuthApi {
|
|
|
16
16
|
* @param loginRequest
|
|
17
17
|
*/
|
|
18
18
|
loginWithHttpInfo(loginRequest, _options) {
|
|
19
|
-
|
|
20
|
-
let allMiddleware = [];
|
|
21
|
-
if (_options && _options.middleware) {
|
|
22
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
23
|
-
// call-time middleware provided
|
|
24
|
-
const calltimeMiddleware = _options.middleware;
|
|
25
|
-
switch (middlewareMergeStrategy) {
|
|
26
|
-
case 'append':
|
|
27
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
28
|
-
break;
|
|
29
|
-
case 'prepend':
|
|
30
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
31
|
-
break;
|
|
32
|
-
case 'replace':
|
|
33
|
-
allMiddleware = calltimeMiddleware;
|
|
34
|
-
break;
|
|
35
|
-
default:
|
|
36
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (_options) {
|
|
40
|
-
_config = {
|
|
41
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
42
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
43
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
44
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
const requestContextPromise = this.requestFactory.login(loginRequest, _config);
|
|
19
|
+
const requestContextPromise = this.requestFactory.login(loginRequest, _options);
|
|
48
20
|
// build promise chain
|
|
49
21
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
50
|
-
for (const middleware of
|
|
22
|
+
for (const middleware of this.configuration.middleware) {
|
|
51
23
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
52
24
|
}
|
|
53
25
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
54
26
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
55
27
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
56
|
-
for (const middleware of
|
|
28
|
+
for (const middleware of this.configuration.middleware) {
|
|
57
29
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
58
30
|
}
|
|
59
31
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.loginWithHttpInfo(rsp)));
|
|
@@ -82,44 +54,16 @@ class ObservableContractsApi {
|
|
|
82
54
|
* @param createContractRequest
|
|
83
55
|
*/
|
|
84
56
|
createContractWithHttpInfo(createContractRequest, _options) {
|
|
85
|
-
|
|
86
|
-
let allMiddleware = [];
|
|
87
|
-
if (_options && _options.middleware) {
|
|
88
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
89
|
-
// call-time middleware provided
|
|
90
|
-
const calltimeMiddleware = _options.middleware;
|
|
91
|
-
switch (middlewareMergeStrategy) {
|
|
92
|
-
case 'append':
|
|
93
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
94
|
-
break;
|
|
95
|
-
case 'prepend':
|
|
96
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
97
|
-
break;
|
|
98
|
-
case 'replace':
|
|
99
|
-
allMiddleware = calltimeMiddleware;
|
|
100
|
-
break;
|
|
101
|
-
default:
|
|
102
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
if (_options) {
|
|
106
|
-
_config = {
|
|
107
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
108
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
109
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
110
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
const requestContextPromise = this.requestFactory.createContract(createContractRequest, _config);
|
|
57
|
+
const requestContextPromise = this.requestFactory.createContract(createContractRequest, _options);
|
|
114
58
|
// build promise chain
|
|
115
59
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
116
|
-
for (const middleware of
|
|
60
|
+
for (const middleware of this.configuration.middleware) {
|
|
117
61
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
118
62
|
}
|
|
119
63
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
120
64
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
121
65
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
122
|
-
for (const middleware of
|
|
66
|
+
for (const middleware of this.configuration.middleware) {
|
|
123
67
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
124
68
|
}
|
|
125
69
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.createContractWithHttpInfo(rsp)));
|
|
@@ -139,44 +83,16 @@ class ObservableContractsApi {
|
|
|
139
83
|
* @param contractId
|
|
140
84
|
*/
|
|
141
85
|
deleteContractWithHttpInfo(contractId, _options) {
|
|
142
|
-
|
|
143
|
-
let allMiddleware = [];
|
|
144
|
-
if (_options && _options.middleware) {
|
|
145
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
146
|
-
// call-time middleware provided
|
|
147
|
-
const calltimeMiddleware = _options.middleware;
|
|
148
|
-
switch (middlewareMergeStrategy) {
|
|
149
|
-
case 'append':
|
|
150
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
151
|
-
break;
|
|
152
|
-
case 'prepend':
|
|
153
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
154
|
-
break;
|
|
155
|
-
case 'replace':
|
|
156
|
-
allMiddleware = calltimeMiddleware;
|
|
157
|
-
break;
|
|
158
|
-
default:
|
|
159
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
if (_options) {
|
|
163
|
-
_config = {
|
|
164
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
165
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
166
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
167
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
const requestContextPromise = this.requestFactory.deleteContract(contractId, _config);
|
|
86
|
+
const requestContextPromise = this.requestFactory.deleteContract(contractId, _options);
|
|
171
87
|
// build promise chain
|
|
172
88
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
173
|
-
for (const middleware of
|
|
89
|
+
for (const middleware of this.configuration.middleware) {
|
|
174
90
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
175
91
|
}
|
|
176
92
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
177
93
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
178
94
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
179
|
-
for (const middleware of
|
|
95
|
+
for (const middleware of this.configuration.middleware) {
|
|
180
96
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
181
97
|
}
|
|
182
98
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteContractWithHttpInfo(rsp)));
|
|
@@ -196,44 +112,16 @@ class ObservableContractsApi {
|
|
|
196
112
|
* @param contractId
|
|
197
113
|
*/
|
|
198
114
|
getContractWithHttpInfo(contractId, _options) {
|
|
199
|
-
|
|
200
|
-
let allMiddleware = [];
|
|
201
|
-
if (_options && _options.middleware) {
|
|
202
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
203
|
-
// call-time middleware provided
|
|
204
|
-
const calltimeMiddleware = _options.middleware;
|
|
205
|
-
switch (middlewareMergeStrategy) {
|
|
206
|
-
case 'append':
|
|
207
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
208
|
-
break;
|
|
209
|
-
case 'prepend':
|
|
210
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
211
|
-
break;
|
|
212
|
-
case 'replace':
|
|
213
|
-
allMiddleware = calltimeMiddleware;
|
|
214
|
-
break;
|
|
215
|
-
default:
|
|
216
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
if (_options) {
|
|
220
|
-
_config = {
|
|
221
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
222
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
223
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
224
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
const requestContextPromise = this.requestFactory.getContract(contractId, _config);
|
|
115
|
+
const requestContextPromise = this.requestFactory.getContract(contractId, _options);
|
|
228
116
|
// build promise chain
|
|
229
117
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
230
|
-
for (const middleware of
|
|
118
|
+
for (const middleware of this.configuration.middleware) {
|
|
231
119
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
232
120
|
}
|
|
233
121
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
234
122
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
235
123
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
236
|
-
for (const middleware of
|
|
124
|
+
for (const middleware of this.configuration.middleware) {
|
|
237
125
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
238
126
|
}
|
|
239
127
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getContractWithHttpInfo(rsp)));
|
|
@@ -254,44 +142,16 @@ class ObservableContractsApi {
|
|
|
254
142
|
* @param [cursor]
|
|
255
143
|
*/
|
|
256
144
|
listContractsWithHttpInfo(limit, cursor, _options) {
|
|
257
|
-
|
|
258
|
-
let allMiddleware = [];
|
|
259
|
-
if (_options && _options.middleware) {
|
|
260
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
261
|
-
// call-time middleware provided
|
|
262
|
-
const calltimeMiddleware = _options.middleware;
|
|
263
|
-
switch (middlewareMergeStrategy) {
|
|
264
|
-
case 'append':
|
|
265
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
266
|
-
break;
|
|
267
|
-
case 'prepend':
|
|
268
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
269
|
-
break;
|
|
270
|
-
case 'replace':
|
|
271
|
-
allMiddleware = calltimeMiddleware;
|
|
272
|
-
break;
|
|
273
|
-
default:
|
|
274
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
if (_options) {
|
|
278
|
-
_config = {
|
|
279
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
280
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
281
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
282
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
const requestContextPromise = this.requestFactory.listContracts(limit, cursor, _config);
|
|
145
|
+
const requestContextPromise = this.requestFactory.listContracts(limit, cursor, _options);
|
|
286
146
|
// build promise chain
|
|
287
147
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
288
|
-
for (const middleware of
|
|
148
|
+
for (const middleware of this.configuration.middleware) {
|
|
289
149
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
290
150
|
}
|
|
291
151
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
292
152
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
293
153
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
294
|
-
for (const middleware of
|
|
154
|
+
for (const middleware of this.configuration.middleware) {
|
|
295
155
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
296
156
|
}
|
|
297
157
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listContractsWithHttpInfo(rsp)));
|
|
@@ -321,44 +181,16 @@ class ObservableCreditsApi {
|
|
|
321
181
|
* @param deductCreditsRequest
|
|
322
182
|
*/
|
|
323
183
|
deductCreditsWithHttpInfo(deductCreditsRequest, _options) {
|
|
324
|
-
|
|
325
|
-
let allMiddleware = [];
|
|
326
|
-
if (_options && _options.middleware) {
|
|
327
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
328
|
-
// call-time middleware provided
|
|
329
|
-
const calltimeMiddleware = _options.middleware;
|
|
330
|
-
switch (middlewareMergeStrategy) {
|
|
331
|
-
case 'append':
|
|
332
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
333
|
-
break;
|
|
334
|
-
case 'prepend':
|
|
335
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
336
|
-
break;
|
|
337
|
-
case 'replace':
|
|
338
|
-
allMiddleware = calltimeMiddleware;
|
|
339
|
-
break;
|
|
340
|
-
default:
|
|
341
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
if (_options) {
|
|
345
|
-
_config = {
|
|
346
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
347
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
348
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
349
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
const requestContextPromise = this.requestFactory.deductCredits(deductCreditsRequest, _config);
|
|
184
|
+
const requestContextPromise = this.requestFactory.deductCredits(deductCreditsRequest, _options);
|
|
353
185
|
// build promise chain
|
|
354
186
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
355
|
-
for (const middleware of
|
|
187
|
+
for (const middleware of this.configuration.middleware) {
|
|
356
188
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
357
189
|
}
|
|
358
190
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
359
191
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
360
192
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
361
|
-
for (const middleware of
|
|
193
|
+
for (const middleware of this.configuration.middleware) {
|
|
362
194
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
363
195
|
}
|
|
364
196
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deductCreditsWithHttpInfo(rsp)));
|
|
@@ -378,44 +210,16 @@ class ObservableCreditsApi {
|
|
|
378
210
|
* @param grantCreditsRequest
|
|
379
211
|
*/
|
|
380
212
|
grantCreditsWithHttpInfo(grantCreditsRequest, _options) {
|
|
381
|
-
|
|
382
|
-
let allMiddleware = [];
|
|
383
|
-
if (_options && _options.middleware) {
|
|
384
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
385
|
-
// call-time middleware provided
|
|
386
|
-
const calltimeMiddleware = _options.middleware;
|
|
387
|
-
switch (middlewareMergeStrategy) {
|
|
388
|
-
case 'append':
|
|
389
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
390
|
-
break;
|
|
391
|
-
case 'prepend':
|
|
392
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
393
|
-
break;
|
|
394
|
-
case 'replace':
|
|
395
|
-
allMiddleware = calltimeMiddleware;
|
|
396
|
-
break;
|
|
397
|
-
default:
|
|
398
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
if (_options) {
|
|
402
|
-
_config = {
|
|
403
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
404
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
405
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
406
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
const requestContextPromise = this.requestFactory.grantCredits(grantCreditsRequest, _config);
|
|
213
|
+
const requestContextPromise = this.requestFactory.grantCredits(grantCreditsRequest, _options);
|
|
410
214
|
// build promise chain
|
|
411
215
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
412
|
-
for (const middleware of
|
|
216
|
+
for (const middleware of this.configuration.middleware) {
|
|
413
217
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
414
218
|
}
|
|
415
219
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
416
220
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
417
221
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
418
|
-
for (const middleware of
|
|
222
|
+
for (const middleware of this.configuration.middleware) {
|
|
419
223
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
420
224
|
}
|
|
421
225
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.grantCreditsWithHttpInfo(rsp)));
|
|
@@ -437,44 +241,16 @@ class ObservableCreditsApi {
|
|
|
437
241
|
* @param [cursor]
|
|
438
242
|
*/
|
|
439
243
|
listCreditLedgerEntriesWithHttpInfo(customerId, limit, cursor, _options) {
|
|
440
|
-
|
|
441
|
-
let allMiddleware = [];
|
|
442
|
-
if (_options && _options.middleware) {
|
|
443
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
444
|
-
// call-time middleware provided
|
|
445
|
-
const calltimeMiddleware = _options.middleware;
|
|
446
|
-
switch (middlewareMergeStrategy) {
|
|
447
|
-
case 'append':
|
|
448
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
449
|
-
break;
|
|
450
|
-
case 'prepend':
|
|
451
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
452
|
-
break;
|
|
453
|
-
case 'replace':
|
|
454
|
-
allMiddleware = calltimeMiddleware;
|
|
455
|
-
break;
|
|
456
|
-
default:
|
|
457
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
if (_options) {
|
|
461
|
-
_config = {
|
|
462
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
463
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
464
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
465
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
466
|
-
};
|
|
467
|
-
}
|
|
468
|
-
const requestContextPromise = this.requestFactory.listCreditLedgerEntries(customerId, limit, cursor, _config);
|
|
244
|
+
const requestContextPromise = this.requestFactory.listCreditLedgerEntries(customerId, limit, cursor, _options);
|
|
469
245
|
// build promise chain
|
|
470
246
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
471
|
-
for (const middleware of
|
|
247
|
+
for (const middleware of this.configuration.middleware) {
|
|
472
248
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
473
249
|
}
|
|
474
250
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
475
251
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
476
252
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
477
|
-
for (const middleware of
|
|
253
|
+
for (const middleware of this.configuration.middleware) {
|
|
478
254
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
479
255
|
}
|
|
480
256
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listCreditLedgerEntriesWithHttpInfo(rsp)));
|
|
@@ -505,44 +281,16 @@ class ObservableCustomersApi {
|
|
|
505
281
|
* @param createCustomerRequest
|
|
506
282
|
*/
|
|
507
283
|
createCustomerWithHttpInfo(createCustomerRequest, _options) {
|
|
508
|
-
|
|
509
|
-
let allMiddleware = [];
|
|
510
|
-
if (_options && _options.middleware) {
|
|
511
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
512
|
-
// call-time middleware provided
|
|
513
|
-
const calltimeMiddleware = _options.middleware;
|
|
514
|
-
switch (middlewareMergeStrategy) {
|
|
515
|
-
case 'append':
|
|
516
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
517
|
-
break;
|
|
518
|
-
case 'prepend':
|
|
519
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
520
|
-
break;
|
|
521
|
-
case 'replace':
|
|
522
|
-
allMiddleware = calltimeMiddleware;
|
|
523
|
-
break;
|
|
524
|
-
default:
|
|
525
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
if (_options) {
|
|
529
|
-
_config = {
|
|
530
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
531
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
532
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
533
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
const requestContextPromise = this.requestFactory.createCustomer(createCustomerRequest, _config);
|
|
284
|
+
const requestContextPromise = this.requestFactory.createCustomer(createCustomerRequest, _options);
|
|
537
285
|
// build promise chain
|
|
538
286
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
539
|
-
for (const middleware of
|
|
287
|
+
for (const middleware of this.configuration.middleware) {
|
|
540
288
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
541
289
|
}
|
|
542
290
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
543
291
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
544
292
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
545
|
-
for (const middleware of
|
|
293
|
+
for (const middleware of this.configuration.middleware) {
|
|
546
294
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
547
295
|
}
|
|
548
296
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.createCustomerWithHttpInfo(rsp)));
|
|
@@ -562,44 +310,16 @@ class ObservableCustomersApi {
|
|
|
562
310
|
* @param customerId
|
|
563
311
|
*/
|
|
564
312
|
deleteCustomerWithHttpInfo(customerId, _options) {
|
|
565
|
-
|
|
566
|
-
let allMiddleware = [];
|
|
567
|
-
if (_options && _options.middleware) {
|
|
568
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
569
|
-
// call-time middleware provided
|
|
570
|
-
const calltimeMiddleware = _options.middleware;
|
|
571
|
-
switch (middlewareMergeStrategy) {
|
|
572
|
-
case 'append':
|
|
573
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
574
|
-
break;
|
|
575
|
-
case 'prepend':
|
|
576
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
577
|
-
break;
|
|
578
|
-
case 'replace':
|
|
579
|
-
allMiddleware = calltimeMiddleware;
|
|
580
|
-
break;
|
|
581
|
-
default:
|
|
582
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
if (_options) {
|
|
586
|
-
_config = {
|
|
587
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
588
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
589
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
590
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
591
|
-
};
|
|
592
|
-
}
|
|
593
|
-
const requestContextPromise = this.requestFactory.deleteCustomer(customerId, _config);
|
|
313
|
+
const requestContextPromise = this.requestFactory.deleteCustomer(customerId, _options);
|
|
594
314
|
// build promise chain
|
|
595
315
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
596
|
-
for (const middleware of
|
|
316
|
+
for (const middleware of this.configuration.middleware) {
|
|
597
317
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
598
318
|
}
|
|
599
319
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
600
320
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
601
321
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
602
|
-
for (const middleware of
|
|
322
|
+
for (const middleware of this.configuration.middleware) {
|
|
603
323
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
604
324
|
}
|
|
605
325
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteCustomerWithHttpInfo(rsp)));
|
|
@@ -619,44 +339,16 @@ class ObservableCustomersApi {
|
|
|
619
339
|
* @param customerId
|
|
620
340
|
*/
|
|
621
341
|
getCustomerWithHttpInfo(customerId, _options) {
|
|
622
|
-
|
|
623
|
-
let allMiddleware = [];
|
|
624
|
-
if (_options && _options.middleware) {
|
|
625
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
626
|
-
// call-time middleware provided
|
|
627
|
-
const calltimeMiddleware = _options.middleware;
|
|
628
|
-
switch (middlewareMergeStrategy) {
|
|
629
|
-
case 'append':
|
|
630
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
631
|
-
break;
|
|
632
|
-
case 'prepend':
|
|
633
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
634
|
-
break;
|
|
635
|
-
case 'replace':
|
|
636
|
-
allMiddleware = calltimeMiddleware;
|
|
637
|
-
break;
|
|
638
|
-
default:
|
|
639
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
if (_options) {
|
|
643
|
-
_config = {
|
|
644
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
645
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
646
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
647
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
648
|
-
};
|
|
649
|
-
}
|
|
650
|
-
const requestContextPromise = this.requestFactory.getCustomer(customerId, _config);
|
|
342
|
+
const requestContextPromise = this.requestFactory.getCustomer(customerId, _options);
|
|
651
343
|
// build promise chain
|
|
652
344
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
653
|
-
for (const middleware of
|
|
345
|
+
for (const middleware of this.configuration.middleware) {
|
|
654
346
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
655
347
|
}
|
|
656
348
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
657
349
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
658
350
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
659
|
-
for (const middleware of
|
|
351
|
+
for (const middleware of this.configuration.middleware) {
|
|
660
352
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
661
353
|
}
|
|
662
354
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getCustomerWithHttpInfo(rsp)));
|
|
@@ -676,44 +368,16 @@ class ObservableCustomersApi {
|
|
|
676
368
|
* @param externalId
|
|
677
369
|
*/
|
|
678
370
|
getCustomerByExternalIdWithHttpInfo(externalId, _options) {
|
|
679
|
-
|
|
680
|
-
let allMiddleware = [];
|
|
681
|
-
if (_options && _options.middleware) {
|
|
682
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
683
|
-
// call-time middleware provided
|
|
684
|
-
const calltimeMiddleware = _options.middleware;
|
|
685
|
-
switch (middlewareMergeStrategy) {
|
|
686
|
-
case 'append':
|
|
687
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
688
|
-
break;
|
|
689
|
-
case 'prepend':
|
|
690
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
691
|
-
break;
|
|
692
|
-
case 'replace':
|
|
693
|
-
allMiddleware = calltimeMiddleware;
|
|
694
|
-
break;
|
|
695
|
-
default:
|
|
696
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
if (_options) {
|
|
700
|
-
_config = {
|
|
701
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
702
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
703
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
704
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
const requestContextPromise = this.requestFactory.getCustomerByExternalId(externalId, _config);
|
|
371
|
+
const requestContextPromise = this.requestFactory.getCustomerByExternalId(externalId, _options);
|
|
708
372
|
// build promise chain
|
|
709
373
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
710
|
-
for (const middleware of
|
|
374
|
+
for (const middleware of this.configuration.middleware) {
|
|
711
375
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
712
376
|
}
|
|
713
377
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
714
378
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
715
379
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
716
|
-
for (const middleware of
|
|
380
|
+
for (const middleware of this.configuration.middleware) {
|
|
717
381
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
718
382
|
}
|
|
719
383
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getCustomerByExternalIdWithHttpInfo(rsp)));
|
|
@@ -733,44 +397,16 @@ class ObservableCustomersApi {
|
|
|
733
397
|
* @param customerId
|
|
734
398
|
*/
|
|
735
399
|
getCustomerProductsConsumptionsWithHttpInfo(customerId, _options) {
|
|
736
|
-
|
|
737
|
-
let allMiddleware = [];
|
|
738
|
-
if (_options && _options.middleware) {
|
|
739
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
740
|
-
// call-time middleware provided
|
|
741
|
-
const calltimeMiddleware = _options.middleware;
|
|
742
|
-
switch (middlewareMergeStrategy) {
|
|
743
|
-
case 'append':
|
|
744
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
745
|
-
break;
|
|
746
|
-
case 'prepend':
|
|
747
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
748
|
-
break;
|
|
749
|
-
case 'replace':
|
|
750
|
-
allMiddleware = calltimeMiddleware;
|
|
751
|
-
break;
|
|
752
|
-
default:
|
|
753
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
if (_options) {
|
|
757
|
-
_config = {
|
|
758
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
759
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
760
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
761
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
const requestContextPromise = this.requestFactory.getCustomerProductsConsumptions(customerId, _config);
|
|
400
|
+
const requestContextPromise = this.requestFactory.getCustomerProductsConsumptions(customerId, _options);
|
|
765
401
|
// build promise chain
|
|
766
402
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
767
|
-
for (const middleware of
|
|
403
|
+
for (const middleware of this.configuration.middleware) {
|
|
768
404
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
769
405
|
}
|
|
770
406
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
771
407
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
772
408
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
773
|
-
for (const middleware of
|
|
409
|
+
for (const middleware of this.configuration.middleware) {
|
|
774
410
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
775
411
|
}
|
|
776
412
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getCustomerProductsConsumptionsWithHttpInfo(rsp)));
|
|
@@ -791,44 +427,16 @@ class ObservableCustomersApi {
|
|
|
791
427
|
* @param [cursor]
|
|
792
428
|
*/
|
|
793
429
|
listCustomersWithHttpInfo(limit, cursor, _options) {
|
|
794
|
-
|
|
795
|
-
let allMiddleware = [];
|
|
796
|
-
if (_options && _options.middleware) {
|
|
797
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
798
|
-
// call-time middleware provided
|
|
799
|
-
const calltimeMiddleware = _options.middleware;
|
|
800
|
-
switch (middlewareMergeStrategy) {
|
|
801
|
-
case 'append':
|
|
802
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
803
|
-
break;
|
|
804
|
-
case 'prepend':
|
|
805
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
806
|
-
break;
|
|
807
|
-
case 'replace':
|
|
808
|
-
allMiddleware = calltimeMiddleware;
|
|
809
|
-
break;
|
|
810
|
-
default:
|
|
811
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
if (_options) {
|
|
815
|
-
_config = {
|
|
816
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
817
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
818
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
819
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
const requestContextPromise = this.requestFactory.listCustomers(limit, cursor, _config);
|
|
430
|
+
const requestContextPromise = this.requestFactory.listCustomers(limit, cursor, _options);
|
|
823
431
|
// build promise chain
|
|
824
432
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
825
|
-
for (const middleware of
|
|
433
|
+
for (const middleware of this.configuration.middleware) {
|
|
826
434
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
827
435
|
}
|
|
828
436
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
829
437
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
830
438
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
831
|
-
for (const middleware of
|
|
439
|
+
for (const middleware of this.configuration.middleware) {
|
|
832
440
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
833
441
|
}
|
|
834
442
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listCustomersWithHttpInfo(rsp)));
|
|
@@ -850,44 +458,16 @@ class ObservableCustomersApi {
|
|
|
850
458
|
* @param customerId
|
|
851
459
|
*/
|
|
852
460
|
updateCustomerWithHttpInfo(updateCustomerRequest, customerId, _options) {
|
|
853
|
-
|
|
854
|
-
let allMiddleware = [];
|
|
855
|
-
if (_options && _options.middleware) {
|
|
856
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
857
|
-
// call-time middleware provided
|
|
858
|
-
const calltimeMiddleware = _options.middleware;
|
|
859
|
-
switch (middlewareMergeStrategy) {
|
|
860
|
-
case 'append':
|
|
861
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
862
|
-
break;
|
|
863
|
-
case 'prepend':
|
|
864
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
865
|
-
break;
|
|
866
|
-
case 'replace':
|
|
867
|
-
allMiddleware = calltimeMiddleware;
|
|
868
|
-
break;
|
|
869
|
-
default:
|
|
870
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
if (_options) {
|
|
874
|
-
_config = {
|
|
875
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
876
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
877
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
878
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
879
|
-
};
|
|
880
|
-
}
|
|
881
|
-
const requestContextPromise = this.requestFactory.updateCustomer(updateCustomerRequest, customerId, _config);
|
|
461
|
+
const requestContextPromise = this.requestFactory.updateCustomer(updateCustomerRequest, customerId, _options);
|
|
882
462
|
// build promise chain
|
|
883
463
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
884
|
-
for (const middleware of
|
|
464
|
+
for (const middleware of this.configuration.middleware) {
|
|
885
465
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
886
466
|
}
|
|
887
467
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
888
468
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
889
469
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
890
|
-
for (const middleware of
|
|
470
|
+
for (const middleware of this.configuration.middleware) {
|
|
891
471
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
892
472
|
}
|
|
893
473
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.updateCustomerWithHttpInfo(rsp)));
|
|
@@ -917,44 +497,16 @@ class ObservableEventsApi {
|
|
|
917
497
|
* @param refId
|
|
918
498
|
*/
|
|
919
499
|
deleteEventByRefIdWithHttpInfo(refId, _options) {
|
|
920
|
-
|
|
921
|
-
let allMiddleware = [];
|
|
922
|
-
if (_options && _options.middleware) {
|
|
923
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
924
|
-
// call-time middleware provided
|
|
925
|
-
const calltimeMiddleware = _options.middleware;
|
|
926
|
-
switch (middlewareMergeStrategy) {
|
|
927
|
-
case 'append':
|
|
928
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
929
|
-
break;
|
|
930
|
-
case 'prepend':
|
|
931
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
932
|
-
break;
|
|
933
|
-
case 'replace':
|
|
934
|
-
allMiddleware = calltimeMiddleware;
|
|
935
|
-
break;
|
|
936
|
-
default:
|
|
937
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
if (_options) {
|
|
941
|
-
_config = {
|
|
942
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
943
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
944
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
945
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
946
|
-
};
|
|
947
|
-
}
|
|
948
|
-
const requestContextPromise = this.requestFactory.deleteEventByRefId(refId, _config);
|
|
500
|
+
const requestContextPromise = this.requestFactory.deleteEventByRefId(refId, _options);
|
|
949
501
|
// build promise chain
|
|
950
502
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
951
|
-
for (const middleware of
|
|
503
|
+
for (const middleware of this.configuration.middleware) {
|
|
952
504
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
953
505
|
}
|
|
954
506
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
955
507
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
956
508
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
957
|
-
for (const middleware of
|
|
509
|
+
for (const middleware of this.configuration.middleware) {
|
|
958
510
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
959
511
|
}
|
|
960
512
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteEventByRefIdWithHttpInfo(rsp)));
|
|
@@ -974,44 +526,16 @@ class ObservableEventsApi {
|
|
|
974
526
|
* @param refId
|
|
975
527
|
*/
|
|
976
528
|
getEventByRefIdWithHttpInfo(refId, _options) {
|
|
977
|
-
|
|
978
|
-
let allMiddleware = [];
|
|
979
|
-
if (_options && _options.middleware) {
|
|
980
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
981
|
-
// call-time middleware provided
|
|
982
|
-
const calltimeMiddleware = _options.middleware;
|
|
983
|
-
switch (middlewareMergeStrategy) {
|
|
984
|
-
case 'append':
|
|
985
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
986
|
-
break;
|
|
987
|
-
case 'prepend':
|
|
988
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
989
|
-
break;
|
|
990
|
-
case 'replace':
|
|
991
|
-
allMiddleware = calltimeMiddleware;
|
|
992
|
-
break;
|
|
993
|
-
default:
|
|
994
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
if (_options) {
|
|
998
|
-
_config = {
|
|
999
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1000
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1001
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1002
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1003
|
-
};
|
|
1004
|
-
}
|
|
1005
|
-
const requestContextPromise = this.requestFactory.getEventByRefId(refId, _config);
|
|
529
|
+
const requestContextPromise = this.requestFactory.getEventByRefId(refId, _options);
|
|
1006
530
|
// build promise chain
|
|
1007
531
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1008
|
-
for (const middleware of
|
|
532
|
+
for (const middleware of this.configuration.middleware) {
|
|
1009
533
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1010
534
|
}
|
|
1011
535
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1012
536
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1013
537
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1014
|
-
for (const middleware of
|
|
538
|
+
for (const middleware of this.configuration.middleware) {
|
|
1015
539
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1016
540
|
}
|
|
1017
541
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getEventByRefIdWithHttpInfo(rsp)));
|
|
@@ -1035,44 +559,16 @@ class ObservableEventsApi {
|
|
|
1035
559
|
* @param [cursor]
|
|
1036
560
|
*/
|
|
1037
561
|
queryEventsWithHttpInfo(startTime, endTime, eventName, limit, cursor, _options) {
|
|
1038
|
-
|
|
1039
|
-
let allMiddleware = [];
|
|
1040
|
-
if (_options && _options.middleware) {
|
|
1041
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1042
|
-
// call-time middleware provided
|
|
1043
|
-
const calltimeMiddleware = _options.middleware;
|
|
1044
|
-
switch (middlewareMergeStrategy) {
|
|
1045
|
-
case 'append':
|
|
1046
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1047
|
-
break;
|
|
1048
|
-
case 'prepend':
|
|
1049
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1050
|
-
break;
|
|
1051
|
-
case 'replace':
|
|
1052
|
-
allMiddleware = calltimeMiddleware;
|
|
1053
|
-
break;
|
|
1054
|
-
default:
|
|
1055
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
if (_options) {
|
|
1059
|
-
_config = {
|
|
1060
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1061
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1062
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1063
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1064
|
-
};
|
|
1065
|
-
}
|
|
1066
|
-
const requestContextPromise = this.requestFactory.queryEvents(startTime, endTime, eventName, limit, cursor, _config);
|
|
562
|
+
const requestContextPromise = this.requestFactory.queryEvents(startTime, endTime, eventName, limit, cursor, _options);
|
|
1067
563
|
// build promise chain
|
|
1068
564
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1069
|
-
for (const middleware of
|
|
565
|
+
for (const middleware of this.configuration.middleware) {
|
|
1070
566
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1071
567
|
}
|
|
1072
568
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1073
569
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1074
570
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1075
|
-
for (const middleware of
|
|
571
|
+
for (const middleware of this.configuration.middleware) {
|
|
1076
572
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1077
573
|
}
|
|
1078
574
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.queryEventsWithHttpInfo(rsp)));
|
|
@@ -1096,44 +592,16 @@ class ObservableEventsApi {
|
|
|
1096
592
|
* @param sendEventsRequest An array of events following the EventInput schema. This request body should be included in the PUT request to \'/events\' Up to 1000 events or a total payload max size of 256KB
|
|
1097
593
|
*/
|
|
1098
594
|
sendEventsWithHttpInfo(sendEventsRequest, _options) {
|
|
1099
|
-
|
|
1100
|
-
let allMiddleware = [];
|
|
1101
|
-
if (_options && _options.middleware) {
|
|
1102
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1103
|
-
// call-time middleware provided
|
|
1104
|
-
const calltimeMiddleware = _options.middleware;
|
|
1105
|
-
switch (middlewareMergeStrategy) {
|
|
1106
|
-
case 'append':
|
|
1107
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1108
|
-
break;
|
|
1109
|
-
case 'prepend':
|
|
1110
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1111
|
-
break;
|
|
1112
|
-
case 'replace':
|
|
1113
|
-
allMiddleware = calltimeMiddleware;
|
|
1114
|
-
break;
|
|
1115
|
-
default:
|
|
1116
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
if (_options) {
|
|
1120
|
-
_config = {
|
|
1121
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1122
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1123
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1124
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1125
|
-
};
|
|
1126
|
-
}
|
|
1127
|
-
const requestContextPromise = this.requestFactory.sendEvents(sendEventsRequest, _config);
|
|
595
|
+
const requestContextPromise = this.requestFactory.sendEvents(sendEventsRequest, _options);
|
|
1128
596
|
// build promise chain
|
|
1129
597
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1130
|
-
for (const middleware of
|
|
598
|
+
for (const middleware of this.configuration.middleware) {
|
|
1131
599
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1132
600
|
}
|
|
1133
601
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1134
602
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1135
603
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1136
|
-
for (const middleware of
|
|
604
|
+
for (const middleware of this.configuration.middleware) {
|
|
1137
605
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1138
606
|
}
|
|
1139
607
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.sendEventsWithHttpInfo(rsp)));
|
|
@@ -1153,44 +621,16 @@ class ObservableEventsApi {
|
|
|
1153
621
|
* @param eventsDryRunRequest An array of events following the EventInput schema. This request body should be included in the PUT request to \'/events\' Up to 1000 events or a total payload max size of 256KB
|
|
1154
622
|
*/
|
|
1155
623
|
sendEventsDryRunWithHttpInfo(eventsDryRunRequest, _options) {
|
|
1156
|
-
|
|
1157
|
-
let allMiddleware = [];
|
|
1158
|
-
if (_options && _options.middleware) {
|
|
1159
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1160
|
-
// call-time middleware provided
|
|
1161
|
-
const calltimeMiddleware = _options.middleware;
|
|
1162
|
-
switch (middlewareMergeStrategy) {
|
|
1163
|
-
case 'append':
|
|
1164
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1165
|
-
break;
|
|
1166
|
-
case 'prepend':
|
|
1167
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1168
|
-
break;
|
|
1169
|
-
case 'replace':
|
|
1170
|
-
allMiddleware = calltimeMiddleware;
|
|
1171
|
-
break;
|
|
1172
|
-
default:
|
|
1173
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
if (_options) {
|
|
1177
|
-
_config = {
|
|
1178
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1179
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1180
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1181
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
const requestContextPromise = this.requestFactory.sendEventsDryRun(eventsDryRunRequest, _config);
|
|
624
|
+
const requestContextPromise = this.requestFactory.sendEventsDryRun(eventsDryRunRequest, _options);
|
|
1185
625
|
// build promise chain
|
|
1186
626
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1187
|
-
for (const middleware of
|
|
627
|
+
for (const middleware of this.configuration.middleware) {
|
|
1188
628
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1189
629
|
}
|
|
1190
630
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1191
631
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1192
632
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1193
|
-
for (const middleware of
|
|
633
|
+
for (const middleware of this.configuration.middleware) {
|
|
1194
634
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1195
635
|
}
|
|
1196
636
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.sendEventsDryRunWithHttpInfo(rsp)));
|
|
@@ -1219,44 +659,16 @@ class ObservableIntegrationsApi {
|
|
|
1219
659
|
* @param netSuiteExportSalesOrderRequest
|
|
1220
660
|
*/
|
|
1221
661
|
exportNetSuiteSalesOrderWithHttpInfo(netSuiteExportSalesOrderRequest, _options) {
|
|
1222
|
-
|
|
1223
|
-
let allMiddleware = [];
|
|
1224
|
-
if (_options && _options.middleware) {
|
|
1225
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1226
|
-
// call-time middleware provided
|
|
1227
|
-
const calltimeMiddleware = _options.middleware;
|
|
1228
|
-
switch (middlewareMergeStrategy) {
|
|
1229
|
-
case 'append':
|
|
1230
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1231
|
-
break;
|
|
1232
|
-
case 'prepend':
|
|
1233
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1234
|
-
break;
|
|
1235
|
-
case 'replace':
|
|
1236
|
-
allMiddleware = calltimeMiddleware;
|
|
1237
|
-
break;
|
|
1238
|
-
default:
|
|
1239
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
if (_options) {
|
|
1243
|
-
_config = {
|
|
1244
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1245
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1246
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1247
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1248
|
-
};
|
|
1249
|
-
}
|
|
1250
|
-
const requestContextPromise = this.requestFactory.exportNetSuiteSalesOrder(netSuiteExportSalesOrderRequest, _config);
|
|
662
|
+
const requestContextPromise = this.requestFactory.exportNetSuiteSalesOrder(netSuiteExportSalesOrderRequest, _options);
|
|
1251
663
|
// build promise chain
|
|
1252
664
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1253
|
-
for (const middleware of
|
|
665
|
+
for (const middleware of this.configuration.middleware) {
|
|
1254
666
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1255
667
|
}
|
|
1256
668
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1257
669
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1258
670
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1259
|
-
for (const middleware of
|
|
671
|
+
for (const middleware of this.configuration.middleware) {
|
|
1260
672
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1261
673
|
}
|
|
1262
674
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.exportNetSuiteSalesOrderWithHttpInfo(rsp)));
|
|
@@ -1276,44 +688,16 @@ class ObservableIntegrationsApi {
|
|
|
1276
688
|
* @param netSuiteSyncInvoicesRequest
|
|
1277
689
|
*/
|
|
1278
690
|
netSuiteSyncInvoicesWithHttpInfo(netSuiteSyncInvoicesRequest, _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.netSuiteSyncInvoices(netSuiteSyncInvoicesRequest, _config);
|
|
691
|
+
const requestContextPromise = this.requestFactory.netSuiteSyncInvoices(netSuiteSyncInvoicesRequest, _options);
|
|
1308
692
|
// build promise chain
|
|
1309
693
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1310
|
-
for (const middleware of
|
|
694
|
+
for (const middleware of this.configuration.middleware) {
|
|
1311
695
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1312
696
|
}
|
|
1313
697
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1314
698
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1315
699
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1316
|
-
for (const middleware of
|
|
700
|
+
for (const middleware of this.configuration.middleware) {
|
|
1317
701
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1318
702
|
}
|
|
1319
703
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.netSuiteSyncInvoicesWithHttpInfo(rsp)));
|
|
@@ -1342,44 +726,16 @@ class ObservableInvoicesApi {
|
|
|
1342
726
|
* @param invoiceId
|
|
1343
727
|
*/
|
|
1344
728
|
getInvoiceWithHttpInfo(invoiceId, _options) {
|
|
1345
|
-
|
|
1346
|
-
let allMiddleware = [];
|
|
1347
|
-
if (_options && _options.middleware) {
|
|
1348
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1349
|
-
// call-time middleware provided
|
|
1350
|
-
const calltimeMiddleware = _options.middleware;
|
|
1351
|
-
switch (middlewareMergeStrategy) {
|
|
1352
|
-
case 'append':
|
|
1353
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1354
|
-
break;
|
|
1355
|
-
case 'prepend':
|
|
1356
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1357
|
-
break;
|
|
1358
|
-
case 'replace':
|
|
1359
|
-
allMiddleware = calltimeMiddleware;
|
|
1360
|
-
break;
|
|
1361
|
-
default:
|
|
1362
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
if (_options) {
|
|
1366
|
-
_config = {
|
|
1367
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1368
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1369
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1370
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1371
|
-
};
|
|
1372
|
-
}
|
|
1373
|
-
const requestContextPromise = this.requestFactory.getInvoice(invoiceId, _config);
|
|
729
|
+
const requestContextPromise = this.requestFactory.getInvoice(invoiceId, _options);
|
|
1374
730
|
// build promise chain
|
|
1375
731
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1376
|
-
for (const middleware of
|
|
732
|
+
for (const middleware of this.configuration.middleware) {
|
|
1377
733
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1378
734
|
}
|
|
1379
735
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1380
736
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1381
737
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1382
|
-
for (const middleware of
|
|
738
|
+
for (const middleware of this.configuration.middleware) {
|
|
1383
739
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1384
740
|
}
|
|
1385
741
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getInvoiceWithHttpInfo(rsp)));
|
|
@@ -1400,44 +756,16 @@ class ObservableInvoicesApi {
|
|
|
1400
756
|
* @param [cursor]
|
|
1401
757
|
*/
|
|
1402
758
|
listInvoicesWithHttpInfo(limit, cursor, _options) {
|
|
1403
|
-
|
|
1404
|
-
let allMiddleware = [];
|
|
1405
|
-
if (_options && _options.middleware) {
|
|
1406
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1407
|
-
// call-time middleware provided
|
|
1408
|
-
const calltimeMiddleware = _options.middleware;
|
|
1409
|
-
switch (middlewareMergeStrategy) {
|
|
1410
|
-
case 'append':
|
|
1411
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1412
|
-
break;
|
|
1413
|
-
case 'prepend':
|
|
1414
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1415
|
-
break;
|
|
1416
|
-
case 'replace':
|
|
1417
|
-
allMiddleware = calltimeMiddleware;
|
|
1418
|
-
break;
|
|
1419
|
-
default:
|
|
1420
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
if (_options) {
|
|
1424
|
-
_config = {
|
|
1425
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1426
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1427
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1428
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1429
|
-
};
|
|
1430
|
-
}
|
|
1431
|
-
const requestContextPromise = this.requestFactory.listInvoices(limit, cursor, _config);
|
|
759
|
+
const requestContextPromise = this.requestFactory.listInvoices(limit, cursor, _options);
|
|
1432
760
|
// build promise chain
|
|
1433
761
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1434
|
-
for (const middleware of
|
|
762
|
+
for (const middleware of this.configuration.middleware) {
|
|
1435
763
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1436
764
|
}
|
|
1437
765
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1438
766
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1439
767
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1440
|
-
for (const middleware of
|
|
768
|
+
for (const middleware of this.configuration.middleware) {
|
|
1441
769
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1442
770
|
}
|
|
1443
771
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listInvoicesWithHttpInfo(rsp)));
|
|
@@ -1467,44 +795,16 @@ class ObservableMetersApi {
|
|
|
1467
795
|
* @param meterId
|
|
1468
796
|
*/
|
|
1469
797
|
deleteMeterWithHttpInfo(meterId, _options) {
|
|
1470
|
-
|
|
1471
|
-
let allMiddleware = [];
|
|
1472
|
-
if (_options && _options.middleware) {
|
|
1473
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1474
|
-
// call-time middleware provided
|
|
1475
|
-
const calltimeMiddleware = _options.middleware;
|
|
1476
|
-
switch (middlewareMergeStrategy) {
|
|
1477
|
-
case 'append':
|
|
1478
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1479
|
-
break;
|
|
1480
|
-
case 'prepend':
|
|
1481
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1482
|
-
break;
|
|
1483
|
-
case 'replace':
|
|
1484
|
-
allMiddleware = calltimeMiddleware;
|
|
1485
|
-
break;
|
|
1486
|
-
default:
|
|
1487
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
if (_options) {
|
|
1491
|
-
_config = {
|
|
1492
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1493
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1494
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1495
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1496
|
-
};
|
|
1497
|
-
}
|
|
1498
|
-
const requestContextPromise = this.requestFactory.deleteMeter(meterId, _config);
|
|
798
|
+
const requestContextPromise = this.requestFactory.deleteMeter(meterId, _options);
|
|
1499
799
|
// build promise chain
|
|
1500
800
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1501
|
-
for (const middleware of
|
|
801
|
+
for (const middleware of this.configuration.middleware) {
|
|
1502
802
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1503
803
|
}
|
|
1504
804
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1505
805
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1506
806
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1507
|
-
for (const middleware of
|
|
807
|
+
for (const middleware of this.configuration.middleware) {
|
|
1508
808
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1509
809
|
}
|
|
1510
810
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deleteMeterWithHttpInfo(rsp)));
|
|
@@ -1524,44 +824,16 @@ class ObservableMetersApi {
|
|
|
1524
824
|
* @param meterId
|
|
1525
825
|
*/
|
|
1526
826
|
getMeterWithHttpInfo(meterId, _options) {
|
|
1527
|
-
|
|
1528
|
-
let allMiddleware = [];
|
|
1529
|
-
if (_options && _options.middleware) {
|
|
1530
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1531
|
-
// call-time middleware provided
|
|
1532
|
-
const calltimeMiddleware = _options.middleware;
|
|
1533
|
-
switch (middlewareMergeStrategy) {
|
|
1534
|
-
case 'append':
|
|
1535
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1536
|
-
break;
|
|
1537
|
-
case 'prepend':
|
|
1538
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1539
|
-
break;
|
|
1540
|
-
case 'replace':
|
|
1541
|
-
allMiddleware = calltimeMiddleware;
|
|
1542
|
-
break;
|
|
1543
|
-
default:
|
|
1544
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
if (_options) {
|
|
1548
|
-
_config = {
|
|
1549
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1550
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1551
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1552
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1553
|
-
};
|
|
1554
|
-
}
|
|
1555
|
-
const requestContextPromise = this.requestFactory.getMeter(meterId, _config);
|
|
827
|
+
const requestContextPromise = this.requestFactory.getMeter(meterId, _options);
|
|
1556
828
|
// build promise chain
|
|
1557
829
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1558
|
-
for (const middleware of
|
|
830
|
+
for (const middleware of this.configuration.middleware) {
|
|
1559
831
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1560
832
|
}
|
|
1561
833
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1562
834
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1563
835
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1564
|
-
for (const middleware of
|
|
836
|
+
for (const middleware of this.configuration.middleware) {
|
|
1565
837
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1566
838
|
}
|
|
1567
839
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getMeterWithHttpInfo(rsp)));
|
|
@@ -1582,44 +854,16 @@ class ObservableMetersApi {
|
|
|
1582
854
|
* @param [cursor]
|
|
1583
855
|
*/
|
|
1584
856
|
listMetersWithHttpInfo(limit, cursor, _options) {
|
|
1585
|
-
|
|
1586
|
-
let allMiddleware = [];
|
|
1587
|
-
if (_options && _options.middleware) {
|
|
1588
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1589
|
-
// call-time middleware provided
|
|
1590
|
-
const calltimeMiddleware = _options.middleware;
|
|
1591
|
-
switch (middlewareMergeStrategy) {
|
|
1592
|
-
case 'append':
|
|
1593
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1594
|
-
break;
|
|
1595
|
-
case 'prepend':
|
|
1596
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1597
|
-
break;
|
|
1598
|
-
case 'replace':
|
|
1599
|
-
allMiddleware = calltimeMiddleware;
|
|
1600
|
-
break;
|
|
1601
|
-
default:
|
|
1602
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
if (_options) {
|
|
1606
|
-
_config = {
|
|
1607
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1608
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1609
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1610
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1611
|
-
};
|
|
1612
|
-
}
|
|
1613
|
-
const requestContextPromise = this.requestFactory.listMeters(limit, cursor, _config);
|
|
857
|
+
const requestContextPromise = this.requestFactory.listMeters(limit, cursor, _options);
|
|
1614
858
|
// build promise chain
|
|
1615
859
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1616
|
-
for (const middleware of
|
|
860
|
+
for (const middleware of this.configuration.middleware) {
|
|
1617
861
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1618
862
|
}
|
|
1619
863
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1620
864
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1621
865
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1622
|
-
for (const middleware of
|
|
866
|
+
for (const middleware of this.configuration.middleware) {
|
|
1623
867
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1624
868
|
}
|
|
1625
869
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listMetersWithHttpInfo(rsp)));
|
|
@@ -1641,44 +885,16 @@ class ObservableMetersApi {
|
|
|
1641
885
|
* @param meterId
|
|
1642
886
|
*/
|
|
1643
887
|
updateMeterWithHttpInfo(updateMeterRequest, meterId, _options) {
|
|
1644
|
-
|
|
1645
|
-
let allMiddleware = [];
|
|
1646
|
-
if (_options && _options.middleware) {
|
|
1647
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1648
|
-
// call-time middleware provided
|
|
1649
|
-
const calltimeMiddleware = _options.middleware;
|
|
1650
|
-
switch (middlewareMergeStrategy) {
|
|
1651
|
-
case 'append':
|
|
1652
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1653
|
-
break;
|
|
1654
|
-
case 'prepend':
|
|
1655
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1656
|
-
break;
|
|
1657
|
-
case 'replace':
|
|
1658
|
-
allMiddleware = calltimeMiddleware;
|
|
1659
|
-
break;
|
|
1660
|
-
default:
|
|
1661
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
if (_options) {
|
|
1665
|
-
_config = {
|
|
1666
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1667
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1668
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1669
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1670
|
-
};
|
|
1671
|
-
}
|
|
1672
|
-
const requestContextPromise = this.requestFactory.updateMeter(updateMeterRequest, meterId, _config);
|
|
888
|
+
const requestContextPromise = this.requestFactory.updateMeter(updateMeterRequest, meterId, _options);
|
|
1673
889
|
// build promise chain
|
|
1674
890
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1675
|
-
for (const middleware of
|
|
891
|
+
for (const middleware of this.configuration.middleware) {
|
|
1676
892
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1677
893
|
}
|
|
1678
894
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1679
895
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1680
896
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1681
|
-
for (const middleware of
|
|
897
|
+
for (const middleware of this.configuration.middleware) {
|
|
1682
898
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1683
899
|
}
|
|
1684
900
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.updateMeterWithHttpInfo(rsp)));
|
|
@@ -1708,44 +924,16 @@ class ObservablePlansApi {
|
|
|
1708
924
|
* @param planId
|
|
1709
925
|
*/
|
|
1710
926
|
deletePlanWithHttpInfo(planId, _options) {
|
|
1711
|
-
|
|
1712
|
-
let allMiddleware = [];
|
|
1713
|
-
if (_options && _options.middleware) {
|
|
1714
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1715
|
-
// call-time middleware provided
|
|
1716
|
-
const calltimeMiddleware = _options.middleware;
|
|
1717
|
-
switch (middlewareMergeStrategy) {
|
|
1718
|
-
case 'append':
|
|
1719
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1720
|
-
break;
|
|
1721
|
-
case 'prepend':
|
|
1722
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1723
|
-
break;
|
|
1724
|
-
case 'replace':
|
|
1725
|
-
allMiddleware = calltimeMiddleware;
|
|
1726
|
-
break;
|
|
1727
|
-
default:
|
|
1728
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
if (_options) {
|
|
1732
|
-
_config = {
|
|
1733
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1734
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1735
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1736
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1737
|
-
};
|
|
1738
|
-
}
|
|
1739
|
-
const requestContextPromise = this.requestFactory.deletePlan(planId, _config);
|
|
927
|
+
const requestContextPromise = this.requestFactory.deletePlan(planId, _options);
|
|
1740
928
|
// build promise chain
|
|
1741
929
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1742
|
-
for (const middleware of
|
|
930
|
+
for (const middleware of this.configuration.middleware) {
|
|
1743
931
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1744
932
|
}
|
|
1745
933
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1746
934
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1747
935
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1748
|
-
for (const middleware of
|
|
936
|
+
for (const middleware of this.configuration.middleware) {
|
|
1749
937
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1750
938
|
}
|
|
1751
939
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.deletePlanWithHttpInfo(rsp)));
|
|
@@ -1765,44 +953,16 @@ class ObservablePlansApi {
|
|
|
1765
953
|
* @param planId
|
|
1766
954
|
*/
|
|
1767
955
|
getPlanWithHttpInfo(planId, _options) {
|
|
1768
|
-
|
|
1769
|
-
let allMiddleware = [];
|
|
1770
|
-
if (_options && _options.middleware) {
|
|
1771
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1772
|
-
// call-time middleware provided
|
|
1773
|
-
const calltimeMiddleware = _options.middleware;
|
|
1774
|
-
switch (middlewareMergeStrategy) {
|
|
1775
|
-
case 'append':
|
|
1776
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1777
|
-
break;
|
|
1778
|
-
case 'prepend':
|
|
1779
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1780
|
-
break;
|
|
1781
|
-
case 'replace':
|
|
1782
|
-
allMiddleware = calltimeMiddleware;
|
|
1783
|
-
break;
|
|
1784
|
-
default:
|
|
1785
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
if (_options) {
|
|
1789
|
-
_config = {
|
|
1790
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1791
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1792
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1793
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1794
|
-
};
|
|
1795
|
-
}
|
|
1796
|
-
const requestContextPromise = this.requestFactory.getPlan(planId, _config);
|
|
956
|
+
const requestContextPromise = this.requestFactory.getPlan(planId, _options);
|
|
1797
957
|
// build promise chain
|
|
1798
958
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1799
|
-
for (const middleware of
|
|
959
|
+
for (const middleware of this.configuration.middleware) {
|
|
1800
960
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1801
961
|
}
|
|
1802
962
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1803
963
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1804
964
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1805
|
-
for (const middleware of
|
|
965
|
+
for (const middleware of this.configuration.middleware) {
|
|
1806
966
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1807
967
|
}
|
|
1808
968
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getPlanWithHttpInfo(rsp)));
|
|
@@ -1823,44 +983,16 @@ class ObservablePlansApi {
|
|
|
1823
983
|
* @param [cursor]
|
|
1824
984
|
*/
|
|
1825
985
|
listPlansWithHttpInfo(limit, cursor, _options) {
|
|
1826
|
-
|
|
1827
|
-
let allMiddleware = [];
|
|
1828
|
-
if (_options && _options.middleware) {
|
|
1829
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1830
|
-
// call-time middleware provided
|
|
1831
|
-
const calltimeMiddleware = _options.middleware;
|
|
1832
|
-
switch (middlewareMergeStrategy) {
|
|
1833
|
-
case 'append':
|
|
1834
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1835
|
-
break;
|
|
1836
|
-
case 'prepend':
|
|
1837
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1838
|
-
break;
|
|
1839
|
-
case 'replace':
|
|
1840
|
-
allMiddleware = calltimeMiddleware;
|
|
1841
|
-
break;
|
|
1842
|
-
default:
|
|
1843
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
if (_options) {
|
|
1847
|
-
_config = {
|
|
1848
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1849
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1850
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1851
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1852
|
-
};
|
|
1853
|
-
}
|
|
1854
|
-
const requestContextPromise = this.requestFactory.listPlans(limit, cursor, _config);
|
|
986
|
+
const requestContextPromise = this.requestFactory.listPlans(limit, cursor, _options);
|
|
1855
987
|
// build promise chain
|
|
1856
988
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1857
|
-
for (const middleware of
|
|
989
|
+
for (const middleware of this.configuration.middleware) {
|
|
1858
990
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1859
991
|
}
|
|
1860
992
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1861
993
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1862
994
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1863
|
-
for (const middleware of
|
|
995
|
+
for (const middleware of this.configuration.middleware) {
|
|
1864
996
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1865
997
|
}
|
|
1866
998
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.listPlansWithHttpInfo(rsp)));
|
|
@@ -1890,44 +1022,16 @@ class ObservableProductConsumptionsApi {
|
|
|
1890
1022
|
* @param productId
|
|
1891
1023
|
*/
|
|
1892
1024
|
getProductConsumptionWithHttpInfo(productId, _options) {
|
|
1893
|
-
|
|
1894
|
-
let allMiddleware = [];
|
|
1895
|
-
if (_options && _options.middleware) {
|
|
1896
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1897
|
-
// call-time middleware provided
|
|
1898
|
-
const calltimeMiddleware = _options.middleware;
|
|
1899
|
-
switch (middlewareMergeStrategy) {
|
|
1900
|
-
case 'append':
|
|
1901
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1902
|
-
break;
|
|
1903
|
-
case 'prepend':
|
|
1904
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1905
|
-
break;
|
|
1906
|
-
case 'replace':
|
|
1907
|
-
allMiddleware = calltimeMiddleware;
|
|
1908
|
-
break;
|
|
1909
|
-
default:
|
|
1910
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1911
|
-
}
|
|
1912
|
-
}
|
|
1913
|
-
if (_options) {
|
|
1914
|
-
_config = {
|
|
1915
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1916
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1917
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1918
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1919
|
-
};
|
|
1920
|
-
}
|
|
1921
|
-
const requestContextPromise = this.requestFactory.getProductConsumption(productId, _config);
|
|
1025
|
+
const requestContextPromise = this.requestFactory.getProductConsumption(productId, _options);
|
|
1922
1026
|
// build promise chain
|
|
1923
1027
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1924
|
-
for (const middleware of
|
|
1028
|
+
for (const middleware of this.configuration.middleware) {
|
|
1925
1029
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1926
1030
|
}
|
|
1927
1031
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1928
1032
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1929
1033
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1930
|
-
for (const middleware of
|
|
1034
|
+
for (const middleware of this.configuration.middleware) {
|
|
1931
1035
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1932
1036
|
}
|
|
1933
1037
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getProductConsumptionWithHttpInfo(rsp)));
|
|
@@ -1955,44 +1059,16 @@ class ObservableReportsApi {
|
|
|
1955
1059
|
* @param [reportId]
|
|
1956
1060
|
*/
|
|
1957
1061
|
getCommitmentReportResponseWithHttpInfo(reportId, _options) {
|
|
1958
|
-
|
|
1959
|
-
let allMiddleware = [];
|
|
1960
|
-
if (_options && _options.middleware) {
|
|
1961
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
1962
|
-
// call-time middleware provided
|
|
1963
|
-
const calltimeMiddleware = _options.middleware;
|
|
1964
|
-
switch (middlewareMergeStrategy) {
|
|
1965
|
-
case 'append':
|
|
1966
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
1967
|
-
break;
|
|
1968
|
-
case 'prepend':
|
|
1969
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
1970
|
-
break;
|
|
1971
|
-
case 'replace':
|
|
1972
|
-
allMiddleware = calltimeMiddleware;
|
|
1973
|
-
break;
|
|
1974
|
-
default:
|
|
1975
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
if (_options) {
|
|
1979
|
-
_config = {
|
|
1980
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
1981
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
1982
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
1983
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
1984
|
-
};
|
|
1985
|
-
}
|
|
1986
|
-
const requestContextPromise = this.requestFactory.getCommitmentReportResponse(reportId, _config);
|
|
1062
|
+
const requestContextPromise = this.requestFactory.getCommitmentReportResponse(reportId, _options);
|
|
1987
1063
|
// build promise chain
|
|
1988
1064
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
1989
|
-
for (const middleware of
|
|
1065
|
+
for (const middleware of this.configuration.middleware) {
|
|
1990
1066
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
1991
1067
|
}
|
|
1992
1068
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
1993
1069
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
1994
1070
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
1995
|
-
for (const middleware of
|
|
1071
|
+
for (const middleware of this.configuration.middleware) {
|
|
1996
1072
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
1997
1073
|
}
|
|
1998
1074
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getCommitmentReportResponseWithHttpInfo(rsp)));
|
|
@@ -2013,44 +1089,16 @@ class ObservableReportsApi {
|
|
|
2013
1089
|
* @param [cursor]
|
|
2014
1090
|
*/
|
|
2015
1091
|
getProductsUsageReportWithHttpInfo(reportId, limit, cursor, _options) {
|
|
2016
|
-
|
|
2017
|
-
let allMiddleware = [];
|
|
2018
|
-
if (_options && _options.middleware) {
|
|
2019
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
2020
|
-
// call-time middleware provided
|
|
2021
|
-
const calltimeMiddleware = _options.middleware;
|
|
2022
|
-
switch (middlewareMergeStrategy) {
|
|
2023
|
-
case 'append':
|
|
2024
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
2025
|
-
break;
|
|
2026
|
-
case 'prepend':
|
|
2027
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
2028
|
-
break;
|
|
2029
|
-
case 'replace':
|
|
2030
|
-
allMiddleware = calltimeMiddleware;
|
|
2031
|
-
break;
|
|
2032
|
-
default:
|
|
2033
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
if (_options) {
|
|
2037
|
-
_config = {
|
|
2038
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
2039
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
2040
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
2041
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
2042
|
-
};
|
|
2043
|
-
}
|
|
2044
|
-
const requestContextPromise = this.requestFactory.getProductsUsageReport(reportId, limit, cursor, _config);
|
|
1092
|
+
const requestContextPromise = this.requestFactory.getProductsUsageReport(reportId, limit, cursor, _options);
|
|
2045
1093
|
// build promise chain
|
|
2046
1094
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
2047
|
-
for (const middleware of
|
|
1095
|
+
for (const middleware of this.configuration.middleware) {
|
|
2048
1096
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
2049
1097
|
}
|
|
2050
1098
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
2051
1099
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
2052
1100
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
2053
|
-
for (const middleware of
|
|
1101
|
+
for (const middleware of this.configuration.middleware) {
|
|
2054
1102
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
2055
1103
|
}
|
|
2056
1104
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.getProductsUsageReportWithHttpInfo(rsp)));
|
|
@@ -2081,44 +1129,16 @@ class ObservableWebhooksApi {
|
|
|
2081
1129
|
* @param webhookSubscribeRequest Subscribe to webhooks and receive event notifications.
|
|
2082
1130
|
*/
|
|
2083
1131
|
webhookSubscribeWithHttpInfo(webhookSubscribeRequest, _options) {
|
|
2084
|
-
|
|
2085
|
-
let allMiddleware = [];
|
|
2086
|
-
if (_options && _options.middleware) {
|
|
2087
|
-
const middlewareMergeStrategy = _options.middlewareMergeStrategy || 'replace'; // default to replace behavior
|
|
2088
|
-
// call-time middleware provided
|
|
2089
|
-
const calltimeMiddleware = _options.middleware;
|
|
2090
|
-
switch (middlewareMergeStrategy) {
|
|
2091
|
-
case 'append':
|
|
2092
|
-
allMiddleware = this.configuration.middleware.concat(calltimeMiddleware);
|
|
2093
|
-
break;
|
|
2094
|
-
case 'prepend':
|
|
2095
|
-
allMiddleware = calltimeMiddleware.concat(this.configuration.middleware);
|
|
2096
|
-
break;
|
|
2097
|
-
case 'replace':
|
|
2098
|
-
allMiddleware = calltimeMiddleware;
|
|
2099
|
-
break;
|
|
2100
|
-
default:
|
|
2101
|
-
throw new Error(`unrecognized middleware merge strategy '${middlewareMergeStrategy}'`);
|
|
2102
|
-
}
|
|
2103
|
-
}
|
|
2104
|
-
if (_options) {
|
|
2105
|
-
_config = {
|
|
2106
|
-
baseServer: _options.baseServer || this.configuration.baseServer,
|
|
2107
|
-
httpApi: _options.httpApi || this.configuration.httpApi,
|
|
2108
|
-
authMethods: _options.authMethods || this.configuration.authMethods,
|
|
2109
|
-
middleware: allMiddleware || this.configuration.middleware
|
|
2110
|
-
};
|
|
2111
|
-
}
|
|
2112
|
-
const requestContextPromise = this.requestFactory.webhookSubscribe(webhookSubscribeRequest, _config);
|
|
1132
|
+
const requestContextPromise = this.requestFactory.webhookSubscribe(webhookSubscribeRequest, _options);
|
|
2113
1133
|
// build promise chain
|
|
2114
1134
|
let middlewarePreObservable = (0, rxjsStub_1.from)(requestContextPromise);
|
|
2115
|
-
for (const middleware of
|
|
1135
|
+
for (const middleware of this.configuration.middleware) {
|
|
2116
1136
|
middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => middleware.pre(ctx)));
|
|
2117
1137
|
}
|
|
2118
1138
|
return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)((ctx) => this.configuration.httpApi.send(ctx))).
|
|
2119
1139
|
pipe((0, rxjsStub_2.mergeMap)((response) => {
|
|
2120
1140
|
let middlewarePostObservable = (0, rxjsStub_1.of)(response);
|
|
2121
|
-
for (const middleware of
|
|
1141
|
+
for (const middleware of this.configuration.middleware) {
|
|
2122
1142
|
middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)((rsp) => middleware.post(rsp)));
|
|
2123
1143
|
}
|
|
2124
1144
|
return middlewarePostObservable.pipe((0, rxjsStub_2.map)((rsp) => this.responseProcessor.webhookSubscribeWithHttpInfo(rsp)));
|