-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api-keys): +listing apikey eligibility call endpoint (#889)
- Loading branch information
1 parent
e6cfa62
commit 45b9ad7
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import Resource from '../Resource.js'; | ||
import {ApiKeyTemplateModel} from './ApiKeyTemplateInterface.js'; | ||
import {ApiKeyTemplateEligibilityResponseModel, ApiKeyTemplateModel} from './ApiKeyTemplateInterface.js'; | ||
|
||
export default class ApiKeyTemplate extends Resource { | ||
static baseUrl = '/rest/templates/apikeys'; | ||
|
||
get(apiKeyTemplateId: string) { | ||
return this.api.get<ApiKeyTemplateModel>(`${ApiKeyTemplate.baseUrl}/${apiKeyTemplateId}`); | ||
} | ||
|
||
listAPIKeysEligibility() { | ||
return this.api.get<ApiKeyTemplateEligibilityResponseModel[]>( | ||
`${ApiKeyTemplate.baseUrl}/privileges/eligibility`, | ||
); | ||
} | ||
} |
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