@equisoft/account-service-sdk-typescript
Advanced tools
Comparing version 4.2.1-snapshot.20221129211056 to 4.2.1-snapshot.20221207193620
@@ -13,3 +13,3 @@ /** | ||
import * as runtime from '../runtime'; | ||
import { ApplyPermissionsPayload, Id, Organization, PermissionList, SendResetPasswordLinkPayload, SetUserAccountPasswordPayload, UpdateUserAccountPayload, UpdateUserAccountSsoPayload, User, UserAccountRoleAttributions, UserAccountSearchResult, UserPermissions } from '../models'; | ||
import { ApplyPermissionsPayload, Id, Organization, PasswordUserAccount, PermissionList, SendResetPasswordLinkPayload, SetUserAccountPasswordPayload, UpdateUserAccountPayload, UpdateUserAccountSsoPayload, User, UserAccountRoleAttributions, UserAccountSearchResult, UserPermissions } from '../models'; | ||
export interface ActivateRequest { | ||
@@ -54,2 +54,5 @@ uuid: string; | ||
} | ||
export interface GetUserByConfirmationHashRequest { | ||
hash: string; | ||
} | ||
export interface GetUserPermissionsRequest { | ||
@@ -176,2 +179,10 @@ uuid: string; | ||
/** | ||
* Get password info for a user based on unique hash. | ||
*/ | ||
getUserByConfirmationHashRaw(requestParameters: GetUserByConfirmationHashRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<PasswordUserAccount>>; | ||
/** | ||
* Get password info for a user based on unique hash. | ||
*/ | ||
getUserByConfirmationHash(requestParameters: GetUserByConfirmationHashRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<PasswordUserAccount>; | ||
/** | ||
* Get user permissions | ||
@@ -178,0 +189,0 @@ */ |
@@ -444,2 +444,38 @@ "use strict"; | ||
/** | ||
* Get password info for a user based on unique hash. | ||
*/ | ||
getUserByConfirmationHashRaw(requestParameters, initOverrides) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (requestParameters.hash === null || requestParameters.hash === undefined) { | ||
throw new runtime.RequiredError('hash', 'Required parameter requestParameters.hash was null or undefined when calling getUserByConfirmationHash.'); | ||
} | ||
const queryParameters = {}; | ||
const headerParameters = {}; | ||
if (this.configuration && this.configuration.accessToken) { | ||
// oauth required | ||
const token = this.configuration.accessToken; | ||
const tokenString = yield token("OAuth2", ["account:user"]); | ||
if (tokenString) { | ||
headerParameters["Authorization"] = `Bearer ${tokenString}`; | ||
} | ||
} | ||
const response = yield this.request({ | ||
path: `/resetPassword/{hash}`.replace(`{${"hash"}}`, encodeURIComponent(String(requestParameters.hash))), | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
}, initOverrides); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => models_1.PasswordUserAccountFromJSON(jsonValue)); | ||
}); | ||
} | ||
/** | ||
* Get password info for a user based on unique hash. | ||
*/ | ||
getUserByConfirmationHash(requestParameters, initOverrides) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const response = yield this.getUserByConfirmationHashRaw(requestParameters, initOverrides); | ||
return yield response.value(); | ||
}); | ||
} | ||
/** | ||
* Get user permissions | ||
@@ -446,0 +482,0 @@ */ |
@@ -31,2 +31,3 @@ export * from './ApplyPermissionsPayload'; | ||
export * from './OrganizationUserServiceAssociation'; | ||
export * from './PasswordUserAccount'; | ||
export * from './PermissionCode'; | ||
@@ -33,0 +34,0 @@ export * from './PermissionCreated'; |
@@ -45,2 +45,3 @@ "use strict"; | ||
__exportStar(require("./OrganizationUserServiceAssociation"), exports); | ||
__exportStar(require("./PasswordUserAccount"), exports); | ||
__exportStar(require("./PermissionCode"), exports); | ||
@@ -47,0 +48,0 @@ __exportStar(require("./PermissionCreated"), exports); |
{ | ||
"name": "@equisoft/account-service-sdk-typescript", | ||
"version": "4.2.1-snapshot.20221129211056", | ||
"version": "4.2.1-snapshot.20221207193620", | ||
"description": "OpenAPI client for @equisoft/account-service-sdk-typescript", | ||
@@ -5,0 +5,0 @@ "author": "Equisoft Inc.", |
@@ -30,2 +30,5 @@ /* tslint:disable */ | ||
OrganizationToJSON, | ||
PasswordUserAccount, | ||
PasswordUserAccountFromJSON, | ||
PasswordUserAccountToJSON, | ||
PermissionList, | ||
@@ -110,2 +113,6 @@ PermissionListFromJSON, | ||
export interface GetUserByConfirmationHashRequest { | ||
hash: string; | ||
} | ||
export interface GetUserPermissionsRequest { | ||
@@ -615,2 +622,42 @@ uuid: string; | ||
/** | ||
* Get password info for a user based on unique hash. | ||
*/ | ||
async getUserByConfirmationHashRaw(requestParameters: GetUserByConfirmationHashRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<runtime.ApiResponse<PasswordUserAccount>> { | ||
if (requestParameters.hash === null || requestParameters.hash === undefined) { | ||
throw new runtime.RequiredError('hash','Required parameter requestParameters.hash was null or undefined when calling getUserByConfirmationHash.'); | ||
} | ||
const queryParameters: any = {}; | ||
const headerParameters: runtime.HTTPHeaders = {}; | ||
if (this.configuration && this.configuration.accessToken) { | ||
// oauth required | ||
const token = this.configuration.accessToken; | ||
const tokenString = await token("OAuth2", ["account:user"]); | ||
if (tokenString) { | ||
headerParameters["Authorization"] = `Bearer ${tokenString}`; | ||
} | ||
} | ||
const response = await this.request({ | ||
path: `/resetPassword/{hash}`.replace(`{${"hash"}}`, encodeURIComponent(String(requestParameters.hash))), | ||
method: 'GET', | ||
headers: headerParameters, | ||
query: queryParameters, | ||
}, initOverrides); | ||
return new runtime.JSONApiResponse(response, (jsonValue) => PasswordUserAccountFromJSON(jsonValue)); | ||
} | ||
/** | ||
* Get password info for a user based on unique hash. | ||
*/ | ||
async getUserByConfirmationHash(requestParameters: GetUserByConfirmationHashRequest, initOverrides?: RequestInit | runtime.InitOverideFunction): Promise<PasswordUserAccount> { | ||
const response = await this.getUserByConfirmationHashRaw(requestParameters, initOverrides); | ||
return await response.value(); | ||
} | ||
/** | ||
* Get user permissions | ||
@@ -617,0 +664,0 @@ */ |
@@ -33,2 +33,3 @@ /* tslint:disable */ | ||
export * from './OrganizationUserServiceAssociation'; | ||
export * from './PasswordUserAccount'; | ||
export * from './PermissionCode'; | ||
@@ -35,0 +36,0 @@ export * from './PermissionCreated'; |
Sorry, the diff of this file is not supported yet
695460
245
17987