1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

apis for org api keys

This commit is contained in:
Kyle Spearrin
2019-03-07 10:58:27 -05:00
parent 0fa88b44b8
commit 3b3b71d841
3 changed files with 24 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ import { VerifyBankRequest } from '../models/request/verifyBankRequest';
import { VerifyDeleteRecoverRequest } from '../models/request/verifyDeleteRecoverRequest';
import { VerifyEmailRequest } from '../models/request/verifyEmailRequest';
import { ApiKeyResponse } from '../models/response/apiKeyResponse';
import { BillingResponse } from '../models/response/billingResponse';
import { BreachAccountResponse } from '../models/response/breachAccountResponse';
import { CipherResponse } from '../models/response/cipherResponse';
@@ -767,6 +768,16 @@ export class ApiService implements ApiServiceAbstraction {
return this.send('POST', '/organizations/' + id + '/license', data, true, false);
}
async postOrganizationApiKey(id: string, request: PasswordVerificationRequest): Promise<ApiKeyResponse> {
const r = await this.send('POST', '/organizations/' + id + '/api-key', request, true, true);
return new ApiKeyResponse(r);
}
async postOrganizationRotateApiKey(id: string, request: PasswordVerificationRequest): Promise<ApiKeyResponse> {
const r = await this.send('POST', '/organizations/' + id + '/rotate-api-key', request, true, true);
return new ApiKeyResponse(r);
}
postOrganizationSeat(id: string, request: SeatRequest): Promise<any> {
return this.send('POST', '/organizations/' + id + '/seat', request, true, false);
}