1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

[SSO Auto Enroll] Auto Enroll status retrieval (#486)

* [SSO Auto Enroll] Auto Enroll status retrieval

* Fixed import order

* Updated object property
This commit is contained in:
Vincent Salucci
2021-09-15 12:54:44 -05:00
committed by GitHub
parent ee1ea922a9
commit da132217da
4 changed files with 27 additions and 5 deletions

View File

@@ -114,6 +114,7 @@ import { IdentityCaptchaResponse } from '../models/response/identityCaptchaRespo
import { IdentityTokenResponse } from '../models/response/identityTokenResponse';
import { IdentityTwoFactorResponse } from '../models/response/identityTwoFactorResponse';
import { ListResponse } from '../models/response/listResponse';
import { OrganizationAutoEnrollStatusResponse } from '../models/response/organizationAutoEnrollStatusResponse';
import { OrganizationKeysResponse } from '../models/response/organizationKeysResponse';
import { OrganizationResponse } from '../models/response/organizationResponse';
import { OrganizationSubscriptionResponse } from '../models/response/organizationSubscriptionResponse';
@@ -370,6 +371,7 @@ export abstract class ApiService {
getOrganizationSubscription: (id: string) => Promise<OrganizationSubscriptionResponse>;
getOrganizationLicense: (id: string, installationId: string) => Promise<any>;
getOrganizationTaxInfo: (id: string) => Promise<TaxInfoResponse>;
getOrganizationAutoEnrollStatus: (identifier: string) => Promise<OrganizationAutoEnrollStatusResponse>;
postOrganization: (request: OrganizationCreateRequest) => Promise<OrganizationResponse>;
putOrganization: (id: string, request: OrganizationUpdateRequest) => Promise<OrganizationResponse>;
putOrganizationTaxInfo: (id: string, request: OrganizationTaxInfoUpdateRequest) => Promise<any>;

View File

@@ -0,0 +1,12 @@
import { BaseResponse } from './baseResponse';
export class OrganizationAutoEnrollStatusResponse extends BaseResponse {
id: string;
resetPasswordEnabled: boolean;
constructor(response: any) {
super(response);
this.id = this.getResponseProperty('Id');
this.resetPasswordEnabled = this.getResponseProperty('ResetPasswordEnabled');
}
}

View File

@@ -118,6 +118,7 @@ import {
import { IdentityTokenResponse } from '../models/response/identityTokenResponse';
import { IdentityTwoFactorResponse } from '../models/response/identityTwoFactorResponse';
import { ListResponse } from '../models/response/listResponse';
import { OrganizationAutoEnrollStatusResponse } from '../models/response/organizationAutoEnrollStatusResponse';
import { OrganizationKeysResponse } from '../models/response/organizationKeysResponse';
import { OrganizationResponse } from '../models/response/organizationResponse';
import { OrganizationSubscriptionResponse } from '../models/response/organizationSubscriptionResponse';
@@ -812,6 +813,11 @@ export class ApiService implements ApiServiceAbstraction {
return new OrganizationUserResetPasswordDetailsReponse(r);
}
async getOrganizationAutoEnrollStatus(identifier: string): Promise<OrganizationAutoEnrollStatusResponse> {
const r = await this.send('GET', '/organizations/' + identifier + '/auto-enroll-status', null, true, true);
return new OrganizationAutoEnrollStatusResponse(r);
}
postOrganizationUserInvite(organizationId: string, request: OrganizationUserInviteRequest): Promise<any> {
return this.send('POST', '/organizations/' + organizationId + '/users/invite', request, true, false);
}