1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00
Files
browser/src/models/response/groupResponse.ts
2018-07-06 12:40:43 -04:00

29 lines
802 B
TypeScript

import { SelectionReadOnlyResponse } from './selectionReadOnlyResponse';
export class GroupResponse {
id: string;
organizationId: string;
name: string;
accessAll: boolean;
externalId: string;
constructor(response: any) {
this.id = response.Id;
this.organizationId = response.OrganizationId;
this.name = response.Name;
this.accessAll = response.AccessAll;
this.externalId = response.ExternalId;
}
}
export class GroupDetailsResponse extends GroupResponse {
collections: SelectionReadOnlyResponse[] = [];
constructor(response: any) {
super(response);
if (response.Collections != null) {
this.collections = response.Collections.map((c: any) => new SelectionReadOnlyResponse(c));
}
}
}