mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 02:33:46 +00:00
34 lines
873 B
TypeScript
34 lines
873 B
TypeScript
import { SelectionReadOnlyResponse } from './selectionReadOnlyResponse';
|
|
|
|
export class CollectionResponse {
|
|
id: string;
|
|
organizationId: string;
|
|
name: string;
|
|
|
|
constructor(response: any) {
|
|
this.id = response.Id;
|
|
this.organizationId = response.OrganizationId;
|
|
this.name = response.Name;
|
|
}
|
|
}
|
|
|
|
export class CollectionDetailsResponse extends CollectionResponse {
|
|
readOnly: boolean;
|
|
|
|
constructor(response: any) {
|
|
super(response);
|
|
this.readOnly = response.ReadOnly || false;
|
|
}
|
|
}
|
|
|
|
export class CollectionGroupDetailsResponse extends CollectionResponse {
|
|
groups: SelectionReadOnlyResponse[] = [];
|
|
|
|
constructor(response: any) {
|
|
super(response);
|
|
if (response.Groups != null) {
|
|
this.groups = response.Groups.map((g: any) => new SelectionReadOnlyResponse(g));
|
|
}
|
|
}
|
|
}
|