@uides/stepwise 2.0.0-a402a664 → 2.0.0-a64dc016

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 (209) hide show
  1. package/LICENSE +0 -0
  2. package/generators/componentExtractor.d.mts +1 -0
  3. package/generators/componentReducer.d.mts +1 -0
  4. package/generators/templateGenerator.d.mts +1 -0
  5. package/index.d.ts +2 -0
  6. package/index.js +7 -0
  7. package/package.json +6 -21
  8. package/schemas/action.d.ts +2366 -0
  9. package/schemas/action.js +196 -0
  10. package/schemas/application.d.ts +19 -0
  11. package/schemas/application.js +14 -0
  12. package/schemas/attributes.d.ts +16 -0
  13. package/schemas/attributes.js +14 -0
  14. package/schemas/common.d.ts +25 -0
  15. package/schemas/common.js +41 -0
  16. package/schemas/document.d.ts +395 -0
  17. package/schemas/document.js +79 -0
  18. package/schemas/edupass-healthstate.d.ts +77 -0
  19. package/schemas/edupass-healthstate.js +76 -0
  20. package/schemas/field/afm/index.d.ts +52 -0
  21. package/schemas/field/afm/index.js +20 -0
  22. package/schemas/field/amka/index.d.ts +60 -0
  23. package/schemas/field/amka/index.js +21 -0
  24. package/schemas/field/attachment/index.d.ts +68 -0
  25. package/schemas/field/attachment/index.js +38 -0
  26. package/schemas/field/captcha/index.d.ts +48 -0
  27. package/schemas/field/captcha/index.js +15 -0
  28. package/schemas/field/choice/index.d.ts +73 -0
  29. package/schemas/field/choice/index.js +32 -0
  30. package/schemas/field/common.d.ts +82 -0
  31. package/schemas/field/common.js +63 -0
  32. package/schemas/field/consent-content/index.d.ts +68 -0
  33. package/schemas/field/consent-content/index.js +19 -0
  34. package/schemas/field/date/index.d.ts +90 -0
  35. package/schemas/field/date/index.js +42 -0
  36. package/schemas/field/doc_subtitle/index.d.ts +51 -0
  37. package/schemas/field/doc_subtitle/index.js +14 -0
  38. package/schemas/field/doc_title/index.d.ts +60 -0
  39. package/schemas/field/doc_title/index.js +21 -0
  40. package/schemas/field/dynamically-filled-text/index.d.ts +85 -0
  41. package/schemas/field/dynamically-filled-text/index.js +36 -0
  42. package/schemas/field/email/index.d.ts +60 -0
  43. package/schemas/field/email/index.js +21 -0
  44. package/schemas/field/fillable-string/index.d.ts +64 -0
  45. package/schemas/field/fillable-string/index.js +25 -0
  46. package/schemas/field/five-block-date/index.d.ts +48 -0
  47. package/schemas/field/five-block-date/index.js +15 -0
  48. package/schemas/field/hidden/index.d.ts +59 -0
  49. package/schemas/field/hidden/index.js +25 -0
  50. package/schemas/field/hierarchical-selector/index.d.ts +89 -0
  51. package/schemas/field/hierarchical-selector/index.js +35 -0
  52. package/schemas/field/iban/index.d.ts +58 -0
  53. package/schemas/field/iban/index.js +19 -0
  54. package/schemas/field/image/index.d.ts +68 -0
  55. package/schemas/field/image/index.js +36 -0
  56. package/schemas/field/image-crop/index.d.ts +59 -0
  57. package/schemas/field/image-crop/index.js +19 -0
  58. package/schemas/field/index.d.ts +48 -0
  59. package/schemas/field/index.js +167 -0
  60. package/schemas/field/int/index.d.ts +60 -0
  61. package/schemas/field/int/index.js +21 -0
  62. package/schemas/field/intl_mobile_phone/index.d.ts +49 -0
  63. package/schemas/field/intl_mobile_phone/index.js +15 -0
  64. package/schemas/field/lab-results/index.d.ts +49 -0
  65. package/schemas/field/lab-results/index.js +12 -0
  66. package/schemas/field/landline_phone/index.d.ts +48 -0
  67. package/schemas/field/landline_phone/index.js +14 -0
  68. package/schemas/field/link/index.d.ts +50 -0
  69. package/schemas/field/link/index.js +16 -0
  70. package/schemas/field/mobile_phone/index.d.ts +51 -0
  71. package/schemas/field/mobile_phone/index.js +18 -0
  72. package/schemas/field/multiple-choice/index.d.ts +70 -0
  73. package/schemas/field/multiple-choice/index.js +31 -0
  74. package/schemas/field/password/index.d.ts +48 -0
  75. package/schemas/field/password/index.js +15 -0
  76. package/schemas/field/pdf-image/index.d.ts +66 -0
  77. package/schemas/field/pdf-image/index.js +27 -0
  78. package/schemas/field/phone/index.d.ts +48 -0
  79. package/schemas/field/phone/index.js +14 -0
  80. package/schemas/field/postal_code/index.d.ts +50 -0
  81. package/schemas/field/postal_code/index.js +17 -0
  82. package/schemas/field/preference-multiple-choice/index.d.ts +90 -0
  83. package/schemas/field/preference-multiple-choice/index.js +31 -0
  84. package/schemas/field/qrcode/index.d.ts +71 -0
  85. package/schemas/field/qrcode/index.js +30 -0
  86. package/schemas/field/quote/index.d.ts +63 -0
  87. package/schemas/field/quote/index.js +30 -0
  88. package/schemas/field/radio-choice/index.d.ts +67 -0
  89. package/schemas/field/radio-choice/index.js +31 -0
  90. package/schemas/field/rate/index.d.ts +60 -0
  91. package/schemas/field/rate/index.js +18 -0
  92. package/schemas/field/recipient/index.d.ts +51 -0
  93. package/schemas/field/recipient/index.js +20 -0
  94. package/schemas/field/redirect/index.d.ts +52 -0
  95. package/schemas/field/redirect/index.js +15 -0
  96. package/schemas/field/refcode/index.d.ts +68 -0
  97. package/schemas/field/refcode/index.js +29 -0
  98. package/schemas/field/string/index.d.ts +135 -0
  99. package/schemas/field/string/index.js +80 -0
  100. package/schemas/field/text/index.d.ts +85 -0
  101. package/schemas/field/text/index.js +45 -0
  102. package/schemas/field/three-block-date/index.d.ts +64 -0
  103. package/schemas/field/three-block-date/index.js +26 -0
  104. package/schemas/field/url-param/index.d.ts +57 -0
  105. package/schemas/field/url-param/index.js +14 -0
  106. package/schemas/fieldset/component-params.d.ts +102 -0
  107. package/schemas/fieldset/component-params.js +63 -0
  108. package/schemas/fieldset/display-components.d.ts +353 -0
  109. package/schemas/fieldset/display-components.js +36 -0
  110. package/schemas/fieldset/enums.d.ts +32 -0
  111. package/schemas/fieldset/enums.js +21 -0
  112. package/schemas/fieldset/index.d.ts +180 -0
  113. package/schemas/fieldset/index.js +11 -0
  114. package/schemas/index.d.ts +15 -0
  115. package/schemas/index.js +15 -0
  116. package/schemas/layout.d.ts +91 -0
  117. package/schemas/layout.js +43 -0
  118. package/schemas/outputs.d.ts +44 -0
  119. package/schemas/outputs.js +15 -0
  120. package/schemas/resolve.d.ts +5 -0
  121. package/schemas/resolve.js +13 -0
  122. package/schemas/resource/enums.d.ts +58 -0
  123. package/schemas/resource/enums.js +41 -0
  124. package/schemas/resource/field.d.ts +15 -0
  125. package/schemas/resource/field.js +12 -0
  126. package/schemas/resource/index.d.ts +5 -0
  127. package/schemas/resource/index.js +5 -0
  128. package/schemas/resource/object-action.d.ts +30 -0
  129. package/schemas/resource/object-action.js +24 -0
  130. package/schemas/resource/resource-action.d.ts +35 -0
  131. package/schemas/resource/resource-action.js +29 -0
  132. package/schemas/resource/resource.d.ts +133 -0
  133. package/schemas/resource/resource.js +31 -0
  134. package/schemas/step.d.ts +592 -0
  135. package/schemas/step.js +115 -0
  136. package/schemas/template/index.d.ts +2 -0
  137. package/schemas/template/index.js +2 -0
  138. package/schemas/template/template-base.d.ts +53 -0
  139. package/schemas/template/template-base.js +15 -0
  140. package/schemas/template/template-source.d.ts +50 -0
  141. package/schemas/template/template-source.js +14 -0
  142. package/schemas/template/template.d.ts +54 -0
  143. package/schemas/template/template.js +22 -0
  144. package/schemas/validation-context/enums.d.ts +10 -0
  145. package/schemas/validation-context/enums.js +7 -0
  146. package/schemas/validation-context/index.d.ts +2 -0
  147. package/schemas/validation-context/index.js +2 -0
  148. package/schemas/validation-context/validation-context.d.ts +131 -0
  149. package/schemas/validation-context/validation-context.js +55 -0
  150. package/src/schemas/action.ts +15 -0
  151. package/src/schemas/common.ts +16 -0
  152. package/src/schemas/field/afm/index.ts +2 -18
  153. package/src/schemas/field/amka/index.ts +7 -2
  154. package/src/schemas/field/attachment/index.ts +12 -24
  155. package/src/schemas/field/choice/index.ts +2 -13
  156. package/src/schemas/field/common.ts +75 -51
  157. package/src/schemas/field/consent-content/index.ts +28 -0
  158. package/src/schemas/field/date/index.ts +5 -32
  159. package/src/schemas/field/doc_subtitle/index.ts +1 -0
  160. package/src/schemas/field/doc_title/index.ts +9 -16
  161. package/src/schemas/field/dynamically-filled-text/index.ts +4 -5
  162. package/src/schemas/field/email/index.ts +6 -9
  163. package/src/schemas/field/fillable-string/index.ts +1 -1
  164. package/src/schemas/field/hidden/index.ts +4 -43
  165. package/src/schemas/field/hierarchical-selector/index.ts +3 -9
  166. package/src/schemas/field/image/index.ts +5 -24
  167. package/src/schemas/field/image-crop/index.ts +25 -0
  168. package/src/schemas/field/index.spec.ts +0 -42
  169. package/src/schemas/field/index.ts +64 -12
  170. package/src/schemas/field/int/index.ts +2 -0
  171. package/src/schemas/field/intl_mobile_phone/index.ts +19 -0
  172. package/src/schemas/field/lab-results/index.ts +1 -2
  173. package/src/schemas/field/link/index.ts +20 -0
  174. package/src/schemas/field/mobile_phone/index.ts +1 -12
  175. package/src/schemas/field/multiple-choice/index.ts +4 -3
  176. package/src/schemas/field/password/index.ts +18 -0
  177. package/src/schemas/field/pdf-image/index.ts +3 -15
  178. package/src/schemas/field/phone/index.ts +18 -0
  179. package/src/schemas/field/postal_code/index.ts +1 -1
  180. package/src/schemas/field/preference-multiple-choice/index.ts +41 -0
  181. package/src/schemas/field/qrcode/index.ts +1 -0
  182. package/src/schemas/field/quote/index.ts +2 -19
  183. package/src/schemas/field/radio-choice/index.ts +1 -7
  184. package/src/schemas/field/rate/index.ts +1 -9
  185. package/src/schemas/field/recipient/index.ts +2 -2
  186. package/src/schemas/field/redirect/index.ts +4 -13
  187. package/src/schemas/field/refcode/index.ts +10 -15
  188. package/src/schemas/field/string/index.ts +13 -0
  189. package/src/schemas/field/text/index.ts +4 -18
  190. package/src/schemas/field/url-param/index.ts +23 -0
  191. package/src/schemas/resolve.ts +3 -0
  192. package/src/schemas/step.ts +2 -0
  193. package/src/schemas/template/index.ts +0 -1
  194. package/src/schemas/template/template-base.ts +0 -10
  195. package/src/schemas/template/template.ts +1 -2
  196. package/src/schemas/validation-context/enums.ts +0 -16
  197. package/src/schemas/validation-context/validation-context.ts +2 -4
  198. package/src/utils/index.ts +10 -1
  199. package/utils/index.d.ts +6 -0
  200. package/utils/index.js +55 -0
  201. package/.prettierrc.js +0 -1
  202. package/.rush/temp/chunked-rush-logs/stepwise.build.chunks.jsonl +0 -6
  203. package/.rush/temp/package-deps_build.json +0 -185
  204. package/.rush/temp/shrinkwrap-deps.json +0 -303
  205. package/eslint.config.mjs +0 -3
  206. package/rush-logs/stepwise.build.log +0 -6
  207. package/src/schemas/field/green-pass-qrcode/index.ts +0 -27
  208. package/src/schemas/template/enums.ts +0 -22
  209. package/tsconfig.json +0 -25
@@ -0,0 +1,115 @@
1
+ import { any, array, boolean as external_valibot_boolean, nullish, number, object, picklist, pipe, record, strictObject, string } from "valibot";
2
+ import { ActionsSchema } from "./action.js";
3
+ import { ComponentLayoutSchema, DisplayLangSchema, DisplayModeSchema, validateField } from "./common.js";
4
+ import { FieldsSchema } from "./field/index.js";
5
+ import { FieldsetsSchema } from "./fieldset/index.js";
6
+ const ManifestAttachmentSchema = strictObject({
7
+ field_name: string(),
8
+ retrieval_scope: nullish(string()),
9
+ 'manifest-position': picklist([
10
+ 'no',
11
+ 'begin',
12
+ 'end'
13
+ ]),
14
+ 'attachment-handler': nullish(string())
15
+ });
16
+ const StepDisplayContentSchema = strictObject({
17
+ title: nullish(string()),
18
+ captionLeft: nullish(string()),
19
+ serviceName: nullish(string()),
20
+ serviceURL: nullish(string()),
21
+ serviceLogo: nullish(string()),
22
+ serviceLogoURL: nullish(string()),
23
+ footerContent: nullish(string()),
24
+ footerLogo: nullish(string()),
25
+ footerTop: nullish(external_valibot_boolean()),
26
+ termsTitle: nullish(string()),
27
+ termsURL: nullish(string()),
28
+ fontName: nullish(string()),
29
+ 'page-numbering': nullish(external_valibot_boolean()),
30
+ 'signature-position': nullish(array(number())),
31
+ 'signature-page': nullish(picklist([
32
+ 'first',
33
+ 'last'
34
+ ])),
35
+ 'state-label': nullish(record(picklist([
36
+ 'editing',
37
+ 'issued'
38
+ ]), string())),
39
+ 'sidebar-state-label': nullish(string()),
40
+ 'sidebar-refcode-label': nullish(string()),
41
+ 'sidebar-template-label': nullish(string()),
42
+ 'sidebar-issuedate-label': nullish(string()),
43
+ 'success-message': nullish(string()),
44
+ 'success-code-message': nullish(string()),
45
+ 'as-manifest-for-attachment': nullish(ManifestAttachmentSchema),
46
+ layout: nullish(ComponentLayoutSchema),
47
+ pagesize: nullish(string())
48
+ });
49
+ const StepDisplaySchema = record(DisplayModeSchema, record(DisplayLangSchema, StepDisplayContentSchema));
50
+ const PossibleNextStepsSchema = strictObject({
51
+ documentation: strictObject({
52
+ label: string()
53
+ })
54
+ });
55
+ const StepSchema = pipe(strictObject({
56
+ actions: nullish(ActionsSchema),
57
+ 'action-order': string(),
58
+ fields: nullish(FieldsSchema),
59
+ fieldsets: nullish(FieldsetsSchema),
60
+ 'fieldset-order': string(),
61
+ possible_next_steps: nullish(record(string(), PossibleNextStepsSchema)),
62
+ 'field-compute-order': nullish(string()),
63
+ next_step: nullish(string()),
64
+ pre_access_hook: nullish(string()),
65
+ decide_next_step: nullish(string()),
66
+ display: StepDisplaySchema,
67
+ validator: nullish(string()),
68
+ 'is-final-view': nullish(external_valibot_boolean()),
69
+ validation_dynamic_info: nullish(string()),
70
+ 'has-display-fields': nullish(external_valibot_boolean()),
71
+ targets: nullish(array(record(string(), any()))),
72
+ 'post-step-claims': nullish(array(string()))
73
+ }), validateField('fieldsets', (fieldsets, step)=>{
74
+ if (!fieldsets || !step.fields) return true;
75
+ const fieldsSpec = step.fields;
76
+ for (const fieldset of Object.values(fieldsets))if (!validateOrderOnSet(fieldset['field-order'], fieldsSpec)) return false;
77
+ return true;
78
+ }), validateField('fieldset-order', (fieldsetOrder, step)=>{
79
+ if (!fieldsetOrder || !step.fieldsets) return true;
80
+ return validateOrderOnSet(fieldsetOrder, step.fieldsets);
81
+ }), validateField('action-order', (actionOrder, step)=>{
82
+ if (!actionOrder || !step.actions) return true;
83
+ return validateOrderOnSet(actionOrder, step.actions);
84
+ }), validateField('decide_next_step', (decideNextStep, step)=>{
85
+ if (!decideNextStep) return true;
86
+ const possibleNextSteps = Object.keys(step.possible_next_steps || {});
87
+ if (!possibleNextSteps.length) return false;
88
+ return true;
89
+ }), validateField('fields', (fields, step)=>{
90
+ const actions = step.actions;
91
+ const actionOrder = step['action-order'];
92
+ if (!actionOrder.split(' ').includes('update')) return true;
93
+ if (actions && actions['update'] && 'component-params' in actions['update'] && actions['update']['component-params'] && 'ensure-no-input' in actions['update']['component-params'] && actions['update']['component-params']['ensure-no-input']) {
94
+ for (const field of Object.values(fields || {}))if ('noinput' !== field['user-input-mode'] && 'display' !== field['user-input-mode']) return false;
95
+ }
96
+ return true;
97
+ }), validateField('fields', (fields)=>{
98
+ for (const field of Object.values(fields || {}))if (('required' === field['user-input-mode'] || 'optional' === field['user-input-mode']) && !field.display) return false;
99
+ return true;
100
+ }));
101
+ function validateOrderOnSet(orderString, setSpec) {
102
+ if (!orderString) return true;
103
+ const existingElems = Object.keys(setSpec);
104
+ for (const elem of orderString.split(' '))if (!existingElems.includes(elem)) return false;
105
+ return true;
106
+ }
107
+ const StepsSchema = record(string(), StepSchema);
108
+ const StepsSpecSchema = object({
109
+ 'steps-order': string(),
110
+ collectable: nullish(external_valibot_boolean()),
111
+ sign: nullish(external_valibot_boolean()),
112
+ steps: StepsSchema,
113
+ 'intro-step': nullish(StepSchema)
114
+ });
115
+ export { StepDisplayContentSchema, StepSchema, StepsSpecSchema };
@@ -0,0 +1,2 @@
1
+ export * from './template-source.js';
2
+ export * from './template.js';
@@ -0,0 +1,2 @@
1
+ export * from "./template-source.js";
2
+ export * from "./template.js";
@@ -0,0 +1,53 @@
1
+ import * as v from 'valibot';
2
+ import { StepsSpecSchemaType } from '../step.js';
3
+ /**
4
+ * Describes a template
5
+ *
6
+ * A template is a set of steps that the user must complete in order to complete a process
7
+ * in the system, whether that is the issuance of a document or the entry of a request.
8
+ */
9
+ export declare const TemplateBaseSchema: v.StrictObjectSchema<{
10
+ /**
11
+ * Template's creation date
12
+ */
13
+ readonly created_at: v.NullishSchema<v.StringSchema<undefined>, undefined>;
14
+ /** Brief summary of template */
15
+ readonly description: v.StringSchema<undefined>;
16
+ readonly id: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
17
+ /**
18
+ * Defines the fields that are used to index documents
19
+ *
20
+ * A list of fields of the document, that are used to index multiple documents upon their
21
+ * presentation to the user's gate interface.
22
+ */
23
+ readonly index_by_fields: v.NullishSchema<v.StringSchema<undefined>, undefined>;
24
+ /**
25
+ * Whether the template is officially published or not.
26
+ *
27
+ * If true then template is officially published and functional.
28
+ * Otherwise it is considered a draft and the documents it produces are not valid.
29
+ * @default true
30
+ */
31
+ readonly is_official: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
32
+ /**
33
+ * Codename of the gate that owns the template
34
+ *
35
+ * An entity's gate can be the owner of a template. If not specified, the template is considered
36
+ * to be owned by the "System".
37
+ */
38
+ readonly owner: v.StringSchema<undefined>;
39
+ /** The template's unique identifier */
40
+ readonly refname: v.StringSchema<undefined>;
41
+ /**
42
+ * List of templates with which replies to the document can be issued.
43
+ */
44
+ readonly reply_templates: v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
45
+ /** Brief title of template */
46
+ readonly shortname: v.StringSchema<undefined>;
47
+ /**
48
+ * Specification of the steps of the template.
49
+ */
50
+ readonly steps_spec: v.NullishSchema<StepsSpecSchemaType, undefined>;
51
+ }, undefined>;
52
+ export type TemplateBase = v.InferOutput<typeof TemplateBaseSchema>;
53
+ export default TemplateBase;
@@ -0,0 +1,15 @@
1
+ import { array, boolean as external_valibot_boolean, nullish, number, strictObject, string } from "valibot";
2
+ import { StepsSpecSchema } from "../step.js";
3
+ const TemplateBaseSchema = strictObject({
4
+ created_at: nullish(string()),
5
+ description: string(),
6
+ id: nullish(number()),
7
+ index_by_fields: nullish(string()),
8
+ is_official: nullish(external_valibot_boolean()),
9
+ owner: string(),
10
+ refname: string(),
11
+ reply_templates: nullish(array(string())),
12
+ shortname: string(),
13
+ steps_spec: nullish(StepsSpecSchema)
14
+ });
15
+ export { TemplateBaseSchema };
@@ -0,0 +1,50 @@
1
+ import * as v from 'valibot';
2
+ /**
3
+ * Template model used in the backend.
4
+ *
5
+ * This describes the template as it is stored in the database. Some of the fields present in the
6
+ * backend model are not used in the frontend type.
7
+ *
8
+ * @see {@link TemplateBase} for the definition of a template.
9
+ */
10
+ export declare const TemplateSourceSchema: v.StrictObjectSchema<{
11
+ /**
12
+ * Action to execute when the document is issued.
13
+ */
14
+ readonly action_on_issue: v.NullishSchema<v.StringSchema<undefined>, undefined>;
15
+ readonly case_prefixes: v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
16
+ /**
17
+ * Claims that are not checked for in the user's session
18
+ */
19
+ readonly exempted_claims: v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
20
+ /**
21
+ * Extra claims to check for in the user's session.
22
+ *
23
+ * When creating a new declaration that includes the template, the application checks
24
+ * that the session contains all the claims specified in this field.
25
+ */
26
+ readonly extra_required_claims: v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
27
+ readonly posting_whitelist: v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
28
+ /**
29
+ * Whether a case number is assigned on instantiation of the template.
30
+ * @default false
31
+ */
32
+ readonly requires_case: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
33
+ readonly validation_context: v.NullishSchema<v.StringSchema<undefined>, undefined>;
34
+ /**
35
+ * Defines the access policy of th document in the validation phase
36
+ */
37
+ readonly validation_policy: v.NullishSchema<v.StringSchema<undefined>, undefined>;
38
+ readonly created_at: v.NullishSchema<v.StringSchema<undefined>, undefined>;
39
+ readonly description: v.StringSchema<undefined>;
40
+ readonly id: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
41
+ readonly index_by_fields: v.NullishSchema<v.StringSchema<undefined>, undefined>;
42
+ readonly is_official: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
43
+ readonly owner: v.StringSchema<undefined>;
44
+ readonly refname: v.StringSchema<undefined>;
45
+ readonly reply_templates: v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
46
+ readonly shortname: v.StringSchema<undefined>;
47
+ readonly steps_spec: v.NullishSchema<import("../index.js").StepsSpecSchemaType, undefined>;
48
+ }, undefined>;
49
+ export type TemplateSource = v.InferOutput<typeof TemplateSourceSchema>;
50
+ export default TemplateSource;
@@ -0,0 +1,14 @@
1
+ import { array, boolean as external_valibot_boolean, nullish, strictObject, string } from "valibot";
2
+ import { TemplateBaseSchema } from "./template-base.js";
3
+ const TemplateSourceSchema = strictObject({
4
+ ...TemplateBaseSchema.entries,
5
+ action_on_issue: nullish(string()),
6
+ case_prefixes: nullish(array(string())),
7
+ exempted_claims: nullish(array(string())),
8
+ extra_required_claims: nullish(array(string())),
9
+ posting_whitelist: nullish(array(string())),
10
+ requires_case: nullish(external_valibot_boolean()),
11
+ validation_context: nullish(string()),
12
+ validation_policy: nullish(string())
13
+ });
14
+ export { TemplateSourceSchema };
@@ -0,0 +1,54 @@
1
+ import * as v from 'valibot';
2
+ /**
3
+ * Template type used in the frontend.
4
+ *
5
+ * This describes the template as it is returned by the API to the frontend.
6
+ * Some of the fields present in the backend model are not used in the frontend type.
7
+ *
8
+ * @see {@link TemplateBase} for the definition of a template.
9
+ */
10
+ export declare const TemplateSchema: v.StrictObjectSchema<{
11
+ /**
12
+ * Whether the template is enabled or not.
13
+ */
14
+ readonly enabled: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
15
+ readonly template_type: v.StrictObjectSchema<{
16
+ /** @default 'application' */
17
+ readonly refname: v.StringSchema<undefined>;
18
+ /** @default [] */
19
+ readonly fields: v.ArraySchema<v.AnySchema, undefined>;
20
+ }, undefined>;
21
+ readonly consent_method: v.PicklistSchema<["login", "otp", "gov_wallet_or_otp"], undefined>;
22
+ /**
23
+ * Recipient's business title
24
+ * @deprecated
25
+ */
26
+ readonly recipient_hint: v.NullishSchema<v.StringSchema<undefined>, undefined>;
27
+ /**
28
+ * Claims that the application checks for in the user's session.
29
+ *
30
+ * @default ['mobile_certified_login','is_citizen_user','govgr_login']
31
+ */
32
+ readonly required_claims: v.ArraySchema<v.StringSchema<undefined>, undefined>;
33
+ /**
34
+ * Codename of the gate that owns the template
35
+ *
36
+ * An entity's gate can be the owner of a template. If not specified, the template is considered
37
+ * to be owned by the "System".
38
+ */
39
+ readonly owner: v.NullishSchema<v.StringSchema<undefined>, undefined>;
40
+ readonly login_endpoint: v.NullishSchema<v.StringSchema<undefined>, undefined>;
41
+ readonly fields: v.NullishSchema<v.ArraySchema<v.AnySchema, undefined>, undefined>;
42
+ readonly 'ui:legacy_renderer': v.BooleanSchema<undefined>;
43
+ readonly created_at: v.NullishSchema<v.StringSchema<undefined>, undefined>;
44
+ readonly description: v.StringSchema<undefined>;
45
+ readonly id: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
46
+ readonly index_by_fields: v.NullishSchema<v.StringSchema<undefined>, undefined>;
47
+ readonly is_official: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
48
+ readonly refname: v.StringSchema<undefined>;
49
+ readonly reply_templates: v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
50
+ readonly shortname: v.StringSchema<undefined>;
51
+ readonly steps_spec: v.NullishSchema<import("../index.js").StepsSpecSchemaType, undefined>;
52
+ }, undefined>;
53
+ export type Template = v.InferOutput<typeof TemplateSchema>;
54
+ export default Template;
@@ -0,0 +1,22 @@
1
+ import { any, array, boolean as external_valibot_boolean, nullish, picklist, strictObject, string } from "valibot";
2
+ import { TemplateBaseSchema } from "./template-base.js";
3
+ const TemplateSchema = strictObject({
4
+ ...TemplateBaseSchema.entries,
5
+ enabled: nullish(external_valibot_boolean()),
6
+ template_type: strictObject({
7
+ refname: string(),
8
+ fields: array(any())
9
+ }),
10
+ consent_method: picklist([
11
+ 'login',
12
+ 'otp',
13
+ 'gov_wallet_or_otp'
14
+ ]),
15
+ recipient_hint: nullish(string()),
16
+ required_claims: array(string()),
17
+ owner: nullish(string()),
18
+ login_endpoint: nullish(string()),
19
+ fields: nullish(array(any())),
20
+ 'ui:legacy_renderer': external_valibot_boolean()
21
+ });
22
+ export { TemplateSchema };
@@ -0,0 +1,10 @@
1
+ import * as v from 'valibot';
2
+ /**
3
+ * Validation field component type.
4
+ *
5
+ * @value 'validate-document-string' Validate document string.
6
+ * @value 'validate-document-qrcode' Validate document QR code.
7
+ * @value 'paragraph' Paragraph.
8
+ */
9
+ export declare const ValidationFieldComponentSchema: v.PicklistSchema<["validate-document-string", "validate-document-qrcode", "paragraph"], undefined>;
10
+ export type ValidationFieldComponent = v.InferOutput<typeof ValidationFieldComponentSchema>;
@@ -0,0 +1,7 @@
1
+ import { picklist } from "valibot";
2
+ const ValidationFieldComponentSchema = picklist([
3
+ 'validate-document-string',
4
+ 'validate-document-qrcode',
5
+ 'paragraph'
6
+ ]);
7
+ export { ValidationFieldComponentSchema };
@@ -0,0 +1,2 @@
1
+ export * from './validation-context.js';
2
+ export * from './enums.js';
@@ -0,0 +1,2 @@
1
+ export * from "./validation-context.js";
2
+ export * from "./enums.js";
@@ -0,0 +1,131 @@
1
+ import * as v from 'valibot';
2
+ export declare const ValidationComponentParamsSchema: v.StrictObjectSchema<{
3
+ readonly title: v.NullishSchema<v.StringSchema<undefined>, undefined>;
4
+ readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
5
+ readonly text: v.NullishSchema<v.StringSchema<undefined>, undefined>;
6
+ readonly helptext: v.NullishSchema<v.StringSchema<undefined>, undefined>;
7
+ readonly 'action-label': v.NullishSchema<v.StringSchema<undefined>, undefined>;
8
+ readonly 'action-cancel-label': v.NullishSchema<v.StringSchema<undefined>, undefined>;
9
+ readonly 'error-messages': v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
10
+ readonly note: v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>;
11
+ }, undefined>;
12
+ export declare const ValidationFieldSchema: v.StrictObjectSchema<{
13
+ readonly display: v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
14
+ readonly component: v.NullishSchema<v.PicklistSchema<["validate-document-string", "validate-document-qrcode", "paragraph"], undefined>, undefined>;
15
+ readonly 'component-params': v.NullishSchema<v.UnionSchema<[v.StrictObjectSchema<{
16
+ readonly title: v.NullishSchema<v.StringSchema<undefined>, undefined>;
17
+ readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
18
+ readonly text: v.NullishSchema<v.StringSchema<undefined>, undefined>;
19
+ readonly helptext: v.NullishSchema<v.StringSchema<undefined>, undefined>;
20
+ readonly 'action-label': v.NullishSchema<v.StringSchema<undefined>, undefined>;
21
+ readonly 'action-cancel-label': v.NullishSchema<v.StringSchema<undefined>, undefined>;
22
+ readonly 'error-messages': v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
23
+ readonly note: v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>;
24
+ }, undefined>, v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>], undefined>, undefined>;
25
+ readonly layout: v.NullishSchema<v.StrictObjectSchema<{
26
+ readonly grid: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
27
+ readonly xs: v.NullishSchema<v.StringSchema<undefined>, undefined>;
28
+ readonly sm: v.NullishSchema<v.StringSchema<undefined>, undefined>;
29
+ readonly md: v.NullishSchema<v.StringSchema<undefined>, undefined>;
30
+ readonly lg: v.NullishSchema<v.StringSchema<undefined>, undefined>;
31
+ readonly xl: v.NullishSchema<v.StringSchema<undefined>, undefined>;
32
+ }, undefined>, undefined>;
33
+ }, undefined>, undefined>, undefined>;
34
+ readonly 'user-input-mode': v.PicklistSchema<["required", "optional", "noinput", "display"], undefined>;
35
+ }, undefined>;
36
+ export declare const ValidationFieldsetSchema: v.StrictObjectSchema<{
37
+ readonly display: v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
38
+ readonly component: v.NullishSchema<v.LiteralSchema<"form", undefined>, undefined>;
39
+ readonly layout: v.NullishSchema<v.StrictObjectSchema<{
40
+ readonly grid: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
41
+ readonly xs: v.NullishSchema<v.StringSchema<undefined>, undefined>;
42
+ readonly sm: v.NullishSchema<v.StringSchema<undefined>, undefined>;
43
+ readonly md: v.NullishSchema<v.StringSchema<undefined>, undefined>;
44
+ readonly lg: v.NullishSchema<v.StringSchema<undefined>, undefined>;
45
+ readonly xl: v.NullishSchema<v.StringSchema<undefined>, undefined>;
46
+ }, undefined>, undefined>;
47
+ }, undefined>, undefined>, undefined>;
48
+ readonly 'field-order': v.StringSchema<undefined>;
49
+ }, undefined>;
50
+ export declare const ValidationContextDisplaySchema: v.StrictObjectSchema<{
51
+ readonly serviceName: v.NullishSchema<v.StringSchema<undefined>, undefined>;
52
+ readonly serviceURL: v.NullishSchema<v.StringSchema<undefined>, undefined>;
53
+ readonly backlink: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
54
+ readonly layout: v.NullishSchema<v.StrictObjectSchema<{
55
+ readonly grid: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
56
+ readonly xs: v.NullishSchema<v.StringSchema<undefined>, undefined>;
57
+ readonly sm: v.NullishSchema<v.StringSchema<undefined>, undefined>;
58
+ readonly md: v.NullishSchema<v.StringSchema<undefined>, undefined>;
59
+ readonly lg: v.NullishSchema<v.StringSchema<undefined>, undefined>;
60
+ readonly xl: v.NullishSchema<v.StringSchema<undefined>, undefined>;
61
+ }, undefined>, undefined>;
62
+ readonly i18n: v.NullishSchema<v.StrictObjectSchema<{
63
+ readonly languages: v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
64
+ readonly label: v.StringSchema<undefined>;
65
+ }, undefined>, undefined>;
66
+ readonly 'language-order': v.StringSchema<undefined>;
67
+ readonly 'default-language': v.PicklistSchema<["default", "el", "en", "fr"], undefined>;
68
+ }, undefined>, undefined>;
69
+ }, undefined>;
70
+ export declare const ValidationContextSchema: v.StrictObjectSchema<{
71
+ readonly display: v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
72
+ readonly serviceName: v.NullishSchema<v.StringSchema<undefined>, undefined>;
73
+ readonly serviceURL: v.NullishSchema<v.StringSchema<undefined>, undefined>;
74
+ readonly backlink: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
75
+ readonly layout: v.NullishSchema<v.StrictObjectSchema<{
76
+ readonly grid: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
77
+ readonly xs: v.NullishSchema<v.StringSchema<undefined>, undefined>;
78
+ readonly sm: v.NullishSchema<v.StringSchema<undefined>, undefined>;
79
+ readonly md: v.NullishSchema<v.StringSchema<undefined>, undefined>;
80
+ readonly lg: v.NullishSchema<v.StringSchema<undefined>, undefined>;
81
+ readonly xl: v.NullishSchema<v.StringSchema<undefined>, undefined>;
82
+ }, undefined>, undefined>;
83
+ readonly i18n: v.NullishSchema<v.StrictObjectSchema<{
84
+ readonly languages: v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
85
+ readonly label: v.StringSchema<undefined>;
86
+ }, undefined>, undefined>;
87
+ readonly 'language-order': v.StringSchema<undefined>;
88
+ readonly 'default-language': v.PicklistSchema<["default", "el", "en", "fr"], undefined>;
89
+ }, undefined>, undefined>;
90
+ }, undefined>, undefined>, undefined>;
91
+ readonly fields: v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
92
+ readonly display: v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
93
+ readonly component: v.NullishSchema<v.PicklistSchema<["validate-document-string", "validate-document-qrcode", "paragraph"], undefined>, undefined>;
94
+ readonly 'component-params': v.NullishSchema<v.UnionSchema<[v.StrictObjectSchema<{
95
+ readonly title: v.NullishSchema<v.StringSchema<undefined>, undefined>;
96
+ readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
97
+ readonly text: v.NullishSchema<v.StringSchema<undefined>, undefined>;
98
+ readonly helptext: v.NullishSchema<v.StringSchema<undefined>, undefined>;
99
+ readonly 'action-label': v.NullishSchema<v.StringSchema<undefined>, undefined>;
100
+ readonly 'action-cancel-label': v.NullishSchema<v.StringSchema<undefined>, undefined>;
101
+ readonly 'error-messages': v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>, undefined>;
102
+ readonly note: v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>;
103
+ }, undefined>, v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>], undefined>, undefined>;
104
+ readonly layout: v.NullishSchema<v.StrictObjectSchema<{
105
+ readonly grid: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
106
+ readonly xs: v.NullishSchema<v.StringSchema<undefined>, undefined>;
107
+ readonly sm: v.NullishSchema<v.StringSchema<undefined>, undefined>;
108
+ readonly md: v.NullishSchema<v.StringSchema<undefined>, undefined>;
109
+ readonly lg: v.NullishSchema<v.StringSchema<undefined>, undefined>;
110
+ readonly xl: v.NullishSchema<v.StringSchema<undefined>, undefined>;
111
+ }, undefined>, undefined>;
112
+ }, undefined>, undefined>, undefined>;
113
+ readonly 'user-input-mode': v.PicklistSchema<["required", "optional", "noinput", "display"], undefined>;
114
+ }, undefined>, undefined>;
115
+ readonly fieldsets: v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
116
+ readonly display: v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
117
+ readonly component: v.NullishSchema<v.LiteralSchema<"form", undefined>, undefined>;
118
+ readonly layout: v.NullishSchema<v.StrictObjectSchema<{
119
+ readonly grid: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
120
+ readonly xs: v.NullishSchema<v.StringSchema<undefined>, undefined>;
121
+ readonly sm: v.NullishSchema<v.StringSchema<undefined>, undefined>;
122
+ readonly md: v.NullishSchema<v.StringSchema<undefined>, undefined>;
123
+ readonly lg: v.NullishSchema<v.StringSchema<undefined>, undefined>;
124
+ readonly xl: v.NullishSchema<v.StringSchema<undefined>, undefined>;
125
+ }, undefined>, undefined>;
126
+ }, undefined>, undefined>, undefined>;
127
+ readonly 'field-order': v.StringSchema<undefined>;
128
+ }, undefined>, undefined>;
129
+ readonly 'action-order': v.StringSchema<undefined>;
130
+ readonly 'fieldset-order': v.StringSchema<undefined>;
131
+ }, undefined>;
@@ -0,0 +1,55 @@
1
+ import { any, boolean as external_valibot_boolean, literal, nullish, record, strictObject, string, union } from "valibot";
2
+ import { ComponentLayoutSchema, DisplayLangSchema, DisplayModeSchema, UserInputModeSchema } from "../common.js";
3
+ import { ValidationFieldComponentSchema } from "./enums.js";
4
+ const ValidationComponentParamsSchema = strictObject({
5
+ title: nullish(string()),
6
+ label: nullish(string()),
7
+ text: nullish(string()),
8
+ helptext: nullish(string()),
9
+ 'action-label': nullish(string()),
10
+ 'action-cancel-label': nullish(string()),
11
+ 'error-messages': nullish(record(string(), string())),
12
+ note: record(string(), any())
13
+ });
14
+ const ValidationFieldDisplaySchema = strictObject({
15
+ component: nullish(ValidationFieldComponentSchema),
16
+ 'component-params': nullish(union([
17
+ ValidationComponentParamsSchema,
18
+ record(string(), any())
19
+ ])),
20
+ layout: nullish(ComponentLayoutSchema)
21
+ });
22
+ const ValidationFieldSchema = strictObject({
23
+ display: record(DisplayModeSchema, record(DisplayLangSchema, ValidationFieldDisplaySchema)),
24
+ 'user-input-mode': UserInputModeSchema
25
+ });
26
+ const ValidationFieldsetDisplaySchema = strictObject({
27
+ component: nullish(literal('form')),
28
+ layout: nullish(ComponentLayoutSchema)
29
+ });
30
+ const ValidationFieldsetSchema = strictObject({
31
+ display: record(DisplayModeSchema, record(DisplayLangSchema, ValidationFieldsetDisplaySchema)),
32
+ 'field-order': string()
33
+ });
34
+ const I18nSchema = strictObject({
35
+ languages: record(DisplayLangSchema, strictObject({
36
+ label: string()
37
+ })),
38
+ 'language-order': string(),
39
+ 'default-language': DisplayLangSchema
40
+ });
41
+ const ValidationContextDisplaySchema = strictObject({
42
+ serviceName: nullish(string()),
43
+ serviceURL: nullish(string()),
44
+ backlink: nullish(external_valibot_boolean()),
45
+ layout: nullish(ComponentLayoutSchema),
46
+ i18n: nullish(I18nSchema)
47
+ });
48
+ const ValidationContextSchema = strictObject({
49
+ display: record(DisplayModeSchema, record(DisplayLangSchema, ValidationContextDisplaySchema)),
50
+ fields: record(string(), ValidationFieldSchema),
51
+ fieldsets: record(string(), ValidationFieldsetSchema),
52
+ 'action-order': string(),
53
+ 'fieldset-order': string()
54
+ });
55
+ export { ValidationComponentParamsSchema, ValidationContextDisplaySchema, ValidationContextSchema, ValidationFieldSchema, ValidationFieldsetSchema };
@@ -110,6 +110,15 @@ export const ResendOtpSchema = v.strictObject({
110
110
  });
111
111
  export type ResendOtp = v.InferOutput<typeof ResendOtpSchema>;
112
112
 
113
+ export const ResendEmailOtpSchema = v.strictObject({
114
+ display: createActionDisplay(
115
+ v.strictObject({
116
+ component: v.literal('document-resend-email-otp'),
117
+ })
118
+ ),
119
+ });
120
+ export type ResendEmailOtp = v.InferOutput<typeof ResendEmailOtpSchema>;
121
+
113
122
  export const CancelSchema = v.strictObject({
114
123
  display: createActionDisplay(
115
124
  v.strictObject({
@@ -145,6 +154,11 @@ export const CreateSchema = v.strictObject({
145
154
  component: v.literal('document-create'),
146
155
  })
147
156
  ),
157
+ 'component-params': v.nullish(
158
+ v.strictObject({
159
+ interactive: v.nullish(v.boolean()),
160
+ })
161
+ ),
148
162
  });
149
163
  export type Create = v.InferOutput<typeof CreateSchema>;
150
164
 
@@ -305,6 +319,7 @@ export const ActionSchema = v.variant('display', [
305
319
  TemporarySaveSchema,
306
320
  PdfSchema,
307
321
  ResendOtpSchema,
322
+ ResendEmailOtpSchema,
308
323
  CancelSchema,
309
324
  UpdateSchema,
310
325
  CreateSchema,
@@ -14,6 +14,22 @@ export const FontSchema = v.picklist([
14
14
  'OpenSans-Light',
15
15
  ]);
16
16
 
17
+ /**
18
+ * Describes how user input is handled by the field.
19
+ *
20
+ * @value 'required' Required user input. No empty value allowed.
21
+ * @value 'optional' Optional user input. Field can be left empty.
22
+ * @value 'noinput' No user input allowed, like 'display'.
23
+ * @value 'display' Display only the value of the field, like 'noinput'.
24
+ */
25
+ export const UserInputModeSchema = v.picklist([
26
+ 'required',
27
+ 'optional',
28
+ 'noinput',
29
+ 'display',
30
+ ]);
31
+ export type UserInputMode = v.InferOutput<typeof UserInputModeSchema>;
32
+
17
33
  export const ComponentLayoutSchema = v.strictObject({
18
34
  grid: v.nullish(v.boolean()),
19
35
  xs: v.nullish(v.string()),
@@ -7,29 +7,13 @@ const AfmDisplaySchema = createFieldDisplay(
7
7
  })
8
8
  );
9
9
 
10
- const AfmAttributeSchema = v.nullish(
11
- v.picklist([
12
- 'afm',
13
- 'confirm_signatories:afm',
14
- 'find_idiotiko_sym:signatories_afm',
15
- 'find_idiotiko_sym_service:statements/citizen_afm',
16
- 'find_idiotiko_sym_service:statements/service_afm',
17
- 'find_onomatodosia:signatory_1_afm',
18
- 'find_onomatodosia:signatory_2_afm',
19
- 'find_yde:signatory_1_afm',
20
- 'find_yde:signatory_2_afm',
21
- 'find_yde:signatory_3_afm',
22
- 'gsis_confirmed_person:afm',
23
- 'gsis_registry:afm',
24
- ])
25
- );
26
-
27
10
  const AfmSchema = v.strictObject({
28
11
  'user-input-mode': v.picklist(['noinput', 'optional', 'required', 'display']),
29
- attribute: AfmAttributeSchema,
12
+ attribute: v.nullish(v.string()),
30
13
  datatype: v.nullish(v.literal('afm')),
31
14
  display: AfmDisplaySchema,
32
15
  'default-value': v.nullish(v.string()),
16
+ sources: v.nullish(v.string()),
33
17
  });
34
18
  export type AfmType = v.InferOutput<typeof AfmSchema>;
35
19
  export type AfmSchemaType = v.GenericSchema<AfmType>;