@ironcode/vas-lib 0.0.24 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/lib/entity/vas-account.dto.d.ts +6 -0
- package/cjs/lib/entity/vas-account.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-account.dto.js +7 -0
- package/cjs/lib/entity/vas-account.dto.js.map +1 -1
- package/cjs/lib/entity/vas-fire-user.dto.d.ts +4 -0
- package/cjs/lib/entity/vas-fire-user.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-fire-user.dto.js.map +1 -1
- package/cjs/lib/entity/vas-fire-user.model.d.ts +31 -1
- package/cjs/lib/entity/vas-fire-user.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-fire-user.model.js +54 -4
- package/cjs/lib/entity/vas-fire-user.model.js.map +1 -1
- package/esm2020/lib/entity/vas-account.dto.mjs +7 -2
- package/esm2020/lib/entity/vas-fire-user.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-fire-user.model.mjs +55 -5
- package/fesm2015/ironcode-vas-lib.mjs +62 -5
- package/fesm2015/ironcode-vas-lib.mjs.map +1 -1
- package/fesm2020/ironcode-vas-lib.mjs +62 -5
- package/fesm2020/ironcode-vas-lib.mjs.map +1 -1
- package/lib/entity/vas-account.dto.d.ts +6 -0
- package/lib/entity/vas-fire-user.dto.d.ts +4 -0
- package/lib/entity/vas-fire-user.model.d.ts +31 -1
- package/package.json +1 -1
|
@@ -66,7 +66,7 @@ class VasUserModel extends VasBaseModel {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
class VasFireUserModel extends VasUserModel {
|
|
69
|
-
constructor(id, created = '', serverCreated = '', createdBy = '', modified = '', serverModified = '', modifiedBy = '', email, username, accounts) {
|
|
69
|
+
constructor(id, created = '', serverCreated = '', createdBy = '', modified = '', serverModified = '', modifiedBy = '', email, username, accounts, tokens, topics) {
|
|
70
70
|
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, email, username);
|
|
71
71
|
this.id = id;
|
|
72
72
|
this.created = created;
|
|
@@ -78,12 +78,14 @@ class VasFireUserModel extends VasUserModel {
|
|
|
78
78
|
this.email = email;
|
|
79
79
|
this.username = username;
|
|
80
80
|
this.accounts = accounts;
|
|
81
|
+
this.tokens = tokens;
|
|
82
|
+
this.topics = topics;
|
|
81
83
|
}
|
|
82
84
|
static fromDto(dto) {
|
|
83
|
-
return new VasFireUserModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.email || '', dto.username || '', dto.accounts || {});
|
|
85
|
+
return new VasFireUserModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.email || '', dto.username || '', dto.accounts || {}, dto.tokens || [], dto.topics || []);
|
|
84
86
|
}
|
|
85
87
|
static newUser(uid, displayName, email) {
|
|
86
|
-
return new VasFireUserModel(uid, moment().toISOString(), uid, moment().toISOString(), uid, moment().toISOString(), moment().toISOString(), email, displayName, {});
|
|
88
|
+
return new VasFireUserModel(uid, moment().toISOString(), uid, moment().toISOString(), uid, moment().toISOString(), moment().toISOString(), email, displayName, {}, [], []);
|
|
87
89
|
}
|
|
88
90
|
toDto() {
|
|
89
91
|
return {
|
|
@@ -96,11 +98,66 @@ class VasFireUserModel extends VasUserModel {
|
|
|
96
98
|
modifiedBy: this.modifiedBy,
|
|
97
99
|
email: this.email,
|
|
98
100
|
username: this.username,
|
|
99
|
-
accounts: this.accounts
|
|
101
|
+
accounts: this.accounts,
|
|
102
|
+
tokens: this.tokens,
|
|
103
|
+
topics: this.topics
|
|
100
104
|
};
|
|
101
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Adds token to tokens list if it is not already present
|
|
108
|
+
* @param token the new token
|
|
109
|
+
*/
|
|
110
|
+
addToken(token) {
|
|
111
|
+
if (this.tokens.includes(token)) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this.tokens.push(token);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Remove token from tokens list
|
|
118
|
+
* @param token the token to remove
|
|
119
|
+
*/
|
|
120
|
+
removeToken(token) {
|
|
121
|
+
this.tokens = this.tokens.filter(t => t !== token);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Resets the tokens list
|
|
125
|
+
*/
|
|
126
|
+
resetTokens() {
|
|
127
|
+
this.tokens = [];
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Adds topic to topics list if it is not already present
|
|
131
|
+
* @param topic the new token
|
|
132
|
+
*/
|
|
133
|
+
addTopic(topic) {
|
|
134
|
+
if (this.topics.includes(topic)) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
this.topics.push(topic);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Remove topic from topic list
|
|
141
|
+
* @param topic the topic to remove
|
|
142
|
+
*/
|
|
143
|
+
removeTopic(topic) {
|
|
144
|
+
this.topics = this.topics.filter(t => t !== topic);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Resets the topic list
|
|
148
|
+
*/
|
|
149
|
+
resetTopics() {
|
|
150
|
+
this.topics = [];
|
|
151
|
+
}
|
|
102
152
|
}
|
|
103
153
|
|
|
154
|
+
var VasAccountIndexingMode;
|
|
155
|
+
(function (VasAccountIndexingMode) {
|
|
156
|
+
VasAccountIndexingMode[VasAccountIndexingMode["DISABLED"] = 0] = "DISABLED";
|
|
157
|
+
VasAccountIndexingMode[VasAccountIndexingMode["ON_CHANGE"] = 1] = "ON_CHANGE";
|
|
158
|
+
VasAccountIndexingMode[VasAccountIndexingMode["ON_REPORT"] = 2] = "ON_REPORT";
|
|
159
|
+
})(VasAccountIndexingMode || (VasAccountIndexingMode = {}));
|
|
160
|
+
|
|
104
161
|
class VasAccountObjectModel extends VasBaseModel {
|
|
105
162
|
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account) {
|
|
106
163
|
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy);
|
|
@@ -1694,5 +1751,5 @@ class VasReportRequestModel extends VasAccountObjectModel {
|
|
|
1694
1751
|
* Generated bundle index. Do not edit.
|
|
1695
1752
|
*/
|
|
1696
1753
|
|
|
1697
|
-
export { VasAccountObjectModel, VasBaseModel, VasBranchModel, VasContactModel, VasControlConfigDirection, VasControlModel, VasControlTypeModel, VasFieldModel, VasFileModel, VasFireUserModel, VasFormModel, VasGroupModel, VasInvitationModel, VasJobDataModel, VasJobModel, VasMembershipModel, VasReportLayoutModel, VasReportModel, VasReportRequestModel, VasRestrictedAccountObjectModel, VasUserModel };
|
|
1754
|
+
export { VasAccountIndexingMode, VasAccountObjectModel, VasBaseModel, VasBranchModel, VasContactModel, VasControlConfigDirection, VasControlModel, VasControlTypeModel, VasFieldModel, VasFileModel, VasFireUserModel, VasFormModel, VasGroupModel, VasInvitationModel, VasJobDataModel, VasJobModel, VasMembershipModel, VasReportLayoutModel, VasReportModel, VasReportRequestModel, VasRestrictedAccountObjectModel, VasUserModel };
|
|
1698
1755
|
//# sourceMappingURL=ironcode-vas-lib.mjs.map
|