1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 10:02:47 -05:00

Merge branch 'master' into feature/billing-obfuscation

This commit is contained in:
Rui Tomé
2023-03-06 16:39:42 +00:00
committed by GitHub
226 changed files with 7937 additions and 514 deletions

View File

@ -1,11 +0,0 @@
using Bit.Core.Entities;
namespace Bit.Core.Models.Data;
public class AttachmentResponseData
{
public string Id { get; set; }
public CipherAttachment.MetaData Data { get; set; }
public Cipher Cipher { get; set; }
public string Url { get; set; }
}

View File

@ -1,35 +0,0 @@
using System.Text.Json.Serialization;
namespace Bit.Core.Models.Data;
public class CipherAttachment
{
public Guid Id { get; set; }
public Guid? UserId { get; set; }
public Guid? OrganizationId { get; set; }
public string AttachmentId { get; set; }
public string AttachmentData { get; set; }
public class MetaData
{
private long _size;
// We serialize Size as a string since JSON (or Javascript) doesn't support full precision for long numbers
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
public long Size
{
get { return _size; }
set { _size = value; }
}
public string FileName { get; set; }
public string Key { get; set; }
public string ContainerName { get; set; } = "attachments";
public bool Validated { get; set; } = true;
// This is stored alongside metadata as an identifier. It does not need repeating in serialization
[JsonIgnore]
public string AttachmentId { get; set; }
}
}

View File

@ -1,13 +0,0 @@
namespace Bit.Core.Models.Data;
public class CipherCardData : CipherData
{
public CipherCardData() { }
public string CardholderName { get; set; }
public string Brand { get; set; }
public string Number { get; set; }
public string ExpMonth { get; set; }
public string ExpYear { get; set; }
public string Code { get; set; }
}

View File

@ -1,11 +0,0 @@
namespace Bit.Core.Models.Data;
public abstract class CipherData
{
public CipherData() { }
public string Name { get; set; }
public string Notes { get; set; }
public IEnumerable<CipherFieldData> Fields { get; set; }
public IEnumerable<CipherPasswordHistoryData> PasswordHistory { get; set; }
}

View File

@ -1,9 +0,0 @@
namespace Core.Models.Data;
public class CipherDetails : CipherOrganizationDetails
{
public Guid? FolderId { get; set; }
public bool Favorite { get; set; }
public bool Edit { get; set; }
public bool ViewPassword { get; set; }
}

View File

@ -1,13 +0,0 @@
using Bit.Core.Enums;
namespace Bit.Core.Models.Data;
public class CipherFieldData
{
public CipherFieldData() { }
public FieldType Type { get; set; }
public string Name { get; set; }
public string Value { get; set; }
public int? LinkedId { get; set; }
}

View File

@ -1,25 +0,0 @@
namespace Bit.Core.Models.Data;
public class CipherIdentityData : CipherData
{
public CipherIdentityData() { }
public string Title { get; set; }
public string FirstName { get; set; }
public string MiddleName { get; set; }
public string LastName { get; set; }
public string Address1 { get; set; }
public string Address2 { get; set; }
public string Address3 { get; set; }
public string City { get; set; }
public string State { get; set; }
public string PostalCode { get; set; }
public string Country { get; set; }
public string Company { get; set; }
public string Email { get; set; }
public string Phone { get; set; }
public string SSN { get; set; }
public string Username { get; set; }
public string PassportNumber { get; set; }
public string LicenseNumber { get; set; }
}

View File

@ -1,30 +0,0 @@
using Bit.Core.Enums;
namespace Bit.Core.Models.Data;
public class CipherLoginData : CipherData
{
private string _uri;
public CipherLoginData() { }
public string Uri
{
get => Uris?.FirstOrDefault()?.Uri ?? _uri;
set { _uri = value; }
}
public IEnumerable<CipherLoginUriData> Uris { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public DateTime? PasswordRevisionDate { get; set; }
public string Totp { get; set; }
public bool? AutofillOnPageLoad { get; set; }
public class CipherLoginUriData
{
public CipherLoginUriData() { }
public string Uri { get; set; }
public UriMatchType? Match { get; set; } = null;
}
}

View File

@ -1,8 +0,0 @@
using Bit.Core.Entities;
namespace Core.Models.Data;
public class CipherOrganizationDetails : Cipher
{
public bool OrganizationUseTotp { get; set; }
}

View File

@ -1,9 +0,0 @@
namespace Bit.Core.Models.Data;
public class CipherPasswordHistoryData
{
public CipherPasswordHistoryData() { }
public string Password { get; set; }
public DateTime LastUsedDate { get; set; }
}

View File

@ -1,10 +0,0 @@
using Bit.Core.Enums;
namespace Bit.Core.Models.Data;
public class CipherSecureNoteData : CipherData
{
public CipherSecureNoteData() { }
public SecureNoteType Type { get; set; }
}

View File

@ -1,5 +1,5 @@
using Bit.Core.Entities;
using Core.Models.Data;
using Bit.Core.Vault.Models.Data;
namespace Bit.Core.Models.Data;