@equisoft/account-service-sdk-typescript 8.1.1-snapshot.20250207203843 → 8.1.1-snapshot.20250210210519

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.
@@ -1,6 +1,7 @@
1
1
  .npmignore
2
2
  README.md
3
3
  package.json
4
+ src/apis/AccountApi.ts
4
5
  src/apis/OAuthApi.ts
5
6
  src/apis/OrganizationApi.ts
6
7
  src/apis/PermissionApi.ts
@@ -0,0 +1,30 @@
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
+ import * as runtime from '../runtime';
13
+ import type { ApplyPermissionsPayload, PermissionList } from '../models/index';
14
+ export interface ApplyUserPermissionsOnResourceRequest {
15
+ uuid: string;
16
+ applyPermissionsPayload: ApplyPermissionsPayload;
17
+ }
18
+ /**
19
+ *
20
+ */
21
+ export declare class AccountApi extends runtime.BaseAPI {
22
+ /**
23
+ * Get permissions of a user on a user or an organization.
24
+ */
25
+ applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
26
+ /**
27
+ * Get permissions of a user on a user or an organization.
28
+ */
29
+ applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
30
+ }
@@ -0,0 +1,74 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.AccountApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class AccountApi extends runtime.BaseAPI {
32
+ /**
33
+ * Get permissions of a user on a user or an organization.
34
+ */
35
+ applyUserPermissionsOnResourceRaw(requestParameters, initOverrides) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['uuid'] == null) {
38
+ throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource().');
39
+ }
40
+ if (requestParameters['applyPermissionsPayload'] == null) {
41
+ throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource().');
42
+ }
43
+ const queryParameters = {};
44
+ const headerParameters = {};
45
+ headerParameters['Content-Type'] = 'application/json';
46
+ if (this.configuration && this.configuration.accessToken) {
47
+ // oauth required
48
+ const token = this.configuration.accessToken;
49
+ const tokenString = yield token("OAuth2", ["account:user", "account:serviceAccount"]);
50
+ if (tokenString) {
51
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
52
+ }
53
+ }
54
+ const response = yield this.request({
55
+ path: `/accounts/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
56
+ method: 'POST',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ body: (0, index_1.ApplyPermissionsPayloadToJSON)(requestParameters['applyPermissionsPayload']),
60
+ }, initOverrides);
61
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PermissionListFromJSON)(jsonValue));
62
+ });
63
+ }
64
+ /**
65
+ * Get permissions of a user on a user or an organization.
66
+ */
67
+ applyUserPermissionsOnResource(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ const response = yield this.applyUserPermissionsOnResourceRaw(requestParameters, initOverrides);
70
+ return yield response.value();
71
+ });
72
+ }
73
+ }
74
+ exports.AccountApi = AccountApi;
@@ -30,10 +30,6 @@ export interface AddUserAccountRoleAttributionRequest {
30
30
  organizationUuid: string;
31
31
  roleUuid: string;
32
32
  }
33
- export interface ApplyUserPermissionsOnResourceRequest {
34
- uuid: string;
35
- applyPermissionsPayload: ApplyPermissionsPayload;
36
- }
37
33
  export interface ApplyUserPermissionsOnResource1Request {
38
34
  uuid: string;
39
35
  applyPermissionsPayload: ApplyPermissionsPayload;
@@ -186,14 +182,6 @@ export declare class UserApi extends runtime.BaseAPI {
186
182
  * Add a role attribution for a user and organization
187
183
  */
188
184
  addUserAccountRoleAttribution(requestParameters: AddUserAccountRoleAttributionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
189
- /**
190
- * Get permissions of a user on a user or an organization.
191
- */
192
- applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
193
- /**
194
- * Get permissions of a user on a user or an organization.
195
- */
196
- applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
197
185
  /**
198
186
  * Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
199
187
  * @deprecated
@@ -220,47 +220,6 @@ class UserApi extends runtime.BaseAPI {
220
220
  yield this.addUserAccountRoleAttributionRaw(requestParameters, initOverrides);
221
221
  });
222
222
  }
223
- /**
224
- * Get permissions of a user on a user or an organization.
225
- */
226
- applyUserPermissionsOnResourceRaw(requestParameters, initOverrides) {
227
- return __awaiter(this, void 0, void 0, function* () {
228
- if (requestParameters['uuid'] == null) {
229
- throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource().');
230
- }
231
- if (requestParameters['applyPermissionsPayload'] == null) {
232
- throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource().');
233
- }
234
- const queryParameters = {};
235
- const headerParameters = {};
236
- headerParameters['Content-Type'] = 'application/json';
237
- if (this.configuration && this.configuration.accessToken) {
238
- // oauth required
239
- const token = this.configuration.accessToken;
240
- const tokenString = yield token("OAuth2", ["account:user", "account:serviceAccount"]);
241
- if (tokenString) {
242
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
243
- }
244
- }
245
- const response = yield this.request({
246
- path: `/accounts/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
247
- method: 'POST',
248
- headers: headerParameters,
249
- query: queryParameters,
250
- body: (0, index_1.ApplyPermissionsPayloadToJSON)(requestParameters['applyPermissionsPayload']),
251
- }, initOverrides);
252
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PermissionListFromJSON)(jsonValue));
253
- });
254
- }
255
- /**
256
- * Get permissions of a user on a user or an organization.
257
- */
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
223
  /**
265
224
  * Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
266
225
  * @deprecated
@@ -1,3 +1,4 @@
1
+ export * from './AccountApi';
1
2
  export * from './OAuthApi';
2
3
  export * from './OrganizationApi';
3
4
  export * from './PermissionApi';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
+ __exportStar(require("./AccountApi"), exports);
19
20
  __exportStar(require("./OAuthApi"), exports);
20
21
  __exportStar(require("./OrganizationApi"), exports);
21
22
  __exportStar(require("./PermissionApi"), exports);
@@ -0,0 +1,30 @@
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
+ import * as runtime from '../runtime';
13
+ import type { ApplyPermissionsPayload, PermissionList } from '../models/index';
14
+ export interface ApplyUserPermissionsOnResourceRequest {
15
+ uuid: string;
16
+ applyPermissionsPayload: ApplyPermissionsPayload;
17
+ }
18
+ /**
19
+ *
20
+ */
21
+ export declare class AccountApi extends runtime.BaseAPI {
22
+ /**
23
+ * Get permissions of a user on a user or an organization.
24
+ */
25
+ applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
26
+ /**
27
+ * Get permissions of a user on a user or an organization.
28
+ */
29
+ applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
30
+ }
@@ -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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { ApplyPermissionsPayloadToJSON, PermissionListFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class AccountApi extends runtime.BaseAPI {
29
+ /**
30
+ * Get permissions of a user on a user or an organization.
31
+ */
32
+ applyUserPermissionsOnResourceRaw(requestParameters, initOverrides) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['uuid'] == null) {
35
+ throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource().');
36
+ }
37
+ if (requestParameters['applyPermissionsPayload'] == null) {
38
+ throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ headerParameters['Content-Type'] = 'application/json';
43
+ if (this.configuration && this.configuration.accessToken) {
44
+ // oauth required
45
+ const token = this.configuration.accessToken;
46
+ const tokenString = yield token("OAuth2", ["account:user", "account:serviceAccount"]);
47
+ if (tokenString) {
48
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
49
+ }
50
+ }
51
+ const response = yield this.request({
52
+ path: `/accounts/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
53
+ method: 'POST',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ body: ApplyPermissionsPayloadToJSON(requestParameters['applyPermissionsPayload']),
57
+ }, initOverrides);
58
+ return new runtime.JSONApiResponse(response, (jsonValue) => PermissionListFromJSON(jsonValue));
59
+ });
60
+ }
61
+ /**
62
+ * Get permissions of a user on a user or an organization.
63
+ */
64
+ applyUserPermissionsOnResource(requestParameters, initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const response = yield this.applyUserPermissionsOnResourceRaw(requestParameters, initOverrides);
67
+ return yield response.value();
68
+ });
69
+ }
70
+ }
@@ -30,10 +30,6 @@ export interface AddUserAccountRoleAttributionRequest {
30
30
  organizationUuid: string;
31
31
  roleUuid: string;
32
32
  }
33
- export interface ApplyUserPermissionsOnResourceRequest {
34
- uuid: string;
35
- applyPermissionsPayload: ApplyPermissionsPayload;
36
- }
37
33
  export interface ApplyUserPermissionsOnResource1Request {
38
34
  uuid: string;
39
35
  applyPermissionsPayload: ApplyPermissionsPayload;
@@ -186,14 +182,6 @@ export declare class UserApi extends runtime.BaseAPI {
186
182
  * Add a role attribution for a user and organization
187
183
  */
188
184
  addUserAccountRoleAttribution(requestParameters: AddUserAccountRoleAttributionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
189
- /**
190
- * Get permissions of a user on a user or an organization.
191
- */
192
- applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
193
- /**
194
- * Get permissions of a user on a user or an organization.
195
- */
196
- applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
197
185
  /**
198
186
  * Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
199
187
  * @deprecated
@@ -217,47 +217,6 @@ export class UserApi extends runtime.BaseAPI {
217
217
  yield this.addUserAccountRoleAttributionRaw(requestParameters, initOverrides);
218
218
  });
219
219
  }
220
- /**
221
- * Get permissions of a user on a user or an organization.
222
- */
223
- applyUserPermissionsOnResourceRaw(requestParameters, initOverrides) {
224
- return __awaiter(this, void 0, void 0, function* () {
225
- if (requestParameters['uuid'] == null) {
226
- throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource().');
227
- }
228
- if (requestParameters['applyPermissionsPayload'] == null) {
229
- throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource().');
230
- }
231
- const queryParameters = {};
232
- const headerParameters = {};
233
- headerParameters['Content-Type'] = 'application/json';
234
- if (this.configuration && this.configuration.accessToken) {
235
- // oauth required
236
- const token = this.configuration.accessToken;
237
- const tokenString = yield token("OAuth2", ["account:user", "account:serviceAccount"]);
238
- if (tokenString) {
239
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
240
- }
241
- }
242
- const response = yield this.request({
243
- path: `/accounts/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
244
- method: 'POST',
245
- headers: headerParameters,
246
- query: queryParameters,
247
- body: ApplyPermissionsPayloadToJSON(requestParameters['applyPermissionsPayload']),
248
- }, initOverrides);
249
- return new runtime.JSONApiResponse(response, (jsonValue) => PermissionListFromJSON(jsonValue));
250
- });
251
- }
252
- /**
253
- * Get permissions of a user on a user or an organization.
254
- */
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
220
  /**
262
221
  * Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
263
222
  * @deprecated
@@ -1,3 +1,4 @@
1
+ export * from './AccountApi';
1
2
  export * from './OAuthApi';
2
3
  export * from './OrganizationApi';
3
4
  export * from './PermissionApi';
@@ -1,5 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export * from './AccountApi';
3
4
  export * from './OAuthApi';
4
5
  export * from './OrganizationApi';
5
6
  export * from './PermissionApi';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/account-service-sdk-typescript",
3
- "version": "8.1.1-snapshot.20250207203843",
3
+ "version": "8.1.1-snapshot.20250210210519",
4
4
  "description": "OpenAPI client for @equisoft/account-service-sdk-typescript",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,93 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ ApplyPermissionsPayload,
19
+ ErrorPayload,
20
+ PermissionList,
21
+ } from '../models/index';
22
+ import {
23
+ ApplyPermissionsPayloadFromJSON,
24
+ ApplyPermissionsPayloadToJSON,
25
+ ErrorPayloadFromJSON,
26
+ ErrorPayloadToJSON,
27
+ PermissionListFromJSON,
28
+ PermissionListToJSON,
29
+ } from '../models/index';
30
+
31
+ export interface ApplyUserPermissionsOnResourceRequest {
32
+ uuid: string;
33
+ applyPermissionsPayload: ApplyPermissionsPayload;
34
+ }
35
+
36
+ /**
37
+ *
38
+ */
39
+ export class AccountApi extends runtime.BaseAPI {
40
+
41
+ /**
42
+ * Get permissions of a user on a user or an organization.
43
+ */
44
+ async applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>> {
45
+ if (requestParameters['uuid'] == null) {
46
+ throw new runtime.RequiredError(
47
+ 'uuid',
48
+ 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource().'
49
+ );
50
+ }
51
+
52
+ if (requestParameters['applyPermissionsPayload'] == null) {
53
+ throw new runtime.RequiredError(
54
+ 'applyPermissionsPayload',
55
+ 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource().'
56
+ );
57
+ }
58
+
59
+ const queryParameters: any = {};
60
+
61
+ const headerParameters: runtime.HTTPHeaders = {};
62
+
63
+ headerParameters['Content-Type'] = 'application/json';
64
+
65
+ if (this.configuration && this.configuration.accessToken) {
66
+ // oauth required
67
+ const token = this.configuration.accessToken;
68
+ const tokenString = await token("OAuth2", ["account:user", "account:serviceAccount"]);
69
+ if (tokenString) {
70
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
71
+ }
72
+ }
73
+
74
+ const response = await this.request({
75
+ path: `/accounts/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
76
+ method: 'POST',
77
+ headers: headerParameters,
78
+ query: queryParameters,
79
+ body: ApplyPermissionsPayloadToJSON(requestParameters['applyPermissionsPayload']),
80
+ }, initOverrides);
81
+
82
+ return new runtime.JSONApiResponse(response, (jsonValue) => PermissionListFromJSON(jsonValue));
83
+ }
84
+
85
+ /**
86
+ * Get permissions of a user on a user or an organization.
87
+ */
88
+ async applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList> {
89
+ const response = await this.applyUserPermissionsOnResourceRaw(requestParameters, initOverrides);
90
+ return await response.value();
91
+ }
92
+
93
+ }
@@ -112,11 +112,6 @@ export interface AddUserAccountRoleAttributionRequest {
112
112
  roleUuid: string;
113
113
  }
114
114
 
115
- export interface ApplyUserPermissionsOnResourceRequest {
116
- uuid: string;
117
- applyPermissionsPayload: ApplyPermissionsPayload;
118
- }
119
-
120
115
  export interface ApplyUserPermissionsOnResource1Request {
121
116
  uuid: string;
122
117
  applyPermissionsPayload: ApplyPermissionsPayload;
@@ -500,58 +495,6 @@ export class UserApi extends runtime.BaseAPI {
500
495
  await this.addUserAccountRoleAttributionRaw(requestParameters, initOverrides);
501
496
  }
502
497
 
503
- /**
504
- * Get permissions of a user on a user or an organization.
505
- */
506
- async applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>> {
507
- if (requestParameters['uuid'] == null) {
508
- throw new runtime.RequiredError(
509
- 'uuid',
510
- 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource().'
511
- );
512
- }
513
-
514
- if (requestParameters['applyPermissionsPayload'] == null) {
515
- throw new runtime.RequiredError(
516
- 'applyPermissionsPayload',
517
- 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource().'
518
- );
519
- }
520
-
521
- const queryParameters: any = {};
522
-
523
- const headerParameters: runtime.HTTPHeaders = {};
524
-
525
- headerParameters['Content-Type'] = 'application/json';
526
-
527
- if (this.configuration && this.configuration.accessToken) {
528
- // oauth required
529
- const token = this.configuration.accessToken;
530
- const tokenString = await token("OAuth2", ["account:user", "account:serviceAccount"]);
531
- if (tokenString) {
532
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
533
- }
534
- }
535
-
536
- const response = await this.request({
537
- path: `/accounts/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
538
- method: 'POST',
539
- headers: headerParameters,
540
- query: queryParameters,
541
- body: ApplyPermissionsPayloadToJSON(requestParameters['applyPermissionsPayload']),
542
- }, initOverrides);
543
-
544
- return new runtime.JSONApiResponse(response, (jsonValue) => PermissionListFromJSON(jsonValue));
545
- }
546
-
547
- /**
548
- * Get permissions of a user on a user or an organization.
549
- */
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
498
  /**
556
499
  * Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
557
500
  * @deprecated
package/src/apis/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export * from './AccountApi';
3
4
  export * from './OAuthApi';
4
5
  export * from './OrganizationApi';
5
6
  export * from './PermissionApi';