@equisoft/account-service-sdk-typescript 4.3.1-snapshot.20230109214128 → 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.
@@ -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
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/account-service-sdk-typescript",
3
- "version": "4.3.1-snapshot.20230109214128",
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",
@@ -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
  */