@equisoft/account-service-sdk-typescript 4.2.1-snapshot.20221129211056 → 4.2.1-snapshot.20221207193620
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/UserApi.d.ts +12 -1
- package/dist/apis/UserApi.js +36 -0
- package/dist/models/PasswordUserAccount.d.ts +57 -0
- package/dist/models/PasswordUserAccount.js +52 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/UserApi.ts +47 -0
- package/src/models/PasswordUserAccount.ts +96 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -39,6 +39,7 @@ src/models/OrganizationRoleAttributionRole.ts
|
|
|
39
39
|
src/models/OrganizationRoleAttributions.ts
|
|
40
40
|
src/models/OrganizationServicesElement.ts
|
|
41
41
|
src/models/OrganizationUserServiceAssociation.ts
|
|
42
|
+
src/models/PasswordUserAccount.ts
|
|
42
43
|
src/models/PermissionCode.ts
|
|
43
44
|
src/models/PermissionCreated.ts
|
|
44
45
|
src/models/PermissionList.ts
|
package/dist/apis/UserApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { ApplyPermissionsPayload, Id, Organization, PermissionList, SendResetPasswordLinkPayload, SetUserAccountPasswordPayload, UpdateUserAccountPayload, UpdateUserAccountSsoPayload, User, UserAccountRoleAttributions, UserAccountSearchResult, UserPermissions } from '../models';
|
|
13
|
+
import { ApplyPermissionsPayload, Id, Organization, PasswordUserAccount, PermissionList, SendResetPasswordLinkPayload, SetUserAccountPasswordPayload, UpdateUserAccountPayload, UpdateUserAccountSsoPayload, User, UserAccountRoleAttributions, UserAccountSearchResult, UserPermissions } from '../models';
|
|
14
14
|
export interface ActivateRequest {
|
|
15
15
|
uuid: string;
|
|
16
16
|
}
|
|
@@ -50,6 +50,9 @@ export interface GetUserRequest {
|
|
|
50
50
|
export interface GetUserAccountRoleAttributionsRequest {
|
|
51
51
|
uuid: string;
|
|
52
52
|
}
|
|
53
|
+
export interface GetUserByConfirmationHashRequest {
|
|
54
|
+
hash: string;
|
|
55
|
+
}
|
|
53
56
|
export interface GetUserPermissionsRequest {
|
|
54
57
|
uuid: string;
|
|
55
58
|
}
|
|
@@ -170,6 +173,14 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
170
173
|
* Get user role attributions
|
|
171
174
|
*/
|
|
172
175
|
getUserAccountRoleAttributions(requestParameters: GetUserAccountRoleAttributionsRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<UserAccountRoleAttributions>;
|
|
176
|
+
/**
|
|
177
|
+
* Get password info for a user based on unique hash.
|
|
178
|
+
*/
|
|
179
|
+
getUserByConfirmationHashRaw(requestParameters: GetUserByConfirmationHashRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<PasswordUserAccount>>;
|
|
180
|
+
/**
|
|
181
|
+
* Get password info for a user based on unique hash.
|
|
182
|
+
*/
|
|
183
|
+
getUserByConfirmationHash(requestParameters: GetUserByConfirmationHashRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<PasswordUserAccount>;
|
|
173
184
|
/**
|
|
174
185
|
* Get user permissions
|
|
175
186
|
*/
|
package/dist/apis/UserApi.js
CHANGED
|
@@ -440,6 +440,42 @@ class UserApi extends runtime.BaseAPI {
|
|
|
440
440
|
return yield response.value();
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
|
+
/**
|
|
444
|
+
* Get password info for a user based on unique hash.
|
|
445
|
+
*/
|
|
446
|
+
getUserByConfirmationHashRaw(requestParameters, initOverrides) {
|
|
447
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
448
|
+
if (requestParameters.hash === null || requestParameters.hash === undefined) {
|
|
449
|
+
throw new runtime.RequiredError('hash', 'Required parameter requestParameters.hash was null or undefined when calling getUserByConfirmationHash.');
|
|
450
|
+
}
|
|
451
|
+
const queryParameters = {};
|
|
452
|
+
const headerParameters = {};
|
|
453
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
454
|
+
// oauth required
|
|
455
|
+
const token = this.configuration.accessToken;
|
|
456
|
+
const tokenString = yield token("OAuth2", ["account:user"]);
|
|
457
|
+
if (tokenString) {
|
|
458
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
const response = yield this.request({
|
|
462
|
+
path: `/resetPassword/{hash}`.replace(`{${"hash"}}`, encodeURIComponent(String(requestParameters.hash))),
|
|
463
|
+
method: 'GET',
|
|
464
|
+
headers: headerParameters,
|
|
465
|
+
query: queryParameters,
|
|
466
|
+
}, initOverrides);
|
|
467
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => models_1.PasswordUserAccountFromJSON(jsonValue));
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Get password info for a user based on unique hash.
|
|
472
|
+
*/
|
|
473
|
+
getUserByConfirmationHash(requestParameters, initOverrides) {
|
|
474
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
475
|
+
const response = yield this.getUserByConfirmationHashRaw(requestParameters, initOverrides);
|
|
476
|
+
return yield response.value();
|
|
477
|
+
});
|
|
478
|
+
}
|
|
443
479
|
/**
|
|
444
480
|
* Get user permissions
|
|
445
481
|
*/
|
|
@@ -0,0 +1,57 @@
|
|
|
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: 4.2.1-SNAPSHOT
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PasswordUserAccount
|
|
16
|
+
*/
|
|
17
|
+
export interface PasswordUserAccount {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof PasswordUserAccount
|
|
22
|
+
*/
|
|
23
|
+
id: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof PasswordUserAccount
|
|
28
|
+
*/
|
|
29
|
+
uuid?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof PasswordUserAccount
|
|
34
|
+
*/
|
|
35
|
+
name?: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof PasswordUserAccount
|
|
40
|
+
*/
|
|
41
|
+
email?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof PasswordUserAccount
|
|
46
|
+
*/
|
|
47
|
+
requirePasswordReset: boolean;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof PasswordUserAccount
|
|
52
|
+
*/
|
|
53
|
+
userAgreementRequired: boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare function PasswordUserAccountFromJSON(json: any): PasswordUserAccount;
|
|
56
|
+
export declare function PasswordUserAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordUserAccount;
|
|
57
|
+
export declare function PasswordUserAccountToJSON(value?: PasswordUserAccount | null): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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: 4.2.1-SNAPSHOT
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PasswordUserAccountToJSON = exports.PasswordUserAccountFromJSONTyped = exports.PasswordUserAccountFromJSON = void 0;
|
|
17
|
+
const runtime_1 = require("../runtime");
|
|
18
|
+
function PasswordUserAccountFromJSON(json) {
|
|
19
|
+
return PasswordUserAccountFromJSONTyped(json, false);
|
|
20
|
+
}
|
|
21
|
+
exports.PasswordUserAccountFromJSON = PasswordUserAccountFromJSON;
|
|
22
|
+
function PasswordUserAccountFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
|
+
if ((json === undefined) || (json === null)) {
|
|
24
|
+
return json;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
'id': json['id'],
|
|
28
|
+
'uuid': !runtime_1.exists(json, 'uuid') ? undefined : json['uuid'],
|
|
29
|
+
'name': !runtime_1.exists(json, 'name') ? undefined : json['name'],
|
|
30
|
+
'email': !runtime_1.exists(json, 'email') ? undefined : json['email'],
|
|
31
|
+
'requirePasswordReset': json['requirePasswordReset'],
|
|
32
|
+
'userAgreementRequired': json['userAgreementRequired'],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
exports.PasswordUserAccountFromJSONTyped = PasswordUserAccountFromJSONTyped;
|
|
36
|
+
function PasswordUserAccountToJSON(value) {
|
|
37
|
+
if (value === undefined) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
if (value === null) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'id': value.id,
|
|
45
|
+
'uuid': value.uuid,
|
|
46
|
+
'name': value.name,
|
|
47
|
+
'email': value.email,
|
|
48
|
+
'requirePasswordReset': value.requirePasswordReset,
|
|
49
|
+
'userAgreementRequired': value.userAgreementRequired,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.PasswordUserAccountToJSON = PasswordUserAccountToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from './OrganizationRoleAttributionRole';
|
|
|
28
28
|
export * from './OrganizationRoleAttributions';
|
|
29
29
|
export * from './OrganizationServicesElement';
|
|
30
30
|
export * from './OrganizationUserServiceAssociation';
|
|
31
|
+
export * from './PasswordUserAccount';
|
|
31
32
|
export * from './PermissionCode';
|
|
32
33
|
export * from './PermissionCreated';
|
|
33
34
|
export * from './PermissionList';
|
package/dist/models/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __exportStar(require("./OrganizationRoleAttributionRole"), exports);
|
|
|
42
42
|
__exportStar(require("./OrganizationRoleAttributions"), exports);
|
|
43
43
|
__exportStar(require("./OrganizationServicesElement"), exports);
|
|
44
44
|
__exportStar(require("./OrganizationUserServiceAssociation"), exports);
|
|
45
|
+
__exportStar(require("./PasswordUserAccount"), exports);
|
|
45
46
|
__exportStar(require("./PermissionCode"), exports);
|
|
46
47
|
__exportStar(require("./PermissionCreated"), exports);
|
|
47
48
|
__exportStar(require("./PermissionList"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equisoft/account-service-sdk-typescript",
|
|
3
|
-
"version": "4.2.1-snapshot.
|
|
3
|
+
"version": "4.2.1-snapshot.20221207193620",
|
|
4
4
|
"description": "OpenAPI client for @equisoft/account-service-sdk-typescript",
|
|
5
5
|
"author": "Equisoft Inc.",
|
|
6
6
|
"main": "./dist/index.js",
|
package/src/apis/UserApi.ts
CHANGED
|
@@ -27,6 +27,9 @@ import {
|
|
|
27
27
|
Organization,
|
|
28
28
|
OrganizationFromJSON,
|
|
29
29
|
OrganizationToJSON,
|
|
30
|
+
PasswordUserAccount,
|
|
31
|
+
PasswordUserAccountFromJSON,
|
|
32
|
+
PasswordUserAccountToJSON,
|
|
30
33
|
PermissionList,
|
|
31
34
|
PermissionListFromJSON,
|
|
32
35
|
PermissionListToJSON,
|
|
@@ -106,6 +109,10 @@ export interface GetUserAccountRoleAttributionsRequest {
|
|
|
106
109
|
uuid: string;
|
|
107
110
|
}
|
|
108
111
|
|
|
112
|
+
export interface GetUserByConfirmationHashRequest {
|
|
113
|
+
hash: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
109
116
|
export interface GetUserPermissionsRequest {
|
|
110
117
|
uuid: string;
|
|
111
118
|
}
|
|
@@ -609,6 +616,46 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
609
616
|
return await response.value();
|
|
610
617
|
}
|
|
611
618
|
|
|
619
|
+
/**
|
|
620
|
+
* Get password info for a user based on unique hash.
|
|
621
|
+
*/
|
|
622
|
+
async getUserByConfirmationHashRaw(requestParameters: GetUserByConfirmationHashRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<PasswordUserAccount>> {
|
|
623
|
+
if (requestParameters.hash === null || requestParameters.hash === undefined) {
|
|
624
|
+
throw new runtime.RequiredError('hash','Required parameter requestParameters.hash was null or undefined when calling getUserByConfirmationHash.');
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
const queryParameters: any = {};
|
|
628
|
+
|
|
629
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
630
|
+
|
|
631
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
632
|
+
// oauth required
|
|
633
|
+
const token = this.configuration.accessToken;
|
|
634
|
+
const tokenString = await token("OAuth2", ["account:user"]);
|
|
635
|
+
|
|
636
|
+
if (tokenString) {
|
|
637
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
const response = await this.request({
|
|
642
|
+
path: `/resetPassword/{hash}`.replace(`{${"hash"}}`, encodeURIComponent(String(requestParameters.hash))),
|
|
643
|
+
method: 'GET',
|
|
644
|
+
headers: headerParameters,
|
|
645
|
+
query: queryParameters,
|
|
646
|
+
}, initOverrides);
|
|
647
|
+
|
|
648
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PasswordUserAccountFromJSON(jsonValue));
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Get password info for a user based on unique hash.
|
|
653
|
+
*/
|
|
654
|
+
async getUserByConfirmationHash(requestParameters: GetUserByConfirmationHashRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<PasswordUserAccount> {
|
|
655
|
+
const response = await this.getUserByConfirmationHashRaw(requestParameters, initOverrides);
|
|
656
|
+
return await response.value();
|
|
657
|
+
}
|
|
658
|
+
|
|
612
659
|
/**
|
|
613
660
|
* Get user permissions
|
|
614
661
|
*/
|
|
@@ -0,0 +1,96 @@
|
|
|
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: 4.2.1-SNAPSHOT
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface PasswordUserAccount
|
|
20
|
+
*/
|
|
21
|
+
export interface PasswordUserAccount {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PasswordUserAccount
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof PasswordUserAccount
|
|
32
|
+
*/
|
|
33
|
+
uuid?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof PasswordUserAccount
|
|
38
|
+
*/
|
|
39
|
+
name?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof PasswordUserAccount
|
|
44
|
+
*/
|
|
45
|
+
email?: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
* @memberof PasswordUserAccount
|
|
50
|
+
*/
|
|
51
|
+
requirePasswordReset: boolean;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof PasswordUserAccount
|
|
56
|
+
*/
|
|
57
|
+
userAgreementRequired: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function PasswordUserAccountFromJSON(json: any): PasswordUserAccount {
|
|
61
|
+
return PasswordUserAccountFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function PasswordUserAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): PasswordUserAccount {
|
|
65
|
+
if ((json === undefined) || (json === null)) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'id': json['id'],
|
|
71
|
+
'uuid': !exists(json, 'uuid') ? undefined : json['uuid'],
|
|
72
|
+
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
73
|
+
'email': !exists(json, 'email') ? undefined : json['email'],
|
|
74
|
+
'requirePasswordReset': json['requirePasswordReset'],
|
|
75
|
+
'userAgreementRequired': json['userAgreementRequired'],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function PasswordUserAccountToJSON(value?: PasswordUserAccount | null): any {
|
|
80
|
+
if (value === undefined) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
if (value === null) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
|
|
88
|
+
'id': value.id,
|
|
89
|
+
'uuid': value.uuid,
|
|
90
|
+
'name': value.name,
|
|
91
|
+
'email': value.email,
|
|
92
|
+
'requirePasswordReset': value.requirePasswordReset,
|
|
93
|
+
'userAgreementRequired': value.userAgreementRequired,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from './OrganizationRoleAttributionRole';
|
|
|
30
30
|
export * from './OrganizationRoleAttributions';
|
|
31
31
|
export * from './OrganizationServicesElement';
|
|
32
32
|
export * from './OrganizationUserServiceAssociation';
|
|
33
|
+
export * from './PasswordUserAccount';
|
|
33
34
|
export * from './PermissionCode';
|
|
34
35
|
export * from './PermissionCreated';
|
|
35
36
|
export * from './PermissionList';
|