@defra/forms-model 3.0.378 → 3.0.379
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/module/form/form-submission/index.js +32 -0
- package/dist/module/form/form-submission/index.js.map +1 -0
- package/dist/module/form/form-submission/types.js +2 -0
- package/dist/module/form/form-submission/types.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/types/form/form-submission/index.d.ts +18 -0
- package/dist/types/form/form-submission/index.d.ts.map +1 -0
- package/dist/types/form/form-submission/types.d.ts +71 -0
- package/dist/types/form/form-submission/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/form/form-submission/index.ts +44 -0
- package/src/form/form-submission/types.ts +86 -0
- package/src/index.ts +2 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
import Joi from 'joi';
|
2
|
+
/**
|
3
|
+
* Joi schema for `SubmitRecord` interface
|
4
|
+
* @see {@link SubmitRecord}
|
5
|
+
*/
|
6
|
+
export const formSubmitRecordSchema = Joi.object({
|
7
|
+
name: Joi.string().required(),
|
8
|
+
title: Joi.string().required(),
|
9
|
+
value: Joi.string().required()
|
10
|
+
});
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Joi schema for `SubmitRecordset` interface
|
14
|
+
* @see {@link SubmitRecordset}
|
15
|
+
*/
|
16
|
+
export const formSubmitRecordsetSchema = Joi.object({
|
17
|
+
name: Joi.string().required(),
|
18
|
+
title: Joi.string().required(),
|
19
|
+
value: Joi.array().items(Joi.array().items(formSubmitRecordSchema).required()).required()
|
20
|
+
});
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Joi schema for `SubmitPayload` interface
|
24
|
+
* @see {@link SubmitPayload}
|
25
|
+
*/
|
26
|
+
export const formSubmitPayloadSchema = Joi.object().keys({
|
27
|
+
retrievalKey: Joi.string().required(),
|
28
|
+
sessionId: Joi.string().required(),
|
29
|
+
main: Joi.array().items(formSubmitRecordSchema).required(),
|
30
|
+
repeaters: Joi.array().items(formSubmitRecordsetSchema).required()
|
31
|
+
}).required();
|
32
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","names":["Joi","formSubmitRecordSchema","object","name","string","required","title","value","formSubmitRecordsetSchema","array","items","formSubmitPayloadSchema","keys","retrievalKey","sessionId","main","repeaters"],"sources":["../../../../src/form/form-submission/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport {\n type SubmitPayload,\n type SubmitRecord,\n type SubmitRecordset\n} from '~/src/form/form-submission/types.js'\n\n/**\n * Joi schema for `SubmitRecord` interface\n * @see {@link SubmitRecord}\n */\nexport const formSubmitRecordSchema = Joi.object<SubmitRecord>({\n name: Joi.string().required(),\n title: Joi.string().required(),\n value: Joi.string().required()\n})\n\n/**\n * Joi schema for `SubmitRecordset` interface\n * @see {@link SubmitRecordset}\n */\nexport const formSubmitRecordsetSchema = Joi.object<SubmitRecordset>({\n name: Joi.string().required(),\n title: Joi.string().required(),\n value: Joi.array<SubmitRecord[]>()\n .items(Joi.array<SubmitRecord>().items(formSubmitRecordSchema).required())\n .required()\n})\n\n/**\n * Joi schema for `SubmitPayload` interface\n * @see {@link SubmitPayload}\n */\nexport const formSubmitPayloadSchema = Joi.object<SubmitPayload>()\n .keys({\n retrievalKey: Joi.string().required(),\n sessionId: Joi.string().required(),\n main: Joi.array<SubmitRecord>().items(formSubmitRecordSchema).required(),\n repeaters: Joi.array<SubmitRecordset>()\n .items(formSubmitRecordsetSchema)\n .required()\n })\n .required()\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAQrB;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGD,GAAG,CAACE,MAAM,CAAe;EAC7DC,IAAI,EAAEH,GAAG,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC7BC,KAAK,EAAEN,GAAG,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC9BE,KAAK,EAAEP,GAAG,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AAC/B,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,OAAO,MAAMG,yBAAyB,GAAGR,GAAG,CAACE,MAAM,CAAkB;EACnEC,IAAI,EAAEH,GAAG,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC7BC,KAAK,EAAEN,GAAG,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC9BE,KAAK,EAAEP,GAAG,CAACS,KAAK,CAAiB,CAAC,CAC/BC,KAAK,CAACV,GAAG,CAACS,KAAK,CAAe,CAAC,CAACC,KAAK,CAACT,sBAAsB,CAAC,CAACI,QAAQ,CAAC,CAAC,CAAC,CACzEA,QAAQ,CAAC;AACd,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,OAAO,MAAMM,uBAAuB,GAAGX,GAAG,CAACE,MAAM,CAAgB,CAAC,CAC/DU,IAAI,CAAC;EACJC,YAAY,EAAEb,GAAG,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACrCS,SAAS,EAAEd,GAAG,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAClCU,IAAI,EAAEf,GAAG,CAACS,KAAK,CAAe,CAAC,CAACC,KAAK,CAACT,sBAAsB,CAAC,CAACI,QAAQ,CAAC,CAAC;EACxEW,SAAS,EAAEhB,GAAG,CAACS,KAAK,CAAkB,CAAC,CACpCC,KAAK,CAACF,yBAAyB,CAAC,CAChCH,QAAQ,CAAC;AACd,CAAC,CAAC,CACDA,QAAQ,CAAC,CAAC","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-submission/types.ts"],"sourcesContent":["import {\n formSubmitPayloadSchema,\n formSubmitRecordSchema,\n formSubmitRecordsetSchema\n} from '~/src/form/form-submission/index.js'\n\n/**\n * Interface for an individual submit record\n * @see {@link formSubmitRecordSchema}\n */\nexport interface SubmitRecord {\n /**\n * The field name\n */\n name: string\n\n /**\n * The field title\n */\n title: string\n\n /**\n * The field display value\n */\n value: string\n}\n\n/**\n * Interface for an individual submit recordset (e.g. a repeater question set)\n * @see {@link formSubmitRecordsetSchema}\n */\nexport interface SubmitRecordset {\n /**\n * The name of the recordset\n */\n name: string\n\n /**\n * The title of the recordset\n */\n title: string\n\n /**\n * The record items\n */\n value: SubmitRecord[][]\n}\n\n/**\n * Interface for the submission-api `/submit` payload\n * @see {@link formSubmitPayloadSchema}\n */\nexport interface SubmitPayload {\n /**\n * The retrieval key for files created in the submission\n */\n retrievalKey: string\n\n /**\n * The id of the user session\n */\n sessionId: string\n\n /**\n * The main form anwsers\n */\n main: SubmitRecord[]\n\n /**\n * The repeaters form answers\n */\n repeaters: SubmitRecordset[]\n}\n\n/**\n * Interface for the submission-api `/submit` response payload\n */\nexport interface SubmitResponsePayload {\n message: string\n result: {\n files: {\n main: string\n repeaters: Record<string, string>\n }\n }\n}\n"],"mappings":"","ignoreList":[]}
|
package/dist/module/index.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
export * from "./form/form-definition/index.js";
|
2
2
|
export * from "./form/form-metadata/index.js";
|
3
|
+
export * from "./form/form-submission/index.js";
|
3
4
|
export * from "./form/utils/index.js";
|
4
5
|
export * from "./components/index.js";
|
5
6
|
export * from "./conditions/index.js";
|
package/dist/module/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/form/utils/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/pages/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/utils/markdown.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/form/form-submission/index.js'\nexport * from '~/src/form/utils/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/pages/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/utils/markdown.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\nexport type * from '~/src/form/form-submission/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import Joi from 'joi';
|
2
|
+
import { type SubmitPayload, type SubmitRecord, type SubmitRecordset } from '../../form/form-submission/types.js';
|
3
|
+
/**
|
4
|
+
* Joi schema for `SubmitRecord` interface
|
5
|
+
* @see {@link SubmitRecord}
|
6
|
+
*/
|
7
|
+
export declare const formSubmitRecordSchema: Joi.ObjectSchema<SubmitRecord>;
|
8
|
+
/**
|
9
|
+
* Joi schema for `SubmitRecordset` interface
|
10
|
+
* @see {@link SubmitRecordset}
|
11
|
+
*/
|
12
|
+
export declare const formSubmitRecordsetSchema: Joi.ObjectSchema<SubmitRecordset>;
|
13
|
+
/**
|
14
|
+
* Joi schema for `SubmitPayload` interface
|
15
|
+
* @see {@link SubmitPayload}
|
16
|
+
*/
|
17
|
+
export declare const formSubmitPayloadSchema: Joi.ObjectSchema<SubmitPayload>;
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-submission/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAErB,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,qCAAqC,CAAA;AAE5C;;;GAGG;AACH,eAAO,MAAM,sBAAsB,gCAIjC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,mCAMpC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,iCASvB,CAAA"}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
/**
|
2
|
+
* Interface for an individual submit record
|
3
|
+
* @see {@link formSubmitRecordSchema}
|
4
|
+
*/
|
5
|
+
export interface SubmitRecord {
|
6
|
+
/**
|
7
|
+
* The field name
|
8
|
+
*/
|
9
|
+
name: string;
|
10
|
+
/**
|
11
|
+
* The field title
|
12
|
+
*/
|
13
|
+
title: string;
|
14
|
+
/**
|
15
|
+
* The field display value
|
16
|
+
*/
|
17
|
+
value: string;
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* Interface for an individual submit recordset (e.g. a repeater question set)
|
21
|
+
* @see {@link formSubmitRecordsetSchema}
|
22
|
+
*/
|
23
|
+
export interface SubmitRecordset {
|
24
|
+
/**
|
25
|
+
* The name of the recordset
|
26
|
+
*/
|
27
|
+
name: string;
|
28
|
+
/**
|
29
|
+
* The title of the recordset
|
30
|
+
*/
|
31
|
+
title: string;
|
32
|
+
/**
|
33
|
+
* The record items
|
34
|
+
*/
|
35
|
+
value: SubmitRecord[][];
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* Interface for the submission-api `/submit` payload
|
39
|
+
* @see {@link formSubmitPayloadSchema}
|
40
|
+
*/
|
41
|
+
export interface SubmitPayload {
|
42
|
+
/**
|
43
|
+
* The retrieval key for files created in the submission
|
44
|
+
*/
|
45
|
+
retrievalKey: string;
|
46
|
+
/**
|
47
|
+
* The id of the user session
|
48
|
+
*/
|
49
|
+
sessionId: string;
|
50
|
+
/**
|
51
|
+
* The main form anwsers
|
52
|
+
*/
|
53
|
+
main: SubmitRecord[];
|
54
|
+
/**
|
55
|
+
* The repeaters form answers
|
56
|
+
*/
|
57
|
+
repeaters: SubmitRecordset[];
|
58
|
+
}
|
59
|
+
/**
|
60
|
+
* Interface for the submission-api `/submit` response payload
|
61
|
+
*/
|
62
|
+
export interface SubmitResponsePayload {
|
63
|
+
message: string;
|
64
|
+
result: {
|
65
|
+
files: {
|
66
|
+
main: string;
|
67
|
+
repeaters: Record<string, string>;
|
68
|
+
};
|
69
|
+
};
|
70
|
+
}
|
71
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-submission/types.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,EAAE,YAAY,EAAE,EAAE,CAAA;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,IAAI,EAAE,YAAY,EAAE,CAAA;IAEpB;;OAEG;IACH,SAAS,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE;QACN,KAAK,EAAE;YACL,IAAI,EAAE,MAAM,CAAA;YACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAClC,CAAA;KACF,CAAA;CACF"}
|
package/dist/types/index.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
export * from './form/form-definition/index.js';
|
2
2
|
export * from './form/form-metadata/index.js';
|
3
|
+
export * from './form/form-submission/index.js';
|
3
4
|
export * from './form/utils/index.js';
|
4
5
|
export * from './components/index.js';
|
5
6
|
export * from './conditions/index.js';
|
@@ -10,4 +11,5 @@ export type * from './components/types.js';
|
|
10
11
|
export type * from './conditions/types.js';
|
11
12
|
export type * from './form/form-definition/types.js';
|
12
13
|
export type * from './form/form-metadata/types.js';
|
14
|
+
export type * from './form/form-submission/types.js';
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,mCAAmC,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA;AACnD,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,mCAAmC,CAAA;AACtD,mBAAmB,qCAAqC,CAAA"}
|
package/package.json
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
import Joi from 'joi'
|
2
|
+
|
3
|
+
import {
|
4
|
+
type SubmitPayload,
|
5
|
+
type SubmitRecord,
|
6
|
+
type SubmitRecordset
|
7
|
+
} from '~/src/form/form-submission/types.js'
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Joi schema for `SubmitRecord` interface
|
11
|
+
* @see {@link SubmitRecord}
|
12
|
+
*/
|
13
|
+
export const formSubmitRecordSchema = Joi.object<SubmitRecord>({
|
14
|
+
name: Joi.string().required(),
|
15
|
+
title: Joi.string().required(),
|
16
|
+
value: Joi.string().required()
|
17
|
+
})
|
18
|
+
|
19
|
+
/**
|
20
|
+
* Joi schema for `SubmitRecordset` interface
|
21
|
+
* @see {@link SubmitRecordset}
|
22
|
+
*/
|
23
|
+
export const formSubmitRecordsetSchema = Joi.object<SubmitRecordset>({
|
24
|
+
name: Joi.string().required(),
|
25
|
+
title: Joi.string().required(),
|
26
|
+
value: Joi.array<SubmitRecord[]>()
|
27
|
+
.items(Joi.array<SubmitRecord>().items(formSubmitRecordSchema).required())
|
28
|
+
.required()
|
29
|
+
})
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Joi schema for `SubmitPayload` interface
|
33
|
+
* @see {@link SubmitPayload}
|
34
|
+
*/
|
35
|
+
export const formSubmitPayloadSchema = Joi.object<SubmitPayload>()
|
36
|
+
.keys({
|
37
|
+
retrievalKey: Joi.string().required(),
|
38
|
+
sessionId: Joi.string().required(),
|
39
|
+
main: Joi.array<SubmitRecord>().items(formSubmitRecordSchema).required(),
|
40
|
+
repeaters: Joi.array<SubmitRecordset>()
|
41
|
+
.items(formSubmitRecordsetSchema)
|
42
|
+
.required()
|
43
|
+
})
|
44
|
+
.required()
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import {
|
2
|
+
formSubmitPayloadSchema,
|
3
|
+
formSubmitRecordSchema,
|
4
|
+
formSubmitRecordsetSchema
|
5
|
+
} from '~/src/form/form-submission/index.js'
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Interface for an individual submit record
|
9
|
+
* @see {@link formSubmitRecordSchema}
|
10
|
+
*/
|
11
|
+
export interface SubmitRecord {
|
12
|
+
/**
|
13
|
+
* The field name
|
14
|
+
*/
|
15
|
+
name: string
|
16
|
+
|
17
|
+
/**
|
18
|
+
* The field title
|
19
|
+
*/
|
20
|
+
title: string
|
21
|
+
|
22
|
+
/**
|
23
|
+
* The field display value
|
24
|
+
*/
|
25
|
+
value: string
|
26
|
+
}
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Interface for an individual submit recordset (e.g. a repeater question set)
|
30
|
+
* @see {@link formSubmitRecordsetSchema}
|
31
|
+
*/
|
32
|
+
export interface SubmitRecordset {
|
33
|
+
/**
|
34
|
+
* The name of the recordset
|
35
|
+
*/
|
36
|
+
name: string
|
37
|
+
|
38
|
+
/**
|
39
|
+
* The title of the recordset
|
40
|
+
*/
|
41
|
+
title: string
|
42
|
+
|
43
|
+
/**
|
44
|
+
* The record items
|
45
|
+
*/
|
46
|
+
value: SubmitRecord[][]
|
47
|
+
}
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Interface for the submission-api `/submit` payload
|
51
|
+
* @see {@link formSubmitPayloadSchema}
|
52
|
+
*/
|
53
|
+
export interface SubmitPayload {
|
54
|
+
/**
|
55
|
+
* The retrieval key for files created in the submission
|
56
|
+
*/
|
57
|
+
retrievalKey: string
|
58
|
+
|
59
|
+
/**
|
60
|
+
* The id of the user session
|
61
|
+
*/
|
62
|
+
sessionId: string
|
63
|
+
|
64
|
+
/**
|
65
|
+
* The main form anwsers
|
66
|
+
*/
|
67
|
+
main: SubmitRecord[]
|
68
|
+
|
69
|
+
/**
|
70
|
+
* The repeaters form answers
|
71
|
+
*/
|
72
|
+
repeaters: SubmitRecordset[]
|
73
|
+
}
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Interface for the submission-api `/submit` response payload
|
77
|
+
*/
|
78
|
+
export interface SubmitResponsePayload {
|
79
|
+
message: string
|
80
|
+
result: {
|
81
|
+
files: {
|
82
|
+
main: string
|
83
|
+
repeaters: Record<string, string>
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
package/src/index.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
export * from '~/src/form/form-definition/index.js'
|
2
2
|
export * from '~/src/form/form-metadata/index.js'
|
3
|
+
export * from '~/src/form/form-submission/index.js'
|
3
4
|
export * from '~/src/form/utils/index.js'
|
4
5
|
export * from '~/src/components/index.js'
|
5
6
|
export * from '~/src/conditions/index.js'
|
@@ -10,3 +11,4 @@ export type * from '~/src/components/types.js'
|
|
10
11
|
export type * from '~/src/conditions/types.js'
|
11
12
|
export type * from '~/src/form/form-definition/types.js'
|
12
13
|
export type * from '~/src/form/form-metadata/types.js'
|
14
|
+
export type * from '~/src/form/form-submission/types.js'
|