@equisoft/account-service-sdk-typescript 4.3.1-snapshot.20230109210204 → 4.3.1-snapshot.20230112191444

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.
@@ -38,6 +38,7 @@ src/models/OrganizationRoleAttributionPermission.ts
38
38
  src/models/OrganizationRoleAttributionRole.ts
39
39
  src/models/OrganizationRoleAttributions.ts
40
40
  src/models/OrganizationServicesElement.ts
41
+ src/models/OrganizationSsoProvider.ts
41
42
  src/models/OrganizationUserServiceAssociation.ts
42
43
  src/models/PasswordUserAccount.ts
43
44
  src/models/PermissionCode.ts
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { CreateOrUpdateOrganizationPayload, CreateOrganizationPayload, CreateOrganizationUserServiceOptionPayload, CreateOrganizationUserServicePayload, CreateRole, ListUserOrganizations, Organization, OrganizationCreated, OrganizationRoleAttributions, OrganizationUserServiceAssociation, RoleCreated, UpdateParentOrganizationPayload, UpsertServicePayload, UserAccountSearchResult } from '../models';
13
+ import { CreateOrUpdateOrganizationPayload, CreateOrganizationPayload, CreateOrganizationUserServiceOptionPayload, CreateOrganizationUserServicePayload, CreateRole, ListUserOrganizations, Organization, OrganizationCreated, OrganizationRoleAttributions, OrganizationSsoProvider, OrganizationUserServiceAssociation, RoleCreated, UpdateParentOrganizationPayload, UpsertServicePayload, UserAccountSearchResult } from '../models';
14
14
  export interface AddServiceRequest {
15
15
  uuid: string;
16
16
  serviceCode: string;
@@ -58,6 +58,9 @@ export interface ListOrganizationRequest {
58
58
  parent?: string;
59
59
  query?: string;
60
60
  }
61
+ export interface ListOrganizationSsoProvidersRequest {
62
+ uuid: string;
63
+ }
61
64
  export interface ListOrganizationUsersRequest {
62
65
  uuid: string;
63
66
  }
@@ -179,6 +182,14 @@ export declare class OrganizationApi extends runtime.BaseAPI {
179
182
  * List organizations
180
183
  */
181
184
  listOrganization(requestParameters: ListOrganizationRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<ListUserOrganizations>;
185
+ /**
186
+ * List SSO Providers available for an organization
187
+ */
188
+ listOrganizationSsoProvidersRaw(requestParameters: ListOrganizationSsoProvidersRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<Array<OrganizationSsoProvider>>>;
189
+ /**
190
+ * List SSO Providers available for an organization
191
+ */
192
+ listOrganizationSsoProviders(requestParameters: ListOrganizationSsoProvidersRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<Array<OrganizationSsoProvider>>;
182
193
  /**
183
194
  * List users with service associated to an organization
184
195
  */
@@ -479,6 +479,42 @@ class OrganizationApi extends runtime.BaseAPI {
479
479
  return yield response.value();
480
480
  });
481
481
  }
482
+ /**
483
+ * List SSO Providers available for an organization
484
+ */
485
+ listOrganizationSsoProvidersRaw(requestParameters, initOverrides) {
486
+ return __awaiter(this, void 0, void 0, function* () {
487
+ if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
488
+ throw new runtime.RequiredError('uuid', 'Required parameter requestParameters.uuid was null or undefined when calling listOrganizationSsoProviders.');
489
+ }
490
+ const queryParameters = {};
491
+ const headerParameters = {};
492
+ if (this.configuration && this.configuration.accessToken) {
493
+ // oauth required
494
+ const token = this.configuration.accessToken;
495
+ const tokenString = yield token("OAuth2", ["account:organization"]);
496
+ if (tokenString) {
497
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
498
+ }
499
+ }
500
+ const response = yield this.request({
501
+ path: `/organizations/{uuid}/ssoProviders`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))),
502
+ method: 'GET',
503
+ headers: headerParameters,
504
+ query: queryParameters,
505
+ }, initOverrides);
506
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(models_1.OrganizationSsoProviderFromJSON));
507
+ });
508
+ }
509
+ /**
510
+ * List SSO Providers available for an organization
511
+ */
512
+ listOrganizationSsoProviders(requestParameters, initOverrides) {
513
+ return __awaiter(this, void 0, void 0, function* () {
514
+ const response = yield this.listOrganizationSsoProvidersRaw(requestParameters, initOverrides);
515
+ return yield response.value();
516
+ });
517
+ }
482
518
  /**
483
519
  * List users with service associated to an organization
484
520
  */
@@ -59,6 +59,9 @@ export interface GetUserPermissionsRequest {
59
59
  export interface GetUuidByIdRequest {
60
60
  id: number;
61
61
  }
62
+ export interface InvalidatePasswordRequest {
63
+ uuid: string;
64
+ }
62
65
  export interface ListUsersRequest {
63
66
  identifierOrEmail?: string | null;
64
67
  identifier?: string | null;
@@ -197,6 +200,14 @@ export declare class UserApi extends runtime.BaseAPI {
197
200
  * Find an uuid by id.
198
201
  */
199
202
  getUuidById(requestParameters: GetUuidByIdRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<Id>;
203
+ /**
204
+ * Invalidate user account password.
205
+ */
206
+ invalidatePasswordRaw(requestParameters: InvalidatePasswordRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>>;
207
+ /**
208
+ * Invalidate user account password.
209
+ */
210
+ invalidatePassword(requestParameters: InvalidatePasswordRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void>;
200
211
  /**
201
212
  * Searches accounts that match ALL params. If no search parameters are provided, returns all users.
202
213
  */
@@ -548,6 +548,41 @@ class UserApi extends runtime.BaseAPI {
548
548
  return yield response.value();
549
549
  });
550
550
  }
551
+ /**
552
+ * Invalidate user account password.
553
+ */
554
+ invalidatePasswordRaw(requestParameters, initOverrides) {
555
+ return __awaiter(this, void 0, void 0, function* () {
556
+ if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
557
+ throw new runtime.RequiredError('uuid', 'Required parameter requestParameters.uuid was null or undefined when calling invalidatePassword.');
558
+ }
559
+ const queryParameters = {};
560
+ const headerParameters = {};
561
+ if (this.configuration && this.configuration.accessToken) {
562
+ // oauth required
563
+ const token = this.configuration.accessToken;
564
+ const tokenString = yield token("OAuth2", ["account:user"]);
565
+ if (tokenString) {
566
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
567
+ }
568
+ }
569
+ const response = yield this.request({
570
+ path: `/users/{uuid}/password`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))),
571
+ method: 'DELETE',
572
+ headers: headerParameters,
573
+ query: queryParameters,
574
+ }, initOverrides);
575
+ return new runtime.VoidApiResponse(response);
576
+ });
577
+ }
578
+ /**
579
+ * Invalidate user account password.
580
+ */
581
+ invalidatePassword(requestParameters, initOverrides) {
582
+ return __awaiter(this, void 0, void 0, function* () {
583
+ yield this.invalidatePasswordRaw(requestParameters, initOverrides);
584
+ });
585
+ }
551
586
  /**
552
587
  * Searches accounts that match ALL params. If no search parameters are provided, returns all users.
553
588
  */
@@ -0,0 +1,34 @@
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.3.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 { LocalizedString } from './LocalizedString';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface OrganizationSsoProvider
17
+ */
18
+ export interface OrganizationSsoProvider {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof OrganizationSsoProvider
23
+ */
24
+ code: string;
25
+ /**
26
+ *
27
+ * @type {LocalizedString}
28
+ * @memberof OrganizationSsoProvider
29
+ */
30
+ name: LocalizedString;
31
+ }
32
+ export declare function OrganizationSsoProviderFromJSON(json: any): OrganizationSsoProvider;
33
+ export declare function OrganizationSsoProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationSsoProvider;
34
+ export declare function OrganizationSsoProviderToJSON(value?: OrganizationSsoProvider | null): any;
@@ -0,0 +1,44 @@
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.3.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.OrganizationSsoProviderToJSON = exports.OrganizationSsoProviderFromJSONTyped = exports.OrganizationSsoProviderFromJSON = void 0;
17
+ const LocalizedString_1 = require("./LocalizedString");
18
+ function OrganizationSsoProviderFromJSON(json) {
19
+ return OrganizationSsoProviderFromJSONTyped(json, false);
20
+ }
21
+ exports.OrganizationSsoProviderFromJSON = OrganizationSsoProviderFromJSON;
22
+ function OrganizationSsoProviderFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'code': json['code'],
28
+ 'name': LocalizedString_1.LocalizedStringFromJSON(json['name']),
29
+ };
30
+ }
31
+ exports.OrganizationSsoProviderFromJSONTyped = OrganizationSsoProviderFromJSONTyped;
32
+ function OrganizationSsoProviderToJSON(value) {
33
+ if (value === undefined) {
34
+ return undefined;
35
+ }
36
+ if (value === null) {
37
+ return null;
38
+ }
39
+ return {
40
+ 'code': value.code,
41
+ 'name': LocalizedString_1.LocalizedStringToJSON(value.name),
42
+ };
43
+ }
44
+ exports.OrganizationSsoProviderToJSON = OrganizationSsoProviderToJSON;
@@ -27,6 +27,7 @@ export * from './OrganizationRoleAttributionPermission';
27
27
  export * from './OrganizationRoleAttributionRole';
28
28
  export * from './OrganizationRoleAttributions';
29
29
  export * from './OrganizationServicesElement';
30
+ export * from './OrganizationSsoProvider';
30
31
  export * from './OrganizationUserServiceAssociation';
31
32
  export * from './PasswordUserAccount';
32
33
  export * from './PermissionCode';
@@ -41,6 +41,7 @@ __exportStar(require("./OrganizationRoleAttributionPermission"), exports);
41
41
  __exportStar(require("./OrganizationRoleAttributionRole"), exports);
42
42
  __exportStar(require("./OrganizationRoleAttributions"), exports);
43
43
  __exportStar(require("./OrganizationServicesElement"), exports);
44
+ __exportStar(require("./OrganizationSsoProvider"), exports);
44
45
  __exportStar(require("./OrganizationUserServiceAssociation"), exports);
45
46
  __exportStar(require("./PasswordUserAccount"), exports);
46
47
  __exportStar(require("./PermissionCode"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/account-service-sdk-typescript",
3
- "version": "4.3.1-snapshot.20230109210204",
3
+ "version": "4.3.1-snapshot.20230112191444",
4
4
  "description": "OpenAPI client for @equisoft/account-service-sdk-typescript",
5
5
  "author": "Equisoft Inc.",
6
6
  "main": "./dist/index.js",
@@ -45,6 +45,9 @@ import {
45
45
  OrganizationRoleAttributions,
46
46
  OrganizationRoleAttributionsFromJSON,
47
47
  OrganizationRoleAttributionsToJSON,
48
+ OrganizationSsoProvider,
49
+ OrganizationSsoProviderFromJSON,
50
+ OrganizationSsoProviderToJSON,
48
51
  OrganizationUserServiceAssociation,
49
52
  OrganizationUserServiceAssociationFromJSON,
50
53
  OrganizationUserServiceAssociationToJSON,
@@ -120,6 +123,10 @@ export interface ListOrganizationRequest {
120
123
  query?: string;
121
124
  }
122
125
 
126
+ export interface ListOrganizationSsoProvidersRequest {
127
+ uuid: string;
128
+ }
129
+
123
130
  export interface ListOrganizationUsersRequest {
124
131
  uuid: string;
125
132
  }
@@ -675,6 +682,46 @@ export class OrganizationApi extends runtime.BaseAPI {
675
682
  return await response.value();
676
683
  }
677
684
 
685
+ /**
686
+ * List SSO Providers available for an organization
687
+ */
688
+ async listOrganizationSsoProvidersRaw(requestParameters: ListOrganizationSsoProvidersRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<Array<OrganizationSsoProvider>>> {
689
+ if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
690
+ throw new runtime.RequiredError('uuid','Required parameter requestParameters.uuid was null or undefined when calling listOrganizationSsoProviders.');
691
+ }
692
+
693
+ const queryParameters: any = {};
694
+
695
+ const headerParameters: runtime.HTTPHeaders = {};
696
+
697
+ if (this.configuration && this.configuration.accessToken) {
698
+ // oauth required
699
+ const token = this.configuration.accessToken;
700
+ const tokenString = await token("OAuth2", ["account:organization"]);
701
+
702
+ if (tokenString) {
703
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
704
+ }
705
+ }
706
+
707
+ const response = await this.request({
708
+ path: `/organizations/{uuid}/ssoProviders`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))),
709
+ method: 'GET',
710
+ headers: headerParameters,
711
+ query: queryParameters,
712
+ }, initOverrides);
713
+
714
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OrganizationSsoProviderFromJSON));
715
+ }
716
+
717
+ /**
718
+ * List SSO Providers available for an organization
719
+ */
720
+ async listOrganizationSsoProviders(requestParameters: ListOrganizationSsoProvidersRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<Array<OrganizationSsoProvider>> {
721
+ const response = await this.listOrganizationSsoProvidersRaw(requestParameters, initOverrides);
722
+ return await response.value();
723
+ }
724
+
678
725
  /**
679
726
  * List users with service associated to an organization
680
727
  */
@@ -121,6 +121,10 @@ export interface GetUuidByIdRequest {
121
121
  id: number;
122
122
  }
123
123
 
124
+ export interface InvalidatePasswordRequest {
125
+ uuid: string;
126
+ }
127
+
124
128
  export interface ListUsersRequest {
125
129
  identifierOrEmail?: string | null;
126
130
  identifier?: string | null;
@@ -736,6 +740,45 @@ export class UserApi extends runtime.BaseAPI {
736
740
  return await response.value();
737
741
  }
738
742
 
743
+ /**
744
+ * Invalidate user account password.
745
+ */
746
+ async invalidatePasswordRaw(requestParameters: InvalidatePasswordRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<void>> {
747
+ if (requestParameters.uuid === null || requestParameters.uuid === undefined) {
748
+ throw new runtime.RequiredError('uuid','Required parameter requestParameters.uuid was null or undefined when calling invalidatePassword.');
749
+ }
750
+
751
+ const queryParameters: any = {};
752
+
753
+ const headerParameters: runtime.HTTPHeaders = {};
754
+
755
+ if (this.configuration && this.configuration.accessToken) {
756
+ // oauth required
757
+ const token = this.configuration.accessToken;
758
+ const tokenString = await token("OAuth2", ["account:user"]);
759
+
760
+ if (tokenString) {
761
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
762
+ }
763
+ }
764
+
765
+ const response = await this.request({
766
+ path: `/users/{uuid}/password`.replace(`{${"uuid"}}`, encodeURIComponent(String(requestParameters.uuid))),
767
+ method: 'DELETE',
768
+ headers: headerParameters,
769
+ query: queryParameters,
770
+ }, initOverrides);
771
+
772
+ return new runtime.VoidApiResponse(response);
773
+ }
774
+
775
+ /**
776
+ * Invalidate user account password.
777
+ */
778
+ async invalidatePassword(requestParameters: InvalidatePasswordRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<void> {
779
+ await this.invalidatePasswordRaw(requestParameters, initOverrides);
780
+ }
781
+
739
782
  /**
740
783
  * Searches accounts that match ALL params. If no search parameters are provided, returns all users.
741
784
  */
@@ -0,0 +1,71 @@
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.3.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
+ import {
17
+ LocalizedString,
18
+ LocalizedStringFromJSON,
19
+ LocalizedStringFromJSONTyped,
20
+ LocalizedStringToJSON,
21
+ } from './LocalizedString';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface OrganizationSsoProvider
27
+ */
28
+ export interface OrganizationSsoProvider {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof OrganizationSsoProvider
33
+ */
34
+ code: string;
35
+ /**
36
+ *
37
+ * @type {LocalizedString}
38
+ * @memberof OrganizationSsoProvider
39
+ */
40
+ name: LocalizedString;
41
+ }
42
+
43
+ export function OrganizationSsoProviderFromJSON(json: any): OrganizationSsoProvider {
44
+ return OrganizationSsoProviderFromJSONTyped(json, false);
45
+ }
46
+
47
+ export function OrganizationSsoProviderFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationSsoProvider {
48
+ if ((json === undefined) || (json === null)) {
49
+ return json;
50
+ }
51
+ return {
52
+
53
+ 'code': json['code'],
54
+ 'name': LocalizedStringFromJSON(json['name']),
55
+ };
56
+ }
57
+
58
+ export function OrganizationSsoProviderToJSON(value?: OrganizationSsoProvider | null): any {
59
+ if (value === undefined) {
60
+ return undefined;
61
+ }
62
+ if (value === null) {
63
+ return null;
64
+ }
65
+ return {
66
+
67
+ 'code': value.code,
68
+ 'name': LocalizedStringToJSON(value.name),
69
+ };
70
+ }
71
+
@@ -29,6 +29,7 @@ export * from './OrganizationRoleAttributionPermission';
29
29
  export * from './OrganizationRoleAttributionRole';
30
30
  export * from './OrganizationRoleAttributions';
31
31
  export * from './OrganizationServicesElement';
32
+ export * from './OrganizationSsoProvider';
32
33
  export * from './OrganizationUserServiceAssociation';
33
34
  export * from './PasswordUserAccount';
34
35
  export * from './PermissionCode';