refactor: standardize manager design
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -17,16 +17,7 @@ export class CollectionObject implements CollectionInterface {
|
||||
signature: null,
|
||||
created: null,
|
||||
modified: null,
|
||||
properties: {
|
||||
'@type': 'mail.collection',
|
||||
version: 1,
|
||||
total: 0,
|
||||
unread: 0,
|
||||
label: '',
|
||||
role: null,
|
||||
rank: 0,
|
||||
subscribed: true,
|
||||
},
|
||||
properties: new CollectionPropertiesObject(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,8 +25,6 @@ export class CollectionObject implements CollectionInterface {
|
||||
this._data = data;
|
||||
if (data.properties) {
|
||||
this._data.properties = new CollectionPropertiesObject().fromJson(data.properties as CollectionPropertiesInterface);
|
||||
} else {
|
||||
this._data.properties = new CollectionPropertiesObject();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -114,12 +103,12 @@ export class CollectionPropertiesObject implements CollectionPropertiesInterface
|
||||
|
||||
constructor() {
|
||||
this._data = {
|
||||
'@type': 'mail.collection',
|
||||
'@type': 'mail:collection',
|
||||
version: 1,
|
||||
total: 0,
|
||||
unread: 0,
|
||||
label: '',
|
||||
role: null,
|
||||
label: '',
|
||||
rank: 0,
|
||||
subscribed: true,
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ export class ProviderObject implements ProviderInterface {
|
||||
|
||||
constructor() {
|
||||
this._data = {
|
||||
'@type': 'mail.provider',
|
||||
'@type': 'mail:provider',
|
||||
identifier: '',
|
||||
label: '',
|
||||
capabilities: {},
|
||||
|
||||
Reference in New Issue
Block a user