@statezero/core 0.2.16 → 0.2.17
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/LICENSE +116 -116
- package/dist/adaptors/vue/composables.js +4 -4
- package/dist/cli/commands/syncActions.js +189 -189
- package/dist/cli/commands/syncModels.js +391 -391
- package/dist/core/eventReceivers.d.ts +1 -2
- package/dist/core/eventReceivers.js +16 -16
- package/dist/flavours/django/f.js +1 -1
- package/dist/flavours/django/model.js +1 -1
- package/dist/flavours/django/operationFactory.d.ts +1 -1
- package/dist/flavours/django/operationFactory.js +1 -1
- package/dist/syncEngine/metrics/metricOptCalcs.js +1 -1
- package/dist/syncEngine/registries/metricRegistry.d.ts +1 -1
- package/dist/syncEngine/registries/metricRegistry.js +3 -3
- package/dist/syncEngine/stores/metricStore.d.ts +1 -1
- package/dist/syncEngine/stores/metricStore.js +1 -1
- package/dist/syncEngine/stores/operation.d.ts +1 -1
- package/dist/syncEngine/stores/operation.js +1 -1
- package/dist/syncEngine/stores/reactivity.d.ts +3 -3
- package/dist/syncEngine/stores/utils.js +1 -1
- package/dist/syncEngine/sync.d.ts +2 -1
- package/dist/syncEngine/sync.js +10 -9
- package/package.json +126 -126
- package/readme.md +210 -210
- package/dist/actions/backend1/django_app/calculate-hash.d.ts +0 -57
- package/dist/actions/backend1/django_app/calculate-hash.js +0 -80
- package/dist/actions/backend1/django_app/get-current-username.d.ts +0 -29
- package/dist/actions/backend1/django_app/get-current-username.js +0 -65
- package/dist/actions/backend1/django_app/get-server-status.d.ts +0 -38
- package/dist/actions/backend1/django_app/get-server-status.js +0 -68
- package/dist/actions/backend1/django_app/get-user-info.d.ts +0 -44
- package/dist/actions/backend1/django_app/get-user-info.js +0 -70
- package/dist/actions/backend1/django_app/index.d.ts +0 -6
- package/dist/actions/backend1/django_app/index.js +0 -6
- package/dist/actions/backend1/django_app/process-data.d.ts +0 -51
- package/dist/actions/backend1/django_app/process-data.js +0 -78
- package/dist/actions/backend1/django_app/send-notification.d.ts +0 -55
- package/dist/actions/backend1/django_app/send-notification.js +0 -81
- package/dist/actions/backend1/index.d.ts +0 -1
- package/dist/actions/backend1/index.js +0 -1
- package/dist/actions/default/django_app/calculate-hash.d.ts +0 -57
- package/dist/actions/default/django_app/calculate-hash.js +0 -80
- package/dist/actions/default/django_app/get-current-username.d.ts +0 -29
- package/dist/actions/default/django_app/get-current-username.js +0 -65
- package/dist/actions/default/django_app/get-server-status.d.ts +0 -38
- package/dist/actions/default/django_app/get-server-status.js +0 -68
- package/dist/actions/default/django_app/get-user-info.d.ts +0 -44
- package/dist/actions/default/django_app/get-user-info.js +0 -70
- package/dist/actions/default/django_app/index.d.ts +0 -6
- package/dist/actions/default/django_app/index.js +0 -6
- package/dist/actions/default/django_app/process-data.d.ts +0 -51
- package/dist/actions/default/django_app/process-data.js +0 -78
- package/dist/actions/default/django_app/send-notification.d.ts +0 -55
- package/dist/actions/default/django_app/send-notification.js +0 -81
- package/dist/actions/default/index.d.ts +0 -1
- package/dist/actions/default/index.js +0 -1
- package/dist/actions/index.d.ts +0 -1
- package/dist/actions/index.js +0 -5
- package/dist/models/backend1/django_app/comprehensivemodel.d.ts +0 -47
- package/dist/models/backend1/django_app/comprehensivemodel.js +0 -71
- package/dist/models/backend1/django_app/custompkmodel.d.ts +0 -44
- package/dist/models/backend1/django_app/custompkmodel.js +0 -69
- package/dist/models/backend1/django_app/dailyrate.d.ts +0 -47
- package/dist/models/backend1/django_app/dailyrate.js +0 -71
- package/dist/models/backend1/django_app/deepmodellevel1.d.ts +0 -47
- package/dist/models/backend1/django_app/deepmodellevel1.js +0 -72
- package/dist/models/backend1/django_app/deepmodellevel2.d.ts +0 -47
- package/dist/models/backend1/django_app/deepmodellevel2.js +0 -71
- package/dist/models/backend1/django_app/deepmodellevel3.d.ts +0 -44
- package/dist/models/backend1/django_app/deepmodellevel3.js +0 -69
- package/dist/models/backend1/django_app/dummymodel.d.ts +0 -47
- package/dist/models/backend1/django_app/dummymodel.js +0 -71
- package/dist/models/backend1/django_app/dummyrelatedmodel.d.ts +0 -44
- package/dist/models/backend1/django_app/dummyrelatedmodel.js +0 -69
- package/dist/models/backend1/django_app/filetest.d.ts +0 -44
- package/dist/models/backend1/django_app/filetest.js +0 -69
- package/dist/models/backend1/django_app/index.d.ts +0 -16
- package/dist/models/backend1/django_app/index.js +0 -16
- package/dist/models/backend1/django_app/modelwithcustompkrelation.d.ts +0 -47
- package/dist/models/backend1/django_app/modelwithcustompkrelation.js +0 -71
- package/dist/models/backend1/django_app/namefiltercustompkmodel.d.ts +0 -44
- package/dist/models/backend1/django_app/namefiltercustompkmodel.js +0 -69
- package/dist/models/backend1/django_app/order.d.ts +0 -47
- package/dist/models/backend1/django_app/order.js +0 -71
- package/dist/models/backend1/django_app/orderitem.d.ts +0 -47
- package/dist/models/backend1/django_app/orderitem.js +0 -72
- package/dist/models/backend1/django_app/product.d.ts +0 -47
- package/dist/models/backend1/django_app/product.js +0 -71
- package/dist/models/backend1/django_app/productcategory.d.ts +0 -44
- package/dist/models/backend1/django_app/productcategory.js +0 -69
- package/dist/models/backend1/django_app/rateplan.d.ts +0 -44
- package/dist/models/backend1/django_app/rateplan.js +0 -69
- package/dist/models/backend1/fileobject.d.ts +0 -4
- package/dist/models/backend1/fileobject.js +0 -9
- package/dist/models/backend1/index.d.ts +0 -2
- package/dist/models/backend1/index.js +0 -2
- package/dist/models/default/django_app/comprehensivemodel.d.ts +0 -47
- package/dist/models/default/django_app/comprehensivemodel.js +0 -71
- package/dist/models/default/django_app/custompkmodel.d.ts +0 -44
- package/dist/models/default/django_app/custompkmodel.js +0 -69
- package/dist/models/default/django_app/dailyrate.d.ts +0 -47
- package/dist/models/default/django_app/dailyrate.js +0 -71
- package/dist/models/default/django_app/deepmodellevel1.d.ts +0 -47
- package/dist/models/default/django_app/deepmodellevel1.js +0 -72
- package/dist/models/default/django_app/deepmodellevel2.d.ts +0 -47
- package/dist/models/default/django_app/deepmodellevel2.js +0 -71
- package/dist/models/default/django_app/deepmodellevel3.d.ts +0 -44
- package/dist/models/default/django_app/deepmodellevel3.js +0 -69
- package/dist/models/default/django_app/dummymodel.d.ts +0 -47
- package/dist/models/default/django_app/dummymodel.js +0 -71
- package/dist/models/default/django_app/dummyrelatedmodel.d.ts +0 -44
- package/dist/models/default/django_app/dummyrelatedmodel.js +0 -69
- package/dist/models/default/django_app/filetest.d.ts +0 -44
- package/dist/models/default/django_app/filetest.js +0 -69
- package/dist/models/default/django_app/index.d.ts +0 -16
- package/dist/models/default/django_app/index.js +0 -16
- package/dist/models/default/django_app/modelwithcustompkrelation.d.ts +0 -47
- package/dist/models/default/django_app/modelwithcustompkrelation.js +0 -71
- package/dist/models/default/django_app/namefiltercustompkmodel.d.ts +0 -44
- package/dist/models/default/django_app/namefiltercustompkmodel.js +0 -69
- package/dist/models/default/django_app/order.d.ts +0 -47
- package/dist/models/default/django_app/order.js +0 -71
- package/dist/models/default/django_app/orderitem.d.ts +0 -47
- package/dist/models/default/django_app/orderitem.js +0 -72
- package/dist/models/default/django_app/product.d.ts +0 -47
- package/dist/models/default/django_app/product.js +0 -71
- package/dist/models/default/django_app/productcategory.d.ts +0 -44
- package/dist/models/default/django_app/productcategory.js +0 -69
- package/dist/models/default/django_app/rateplan.d.ts +0 -44
- package/dist/models/default/django_app/rateplan.js +0 -69
- package/dist/models/default/fileobject.d.ts +0 -4
- package/dist/models/default/fileobject.js +0 -9
- package/dist/models/default/index.d.ts +0 -2
- package/dist/models/default/index.js +0 -2
- package/dist/models/index.d.ts +0 -1
- package/dist/models/index.js +0 -5
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated. Do not make direct changes to the file.
|
|
3
|
-
*/
|
|
4
|
-
import { Model, Manager, QuerySet, getModelClass } from '../../../../src';
|
|
5
|
-
import { wrapReactiveModel } from '../../../../src';
|
|
6
|
-
import schemaData from './dummymodel.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class DummyModelQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class DummyModelManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, DummyModelQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new DummyModelQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the DummyModel model
|
|
25
|
-
*/
|
|
26
|
-
export class DummyModel extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
DummyModel.validateFields(data);
|
|
29
|
-
super(data);
|
|
30
|
-
// Define getters and setters for all fields
|
|
31
|
-
this._defineProperties();
|
|
32
|
-
return wrapReactiveModel(this);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Define property getters and setters for all model fields
|
|
36
|
-
* @private
|
|
37
|
-
*/
|
|
38
|
-
_defineProperties() {
|
|
39
|
-
// For each field, define a property that gets/sets from internal storage
|
|
40
|
-
DummyModel.fields.forEach(field => {
|
|
41
|
-
Object.defineProperty(this, field, {
|
|
42
|
-
get: function () {
|
|
43
|
-
return this.getField(field);
|
|
44
|
-
},
|
|
45
|
-
set: function (value) {
|
|
46
|
-
this.setField(field, value);
|
|
47
|
-
},
|
|
48
|
-
enumerable: true, // Make sure fields are enumerable for serialization
|
|
49
|
-
configurable: true
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
// Add a special read-only getter for the repr field
|
|
53
|
-
Object.defineProperty(this, 'repr', {
|
|
54
|
-
get: function () {
|
|
55
|
-
return this.getField('repr');
|
|
56
|
-
},
|
|
57
|
-
enumerable: true, // Make sure repr is enumerable
|
|
58
|
-
configurable: true
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// Bind this model to its backend
|
|
63
|
-
DummyModel.configKey = 'default';
|
|
64
|
-
DummyModel.modelName = 'django_app.dummymodel';
|
|
65
|
-
DummyModel.primaryKeyField = 'id';
|
|
66
|
-
DummyModel.objects = new DummyModelManager(DummyModel);
|
|
67
|
-
DummyModel.fields = ['id', 'name', 'value', 'related'];
|
|
68
|
-
DummyModel.schema = schemaData;
|
|
69
|
-
DummyModel.relationshipFields = new Map([
|
|
70
|
-
['related', { 'ModelClass': () => getModelClass('django_app.dummyrelatedmodel', 'default'), 'relationshipType': 'foreign-key' }]
|
|
71
|
-
]);
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-specific QuerySet implementation
|
|
3
|
-
*/
|
|
4
|
-
export class DummyRelatedModelQuerySet extends QuerySet<any> {
|
|
5
|
-
constructor(ModelClass: ModelConstructor, config?: {
|
|
6
|
-
nodes?: QueryNode[] | undefined;
|
|
7
|
-
orderBy?: {
|
|
8
|
-
field: string;
|
|
9
|
-
direction: "asc" | "desc";
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
fields?: Set<string> | undefined;
|
|
12
|
-
aggregations?: Aggregation[] | undefined;
|
|
13
|
-
initialQueryset?: string | undefined;
|
|
14
|
-
serializerOptions?: SerializerOptions;
|
|
15
|
-
materialized?: boolean | undefined;
|
|
16
|
-
} | undefined, parent?: null);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Model-specific Manager implementation
|
|
20
|
-
*/
|
|
21
|
-
export class DummyRelatedModelManager extends Manager {
|
|
22
|
-
constructor(ModelClass: any);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of the DummyRelatedModel model
|
|
26
|
-
*/
|
|
27
|
-
export class DummyRelatedModel extends Model {
|
|
28
|
-
static configKey: string;
|
|
29
|
-
static modelName: string;
|
|
30
|
-
static primaryKeyField: string;
|
|
31
|
-
static objects: DummyRelatedModelManager;
|
|
32
|
-
static fields: string[];
|
|
33
|
-
static schema: any;
|
|
34
|
-
static relationshipFields: Map<any, any>;
|
|
35
|
-
constructor(data: any);
|
|
36
|
-
/**
|
|
37
|
-
* Define property getters and setters for all model fields
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
private _defineProperties;
|
|
41
|
-
}
|
|
42
|
-
import { QuerySet } from '../../../../src';
|
|
43
|
-
import { Manager } from '../../../../src';
|
|
44
|
-
import { Model } from '../../../../src';
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated. Do not make direct changes to the file.
|
|
3
|
-
*/
|
|
4
|
-
import { Model, Manager, QuerySet, getModelClass } from '../../../../src';
|
|
5
|
-
import { wrapReactiveModel } from '../../../../src';
|
|
6
|
-
import schemaData from './dummyrelatedmodel.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class DummyRelatedModelQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class DummyRelatedModelManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, DummyRelatedModelQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new DummyRelatedModelQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the DummyRelatedModel model
|
|
25
|
-
*/
|
|
26
|
-
export class DummyRelatedModel extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
DummyRelatedModel.validateFields(data);
|
|
29
|
-
super(data);
|
|
30
|
-
// Define getters and setters for all fields
|
|
31
|
-
this._defineProperties();
|
|
32
|
-
return wrapReactiveModel(this);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Define property getters and setters for all model fields
|
|
36
|
-
* @private
|
|
37
|
-
*/
|
|
38
|
-
_defineProperties() {
|
|
39
|
-
// For each field, define a property that gets/sets from internal storage
|
|
40
|
-
DummyRelatedModel.fields.forEach(field => {
|
|
41
|
-
Object.defineProperty(this, field, {
|
|
42
|
-
get: function () {
|
|
43
|
-
return this.getField(field);
|
|
44
|
-
},
|
|
45
|
-
set: function (value) {
|
|
46
|
-
this.setField(field, value);
|
|
47
|
-
},
|
|
48
|
-
enumerable: true, // Make sure fields are enumerable for serialization
|
|
49
|
-
configurable: true
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
// Add a special read-only getter for the repr field
|
|
53
|
-
Object.defineProperty(this, 'repr', {
|
|
54
|
-
get: function () {
|
|
55
|
-
return this.getField('repr');
|
|
56
|
-
},
|
|
57
|
-
enumerable: true, // Make sure repr is enumerable
|
|
58
|
-
configurable: true
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// Bind this model to its backend
|
|
63
|
-
DummyRelatedModel.configKey = 'default';
|
|
64
|
-
DummyRelatedModel.modelName = 'django_app.dummyrelatedmodel';
|
|
65
|
-
DummyRelatedModel.primaryKeyField = 'id';
|
|
66
|
-
DummyRelatedModel.objects = new DummyRelatedModelManager(DummyRelatedModel);
|
|
67
|
-
DummyRelatedModel.fields = ['id', 'name'];
|
|
68
|
-
DummyRelatedModel.schema = schemaData;
|
|
69
|
-
DummyRelatedModel.relationshipFields = new Map([]);
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-specific QuerySet implementation
|
|
3
|
-
*/
|
|
4
|
-
export class FileTestQuerySet extends QuerySet<any> {
|
|
5
|
-
constructor(ModelClass: ModelConstructor, config?: {
|
|
6
|
-
nodes?: QueryNode[] | undefined;
|
|
7
|
-
orderBy?: {
|
|
8
|
-
field: string;
|
|
9
|
-
direction: "asc" | "desc";
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
fields?: Set<string> | undefined;
|
|
12
|
-
aggregations?: Aggregation[] | undefined;
|
|
13
|
-
initialQueryset?: string | undefined;
|
|
14
|
-
serializerOptions?: SerializerOptions;
|
|
15
|
-
materialized?: boolean | undefined;
|
|
16
|
-
} | undefined, parent?: null);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Model-specific Manager implementation
|
|
20
|
-
*/
|
|
21
|
-
export class FileTestManager extends Manager {
|
|
22
|
-
constructor(ModelClass: any);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of the FileTest model
|
|
26
|
-
*/
|
|
27
|
-
export class FileTest extends Model {
|
|
28
|
-
static configKey: string;
|
|
29
|
-
static modelName: string;
|
|
30
|
-
static primaryKeyField: string;
|
|
31
|
-
static objects: FileTestManager;
|
|
32
|
-
static fields: string[];
|
|
33
|
-
static schema: any;
|
|
34
|
-
static relationshipFields: Map<any, any>;
|
|
35
|
-
constructor(data: any);
|
|
36
|
-
/**
|
|
37
|
-
* Define property getters and setters for all model fields
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
private _defineProperties;
|
|
41
|
-
}
|
|
42
|
-
import { QuerySet } from '../../../../src';
|
|
43
|
-
import { Manager } from '../../../../src';
|
|
44
|
-
import { Model } from '../../../../src';
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated. Do not make direct changes to the file.
|
|
3
|
-
*/
|
|
4
|
-
import { Model, Manager, QuerySet, getModelClass } from '../../../../src';
|
|
5
|
-
import { wrapReactiveModel } from '../../../../src';
|
|
6
|
-
import schemaData from './filetest.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class FileTestQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class FileTestManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, FileTestQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new FileTestQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the FileTest model
|
|
25
|
-
*/
|
|
26
|
-
export class FileTest extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
FileTest.validateFields(data);
|
|
29
|
-
super(data);
|
|
30
|
-
// Define getters and setters for all fields
|
|
31
|
-
this._defineProperties();
|
|
32
|
-
return wrapReactiveModel(this);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Define property getters and setters for all model fields
|
|
36
|
-
* @private
|
|
37
|
-
*/
|
|
38
|
-
_defineProperties() {
|
|
39
|
-
// For each field, define a property that gets/sets from internal storage
|
|
40
|
-
FileTest.fields.forEach(field => {
|
|
41
|
-
Object.defineProperty(this, field, {
|
|
42
|
-
get: function () {
|
|
43
|
-
return this.getField(field);
|
|
44
|
-
},
|
|
45
|
-
set: function (value) {
|
|
46
|
-
this.setField(field, value);
|
|
47
|
-
},
|
|
48
|
-
enumerable: true, // Make sure fields are enumerable for serialization
|
|
49
|
-
configurable: true
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
// Add a special read-only getter for the repr field
|
|
53
|
-
Object.defineProperty(this, 'repr', {
|
|
54
|
-
get: function () {
|
|
55
|
-
return this.getField('repr');
|
|
56
|
-
},
|
|
57
|
-
enumerable: true, // Make sure repr is enumerable
|
|
58
|
-
configurable: true
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// Bind this model to its backend
|
|
63
|
-
FileTest.configKey = 'default';
|
|
64
|
-
FileTest.modelName = 'django_app.filetest';
|
|
65
|
-
FileTest.primaryKeyField = 'id';
|
|
66
|
-
FileTest.objects = new FileTestManager(FileTest);
|
|
67
|
-
FileTest.fields = ['id', 'title', 'document', 'image', 'created_at'];
|
|
68
|
-
FileTest.schema = schemaData;
|
|
69
|
-
FileTest.relationshipFields = new Map([]);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export * from "./dummyrelatedmodel";
|
|
2
|
-
export * from "./dummymodel";
|
|
3
|
-
export * from "./filetest";
|
|
4
|
-
export * from "./deepmodellevel3";
|
|
5
|
-
export * from "./deepmodellevel2";
|
|
6
|
-
export * from "./deepmodellevel1";
|
|
7
|
-
export * from "./comprehensivemodel";
|
|
8
|
-
export * from "./custompkmodel";
|
|
9
|
-
export * from "./modelwithcustompkrelation";
|
|
10
|
-
export * from "./namefiltercustompkmodel";
|
|
11
|
-
export * from "./productcategory";
|
|
12
|
-
export * from "./product";
|
|
13
|
-
export * from "./order";
|
|
14
|
-
export * from "./orderitem";
|
|
15
|
-
export * from "./rateplan";
|
|
16
|
-
export * from "./dailyrate";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export * from './dummyrelatedmodel';
|
|
2
|
-
export * from './dummymodel';
|
|
3
|
-
export * from './filetest';
|
|
4
|
-
export * from './deepmodellevel3';
|
|
5
|
-
export * from './deepmodellevel2';
|
|
6
|
-
export * from './deepmodellevel1';
|
|
7
|
-
export * from './comprehensivemodel';
|
|
8
|
-
export * from './custompkmodel';
|
|
9
|
-
export * from './modelwithcustompkrelation';
|
|
10
|
-
export * from './namefiltercustompkmodel';
|
|
11
|
-
export * from './productcategory';
|
|
12
|
-
export * from './product';
|
|
13
|
-
export * from './order';
|
|
14
|
-
export * from './orderitem';
|
|
15
|
-
export * from './rateplan';
|
|
16
|
-
export * from './dailyrate';
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-specific QuerySet implementation
|
|
3
|
-
*/
|
|
4
|
-
export class ModelWithCustomPKRelationQuerySet extends QuerySet<any> {
|
|
5
|
-
constructor(ModelClass: ModelConstructor, config?: {
|
|
6
|
-
nodes?: QueryNode[] | undefined;
|
|
7
|
-
orderBy?: {
|
|
8
|
-
field: string;
|
|
9
|
-
direction: "asc" | "desc";
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
fields?: Set<string> | undefined;
|
|
12
|
-
aggregations?: Aggregation[] | undefined;
|
|
13
|
-
initialQueryset?: string | undefined;
|
|
14
|
-
serializerOptions?: SerializerOptions;
|
|
15
|
-
materialized?: boolean | undefined;
|
|
16
|
-
} | undefined, parent?: null);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Model-specific Manager implementation
|
|
20
|
-
*/
|
|
21
|
-
export class ModelWithCustomPKRelationManager extends Manager {
|
|
22
|
-
constructor(ModelClass: any);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of the ModelWithCustomPKRelation model
|
|
26
|
-
*/
|
|
27
|
-
export class ModelWithCustomPKRelation extends Model {
|
|
28
|
-
static configKey: string;
|
|
29
|
-
static modelName: string;
|
|
30
|
-
static primaryKeyField: string;
|
|
31
|
-
static objects: ModelWithCustomPKRelationManager;
|
|
32
|
-
static fields: string[];
|
|
33
|
-
static schema: any;
|
|
34
|
-
static relationshipFields: Map<string, {
|
|
35
|
-
ModelClass: () => Function | null;
|
|
36
|
-
relationshipType: string;
|
|
37
|
-
}>;
|
|
38
|
-
constructor(data: any);
|
|
39
|
-
/**
|
|
40
|
-
* Define property getters and setters for all model fields
|
|
41
|
-
* @private
|
|
42
|
-
*/
|
|
43
|
-
private _defineProperties;
|
|
44
|
-
}
|
|
45
|
-
import { QuerySet } from '../../../../src';
|
|
46
|
-
import { Manager } from '../../../../src';
|
|
47
|
-
import { Model } from '../../../../src';
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated. Do not make direct changes to the file.
|
|
3
|
-
*/
|
|
4
|
-
import { Model, Manager, QuerySet, getModelClass } from '../../../../src';
|
|
5
|
-
import { wrapReactiveModel } from '../../../../src';
|
|
6
|
-
import schemaData from './modelwithcustompkrelation.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class ModelWithCustomPKRelationQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class ModelWithCustomPKRelationManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, ModelWithCustomPKRelationQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new ModelWithCustomPKRelationQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the ModelWithCustomPKRelation model
|
|
25
|
-
*/
|
|
26
|
-
export class ModelWithCustomPKRelation extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
ModelWithCustomPKRelation.validateFields(data);
|
|
29
|
-
super(data);
|
|
30
|
-
// Define getters and setters for all fields
|
|
31
|
-
this._defineProperties();
|
|
32
|
-
return wrapReactiveModel(this);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Define property getters and setters for all model fields
|
|
36
|
-
* @private
|
|
37
|
-
*/
|
|
38
|
-
_defineProperties() {
|
|
39
|
-
// For each field, define a property that gets/sets from internal storage
|
|
40
|
-
ModelWithCustomPKRelation.fields.forEach(field => {
|
|
41
|
-
Object.defineProperty(this, field, {
|
|
42
|
-
get: function () {
|
|
43
|
-
return this.getField(field);
|
|
44
|
-
},
|
|
45
|
-
set: function (value) {
|
|
46
|
-
this.setField(field, value);
|
|
47
|
-
},
|
|
48
|
-
enumerable: true, // Make sure fields are enumerable for serialization
|
|
49
|
-
configurable: true
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
// Add a special read-only getter for the repr field
|
|
53
|
-
Object.defineProperty(this, 'repr', {
|
|
54
|
-
get: function () {
|
|
55
|
-
return this.getField('repr');
|
|
56
|
-
},
|
|
57
|
-
enumerable: true, // Make sure repr is enumerable
|
|
58
|
-
configurable: true
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// Bind this model to its backend
|
|
63
|
-
ModelWithCustomPKRelation.configKey = 'default';
|
|
64
|
-
ModelWithCustomPKRelation.modelName = 'django_app.modelwithcustompkrelation';
|
|
65
|
-
ModelWithCustomPKRelation.primaryKeyField = 'id';
|
|
66
|
-
ModelWithCustomPKRelation.objects = new ModelWithCustomPKRelationManager(ModelWithCustomPKRelation);
|
|
67
|
-
ModelWithCustomPKRelation.fields = ['id', 'name', 'custom_pk_related'];
|
|
68
|
-
ModelWithCustomPKRelation.schema = schemaData;
|
|
69
|
-
ModelWithCustomPKRelation.relationshipFields = new Map([
|
|
70
|
-
['custom_pk_related', { 'ModelClass': () => getModelClass('django_app.custompkmodel', 'default'), 'relationshipType': 'foreign-key' }]
|
|
71
|
-
]);
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-specific QuerySet implementation
|
|
3
|
-
*/
|
|
4
|
-
export class NameFilterCustomPKModelQuerySet extends QuerySet<any> {
|
|
5
|
-
constructor(ModelClass: ModelConstructor, config?: {
|
|
6
|
-
nodes?: QueryNode[] | undefined;
|
|
7
|
-
orderBy?: {
|
|
8
|
-
field: string;
|
|
9
|
-
direction: "asc" | "desc";
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
fields?: Set<string> | undefined;
|
|
12
|
-
aggregations?: Aggregation[] | undefined;
|
|
13
|
-
initialQueryset?: string | undefined;
|
|
14
|
-
serializerOptions?: SerializerOptions;
|
|
15
|
-
materialized?: boolean | undefined;
|
|
16
|
-
} | undefined, parent?: null);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Model-specific Manager implementation
|
|
20
|
-
*/
|
|
21
|
-
export class NameFilterCustomPKModelManager extends Manager {
|
|
22
|
-
constructor(ModelClass: any);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of the NameFilterCustomPKModel model
|
|
26
|
-
*/
|
|
27
|
-
export class NameFilterCustomPKModel extends Model {
|
|
28
|
-
static configKey: string;
|
|
29
|
-
static modelName: string;
|
|
30
|
-
static primaryKeyField: string;
|
|
31
|
-
static objects: NameFilterCustomPKModelManager;
|
|
32
|
-
static fields: string[];
|
|
33
|
-
static schema: any;
|
|
34
|
-
static relationshipFields: Map<any, any>;
|
|
35
|
-
constructor(data: any);
|
|
36
|
-
/**
|
|
37
|
-
* Define property getters and setters for all model fields
|
|
38
|
-
* @private
|
|
39
|
-
*/
|
|
40
|
-
private _defineProperties;
|
|
41
|
-
}
|
|
42
|
-
import { QuerySet } from '../../../../src';
|
|
43
|
-
import { Manager } from '../../../../src';
|
|
44
|
-
import { Model } from '../../../../src';
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated. Do not make direct changes to the file.
|
|
3
|
-
*/
|
|
4
|
-
import { Model, Manager, QuerySet, getModelClass } from '../../../../src';
|
|
5
|
-
import { wrapReactiveModel } from '../../../../src';
|
|
6
|
-
import schemaData from './namefiltercustompkmodel.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class NameFilterCustomPKModelQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class NameFilterCustomPKModelManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, NameFilterCustomPKModelQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new NameFilterCustomPKModelQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the NameFilterCustomPKModel model
|
|
25
|
-
*/
|
|
26
|
-
export class NameFilterCustomPKModel extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
NameFilterCustomPKModel.validateFields(data);
|
|
29
|
-
super(data);
|
|
30
|
-
// Define getters and setters for all fields
|
|
31
|
-
this._defineProperties();
|
|
32
|
-
return wrapReactiveModel(this);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Define property getters and setters for all model fields
|
|
36
|
-
* @private
|
|
37
|
-
*/
|
|
38
|
-
_defineProperties() {
|
|
39
|
-
// For each field, define a property that gets/sets from internal storage
|
|
40
|
-
NameFilterCustomPKModel.fields.forEach(field => {
|
|
41
|
-
Object.defineProperty(this, field, {
|
|
42
|
-
get: function () {
|
|
43
|
-
return this.getField(field);
|
|
44
|
-
},
|
|
45
|
-
set: function (value) {
|
|
46
|
-
this.setField(field, value);
|
|
47
|
-
},
|
|
48
|
-
enumerable: true, // Make sure fields are enumerable for serialization
|
|
49
|
-
configurable: true
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
// Add a special read-only getter for the repr field
|
|
53
|
-
Object.defineProperty(this, 'repr', {
|
|
54
|
-
get: function () {
|
|
55
|
-
return this.getField('repr');
|
|
56
|
-
},
|
|
57
|
-
enumerable: true, // Make sure repr is enumerable
|
|
58
|
-
configurable: true
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// Bind this model to its backend
|
|
63
|
-
NameFilterCustomPKModel.configKey = 'default';
|
|
64
|
-
NameFilterCustomPKModel.modelName = 'django_app.namefiltercustompkmodel';
|
|
65
|
-
NameFilterCustomPKModel.primaryKeyField = 'custom_pk';
|
|
66
|
-
NameFilterCustomPKModel.objects = new NameFilterCustomPKModelManager(NameFilterCustomPKModel);
|
|
67
|
-
NameFilterCustomPKModel.fields = ['custom_pk', 'name'];
|
|
68
|
-
NameFilterCustomPKModel.schema = schemaData;
|
|
69
|
-
NameFilterCustomPKModel.relationshipFields = new Map([]);
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Model-specific QuerySet implementation
|
|
3
|
-
*/
|
|
4
|
-
export class OrderQuerySet extends QuerySet<any> {
|
|
5
|
-
constructor(ModelClass: ModelConstructor, config?: {
|
|
6
|
-
nodes?: QueryNode[] | undefined;
|
|
7
|
-
orderBy?: {
|
|
8
|
-
field: string;
|
|
9
|
-
direction: "asc" | "desc";
|
|
10
|
-
}[] | undefined;
|
|
11
|
-
fields?: Set<string> | undefined;
|
|
12
|
-
aggregations?: Aggregation[] | undefined;
|
|
13
|
-
initialQueryset?: string | undefined;
|
|
14
|
-
serializerOptions?: SerializerOptions;
|
|
15
|
-
materialized?: boolean | undefined;
|
|
16
|
-
} | undefined, parent?: null);
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Model-specific Manager implementation
|
|
20
|
-
*/
|
|
21
|
-
export class OrderManager extends Manager {
|
|
22
|
-
constructor(ModelClass: any);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Implementation of the Order model
|
|
26
|
-
*/
|
|
27
|
-
export class Order extends Model {
|
|
28
|
-
static configKey: string;
|
|
29
|
-
static modelName: string;
|
|
30
|
-
static primaryKeyField: string;
|
|
31
|
-
static objects: OrderManager;
|
|
32
|
-
static fields: string[];
|
|
33
|
-
static schema: any;
|
|
34
|
-
static relationshipFields: Map<string, {
|
|
35
|
-
ModelClass: () => Function | null;
|
|
36
|
-
relationshipType: string;
|
|
37
|
-
}>;
|
|
38
|
-
constructor(data: any);
|
|
39
|
-
/**
|
|
40
|
-
* Define property getters and setters for all model fields
|
|
41
|
-
* @private
|
|
42
|
-
*/
|
|
43
|
-
private _defineProperties;
|
|
44
|
-
}
|
|
45
|
-
import { QuerySet } from '../../../../src';
|
|
46
|
-
import { Manager } from '../../../../src';
|
|
47
|
-
import { Model } from '../../../../src';
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated. Do not make direct changes to the file.
|
|
3
|
-
*/
|
|
4
|
-
import { Model, Manager, QuerySet, getModelClass } from '../../../../src';
|
|
5
|
-
import { wrapReactiveModel } from '../../../../src';
|
|
6
|
-
import schemaData from './order.schema.json';
|
|
7
|
-
/**
|
|
8
|
-
* Model-specific QuerySet implementation
|
|
9
|
-
*/
|
|
10
|
-
export class OrderQuerySet extends QuerySet {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Model-specific Manager implementation
|
|
14
|
-
*/
|
|
15
|
-
export class OrderManager extends Manager {
|
|
16
|
-
constructor(ModelClass) {
|
|
17
|
-
super(ModelClass, OrderQuerySet);
|
|
18
|
-
}
|
|
19
|
-
newQuerySet() {
|
|
20
|
-
return new OrderQuerySet(this.ModelClass);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Implementation of the Order model
|
|
25
|
-
*/
|
|
26
|
-
export class Order extends Model {
|
|
27
|
-
constructor(data) {
|
|
28
|
-
Order.validateFields(data);
|
|
29
|
-
super(data);
|
|
30
|
-
// Define getters and setters for all fields
|
|
31
|
-
this._defineProperties();
|
|
32
|
-
return wrapReactiveModel(this);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Define property getters and setters for all model fields
|
|
36
|
-
* @private
|
|
37
|
-
*/
|
|
38
|
-
_defineProperties() {
|
|
39
|
-
// For each field, define a property that gets/sets from internal storage
|
|
40
|
-
Order.fields.forEach(field => {
|
|
41
|
-
Object.defineProperty(this, field, {
|
|
42
|
-
get: function () {
|
|
43
|
-
return this.getField(field);
|
|
44
|
-
},
|
|
45
|
-
set: function (value) {
|
|
46
|
-
this.setField(field, value);
|
|
47
|
-
},
|
|
48
|
-
enumerable: true, // Make sure fields are enumerable for serialization
|
|
49
|
-
configurable: true
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
// Add a special read-only getter for the repr field
|
|
53
|
-
Object.defineProperty(this, 'repr', {
|
|
54
|
-
get: function () {
|
|
55
|
-
return this.getField('repr');
|
|
56
|
-
},
|
|
57
|
-
enumerable: true, // Make sure repr is enumerable
|
|
58
|
-
configurable: true
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// Bind this model to its backend
|
|
63
|
-
Order.configKey = 'default';
|
|
64
|
-
Order.modelName = 'django_app.order';
|
|
65
|
-
Order.primaryKeyField = 'id';
|
|
66
|
-
Order.objects = new OrderManager(Order);
|
|
67
|
-
Order.fields = ['id', 'order_number', 'customer_name', 'customer_email', 'total', 'status', 'created_at', 'last_updated', 'items'];
|
|
68
|
-
Order.schema = schemaData;
|
|
69
|
-
Order.relationshipFields = new Map([
|
|
70
|
-
['items', { 'ModelClass': () => getModelClass('django_app.orderitem', 'default'), 'relationshipType': 'many-to-many' }]
|
|
71
|
-
]);
|