1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00
Files
browser/libs/common/src/models/export/secure-note.export.ts
Oscar Hinton a5e3432f85 Assign ownership to many libs files (#6928)
Assign ownership to many of the remaining libs/common files.

Criteria for ownership:
* Files used by a single team, is now owned by that team.
* Files related to a domain owned by a team is now owned by that team.
* Where ownership is unclear the "lowest level" service takes ownership.
2023-11-27 20:59:44 +00:00

32 lines
780 B
TypeScript

import { SecureNoteType } from "../../vault/enums";
import { SecureNote as SecureNoteDomain } from "../../vault/models/domain/secure-note";
import { SecureNoteView } from "../../vault/models/view/secure-note.view";
export class SecureNoteExport {
static template(): SecureNoteExport {
const req = new SecureNoteExport();
req.type = SecureNoteType.Generic;
return req;
}
static toView(req: SecureNoteExport, view = new SecureNoteView()) {
view.type = req.type;
return view;
}
static toDomain(req: SecureNoteExport, view = new SecureNoteDomain()) {
view.type = req.type;
return view;
}
type: SecureNoteType;
constructor(o?: SecureNoteView | SecureNoteDomain) {
if (o == null) {
return;
}
this.type = o.type;
}
}