@sonatype/nexus-iq-api-client 0.156.0 → 0.156.2

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 (200) hide show
  1. package/.openapi-generator/VERSION +1 -1
  2. package/dist/apis/ApplicationCategoriesApi.d.ts +1 -1
  3. package/dist/apis/ApplicationCategoriesApi.js +42 -12
  4. package/dist/apis/ApplicationsApi.d.ts +5 -5
  5. package/dist/apis/ApplicationsApi.js +55 -15
  6. package/dist/apis/ClaimApi.d.ts +1 -1
  7. package/dist/apis/ClaimApi.js +17 -5
  8. package/dist/apis/ComponentsApi.d.ts +1 -1
  9. package/dist/apis/ComponentsApi.js +21 -6
  10. package/dist/apis/CompositeSourceControlApi.d.ts +1 -1
  11. package/dist/apis/CompositeSourceControlApi.js +5 -2
  12. package/dist/apis/CompositeSourceControlConfigValidatorApi.d.ts +1 -1
  13. package/dist/apis/CompositeSourceControlConfigValidatorApi.js +5 -2
  14. package/dist/apis/ConfigApi.js +15 -0
  15. package/dist/apis/ConfigArtifactoryConnectionApi.d.ts +1 -1
  16. package/dist/apis/ConfigArtifactoryConnectionApi.js +35 -11
  17. package/dist/apis/ConfigCrowdApi.d.ts +1 -1
  18. package/dist/apis/ConfigCrowdApi.js +17 -5
  19. package/dist/apis/ConfigJIRAApi.d.ts +1 -1
  20. package/dist/apis/ConfigJIRAApi.js +11 -2
  21. package/dist/apis/ConfigMailApi.d.ts +1 -1
  22. package/dist/apis/ConfigMailApi.js +16 -4
  23. package/dist/apis/ConfigProxyServerApi.d.ts +1 -1
  24. package/dist/apis/ConfigProxyServerApi.js +12 -3
  25. package/dist/apis/ConfigReverseProxyAuthenticationApi.d.ts +1 -1
  26. package/dist/apis/ConfigReverseProxyAuthenticationApi.js +12 -3
  27. package/dist/apis/ConfigSAMLApi.d.ts +1 -1
  28. package/dist/apis/ConfigSAMLApi.js +11 -2
  29. package/dist/apis/ConfigSourceControlApi.d.ts +1 -1
  30. package/dist/apis/ConfigSourceControlApi.js +11 -2
  31. package/dist/apis/CycloneDxApi.js +12 -0
  32. package/dist/apis/DataRetentionPoliciesApi.d.ts +1 -1
  33. package/dist/apis/DataRetentionPoliciesApi.js +9 -3
  34. package/dist/apis/EndpointsApi.js +3 -0
  35. package/dist/apis/EvaluationApi.d.ts +1 -1
  36. package/dist/apis/EvaluationApi.js +29 -11
  37. package/dist/apis/FirewallApi.d.ts +1 -1
  38. package/dist/apis/FirewallApi.js +30 -6
  39. package/dist/apis/LabelsApi.d.ts +1 -1
  40. package/dist/apis/LabelsApi.js +26 -8
  41. package/dist/apis/LicenseLegalMetadataApi.d.ts +1 -1
  42. package/dist/apis/LicenseLegalMetadataApi.js +48 -9
  43. package/dist/apis/OrganizationsApi.d.ts +1 -1
  44. package/dist/apis/OrganizationsApi.js +14 -5
  45. package/dist/apis/PoliciesApi.d.ts +1 -1
  46. package/dist/apis/PoliciesApi.js +5 -2
  47. package/dist/apis/PolicyViolationsApi.d.ts +1 -1
  48. package/dist/apis/PolicyViolationsApi.js +25 -7
  49. package/dist/apis/PolicyWaiverApi.js +3 -0
  50. package/dist/apis/PolicyWaiversApi.d.ts +1 -1
  51. package/dist/apis/PolicyWaiversApi.js +28 -7
  52. package/dist/apis/ReportsApi.d.ts +1 -1
  53. package/dist/apis/ReportsApi.js +29 -8
  54. package/dist/apis/RepositoriesApi.d.ts +1 -1
  55. package/dist/apis/RepositoriesApi.js +9 -3
  56. package/dist/apis/RoleMembershipsApi.d.ts +1 -1
  57. package/dist/apis/RoleMembershipsApi.js +21 -3
  58. package/dist/apis/RolesApi.d.ts +1 -1
  59. package/dist/apis/RolesApi.js +5 -2
  60. package/dist/apis/ScanApi.d.ts +1 -1
  61. package/dist/apis/ScanApi.js +8 -2
  62. package/dist/apis/SearchApi.d.ts +1 -1
  63. package/dist/apis/SearchApi.js +15 -3
  64. package/dist/apis/SecurityOverridesApi.d.ts +1 -1
  65. package/dist/apis/SecurityOverridesApi.js +5 -2
  66. package/dist/apis/SourceControlApi.d.ts +1 -1
  67. package/dist/apis/SourceControlApi.js +22 -7
  68. package/dist/apis/SourceControlMetricsApi.d.ts +1 -1
  69. package/dist/apis/SourceControlMetricsApi.js +5 -2
  70. package/dist/apis/TelemetryApi.js +3 -0
  71. package/dist/apis/UserTokensApi.d.ts +1 -1
  72. package/dist/apis/UserTokensApi.js +26 -5
  73. package/dist/apis/UsersApi.d.ts +1 -1
  74. package/dist/apis/UsersApi.js +21 -6
  75. package/dist/apis/VulnerabilitiesApi.d.ts +1 -1
  76. package/dist/apis/VulnerabilitiesApi.js +5 -2
  77. package/dist/esm/apis/ApplicationCategoriesApi.d.ts +1 -1
  78. package/dist/esm/apis/ApplicationCategoriesApi.js +31 -1
  79. package/dist/esm/apis/ApplicationsApi.d.ts +5 -5
  80. package/dist/esm/apis/ApplicationsApi.js +43 -3
  81. package/dist/esm/apis/ClaimApi.d.ts +1 -1
  82. package/dist/esm/apis/ClaimApi.js +13 -1
  83. package/dist/esm/apis/ComponentsApi.d.ts +1 -1
  84. package/dist/esm/apis/ComponentsApi.js +16 -1
  85. package/dist/esm/apis/CompositeSourceControlApi.d.ts +1 -1
  86. package/dist/esm/apis/CompositeSourceControlApi.js +4 -1
  87. package/dist/esm/apis/CompositeSourceControlConfigValidatorApi.d.ts +1 -1
  88. package/dist/esm/apis/CompositeSourceControlConfigValidatorApi.js +4 -1
  89. package/dist/esm/apis/ConfigApi.js +15 -0
  90. package/dist/esm/apis/ConfigArtifactoryConnectionApi.d.ts +1 -1
  91. package/dist/esm/apis/ConfigArtifactoryConnectionApi.js +25 -1
  92. package/dist/esm/apis/ConfigCrowdApi.d.ts +1 -1
  93. package/dist/esm/apis/ConfigCrowdApi.js +13 -1
  94. package/dist/esm/apis/ConfigJIRAApi.d.ts +1 -1
  95. package/dist/esm/apis/ConfigJIRAApi.js +10 -1
  96. package/dist/esm/apis/ConfigMailApi.d.ts +1 -1
  97. package/dist/esm/apis/ConfigMailApi.js +13 -1
  98. package/dist/esm/apis/ConfigProxyServerApi.d.ts +1 -1
  99. package/dist/esm/apis/ConfigProxyServerApi.js +10 -1
  100. package/dist/esm/apis/ConfigReverseProxyAuthenticationApi.d.ts +1 -1
  101. package/dist/esm/apis/ConfigReverseProxyAuthenticationApi.js +10 -1
  102. package/dist/esm/apis/ConfigSAMLApi.d.ts +1 -1
  103. package/dist/esm/apis/ConfigSAMLApi.js +10 -1
  104. package/dist/esm/apis/ConfigSourceControlApi.d.ts +1 -1
  105. package/dist/esm/apis/ConfigSourceControlApi.js +10 -1
  106. package/dist/esm/apis/CycloneDxApi.js +12 -0
  107. package/dist/esm/apis/DataRetentionPoliciesApi.d.ts +1 -1
  108. package/dist/esm/apis/DataRetentionPoliciesApi.js +7 -1
  109. package/dist/esm/apis/EndpointsApi.js +3 -0
  110. package/dist/esm/apis/EvaluationApi.d.ts +1 -1
  111. package/dist/esm/apis/EvaluationApi.js +19 -1
  112. package/dist/esm/apis/FirewallApi.d.ts +1 -1
  113. package/dist/esm/apis/FirewallApi.js +25 -1
  114. package/dist/esm/apis/LabelsApi.d.ts +1 -1
  115. package/dist/esm/apis/LabelsApi.js +19 -1
  116. package/dist/esm/apis/LicenseLegalMetadataApi.d.ts +1 -1
  117. package/dist/esm/apis/LicenseLegalMetadataApi.js +40 -1
  118. package/dist/esm/apis/OrganizationsApi.d.ts +1 -1
  119. package/dist/esm/apis/OrganizationsApi.js +10 -1
  120. package/dist/esm/apis/PoliciesApi.d.ts +1 -1
  121. package/dist/esm/apis/PoliciesApi.js +4 -1
  122. package/dist/esm/apis/PolicyViolationsApi.d.ts +1 -1
  123. package/dist/esm/apis/PolicyViolationsApi.js +19 -1
  124. package/dist/esm/apis/PolicyWaiverApi.js +3 -0
  125. package/dist/esm/apis/PolicyWaiversApi.d.ts +1 -1
  126. package/dist/esm/apis/PolicyWaiversApi.js +22 -1
  127. package/dist/esm/apis/ReportsApi.d.ts +1 -1
  128. package/dist/esm/apis/ReportsApi.js +22 -1
  129. package/dist/esm/apis/RepositoriesApi.d.ts +1 -1
  130. package/dist/esm/apis/RepositoriesApi.js +7 -1
  131. package/dist/esm/apis/RoleMembershipsApi.d.ts +1 -1
  132. package/dist/esm/apis/RoleMembershipsApi.js +19 -1
  133. package/dist/esm/apis/RolesApi.d.ts +1 -1
  134. package/dist/esm/apis/RolesApi.js +4 -1
  135. package/dist/esm/apis/ScanApi.d.ts +1 -1
  136. package/dist/esm/apis/ScanApi.js +7 -1
  137. package/dist/esm/apis/SearchApi.d.ts +1 -1
  138. package/dist/esm/apis/SearchApi.js +13 -1
  139. package/dist/esm/apis/SecurityOverridesApi.d.ts +1 -1
  140. package/dist/esm/apis/SecurityOverridesApi.js +4 -1
  141. package/dist/esm/apis/SourceControlApi.d.ts +1 -1
  142. package/dist/esm/apis/SourceControlApi.js +16 -1
  143. package/dist/esm/apis/SourceControlMetricsApi.d.ts +1 -1
  144. package/dist/esm/apis/SourceControlMetricsApi.js +4 -1
  145. package/dist/esm/apis/TelemetryApi.js +3 -0
  146. package/dist/esm/apis/UserTokensApi.d.ts +1 -1
  147. package/dist/esm/apis/UserTokensApi.js +22 -1
  148. package/dist/esm/apis/UsersApi.d.ts +1 -1
  149. package/dist/esm/apis/UsersApi.js +16 -1
  150. package/dist/esm/apis/VulnerabilitiesApi.d.ts +1 -1
  151. package/dist/esm/apis/VulnerabilitiesApi.js +4 -1
  152. package/dist/esm/index.d.ts +2 -2
  153. package/dist/esm/index.js +2 -2
  154. package/dist/esm/runtime.js +13 -5
  155. package/dist/index.d.ts +2 -2
  156. package/dist/index.js +2 -2
  157. package/dist/runtime.js +13 -5
  158. package/package.json +1 -1
  159. package/src/apis/ApplicationCategoriesApi.ts +32 -2
  160. package/src/apis/ApplicationsApi.ts +48 -8
  161. package/src/apis/ClaimApi.ts +14 -2
  162. package/src/apis/ComponentsApi.ts +17 -2
  163. package/src/apis/CompositeSourceControlApi.ts +5 -2
  164. package/src/apis/CompositeSourceControlConfigValidatorApi.ts +5 -2
  165. package/src/apis/ConfigApi.ts +15 -0
  166. package/src/apis/ConfigArtifactoryConnectionApi.ts +26 -2
  167. package/src/apis/ConfigCrowdApi.ts +14 -2
  168. package/src/apis/ConfigJIRAApi.ts +11 -2
  169. package/src/apis/ConfigMailApi.ts +14 -2
  170. package/src/apis/ConfigProxyServerApi.ts +11 -2
  171. package/src/apis/ConfigReverseProxyAuthenticationApi.ts +11 -2
  172. package/src/apis/ConfigSAMLApi.ts +11 -2
  173. package/src/apis/ConfigSourceControlApi.ts +11 -2
  174. package/src/apis/CycloneDxApi.ts +12 -0
  175. package/src/apis/DataRetentionPoliciesApi.ts +8 -2
  176. package/src/apis/EndpointsApi.ts +3 -0
  177. package/src/apis/EvaluationApi.ts +20 -2
  178. package/src/apis/FirewallApi.ts +26 -2
  179. package/src/apis/LabelsApi.ts +20 -2
  180. package/src/apis/LicenseLegalMetadataApi.ts +41 -2
  181. package/src/apis/OrganizationsApi.ts +11 -2
  182. package/src/apis/PoliciesApi.ts +5 -2
  183. package/src/apis/PolicyViolationsApi.ts +20 -2
  184. package/src/apis/PolicyWaiverApi.ts +3 -0
  185. package/src/apis/PolicyWaiversApi.ts +23 -2
  186. package/src/apis/ReportsApi.ts +23 -2
  187. package/src/apis/RepositoriesApi.ts +8 -2
  188. package/src/apis/RoleMembershipsApi.ts +20 -2
  189. package/src/apis/RolesApi.ts +5 -2
  190. package/src/apis/ScanApi.ts +8 -2
  191. package/src/apis/SearchApi.ts +14 -2
  192. package/src/apis/SecurityOverridesApi.ts +5 -2
  193. package/src/apis/SourceControlApi.ts +17 -2
  194. package/src/apis/SourceControlMetricsApi.ts +5 -2
  195. package/src/apis/TelemetryApi.ts +3 -0
  196. package/src/apis/UserTokensApi.ts +23 -2
  197. package/src/apis/UsersApi.ts +17 -2
  198. package/src/apis/VulnerabilitiesApi.ts +5 -2
  199. package/src/index.ts +2 -2
  200. package/src/runtime.ts +12 -6
@@ -16,11 +16,11 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiRoleMemberMappingListDTO,
19
- } from '../models';
19
+ } from '../models/index';
20
20
  import {
21
21
  ApiRoleMemberMappingListDTOFromJSON,
22
22
  ApiRoleMemberMappingListDTOToJSON,
23
- } from '../models';
23
+ } from '../models/index';
24
24
 
25
25
  export interface GetRoleMembershipsApplicationOrOrganizationRequest {
26
26
  ownerType: GetRoleMembershipsApplicationOrOrganizationOwnerTypeEnum;
@@ -183,6 +183,9 @@ export class RoleMembershipsApi extends runtime.BaseAPI implements RoleMembershi
183
183
 
184
184
  const headerParameters: runtime.HTTPHeaders = {};
185
185
 
186
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
187
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
188
+ }
186
189
  const response = await this.request({
187
190
  path: `/api/v2/roleMemberships/{ownerType}/{internalOwnerId}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))).replace(`{${"internalOwnerId"}}`, encodeURIComponent(String(requestParameters.internalOwnerId))),
188
191
  method: 'GET',
@@ -211,6 +214,9 @@ export class RoleMembershipsApi extends runtime.BaseAPI implements RoleMembershi
211
214
 
212
215
  const headerParameters: runtime.HTTPHeaders = {};
213
216
 
217
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
218
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
219
+ }
214
220
  const response = await this.request({
215
221
  path: `/api/v2/roleMemberships/{ownerType}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))),
216
222
  method: 'GET',
@@ -255,6 +261,9 @@ export class RoleMembershipsApi extends runtime.BaseAPI implements RoleMembershi
255
261
 
256
262
  const headerParameters: runtime.HTTPHeaders = {};
257
263
 
264
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
265
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
266
+ }
258
267
  const response = await this.request({
259
268
  path: `/api/v2/roleMemberships/{ownerType}/{internalOwnerId}/role/{roleId}/{memberType}/{memberName}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))).replace(`{${"internalOwnerId"}}`, encodeURIComponent(String(requestParameters.internalOwnerId))).replace(`{${"roleId"}}`, encodeURIComponent(String(requestParameters.roleId))).replace(`{${"memberType"}}`, encodeURIComponent(String(requestParameters.memberType))).replace(`{${"memberName"}}`, encodeURIComponent(String(requestParameters.memberName))),
260
269
  method: 'PUT',
@@ -294,6 +303,9 @@ export class RoleMembershipsApi extends runtime.BaseAPI implements RoleMembershi
294
303
 
295
304
  const headerParameters: runtime.HTTPHeaders = {};
296
305
 
306
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
307
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
308
+ }
297
309
  const response = await this.request({
298
310
  path: `/api/v2/roleMemberships/{ownerType}/role/{roleId}/{memberType}/{memberName}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))).replace(`{${"roleId"}}`, encodeURIComponent(String(requestParameters.roleId))).replace(`{${"memberType"}}`, encodeURIComponent(String(requestParameters.memberType))).replace(`{${"memberName"}}`, encodeURIComponent(String(requestParameters.memberName))),
299
311
  method: 'PUT',
@@ -337,6 +349,9 @@ export class RoleMembershipsApi extends runtime.BaseAPI implements RoleMembershi
337
349
 
338
350
  const headerParameters: runtime.HTTPHeaders = {};
339
351
 
352
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
353
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
354
+ }
340
355
  const response = await this.request({
341
356
  path: `/api/v2/roleMemberships/{ownerType}/{internalOwnerId}/role/{roleId}/{memberType}/{memberName}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))).replace(`{${"internalOwnerId"}}`, encodeURIComponent(String(requestParameters.internalOwnerId))).replace(`{${"roleId"}}`, encodeURIComponent(String(requestParameters.roleId))).replace(`{${"memberType"}}`, encodeURIComponent(String(requestParameters.memberType))).replace(`{${"memberName"}}`, encodeURIComponent(String(requestParameters.memberName))),
342
357
  method: 'DELETE',
@@ -376,6 +391,9 @@ export class RoleMembershipsApi extends runtime.BaseAPI implements RoleMembershi
376
391
 
377
392
  const headerParameters: runtime.HTTPHeaders = {};
378
393
 
394
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
395
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
396
+ }
379
397
  const response = await this.request({
380
398
  path: `/api/v2/roleMemberships/{ownerType}/role/{roleId}/{memberType}/{memberName}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))).replace(`{${"roleId"}}`, encodeURIComponent(String(requestParameters.roleId))).replace(`{${"memberType"}}`, encodeURIComponent(String(requestParameters.memberType))).replace(`{${"memberName"}}`, encodeURIComponent(String(requestParameters.memberName))),
381
399
  method: 'DELETE',
@@ -16,11 +16,11 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiRoleListDTO,
19
- } from '../models';
19
+ } from '../models/index';
20
20
  import {
21
21
  ApiRoleListDTOFromJSON,
22
22
  ApiRoleListDTOToJSON,
23
- } from '../models';
23
+ } from '../models/index';
24
24
 
25
25
  /**
26
26
  * RolesApi - interface
@@ -55,6 +55,9 @@ export class RolesApi extends runtime.BaseAPI implements RolesApiInterface {
55
55
 
56
56
  const headerParameters: runtime.HTTPHeaders = {};
57
57
 
58
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
59
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
60
+ }
58
61
  const response = await this.request({
59
62
  path: `/api/v2/roles`,
60
63
  method: 'GET',
@@ -16,11 +16,11 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiThirdPartyScanResultDTO,
19
- } from '../models';
19
+ } from '../models/index';
20
20
  import {
21
21
  ApiThirdPartyScanResultDTOFromJSON,
22
22
  ApiThirdPartyScanResultDTOToJSON,
23
- } from '../models';
23
+ } from '../models/index';
24
24
 
25
25
  export interface GetScanStatusRequest {
26
26
  applicationId: string;
@@ -93,6 +93,9 @@ export class ScanApi extends runtime.BaseAPI implements ScanApiInterface {
93
93
 
94
94
  const headerParameters: runtime.HTTPHeaders = {};
95
95
 
96
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
97
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
98
+ }
96
99
  const response = await this.request({
97
100
  path: `/api/v2/scan/applications/{applicationId}/status/{scanRequestId}`.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters.applicationId))).replace(`{${"scanRequestId"}}`, encodeURIComponent(String(requestParameters.scanRequestId))),
98
101
  method: 'GET',
@@ -131,6 +134,9 @@ export class ScanApi extends runtime.BaseAPI implements ScanApiInterface {
131
134
 
132
135
  headerParameters['Content-Type'] = 'application/xml';
133
136
 
137
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
138
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
139
+ }
134
140
  const response = await this.request({
135
141
  path: `/api/v2/scan/applications/{applicationId}/sources/{source}`.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters.applicationId))).replace(`{${"source"}}`, encodeURIComponent(String(requestParameters.source))),
136
142
  method: 'POST',
@@ -18,7 +18,7 @@ import type {
18
18
  ApiSearchResultsDTOV2,
19
19
  ComponentIdentifier,
20
20
  SearchResultDTO,
21
- } from '../models';
21
+ } from '../models/index';
22
22
  import {
23
23
  ApiSearchResultsDTOV2FromJSON,
24
24
  ApiSearchResultsDTOV2ToJSON,
@@ -26,7 +26,7 @@ import {
26
26
  ComponentIdentifierToJSON,
27
27
  SearchResultDTOFromJSON,
28
28
  SearchResultDTOToJSON,
29
- } from '../models';
29
+ } from '../models/index';
30
30
 
31
31
  export interface GetExportResultsRequest {
32
32
  query?: string;
@@ -126,6 +126,9 @@ export class SearchApi extends runtime.BaseAPI implements SearchApiInterface {
126
126
 
127
127
  const headerParameters: runtime.HTTPHeaders = {};
128
128
 
129
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
130
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
131
+ }
129
132
  const response = await this.request({
130
133
  path: `/api/v2/search/advanced/index`,
131
134
  method: 'POST',
@@ -157,6 +160,9 @@ export class SearchApi extends runtime.BaseAPI implements SearchApiInterface {
157
160
 
158
161
  const headerParameters: runtime.HTTPHeaders = {};
159
162
 
163
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
164
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
165
+ }
160
166
  const response = await this.request({
161
167
  path: `/api/v2/search/advanced/export/csv`,
162
168
  method: 'GET',
@@ -196,6 +202,9 @@ export class SearchApi extends runtime.BaseAPI implements SearchApiInterface {
196
202
 
197
203
  const headerParameters: runtime.HTTPHeaders = {};
198
204
 
205
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
206
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
207
+ }
199
208
  const response = await this.request({
200
209
  path: `/api/v2/search/component`,
201
210
  method: 'GET',
@@ -236,6 +245,9 @@ export class SearchApi extends runtime.BaseAPI implements SearchApiInterface {
236
245
 
237
246
  const headerParameters: runtime.HTTPHeaders = {};
238
247
 
248
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
249
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
250
+ }
239
251
  const response = await this.request({
240
252
  path: `/api/v2/search/advanced`,
241
253
  method: 'GET',
@@ -16,11 +16,11 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiSecurityVulnerabilityOverrideResponseDTOV2,
19
- } from '../models';
19
+ } from '../models/index';
20
20
  import {
21
21
  ApiSecurityVulnerabilityOverrideResponseDTOV2FromJSON,
22
22
  ApiSecurityVulnerabilityOverrideResponseDTOV2ToJSON,
23
- } from '../models';
23
+ } from '../models/index';
24
24
 
25
25
  export interface GetSecurityVulnerabilityOverridesRequest {
26
26
  refId?: string;
@@ -76,6 +76,9 @@ export class SecurityOverridesApi extends runtime.BaseAPI implements SecurityOve
76
76
 
77
77
  const headerParameters: runtime.HTTPHeaders = {};
78
78
 
79
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
80
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
81
+ }
79
82
  const response = await this.request({
80
83
  path: `/api/v2/securityOverrides`,
81
84
  method: 'GET',
@@ -16,11 +16,11 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiSourceControlDTO,
19
- } from '../models';
19
+ } from '../models/index';
20
20
  import {
21
21
  ApiSourceControlDTOFromJSON,
22
22
  ApiSourceControlDTOToJSON,
23
- } from '../models';
23
+ } from '../models/index';
24
24
 
25
25
  export interface AddOrUpdateSourceControlRequest {
26
26
  publicId?: string;
@@ -150,6 +150,9 @@ export class SourceControlApi extends runtime.BaseAPI implements SourceControlAp
150
150
 
151
151
  const headerParameters: runtime.HTTPHeaders = {};
152
152
 
153
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
154
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
155
+ }
153
156
  const response = await this.request({
154
157
  path: `/api/v2/sourceControl`,
155
158
  method: 'POST',
@@ -184,6 +187,9 @@ export class SourceControlApi extends runtime.BaseAPI implements SourceControlAp
184
187
 
185
188
  headerParameters['Content-Type'] = 'application/json';
186
189
 
190
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
191
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
192
+ }
187
193
  const response = await this.request({
188
194
  path: `/api/v2/sourceControl/{ownerType}/{internalOwnerId}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))).replace(`{${"internalOwnerId"}}`, encodeURIComponent(String(requestParameters.internalOwnerId))),
189
195
  method: 'POST',
@@ -217,6 +223,9 @@ export class SourceControlApi extends runtime.BaseAPI implements SourceControlAp
217
223
 
218
224
  const headerParameters: runtime.HTTPHeaders = {};
219
225
 
226
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
227
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
228
+ }
220
229
  const response = await this.request({
221
230
  path: `/api/v2/sourceControl/{ownerType}/{internalOwnerId}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))).replace(`{${"internalOwnerId"}}`, encodeURIComponent(String(requestParameters.internalOwnerId))),
222
231
  method: 'DELETE',
@@ -248,6 +257,9 @@ export class SourceControlApi extends runtime.BaseAPI implements SourceControlAp
248
257
 
249
258
  const headerParameters: runtime.HTTPHeaders = {};
250
259
 
260
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
261
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
262
+ }
251
263
  const response = await this.request({
252
264
  path: `/api/v2/sourceControl/{ownerType}/{internalOwnerId}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))).replace(`{${"internalOwnerId"}}`, encodeURIComponent(String(requestParameters.internalOwnerId))),
253
265
  method: 'GET',
@@ -282,6 +294,9 @@ export class SourceControlApi extends runtime.BaseAPI implements SourceControlAp
282
294
 
283
295
  headerParameters['Content-Type'] = 'application/json';
284
296
 
297
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
298
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
299
+ }
285
300
  const response = await this.request({
286
301
  path: `/api/v2/sourceControl/{ownerType}/{internalOwnerId}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))).replace(`{${"internalOwnerId"}}`, encodeURIComponent(String(requestParameters.internalOwnerId))),
287
302
  method: 'PUT',
@@ -16,11 +16,11 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiPullRequestResults,
19
- } from '../models';
19
+ } from '../models/index';
20
20
  import {
21
21
  ApiPullRequestResultsFromJSON,
22
22
  ApiPullRequestResultsToJSON,
23
- } from '../models';
23
+ } from '../models/index';
24
24
 
25
25
  export interface GetSourceControlRequest {
26
26
  ownerType: GetSourceControlOwnerTypeEnum;
@@ -70,6 +70,9 @@ export class SourceControlMetricsApi extends runtime.BaseAPI implements SourceCo
70
70
 
71
71
  const headerParameters: runtime.HTTPHeaders = {};
72
72
 
73
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
74
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
75
+ }
73
76
  const response = await this.request({
74
77
  path: `/api/v2/sourceControlMetrics/{ownerType}/{internalOwnerId}`.replace(`{${"ownerType"}}`, encodeURIComponent(String(requestParameters.ownerType))).replace(`{${"internalOwnerId"}}`, encodeURIComponent(String(requestParameters.internalOwnerId))),
75
78
  method: 'GET',
@@ -61,6 +61,9 @@ export class TelemetryApi extends runtime.BaseAPI implements TelemetryApiInterfa
61
61
  headerParameters['user-agent'] = String(requestParameters.userAgent);
62
62
  }
63
63
 
64
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
65
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
66
+ }
64
67
  const response = await this.request({
65
68
  path: `/api/v2/telemetry`,
66
69
  method: 'POST',
@@ -17,13 +17,13 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiUserTokenDTO,
19
19
  ApiUserTokenExistsDTO,
20
- } from '../models';
20
+ } from '../models/index';
21
21
  import {
22
22
  ApiUserTokenDTOFromJSON,
23
23
  ApiUserTokenDTOToJSON,
24
24
  ApiUserTokenExistsDTOFromJSON,
25
25
  ApiUserTokenExistsDTOToJSON,
26
- } from '../models';
26
+ } from '../models/index';
27
27
 
28
28
  export interface DeleteUserTokenByUserCodeRequest {
29
29
  userCode: string;
@@ -151,6 +151,9 @@ export class UserTokensApi extends runtime.BaseAPI implements UserTokensApiInter
151
151
 
152
152
  const headerParameters: runtime.HTTPHeaders = {};
153
153
 
154
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
155
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
156
+ }
154
157
  const response = await this.request({
155
158
  path: `/api/v2/userTokens/currentUser`,
156
159
  method: 'POST',
@@ -175,6 +178,9 @@ export class UserTokensApi extends runtime.BaseAPI implements UserTokensApiInter
175
178
 
176
179
  const headerParameters: runtime.HTTPHeaders = {};
177
180
 
181
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
182
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
183
+ }
178
184
  const response = await this.request({
179
185
  path: `/api/v2/userTokens/currentUser`,
180
186
  method: 'DELETE',
@@ -202,6 +208,9 @@ export class UserTokensApi extends runtime.BaseAPI implements UserTokensApiInter
202
208
 
203
209
  const headerParameters: runtime.HTTPHeaders = {};
204
210
 
211
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
212
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
213
+ }
205
214
  const response = await this.request({
206
215
  path: `/api/v2/userTokens/userCode/{userCode}`.replace(`{${"userCode"}}`, encodeURIComponent(String(requestParameters.userCode))),
207
216
  method: 'DELETE',
@@ -233,6 +242,9 @@ export class UserTokensApi extends runtime.BaseAPI implements UserTokensApiInter
233
242
 
234
243
  const headerParameters: runtime.HTTPHeaders = {};
235
244
 
245
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
246
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
247
+ }
236
248
  const response = await this.request({
237
249
  path: `/api/v2/userTokens/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))),
238
250
  method: 'GET',
@@ -257,6 +269,9 @@ export class UserTokensApi extends runtime.BaseAPI implements UserTokensApiInter
257
269
 
258
270
  const headerParameters: runtime.HTTPHeaders = {};
259
271
 
272
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
273
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
274
+ }
260
275
  const response = await this.request({
261
276
  path: `/api/v2/userTokens/currentUser/hasToken`,
262
277
  method: 'GET',
@@ -293,6 +308,9 @@ export class UserTokensApi extends runtime.BaseAPI implements UserTokensApiInter
293
308
 
294
309
  const headerParameters: runtime.HTTPHeaders = {};
295
310
 
311
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
312
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
313
+ }
296
314
  const response = await this.request({
297
315
  path: `/api/v2/userTokens`,
298
316
  method: 'GET',
@@ -317,6 +335,9 @@ export class UserTokensApi extends runtime.BaseAPI implements UserTokensApiInter
317
335
 
318
336
  const headerParameters: runtime.HTTPHeaders = {};
319
337
 
338
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
339
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
340
+ }
320
341
  const response = await this.request({
321
342
  path: `/api/v2/userTokens/purge`,
322
343
  method: 'DELETE',
@@ -17,13 +17,13 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiUserDTO,
19
19
  ApiUserListDTO,
20
- } from '../models';
20
+ } from '../models/index';
21
21
  import {
22
22
  ApiUserDTOFromJSON,
23
23
  ApiUserDTOToJSON,
24
24
  ApiUserListDTOFromJSON,
25
25
  ApiUserListDTOToJSON,
26
- } from '../models';
26
+ } from '../models/index';
27
27
 
28
28
  export interface AddRequest {
29
29
  apiUserDTO?: ApiUserDTO;
@@ -139,6 +139,9 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
139
139
 
140
140
  headerParameters['Content-Type'] = 'application/json';
141
141
 
142
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
143
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
144
+ }
142
145
  const response = await this.request({
143
146
  path: `/api/v2/users`,
144
147
  method: 'POST',
@@ -171,6 +174,9 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
171
174
 
172
175
  const headerParameters: runtime.HTTPHeaders = {};
173
176
 
177
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
178
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
179
+ }
174
180
  const response = await this.request({
175
181
  path: `/api/v2/users/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))),
176
182
  method: 'DELETE',
@@ -202,6 +208,9 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
202
208
 
203
209
  const headerParameters: runtime.HTTPHeaders = {};
204
210
 
211
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
212
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
213
+ }
205
214
  const response = await this.request({
206
215
  path: `/api/v2/users/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))),
207
216
  method: 'GET',
@@ -230,6 +239,9 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
230
239
 
231
240
  const headerParameters: runtime.HTTPHeaders = {};
232
241
 
242
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
243
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
244
+ }
233
245
  const response = await this.request({
234
246
  path: `/api/v2/users`,
235
247
  method: 'GET',
@@ -260,6 +272,9 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
260
272
 
261
273
  headerParameters['Content-Type'] = 'application/json';
262
274
 
275
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
276
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
277
+ }
263
278
  const response = await this.request({
264
279
  path: `/api/v2/users/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))),
265
280
  method: 'PUT',
@@ -17,13 +17,13 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  ComponentIdentifier,
19
19
  SecurityVulnerabilityData,
20
- } from '../models';
20
+ } from '../models/index';
21
21
  import {
22
22
  ComponentIdentifierFromJSON,
23
23
  ComponentIdentifierToJSON,
24
24
  SecurityVulnerabilityDataFromJSON,
25
25
  SecurityVulnerabilityDataToJSON,
26
- } from '../models';
26
+ } from '../models/index';
27
27
 
28
28
  export interface GetSecurityVulnerabilityDetailsRequest {
29
29
  refId: string;
@@ -97,6 +97,9 @@ export class VulnerabilitiesApi extends runtime.BaseAPI implements Vulnerabiliti
97
97
 
98
98
  const headerParameters: runtime.HTTPHeaders = {};
99
99
 
100
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
101
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
102
+ }
100
103
  const response = await this.request({
101
104
  path: `/api/v2/vulnerabilities/{refId}`.replace(`{${"refId"}}`, encodeURIComponent(String(requestParameters.refId))),
102
105
  method: 'GET',
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './runtime';
4
- export * from './apis';
5
- export * from './models';
4
+ export * from './apis/index';
5
+ export * from './models/index';
package/src/runtime.ts CHANGED
@@ -172,14 +172,20 @@ export class BaseAPI {
172
172
  }))
173
173
  };
174
174
 
175
+ let body: any;
176
+ if (isFormData(overriddenInit.body)
177
+ || (overriddenInit.body instanceof URLSearchParams)
178
+ || isBlob(overriddenInit.body)) {
179
+ body = overriddenInit.body;
180
+ } else if (this.isJsonMime(headers['Content-Type'])) {
181
+ body = JSON.stringify(overriddenInit.body);
182
+ } else {
183
+ body = overriddenInit.body;
184
+ }
185
+
175
186
  const init: RequestInit = {
176
187
  ...overriddenInit,
177
- body:
178
- isFormData(overriddenInit.body) ||
179
- overriddenInit.body instanceof URLSearchParams ||
180
- isBlob(overriddenInit.body)
181
- ? overriddenInit.body
182
- : JSON.stringify(overriddenInit.body),
188
+ body
183
189
  };
184
190
 
185
191
  return { url, init };