mirror of
https://github.com/bitwarden/jslib
synced 2025-12-17 16:53:20 +00:00
Merge branch 'master' of https://github.com/bitwarden/jslib into feature/refactor-folder-example
# Conflicts: # common/spec/domain/folder.spec.ts # common/src/models/data/folderData.ts # common/src/services/folder.service.ts # common/src/services/sync.service.ts
This commit is contained in:
@@ -14,7 +14,6 @@ export class CipherData {
|
||||
id: string;
|
||||
organizationId: string;
|
||||
folderId: string;
|
||||
userId: string;
|
||||
edit: boolean;
|
||||
viewPassword: boolean;
|
||||
organizationUseTotp: boolean;
|
||||
@@ -34,7 +33,7 @@ export class CipherData {
|
||||
deletedDate: string;
|
||||
reprompt: CipherRepromptType;
|
||||
|
||||
constructor(response?: CipherResponse, userId?: string, collectionIds?: string[]) {
|
||||
constructor(response?: CipherResponse, collectionIds?: string[]) {
|
||||
if (response == null) {
|
||||
return;
|
||||
}
|
||||
@@ -42,7 +41,6 @@ export class CipherData {
|
||||
this.id = response.id;
|
||||
this.organizationId = response.organizationId;
|
||||
this.folderId = response.folderId;
|
||||
this.userId = userId;
|
||||
this.edit = response.edit;
|
||||
this.viewPassword = response.viewPassword;
|
||||
this.organizationUseTotp = response.organizationUseTotp;
|
||||
|
||||
@@ -7,7 +7,6 @@ import { SendTextData } from "./sendTextData";
|
||||
export class SendData {
|
||||
id: string;
|
||||
accessId: string;
|
||||
userId: string;
|
||||
type: SendType;
|
||||
name: string;
|
||||
notes: string;
|
||||
@@ -23,14 +22,13 @@ export class SendData {
|
||||
disabled: boolean;
|
||||
hideEmail: boolean;
|
||||
|
||||
constructor(response?: SendResponse, userId?: string) {
|
||||
constructor(response?: SendResponse) {
|
||||
if (response == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.id = response.id;
|
||||
this.accessId = response.accessId;
|
||||
this.userId = userId;
|
||||
this.type = response.type;
|
||||
this.name = response.name;
|
||||
this.notes = response.notes;
|
||||
|
||||
@@ -49,13 +49,12 @@ export class Cipher extends Domain {
|
||||
obj,
|
||||
{
|
||||
id: null,
|
||||
userId: null,
|
||||
organizationId: null,
|
||||
folderId: null,
|
||||
name: null,
|
||||
notes: null,
|
||||
},
|
||||
["id", "userId", "organizationId", "folderId"]
|
||||
["id", "organizationId", "folderId"]
|
||||
);
|
||||
|
||||
this.type = obj.type;
|
||||
@@ -186,12 +185,11 @@ export class Cipher extends Domain {
|
||||
return model;
|
||||
}
|
||||
|
||||
toCipherData(userId: string): CipherData {
|
||||
toCipherData(): CipherData {
|
||||
const c = new CipherData();
|
||||
c.id = this.id;
|
||||
c.organizationId = this.organizationId;
|
||||
c.folderId = this.folderId;
|
||||
c.userId = this.organizationId != null ? userId : null;
|
||||
c.edit = this.edit;
|
||||
c.viewPassword = this.viewPassword;
|
||||
c.organizationUseTotp = this.organizationUseTotp;
|
||||
|
||||
@@ -12,7 +12,6 @@ import { SendText } from "./sendText";
|
||||
export class Send extends Domain {
|
||||
id: string;
|
||||
accessId: string;
|
||||
userId: string;
|
||||
type: SendType;
|
||||
name: EncString;
|
||||
notes: EncString;
|
||||
@@ -40,12 +39,11 @@ export class Send extends Domain {
|
||||
{
|
||||
id: null,
|
||||
accessId: null,
|
||||
userId: null,
|
||||
name: null,
|
||||
notes: null,
|
||||
key: null,
|
||||
},
|
||||
["id", "accessId", "userId"]
|
||||
["id", "accessId"]
|
||||
);
|
||||
|
||||
this.type = obj.type;
|
||||
|
||||
Reference in New Issue
Block a user