@sonatype/nexus-repo-api-client 3.96.0 → 3.96.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 (32) hide show
  1. package/.openapi-generator/FILES +3 -0
  2. package/dist/apis/SecurityManagementJWTApi.d.ts +25 -0
  3. package/dist/apis/SecurityManagementJWTApi.js +60 -0
  4. package/dist/apis/SecurityOAuth2OIDCApi.d.ts +45 -0
  5. package/dist/apis/SecurityOAuth2OIDCApi.js +123 -0
  6. package/dist/apis/index.d.ts +2 -0
  7. package/dist/apis/index.js +2 -0
  8. package/dist/esm/apis/SecurityManagementJWTApi.d.ts +25 -0
  9. package/dist/esm/apis/SecurityManagementJWTApi.js +56 -0
  10. package/dist/esm/apis/SecurityOAuth2OIDCApi.d.ts +45 -0
  11. package/dist/esm/apis/SecurityOAuth2OIDCApi.js +119 -0
  12. package/dist/esm/apis/index.d.ts +2 -0
  13. package/dist/esm/apis/index.js +2 -0
  14. package/dist/esm/models/OAuth2OidcConfigurationXO.d.ts +134 -0
  15. package/dist/esm/models/OAuth2OidcConfigurationXO.js +77 -0
  16. package/dist/esm/models/RawProxyApiRepository.d.ts +7 -0
  17. package/dist/esm/models/RawProxyApiRepository.js +3 -0
  18. package/dist/esm/models/index.d.ts +1 -0
  19. package/dist/esm/models/index.js +1 -0
  20. package/dist/models/OAuth2OidcConfigurationXO.d.ts +134 -0
  21. package/dist/models/OAuth2OidcConfigurationXO.js +84 -0
  22. package/dist/models/RawProxyApiRepository.d.ts +7 -0
  23. package/dist/models/RawProxyApiRepository.js +3 -0
  24. package/dist/models/index.d.ts +1 -0
  25. package/dist/models/index.js +1 -0
  26. package/package.json +1 -1
  27. package/src/apis/SecurityManagementJWTApi.ts +54 -0
  28. package/src/apis/SecurityOAuth2OIDCApi.ts +138 -0
  29. package/src/apis/index.ts +2 -0
  30. package/src/models/OAuth2OidcConfigurationXO.ts +195 -0
  31. package/src/models/RawProxyApiRepository.ts +15 -0
  32. package/src/models/index.ts +1 -0
@@ -36,6 +36,7 @@ src/apis/SecurityManagementAPIAccessApi.ts
36
36
  src/apis/SecurityManagementAnonymousAccessApi.ts
37
37
  src/apis/SecurityManagementApi.ts
38
38
  src/apis/SecurityManagementApiKeysPrincipalsEncryptionApi.ts
39
+ src/apis/SecurityManagementJWTApi.ts
39
40
  src/apis/SecurityManagementLDAPApi.ts
40
41
  src/apis/SecurityManagementPrivilegesApi.ts
41
42
  src/apis/SecurityManagementRealmsApi.ts
@@ -47,6 +48,7 @@ src/apis/SecurityManagementSSRFProtectionApi.ts
47
48
  src/apis/SecurityManagementSecretsEncryptionApi.ts
48
49
  src/apis/SecurityManagementUserTokensApi.ts
49
50
  src/apis/SecurityManagementUsersApi.ts
51
+ src/apis/SecurityOAuth2OIDCApi.ts
50
52
  src/apis/StagingApi.ts
51
53
  src/apis/StatusApi.ts
52
54
  src/apis/SupportApi.ts
@@ -259,6 +261,7 @@ src/models/NugetHostedApiRepository.ts
259
261
  src/models/NugetHostedRepositoryApiRequest.ts
260
262
  src/models/NugetProxyApiRepository.ts
261
263
  src/models/NugetProxyRepositoryApiRequest.ts
264
+ src/models/OAuth2OidcConfigurationXO.ts
262
265
  src/models/OciAttributes.ts
263
266
  src/models/OciCosignConfiguration.ts
264
267
  src/models/OciGroupApiRepository.ts
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Sonatype Nexus Repository Manager
3
+ * This documents the available APIs into [Sonatype Nexus Repository Manager](https://www.sonatype.com/products/sonatype-nexus-repository) as of version 3.96.0-09.
4
+ *
5
+ * The version of the OpenAPI document: 3.96.0-09
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ /**
14
+ *
15
+ */
16
+ export declare class SecurityManagementJWTApi extends runtime.BaseAPI {
17
+ /**
18
+ * Reset JWT secret (note that session will be expired for the all logged-in users)
19
+ */
20
+ updateSecurityJwtRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
21
+ /**
22
+ * Reset JWT secret (note that session will be expired for the all logged-in users)
23
+ */
24
+ updateSecurityJwt(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
25
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Sonatype Nexus Repository Manager
6
+ * This documents the available APIs into [Sonatype Nexus Repository Manager](https://www.sonatype.com/products/sonatype-nexus-repository) as of version 3.96.0-09.
7
+ *
8
+ * The version of the OpenAPI document: 3.96.0-09
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.SecurityManagementJWTApi = void 0;
26
+ const runtime = require("../runtime");
27
+ /**
28
+ *
29
+ */
30
+ class SecurityManagementJWTApi extends runtime.BaseAPI {
31
+ /**
32
+ * Reset JWT secret (note that session will be expired for the all logged-in users)
33
+ */
34
+ updateSecurityJwtRaw(initOverrides) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ const queryParameters = {};
37
+ const headerParameters = {};
38
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
39
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
40
+ }
41
+ let urlPath = `/v1/security/jwt`;
42
+ const response = yield this.request({
43
+ path: urlPath,
44
+ method: 'PUT',
45
+ headers: headerParameters,
46
+ query: queryParameters,
47
+ }, initOverrides);
48
+ return new runtime.VoidApiResponse(response);
49
+ });
50
+ }
51
+ /**
52
+ * Reset JWT secret (note that session will be expired for the all logged-in users)
53
+ */
54
+ updateSecurityJwt(initOverrides) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ yield this.updateSecurityJwtRaw(initOverrides);
57
+ });
58
+ }
59
+ }
60
+ exports.SecurityManagementJWTApi = SecurityManagementJWTApi;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Sonatype Nexus Repository Manager
3
+ * This documents the available APIs into [Sonatype Nexus Repository Manager](https://www.sonatype.com/products/sonatype-nexus-repository) as of version 3.96.0-09.
4
+ *
5
+ * The version of the OpenAPI document: 3.96.0-09
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { OAuth2OidcConfigurationXO } from '../models/index';
14
+ export interface SecurityOAuth2OIDCApiUpdateSecurityOauth2Request {
15
+ oAuth2OidcConfigurationXO: OAuth2OidcConfigurationXO;
16
+ }
17
+ /**
18
+ *
19
+ */
20
+ export declare class SecurityOAuth2OIDCApi extends runtime.BaseAPI {
21
+ /**
22
+ * Remove OAuth2/OIDC configuration
23
+ */
24
+ deleteSecurityOauth2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
25
+ /**
26
+ * Remove OAuth2/OIDC configuration
27
+ */
28
+ deleteSecurityOauth2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
29
+ /**
30
+ * Retrieve the current OAuth2/OIDC configuration
31
+ */
32
+ listSecurityOauth2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuth2OidcConfigurationXO>>;
33
+ /**
34
+ * Retrieve the current OAuth2/OIDC configuration
35
+ */
36
+ listSecurityOauth2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuth2OidcConfigurationXO>;
37
+ /**
38
+ * Create or update OAuth2/OIDC configuration
39
+ */
40
+ updateSecurityOauth2Raw(requestParameters: SecurityOAuth2OIDCApiUpdateSecurityOauth2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
41
+ /**
42
+ * Create or update OAuth2/OIDC configuration
43
+ */
44
+ updateSecurityOauth2(requestParameters: SecurityOAuth2OIDCApiUpdateSecurityOauth2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
45
+ }
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Sonatype Nexus Repository Manager
6
+ * This documents the available APIs into [Sonatype Nexus Repository Manager](https://www.sonatype.com/products/sonatype-nexus-repository) as of version 3.96.0-09.
7
+ *
8
+ * The version of the OpenAPI document: 3.96.0-09
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.SecurityOAuth2OIDCApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class SecurityOAuth2OIDCApi extends runtime.BaseAPI {
32
+ /**
33
+ * Remove OAuth2/OIDC configuration
34
+ */
35
+ deleteSecurityOauth2Raw(initOverrides) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
40
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
41
+ }
42
+ let urlPath = `/v1/security/oauth2`;
43
+ const response = yield this.request({
44
+ path: urlPath,
45
+ method: 'DELETE',
46
+ headers: headerParameters,
47
+ query: queryParameters,
48
+ }, initOverrides);
49
+ return new runtime.VoidApiResponse(response);
50
+ });
51
+ }
52
+ /**
53
+ * Remove OAuth2/OIDC configuration
54
+ */
55
+ deleteSecurityOauth2(initOverrides) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ yield this.deleteSecurityOauth2Raw(initOverrides);
58
+ });
59
+ }
60
+ /**
61
+ * Retrieve the current OAuth2/OIDC configuration
62
+ */
63
+ listSecurityOauth2Raw(initOverrides) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const queryParameters = {};
66
+ const headerParameters = {};
67
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
68
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
69
+ }
70
+ let urlPath = `/v1/security/oauth2`;
71
+ const response = yield this.request({
72
+ path: urlPath,
73
+ method: 'GET',
74
+ headers: headerParameters,
75
+ query: queryParameters,
76
+ }, initOverrides);
77
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OAuth2OidcConfigurationXOFromJSON)(jsonValue));
78
+ });
79
+ }
80
+ /**
81
+ * Retrieve the current OAuth2/OIDC configuration
82
+ */
83
+ listSecurityOauth2(initOverrides) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ const response = yield this.listSecurityOauth2Raw(initOverrides);
86
+ return yield response.value();
87
+ });
88
+ }
89
+ /**
90
+ * Create or update OAuth2/OIDC configuration
91
+ */
92
+ updateSecurityOauth2Raw(requestParameters, initOverrides) {
93
+ return __awaiter(this, void 0, void 0, function* () {
94
+ if (requestParameters['oAuth2OidcConfigurationXO'] == null) {
95
+ throw new runtime.RequiredError('oAuth2OidcConfigurationXO', 'Required parameter "oAuth2OidcConfigurationXO" was null or undefined when calling updateSecurityOauth2().');
96
+ }
97
+ const queryParameters = {};
98
+ const headerParameters = {};
99
+ headerParameters['Content-Type'] = 'application/json';
100
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
101
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
102
+ }
103
+ let urlPath = `/v1/security/oauth2`;
104
+ const response = yield this.request({
105
+ path: urlPath,
106
+ method: 'PUT',
107
+ headers: headerParameters,
108
+ query: queryParameters,
109
+ body: (0, index_1.OAuth2OidcConfigurationXOToJSON)(requestParameters['oAuth2OidcConfigurationXO']),
110
+ }, initOverrides);
111
+ return new runtime.VoidApiResponse(response);
112
+ });
113
+ }
114
+ /**
115
+ * Create or update OAuth2/OIDC configuration
116
+ */
117
+ updateSecurityOauth2(requestParameters, initOverrides) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ yield this.updateSecurityOauth2Raw(requestParameters, initOverrides);
120
+ });
121
+ }
122
+ }
123
+ exports.SecurityOAuth2OIDCApi = SecurityOAuth2OIDCApi;
@@ -31,6 +31,7 @@ export * from './SecurityManagementApi';
31
31
  export * from './SecurityManagementAPIAccessApi';
32
32
  export * from './SecurityManagementAnonymousAccessApi';
33
33
  export * from './SecurityManagementApiKeysPrincipalsEncryptionApi';
34
+ export * from './SecurityManagementJWTApi';
34
35
  export * from './SecurityManagementLDAPApi';
35
36
  export * from './SecurityManagementPrivilegesApi';
36
37
  export * from './SecurityManagementRealmsApi';
@@ -42,6 +43,7 @@ export * from './SecurityManagementSSRFProtectionApi';
42
43
  export * from './SecurityManagementSecretsEncryptionApi';
43
44
  export * from './SecurityManagementUserTokensApi';
44
45
  export * from './SecurityManagementUsersApi';
46
+ export * from './SecurityOAuth2OIDCApi';
45
47
  export * from './StagingApi';
46
48
  export * from './StatusApi';
47
49
  export * from './SupportApi';
@@ -49,6 +49,7 @@ __exportStar(require("./SecurityManagementApi"), exports);
49
49
  __exportStar(require("./SecurityManagementAPIAccessApi"), exports);
50
50
  __exportStar(require("./SecurityManagementAnonymousAccessApi"), exports);
51
51
  __exportStar(require("./SecurityManagementApiKeysPrincipalsEncryptionApi"), exports);
52
+ __exportStar(require("./SecurityManagementJWTApi"), exports);
52
53
  __exportStar(require("./SecurityManagementLDAPApi"), exports);
53
54
  __exportStar(require("./SecurityManagementPrivilegesApi"), exports);
54
55
  __exportStar(require("./SecurityManagementRealmsApi"), exports);
@@ -60,6 +61,7 @@ __exportStar(require("./SecurityManagementSSRFProtectionApi"), exports);
60
61
  __exportStar(require("./SecurityManagementSecretsEncryptionApi"), exports);
61
62
  __exportStar(require("./SecurityManagementUserTokensApi"), exports);
62
63
  __exportStar(require("./SecurityManagementUsersApi"), exports);
64
+ __exportStar(require("./SecurityOAuth2OIDCApi"), exports);
63
65
  __exportStar(require("./StagingApi"), exports);
64
66
  __exportStar(require("./StatusApi"), exports);
65
67
  __exportStar(require("./SupportApi"), exports);
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Sonatype Nexus Repository Manager
3
+ * This documents the available APIs into [Sonatype Nexus Repository Manager](https://www.sonatype.com/products/sonatype-nexus-repository) as of version 3.96.0-09.
4
+ *
5
+ * The version of the OpenAPI document: 3.96.0-09
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ /**
14
+ *
15
+ */
16
+ export declare class SecurityManagementJWTApi extends runtime.BaseAPI {
17
+ /**
18
+ * Reset JWT secret (note that session will be expired for the all logged-in users)
19
+ */
20
+ updateSecurityJwtRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
21
+ /**
22
+ * Reset JWT secret (note that session will be expired for the all logged-in users)
23
+ */
24
+ updateSecurityJwt(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
25
+ }
@@ -0,0 +1,56 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sonatype Nexus Repository Manager
5
+ * This documents the available APIs into [Sonatype Nexus Repository Manager](https://www.sonatype.com/products/sonatype-nexus-repository) as of version 3.96.0-09.
6
+ *
7
+ * The version of the OpenAPI document: 3.96.0-09
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ /**
25
+ *
26
+ */
27
+ export class SecurityManagementJWTApi extends runtime.BaseAPI {
28
+ /**
29
+ * Reset JWT secret (note that session will be expired for the all logged-in users)
30
+ */
31
+ updateSecurityJwtRaw(initOverrides) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const queryParameters = {};
34
+ const headerParameters = {};
35
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
36
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
37
+ }
38
+ let urlPath = `/v1/security/jwt`;
39
+ const response = yield this.request({
40
+ path: urlPath,
41
+ method: 'PUT',
42
+ headers: headerParameters,
43
+ query: queryParameters,
44
+ }, initOverrides);
45
+ return new runtime.VoidApiResponse(response);
46
+ });
47
+ }
48
+ /**
49
+ * Reset JWT secret (note that session will be expired for the all logged-in users)
50
+ */
51
+ updateSecurityJwt(initOverrides) {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ yield this.updateSecurityJwtRaw(initOverrides);
54
+ });
55
+ }
56
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Sonatype Nexus Repository Manager
3
+ * This documents the available APIs into [Sonatype Nexus Repository Manager](https://www.sonatype.com/products/sonatype-nexus-repository) as of version 3.96.0-09.
4
+ *
5
+ * The version of the OpenAPI document: 3.96.0-09
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { OAuth2OidcConfigurationXO } from '../models/index';
14
+ export interface SecurityOAuth2OIDCApiUpdateSecurityOauth2Request {
15
+ oAuth2OidcConfigurationXO: OAuth2OidcConfigurationXO;
16
+ }
17
+ /**
18
+ *
19
+ */
20
+ export declare class SecurityOAuth2OIDCApi extends runtime.BaseAPI {
21
+ /**
22
+ * Remove OAuth2/OIDC configuration
23
+ */
24
+ deleteSecurityOauth2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
25
+ /**
26
+ * Remove OAuth2/OIDC configuration
27
+ */
28
+ deleteSecurityOauth2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
29
+ /**
30
+ * Retrieve the current OAuth2/OIDC configuration
31
+ */
32
+ listSecurityOauth2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OAuth2OidcConfigurationXO>>;
33
+ /**
34
+ * Retrieve the current OAuth2/OIDC configuration
35
+ */
36
+ listSecurityOauth2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OAuth2OidcConfigurationXO>;
37
+ /**
38
+ * Create or update OAuth2/OIDC configuration
39
+ */
40
+ updateSecurityOauth2Raw(requestParameters: SecurityOAuth2OIDCApiUpdateSecurityOauth2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
41
+ /**
42
+ * Create or update OAuth2/OIDC configuration
43
+ */
44
+ updateSecurityOauth2(requestParameters: SecurityOAuth2OIDCApiUpdateSecurityOauth2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
45
+ }
@@ -0,0 +1,119 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Sonatype Nexus Repository Manager
5
+ * This documents the available APIs into [Sonatype Nexus Repository Manager](https://www.sonatype.com/products/sonatype-nexus-repository) as of version 3.96.0-09.
6
+ *
7
+ * The version of the OpenAPI document: 3.96.0-09
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { OAuth2OidcConfigurationXOFromJSON, OAuth2OidcConfigurationXOToJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class SecurityOAuth2OIDCApi extends runtime.BaseAPI {
29
+ /**
30
+ * Remove OAuth2/OIDC configuration
31
+ */
32
+ deleteSecurityOauth2Raw(initOverrides) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const queryParameters = {};
35
+ const headerParameters = {};
36
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
37
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
38
+ }
39
+ let urlPath = `/v1/security/oauth2`;
40
+ const response = yield this.request({
41
+ path: urlPath,
42
+ method: 'DELETE',
43
+ headers: headerParameters,
44
+ query: queryParameters,
45
+ }, initOverrides);
46
+ return new runtime.VoidApiResponse(response);
47
+ });
48
+ }
49
+ /**
50
+ * Remove OAuth2/OIDC configuration
51
+ */
52
+ deleteSecurityOauth2(initOverrides) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ yield this.deleteSecurityOauth2Raw(initOverrides);
55
+ });
56
+ }
57
+ /**
58
+ * Retrieve the current OAuth2/OIDC configuration
59
+ */
60
+ listSecurityOauth2Raw(initOverrides) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const queryParameters = {};
63
+ const headerParameters = {};
64
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
65
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
66
+ }
67
+ let urlPath = `/v1/security/oauth2`;
68
+ const response = yield this.request({
69
+ path: urlPath,
70
+ method: 'GET',
71
+ headers: headerParameters,
72
+ query: queryParameters,
73
+ }, initOverrides);
74
+ return new runtime.JSONApiResponse(response, (jsonValue) => OAuth2OidcConfigurationXOFromJSON(jsonValue));
75
+ });
76
+ }
77
+ /**
78
+ * Retrieve the current OAuth2/OIDC configuration
79
+ */
80
+ listSecurityOauth2(initOverrides) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ const response = yield this.listSecurityOauth2Raw(initOverrides);
83
+ return yield response.value();
84
+ });
85
+ }
86
+ /**
87
+ * Create or update OAuth2/OIDC configuration
88
+ */
89
+ updateSecurityOauth2Raw(requestParameters, initOverrides) {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ if (requestParameters['oAuth2OidcConfigurationXO'] == null) {
92
+ throw new runtime.RequiredError('oAuth2OidcConfigurationXO', 'Required parameter "oAuth2OidcConfigurationXO" was null or undefined when calling updateSecurityOauth2().');
93
+ }
94
+ const queryParameters = {};
95
+ const headerParameters = {};
96
+ headerParameters['Content-Type'] = 'application/json';
97
+ if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
98
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
99
+ }
100
+ let urlPath = `/v1/security/oauth2`;
101
+ const response = yield this.request({
102
+ path: urlPath,
103
+ method: 'PUT',
104
+ headers: headerParameters,
105
+ query: queryParameters,
106
+ body: OAuth2OidcConfigurationXOToJSON(requestParameters['oAuth2OidcConfigurationXO']),
107
+ }, initOverrides);
108
+ return new runtime.VoidApiResponse(response);
109
+ });
110
+ }
111
+ /**
112
+ * Create or update OAuth2/OIDC configuration
113
+ */
114
+ updateSecurityOauth2(requestParameters, initOverrides) {
115
+ return __awaiter(this, void 0, void 0, function* () {
116
+ yield this.updateSecurityOauth2Raw(requestParameters, initOverrides);
117
+ });
118
+ }
119
+ }
@@ -31,6 +31,7 @@ export * from './SecurityManagementApi';
31
31
  export * from './SecurityManagementAPIAccessApi';
32
32
  export * from './SecurityManagementAnonymousAccessApi';
33
33
  export * from './SecurityManagementApiKeysPrincipalsEncryptionApi';
34
+ export * from './SecurityManagementJWTApi';
34
35
  export * from './SecurityManagementLDAPApi';
35
36
  export * from './SecurityManagementPrivilegesApi';
36
37
  export * from './SecurityManagementRealmsApi';
@@ -42,6 +43,7 @@ export * from './SecurityManagementSSRFProtectionApi';
42
43
  export * from './SecurityManagementSecretsEncryptionApi';
43
44
  export * from './SecurityManagementUserTokensApi';
44
45
  export * from './SecurityManagementUsersApi';
46
+ export * from './SecurityOAuth2OIDCApi';
45
47
  export * from './StagingApi';
46
48
  export * from './StatusApi';
47
49
  export * from './SupportApi';
@@ -33,6 +33,7 @@ export * from './SecurityManagementApi';
33
33
  export * from './SecurityManagementAPIAccessApi';
34
34
  export * from './SecurityManagementAnonymousAccessApi';
35
35
  export * from './SecurityManagementApiKeysPrincipalsEncryptionApi';
36
+ export * from './SecurityManagementJWTApi';
36
37
  export * from './SecurityManagementLDAPApi';
37
38
  export * from './SecurityManagementPrivilegesApi';
38
39
  export * from './SecurityManagementRealmsApi';
@@ -44,6 +45,7 @@ export * from './SecurityManagementSSRFProtectionApi';
44
45
  export * from './SecurityManagementSecretsEncryptionApi';
45
46
  export * from './SecurityManagementUserTokensApi';
46
47
  export * from './SecurityManagementUsersApi';
48
+ export * from './SecurityOAuth2OIDCApi';
47
49
  export * from './StagingApi';
48
50
  export * from './StatusApi';
49
51
  export * from './SupportApi';