@equisoft/account-service-sdk-typescript 4.1.1-snapshot.20221114194459 → 4.1.1-snapshot.20221116194426
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 +13 -1
- package/dist/apis/UserApi.js +40 -0
- package/dist/models/SendResetPasswordLinkPayload.d.ts +33 -0
- package/dist/models/SendResetPasswordLinkPayload.js +43 -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 +54 -0
- package/src/models/SendResetPasswordLinkPayload.ts +64 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -46,6 +46,7 @@ src/models/PermissionResourceType.ts
|
|
|
46
46
|
src/models/Role.ts
|
|
47
47
|
src/models/RoleCreated.ts
|
|
48
48
|
src/models/RolesOnOrganization.ts
|
|
49
|
+
src/models/SendResetPasswordLinkPayload.ts
|
|
49
50
|
src/models/ServiceAccess.ts
|
|
50
51
|
src/models/ServiceAccountCreationSchema.ts
|
|
51
52
|
src/models/ServiceAccountSchema.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, SetUserAccountPasswordPayload, UpdateUserAccountPayload, UpdateUserAccountSsoPayload, User, UserAccountRoleAttributions, UserAccountSearchResult, UserPermissions } from '../models';
|
|
13
|
+
import { ApplyPermissionsPayload, Id, Organization, PermissionList, SendResetPasswordLinkPayload, SetUserAccountPasswordPayload, UpdateUserAccountPayload, UpdateUserAccountSsoPayload, User, UserAccountRoleAttributions, UserAccountSearchResult, UserPermissions } from '../models';
|
|
14
14
|
export interface ActivateRequest {
|
|
15
15
|
uuid: string;
|
|
16
16
|
}
|
|
@@ -63,6 +63,10 @@ export interface ListUsersRequest {
|
|
|
63
63
|
includeDeleted?: boolean | null;
|
|
64
64
|
query?: string | null;
|
|
65
65
|
}
|
|
66
|
+
export interface SendPasswordResetLinkRequest {
|
|
67
|
+
uuid: string;
|
|
68
|
+
sendResetPasswordLinkPayload: SendResetPasswordLinkPayload;
|
|
69
|
+
}
|
|
66
70
|
export interface SetPasswordRequest {
|
|
67
71
|
uuid: string;
|
|
68
72
|
setUserAccountPasswordPayload: SetUserAccountPasswordPayload;
|
|
@@ -190,6 +194,14 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
190
194
|
* Searches accounts that match ALL params. If no search parameters are provided, returns all users.
|
|
191
195
|
*/
|
|
192
196
|
listUsers(requestParameters?: ListUsersRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<Array<UserAccountSearchResult>>;
|
|
197
|
+
/**
|
|
198
|
+
* Sends an email or sms with a time limited unique link to reset user\'s password
|
|
199
|
+
*/
|
|
200
|
+
sendPasswordResetLinkRaw(requestParameters: SendPasswordResetLinkRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
|
|
201
|
+
/**
|
|
202
|
+
* Sends an email or sms with a time limited unique link to reset user\'s password
|
|
203
|
+
*/
|
|
204
|
+
sendPasswordResetLink(requestParameters: SendPasswordResetLinkRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
|
|
193
205
|
/**
|
|
194
206
|
* set user account password.
|
|
195
207
|
*/
|
package/dist/apis/UserApi.js
CHANGED
|
@@ -560,6 +560,46 @@ class UserApi extends runtime.BaseAPI {
|
|
|
560
560
|
return yield response.value();
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
|
+
/**
|
|
564
|
+
* Sends an email or sms with a time limited unique link to reset user\'s password
|
|
565
|
+
*/
|
|
566
|
+
sendPasswordResetLinkRaw(requestParameters, initOverrides) {
|
|
567
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
568
|
+
if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
|
|
569
|
+
throw new runtime.RequiredError('uuid', 'Required parameter requestParameters.uuid was null or undefined when calling sendPasswordResetLink.');
|
|
570
|
+
}
|
|
571
|
+
if (requestParameters.sendResetPasswordLinkPayload === null || requestParameters.sendResetPasswordLinkPayload === undefined) {
|
|
572
|
+
throw new runtime.RequiredError('sendResetPasswordLinkPayload', 'Required parameter requestParameters.sendResetPasswordLinkPayload was null or undefined when calling sendPasswordResetLink.');
|
|
573
|
+
}
|
|
574
|
+
const queryParameters = {};
|
|
575
|
+
const headerParameters = {};
|
|
576
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
577
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
578
|
+
// oauth required
|
|
579
|
+
const token = this.configuration.accessToken;
|
|
580
|
+
const tokenString = yield token("OAuth2", ["account:user"]);
|
|
581
|
+
if (tokenString) {
|
|
582
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
const response = yield this.request({
|
|
586
|
+
path: `/users/{uuid}/sendPasswordResetLink`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))),
|
|
587
|
+
method: 'POST',
|
|
588
|
+
headers: headerParameters,
|
|
589
|
+
query: queryParameters,
|
|
590
|
+
body: models_1.SendResetPasswordLinkPayloadToJSON(requestParameters.sendResetPasswordLinkPayload),
|
|
591
|
+
}, initOverrides);
|
|
592
|
+
return new runtime.VoidApiResponse(response);
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Sends an email or sms with a time limited unique link to reset user\'s password
|
|
597
|
+
*/
|
|
598
|
+
sendPasswordResetLink(requestParameters, initOverrides) {
|
|
599
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
600
|
+
yield this.sendPasswordResetLinkRaw(requestParameters, initOverrides);
|
|
601
|
+
});
|
|
602
|
+
}
|
|
563
603
|
/**
|
|
564
604
|
* set user account password.
|
|
565
605
|
*/
|
|
@@ -0,0 +1,33 @@
|
|
|
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.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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SendResetPasswordLinkPayload
|
|
16
|
+
*/
|
|
17
|
+
export interface SendResetPasswordLinkPayload {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof SendResetPasswordLinkPayload
|
|
22
|
+
*/
|
|
23
|
+
sendEmail: boolean;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {boolean}
|
|
27
|
+
* @memberof SendResetPasswordLinkPayload
|
|
28
|
+
*/
|
|
29
|
+
sendSms: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function SendResetPasswordLinkPayloadFromJSON(json: any): SendResetPasswordLinkPayload;
|
|
32
|
+
export declare function SendResetPasswordLinkPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendResetPasswordLinkPayload;
|
|
33
|
+
export declare function SendResetPasswordLinkPayloadToJSON(value?: SendResetPasswordLinkPayload | null): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
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.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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SendResetPasswordLinkPayloadToJSON = exports.SendResetPasswordLinkPayloadFromJSONTyped = exports.SendResetPasswordLinkPayloadFromJSON = void 0;
|
|
17
|
+
function SendResetPasswordLinkPayloadFromJSON(json) {
|
|
18
|
+
return SendResetPasswordLinkPayloadFromJSONTyped(json, false);
|
|
19
|
+
}
|
|
20
|
+
exports.SendResetPasswordLinkPayloadFromJSON = SendResetPasswordLinkPayloadFromJSON;
|
|
21
|
+
function SendResetPasswordLinkPayloadFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
|
+
if ((json === undefined) || (json === null)) {
|
|
23
|
+
return json;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
'sendEmail': json['sendEmail'],
|
|
27
|
+
'sendSms': json['sendSms'],
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
exports.SendResetPasswordLinkPayloadFromJSONTyped = SendResetPasswordLinkPayloadFromJSONTyped;
|
|
31
|
+
function SendResetPasswordLinkPayloadToJSON(value) {
|
|
32
|
+
if (value === undefined) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
if (value === null) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'sendEmail': value.sendEmail,
|
|
40
|
+
'sendSms': value.sendSms,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
exports.SendResetPasswordLinkPayloadToJSON = SendResetPasswordLinkPayloadToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export * from './PermissionResourceType';
|
|
|
35
35
|
export * from './Role';
|
|
36
36
|
export * from './RoleCreated';
|
|
37
37
|
export * from './RolesOnOrganization';
|
|
38
|
+
export * from './SendResetPasswordLinkPayload';
|
|
38
39
|
export * from './ServiceAccess';
|
|
39
40
|
export * from './ServiceAccountCreationSchema';
|
|
40
41
|
export * from './ServiceAccountSchema';
|
package/dist/models/index.js
CHANGED
|
@@ -49,6 +49,7 @@ __exportStar(require("./PermissionResourceType"), exports);
|
|
|
49
49
|
__exportStar(require("./Role"), exports);
|
|
50
50
|
__exportStar(require("./RoleCreated"), exports);
|
|
51
51
|
__exportStar(require("./RolesOnOrganization"), exports);
|
|
52
|
+
__exportStar(require("./SendResetPasswordLinkPayload"), exports);
|
|
52
53
|
__exportStar(require("./ServiceAccess"), exports);
|
|
53
54
|
__exportStar(require("./ServiceAccountCreationSchema"), exports);
|
|
54
55
|
__exportStar(require("./ServiceAccountSchema"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equisoft/account-service-sdk-typescript",
|
|
3
|
-
"version": "4.1.1-snapshot.
|
|
3
|
+
"version": "4.1.1-snapshot.20221116194426",
|
|
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
|
@@ -30,6 +30,9 @@ import {
|
|
|
30
30
|
PermissionList,
|
|
31
31
|
PermissionListFromJSON,
|
|
32
32
|
PermissionListToJSON,
|
|
33
|
+
SendResetPasswordLinkPayload,
|
|
34
|
+
SendResetPasswordLinkPayloadFromJSON,
|
|
35
|
+
SendResetPasswordLinkPayloadToJSON,
|
|
33
36
|
SetUserAccountPasswordPayload,
|
|
34
37
|
SetUserAccountPasswordPayloadFromJSON,
|
|
35
38
|
SetUserAccountPasswordPayloadToJSON,
|
|
@@ -119,6 +122,11 @@ export interface ListUsersRequest {
|
|
|
119
122
|
query?: string | null;
|
|
120
123
|
}
|
|
121
124
|
|
|
125
|
+
export interface SendPasswordResetLinkRequest {
|
|
126
|
+
uuid: string;
|
|
127
|
+
sendResetPasswordLinkPayload: SendResetPasswordLinkPayload;
|
|
128
|
+
}
|
|
129
|
+
|
|
122
130
|
export interface SetPasswordRequest {
|
|
123
131
|
uuid: string;
|
|
124
132
|
setUserAccountPasswordPayload: SetUserAccountPasswordPayload;
|
|
@@ -737,6 +745,52 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
737
745
|
return await response.value();
|
|
738
746
|
}
|
|
739
747
|
|
|
748
|
+
/**
|
|
749
|
+
* Sends an email or sms with a time limited unique link to reset user\'s password
|
|
750
|
+
*/
|
|
751
|
+
async sendPasswordResetLinkRaw(requestParameters: SendPasswordResetLinkRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>> {
|
|
752
|
+
if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
|
|
753
|
+
throw new runtime.RequiredError('uuid','Required parameter requestParameters.uuid was null or undefined when calling sendPasswordResetLink.');
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
if (requestParameters.sendResetPasswordLinkPayload === null || requestParameters.sendResetPasswordLinkPayload === undefined) {
|
|
757
|
+
throw new runtime.RequiredError('sendResetPasswordLinkPayload','Required parameter requestParameters.sendResetPasswordLinkPayload was null or undefined when calling sendPasswordResetLink.');
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
const queryParameters: any = {};
|
|
761
|
+
|
|
762
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
763
|
+
|
|
764
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
765
|
+
|
|
766
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
767
|
+
// oauth required
|
|
768
|
+
const token = this.configuration.accessToken;
|
|
769
|
+
const tokenString = await token("OAuth2", ["account:user"]);
|
|
770
|
+
|
|
771
|
+
if (tokenString) {
|
|
772
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
const response = await this.request({
|
|
777
|
+
path: `/users/{uuid}/sendPasswordResetLink`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))),
|
|
778
|
+
method: 'POST',
|
|
779
|
+
headers: headerParameters,
|
|
780
|
+
query: queryParameters,
|
|
781
|
+
body: SendResetPasswordLinkPayloadToJSON(requestParameters.sendResetPasswordLinkPayload),
|
|
782
|
+
}, initOverrides);
|
|
783
|
+
|
|
784
|
+
return new runtime.VoidApiResponse(response);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Sends an email or sms with a time limited unique link to reset user\'s password
|
|
789
|
+
*/
|
|
790
|
+
async sendPasswordResetLink(requestParameters: SendPasswordResetLinkRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void> {
|
|
791
|
+
await this.sendPasswordResetLinkRaw(requestParameters, initOverrides);
|
|
792
|
+
}
|
|
793
|
+
|
|
740
794
|
/**
|
|
741
795
|
* set user account password.
|
|
742
796
|
*/
|
|
@@ -0,0 +1,64 @@
|
|
|
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.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
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SendResetPasswordLinkPayload
|
|
20
|
+
*/
|
|
21
|
+
export interface SendResetPasswordLinkPayload {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof SendResetPasswordLinkPayload
|
|
26
|
+
*/
|
|
27
|
+
sendEmail: boolean;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof SendResetPasswordLinkPayload
|
|
32
|
+
*/
|
|
33
|
+
sendSms: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function SendResetPasswordLinkPayloadFromJSON(json: any): SendResetPasswordLinkPayload {
|
|
37
|
+
return SendResetPasswordLinkPayloadFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function SendResetPasswordLinkPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendResetPasswordLinkPayload {
|
|
41
|
+
if ((json === undefined) || (json === null)) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
|
|
46
|
+
'sendEmail': json['sendEmail'],
|
|
47
|
+
'sendSms': json['sendSms'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function SendResetPasswordLinkPayloadToJSON(value?: SendResetPasswordLinkPayload | null): any {
|
|
52
|
+
if (value === undefined) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
if (value === null) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
|
|
60
|
+
'sendEmail': value.sendEmail,
|
|
61
|
+
'sendSms': value.sendSms,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './PermissionResourceType';
|
|
|
37
37
|
export * from './Role';
|
|
38
38
|
export * from './RoleCreated';
|
|
39
39
|
export * from './RolesOnOrganization';
|
|
40
|
+
export * from './SendResetPasswordLinkPayload';
|
|
40
41
|
export * from './ServiceAccess';
|
|
41
42
|
export * from './ServiceAccountCreationSchema';
|
|
42
43
|
export * from './ServiceAccountSchema';
|