@equisoft/account-service-sdk-typescript 8.1.1-snapshot.20250203132606 → 8.1.1-snapshot.20250207203843
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +1 -0
- package/dist/apis/OrganizationApi.d.ts +24 -1
- package/dist/apis/OrganizationApi.js +75 -0
- package/dist/apis/ServiceAccountApi.d.ts +7 -5
- package/dist/apis/ServiceAccountApi.js +9 -7
- package/dist/apis/UserApi.d.ts +17 -3
- package/dist/apis/UserApi.js +50 -7
- package/dist/esm/apis/OrganizationApi.d.ts +24 -1
- package/dist/esm/apis/OrganizationApi.js +76 -1
- package/dist/esm/apis/ServiceAccountApi.d.ts +7 -5
- package/dist/esm/apis/ServiceAccountApi.js +9 -7
- package/dist/esm/apis/UserApi.d.ts +17 -3
- package/dist/esm/apis/UserApi.js +50 -7
- package/dist/esm/models/OrganizationApplicableServiceProfiles.d.ts +37 -0
- package/dist/esm/models/OrganizationApplicableServiceProfiles.js +44 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/OrganizationApplicableServiceProfiles.d.ts +37 -0
- package/dist/models/OrganizationApplicableServiceProfiles.js +50 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/OrganizationApi.ts +103 -0
- package/src/apis/ServiceAccountApi.ts +10 -8
- package/src/apis/UserApi.ts +67 -8
- package/src/models/OrganizationApplicableServiceProfiles.ts +70 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -35,6 +35,7 @@ src/models/OAuthClient.ts
|
|
|
35
35
|
src/models/OAuthClientCreated.ts
|
|
36
36
|
src/models/OAuthClientPublicKey.ts
|
|
37
37
|
src/models/Organization.ts
|
|
38
|
+
src/models/OrganizationApplicableServiceProfiles.ts
|
|
38
39
|
src/models/OrganizationCreated.ts
|
|
39
40
|
src/models/OrganizationPathElement.ts
|
|
40
41
|
src/models/OrganizationRoleAttribution.ts
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateOrUpdateOrganizationPayload, CreateOrganizationPayload, CreateOrganizationUserServiceOptionPayload, CreateOrganizationUserServicePayload, CreateRole, ListUserOrganizations, Organization, OrganizationCreated, OrganizationRoleAttributions, OrganizationSsoProvider, OrganizationUserServiceAssociation, RoleCreated, UpdateParentOrganizationPayload, UpsertServicePayload, UserAccountSearchResult } from '../models/index';
|
|
13
|
+
import type { CreateOrUpdateOrganizationPayload, CreateOrganizationPayload, CreateOrganizationUserServiceOptionPayload, CreateOrganizationUserServicePayload, CreateRole, ListUserOrganizations, Organization, OrganizationApplicableServiceProfiles, OrganizationCreated, OrganizationRoleAttributions, OrganizationSsoProvider, OrganizationUserServiceAssociation, RoleCreated, UpdateParentOrganizationPayload, UpsertServicePayload, UserAccountSearchResult } from '../models/index';
|
|
14
14
|
export interface ActivateUserServiceRequest {
|
|
15
15
|
uuid: string;
|
|
16
16
|
userUuid: string;
|
|
@@ -51,6 +51,13 @@ export interface DeactivateUserServiceRequest {
|
|
|
51
51
|
export interface DeleteOrganizationRequest {
|
|
52
52
|
uuid: string;
|
|
53
53
|
}
|
|
54
|
+
export interface GetApplicableServiceProfilesRequest {
|
|
55
|
+
uuid: string;
|
|
56
|
+
}
|
|
57
|
+
export interface GetApplicableServiceProfilesByServiceCodeRequest {
|
|
58
|
+
uuid: string;
|
|
59
|
+
serviceCode: string;
|
|
60
|
+
}
|
|
54
61
|
export interface GetOrganizationRequest {
|
|
55
62
|
uuid: string;
|
|
56
63
|
}
|
|
@@ -180,6 +187,22 @@ export declare class OrganizationApi extends runtime.BaseAPI {
|
|
|
180
187
|
* Delete organization
|
|
181
188
|
*/
|
|
182
189
|
deleteOrganization(requestParameters: DeleteOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
190
|
+
/**
|
|
191
|
+
* Get applicable service profiles for an organization.
|
|
192
|
+
*/
|
|
193
|
+
getApplicableServiceProfilesRaw(requestParameters: GetApplicableServiceProfilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OrganizationApplicableServiceProfiles>>>;
|
|
194
|
+
/**
|
|
195
|
+
* Get applicable service profiles for an organization.
|
|
196
|
+
*/
|
|
197
|
+
getApplicableServiceProfiles(requestParameters: GetApplicableServiceProfilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OrganizationApplicableServiceProfiles>>;
|
|
198
|
+
/**
|
|
199
|
+
* Get applicable service profiles by service code for an organization.
|
|
200
|
+
*/
|
|
201
|
+
getApplicableServiceProfilesByServiceCodeRaw(requestParameters: GetApplicableServiceProfilesByServiceCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<string>>>;
|
|
202
|
+
/**
|
|
203
|
+
* Get applicable service profiles by service code for an organization.
|
|
204
|
+
*/
|
|
205
|
+
getApplicableServiceProfilesByServiceCode(requestParameters: GetApplicableServiceProfilesByServiceCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
|
|
183
206
|
/**
|
|
184
207
|
* Get detailed information about an organization.
|
|
185
208
|
*/
|
|
@@ -399,6 +399,81 @@ class OrganizationApi extends runtime.BaseAPI {
|
|
|
399
399
|
yield this.deleteOrganizationRaw(requestParameters, initOverrides);
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* Get applicable service profiles for an organization.
|
|
404
|
+
*/
|
|
405
|
+
getApplicableServiceProfilesRaw(requestParameters, initOverrides) {
|
|
406
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
407
|
+
if (requestParameters['uuid'] == null) {
|
|
408
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling getApplicableServiceProfiles().');
|
|
409
|
+
}
|
|
410
|
+
const queryParameters = {};
|
|
411
|
+
const headerParameters = {};
|
|
412
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
413
|
+
// oauth required
|
|
414
|
+
const token = this.configuration.accessToken;
|
|
415
|
+
const tokenString = yield token("OAuth2", ["account:organization"]);
|
|
416
|
+
if (tokenString) {
|
|
417
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
const response = yield this.request({
|
|
421
|
+
path: `/organizations/{uuid}/serviceProfiles`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
422
|
+
method: 'GET',
|
|
423
|
+
headers: headerParameters,
|
|
424
|
+
query: queryParameters,
|
|
425
|
+
}, initOverrides);
|
|
426
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.OrganizationApplicableServiceProfilesFromJSON));
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Get applicable service profiles for an organization.
|
|
431
|
+
*/
|
|
432
|
+
getApplicableServiceProfiles(requestParameters, initOverrides) {
|
|
433
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
434
|
+
const response = yield this.getApplicableServiceProfilesRaw(requestParameters, initOverrides);
|
|
435
|
+
return yield response.value();
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Get applicable service profiles by service code for an organization.
|
|
440
|
+
*/
|
|
441
|
+
getApplicableServiceProfilesByServiceCodeRaw(requestParameters, initOverrides) {
|
|
442
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
443
|
+
if (requestParameters['uuid'] == null) {
|
|
444
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling getApplicableServiceProfilesByServiceCode().');
|
|
445
|
+
}
|
|
446
|
+
if (requestParameters['serviceCode'] == null) {
|
|
447
|
+
throw new runtime.RequiredError('serviceCode', 'Required parameter "serviceCode" was null or undefined when calling getApplicableServiceProfilesByServiceCode().');
|
|
448
|
+
}
|
|
449
|
+
const queryParameters = {};
|
|
450
|
+
const headerParameters = {};
|
|
451
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
452
|
+
// oauth required
|
|
453
|
+
const token = this.configuration.accessToken;
|
|
454
|
+
const tokenString = yield token("OAuth2", ["account:organization"]);
|
|
455
|
+
if (tokenString) {
|
|
456
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
const response = yield this.request({
|
|
460
|
+
path: `/organizations/{uuid}/serviceProfiles/{serviceCode}`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))).replace(`{${"serviceCode"}}`, encodeURIComponent(String(requestParameters['serviceCode']))),
|
|
461
|
+
method: 'GET',
|
|
462
|
+
headers: headerParameters,
|
|
463
|
+
query: queryParameters,
|
|
464
|
+
}, initOverrides);
|
|
465
|
+
return new runtime.JSONApiResponse(response);
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Get applicable service profiles by service code for an organization.
|
|
470
|
+
*/
|
|
471
|
+
getApplicableServiceProfilesByServiceCode(requestParameters, initOverrides) {
|
|
472
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
473
|
+
const response = yield this.getApplicableServiceProfilesByServiceCodeRaw(requestParameters, initOverrides);
|
|
474
|
+
return yield response.value();
|
|
475
|
+
});
|
|
476
|
+
}
|
|
402
477
|
/**
|
|
403
478
|
* Get detailed information about an organization.
|
|
404
479
|
*/
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import type { ApplyPermissionsPayload, PermissionList, ServiceAccountCreationSchema, ServiceAccountSchema, ServiceAccountUpdateSchema, ServiceAccountUuidSchema } from '../models/index';
|
|
14
|
-
export interface
|
|
14
|
+
export interface ApplyServiceAccountPermissionsOnResourceRequest {
|
|
15
15
|
uuid: string;
|
|
16
16
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
17
17
|
}
|
|
@@ -33,13 +33,15 @@ export interface UpdateServiceAccountRequest {
|
|
|
33
33
|
*/
|
|
34
34
|
export declare class ServiceAccountApi extends runtime.BaseAPI {
|
|
35
35
|
/**
|
|
36
|
-
* Get permissions of a service account on a user or an organization.
|
|
36
|
+
* Get permissions of a service account on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
37
|
+
* @deprecated
|
|
37
38
|
*/
|
|
38
|
-
|
|
39
|
+
applyServiceAccountPermissionsOnResourceRaw(requestParameters: ApplyServiceAccountPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
39
40
|
/**
|
|
40
|
-
* Get permissions of a service account on a user or an organization.
|
|
41
|
+
* Get permissions of a service account on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
42
|
+
* @deprecated
|
|
41
43
|
*/
|
|
42
|
-
|
|
44
|
+
applyServiceAccountPermissionsOnResource(requestParameters: ApplyServiceAccountPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
|
|
43
45
|
/**
|
|
44
46
|
* Creates a new service account
|
|
45
47
|
*/
|
|
@@ -30,15 +30,16 @@ const index_1 = require("../models/index");
|
|
|
30
30
|
*/
|
|
31
31
|
class ServiceAccountApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
|
-
* Get permissions of a service account on a user or an organization.
|
|
33
|
+
* Get permissions of a service account on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
34
|
+
* @deprecated
|
|
34
35
|
*/
|
|
35
|
-
|
|
36
|
+
applyServiceAccountPermissionsOnResourceRaw(requestParameters, initOverrides) {
|
|
36
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
38
|
if (requestParameters['uuid'] == null) {
|
|
38
|
-
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling
|
|
39
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyServiceAccountPermissionsOnResource().');
|
|
39
40
|
}
|
|
40
41
|
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
41
|
-
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling
|
|
42
|
+
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyServiceAccountPermissionsOnResource().');
|
|
42
43
|
}
|
|
43
44
|
const queryParameters = {};
|
|
44
45
|
const headerParameters = {};
|
|
@@ -62,11 +63,12 @@ class ServiceAccountApi extends runtime.BaseAPI {
|
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
/**
|
|
65
|
-
* Get permissions of a service account on a user or an organization.
|
|
66
|
+
* Get permissions of a service account on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
67
|
+
* @deprecated
|
|
66
68
|
*/
|
|
67
|
-
|
|
69
|
+
applyServiceAccountPermissionsOnResource(requestParameters, initOverrides) {
|
|
68
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
const response = yield this.
|
|
71
|
+
const response = yield this.applyServiceAccountPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
70
72
|
return yield response.value();
|
|
71
73
|
});
|
|
72
74
|
}
|
package/dist/apis/UserApi.d.ts
CHANGED
|
@@ -30,7 +30,11 @@ export interface AddUserAccountRoleAttributionRequest {
|
|
|
30
30
|
organizationUuid: string;
|
|
31
31
|
roleUuid: string;
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface ApplyUserPermissionsOnResourceRequest {
|
|
34
|
+
uuid: string;
|
|
35
|
+
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
36
|
+
}
|
|
37
|
+
export interface ApplyUserPermissionsOnResource1Request {
|
|
34
38
|
uuid: string;
|
|
35
39
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
36
40
|
}
|
|
@@ -185,11 +189,21 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
185
189
|
/**
|
|
186
190
|
* Get permissions of a user on a user or an organization.
|
|
187
191
|
*/
|
|
188
|
-
|
|
192
|
+
applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
189
193
|
/**
|
|
190
194
|
* Get permissions of a user on a user or an organization.
|
|
191
195
|
*/
|
|
192
|
-
|
|
196
|
+
applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
|
|
197
|
+
/**
|
|
198
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
199
|
+
* @deprecated
|
|
200
|
+
*/
|
|
201
|
+
applyUserPermissionsOnResource1Raw(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
202
|
+
/**
|
|
203
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
204
|
+
* @deprecated
|
|
205
|
+
*/
|
|
206
|
+
applyUserPermissionsOnResource1(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
|
|
193
207
|
/**
|
|
194
208
|
* Create a user account
|
|
195
209
|
*/
|
package/dist/apis/UserApi.js
CHANGED
|
@@ -223,13 +223,13 @@ class UserApi extends runtime.BaseAPI {
|
|
|
223
223
|
/**
|
|
224
224
|
* Get permissions of a user on a user or an organization.
|
|
225
225
|
*/
|
|
226
|
-
|
|
226
|
+
applyUserPermissionsOnResourceRaw(requestParameters, initOverrides) {
|
|
227
227
|
return __awaiter(this, void 0, void 0, function* () {
|
|
228
228
|
if (requestParameters['uuid'] == null) {
|
|
229
|
-
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling
|
|
229
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource().');
|
|
230
230
|
}
|
|
231
231
|
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
232
|
-
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling
|
|
232
|
+
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource().');
|
|
233
233
|
}
|
|
234
234
|
const queryParameters = {};
|
|
235
235
|
const headerParameters = {};
|
|
@@ -237,13 +237,13 @@ class UserApi extends runtime.BaseAPI {
|
|
|
237
237
|
if (this.configuration && this.configuration.accessToken) {
|
|
238
238
|
// oauth required
|
|
239
239
|
const token = this.configuration.accessToken;
|
|
240
|
-
const tokenString = yield token("OAuth2", ["account:user"]);
|
|
240
|
+
const tokenString = yield token("OAuth2", ["account:user", "account:serviceAccount"]);
|
|
241
241
|
if (tokenString) {
|
|
242
242
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
const response = yield this.request({
|
|
246
|
-
path: `/
|
|
246
|
+
path: `/accounts/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
247
247
|
method: 'POST',
|
|
248
248
|
headers: headerParameters,
|
|
249
249
|
query: queryParameters,
|
|
@@ -255,9 +255,52 @@ class UserApi extends runtime.BaseAPI {
|
|
|
255
255
|
/**
|
|
256
256
|
* Get permissions of a user on a user or an organization.
|
|
257
257
|
*/
|
|
258
|
-
|
|
258
|
+
applyUserPermissionsOnResource(requestParameters, initOverrides) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
+
const response = yield this.applyUserPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
261
|
+
return yield response.value();
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
266
|
+
* @deprecated
|
|
267
|
+
*/
|
|
268
|
+
applyUserPermissionsOnResource1Raw(requestParameters, initOverrides) {
|
|
269
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
+
if (requestParameters['uuid'] == null) {
|
|
271
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource1().');
|
|
272
|
+
}
|
|
273
|
+
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
274
|
+
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource1().');
|
|
275
|
+
}
|
|
276
|
+
const queryParameters = {};
|
|
277
|
+
const headerParameters = {};
|
|
278
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
279
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
280
|
+
// oauth required
|
|
281
|
+
const token = this.configuration.accessToken;
|
|
282
|
+
const tokenString = yield token("OAuth2", ["account:user", "account:serviceAccount"]);
|
|
283
|
+
if (tokenString) {
|
|
284
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
const response = yield this.request({
|
|
288
|
+
path: `/users/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
289
|
+
method: 'POST',
|
|
290
|
+
headers: headerParameters,
|
|
291
|
+
query: queryParameters,
|
|
292
|
+
body: (0, index_1.ApplyPermissionsPayloadToJSON)(requestParameters['applyPermissionsPayload']),
|
|
293
|
+
}, initOverrides);
|
|
294
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PermissionListFromJSON)(jsonValue));
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
299
|
+
* @deprecated
|
|
300
|
+
*/
|
|
301
|
+
applyUserPermissionsOnResource1(requestParameters, initOverrides) {
|
|
259
302
|
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
-
const response = yield this.
|
|
303
|
+
const response = yield this.applyUserPermissionsOnResource1Raw(requestParameters, initOverrides);
|
|
261
304
|
return yield response.value();
|
|
262
305
|
});
|
|
263
306
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateOrUpdateOrganizationPayload, CreateOrganizationPayload, CreateOrganizationUserServiceOptionPayload, CreateOrganizationUserServicePayload, CreateRole, ListUserOrganizations, Organization, OrganizationCreated, OrganizationRoleAttributions, OrganizationSsoProvider, OrganizationUserServiceAssociation, RoleCreated, UpdateParentOrganizationPayload, UpsertServicePayload, UserAccountSearchResult } from '../models/index';
|
|
13
|
+
import type { CreateOrUpdateOrganizationPayload, CreateOrganizationPayload, CreateOrganizationUserServiceOptionPayload, CreateOrganizationUserServicePayload, CreateRole, ListUserOrganizations, Organization, OrganizationApplicableServiceProfiles, OrganizationCreated, OrganizationRoleAttributions, OrganizationSsoProvider, OrganizationUserServiceAssociation, RoleCreated, UpdateParentOrganizationPayload, UpsertServicePayload, UserAccountSearchResult } from '../models/index';
|
|
14
14
|
export interface ActivateUserServiceRequest {
|
|
15
15
|
uuid: string;
|
|
16
16
|
userUuid: string;
|
|
@@ -51,6 +51,13 @@ export interface DeactivateUserServiceRequest {
|
|
|
51
51
|
export interface DeleteOrganizationRequest {
|
|
52
52
|
uuid: string;
|
|
53
53
|
}
|
|
54
|
+
export interface GetApplicableServiceProfilesRequest {
|
|
55
|
+
uuid: string;
|
|
56
|
+
}
|
|
57
|
+
export interface GetApplicableServiceProfilesByServiceCodeRequest {
|
|
58
|
+
uuid: string;
|
|
59
|
+
serviceCode: string;
|
|
60
|
+
}
|
|
54
61
|
export interface GetOrganizationRequest {
|
|
55
62
|
uuid: string;
|
|
56
63
|
}
|
|
@@ -180,6 +187,22 @@ export declare class OrganizationApi extends runtime.BaseAPI {
|
|
|
180
187
|
* Delete organization
|
|
181
188
|
*/
|
|
182
189
|
deleteOrganization(requestParameters: DeleteOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
190
|
+
/**
|
|
191
|
+
* Get applicable service profiles for an organization.
|
|
192
|
+
*/
|
|
193
|
+
getApplicableServiceProfilesRaw(requestParameters: GetApplicableServiceProfilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OrganizationApplicableServiceProfiles>>>;
|
|
194
|
+
/**
|
|
195
|
+
* Get applicable service profiles for an organization.
|
|
196
|
+
*/
|
|
197
|
+
getApplicableServiceProfiles(requestParameters: GetApplicableServiceProfilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OrganizationApplicableServiceProfiles>>;
|
|
198
|
+
/**
|
|
199
|
+
* Get applicable service profiles by service code for an organization.
|
|
200
|
+
*/
|
|
201
|
+
getApplicableServiceProfilesByServiceCodeRaw(requestParameters: GetApplicableServiceProfilesByServiceCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<string>>>;
|
|
202
|
+
/**
|
|
203
|
+
* Get applicable service profiles by service code for an organization.
|
|
204
|
+
*/
|
|
205
|
+
getApplicableServiceProfilesByServiceCode(requestParameters: GetApplicableServiceProfilesByServiceCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
|
|
183
206
|
/**
|
|
184
207
|
* Get detailed information about an organization.
|
|
185
208
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { CreateOrUpdateOrganizationPayloadToJSON, CreateOrganizationPayloadToJSON, CreateOrganizationUserServiceOptionPayloadToJSON, CreateOrganizationUserServicePayloadToJSON, CreateRoleToJSON, ListUserOrganizationsFromJSON, OrganizationFromJSON, OrganizationCreatedFromJSON, OrganizationRoleAttributionsFromJSON, OrganizationSsoProviderFromJSON, OrganizationUserServiceAssociationFromJSON, RoleCreatedFromJSON, UpdateParentOrganizationPayloadToJSON, UpsertServicePayloadToJSON, UserAccountSearchResultFromJSON, } from '../models/index';
|
|
24
|
+
import { CreateOrUpdateOrganizationPayloadToJSON, CreateOrganizationPayloadToJSON, CreateOrganizationUserServiceOptionPayloadToJSON, CreateOrganizationUserServicePayloadToJSON, CreateRoleToJSON, ListUserOrganizationsFromJSON, OrganizationFromJSON, OrganizationApplicableServiceProfilesFromJSON, OrganizationCreatedFromJSON, OrganizationRoleAttributionsFromJSON, OrganizationSsoProviderFromJSON, OrganizationUserServiceAssociationFromJSON, RoleCreatedFromJSON, UpdateParentOrganizationPayloadToJSON, UpsertServicePayloadToJSON, UserAccountSearchResultFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -396,6 +396,81 @@ export class OrganizationApi extends runtime.BaseAPI {
|
|
|
396
396
|
yield this.deleteOrganizationRaw(requestParameters, initOverrides);
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
|
+
/**
|
|
400
|
+
* Get applicable service profiles for an organization.
|
|
401
|
+
*/
|
|
402
|
+
getApplicableServiceProfilesRaw(requestParameters, initOverrides) {
|
|
403
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
404
|
+
if (requestParameters['uuid'] == null) {
|
|
405
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling getApplicableServiceProfiles().');
|
|
406
|
+
}
|
|
407
|
+
const queryParameters = {};
|
|
408
|
+
const headerParameters = {};
|
|
409
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
410
|
+
// oauth required
|
|
411
|
+
const token = this.configuration.accessToken;
|
|
412
|
+
const tokenString = yield token("OAuth2", ["account:organization"]);
|
|
413
|
+
if (tokenString) {
|
|
414
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
const response = yield this.request({
|
|
418
|
+
path: `/organizations/{uuid}/serviceProfiles`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
419
|
+
method: 'GET',
|
|
420
|
+
headers: headerParameters,
|
|
421
|
+
query: queryParameters,
|
|
422
|
+
}, initOverrides);
|
|
423
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationApplicableServiceProfilesFromJSON));
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Get applicable service profiles for an organization.
|
|
428
|
+
*/
|
|
429
|
+
getApplicableServiceProfiles(requestParameters, initOverrides) {
|
|
430
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
431
|
+
const response = yield this.getApplicableServiceProfilesRaw(requestParameters, initOverrides);
|
|
432
|
+
return yield response.value();
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Get applicable service profiles by service code for an organization.
|
|
437
|
+
*/
|
|
438
|
+
getApplicableServiceProfilesByServiceCodeRaw(requestParameters, initOverrides) {
|
|
439
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
440
|
+
if (requestParameters['uuid'] == null) {
|
|
441
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling getApplicableServiceProfilesByServiceCode().');
|
|
442
|
+
}
|
|
443
|
+
if (requestParameters['serviceCode'] == null) {
|
|
444
|
+
throw new runtime.RequiredError('serviceCode', 'Required parameter "serviceCode" was null or undefined when calling getApplicableServiceProfilesByServiceCode().');
|
|
445
|
+
}
|
|
446
|
+
const queryParameters = {};
|
|
447
|
+
const headerParameters = {};
|
|
448
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
449
|
+
// oauth required
|
|
450
|
+
const token = this.configuration.accessToken;
|
|
451
|
+
const tokenString = yield token("OAuth2", ["account:organization"]);
|
|
452
|
+
if (tokenString) {
|
|
453
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
const response = yield this.request({
|
|
457
|
+
path: `/organizations/{uuid}/serviceProfiles/{serviceCode}`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))).replace(`{${"serviceCode"}}`, encodeURIComponent(String(requestParameters['serviceCode']))),
|
|
458
|
+
method: 'GET',
|
|
459
|
+
headers: headerParameters,
|
|
460
|
+
query: queryParameters,
|
|
461
|
+
}, initOverrides);
|
|
462
|
+
return new runtime.JSONApiResponse(response);
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Get applicable service profiles by service code for an organization.
|
|
467
|
+
*/
|
|
468
|
+
getApplicableServiceProfilesByServiceCode(requestParameters, initOverrides) {
|
|
469
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
470
|
+
const response = yield this.getApplicableServiceProfilesByServiceCodeRaw(requestParameters, initOverrides);
|
|
471
|
+
return yield response.value();
|
|
472
|
+
});
|
|
473
|
+
}
|
|
399
474
|
/**
|
|
400
475
|
* Get detailed information about an organization.
|
|
401
476
|
*/
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import type { ApplyPermissionsPayload, PermissionList, ServiceAccountCreationSchema, ServiceAccountSchema, ServiceAccountUpdateSchema, ServiceAccountUuidSchema } from '../models/index';
|
|
14
|
-
export interface
|
|
14
|
+
export interface ApplyServiceAccountPermissionsOnResourceRequest {
|
|
15
15
|
uuid: string;
|
|
16
16
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
17
17
|
}
|
|
@@ -33,13 +33,15 @@ export interface UpdateServiceAccountRequest {
|
|
|
33
33
|
*/
|
|
34
34
|
export declare class ServiceAccountApi extends runtime.BaseAPI {
|
|
35
35
|
/**
|
|
36
|
-
* Get permissions of a service account on a user or an organization.
|
|
36
|
+
* Get permissions of a service account on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
37
|
+
* @deprecated
|
|
37
38
|
*/
|
|
38
|
-
|
|
39
|
+
applyServiceAccountPermissionsOnResourceRaw(requestParameters: ApplyServiceAccountPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
39
40
|
/**
|
|
40
|
-
* Get permissions of a service account on a user or an organization.
|
|
41
|
+
* Get permissions of a service account on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
42
|
+
* @deprecated
|
|
41
43
|
*/
|
|
42
|
-
|
|
44
|
+
applyServiceAccountPermissionsOnResource(requestParameters: ApplyServiceAccountPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
|
|
43
45
|
/**
|
|
44
46
|
* Creates a new service account
|
|
45
47
|
*/
|
|
@@ -27,15 +27,16 @@ import { ApplyPermissionsPayloadToJSON, PermissionListFromJSON, ServiceAccountCr
|
|
|
27
27
|
*/
|
|
28
28
|
export class ServiceAccountApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Get permissions of a service account on a user or an organization.
|
|
30
|
+
* Get permissions of a service account on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
31
|
+
* @deprecated
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
|
+
applyServiceAccountPermissionsOnResourceRaw(requestParameters, initOverrides) {
|
|
33
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
35
|
if (requestParameters['uuid'] == null) {
|
|
35
|
-
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling
|
|
36
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyServiceAccountPermissionsOnResource().');
|
|
36
37
|
}
|
|
37
38
|
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
38
|
-
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling
|
|
39
|
+
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyServiceAccountPermissionsOnResource().');
|
|
39
40
|
}
|
|
40
41
|
const queryParameters = {};
|
|
41
42
|
const headerParameters = {};
|
|
@@ -59,11 +60,12 @@ export class ServiceAccountApi extends runtime.BaseAPI {
|
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
62
|
-
* Get permissions of a service account on a user or an organization.
|
|
63
|
+
* Get permissions of a service account on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
64
|
+
* @deprecated
|
|
63
65
|
*/
|
|
64
|
-
|
|
66
|
+
applyServiceAccountPermissionsOnResource(requestParameters, initOverrides) {
|
|
65
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const response = yield this.
|
|
68
|
+
const response = yield this.applyServiceAccountPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
67
69
|
return yield response.value();
|
|
68
70
|
});
|
|
69
71
|
}
|
|
@@ -30,7 +30,11 @@ export interface AddUserAccountRoleAttributionRequest {
|
|
|
30
30
|
organizationUuid: string;
|
|
31
31
|
roleUuid: string;
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface ApplyUserPermissionsOnResourceRequest {
|
|
34
|
+
uuid: string;
|
|
35
|
+
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
36
|
+
}
|
|
37
|
+
export interface ApplyUserPermissionsOnResource1Request {
|
|
34
38
|
uuid: string;
|
|
35
39
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
36
40
|
}
|
|
@@ -185,11 +189,21 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
185
189
|
/**
|
|
186
190
|
* Get permissions of a user on a user or an organization.
|
|
187
191
|
*/
|
|
188
|
-
|
|
192
|
+
applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
189
193
|
/**
|
|
190
194
|
* Get permissions of a user on a user or an organization.
|
|
191
195
|
*/
|
|
192
|
-
|
|
196
|
+
applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
|
|
197
|
+
/**
|
|
198
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
199
|
+
* @deprecated
|
|
200
|
+
*/
|
|
201
|
+
applyUserPermissionsOnResource1Raw(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
202
|
+
/**
|
|
203
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
204
|
+
* @deprecated
|
|
205
|
+
*/
|
|
206
|
+
applyUserPermissionsOnResource1(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
|
|
193
207
|
/**
|
|
194
208
|
* Create a user account
|
|
195
209
|
*/
|
package/dist/esm/apis/UserApi.js
CHANGED
|
@@ -220,13 +220,13 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
220
220
|
/**
|
|
221
221
|
* Get permissions of a user on a user or an organization.
|
|
222
222
|
*/
|
|
223
|
-
|
|
223
|
+
applyUserPermissionsOnResourceRaw(requestParameters, initOverrides) {
|
|
224
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
225
225
|
if (requestParameters['uuid'] == null) {
|
|
226
|
-
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling
|
|
226
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource().');
|
|
227
227
|
}
|
|
228
228
|
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
229
|
-
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling
|
|
229
|
+
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource().');
|
|
230
230
|
}
|
|
231
231
|
const queryParameters = {};
|
|
232
232
|
const headerParameters = {};
|
|
@@ -234,13 +234,13 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
234
234
|
if (this.configuration && this.configuration.accessToken) {
|
|
235
235
|
// oauth required
|
|
236
236
|
const token = this.configuration.accessToken;
|
|
237
|
-
const tokenString = yield token("OAuth2", ["account:user"]);
|
|
237
|
+
const tokenString = yield token("OAuth2", ["account:user", "account:serviceAccount"]);
|
|
238
238
|
if (tokenString) {
|
|
239
239
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
const response = yield this.request({
|
|
243
|
-
path: `/
|
|
243
|
+
path: `/accounts/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
244
244
|
method: 'POST',
|
|
245
245
|
headers: headerParameters,
|
|
246
246
|
query: queryParameters,
|
|
@@ -252,9 +252,52 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
252
252
|
/**
|
|
253
253
|
* Get permissions of a user on a user or an organization.
|
|
254
254
|
*/
|
|
255
|
-
|
|
255
|
+
applyUserPermissionsOnResource(requestParameters, initOverrides) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
const response = yield this.applyUserPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
258
|
+
return yield response.value();
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
263
|
+
* @deprecated
|
|
264
|
+
*/
|
|
265
|
+
applyUserPermissionsOnResource1Raw(requestParameters, initOverrides) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
if (requestParameters['uuid'] == null) {
|
|
268
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource1().');
|
|
269
|
+
}
|
|
270
|
+
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
271
|
+
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource1().');
|
|
272
|
+
}
|
|
273
|
+
const queryParameters = {};
|
|
274
|
+
const headerParameters = {};
|
|
275
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
276
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
277
|
+
// oauth required
|
|
278
|
+
const token = this.configuration.accessToken;
|
|
279
|
+
const tokenString = yield token("OAuth2", ["account:user", "account:serviceAccount"]);
|
|
280
|
+
if (tokenString) {
|
|
281
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
const response = yield this.request({
|
|
285
|
+
path: `/users/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
286
|
+
method: 'POST',
|
|
287
|
+
headers: headerParameters,
|
|
288
|
+
query: queryParameters,
|
|
289
|
+
body: ApplyPermissionsPayloadToJSON(requestParameters['applyPermissionsPayload']),
|
|
290
|
+
}, initOverrides);
|
|
291
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PermissionListFromJSON(jsonValue));
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
296
|
+
* @deprecated
|
|
297
|
+
*/
|
|
298
|
+
applyUserPermissionsOnResource1(requestParameters, initOverrides) {
|
|
256
299
|
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
-
const response = yield this.
|
|
300
|
+
const response = yield this.applyUserPermissionsOnResource1Raw(requestParameters, initOverrides);
|
|
258
301
|
return yield response.value();
|
|
259
302
|
});
|
|
260
303
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User account and session management
|
|
3
|
+
* Provides HTTP endpoints to manage User Accounts and User Sessions.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 8.1.1-SNAPSHOT
|
|
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
|
+
/**
|
|
13
|
+
* Represents the applicable service profiles available for an organization, and a service code.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface OrganizationApplicableServiceProfiles
|
|
16
|
+
*/
|
|
17
|
+
export interface OrganizationApplicableServiceProfiles {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof OrganizationApplicableServiceProfiles
|
|
22
|
+
*/
|
|
23
|
+
serviceCode: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof OrganizationApplicableServiceProfiles
|
|
28
|
+
*/
|
|
29
|
+
serviceProfiles: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the OrganizationApplicableServiceProfiles interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfOrganizationApplicableServiceProfiles(value: object): value is OrganizationApplicableServiceProfiles;
|
|
35
|
+
export declare function OrganizationApplicableServiceProfilesFromJSON(json: any): OrganizationApplicableServiceProfiles;
|
|
36
|
+
export declare function OrganizationApplicableServiceProfilesFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationApplicableServiceProfiles;
|
|
37
|
+
export declare function OrganizationApplicableServiceProfilesToJSON(value?: OrganizationApplicableServiceProfiles | null): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* User account and session management
|
|
5
|
+
* Provides HTTP endpoints to manage User Accounts and User Sessions.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 8.1.1-SNAPSHOT
|
|
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
|
+
/**
|
|
15
|
+
* Check if a given object implements the OrganizationApplicableServiceProfiles interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfOrganizationApplicableServiceProfiles(value) {
|
|
18
|
+
if (!('serviceCode' in value) || value['serviceCode'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('serviceProfiles' in value) || value['serviceProfiles'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function OrganizationApplicableServiceProfilesFromJSON(json) {
|
|
25
|
+
return OrganizationApplicableServiceProfilesFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function OrganizationApplicableServiceProfilesFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'serviceCode': json['serviceCode'],
|
|
33
|
+
'serviceProfiles': json['serviceProfiles'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function OrganizationApplicableServiceProfilesToJSON(value) {
|
|
37
|
+
if (value == null) {
|
|
38
|
+
return value;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'serviceCode': value['serviceCode'],
|
|
42
|
+
'serviceProfiles': value['serviceProfiles'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -23,6 +23,7 @@ export * from './OAuthClient';
|
|
|
23
23
|
export * from './OAuthClientCreated';
|
|
24
24
|
export * from './OAuthClientPublicKey';
|
|
25
25
|
export * from './Organization';
|
|
26
|
+
export * from './OrganizationApplicableServiceProfiles';
|
|
26
27
|
export * from './OrganizationCreated';
|
|
27
28
|
export * from './OrganizationPathElement';
|
|
28
29
|
export * from './OrganizationRoleAttribution';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export * from './OAuthClient';
|
|
|
25
25
|
export * from './OAuthClientCreated';
|
|
26
26
|
export * from './OAuthClientPublicKey';
|
|
27
27
|
export * from './Organization';
|
|
28
|
+
export * from './OrganizationApplicableServiceProfiles';
|
|
28
29
|
export * from './OrganizationCreated';
|
|
29
30
|
export * from './OrganizationPathElement';
|
|
30
31
|
export * from './OrganizationRoleAttribution';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User account and session management
|
|
3
|
+
* Provides HTTP endpoints to manage User Accounts and User Sessions.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 8.1.1-SNAPSHOT
|
|
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
|
+
/**
|
|
13
|
+
* Represents the applicable service profiles available for an organization, and a service code.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface OrganizationApplicableServiceProfiles
|
|
16
|
+
*/
|
|
17
|
+
export interface OrganizationApplicableServiceProfiles {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof OrganizationApplicableServiceProfiles
|
|
22
|
+
*/
|
|
23
|
+
serviceCode: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof OrganizationApplicableServiceProfiles
|
|
28
|
+
*/
|
|
29
|
+
serviceProfiles: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the OrganizationApplicableServiceProfiles interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfOrganizationApplicableServiceProfiles(value: object): value is OrganizationApplicableServiceProfiles;
|
|
35
|
+
export declare function OrganizationApplicableServiceProfilesFromJSON(json: any): OrganizationApplicableServiceProfiles;
|
|
36
|
+
export declare function OrganizationApplicableServiceProfilesFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationApplicableServiceProfiles;
|
|
37
|
+
export declare function OrganizationApplicableServiceProfilesToJSON(value?: OrganizationApplicableServiceProfiles | null): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* User account and session management
|
|
6
|
+
* Provides HTTP endpoints to manage User Accounts and User Sessions.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 8.1.1-SNAPSHOT
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfOrganizationApplicableServiceProfiles = instanceOfOrganizationApplicableServiceProfiles;
|
|
17
|
+
exports.OrganizationApplicableServiceProfilesFromJSON = OrganizationApplicableServiceProfilesFromJSON;
|
|
18
|
+
exports.OrganizationApplicableServiceProfilesFromJSONTyped = OrganizationApplicableServiceProfilesFromJSONTyped;
|
|
19
|
+
exports.OrganizationApplicableServiceProfilesToJSON = OrganizationApplicableServiceProfilesToJSON;
|
|
20
|
+
/**
|
|
21
|
+
* Check if a given object implements the OrganizationApplicableServiceProfiles interface.
|
|
22
|
+
*/
|
|
23
|
+
function instanceOfOrganizationApplicableServiceProfiles(value) {
|
|
24
|
+
if (!('serviceCode' in value) || value['serviceCode'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('serviceProfiles' in value) || value['serviceProfiles'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function OrganizationApplicableServiceProfilesFromJSON(json) {
|
|
31
|
+
return OrganizationApplicableServiceProfilesFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function OrganizationApplicableServiceProfilesFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'serviceCode': json['serviceCode'],
|
|
39
|
+
'serviceProfiles': json['serviceProfiles'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function OrganizationApplicableServiceProfilesToJSON(value) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'serviceCode': value['serviceCode'],
|
|
48
|
+
'serviceProfiles': value['serviceProfiles'],
|
|
49
|
+
};
|
|
50
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './OAuthClient';
|
|
|
23
23
|
export * from './OAuthClientCreated';
|
|
24
24
|
export * from './OAuthClientPublicKey';
|
|
25
25
|
export * from './Organization';
|
|
26
|
+
export * from './OrganizationApplicableServiceProfiles';
|
|
26
27
|
export * from './OrganizationCreated';
|
|
27
28
|
export * from './OrganizationPathElement';
|
|
28
29
|
export * from './OrganizationRoleAttribution';
|
package/dist/models/index.js
CHANGED
|
@@ -41,6 +41,7 @@ __exportStar(require("./OAuthClient"), exports);
|
|
|
41
41
|
__exportStar(require("./OAuthClientCreated"), exports);
|
|
42
42
|
__exportStar(require("./OAuthClientPublicKey"), exports);
|
|
43
43
|
__exportStar(require("./Organization"), exports);
|
|
44
|
+
__exportStar(require("./OrganizationApplicableServiceProfiles"), exports);
|
|
44
45
|
__exportStar(require("./OrganizationCreated"), exports);
|
|
45
46
|
__exportStar(require("./OrganizationPathElement"), exports);
|
|
46
47
|
__exportStar(require("./OrganizationRoleAttribution"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equisoft/account-service-sdk-typescript",
|
|
3
|
-
"version": "8.1.1-snapshot.
|
|
3
|
+
"version": "8.1.1-snapshot.20250207203843",
|
|
4
4
|
"description": "OpenAPI client for @equisoft/account-service-sdk-typescript",
|
|
5
5
|
"author": "OpenAPI-Generator",
|
|
6
6
|
"repository": {
|
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
ErrorPayload,
|
|
24
24
|
ListUserOrganizations,
|
|
25
25
|
Organization,
|
|
26
|
+
OrganizationApplicableServiceProfiles,
|
|
26
27
|
OrganizationCreated,
|
|
27
28
|
OrganizationRoleAttributions,
|
|
28
29
|
OrganizationSsoProvider,
|
|
@@ -49,6 +50,8 @@ import {
|
|
|
49
50
|
ListUserOrganizationsToJSON,
|
|
50
51
|
OrganizationFromJSON,
|
|
51
52
|
OrganizationToJSON,
|
|
53
|
+
OrganizationApplicableServiceProfilesFromJSON,
|
|
54
|
+
OrganizationApplicableServiceProfilesToJSON,
|
|
52
55
|
OrganizationCreatedFromJSON,
|
|
53
56
|
OrganizationCreatedToJSON,
|
|
54
57
|
OrganizationRoleAttributionsFromJSON,
|
|
@@ -116,6 +119,15 @@ export interface DeleteOrganizationRequest {
|
|
|
116
119
|
uuid: string;
|
|
117
120
|
}
|
|
118
121
|
|
|
122
|
+
export interface GetApplicableServiceProfilesRequest {
|
|
123
|
+
uuid: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface GetApplicableServiceProfilesByServiceCodeRequest {
|
|
127
|
+
uuid: string;
|
|
128
|
+
serviceCode: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
119
131
|
export interface GetOrganizationRequest {
|
|
120
132
|
uuid: string;
|
|
121
133
|
}
|
|
@@ -668,6 +680,97 @@ export class OrganizationApi extends runtime.BaseAPI {
|
|
|
668
680
|
await this.deleteOrganizationRaw(requestParameters, initOverrides);
|
|
669
681
|
}
|
|
670
682
|
|
|
683
|
+
/**
|
|
684
|
+
* Get applicable service profiles for an organization.
|
|
685
|
+
*/
|
|
686
|
+
async getApplicableServiceProfilesRaw(requestParameters: GetApplicableServiceProfilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<OrganizationApplicableServiceProfiles>>> {
|
|
687
|
+
if (requestParameters['uuid'] == null) {
|
|
688
|
+
throw new runtime.RequiredError(
|
|
689
|
+
'uuid',
|
|
690
|
+
'Required parameter "uuid" was null or undefined when calling getApplicableServiceProfiles().'
|
|
691
|
+
);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
const queryParameters: any = {};
|
|
695
|
+
|
|
696
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
697
|
+
|
|
698
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
699
|
+
// oauth required
|
|
700
|
+
const token = this.configuration.accessToken;
|
|
701
|
+
const tokenString = await token("OAuth2", ["account:organization"]);
|
|
702
|
+
if (tokenString) {
|
|
703
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
const response = await this.request({
|
|
708
|
+
path: `/organizations/{uuid}/serviceProfiles`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
709
|
+
method: 'GET',
|
|
710
|
+
headers: headerParameters,
|
|
711
|
+
query: queryParameters,
|
|
712
|
+
}, initOverrides);
|
|
713
|
+
|
|
714
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationApplicableServiceProfilesFromJSON));
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Get applicable service profiles for an organization.
|
|
719
|
+
*/
|
|
720
|
+
async getApplicableServiceProfiles(requestParameters: GetApplicableServiceProfilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<OrganizationApplicableServiceProfiles>> {
|
|
721
|
+
const response = await this.getApplicableServiceProfilesRaw(requestParameters, initOverrides);
|
|
722
|
+
return await response.value();
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Get applicable service profiles by service code for an organization.
|
|
727
|
+
*/
|
|
728
|
+
async getApplicableServiceProfilesByServiceCodeRaw(requestParameters: GetApplicableServiceProfilesByServiceCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<string>>> {
|
|
729
|
+
if (requestParameters['uuid'] == null) {
|
|
730
|
+
throw new runtime.RequiredError(
|
|
731
|
+
'uuid',
|
|
732
|
+
'Required parameter "uuid" was null or undefined when calling getApplicableServiceProfilesByServiceCode().'
|
|
733
|
+
);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
if (requestParameters['serviceCode'] == null) {
|
|
737
|
+
throw new runtime.RequiredError(
|
|
738
|
+
'serviceCode',
|
|
739
|
+
'Required parameter "serviceCode" was null or undefined when calling getApplicableServiceProfilesByServiceCode().'
|
|
740
|
+
);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
const queryParameters: any = {};
|
|
744
|
+
|
|
745
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
746
|
+
|
|
747
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
748
|
+
// oauth required
|
|
749
|
+
const token = this.configuration.accessToken;
|
|
750
|
+
const tokenString = await token("OAuth2", ["account:organization"]);
|
|
751
|
+
if (tokenString) {
|
|
752
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
const response = await this.request({
|
|
757
|
+
path: `/organizations/{uuid}/serviceProfiles/{serviceCode}`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))).replace(`{${"serviceCode"}}`, encodeURIComponent(String(requestParameters['serviceCode']))),
|
|
758
|
+
method: 'GET',
|
|
759
|
+
headers: headerParameters,
|
|
760
|
+
query: queryParameters,
|
|
761
|
+
}, initOverrides);
|
|
762
|
+
|
|
763
|
+
return new runtime.JSONApiResponse<any>(response);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Get applicable service profiles by service code for an organization.
|
|
768
|
+
*/
|
|
769
|
+
async getApplicableServiceProfilesByServiceCode(requestParameters: GetApplicableServiceProfilesByServiceCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>> {
|
|
770
|
+
const response = await this.getApplicableServiceProfilesByServiceCodeRaw(requestParameters, initOverrides);
|
|
771
|
+
return await response.value();
|
|
772
|
+
}
|
|
773
|
+
|
|
671
774
|
/**
|
|
672
775
|
* Get detailed information about an organization.
|
|
673
776
|
*/
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
ServiceAccountUuidSchemaToJSON,
|
|
41
41
|
} from '../models/index';
|
|
42
42
|
|
|
43
|
-
export interface
|
|
43
|
+
export interface ApplyServiceAccountPermissionsOnResourceRequest {
|
|
44
44
|
uuid: string;
|
|
45
45
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
46
46
|
}
|
|
@@ -68,20 +68,21 @@ export interface UpdateServiceAccountRequest {
|
|
|
68
68
|
export class ServiceAccountApi extends runtime.BaseAPI {
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
-
* Get permissions of a service account on a user or an organization.
|
|
71
|
+
* Get permissions of a service account on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
72
|
+
* @deprecated
|
|
72
73
|
*/
|
|
73
|
-
async
|
|
74
|
+
async applyServiceAccountPermissionsOnResourceRaw(requestParameters: ApplyServiceAccountPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>> {
|
|
74
75
|
if (requestParameters['uuid'] == null) {
|
|
75
76
|
throw new runtime.RequiredError(
|
|
76
77
|
'uuid',
|
|
77
|
-
'Required parameter "uuid" was null or undefined when calling
|
|
78
|
+
'Required parameter "uuid" was null or undefined when calling applyServiceAccountPermissionsOnResource().'
|
|
78
79
|
);
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
82
83
|
throw new runtime.RequiredError(
|
|
83
84
|
'applyPermissionsPayload',
|
|
84
|
-
'Required parameter "applyPermissionsPayload" was null or undefined when calling
|
|
85
|
+
'Required parameter "applyPermissionsPayload" was null or undefined when calling applyServiceAccountPermissionsOnResource().'
|
|
85
86
|
);
|
|
86
87
|
}
|
|
87
88
|
|
|
@@ -112,10 +113,11 @@ export class ServiceAccountApi extends runtime.BaseAPI {
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
/**
|
|
115
|
-
* Get permissions of a service account on a user or an organization.
|
|
116
|
+
* Get permissions of a service account on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
117
|
+
* @deprecated
|
|
116
118
|
*/
|
|
117
|
-
async
|
|
118
|
-
const response = await this.
|
|
119
|
+
async applyServiceAccountPermissionsOnResource(requestParameters: ApplyServiceAccountPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList> {
|
|
120
|
+
const response = await this.applyServiceAccountPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
119
121
|
return await response.value();
|
|
120
122
|
}
|
|
121
123
|
|
package/src/apis/UserApi.ts
CHANGED
|
@@ -112,7 +112,12 @@ export interface AddUserAccountRoleAttributionRequest {
|
|
|
112
112
|
roleUuid: string;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
export interface
|
|
115
|
+
export interface ApplyUserPermissionsOnResourceRequest {
|
|
116
|
+
uuid: string;
|
|
117
|
+
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface ApplyUserPermissionsOnResource1Request {
|
|
116
121
|
uuid: string;
|
|
117
122
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
118
123
|
}
|
|
@@ -498,18 +503,18 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
498
503
|
/**
|
|
499
504
|
* Get permissions of a user on a user or an organization.
|
|
500
505
|
*/
|
|
501
|
-
async
|
|
506
|
+
async applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>> {
|
|
502
507
|
if (requestParameters['uuid'] == null) {
|
|
503
508
|
throw new runtime.RequiredError(
|
|
504
509
|
'uuid',
|
|
505
|
-
'Required parameter "uuid" was null or undefined when calling
|
|
510
|
+
'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource().'
|
|
506
511
|
);
|
|
507
512
|
}
|
|
508
513
|
|
|
509
514
|
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
510
515
|
throw new runtime.RequiredError(
|
|
511
516
|
'applyPermissionsPayload',
|
|
512
|
-
'Required parameter "applyPermissionsPayload" was null or undefined when calling
|
|
517
|
+
'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource().'
|
|
513
518
|
);
|
|
514
519
|
}
|
|
515
520
|
|
|
@@ -522,14 +527,14 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
522
527
|
if (this.configuration && this.configuration.accessToken) {
|
|
523
528
|
// oauth required
|
|
524
529
|
const token = this.configuration.accessToken;
|
|
525
|
-
const tokenString = await token("OAuth2", ["account:user"]);
|
|
530
|
+
const tokenString = await token("OAuth2", ["account:user", "account:serviceAccount"]);
|
|
526
531
|
if (tokenString) {
|
|
527
532
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
528
533
|
}
|
|
529
534
|
}
|
|
530
535
|
|
|
531
536
|
const response = await this.request({
|
|
532
|
-
path: `/
|
|
537
|
+
path: `/accounts/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
533
538
|
method: 'POST',
|
|
534
539
|
headers: headerParameters,
|
|
535
540
|
query: queryParameters,
|
|
@@ -542,8 +547,62 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
542
547
|
/**
|
|
543
548
|
* Get permissions of a user on a user or an organization.
|
|
544
549
|
*/
|
|
545
|
-
async
|
|
546
|
-
const response = await this.
|
|
550
|
+
async applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList> {
|
|
551
|
+
const response = await this.applyUserPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
552
|
+
return await response.value();
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
557
|
+
* @deprecated
|
|
558
|
+
*/
|
|
559
|
+
async applyUserPermissionsOnResource1Raw(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>> {
|
|
560
|
+
if (requestParameters['uuid'] == null) {
|
|
561
|
+
throw new runtime.RequiredError(
|
|
562
|
+
'uuid',
|
|
563
|
+
'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource1().'
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
568
|
+
throw new runtime.RequiredError(
|
|
569
|
+
'applyPermissionsPayload',
|
|
570
|
+
'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource1().'
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
const queryParameters: any = {};
|
|
575
|
+
|
|
576
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
577
|
+
|
|
578
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
579
|
+
|
|
580
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
581
|
+
// oauth required
|
|
582
|
+
const token = this.configuration.accessToken;
|
|
583
|
+
const tokenString = await token("OAuth2", ["account:user", "account:serviceAccount"]);
|
|
584
|
+
if (tokenString) {
|
|
585
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
const response = await this.request({
|
|
590
|
+
path: `/users/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
591
|
+
method: 'POST',
|
|
592
|
+
headers: headerParameters,
|
|
593
|
+
query: queryParameters,
|
|
594
|
+
body: ApplyPermissionsPayloadToJSON(requestParameters['applyPermissionsPayload']),
|
|
595
|
+
}, initOverrides);
|
|
596
|
+
|
|
597
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PermissionListFromJSON(jsonValue));
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
602
|
+
* @deprecated
|
|
603
|
+
*/
|
|
604
|
+
async applyUserPermissionsOnResource1(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList> {
|
|
605
|
+
const response = await this.applyUserPermissionsOnResource1Raw(requestParameters, initOverrides);
|
|
547
606
|
return await response.value();
|
|
548
607
|
}
|
|
549
608
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* User account and session management
|
|
5
|
+
* Provides HTTP endpoints to manage User Accounts and User Sessions.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 8.1.1-SNAPSHOT
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Represents the applicable service profiles available for an organization, and a service code.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface OrganizationApplicableServiceProfiles
|
|
20
|
+
*/
|
|
21
|
+
export interface OrganizationApplicableServiceProfiles {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof OrganizationApplicableServiceProfiles
|
|
26
|
+
*/
|
|
27
|
+
serviceCode: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {Array<string>}
|
|
31
|
+
* @memberof OrganizationApplicableServiceProfiles
|
|
32
|
+
*/
|
|
33
|
+
serviceProfiles: Array<string>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the OrganizationApplicableServiceProfiles interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfOrganizationApplicableServiceProfiles(value: object): value is OrganizationApplicableServiceProfiles {
|
|
40
|
+
if (!('serviceCode' in value) || value['serviceCode'] === undefined) return false;
|
|
41
|
+
if (!('serviceProfiles' in value) || value['serviceProfiles'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function OrganizationApplicableServiceProfilesFromJSON(json: any): OrganizationApplicableServiceProfiles {
|
|
46
|
+
return OrganizationApplicableServiceProfilesFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function OrganizationApplicableServiceProfilesFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationApplicableServiceProfiles {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'serviceCode': json['serviceCode'],
|
|
56
|
+
'serviceProfiles': json['serviceProfiles'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function OrganizationApplicableServiceProfilesToJSON(value?: OrganizationApplicableServiceProfiles | null): any {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'serviceCode': value['serviceCode'],
|
|
67
|
+
'serviceProfiles': value['serviceProfiles'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from './OAuthClient';
|
|
|
25
25
|
export * from './OAuthClientCreated';
|
|
26
26
|
export * from './OAuthClientPublicKey';
|
|
27
27
|
export * from './Organization';
|
|
28
|
+
export * from './OrganizationApplicableServiceProfiles';
|
|
28
29
|
export * from './OrganizationCreated';
|
|
29
30
|
export * from './OrganizationPathElement';
|
|
30
31
|
export * from './OrganizationRoleAttribution';
|