@equisoft/account-service-sdk-typescript 8.1.1-snapshot.20250207203843 → 8.1.1-snapshot.20250213194904
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/UserApi.d.ts +2 -14
- package/dist/apis/UserApi.js +4 -45
- 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/UserApi.d.ts +2 -14
- package/dist/esm/apis/UserApi.js +4 -45
- 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/UserApi.ts +4 -61
- 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 ApplyPermissionsOnResourceRequest {
|
|
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
|
+
applyPermissionsOnResourceRaw(requestParameters: ApplyPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
26
|
+
/**
|
|
27
|
+
* Get permissions of a user on a user or an organization.
|
|
28
|
+
*/
|
|
29
|
+
applyPermissionsOnResource(requestParameters: ApplyPermissionsOnResourceRequest, 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
|
+
applyPermissionsOnResourceRaw(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 applyPermissionsOnResource().');
|
|
39
|
+
}
|
|
40
|
+
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
41
|
+
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyPermissionsOnResource().');
|
|
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
|
+
applyPermissionsOnResource(requestParameters, initOverrides) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const response = yield this.applyPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
70
|
+
return yield response.value();
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.AccountApi = AccountApi;
|
package/dist/apis/UserApi.d.ts
CHANGED
|
@@ -34,10 +34,6 @@ export interface ApplyUserPermissionsOnResourceRequest {
|
|
|
34
34
|
uuid: string;
|
|
35
35
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
36
36
|
}
|
|
37
|
-
export interface ApplyUserPermissionsOnResource1Request {
|
|
38
|
-
uuid: string;
|
|
39
|
-
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
40
|
-
}
|
|
41
37
|
export interface CreateUserRequest {
|
|
42
38
|
createUserAccountPayload: CreateUserAccountPayload;
|
|
43
39
|
}
|
|
@@ -186,24 +182,16 @@ 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
|
|
200
188
|
*/
|
|
201
|
-
|
|
189
|
+
applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
202
190
|
/**
|
|
203
191
|
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
204
192
|
* @deprecated
|
|
205
193
|
*/
|
|
206
|
-
|
|
194
|
+
applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
|
|
207
195
|
/**
|
|
208
196
|
* Create a user account
|
|
209
197
|
*/
|
package/dist/apis/UserApi.js
CHANGED
|
@@ -221,7 +221,8 @@ 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
|
applyUserPermissionsOnResourceRaw(requestParameters, initOverrides) {
|
|
227
228
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -242,48 +243,6 @@ class UserApi extends runtime.BaseAPI {
|
|
|
242
243
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
243
244
|
}
|
|
244
245
|
}
|
|
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
|
-
/**
|
|
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
246
|
const response = yield this.request({
|
|
288
247
|
path: `/users/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
289
248
|
method: 'POST',
|
|
@@ -298,9 +257,9 @@ class UserApi extends runtime.BaseAPI {
|
|
|
298
257
|
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
299
258
|
* @deprecated
|
|
300
259
|
*/
|
|
301
|
-
|
|
260
|
+
applyUserPermissionsOnResource(requestParameters, initOverrides) {
|
|
302
261
|
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
-
const response = yield this.
|
|
262
|
+
const response = yield this.applyUserPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
304
263
|
return yield response.value();
|
|
305
264
|
});
|
|
306
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 ApplyPermissionsOnResourceRequest {
|
|
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
|
+
applyPermissionsOnResourceRaw(requestParameters: ApplyPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
26
|
+
/**
|
|
27
|
+
* Get permissions of a user on a user or an organization.
|
|
28
|
+
*/
|
|
29
|
+
applyPermissionsOnResource(requestParameters: ApplyPermissionsOnResourceRequest, 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
|
+
applyPermissionsOnResourceRaw(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 applyPermissionsOnResource().');
|
|
36
|
+
}
|
|
37
|
+
if (requestParameters['applyPermissionsPayload'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('applyPermissionsPayload', 'Required parameter "applyPermissionsPayload" was null or undefined when calling applyPermissionsOnResource().');
|
|
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
|
+
applyPermissionsOnResource(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.applyPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -34,10 +34,6 @@ export interface ApplyUserPermissionsOnResourceRequest {
|
|
|
34
34
|
uuid: string;
|
|
35
35
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
36
36
|
}
|
|
37
|
-
export interface ApplyUserPermissionsOnResource1Request {
|
|
38
|
-
uuid: string;
|
|
39
|
-
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
40
|
-
}
|
|
41
37
|
export interface CreateUserRequest {
|
|
42
38
|
createUserAccountPayload: CreateUserAccountPayload;
|
|
43
39
|
}
|
|
@@ -186,24 +182,16 @@ 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
|
|
200
188
|
*/
|
|
201
|
-
|
|
189
|
+
applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>>;
|
|
202
190
|
/**
|
|
203
191
|
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
204
192
|
* @deprecated
|
|
205
193
|
*/
|
|
206
|
-
|
|
194
|
+
applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList>;
|
|
207
195
|
/**
|
|
208
196
|
* Create a user account
|
|
209
197
|
*/
|
package/dist/esm/apis/UserApi.js
CHANGED
|
@@ -218,7 +218,8 @@ 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
|
applyUserPermissionsOnResourceRaw(requestParameters, initOverrides) {
|
|
224
225
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -239,48 +240,6 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
239
240
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
240
241
|
}
|
|
241
242
|
}
|
|
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
|
-
/**
|
|
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
243
|
const response = yield this.request({
|
|
285
244
|
path: `/users/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
286
245
|
method: 'POST',
|
|
@@ -295,9 +254,9 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
295
254
|
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
296
255
|
* @deprecated
|
|
297
256
|
*/
|
|
298
|
-
|
|
257
|
+
applyUserPermissionsOnResource(requestParameters, initOverrides) {
|
|
299
258
|
return __awaiter(this, void 0, void 0, function* () {
|
|
300
|
-
const response = yield this.
|
|
259
|
+
const response = yield this.applyUserPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
301
260
|
return yield response.value();
|
|
302
261
|
});
|
|
303
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.20250213194904",
|
|
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 ApplyPermissionsOnResourceRequest {
|
|
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 applyPermissionsOnResourceRaw(requestParameters: ApplyPermissionsOnResourceRequest, 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 applyPermissionsOnResource().'
|
|
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 applyPermissionsOnResource().'
|
|
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 applyPermissionsOnResource(requestParameters: ApplyPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList> {
|
|
89
|
+
const response = await this.applyPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
90
|
+
return await response.value();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
}
|
package/src/apis/UserApi.ts
CHANGED
|
@@ -117,11 +117,6 @@ export interface ApplyUserPermissionsOnResourceRequest {
|
|
|
117
117
|
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
export interface ApplyUserPermissionsOnResource1Request {
|
|
121
|
-
uuid: string;
|
|
122
|
-
applyPermissionsPayload: ApplyPermissionsPayload;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
120
|
export interface CreateUserRequest {
|
|
126
121
|
createUserAccountPayload: CreateUserAccountPayload;
|
|
127
122
|
}
|
|
@@ -501,7 +496,8 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
501
496
|
}
|
|
502
497
|
|
|
503
498
|
/**
|
|
504
|
-
* 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
|
|
505
501
|
*/
|
|
506
502
|
async applyUserPermissionsOnResourceRaw(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PermissionList>> {
|
|
507
503
|
if (requestParameters['uuid'] == null) {
|
|
@@ -533,59 +529,6 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
533
529
|
}
|
|
534
530
|
}
|
|
535
531
|
|
|
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
|
-
/**
|
|
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
532
|
const response = await this.request({
|
|
590
533
|
path: `/users/{uuid}/permissions/apply`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters['uuid']))),
|
|
591
534
|
method: 'POST',
|
|
@@ -601,8 +544,8 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
601
544
|
* Get permissions of a user on a user or an organization. | Deprecated: Use /account/{uuid}/permissions/apply instead
|
|
602
545
|
* @deprecated
|
|
603
546
|
*/
|
|
604
|
-
async
|
|
605
|
-
const response = await this.
|
|
547
|
+
async applyUserPermissionsOnResource(requestParameters: ApplyUserPermissionsOnResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PermissionList> {
|
|
548
|
+
const response = await this.applyUserPermissionsOnResourceRaw(requestParameters, initOverrides);
|
|
606
549
|
return await response.value();
|
|
607
550
|
}
|
|
608
551
|
|