@statezero/core 0.1.72 → 0.1.74
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/dist/actions/django_app/calculate-hash.d.ts +57 -0
- package/dist/actions/django_app/calculate-hash.js +77 -0
- package/dist/actions/django_app/get-current-username.d.ts +29 -0
- package/dist/actions/django_app/get-current-username.js +62 -0
- package/dist/actions/django_app/get-server-status.d.ts +38 -0
- package/dist/actions/django_app/get-server-status.js +65 -0
- package/dist/actions/django_app/get-user-info.d.ts +44 -0
- package/dist/actions/django_app/get-user-info.js +67 -0
- package/dist/actions/django_app/index.d.ts +6 -0
- package/dist/actions/django_app/index.js +6 -0
- package/dist/actions/django_app/process-data.d.ts +51 -0
- package/dist/actions/django_app/process-data.js +75 -0
- package/dist/actions/django_app/send-notification.d.ts +55 -0
- package/dist/actions/django_app/send-notification.js +78 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.js +1 -0
- package/dist/cli/commands/syncActions.js +49 -8
- package/dist/core/eventReceivers.d.ts +2 -2
- package/dist/models/django_app/comprehensivemodel.d.ts +47 -0
- package/dist/models/django_app/comprehensivemodel.js +63 -0
- package/dist/models/django_app/custompkmodel.d.ts +44 -0
- package/dist/models/django_app/custompkmodel.js +61 -0
- package/dist/models/django_app/deepmodellevel1.d.ts +47 -0
- package/dist/models/django_app/deepmodellevel1.js +64 -0
- package/dist/models/django_app/deepmodellevel2.d.ts +47 -0
- package/dist/models/django_app/deepmodellevel2.js +63 -0
- package/dist/models/django_app/deepmodellevel3.d.ts +44 -0
- package/dist/models/django_app/deepmodellevel3.js +61 -0
- package/dist/models/django_app/dummymodel.d.ts +47 -0
- package/dist/models/django_app/dummymodel.js +63 -0
- package/dist/models/django_app/dummyrelatedmodel.d.ts +44 -0
- package/dist/models/django_app/dummyrelatedmodel.js +61 -0
- package/dist/models/django_app/filetest.d.ts +44 -0
- package/dist/models/django_app/filetest.js +61 -0
- package/dist/models/django_app/index.d.ts +14 -0
- package/dist/models/django_app/index.js +14 -0
- package/dist/models/django_app/modelwithcustompkrelation.d.ts +47 -0
- package/dist/models/django_app/modelwithcustompkrelation.js +63 -0
- package/dist/models/django_app/namefiltercustompkmodel.d.ts +44 -0
- package/dist/models/django_app/namefiltercustompkmodel.js +61 -0
- package/dist/models/django_app/order.d.ts +44 -0
- package/dist/models/django_app/order.js +61 -0
- package/dist/models/django_app/orderitem.d.ts +47 -0
- package/dist/models/django_app/orderitem.js +64 -0
- package/dist/models/django_app/product.d.ts +47 -0
- package/dist/models/django_app/product.js +63 -0
- package/dist/models/django_app/productcategory.d.ts +44 -0
- package/dist/models/django_app/productcategory.js +61 -0
- package/dist/models/fileobject.d.ts +4 -0
- package/dist/models/fileobject.js +9 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/syncEngine/metrics/metricOptCalcs.d.ts +3 -3
- package/dist/syncEngine/sync.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
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<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';
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Bind this model to its backend
|
|
55
|
+
Order.configKey = 'default';
|
|
56
|
+
Order.modelName = 'django_app.order';
|
|
57
|
+
Order.primaryKeyField = 'id';
|
|
58
|
+
Order.objects = new OrderManager(Order);
|
|
59
|
+
Order.fields = ['id', 'order_number', 'customer_name', 'customer_email', 'total', 'status', 'created_at', 'last_updated'];
|
|
60
|
+
Order.schema = schemaData;
|
|
61
|
+
Order.relationshipFields = new Map([]);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model-specific QuerySet implementation
|
|
3
|
+
*/
|
|
4
|
+
export class OrderItemQuerySet 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 OrderItemManager extends Manager {
|
|
22
|
+
constructor(ModelClass: any);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Implementation of the OrderItem model
|
|
26
|
+
*/
|
|
27
|
+
export class OrderItem extends Model {
|
|
28
|
+
static configKey: string;
|
|
29
|
+
static modelName: string;
|
|
30
|
+
static primaryKeyField: string;
|
|
31
|
+
static objects: OrderItemManager;
|
|
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';
|
|
@@ -0,0 +1,64 @@
|
|
|
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 './orderitem.schema.json';
|
|
7
|
+
/**
|
|
8
|
+
* Model-specific QuerySet implementation
|
|
9
|
+
*/
|
|
10
|
+
export class OrderItemQuerySet extends QuerySet {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Model-specific Manager implementation
|
|
14
|
+
*/
|
|
15
|
+
export class OrderItemManager extends Manager {
|
|
16
|
+
constructor(ModelClass) {
|
|
17
|
+
super(ModelClass, OrderItemQuerySet);
|
|
18
|
+
}
|
|
19
|
+
newQuerySet() {
|
|
20
|
+
return new OrderItemQuerySet(this.ModelClass);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Implementation of the OrderItem model
|
|
25
|
+
*/
|
|
26
|
+
export class OrderItem extends Model {
|
|
27
|
+
constructor(data) {
|
|
28
|
+
OrderItem.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
|
+
OrderItem.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
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Bind this model to its backend
|
|
55
|
+
OrderItem.configKey = 'default';
|
|
56
|
+
OrderItem.modelName = 'django_app.orderitem';
|
|
57
|
+
OrderItem.primaryKeyField = 'id';
|
|
58
|
+
OrderItem.objects = new OrderItemManager(OrderItem);
|
|
59
|
+
OrderItem.fields = ['id', 'order', 'product', 'quantity', 'price', 'subtotal'];
|
|
60
|
+
OrderItem.schema = schemaData;
|
|
61
|
+
OrderItem.relationshipFields = new Map([
|
|
62
|
+
['order', { 'ModelClass': () => getModelClass('django_app.order', 'default'), 'relationshipType': 'foreign-key' }],
|
|
63
|
+
['product', { 'ModelClass': () => getModelClass('django_app.product', 'default'), 'relationshipType': 'foreign-key' }]
|
|
64
|
+
]);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model-specific QuerySet implementation
|
|
3
|
+
*/
|
|
4
|
+
export class ProductQuerySet 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 ProductManager extends Manager {
|
|
22
|
+
constructor(ModelClass: any);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Implementation of the Product model
|
|
26
|
+
*/
|
|
27
|
+
export class Product extends Model {
|
|
28
|
+
static configKey: string;
|
|
29
|
+
static modelName: string;
|
|
30
|
+
static primaryKeyField: string;
|
|
31
|
+
static objects: ProductManager;
|
|
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';
|
|
@@ -0,0 +1,63 @@
|
|
|
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 './product.schema.json';
|
|
7
|
+
/**
|
|
8
|
+
* Model-specific QuerySet implementation
|
|
9
|
+
*/
|
|
10
|
+
export class ProductQuerySet extends QuerySet {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Model-specific Manager implementation
|
|
14
|
+
*/
|
|
15
|
+
export class ProductManager extends Manager {
|
|
16
|
+
constructor(ModelClass) {
|
|
17
|
+
super(ModelClass, ProductQuerySet);
|
|
18
|
+
}
|
|
19
|
+
newQuerySet() {
|
|
20
|
+
return new ProductQuerySet(this.ModelClass);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Implementation of the Product model
|
|
25
|
+
*/
|
|
26
|
+
export class Product extends Model {
|
|
27
|
+
constructor(data) {
|
|
28
|
+
Product.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
|
+
Product.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
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Bind this model to its backend
|
|
55
|
+
Product.configKey = 'default';
|
|
56
|
+
Product.modelName = 'django_app.product';
|
|
57
|
+
Product.primaryKeyField = 'id';
|
|
58
|
+
Product.objects = new ProductManager(Product);
|
|
59
|
+
Product.fields = ['id', 'name', 'description', 'price', 'category', 'in_stock', 'created_at', 'created_by', 'price_with_tax', 'display_name'];
|
|
60
|
+
Product.schema = schemaData;
|
|
61
|
+
Product.relationshipFields = new Map([
|
|
62
|
+
['category', { 'ModelClass': () => getModelClass('django_app.productcategory', 'default'), 'relationshipType': 'foreign-key' }]
|
|
63
|
+
]);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model-specific QuerySet implementation
|
|
3
|
+
*/
|
|
4
|
+
export class ProductCategoryQuerySet 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 ProductCategoryManager extends Manager {
|
|
22
|
+
constructor(ModelClass: any);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Implementation of the ProductCategory model
|
|
26
|
+
*/
|
|
27
|
+
export class ProductCategory extends Model {
|
|
28
|
+
static configKey: string;
|
|
29
|
+
static modelName: string;
|
|
30
|
+
static primaryKeyField: string;
|
|
31
|
+
static objects: ProductCategoryManager;
|
|
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';
|
|
@@ -0,0 +1,61 @@
|
|
|
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 './productcategory.schema.json';
|
|
7
|
+
/**
|
|
8
|
+
* Model-specific QuerySet implementation
|
|
9
|
+
*/
|
|
10
|
+
export class ProductCategoryQuerySet extends QuerySet {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Model-specific Manager implementation
|
|
14
|
+
*/
|
|
15
|
+
export class ProductCategoryManager extends Manager {
|
|
16
|
+
constructor(ModelClass) {
|
|
17
|
+
super(ModelClass, ProductCategoryQuerySet);
|
|
18
|
+
}
|
|
19
|
+
newQuerySet() {
|
|
20
|
+
return new ProductCategoryQuerySet(this.ModelClass);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Implementation of the ProductCategory model
|
|
25
|
+
*/
|
|
26
|
+
export class ProductCategory extends Model {
|
|
27
|
+
constructor(data) {
|
|
28
|
+
ProductCategory.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
|
+
ProductCategory.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
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// Bind this model to its backend
|
|
55
|
+
ProductCategory.configKey = 'default';
|
|
56
|
+
ProductCategory.modelName = 'django_app.productcategory';
|
|
57
|
+
ProductCategory.primaryKeyField = 'id';
|
|
58
|
+
ProductCategory.objects = new ProductCategoryManager(ProductCategory);
|
|
59
|
+
ProductCategory.fields = ['id', 'name'];
|
|
60
|
+
ProductCategory.schema = schemaData;
|
|
61
|
+
ProductCategory.relationshipFields = new Map([]);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated. Do not make direct changes to the file.
|
|
3
|
+
* Backend-specific FileObject class for default
|
|
4
|
+
*/
|
|
5
|
+
import { FileObject as BaseFileObject } from '../../../src';
|
|
6
|
+
export class defaultFileObject extends BaseFileObject {
|
|
7
|
+
}
|
|
8
|
+
defaultFileObject.configKey = 'default';
|
|
9
|
+
export const FileObject = defaultFileObject;
|
|
@@ -48,8 +48,8 @@ export class MaxStrategy extends MetricCalculationStrategy {
|
|
|
48
48
|
* Factory class for creating the appropriate strategy
|
|
49
49
|
*/
|
|
50
50
|
export class MetricStrategyFactory {
|
|
51
|
-
static "__#
|
|
52
|
-
static "__#
|
|
51
|
+
static "__#private@#customStrategies": Map<any, any>;
|
|
52
|
+
static "__#private@#defaultStrategies": Map<string, () => CountStrategy>;
|
|
53
53
|
/**
|
|
54
54
|
* Clear all custom strategy overrides
|
|
55
55
|
*/
|
|
@@ -61,7 +61,7 @@ export class MetricStrategyFactory {
|
|
|
61
61
|
* @param {Function} ModelClass - The model class
|
|
62
62
|
* @returns {string} A unique key
|
|
63
63
|
*/
|
|
64
|
-
private static "__#
|
|
64
|
+
private static "__#private@#generateStrategyKey";
|
|
65
65
|
/**
|
|
66
66
|
* Override a strategy for a specific metric type and model class
|
|
67
67
|
* @param {string} metricType - The type of metric (count, sum, min, max)
|
package/dist/syncEngine/sync.js
CHANGED
|
@@ -87,7 +87,7 @@ export class SyncManager {
|
|
|
87
87
|
this.maxWaitMs = 2000; // Maximum time to hold events
|
|
88
88
|
this.batchStartTime = null;
|
|
89
89
|
// SyncQueue
|
|
90
|
-
this.syncQueue = new PQueue({ concurrency:
|
|
90
|
+
this.syncQueue = new PQueue({ concurrency: 1 });
|
|
91
91
|
}
|
|
92
92
|
withTimeout(promise, ms) {
|
|
93
93
|
// If no timeout specified, use 2x the periodic sync interval, or 30s as fallback
|
package/package.json
CHANGED