@statezero/core 0.2.21 → 0.2.23

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 (173) hide show
  1. package/dist/actions/backend1/django_app/calculate-hash.d.ts +57 -0
  2. package/dist/actions/backend1/django_app/calculate-hash.js +80 -0
  3. package/dist/actions/backend1/django_app/calculate-hash.schema.json +148 -0
  4. package/dist/actions/backend1/django_app/get-current-username.d.ts +29 -0
  5. package/dist/actions/backend1/django_app/get-current-username.js +65 -0
  6. package/dist/actions/backend1/django_app/get-current-username.schema.json +47 -0
  7. package/dist/actions/backend1/django_app/get-server-status.d.ts +38 -0
  8. package/dist/actions/backend1/django_app/get-server-status.js +68 -0
  9. package/dist/actions/backend1/django_app/get-server-status.schema.json +93 -0
  10. package/dist/actions/backend1/django_app/get-user-info.d.ts +44 -0
  11. package/dist/actions/backend1/django_app/get-user-info.js +70 -0
  12. package/dist/actions/backend1/django_app/get-user-info.schema.json +127 -0
  13. package/dist/actions/backend1/django_app/index.d.ts +1 -0
  14. package/dist/actions/backend1/django_app/index.js +6 -0
  15. package/dist/actions/backend1/django_app/process-data.d.ts +51 -0
  16. package/dist/actions/backend1/django_app/process-data.js +78 -0
  17. package/dist/actions/backend1/django_app/process-data.schema.json +117 -0
  18. package/dist/actions/backend1/django_app/send-notification.d.ts +55 -0
  19. package/dist/actions/backend1/django_app/send-notification.js +81 -0
  20. package/dist/actions/backend1/django_app/send-notification.schema.json +175 -0
  21. package/dist/actions/backend1/index.d.ts +1 -0
  22. package/dist/actions/backend1/index.js +1 -0
  23. package/dist/actions/default/django_app/calculate-hash.d.ts +57 -0
  24. package/dist/actions/default/django_app/calculate-hash.js +80 -0
  25. package/dist/actions/default/django_app/calculate-hash.schema.json +148 -0
  26. package/dist/actions/default/django_app/get-current-username.d.ts +29 -0
  27. package/dist/actions/default/django_app/get-current-username.js +65 -0
  28. package/dist/actions/default/django_app/get-current-username.schema.json +47 -0
  29. package/dist/actions/default/django_app/get-server-status.d.ts +38 -0
  30. package/dist/actions/default/django_app/get-server-status.js +68 -0
  31. package/dist/actions/default/django_app/get-server-status.schema.json +93 -0
  32. package/dist/actions/default/django_app/get-user-info.d.ts +44 -0
  33. package/dist/actions/default/django_app/get-user-info.js +70 -0
  34. package/dist/actions/default/django_app/get-user-info.schema.json +127 -0
  35. package/dist/actions/default/django_app/index.d.ts +1 -0
  36. package/dist/actions/default/django_app/index.js +6 -0
  37. package/dist/actions/default/django_app/process-data.d.ts +51 -0
  38. package/dist/actions/default/django_app/process-data.js +78 -0
  39. package/dist/actions/default/django_app/process-data.schema.json +117 -0
  40. package/dist/actions/default/django_app/send-notification.d.ts +55 -0
  41. package/dist/actions/default/django_app/send-notification.js +81 -0
  42. package/dist/actions/default/django_app/send-notification.schema.json +175 -0
  43. package/dist/actions/default/index.d.ts +1 -0
  44. package/dist/actions/default/index.js +1 -0
  45. package/dist/actions/index.d.ts +1 -0
  46. package/dist/actions/index.js +5 -0
  47. package/dist/flavours/django/dates.js +4 -1
  48. package/dist/flavours/django/querySet.js +0 -1
  49. package/dist/flavours/django/serializers.js +8 -4
  50. package/dist/models/backend1/django_app/comprehensivemodel.d.ts +894 -0
  51. package/dist/models/backend1/django_app/comprehensivemodel.js +71 -0
  52. package/dist/models/backend1/django_app/comprehensivemodel.schema.json +870 -0
  53. package/dist/models/backend1/django_app/custompkmodel.d.ts +92 -0
  54. package/dist/models/backend1/django_app/custompkmodel.js +69 -0
  55. package/dist/models/backend1/django_app/custompkmodel.schema.json +71 -0
  56. package/dist/models/backend1/django_app/dailyrate.d.ts +230 -0
  57. package/dist/models/backend1/django_app/dailyrate.js +71 -0
  58. package/dist/models/backend1/django_app/dailyrate.schema.json +212 -0
  59. package/dist/models/backend1/django_app/deepmodellevel1.d.ts +140 -0
  60. package/dist/models/backend1/django_app/deepmodellevel1.js +72 -0
  61. package/dist/models/backend1/django_app/deepmodellevel1.schema.json +114 -0
  62. package/dist/models/backend1/django_app/deepmodellevel2.d.ts +118 -0
  63. package/dist/models/backend1/django_app/deepmodellevel2.js +71 -0
  64. package/dist/models/backend1/django_app/deepmodellevel2.schema.json +92 -0
  65. package/dist/models/backend1/django_app/deepmodellevel3.d.ts +92 -0
  66. package/dist/models/backend1/django_app/deepmodellevel3.js +69 -0
  67. package/dist/models/backend1/django_app/deepmodellevel3.schema.json +69 -0
  68. package/dist/models/backend1/django_app/dummymodel.d.ts +134 -0
  69. package/dist/models/backend1/django_app/dummymodel.js +71 -0
  70. package/dist/models/backend1/django_app/dummymodel.schema.json +109 -0
  71. package/dist/models/backend1/django_app/dummyrelatedmodel.d.ts +92 -0
  72. package/dist/models/backend1/django_app/dummyrelatedmodel.js +69 -0
  73. package/dist/models/backend1/django_app/dummyrelatedmodel.schema.json +69 -0
  74. package/dist/models/backend1/django_app/filetest.d.ts +140 -0
  75. package/dist/models/backend1/django_app/filetest.js +69 -0
  76. package/dist/models/backend1/django_app/filetest.schema.json +111 -0
  77. package/dist/models/backend1/django_app/index.d.ts +1 -0
  78. package/dist/models/backend1/django_app/index.js +18 -0
  79. package/dist/models/backend1/django_app/modelwithcustompkrelation.d.ts +118 -0
  80. package/dist/models/backend1/django_app/modelwithcustompkrelation.js +71 -0
  81. package/dist/models/backend1/django_app/modelwithcustompkrelation.schema.json +93 -0
  82. package/dist/models/backend1/django_app/modelwithrestrictedfields.d.ts +134 -0
  83. package/dist/models/backend1/django_app/modelwithrestrictedfields.js +71 -0
  84. package/dist/models/backend1/django_app/modelwithrestrictedfields.schema.json +111 -0
  85. package/dist/models/backend1/django_app/namefiltercustompkmodel.d.ts +92 -0
  86. package/dist/models/backend1/django_app/namefiltercustompkmodel.js +69 -0
  87. package/dist/models/backend1/django_app/namefiltercustompkmodel.schema.json +71 -0
  88. package/dist/models/backend1/django_app/order.d.ts +220 -0
  89. package/dist/models/backend1/django_app/order.js +71 -0
  90. package/dist/models/backend1/django_app/order.schema.json +203 -0
  91. package/dist/models/backend1/django_app/orderitem.d.ts +172 -0
  92. package/dist/models/backend1/django_app/orderitem.js +72 -0
  93. package/dist/models/backend1/django_app/orderitem.schema.json +149 -0
  94. package/dist/models/backend1/django_app/product.d.ts +254 -0
  95. package/dist/models/backend1/django_app/product.js +71 -0
  96. package/dist/models/backend1/django_app/product.schema.json +277 -0
  97. package/dist/models/backend1/django_app/productcategory.d.ts +92 -0
  98. package/dist/models/backend1/django_app/productcategory.js +69 -0
  99. package/dist/models/backend1/django_app/productcategory.schema.json +70 -0
  100. package/dist/models/backend1/django_app/rateplan.d.ts +92 -0
  101. package/dist/models/backend1/django_app/rateplan.js +69 -0
  102. package/dist/models/backend1/django_app/rateplan.schema.json +70 -0
  103. package/dist/models/backend1/django_app/restrictedfieldrelatedmodel.d.ts +108 -0
  104. package/dist/models/backend1/django_app/restrictedfieldrelatedmodel.js +69 -0
  105. package/dist/models/backend1/django_app/restrictedfieldrelatedmodel.schema.json +87 -0
  106. package/dist/models/backend1/fileobject.d.ts +4 -0
  107. package/dist/models/backend1/fileobject.js +9 -0
  108. package/dist/models/backend1/index.d.ts +2 -0
  109. package/dist/models/backend1/index.js +2 -0
  110. package/dist/models/default/django_app/comprehensivemodel.d.ts +894 -0
  111. package/dist/models/default/django_app/comprehensivemodel.js +71 -0
  112. package/dist/models/default/django_app/comprehensivemodel.schema.json +870 -0
  113. package/dist/models/default/django_app/custompkmodel.d.ts +92 -0
  114. package/dist/models/default/django_app/custompkmodel.js +69 -0
  115. package/dist/models/default/django_app/custompkmodel.schema.json +71 -0
  116. package/dist/models/default/django_app/dailyrate.d.ts +230 -0
  117. package/dist/models/default/django_app/dailyrate.js +71 -0
  118. package/dist/models/default/django_app/dailyrate.schema.json +212 -0
  119. package/dist/models/default/django_app/deepmodellevel1.d.ts +128 -0
  120. package/dist/models/default/django_app/deepmodellevel1.js +72 -0
  121. package/dist/models/default/django_app/deepmodellevel1.schema.json +102 -0
  122. package/dist/models/default/django_app/deepmodellevel2.d.ts +106 -0
  123. package/dist/models/default/django_app/deepmodellevel2.js +71 -0
  124. package/dist/models/default/django_app/deepmodellevel2.schema.json +80 -0
  125. package/dist/models/default/django_app/deepmodellevel3.d.ts +80 -0
  126. package/dist/models/default/django_app/deepmodellevel3.js +69 -0
  127. package/dist/models/default/django_app/deepmodellevel3.schema.json +57 -0
  128. package/dist/models/default/django_app/dummymodel.d.ts +122 -0
  129. package/dist/models/default/django_app/dummymodel.js +71 -0
  130. package/dist/models/default/django_app/dummymodel.schema.json +97 -0
  131. package/dist/models/default/django_app/dummyrelatedmodel.d.ts +80 -0
  132. package/dist/models/default/django_app/dummyrelatedmodel.js +69 -0
  133. package/dist/models/default/django_app/dummyrelatedmodel.schema.json +57 -0
  134. package/dist/models/default/django_app/filetest.d.ts +128 -0
  135. package/dist/models/default/django_app/filetest.js +69 -0
  136. package/dist/models/default/django_app/filetest.schema.json +99 -0
  137. package/dist/models/default/django_app/index.d.ts +1 -0
  138. package/dist/models/default/django_app/index.js +18 -0
  139. package/dist/models/default/django_app/modelwithcustompkrelation.d.ts +118 -0
  140. package/dist/models/default/django_app/modelwithcustompkrelation.js +71 -0
  141. package/dist/models/default/django_app/modelwithcustompkrelation.schema.json +93 -0
  142. package/dist/models/default/django_app/modelwithrestrictedfields.d.ts +134 -0
  143. package/dist/models/default/django_app/modelwithrestrictedfields.js +71 -0
  144. package/dist/models/default/django_app/modelwithrestrictedfields.schema.json +111 -0
  145. package/dist/models/default/django_app/namefiltercustompkmodel.d.ts +92 -0
  146. package/dist/models/default/django_app/namefiltercustompkmodel.js +69 -0
  147. package/dist/models/default/django_app/namefiltercustompkmodel.schema.json +71 -0
  148. package/dist/models/default/django_app/order.d.ts +220 -0
  149. package/dist/models/default/django_app/order.js +71 -0
  150. package/dist/models/default/django_app/order.schema.json +203 -0
  151. package/dist/models/default/django_app/orderitem.d.ts +172 -0
  152. package/dist/models/default/django_app/orderitem.js +72 -0
  153. package/dist/models/default/django_app/orderitem.schema.json +149 -0
  154. package/dist/models/default/django_app/product.d.ts +254 -0
  155. package/dist/models/default/django_app/product.js +71 -0
  156. package/dist/models/default/django_app/product.schema.json +277 -0
  157. package/dist/models/default/django_app/productcategory.d.ts +92 -0
  158. package/dist/models/default/django_app/productcategory.js +69 -0
  159. package/dist/models/default/django_app/productcategory.schema.json +70 -0
  160. package/dist/models/default/django_app/rateplan.d.ts +92 -0
  161. package/dist/models/default/django_app/rateplan.js +69 -0
  162. package/dist/models/default/django_app/rateplan.schema.json +70 -0
  163. package/dist/models/default/django_app/restrictedfieldrelatedmodel.d.ts +108 -0
  164. package/dist/models/default/django_app/restrictedfieldrelatedmodel.js +69 -0
  165. package/dist/models/default/django_app/restrictedfieldrelatedmodel.schema.json +87 -0
  166. package/dist/models/default/fileobject.d.ts +4 -0
  167. package/dist/models/default/fileobject.js +9 -0
  168. package/dist/models/default/index.d.ts +2 -0
  169. package/dist/models/default/index.js +2 -0
  170. package/dist/models/index.d.ts +1 -0
  171. package/dist/models/index.js +5 -0
  172. package/dist/syncEngine/cache/cache.js +15 -1
  173. package/package.json +1 -1
@@ -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 './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
+ // 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
+ Product.configKey = 'backend1';
64
+ Product.modelName = 'django_app.product';
65
+ Product.primaryKeyField = 'id';
66
+ Product.objects = new ProductManager(Product);
67
+ Product.fields = ['id', 'name', 'description', 'price', 'category', 'in_stock', 'created_at', 'created_by', 'price_with_tax', 'display_name'];
68
+ Product.schema = schemaData;
69
+ Product.relationshipFields = new Map([
70
+ ['category', { 'ModelClass': () => getModelClass('django_app.productcategory', 'backend1'), 'relationshipType': 'foreign-key' }]
71
+ ]);
@@ -0,0 +1,277 @@
1
+ {
2
+ "model_name": "django_app.product",
3
+ "title": "Product",
4
+ "class_name": "Product",
5
+ "plural_title": "Products",
6
+ "primary_key_field": "id",
7
+ "filterable_fields": [
8
+ "created_at",
9
+ "price",
10
+ "name",
11
+ "in_stock",
12
+ "category",
13
+ "description",
14
+ "id",
15
+ "created_by"
16
+ ],
17
+ "searchable_fields": [
18
+ "description",
19
+ "name"
20
+ ],
21
+ "ordering_fields": [
22
+ "created_at",
23
+ "price",
24
+ "name"
25
+ ],
26
+ "properties": {
27
+ "id": {
28
+ "type": "integer",
29
+ "title": "Id",
30
+ "required": true,
31
+ "description": null,
32
+ "nullable": false,
33
+ "format": "id",
34
+ "max_length": null,
35
+ "choices": null,
36
+ "default": null,
37
+ "validators": [],
38
+ "max_digits": null,
39
+ "decimal_places": null,
40
+ "read_only": true,
41
+ "ref": null
42
+ },
43
+ "name": {
44
+ "type": "string",
45
+ "title": "Name",
46
+ "required": true,
47
+ "description": null,
48
+ "nullable": false,
49
+ "format": null,
50
+ "max_length": 100,
51
+ "choices": null,
52
+ "default": null,
53
+ "validators": [],
54
+ "max_digits": null,
55
+ "decimal_places": null,
56
+ "read_only": false,
57
+ "ref": null
58
+ },
59
+ "description": {
60
+ "type": "string",
61
+ "title": "Description",
62
+ "required": true,
63
+ "description": null,
64
+ "nullable": false,
65
+ "format": "text",
66
+ "max_length": null,
67
+ "choices": null,
68
+ "default": null,
69
+ "validators": [],
70
+ "max_digits": null,
71
+ "decimal_places": null,
72
+ "read_only": false,
73
+ "ref": null
74
+ },
75
+ "price": {
76
+ "type": "number",
77
+ "title": "Price",
78
+ "required": true,
79
+ "description": null,
80
+ "nullable": false,
81
+ "format": "decimal",
82
+ "max_length": null,
83
+ "choices": null,
84
+ "default": null,
85
+ "validators": [],
86
+ "max_digits": 10,
87
+ "decimal_places": 2,
88
+ "read_only": false,
89
+ "ref": null
90
+ },
91
+ "category": {
92
+ "type": "integer",
93
+ "title": "Category",
94
+ "required": true,
95
+ "description": null,
96
+ "nullable": false,
97
+ "format": "foreign-key",
98
+ "max_length": null,
99
+ "choices": null,
100
+ "default": null,
101
+ "validators": [],
102
+ "max_digits": null,
103
+ "decimal_places": null,
104
+ "read_only": false,
105
+ "ref": null
106
+ },
107
+ "in_stock": {
108
+ "type": "boolean",
109
+ "title": "In stock",
110
+ "required": false,
111
+ "description": null,
112
+ "nullable": false,
113
+ "format": null,
114
+ "max_length": null,
115
+ "choices": null,
116
+ "default": true,
117
+ "validators": [],
118
+ "max_digits": null,
119
+ "decimal_places": null,
120
+ "read_only": false,
121
+ "ref": null
122
+ },
123
+ "created_at": {
124
+ "type": "string",
125
+ "title": "Created at",
126
+ "required": false,
127
+ "description": null,
128
+ "nullable": false,
129
+ "format": "date-time",
130
+ "max_length": null,
131
+ "choices": null,
132
+ "default": "2026-01-18T14:21:49.542775+00:00",
133
+ "validators": [],
134
+ "max_digits": null,
135
+ "decimal_places": null,
136
+ "read_only": false,
137
+ "ref": null
138
+ },
139
+ "created_by": {
140
+ "type": "string",
141
+ "title": "Created by",
142
+ "required": false,
143
+ "description": null,
144
+ "nullable": true,
145
+ "format": null,
146
+ "max_length": 100,
147
+ "choices": null,
148
+ "default": null,
149
+ "validators": [],
150
+ "max_digits": null,
151
+ "decimal_places": null,
152
+ "read_only": false,
153
+ "ref": null
154
+ },
155
+ "price_with_tax": {
156
+ "type": "number",
157
+ "title": "Price (incl. tax)",
158
+ "required": true,
159
+ "description": null,
160
+ "nullable": false,
161
+ "format": "decimal",
162
+ "max_length": null,
163
+ "choices": null,
164
+ "default": null,
165
+ "validators": [],
166
+ "max_digits": 10,
167
+ "decimal_places": 2,
168
+ "read_only": true,
169
+ "ref": null
170
+ },
171
+ "display_name": {
172
+ "type": "string",
173
+ "title": "Display Name",
174
+ "required": true,
175
+ "description": null,
176
+ "nullable": false,
177
+ "format": null,
178
+ "max_length": 150,
179
+ "choices": null,
180
+ "default": null,
181
+ "validators": [],
182
+ "max_digits": null,
183
+ "decimal_places": null,
184
+ "read_only": true,
185
+ "ref": null
186
+ }
187
+ },
188
+ "relationships": {
189
+ "category": {
190
+ "type": "foreign-key",
191
+ "model": "django_app.productcategory",
192
+ "class_name": "ProductCategory",
193
+ "primary_key_field": "id"
194
+ }
195
+ },
196
+ "default_ordering": null,
197
+ "definitions": {
198
+ "MoneyField": {
199
+ "type": "object",
200
+ "properties": {
201
+ "amount": {
202
+ "type": "number"
203
+ },
204
+ "currency": {
205
+ "type": "string"
206
+ }
207
+ }
208
+ }
209
+ },
210
+ "datetime_format": "iso-8601",
211
+ "date_format": "iso-8601",
212
+ "time_format": "iso-8601",
213
+ "display": {
214
+ "display_title": "Product Management",
215
+ "display_description": "Create and manage products in your catalog",
216
+ "field_groups": [
217
+ {
218
+ "display_title": "Basic Information",
219
+ "display_description": "Essential product details",
220
+ "field_names": [
221
+ "name",
222
+ "description",
223
+ "category"
224
+ ]
225
+ },
226
+ {
227
+ "display_title": "Pricing & Availability",
228
+ "display_description": "Product pricing and stock information",
229
+ "field_names": [
230
+ "price",
231
+ "in_stock"
232
+ ]
233
+ },
234
+ {
235
+ "display_title": "Metadata",
236
+ "display_description": "System information",
237
+ "field_names": [
238
+ "created_at",
239
+ "created_by"
240
+ ]
241
+ }
242
+ ],
243
+ "field_display_configs": [
244
+ {
245
+ "field_name": "description",
246
+ "display_component": "RichTextEditor",
247
+ "filter_queryset": null,
248
+ "display_help_text": "Provide a detailed description of the product",
249
+ "extra": null
250
+ },
251
+ {
252
+ "field_name": "category",
253
+ "display_component": "CategorySelector",
254
+ "filter_queryset": {
255
+ "name__icontains": ""
256
+ },
257
+ "display_help_text": "Select the product category",
258
+ "extra": null
259
+ },
260
+ {
261
+ "field_name": "price",
262
+ "display_component": "CurrencyInput",
263
+ "filter_queryset": null,
264
+ "display_help_text": "Enter the product price (tax will be calculated automatically)",
265
+ "extra": null
266
+ },
267
+ {
268
+ "field_name": "in_stock",
269
+ "display_component": "StockToggle",
270
+ "filter_queryset": null,
271
+ "display_help_text": "Toggle product availability",
272
+ "extra": null
273
+ }
274
+ ],
275
+ "extra": null
276
+ }
277
+ }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Model-specific QuerySet implementation
3
+ */
4
+ export class ProductCategoryQuerySet {
5
+ }
6
+ /**
7
+ * Model-specific Manager implementation
8
+ */
9
+ export class ProductCategoryManager {
10
+ constructor(ModelClass: any);
11
+ newQuerySet(): ProductCategoryQuerySet;
12
+ }
13
+ /**
14
+ * Implementation of the ProductCategory model
15
+ */
16
+ export class ProductCategory {
17
+ static configKey: string;
18
+ static modelName: string;
19
+ static primaryKeyField: string;
20
+ static objects: ProductCategoryManager;
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
+ name: {
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
+ };
65
+ relationships: {};
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
+ };
80
+ datetime_format: string;
81
+ date_format: string;
82
+ time_format: string;
83
+ display: null;
84
+ };
85
+ static relationshipFields: Map<any, any>;
86
+ constructor(data: any);
87
+ /**
88
+ * Define property getters and setters for all model fields
89
+ * @private
90
+ */
91
+ private _defineProperties;
92
+ }
@@ -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 './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
+ // 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
+ ProductCategory.configKey = 'backend1';
64
+ ProductCategory.modelName = 'django_app.productcategory';
65
+ ProductCategory.primaryKeyField = 'id';
66
+ ProductCategory.objects = new ProductCategoryManager(ProductCategory);
67
+ ProductCategory.fields = ['id', 'name'];
68
+ ProductCategory.schema = schemaData;
69
+ ProductCategory.relationshipFields = new Map([]);
@@ -0,0 +1,70 @@
1
+ {
2
+ "model_name": "django_app.productcategory",
3
+ "title": "Product Category",
4
+ "class_name": "ProductCategory",
5
+ "plural_title": "Product Categorys",
6
+ "primary_key_field": "id",
7
+ "filterable_fields": [
8
+ "id",
9
+ "name"
10
+ ],
11
+ "searchable_fields": [
12
+ "name"
13
+ ],
14
+ "ordering_fields": [
15
+ "name"
16
+ ],
17
+ "properties": {
18
+ "id": {
19
+ "type": "integer",
20
+ "title": "Id",
21
+ "required": true,
22
+ "description": null,
23
+ "nullable": false,
24
+ "format": "id",
25
+ "max_length": null,
26
+ "choices": null,
27
+ "default": null,
28
+ "validators": [],
29
+ "max_digits": null,
30
+ "decimal_places": null,
31
+ "read_only": true,
32
+ "ref": null
33
+ },
34
+ "name": {
35
+ "type": "string",
36
+ "title": "Name",
37
+ "required": true,
38
+ "description": null,
39
+ "nullable": false,
40
+ "format": null,
41
+ "max_length": 100,
42
+ "choices": null,
43
+ "default": null,
44
+ "validators": [],
45
+ "max_digits": null,
46
+ "decimal_places": null,
47
+ "read_only": false,
48
+ "ref": null
49
+ }
50
+ },
51
+ "relationships": {},
52
+ "default_ordering": null,
53
+ "definitions": {
54
+ "MoneyField": {
55
+ "type": "object",
56
+ "properties": {
57
+ "amount": {
58
+ "type": "number"
59
+ },
60
+ "currency": {
61
+ "type": "string"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "datetime_format": "iso-8601",
67
+ "date_format": "iso-8601",
68
+ "time_format": "iso-8601",
69
+ "display": null
70
+ }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Model-specific QuerySet implementation
3
+ */
4
+ export class RatePlanQuerySet {
5
+ }
6
+ /**
7
+ * Model-specific Manager implementation
8
+ */
9
+ export class RatePlanManager {
10
+ constructor(ModelClass: any);
11
+ newQuerySet(): RatePlanQuerySet;
12
+ }
13
+ /**
14
+ * Implementation of the RatePlan model
15
+ */
16
+ export class RatePlan {
17
+ static configKey: string;
18
+ static modelName: string;
19
+ static primaryKeyField: string;
20
+ static objects: RatePlanManager;
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
+ name: {
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
+ };
65
+ relationships: {};
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
+ };
80
+ datetime_format: string;
81
+ date_format: string;
82
+ time_format: string;
83
+ display: null;
84
+ };
85
+ static relationshipFields: Map<any, any>;
86
+ constructor(data: any);
87
+ /**
88
+ * Define property getters and setters for all model fields
89
+ * @private
90
+ */
91
+ private _defineProperties;
92
+ }