@indigina/dcm-api 0.0.66 → 0.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +75 -126
  2. package/fesm2022/indigina-dcm-api.mjs +748 -2249
  3. package/fesm2022/indigina-dcm-api.mjs.map +1 -1
  4. package/index.d.ts +3846 -6
  5. package/package.json +2 -2
  6. package/api/api.d.ts +0 -31
  7. package/api/auditLogs.service.d.ts +0 -45
  8. package/api/bookings.service.d.ts +0 -37
  9. package/api/companies.service.d.ts +0 -42
  10. package/api/containers.service.d.ts +0 -314
  11. package/api/documents.service.d.ts +0 -45
  12. package/api/health.service.d.ts +0 -36
  13. package/api/notes.service.d.ts +0 -67
  14. package/api/permissions.service.d.ts +0 -37
  15. package/api/poItems.service.d.ts +0 -38
  16. package/api/purchaseOrders.service.d.ts +0 -164
  17. package/api/reports.service.d.ts +0 -58
  18. package/api/settings.service.d.ts +0 -147
  19. package/api/shipments.service.d.ts +0 -384
  20. package/api/sipmetItems.service.d.ts +0 -43
  21. package/api/user.service.d.ts +0 -122
  22. package/api.module.d.ts +0 -11
  23. package/configuration.d.ts +0 -104
  24. package/encoder.d.ts +0 -11
  25. package/model/approvalContainerInfo.d.ts +0 -13
  26. package/model/approvalContainerRules.d.ts +0 -13
  27. package/model/approvalItemRules.d.ts +0 -15
  28. package/model/approvalRules.d.ts +0 -16
  29. package/model/approvalShipmentTimelineItem.d.ts +0 -23
  30. package/model/approvalTypes.d.ts +0 -16
  31. package/model/auditLog.d.ts +0 -24
  32. package/model/auditLogs.d.ts +0 -14
  33. package/model/bookingsCount.d.ts +0 -12
  34. package/model/column.d.ts +0 -14
  35. package/model/commandStatusResult.d.ts +0 -12
  36. package/model/companies.d.ts +0 -14
  37. package/model/company.d.ts +0 -14
  38. package/model/consignee.d.ts +0 -13
  39. package/model/containerBookedState.d.ts +0 -18
  40. package/model/containerGridView.d.ts +0 -41
  41. package/model/containerItemView.d.ts +0 -25
  42. package/model/containerItems.d.ts +0 -14
  43. package/model/containerPoGridView.d.ts +0 -27
  44. package/model/containerPos.d.ts +0 -14
  45. package/model/containerShipmentView.d.ts +0 -38
  46. package/model/containerSize.d.ts +0 -40
  47. package/model/containerType.d.ts +0 -15
  48. package/model/containerView.d.ts +0 -37
  49. package/model/containers.d.ts +0 -14
  50. package/model/containersCount.d.ts +0 -12
  51. package/model/containersToDeliverCount.d.ts +0 -14
  52. package/model/country.d.ts +0 -13
  53. package/model/currentUser.d.ts +0 -22
  54. package/model/dashboardReportGroup.d.ts +0 -19
  55. package/model/dashboardReports.d.ts +0 -13
  56. package/model/dc.d.ts +0 -16
  57. package/model/deliveryShipmentTimelineItem.d.ts +0 -20
  58. package/model/departmentShipment.d.ts +0 -14
  59. package/model/document.d.ts +0 -20
  60. package/model/documentType.d.ts +0 -25
  61. package/model/documents.d.ts +0 -14
  62. package/model/embedReport.d.ts +0 -18
  63. package/model/embedReportInfoModel.d.ts +0 -28
  64. package/model/embedTokenDto.d.ts +0 -13
  65. package/model/entityList.d.ts +0 -13
  66. package/model/entityState.d.ts +0 -17
  67. package/model/failures.d.ts +0 -16
  68. package/model/journeySegmentType.d.ts +0 -14
  69. package/model/modelError.d.ts +0 -15
  70. package/model/models.d.ts +0 -111
  71. package/model/note.d.ts +0 -14
  72. package/model/noteSourceTypes.d.ts +0 -13
  73. package/model/noteView.d.ts +0 -16
  74. package/model/notes.d.ts +0 -14
  75. package/model/paymentTerm.d.ts +0 -13
  76. package/model/pendingMessagesCount.d.ts +0 -12
  77. package/model/poItemState.d.ts +0 -16
  78. package/model/poItemSummary.d.ts +0 -20
  79. package/model/poItemTotals.d.ts +0 -13
  80. package/model/port.d.ts +0 -16
  81. package/model/powerBiTenant.d.ts +0 -14
  82. package/model/purchaseOrderGridView.d.ts +0 -45
  83. package/model/purchaseOrderItem.d.ts +0 -45
  84. package/model/purchaseOrderItems.d.ts +0 -14
  85. package/model/purchaseOrderState.d.ts +0 -19
  86. package/model/purchaseOrderSummary.d.ts +0 -44
  87. package/model/purchaseOrderView.d.ts +0 -39
  88. package/model/purchaseOrders.d.ts +0 -14
  89. package/model/recordTypes.d.ts +0 -14
  90. package/model/routingLegType.d.ts +0 -20
  91. package/model/setNewFeaturesVisibilityCommand.d.ts +0 -12
  92. package/model/settingValue.d.ts +0 -13
  93. package/model/settingView.d.ts +0 -14
  94. package/model/shipment.d.ts +0 -64
  95. package/model/shipmentAirRouting.d.ts +0 -34
  96. package/model/shipmentApproval.d.ts +0 -63
  97. package/model/shipmentApprovalType.d.ts +0 -14
  98. package/model/shipmentApprovals.d.ts +0 -14
  99. package/model/shipmentContainer.d.ts +0 -30
  100. package/model/shipmentContainers.d.ts +0 -14
  101. package/model/shipmentItem.d.ts +0 -22
  102. package/model/shipmentItemSummaries.d.ts +0 -14
  103. package/model/shipmentItemSummary.d.ts +0 -24
  104. package/model/shipmentItems.d.ts +0 -14
  105. package/model/shipmentProduct.d.ts +0 -39
  106. package/model/shipmentProductTotals.d.ts +0 -16
  107. package/model/shipmentProducts.d.ts +0 -14
  108. package/model/shipmentRoadRouting.d.ts +0 -33
  109. package/model/shipmentRouting.d.ts +0 -32
  110. package/model/shipmentRoutingsInner.d.ts +0 -9
  111. package/model/shipmentSeaRouting.d.ts +0 -33
  112. package/model/shipmentState.d.ts +0 -21
  113. package/model/shipmentSummary.d.ts +0 -42
  114. package/model/shipmentTerm.d.ts +0 -26
  115. package/model/shipmentTimelineInner.d.ts +0 -9
  116. package/model/shipmentTimelineItem.d.ts +0 -18
  117. package/model/shipments.d.ts +0 -14
  118. package/model/shipmentsApprovalCount.d.ts +0 -13
  119. package/model/shipmentsCount.d.ts +0 -12
  120. package/model/shipmentsInTransitCount.d.ts +0 -12
  121. package/model/summaryDashboardReports.d.ts +0 -15
  122. package/model/supplier.d.ts +0 -13
  123. package/model/timelineEventStates.d.ts +0 -16
  124. package/model/timelineEventTypes.d.ts +0 -21
  125. package/model/transportCarrier.d.ts +0 -13
  126. package/model/transportLocation.d.ts +0 -13
  127. package/model/transportMode.d.ts +0 -16
  128. package/model/transportationShipmentTimelineItem.d.ts +0 -27
  129. package/model/unbookedPoLineItem.d.ts +0 -55
  130. package/model/unbookedPoLineItems.d.ts +0 -14
  131. package/model/user.d.ts +0 -13
  132. package/model/userApplication.d.ts +0 -13
  133. package/model/userApplications.d.ts +0 -13
  134. package/model/userCompanyType.d.ts +0 -22
  135. package/model/userPermissions.d.ts +0 -12
  136. package/model/workflowArtifacts.d.ts +0 -18
  137. package/param.d.ts +0 -37
  138. package/variables.d.ts +0 -8
@@ -1,8 +1,16 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Optional, Inject, NgModule, SkipSelf } from '@angular/core';
2
+ import { InjectionToken, Optional, Inject, Injectable, SkipSelf, NgModule, makeEnvironmentProviders } from '@angular/core';
3
3
  import * as i1 from '@angular/common/http';
4
4
  import { HttpHeaders, HttpParams, HttpContext } from '@angular/common/http';
5
5
 
6
+ const BASE_PATH = new InjectionToken('basePath');
7
+ const COLLECTION_FORMATS = {
8
+ 'csv': ',',
9
+ 'tsv': ' ',
10
+ 'ssv': ' ',
11
+ 'pipes': '|'
12
+ };
13
+
6
14
  /**
7
15
  * Custom HttpParameterCodec
8
16
  * Workaround for https://github.com/angular/angular/issues/18261
@@ -22,14 +30,6 @@ class CustomHttpParameterCodec {
22
30
  }
23
31
  }
24
32
 
25
- const BASE_PATH = new InjectionToken('basePath');
26
- const COLLECTION_FORMATS = {
27
- 'csv': ',',
28
- 'tsv': ' ',
29
- 'ssv': ' ',
30
- 'pipes': '|'
31
- };
32
-
33
33
  class Configuration {
34
34
  /**
35
35
  * @deprecated Since 5.0. Use credentials instead
@@ -61,26 +61,30 @@ class Configuration {
61
61
  * minus any standard prefixes such as 'Basic' or 'Bearer'.
62
62
  */
63
63
  credentials;
64
- constructor(configurationParameters = {}) {
65
- this.apiKeys = configurationParameters.apiKeys;
66
- this.username = configurationParameters.username;
67
- this.password = configurationParameters.password;
68
- this.accessToken = configurationParameters.accessToken;
69
- this.basePath = configurationParameters.basePath;
70
- this.withCredentials = configurationParameters.withCredentials;
71
- this.encoder = configurationParameters.encoder;
72
- if (configurationParameters.encodeParam) {
73
- this.encodeParam = configurationParameters.encodeParam;
74
- }
75
- else {
76
- this.encodeParam = param => this.defaultEncodeParam(param);
77
- }
78
- if (configurationParameters.credentials) {
79
- this.credentials = configurationParameters.credentials;
80
- }
81
- else {
82
- this.credentials = {};
64
+ constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials } = {}) {
65
+ if (apiKeys) {
66
+ this.apiKeys = apiKeys;
83
67
  }
68
+ if (username !== undefined) {
69
+ this.username = username;
70
+ }
71
+ if (password !== undefined) {
72
+ this.password = password;
73
+ }
74
+ if (accessToken !== undefined) {
75
+ this.accessToken = accessToken;
76
+ }
77
+ if (basePath !== undefined) {
78
+ this.basePath = basePath;
79
+ }
80
+ if (withCredentials !== undefined) {
81
+ this.withCredentials = withCredentials;
82
+ }
83
+ if (encoder) {
84
+ this.encoder = encoder;
85
+ }
86
+ this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
87
+ this.credentials = credentials ?? {};
84
88
  }
85
89
  /**
86
90
  * Select the correct content-type to use for a request.
@@ -136,6 +140,18 @@ class Configuration {
136
140
  ? value()
137
141
  : value;
138
142
  }
143
+ addCredentialToHeaders(credentialKey, headerName, headers, prefix) {
144
+ const value = this.lookupCredential(credentialKey);
145
+ return value
146
+ ? headers.set(headerName, (prefix ?? '') + value)
147
+ : headers;
148
+ }
149
+ addCredentialToQuery(credentialKey, paramName, query) {
150
+ const value = this.lookupCredential(credentialKey);
151
+ return value
152
+ ? query.set(paramName, value)
153
+ : query;
154
+ }
139
155
  defaultEncodeParam(param) {
140
156
  // This implementation exists as fallback for missing configuration
141
157
  // and for backwards compatibility to older typescript-angular generator versions.
@@ -160,18 +176,13 @@ class Configuration {
160
176
  * https://openapi-generator.tech
161
177
  * Do not edit the class manually.
162
178
  */
163
- /* tslint:disable:no-unused-variable member-ordering */
164
- class AuditLogsService {
165
- httpClient;
179
+ class BaseService {
166
180
  basePath = 'http://localhost';
167
181
  defaultHeaders = new HttpHeaders();
168
- configuration = new Configuration();
182
+ configuration;
169
183
  encoder;
170
- constructor(httpClient, basePath, configuration) {
171
- this.httpClient = httpClient;
172
- if (configuration) {
173
- this.configuration = configuration;
174
- }
184
+ constructor(basePath, configuration) {
185
+ this.configuration = configuration || new Configuration();
175
186
  if (typeof this.configuration.basePath !== 'string') {
176
187
  const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
177
188
  if (firstBasePath != undefined) {
@@ -184,43 +195,69 @@ class AuditLogsService {
184
195
  }
185
196
  this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
186
197
  }
187
- // @ts-ignore
188
- addToHttpParams(httpParams, value, key) {
189
- if (typeof value === "object" && value instanceof Date === false) {
190
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
191
- }
192
- else {
193
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
198
+ canConsumeForm(consumes) {
199
+ return consumes.indexOf('multipart/form-data') !== -1;
200
+ }
201
+ addToHttpParams(httpParams, value, key, isDeep = false) {
202
+ // If the value is an object (but not a Date), recursively add its keys.
203
+ if (typeof value === 'object' && !(value instanceof Date)) {
204
+ return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
194
205
  }
195
- return httpParams;
206
+ return this.addToHttpParamsRecursive(httpParams, value, key);
196
207
  }
197
- addToHttpParamsRecursive(httpParams, value, key) {
198
- if (value == null) {
208
+ addToHttpParamsRecursive(httpParams, value, key, isDeep = false) {
209
+ if (value === null || value === undefined) {
199
210
  return httpParams;
200
211
  }
201
- if (typeof value === "object") {
212
+ if (typeof value === 'object') {
213
+ // If JSON format is preferred, key must be provided.
214
+ if (key != null) {
215
+ return isDeep
216
+ ? Object.keys(value).reduce((hp, k) => hp.append(`${key}[${k}]`, value[k]), httpParams)
217
+ : httpParams.append(key, JSON.stringify(value));
218
+ }
219
+ // Otherwise, if it's an array, add each element.
202
220
  if (Array.isArray(value)) {
203
221
  value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
204
222
  }
205
223
  else if (value instanceof Date) {
206
224
  if (key != null) {
207
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
225
+ httpParams = httpParams.append(key, value.toISOString());
208
226
  }
209
227
  else {
210
228
  throw Error("key may not be null if value is Date");
211
229
  }
212
230
  }
213
231
  else {
214
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
232
+ Object.keys(value).forEach(k => {
233
+ const paramKey = key ? `${key}.${k}` : k;
234
+ httpParams = this.addToHttpParamsRecursive(httpParams, value[k], paramKey);
235
+ });
215
236
  }
237
+ return httpParams;
216
238
  }
217
239
  else if (key != null) {
218
- httpParams = httpParams.append(key, value);
219
- }
220
- else {
221
- throw Error("key may not be null if value is not object or array");
240
+ return httpParams.append(key, value);
222
241
  }
223
- return httpParams;
242
+ throw Error("key may not be null if value is not object or array");
243
+ }
244
+ }
245
+
246
+ /**
247
+ * Dcm.API.Client
248
+ *
249
+ *
250
+ *
251
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
252
+ * https://openapi-generator.tech
253
+ * Do not edit the class manually.
254
+ */
255
+ /* tslint:disable:no-unused-variable member-ordering */
256
+ class AuditLogsService extends BaseService {
257
+ httpClient;
258
+ constructor(httpClient, basePath, configuration) {
259
+ super(basePath, configuration);
260
+ this.httpClient = httpClient;
224
261
  }
225
262
  getShipmentLogs(recordId, recordType, $skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
226
263
  if (recordId === null || recordId === undefined) {
@@ -230,41 +267,20 @@ class AuditLogsService {
230
267
  throw new Error('Required parameter recordType was null or undefined when calling getShipmentLogs.');
231
268
  }
232
269
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
233
- if ($skip !== undefined && $skip !== null) {
234
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
235
- }
236
- if ($top !== undefined && $top !== null) {
237
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
238
- }
239
- if ($orderby !== undefined && $orderby !== null) {
240
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
241
- }
242
- if ($filter !== undefined && $filter !== null) {
243
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
244
- }
245
- if ($search !== undefined && $search !== null) {
246
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
247
- }
270
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
271
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
272
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
273
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
274
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
248
275
  let localVarHeaders = this.defaultHeaders;
249
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
250
- if (localVarHttpHeaderAcceptSelected === undefined) {
251
- // to determine the Accept header
252
- const httpHeaderAccepts = [
253
- 'application/json'
254
- ];
255
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
256
- }
276
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
277
+ 'application/json'
278
+ ]);
257
279
  if (localVarHttpHeaderAcceptSelected !== undefined) {
258
280
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
259
281
  }
260
- let localVarHttpContext = options && options.context;
261
- if (localVarHttpContext === undefined) {
262
- localVarHttpContext = new HttpContext();
263
- }
264
- let localVarTransferCache = options && options.transferCache;
265
- if (localVarTransferCache === undefined) {
266
- localVarTransferCache = true;
267
- }
282
+ const localVarHttpContext = options?.context ?? new HttpContext();
283
+ const localVarTransferCache = options?.transferCache ?? true;
268
284
  let responseType_ = 'json';
269
285
  if (localVarHttpHeaderAcceptSelected) {
270
286
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -278,21 +294,22 @@ class AuditLogsService {
278
294
  }
279
295
  }
280
296
  let localVarPath = `/auditLogs/${this.configuration.encodeParam({ name: "recordId", value: recordId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/${this.configuration.encodeParam({ name: "recordType", value: recordType, in: "path", style: "simple", explode: false, dataType: "RecordTypes", dataFormat: undefined })}`;
281
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
297
+ const { basePath, withCredentials } = this.configuration;
298
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
282
299
  context: localVarHttpContext,
283
300
  params: localVarQueryParameters,
284
301
  responseType: responseType_,
285
- withCredentials: this.configuration.withCredentials,
302
+ ...(withCredentials ? { withCredentials } : {}),
286
303
  headers: localVarHeaders,
287
304
  observe: observe,
288
305
  transferCache: localVarTransferCache,
289
306
  reportProgress: reportProgress
290
307
  });
291
308
  }
292
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AuditLogsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
293
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AuditLogsService, providedIn: 'root' });
309
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AuditLogsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
310
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AuditLogsService, providedIn: 'root' });
294
311
  }
295
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: AuditLogsService, decorators: [{
312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: AuditLogsService, decorators: [{
296
313
  type: Injectable,
297
314
  args: [{
298
315
  providedIn: 'root'
@@ -316,88 +333,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
316
333
  * Do not edit the class manually.
317
334
  */
318
335
  /* tslint:disable:no-unused-variable member-ordering */
319
- class BookingsService {
336
+ class BookingsService extends BaseService {
320
337
  httpClient;
321
- basePath = 'http://localhost';
322
- defaultHeaders = new HttpHeaders();
323
- configuration = new Configuration();
324
- encoder;
325
338
  constructor(httpClient, basePath, configuration) {
339
+ super(basePath, configuration);
326
340
  this.httpClient = httpClient;
327
- if (configuration) {
328
- this.configuration = configuration;
329
- }
330
- if (typeof this.configuration.basePath !== 'string') {
331
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
332
- if (firstBasePath != undefined) {
333
- basePath = firstBasePath;
334
- }
335
- if (typeof basePath !== 'string') {
336
- basePath = this.basePath;
337
- }
338
- this.configuration.basePath = basePath;
339
- }
340
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
341
- }
342
- // @ts-ignore
343
- addToHttpParams(httpParams, value, key) {
344
- if (typeof value === "object" && value instanceof Date === false) {
345
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
346
- }
347
- else {
348
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
349
- }
350
- return httpParams;
351
- }
352
- addToHttpParamsRecursive(httpParams, value, key) {
353
- if (value == null) {
354
- return httpParams;
355
- }
356
- if (typeof value === "object") {
357
- if (Array.isArray(value)) {
358
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
359
- }
360
- else if (value instanceof Date) {
361
- if (key != null) {
362
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
363
- }
364
- else {
365
- throw Error("key may not be null if value is Date");
366
- }
367
- }
368
- else {
369
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
370
- }
371
- }
372
- else if (key != null) {
373
- httpParams = httpParams.append(key, value);
374
- }
375
- else {
376
- throw Error("key may not be null if value is not object or array");
377
- }
378
- return httpParams;
379
341
  }
380
342
  getVendorDraftBookingsCount(observe = 'body', reportProgress = false, options) {
381
343
  let localVarHeaders = this.defaultHeaders;
382
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
383
- if (localVarHttpHeaderAcceptSelected === undefined) {
384
- // to determine the Accept header
385
- const httpHeaderAccepts = [
386
- 'application/json'
387
- ];
388
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
389
- }
344
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
345
+ 'application/json'
346
+ ]);
390
347
  if (localVarHttpHeaderAcceptSelected !== undefined) {
391
348
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
392
349
  }
393
- let localVarHttpContext = options && options.context;
394
- if (localVarHttpContext === undefined) {
395
- localVarHttpContext = new HttpContext();
396
- }
397
- let localVarTransferCache = options && options.transferCache;
398
- if (localVarTransferCache === undefined) {
399
- localVarTransferCache = true;
400
- }
350
+ const localVarHttpContext = options?.context ?? new HttpContext();
351
+ const localVarTransferCache = options?.transferCache ?? true;
401
352
  let responseType_ = 'json';
402
353
  if (localVarHttpHeaderAcceptSelected) {
403
354
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -411,20 +362,21 @@ class BookingsService {
411
362
  }
412
363
  }
413
364
  let localVarPath = `/bookings/vendorDrafts/count`;
414
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
365
+ const { basePath, withCredentials } = this.configuration;
366
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
415
367
  context: localVarHttpContext,
416
368
  responseType: responseType_,
417
- withCredentials: this.configuration.withCredentials,
369
+ ...(withCredentials ? { withCredentials } : {}),
418
370
  headers: localVarHeaders,
419
371
  observe: observe,
420
372
  transferCache: localVarTransferCache,
421
373
  reportProgress: reportProgress
422
374
  });
423
375
  }
424
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: BookingsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
425
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: BookingsService, providedIn: 'root' });
376
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BookingsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
377
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BookingsService, providedIn: 'root' });
426
378
  }
427
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: BookingsService, decorators: [{
379
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BookingsService, decorators: [{
428
380
  type: Injectable,
429
381
  args: [{
430
382
  providedIn: 'root'
@@ -448,104 +400,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
448
400
  * Do not edit the class manually.
449
401
  */
450
402
  /* tslint:disable:no-unused-variable member-ordering */
451
- class CompaniesService {
403
+ class CompaniesService extends BaseService {
452
404
  httpClient;
453
- basePath = 'http://localhost';
454
- defaultHeaders = new HttpHeaders();
455
- configuration = new Configuration();
456
- encoder;
457
405
  constructor(httpClient, basePath, configuration) {
406
+ super(basePath, configuration);
458
407
  this.httpClient = httpClient;
459
- if (configuration) {
460
- this.configuration = configuration;
461
- }
462
- if (typeof this.configuration.basePath !== 'string') {
463
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
464
- if (firstBasePath != undefined) {
465
- basePath = firstBasePath;
466
- }
467
- if (typeof basePath !== 'string') {
468
- basePath = this.basePath;
469
- }
470
- this.configuration.basePath = basePath;
471
- }
472
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
473
- }
474
- // @ts-ignore
475
- addToHttpParams(httpParams, value, key) {
476
- if (typeof value === "object" && value instanceof Date === false) {
477
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
478
- }
479
- else {
480
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
481
- }
482
- return httpParams;
483
- }
484
- addToHttpParamsRecursive(httpParams, value, key) {
485
- if (value == null) {
486
- return httpParams;
487
- }
488
- if (typeof value === "object") {
489
- if (Array.isArray(value)) {
490
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
491
- }
492
- else if (value instanceof Date) {
493
- if (key != null) {
494
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
495
- }
496
- else {
497
- throw Error("key may not be null if value is Date");
498
- }
499
- }
500
- else {
501
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
502
- }
503
- }
504
- else if (key != null) {
505
- httpParams = httpParams.append(key, value);
506
- }
507
- else {
508
- throw Error("key may not be null if value is not object or array");
509
- }
510
- return httpParams;
511
408
  }
512
409
  getUserCompanies($skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
513
410
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
514
- if ($skip !== undefined && $skip !== null) {
515
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
516
- }
517
- if ($top !== undefined && $top !== null) {
518
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
519
- }
520
- if ($orderby !== undefined && $orderby !== null) {
521
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
522
- }
523
- if ($filter !== undefined && $filter !== null) {
524
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
525
- }
526
- if ($search !== undefined && $search !== null) {
527
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
528
- }
411
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
412
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
413
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
414
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
415
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
529
416
  let localVarHeaders = this.defaultHeaders;
530
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
531
- if (localVarHttpHeaderAcceptSelected === undefined) {
532
- // to determine the Accept header
533
- const httpHeaderAccepts = [
534
- 'application/json'
535
- ];
536
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
537
- }
417
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
418
+ 'application/json'
419
+ ]);
538
420
  if (localVarHttpHeaderAcceptSelected !== undefined) {
539
421
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
540
422
  }
541
- let localVarHttpContext = options && options.context;
542
- if (localVarHttpContext === undefined) {
543
- localVarHttpContext = new HttpContext();
544
- }
545
- let localVarTransferCache = options && options.transferCache;
546
- if (localVarTransferCache === undefined) {
547
- localVarTransferCache = true;
548
- }
423
+ const localVarHttpContext = options?.context ?? new HttpContext();
424
+ const localVarTransferCache = options?.transferCache ?? true;
549
425
  let responseType_ = 'json';
550
426
  if (localVarHttpHeaderAcceptSelected) {
551
427
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -559,21 +435,22 @@ class CompaniesService {
559
435
  }
560
436
  }
561
437
  let localVarPath = `/companies/userCompanies`;
562
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
438
+ const { basePath, withCredentials } = this.configuration;
439
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
563
440
  context: localVarHttpContext,
564
441
  params: localVarQueryParameters,
565
442
  responseType: responseType_,
566
- withCredentials: this.configuration.withCredentials,
443
+ ...(withCredentials ? { withCredentials } : {}),
567
444
  headers: localVarHeaders,
568
445
  observe: observe,
569
446
  transferCache: localVarTransferCache,
570
447
  reportProgress: reportProgress
571
448
  });
572
449
  }
573
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: CompaniesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
574
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: CompaniesService, providedIn: 'root' });
450
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: CompaniesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
451
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: CompaniesService, providedIn: 'root' });
575
452
  }
576
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: CompaniesService, decorators: [{
453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: CompaniesService, decorators: [{
577
454
  type: Injectable,
578
455
  args: [{
579
456
  providedIn: 'root'
@@ -597,107 +474,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
597
474
  * Do not edit the class manually.
598
475
  */
599
476
  /* tslint:disable:no-unused-variable member-ordering */
600
- class ContainersService {
477
+ class ContainersService extends BaseService {
601
478
  httpClient;
602
- basePath = 'http://localhost';
603
- defaultHeaders = new HttpHeaders();
604
- configuration = new Configuration();
605
- encoder;
606
479
  constructor(httpClient, basePath, configuration) {
480
+ super(basePath, configuration);
607
481
  this.httpClient = httpClient;
608
- if (configuration) {
609
- this.configuration = configuration;
610
- }
611
- if (typeof this.configuration.basePath !== 'string') {
612
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
613
- if (firstBasePath != undefined) {
614
- basePath = firstBasePath;
615
- }
616
- if (typeof basePath !== 'string') {
617
- basePath = this.basePath;
618
- }
619
- this.configuration.basePath = basePath;
620
- }
621
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
622
- }
623
- // @ts-ignore
624
- addToHttpParams(httpParams, value, key) {
625
- if (typeof value === "object" && value instanceof Date === false) {
626
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
627
- }
628
- else {
629
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
630
- }
631
- return httpParams;
632
- }
633
- addToHttpParamsRecursive(httpParams, value, key) {
634
- if (value == null) {
635
- return httpParams;
636
- }
637
- if (typeof value === "object") {
638
- if (Array.isArray(value)) {
639
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
640
- }
641
- else if (value instanceof Date) {
642
- if (key != null) {
643
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
644
- }
645
- else {
646
- throw Error("key may not be null if value is Date");
647
- }
648
- }
649
- else {
650
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
651
- }
652
- }
653
- else if (key != null) {
654
- httpParams = httpParams.append(key, value);
655
- }
656
- else {
657
- throw Error("key may not be null if value is not object or array");
658
- }
659
- return httpParams;
660
482
  }
661
483
  getContainerItems(id, $skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
662
484
  if (id === null || id === undefined) {
663
485
  throw new Error('Required parameter id was null or undefined when calling getContainerItems.');
664
486
  }
665
487
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
666
- if ($skip !== undefined && $skip !== null) {
667
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
668
- }
669
- if ($top !== undefined && $top !== null) {
670
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
671
- }
672
- if ($orderby !== undefined && $orderby !== null) {
673
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
674
- }
675
- if ($filter !== undefined && $filter !== null) {
676
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
677
- }
678
- if ($search !== undefined && $search !== null) {
679
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
680
- }
488
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
489
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
490
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
491
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
492
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
681
493
  let localVarHeaders = this.defaultHeaders;
682
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
683
- if (localVarHttpHeaderAcceptSelected === undefined) {
684
- // to determine the Accept header
685
- const httpHeaderAccepts = [
686
- 'application/json'
687
- ];
688
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
689
- }
494
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
495
+ 'application/json'
496
+ ]);
690
497
  if (localVarHttpHeaderAcceptSelected !== undefined) {
691
498
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
692
499
  }
693
- let localVarHttpContext = options && options.context;
694
- if (localVarHttpContext === undefined) {
695
- localVarHttpContext = new HttpContext();
696
- }
697
- let localVarTransferCache = options && options.transferCache;
698
- if (localVarTransferCache === undefined) {
699
- localVarTransferCache = true;
700
- }
500
+ const localVarHttpContext = options?.context ?? new HttpContext();
501
+ const localVarTransferCache = options?.transferCache ?? true;
701
502
  let responseType_ = 'json';
702
503
  if (localVarHttpHeaderAcceptSelected) {
703
504
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -711,11 +512,12 @@ class ContainersService {
711
512
  }
712
513
  }
713
514
  let localVarPath = `/containers/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/items`;
714
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
515
+ const { basePath, withCredentials } = this.configuration;
516
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
715
517
  context: localVarHttpContext,
716
518
  params: localVarQueryParameters,
717
519
  responseType: responseType_,
718
- withCredentials: this.configuration.withCredentials,
520
+ ...(withCredentials ? { withCredentials } : {}),
719
521
  headers: localVarHeaders,
720
522
  observe: observe,
721
523
  transferCache: localVarTransferCache,
@@ -724,41 +526,20 @@ class ContainersService {
724
526
  }
725
527
  getContainerPurchaseOrders($skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
726
528
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
727
- if ($skip !== undefined && $skip !== null) {
728
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
729
- }
730
- if ($top !== undefined && $top !== null) {
731
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
732
- }
733
- if ($orderby !== undefined && $orderby !== null) {
734
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
735
- }
736
- if ($filter !== undefined && $filter !== null) {
737
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
738
- }
739
- if ($search !== undefined && $search !== null) {
740
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
741
- }
529
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
530
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
531
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
532
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
533
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
742
534
  let localVarHeaders = this.defaultHeaders;
743
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
744
- if (localVarHttpHeaderAcceptSelected === undefined) {
745
- // to determine the Accept header
746
- const httpHeaderAccepts = [
747
- 'application/json'
748
- ];
749
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
750
- }
535
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
536
+ 'application/json'
537
+ ]);
751
538
  if (localVarHttpHeaderAcceptSelected !== undefined) {
752
539
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
753
540
  }
754
- let localVarHttpContext = options && options.context;
755
- if (localVarHttpContext === undefined) {
756
- localVarHttpContext = new HttpContext();
757
- }
758
- let localVarTransferCache = options && options.transferCache;
759
- if (localVarTransferCache === undefined) {
760
- localVarTransferCache = true;
761
- }
541
+ const localVarHttpContext = options?.context ?? new HttpContext();
542
+ const localVarTransferCache = options?.transferCache ?? true;
762
543
  let responseType_ = 'json';
763
544
  if (localVarHttpHeaderAcceptSelected) {
764
545
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -772,11 +553,12 @@ class ContainersService {
772
553
  }
773
554
  }
774
555
  let localVarPath = `/containers/pos`;
775
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
556
+ const { basePath, withCredentials } = this.configuration;
557
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
776
558
  context: localVarHttpContext,
777
559
  params: localVarQueryParameters,
778
560
  responseType: responseType_,
779
- withCredentials: this.configuration.withCredentials,
561
+ ...(withCredentials ? { withCredentials } : {}),
780
562
  headers: localVarHeaders,
781
563
  observe: observe,
782
564
  transferCache: localVarTransferCache,
@@ -785,41 +567,20 @@ class ContainersService {
785
567
  }
786
568
  getContainerPurchaseOrdersFromIndex($skip, $top, $orderby, $filter, searchTerm, observe = 'body', reportProgress = false, options) {
787
569
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
788
- if ($skip !== undefined && $skip !== null) {
789
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
790
- }
791
- if ($top !== undefined && $top !== null) {
792
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
793
- }
794
- if ($orderby !== undefined && $orderby !== null) {
795
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
796
- }
797
- if ($filter !== undefined && $filter !== null) {
798
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
799
- }
800
- if (searchTerm !== undefined && searchTerm !== null) {
801
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchTerm, 'searchTerm');
802
- }
570
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
571
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
572
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
573
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
574
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchTerm, 'searchTerm');
803
575
  let localVarHeaders = this.defaultHeaders;
804
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
805
- if (localVarHttpHeaderAcceptSelected === undefined) {
806
- // to determine the Accept header
807
- const httpHeaderAccepts = [
808
- 'application/json'
809
- ];
810
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
811
- }
576
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
577
+ 'application/json'
578
+ ]);
812
579
  if (localVarHttpHeaderAcceptSelected !== undefined) {
813
580
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
814
581
  }
815
- let localVarHttpContext = options && options.context;
816
- if (localVarHttpContext === undefined) {
817
- localVarHttpContext = new HttpContext();
818
- }
819
- let localVarTransferCache = options && options.transferCache;
820
- if (localVarTransferCache === undefined) {
821
- localVarTransferCache = true;
822
- }
582
+ const localVarHttpContext = options?.context ?? new HttpContext();
583
+ const localVarTransferCache = options?.transferCache ?? true;
823
584
  let responseType_ = 'json';
824
585
  if (localVarHttpHeaderAcceptSelected) {
825
586
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -833,11 +594,12 @@ class ContainersService {
833
594
  }
834
595
  }
835
596
  let localVarPath = `/containers/pos/search`;
836
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
597
+ const { basePath, withCredentials } = this.configuration;
598
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
837
599
  context: localVarHttpContext,
838
600
  params: localVarQueryParameters,
839
601
  responseType: responseType_,
840
- withCredentials: this.configuration.withCredentials,
602
+ ...(withCredentials ? { withCredentials } : {}),
841
603
  headers: localVarHeaders,
842
604
  observe: observe,
843
605
  transferCache: localVarTransferCache,
@@ -846,41 +608,20 @@ class ContainersService {
846
608
  }
847
609
  getContainers($skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
848
610
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
849
- if ($skip !== undefined && $skip !== null) {
850
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
851
- }
852
- if ($top !== undefined && $top !== null) {
853
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
854
- }
855
- if ($orderby !== undefined && $orderby !== null) {
856
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
857
- }
858
- if ($filter !== undefined && $filter !== null) {
859
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
860
- }
861
- if ($search !== undefined && $search !== null) {
862
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
863
- }
611
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
612
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
613
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
614
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
615
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
864
616
  let localVarHeaders = this.defaultHeaders;
865
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
866
- if (localVarHttpHeaderAcceptSelected === undefined) {
867
- // to determine the Accept header
868
- const httpHeaderAccepts = [
869
- 'application/json'
870
- ];
871
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
872
- }
617
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
618
+ 'application/json'
619
+ ]);
873
620
  if (localVarHttpHeaderAcceptSelected !== undefined) {
874
621
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
875
622
  }
876
- let localVarHttpContext = options && options.context;
877
- if (localVarHttpContext === undefined) {
878
- localVarHttpContext = new HttpContext();
879
- }
880
- let localVarTransferCache = options && options.transferCache;
881
- if (localVarTransferCache === undefined) {
882
- localVarTransferCache = true;
883
- }
623
+ const localVarHttpContext = options?.context ?? new HttpContext();
624
+ const localVarTransferCache = options?.transferCache ?? true;
884
625
  let responseType_ = 'json';
885
626
  if (localVarHttpHeaderAcceptSelected) {
886
627
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -894,11 +635,12 @@ class ContainersService {
894
635
  }
895
636
  }
896
637
  let localVarPath = `/containers`;
897
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
638
+ const { basePath, withCredentials } = this.configuration;
639
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
898
640
  context: localVarHttpContext,
899
641
  params: localVarQueryParameters,
900
642
  responseType: responseType_,
901
- withCredentials: this.configuration.withCredentials,
643
+ ...(withCredentials ? { withCredentials } : {}),
902
644
  headers: localVarHeaders,
903
645
  observe: observe,
904
646
  transferCache: localVarTransferCache,
@@ -907,41 +649,20 @@ class ContainersService {
907
649
  }
908
650
  getContainersFromIndex($skip, $top, $orderby, $filter, searchTerm, observe = 'body', reportProgress = false, options) {
909
651
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
910
- if ($skip !== undefined && $skip !== null) {
911
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
912
- }
913
- if ($top !== undefined && $top !== null) {
914
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
915
- }
916
- if ($orderby !== undefined && $orderby !== null) {
917
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
918
- }
919
- if ($filter !== undefined && $filter !== null) {
920
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
921
- }
922
- if (searchTerm !== undefined && searchTerm !== null) {
923
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchTerm, 'searchTerm');
924
- }
652
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
653
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
654
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
655
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
656
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchTerm, 'searchTerm');
925
657
  let localVarHeaders = this.defaultHeaders;
926
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
927
- if (localVarHttpHeaderAcceptSelected === undefined) {
928
- // to determine the Accept header
929
- const httpHeaderAccepts = [
930
- 'application/json'
931
- ];
932
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
933
- }
658
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
659
+ 'application/json'
660
+ ]);
934
661
  if (localVarHttpHeaderAcceptSelected !== undefined) {
935
662
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
936
663
  }
937
- let localVarHttpContext = options && options.context;
938
- if (localVarHttpContext === undefined) {
939
- localVarHttpContext = new HttpContext();
940
- }
941
- let localVarTransferCache = options && options.transferCache;
942
- if (localVarTransferCache === undefined) {
943
- localVarTransferCache = true;
944
- }
664
+ const localVarHttpContext = options?.context ?? new HttpContext();
665
+ const localVarTransferCache = options?.transferCache ?? true;
945
666
  let responseType_ = 'json';
946
667
  if (localVarHttpHeaderAcceptSelected) {
947
668
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -955,11 +676,12 @@ class ContainersService {
955
676
  }
956
677
  }
957
678
  let localVarPath = `/containers/search`;
958
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
679
+ const { basePath, withCredentials } = this.configuration;
680
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
959
681
  context: localVarHttpContext,
960
682
  params: localVarQueryParameters,
961
683
  responseType: responseType_,
962
- withCredentials: this.configuration.withCredentials,
684
+ ...(withCredentials ? { withCredentials } : {}),
963
685
  headers: localVarHeaders,
964
686
  observe: observe,
965
687
  transferCache: localVarTransferCache,
@@ -968,25 +690,14 @@ class ContainersService {
968
690
  }
969
691
  getContainersToDeliverCount(observe = 'body', reportProgress = false, options) {
970
692
  let localVarHeaders = this.defaultHeaders;
971
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
972
- if (localVarHttpHeaderAcceptSelected === undefined) {
973
- // to determine the Accept header
974
- const httpHeaderAccepts = [
975
- 'application/json'
976
- ];
977
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
978
- }
693
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
694
+ 'application/json'
695
+ ]);
979
696
  if (localVarHttpHeaderAcceptSelected !== undefined) {
980
697
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
981
698
  }
982
- let localVarHttpContext = options && options.context;
983
- if (localVarHttpContext === undefined) {
984
- localVarHttpContext = new HttpContext();
985
- }
986
- let localVarTransferCache = options && options.transferCache;
987
- if (localVarTransferCache === undefined) {
988
- localVarTransferCache = true;
989
- }
699
+ const localVarHttpContext = options?.context ?? new HttpContext();
700
+ const localVarTransferCache = options?.transferCache ?? true;
990
701
  let responseType_ = 'json';
991
702
  if (localVarHttpHeaderAcceptSelected) {
992
703
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1000,10 +711,11 @@ class ContainersService {
1000
711
  }
1001
712
  }
1002
713
  let localVarPath = `/containers/todeliver/count`;
1003
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
714
+ const { basePath, withCredentials } = this.configuration;
715
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1004
716
  context: localVarHttpContext,
1005
717
  responseType: responseType_,
1006
- withCredentials: this.configuration.withCredentials,
718
+ ...(withCredentials ? { withCredentials } : {}),
1007
719
  headers: localVarHeaders,
1008
720
  observe: observe,
1009
721
  transferCache: localVarTransferCache,
@@ -1012,25 +724,14 @@ class ContainersService {
1012
724
  }
1013
725
  getDeliveriesRequireAmendConfirmationCount(observe = 'body', reportProgress = false, options) {
1014
726
  let localVarHeaders = this.defaultHeaders;
1015
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1016
- if (localVarHttpHeaderAcceptSelected === undefined) {
1017
- // to determine the Accept header
1018
- const httpHeaderAccepts = [
1019
- 'application/json'
1020
- ];
1021
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1022
- }
727
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
728
+ 'application/json'
729
+ ]);
1023
730
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1024
731
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1025
732
  }
1026
- let localVarHttpContext = options && options.context;
1027
- if (localVarHttpContext === undefined) {
1028
- localVarHttpContext = new HttpContext();
1029
- }
1030
- let localVarTransferCache = options && options.transferCache;
1031
- if (localVarTransferCache === undefined) {
1032
- localVarTransferCache = true;
1033
- }
733
+ const localVarHttpContext = options?.context ?? new HttpContext();
734
+ const localVarTransferCache = options?.transferCache ?? true;
1034
735
  let responseType_ = 'json';
1035
736
  if (localVarHttpHeaderAcceptSelected) {
1036
737
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1044,10 +745,11 @@ class ContainersService {
1044
745
  }
1045
746
  }
1046
747
  let localVarPath = `/containers/deliveriesRequireAmendConfirmation/count`;
1047
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
748
+ const { basePath, withCredentials } = this.configuration;
749
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1048
750
  context: localVarHttpContext,
1049
751
  responseType: responseType_,
1050
- withCredentials: this.configuration.withCredentials,
752
+ ...(withCredentials ? { withCredentials } : {}),
1051
753
  headers: localVarHeaders,
1052
754
  observe: observe,
1053
755
  transferCache: localVarTransferCache,
@@ -1056,25 +758,14 @@ class ContainersService {
1056
758
  }
1057
759
  getDeliveriesRequireCancelConfirmationCount(observe = 'body', reportProgress = false, options) {
1058
760
  let localVarHeaders = this.defaultHeaders;
1059
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1060
- if (localVarHttpHeaderAcceptSelected === undefined) {
1061
- // to determine the Accept header
1062
- const httpHeaderAccepts = [
1063
- 'application/json'
1064
- ];
1065
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1066
- }
761
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
762
+ 'application/json'
763
+ ]);
1067
764
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1068
765
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1069
766
  }
1070
- let localVarHttpContext = options && options.context;
1071
- if (localVarHttpContext === undefined) {
1072
- localVarHttpContext = new HttpContext();
1073
- }
1074
- let localVarTransferCache = options && options.transferCache;
1075
- if (localVarTransferCache === undefined) {
1076
- localVarTransferCache = true;
1077
- }
767
+ const localVarHttpContext = options?.context ?? new HttpContext();
768
+ const localVarTransferCache = options?.transferCache ?? true;
1078
769
  let responseType_ = 'json';
1079
770
  if (localVarHttpHeaderAcceptSelected) {
1080
771
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1088,10 +779,11 @@ class ContainersService {
1088
779
  }
1089
780
  }
1090
781
  let localVarPath = `/containers/deliveriesRequireCancelConfirmation/count`;
1091
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
782
+ const { basePath, withCredentials } = this.configuration;
783
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1092
784
  context: localVarHttpContext,
1093
785
  responseType: responseType_,
1094
- withCredentials: this.configuration.withCredentials,
786
+ ...(withCredentials ? { withCredentials } : {}),
1095
787
  headers: localVarHeaders,
1096
788
  observe: observe,
1097
789
  transferCache: localVarTransferCache,
@@ -1100,25 +792,14 @@ class ContainersService {
1100
792
  }
1101
793
  getDeliveriesRequireConfirmationCount(observe = 'body', reportProgress = false, options) {
1102
794
  let localVarHeaders = this.defaultHeaders;
1103
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1104
- if (localVarHttpHeaderAcceptSelected === undefined) {
1105
- // to determine the Accept header
1106
- const httpHeaderAccepts = [
1107
- 'application/json'
1108
- ];
1109
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1110
- }
795
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
796
+ 'application/json'
797
+ ]);
1111
798
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1112
799
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1113
800
  }
1114
- let localVarHttpContext = options && options.context;
1115
- if (localVarHttpContext === undefined) {
1116
- localVarHttpContext = new HttpContext();
1117
- }
1118
- let localVarTransferCache = options && options.transferCache;
1119
- if (localVarTransferCache === undefined) {
1120
- localVarTransferCache = true;
1121
- }
801
+ const localVarHttpContext = options?.context ?? new HttpContext();
802
+ const localVarTransferCache = options?.transferCache ?? true;
1122
803
  let responseType_ = 'json';
1123
804
  if (localVarHttpHeaderAcceptSelected) {
1124
805
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1132,10 +813,11 @@ class ContainersService {
1132
813
  }
1133
814
  }
1134
815
  let localVarPath = `/containers/deliveriesRequireConfirmation/count`;
1135
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
816
+ const { basePath, withCredentials } = this.configuration;
817
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1136
818
  context: localVarHttpContext,
1137
819
  responseType: responseType_,
1138
- withCredentials: this.configuration.withCredentials,
820
+ ...(withCredentials ? { withCredentials } : {}),
1139
821
  headers: localVarHeaders,
1140
822
  observe: observe,
1141
823
  transferCache: localVarTransferCache,
@@ -1144,25 +826,14 @@ class ContainersService {
1144
826
  }
1145
827
  getDeliveriesToBookCount(observe = 'body', reportProgress = false, options) {
1146
828
  let localVarHeaders = this.defaultHeaders;
1147
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1148
- if (localVarHttpHeaderAcceptSelected === undefined) {
1149
- // to determine the Accept header
1150
- const httpHeaderAccepts = [
1151
- 'application/json'
1152
- ];
1153
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1154
- }
829
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
830
+ 'application/json'
831
+ ]);
1155
832
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1156
833
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1157
834
  }
1158
- let localVarHttpContext = options && options.context;
1159
- if (localVarHttpContext === undefined) {
1160
- localVarHttpContext = new HttpContext();
1161
- }
1162
- let localVarTransferCache = options && options.transferCache;
1163
- if (localVarTransferCache === undefined) {
1164
- localVarTransferCache = true;
1165
- }
835
+ const localVarHttpContext = options?.context ?? new HttpContext();
836
+ const localVarTransferCache = options?.transferCache ?? true;
1166
837
  let responseType_ = 'json';
1167
838
  if (localVarHttpHeaderAcceptSelected) {
1168
839
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1176,10 +847,11 @@ class ContainersService {
1176
847
  }
1177
848
  }
1178
849
  let localVarPath = `/containers/deliveriesToBook/count`;
1179
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
850
+ const { basePath, withCredentials } = this.configuration;
851
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1180
852
  context: localVarHttpContext,
1181
853
  responseType: responseType_,
1182
- withCredentials: this.configuration.withCredentials,
854
+ ...(withCredentials ? { withCredentials } : {}),
1183
855
  headers: localVarHeaders,
1184
856
  observe: observe,
1185
857
  transferCache: localVarTransferCache,
@@ -1188,25 +860,14 @@ class ContainersService {
1188
860
  }
1189
861
  getDeliveriesToRescheduleCount(observe = 'body', reportProgress = false, options) {
1190
862
  let localVarHeaders = this.defaultHeaders;
1191
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1192
- if (localVarHttpHeaderAcceptSelected === undefined) {
1193
- // to determine the Accept header
1194
- const httpHeaderAccepts = [
1195
- 'application/json'
1196
- ];
1197
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1198
- }
863
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
864
+ 'application/json'
865
+ ]);
1199
866
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1200
867
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1201
868
  }
1202
- let localVarHttpContext = options && options.context;
1203
- if (localVarHttpContext === undefined) {
1204
- localVarHttpContext = new HttpContext();
1205
- }
1206
- let localVarTransferCache = options && options.transferCache;
1207
- if (localVarTransferCache === undefined) {
1208
- localVarTransferCache = true;
1209
- }
869
+ const localVarHttpContext = options?.context ?? new HttpContext();
870
+ const localVarTransferCache = options?.transferCache ?? true;
1210
871
  let responseType_ = 'json';
1211
872
  if (localVarHttpHeaderAcceptSelected) {
1212
873
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1220,10 +881,11 @@ class ContainersService {
1220
881
  }
1221
882
  }
1222
883
  let localVarPath = `/containers/deliveriesToReschedule/count`;
1223
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
884
+ const { basePath, withCredentials } = this.configuration;
885
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1224
886
  context: localVarHttpContext,
1225
887
  responseType: responseType_,
1226
- withCredentials: this.configuration.withCredentials,
888
+ ...(withCredentials ? { withCredentials } : {}),
1227
889
  headers: localVarHeaders,
1228
890
  observe: observe,
1229
891
  transferCache: localVarTransferCache,
@@ -1232,25 +894,14 @@ class ContainersService {
1232
894
  }
1233
895
  getPlannedDeliveriesAndPodCount(observe = 'body', reportProgress = false, options) {
1234
896
  let localVarHeaders = this.defaultHeaders;
1235
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1236
- if (localVarHttpHeaderAcceptSelected === undefined) {
1237
- // to determine the Accept header
1238
- const httpHeaderAccepts = [
1239
- 'application/json'
1240
- ];
1241
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1242
- }
897
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
898
+ 'application/json'
899
+ ]);
1243
900
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1244
901
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1245
902
  }
1246
- let localVarHttpContext = options && options.context;
1247
- if (localVarHttpContext === undefined) {
1248
- localVarHttpContext = new HttpContext();
1249
- }
1250
- let localVarTransferCache = options && options.transferCache;
1251
- if (localVarTransferCache === undefined) {
1252
- localVarTransferCache = true;
1253
- }
903
+ const localVarHttpContext = options?.context ?? new HttpContext();
904
+ const localVarTransferCache = options?.transferCache ?? true;
1254
905
  let responseType_ = 'json';
1255
906
  if (localVarHttpHeaderAcceptSelected) {
1256
907
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1264,10 +915,11 @@ class ContainersService {
1264
915
  }
1265
916
  }
1266
917
  let localVarPath = `/containers/plannedDeliveriesAndPod/count`;
1267
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
918
+ const { basePath, withCredentials } = this.configuration;
919
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1268
920
  context: localVarHttpContext,
1269
921
  responseType: responseType_,
1270
- withCredentials: this.configuration.withCredentials,
922
+ ...(withCredentials ? { withCredentials } : {}),
1271
923
  headers: localVarHeaders,
1272
924
  observe: observe,
1273
925
  transferCache: localVarTransferCache,
@@ -1279,41 +931,20 @@ class ContainersService {
1279
931
  throw new Error('Required parameter shipmentId was null or undefined when calling getShipmentContainers.');
1280
932
  }
1281
933
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
1282
- if ($skip !== undefined && $skip !== null) {
1283
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
1284
- }
1285
- if ($top !== undefined && $top !== null) {
1286
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
1287
- }
1288
- if ($orderby !== undefined && $orderby !== null) {
1289
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
1290
- }
1291
- if ($filter !== undefined && $filter !== null) {
1292
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
1293
- }
1294
- if ($search !== undefined && $search !== null) {
1295
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
1296
- }
934
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
935
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
936
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
937
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
938
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
1297
939
  let localVarHeaders = this.defaultHeaders;
1298
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1299
- if (localVarHttpHeaderAcceptSelected === undefined) {
1300
- // to determine the Accept header
1301
- const httpHeaderAccepts = [
1302
- 'application/json'
1303
- ];
1304
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1305
- }
940
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
941
+ 'application/json'
942
+ ]);
1306
943
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1307
944
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1308
945
  }
1309
- let localVarHttpContext = options && options.context;
1310
- if (localVarHttpContext === undefined) {
1311
- localVarHttpContext = new HttpContext();
1312
- }
1313
- let localVarTransferCache = options && options.transferCache;
1314
- if (localVarTransferCache === undefined) {
1315
- localVarTransferCache = true;
1316
- }
946
+ const localVarHttpContext = options?.context ?? new HttpContext();
947
+ const localVarTransferCache = options?.transferCache ?? true;
1317
948
  let responseType_ = 'json';
1318
949
  if (localVarHttpHeaderAcceptSelected) {
1319
950
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1327,21 +958,22 @@ class ContainersService {
1327
958
  }
1328
959
  }
1329
960
  let localVarPath = `/containers/shipment/${this.configuration.encodeParam({ name: "shipmentId", value: shipmentId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/`;
1330
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
961
+ const { basePath, withCredentials } = this.configuration;
962
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1331
963
  context: localVarHttpContext,
1332
964
  params: localVarQueryParameters,
1333
965
  responseType: responseType_,
1334
- withCredentials: this.configuration.withCredentials,
966
+ ...(withCredentials ? { withCredentials } : {}),
1335
967
  headers: localVarHeaders,
1336
968
  observe: observe,
1337
969
  transferCache: localVarTransferCache,
1338
970
  reportProgress: reportProgress
1339
971
  });
1340
972
  }
1341
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ContainersService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1342
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ContainersService, providedIn: 'root' });
973
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ContainersService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
974
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ContainersService, providedIn: 'root' });
1343
975
  }
1344
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ContainersService, decorators: [{
976
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ContainersService, decorators: [{
1345
977
  type: Injectable,
1346
978
  args: [{
1347
979
  providedIn: 'root'
@@ -1365,66 +997,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1365
997
  * Do not edit the class manually.
1366
998
  */
1367
999
  /* tslint:disable:no-unused-variable member-ordering */
1368
- class DocumentsService {
1000
+ class DocumentsService extends BaseService {
1369
1001
  httpClient;
1370
- basePath = 'http://localhost';
1371
- defaultHeaders = new HttpHeaders();
1372
- configuration = new Configuration();
1373
- encoder;
1374
1002
  constructor(httpClient, basePath, configuration) {
1003
+ super(basePath, configuration);
1375
1004
  this.httpClient = httpClient;
1376
- if (configuration) {
1377
- this.configuration = configuration;
1378
- }
1379
- if (typeof this.configuration.basePath !== 'string') {
1380
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
1381
- if (firstBasePath != undefined) {
1382
- basePath = firstBasePath;
1383
- }
1384
- if (typeof basePath !== 'string') {
1385
- basePath = this.basePath;
1386
- }
1387
- this.configuration.basePath = basePath;
1388
- }
1389
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
1390
- }
1391
- // @ts-ignore
1392
- addToHttpParams(httpParams, value, key) {
1393
- if (typeof value === "object" && value instanceof Date === false) {
1394
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
1395
- }
1396
- else {
1397
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
1398
- }
1399
- return httpParams;
1400
- }
1401
- addToHttpParamsRecursive(httpParams, value, key) {
1402
- if (value == null) {
1403
- return httpParams;
1404
- }
1405
- if (typeof value === "object") {
1406
- if (Array.isArray(value)) {
1407
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
1408
- }
1409
- else if (value instanceof Date) {
1410
- if (key != null) {
1411
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
1412
- }
1413
- else {
1414
- throw Error("key may not be null if value is Date");
1415
- }
1416
- }
1417
- else {
1418
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
1419
- }
1420
- }
1421
- else if (key != null) {
1422
- httpParams = httpParams.append(key, value);
1423
- }
1424
- else {
1425
- throw Error("key may not be null if value is not object or array");
1426
- }
1427
- return httpParams;
1428
1005
  }
1429
1006
  getShipmentDocuments(recordId, artifact, $skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
1430
1007
  if (recordId === null || recordId === undefined) {
@@ -1434,41 +1011,20 @@ class DocumentsService {
1434
1011
  throw new Error('Required parameter artifact was null or undefined when calling getShipmentDocuments.');
1435
1012
  }
1436
1013
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
1437
- if ($skip !== undefined && $skip !== null) {
1438
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
1439
- }
1440
- if ($top !== undefined && $top !== null) {
1441
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
1442
- }
1443
- if ($orderby !== undefined && $orderby !== null) {
1444
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
1445
- }
1446
- if ($filter !== undefined && $filter !== null) {
1447
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
1448
- }
1449
- if ($search !== undefined && $search !== null) {
1450
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
1451
- }
1014
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
1015
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
1016
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
1017
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
1018
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
1452
1019
  let localVarHeaders = this.defaultHeaders;
1453
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1454
- if (localVarHttpHeaderAcceptSelected === undefined) {
1455
- // to determine the Accept header
1456
- const httpHeaderAccepts = [
1457
- 'application/json'
1458
- ];
1459
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1460
- }
1020
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1021
+ 'application/json'
1022
+ ]);
1461
1023
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1462
1024
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1463
1025
  }
1464
- let localVarHttpContext = options && options.context;
1465
- if (localVarHttpContext === undefined) {
1466
- localVarHttpContext = new HttpContext();
1467
- }
1468
- let localVarTransferCache = options && options.transferCache;
1469
- if (localVarTransferCache === undefined) {
1470
- localVarTransferCache = true;
1471
- }
1026
+ const localVarHttpContext = options?.context ?? new HttpContext();
1027
+ const localVarTransferCache = options?.transferCache ?? true;
1472
1028
  let responseType_ = 'json';
1473
1029
  if (localVarHttpHeaderAcceptSelected) {
1474
1030
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1482,21 +1038,22 @@ class DocumentsService {
1482
1038
  }
1483
1039
  }
1484
1040
  let localVarPath = `/documents/${this.configuration.encodeParam({ name: "recordId", value: recordId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/${this.configuration.encodeParam({ name: "artifact", value: artifact, in: "path", style: "simple", explode: false, dataType: "WorkflowArtifacts", dataFormat: undefined })}`;
1485
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1041
+ const { basePath, withCredentials } = this.configuration;
1042
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1486
1043
  context: localVarHttpContext,
1487
1044
  params: localVarQueryParameters,
1488
1045
  responseType: responseType_,
1489
- withCredentials: this.configuration.withCredentials,
1046
+ ...(withCredentials ? { withCredentials } : {}),
1490
1047
  headers: localVarHeaders,
1491
1048
  observe: observe,
1492
1049
  transferCache: localVarTransferCache,
1493
1050
  reportProgress: reportProgress
1494
1051
  });
1495
1052
  }
1496
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DocumentsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1497
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DocumentsService, providedIn: 'root' });
1053
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DocumentsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1054
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DocumentsService, providedIn: 'root' });
1498
1055
  }
1499
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: DocumentsService, decorators: [{
1056
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: DocumentsService, decorators: [{
1500
1057
  type: Injectable,
1501
1058
  args: [{
1502
1059
  providedIn: 'root'
@@ -1520,89 +1077,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1520
1077
  * Do not edit the class manually.
1521
1078
  */
1522
1079
  /* tslint:disable:no-unused-variable member-ordering */
1523
- class HealthService {
1080
+ class HealthService extends BaseService {
1524
1081
  httpClient;
1525
- basePath = 'http://localhost';
1526
- defaultHeaders = new HttpHeaders();
1527
- configuration = new Configuration();
1528
- encoder;
1529
1082
  constructor(httpClient, basePath, configuration) {
1083
+ super(basePath, configuration);
1530
1084
  this.httpClient = httpClient;
1531
- if (configuration) {
1532
- this.configuration = configuration;
1533
- }
1534
- if (typeof this.configuration.basePath !== 'string') {
1535
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
1536
- if (firstBasePath != undefined) {
1537
- basePath = firstBasePath;
1538
- }
1539
- if (typeof basePath !== 'string') {
1540
- basePath = this.basePath;
1541
- }
1542
- this.configuration.basePath = basePath;
1543
- }
1544
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
1545
- }
1546
- // @ts-ignore
1547
- addToHttpParams(httpParams, value, key) {
1548
- if (typeof value === "object" && value instanceof Date === false) {
1549
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
1550
- }
1551
- else {
1552
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
1553
- }
1554
- return httpParams;
1555
- }
1556
- addToHttpParamsRecursive(httpParams, value, key) {
1557
- if (value == null) {
1558
- return httpParams;
1559
- }
1560
- if (typeof value === "object") {
1561
- if (Array.isArray(value)) {
1562
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
1563
- }
1564
- else if (value instanceof Date) {
1565
- if (key != null) {
1566
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
1567
- }
1568
- else {
1569
- throw Error("key may not be null if value is Date");
1570
- }
1571
- }
1572
- else {
1573
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
1574
- }
1575
- }
1576
- else if (key != null) {
1577
- httpParams = httpParams.append(key, value);
1578
- }
1579
- else {
1580
- throw Error("key may not be null if value is not object or array");
1581
- }
1582
- return httpParams;
1583
1085
  }
1584
1086
  getHealth(observe = 'body', reportProgress = false, options) {
1585
1087
  let localVarHeaders = this.defaultHeaders;
1586
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1587
- if (localVarHttpHeaderAcceptSelected === undefined) {
1588
- // to determine the Accept header
1589
- const httpHeaderAccepts = [
1590
- 'text/plain',
1591
- 'application/json'
1592
- ];
1593
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1594
- }
1088
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1089
+ 'text/plain',
1090
+ 'application/json'
1091
+ ]);
1595
1092
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1596
1093
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1597
1094
  }
1598
- let localVarHttpContext = options && options.context;
1599
- if (localVarHttpContext === undefined) {
1600
- localVarHttpContext = new HttpContext();
1601
- }
1602
- let localVarTransferCache = options && options.transferCache;
1603
- if (localVarTransferCache === undefined) {
1604
- localVarTransferCache = true;
1605
- }
1095
+ const localVarHttpContext = options?.context ?? new HttpContext();
1096
+ const localVarTransferCache = options?.transferCache ?? true;
1606
1097
  let responseType_ = 'json';
1607
1098
  if (localVarHttpHeaderAcceptSelected) {
1608
1099
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1616,20 +1107,21 @@ class HealthService {
1616
1107
  }
1617
1108
  }
1618
1109
  let localVarPath = `/health`;
1619
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1110
+ const { basePath, withCredentials } = this.configuration;
1111
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1620
1112
  context: localVarHttpContext,
1621
1113
  responseType: responseType_,
1622
- withCredentials: this.configuration.withCredentials,
1114
+ ...(withCredentials ? { withCredentials } : {}),
1623
1115
  headers: localVarHeaders,
1624
1116
  observe: observe,
1625
1117
  transferCache: localVarTransferCache,
1626
1118
  reportProgress: reportProgress
1627
1119
  });
1628
1120
  }
1629
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: HealthService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1630
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: HealthService, providedIn: 'root' });
1121
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: HealthService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1122
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: HealthService, providedIn: 'root' });
1631
1123
  }
1632
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: HealthService, decorators: [{
1124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: HealthService, decorators: [{
1633
1125
  type: Injectable,
1634
1126
  args: [{
1635
1127
  providedIn: 'root'
@@ -1653,88 +1145,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1653
1145
  * Do not edit the class manually.
1654
1146
  */
1655
1147
  /* tslint:disable:no-unused-variable member-ordering */
1656
- class NotesService {
1148
+ class NotesService extends BaseService {
1657
1149
  httpClient;
1658
- basePath = 'http://localhost';
1659
- defaultHeaders = new HttpHeaders();
1660
- configuration = new Configuration();
1661
- encoder;
1662
1150
  constructor(httpClient, basePath, configuration) {
1151
+ super(basePath, configuration);
1663
1152
  this.httpClient = httpClient;
1664
- if (configuration) {
1665
- this.configuration = configuration;
1666
- }
1667
- if (typeof this.configuration.basePath !== 'string') {
1668
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
1669
- if (firstBasePath != undefined) {
1670
- basePath = firstBasePath;
1671
- }
1672
- if (typeof basePath !== 'string') {
1673
- basePath = this.basePath;
1674
- }
1675
- this.configuration.basePath = basePath;
1676
- }
1677
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
1678
- }
1679
- // @ts-ignore
1680
- addToHttpParams(httpParams, value, key) {
1681
- if (typeof value === "object" && value instanceof Date === false) {
1682
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
1683
- }
1684
- else {
1685
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
1686
- }
1687
- return httpParams;
1688
- }
1689
- addToHttpParamsRecursive(httpParams, value, key) {
1690
- if (value == null) {
1691
- return httpParams;
1692
- }
1693
- if (typeof value === "object") {
1694
- if (Array.isArray(value)) {
1695
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
1696
- }
1697
- else if (value instanceof Date) {
1698
- if (key != null) {
1699
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
1700
- }
1701
- else {
1702
- throw Error("key may not be null if value is Date");
1703
- }
1704
- }
1705
- else {
1706
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
1707
- }
1708
- }
1709
- else if (key != null) {
1710
- httpParams = httpParams.append(key, value);
1711
- }
1712
- else {
1713
- throw Error("key may not be null if value is not object or array");
1714
- }
1715
- return httpParams;
1716
1153
  }
1717
1154
  createShipmentNote(note, observe = 'body', reportProgress = false, options) {
1718
1155
  let localVarHeaders = this.defaultHeaders;
1719
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1720
- if (localVarHttpHeaderAcceptSelected === undefined) {
1721
- // to determine the Accept header
1722
- const httpHeaderAccepts = [
1723
- 'application/json'
1724
- ];
1725
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1726
- }
1156
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1157
+ 'application/json'
1158
+ ]);
1727
1159
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1728
1160
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1729
1161
  }
1730
- let localVarHttpContext = options && options.context;
1731
- if (localVarHttpContext === undefined) {
1732
- localVarHttpContext = new HttpContext();
1733
- }
1734
- let localVarTransferCache = options && options.transferCache;
1735
- if (localVarTransferCache === undefined) {
1736
- localVarTransferCache = true;
1737
- }
1162
+ const localVarHttpContext = options?.context ?? new HttpContext();
1163
+ const localVarTransferCache = options?.transferCache ?? true;
1738
1164
  // to determine the Content-Type header
1739
1165
  const consumes = [
1740
1166
  'application/json'
@@ -1756,11 +1182,12 @@ class NotesService {
1756
1182
  }
1757
1183
  }
1758
1184
  let localVarPath = `/notes`;
1759
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
1185
+ const { basePath, withCredentials } = this.configuration;
1186
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
1760
1187
  context: localVarHttpContext,
1761
1188
  body: note,
1762
1189
  responseType: responseType_,
1763
- withCredentials: this.configuration.withCredentials,
1190
+ ...(withCredentials ? { withCredentials } : {}),
1764
1191
  headers: localVarHeaders,
1765
1192
  observe: observe,
1766
1193
  transferCache: localVarTransferCache,
@@ -1775,41 +1202,20 @@ class NotesService {
1775
1202
  throw new Error('Required parameter type was null or undefined when calling getShipmentNotes.');
1776
1203
  }
1777
1204
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
1778
- if ($skip !== undefined && $skip !== null) {
1779
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
1780
- }
1781
- if ($top !== undefined && $top !== null) {
1782
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
1783
- }
1784
- if ($orderby !== undefined && $orderby !== null) {
1785
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
1786
- }
1787
- if ($filter !== undefined && $filter !== null) {
1788
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
1789
- }
1790
- if ($search !== undefined && $search !== null) {
1791
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
1792
- }
1205
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
1206
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
1207
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
1208
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
1209
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
1793
1210
  let localVarHeaders = this.defaultHeaders;
1794
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1795
- if (localVarHttpHeaderAcceptSelected === undefined) {
1796
- // to determine the Accept header
1797
- const httpHeaderAccepts = [
1798
- 'application/json'
1799
- ];
1800
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1801
- }
1211
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1212
+ 'application/json'
1213
+ ]);
1802
1214
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1803
1215
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1804
1216
  }
1805
- let localVarHttpContext = options && options.context;
1806
- if (localVarHttpContext === undefined) {
1807
- localVarHttpContext = new HttpContext();
1808
- }
1809
- let localVarTransferCache = options && options.transferCache;
1810
- if (localVarTransferCache === undefined) {
1811
- localVarTransferCache = true;
1812
- }
1217
+ const localVarHttpContext = options?.context ?? new HttpContext();
1218
+ const localVarTransferCache = options?.transferCache ?? true;
1813
1219
  let responseType_ = 'json';
1814
1220
  if (localVarHttpHeaderAcceptSelected) {
1815
1221
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1823,21 +1229,22 @@ class NotesService {
1823
1229
  }
1824
1230
  }
1825
1231
  let localVarPath = `/notes/${this.configuration.encodeParam({ name: "sourceId", value: sourceId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/${this.configuration.encodeParam({ name: "type", value: type, in: "path", style: "simple", explode: false, dataType: "NoteSourceTypes", dataFormat: undefined })}`;
1826
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1232
+ const { basePath, withCredentials } = this.configuration;
1233
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1827
1234
  context: localVarHttpContext,
1828
1235
  params: localVarQueryParameters,
1829
1236
  responseType: responseType_,
1830
- withCredentials: this.configuration.withCredentials,
1237
+ ...(withCredentials ? { withCredentials } : {}),
1831
1238
  headers: localVarHeaders,
1832
1239
  observe: observe,
1833
1240
  transferCache: localVarTransferCache,
1834
1241
  reportProgress: reportProgress
1835
1242
  });
1836
1243
  }
1837
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NotesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1838
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NotesService, providedIn: 'root' });
1244
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: NotesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1245
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: NotesService, providedIn: 'root' });
1839
1246
  }
1840
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NotesService, decorators: [{
1247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: NotesService, decorators: [{
1841
1248
  type: Injectable,
1842
1249
  args: [{
1843
1250
  providedIn: 'root'
@@ -1861,88 +1268,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1861
1268
  * Do not edit the class manually.
1862
1269
  */
1863
1270
  /* tslint:disable:no-unused-variable member-ordering */
1864
- class PermissionsService {
1271
+ class PermissionsService extends BaseService {
1865
1272
  httpClient;
1866
- basePath = 'http://localhost';
1867
- defaultHeaders = new HttpHeaders();
1868
- configuration = new Configuration();
1869
- encoder;
1870
1273
  constructor(httpClient, basePath, configuration) {
1274
+ super(basePath, configuration);
1871
1275
  this.httpClient = httpClient;
1872
- if (configuration) {
1873
- this.configuration = configuration;
1874
- }
1875
- if (typeof this.configuration.basePath !== 'string') {
1876
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
1877
- if (firstBasePath != undefined) {
1878
- basePath = firstBasePath;
1879
- }
1880
- if (typeof basePath !== 'string') {
1881
- basePath = this.basePath;
1882
- }
1883
- this.configuration.basePath = basePath;
1884
- }
1885
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
1886
- }
1887
- // @ts-ignore
1888
- addToHttpParams(httpParams, value, key) {
1889
- if (typeof value === "object" && value instanceof Date === false) {
1890
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
1891
- }
1892
- else {
1893
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
1894
- }
1895
- return httpParams;
1896
- }
1897
- addToHttpParamsRecursive(httpParams, value, key) {
1898
- if (value == null) {
1899
- return httpParams;
1900
- }
1901
- if (typeof value === "object") {
1902
- if (Array.isArray(value)) {
1903
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
1904
- }
1905
- else if (value instanceof Date) {
1906
- if (key != null) {
1907
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
1908
- }
1909
- else {
1910
- throw Error("key may not be null if value is Date");
1911
- }
1912
- }
1913
- else {
1914
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
1915
- }
1916
- }
1917
- else if (key != null) {
1918
- httpParams = httpParams.append(key, value);
1919
- }
1920
- else {
1921
- throw Error("key may not be null if value is not object or array");
1922
- }
1923
- return httpParams;
1924
1276
  }
1925
1277
  getUserPermissions(observe = 'body', reportProgress = false, options) {
1926
1278
  let localVarHeaders = this.defaultHeaders;
1927
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
1928
- if (localVarHttpHeaderAcceptSelected === undefined) {
1929
- // to determine the Accept header
1930
- const httpHeaderAccepts = [
1931
- 'application/json'
1932
- ];
1933
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
1934
- }
1279
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1280
+ 'application/json'
1281
+ ]);
1935
1282
  if (localVarHttpHeaderAcceptSelected !== undefined) {
1936
1283
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1937
1284
  }
1938
- let localVarHttpContext = options && options.context;
1939
- if (localVarHttpContext === undefined) {
1940
- localVarHttpContext = new HttpContext();
1941
- }
1942
- let localVarTransferCache = options && options.transferCache;
1943
- if (localVarTransferCache === undefined) {
1944
- localVarTransferCache = true;
1945
- }
1285
+ const localVarHttpContext = options?.context ?? new HttpContext();
1286
+ const localVarTransferCache = options?.transferCache ?? true;
1946
1287
  let responseType_ = 'json';
1947
1288
  if (localVarHttpHeaderAcceptSelected) {
1948
1289
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -1956,20 +1297,21 @@ class PermissionsService {
1956
1297
  }
1957
1298
  }
1958
1299
  let localVarPath = `/user/permissions`;
1959
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1300
+ const { basePath, withCredentials } = this.configuration;
1301
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1960
1302
  context: localVarHttpContext,
1961
1303
  responseType: responseType_,
1962
- withCredentials: this.configuration.withCredentials,
1304
+ ...(withCredentials ? { withCredentials } : {}),
1963
1305
  headers: localVarHeaders,
1964
1306
  observe: observe,
1965
1307
  transferCache: localVarTransferCache,
1966
1308
  reportProgress: reportProgress
1967
1309
  });
1968
1310
  }
1969
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PermissionsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1970
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PermissionsService, providedIn: 'root' });
1311
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PermissionsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1312
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PermissionsService, providedIn: 'root' });
1971
1313
  }
1972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PermissionsService, decorators: [{
1314
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PermissionsService, decorators: [{
1973
1315
  type: Injectable,
1974
1316
  args: [{
1975
1317
  providedIn: 'root'
@@ -1993,91 +1335,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
1993
1335
  * Do not edit the class manually.
1994
1336
  */
1995
1337
  /* tslint:disable:no-unused-variable member-ordering */
1996
- class PoItemsService {
1338
+ class PoItemsService extends BaseService {
1997
1339
  httpClient;
1998
- basePath = 'http://localhost';
1999
- defaultHeaders = new HttpHeaders();
2000
- configuration = new Configuration();
2001
- encoder;
2002
1340
  constructor(httpClient, basePath, configuration) {
1341
+ super(basePath, configuration);
2003
1342
  this.httpClient = httpClient;
2004
- if (configuration) {
2005
- this.configuration = configuration;
2006
- }
2007
- if (typeof this.configuration.basePath !== 'string') {
2008
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
2009
- if (firstBasePath != undefined) {
2010
- basePath = firstBasePath;
2011
- }
2012
- if (typeof basePath !== 'string') {
2013
- basePath = this.basePath;
2014
- }
2015
- this.configuration.basePath = basePath;
2016
- }
2017
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
2018
- }
2019
- // @ts-ignore
2020
- addToHttpParams(httpParams, value, key) {
2021
- if (typeof value === "object" && value instanceof Date === false) {
2022
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
2023
- }
2024
- else {
2025
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
2026
- }
2027
- return httpParams;
2028
- }
2029
- addToHttpParamsRecursive(httpParams, value, key) {
2030
- if (value == null) {
2031
- return httpParams;
2032
- }
2033
- if (typeof value === "object") {
2034
- if (Array.isArray(value)) {
2035
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
2036
- }
2037
- else if (value instanceof Date) {
2038
- if (key != null) {
2039
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
2040
- }
2041
- else {
2042
- throw Error("key may not be null if value is Date");
2043
- }
2044
- }
2045
- else {
2046
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
2047
- }
2048
- }
2049
- else if (key != null) {
2050
- httpParams = httpParams.append(key, value);
2051
- }
2052
- else {
2053
- throw Error("key may not be null if value is not object or array");
2054
- }
2055
- return httpParams;
2056
1343
  }
2057
1344
  getPoItemSummary(id, observe = 'body', reportProgress = false, options) {
2058
1345
  if (id === null || id === undefined) {
2059
1346
  throw new Error('Required parameter id was null or undefined when calling getPoItemSummary.');
2060
1347
  }
2061
1348
  let localVarHeaders = this.defaultHeaders;
2062
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2063
- if (localVarHttpHeaderAcceptSelected === undefined) {
2064
- // to determine the Accept header
2065
- const httpHeaderAccepts = [
2066
- 'application/json'
2067
- ];
2068
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2069
- }
1349
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1350
+ 'application/json'
1351
+ ]);
2070
1352
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2071
1353
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2072
1354
  }
2073
- let localVarHttpContext = options && options.context;
2074
- if (localVarHttpContext === undefined) {
2075
- localVarHttpContext = new HttpContext();
2076
- }
2077
- let localVarTransferCache = options && options.transferCache;
2078
- if (localVarTransferCache === undefined) {
2079
- localVarTransferCache = true;
2080
- }
1355
+ const localVarHttpContext = options?.context ?? new HttpContext();
1356
+ const localVarTransferCache = options?.transferCache ?? true;
2081
1357
  let responseType_ = 'json';
2082
1358
  if (localVarHttpHeaderAcceptSelected) {
2083
1359
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2091,20 +1367,21 @@ class PoItemsService {
2091
1367
  }
2092
1368
  }
2093
1369
  let localVarPath = `/poItems/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/summary`;
2094
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1370
+ const { basePath, withCredentials } = this.configuration;
1371
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2095
1372
  context: localVarHttpContext,
2096
1373
  responseType: responseType_,
2097
- withCredentials: this.configuration.withCredentials,
1374
+ ...(withCredentials ? { withCredentials } : {}),
2098
1375
  headers: localVarHeaders,
2099
1376
  observe: observe,
2100
1377
  transferCache: localVarTransferCache,
2101
1378
  reportProgress: reportProgress
2102
1379
  });
2103
1380
  }
2104
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PoItemsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2105
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PoItemsService, providedIn: 'root' });
1381
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PoItemsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1382
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PoItemsService, providedIn: 'root' });
2106
1383
  }
2107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PoItemsService, decorators: [{
1384
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PoItemsService, decorators: [{
2108
1385
  type: Injectable,
2109
1386
  args: [{
2110
1387
  providedIn: 'root'
@@ -2128,91 +1405,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
2128
1405
  * Do not edit the class manually.
2129
1406
  */
2130
1407
  /* tslint:disable:no-unused-variable member-ordering */
2131
- class PurchaseOrdersService {
1408
+ class PurchaseOrdersService extends BaseService {
2132
1409
  httpClient;
2133
- basePath = 'http://localhost';
2134
- defaultHeaders = new HttpHeaders();
2135
- configuration = new Configuration();
2136
- encoder;
2137
1410
  constructor(httpClient, basePath, configuration) {
1411
+ super(basePath, configuration);
2138
1412
  this.httpClient = httpClient;
2139
- if (configuration) {
2140
- this.configuration = configuration;
2141
- }
2142
- if (typeof this.configuration.basePath !== 'string') {
2143
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
2144
- if (firstBasePath != undefined) {
2145
- basePath = firstBasePath;
2146
- }
2147
- if (typeof basePath !== 'string') {
2148
- basePath = this.basePath;
2149
- }
2150
- this.configuration.basePath = basePath;
2151
- }
2152
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
2153
- }
2154
- // @ts-ignore
2155
- addToHttpParams(httpParams, value, key) {
2156
- if (typeof value === "object" && value instanceof Date === false) {
2157
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
2158
- }
2159
- else {
2160
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
2161
- }
2162
- return httpParams;
2163
- }
2164
- addToHttpParamsRecursive(httpParams, value, key) {
2165
- if (value == null) {
2166
- return httpParams;
2167
- }
2168
- if (typeof value === "object") {
2169
- if (Array.isArray(value)) {
2170
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
2171
- }
2172
- else if (value instanceof Date) {
2173
- if (key != null) {
2174
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
2175
- }
2176
- else {
2177
- throw Error("key may not be null if value is Date");
2178
- }
2179
- }
2180
- else {
2181
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
2182
- }
2183
- }
2184
- else if (key != null) {
2185
- httpParams = httpParams.append(key, value);
2186
- }
2187
- else {
2188
- throw Error("key may not be null if value is not object or array");
2189
- }
2190
- return httpParams;
2191
1413
  }
2192
1414
  getPoItemTotals(purchaseOrderId, observe = 'body', reportProgress = false, options) {
2193
1415
  if (purchaseOrderId === null || purchaseOrderId === undefined) {
2194
1416
  throw new Error('Required parameter purchaseOrderId was null or undefined when calling getPoItemTotals.');
2195
1417
  }
2196
1418
  let localVarHeaders = this.defaultHeaders;
2197
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2198
- if (localVarHttpHeaderAcceptSelected === undefined) {
2199
- // to determine the Accept header
2200
- const httpHeaderAccepts = [
2201
- 'application/json'
2202
- ];
2203
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2204
- }
1419
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1420
+ 'application/json'
1421
+ ]);
2205
1422
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2206
1423
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2207
1424
  }
2208
- let localVarHttpContext = options && options.context;
2209
- if (localVarHttpContext === undefined) {
2210
- localVarHttpContext = new HttpContext();
2211
- }
2212
- let localVarTransferCache = options && options.transferCache;
2213
- if (localVarTransferCache === undefined) {
2214
- localVarTransferCache = true;
2215
- }
1425
+ const localVarHttpContext = options?.context ?? new HttpContext();
1426
+ const localVarTransferCache = options?.transferCache ?? true;
2216
1427
  let responseType_ = 'json';
2217
1428
  if (localVarHttpHeaderAcceptSelected) {
2218
1429
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2226,10 +1437,11 @@ class PurchaseOrdersService {
2226
1437
  }
2227
1438
  }
2228
1439
  let localVarPath = `/purchaseOrders/${this.configuration.encodeParam({ name: "purchaseOrderId", value: purchaseOrderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/itemTotals`;
2229
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1440
+ const { basePath, withCredentials } = this.configuration;
1441
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2230
1442
  context: localVarHttpContext,
2231
1443
  responseType: responseType_,
2232
- withCredentials: this.configuration.withCredentials,
1444
+ ...(withCredentials ? { withCredentials } : {}),
2233
1445
  headers: localVarHeaders,
2234
1446
  observe: observe,
2235
1447
  transferCache: localVarTransferCache,
@@ -2241,41 +1453,20 @@ class PurchaseOrdersService {
2241
1453
  throw new Error('Required parameter id was null or undefined when calling getPurchaseOrderProducts.');
2242
1454
  }
2243
1455
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
2244
- if ($skip !== undefined && $skip !== null) {
2245
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
2246
- }
2247
- if ($top !== undefined && $top !== null) {
2248
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
2249
- }
2250
- if ($orderby !== undefined && $orderby !== null) {
2251
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
2252
- }
2253
- if ($filter !== undefined && $filter !== null) {
2254
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
2255
- }
2256
- if ($search !== undefined && $search !== null) {
2257
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
2258
- }
1456
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
1457
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
1458
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
1459
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
1460
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
2259
1461
  let localVarHeaders = this.defaultHeaders;
2260
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2261
- if (localVarHttpHeaderAcceptSelected === undefined) {
2262
- // to determine the Accept header
2263
- const httpHeaderAccepts = [
2264
- 'application/json'
2265
- ];
2266
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2267
- }
1462
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1463
+ 'application/json'
1464
+ ]);
2268
1465
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2269
1466
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2270
1467
  }
2271
- let localVarHttpContext = options && options.context;
2272
- if (localVarHttpContext === undefined) {
2273
- localVarHttpContext = new HttpContext();
2274
- }
2275
- let localVarTransferCache = options && options.transferCache;
2276
- if (localVarTransferCache === undefined) {
2277
- localVarTransferCache = true;
2278
- }
1468
+ const localVarHttpContext = options?.context ?? new HttpContext();
1469
+ const localVarTransferCache = options?.transferCache ?? true;
2279
1470
  let responseType_ = 'json';
2280
1471
  if (localVarHttpHeaderAcceptSelected) {
2281
1472
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2289,11 +1480,12 @@ class PurchaseOrdersService {
2289
1480
  }
2290
1481
  }
2291
1482
  let localVarPath = `/purchaseOrders/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/items`;
2292
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1483
+ const { basePath, withCredentials } = this.configuration;
1484
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2293
1485
  context: localVarHttpContext,
2294
1486
  params: localVarQueryParameters,
2295
1487
  responseType: responseType_,
2296
- withCredentials: this.configuration.withCredentials,
1488
+ ...(withCredentials ? { withCredentials } : {}),
2297
1489
  headers: localVarHeaders,
2298
1490
  observe: observe,
2299
1491
  transferCache: localVarTransferCache,
@@ -2305,25 +1497,14 @@ class PurchaseOrdersService {
2305
1497
  throw new Error('Required parameter id was null or undefined when calling getPurchaseOrderSummary.');
2306
1498
  }
2307
1499
  let localVarHeaders = this.defaultHeaders;
2308
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2309
- if (localVarHttpHeaderAcceptSelected === undefined) {
2310
- // to determine the Accept header
2311
- const httpHeaderAccepts = [
2312
- 'application/json'
2313
- ];
2314
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2315
- }
1500
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1501
+ 'application/json'
1502
+ ]);
2316
1503
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2317
1504
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2318
1505
  }
2319
- let localVarHttpContext = options && options.context;
2320
- if (localVarHttpContext === undefined) {
2321
- localVarHttpContext = new HttpContext();
2322
- }
2323
- let localVarTransferCache = options && options.transferCache;
2324
- if (localVarTransferCache === undefined) {
2325
- localVarTransferCache = true;
2326
- }
1506
+ const localVarHttpContext = options?.context ?? new HttpContext();
1507
+ const localVarTransferCache = options?.transferCache ?? true;
2327
1508
  let responseType_ = 'json';
2328
1509
  if (localVarHttpHeaderAcceptSelected) {
2329
1510
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2337,10 +1518,11 @@ class PurchaseOrdersService {
2337
1518
  }
2338
1519
  }
2339
1520
  let localVarPath = `/purchaseOrders/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/summary`;
2340
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1521
+ const { basePath, withCredentials } = this.configuration;
1522
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2341
1523
  context: localVarHttpContext,
2342
1524
  responseType: responseType_,
2343
- withCredentials: this.configuration.withCredentials,
1525
+ ...(withCredentials ? { withCredentials } : {}),
2344
1526
  headers: localVarHeaders,
2345
1527
  observe: observe,
2346
1528
  transferCache: localVarTransferCache,
@@ -2349,41 +1531,20 @@ class PurchaseOrdersService {
2349
1531
  }
2350
1532
  getPurchaseOrders($skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
2351
1533
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
2352
- if ($skip !== undefined && $skip !== null) {
2353
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
2354
- }
2355
- if ($top !== undefined && $top !== null) {
2356
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
2357
- }
2358
- if ($orderby !== undefined && $orderby !== null) {
2359
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
2360
- }
2361
- if ($filter !== undefined && $filter !== null) {
2362
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
2363
- }
2364
- if ($search !== undefined && $search !== null) {
2365
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
2366
- }
1534
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
1535
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
1536
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
1537
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
1538
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
2367
1539
  let localVarHeaders = this.defaultHeaders;
2368
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2369
- if (localVarHttpHeaderAcceptSelected === undefined) {
2370
- // to determine the Accept header
2371
- const httpHeaderAccepts = [
2372
- 'application/json'
2373
- ];
2374
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2375
- }
1540
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1541
+ 'application/json'
1542
+ ]);
2376
1543
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2377
1544
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2378
1545
  }
2379
- let localVarHttpContext = options && options.context;
2380
- if (localVarHttpContext === undefined) {
2381
- localVarHttpContext = new HttpContext();
2382
- }
2383
- let localVarTransferCache = options && options.transferCache;
2384
- if (localVarTransferCache === undefined) {
2385
- localVarTransferCache = true;
2386
- }
1546
+ const localVarHttpContext = options?.context ?? new HttpContext();
1547
+ const localVarTransferCache = options?.transferCache ?? true;
2387
1548
  let responseType_ = 'json';
2388
1549
  if (localVarHttpHeaderAcceptSelected) {
2389
1550
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2397,11 +1558,12 @@ class PurchaseOrdersService {
2397
1558
  }
2398
1559
  }
2399
1560
  let localVarPath = `/purchaseOrders`;
2400
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1561
+ const { basePath, withCredentials } = this.configuration;
1562
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2401
1563
  context: localVarHttpContext,
2402
1564
  params: localVarQueryParameters,
2403
1565
  responseType: responseType_,
2404
- withCredentials: this.configuration.withCredentials,
1566
+ ...(withCredentials ? { withCredentials } : {}),
2405
1567
  headers: localVarHeaders,
2406
1568
  observe: observe,
2407
1569
  transferCache: localVarTransferCache,
@@ -2410,41 +1572,20 @@ class PurchaseOrdersService {
2410
1572
  }
2411
1573
  getPurchaseOrdersFromIndex($skip, $top, $orderby, $filter, searchTerm, observe = 'body', reportProgress = false, options) {
2412
1574
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
2413
- if ($skip !== undefined && $skip !== null) {
2414
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
2415
- }
2416
- if ($top !== undefined && $top !== null) {
2417
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
2418
- }
2419
- if ($orderby !== undefined && $orderby !== null) {
2420
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
2421
- }
2422
- if ($filter !== undefined && $filter !== null) {
2423
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
2424
- }
2425
- if (searchTerm !== undefined && searchTerm !== null) {
2426
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchTerm, 'searchTerm');
2427
- }
1575
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
1576
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
1577
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
1578
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
1579
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchTerm, 'searchTerm');
2428
1580
  let localVarHeaders = this.defaultHeaders;
2429
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2430
- if (localVarHttpHeaderAcceptSelected === undefined) {
2431
- // to determine the Accept header
2432
- const httpHeaderAccepts = [
2433
- 'application/json'
2434
- ];
2435
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2436
- }
1581
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1582
+ 'application/json'
1583
+ ]);
2437
1584
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2438
1585
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2439
1586
  }
2440
- let localVarHttpContext = options && options.context;
2441
- if (localVarHttpContext === undefined) {
2442
- localVarHttpContext = new HttpContext();
2443
- }
2444
- let localVarTransferCache = options && options.transferCache;
2445
- if (localVarTransferCache === undefined) {
2446
- localVarTransferCache = true;
2447
- }
1587
+ const localVarHttpContext = options?.context ?? new HttpContext();
1588
+ const localVarTransferCache = options?.transferCache ?? true;
2448
1589
  let responseType_ = 'json';
2449
1590
  if (localVarHttpHeaderAcceptSelected) {
2450
1591
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2458,11 +1599,12 @@ class PurchaseOrdersService {
2458
1599
  }
2459
1600
  }
2460
1601
  let localVarPath = `/purchaseOrders/search`;
2461
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1602
+ const { basePath, withCredentials } = this.configuration;
1603
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2462
1604
  context: localVarHttpContext,
2463
1605
  params: localVarQueryParameters,
2464
1606
  responseType: responseType_,
2465
- withCredentials: this.configuration.withCredentials,
1607
+ ...(withCredentials ? { withCredentials } : {}),
2466
1608
  headers: localVarHeaders,
2467
1609
  observe: observe,
2468
1610
  transferCache: localVarTransferCache,
@@ -2471,41 +1613,20 @@ class PurchaseOrdersService {
2471
1613
  }
2472
1614
  getUnbookedPoLineItems($skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
2473
1615
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
2474
- if ($skip !== undefined && $skip !== null) {
2475
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
2476
- }
2477
- if ($top !== undefined && $top !== null) {
2478
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
2479
- }
2480
- if ($orderby !== undefined && $orderby !== null) {
2481
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
2482
- }
2483
- if ($filter !== undefined && $filter !== null) {
2484
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
2485
- }
2486
- if ($search !== undefined && $search !== null) {
2487
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
2488
- }
1616
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
1617
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
1618
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
1619
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
1620
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
2489
1621
  let localVarHeaders = this.defaultHeaders;
2490
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2491
- if (localVarHttpHeaderAcceptSelected === undefined) {
2492
- // to determine the Accept header
2493
- const httpHeaderAccepts = [
2494
- 'application/json'
2495
- ];
2496
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2497
- }
1622
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1623
+ 'application/json'
1624
+ ]);
2498
1625
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2499
1626
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2500
1627
  }
2501
- let localVarHttpContext = options && options.context;
2502
- if (localVarHttpContext === undefined) {
2503
- localVarHttpContext = new HttpContext();
2504
- }
2505
- let localVarTransferCache = options && options.transferCache;
2506
- if (localVarTransferCache === undefined) {
2507
- localVarTransferCache = true;
2508
- }
1628
+ const localVarHttpContext = options?.context ?? new HttpContext();
1629
+ const localVarTransferCache = options?.transferCache ?? true;
2509
1630
  let responseType_ = 'json';
2510
1631
  if (localVarHttpHeaderAcceptSelected) {
2511
1632
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2519,21 +1640,22 @@ class PurchaseOrdersService {
2519
1640
  }
2520
1641
  }
2521
1642
  let localVarPath = `/purchaseOrders/unbookedPoLineItems`;
2522
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1643
+ const { basePath, withCredentials } = this.configuration;
1644
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2523
1645
  context: localVarHttpContext,
2524
1646
  params: localVarQueryParameters,
2525
1647
  responseType: responseType_,
2526
- withCredentials: this.configuration.withCredentials,
1648
+ ...(withCredentials ? { withCredentials } : {}),
2527
1649
  headers: localVarHeaders,
2528
1650
  observe: observe,
2529
1651
  transferCache: localVarTransferCache,
2530
1652
  reportProgress: reportProgress
2531
1653
  });
2532
1654
  }
2533
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PurchaseOrdersService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2534
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PurchaseOrdersService, providedIn: 'root' });
1655
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PurchaseOrdersService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1656
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PurchaseOrdersService, providedIn: 'root' });
2535
1657
  }
2536
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PurchaseOrdersService, decorators: [{
1658
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: PurchaseOrdersService, decorators: [{
2537
1659
  type: Injectable,
2538
1660
  args: [{
2539
1661
  providedIn: 'root'
@@ -2557,88 +1679,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
2557
1679
  * Do not edit the class manually.
2558
1680
  */
2559
1681
  /* tslint:disable:no-unused-variable member-ordering */
2560
- class ReportsService {
1682
+ class ReportsService extends BaseService {
2561
1683
  httpClient;
2562
- basePath = 'http://localhost';
2563
- defaultHeaders = new HttpHeaders();
2564
- configuration = new Configuration();
2565
- encoder;
2566
1684
  constructor(httpClient, basePath, configuration) {
1685
+ super(basePath, configuration);
2567
1686
  this.httpClient = httpClient;
2568
- if (configuration) {
2569
- this.configuration = configuration;
2570
- }
2571
- if (typeof this.configuration.basePath !== 'string') {
2572
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
2573
- if (firstBasePath != undefined) {
2574
- basePath = firstBasePath;
2575
- }
2576
- if (typeof basePath !== 'string') {
2577
- basePath = this.basePath;
2578
- }
2579
- this.configuration.basePath = basePath;
2580
- }
2581
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
2582
- }
2583
- // @ts-ignore
2584
- addToHttpParams(httpParams, value, key) {
2585
- if (typeof value === "object" && value instanceof Date === false) {
2586
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
2587
- }
2588
- else {
2589
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
2590
- }
2591
- return httpParams;
2592
- }
2593
- addToHttpParamsRecursive(httpParams, value, key) {
2594
- if (value == null) {
2595
- return httpParams;
2596
- }
2597
- if (typeof value === "object") {
2598
- if (Array.isArray(value)) {
2599
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
2600
- }
2601
- else if (value instanceof Date) {
2602
- if (key != null) {
2603
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
2604
- }
2605
- else {
2606
- throw Error("key may not be null if value is Date");
2607
- }
2608
- }
2609
- else {
2610
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
2611
- }
2612
- }
2613
- else if (key != null) {
2614
- httpParams = httpParams.append(key, value);
2615
- }
2616
- else {
2617
- throw Error("key may not be null if value is not object or array");
2618
- }
2619
- return httpParams;
2620
1687
  }
2621
1688
  getDcmReports(observe = 'body', reportProgress = false, options) {
2622
1689
  let localVarHeaders = this.defaultHeaders;
2623
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2624
- if (localVarHttpHeaderAcceptSelected === undefined) {
2625
- // to determine the Accept header
2626
- const httpHeaderAccepts = [
2627
- 'application/json'
2628
- ];
2629
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2630
- }
1690
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1691
+ 'application/json'
1692
+ ]);
2631
1693
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2632
1694
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2633
1695
  }
2634
- let localVarHttpContext = options && options.context;
2635
- if (localVarHttpContext === undefined) {
2636
- localVarHttpContext = new HttpContext();
2637
- }
2638
- let localVarTransferCache = options && options.transferCache;
2639
- if (localVarTransferCache === undefined) {
2640
- localVarTransferCache = true;
2641
- }
1696
+ const localVarHttpContext = options?.context ?? new HttpContext();
1697
+ const localVarTransferCache = options?.transferCache ?? true;
2642
1698
  let responseType_ = 'json';
2643
1699
  if (localVarHttpHeaderAcceptSelected) {
2644
1700
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2652,10 +1708,11 @@ class ReportsService {
2652
1708
  }
2653
1709
  }
2654
1710
  let localVarPath = `/reports/dashboard-dcm`;
2655
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1711
+ const { basePath, withCredentials } = this.configuration;
1712
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2656
1713
  context: localVarHttpContext,
2657
1714
  responseType: responseType_,
2658
- withCredentials: this.configuration.withCredentials,
1715
+ ...(withCredentials ? { withCredentials } : {}),
2659
1716
  headers: localVarHeaders,
2660
1717
  observe: observe,
2661
1718
  transferCache: localVarTransferCache,
@@ -2664,25 +1721,14 @@ class ReportsService {
2664
1721
  }
2665
1722
  getSummaryDashboardReports(observe = 'body', reportProgress = false, options) {
2666
1723
  let localVarHeaders = this.defaultHeaders;
2667
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2668
- if (localVarHttpHeaderAcceptSelected === undefined) {
2669
- // to determine the Accept header
2670
- const httpHeaderAccepts = [
2671
- 'application/json'
2672
- ];
2673
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2674
- }
1724
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1725
+ 'application/json'
1726
+ ]);
2675
1727
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2676
1728
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2677
1729
  }
2678
- let localVarHttpContext = options && options.context;
2679
- if (localVarHttpContext === undefined) {
2680
- localVarHttpContext = new HttpContext();
2681
- }
2682
- let localVarTransferCache = options && options.transferCache;
2683
- if (localVarTransferCache === undefined) {
2684
- localVarTransferCache = true;
2685
- }
1730
+ const localVarHttpContext = options?.context ?? new HttpContext();
1731
+ const localVarTransferCache = options?.transferCache ?? true;
2686
1732
  let responseType_ = 'json';
2687
1733
  if (localVarHttpHeaderAcceptSelected) {
2688
1734
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2696,20 +1742,21 @@ class ReportsService {
2696
1742
  }
2697
1743
  }
2698
1744
  let localVarPath = `/reports/summary-dashboard`;
2699
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1745
+ const { basePath, withCredentials } = this.configuration;
1746
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2700
1747
  context: localVarHttpContext,
2701
1748
  responseType: responseType_,
2702
- withCredentials: this.configuration.withCredentials,
1749
+ ...(withCredentials ? { withCredentials } : {}),
2703
1750
  headers: localVarHeaders,
2704
1751
  observe: observe,
2705
1752
  transferCache: localVarTransferCache,
2706
1753
  reportProgress: reportProgress
2707
1754
  });
2708
1755
  }
2709
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ReportsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2710
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ReportsService, providedIn: 'root' });
1756
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ReportsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1757
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ReportsService, providedIn: 'root' });
2711
1758
  }
2712
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ReportsService, decorators: [{
1759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ReportsService, decorators: [{
2713
1760
  type: Injectable,
2714
1761
  args: [{
2715
1762
  providedIn: 'root'
@@ -2733,66 +1780,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
2733
1780
  * Do not edit the class manually.
2734
1781
  */
2735
1782
  /* tslint:disable:no-unused-variable member-ordering */
2736
- class SettingsService {
1783
+ class SettingsService extends BaseService {
2737
1784
  httpClient;
2738
- basePath = 'http://localhost';
2739
- defaultHeaders = new HttpHeaders();
2740
- configuration = new Configuration();
2741
- encoder;
2742
1785
  constructor(httpClient, basePath, configuration) {
1786
+ super(basePath, configuration);
2743
1787
  this.httpClient = httpClient;
2744
- if (configuration) {
2745
- this.configuration = configuration;
2746
- }
2747
- if (typeof this.configuration.basePath !== 'string') {
2748
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
2749
- if (firstBasePath != undefined) {
2750
- basePath = firstBasePath;
2751
- }
2752
- if (typeof basePath !== 'string') {
2753
- basePath = this.basePath;
2754
- }
2755
- this.configuration.basePath = basePath;
2756
- }
2757
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
2758
- }
2759
- // @ts-ignore
2760
- addToHttpParams(httpParams, value, key) {
2761
- if (typeof value === "object" && value instanceof Date === false) {
2762
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
2763
- }
2764
- else {
2765
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
2766
- }
2767
- return httpParams;
2768
- }
2769
- addToHttpParamsRecursive(httpParams, value, key) {
2770
- if (value == null) {
2771
- return httpParams;
2772
- }
2773
- if (typeof value === "object") {
2774
- if (Array.isArray(value)) {
2775
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
2776
- }
2777
- else if (value instanceof Date) {
2778
- if (key != null) {
2779
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
2780
- }
2781
- else {
2782
- throw Error("key may not be null if value is Date");
2783
- }
2784
- }
2785
- else {
2786
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
2787
- }
2788
- }
2789
- else if (key != null) {
2790
- httpParams = httpParams.append(key, value);
2791
- }
2792
- else {
2793
- throw Error("key may not be null if value is not object or array");
2794
- }
2795
- return httpParams;
2796
1788
  }
2797
1789
  deleteSettingByGroupAndKey(key, group, observe = 'body', reportProgress = false, options) {
2798
1790
  if (key === null || key === undefined) {
@@ -2802,23 +1794,12 @@ class SettingsService {
2802
1794
  throw new Error('Required parameter group was null or undefined when calling deleteSettingByGroupAndKey.');
2803
1795
  }
2804
1796
  let localVarHeaders = this.defaultHeaders;
2805
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2806
- if (localVarHttpHeaderAcceptSelected === undefined) {
2807
- // to determine the Accept header
2808
- const httpHeaderAccepts = [];
2809
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2810
- }
1797
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]);
2811
1798
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2812
1799
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2813
1800
  }
2814
- let localVarHttpContext = options && options.context;
2815
- if (localVarHttpContext === undefined) {
2816
- localVarHttpContext = new HttpContext();
2817
- }
2818
- let localVarTransferCache = options && options.transferCache;
2819
- if (localVarTransferCache === undefined) {
2820
- localVarTransferCache = true;
2821
- }
1801
+ const localVarHttpContext = options?.context ?? new HttpContext();
1802
+ const localVarTransferCache = options?.transferCache ?? true;
2822
1803
  let responseType_ = 'json';
2823
1804
  if (localVarHttpHeaderAcceptSelected) {
2824
1805
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2832,10 +1813,11 @@ class SettingsService {
2832
1813
  }
2833
1814
  }
2834
1815
  let localVarPath = `/users/me/settings/groups/${this.configuration.encodeParam({ name: "group", value: group, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/${this.configuration.encodeParam({ name: "key", value: key, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
2835
- return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
1816
+ const { basePath, withCredentials } = this.configuration;
1817
+ return this.httpClient.request('delete', `${basePath}${localVarPath}`, {
2836
1818
  context: localVarHttpContext,
2837
1819
  responseType: responseType_,
2838
- withCredentials: this.configuration.withCredentials,
1820
+ ...(withCredentials ? { withCredentials } : {}),
2839
1821
  headers: localVarHeaders,
2840
1822
  observe: observe,
2841
1823
  transferCache: localVarTransferCache,
@@ -2847,23 +1829,12 @@ class SettingsService {
2847
1829
  throw new Error('Required parameter key was null or undefined when calling deleteSettingByKey.');
2848
1830
  }
2849
1831
  let localVarHeaders = this.defaultHeaders;
2850
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2851
- if (localVarHttpHeaderAcceptSelected === undefined) {
2852
- // to determine the Accept header
2853
- const httpHeaderAccepts = [];
2854
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2855
- }
1832
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]);
2856
1833
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2857
- localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2858
- }
2859
- let localVarHttpContext = options && options.context;
2860
- if (localVarHttpContext === undefined) {
2861
- localVarHttpContext = new HttpContext();
2862
- }
2863
- let localVarTransferCache = options && options.transferCache;
2864
- if (localVarTransferCache === undefined) {
2865
- localVarTransferCache = true;
1834
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2866
1835
  }
1836
+ const localVarHttpContext = options?.context ?? new HttpContext();
1837
+ const localVarTransferCache = options?.transferCache ?? true;
2867
1838
  let responseType_ = 'json';
2868
1839
  if (localVarHttpHeaderAcceptSelected) {
2869
1840
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2877,10 +1848,11 @@ class SettingsService {
2877
1848
  }
2878
1849
  }
2879
1850
  let localVarPath = `/users/me/settings/${this.configuration.encodeParam({ name: "key", value: key, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
2880
- return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, {
1851
+ const { basePath, withCredentials } = this.configuration;
1852
+ return this.httpClient.request('delete', `${basePath}${localVarPath}`, {
2881
1853
  context: localVarHttpContext,
2882
1854
  responseType: responseType_,
2883
- withCredentials: this.configuration.withCredentials,
1855
+ ...(withCredentials ? { withCredentials } : {}),
2884
1856
  headers: localVarHeaders,
2885
1857
  observe: observe,
2886
1858
  transferCache: localVarTransferCache,
@@ -2895,25 +1867,14 @@ class SettingsService {
2895
1867
  throw new Error('Required parameter group was null or undefined when calling getSettingByGroupAndKey.');
2896
1868
  }
2897
1869
  let localVarHeaders = this.defaultHeaders;
2898
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2899
- if (localVarHttpHeaderAcceptSelected === undefined) {
2900
- // to determine the Accept header
2901
- const httpHeaderAccepts = [
2902
- 'application/json'
2903
- ];
2904
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2905
- }
1870
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1871
+ 'application/json'
1872
+ ]);
2906
1873
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2907
1874
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2908
1875
  }
2909
- let localVarHttpContext = options && options.context;
2910
- if (localVarHttpContext === undefined) {
2911
- localVarHttpContext = new HttpContext();
2912
- }
2913
- let localVarTransferCache = options && options.transferCache;
2914
- if (localVarTransferCache === undefined) {
2915
- localVarTransferCache = true;
2916
- }
1876
+ const localVarHttpContext = options?.context ?? new HttpContext();
1877
+ const localVarTransferCache = options?.transferCache ?? true;
2917
1878
  let responseType_ = 'json';
2918
1879
  if (localVarHttpHeaderAcceptSelected) {
2919
1880
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2927,10 +1888,11 @@ class SettingsService {
2927
1888
  }
2928
1889
  }
2929
1890
  let localVarPath = `/users/me/settings/groups/${this.configuration.encodeParam({ name: "group", value: group, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/${this.configuration.encodeParam({ name: "key", value: key, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
2930
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1891
+ const { basePath, withCredentials } = this.configuration;
1892
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2931
1893
  context: localVarHttpContext,
2932
1894
  responseType: responseType_,
2933
- withCredentials: this.configuration.withCredentials,
1895
+ ...(withCredentials ? { withCredentials } : {}),
2934
1896
  headers: localVarHeaders,
2935
1897
  observe: observe,
2936
1898
  transferCache: localVarTransferCache,
@@ -2942,25 +1904,14 @@ class SettingsService {
2942
1904
  throw new Error('Required parameter key was null or undefined when calling getSettingByKey.');
2943
1905
  }
2944
1906
  let localVarHeaders = this.defaultHeaders;
2945
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2946
- if (localVarHttpHeaderAcceptSelected === undefined) {
2947
- // to determine the Accept header
2948
- const httpHeaderAccepts = [
2949
- 'application/json'
2950
- ];
2951
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2952
- }
1907
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1908
+ 'application/json'
1909
+ ]);
2953
1910
  if (localVarHttpHeaderAcceptSelected !== undefined) {
2954
1911
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
2955
1912
  }
2956
- let localVarHttpContext = options && options.context;
2957
- if (localVarHttpContext === undefined) {
2958
- localVarHttpContext = new HttpContext();
2959
- }
2960
- let localVarTransferCache = options && options.transferCache;
2961
- if (localVarTransferCache === undefined) {
2962
- localVarTransferCache = true;
2963
- }
1913
+ const localVarHttpContext = options?.context ?? new HttpContext();
1914
+ const localVarTransferCache = options?.transferCache ?? true;
2964
1915
  let responseType_ = 'json';
2965
1916
  if (localVarHttpHeaderAcceptSelected) {
2966
1917
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -2974,10 +1925,11 @@ class SettingsService {
2974
1925
  }
2975
1926
  }
2976
1927
  let localVarPath = `/users/me/settings/${this.configuration.encodeParam({ name: "key", value: key, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
2977
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1928
+ const { basePath, withCredentials } = this.configuration;
1929
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
2978
1930
  context: localVarHttpContext,
2979
1931
  responseType: responseType_,
2980
- withCredentials: this.configuration.withCredentials,
1932
+ ...(withCredentials ? { withCredentials } : {}),
2981
1933
  headers: localVarHeaders,
2982
1934
  observe: observe,
2983
1935
  transferCache: localVarTransferCache,
@@ -2989,25 +1941,14 @@ class SettingsService {
2989
1941
  throw new Error('Required parameter group was null or undefined when calling getSettingsByGroup.');
2990
1942
  }
2991
1943
  let localVarHeaders = this.defaultHeaders;
2992
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
2993
- if (localVarHttpHeaderAcceptSelected === undefined) {
2994
- // to determine the Accept header
2995
- const httpHeaderAccepts = [
2996
- 'application/json'
2997
- ];
2998
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
2999
- }
1944
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1945
+ 'application/json'
1946
+ ]);
3000
1947
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3001
1948
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3002
1949
  }
3003
- let localVarHttpContext = options && options.context;
3004
- if (localVarHttpContext === undefined) {
3005
- localVarHttpContext = new HttpContext();
3006
- }
3007
- let localVarTransferCache = options && options.transferCache;
3008
- if (localVarTransferCache === undefined) {
3009
- localVarTransferCache = true;
3010
- }
1950
+ const localVarHttpContext = options?.context ?? new HttpContext();
1951
+ const localVarTransferCache = options?.transferCache ?? true;
3011
1952
  let responseType_ = 'json';
3012
1953
  if (localVarHttpHeaderAcceptSelected) {
3013
1954
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3021,10 +1962,11 @@ class SettingsService {
3021
1962
  }
3022
1963
  }
3023
1964
  let localVarPath = `/users/me/settings/groups/${this.configuration.encodeParam({ name: "group", value: group, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
3024
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
1965
+ const { basePath, withCredentials } = this.configuration;
1966
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3025
1967
  context: localVarHttpContext,
3026
1968
  responseType: responseType_,
3027
- withCredentials: this.configuration.withCredentials,
1969
+ ...(withCredentials ? { withCredentials } : {}),
3028
1970
  headers: localVarHeaders,
3029
1971
  observe: observe,
3030
1972
  transferCache: localVarTransferCache,
@@ -3039,25 +1981,14 @@ class SettingsService {
3039
1981
  throw new Error('Required parameter settingValue was null or undefined when calling setSettingByKey.');
3040
1982
  }
3041
1983
  let localVarHeaders = this.defaultHeaders;
3042
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3043
- if (localVarHttpHeaderAcceptSelected === undefined) {
3044
- // to determine the Accept header
3045
- const httpHeaderAccepts = [
3046
- 'application/json'
3047
- ];
3048
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3049
- }
1984
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1985
+ 'application/json'
1986
+ ]);
3050
1987
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3051
1988
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3052
1989
  }
3053
- let localVarHttpContext = options && options.context;
3054
- if (localVarHttpContext === undefined) {
3055
- localVarHttpContext = new HttpContext();
3056
- }
3057
- let localVarTransferCache = options && options.transferCache;
3058
- if (localVarTransferCache === undefined) {
3059
- localVarTransferCache = true;
3060
- }
1990
+ const localVarHttpContext = options?.context ?? new HttpContext();
1991
+ const localVarTransferCache = options?.transferCache ?? true;
3061
1992
  // to determine the Content-Type header
3062
1993
  const consumes = [
3063
1994
  'application/json'
@@ -3079,21 +2010,22 @@ class SettingsService {
3079
2010
  }
3080
2011
  }
3081
2012
  let localVarPath = `/users/me/settings/${this.configuration.encodeParam({ name: "key", value: key, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
3082
- return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
2013
+ const { basePath, withCredentials } = this.configuration;
2014
+ return this.httpClient.request('put', `${basePath}${localVarPath}`, {
3083
2015
  context: localVarHttpContext,
3084
2016
  body: settingValue,
3085
2017
  responseType: responseType_,
3086
- withCredentials: this.configuration.withCredentials,
2018
+ ...(withCredentials ? { withCredentials } : {}),
3087
2019
  headers: localVarHeaders,
3088
2020
  observe: observe,
3089
2021
  transferCache: localVarTransferCache,
3090
2022
  reportProgress: reportProgress
3091
2023
  });
3092
2024
  }
3093
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SettingsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
3094
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SettingsService, providedIn: 'root' });
2025
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SettingsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2026
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SettingsService, providedIn: 'root' });
3095
2027
  }
3096
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SettingsService, decorators: [{
2028
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SettingsService, decorators: [{
3097
2029
  type: Injectable,
3098
2030
  args: [{
3099
2031
  providedIn: 'root'
@@ -3117,104 +2049,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
3117
2049
  * Do not edit the class manually.
3118
2050
  */
3119
2051
  /* tslint:disable:no-unused-variable member-ordering */
3120
- class ShipmentsService {
2052
+ class ShipmentsService extends BaseService {
3121
2053
  httpClient;
3122
- basePath = 'http://localhost';
3123
- defaultHeaders = new HttpHeaders();
3124
- configuration = new Configuration();
3125
- encoder;
3126
2054
  constructor(httpClient, basePath, configuration) {
2055
+ super(basePath, configuration);
3127
2056
  this.httpClient = httpClient;
3128
- if (configuration) {
3129
- this.configuration = configuration;
3130
- }
3131
- if (typeof this.configuration.basePath !== 'string') {
3132
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
3133
- if (firstBasePath != undefined) {
3134
- basePath = firstBasePath;
3135
- }
3136
- if (typeof basePath !== 'string') {
3137
- basePath = this.basePath;
3138
- }
3139
- this.configuration.basePath = basePath;
3140
- }
3141
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
3142
- }
3143
- // @ts-ignore
3144
- addToHttpParams(httpParams, value, key) {
3145
- if (typeof value === "object" && value instanceof Date === false) {
3146
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
3147
- }
3148
- else {
3149
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
3150
- }
3151
- return httpParams;
3152
- }
3153
- addToHttpParamsRecursive(httpParams, value, key) {
3154
- if (value == null) {
3155
- return httpParams;
3156
- }
3157
- if (typeof value === "object") {
3158
- if (Array.isArray(value)) {
3159
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
3160
- }
3161
- else if (value instanceof Date) {
3162
- if (key != null) {
3163
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
3164
- }
3165
- else {
3166
- throw Error("key may not be null if value is Date");
3167
- }
3168
- }
3169
- else {
3170
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
3171
- }
3172
- }
3173
- else if (key != null) {
3174
- httpParams = httpParams.append(key, value);
3175
- }
3176
- else {
3177
- throw Error("key may not be null if value is not object or array");
3178
- }
3179
- return httpParams;
3180
2057
  }
3181
2058
  getShipmentApprovals($skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
3182
2059
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
3183
- if ($skip !== undefined && $skip !== null) {
3184
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
3185
- }
3186
- if ($top !== undefined && $top !== null) {
3187
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
3188
- }
3189
- if ($orderby !== undefined && $orderby !== null) {
3190
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
3191
- }
3192
- if ($filter !== undefined && $filter !== null) {
3193
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
3194
- }
3195
- if ($search !== undefined && $search !== null) {
3196
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
3197
- }
2060
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
2061
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
2062
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
2063
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
2064
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
3198
2065
  let localVarHeaders = this.defaultHeaders;
3199
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3200
- if (localVarHttpHeaderAcceptSelected === undefined) {
3201
- // to determine the Accept header
3202
- const httpHeaderAccepts = [
3203
- 'application/json'
3204
- ];
3205
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3206
- }
2066
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2067
+ 'application/json'
2068
+ ]);
3207
2069
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3208
2070
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3209
2071
  }
3210
- let localVarHttpContext = options && options.context;
3211
- if (localVarHttpContext === undefined) {
3212
- localVarHttpContext = new HttpContext();
3213
- }
3214
- let localVarTransferCache = options && options.transferCache;
3215
- if (localVarTransferCache === undefined) {
3216
- localVarTransferCache = true;
3217
- }
2072
+ const localVarHttpContext = options?.context ?? new HttpContext();
2073
+ const localVarTransferCache = options?.transferCache ?? true;
3218
2074
  let responseType_ = 'json';
3219
2075
  if (localVarHttpHeaderAcceptSelected) {
3220
2076
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3228,11 +2084,12 @@ class ShipmentsService {
3228
2084
  }
3229
2085
  }
3230
2086
  let localVarPath = `/shipments/approvals`;
3231
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2087
+ const { basePath, withCredentials } = this.configuration;
2088
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3232
2089
  context: localVarHttpContext,
3233
2090
  params: localVarQueryParameters,
3234
2091
  responseType: responseType_,
3235
- withCredentials: this.configuration.withCredentials,
2092
+ ...(withCredentials ? { withCredentials } : {}),
3236
2093
  headers: localVarHeaders,
3237
2094
  observe: observe,
3238
2095
  transferCache: localVarTransferCache,
@@ -3241,41 +2098,20 @@ class ShipmentsService {
3241
2098
  }
3242
2099
  getShipmentApprovalsFromIndex($skip, $top, $orderby, $filter, searchTerm, observe = 'body', reportProgress = false, options) {
3243
2100
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
3244
- if ($skip !== undefined && $skip !== null) {
3245
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
3246
- }
3247
- if ($top !== undefined && $top !== null) {
3248
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
3249
- }
3250
- if ($orderby !== undefined && $orderby !== null) {
3251
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
3252
- }
3253
- if ($filter !== undefined && $filter !== null) {
3254
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
3255
- }
3256
- if (searchTerm !== undefined && searchTerm !== null) {
3257
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchTerm, 'searchTerm');
3258
- }
2101
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
2102
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
2103
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
2104
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
2105
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchTerm, 'searchTerm');
3259
2106
  let localVarHeaders = this.defaultHeaders;
3260
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3261
- if (localVarHttpHeaderAcceptSelected === undefined) {
3262
- // to determine the Accept header
3263
- const httpHeaderAccepts = [
3264
- 'application/json'
3265
- ];
3266
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3267
- }
2107
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2108
+ 'application/json'
2109
+ ]);
3268
2110
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3269
2111
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3270
2112
  }
3271
- let localVarHttpContext = options && options.context;
3272
- if (localVarHttpContext === undefined) {
3273
- localVarHttpContext = new HttpContext();
3274
- }
3275
- let localVarTransferCache = options && options.transferCache;
3276
- if (localVarTransferCache === undefined) {
3277
- localVarTransferCache = true;
3278
- }
2113
+ const localVarHttpContext = options?.context ?? new HttpContext();
2114
+ const localVarTransferCache = options?.transferCache ?? true;
3279
2115
  let responseType_ = 'json';
3280
2116
  if (localVarHttpHeaderAcceptSelected) {
3281
2117
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3289,11 +2125,12 @@ class ShipmentsService {
3289
2125
  }
3290
2126
  }
3291
2127
  let localVarPath = `/shipments/approvals/search`;
3292
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2128
+ const { basePath, withCredentials } = this.configuration;
2129
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3293
2130
  context: localVarHttpContext,
3294
2131
  params: localVarQueryParameters,
3295
2132
  responseType: responseType_,
3296
- withCredentials: this.configuration.withCredentials,
2133
+ ...(withCredentials ? { withCredentials } : {}),
3297
2134
  headers: localVarHeaders,
3298
2135
  observe: observe,
3299
2136
  transferCache: localVarTransferCache,
@@ -3305,25 +2142,14 @@ class ShipmentsService {
3305
2142
  throw new Error('Required parameter id was null or undefined when calling getShipmentItems.');
3306
2143
  }
3307
2144
  let localVarHeaders = this.defaultHeaders;
3308
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3309
- if (localVarHttpHeaderAcceptSelected === undefined) {
3310
- // to determine the Accept header
3311
- const httpHeaderAccepts = [
3312
- 'application/json'
3313
- ];
3314
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3315
- }
2145
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2146
+ 'application/json'
2147
+ ]);
3316
2148
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3317
2149
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3318
2150
  }
3319
- let localVarHttpContext = options && options.context;
3320
- if (localVarHttpContext === undefined) {
3321
- localVarHttpContext = new HttpContext();
3322
- }
3323
- let localVarTransferCache = options && options.transferCache;
3324
- if (localVarTransferCache === undefined) {
3325
- localVarTransferCache = true;
3326
- }
2151
+ const localVarHttpContext = options?.context ?? new HttpContext();
2152
+ const localVarTransferCache = options?.transferCache ?? true;
3327
2153
  let responseType_ = 'json';
3328
2154
  if (localVarHttpHeaderAcceptSelected) {
3329
2155
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3337,10 +2163,11 @@ class ShipmentsService {
3337
2163
  }
3338
2164
  }
3339
2165
  let localVarPath = `/shipments/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/items`;
3340
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2166
+ const { basePath, withCredentials } = this.configuration;
2167
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3341
2168
  context: localVarHttpContext,
3342
2169
  responseType: responseType_,
3343
- withCredentials: this.configuration.withCredentials,
2170
+ ...(withCredentials ? { withCredentials } : {}),
3344
2171
  headers: localVarHeaders,
3345
2172
  observe: observe,
3346
2173
  transferCache: localVarTransferCache,
@@ -3352,25 +2179,14 @@ class ShipmentsService {
3352
2179
  throw new Error('Required parameter shipmentId was null or undefined when calling getShipmentProductTotals.');
3353
2180
  }
3354
2181
  let localVarHeaders = this.defaultHeaders;
3355
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3356
- if (localVarHttpHeaderAcceptSelected === undefined) {
3357
- // to determine the Accept header
3358
- const httpHeaderAccepts = [
3359
- 'application/json'
3360
- ];
3361
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3362
- }
2182
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2183
+ 'application/json'
2184
+ ]);
3363
2185
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3364
2186
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3365
2187
  }
3366
- let localVarHttpContext = options && options.context;
3367
- if (localVarHttpContext === undefined) {
3368
- localVarHttpContext = new HttpContext();
3369
- }
3370
- let localVarTransferCache = options && options.transferCache;
3371
- if (localVarTransferCache === undefined) {
3372
- localVarTransferCache = true;
3373
- }
2188
+ const localVarHttpContext = options?.context ?? new HttpContext();
2189
+ const localVarTransferCache = options?.transferCache ?? true;
3374
2190
  let responseType_ = 'json';
3375
2191
  if (localVarHttpHeaderAcceptSelected) {
3376
2192
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3384,10 +2200,11 @@ class ShipmentsService {
3384
2200
  }
3385
2201
  }
3386
2202
  let localVarPath = `/shipments/${this.configuration.encodeParam({ name: "shipmentId", value: shipmentId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/productTotals`;
3387
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2203
+ const { basePath, withCredentials } = this.configuration;
2204
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3388
2205
  context: localVarHttpContext,
3389
2206
  responseType: responseType_,
3390
- withCredentials: this.configuration.withCredentials,
2207
+ ...(withCredentials ? { withCredentials } : {}),
3391
2208
  headers: localVarHeaders,
3392
2209
  observe: observe,
3393
2210
  transferCache: localVarTransferCache,
@@ -3399,41 +2216,20 @@ class ShipmentsService {
3399
2216
  throw new Error('Required parameter id was null or undefined when calling getShipmentProducts.');
3400
2217
  }
3401
2218
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
3402
- if ($skip !== undefined && $skip !== null) {
3403
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
3404
- }
3405
- if ($top !== undefined && $top !== null) {
3406
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
3407
- }
3408
- if ($orderby !== undefined && $orderby !== null) {
3409
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
3410
- }
3411
- if ($filter !== undefined && $filter !== null) {
3412
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
3413
- }
3414
- if ($search !== undefined && $search !== null) {
3415
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
3416
- }
2219
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
2220
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
2221
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
2222
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
2223
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
3417
2224
  let localVarHeaders = this.defaultHeaders;
3418
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3419
- if (localVarHttpHeaderAcceptSelected === undefined) {
3420
- // to determine the Accept header
3421
- const httpHeaderAccepts = [
3422
- 'application/json'
3423
- ];
3424
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3425
- }
2225
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2226
+ 'application/json'
2227
+ ]);
3426
2228
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3427
2229
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3428
2230
  }
3429
- let localVarHttpContext = options && options.context;
3430
- if (localVarHttpContext === undefined) {
3431
- localVarHttpContext = new HttpContext();
3432
- }
3433
- let localVarTransferCache = options && options.transferCache;
3434
- if (localVarTransferCache === undefined) {
3435
- localVarTransferCache = true;
3436
- }
2231
+ const localVarHttpContext = options?.context ?? new HttpContext();
2232
+ const localVarTransferCache = options?.transferCache ?? true;
3437
2233
  let responseType_ = 'json';
3438
2234
  if (localVarHttpHeaderAcceptSelected) {
3439
2235
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3447,11 +2243,12 @@ class ShipmentsService {
3447
2243
  }
3448
2244
  }
3449
2245
  let localVarPath = `/shipments/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/products`;
3450
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2246
+ const { basePath, withCredentials } = this.configuration;
2247
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3451
2248
  context: localVarHttpContext,
3452
2249
  params: localVarQueryParameters,
3453
2250
  responseType: responseType_,
3454
- withCredentials: this.configuration.withCredentials,
2251
+ ...(withCredentials ? { withCredentials } : {}),
3455
2252
  headers: localVarHeaders,
3456
2253
  observe: observe,
3457
2254
  transferCache: localVarTransferCache,
@@ -3466,25 +2263,14 @@ class ShipmentsService {
3466
2263
  throw new Error('Required parameter type was null or undefined when calling getShipmentRouting.');
3467
2264
  }
3468
2265
  let localVarHeaders = this.defaultHeaders;
3469
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3470
- if (localVarHttpHeaderAcceptSelected === undefined) {
3471
- // to determine the Accept header
3472
- const httpHeaderAccepts = [
3473
- 'application/json'
3474
- ];
3475
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3476
- }
2266
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2267
+ 'application/json'
2268
+ ]);
3477
2269
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3478
2270
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3479
2271
  }
3480
- let localVarHttpContext = options && options.context;
3481
- if (localVarHttpContext === undefined) {
3482
- localVarHttpContext = new HttpContext();
3483
- }
3484
- let localVarTransferCache = options && options.transferCache;
3485
- if (localVarTransferCache === undefined) {
3486
- localVarTransferCache = true;
3487
- }
2272
+ const localVarHttpContext = options?.context ?? new HttpContext();
2273
+ const localVarTransferCache = options?.transferCache ?? true;
3488
2274
  let responseType_ = 'json';
3489
2275
  if (localVarHttpHeaderAcceptSelected) {
3490
2276
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3498,10 +2284,11 @@ class ShipmentsService {
3498
2284
  }
3499
2285
  }
3500
2286
  let localVarPath = `/shipments/${this.configuration.encodeParam({ name: "shipmentId", value: shipmentId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/${this.configuration.encodeParam({ name: "type", value: type, in: "path", style: "simple", explode: false, dataType: "TransportMode", dataFormat: undefined })}/routing`;
3501
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2287
+ const { basePath, withCredentials } = this.configuration;
2288
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3502
2289
  context: localVarHttpContext,
3503
2290
  responseType: responseType_,
3504
- withCredentials: this.configuration.withCredentials,
2291
+ ...(withCredentials ? { withCredentials } : {}),
3505
2292
  headers: localVarHeaders,
3506
2293
  observe: observe,
3507
2294
  transferCache: localVarTransferCache,
@@ -3513,25 +2300,14 @@ class ShipmentsService {
3513
2300
  throw new Error('Required parameter id was null or undefined when calling getShipmentSummary.');
3514
2301
  }
3515
2302
  let localVarHeaders = this.defaultHeaders;
3516
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3517
- if (localVarHttpHeaderAcceptSelected === undefined) {
3518
- // to determine the Accept header
3519
- const httpHeaderAccepts = [
3520
- 'application/json'
3521
- ];
3522
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3523
- }
2303
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2304
+ 'application/json'
2305
+ ]);
3524
2306
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3525
2307
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3526
2308
  }
3527
- let localVarHttpContext = options && options.context;
3528
- if (localVarHttpContext === undefined) {
3529
- localVarHttpContext = new HttpContext();
3530
- }
3531
- let localVarTransferCache = options && options.transferCache;
3532
- if (localVarTransferCache === undefined) {
3533
- localVarTransferCache = true;
3534
- }
2309
+ const localVarHttpContext = options?.context ?? new HttpContext();
2310
+ const localVarTransferCache = options?.transferCache ?? true;
3535
2311
  let responseType_ = 'json';
3536
2312
  if (localVarHttpHeaderAcceptSelected) {
3537
2313
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3545,10 +2321,11 @@ class ShipmentsService {
3545
2321
  }
3546
2322
  }
3547
2323
  let localVarPath = `/shipments/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/summary`;
3548
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2324
+ const { basePath, withCredentials } = this.configuration;
2325
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3549
2326
  context: localVarHttpContext,
3550
2327
  responseType: responseType_,
3551
- withCredentials: this.configuration.withCredentials,
2328
+ ...(withCredentials ? { withCredentials } : {}),
3552
2329
  headers: localVarHeaders,
3553
2330
  observe: observe,
3554
2331
  transferCache: localVarTransferCache,
@@ -3560,25 +2337,14 @@ class ShipmentsService {
3560
2337
  throw new Error('Required parameter id was null or undefined when calling getShipmentTimeline.');
3561
2338
  }
3562
2339
  let localVarHeaders = this.defaultHeaders;
3563
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3564
- if (localVarHttpHeaderAcceptSelected === undefined) {
3565
- // to determine the Accept header
3566
- const httpHeaderAccepts = [
3567
- 'application/json'
3568
- ];
3569
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3570
- }
2340
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2341
+ 'application/json'
2342
+ ]);
3571
2343
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3572
2344
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3573
2345
  }
3574
- let localVarHttpContext = options && options.context;
3575
- if (localVarHttpContext === undefined) {
3576
- localVarHttpContext = new HttpContext();
3577
- }
3578
- let localVarTransferCache = options && options.transferCache;
3579
- if (localVarTransferCache === undefined) {
3580
- localVarTransferCache = true;
3581
- }
2346
+ const localVarHttpContext = options?.context ?? new HttpContext();
2347
+ const localVarTransferCache = options?.transferCache ?? true;
3582
2348
  let responseType_ = 'json';
3583
2349
  if (localVarHttpHeaderAcceptSelected) {
3584
2350
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3592,10 +2358,11 @@ class ShipmentsService {
3592
2358
  }
3593
2359
  }
3594
2360
  let localVarPath = `/shipments/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/timeline`;
3595
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2361
+ const { basePath, withCredentials } = this.configuration;
2362
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3596
2363
  context: localVarHttpContext,
3597
2364
  responseType: responseType_,
3598
- withCredentials: this.configuration.withCredentials,
2365
+ ...(withCredentials ? { withCredentials } : {}),
3599
2366
  headers: localVarHeaders,
3600
2367
  observe: observe,
3601
2368
  transferCache: localVarTransferCache,
@@ -3604,41 +2371,20 @@ class ShipmentsService {
3604
2371
  }
3605
2372
  getShipments($skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
3606
2373
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
3607
- if ($skip !== undefined && $skip !== null) {
3608
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
3609
- }
3610
- if ($top !== undefined && $top !== null) {
3611
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
3612
- }
3613
- if ($orderby !== undefined && $orderby !== null) {
3614
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
3615
- }
3616
- if ($filter !== undefined && $filter !== null) {
3617
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
3618
- }
3619
- if ($search !== undefined && $search !== null) {
3620
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
3621
- }
2374
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
2375
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
2376
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
2377
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
2378
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
3622
2379
  let localVarHeaders = this.defaultHeaders;
3623
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3624
- if (localVarHttpHeaderAcceptSelected === undefined) {
3625
- // to determine the Accept header
3626
- const httpHeaderAccepts = [
3627
- 'application/json'
3628
- ];
3629
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3630
- }
2380
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2381
+ 'application/json'
2382
+ ]);
3631
2383
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3632
2384
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3633
2385
  }
3634
- let localVarHttpContext = options && options.context;
3635
- if (localVarHttpContext === undefined) {
3636
- localVarHttpContext = new HttpContext();
3637
- }
3638
- let localVarTransferCache = options && options.transferCache;
3639
- if (localVarTransferCache === undefined) {
3640
- localVarTransferCache = true;
3641
- }
2386
+ const localVarHttpContext = options?.context ?? new HttpContext();
2387
+ const localVarTransferCache = options?.transferCache ?? true;
3642
2388
  let responseType_ = 'json';
3643
2389
  if (localVarHttpHeaderAcceptSelected) {
3644
2390
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3652,11 +2398,12 @@ class ShipmentsService {
3652
2398
  }
3653
2399
  }
3654
2400
  let localVarPath = `/shipments/list`;
3655
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2401
+ const { basePath, withCredentials } = this.configuration;
2402
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3656
2403
  context: localVarHttpContext,
3657
2404
  params: localVarQueryParameters,
3658
2405
  responseType: responseType_,
3659
- withCredentials: this.configuration.withCredentials,
2406
+ ...(withCredentials ? { withCredentials } : {}),
3660
2407
  headers: localVarHeaders,
3661
2408
  observe: observe,
3662
2409
  transferCache: localVarTransferCache,
@@ -3665,25 +2412,14 @@ class ShipmentsService {
3665
2412
  }
3666
2413
  getShipmentsApprovalCount(observe = 'body', reportProgress = false, options) {
3667
2414
  let localVarHeaders = this.defaultHeaders;
3668
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3669
- if (localVarHttpHeaderAcceptSelected === undefined) {
3670
- // to determine the Accept header
3671
- const httpHeaderAccepts = [
3672
- 'application/json'
3673
- ];
3674
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3675
- }
2415
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2416
+ 'application/json'
2417
+ ]);
3676
2418
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3677
2419
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3678
2420
  }
3679
- let localVarHttpContext = options && options.context;
3680
- if (localVarHttpContext === undefined) {
3681
- localVarHttpContext = new HttpContext();
3682
- }
3683
- let localVarTransferCache = options && options.transferCache;
3684
- if (localVarTransferCache === undefined) {
3685
- localVarTransferCache = true;
3686
- }
2421
+ const localVarHttpContext = options?.context ?? new HttpContext();
2422
+ const localVarTransferCache = options?.transferCache ?? true;
3687
2423
  let responseType_ = 'json';
3688
2424
  if (localVarHttpHeaderAcceptSelected) {
3689
2425
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3697,10 +2433,11 @@ class ShipmentsService {
3697
2433
  }
3698
2434
  }
3699
2435
  let localVarPath = `/shipments/approvals/count`;
3700
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2436
+ const { basePath, withCredentials } = this.configuration;
2437
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3701
2438
  context: localVarHttpContext,
3702
2439
  responseType: responseType_,
3703
- withCredentials: this.configuration.withCredentials,
2440
+ ...(withCredentials ? { withCredentials } : {}),
3704
2441
  headers: localVarHeaders,
3705
2442
  observe: observe,
3706
2443
  transferCache: localVarTransferCache,
@@ -3712,25 +2449,14 @@ class ShipmentsService {
3712
2449
  throw new Error('Required parameter state was null or undefined when calling getShipmentsCountByState.');
3713
2450
  }
3714
2451
  let localVarHeaders = this.defaultHeaders;
3715
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3716
- if (localVarHttpHeaderAcceptSelected === undefined) {
3717
- // to determine the Accept header
3718
- const httpHeaderAccepts = [
3719
- 'application/json'
3720
- ];
3721
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3722
- }
2452
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2453
+ 'application/json'
2454
+ ]);
3723
2455
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3724
2456
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3725
2457
  }
3726
- let localVarHttpContext = options && options.context;
3727
- if (localVarHttpContext === undefined) {
3728
- localVarHttpContext = new HttpContext();
3729
- }
3730
- let localVarTransferCache = options && options.transferCache;
3731
- if (localVarTransferCache === undefined) {
3732
- localVarTransferCache = true;
3733
- }
2458
+ const localVarHttpContext = options?.context ?? new HttpContext();
2459
+ const localVarTransferCache = options?.transferCache ?? true;
3734
2460
  let responseType_ = 'json';
3735
2461
  if (localVarHttpHeaderAcceptSelected) {
3736
2462
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3744,10 +2470,11 @@ class ShipmentsService {
3744
2470
  }
3745
2471
  }
3746
2472
  let localVarPath = `/shipments/byStateCount/${this.configuration.encodeParam({ name: "state", value: state, in: "path", style: "simple", explode: false, dataType: "ShipmentState", dataFormat: undefined })}`;
3747
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2473
+ const { basePath, withCredentials } = this.configuration;
2474
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3748
2475
  context: localVarHttpContext,
3749
2476
  responseType: responseType_,
3750
- withCredentials: this.configuration.withCredentials,
2477
+ ...(withCredentials ? { withCredentials } : {}),
3751
2478
  headers: localVarHeaders,
3752
2479
  observe: observe,
3753
2480
  transferCache: localVarTransferCache,
@@ -3756,41 +2483,20 @@ class ShipmentsService {
3756
2483
  }
3757
2484
  getShipmentsFromIndex($skip, $top, $orderby, $filter, searchTerm, observe = 'body', reportProgress = false, options) {
3758
2485
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
3759
- if ($skip !== undefined && $skip !== null) {
3760
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
3761
- }
3762
- if ($top !== undefined && $top !== null) {
3763
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
3764
- }
3765
- if ($orderby !== undefined && $orderby !== null) {
3766
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
3767
- }
3768
- if ($filter !== undefined && $filter !== null) {
3769
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
3770
- }
3771
- if (searchTerm !== undefined && searchTerm !== null) {
3772
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchTerm, 'searchTerm');
3773
- }
2486
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
2487
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
2488
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
2489
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
2490
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, searchTerm, 'searchTerm');
3774
2491
  let localVarHeaders = this.defaultHeaders;
3775
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3776
- if (localVarHttpHeaderAcceptSelected === undefined) {
3777
- // to determine the Accept header
3778
- const httpHeaderAccepts = [
3779
- 'application/json'
3780
- ];
3781
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3782
- }
2492
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2493
+ 'application/json'
2494
+ ]);
3783
2495
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3784
2496
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3785
2497
  }
3786
- let localVarHttpContext = options && options.context;
3787
- if (localVarHttpContext === undefined) {
3788
- localVarHttpContext = new HttpContext();
3789
- }
3790
- let localVarTransferCache = options && options.transferCache;
3791
- if (localVarTransferCache === undefined) {
3792
- localVarTransferCache = true;
3793
- }
2498
+ const localVarHttpContext = options?.context ?? new HttpContext();
2499
+ const localVarTransferCache = options?.transferCache ?? true;
3794
2500
  let responseType_ = 'json';
3795
2501
  if (localVarHttpHeaderAcceptSelected) {
3796
2502
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3804,11 +2510,12 @@ class ShipmentsService {
3804
2510
  }
3805
2511
  }
3806
2512
  let localVarPath = `/shipments/search`;
3807
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2513
+ const { basePath, withCredentials } = this.configuration;
2514
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3808
2515
  context: localVarHttpContext,
3809
2516
  params: localVarQueryParameters,
3810
2517
  responseType: responseType_,
3811
- withCredentials: this.configuration.withCredentials,
2518
+ ...(withCredentials ? { withCredentials } : {}),
3812
2519
  headers: localVarHeaders,
3813
2520
  observe: observe,
3814
2521
  transferCache: localVarTransferCache,
@@ -3817,25 +2524,14 @@ class ShipmentsService {
3817
2524
  }
3818
2525
  getShipmentsInTransitCount(observe = 'body', reportProgress = false, options) {
3819
2526
  let localVarHeaders = this.defaultHeaders;
3820
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3821
- if (localVarHttpHeaderAcceptSelected === undefined) {
3822
- // to determine the Accept header
3823
- const httpHeaderAccepts = [
3824
- 'application/json'
3825
- ];
3826
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3827
- }
2527
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2528
+ 'application/json'
2529
+ ]);
3828
2530
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3829
2531
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3830
2532
  }
3831
- let localVarHttpContext = options && options.context;
3832
- if (localVarHttpContext === undefined) {
3833
- localVarHttpContext = new HttpContext();
3834
- }
3835
- let localVarTransferCache = options && options.transferCache;
3836
- if (localVarTransferCache === undefined) {
3837
- localVarTransferCache = true;
3838
- }
2533
+ const localVarHttpContext = options?.context ?? new HttpContext();
2534
+ const localVarTransferCache = options?.transferCache ?? true;
3839
2535
  let responseType_ = 'json';
3840
2536
  if (localVarHttpHeaderAcceptSelected) {
3841
2537
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3849,10 +2545,11 @@ class ShipmentsService {
3849
2545
  }
3850
2546
  }
3851
2547
  let localVarPath = `/shipments/intransit/count`;
3852
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2548
+ const { basePath, withCredentials } = this.configuration;
2549
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3853
2550
  context: localVarHttpContext,
3854
2551
  responseType: responseType_,
3855
- withCredentials: this.configuration.withCredentials,
2552
+ ...(withCredentials ? { withCredentials } : {}),
3856
2553
  headers: localVarHeaders,
3857
2554
  observe: observe,
3858
2555
  transferCache: localVarTransferCache,
@@ -3861,25 +2558,14 @@ class ShipmentsService {
3861
2558
  }
3862
2559
  getShipmentsPendingDocuments(observe = 'body', reportProgress = false, options) {
3863
2560
  let localVarHeaders = this.defaultHeaders;
3864
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3865
- if (localVarHttpHeaderAcceptSelected === undefined) {
3866
- // to determine the Accept header
3867
- const httpHeaderAccepts = [
3868
- 'application/json'
3869
- ];
3870
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3871
- }
2561
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2562
+ 'application/json'
2563
+ ]);
3872
2564
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3873
2565
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3874
2566
  }
3875
- let localVarHttpContext = options && options.context;
3876
- if (localVarHttpContext === undefined) {
3877
- localVarHttpContext = new HttpContext();
3878
- }
3879
- let localVarTransferCache = options && options.transferCache;
3880
- if (localVarTransferCache === undefined) {
3881
- localVarTransferCache = true;
3882
- }
2567
+ const localVarHttpContext = options?.context ?? new HttpContext();
2568
+ const localVarTransferCache = options?.transferCache ?? true;
3883
2569
  let responseType_ = 'json';
3884
2570
  if (localVarHttpHeaderAcceptSelected) {
3885
2571
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3893,10 +2579,11 @@ class ShipmentsService {
3893
2579
  }
3894
2580
  }
3895
2581
  let localVarPath = `/shipments/vendorPendingDocuments/count`;
3896
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2582
+ const { basePath, withCredentials } = this.configuration;
2583
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3897
2584
  context: localVarHttpContext,
3898
2585
  responseType: responseType_,
3899
- withCredentials: this.configuration.withCredentials,
2586
+ ...(withCredentials ? { withCredentials } : {}),
3900
2587
  headers: localVarHeaders,
3901
2588
  observe: observe,
3902
2589
  transferCache: localVarTransferCache,
@@ -3905,25 +2592,14 @@ class ShipmentsService {
3905
2592
  }
3906
2593
  getShipmentsPendingInstructions(observe = 'body', reportProgress = false, options) {
3907
2594
  let localVarHeaders = this.defaultHeaders;
3908
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3909
- if (localVarHttpHeaderAcceptSelected === undefined) {
3910
- // to determine the Accept header
3911
- const httpHeaderAccepts = [
3912
- 'application/json'
3913
- ];
3914
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3915
- }
2595
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2596
+ 'application/json'
2597
+ ]);
3916
2598
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3917
2599
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3918
2600
  }
3919
- let localVarHttpContext = options && options.context;
3920
- if (localVarHttpContext === undefined) {
3921
- localVarHttpContext = new HttpContext();
3922
- }
3923
- let localVarTransferCache = options && options.transferCache;
3924
- if (localVarTransferCache === undefined) {
3925
- localVarTransferCache = true;
3926
- }
2601
+ const localVarHttpContext = options?.context ?? new HttpContext();
2602
+ const localVarTransferCache = options?.transferCache ?? true;
3927
2603
  let responseType_ = 'json';
3928
2604
  if (localVarHttpHeaderAcceptSelected) {
3929
2605
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3937,10 +2613,11 @@ class ShipmentsService {
3937
2613
  }
3938
2614
  }
3939
2615
  let localVarPath = `/shipments/vendorPendingInstructions/count`;
3940
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2616
+ const { basePath, withCredentials } = this.configuration;
2617
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
3941
2618
  context: localVarHttpContext,
3942
2619
  responseType: responseType_,
3943
- withCredentials: this.configuration.withCredentials,
2620
+ ...(withCredentials ? { withCredentials } : {}),
3944
2621
  headers: localVarHeaders,
3945
2622
  observe: observe,
3946
2623
  transferCache: localVarTransferCache,
@@ -3955,25 +2632,14 @@ class ShipmentsService {
3955
2632
  throw new Error('Required parameter state was null or undefined when calling updateShipmentState.');
3956
2633
  }
3957
2634
  let localVarHeaders = this.defaultHeaders;
3958
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
3959
- if (localVarHttpHeaderAcceptSelected === undefined) {
3960
- // to determine the Accept header
3961
- const httpHeaderAccepts = [
3962
- 'application/json'
3963
- ];
3964
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
3965
- }
2635
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2636
+ 'application/json'
2637
+ ]);
3966
2638
  if (localVarHttpHeaderAcceptSelected !== undefined) {
3967
2639
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
3968
2640
  }
3969
- let localVarHttpContext = options && options.context;
3970
- if (localVarHttpContext === undefined) {
3971
- localVarHttpContext = new HttpContext();
3972
- }
3973
- let localVarTransferCache = options && options.transferCache;
3974
- if (localVarTransferCache === undefined) {
3975
- localVarTransferCache = true;
3976
- }
2641
+ const localVarHttpContext = options?.context ?? new HttpContext();
2642
+ const localVarTransferCache = options?.transferCache ?? true;
3977
2643
  let responseType_ = 'json';
3978
2644
  if (localVarHttpHeaderAcceptSelected) {
3979
2645
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -3987,20 +2653,21 @@ class ShipmentsService {
3987
2653
  }
3988
2654
  }
3989
2655
  let localVarPath = `/shipments/${this.configuration.encodeParam({ name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid" })}/${this.configuration.encodeParam({ name: "state", value: state, in: "path", style: "simple", explode: false, dataType: "ShipmentState", dataFormat: undefined })}`;
3990
- return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
2656
+ const { basePath, withCredentials } = this.configuration;
2657
+ return this.httpClient.request('put', `${basePath}${localVarPath}`, {
3991
2658
  context: localVarHttpContext,
3992
2659
  responseType: responseType_,
3993
- withCredentials: this.configuration.withCredentials,
2660
+ ...(withCredentials ? { withCredentials } : {}),
3994
2661
  headers: localVarHeaders,
3995
2662
  observe: observe,
3996
2663
  transferCache: localVarTransferCache,
3997
2664
  reportProgress: reportProgress
3998
2665
  });
3999
2666
  }
4000
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ShipmentsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
4001
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ShipmentsService, providedIn: 'root' });
2667
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ShipmentsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2668
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ShipmentsService, providedIn: 'root' });
4002
2669
  }
4003
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ShipmentsService, decorators: [{
2670
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ShipmentsService, decorators: [{
4004
2671
  type: Injectable,
4005
2672
  args: [{
4006
2673
  providedIn: 'root'
@@ -4024,107 +2691,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
4024
2691
  * Do not edit the class manually.
4025
2692
  */
4026
2693
  /* tslint:disable:no-unused-variable member-ordering */
4027
- class SipmetItemsService {
2694
+ class SipmetItemsService extends BaseService {
4028
2695
  httpClient;
4029
- basePath = 'http://localhost';
4030
- defaultHeaders = new HttpHeaders();
4031
- configuration = new Configuration();
4032
- encoder;
4033
2696
  constructor(httpClient, basePath, configuration) {
2697
+ super(basePath, configuration);
4034
2698
  this.httpClient = httpClient;
4035
- if (configuration) {
4036
- this.configuration = configuration;
4037
- }
4038
- if (typeof this.configuration.basePath !== 'string') {
4039
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
4040
- if (firstBasePath != undefined) {
4041
- basePath = firstBasePath;
4042
- }
4043
- if (typeof basePath !== 'string') {
4044
- basePath = this.basePath;
4045
- }
4046
- this.configuration.basePath = basePath;
4047
- }
4048
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
4049
- }
4050
- // @ts-ignore
4051
- addToHttpParams(httpParams, value, key) {
4052
- if (typeof value === "object" && value instanceof Date === false) {
4053
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
4054
- }
4055
- else {
4056
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
4057
- }
4058
- return httpParams;
4059
- }
4060
- addToHttpParamsRecursive(httpParams, value, key) {
4061
- if (value == null) {
4062
- return httpParams;
4063
- }
4064
- if (typeof value === "object") {
4065
- if (Array.isArray(value)) {
4066
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
4067
- }
4068
- else if (value instanceof Date) {
4069
- if (key != null) {
4070
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
4071
- }
4072
- else {
4073
- throw Error("key may not be null if value is Date");
4074
- }
4075
- }
4076
- else {
4077
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
4078
- }
4079
- }
4080
- else if (key != null) {
4081
- httpParams = httpParams.append(key, value);
4082
- }
4083
- else {
4084
- throw Error("key may not be null if value is not object or array");
4085
- }
4086
- return httpParams;
4087
2699
  }
4088
2700
  getShipmentItemSummaries(id, $skip, $top, $orderby, $filter, $search, observe = 'body', reportProgress = false, options) {
4089
2701
  if (id === null || id === undefined) {
4090
2702
  throw new Error('Required parameter id was null or undefined when calling getShipmentItemSummaries.');
4091
2703
  }
4092
2704
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
4093
- if ($skip !== undefined && $skip !== null) {
4094
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
4095
- }
4096
- if ($top !== undefined && $top !== null) {
4097
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
4098
- }
4099
- if ($orderby !== undefined && $orderby !== null) {
4100
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
4101
- }
4102
- if ($filter !== undefined && $filter !== null) {
4103
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
4104
- }
4105
- if ($search !== undefined && $search !== null) {
4106
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
4107
- }
2705
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $skip, '$skip');
2706
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $top, '$top');
2707
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $orderby, '$orderby');
2708
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $filter, '$filter');
2709
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, $search, '$search');
4108
2710
  let localVarHeaders = this.defaultHeaders;
4109
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
4110
- if (localVarHttpHeaderAcceptSelected === undefined) {
4111
- // to determine the Accept header
4112
- const httpHeaderAccepts = [
4113
- 'application/json'
4114
- ];
4115
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
4116
- }
2711
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2712
+ 'application/json'
2713
+ ]);
4117
2714
  if (localVarHttpHeaderAcceptSelected !== undefined) {
4118
2715
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
4119
2716
  }
4120
- let localVarHttpContext = options && options.context;
4121
- if (localVarHttpContext === undefined) {
4122
- localVarHttpContext = new HttpContext();
4123
- }
4124
- let localVarTransferCache = options && options.transferCache;
4125
- if (localVarTransferCache === undefined) {
4126
- localVarTransferCache = true;
4127
- }
2717
+ const localVarHttpContext = options?.context ?? new HttpContext();
2718
+ const localVarTransferCache = options?.transferCache ?? true;
4128
2719
  let responseType_ = 'json';
4129
2720
  if (localVarHttpHeaderAcceptSelected) {
4130
2721
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -4138,21 +2729,22 @@ class SipmetItemsService {
4138
2729
  }
4139
2730
  }
4140
2731
  let localVarPath = `/shipmentItems/summaries`;
4141
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2732
+ const { basePath, withCredentials } = this.configuration;
2733
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
4142
2734
  context: localVarHttpContext,
4143
2735
  params: localVarQueryParameters,
4144
2736
  responseType: responseType_,
4145
- withCredentials: this.configuration.withCredentials,
2737
+ ...(withCredentials ? { withCredentials } : {}),
4146
2738
  headers: localVarHeaders,
4147
2739
  observe: observe,
4148
2740
  transferCache: localVarTransferCache,
4149
2741
  reportProgress: reportProgress
4150
2742
  });
4151
2743
  }
4152
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SipmetItemsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
4153
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SipmetItemsService, providedIn: 'root' });
2744
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SipmetItemsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2745
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SipmetItemsService, providedIn: 'root' });
4154
2746
  }
4155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SipmetItemsService, decorators: [{
2747
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: SipmetItemsService, decorators: [{
4156
2748
  type: Injectable,
4157
2749
  args: [{
4158
2750
  providedIn: 'root'
@@ -4176,88 +2768,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
4176
2768
  * Do not edit the class manually.
4177
2769
  */
4178
2770
  /* tslint:disable:no-unused-variable member-ordering */
4179
- class UserService {
2771
+ class UserService extends BaseService {
4180
2772
  httpClient;
4181
- basePath = 'http://localhost';
4182
- defaultHeaders = new HttpHeaders();
4183
- configuration = new Configuration();
4184
- encoder;
4185
2773
  constructor(httpClient, basePath, configuration) {
2774
+ super(basePath, configuration);
4186
2775
  this.httpClient = httpClient;
4187
- if (configuration) {
4188
- this.configuration = configuration;
4189
- }
4190
- if (typeof this.configuration.basePath !== 'string') {
4191
- const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
4192
- if (firstBasePath != undefined) {
4193
- basePath = firstBasePath;
4194
- }
4195
- if (typeof basePath !== 'string') {
4196
- basePath = this.basePath;
4197
- }
4198
- this.configuration.basePath = basePath;
4199
- }
4200
- this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
4201
- }
4202
- // @ts-ignore
4203
- addToHttpParams(httpParams, value, key) {
4204
- if (typeof value === "object" && value instanceof Date === false) {
4205
- httpParams = this.addToHttpParamsRecursive(httpParams, value);
4206
- }
4207
- else {
4208
- httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
4209
- }
4210
- return httpParams;
4211
- }
4212
- addToHttpParamsRecursive(httpParams, value, key) {
4213
- if (value == null) {
4214
- return httpParams;
4215
- }
4216
- if (typeof value === "object") {
4217
- if (Array.isArray(value)) {
4218
- value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
4219
- }
4220
- else if (value instanceof Date) {
4221
- if (key != null) {
4222
- httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
4223
- }
4224
- else {
4225
- throw Error("key may not be null if value is Date");
4226
- }
4227
- }
4228
- else {
4229
- Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
4230
- }
4231
- }
4232
- else if (key != null) {
4233
- httpParams = httpParams.append(key, value);
4234
- }
4235
- else {
4236
- throw Error("key may not be null if value is not object or array");
4237
- }
4238
- return httpParams;
4239
2776
  }
4240
2777
  getChatPendingCount(observe = 'body', reportProgress = false, options) {
4241
2778
  let localVarHeaders = this.defaultHeaders;
4242
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
4243
- if (localVarHttpHeaderAcceptSelected === undefined) {
4244
- // to determine the Accept header
4245
- const httpHeaderAccepts = [
4246
- 'application/json'
4247
- ];
4248
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
4249
- }
2779
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2780
+ 'application/json'
2781
+ ]);
4250
2782
  if (localVarHttpHeaderAcceptSelected !== undefined) {
4251
2783
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
4252
2784
  }
4253
- let localVarHttpContext = options && options.context;
4254
- if (localVarHttpContext === undefined) {
4255
- localVarHttpContext = new HttpContext();
4256
- }
4257
- let localVarTransferCache = options && options.transferCache;
4258
- if (localVarTransferCache === undefined) {
4259
- localVarTransferCache = true;
4260
- }
2785
+ const localVarHttpContext = options?.context ?? new HttpContext();
2786
+ const localVarTransferCache = options?.transferCache ?? true;
4261
2787
  let responseType_ = 'json';
4262
2788
  if (localVarHttpHeaderAcceptSelected) {
4263
2789
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -4271,10 +2797,11 @@ class UserService {
4271
2797
  }
4272
2798
  }
4273
2799
  let localVarPath = `/user/chatCount`;
4274
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2800
+ const { basePath, withCredentials } = this.configuration;
2801
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
4275
2802
  context: localVarHttpContext,
4276
2803
  responseType: responseType_,
4277
- withCredentials: this.configuration.withCredentials,
2804
+ ...(withCredentials ? { withCredentials } : {}),
4278
2805
  headers: localVarHeaders,
4279
2806
  observe: observe,
4280
2807
  transferCache: localVarTransferCache,
@@ -4283,25 +2810,14 @@ class UserService {
4283
2810
  }
4284
2811
  getMailPendingCount(observe = 'body', reportProgress = false, options) {
4285
2812
  let localVarHeaders = this.defaultHeaders;
4286
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
4287
- if (localVarHttpHeaderAcceptSelected === undefined) {
4288
- // to determine the Accept header
4289
- const httpHeaderAccepts = [
4290
- 'application/json'
4291
- ];
4292
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
4293
- }
2813
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2814
+ 'application/json'
2815
+ ]);
4294
2816
  if (localVarHttpHeaderAcceptSelected !== undefined) {
4295
2817
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
4296
2818
  }
4297
- let localVarHttpContext = options && options.context;
4298
- if (localVarHttpContext === undefined) {
4299
- localVarHttpContext = new HttpContext();
4300
- }
4301
- let localVarTransferCache = options && options.transferCache;
4302
- if (localVarTransferCache === undefined) {
4303
- localVarTransferCache = true;
4304
- }
2819
+ const localVarHttpContext = options?.context ?? new HttpContext();
2820
+ const localVarTransferCache = options?.transferCache ?? true;
4305
2821
  let responseType_ = 'json';
4306
2822
  if (localVarHttpHeaderAcceptSelected) {
4307
2823
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -4315,10 +2831,11 @@ class UserService {
4315
2831
  }
4316
2832
  }
4317
2833
  let localVarPath = `/user/mailCount`;
4318
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2834
+ const { basePath, withCredentials } = this.configuration;
2835
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
4319
2836
  context: localVarHttpContext,
4320
2837
  responseType: responseType_,
4321
- withCredentials: this.configuration.withCredentials,
2838
+ ...(withCredentials ? { withCredentials } : {}),
4322
2839
  headers: localVarHeaders,
4323
2840
  observe: observe,
4324
2841
  transferCache: localVarTransferCache,
@@ -4327,25 +2844,14 @@ class UserService {
4327
2844
  }
4328
2845
  getUserApplicationList(observe = 'body', reportProgress = false, options) {
4329
2846
  let localVarHeaders = this.defaultHeaders;
4330
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
4331
- if (localVarHttpHeaderAcceptSelected === undefined) {
4332
- // to determine the Accept header
4333
- const httpHeaderAccepts = [
4334
- 'application/json'
4335
- ];
4336
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
4337
- }
2847
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2848
+ 'application/json'
2849
+ ]);
4338
2850
  if (localVarHttpHeaderAcceptSelected !== undefined) {
4339
2851
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
4340
2852
  }
4341
- let localVarHttpContext = options && options.context;
4342
- if (localVarHttpContext === undefined) {
4343
- localVarHttpContext = new HttpContext();
4344
- }
4345
- let localVarTransferCache = options && options.transferCache;
4346
- if (localVarTransferCache === undefined) {
4347
- localVarTransferCache = true;
4348
- }
2853
+ const localVarHttpContext = options?.context ?? new HttpContext();
2854
+ const localVarTransferCache = options?.transferCache ?? true;
4349
2855
  let responseType_ = 'json';
4350
2856
  if (localVarHttpHeaderAcceptSelected) {
4351
2857
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -4359,10 +2865,11 @@ class UserService {
4359
2865
  }
4360
2866
  }
4361
2867
  let localVarPath = `/users/me/applications`;
4362
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2868
+ const { basePath, withCredentials } = this.configuration;
2869
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
4363
2870
  context: localVarHttpContext,
4364
2871
  responseType: responseType_,
4365
- withCredentials: this.configuration.withCredentials,
2872
+ ...(withCredentials ? { withCredentials } : {}),
4366
2873
  headers: localVarHeaders,
4367
2874
  observe: observe,
4368
2875
  transferCache: localVarTransferCache,
@@ -4371,25 +2878,14 @@ class UserService {
4371
2878
  }
4372
2879
  getUserInfo(observe = 'body', reportProgress = false, options) {
4373
2880
  let localVarHeaders = this.defaultHeaders;
4374
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
4375
- if (localVarHttpHeaderAcceptSelected === undefined) {
4376
- // to determine the Accept header
4377
- const httpHeaderAccepts = [
4378
- 'application/json'
4379
- ];
4380
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
4381
- }
2881
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2882
+ 'application/json'
2883
+ ]);
4382
2884
  if (localVarHttpHeaderAcceptSelected !== undefined) {
4383
2885
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
4384
2886
  }
4385
- let localVarHttpContext = options && options.context;
4386
- if (localVarHttpContext === undefined) {
4387
- localVarHttpContext = new HttpContext();
4388
- }
4389
- let localVarTransferCache = options && options.transferCache;
4390
- if (localVarTransferCache === undefined) {
4391
- localVarTransferCache = true;
4392
- }
2887
+ const localVarHttpContext = options?.context ?? new HttpContext();
2888
+ const localVarTransferCache = options?.transferCache ?? true;
4393
2889
  let responseType_ = 'json';
4394
2890
  if (localVarHttpHeaderAcceptSelected) {
4395
2891
  if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
@@ -4403,10 +2899,11 @@ class UserService {
4403
2899
  }
4404
2900
  }
4405
2901
  let localVarPath = `/user/me`;
4406
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
2902
+ const { basePath, withCredentials } = this.configuration;
2903
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
4407
2904
  context: localVarHttpContext,
4408
2905
  responseType: responseType_,
4409
- withCredentials: this.configuration.withCredentials,
2906
+ ...(withCredentials ? { withCredentials } : {}),
4410
2907
  headers: localVarHeaders,
4411
2908
  observe: observe,
4412
2909
  transferCache: localVarTransferCache,
@@ -4415,25 +2912,14 @@ class UserService {
4415
2912
  }
4416
2913
  setNewFeaturesVisibility(setNewFeaturesVisibilityCommand, observe = 'body', reportProgress = false, options) {
4417
2914
  let localVarHeaders = this.defaultHeaders;
4418
- let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
4419
- if (localVarHttpHeaderAcceptSelected === undefined) {
4420
- // to determine the Accept header
4421
- const httpHeaderAccepts = [
4422
- 'application/json'
4423
- ];
4424
- localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
4425
- }
2915
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
2916
+ 'application/json'
2917
+ ]);
4426
2918
  if (localVarHttpHeaderAcceptSelected !== undefined) {
4427
2919
  localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
4428
2920
  }
4429
- let localVarHttpContext = options && options.context;
4430
- if (localVarHttpContext === undefined) {
4431
- localVarHttpContext = new HttpContext();
4432
- }
4433
- let localVarTransferCache = options && options.transferCache;
4434
- if (localVarTransferCache === undefined) {
4435
- localVarTransferCache = true;
4436
- }
2921
+ const localVarHttpContext = options?.context ?? new HttpContext();
2922
+ const localVarTransferCache = options?.transferCache ?? true;
4437
2923
  // to determine the Content-Type header
4438
2924
  const consumes = [
4439
2925
  'application/json'
@@ -4455,21 +2941,22 @@ class UserService {
4455
2941
  }
4456
2942
  }
4457
2943
  let localVarPath = `/user/me/settings/newfeaturevisibility`;
4458
- return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, {
2944
+ const { basePath, withCredentials } = this.configuration;
2945
+ return this.httpClient.request('put', `${basePath}${localVarPath}`, {
4459
2946
  context: localVarHttpContext,
4460
2947
  body: setNewFeaturesVisibilityCommand,
4461
2948
  responseType: responseType_,
4462
- withCredentials: this.configuration.withCredentials,
2949
+ ...(withCredentials ? { withCredentials } : {}),
4463
2950
  headers: localVarHeaders,
4464
2951
  observe: observe,
4465
2952
  transferCache: localVarTransferCache,
4466
2953
  reportProgress: reportProgress
4467
2954
  });
4468
2955
  }
4469
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: UserService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
4470
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: UserService, providedIn: 'root' });
2956
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: UserService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2957
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: UserService, providedIn: 'root' });
4471
2958
  }
4472
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: UserService, decorators: [{
2959
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: UserService, decorators: [{
4473
2960
  type: Injectable,
4474
2961
  args: [{
4475
2962
  providedIn: 'root'
@@ -4775,6 +3262,10 @@ const EntityState = {
4775
3262
  * https://openapi-generator.tech
4776
3263
  * Do not edit the class manually.
4777
3264
  */
3265
+ const JourneySegmentType = {
3266
+ Mother: 'Mother',
3267
+ Feeder: 'Feeder'
3268
+ };
4778
3269
 
4779
3270
  /**
4780
3271
  * Dcm.API.Client
@@ -4785,10 +3276,6 @@ const EntityState = {
4785
3276
  * https://openapi-generator.tech
4786
3277
  * Do not edit the class manually.
4787
3278
  */
4788
- const JourneySegmentType = {
4789
- Mother: 'Mother',
4790
- Feeder: 'Feeder'
4791
- };
4792
3279
 
4793
3280
  /**
4794
3281
  * Dcm.API.Client
@@ -5256,11 +3743,11 @@ class ApiModule {
5256
3743
  'See also https://github.com/angular/angular/issues/20575');
5257
3744
  }
5258
3745
  }
5259
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ApiModule, deps: [{ token: ApiModule, optional: true, skipSelf: true }, { token: i1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
5260
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: ApiModule });
5261
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ApiModule });
3746
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ApiModule, deps: [{ token: ApiModule, optional: true, skipSelf: true }, { token: i1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
3747
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: ApiModule });
3748
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ApiModule });
5262
3749
  }
5263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ApiModule, decorators: [{
3750
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ApiModule, decorators: [{
5264
3751
  type: NgModule,
5265
3752
  args: [{
5266
3753
  imports: [],
@@ -5276,9 +3763,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
5276
3763
  type: Optional
5277
3764
  }] }] });
5278
3765
 
3766
+ // Returns the service class providers, to be used in the [ApplicationConfig](https://angular.dev/api/core/ApplicationConfig).
3767
+ function provideApi(configOrBasePath) {
3768
+ return makeEnvironmentProviders([
3769
+ typeof configOrBasePath === "string"
3770
+ ? { provide: BASE_PATH, useValue: configOrBasePath }
3771
+ : {
3772
+ provide: Configuration,
3773
+ useValue: new Configuration({ ...configOrBasePath }),
3774
+ },
3775
+ ]);
3776
+ }
3777
+
5279
3778
  /**
5280
3779
  * Generated bundle index. Do not edit.
5281
3780
  */
5282
3781
 
5283
- export { APIS, ApiModule, ApprovalTypes, AuditLogsService, BASE_PATH, BookingsService, COLLECTION_FORMATS, CompaniesService, Configuration, ContainerBookedState, ContainerSize, ContainerType, ContainersService, DocumentType, DocumentsService, EntityState, HealthService, JourneySegmentType, NoteSourceTypes, NotesService, PermissionsService, PoItemState, PoItemsService, PowerBiTenant, PurchaseOrderState, PurchaseOrdersService, RecordTypes, ReportsService, RoutingLegType, SettingsService, ShipmentApprovalType, ShipmentState, ShipmentTerm, ShipmentsService, SipmetItemsService, TimelineEventStates, TimelineEventTypes, TransportMode, UserCompanyType, UserService, WorkflowArtifacts };
3782
+ export { APIS, ApiModule, ApprovalTypes, AuditLogsService, BASE_PATH, BookingsService, COLLECTION_FORMATS, CompaniesService, Configuration, ContainerBookedState, ContainerSize, ContainerType, ContainersService, DocumentType, DocumentsService, EntityState, HealthService, JourneySegmentType, NoteSourceTypes, NotesService, PermissionsService, PoItemState, PoItemsService, PowerBiTenant, PurchaseOrderState, PurchaseOrdersService, RecordTypes, ReportsService, RoutingLegType, SettingsService, ShipmentApprovalType, ShipmentState, ShipmentTerm, ShipmentsService, SipmetItemsService, TimelineEventStates, TimelineEventTypes, TransportMode, UserCompanyType, UserService, WorkflowArtifacts, provideApi };
5284
3783
  //# sourceMappingURL=indigina-dcm-api.mjs.map