@equisoft/account-service-sdk-typescript 8.1.1-snapshot.20250203134934 → 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/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/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/package.json +1 -1
- package/src/apis/ServiceAccountApi.ts +10 -8
- package/src/apis/UserApi.ts +67 -8
|
@@ -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
|
}
|
|
@@ -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
|
}
|
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": {
|
|
@@ -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
|
|