@statezero/core 0.2.15 → 0.2.16
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/backend1/django_app/calculate-hash.js +5 -2
- package/dist/actions/backend1/django_app/get-current-username.js +5 -2
- package/dist/actions/backend1/django_app/get-server-status.js +5 -2
- package/dist/actions/backend1/django_app/get-user-info.js +5 -2
- package/dist/actions/backend1/django_app/process-data.js +5 -2
- package/dist/actions/backend1/django_app/send-notification.js +5 -2
- package/dist/actions/default/django_app/calculate-hash.js +5 -2
- package/dist/actions/default/django_app/get-current-username.js +5 -2
- package/dist/actions/default/django_app/get-server-status.js +5 -2
- package/dist/actions/default/django_app/get-user-info.js +5 -2
- package/dist/actions/default/django_app/process-data.js +5 -2
- package/dist/actions/default/django_app/send-notification.js +5 -2
- package/dist/cli/commands/syncActions.js +11 -5
- package/dist/flavours/django/serializers.d.ts +9 -0
- package/dist/flavours/django/serializers.js +31 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -1
- package/package.json +1 -1
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './calculate-hash.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the input of calculateHash.
|
|
11
12
|
* NOTE: This is an object schema for validating the data payload.
|
|
@@ -31,10 +32,12 @@ export const calculateHashResponseSchema = z.object({ original_text: z.string(),
|
|
|
31
32
|
*/
|
|
32
33
|
export async function calculateHash(text, algorithm = "sha256", axiosOverrides = {}) {
|
|
33
34
|
// Construct the data payload from the function arguments
|
|
34
|
-
const
|
|
35
|
+
const rawPayload = {
|
|
35
36
|
text,
|
|
36
37
|
algorithm
|
|
37
38
|
};
|
|
39
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
40
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
38
41
|
const config = configInstance.getConfig();
|
|
39
42
|
const backend = config.backendConfigs['backend1'];
|
|
40
43
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './get-current-username.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the response of getCurrentUsername.
|
|
11
12
|
*/
|
|
@@ -19,7 +20,9 @@ export const getCurrentUsernameResponseSchema = z.object({ username: z.string(),
|
|
|
19
20
|
*/
|
|
20
21
|
export async function getCurrentUsername(axiosOverrides = {}) {
|
|
21
22
|
// Construct the data payload from the function arguments
|
|
22
|
-
const
|
|
23
|
+
const rawPayload = {};
|
|
24
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
25
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
23
26
|
const config = configInstance.getConfig();
|
|
24
27
|
const backend = config.backendConfigs['backend1'];
|
|
25
28
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './get-server-status.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the response of getServerStatus.
|
|
11
12
|
*/
|
|
@@ -22,7 +23,9 @@ export const getServerStatusResponseSchema = z.object({ status: z.string(),
|
|
|
22
23
|
*/
|
|
23
24
|
export async function getServerStatus(axiosOverrides = {}) {
|
|
24
25
|
// Construct the data payload from the function arguments
|
|
25
|
-
const
|
|
26
|
+
const rawPayload = {};
|
|
27
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
28
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
26
29
|
const config = configInstance.getConfig();
|
|
27
30
|
const backend = config.backendConfigs['backend1'];
|
|
28
31
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './get-user-info.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the response of getUserInfo.
|
|
11
12
|
*/
|
|
@@ -24,7 +25,9 @@ export const getUserInfoResponseSchema = z.object({ username: z.string(),
|
|
|
24
25
|
*/
|
|
25
26
|
export async function getUserInfo(axiosOverrides = {}) {
|
|
26
27
|
// Construct the data payload from the function arguments
|
|
27
|
-
const
|
|
28
|
+
const rawPayload = {};
|
|
29
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
30
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
28
31
|
const config = configInstance.getConfig();
|
|
29
32
|
const backend = config.backendConfigs['backend1'];
|
|
30
33
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './process-data.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the input of processData.
|
|
11
12
|
* NOTE: This is an object schema for validating the data payload.
|
|
@@ -29,10 +30,12 @@ export const processDataResponseSchema = z.object({ operation: z.string(),
|
|
|
29
30
|
*/
|
|
30
31
|
export async function processData(data, operation, axiosOverrides = {}) {
|
|
31
32
|
// Construct the data payload from the function arguments
|
|
32
|
-
const
|
|
33
|
+
const rawPayload = {
|
|
33
34
|
data,
|
|
34
35
|
operation
|
|
35
36
|
};
|
|
37
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
38
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
36
39
|
const config = configInstance.getConfig();
|
|
37
40
|
const backend = config.backendConfigs['backend1'];
|
|
38
41
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './send-notification.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the input of sendNotification.
|
|
11
12
|
* NOTE: This is an object schema for validating the data payload.
|
|
@@ -31,11 +32,13 @@ export const sendNotificationResponseSchema = z.object({ success: z.boolean(),
|
|
|
31
32
|
*/
|
|
32
33
|
export async function sendNotification(message, recipients, priority = "low", axiosOverrides = {}) {
|
|
33
34
|
// Construct the data payload from the function arguments
|
|
34
|
-
const
|
|
35
|
+
const rawPayload = {
|
|
35
36
|
message,
|
|
36
37
|
recipients,
|
|
37
38
|
priority
|
|
38
39
|
};
|
|
40
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
41
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
39
42
|
const config = configInstance.getConfig();
|
|
40
43
|
const backend = config.backendConfigs['backend1'];
|
|
41
44
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './calculate-hash.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the input of calculateHash.
|
|
11
12
|
* NOTE: This is an object schema for validating the data payload.
|
|
@@ -31,10 +32,12 @@ export const calculateHashResponseSchema = z.object({ original_text: z.string(),
|
|
|
31
32
|
*/
|
|
32
33
|
export async function calculateHash(text, algorithm = "sha256", axiosOverrides = {}) {
|
|
33
34
|
// Construct the data payload from the function arguments
|
|
34
|
-
const
|
|
35
|
+
const rawPayload = {
|
|
35
36
|
text,
|
|
36
37
|
algorithm
|
|
37
38
|
};
|
|
39
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
40
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
38
41
|
const config = configInstance.getConfig();
|
|
39
42
|
const backend = config.backendConfigs['default'];
|
|
40
43
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './get-current-username.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the response of getCurrentUsername.
|
|
11
12
|
*/
|
|
@@ -19,7 +20,9 @@ export const getCurrentUsernameResponseSchema = z.object({ username: z.string(),
|
|
|
19
20
|
*/
|
|
20
21
|
export async function getCurrentUsername(axiosOverrides = {}) {
|
|
21
22
|
// Construct the data payload from the function arguments
|
|
22
|
-
const
|
|
23
|
+
const rawPayload = {};
|
|
24
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
25
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
23
26
|
const config = configInstance.getConfig();
|
|
24
27
|
const backend = config.backendConfigs['default'];
|
|
25
28
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './get-server-status.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the response of getServerStatus.
|
|
11
12
|
*/
|
|
@@ -22,7 +23,9 @@ export const getServerStatusResponseSchema = z.object({ status: z.string(),
|
|
|
22
23
|
*/
|
|
23
24
|
export async function getServerStatus(axiosOverrides = {}) {
|
|
24
25
|
// Construct the data payload from the function arguments
|
|
25
|
-
const
|
|
26
|
+
const rawPayload = {};
|
|
27
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
28
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
26
29
|
const config = configInstance.getConfig();
|
|
27
30
|
const backend = config.backendConfigs['default'];
|
|
28
31
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './get-user-info.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the response of getUserInfo.
|
|
11
12
|
*/
|
|
@@ -24,7 +25,9 @@ export const getUserInfoResponseSchema = z.object({ username: z.string(),
|
|
|
24
25
|
*/
|
|
25
26
|
export async function getUserInfo(axiosOverrides = {}) {
|
|
26
27
|
// Construct the data payload from the function arguments
|
|
27
|
-
const
|
|
28
|
+
const rawPayload = {};
|
|
29
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
30
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
28
31
|
const config = configInstance.getConfig();
|
|
29
32
|
const backend = config.backendConfigs['default'];
|
|
30
33
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './process-data.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the input of processData.
|
|
11
12
|
* NOTE: This is an object schema for validating the data payload.
|
|
@@ -29,10 +30,12 @@ export const processDataResponseSchema = z.object({ operation: z.string(),
|
|
|
29
30
|
*/
|
|
30
31
|
export async function processData(data, operation, axiosOverrides = {}) {
|
|
31
32
|
// Construct the data payload from the function arguments
|
|
32
|
-
const
|
|
33
|
+
const rawPayload = {
|
|
33
34
|
data,
|
|
34
35
|
operation
|
|
35
36
|
};
|
|
37
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
38
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
36
39
|
const config = configInstance.getConfig();
|
|
37
40
|
const backend = config.backendConfigs['default'];
|
|
38
41
|
if (!backend) {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { configInstance, parseStateZeroError } from '../../../../src';
|
|
8
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '../../../../src';
|
|
9
|
+
import actionSchema from './send-notification.schema.json' assert { type: 'json' };
|
|
9
10
|
/**
|
|
10
11
|
* Zod schema for the input of sendNotification.
|
|
11
12
|
* NOTE: This is an object schema for validating the data payload.
|
|
@@ -31,11 +32,13 @@ export const sendNotificationResponseSchema = z.object({ success: z.boolean(),
|
|
|
31
32
|
*/
|
|
32
33
|
export async function sendNotification(message, recipients, priority = "low", axiosOverrides = {}) {
|
|
33
34
|
// Construct the data payload from the function arguments
|
|
34
|
-
const
|
|
35
|
+
const rawPayload = {
|
|
35
36
|
message,
|
|
36
37
|
recipients,
|
|
37
38
|
priority
|
|
38
39
|
};
|
|
40
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
41
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
39
42
|
const config = configInstance.getConfig();
|
|
40
43
|
const backend = config.backendConfigs['default'];
|
|
41
44
|
if (!backend) {
|
|
@@ -100,7 +100,8 @@ const JS_ACTION_TEMPLATE = `/**
|
|
|
100
100
|
|
|
101
101
|
import axios from 'axios';
|
|
102
102
|
import { z } from 'zod';
|
|
103
|
-
import { configInstance, parseStateZeroError } from '{{modulePath}}';
|
|
103
|
+
import { configInstance, parseStateZeroError, serializeActionPayload } from '{{modulePath}}';
|
|
104
|
+
import actionSchema from './{{schemaFileName}}' assert { type: 'json' };
|
|
104
105
|
|
|
105
106
|
{{#if inputSchemaString}}
|
|
106
107
|
/**
|
|
@@ -133,13 +134,16 @@ export const {{functionName}}ResponseSchema = z.object({ {{{responseSchemaString
|
|
|
133
134
|
export async function {{functionName}}({{{jsFunctionParams}}}) {
|
|
134
135
|
// Construct the data payload from the function arguments
|
|
135
136
|
{{#if payloadProperties}}
|
|
136
|
-
const
|
|
137
|
+
const rawPayload = {
|
|
137
138
|
{{{payloadProperties}}}
|
|
138
139
|
};
|
|
139
140
|
{{else}}
|
|
140
|
-
const
|
|
141
|
+
const rawPayload = {};
|
|
141
142
|
{{/if}}
|
|
142
143
|
|
|
144
|
+
// Serialize payload - handles model instances (extracts PK), files, dates, etc.
|
|
145
|
+
const payload = serializeActionPayload(rawPayload, actionSchema.input_properties);
|
|
146
|
+
|
|
143
147
|
const config = configInstance.getConfig();
|
|
144
148
|
const backend = config.backendConfigs['{{configKey}}'];
|
|
145
149
|
|
|
@@ -444,10 +448,12 @@ async function generateActionFile(backend, actionName, actionDefinition) {
|
|
|
444
448
|
// Always include the backend key as the top-level folder
|
|
445
449
|
const outDir = path.join(backend.GENERATED_ACTIONS_DIR, backend.NAME, appName);
|
|
446
450
|
await fs.mkdir(outDir, { recursive: true });
|
|
447
|
-
const templateData = prepareActionTemplateData(modulePath, functionName, actionName, actionDefinition, backend.NAME);
|
|
448
451
|
const fileName = _.kebabCase(actionName);
|
|
452
|
+
const schemaFileName = `${fileName}.schema.json`;
|
|
453
|
+
const templateData = prepareActionTemplateData(modulePath, functionName, actionName, actionDefinition, backend.NAME);
|
|
454
|
+
templateData.schemaFileName = schemaFileName;
|
|
449
455
|
// Write the raw schema file (like models do)
|
|
450
|
-
const schemaFilePath = path.join(outDir,
|
|
456
|
+
const schemaFilePath = path.join(outDir, schemaFileName);
|
|
451
457
|
await fs.writeFile(schemaFilePath, JSON.stringify(actionDefinition, null, 2));
|
|
452
458
|
// Write JS and TS files
|
|
453
459
|
const jsFilePath = path.join(outDir, `${fileName}.js`);
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serializes an action payload based on the action's input schema.
|
|
3
|
+
* Automatically handles model instances (extracts PK), files, dates, etc.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} payload - The raw payload with potentially model instances
|
|
6
|
+
* @param {Object} inputProperties - The action's input_properties schema
|
|
7
|
+
* @returns {Object} Serialized payload ready for API transmission
|
|
8
|
+
*/
|
|
9
|
+
export function serializeActionPayload(payload: Object, inputProperties: Object): Object;
|
|
1
10
|
export namespace fileFieldSerializer {
|
|
2
11
|
function toInternal(value: any, context?: {}): any;
|
|
3
12
|
function toLive(value: any, context?: {}): any;
|
|
@@ -186,6 +186,37 @@ const serializers = {
|
|
|
186
186
|
"many-to-many": m2mFieldSerializer,
|
|
187
187
|
},
|
|
188
188
|
};
|
|
189
|
+
/**
|
|
190
|
+
* Serializes an action payload based on the action's input schema.
|
|
191
|
+
* Automatically handles model instances (extracts PK), files, dates, etc.
|
|
192
|
+
*
|
|
193
|
+
* @param {Object} payload - The raw payload with potentially model instances
|
|
194
|
+
* @param {Object} inputProperties - The action's input_properties schema
|
|
195
|
+
* @returns {Object} Serialized payload ready for API transmission
|
|
196
|
+
*/
|
|
197
|
+
export function serializeActionPayload(payload, inputProperties) {
|
|
198
|
+
if (!payload || !inputProperties)
|
|
199
|
+
return payload;
|
|
200
|
+
const serializedPayload = {};
|
|
201
|
+
for (const [field, value] of Object.entries(payload)) {
|
|
202
|
+
const fieldSchema = inputProperties[field];
|
|
203
|
+
if (!fieldSchema || value === undefined) {
|
|
204
|
+
serializedPayload[field] = value;
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
const { type, format } = fieldSchema;
|
|
208
|
+
// Check if we have a serializer for this type/format combo
|
|
209
|
+
const typeSerializers = serializers[type];
|
|
210
|
+
const serializer = typeSerializers?.[format];
|
|
211
|
+
if (serializer) {
|
|
212
|
+
serializedPayload[field] = serializer.toInternal(value, { field });
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
serializedPayload[field] = value;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return serializedPayload;
|
|
219
|
+
}
|
|
189
220
|
export class ModelSerializer {
|
|
190
221
|
constructor(modelClass) {
|
|
191
222
|
this.modelClass = modelClass;
|
package/dist/index.d.ts
CHANGED
|
@@ -36,4 +36,5 @@ import { cleanupEventHandler } from "./syncEngine/stores/operationEventHandlers.
|
|
|
36
36
|
import { setAdapters } from "./reactiveAdaptor.js";
|
|
37
37
|
import { wrapReactiveModel } from "./reactiveAdaptor.js";
|
|
38
38
|
import { wrapReactiveQuerySet } from "./reactiveAdaptor.js";
|
|
39
|
-
|
|
39
|
+
import { serializeActionPayload } from "./flavours/django/serializers.js";
|
|
40
|
+
export { EventType, PusherEventReceiver, setEventReceiver, getEventReceiver, setNamespaceResolver, setupStateZero, resetStateZero, FileObject, querysetStoreRegistry, modelStoreRegistry, metricRegistry, syncManager, Operation, operationRegistry, Q, StateZeroError, ValidationError, DoesNotExist, PermissionDenied, MultipleObjectsReturned, ASTValidationError, ConfigError, parseStateZeroError, QuerySet, Manager, ResultTuple, Model, setConfig, getConfig, setBackendConfig, initializeEventReceiver, configInstance, getModelClass, initEventHandler, cleanupEventHandler, setAdapters, wrapReactiveModel, wrapReactiveQuerySet, serializeActionPayload };
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { QuerySet } from "./flavours/django/querySet.js";
|
|
|
13
13
|
import { Manager } from "./flavours/django/manager.js";
|
|
14
14
|
import { Model } from "./flavours/django/model.js";
|
|
15
15
|
import { FileObject } from "./flavours/django/files.js";
|
|
16
|
+
import { serializeActionPayload } from "./flavours/django/serializers.js";
|
|
16
17
|
// Configuration
|
|
17
18
|
import { setConfig, getConfig, setBackendConfig, initializeEventReceiver, configInstance, getModelClass, } from "./config.js";
|
|
18
19
|
import { setAdapters, wrapReactiveModel, wrapReactiveQuerySet, } from "./reactiveAdaptor.js";
|
|
@@ -36,4 +37,6 @@ Q, StateZeroError, ValidationError, DoesNotExist, PermissionDenied, MultipleObje
|
|
|
36
37
|
// Configuration
|
|
37
38
|
setConfig, getConfig, setBackendConfig, initializeEventReceiver, configInstance, getModelClass,
|
|
38
39
|
// Reactivity framework integration
|
|
39
|
-
initEventHandler, cleanupEventHandler, setAdapters, wrapReactiveModel, wrapReactiveQuerySet,
|
|
40
|
+
initEventHandler, cleanupEventHandler, setAdapters, wrapReactiveModel, wrapReactiveQuerySet,
|
|
41
|
+
// Action utilities
|
|
42
|
+
serializeActionPayload, };
|
package/package.json
CHANGED