@equisoft/account-service-sdk-typescript 8.1.1-snapshot.20250203134934 → 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.
- package/.openapi-generator/FILES +1 -0
- package/dist/apis/AccountApi.d.ts +30 -0
- package/dist/apis/AccountApi.js +74 -0
- package/dist/apis/ServiceAccountApi.d.ts +7 -5
- package/dist/apis/ServiceAccountApi.js +9 -7
- package/dist/apis/UserApi.d.ts +7 -5
- package/dist/apis/UserApi.js +10 -8
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/AccountApi.d.ts +30 -0
- package/dist/esm/apis/AccountApi.js +70 -0
- package/dist/esm/apis/ServiceAccountApi.d.ts +7 -5
- package/dist/esm/apis/ServiceAccountApi.js +9 -7
- package/dist/esm/apis/UserApi.d.ts +7 -5
- package/dist/esm/apis/UserApi.js +10 -8
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/AccountApi.ts +93 -0
- package/src/apis/ServiceAccountApi.ts +10 -8
- package/src/apis/UserApi.ts +11 -9
- package/src/apis/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -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;
|
|
@@ -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,7 @@ export interface AddUserAccountRoleAttributionRequest {
|
|
|
30
30
|
organizationUuid: string;
|
|
31
31
|
roleUuid: string;
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface ApplyUserPermissionsOnResource1Request {
|
|
34
34
|
uuid: string;
|
|
35
35
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
36
36
|
}
|
|
@@ -183,13 +183,15 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
183
183
|
*/
|
|
184
184
|
addUserAccountRoleAttribution(requestParameters: AddUserAccountRoleAttributionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
185
185
|
/**
|
|
186
|
-
* Get permissions of a user on a user or an organization.
|
|
186
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
187
|
+
* @deprecated
|
|
187
188
|
*/
|
|
188
|
-
|
|
189
|
+
applyUserPermissionsOnResource1Raw(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
189
190
|
/**
|
|
190
|
-
* Get permissions of a user on a user or an organization.
|
|
191
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
192
|
+
* @deprecated
|
|
191
193
|
*/
|
|
192
|
-
|
|
194
|
+
applyUserPermissionsOnResource1(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
|
|
193
195
|
/**
|
|
194
196
|
* Create a user account
|
|
195
197
|
*/
|
package/dist/apis/UserApi.js
CHANGED
|
@@ -221,15 +221,16 @@ class UserApi extends runtime.BaseAPI {
|
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
|
-
* Get permissions of a user on a user or an organization.
|
|
224
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
225
|
+
* @deprecated
|
|
225
226
|
*/
|
|
226
|
-
|
|
227
|
+
applyUserPermissionsOnResource1Raw(requestParameters, initOverrides) {
|
|
227
228
|
return __awaiter(this, void 0, void 0, function* () {
|
|
228
229
|
if (requestParameters['uuid'] == null) {
|
|
229
|
-
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling
|
|
230
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource1().');
|
|
230
231
|
}
|
|
231
232
|
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
232
|
-
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling
|
|
233
|
+
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource1().');
|
|
233
234
|
}
|
|
234
235
|
const queryParameters = {};
|
|
235
236
|
const headerParameters = {};
|
|
@@ -237,7 +238,7 @@ class UserApi extends runtime.BaseAPI {
|
|
|
237
238
|
if (this.configuration && this.configuration.accessToken) {
|
|
238
239
|
// oauth required
|
|
239
240
|
const token = this.configuration.accessToken;
|
|
240
|
-
const tokenString = yield token("OAuth2", ["account:user"]);
|
|
241
|
+
const tokenString = yield token("OAuth2", ["account:user", "account:serviceAccount"]);
|
|
241
242
|
if (tokenString) {
|
|
242
243
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
243
244
|
}
|
|
@@ -253,11 +254,12 @@ class UserApi extends runtime.BaseAPI {
|
|
|
253
254
|
});
|
|
254
255
|
}
|
|
255
256
|
/**
|
|
256
|
-
* Get permissions of a user on a user or an organization.
|
|
257
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
258
|
+
* @deprecated
|
|
257
259
|
*/
|
|
258
|
-
|
|
260
|
+
applyUserPermissionsOnResource1(requestParameters, initOverrides) {
|
|
259
261
|
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
-
const response = yield this.
|
|
262
|
+
const response = yield this.applyUserPermissionsOnResource1Raw(requestParameters, initOverrides);
|
|
261
263
|
return yield response.value();
|
|
262
264
|
});
|
|
263
265
|
}
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -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
|
+
}
|
|
@@ -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,7 @@ export interface AddUserAccountRoleAttributionRequest {
|
|
|
30
30
|
organizationUuid: string;
|
|
31
31
|
roleUuid: string;
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
33
|
+
export interface ApplyUserPermissionsOnResource1Request {
|
|
34
34
|
uuid: string;
|
|
35
35
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
36
36
|
}
|
|
@@ -183,13 +183,15 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
183
183
|
*/
|
|
184
184
|
addUserAccountRoleAttribution(requestParameters: AddUserAccountRoleAttributionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
185
185
|
/**
|
|
186
|
-
* Get permissions of a user on a user or an organization.
|
|
186
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
187
|
+
* @deprecated
|
|
187
188
|
*/
|
|
188
|
-
|
|
189
|
+
applyUserPermissionsOnResource1Raw(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
189
190
|
/**
|
|
190
|
-
* Get permissions of a user on a user or an organization.
|
|
191
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
192
|
+
* @deprecated
|
|
191
193
|
*/
|
|
192
|
-
|
|
194
|
+
applyUserPermissionsOnResource1(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
|
|
193
195
|
/**
|
|
194
196
|
* Create a user account
|
|
195
197
|
*/
|
package/dist/esm/apis/UserApi.js
CHANGED
|
@@ -218,15 +218,16 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
/**
|
|
221
|
-
* Get permissions of a user on a user or an organization.
|
|
221
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
222
|
+
* @deprecated
|
|
222
223
|
*/
|
|
223
|
-
|
|
224
|
+
applyUserPermissionsOnResource1Raw(requestParameters, initOverrides) {
|
|
224
225
|
return __awaiter(this, void 0, void 0, function* () {
|
|
225
226
|
if (requestParameters['uuid'] == null) {
|
|
226
|
-
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling
|
|
227
|
+
throw new runtime.RequiredError('uuid', 'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource1().');
|
|
227
228
|
}
|
|
228
229
|
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
229
|
-
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling
|
|
230
|
+
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource1().');
|
|
230
231
|
}
|
|
231
232
|
const queryParameters = {};
|
|
232
233
|
const headerParameters = {};
|
|
@@ -234,7 +235,7 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
234
235
|
if (this.configuration && this.configuration.accessToken) {
|
|
235
236
|
// oauth required
|
|
236
237
|
const token = this.configuration.accessToken;
|
|
237
|
-
const tokenString = yield token("OAuth2", ["account:user"]);
|
|
238
|
+
const tokenString = yield token("OAuth2", ["account:user", "account:serviceAccount"]);
|
|
238
239
|
if (tokenString) {
|
|
239
240
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
240
241
|
}
|
|
@@ -250,11 +251,12 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
250
251
|
});
|
|
251
252
|
}
|
|
252
253
|
/**
|
|
253
|
-
* Get permissions of a user on a user or an organization.
|
|
254
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
255
|
+
* @deprecated
|
|
254
256
|
*/
|
|
255
|
-
|
|
257
|
+
applyUserPermissionsOnResource1(requestParameters, initOverrides) {
|
|
256
258
|
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
-
const response = yield this.
|
|
259
|
+
const response = yield this.applyUserPermissionsOnResource1Raw(requestParameters, initOverrides);
|
|
258
260
|
return yield response.value();
|
|
259
261
|
});
|
|
260
262
|
}
|
package/dist/esm/apis/index.d.ts
CHANGED
package/dist/esm/apis/index.js
CHANGED
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.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
|
+
}
|
|
@@ -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,7 @@ export interface AddUserAccountRoleAttributionRequest {
|
|
|
112
112
|
roleUuid: string;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
export interface
|
|
115
|
+
export interface ApplyUserPermissionsOnResource1Request {
|
|
116
116
|
uuid: string;
|
|
117
117
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
118
118
|
}
|
|
@@ -496,20 +496,21 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
496
496
|
}
|
|
497
497
|
|
|
498
498
|
/**
|
|
499
|
-
* Get permissions of a user on a user or an organization.
|
|
499
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
500
|
+
* @deprecated
|
|
500
501
|
*/
|
|
501
|
-
async
|
|
502
|
+
async applyUserPermissionsOnResource1Raw(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>> {
|
|
502
503
|
if (requestParameters['uuid'] == null) {
|
|
503
504
|
throw new runtime.RequiredError(
|
|
504
505
|
'uuid',
|
|
505
|
-
'Required parameter "uuid" was null or undefined when calling
|
|
506
|
+
'Required parameter "uuid" was null or undefined when calling applyUserPermissionsOnResource1().'
|
|
506
507
|
);
|
|
507
508
|
}
|
|
508
509
|
|
|
509
510
|
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
510
511
|
throw new runtime.RequiredError(
|
|
511
512
|
'applyPermissionsPayload',
|
|
512
|
-
'Required parameter "applyPermissionsPayload" was null or undefined when calling
|
|
513
|
+
'Required parameter "applyPermissionsPayload" was null or undefined when calling applyUserPermissionsOnResource1().'
|
|
513
514
|
);
|
|
514
515
|
}
|
|
515
516
|
|
|
@@ -522,7 +523,7 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
522
523
|
if (this.configuration && this.configuration.accessToken) {
|
|
523
524
|
// oauth required
|
|
524
525
|
const token = this.configuration.accessToken;
|
|
525
|
-
const tokenString = await token("OAuth2", ["account:user"]);
|
|
526
|
+
const tokenString = await token("OAuth2", ["account:user", "account:serviceAccount"]);
|
|
526
527
|
if (tokenString) {
|
|
527
528
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
528
529
|
}
|
|
@@ -540,10 +541,11 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
540
541
|
}
|
|
541
542
|
|
|
542
543
|
/**
|
|
543
|
-
* Get permissions of a user on a user or an organization.
|
|
544
|
+
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
545
|
+
* @deprecated
|
|
544
546
|
*/
|
|
545
|
-
async
|
|
546
|
-
const response = await this.
|
|
547
|
+
async applyUserPermissionsOnResource1(requestParameters: ApplyUserPermissionsOnResource1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList> {
|
|
548
|
+
const response = await this.applyUserPermissionsOnResource1Raw(requestParameters, initOverrides);
|
|
547
549
|
return await response.value();
|
|
548
550
|
}
|
|
549
551
|
|