@kubuild/schema 0.1.0 → 0.2.0
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/README.md +117 -0
- package/dist/actions.d.ts +423 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/document.d.ts +4 -0
- package/dist/document.d.ts.map +1 -1
- package/dist/form.d.ts +129 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/index.cjs +845 -90
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +798 -90
- package/dist/index.js.map +1 -1
- package/dist/json-schema.d.ts +690 -0
- package/dist/json-schema.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/json-schema.d.ts
CHANGED
|
@@ -159,6 +159,125 @@ export declare const PAGE_DOCUMENT_JSON_SCHEMA_V1: {
|
|
|
159
159
|
};
|
|
160
160
|
readonly additionalProperties: false;
|
|
161
161
|
};
|
|
162
|
+
readonly actionStep: {
|
|
163
|
+
readonly type: "object";
|
|
164
|
+
readonly required: readonly ["id", "type"];
|
|
165
|
+
readonly properties: {
|
|
166
|
+
readonly id: {
|
|
167
|
+
readonly type: "string";
|
|
168
|
+
readonly minLength: 1;
|
|
169
|
+
};
|
|
170
|
+
readonly type: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
readonly enum: readonly ["api_request", "navigate", "set_state", "reset_form", "show_toast", "open_modal", "close_modal", "copy_clipboard", "custom_event"];
|
|
173
|
+
};
|
|
174
|
+
readonly label: {
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
};
|
|
177
|
+
readonly payload: {
|
|
178
|
+
readonly type: "object";
|
|
179
|
+
};
|
|
180
|
+
readonly condition: {
|
|
181
|
+
readonly type: "object";
|
|
182
|
+
readonly required: readonly ["field", "operator"];
|
|
183
|
+
readonly properties: {
|
|
184
|
+
readonly field: {
|
|
185
|
+
readonly type: "string";
|
|
186
|
+
readonly minLength: 1;
|
|
187
|
+
};
|
|
188
|
+
readonly operator: {
|
|
189
|
+
readonly type: "string";
|
|
190
|
+
readonly enum: readonly ["equals", "not_equals", "contains", "not_contains", "is_truthy", "is_falsy", "gt", "gte", "lt", "lte", "regex"];
|
|
191
|
+
};
|
|
192
|
+
readonly value: {};
|
|
193
|
+
};
|
|
194
|
+
readonly additionalProperties: false;
|
|
195
|
+
};
|
|
196
|
+
readonly timeout: {
|
|
197
|
+
readonly type: "number";
|
|
198
|
+
readonly minimum: 1;
|
|
199
|
+
};
|
|
200
|
+
readonly continueOnError: {
|
|
201
|
+
readonly type: "boolean";
|
|
202
|
+
};
|
|
203
|
+
readonly onSuccess: {
|
|
204
|
+
readonly type: "array";
|
|
205
|
+
readonly items: {
|
|
206
|
+
readonly $ref: "#/definitions/actionStep";
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
readonly onError: {
|
|
210
|
+
readonly type: "array";
|
|
211
|
+
readonly items: {
|
|
212
|
+
readonly $ref: "#/definitions/actionStep";
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
readonly additionalProperties: false;
|
|
217
|
+
};
|
|
218
|
+
readonly actionPipeline: {
|
|
219
|
+
readonly type: "object";
|
|
220
|
+
readonly required: readonly ["id", "trigger", "steps"];
|
|
221
|
+
readonly properties: {
|
|
222
|
+
readonly id: {
|
|
223
|
+
readonly type: "string";
|
|
224
|
+
readonly minLength: 1;
|
|
225
|
+
};
|
|
226
|
+
readonly trigger: {
|
|
227
|
+
readonly type: "string";
|
|
228
|
+
readonly enum: readonly ["click", "submit", "change", "blur", "focus", "load"];
|
|
229
|
+
};
|
|
230
|
+
readonly label: {
|
|
231
|
+
readonly type: "string";
|
|
232
|
+
};
|
|
233
|
+
readonly debounceMs: {
|
|
234
|
+
readonly type: "number";
|
|
235
|
+
readonly minimum: 0;
|
|
236
|
+
};
|
|
237
|
+
readonly preventDuplicate: {
|
|
238
|
+
readonly type: "boolean";
|
|
239
|
+
};
|
|
240
|
+
readonly enabled: {
|
|
241
|
+
readonly type: "boolean";
|
|
242
|
+
readonly default: true;
|
|
243
|
+
};
|
|
244
|
+
readonly steps: {
|
|
245
|
+
readonly type: "array";
|
|
246
|
+
readonly items: {
|
|
247
|
+
readonly $ref: "#/definitions/actionStep";
|
|
248
|
+
};
|
|
249
|
+
readonly minItems: 1;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
readonly additionalProperties: false;
|
|
253
|
+
};
|
|
254
|
+
readonly formConfig: {
|
|
255
|
+
readonly type: "object";
|
|
256
|
+
readonly required: readonly ["formId"];
|
|
257
|
+
readonly properties: {
|
|
258
|
+
readonly formId: {
|
|
259
|
+
readonly type: "string";
|
|
260
|
+
readonly minLength: 1;
|
|
261
|
+
};
|
|
262
|
+
readonly resetOnSubmit: {
|
|
263
|
+
readonly type: "boolean";
|
|
264
|
+
readonly default: false;
|
|
265
|
+
};
|
|
266
|
+
readonly scrollToFirstError: {
|
|
267
|
+
readonly type: "boolean";
|
|
268
|
+
readonly default: true;
|
|
269
|
+
};
|
|
270
|
+
readonly validateOn: {
|
|
271
|
+
readonly type: "string";
|
|
272
|
+
readonly enum: readonly ["blur", "change", "submit"];
|
|
273
|
+
readonly default: "blur";
|
|
274
|
+
};
|
|
275
|
+
readonly initialValues: {
|
|
276
|
+
readonly type: "object";
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
readonly additionalProperties: false;
|
|
280
|
+
};
|
|
162
281
|
readonly node: {
|
|
163
282
|
readonly type: "object";
|
|
164
283
|
readonly required: readonly ["id", "type"];
|
|
@@ -184,6 +303,17 @@ export declare const PAGE_DOCUMENT_JSON_SCHEMA_V1: {
|
|
|
184
303
|
readonly animation: {
|
|
185
304
|
readonly $ref: "#/definitions/animationConfig";
|
|
186
305
|
};
|
|
306
|
+
readonly actions: {
|
|
307
|
+
readonly type: "array";
|
|
308
|
+
readonly items: {
|
|
309
|
+
readonly $ref: "#/definitions/actionPipeline";
|
|
310
|
+
};
|
|
311
|
+
readonly description: "Multi-step action pipelines bound to component events";
|
|
312
|
+
};
|
|
313
|
+
readonly formConfig: {
|
|
314
|
+
readonly $ref: "#/definitions/formConfig";
|
|
315
|
+
readonly description: "Form container configuration and behavior";
|
|
316
|
+
};
|
|
187
317
|
readonly children: {
|
|
188
318
|
readonly type: "array";
|
|
189
319
|
readonly items: {
|
|
@@ -413,6 +543,125 @@ export declare function getPageDocumentJsonSchema(): {
|
|
|
413
543
|
};
|
|
414
544
|
readonly additionalProperties: false;
|
|
415
545
|
};
|
|
546
|
+
readonly actionStep: {
|
|
547
|
+
readonly type: "object";
|
|
548
|
+
readonly required: readonly ["id", "type"];
|
|
549
|
+
readonly properties: {
|
|
550
|
+
readonly id: {
|
|
551
|
+
readonly type: "string";
|
|
552
|
+
readonly minLength: 1;
|
|
553
|
+
};
|
|
554
|
+
readonly type: {
|
|
555
|
+
readonly type: "string";
|
|
556
|
+
readonly enum: readonly ["api_request", "navigate", "set_state", "reset_form", "show_toast", "open_modal", "close_modal", "copy_clipboard", "custom_event"];
|
|
557
|
+
};
|
|
558
|
+
readonly label: {
|
|
559
|
+
readonly type: "string";
|
|
560
|
+
};
|
|
561
|
+
readonly payload: {
|
|
562
|
+
readonly type: "object";
|
|
563
|
+
};
|
|
564
|
+
readonly condition: {
|
|
565
|
+
readonly type: "object";
|
|
566
|
+
readonly required: readonly ["field", "operator"];
|
|
567
|
+
readonly properties: {
|
|
568
|
+
readonly field: {
|
|
569
|
+
readonly type: "string";
|
|
570
|
+
readonly minLength: 1;
|
|
571
|
+
};
|
|
572
|
+
readonly operator: {
|
|
573
|
+
readonly type: "string";
|
|
574
|
+
readonly enum: readonly ["equals", "not_equals", "contains", "not_contains", "is_truthy", "is_falsy", "gt", "gte", "lt", "lte", "regex"];
|
|
575
|
+
};
|
|
576
|
+
readonly value: {};
|
|
577
|
+
};
|
|
578
|
+
readonly additionalProperties: false;
|
|
579
|
+
};
|
|
580
|
+
readonly timeout: {
|
|
581
|
+
readonly type: "number";
|
|
582
|
+
readonly minimum: 1;
|
|
583
|
+
};
|
|
584
|
+
readonly continueOnError: {
|
|
585
|
+
readonly type: "boolean";
|
|
586
|
+
};
|
|
587
|
+
readonly onSuccess: {
|
|
588
|
+
readonly type: "array";
|
|
589
|
+
readonly items: {
|
|
590
|
+
readonly $ref: "#/definitions/actionStep";
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
readonly onError: {
|
|
594
|
+
readonly type: "array";
|
|
595
|
+
readonly items: {
|
|
596
|
+
readonly $ref: "#/definitions/actionStep";
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
readonly additionalProperties: false;
|
|
601
|
+
};
|
|
602
|
+
readonly actionPipeline: {
|
|
603
|
+
readonly type: "object";
|
|
604
|
+
readonly required: readonly ["id", "trigger", "steps"];
|
|
605
|
+
readonly properties: {
|
|
606
|
+
readonly id: {
|
|
607
|
+
readonly type: "string";
|
|
608
|
+
readonly minLength: 1;
|
|
609
|
+
};
|
|
610
|
+
readonly trigger: {
|
|
611
|
+
readonly type: "string";
|
|
612
|
+
readonly enum: readonly ["click", "submit", "change", "blur", "focus", "load"];
|
|
613
|
+
};
|
|
614
|
+
readonly label: {
|
|
615
|
+
readonly type: "string";
|
|
616
|
+
};
|
|
617
|
+
readonly debounceMs: {
|
|
618
|
+
readonly type: "number";
|
|
619
|
+
readonly minimum: 0;
|
|
620
|
+
};
|
|
621
|
+
readonly preventDuplicate: {
|
|
622
|
+
readonly type: "boolean";
|
|
623
|
+
};
|
|
624
|
+
readonly enabled: {
|
|
625
|
+
readonly type: "boolean";
|
|
626
|
+
readonly default: true;
|
|
627
|
+
};
|
|
628
|
+
readonly steps: {
|
|
629
|
+
readonly type: "array";
|
|
630
|
+
readonly items: {
|
|
631
|
+
readonly $ref: "#/definitions/actionStep";
|
|
632
|
+
};
|
|
633
|
+
readonly minItems: 1;
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
readonly additionalProperties: false;
|
|
637
|
+
};
|
|
638
|
+
readonly formConfig: {
|
|
639
|
+
readonly type: "object";
|
|
640
|
+
readonly required: readonly ["formId"];
|
|
641
|
+
readonly properties: {
|
|
642
|
+
readonly formId: {
|
|
643
|
+
readonly type: "string";
|
|
644
|
+
readonly minLength: 1;
|
|
645
|
+
};
|
|
646
|
+
readonly resetOnSubmit: {
|
|
647
|
+
readonly type: "boolean";
|
|
648
|
+
readonly default: false;
|
|
649
|
+
};
|
|
650
|
+
readonly scrollToFirstError: {
|
|
651
|
+
readonly type: "boolean";
|
|
652
|
+
readonly default: true;
|
|
653
|
+
};
|
|
654
|
+
readonly validateOn: {
|
|
655
|
+
readonly type: "string";
|
|
656
|
+
readonly enum: readonly ["blur", "change", "submit"];
|
|
657
|
+
readonly default: "blur";
|
|
658
|
+
};
|
|
659
|
+
readonly initialValues: {
|
|
660
|
+
readonly type: "object";
|
|
661
|
+
};
|
|
662
|
+
};
|
|
663
|
+
readonly additionalProperties: false;
|
|
664
|
+
};
|
|
416
665
|
readonly node: {
|
|
417
666
|
readonly type: "object";
|
|
418
667
|
readonly required: readonly ["id", "type"];
|
|
@@ -438,6 +687,17 @@ export declare function getPageDocumentJsonSchema(): {
|
|
|
438
687
|
readonly animation: {
|
|
439
688
|
readonly $ref: "#/definitions/animationConfig";
|
|
440
689
|
};
|
|
690
|
+
readonly actions: {
|
|
691
|
+
readonly type: "array";
|
|
692
|
+
readonly items: {
|
|
693
|
+
readonly $ref: "#/definitions/actionPipeline";
|
|
694
|
+
};
|
|
695
|
+
readonly description: "Multi-step action pipelines bound to component events";
|
|
696
|
+
};
|
|
697
|
+
readonly formConfig: {
|
|
698
|
+
readonly $ref: "#/definitions/formConfig";
|
|
699
|
+
readonly description: "Form container configuration and behavior";
|
|
700
|
+
};
|
|
441
701
|
readonly children: {
|
|
442
702
|
readonly type: "array";
|
|
443
703
|
readonly items: {
|
|
@@ -1060,4 +1320,434 @@ export declare function getTemplateRecordJsonSchema(): {
|
|
|
1060
1320
|
};
|
|
1061
1321
|
};
|
|
1062
1322
|
};
|
|
1323
|
+
/**
|
|
1324
|
+
* Standard JSON Schema Draft-07 representation of Action Pipeline
|
|
1325
|
+
* Aligned 1:1 with TypeScript ActionPipeline type definition.
|
|
1326
|
+
*/
|
|
1327
|
+
export declare const ACTION_PIPELINE_JSON_SCHEMA_V1: {
|
|
1328
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
1329
|
+
readonly $id: "https://schema.stora.page/v1/action-pipeline.json";
|
|
1330
|
+
readonly title: "StoraActionPipeline";
|
|
1331
|
+
readonly description: "Action Pipeline schema definition for KUBUILD event workflows";
|
|
1332
|
+
readonly type: "object";
|
|
1333
|
+
readonly required: readonly ["id", "trigger", "steps"];
|
|
1334
|
+
readonly additionalProperties: false;
|
|
1335
|
+
readonly properties: {
|
|
1336
|
+
readonly id: {
|
|
1337
|
+
readonly type: "string";
|
|
1338
|
+
readonly minLength: 1;
|
|
1339
|
+
readonly description: "Unique pipeline identifier";
|
|
1340
|
+
};
|
|
1341
|
+
readonly trigger: {
|
|
1342
|
+
readonly type: "string";
|
|
1343
|
+
readonly enum: readonly ["click", "submit", "change", "blur", "focus", "load"];
|
|
1344
|
+
readonly description: "DOM or component event that triggers the action pipeline";
|
|
1345
|
+
};
|
|
1346
|
+
readonly label: {
|
|
1347
|
+
readonly type: "string";
|
|
1348
|
+
readonly description: "Human readable label for the action pipeline";
|
|
1349
|
+
};
|
|
1350
|
+
readonly debounceMs: {
|
|
1351
|
+
readonly type: "number";
|
|
1352
|
+
readonly minimum: 0;
|
|
1353
|
+
readonly description: "Debounce duration in milliseconds";
|
|
1354
|
+
};
|
|
1355
|
+
readonly preventDuplicate: {
|
|
1356
|
+
readonly type: "boolean";
|
|
1357
|
+
readonly description: "Prevent concurrent duplicate pipeline executions";
|
|
1358
|
+
};
|
|
1359
|
+
readonly enabled: {
|
|
1360
|
+
readonly type: "boolean";
|
|
1361
|
+
readonly default: true;
|
|
1362
|
+
readonly description: "Whether the pipeline is currently active";
|
|
1363
|
+
};
|
|
1364
|
+
readonly steps: {
|
|
1365
|
+
readonly type: "array";
|
|
1366
|
+
readonly items: {
|
|
1367
|
+
readonly $ref: "#/definitions/actionStep";
|
|
1368
|
+
};
|
|
1369
|
+
readonly minItems: 1;
|
|
1370
|
+
readonly description: "Ordered sequence of action steps to execute";
|
|
1371
|
+
};
|
|
1372
|
+
};
|
|
1373
|
+
readonly definitions: {
|
|
1374
|
+
readonly actionStep: {
|
|
1375
|
+
readonly type: "object";
|
|
1376
|
+
readonly required: readonly ["id", "type"];
|
|
1377
|
+
readonly properties: {
|
|
1378
|
+
readonly id: {
|
|
1379
|
+
readonly type: "string";
|
|
1380
|
+
readonly minLength: 1;
|
|
1381
|
+
};
|
|
1382
|
+
readonly type: {
|
|
1383
|
+
readonly type: "string";
|
|
1384
|
+
readonly enum: readonly ["api_request", "navigate", "set_state", "reset_form", "show_toast", "open_modal", "close_modal", "copy_clipboard", "custom_event"];
|
|
1385
|
+
};
|
|
1386
|
+
readonly label: {
|
|
1387
|
+
readonly type: "string";
|
|
1388
|
+
};
|
|
1389
|
+
readonly payload: {
|
|
1390
|
+
readonly type: "object";
|
|
1391
|
+
};
|
|
1392
|
+
readonly condition: {
|
|
1393
|
+
readonly type: "object";
|
|
1394
|
+
readonly required: readonly ["field", "operator"];
|
|
1395
|
+
readonly properties: {
|
|
1396
|
+
readonly field: {
|
|
1397
|
+
readonly type: "string";
|
|
1398
|
+
readonly minLength: 1;
|
|
1399
|
+
};
|
|
1400
|
+
readonly operator: {
|
|
1401
|
+
readonly type: "string";
|
|
1402
|
+
readonly enum: readonly ["equals", "not_equals", "contains", "not_contains", "is_truthy", "is_falsy", "gt", "gte", "lt", "lte", "regex"];
|
|
1403
|
+
};
|
|
1404
|
+
readonly value: {};
|
|
1405
|
+
};
|
|
1406
|
+
readonly additionalProperties: false;
|
|
1407
|
+
};
|
|
1408
|
+
readonly timeout: {
|
|
1409
|
+
readonly type: "number";
|
|
1410
|
+
readonly minimum: 1;
|
|
1411
|
+
};
|
|
1412
|
+
readonly continueOnError: {
|
|
1413
|
+
readonly type: "boolean";
|
|
1414
|
+
};
|
|
1415
|
+
readonly onSuccess: {
|
|
1416
|
+
readonly type: "array";
|
|
1417
|
+
readonly items: {
|
|
1418
|
+
readonly $ref: "#/definitions/actionStep";
|
|
1419
|
+
};
|
|
1420
|
+
};
|
|
1421
|
+
readonly onError: {
|
|
1422
|
+
readonly type: "array";
|
|
1423
|
+
readonly items: {
|
|
1424
|
+
readonly $ref: "#/definitions/actionStep";
|
|
1425
|
+
};
|
|
1426
|
+
};
|
|
1427
|
+
};
|
|
1428
|
+
readonly additionalProperties: false;
|
|
1429
|
+
};
|
|
1430
|
+
};
|
|
1431
|
+
};
|
|
1432
|
+
export declare function getActionPipelineJsonSchema(): {
|
|
1433
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
1434
|
+
readonly $id: "https://schema.stora.page/v1/action-pipeline.json";
|
|
1435
|
+
readonly title: "StoraActionPipeline";
|
|
1436
|
+
readonly description: "Action Pipeline schema definition for KUBUILD event workflows";
|
|
1437
|
+
readonly type: "object";
|
|
1438
|
+
readonly required: readonly ["id", "trigger", "steps"];
|
|
1439
|
+
readonly additionalProperties: false;
|
|
1440
|
+
readonly properties: {
|
|
1441
|
+
readonly id: {
|
|
1442
|
+
readonly type: "string";
|
|
1443
|
+
readonly minLength: 1;
|
|
1444
|
+
readonly description: "Unique pipeline identifier";
|
|
1445
|
+
};
|
|
1446
|
+
readonly trigger: {
|
|
1447
|
+
readonly type: "string";
|
|
1448
|
+
readonly enum: readonly ["click", "submit", "change", "blur", "focus", "load"];
|
|
1449
|
+
readonly description: "DOM or component event that triggers the action pipeline";
|
|
1450
|
+
};
|
|
1451
|
+
readonly label: {
|
|
1452
|
+
readonly type: "string";
|
|
1453
|
+
readonly description: "Human readable label for the action pipeline";
|
|
1454
|
+
};
|
|
1455
|
+
readonly debounceMs: {
|
|
1456
|
+
readonly type: "number";
|
|
1457
|
+
readonly minimum: 0;
|
|
1458
|
+
readonly description: "Debounce duration in milliseconds";
|
|
1459
|
+
};
|
|
1460
|
+
readonly preventDuplicate: {
|
|
1461
|
+
readonly type: "boolean";
|
|
1462
|
+
readonly description: "Prevent concurrent duplicate pipeline executions";
|
|
1463
|
+
};
|
|
1464
|
+
readonly enabled: {
|
|
1465
|
+
readonly type: "boolean";
|
|
1466
|
+
readonly default: true;
|
|
1467
|
+
readonly description: "Whether the pipeline is currently active";
|
|
1468
|
+
};
|
|
1469
|
+
readonly steps: {
|
|
1470
|
+
readonly type: "array";
|
|
1471
|
+
readonly items: {
|
|
1472
|
+
readonly $ref: "#/definitions/actionStep";
|
|
1473
|
+
};
|
|
1474
|
+
readonly minItems: 1;
|
|
1475
|
+
readonly description: "Ordered sequence of action steps to execute";
|
|
1476
|
+
};
|
|
1477
|
+
};
|
|
1478
|
+
readonly definitions: {
|
|
1479
|
+
readonly actionStep: {
|
|
1480
|
+
readonly type: "object";
|
|
1481
|
+
readonly required: readonly ["id", "type"];
|
|
1482
|
+
readonly properties: {
|
|
1483
|
+
readonly id: {
|
|
1484
|
+
readonly type: "string";
|
|
1485
|
+
readonly minLength: 1;
|
|
1486
|
+
};
|
|
1487
|
+
readonly type: {
|
|
1488
|
+
readonly type: "string";
|
|
1489
|
+
readonly enum: readonly ["api_request", "navigate", "set_state", "reset_form", "show_toast", "open_modal", "close_modal", "copy_clipboard", "custom_event"];
|
|
1490
|
+
};
|
|
1491
|
+
readonly label: {
|
|
1492
|
+
readonly type: "string";
|
|
1493
|
+
};
|
|
1494
|
+
readonly payload: {
|
|
1495
|
+
readonly type: "object";
|
|
1496
|
+
};
|
|
1497
|
+
readonly condition: {
|
|
1498
|
+
readonly type: "object";
|
|
1499
|
+
readonly required: readonly ["field", "operator"];
|
|
1500
|
+
readonly properties: {
|
|
1501
|
+
readonly field: {
|
|
1502
|
+
readonly type: "string";
|
|
1503
|
+
readonly minLength: 1;
|
|
1504
|
+
};
|
|
1505
|
+
readonly operator: {
|
|
1506
|
+
readonly type: "string";
|
|
1507
|
+
readonly enum: readonly ["equals", "not_equals", "contains", "not_contains", "is_truthy", "is_falsy", "gt", "gte", "lt", "lte", "regex"];
|
|
1508
|
+
};
|
|
1509
|
+
readonly value: {};
|
|
1510
|
+
};
|
|
1511
|
+
readonly additionalProperties: false;
|
|
1512
|
+
};
|
|
1513
|
+
readonly timeout: {
|
|
1514
|
+
readonly type: "number";
|
|
1515
|
+
readonly minimum: 1;
|
|
1516
|
+
};
|
|
1517
|
+
readonly continueOnError: {
|
|
1518
|
+
readonly type: "boolean";
|
|
1519
|
+
};
|
|
1520
|
+
readonly onSuccess: {
|
|
1521
|
+
readonly type: "array";
|
|
1522
|
+
readonly items: {
|
|
1523
|
+
readonly $ref: "#/definitions/actionStep";
|
|
1524
|
+
};
|
|
1525
|
+
};
|
|
1526
|
+
readonly onError: {
|
|
1527
|
+
readonly type: "array";
|
|
1528
|
+
readonly items: {
|
|
1529
|
+
readonly $ref: "#/definitions/actionStep";
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
readonly additionalProperties: false;
|
|
1534
|
+
};
|
|
1535
|
+
};
|
|
1536
|
+
};
|
|
1537
|
+
/**
|
|
1538
|
+
* Standard JSON Schema Draft-07 representation of Form Config
|
|
1539
|
+
* Aligned 1:1 with TypeScript FormConfig type definition.
|
|
1540
|
+
*/
|
|
1541
|
+
export declare const FORM_CONFIG_JSON_SCHEMA_V1: {
|
|
1542
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
1543
|
+
readonly $id: "https://schema.stora.page/v1/form-config.json";
|
|
1544
|
+
readonly title: "StoraFormConfig";
|
|
1545
|
+
readonly description: "Form container configuration and behavior definition for KUBUILD";
|
|
1546
|
+
readonly type: "object";
|
|
1547
|
+
readonly required: readonly ["formId"];
|
|
1548
|
+
readonly additionalProperties: false;
|
|
1549
|
+
readonly properties: {
|
|
1550
|
+
readonly formId: {
|
|
1551
|
+
readonly type: "string";
|
|
1552
|
+
readonly minLength: 1;
|
|
1553
|
+
readonly description: "Unique identifier for the form boundary";
|
|
1554
|
+
};
|
|
1555
|
+
readonly resetOnSubmit: {
|
|
1556
|
+
readonly type: "boolean";
|
|
1557
|
+
readonly default: false;
|
|
1558
|
+
readonly description: "Whether to reset form field values after successful submission";
|
|
1559
|
+
};
|
|
1560
|
+
readonly scrollToFirstError: {
|
|
1561
|
+
readonly type: "boolean";
|
|
1562
|
+
readonly default: true;
|
|
1563
|
+
readonly description: "Auto-scroll viewport to the first invalid input on validation failure";
|
|
1564
|
+
};
|
|
1565
|
+
readonly validateOn: {
|
|
1566
|
+
readonly type: "string";
|
|
1567
|
+
readonly enum: readonly ["blur", "change", "submit"];
|
|
1568
|
+
readonly default: "blur";
|
|
1569
|
+
readonly description: "Default trigger event for field validation evaluation";
|
|
1570
|
+
};
|
|
1571
|
+
readonly initialValues: {
|
|
1572
|
+
readonly type: "object";
|
|
1573
|
+
readonly description: "Initial state values populated in form fields";
|
|
1574
|
+
};
|
|
1575
|
+
};
|
|
1576
|
+
};
|
|
1577
|
+
export declare function getFormConfigJsonSchema(): {
|
|
1578
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
1579
|
+
readonly $id: "https://schema.stora.page/v1/form-config.json";
|
|
1580
|
+
readonly title: "StoraFormConfig";
|
|
1581
|
+
readonly description: "Form container configuration and behavior definition for KUBUILD";
|
|
1582
|
+
readonly type: "object";
|
|
1583
|
+
readonly required: readonly ["formId"];
|
|
1584
|
+
readonly additionalProperties: false;
|
|
1585
|
+
readonly properties: {
|
|
1586
|
+
readonly formId: {
|
|
1587
|
+
readonly type: "string";
|
|
1588
|
+
readonly minLength: 1;
|
|
1589
|
+
readonly description: "Unique identifier for the form boundary";
|
|
1590
|
+
};
|
|
1591
|
+
readonly resetOnSubmit: {
|
|
1592
|
+
readonly type: "boolean";
|
|
1593
|
+
readonly default: false;
|
|
1594
|
+
readonly description: "Whether to reset form field values after successful submission";
|
|
1595
|
+
};
|
|
1596
|
+
readonly scrollToFirstError: {
|
|
1597
|
+
readonly type: "boolean";
|
|
1598
|
+
readonly default: true;
|
|
1599
|
+
readonly description: "Auto-scroll viewport to the first invalid input on validation failure";
|
|
1600
|
+
};
|
|
1601
|
+
readonly validateOn: {
|
|
1602
|
+
readonly type: "string";
|
|
1603
|
+
readonly enum: readonly ["blur", "change", "submit"];
|
|
1604
|
+
readonly default: "blur";
|
|
1605
|
+
readonly description: "Default trigger event for field validation evaluation";
|
|
1606
|
+
};
|
|
1607
|
+
readonly initialValues: {
|
|
1608
|
+
readonly type: "object";
|
|
1609
|
+
readonly description: "Initial state values populated in form fields";
|
|
1610
|
+
};
|
|
1611
|
+
};
|
|
1612
|
+
};
|
|
1613
|
+
/**
|
|
1614
|
+
* Standard JSON Schema Draft-07 representation of Form Field Binding
|
|
1615
|
+
* Aligned 1:1 with TypeScript FormFieldBinding type definition.
|
|
1616
|
+
*/
|
|
1617
|
+
export declare const FORM_FIELD_BINDING_JSON_SCHEMA_V1: {
|
|
1618
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
1619
|
+
readonly $id: "https://schema.stora.page/v1/form-field-binding.json";
|
|
1620
|
+
readonly title: "StoraFormFieldBinding";
|
|
1621
|
+
readonly description: "Form field binding definition connecting input elements to form state runtime";
|
|
1622
|
+
readonly type: "object";
|
|
1623
|
+
readonly required: readonly ["name"];
|
|
1624
|
+
readonly additionalProperties: false;
|
|
1625
|
+
readonly properties: {
|
|
1626
|
+
readonly name: {
|
|
1627
|
+
readonly type: "string";
|
|
1628
|
+
readonly minLength: 1;
|
|
1629
|
+
readonly description: "Field state property key";
|
|
1630
|
+
};
|
|
1631
|
+
readonly label: {
|
|
1632
|
+
readonly type: "string";
|
|
1633
|
+
readonly description: "Display label for the field";
|
|
1634
|
+
};
|
|
1635
|
+
readonly defaultValue: {
|
|
1636
|
+
readonly description: "Initial default value if not overridden by form initialValues";
|
|
1637
|
+
};
|
|
1638
|
+
readonly rules: {
|
|
1639
|
+
readonly type: "array";
|
|
1640
|
+
readonly items: {
|
|
1641
|
+
readonly $ref: "#/definitions/validationRule";
|
|
1642
|
+
};
|
|
1643
|
+
readonly default: readonly [];
|
|
1644
|
+
readonly description: "Validation rules applied to the field value";
|
|
1645
|
+
};
|
|
1646
|
+
readonly validateOn: {
|
|
1647
|
+
readonly type: "string";
|
|
1648
|
+
readonly enum: readonly ["blur", "change", "submit"];
|
|
1649
|
+
readonly default: "blur";
|
|
1650
|
+
readonly description: "Field-specific validation trigger timing";
|
|
1651
|
+
};
|
|
1652
|
+
readonly transform: {
|
|
1653
|
+
readonly type: "string";
|
|
1654
|
+
readonly enum: readonly ["trim", "lowercase", "uppercase", "number"];
|
|
1655
|
+
readonly description: "Value transformation applied prior to validation and state storage";
|
|
1656
|
+
};
|
|
1657
|
+
readonly disabled: {
|
|
1658
|
+
readonly type: "boolean";
|
|
1659
|
+
readonly description: "Whether the field is disabled";
|
|
1660
|
+
};
|
|
1661
|
+
readonly required: {
|
|
1662
|
+
readonly type: "boolean";
|
|
1663
|
+
readonly description: "Whether the field is required (shorthand rule)";
|
|
1664
|
+
};
|
|
1665
|
+
};
|
|
1666
|
+
readonly definitions: {
|
|
1667
|
+
readonly validationRule: {
|
|
1668
|
+
readonly type: "object";
|
|
1669
|
+
readonly required: readonly ["type", "message"];
|
|
1670
|
+
readonly properties: {
|
|
1671
|
+
readonly type: {
|
|
1672
|
+
readonly type: "string";
|
|
1673
|
+
readonly enum: readonly ["required", "email", "url", "min_length", "max_length", "numeric_min", "numeric_max", "pattern", "match_field", "custom_regex"];
|
|
1674
|
+
};
|
|
1675
|
+
readonly value: {};
|
|
1676
|
+
readonly message: {
|
|
1677
|
+
readonly type: "string";
|
|
1678
|
+
readonly minLength: 1;
|
|
1679
|
+
};
|
|
1680
|
+
};
|
|
1681
|
+
readonly additionalProperties: false;
|
|
1682
|
+
};
|
|
1683
|
+
};
|
|
1684
|
+
};
|
|
1685
|
+
export declare function getFormFieldBindingJsonSchema(): {
|
|
1686
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
1687
|
+
readonly $id: "https://schema.stora.page/v1/form-field-binding.json";
|
|
1688
|
+
readonly title: "StoraFormFieldBinding";
|
|
1689
|
+
readonly description: "Form field binding definition connecting input elements to form state runtime";
|
|
1690
|
+
readonly type: "object";
|
|
1691
|
+
readonly required: readonly ["name"];
|
|
1692
|
+
readonly additionalProperties: false;
|
|
1693
|
+
readonly properties: {
|
|
1694
|
+
readonly name: {
|
|
1695
|
+
readonly type: "string";
|
|
1696
|
+
readonly minLength: 1;
|
|
1697
|
+
readonly description: "Field state property key";
|
|
1698
|
+
};
|
|
1699
|
+
readonly label: {
|
|
1700
|
+
readonly type: "string";
|
|
1701
|
+
readonly description: "Display label for the field";
|
|
1702
|
+
};
|
|
1703
|
+
readonly defaultValue: {
|
|
1704
|
+
readonly description: "Initial default value if not overridden by form initialValues";
|
|
1705
|
+
};
|
|
1706
|
+
readonly rules: {
|
|
1707
|
+
readonly type: "array";
|
|
1708
|
+
readonly items: {
|
|
1709
|
+
readonly $ref: "#/definitions/validationRule";
|
|
1710
|
+
};
|
|
1711
|
+
readonly default: readonly [];
|
|
1712
|
+
readonly description: "Validation rules applied to the field value";
|
|
1713
|
+
};
|
|
1714
|
+
readonly validateOn: {
|
|
1715
|
+
readonly type: "string";
|
|
1716
|
+
readonly enum: readonly ["blur", "change", "submit"];
|
|
1717
|
+
readonly default: "blur";
|
|
1718
|
+
readonly description: "Field-specific validation trigger timing";
|
|
1719
|
+
};
|
|
1720
|
+
readonly transform: {
|
|
1721
|
+
readonly type: "string";
|
|
1722
|
+
readonly enum: readonly ["trim", "lowercase", "uppercase", "number"];
|
|
1723
|
+
readonly description: "Value transformation applied prior to validation and state storage";
|
|
1724
|
+
};
|
|
1725
|
+
readonly disabled: {
|
|
1726
|
+
readonly type: "boolean";
|
|
1727
|
+
readonly description: "Whether the field is disabled";
|
|
1728
|
+
};
|
|
1729
|
+
readonly required: {
|
|
1730
|
+
readonly type: "boolean";
|
|
1731
|
+
readonly description: "Whether the field is required (shorthand rule)";
|
|
1732
|
+
};
|
|
1733
|
+
};
|
|
1734
|
+
readonly definitions: {
|
|
1735
|
+
readonly validationRule: {
|
|
1736
|
+
readonly type: "object";
|
|
1737
|
+
readonly required: readonly ["type", "message"];
|
|
1738
|
+
readonly properties: {
|
|
1739
|
+
readonly type: {
|
|
1740
|
+
readonly type: "string";
|
|
1741
|
+
readonly enum: readonly ["required", "email", "url", "min_length", "max_length", "numeric_min", "numeric_max", "pattern", "match_field", "custom_regex"];
|
|
1742
|
+
};
|
|
1743
|
+
readonly value: {};
|
|
1744
|
+
readonly message: {
|
|
1745
|
+
readonly type: "string";
|
|
1746
|
+
readonly minLength: 1;
|
|
1747
|
+
};
|
|
1748
|
+
};
|
|
1749
|
+
readonly additionalProperties: false;
|
|
1750
|
+
};
|
|
1751
|
+
};
|
|
1752
|
+
};
|
|
1063
1753
|
//# sourceMappingURL=json-schema.d.ts.map
|