@statezero/core 0.2.50 → 0.2.52

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 (171) hide show
  1. package/dist/adaptors/vue/components/StateZeroDebugPanel.js +489 -471
  2. package/dist/adaptors/vue/reactivity.d.ts +1 -0
  3. package/dist/adaptors/vue/reactivity.js +17 -5
  4. package/dist/cli/commands/syncActions.js +33 -1
  5. package/dist/cli/commands/syncModels.js +44 -3
  6. package/dist/filtering/localFiltering.js +4 -4
  7. package/dist/flavours/django/errors.d.ts +12 -0
  8. package/dist/flavours/django/errors.js +20 -0
  9. package/dist/flavours/django/f.js +16 -15
  10. package/dist/index.d.ts +2 -1
  11. package/dist/index.js +2 -2
  12. package/dist/models/backend1/django_app/author.d.ts +284 -0
  13. package/dist/models/backend1/django_app/author.js +69 -0
  14. package/dist/models/backend1/django_app/author.schema.json +281 -0
  15. package/dist/models/backend1/django_app/book.d.ts +262 -0
  16. package/dist/models/backend1/django_app/book.js +71 -0
  17. package/dist/models/backend1/django_app/book.schema.json +254 -0
  18. package/dist/models/backend1/django_app/composeditem.d.ts +140 -0
  19. package/dist/models/backend1/django_app/composeditem.js +69 -0
  20. package/dist/models/backend1/django_app/composeditem.schema.json +122 -0
  21. package/dist/models/backend1/django_app/comprehensivemodel.schema.json +3 -3
  22. package/dist/models/backend1/django_app/dailyrate.schema.json +7 -7
  23. package/dist/models/backend1/django_app/deepmodellevel1.schema.json +1 -1
  24. package/dist/models/backend1/django_app/dummymodel.schema.json +3 -3
  25. package/dist/models/backend1/django_app/errortestcompoundunique.d.ts +124 -0
  26. package/dist/models/backend1/django_app/errortestcompoundunique.js +69 -0
  27. package/dist/models/backend1/django_app/errortestcompoundunique.schema.json +106 -0
  28. package/dist/models/backend1/django_app/errortestonetoonemodel.d.ts +118 -0
  29. package/dist/models/backend1/django_app/errortestonetoonemodel.js +71 -0
  30. package/dist/models/backend1/django_app/errortestonetoonemodel.schema.json +90 -0
  31. package/dist/models/backend1/django_app/errortestparent.d.ts +92 -0
  32. package/dist/models/backend1/django_app/errortestparent.js +69 -0
  33. package/dist/models/backend1/django_app/errortestparent.schema.json +70 -0
  34. package/dist/models/backend1/django_app/errortestprotectedchild.d.ts +118 -0
  35. package/dist/models/backend1/django_app/errortestprotectedchild.js +71 -0
  36. package/dist/models/backend1/django_app/errortestprotectedchild.schema.json +94 -0
  37. package/dist/models/backend1/django_app/errortestuniquemodel.d.ts +108 -0
  38. package/dist/models/backend1/django_app/errortestuniquemodel.js +69 -0
  39. package/dist/models/backend1/django_app/errortestuniquemodel.schema.json +88 -0
  40. package/dist/models/backend1/django_app/excludeditem.d.ts +124 -0
  41. package/dist/models/backend1/django_app/excludeditem.js +69 -0
  42. package/dist/models/backend1/django_app/excludeditem.schema.json +105 -0
  43. package/dist/models/backend1/django_app/hfchild.d.ts +118 -0
  44. package/dist/models/backend1/django_app/hfchild.js +71 -0
  45. package/dist/models/backend1/django_app/hfchild.schema.json +94 -0
  46. package/dist/models/backend1/django_app/hfparent.d.ts +124 -0
  47. package/dist/models/backend1/django_app/hfparent.js +69 -0
  48. package/dist/models/backend1/django_app/hfparent.schema.json +105 -0
  49. package/dist/models/backend1/django_app/index.js +19 -0
  50. package/dist/models/backend1/django_app/m2mdepthtestlevel1.schema.json +3 -3
  51. package/dist/models/backend1/django_app/m2mdepthtestlevel2.schema.json +3 -3
  52. package/dist/models/backend1/django_app/m2mdepthtestlevel3.schema.json +5 -5
  53. package/dist/models/backend1/django_app/modelwithrestrictedfields.schema.json +2 -2
  54. package/dist/models/backend1/django_app/nodeleteitem.d.ts +124 -0
  55. package/dist/models/backend1/django_app/nodeleteitem.js +69 -0
  56. package/dist/models/backend1/django_app/nodeleteitem.schema.json +105 -0
  57. package/dist/models/backend1/django_app/objectlevelitem.d.ts +124 -0
  58. package/dist/models/backend1/django_app/objectlevelitem.js +69 -0
  59. package/dist/models/backend1/django_app/objectlevelitem.schema.json +105 -0
  60. package/dist/models/backend1/django_app/order.schema.json +7 -7
  61. package/dist/models/backend1/django_app/orderitem.schema.json +5 -5
  62. package/dist/models/backend1/django_app/product.schema.json +11 -11
  63. package/dist/models/backend1/django_app/productcategory.schema.json +2 -2
  64. package/dist/models/backend1/django_app/rateplan.schema.json +2 -2
  65. package/dist/models/backend1/django_app/readonlyitem.d.ts +124 -0
  66. package/dist/models/backend1/django_app/readonlyitem.js +69 -0
  67. package/dist/models/backend1/django_app/readonlyitem.schema.json +105 -0
  68. package/dist/models/backend1/django_app/restrictedcreateitem.d.ts +124 -0
  69. package/dist/models/backend1/django_app/restrictedcreateitem.js +69 -0
  70. package/dist/models/backend1/django_app/restrictedcreateitem.schema.json +105 -0
  71. package/dist/models/backend1/django_app/restrictededititem.d.ts +124 -0
  72. package/dist/models/backend1/django_app/restrictededititem.js +69 -0
  73. package/dist/models/backend1/django_app/restrictededititem.schema.json +105 -0
  74. package/dist/models/backend1/django_app/restrictedfieldrelatedmodel.schema.json +1 -1
  75. package/dist/models/backend1/django_app/rowfiltereditem.d.ts +124 -0
  76. package/dist/models/backend1/django_app/rowfiltereditem.js +69 -0
  77. package/dist/models/backend1/django_app/rowfiltereditem.schema.json +105 -0
  78. package/dist/models/backend1/django_app/tag.d.ts +554 -0
  79. package/dist/models/backend1/django_app/tag.js +71 -0
  80. package/dist/models/backend1/django_app/tag.schema.json +541 -0
  81. package/dist/models/backend1/django_app/updateonlyitem.d.ts +108 -0
  82. package/dist/models/backend1/django_app/updateonlyitem.js +69 -0
  83. package/dist/models/backend1/django_app/updateonlyitem.schema.json +88 -0
  84. package/dist/models/default/django_app/author.d.ts +284 -0
  85. package/dist/models/default/django_app/author.js +69 -0
  86. package/dist/models/default/django_app/author.schema.json +281 -0
  87. package/dist/models/default/django_app/book.d.ts +262 -0
  88. package/dist/models/default/django_app/book.js +71 -0
  89. package/dist/models/default/django_app/book.schema.json +254 -0
  90. package/dist/models/default/django_app/composeditem.d.ts +140 -0
  91. package/dist/models/default/django_app/composeditem.js +69 -0
  92. package/dist/models/default/django_app/composeditem.schema.json +122 -0
  93. package/dist/models/default/django_app/comprehensivemodel.schema.json +3 -3
  94. package/dist/models/default/django_app/dailyrate.schema.json +7 -7
  95. package/dist/models/default/django_app/deepmodellevel1.d.ts +1 -13
  96. package/dist/models/default/django_app/deepmodellevel1.schema.json +2 -14
  97. package/dist/models/default/django_app/deepmodellevel2.d.ts +1 -13
  98. package/dist/models/default/django_app/deepmodellevel2.schema.json +1 -13
  99. package/dist/models/default/django_app/deepmodellevel3.d.ts +1 -13
  100. package/dist/models/default/django_app/deepmodellevel3.schema.json +1 -13
  101. package/dist/models/default/django_app/dummymodel.d.ts +1 -13
  102. package/dist/models/default/django_app/dummymodel.schema.json +4 -16
  103. package/dist/models/default/django_app/dummyrelatedmodel.d.ts +1 -13
  104. package/dist/models/default/django_app/dummyrelatedmodel.schema.json +1 -13
  105. package/dist/models/default/django_app/errortestcompoundunique.d.ts +124 -0
  106. package/dist/models/default/django_app/errortestcompoundunique.js +69 -0
  107. package/dist/models/default/django_app/errortestcompoundunique.schema.json +106 -0
  108. package/dist/models/default/django_app/errortestonetoonemodel.d.ts +118 -0
  109. package/dist/models/default/django_app/errortestonetoonemodel.js +71 -0
  110. package/dist/models/default/django_app/errortestonetoonemodel.schema.json +90 -0
  111. package/dist/models/default/django_app/errortestparent.d.ts +92 -0
  112. package/dist/models/default/django_app/errortestparent.js +69 -0
  113. package/dist/models/default/django_app/errortestparent.schema.json +70 -0
  114. package/dist/models/default/django_app/errortestprotectedchild.d.ts +118 -0
  115. package/dist/models/default/django_app/errortestprotectedchild.js +71 -0
  116. package/dist/models/default/django_app/errortestprotectedchild.schema.json +94 -0
  117. package/dist/models/default/django_app/errortestuniquemodel.d.ts +108 -0
  118. package/dist/models/default/django_app/errortestuniquemodel.js +69 -0
  119. package/dist/models/default/django_app/errortestuniquemodel.schema.json +88 -0
  120. package/dist/models/default/django_app/excludeditem.d.ts +124 -0
  121. package/dist/models/default/django_app/excludeditem.js +69 -0
  122. package/dist/models/default/django_app/excludeditem.schema.json +105 -0
  123. package/dist/models/default/django_app/filetest.d.ts +1 -13
  124. package/dist/models/default/django_app/filetest.schema.json +1 -13
  125. package/dist/models/default/django_app/hfchild.d.ts +118 -0
  126. package/dist/models/default/django_app/hfchild.js +71 -0
  127. package/dist/models/default/django_app/hfchild.schema.json +94 -0
  128. package/dist/models/default/django_app/hfparent.d.ts +124 -0
  129. package/dist/models/default/django_app/hfparent.js +69 -0
  130. package/dist/models/default/django_app/hfparent.schema.json +105 -0
  131. package/dist/models/default/django_app/index.js +19 -0
  132. package/dist/models/default/django_app/m2mdepthtestlevel1.schema.json +3 -3
  133. package/dist/models/default/django_app/m2mdepthtestlevel2.schema.json +3 -3
  134. package/dist/models/default/django_app/m2mdepthtestlevel3.schema.json +5 -5
  135. package/dist/models/default/django_app/modelwithrestrictedfields.schema.json +2 -2
  136. package/dist/models/default/django_app/nodeleteitem.d.ts +124 -0
  137. package/dist/models/default/django_app/nodeleteitem.js +69 -0
  138. package/dist/models/default/django_app/nodeleteitem.schema.json +105 -0
  139. package/dist/models/default/django_app/objectlevelitem.d.ts +124 -0
  140. package/dist/models/default/django_app/objectlevelitem.js +69 -0
  141. package/dist/models/default/django_app/objectlevelitem.schema.json +105 -0
  142. package/dist/models/default/django_app/order.schema.json +7 -7
  143. package/dist/models/default/django_app/orderitem.schema.json +5 -5
  144. package/dist/models/default/django_app/product.schema.json +11 -11
  145. package/dist/models/default/django_app/productcategory.schema.json +2 -2
  146. package/dist/models/default/django_app/rateplan.schema.json +2 -2
  147. package/dist/models/default/django_app/readonlyitem.d.ts +124 -0
  148. package/dist/models/default/django_app/readonlyitem.js +69 -0
  149. package/dist/models/default/django_app/readonlyitem.schema.json +105 -0
  150. package/dist/models/default/django_app/restrictedcreateitem.d.ts +124 -0
  151. package/dist/models/default/django_app/restrictedcreateitem.js +69 -0
  152. package/dist/models/default/django_app/restrictedcreateitem.schema.json +105 -0
  153. package/dist/models/default/django_app/restrictededititem.d.ts +124 -0
  154. package/dist/models/default/django_app/restrictededititem.js +69 -0
  155. package/dist/models/default/django_app/restrictededititem.schema.json +105 -0
  156. package/dist/models/default/django_app/restrictedfieldrelatedmodel.schema.json +1 -1
  157. package/dist/models/default/django_app/rowfiltereditem.d.ts +124 -0
  158. package/dist/models/default/django_app/rowfiltereditem.js +69 -0
  159. package/dist/models/default/django_app/rowfiltereditem.schema.json +105 -0
  160. package/dist/models/default/django_app/tag.d.ts +554 -0
  161. package/dist/models/default/django_app/tag.js +71 -0
  162. package/dist/models/default/django_app/tag.schema.json +541 -0
  163. package/dist/models/default/django_app/updateonlyitem.d.ts +108 -0
  164. package/dist/models/default/django_app/updateonlyitem.js +69 -0
  165. package/dist/models/default/django_app/updateonlyitem.schema.json +88 -0
  166. package/dist/schemaIntegrity.d.ts +14 -0
  167. package/dist/schemaIntegrity.js +29 -0
  168. package/dist/setup.js +6 -0
  169. package/dist/syncEngine/stores/operationEventHandlers.js +10 -8
  170. package/dist/syncEngine/stores/querysetStore.js +9 -0
  171. package/package.json +1 -1
@@ -87,19 +87,7 @@ export class DeepModelLevel2 {
87
87
  };
88
88
  };
89
89
  default_ordering: null;
90
- definitions: {
91
- MoneyField: {
92
- type: string;
93
- properties: {
94
- amount: {
95
- type: string;
96
- };
97
- currency: {
98
- type: string;
99
- };
100
- };
101
- };
102
- };
90
+ definitions: {};
103
91
  datetime_format: string;
104
92
  date_format: string;
105
93
  time_format: string;
@@ -72,19 +72,7 @@
72
72
  }
73
73
  },
74
74
  "default_ordering": null,
75
- "definitions": {
76
- "MoneyField": {
77
- "type": "object",
78
- "properties": {
79
- "amount": {
80
- "type": "number"
81
- },
82
- "currency": {
83
- "type": "string"
84
- }
85
- }
86
- }
87
- },
75
+ "definitions": {},
88
76
  "datetime_format": "iso-8601",
89
77
  "date_format": "iso-8601",
90
78
  "time_format": "iso-8601",
@@ -64,19 +64,7 @@ export class DeepModelLevel3 {
64
64
  };
65
65
  relationships: {};
66
66
  default_ordering: null;
67
- definitions: {
68
- MoneyField: {
69
- type: string;
70
- properties: {
71
- amount: {
72
- type: string;
73
- };
74
- currency: {
75
- type: string;
76
- };
77
- };
78
- };
79
- };
67
+ definitions: {};
80
68
  datetime_format: string;
81
69
  date_format: string;
82
70
  time_format: string;
@@ -49,19 +49,7 @@
49
49
  },
50
50
  "relationships": {},
51
51
  "default_ordering": null,
52
- "definitions": {
53
- "MoneyField": {
54
- "type": "object",
55
- "properties": {
56
- "amount": {
57
- "type": "number"
58
- },
59
- "currency": {
60
- "type": "string"
61
- }
62
- }
63
- }
64
- },
52
+ "definitions": {},
65
53
  "datetime_format": "iso-8601",
66
54
  "date_format": "iso-8601",
67
55
  "time_format": "iso-8601",
@@ -103,19 +103,7 @@ export class DummyModel {
103
103
  };
104
104
  };
105
105
  default_ordering: null;
106
- definitions: {
107
- MoneyField: {
108
- type: string;
109
- properties: {
110
- amount: {
111
- type: string;
112
- };
113
- currency: {
114
- type: string;
115
- };
116
- };
117
- };
118
- };
106
+ definitions: {};
119
107
  datetime_format: string;
120
108
  date_format: string;
121
109
  time_format: string;
@@ -5,8 +5,8 @@
5
5
  "plural_title": "Dummy Models",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "name",
9
- "value"
8
+ "value",
9
+ "name"
10
10
  ],
11
11
  "searchable_fields": [
12
12
  "name"
@@ -52,7 +52,7 @@
52
52
  "title": "Value",
53
53
  "required": false,
54
54
  "description": null,
55
- "nullable": false,
55
+ "nullable": true,
56
56
  "format": null,
57
57
  "max_length": null,
58
58
  "choices": null,
@@ -89,19 +89,7 @@
89
89
  }
90
90
  },
91
91
  "default_ordering": null,
92
- "definitions": {
93
- "MoneyField": {
94
- "type": "object",
95
- "properties": {
96
- "amount": {
97
- "type": "number"
98
- },
99
- "currency": {
100
- "type": "string"
101
- }
102
- }
103
- }
104
- },
92
+ "definitions": {},
105
93
  "datetime_format": "iso-8601",
106
94
  "date_format": "iso-8601",
107
95
  "time_format": "iso-8601",
@@ -64,19 +64,7 @@ export class DummyRelatedModel {
64
64
  };
65
65
  relationships: {};
66
66
  default_ordering: null;
67
- definitions: {
68
- MoneyField: {
69
- type: string;
70
- properties: {
71
- amount: {
72
- type: string;
73
- };
74
- currency: {
75
- type: string;
76
- };
77
- };
78
- };
79
- };
67
+ definitions: {};
80
68
  datetime_format: string;
81
69
  date_format: string;
82
70
  time_format: string;
@@ -49,19 +49,7 @@
49
49
  },
50
50
  "relationships": {},
51
51
  "default_ordering": null,
52
- "definitions": {
53
- "MoneyField": {
54
- "type": "object",
55
- "properties": {
56
- "amount": {
57
- "type": "number"
58
- },
59
- "currency": {
60
- "type": "string"
61
- }
62
- }
63
- }
64
- },
52
+ "definitions": {},
65
53
  "datetime_format": "iso-8601",
66
54
  "date_format": "iso-8601",
67
55
  "time_format": "iso-8601",
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Model-specific QuerySet implementation
3
+ */
4
+ export class ErrorTestCompoundUniqueQuerySet {
5
+ }
6
+ /**
7
+ * Model-specific Manager implementation
8
+ */
9
+ export class ErrorTestCompoundUniqueManager {
10
+ constructor(ModelClass: any);
11
+ newQuerySet(): ErrorTestCompoundUniqueQuerySet;
12
+ }
13
+ /**
14
+ * Implementation of the ErrorTestCompoundUnique model
15
+ */
16
+ export class ErrorTestCompoundUnique {
17
+ static configKey: string;
18
+ static modelName: string;
19
+ static primaryKeyField: string;
20
+ static objects: ErrorTestCompoundUniqueManager;
21
+ static fields: string[];
22
+ static schema: {
23
+ model_name: string;
24
+ title: string;
25
+ class_name: string;
26
+ plural_title: string;
27
+ primary_key_field: string;
28
+ filterable_fields: string[];
29
+ searchable_fields: string[];
30
+ ordering_fields: string[];
31
+ properties: {
32
+ id: {
33
+ type: string;
34
+ title: string;
35
+ required: boolean;
36
+ description: null;
37
+ nullable: boolean;
38
+ format: string;
39
+ max_length: null;
40
+ choices: null;
41
+ default: null;
42
+ validators: never[];
43
+ max_digits: null;
44
+ decimal_places: null;
45
+ read_only: boolean;
46
+ ref: null;
47
+ };
48
+ group: {
49
+ type: string;
50
+ title: string;
51
+ required: boolean;
52
+ description: null;
53
+ nullable: boolean;
54
+ format: null;
55
+ max_length: number;
56
+ choices: null;
57
+ default: null;
58
+ validators: never[];
59
+ max_digits: null;
60
+ decimal_places: null;
61
+ read_only: boolean;
62
+ ref: null;
63
+ };
64
+ rank: {
65
+ type: string;
66
+ title: string;
67
+ required: boolean;
68
+ description: null;
69
+ nullable: boolean;
70
+ format: null;
71
+ max_length: null;
72
+ choices: null;
73
+ default: null;
74
+ validators: never[];
75
+ max_digits: null;
76
+ decimal_places: null;
77
+ read_only: boolean;
78
+ ref: null;
79
+ };
80
+ label: {
81
+ type: string;
82
+ title: string;
83
+ required: boolean;
84
+ description: null;
85
+ nullable: boolean;
86
+ format: null;
87
+ max_length: number;
88
+ choices: null;
89
+ default: string;
90
+ validators: never[];
91
+ max_digits: null;
92
+ decimal_places: null;
93
+ read_only: boolean;
94
+ ref: null;
95
+ };
96
+ };
97
+ relationships: {};
98
+ default_ordering: null;
99
+ definitions: {
100
+ MoneyField: {
101
+ type: string;
102
+ properties: {
103
+ amount: {
104
+ type: string;
105
+ };
106
+ currency: {
107
+ type: string;
108
+ };
109
+ };
110
+ };
111
+ };
112
+ datetime_format: string;
113
+ date_format: string;
114
+ time_format: string;
115
+ display: null;
116
+ };
117
+ static relationshipFields: Map<any, any>;
118
+ constructor(data: any);
119
+ /**
120
+ * Define property getters and setters for all model fields
121
+ * @private
122
+ */
123
+ private _defineProperties;
124
+ }
@@ -0,0 +1,69 @@
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 './errortestcompoundunique.schema.json';
7
+ /**
8
+ * Model-specific QuerySet implementation
9
+ */
10
+ export class ErrorTestCompoundUniqueQuerySet extends QuerySet {
11
+ }
12
+ /**
13
+ * Model-specific Manager implementation
14
+ */
15
+ export class ErrorTestCompoundUniqueManager extends Manager {
16
+ constructor(ModelClass) {
17
+ super(ModelClass, ErrorTestCompoundUniqueQuerySet);
18
+ }
19
+ newQuerySet() {
20
+ return new ErrorTestCompoundUniqueQuerySet(this.ModelClass);
21
+ }
22
+ }
23
+ /**
24
+ * Implementation of the ErrorTestCompoundUnique model
25
+ */
26
+ export class ErrorTestCompoundUnique extends Model {
27
+ constructor(data) {
28
+ ErrorTestCompoundUnique.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
+ ErrorTestCompoundUnique.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
+ ErrorTestCompoundUnique.configKey = 'default';
64
+ ErrorTestCompoundUnique.modelName = 'django_app.errortestcompoundunique';
65
+ ErrorTestCompoundUnique.primaryKeyField = 'id';
66
+ ErrorTestCompoundUnique.objects = new ErrorTestCompoundUniqueManager(ErrorTestCompoundUnique);
67
+ ErrorTestCompoundUnique.fields = ['id', 'group', 'rank', 'label'];
68
+ ErrorTestCompoundUnique.schema = schemaData;
69
+ ErrorTestCompoundUnique.relationshipFields = new Map([]);
@@ -0,0 +1,106 @@
1
+ {
2
+ "model_name": "django_app.errortestcompoundunique",
3
+ "title": "Error Test Compound Unique",
4
+ "class_name": "ErrorTestCompoundUnique",
5
+ "plural_title": "Error Test Compound Uniques",
6
+ "primary_key_field": "id",
7
+ "filterable_fields": [
8
+ "label",
9
+ "id",
10
+ "group",
11
+ "rank"
12
+ ],
13
+ "searchable_fields": [
14
+ "label",
15
+ "group"
16
+ ],
17
+ "ordering_fields": [
18
+ "group",
19
+ "rank"
20
+ ],
21
+ "properties": {
22
+ "id": {
23
+ "type": "integer",
24
+ "title": "Id",
25
+ "required": true,
26
+ "description": null,
27
+ "nullable": false,
28
+ "format": "id",
29
+ "max_length": null,
30
+ "choices": null,
31
+ "default": null,
32
+ "validators": [],
33
+ "max_digits": null,
34
+ "decimal_places": null,
35
+ "read_only": true,
36
+ "ref": null
37
+ },
38
+ "group": {
39
+ "type": "string",
40
+ "title": "Group",
41
+ "required": true,
42
+ "description": null,
43
+ "nullable": false,
44
+ "format": null,
45
+ "max_length": 50,
46
+ "choices": null,
47
+ "default": null,
48
+ "validators": [],
49
+ "max_digits": null,
50
+ "decimal_places": null,
51
+ "read_only": false,
52
+ "ref": null
53
+ },
54
+ "rank": {
55
+ "type": "integer",
56
+ "title": "Rank",
57
+ "required": true,
58
+ "description": null,
59
+ "nullable": false,
60
+ "format": null,
61
+ "max_length": null,
62
+ "choices": null,
63
+ "default": null,
64
+ "validators": [],
65
+ "max_digits": null,
66
+ "decimal_places": null,
67
+ "read_only": false,
68
+ "ref": null
69
+ },
70
+ "label": {
71
+ "type": "string",
72
+ "title": "Label",
73
+ "required": false,
74
+ "description": null,
75
+ "nullable": false,
76
+ "format": null,
77
+ "max_length": 100,
78
+ "choices": null,
79
+ "default": "",
80
+ "validators": [],
81
+ "max_digits": null,
82
+ "decimal_places": null,
83
+ "read_only": false,
84
+ "ref": null
85
+ }
86
+ },
87
+ "relationships": {},
88
+ "default_ordering": null,
89
+ "definitions": {
90
+ "MoneyField": {
91
+ "type": "object",
92
+ "properties": {
93
+ "amount": {
94
+ "type": "number"
95
+ },
96
+ "currency": {
97
+ "type": "string"
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "datetime_format": "iso-8601",
103
+ "date_format": "iso-8601",
104
+ "time_format": "iso-8601",
105
+ "display": null
106
+ }
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Model-specific QuerySet implementation
3
+ */
4
+ export class ErrorTestOneToOneModelQuerySet {
5
+ }
6
+ /**
7
+ * Model-specific Manager implementation
8
+ */
9
+ export class ErrorTestOneToOneModelManager {
10
+ constructor(ModelClass: any);
11
+ newQuerySet(): ErrorTestOneToOneModelQuerySet;
12
+ }
13
+ /**
14
+ * Implementation of the ErrorTestOneToOneModel model
15
+ */
16
+ export class ErrorTestOneToOneModel {
17
+ static configKey: string;
18
+ static modelName: string;
19
+ static primaryKeyField: string;
20
+ static objects: ErrorTestOneToOneModelManager;
21
+ static fields: string[];
22
+ static schema: {
23
+ model_name: string;
24
+ title: string;
25
+ class_name: string;
26
+ plural_title: string;
27
+ primary_key_field: string;
28
+ filterable_fields: string[];
29
+ searchable_fields: never[];
30
+ ordering_fields: never[];
31
+ properties: {
32
+ id: {
33
+ type: string;
34
+ title: string;
35
+ required: boolean;
36
+ description: null;
37
+ nullable: boolean;
38
+ format: string;
39
+ max_length: null;
40
+ choices: null;
41
+ default: null;
42
+ validators: never[];
43
+ max_digits: null;
44
+ decimal_places: null;
45
+ read_only: boolean;
46
+ ref: null;
47
+ };
48
+ parent: {
49
+ type: string;
50
+ title: string;
51
+ required: boolean;
52
+ description: null;
53
+ nullable: boolean;
54
+ format: string;
55
+ max_length: null;
56
+ choices: null;
57
+ default: null;
58
+ validators: never[];
59
+ max_digits: null;
60
+ decimal_places: null;
61
+ read_only: boolean;
62
+ ref: null;
63
+ };
64
+ note: {
65
+ type: string;
66
+ title: string;
67
+ required: boolean;
68
+ description: null;
69
+ nullable: boolean;
70
+ format: null;
71
+ max_length: number;
72
+ choices: null;
73
+ default: string;
74
+ validators: never[];
75
+ max_digits: null;
76
+ decimal_places: null;
77
+ read_only: boolean;
78
+ ref: null;
79
+ };
80
+ };
81
+ relationships: {
82
+ parent: {
83
+ type: string;
84
+ model: string;
85
+ class_name: string;
86
+ primary_key_field: string;
87
+ };
88
+ };
89
+ default_ordering: null;
90
+ definitions: {
91
+ MoneyField: {
92
+ type: string;
93
+ properties: {
94
+ amount: {
95
+ type: string;
96
+ };
97
+ currency: {
98
+ type: string;
99
+ };
100
+ };
101
+ };
102
+ };
103
+ datetime_format: string;
104
+ date_format: string;
105
+ time_format: string;
106
+ display: null;
107
+ };
108
+ static relationshipFields: Map<string, {
109
+ ModelClass: () => any;
110
+ relationshipType: string;
111
+ }>;
112
+ constructor(data: any);
113
+ /**
114
+ * Define property getters and setters for all model fields
115
+ * @private
116
+ */
117
+ private _defineProperties;
118
+ }
@@ -0,0 +1,71 @@
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 './errortestonetoonemodel.schema.json';
7
+ /**
8
+ * Model-specific QuerySet implementation
9
+ */
10
+ export class ErrorTestOneToOneModelQuerySet extends QuerySet {
11
+ }
12
+ /**
13
+ * Model-specific Manager implementation
14
+ */
15
+ export class ErrorTestOneToOneModelManager extends Manager {
16
+ constructor(ModelClass) {
17
+ super(ModelClass, ErrorTestOneToOneModelQuerySet);
18
+ }
19
+ newQuerySet() {
20
+ return new ErrorTestOneToOneModelQuerySet(this.ModelClass);
21
+ }
22
+ }
23
+ /**
24
+ * Implementation of the ErrorTestOneToOneModel model
25
+ */
26
+ export class ErrorTestOneToOneModel extends Model {
27
+ constructor(data) {
28
+ ErrorTestOneToOneModel.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
+ ErrorTestOneToOneModel.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
+ ErrorTestOneToOneModel.configKey = 'default';
64
+ ErrorTestOneToOneModel.modelName = 'django_app.errortestonetoonemodel';
65
+ ErrorTestOneToOneModel.primaryKeyField = 'id';
66
+ ErrorTestOneToOneModel.objects = new ErrorTestOneToOneModelManager(ErrorTestOneToOneModel);
67
+ ErrorTestOneToOneModel.fields = ['id', 'parent', 'note'];
68
+ ErrorTestOneToOneModel.schema = schemaData;
69
+ ErrorTestOneToOneModel.relationshipFields = new Map([
70
+ ['parent', { 'ModelClass': () => getModelClass('django_app.errortestparent', 'default'), 'relationshipType': 'foreign-key' }]
71
+ ]);