@statezero/core 0.2.48 → 0.2.50

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 (74) hide show
  1. package/dist/actions/backend1/core/get-current-user.d.ts +15 -0
  2. package/dist/actions/backend1/core/get-current-user.js +51 -0
  3. package/dist/actions/backend1/core/index.d.ts +1 -0
  4. package/dist/actions/backend1/core/index.js +1 -0
  5. package/dist/actions/backend1/django_app/auto-create-ticket.d.ts +66 -0
  6. package/dist/actions/backend1/django_app/auto-create-ticket.js +99 -0
  7. package/dist/actions/backend1/django_app/auto-create-ticket.schema.json +156 -0
  8. package/dist/actions/backend1/django_app/auto-update-profile.d.ts +39 -0
  9. package/dist/actions/backend1/django_app/auto-update-profile.js +78 -0
  10. package/dist/actions/backend1/django_app/auto-update-profile.schema.json +47 -0
  11. package/dist/actions/backend1/django_app/get-user-info.d.ts +2 -2
  12. package/dist/actions/backend1/django_app/index.js +2 -0
  13. package/dist/actions/backend1/django_app/send-notification.schema.json +1 -0
  14. package/dist/actions/backend1/index.d.ts +1 -0
  15. package/dist/actions/backend1/index.js +1 -0
  16. package/dist/actions/default/core/get-current-user.d.ts +15 -0
  17. package/dist/actions/default/core/get-current-user.js +51 -0
  18. package/dist/actions/default/core/index.d.ts +1 -0
  19. package/dist/actions/default/core/index.js +1 -0
  20. package/dist/actions/default/django_app/auto-create-ticket.d.ts +66 -0
  21. package/dist/actions/default/django_app/auto-create-ticket.js +99 -0
  22. package/dist/actions/default/django_app/auto-create-ticket.schema.json +156 -0
  23. package/dist/actions/default/django_app/auto-update-profile.d.ts +39 -0
  24. package/dist/actions/default/django_app/auto-update-profile.js +78 -0
  25. package/dist/actions/default/django_app/auto-update-profile.schema.json +47 -0
  26. package/dist/actions/default/django_app/get-user-info.d.ts +2 -2
  27. package/dist/actions/default/django_app/index.js +2 -0
  28. package/dist/actions/default/django_app/send-notification.schema.json +1 -0
  29. package/dist/actions/default/index.d.ts +1 -0
  30. package/dist/actions/default/index.js +1 -0
  31. package/dist/adaptors/vue/reactivity.js +3 -0
  32. package/dist/cli/commands/syncActions.js +145 -0
  33. package/dist/models/backend1/django_app/comprehensivemodel.schema.json +5 -5
  34. package/dist/models/backend1/django_app/dailyrate.schema.json +8 -8
  35. package/dist/models/backend1/django_app/dummymodel.schema.json +2 -2
  36. package/dist/models/backend1/django_app/m2mdepthtestlevel1.schema.json +2 -2
  37. package/dist/models/backend1/django_app/m2mdepthtestlevel2.schema.json +2 -2
  38. package/dist/models/backend1/django_app/m2mdepthtestlevel3.schema.json +5 -5
  39. package/dist/models/backend1/django_app/modelwithcustompkrelation.schema.json +2 -2
  40. package/dist/models/backend1/django_app/modelwithrestrictedfields.schema.json +3 -3
  41. package/dist/models/backend1/django_app/order.schema.json +7 -7
  42. package/dist/models/backend1/django_app/orderitem.schema.json +1 -1
  43. package/dist/models/backend1/django_app/product.d.ts +1 -0
  44. package/dist/models/backend1/django_app/product.schema.json +10 -9
  45. package/dist/models/backend1/django_app/productcategory.schema.json +2 -2
  46. package/dist/models/backend1/django_app/rateplan.schema.json +2 -2
  47. package/dist/models/backend1/django_app/restrictedfieldrelatedmodel.schema.json +2 -2
  48. package/dist/models/default/django_app/comprehensivemodel.schema.json +5 -5
  49. package/dist/models/default/django_app/dailyrate.schema.json +8 -8
  50. package/dist/models/default/django_app/deepmodellevel1.d.ts +13 -1
  51. package/dist/models/default/django_app/deepmodellevel1.schema.json +13 -1
  52. package/dist/models/default/django_app/deepmodellevel2.d.ts +13 -1
  53. package/dist/models/default/django_app/deepmodellevel2.schema.json +13 -1
  54. package/dist/models/default/django_app/deepmodellevel3.d.ts +13 -1
  55. package/dist/models/default/django_app/deepmodellevel3.schema.json +13 -1
  56. package/dist/models/default/django_app/dummymodel.d.ts +13 -1
  57. package/dist/models/default/django_app/dummymodel.schema.json +15 -3
  58. package/dist/models/default/django_app/dummyrelatedmodel.d.ts +13 -1
  59. package/dist/models/default/django_app/dummyrelatedmodel.schema.json +13 -1
  60. package/dist/models/default/django_app/filetest.d.ts +13 -1
  61. package/dist/models/default/django_app/filetest.schema.json +13 -1
  62. package/dist/models/default/django_app/m2mdepthtestlevel1.schema.json +2 -2
  63. package/dist/models/default/django_app/m2mdepthtestlevel2.schema.json +2 -2
  64. package/dist/models/default/django_app/m2mdepthtestlevel3.schema.json +5 -5
  65. package/dist/models/default/django_app/modelwithcustompkrelation.schema.json +2 -2
  66. package/dist/models/default/django_app/modelwithrestrictedfields.schema.json +3 -3
  67. package/dist/models/default/django_app/order.schema.json +7 -7
  68. package/dist/models/default/django_app/orderitem.schema.json +1 -1
  69. package/dist/models/default/django_app/product.d.ts +1 -0
  70. package/dist/models/default/django_app/product.schema.json +10 -9
  71. package/dist/models/default/django_app/productcategory.schema.json +2 -2
  72. package/dist/models/default/django_app/rateplan.schema.json +2 -2
  73. package/dist/models/default/django_app/restrictedfieldrelatedmodel.schema.json +2 -2
  74. package/package.json +1 -1
@@ -626,6 +626,148 @@ export * from './default/index.js';
626
626
  console.log(`✨ Generated top-level index for 'default' backend`);
627
627
  }
628
628
  // ================================================================================================
629
+ // BUILT-IN ACTIONS
630
+ // ================================================================================================
631
+ /**
632
+ * Generates built-in actions (like getCurrentUser) for each backend config.
633
+ * These are not discovered via /actions-schema/ — they target fixed endpoints.
634
+ * @param {Object.<string, BackendConfig>} backendConfigs
635
+ * @returns {Promise<Array>} Generated file entries to merge into allGeneratedFiles
636
+ */
637
+ async function generateBuiltInActions(backendConfigs) {
638
+ const generatedFiles = [];
639
+ const modulePath = process.env.NODE_ENV === "test" ? "../../../../src" : "@statezero/core";
640
+ for (const [backendKey, backend] of Object.entries(backendConfigs)) {
641
+ const appName = "core";
642
+ const outDir = path.join(backend.GENERATED_ACTIONS_DIR, backendKey, appName);
643
+ await fs.mkdir(outDir, { recursive: true });
644
+ // --- get-current-user.js ---
645
+ const jsContent = `/**
646
+ * This file was auto-generated. Do not make direct changes to the file.
647
+ * Action: Get Current User
648
+ * App: core
649
+ */
650
+
651
+ import axios from 'axios';
652
+ import { configInstance, parseStateZeroError } from '${modulePath}';
653
+
654
+ /**
655
+ * Fetches the currently authenticated user from the backend.
656
+ *
657
+ * @param {Object} [axiosOverrides] - Allows overriding Axios request parameters.
658
+ * @returns {Promise<Object>} A promise that resolves with the current user data.
659
+ */
660
+ export async function getCurrentUser(axiosOverrides = {}) {
661
+ const config = configInstance.getConfig();
662
+ const backend = config.backendConfigs['${backendKey}'];
663
+
664
+ if (!backend) {
665
+ throw new Error(\`No backend configuration found for key: ${backendKey}\`);
666
+ }
667
+
668
+ const baseUrl = backend.API_URL.replace(/\\/+$/, '');
669
+ const url = \`\${baseUrl}/me/\`;
670
+ const headers = backend.getAuthHeaders ? backend.getAuthHeaders() : {};
671
+
672
+ try {
673
+ const response = await axios.get(url, {
674
+ headers: { ...headers },
675
+ ...axiosOverrides,
676
+ });
677
+
678
+ return response.data;
679
+ } catch (error) {
680
+ if (error.response && error.response.data) {
681
+ const parsedError = parseStateZeroError(error.response.data);
682
+
683
+ if (Error.captureStackTrace) {
684
+ Error.captureStackTrace(parsedError, getCurrentUser);
685
+ }
686
+
687
+ throw parsedError;
688
+ } else if (error.request) {
689
+ throw new Error('Get Current User failed: No response received from server.');
690
+ } else {
691
+ throw new Error(\`Get Current User failed: \${error.message}\`);
692
+ }
693
+ }
694
+ }
695
+
696
+ export default getCurrentUser;
697
+
698
+ getCurrentUser.actionName = 'get_current_user';
699
+ getCurrentUser.title = 'Get Current User';
700
+ getCurrentUser.app = 'core';
701
+ getCurrentUser.permissions = [];
702
+ getCurrentUser.configKey = '${backendKey}';
703
+ `;
704
+ await fs.writeFile(path.join(outDir, "get-current-user.js"), jsContent);
705
+ // --- get-current-user.d.ts ---
706
+ const dtsContent = `/**
707
+ * This file was auto-generated. Do not make direct changes to the file.
708
+ * Action: Get Current User
709
+ * App: core
710
+ */
711
+ import { AxiosRequestConfig } from 'axios';
712
+
713
+ export type GetCurrentUserResponse = {
714
+ model_name: string;
715
+ data: {
716
+ id: number;
717
+ repr: { str: string; img: string | null };
718
+ };
719
+ };
720
+
721
+ /**
722
+ * Fetches the currently authenticated user from the backend.
723
+ *
724
+ * @param {AxiosRequestConfig} [axiosOverrides] - Allows overriding Axios request parameters.
725
+ * @returns {Promise<GetCurrentUserResponse>} A promise that resolves with the current user data.
726
+ */
727
+ export declare function getCurrentUser(
728
+ axiosOverrides?: AxiosRequestConfig
729
+ ): Promise<GetCurrentUserResponse>;
730
+
731
+ export default getCurrentUser;
732
+
733
+ export declare namespace getCurrentUser {
734
+ export const actionName: string;
735
+ export const title: string;
736
+ export const app: string | null;
737
+ export const permissions: string[];
738
+ export const configKey: string;
739
+ }
740
+ `;
741
+ await fs.writeFile(path.join(outDir, "get-current-user.d.ts"), dtsContent);
742
+ // --- get-current-user.schema.json ---
743
+ const schemaContent = {
744
+ action_name: "get_current_user",
745
+ app: "core",
746
+ title: "Get Current User",
747
+ docstring: "Fetches the currently authenticated user from the backend.",
748
+ class_name: "GetCurrentUser",
749
+ input_properties: {},
750
+ response_properties: {},
751
+ relationships: {},
752
+ permissions: [],
753
+ display: null,
754
+ };
755
+ await fs.writeFile(path.join(outDir, "get-current-user.schema.json"), JSON.stringify(schemaContent, null, 2));
756
+ const relativePath = path
757
+ .relative(backend.GENERATED_ACTIONS_DIR, path.join(outDir, "get-current-user"))
758
+ .replace(/\\/g, "/");
759
+ generatedFiles.push({
760
+ action: "get_current_user",
761
+ relativePath,
762
+ functionName: "getCurrentUser",
763
+ backend: backendKey,
764
+ appName,
765
+ });
766
+ }
767
+ console.log(`✨ Generated built-in actions for ${Object.keys(backendConfigs).length} backend(s)`);
768
+ return generatedFiles;
769
+ }
770
+ // ================================================================================================
629
771
  // MAIN SCRIPT RUNNER
630
772
  // ================================================================================================
631
773
  async function main() {
@@ -692,6 +834,9 @@ async function main() {
692
834
  progressBar.increment();
693
835
  }
694
836
  progressBar.stop();
837
+ // Generate built-in actions (e.g. getCurrentUser) for each backend
838
+ const builtInFiles = await generateBuiltInActions(backendConfigs);
839
+ allGeneratedFiles.push(...builtInFiles);
695
840
  await generateAppLevelIndexFiles(allGeneratedFiles, backendConfigs);
696
841
  await generateActionRegistry(allGeneratedFiles, backendConfigs);
697
842
  // Generate top-level index for 'default' backend if it exists
@@ -5,12 +5,12 @@
5
5
  "plural_title": "Comprehensive Models",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "int_field",
9
- "char_field"
8
+ "char_field",
9
+ "int_field"
10
10
  ],
11
11
  "searchable_fields": [
12
- "text_field",
13
- "char_field"
12
+ "char_field",
13
+ "text_field"
14
14
  ],
15
15
  "ordering_fields": [
16
16
  "int_field"
@@ -105,7 +105,7 @@
105
105
  "format": "date-time",
106
106
  "max_length": null,
107
107
  "choices": null,
108
- "default": "2026-01-29T14:56:45.478006+00:00",
108
+ "default": "2026-02-06T14:26:11.440620+00:00",
109
109
  "validators": [],
110
110
  "max_digits": null,
111
111
  "decimal_places": null,
@@ -5,21 +5,21 @@
5
5
  "plural_title": "Daily Rates",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "stop_sell",
9
- "min_stay_arrival",
10
- "id",
11
8
  "price",
12
- "min_stay_through",
9
+ "id",
13
10
  "rate_plan",
14
- "closed_to_arrival",
11
+ "date",
15
12
  "max_stay",
16
13
  "closed_to_departure",
17
- "date"
14
+ "min_stay_arrival",
15
+ "closed_to_arrival",
16
+ "min_stay_through",
17
+ "stop_sell"
18
18
  ],
19
19
  "searchable_fields": [],
20
20
  "ordering_fields": [
21
- "date",
22
- "rate_plan"
21
+ "rate_plan",
22
+ "date"
23
23
  ],
24
24
  "properties": {
25
25
  "id": {
@@ -5,8 +5,8 @@
5
5
  "plural_title": "Dummy Models",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "value",
9
- "name"
8
+ "name",
9
+ "value"
10
10
  ],
11
11
  "searchable_fields": [
12
12
  "name"
@@ -5,9 +5,9 @@
5
5
  "plural_title": "M2M Depth Test Level1S",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
+ "name",
8
9
  "id",
9
- "level2s",
10
- "name"
10
+ "level2s"
11
11
  ],
12
12
  "searchable_fields": [
13
13
  "name"
@@ -5,9 +5,9 @@
5
5
  "plural_title": "M2M Depth Test Level2S",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "id",
8
+ "level3s",
9
9
  "name",
10
- "level3s"
10
+ "id"
11
11
  ],
12
12
  "searchable_fields": [
13
13
  "name"
@@ -5,17 +5,17 @@
5
5
  "plural_title": "M2M Depth Test Level3S",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "id",
9
- "value",
10
8
  "name",
11
- "category"
9
+ "category",
10
+ "id",
11
+ "value"
12
12
  ],
13
13
  "searchable_fields": [
14
14
  "name"
15
15
  ],
16
16
  "ordering_fields": [
17
- "value",
18
- "name"
17
+ "name",
18
+ "value"
19
19
  ],
20
20
  "properties": {
21
21
  "id": {
@@ -5,8 +5,8 @@
5
5
  "plural_title": "Model With Custom Pk Relations",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "name",
9
- "custom_pk_related"
8
+ "custom_pk_related",
9
+ "name"
10
10
  ],
11
11
  "searchable_fields": [
12
12
  "name"
@@ -5,10 +5,10 @@
5
5
  "plural_title": "Model With Restricted Fieldss",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "id",
9
- "admin_only_field",
10
8
  "name",
11
- "restricted_related"
9
+ "id",
10
+ "restricted_related",
11
+ "admin_only_field"
12
12
  ],
13
13
  "searchable_fields": [
14
14
  "name"
@@ -5,22 +5,22 @@
5
5
  "plural_title": "Orders",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "status",
9
- "total",
8
+ "customer_email",
10
9
  "id",
11
10
  "created_at",
11
+ "order_number",
12
12
  "customer_name",
13
- "customer_email",
13
+ "status",
14
14
  "last_updated",
15
- "order_number"
15
+ "total"
16
16
  ],
17
17
  "searchable_fields": [
18
18
  "customer_name",
19
19
  "order_number"
20
20
  ],
21
21
  "ordering_fields": [
22
- "created_at",
23
- "total"
22
+ "total",
23
+ "created_at"
24
24
  ],
25
25
  "properties": {
26
26
  "id": {
@@ -134,7 +134,7 @@
134
134
  "format": "date-time",
135
135
  "max_length": null,
136
136
  "choices": null,
137
- "default": "2026-01-29T14:56:45.490306+00:00",
137
+ "default": "2026-02-06T14:26:11.448621+00:00",
138
138
  "validators": [],
139
139
  "max_digits": null,
140
140
  "decimal_places": null,
@@ -6,9 +6,9 @@
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
8
  "id",
9
+ "price",
9
10
  "order",
10
11
  "product",
11
- "price",
12
12
  "quantity"
13
13
  ],
14
14
  "searchable_fields": [],
@@ -238,6 +238,7 @@ export class Product {
238
238
  display_help_text: string;
239
239
  extra: null;
240
240
  })[];
241
+ layout: null;
241
242
  extra: null;
242
243
  };
243
244
  };
@@ -5,23 +5,23 @@
5
5
  "plural_title": "Products",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "name",
9
- "id",
10
- "price",
11
- "created_at",
12
8
  "category",
13
- "in_stock",
14
9
  "description",
15
- "created_by"
10
+ "price",
11
+ "in_stock",
12
+ "id",
13
+ "created_at",
14
+ "created_by",
15
+ "name"
16
16
  ],
17
17
  "searchable_fields": [
18
18
  "description",
19
19
  "name"
20
20
  ],
21
21
  "ordering_fields": [
22
+ "created_at",
22
23
  "price",
23
- "name",
24
- "created_at"
24
+ "name"
25
25
  ],
26
26
  "properties": {
27
27
  "id": {
@@ -129,7 +129,7 @@
129
129
  "format": "date-time",
130
130
  "max_length": null,
131
131
  "choices": null,
132
- "default": "2026-01-29T14:56:45.488388+00:00",
132
+ "default": "2026-02-06T14:26:11.447291+00:00",
133
133
  "validators": [],
134
134
  "max_digits": null,
135
135
  "decimal_places": null,
@@ -272,6 +272,7 @@
272
272
  "extra": null
273
273
  }
274
274
  ],
275
+ "layout": null,
275
276
  "extra": null
276
277
  }
277
278
  }
@@ -5,8 +5,8 @@
5
5
  "plural_title": "Product Categorys",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "id",
9
- "name"
8
+ "name",
9
+ "id"
10
10
  ],
11
11
  "searchable_fields": [
12
12
  "name"
@@ -5,8 +5,8 @@
5
5
  "plural_title": "Rate Plans",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "id",
9
- "name"
8
+ "name",
9
+ "id"
10
10
  ],
11
11
  "searchable_fields": [
12
12
  "name"
@@ -5,9 +5,9 @@
5
5
  "plural_title": "Restricted Field Related Models",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
+ "name",
8
9
  "id",
9
- "admin_only_field",
10
- "name"
10
+ "admin_only_field"
11
11
  ],
12
12
  "searchable_fields": [
13
13
  "name"
@@ -5,12 +5,12 @@
5
5
  "plural_title": "Comprehensive Models",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "int_field",
9
- "char_field"
8
+ "char_field",
9
+ "int_field"
10
10
  ],
11
11
  "searchable_fields": [
12
- "text_field",
13
- "char_field"
12
+ "char_field",
13
+ "text_field"
14
14
  ],
15
15
  "ordering_fields": [
16
16
  "int_field"
@@ -105,7 +105,7 @@
105
105
  "format": "date-time",
106
106
  "max_length": null,
107
107
  "choices": null,
108
- "default": "2026-01-29T14:56:44.456834+00:00",
108
+ "default": "2026-02-06T14:26:11.410310+00:00",
109
109
  "validators": [],
110
110
  "max_digits": null,
111
111
  "decimal_places": null,
@@ -5,21 +5,21 @@
5
5
  "plural_title": "Daily Rates",
6
6
  "primary_key_field": "id",
7
7
  "filterable_fields": [
8
- "stop_sell",
9
- "min_stay_arrival",
10
- "id",
11
8
  "price",
12
- "min_stay_through",
9
+ "id",
13
10
  "rate_plan",
14
- "closed_to_arrival",
11
+ "date",
15
12
  "max_stay",
16
13
  "closed_to_departure",
17
- "date"
14
+ "min_stay_arrival",
15
+ "closed_to_arrival",
16
+ "min_stay_through",
17
+ "stop_sell"
18
18
  ],
19
19
  "searchable_fields": [],
20
20
  "ordering_fields": [
21
- "date",
22
- "rate_plan"
21
+ "rate_plan",
22
+ "date"
23
23
  ],
24
24
  "properties": {
25
25
  "id": {
@@ -109,7 +109,19 @@ export class DeepModelLevel1 {
109
109
  };
110
110
  };
111
111
  default_ordering: null;
112
- definitions: {};
112
+ definitions: {
113
+ MoneyField: {
114
+ type: string;
115
+ properties: {
116
+ amount: {
117
+ type: string;
118
+ };
119
+ currency: {
120
+ type: string;
121
+ };
122
+ };
123
+ };
124
+ };
113
125
  datetime_format: string;
114
126
  date_format: string;
115
127
  time_format: string;
@@ -94,7 +94,19 @@
94
94
  }
95
95
  },
96
96
  "default_ordering": null,
97
- "definitions": {},
97
+ "definitions": {
98
+ "MoneyField": {
99
+ "type": "object",
100
+ "properties": {
101
+ "amount": {
102
+ "type": "number"
103
+ },
104
+ "currency": {
105
+ "type": "string"
106
+ }
107
+ }
108
+ }
109
+ },
98
110
  "datetime_format": "iso-8601",
99
111
  "date_format": "iso-8601",
100
112
  "time_format": "iso-8601",
@@ -87,7 +87,19 @@ export class DeepModelLevel2 {
87
87
  };
88
88
  };
89
89
  default_ordering: null;
90
- definitions: {};
90
+ definitions: {
91
+ MoneyField: {
92
+ type: string;
93
+ properties: {
94
+ amount: {
95
+ type: string;
96
+ };
97
+ currency: {
98
+ type: string;
99
+ };
100
+ };
101
+ };
102
+ };
91
103
  datetime_format: string;
92
104
  date_format: string;
93
105
  time_format: string;
@@ -72,7 +72,19 @@
72
72
  }
73
73
  },
74
74
  "default_ordering": null,
75
- "definitions": {},
75
+ "definitions": {
76
+ "MoneyField": {
77
+ "type": "object",
78
+ "properties": {
79
+ "amount": {
80
+ "type": "number"
81
+ },
82
+ "currency": {
83
+ "type": "string"
84
+ }
85
+ }
86
+ }
87
+ },
76
88
  "datetime_format": "iso-8601",
77
89
  "date_format": "iso-8601",
78
90
  "time_format": "iso-8601",
@@ -64,7 +64,19 @@ export class DeepModelLevel3 {
64
64
  };
65
65
  relationships: {};
66
66
  default_ordering: null;
67
- definitions: {};
67
+ definitions: {
68
+ MoneyField: {
69
+ type: string;
70
+ properties: {
71
+ amount: {
72
+ type: string;
73
+ };
74
+ currency: {
75
+ type: string;
76
+ };
77
+ };
78
+ };
79
+ };
68
80
  datetime_format: string;
69
81
  date_format: string;
70
82
  time_format: string;
@@ -49,7 +49,19 @@
49
49
  },
50
50
  "relationships": {},
51
51
  "default_ordering": null,
52
- "definitions": {},
52
+ "definitions": {
53
+ "MoneyField": {
54
+ "type": "object",
55
+ "properties": {
56
+ "amount": {
57
+ "type": "number"
58
+ },
59
+ "currency": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ }
64
+ },
53
65
  "datetime_format": "iso-8601",
54
66
  "date_format": "iso-8601",
55
67
  "time_format": "iso-8601",
@@ -103,7 +103,19 @@ export class DummyModel {
103
103
  };
104
104
  };
105
105
  default_ordering: null;
106
- definitions: {};
106
+ definitions: {
107
+ MoneyField: {
108
+ type: string;
109
+ properties: {
110
+ amount: {
111
+ type: string;
112
+ };
113
+ currency: {
114
+ type: string;
115
+ };
116
+ };
117
+ };
118
+ };
107
119
  datetime_format: string;
108
120
  date_format: string;
109
121
  time_format: string;