@rws-framework/db 2.2.0 → 2.2.1

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.
Files changed (37) hide show
  1. package/README.md +17 -26
  2. package/dist/decorators/InverseRelation.d.ts +0 -0
  3. package/dist/decorators/InverseRelation.js +0 -0
  4. package/dist/decorators/InverseTimeSeries.d.ts +0 -0
  5. package/dist/decorators/InverseTimeSeries.js +0 -0
  6. package/dist/decorators/RWSCollection.d.ts +0 -0
  7. package/dist/decorators/RWSCollection.js +0 -0
  8. package/dist/decorators/Relation.d.ts +0 -0
  9. package/dist/decorators/Relation.js +0 -0
  10. package/dist/decorators/TrackType.d.ts +0 -0
  11. package/dist/decorators/TrackType.js +0 -0
  12. package/dist/decorators/index.d.ts +0 -0
  13. package/dist/decorators/index.js +0 -0
  14. package/dist/helper/DbHelper.d.ts +0 -0
  15. package/dist/helper/DbHelper.js +0 -0
  16. package/dist/helper/FieldsHelper.d.ts +0 -0
  17. package/dist/helper/FieldsHelper.js +0 -0
  18. package/dist/index.d.ts +0 -0
  19. package/dist/index.js +0 -0
  20. package/dist/models/TimeSeriesModel.d.ts +0 -0
  21. package/dist/models/TimeSeriesModel.js +0 -0
  22. package/dist/models/_model.d.ts +0 -0
  23. package/dist/models/_model.js +458 -0
  24. package/dist/services/DBService.d.ts +0 -0
  25. package/dist/services/DBService.js +0 -0
  26. package/dist/types/DbConfigHandler.d.ts +0 -0
  27. package/dist/types/DbConfigHandler.js +0 -0
  28. package/dist/types/FindParams.d.ts +0 -0
  29. package/dist/types/FindParams.js +0 -0
  30. package/dist/types/IRWSModel.d.ts +0 -0
  31. package/dist/types/IRWSModel.js +0 -0
  32. package/dist/types/ITimeSeries.d.ts +0 -0
  33. package/dist/types/ITimeSeries.js +0 -0
  34. package/package.json +1 -1
  35. package/src/models/_model.ts +654 -0
  36. package/dist/models/utils/RelationUtils copy.d.ts +0 -13
  37. package/dist/models/utils/RelationUtils copy.js +0 -65
package/README.md CHANGED
@@ -10,34 +10,38 @@ import User from "./User";
10
10
 
11
11
  export const models = [ User, ApiKey];
12
12
  ```
13
-
14
-
15
13
  ## Example user model
16
14
 
17
15
  ```typescript
18
- import { RWSannotations, RWSModel } from '@rws-framework/server';
16
+ import { TrackType, InverseRelation, RWSCollection, RWSModel } from '@rws-framework/db';
19
17
 
20
- import IUser from './interfaces/IUser';
21
- import 'reflect-metadata';
18
+ import IUser from './interfaces/IUser';
19
+ import 'reflect-metadata';
22
20
 
23
- import ApiKey from './ApiKey';
24
- import IApiKey from './interfaces/IApiKey';
25
- const { RWSTrackType, InverseRelation } = RWSannotations.modelAnnotations;
21
+ import ApiKey from './ApiKey';
22
+ import IApiKey from './interfaces/IApiKey';
26
23
 
24
+ @RWSCollection('users', {
25
+ relations: {
26
+ transcriptions: true,
27
+ apiKeys: true
28
+ },
29
+ ignored_keys: ['passwd']
30
+ })
27
31
  class User extends RWSModel<User> implements IUser {
28
- @RWSTrackType(String)
32
+ @TrackType(String)
29
33
  username: string;
30
34
 
31
- @RWSTrackType(String) // Can also handle Object and Number
35
+ @TrackType(String) // Can also handle Object and Number
32
36
  passwd: string;
33
37
 
34
- @RWSTrackType(Boolean)
38
+ @TrackType(Boolean)
35
39
  active: boolean;
36
40
 
37
- @RWSTrackType(Date, { required: true })
41
+ @TrackType(Date, { required: true })
38
42
  created_at: Date;
39
43
 
40
- @RWSTrackType(Date)
44
+ @TrackType(Date)
41
45
  updated_at: Date;
42
46
 
43
47
  /**
@@ -47,25 +51,12 @@ class User extends RWSModel<User> implements IUser {
47
51
  @InverseRelation(() => ApiKey, () => User)
48
52
  apiKeys: IApiKey[];
49
53
 
50
- static _collection = 'user';
51
-
52
- static _RELATIONS = {
53
- transcriptions: true,
54
- apiKeys: true
55
- };
56
-
57
- static _CUT_KEYS = ['passwd'];
58
-
59
54
  constructor(data?: IUser) {
60
55
  super(data);
61
56
 
62
57
  if(!this.created_at){
63
58
  this.created_at = new Date();
64
59
  }
65
- }
66
-
67
- addMessage(message: string){
68
- this.messages.push(message);
69
60
  }
70
61
  }
71
62
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
@@ -3,7 +3,465 @@
3
3
  * @deprecated This file is deprecated. Import from 'models' directory instead.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ <<<<<<< HEAD
7
+ exports.RWSModel = exports.TrackType = void 0;
8
+ const decorators_1 = require("../decorators");
9
+ Object.defineProperty(exports, "TrackType", { enumerable: true, get: function () { return decorators_1.TrackType; } });
10
+ const FieldsHelper_1 = require("../helper/FieldsHelper");
11
+ class RWSModel {
12
+ constructor(data) {
13
+ if (!this.getCollection()) {
14
+ throw new Error('Model must have a collection defined');
15
+ }
16
+ this.dbService = RWSModel.services.dbService;
17
+ this.configService = RWSModel.services.configService;
18
+ if (!data) {
19
+ return;
20
+ }
21
+ if (!this.hasTimeSeries()) {
22
+ this._fill(data);
23
+ }
24
+ else {
25
+ throw new Error('Time Series not supported in synchronous constructor. Use `await Model.create(data)` static method to instantiate this model.');
26
+ }
27
+ }
28
+ checkForInclusionWithThrow() {
29
+ this.checkForInclusionWithThrow();
30
+ }
31
+ static checkForInclusionWithThrow(checkModelType) {
32
+ if (!this.checkForInclusion(this.name)) {
33
+ throw new Error('Model undefined: ' + this.name);
34
+ }
35
+ }
36
+ checkForInclusion() {
37
+ return this.checkForInclusion();
38
+ }
39
+ static checkForInclusion(checkModelType) {
40
+ return this.loadModels().find((definedModel) => {
41
+ return definedModel.name === checkModelType;
42
+ }) !== undefined;
43
+ }
44
+ _fill(data) {
45
+ for (const key in data) {
46
+ if (data.hasOwnProperty(key)) {
47
+ const meta = Reflect.getMetadata(`InverseTimeSeries:${key}`, this.constructor.prototype);
48
+ if (meta) {
49
+ data[key] = {
50
+ create: data[key]
51
+ };
52
+ }
53
+ else {
54
+ this[key] = data[key];
55
+ }
56
+ }
57
+ }
58
+ return this;
59
+ }
60
+ hasRelation(key) {
61
+ return !!this[key] && this[key] instanceof RWSModel;
62
+ }
63
+ bindRelation(key, relatedModel) {
64
+ return {
65
+ connect: {
66
+ id: relatedModel.id
67
+ }
68
+ };
69
+ }
70
+ async _asyncFill(data, fullDataMode = false, allowRelations = true) {
71
+ const collections_to_models = {};
72
+ const timeSeriesIds = this.getTimeSeriesModelFields();
73
+ const classFields = FieldsHelper_1.FieldsHelper.getAllClassFields(this.constructor);
74
+ // Get both relation metadata types asynchronously
75
+ const [relOneData, relManyData] = await Promise.all([
76
+ this.getRelationOneMeta(classFields),
77
+ this.getRelationManyMeta(classFields)
78
+ ]);
79
+ this.loadModels().forEach((model) => {
80
+ collections_to_models[model.getCollection()] = model;
81
+ });
82
+ const seriesHydrationfields = [];
83
+ if (allowRelations) {
84
+ for (const key in relManyData) {
85
+ if (!fullDataMode && this.constructor._CUT_KEYS.includes(key)) {
86
+ continue;
87
+ }
88
+ const relMeta = relManyData[key];
89
+ const relationEnabled = this.checkRelEnabled(relMeta.key);
90
+ if (relationEnabled) {
91
+ this[relMeta.key] = await relMeta.inversionModel.findBy({
92
+ conditions: {
93
+ [relMeta.foreignKey]: data.id
94
+ },
95
+ allowRelations: false
96
+ });
97
+ }
98
+ }
99
+ for (const key in relOneData) {
100
+ if (!fullDataMode && this.constructor._CUT_KEYS.includes(key)) {
101
+ continue;
102
+ }
103
+ const relMeta = relOneData[key];
104
+ const relationEnabled = this.checkRelEnabled(relMeta.key);
105
+ if (!data[relMeta.hydrationField] && relMeta.required) {
106
+ throw new Error(`Relation field "${relMeta.hydrationField}" is required in model ${this.constructor.name}.`);
107
+ }
108
+ if (relationEnabled && data[relMeta.hydrationField]) {
109
+ this[relMeta.key] = await relMeta.model.find(data[relMeta.hydrationField], { allowRelations: false });
110
+ }
111
+ else if (relationEnabled && !data[relMeta.hydrationField] && data[relMeta.key]) {
112
+ const newRelModel = await relMeta.model.create(data[relMeta.key]);
113
+ this[relMeta.key] = await newRelModel.save();
114
+ }
115
+ const cutKeys = this.constructor._CUT_KEYS;
116
+ if (!cutKeys.includes(relMeta.hydrationField)) {
117
+ cutKeys.push(relMeta.hydrationField);
118
+ }
119
+ }
120
+ }
121
+ // Process regular fields and time series
122
+ for (const key in data) {
123
+ if (data.hasOwnProperty(key)) {
124
+ if (!fullDataMode && this.constructor._CUT_KEYS.includes(key)) {
125
+ continue;
126
+ }
127
+ if (Object.keys(relOneData).includes(key)) {
128
+ continue;
129
+ }
130
+ if (seriesHydrationfields.includes(key)) {
131
+ continue;
132
+ }
133
+ const timeSeriesMetaData = timeSeriesIds[key];
134
+ if (timeSeriesMetaData) {
135
+ this[key] = data[key];
136
+ const seriesModel = collections_to_models[timeSeriesMetaData.collection];
137
+ const dataModels = await seriesModel.findBy({
138
+ id: { in: data[key] }
139
+ });
140
+ seriesHydrationfields.push(timeSeriesMetaData.hydrationField);
141
+ this[timeSeriesMetaData.hydrationField] = dataModels;
142
+ }
143
+ else {
144
+ this[key] = data[key];
145
+ }
146
+ }
147
+ }
148
+ return this;
149
+ }
150
+ getModelScalarFields(model) {
151
+ return FieldsHelper_1.FieldsHelper.getAllClassFields(model)
152
+ .filter(item => item.indexOf('TrackType') === 0)
153
+ .map(item => item.split(':').at(-1));
154
+ }
155
+ getTimeSeriesModelFields() {
156
+ const timeSeriesIds = {};
157
+ for (const key in this) {
158
+ if (this.hasOwnProperty(key)) {
159
+ const meta = Reflect.getMetadata(`InverseTimeSeries:${key}`, this);
160
+ if (meta) {
161
+ if (!timeSeriesIds[key]) {
162
+ timeSeriesIds[key] = {
163
+ collection: meta.timeSeriesModel,
164
+ hydrationField: meta.hydrationField,
165
+ ids: this[key]
166
+ };
167
+ }
168
+ }
169
+ }
170
+ }
171
+ return timeSeriesIds;
172
+ }
173
+ async getRelationOneMeta(classFields) {
174
+ return RWSModel.getRelationOneMeta(this, classFields);
175
+ }
176
+ static async getRelationOneMeta(model, classFields) {
177
+ const relIds = {};
178
+ const relationFields = classFields
179
+ .filter((item) => item.indexOf('Relation') === 0 && !item.includes('Inverse'))
180
+ .map((item) => item.split(':').at(-1));
181
+ for (const key of relationFields) {
182
+ const metadataKey = `Relation:${key}`;
183
+ const metadata = Reflect.getMetadata(metadataKey, model);
184
+ if (metadata && metadata.promise) {
185
+ const resolvedMetadata = await metadata.promise;
186
+ if (!relIds[key]) {
187
+ relIds[key] = {
188
+ key: resolvedMetadata.key,
189
+ required: resolvedMetadata.required,
190
+ model: resolvedMetadata.relatedTo,
191
+ hydrationField: resolvedMetadata.relationField,
192
+ foreignKey: resolvedMetadata.relatedToField
193
+ };
194
+ }
195
+ }
196
+ }
197
+ return relIds;
198
+ }
199
+ async getRelationManyMeta(classFields) {
200
+ return RWSModel.getRelationManyMeta(this, classFields);
201
+ }
202
+ static async getRelationManyMeta(model, classFields) {
203
+ const relIds = {};
204
+ const inverseFields = classFields
205
+ .filter((item) => item.indexOf('InverseRelation') === 0)
206
+ .map((item) => item.split(':').at(-1));
207
+ for (const key of inverseFields) {
208
+ const metadataKey = `InverseRelation:${key}`;
209
+ const metadata = Reflect.getMetadata(metadataKey, model);
210
+ if (metadata && metadata.promise) {
211
+ const resolvedMetadata = await metadata.promise;
212
+ if (!relIds[key]) {
213
+ relIds[key] = {
214
+ key: resolvedMetadata.key,
215
+ inversionModel: resolvedMetadata.inversionModel,
216
+ foreignKey: resolvedMetadata.foreignKey
217
+ };
218
+ }
219
+ }
220
+ }
221
+ return relIds;
222
+ }
223
+ async toMongo() {
224
+ const data = {};
225
+ const timeSeriesIds = this.getTimeSeriesModelFields();
226
+ const timeSeriesHydrationFields = [];
227
+ for (const key in this) {
228
+ if (this.hasRelation(key)) {
229
+ data[key] = this.bindRelation(key, this[key]);
230
+ continue;
231
+ }
232
+ if (!(await this.isDbVariable(key))) {
233
+ continue;
234
+ }
235
+ const passedFieldCondition = this.hasOwnProperty(key) &&
236
+ !(this.constructor._BANNED_KEYS
237
+ || RWSModel._BANNED_KEYS).includes(key) &&
238
+ !timeSeriesHydrationFields.includes(key);
239
+ if (passedFieldCondition) {
240
+ data[key] = this[key];
241
+ }
242
+ if (timeSeriesIds[key]) {
243
+ data[key] = this[key];
244
+ timeSeriesHydrationFields.push(timeSeriesIds[key].hydrationField);
245
+ }
246
+ }
247
+ return data;
248
+ }
249
+ getCollection() {
250
+ return this.constructor._collection || this._collection;
251
+ }
252
+ static getCollection() {
253
+ return this.constructor._collection || this._collection;
254
+ }
255
+ async save() {
256
+ const data = await this.toMongo();
257
+ let updatedModelData = data;
258
+ if (this.id) {
259
+ this.preUpdate();
260
+ updatedModelData = await this.dbService.update(data, this.getCollection());
261
+ await this._asyncFill(updatedModelData);
262
+ this.postUpdate();
263
+ }
264
+ else {
265
+ this.preCreate();
266
+ const timeSeriesModel = await Promise.resolve().then(() => __importStar(require('./TimeSeriesModel')));
267
+ const isTimeSeries = this instanceof timeSeriesModel.default;
268
+ updatedModelData = await this.dbService.insert(data, this.getCollection(), isTimeSeries);
269
+ await this._asyncFill(updatedModelData);
270
+ this.postCreate();
271
+ }
272
+ return this;
273
+ }
274
+ static async getModelAnnotations(constructor) {
275
+ const annotationsData = {};
276
+ const metadataKeys = Reflect.getMetadataKeys(constructor.prototype);
277
+ // Process all metadata keys and collect promises
278
+ const metadataPromises = metadataKeys.map(async (fullKey) => {
279
+ const [annotationType, propertyKey] = fullKey.split(':');
280
+ const metadata = Reflect.getMetadata(fullKey, constructor.prototype);
281
+ if (metadata) {
282
+ // If this is a relation metadata with a promise
283
+ if (metadata.promise && (annotationType === 'Relation' || annotationType === 'InverseRelation')) {
284
+ const resolvedMetadata = await metadata.promise;
285
+ annotationsData[propertyKey] = {
286
+ annotationType,
287
+ metadata: resolvedMetadata
288
+ };
289
+ }
290
+ else {
291
+ // Handle non-relation metadata as before
292
+ const key = metadata.key || propertyKey;
293
+ annotationsData[key] = {
294
+ annotationType,
295
+ metadata
296
+ };
297
+ }
298
+ }
299
+ });
300
+ // Wait for all metadata to be processed
301
+ await Promise.all(metadataPromises);
302
+ return annotationsData;
303
+ }
304
+ preUpdate() {
305
+ return;
306
+ }
307
+ postUpdate() {
308
+ return;
309
+ }
310
+ preCreate() {
311
+ return;
312
+ }
313
+ postCreate() {
314
+ return;
315
+ }
316
+ static isSubclass(constructor, baseClass) {
317
+ return baseClass.prototype.isPrototypeOf(constructor.prototype);
318
+ }
319
+ hasTimeSeries() {
320
+ return RWSModel.checkTimeSeries(this.constructor);
321
+ }
322
+ static checkTimeSeries(constructor) {
323
+ const data = constructor.prototype;
324
+ for (const key in data) {
325
+ if (data.hasOwnProperty(key)) {
326
+ if (Reflect.getMetadata(`InverseTimeSeries:${key}`, constructor.prototype)) {
327
+ return true;
328
+ }
329
+ }
330
+ }
331
+ return false;
332
+ }
333
+ async isDbVariable(variable) {
334
+ return RWSModel.checkDbVariable(this.constructor, variable);
335
+ }
336
+ static async checkDbVariable(constructor, variable) {
337
+ if (variable === 'id') {
338
+ return true;
339
+ }
340
+ const dbAnnotations = await RWSModel.getModelAnnotations(constructor);
341
+ const dbProperties = Object.keys(dbAnnotations)
342
+ .map((key) => { return { ...dbAnnotations[key], key }; })
343
+ .filter((element) => element.annotationType === 'TrackType')
344
+ .map((element) => element.key);
345
+ return dbProperties.includes(variable);
346
+ }
347
+ sanitizeDBData(data) {
348
+ const dataKeys = Object.keys(data);
349
+ const sanitizedData = {};
350
+ for (const key of dataKeys) {
351
+ if (this.isDbVariable(key)) {
352
+ sanitizedData[key] = data[key];
353
+ }
354
+ }
355
+ return sanitizedData;
356
+ }
357
+ static async watchCollection(preRun) {
358
+ const collection = Reflect.get(this, '_collection');
359
+ this.checkForInclusionWithThrow(this.name);
360
+ return await this.services.dbService.watchCollection(collection, preRun);
361
+ }
362
+ static async findOneBy(findParams) {
363
+ var _a, _b, _c, _d, _e;
364
+ const conditions = (_a = findParams === null || findParams === void 0 ? void 0 : findParams.conditions) !== null && _a !== void 0 ? _a : {};
365
+ const ordering = (_b = findParams === null || findParams === void 0 ? void 0 : findParams.ordering) !== null && _b !== void 0 ? _b : null;
366
+ const fields = (_c = findParams === null || findParams === void 0 ? void 0 : findParams.fields) !== null && _c !== void 0 ? _c : null;
367
+ const allowRelations = (_d = findParams === null || findParams === void 0 ? void 0 : findParams.allowRelations) !== null && _d !== void 0 ? _d : true;
368
+ const fullData = (_e = findParams === null || findParams === void 0 ? void 0 : findParams.fullData) !== null && _e !== void 0 ? _e : false;
369
+ this.checkForInclusionWithThrow('');
370
+ const collection = Reflect.get(this, '_collection');
371
+ const dbData = await this.services.dbService.findOneBy(collection, conditions, fields, ordering, allowRelations);
372
+ if (dbData) {
373
+ const inst = new this();
374
+ return await inst._asyncFill(dbData, fullData, allowRelations);
375
+ }
376
+ return null;
377
+ }
378
+ static async find(id, findParams = null) {
379
+ var _a, _b, _c, _d;
380
+ const ordering = (_a = findParams === null || findParams === void 0 ? void 0 : findParams.ordering) !== null && _a !== void 0 ? _a : null;
381
+ const fields = (_b = findParams === null || findParams === void 0 ? void 0 : findParams.fields) !== null && _b !== void 0 ? _b : null;
382
+ const allowRelations = (_c = findParams === null || findParams === void 0 ? void 0 : findParams.allowRelations) !== null && _c !== void 0 ? _c : true;
383
+ const fullData = (_d = findParams === null || findParams === void 0 ? void 0 : findParams.fullData) !== null && _d !== void 0 ? _d : false;
384
+ const collection = Reflect.get(this, '_collection');
385
+ this.checkForInclusionWithThrow(this.name);
386
+ const dbData = await this.services.dbService.findOneBy(collection, { id }, fields, ordering, allowRelations);
387
+ if (dbData) {
388
+ const inst = new this();
389
+ return await inst._asyncFill(dbData, fullData, allowRelations);
390
+ }
391
+ return null;
392
+ }
393
+ static async findBy(findParams) {
394
+ var _a, _b, _c, _d, _e;
395
+ const conditions = (_a = findParams === null || findParams === void 0 ? void 0 : findParams.conditions) !== null && _a !== void 0 ? _a : {};
396
+ const ordering = (_b = findParams === null || findParams === void 0 ? void 0 : findParams.ordering) !== null && _b !== void 0 ? _b : null;
397
+ const fields = (_c = findParams === null || findParams === void 0 ? void 0 : findParams.fields) !== null && _c !== void 0 ? _c : null;
398
+ const allowRelations = (_d = findParams === null || findParams === void 0 ? void 0 : findParams.allowRelations) !== null && _d !== void 0 ? _d : true;
399
+ const fullData = (_e = findParams === null || findParams === void 0 ? void 0 : findParams.fullData) !== null && _e !== void 0 ? _e : false;
400
+ const collection = Reflect.get(this, '_collection');
401
+ this.checkForInclusionWithThrow(this.name);
402
+ try {
403
+ const dbData = await this.services.dbService.findBy(collection, conditions, fields, ordering, allowRelations);
404
+ if (dbData.length) {
405
+ const instanced = [];
406
+ for (const data of dbData) {
407
+ const inst = new this();
408
+ instanced.push((await inst._asyncFill(data, fullData, allowRelations)));
409
+ }
410
+ return instanced;
411
+ }
412
+ return [];
413
+ }
414
+ catch (rwsError) {
415
+ console.error(rwsError);
416
+ throw rwsError;
417
+ }
418
+ }
419
+ static async delete(conditions) {
420
+ const collection = Reflect.get(this, '_collection');
421
+ this.checkForInclusionWithThrow(this.name);
422
+ return await this.services.dbService.delete(collection, conditions);
423
+ }
424
+ async delete() {
425
+ const collection = Reflect.get(this, '_collection');
426
+ this.checkForInclusionWithThrow();
427
+ return await this.dbService.delete(collection, {
428
+ id: this.id
429
+ });
430
+ }
431
+ static async create(data) {
432
+ const newModel = new this();
433
+ const sanitizedData = newModel.sanitizeDBData(data);
434
+ await newModel._asyncFill(sanitizedData);
435
+ return newModel;
436
+ }
437
+ static loadModels() {
438
+ return this.allModels || [];
439
+ }
440
+ loadModels() {
441
+ return RWSModel.loadModels();
442
+ }
443
+ checkRelEnabled(key) {
444
+ return Object.keys(this.constructor._RELATIONS).includes(key) && this.constructor._RELATIONS[key] === true;
445
+ }
446
+ static setServices(services) {
447
+ this.allModels = services.configService.get('db_models');
448
+ this.services = services;
449
+ }
450
+ }
451
+ exports.RWSModel = RWSModel;
452
+ RWSModel.services = {};
453
+ RWSModel._collection = null;
454
+ RWSModel._RELATIONS = {};
455
+ RWSModel._BANNED_KEYS = ['_collection'];
456
+ RWSModel.allModels = [];
457
+ RWSModel._CUT_KEYS = [];
458
+ __decorate([
459
+ (0, decorators_1.TrackType)(String),
460
+ __metadata("design:type", String)
461
+ ], RWSModel.prototype, "id", void 0);
462
+ =======
6
463
  exports.TrackType = exports.RWSModel = void 0;
7
464
  const index_1 = require("./index");
8
465
  Object.defineProperty(exports, "RWSModel", { enumerable: true, get: function () { return index_1.RWSModel; } });
9
466
  Object.defineProperty(exports, "TrackType", { enumerable: true, get: function () { return index_1.TrackType; } });
467
+ >>>>>>> 7c50786 (v2.2.0)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rws-framework/db",
3
3
  "private": false,
4
- "version": "2.2.0",
4
+ "version": "2.2.1",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",