-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: KunalOfficial <[email protected]>
- Loading branch information
1 parent
d56163e
commit 8a0458d
Showing
7 changed files
with
761 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
184 changes: 184 additions & 0 deletions
184
src/management/__generated/managers/self-service-profiles-manager.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
import * as runtime from '../../../lib/runtime.js'; | ||
import type { InitOverride, ApiResponse } from '../../../lib/runtime.js'; | ||
import type { | ||
SsProfile, | ||
SsProfileCreate, | ||
SsProfileList, | ||
SsProfileUpdate, | ||
SsoAccessTicketResponse, | ||
SsoTicketRequestJson, | ||
DeleteSelfServiceProfilesByIdRequest, | ||
GetSelfServiceProfilesByIdRequest, | ||
PatchSelfServiceProfilesByIdRequest, | ||
PostSsoTicketRequest, | ||
} from '../models/index.js'; | ||
|
||
const { BaseAPI } = runtime; | ||
|
||
/** | ||
* | ||
*/ | ||
export class SelfServiceProfilesManager extends BaseAPI { | ||
/** | ||
* Deletes a self-service profile by Id. | ||
* Delete a self-service profile by Id | ||
* | ||
* @throws {RequiredError} | ||
*/ | ||
async deleteSelfServiceProfiles( | ||
requestParameters: DeleteSelfServiceProfilesByIdRequest, | ||
initOverrides?: InitOverride | ||
): Promise<ApiResponse<void>> { | ||
runtime.validateRequiredRequestParams(requestParameters, ['id']); | ||
|
||
const response = await this.request( | ||
{ | ||
path: `/self-service-profiles/{id}`.replace( | ||
'{id}', | ||
encodeURIComponent(String(requestParameters.id)) | ||
), | ||
method: 'DELETE', | ||
}, | ||
initOverrides | ||
); | ||
|
||
return runtime.VoidApiResponse.fromResponse(response); | ||
} | ||
|
||
/** | ||
* Retrieves self-service profiles. Currently only one profile can be created per tenant. | ||
* Retrieve self-service profiles | ||
* | ||
* @throws {RequiredError} | ||
*/ | ||
async getSelfServiceProfiles(initOverrides?: InitOverride): Promise<ApiResponse<SsProfileList>> { | ||
const response = await this.request( | ||
{ | ||
path: `/self-service-profiles`, | ||
method: 'GET', | ||
}, | ||
initOverrides | ||
); | ||
|
||
return runtime.JSONApiResponse.fromResponse(response); | ||
} | ||
|
||
/** | ||
* Retrieves a self-service profile by Id. | ||
* Retrieve a self-service profile by Id | ||
* | ||
* @throws {RequiredError} | ||
*/ | ||
async getSelfServiceProfilesById( | ||
requestParameters: GetSelfServiceProfilesByIdRequest, | ||
initOverrides?: InitOverride | ||
): Promise<ApiResponse<SsProfile>> { | ||
runtime.validateRequiredRequestParams(requestParameters, ['id']); | ||
|
||
const response = await this.request( | ||
{ | ||
path: `/self-service-profiles/{id}`.replace( | ||
'{id}', | ||
encodeURIComponent(String(requestParameters.id)) | ||
), | ||
method: 'GET', | ||
}, | ||
initOverrides | ||
); | ||
|
||
return runtime.JSONApiResponse.fromResponse(response); | ||
} | ||
|
||
/** | ||
* Updates a self-service profile. | ||
* Update a self-service profile | ||
* | ||
* @throws {RequiredError} | ||
*/ | ||
async patchSelfServiceProfiles( | ||
requestParameters: PatchSelfServiceProfilesByIdRequest, | ||
bodyParameters: SsProfileUpdate, | ||
initOverrides?: InitOverride | ||
): Promise<ApiResponse<SsProfile>> { | ||
runtime.validateRequiredRequestParams(requestParameters, ['id']); | ||
|
||
const headerParameters: runtime.HTTPHeaders = {}; | ||
|
||
headerParameters['Content-Type'] = 'application/json'; | ||
|
||
const response = await this.request( | ||
{ | ||
path: `/self-service-profiles/{id}`.replace( | ||
'{id}', | ||
encodeURIComponent(String(requestParameters.id)) | ||
), | ||
method: 'PATCH', | ||
headers: headerParameters, | ||
body: bodyParameters, | ||
}, | ||
initOverrides | ||
); | ||
|
||
return runtime.JSONApiResponse.fromResponse(response); | ||
} | ||
|
||
/** | ||
* Creates a self-service profile. Currently only one profile can be created per tenant. | ||
* Create a self-service profile | ||
* | ||
* @throws {RequiredError} | ||
*/ | ||
async postSelfServiceProfiles( | ||
bodyParameters: SsProfileCreate, | ||
initOverrides?: InitOverride | ||
): Promise<ApiResponse<SsProfile>> { | ||
const headerParameters: runtime.HTTPHeaders = {}; | ||
|
||
headerParameters['Content-Type'] = 'application/json'; | ||
|
||
const response = await this.request( | ||
{ | ||
path: `/self-service-profiles`, | ||
method: 'POST', | ||
headers: headerParameters, | ||
body: bodyParameters, | ||
}, | ||
initOverrides | ||
); | ||
|
||
return runtime.JSONApiResponse.fromResponse(response); | ||
} | ||
|
||
/** | ||
* Creates an sso-access ticket to initiate the Self Service SSO Flow using a self-service profile. | ||
* Create an sso-access ticket to initiate the Self Service SSO Flow | ||
* | ||
* @throws {RequiredError} | ||
*/ | ||
async postSsoTicket( | ||
requestParameters: PostSsoTicketRequest, | ||
bodyParameters: SsoTicketRequestJson, | ||
initOverrides?: InitOverride | ||
): Promise<ApiResponse<SsoAccessTicketResponse>> { | ||
runtime.validateRequiredRequestParams(requestParameters, ['id']); | ||
|
||
const headerParameters: runtime.HTTPHeaders = {}; | ||
|
||
headerParameters['Content-Type'] = 'application/json'; | ||
|
||
const response = await this.request( | ||
{ | ||
path: `/self-service-profiles/{id}/sso-ticket`.replace( | ||
'{id}', | ||
encodeURIComponent(String(requestParameters.id)) | ||
), | ||
method: 'POST', | ||
headers: headerParameters, | ||
body: bodyParameters, | ||
}, | ||
initOverrides | ||
); | ||
|
||
return runtime.JSONApiResponse.fromResponse(response); | ||
} | ||
} |
Oops, something went wrong.