@equisoft/account-service-sdk-typescript 4.2.1-snapshot.20221129211056 → 4.2.1-snapshot.20221214180735

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.
@@ -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
@@ -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
  }
@@ -91,11 +94,11 @@ export declare class UserApi extends runtime.BaseAPI {
91
94
  */
92
95
  activate(requestParameters: ActivateRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
93
96
  /**
94
- * update user account sso.
97
+ * Update user account sso.
95
98
  */
96
99
  addUpdateSsoRaw(requestParameters: AddUpdateSsoRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
97
100
  /**
98
- * update user account sso.
101
+ * Update user account sso.
99
102
  */
100
103
  addUpdateSso(requestParameters: AddUpdateSsoRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
101
104
  /**
@@ -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
  */
@@ -65,7 +65,7 @@ class UserApi extends runtime.BaseAPI {
65
65
  });
66
66
  }
67
67
  /**
68
- * update user account sso.
68
+ * Update user account sso.
69
69
  */
70
70
  addUpdateSsoRaw(requestParameters, initOverrides) {
71
71
  return __awaiter(this, void 0, void 0, function* () {
@@ -88,7 +88,7 @@ class UserApi extends runtime.BaseAPI {
88
88
  }
89
89
  const response = yield this.request({
90
90
  path: `/users/{uuid}/sso`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))),
91
- method: 'POST',
91
+ method: 'PUT',
92
92
  headers: headerParameters,
93
93
  query: queryParameters,
94
94
  body: models_1.UpdateUserAccountSsoPayloadToJSON(requestParameters.updateUserAccountSsoPayload),
@@ -97,7 +97,7 @@ class UserApi extends runtime.BaseAPI {
97
97
  });
98
98
  }
99
99
  /**
100
- * update user account sso.
100
+ * Update user account sso.
101
101
  */
102
102
  addUpdateSso(requestParameters, initOverrides) {
103
103
  return __awaiter(this, void 0, void 0, function* () {
@@ -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;
@@ -20,13 +20,13 @@ export interface UpdateUserAccountSsoPayload {
20
20
  * @type {string}
21
21
  * @memberof UpdateUserAccountSsoPayload
22
22
  */
23
- ssoClient: string;
23
+ providerCode: string;
24
24
  /**
25
25
  *
26
26
  * @type {string}
27
27
  * @memberof UpdateUserAccountSsoPayload
28
28
  */
29
- ssoIdentifier: string;
29
+ identifier?: string | null;
30
30
  }
31
31
  export declare function UpdateUserAccountSsoPayloadFromJSON(json: any): UpdateUserAccountSsoPayload;
32
32
  export declare function UpdateUserAccountSsoPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateUserAccountSsoPayload;
@@ -14,6 +14,7 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.UpdateUserAccountSsoPayloadToJSON = exports.UpdateUserAccountSsoPayloadFromJSONTyped = exports.UpdateUserAccountSsoPayloadFromJSON = void 0;
17
+ const runtime_1 = require("../runtime");
17
18
  function UpdateUserAccountSsoPayloadFromJSON(json) {
18
19
  return UpdateUserAccountSsoPayloadFromJSONTyped(json, false);
19
20
  }
@@ -23,8 +24,8 @@ function UpdateUserAccountSsoPayloadFromJSONTyped(json, ignoreDiscriminator) {
23
24
  return json;
24
25
  }
25
26
  return {
26
- 'ssoClient': json['ssoClient'],
27
- 'ssoIdentifier': json['ssoIdentifier'],
27
+ 'providerCode': json['providerCode'],
28
+ 'identifier': !runtime_1.exists(json, 'identifier') ? undefined : json['identifier'],
28
29
  };
29
30
  }
30
31
  exports.UpdateUserAccountSsoPayloadFromJSONTyped = UpdateUserAccountSsoPayloadFromJSONTyped;
@@ -36,8 +37,8 @@ function UpdateUserAccountSsoPayloadToJSON(value) {
36
37
  return null;
37
38
  }
38
39
  return {
39
- 'ssoClient': value.ssoClient,
40
- 'ssoIdentifier': value.ssoIdentifier,
40
+ 'providerCode': value.providerCode,
41
+ 'identifier': value.identifier,
41
42
  };
42
43
  }
43
44
  exports.UpdateUserAccountSsoPayloadToJSON = UpdateUserAccountSsoPayloadToJSON;
@@ -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';
@@ -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.20221129211056",
3
+ "version": "4.2.1-snapshot.20221214180735",
4
4
  "description": "OpenAPI client for @equisoft/account-service-sdk-typescript",
5
5
  "author": "Equisoft Inc.",
6
6
  "main": "./dist/index.js",
@@ -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
  }
@@ -186,7 +193,7 @@ export class UserApi extends runtime.BaseAPI {
186
193
  }
187
194
 
188
195
  /**
189
- * update user account sso.
196
+ * Update user account sso.
190
197
  */
191
198
  async addUpdateSsoRaw(requestParameters: AddUpdateSsoRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>> {
192
199
  if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
@@ -215,7 +222,7 @@ export class UserApi extends runtime.BaseAPI {
215
222
 
216
223
  const response = await this.request({
217
224
  path: `/users/{uuid}/sso`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))),
218
- method: 'POST',
225
+ method: 'PUT',
219
226
  headers: headerParameters,
220
227
  query: queryParameters,
221
228
  body: UpdateUserAccountSsoPayloadToJSON(requestParameters.updateUserAccountSsoPayload),
@@ -225,7 +232,7 @@ export class UserApi extends runtime.BaseAPI {
225
232
  }
226
233
 
227
234
  /**
228
- * update user account sso.
235
+ * Update user account sso.
229
236
  */
230
237
  async addUpdateSso(requestParameters: AddUpdateSsoRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void> {
231
238
  await this.addUpdateSsoRaw(requestParameters, initOverrides);
@@ -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
+
@@ -24,13 +24,13 @@ export interface UpdateUserAccountSsoPayload {
24
24
  * @type {string}
25
25
  * @memberof UpdateUserAccountSsoPayload
26
26
  */
27
- ssoClient: string;
27
+ providerCode: string;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof UpdateUserAccountSsoPayload
32
32
  */
33
- ssoIdentifier: string;
33
+ identifier?: string | null;
34
34
  }
35
35
 
36
36
  export function UpdateUserAccountSsoPayloadFromJSON(json: any): UpdateUserAccountSsoPayload {
@@ -43,8 +43,8 @@ export function UpdateUserAccountSsoPayloadFromJSONTyped(json: any, ignoreDiscri
43
43
  }
44
44
  return {
45
45
 
46
- 'ssoClient': json['ssoClient'],
47
- 'ssoIdentifier': json['ssoIdentifier'],
46
+ 'providerCode': json['providerCode'],
47
+ 'identifier': !exists(json, 'identifier') ? undefined : json['identifier'],
48
48
  };
49
49
  }
50
50
 
@@ -57,8 +57,8 @@ export function UpdateUserAccountSsoPayloadToJSON(value?: UpdateUserAccountSsoPa
57
57
  }
58
58
  return {
59
59
 
60
- 'ssoClient': value.ssoClient,
61
- 'ssoIdentifier': value.ssoIdentifier,
60
+ 'providerCode': value.providerCode,
61
+ 'identifier': value.identifier,
62
62
  };
63
63
  }
64
64
 
@@ -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';