mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
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.
This commit is contained in:
23
libs/common/src/vault/models/api/card.api.ts
Normal file
23
libs/common/src/vault/models/api/card.api.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { BaseResponse } from "../../../models/response/base.response";
|
||||
|
||||
export class CardApi extends BaseResponse {
|
||||
cardholderName: string;
|
||||
brand: string;
|
||||
number: string;
|
||||
expMonth: string;
|
||||
expYear: string;
|
||||
code: string;
|
||||
|
||||
constructor(data: any = null) {
|
||||
super(data);
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
this.cardholderName = this.getResponseProperty("CardholderName");
|
||||
this.brand = this.getResponseProperty("Brand");
|
||||
this.number = this.getResponseProperty("Number");
|
||||
this.expMonth = this.getResponseProperty("ExpMonth");
|
||||
this.expYear = this.getResponseProperty("ExpYear");
|
||||
this.code = this.getResponseProperty("Code");
|
||||
}
|
||||
}
|
||||
38
libs/common/src/vault/models/api/fido2-credential.api.ts
Normal file
38
libs/common/src/vault/models/api/fido2-credential.api.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { BaseResponse } from "../../../models/response/base.response";
|
||||
|
||||
export class Fido2CredentialApi extends BaseResponse {
|
||||
credentialId: string;
|
||||
keyType: "public-key";
|
||||
keyAlgorithm: "ECDSA";
|
||||
keyCurve: "P-256";
|
||||
keyValue: string;
|
||||
rpId: string;
|
||||
userHandle: string;
|
||||
userName: string;
|
||||
counter: string;
|
||||
rpName: string;
|
||||
userDisplayName: string;
|
||||
discoverable: string;
|
||||
creationDate: string;
|
||||
|
||||
constructor(data: any = null) {
|
||||
super(data);
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.credentialId = this.getResponseProperty("CredentialId");
|
||||
this.keyType = this.getResponseProperty("KeyType");
|
||||
this.keyAlgorithm = this.getResponseProperty("KeyAlgorithm");
|
||||
this.keyCurve = this.getResponseProperty("KeyCurve");
|
||||
this.keyValue = this.getResponseProperty("keyValue");
|
||||
this.rpId = this.getResponseProperty("RpId");
|
||||
this.userHandle = this.getResponseProperty("UserHandle");
|
||||
this.userName = this.getResponseProperty("UserName");
|
||||
this.counter = this.getResponseProperty("Counter");
|
||||
this.rpName = this.getResponseProperty("RpName");
|
||||
this.userDisplayName = this.getResponseProperty("UserDisplayName");
|
||||
this.discoverable = this.getResponseProperty("Discoverable");
|
||||
this.creationDate = this.getResponseProperty("CreationDate");
|
||||
}
|
||||
}
|
||||
20
libs/common/src/vault/models/api/field.api.ts
Normal file
20
libs/common/src/vault/models/api/field.api.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { BaseResponse } from "../../../models/response/base.response";
|
||||
import { FieldType, LinkedIdType } from "../../enums";
|
||||
|
||||
export class FieldApi extends BaseResponse {
|
||||
name: string;
|
||||
value: string;
|
||||
type: FieldType;
|
||||
linkedId: LinkedIdType;
|
||||
|
||||
constructor(data: any = null) {
|
||||
super(data);
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
this.type = this.getResponseProperty("Type");
|
||||
this.name = this.getResponseProperty("Name");
|
||||
this.value = this.getResponseProperty("Value");
|
||||
this.linkedId = this.getResponseProperty("linkedId");
|
||||
}
|
||||
}
|
||||
47
libs/common/src/vault/models/api/identity.api.ts
Normal file
47
libs/common/src/vault/models/api/identity.api.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import { BaseResponse } from "../../../models/response/base.response";
|
||||
|
||||
export class IdentityApi extends BaseResponse {
|
||||
title: string;
|
||||
firstName: string;
|
||||
middleName: string;
|
||||
lastName: string;
|
||||
address1: string;
|
||||
address2: string;
|
||||
address3: string;
|
||||
city: string;
|
||||
state: string;
|
||||
postalCode: string;
|
||||
country: string;
|
||||
company: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
ssn: string;
|
||||
username: string;
|
||||
passportNumber: string;
|
||||
licenseNumber: string;
|
||||
|
||||
constructor(data: any = null) {
|
||||
super(data);
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
this.title = this.getResponseProperty("Title");
|
||||
this.firstName = this.getResponseProperty("FirstName");
|
||||
this.middleName = this.getResponseProperty("MiddleName");
|
||||
this.lastName = this.getResponseProperty("LastName");
|
||||
this.address1 = this.getResponseProperty("Address1");
|
||||
this.address2 = this.getResponseProperty("Address2");
|
||||
this.address3 = this.getResponseProperty("Address3");
|
||||
this.city = this.getResponseProperty("City");
|
||||
this.state = this.getResponseProperty("State");
|
||||
this.postalCode = this.getResponseProperty("PostalCode");
|
||||
this.country = this.getResponseProperty("Country");
|
||||
this.company = this.getResponseProperty("Company");
|
||||
this.email = this.getResponseProperty("Email");
|
||||
this.phone = this.getResponseProperty("Phone");
|
||||
this.ssn = this.getResponseProperty("SSN");
|
||||
this.username = this.getResponseProperty("Username");
|
||||
this.passportNumber = this.getResponseProperty("PassportNumber");
|
||||
this.licenseNumber = this.getResponseProperty("LicenseNumber");
|
||||
}
|
||||
}
|
||||
17
libs/common/src/vault/models/api/login-uri.api.ts
Normal file
17
libs/common/src/vault/models/api/login-uri.api.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { BaseResponse } from "../../../models/response/base.response";
|
||||
import { UriMatchType } from "../../enums";
|
||||
|
||||
export class LoginUriApi extends BaseResponse {
|
||||
uri: string;
|
||||
match: UriMatchType = null;
|
||||
|
||||
constructor(data: any = null) {
|
||||
super(data);
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
this.uri = this.getResponseProperty("Uri");
|
||||
const match = this.getResponseProperty("Match");
|
||||
this.match = match != null ? match : null;
|
||||
}
|
||||
}
|
||||
40
libs/common/src/vault/models/api/login.api.ts
Normal file
40
libs/common/src/vault/models/api/login.api.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { JsonObject } from "type-fest";
|
||||
|
||||
import { BaseResponse } from "../../../models/response/base.response";
|
||||
|
||||
import { Fido2CredentialApi } from "./fido2-credential.api";
|
||||
import { LoginUriApi } from "./login-uri.api";
|
||||
|
||||
export class LoginApi extends BaseResponse {
|
||||
uris: LoginUriApi[];
|
||||
username: string;
|
||||
password: string;
|
||||
passwordRevisionDate: string;
|
||||
totp: string;
|
||||
autofillOnPageLoad: boolean;
|
||||
fido2Credentials?: Fido2CredentialApi[];
|
||||
|
||||
constructor(data: any = null) {
|
||||
super(data);
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
this.username = this.getResponseProperty("Username");
|
||||
this.password = this.getResponseProperty("Password");
|
||||
this.passwordRevisionDate = this.getResponseProperty("PasswordRevisionDate");
|
||||
this.totp = this.getResponseProperty("Totp");
|
||||
this.autofillOnPageLoad = this.getResponseProperty("AutofillOnPageLoad");
|
||||
|
||||
const uris = this.getResponseProperty("Uris");
|
||||
if (uris != null) {
|
||||
this.uris = uris.map((u: any) => new LoginUriApi(u));
|
||||
}
|
||||
|
||||
const fido2Credentials = this.getResponseProperty("Fido2Credentials");
|
||||
if (fido2Credentials != null) {
|
||||
this.fido2Credentials = fido2Credentials.map(
|
||||
(key: JsonObject) => new Fido2CredentialApi(key)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
14
libs/common/src/vault/models/api/secure-note.api.ts
Normal file
14
libs/common/src/vault/models/api/secure-note.api.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { BaseResponse } from "../../../models/response/base.response";
|
||||
import { SecureNoteType } from "../../enums";
|
||||
|
||||
export class SecureNoteApi extends BaseResponse {
|
||||
type: SecureNoteType;
|
||||
|
||||
constructor(data: any = null) {
|
||||
super(data);
|
||||
if (data == null) {
|
||||
return;
|
||||
}
|
||||
this.type = this.getResponseProperty("Type");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user