@xlr-lib/xlr-sdk 0.1.1--canary.9.190

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.
@@ -0,0 +1,4443 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Export Test > Exports Typescript Types With Filters 1`] = `
4
+ "import { Expression, Asset, Binding, AssetWrapper } from "@player-ui/types";
5
+
6
+ /**
7
+ * This is the most generic way of gathering data. The input is bound to a data model using the 'binding' property.
8
+ * Players can get field type information from the 'schema' definition, thus to decide the input controls for visual rendering.
9
+ */
10
+ export interface InputAsset<AnyTextAsset extends Asset = Asset> extends Asset<'input'> {
11
+ /** Asset container for a field label. */
12
+ label?: AssetWrapper<AnyTextAsset>;
13
+ /** Asset container for a note. */
14
+ note?: AssetWrapper<AnyTextAsset>;
15
+ /** The location in the data-model to store the data */
16
+ binding: Binding;
17
+ /** Optional additional data */
18
+ metaData?: {
19
+ /** Additional data to beacon when this input changes */
20
+ beacon?: string | Record<string, any>;
21
+ };
22
+ }
23
+ export interface TextAsset extends Asset<'text'> {
24
+ /** The text to display */
25
+ value: string;
26
+ /** Any modifiers on the text */
27
+ modifiers?: Array<{
28
+ /** The modifier type */
29
+ type: string;
30
+ /** Modifiers can be named when used in strings */
31
+ name?: string;
32
+ [key: string]: unknown;
33
+ } | {
34
+ /** The link type denotes this as a link */
35
+ type: 'link';
36
+ /** An optional expression to run before the link is opened */
37
+ exp?: Expression;
38
+ /** metaData about the link's target */
39
+ metaData: {
40
+ /** The location of the link to load */
41
+ ref: string;
42
+ /** Used to indicate an application specific resolver to use */
43
+ 'mime-type'?: string;
44
+ };
45
+ }>;
46
+ }
47
+ /**
48
+ * User actions can be represented in several places.
49
+ * Each view typically has one or more actions that allow the user to navigate away from that view.
50
+ * In addition, several asset types can have actions that apply to that asset only.
51
+ */
52
+ export interface ActionAsset<AnyTextAsset extends Asset = Asset> extends Asset<'action'> {
53
+ /** The transition value of the action in the state machine */
54
+ value?: string;
55
+ /** A text-like asset for the action's label */
56
+ label?: AssetWrapper<AnyTextAsset>;
57
+ /** An optional expression to execute before transitioning */
58
+ exp?: Expression;
59
+ /** An optional string that describes the action for screen-readers */
60
+ accessibility?: string;
61
+ /** Additional optional data to assist with the action interactions on the page */
62
+ metaData?: {
63
+ /** Additional data to beacon */
64
+ beacon?: string | Record<string, any>;
65
+ /** Force transition to the next view without checking for validation */
66
+ skipValidation?: boolean;
67
+ };
68
+ }
69
+ export interface InfoAsset extends Asset<'info'> {
70
+ /** The string value to show */
71
+ title?: AssetWrapper;
72
+ /** subtitle */
73
+ subTitle?: AssetWrapper;
74
+ /** Primary place for info */
75
+ primaryInfo?: AssetWrapper;
76
+ /** List of actions to show at the bottom of the page */
77
+ actions?: Array<AssetWrapper>;
78
+ }
79
+ export interface CollectionAsset extends Asset<'collection'> {
80
+ /** An optional label to title the collection */
81
+ label?: AssetWrapper;
82
+ /** The string value to show */
83
+ values?: Array<AssetWrapper>;
84
+ }"
85
+ `;
86
+
87
+ exports[`Export Test > Exports Typescript Types With Transforms 1`] = `
88
+ "import { Expression, Asset, Binding, AssetWrapper } from "@player-ui/types";
89
+
90
+ /**
91
+ * This is the most generic way of gathering data. The input is bound to a data model using the 'binding' property.
92
+ * Players can get field type information from the 'schema' definition, thus to decide the input controls for visual rendering.
93
+ */
94
+ export interface InputAsset<AnyTextAsset extends Asset = Asset> extends Asset<'input'> {
95
+ /** Asset container for a field label. */
96
+ label?: AssetWrapper<AnyTextAsset>;
97
+ /** Asset container for a note. */
98
+ note?: AssetWrapper<AnyTextAsset>;
99
+ /** The location in the data-model to store the data */
100
+ binding: Binding;
101
+ /** Optional additional data */
102
+ metaData?: {
103
+ /** Additional data to beacon when this input changes */
104
+ beacon?: string | Record<string, any>;
105
+ };
106
+ transformed?: true;
107
+ }
108
+ export interface TextAsset extends Asset<'text'> {
109
+ /** The text to display */
110
+ value: string;
111
+ /** Any modifiers on the text */
112
+ modifiers?: Array<{
113
+ /** The modifier type */
114
+ type: string;
115
+ /** Modifiers can be named when used in strings */
116
+ name?: string;
117
+ [key: string]: unknown;
118
+ } | {
119
+ /** The link type denotes this as a link */
120
+ type: 'link';
121
+ /** An optional expression to run before the link is opened */
122
+ exp?: Expression;
123
+ /** metaData about the link's target */
124
+ metaData: {
125
+ /** The location of the link to load */
126
+ ref: string;
127
+ /** Used to indicate an application specific resolver to use */
128
+ 'mime-type'?: string;
129
+ };
130
+ }>;
131
+ transformed?: true;
132
+ }
133
+ /**
134
+ * User actions can be represented in several places.
135
+ * Each view typically has one or more actions that allow the user to navigate away from that view.
136
+ * In addition, several asset types can have actions that apply to that asset only.
137
+ */
138
+ export interface ActionAsset<AnyTextAsset extends Asset = Asset> extends Asset<'action'> {
139
+ /** The transition value of the action in the state machine */
140
+ value?: string;
141
+ /** A text-like asset for the action's label */
142
+ label?: AssetWrapper<AnyTextAsset>;
143
+ /** An optional expression to execute before transitioning */
144
+ exp?: Expression;
145
+ /** An optional string that describes the action for screen-readers */
146
+ accessibility?: string;
147
+ /** Additional optional data to assist with the action interactions on the page */
148
+ metaData?: {
149
+ /** Additional data to beacon */
150
+ beacon?: string | Record<string, any>;
151
+ /** Force transition to the next view without checking for validation */
152
+ skipValidation?: boolean;
153
+ };
154
+ transformed?: true;
155
+ }
156
+ export interface InfoAsset extends Asset<'info'> {
157
+ /** The string value to show */
158
+ title?: AssetWrapper;
159
+ /** subtitle */
160
+ subTitle?: AssetWrapper;
161
+ /** Primary place for info */
162
+ primaryInfo?: AssetWrapper;
163
+ /** List of actions to show at the bottom of the page */
164
+ actions?: Array<AssetWrapper>;
165
+ transformed?: true;
166
+ }
167
+ export interface CollectionAsset extends Asset<'collection'> {
168
+ /** An optional label to title the collection */
169
+ label?: AssetWrapper;
170
+ /** The string value to show */
171
+ values?: Array<AssetWrapper>;
172
+ transformed?: true;
173
+ }"
174
+ `;
175
+
176
+ exports[`Export Test > Exports Typescript types 1`] = `
177
+ "import { Expression, Asset, Binding, AssetWrapper } from "@player-ui/types";
178
+
179
+ /** An asset is the smallest unit of user interaction in a player view */
180
+ export interface Asset<T extends string = string> {
181
+ /** Each asset requires a unique id per view */
182
+ id: string;
183
+ /** The asset type determines the semantics of how a user interacts with a page */
184
+ type: T;
185
+ [key: string]: unknown;
186
+ }
187
+ /** An asset that contains a Binding. */
188
+ export interface AssetBinding extends Asset {
189
+ /** A binding that points to somewhere in the data model */
190
+ binding: Binding;
191
+ }
192
+ /** A single case statement to use in a switch */
193
+ export interface SwitchCase<T extends Asset = Asset> {
194
+ /** The Asset to use if this case is applicable */
195
+ asset: T;
196
+ /** An expression to execute to determine if this case applies */
197
+ case: Expression | true;
198
+ }
199
+ /** A switch can replace an asset with the applicable case on first render */
200
+ export type Switch<T extends Asset = Asset> = Array<{
201
+ /** The Asset to use if this case is applicable */
202
+ asset: T;
203
+ /** An expression to execute to determine if this case applies */
204
+ case: Expression | true;
205
+ }>;
206
+ /** An object that contains an asset */
207
+ export interface AssetWrapper<T extends Asset = Asset> {
208
+ /** An asset instance */
209
+ asset: T;
210
+ [key: string]: unknown;
211
+ }
212
+ export type AssetWrapperOrSwitch<T extends Asset = Asset> = (AssetWrapper<T> & {
213
+ /** The dynamicSwitch property can't exist at the same time as 'asset' */
214
+ dynamicSwitch?: never;
215
+ /** The staticSwitch property can't exist at the same time as 'asset' */
216
+ staticSwitch?: never;
217
+ }) | ({
218
+ /** A static switch only evaluates the applicable base on first render of the view */
219
+ staticSwitch: Array<{
220
+ /** The Asset to use if this case is applicable */
221
+ asset: T;
222
+ /** An expression to execute to determine if this case applies */
223
+ case: Expression | true;
224
+ }>;
225
+ } & {
226
+ /** The staticSwitch property can't exist at the same time as 'asset' */
227
+ asset?: never;
228
+ /** The staticSwitch property can't exist at the same time as 'dynamicSwitch' */
229
+ dynamicSwitch?: never;
230
+ }) | ({
231
+ /** A dynamic switch re-evaluates the applicable case as data changes */
232
+ dynamicSwitch: Array<{
233
+ /** The Asset to use if this case is applicable */
234
+ asset: T;
235
+ /** An expression to execute to determine if this case applies */
236
+ case: Expression | true;
237
+ }>;
238
+ } & {
239
+ /** The dynamicSwitch property can't exist at the same time as 'asset' */
240
+ asset?: never;
241
+ /** The dynamicSwitch property can't exist at the same time as 'staticSwitch' */
242
+ staticSwitch?: never;
243
+ });
244
+ export type AssetSwitch<T extends Asset = Asset> = {
245
+ /** A static switch only evaluates the applicable base on first render of the view */
246
+ staticSwitch: Array<{
247
+ /** The Asset to use if this case is applicable */
248
+ asset: T;
249
+ /** An expression to execute to determine if this case applies */
250
+ case: Expression | true;
251
+ }>;
252
+ } | {
253
+ /** A dynamic switch re-evaluates the applicable case as data changes */
254
+ dynamicSwitch: Array<{
255
+ /** The Asset to use if this case is applicable */
256
+ asset: T;
257
+ /** An expression to execute to determine if this case applies */
258
+ case: Expression | true;
259
+ }>;
260
+ };
261
+ export interface StaticSwitch<T extends Asset = Asset> {
262
+ /** A static switch only evaluates the applicable base on first render of the view */
263
+ staticSwitch: Array<{
264
+ /** The Asset to use if this case is applicable */
265
+ asset: T;
266
+ /** An expression to execute to determine if this case applies */
267
+ case: Expression | true;
268
+ }>;
269
+ }
270
+ export interface DynamicSwitch<T extends Asset = Asset> {
271
+ /** A dynamic switch re-evaluates the applicable case as data changes */
272
+ dynamicSwitch: Array<{
273
+ /** The Asset to use if this case is applicable */
274
+ asset: T;
275
+ /** An expression to execute to determine if this case applies */
276
+ case: Expression | true;
277
+ }>;
278
+ }
279
+ /**
280
+ * Expressions are a specialized way of executing code.
281
+ * If the expression is a composite, the last expression executed is the return value
282
+ */
283
+ export type Expression = string | Array<string>;
284
+ export type ExpressionRef = \`@[\${string}]@\`;
285
+ /** Bindings describe locations in the data model. */
286
+ export type Binding = string;
287
+ export type BindingRef = \`{{\${string}}}\`;
288
+ /** The data-model is the location that all user data is stored */
289
+ export type DataModel = Record<any, unknown>;
290
+ /** The navigation section of the flow describes a State Machine for the user. */
291
+ export type Navigation = {
292
+ /** The name of the Flow to begin on */
293
+ BEGIN: string;
294
+ } & Record<string, string | {
295
+ /** The first state to kick off the state machine */
296
+ startState: string;
297
+ /** An optional expression to run when this Flow starts */
298
+ onStart?: Expression | {
299
+ /** The expression to run */
300
+ exp?: Expression;
301
+ };
302
+ /** An optional expression to run when this Flow ends */
303
+ onEnd?: Expression | {
304
+ /** The expression to run */
305
+ exp?: Expression;
306
+ };
307
+ [key: string]: undefined | string | Expression | {
308
+ /** The expression to run */
309
+ exp?: Expression;
310
+ } | ({
311
+ /** Add comments that will not be processing, but are useful for code explanation */
312
+ _comment?: string;
313
+ /** A property to determine the type of state this is */
314
+ state_type: 'VIEW';
315
+ /** An optional expression to run when this view renders */
316
+ onStart?: Expression | {
317
+ /** The expression to run */
318
+ exp?: Expression;
319
+ };
320
+ /** An optional expression to run before view transition */
321
+ onEnd?: Expression | {
322
+ /** The expression to run */
323
+ exp?: Expression;
324
+ };
325
+ exp?: never;
326
+ /** A mapping of transition-name to FlowState name */
327
+ transitions: Record<string, string>;
328
+ /** An id corresponding to a view from the 'views' array */
329
+ ref: string;
330
+ /** View meta-properties */
331
+ attributes?: {
332
+ [key: string]: any;
333
+ };
334
+ [key: string]: unknown;
335
+ } | {
336
+ /** Add comments that will not be processing, but are useful for code explanation */
337
+ _comment?: string;
338
+ /** A property to determine the type of state this is */
339
+ state_type: 'END';
340
+ /** An optional expression to run when this view renders */
341
+ onStart?: Expression | {
342
+ /** The expression to run */
343
+ exp?: Expression;
344
+ };
345
+ /** An optional expression to run before view transition */
346
+ onEnd?: Expression | {
347
+ /** The expression to run */
348
+ exp?: Expression;
349
+ };
350
+ exp?: never;
351
+ /**
352
+ * A description of _how_ the flow ended.
353
+ * If this is a flow started from another flow, the outcome determines the flow transition
354
+ */
355
+ outcome: string;
356
+ [key: string]: unknown;
357
+ } | {
358
+ /** Add comments that will not be processing, but are useful for code explanation */
359
+ _comment?: string;
360
+ /** A property to determine the type of state this is */
361
+ state_type: 'FLOW';
362
+ /** An optional expression to run when this view renders */
363
+ onStart?: Expression | {
364
+ /** The expression to run */
365
+ exp?: Expression;
366
+ };
367
+ /** An optional expression to run before view transition */
368
+ onEnd?: Expression | {
369
+ /** The expression to run */
370
+ exp?: Expression;
371
+ };
372
+ exp?: never;
373
+ /** A mapping of transition-name to FlowState name */
374
+ transitions: Record<string, string>;
375
+ /** A reference to a FLOW id state to run */
376
+ ref: string;
377
+ } | {
378
+ /** Add comments that will not be processing, but are useful for code explanation */
379
+ _comment?: string;
380
+ /** A property to determine the type of state this is */
381
+ state_type: 'ACTION';
382
+ /** An optional expression to run when this view renders */
383
+ onStart?: Expression | {
384
+ /** The expression to run */
385
+ exp?: Expression;
386
+ };
387
+ /** An optional expression to run before view transition */
388
+ onEnd?: Expression | {
389
+ /** The expression to run */
390
+ exp?: Expression;
391
+ };
392
+ /**
393
+ * An expression to execute.
394
+ * The return value determines the transition to take
395
+ */
396
+ exp: Expression;
397
+ /** A mapping of transition-name to FlowState name */
398
+ transitions: Record<string, string>;
399
+ } | {
400
+ /** Add comments that will not be processing, but are useful for code explanation */
401
+ _comment?: string;
402
+ /** A property to determine the type of state this is */
403
+ state_type: 'ASYNC_ACTION';
404
+ /** An optional expression to run when this view renders */
405
+ onStart?: Expression | {
406
+ /** The expression to run */
407
+ exp?: Expression;
408
+ };
409
+ /** An optional expression to run before view transition */
410
+ onEnd?: Expression | {
411
+ /** The expression to run */
412
+ exp?: Expression;
413
+ };
414
+ /**
415
+ * An expression to execute.
416
+ * The return value determines the transition to take
417
+ */
418
+ exp: Expression;
419
+ /** A mapping of transition-name to FlowState name */
420
+ transitions: Record<string, string>;
421
+ /** Whether the expression(s) should be awaited before transitioning */
422
+ await: boolean;
423
+ } | {
424
+ /** Add comments that will not be processing, but are useful for code explanation */
425
+ _comment?: string;
426
+ /** A property to determine the type of state this is */
427
+ state_type: 'EXTERNAL';
428
+ /** An optional expression to run when this view renders */
429
+ onStart?: Expression | {
430
+ /** The expression to run */
431
+ exp?: Expression;
432
+ };
433
+ /** An optional expression to run before view transition */
434
+ onEnd?: Expression | {
435
+ /** The expression to run */
436
+ exp?: Expression;
437
+ };
438
+ exp?: never;
439
+ /** A mapping of transition-name to FlowState name */
440
+ transitions: Record<string, string>;
441
+ /** A reference for this external state */
442
+ ref: string;
443
+ [key: string]: unknown;
444
+ });
445
+ }>;
446
+ /** An object with an expression in it */
447
+ export interface ExpressionObject {
448
+ /** The expression to run */
449
+ exp?: Expression;
450
+ }
451
+ /** A state machine in the navigation */
452
+ export interface NavigationFlow {
453
+ /** The first state to kick off the state machine */
454
+ startState: string;
455
+ /** An optional expression to run when this Flow starts */
456
+ onStart?: Expression | {
457
+ /** The expression to run */
458
+ exp?: Expression;
459
+ };
460
+ /** An optional expression to run when this Flow ends */
461
+ onEnd?: Expression | {
462
+ /** The expression to run */
463
+ exp?: Expression;
464
+ };
465
+ [key: string]: undefined | string | Expression | {
466
+ /** The expression to run */
467
+ exp?: Expression;
468
+ } | ({
469
+ /** Add comments that will not be processing, but are useful for code explanation */
470
+ _comment?: string;
471
+ /** A property to determine the type of state this is */
472
+ state_type: 'VIEW';
473
+ /** An optional expression to run when this view renders */
474
+ onStart?: Expression | {
475
+ /** The expression to run */
476
+ exp?: Expression;
477
+ };
478
+ /** An optional expression to run before view transition */
479
+ onEnd?: Expression | {
480
+ /** The expression to run */
481
+ exp?: Expression;
482
+ };
483
+ exp?: never;
484
+ /** A mapping of transition-name to FlowState name */
485
+ transitions: Record<string, string>;
486
+ /** An id corresponding to a view from the 'views' array */
487
+ ref: string;
488
+ /** View meta-properties */
489
+ attributes?: {
490
+ [key: string]: any;
491
+ };
492
+ [key: string]: unknown;
493
+ } | {
494
+ /** Add comments that will not be processing, but are useful for code explanation */
495
+ _comment?: string;
496
+ /** A property to determine the type of state this is */
497
+ state_type: 'END';
498
+ /** An optional expression to run when this view renders */
499
+ onStart?: Expression | {
500
+ /** The expression to run */
501
+ exp?: Expression;
502
+ };
503
+ /** An optional expression to run before view transition */
504
+ onEnd?: Expression | {
505
+ /** The expression to run */
506
+ exp?: Expression;
507
+ };
508
+ exp?: never;
509
+ /**
510
+ * A description of _how_ the flow ended.
511
+ * If this is a flow started from another flow, the outcome determines the flow transition
512
+ */
513
+ outcome: string;
514
+ [key: string]: unknown;
515
+ } | {
516
+ /** Add comments that will not be processing, but are useful for code explanation */
517
+ _comment?: string;
518
+ /** A property to determine the type of state this is */
519
+ state_type: 'FLOW';
520
+ /** An optional expression to run when this view renders */
521
+ onStart?: Expression | {
522
+ /** The expression to run */
523
+ exp?: Expression;
524
+ };
525
+ /** An optional expression to run before view transition */
526
+ onEnd?: Expression | {
527
+ /** The expression to run */
528
+ exp?: Expression;
529
+ };
530
+ exp?: never;
531
+ /** A mapping of transition-name to FlowState name */
532
+ transitions: Record<string, string>;
533
+ /** A reference to a FLOW id state to run */
534
+ ref: string;
535
+ } | {
536
+ /** Add comments that will not be processing, but are useful for code explanation */
537
+ _comment?: string;
538
+ /** A property to determine the type of state this is */
539
+ state_type: 'ACTION';
540
+ /** An optional expression to run when this view renders */
541
+ onStart?: Expression | {
542
+ /** The expression to run */
543
+ exp?: Expression;
544
+ };
545
+ /** An optional expression to run before view transition */
546
+ onEnd?: Expression | {
547
+ /** The expression to run */
548
+ exp?: Expression;
549
+ };
550
+ /**
551
+ * An expression to execute.
552
+ * The return value determines the transition to take
553
+ */
554
+ exp: Expression;
555
+ /** A mapping of transition-name to FlowState name */
556
+ transitions: Record<string, string>;
557
+ } | {
558
+ /** Add comments that will not be processing, but are useful for code explanation */
559
+ _comment?: string;
560
+ /** A property to determine the type of state this is */
561
+ state_type: 'ASYNC_ACTION';
562
+ /** An optional expression to run when this view renders */
563
+ onStart?: Expression | {
564
+ /** The expression to run */
565
+ exp?: Expression;
566
+ };
567
+ /** An optional expression to run before view transition */
568
+ onEnd?: Expression | {
569
+ /** The expression to run */
570
+ exp?: Expression;
571
+ };
572
+ /**
573
+ * An expression to execute.
574
+ * The return value determines the transition to take
575
+ */
576
+ exp: Expression;
577
+ /** A mapping of transition-name to FlowState name */
578
+ transitions: Record<string, string>;
579
+ /** Whether the expression(s) should be awaited before transitioning */
580
+ await: boolean;
581
+ } | {
582
+ /** Add comments that will not be processing, but are useful for code explanation */
583
+ _comment?: string;
584
+ /** A property to determine the type of state this is */
585
+ state_type: 'EXTERNAL';
586
+ /** An optional expression to run when this view renders */
587
+ onStart?: Expression | {
588
+ /** The expression to run */
589
+ exp?: Expression;
590
+ };
591
+ /** An optional expression to run before view transition */
592
+ onEnd?: Expression | {
593
+ /** The expression to run */
594
+ exp?: Expression;
595
+ };
596
+ exp?: never;
597
+ /** A mapping of transition-name to FlowState name */
598
+ transitions: Record<string, string>;
599
+ /** A reference for this external state */
600
+ ref: string;
601
+ [key: string]: unknown;
602
+ });
603
+ }
604
+ export type NavigationFlowTransition = Record<string, string>;
605
+ /** The base representation of a state within a Flow */
606
+ export interface NavigationBaseState<T extends string = any> {
607
+ /** Add comments that will not be processing, but are useful for code explanation */
608
+ _comment?: string;
609
+ /** A property to determine the type of state this is */
610
+ state_type: T;
611
+ /** An optional expression to run when this view renders */
612
+ onStart?: Expression | {
613
+ /** The expression to run */
614
+ exp?: Expression;
615
+ };
616
+ /** An optional expression to run before view transition */
617
+ onEnd?: Expression | {
618
+ /** The expression to run */
619
+ exp?: Expression;
620
+ };
621
+ /**
622
+ * TS gets really confused with both the ActionState and the onStart state both declaring the \`exp\` property
623
+ * So this explicity says there should never be an exp prop on a state node that's not of type 'ACTION'
624
+ */
625
+ exp?: T extends 'ACTION' | 'ASYNC_ACTION' ? Expression : never;
626
+ }
627
+ /** A generic state that can transition to another state */
628
+ export interface NavigationFlowTransitionableState<T extends string = any> {
629
+ /** Add comments that will not be processing, but are useful for code explanation */
630
+ _comment?: string;
631
+ /** A property to determine the type of state this is */
632
+ state_type: T;
633
+ /** An optional expression to run when this view renders */
634
+ onStart?: Expression | {
635
+ /** The expression to run */
636
+ exp?: Expression;
637
+ };
638
+ /** An optional expression to run before view transition */
639
+ onEnd?: Expression | {
640
+ /** The expression to run */
641
+ exp?: Expression;
642
+ };
643
+ /**
644
+ * TS gets really confused with both the ActionState and the onStart state both declaring the \`exp\` property
645
+ * So this explicity says there should never be an exp prop on a state node that's not of type 'ACTION'
646
+ */
647
+ exp?: T extends 'ACTION' | 'ASYNC_ACTION' ? Expression : never;
648
+ /** A mapping of transition-name to FlowState name */
649
+ transitions: Record<string, string>;
650
+ }
651
+ /** A state representing a view */
652
+ export interface NavigationFlowViewState {
653
+ /** Add comments that will not be processing, but are useful for code explanation */
654
+ _comment?: string;
655
+ /** A property to determine the type of state this is */
656
+ state_type: 'VIEW';
657
+ /** An optional expression to run when this view renders */
658
+ onStart?: Expression | {
659
+ /** The expression to run */
660
+ exp?: Expression;
661
+ };
662
+ /** An optional expression to run before view transition */
663
+ onEnd?: Expression | {
664
+ /** The expression to run */
665
+ exp?: Expression;
666
+ };
667
+ exp?: never;
668
+ /** A mapping of transition-name to FlowState name */
669
+ transitions: Record<string, string>;
670
+ /** An id corresponding to a view from the 'views' array */
671
+ ref: string;
672
+ /** View meta-properties */
673
+ attributes?: {
674
+ [key: string]: any;
675
+ };
676
+ [key: string]: unknown;
677
+ }
678
+ /** An END state of the flow. */
679
+ export interface NavigationFlowEndState {
680
+ /** Add comments that will not be processing, but are useful for code explanation */
681
+ _comment?: string;
682
+ /** A property to determine the type of state this is */
683
+ state_type: 'END';
684
+ /** An optional expression to run when this view renders */
685
+ onStart?: Expression | {
686
+ /** The expression to run */
687
+ exp?: Expression;
688
+ };
689
+ /** An optional expression to run before view transition */
690
+ onEnd?: Expression | {
691
+ /** The expression to run */
692
+ exp?: Expression;
693
+ };
694
+ exp?: never;
695
+ /**
696
+ * A description of _how_ the flow ended.
697
+ * If this is a flow started from another flow, the outcome determines the flow transition
698
+ */
699
+ outcome: string;
700
+ [key: string]: unknown;
701
+ }
702
+ /** Action states execute an expression to determine the next state to transition to */
703
+ export interface NavigationFlowActionState {
704
+ /** Add comments that will not be processing, but are useful for code explanation */
705
+ _comment?: string;
706
+ /** A property to determine the type of state this is */
707
+ state_type: 'ACTION';
708
+ /** An optional expression to run when this view renders */
709
+ onStart?: Expression | {
710
+ /** The expression to run */
711
+ exp?: Expression;
712
+ };
713
+ /** An optional expression to run before view transition */
714
+ onEnd?: Expression | {
715
+ /** The expression to run */
716
+ exp?: Expression;
717
+ };
718
+ /**
719
+ * An expression to execute.
720
+ * The return value determines the transition to take
721
+ */
722
+ exp: Expression;
723
+ /** A mapping of transition-name to FlowState name */
724
+ transitions: Record<string, string>;
725
+ }
726
+ /** Action states execute an expression to determine the next state to transition to */
727
+ export interface NavigationFlowAsyncActionState {
728
+ /** Add comments that will not be processing, but are useful for code explanation */
729
+ _comment?: string;
730
+ /** A property to determine the type of state this is */
731
+ state_type: 'ASYNC_ACTION';
732
+ /** An optional expression to run when this view renders */
733
+ onStart?: Expression | {
734
+ /** The expression to run */
735
+ exp?: Expression;
736
+ };
737
+ /** An optional expression to run before view transition */
738
+ onEnd?: Expression | {
739
+ /** The expression to run */
740
+ exp?: Expression;
741
+ };
742
+ /**
743
+ * An expression to execute.
744
+ * The return value determines the transition to take
745
+ */
746
+ exp: Expression;
747
+ /** A mapping of transition-name to FlowState name */
748
+ transitions: Record<string, string>;
749
+ /** Whether the expression(s) should be awaited before transitioning */
750
+ await: boolean;
751
+ }
752
+ /**
753
+ * External Flow states represent states in the FSM that can't be resolved internally in Player.
754
+ * The flow will wait for the embedded application to manage moving to the next state via a transition
755
+ */
756
+ export interface NavigationFlowExternalState {
757
+ /** Add comments that will not be processing, but are useful for code explanation */
758
+ _comment?: string;
759
+ /** A property to determine the type of state this is */
760
+ state_type: 'EXTERNAL';
761
+ /** An optional expression to run when this view renders */
762
+ onStart?: Expression | {
763
+ /** The expression to run */
764
+ exp?: Expression;
765
+ };
766
+ /** An optional expression to run before view transition */
767
+ onEnd?: Expression | {
768
+ /** The expression to run */
769
+ exp?: Expression;
770
+ };
771
+ exp?: never;
772
+ /** A mapping of transition-name to FlowState name */
773
+ transitions: Record<string, string>;
774
+ /** A reference for this external state */
775
+ ref: string;
776
+ [key: string]: unknown;
777
+ }
778
+ export interface NavigationFlowFlowState {
779
+ /** Add comments that will not be processing, but are useful for code explanation */
780
+ _comment?: string;
781
+ /** A property to determine the type of state this is */
782
+ state_type: 'FLOW';
783
+ /** An optional expression to run when this view renders */
784
+ onStart?: Expression | {
785
+ /** The expression to run */
786
+ exp?: Expression;
787
+ };
788
+ /** An optional expression to run before view transition */
789
+ onEnd?: Expression | {
790
+ /** The expression to run */
791
+ exp?: Expression;
792
+ };
793
+ exp?: never;
794
+ /** A mapping of transition-name to FlowState name */
795
+ transitions: Record<string, string>;
796
+ /** A reference to a FLOW id state to run */
797
+ ref: string;
798
+ }
799
+ export type NavigationFlowState = {
800
+ /** Add comments that will not be processing, but are useful for code explanation */
801
+ _comment?: string;
802
+ /** A property to determine the type of state this is */
803
+ state_type: 'VIEW';
804
+ /** An optional expression to run when this view renders */
805
+ onStart?: Expression | {
806
+ /** The expression to run */
807
+ exp?: Expression;
808
+ };
809
+ /** An optional expression to run before view transition */
810
+ onEnd?: Expression | {
811
+ /** The expression to run */
812
+ exp?: Expression;
813
+ };
814
+ exp?: never;
815
+ /** A mapping of transition-name to FlowState name */
816
+ transitions: Record<string, string>;
817
+ /** An id corresponding to a view from the 'views' array */
818
+ ref: string;
819
+ /** View meta-properties */
820
+ attributes?: {
821
+ [key: string]: any;
822
+ };
823
+ [key: string]: unknown;
824
+ } | {
825
+ /** Add comments that will not be processing, but are useful for code explanation */
826
+ _comment?: string;
827
+ /** A property to determine the type of state this is */
828
+ state_type: 'END';
829
+ /** An optional expression to run when this view renders */
830
+ onStart?: Expression | {
831
+ /** The expression to run */
832
+ exp?: Expression;
833
+ };
834
+ /** An optional expression to run before view transition */
835
+ onEnd?: Expression | {
836
+ /** The expression to run */
837
+ exp?: Expression;
838
+ };
839
+ exp?: never;
840
+ /**
841
+ * A description of _how_ the flow ended.
842
+ * If this is a flow started from another flow, the outcome determines the flow transition
843
+ */
844
+ outcome: string;
845
+ [key: string]: unknown;
846
+ } | {
847
+ /** Add comments that will not be processing, but are useful for code explanation */
848
+ _comment?: string;
849
+ /** A property to determine the type of state this is */
850
+ state_type: 'FLOW';
851
+ /** An optional expression to run when this view renders */
852
+ onStart?: Expression | {
853
+ /** The expression to run */
854
+ exp?: Expression;
855
+ };
856
+ /** An optional expression to run before view transition */
857
+ onEnd?: Expression | {
858
+ /** The expression to run */
859
+ exp?: Expression;
860
+ };
861
+ exp?: never;
862
+ /** A mapping of transition-name to FlowState name */
863
+ transitions: Record<string, string>;
864
+ /** A reference to a FLOW id state to run */
865
+ ref: string;
866
+ } | {
867
+ /** Add comments that will not be processing, but are useful for code explanation */
868
+ _comment?: string;
869
+ /** A property to determine the type of state this is */
870
+ state_type: 'ACTION';
871
+ /** An optional expression to run when this view renders */
872
+ onStart?: Expression | {
873
+ /** The expression to run */
874
+ exp?: Expression;
875
+ };
876
+ /** An optional expression to run before view transition */
877
+ onEnd?: Expression | {
878
+ /** The expression to run */
879
+ exp?: Expression;
880
+ };
881
+ /**
882
+ * An expression to execute.
883
+ * The return value determines the transition to take
884
+ */
885
+ exp: Expression;
886
+ /** A mapping of transition-name to FlowState name */
887
+ transitions: Record<string, string>;
888
+ } | {
889
+ /** Add comments that will not be processing, but are useful for code explanation */
890
+ _comment?: string;
891
+ /** A property to determine the type of state this is */
892
+ state_type: 'ASYNC_ACTION';
893
+ /** An optional expression to run when this view renders */
894
+ onStart?: Expression | {
895
+ /** The expression to run */
896
+ exp?: Expression;
897
+ };
898
+ /** An optional expression to run before view transition */
899
+ onEnd?: Expression | {
900
+ /** The expression to run */
901
+ exp?: Expression;
902
+ };
903
+ /**
904
+ * An expression to execute.
905
+ * The return value determines the transition to take
906
+ */
907
+ exp: Expression;
908
+ /** A mapping of transition-name to FlowState name */
909
+ transitions: Record<string, string>;
910
+ /** Whether the expression(s) should be awaited before transitioning */
911
+ await: boolean;
912
+ } | {
913
+ /** Add comments that will not be processing, but are useful for code explanation */
914
+ _comment?: string;
915
+ /** A property to determine the type of state this is */
916
+ state_type: 'EXTERNAL';
917
+ /** An optional expression to run when this view renders */
918
+ onStart?: Expression | {
919
+ /** The expression to run */
920
+ exp?: Expression;
921
+ };
922
+ /** An optional expression to run before view transition */
923
+ onEnd?: Expression | {
924
+ /** The expression to run */
925
+ exp?: Expression;
926
+ };
927
+ exp?: never;
928
+ /** A mapping of transition-name to FlowState name */
929
+ transitions: Record<string, string>;
930
+ /** A reference for this external state */
931
+ ref: string;
932
+ [key: string]: unknown;
933
+ };
934
+ /** The data at the end of a flow */
935
+ export interface FlowResult {
936
+ /** The outcome describes _how_ the flow ended (forwards, backwards, etc) */
937
+ endState: {
938
+ /** Add comments that will not be processing, but are useful for code explanation */
939
+ _comment?: string;
940
+ /** A property to determine the type of state this is */
941
+ state_type: 'END';
942
+ /** An optional expression to run when this view renders */
943
+ onStart?: Expression | {
944
+ /** The expression to run */
945
+ exp?: Expression;
946
+ };
947
+ /** An optional expression to run before view transition */
948
+ onEnd?: Expression | {
949
+ /** The expression to run */
950
+ exp?: Expression;
951
+ };
952
+ exp?: never;
953
+ /**
954
+ * A description of _how_ the flow ended.
955
+ * If this is a flow started from another flow, the outcome determines the flow transition
956
+ */
957
+ outcome: string;
958
+ [key: string]: unknown;
959
+ };
960
+ /** The serialized data-model */
961
+ data?: any;
962
+ }
963
+ /** Any object that contains 1 or more templates */
964
+ export interface Templatable {
965
+ /** A list of templates to process for this node */
966
+ template?: Array<{
967
+ /** A pointer to the data-model containing an array of elements to map over */
968
+ data: Binding;
969
+ /**
970
+ * The template to iterate over using each value in the supplied template data.
971
+ * Any reference to _index_ is replaced with the current iteration index.
972
+ */
973
+ value: ValueType;
974
+ /** should the template be recomputed when data changes */
975
+ dynamic?: boolean;
976
+ /**
977
+ * A property on the parent object to store the new map under.
978
+ * If it already exists, values are appended to the end.
979
+ */
980
+ output: Key;
981
+ /** Specifies the template placement in relation to existing elements */
982
+ placement?: 'prepend' | 'append';
983
+ }>;
984
+ }
985
+ /** A template describes a mapping from a data array -> array of objects */
986
+ export interface Template<ValueType extends any = unknown, Key extends string = string> {
987
+ /** A pointer to the data-model containing an array of elements to map over */
988
+ data: Binding;
989
+ /**
990
+ * The template to iterate over using each value in the supplied template data.
991
+ * Any reference to _index_ is replaced with the current iteration index.
992
+ */
993
+ value: ValueType;
994
+ /** should the template be recomputed when data changes */
995
+ dynamic?: boolean;
996
+ /**
997
+ * A property on the parent object to store the new map under.
998
+ * If it already exists, values are appended to the end.
999
+ */
1000
+ output: Key;
1001
+ /** Specifies the template placement in relation to existing elements */
1002
+ placement?: 'prepend' | 'append';
1003
+ }
1004
+ export type View<T extends Asset = Asset> = unknown extends Asset ? T & {
1005
+ /** Each view can optionally supply a list of validations to run against a particular view */
1006
+ validation?: Array<{
1007
+ /**
1008
+ * The name of the referenced validation type
1009
+ * This will be used to lookup the proper handler
1010
+ */
1011
+ type: string;
1012
+ /** An optional means of overriding the default message if the validation is triggered */
1013
+ message?: string;
1014
+ /** An optional means of overriding the default severity of the validation if triggered */
1015
+ severity?: 'error' | 'warning';
1016
+ /** When to run this particular validation */
1017
+ trigger?: 'navigation' | 'change' | 'load';
1018
+ /** Cross-field references and validation must run against the default (deformatted) value */
1019
+ dataTarget?: never;
1020
+ /** Where the error should be displayed */
1021
+ displayTarget?: 'page' | 'section' | 'field';
1022
+ /**
1023
+ * If the validation blocks navigation
1024
+ * true/false - always/never block navigation
1025
+ * once - only block navigation if the validation has not been triggered before
1026
+ */
1027
+ blocking?: boolean | 'once';
1028
+ /** The binding to associate this validation with */
1029
+ ref?: Binding;
1030
+ [key: string]: unknown;
1031
+ }>;
1032
+ } : T;
1033
+ /** The JSON payload for running Player */
1034
+ export interface Flow<T extends Asset = Asset> {
1035
+ /** A unique identifier for the flow */
1036
+ id: string;
1037
+ /** A list of views (each with an ID) that can be shown to a user */
1038
+ views?: Array<unknown extends Asset ? T & {
1039
+ /** Each view can optionally supply a list of validations to run against a particular view */
1040
+ validation?: Array<{
1041
+ /**
1042
+ * The name of the referenced validation type
1043
+ * This will be used to lookup the proper handler
1044
+ */
1045
+ type: string;
1046
+ /** An optional means of overriding the default message if the validation is triggered */
1047
+ message?: string;
1048
+ /** An optional means of overriding the default severity of the validation if triggered */
1049
+ severity?: 'error' | 'warning';
1050
+ /** When to run this particular validation */
1051
+ trigger?: 'navigation' | 'change' | 'load';
1052
+ /** Cross-field references and validation must run against the default (deformatted) value */
1053
+ dataTarget?: never;
1054
+ /** Where the error should be displayed */
1055
+ displayTarget?: 'page' | 'section' | 'field';
1056
+ /**
1057
+ * If the validation blocks navigation
1058
+ * true/false - always/never block navigation
1059
+ * once - only block navigation if the validation has not been triggered before
1060
+ */
1061
+ blocking?: boolean | 'once';
1062
+ /** The binding to associate this validation with */
1063
+ ref?: Binding;
1064
+ [key: string]: unknown;
1065
+ }>;
1066
+ } : T>;
1067
+ /**
1068
+ * The schema for the supplied (or referenced data).
1069
+ * This is used for validation, formatting, etc
1070
+ */
1071
+ schema?: {
1072
+ /** The ROOT object is the top level object to use */
1073
+ ROOT: {
1074
+ [key: string]: {
1075
+ /** The reference of the base type to use */
1076
+ type: string;
1077
+ /**
1078
+ * Any additional validations that are associated with this property
1079
+ * These will add to any base validations associated with the "type"
1080
+ */
1081
+ validation?: Array<{
1082
+ /**
1083
+ * The name of the referenced validation type
1084
+ * This will be used to lookup the proper handler
1085
+ */
1086
+ type: string;
1087
+ /** An optional means of overriding the default message if the validation is triggered */
1088
+ message?: string;
1089
+ /** An optional means of overriding the default severity of the validation if triggered */
1090
+ severity?: 'error' | 'warning';
1091
+ /** When to run this particular validation */
1092
+ trigger?: 'navigation' | 'change' | 'load';
1093
+ /**
1094
+ * Each validation is passed the value of the data to run it's validation against.
1095
+ * By default, this is the value stored in the data-model (deformatted).
1096
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1097
+ */
1098
+ dataTarget?: 'formatted' | 'deformatted';
1099
+ /** Where the error should be displayed */
1100
+ displayTarget?: 'page' | 'section' | 'field';
1101
+ /**
1102
+ * If the validation blocks navigation
1103
+ * true/false - always/never block navigation
1104
+ * once - only block navigation if the validation has not been triggered before
1105
+ */
1106
+ blocking?: boolean | 'once';
1107
+ [key: string]: unknown;
1108
+ }>;
1109
+ /**
1110
+ * A reference to a specific data format to use.
1111
+ * If none is specified, will fallback to that of the base type
1112
+ */
1113
+ format?: {
1114
+ /** The name of the formatter (and de-formatter) to use */
1115
+ type: string;
1116
+ [key: string]: unknown;
1117
+ };
1118
+ /**
1119
+ * A default value for this property.
1120
+ * Any reads for this property will result in this default value being written to the model.
1121
+ */
1122
+ default?: T;
1123
+ [key: string]: unknown;
1124
+ } | {
1125
+ /** The reference of the base type to use */
1126
+ type: string;
1127
+ /**
1128
+ * Any additional validations that are associated with this property
1129
+ * These will add to any base validations associated with the "type"
1130
+ */
1131
+ validation?: Array<{
1132
+ /**
1133
+ * The name of the referenced validation type
1134
+ * This will be used to lookup the proper handler
1135
+ */
1136
+ type: string;
1137
+ /** An optional means of overriding the default message if the validation is triggered */
1138
+ message?: string;
1139
+ /** An optional means of overriding the default severity of the validation if triggered */
1140
+ severity?: 'error' | 'warning';
1141
+ /** When to run this particular validation */
1142
+ trigger?: 'navigation' | 'change' | 'load';
1143
+ /**
1144
+ * Each validation is passed the value of the data to run it's validation against.
1145
+ * By default, this is the value stored in the data-model (deformatted).
1146
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1147
+ */
1148
+ dataTarget?: 'formatted' | 'deformatted';
1149
+ /** Where the error should be displayed */
1150
+ displayTarget?: 'page' | 'section' | 'field';
1151
+ /**
1152
+ * If the validation blocks navigation
1153
+ * true/false - always/never block navigation
1154
+ * once - only block navigation if the validation has not been triggered before
1155
+ */
1156
+ blocking?: boolean | 'once';
1157
+ [key: string]: unknown;
1158
+ }>;
1159
+ /**
1160
+ * A reference to a specific data format to use.
1161
+ * If none is specified, will fallback to that of the base type
1162
+ */
1163
+ format?: {
1164
+ /** The name of the formatter (and de-formatter) to use */
1165
+ type: string;
1166
+ [key: string]: unknown;
1167
+ };
1168
+ /**
1169
+ * A default value for this property.
1170
+ * Any reads for this property will result in this default value being written to the model.
1171
+ */
1172
+ default?: T;
1173
+ /** boolean to define if its a record */
1174
+ isRecord: boolean;
1175
+ /** This property is mutually exclusive with RecordType and can not be used with ArrayType */
1176
+ isArray?: never;
1177
+ [key: string]: unknown;
1178
+ } | {
1179
+ /** The reference of the base type to use */
1180
+ type: string;
1181
+ /**
1182
+ * Any additional validations that are associated with this property
1183
+ * These will add to any base validations associated with the "type"
1184
+ */
1185
+ validation?: Array<{
1186
+ /**
1187
+ * The name of the referenced validation type
1188
+ * This will be used to lookup the proper handler
1189
+ */
1190
+ type: string;
1191
+ /** An optional means of overriding the default message if the validation is triggered */
1192
+ message?: string;
1193
+ /** An optional means of overriding the default severity of the validation if triggered */
1194
+ severity?: 'error' | 'warning';
1195
+ /** When to run this particular validation */
1196
+ trigger?: 'navigation' | 'change' | 'load';
1197
+ /**
1198
+ * Each validation is passed the value of the data to run it's validation against.
1199
+ * By default, this is the value stored in the data-model (deformatted).
1200
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1201
+ */
1202
+ dataTarget?: 'formatted' | 'deformatted';
1203
+ /** Where the error should be displayed */
1204
+ displayTarget?: 'page' | 'section' | 'field';
1205
+ /**
1206
+ * If the validation blocks navigation
1207
+ * true/false - always/never block navigation
1208
+ * once - only block navigation if the validation has not been triggered before
1209
+ */
1210
+ blocking?: boolean | 'once';
1211
+ [key: string]: unknown;
1212
+ }>;
1213
+ /**
1214
+ * A reference to a specific data format to use.
1215
+ * If none is specified, will fallback to that of the base type
1216
+ */
1217
+ format?: {
1218
+ /** The name of the formatter (and de-formatter) to use */
1219
+ type: string;
1220
+ [key: string]: unknown;
1221
+ };
1222
+ /**
1223
+ * A default value for this property.
1224
+ * Any reads for this property will result in this default value being written to the model.
1225
+ */
1226
+ default?: T;
1227
+ /** boolean to define if its an array */
1228
+ isArray: boolean;
1229
+ /** This property is mutually exclusive with ArrayType and can not be used with RecordType */
1230
+ isRecord?: never;
1231
+ [key: string]: unknown;
1232
+ };
1233
+ };
1234
+ [key: string]: {
1235
+ [key: string]: {
1236
+ /** The reference of the base type to use */
1237
+ type: string;
1238
+ /**
1239
+ * Any additional validations that are associated with this property
1240
+ * These will add to any base validations associated with the "type"
1241
+ */
1242
+ validation?: Array<{
1243
+ /**
1244
+ * The name of the referenced validation type
1245
+ * This will be used to lookup the proper handler
1246
+ */
1247
+ type: string;
1248
+ /** An optional means of overriding the default message if the validation is triggered */
1249
+ message?: string;
1250
+ /** An optional means of overriding the default severity of the validation if triggered */
1251
+ severity?: 'error' | 'warning';
1252
+ /** When to run this particular validation */
1253
+ trigger?: 'navigation' | 'change' | 'load';
1254
+ /**
1255
+ * Each validation is passed the value of the data to run it's validation against.
1256
+ * By default, this is the value stored in the data-model (deformatted).
1257
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1258
+ */
1259
+ dataTarget?: 'formatted' | 'deformatted';
1260
+ /** Where the error should be displayed */
1261
+ displayTarget?: 'page' | 'section' | 'field';
1262
+ /**
1263
+ * If the validation blocks navigation
1264
+ * true/false - always/never block navigation
1265
+ * once - only block navigation if the validation has not been triggered before
1266
+ */
1267
+ blocking?: boolean | 'once';
1268
+ [key: string]: unknown;
1269
+ }>;
1270
+ /**
1271
+ * A reference to a specific data format to use.
1272
+ * If none is specified, will fallback to that of the base type
1273
+ */
1274
+ format?: {
1275
+ /** The name of the formatter (and de-formatter) to use */
1276
+ type: string;
1277
+ [key: string]: unknown;
1278
+ };
1279
+ /**
1280
+ * A default value for this property.
1281
+ * Any reads for this property will result in this default value being written to the model.
1282
+ */
1283
+ default?: T;
1284
+ [key: string]: unknown;
1285
+ } | {
1286
+ /** The reference of the base type to use */
1287
+ type: string;
1288
+ /**
1289
+ * Any additional validations that are associated with this property
1290
+ * These will add to any base validations associated with the "type"
1291
+ */
1292
+ validation?: Array<{
1293
+ /**
1294
+ * The name of the referenced validation type
1295
+ * This will be used to lookup the proper handler
1296
+ */
1297
+ type: string;
1298
+ /** An optional means of overriding the default message if the validation is triggered */
1299
+ message?: string;
1300
+ /** An optional means of overriding the default severity of the validation if triggered */
1301
+ severity?: 'error' | 'warning';
1302
+ /** When to run this particular validation */
1303
+ trigger?: 'navigation' | 'change' | 'load';
1304
+ /**
1305
+ * Each validation is passed the value of the data to run it's validation against.
1306
+ * By default, this is the value stored in the data-model (deformatted).
1307
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1308
+ */
1309
+ dataTarget?: 'formatted' | 'deformatted';
1310
+ /** Where the error should be displayed */
1311
+ displayTarget?: 'page' | 'section' | 'field';
1312
+ /**
1313
+ * If the validation blocks navigation
1314
+ * true/false - always/never block navigation
1315
+ * once - only block navigation if the validation has not been triggered before
1316
+ */
1317
+ blocking?: boolean | 'once';
1318
+ [key: string]: unknown;
1319
+ }>;
1320
+ /**
1321
+ * A reference to a specific data format to use.
1322
+ * If none is specified, will fallback to that of the base type
1323
+ */
1324
+ format?: {
1325
+ /** The name of the formatter (and de-formatter) to use */
1326
+ type: string;
1327
+ [key: string]: unknown;
1328
+ };
1329
+ /**
1330
+ * A default value for this property.
1331
+ * Any reads for this property will result in this default value being written to the model.
1332
+ */
1333
+ default?: T;
1334
+ /** boolean to define if its a record */
1335
+ isRecord: boolean;
1336
+ /** This property is mutually exclusive with RecordType and can not be used with ArrayType */
1337
+ isArray?: never;
1338
+ [key: string]: unknown;
1339
+ } | {
1340
+ /** The reference of the base type to use */
1341
+ type: string;
1342
+ /**
1343
+ * Any additional validations that are associated with this property
1344
+ * These will add to any base validations associated with the "type"
1345
+ */
1346
+ validation?: Array<{
1347
+ /**
1348
+ * The name of the referenced validation type
1349
+ * This will be used to lookup the proper handler
1350
+ */
1351
+ type: string;
1352
+ /** An optional means of overriding the default message if the validation is triggered */
1353
+ message?: string;
1354
+ /** An optional means of overriding the default severity of the validation if triggered */
1355
+ severity?: 'error' | 'warning';
1356
+ /** When to run this particular validation */
1357
+ trigger?: 'navigation' | 'change' | 'load';
1358
+ /**
1359
+ * Each validation is passed the value of the data to run it's validation against.
1360
+ * By default, this is the value stored in the data-model (deformatted).
1361
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1362
+ */
1363
+ dataTarget?: 'formatted' | 'deformatted';
1364
+ /** Where the error should be displayed */
1365
+ displayTarget?: 'page' | 'section' | 'field';
1366
+ /**
1367
+ * If the validation blocks navigation
1368
+ * true/false - always/never block navigation
1369
+ * once - only block navigation if the validation has not been triggered before
1370
+ */
1371
+ blocking?: boolean | 'once';
1372
+ [key: string]: unknown;
1373
+ }>;
1374
+ /**
1375
+ * A reference to a specific data format to use.
1376
+ * If none is specified, will fallback to that of the base type
1377
+ */
1378
+ format?: {
1379
+ /** The name of the formatter (and de-formatter) to use */
1380
+ type: string;
1381
+ [key: string]: unknown;
1382
+ };
1383
+ /**
1384
+ * A default value for this property.
1385
+ * Any reads for this property will result in this default value being written to the model.
1386
+ */
1387
+ default?: T;
1388
+ /** boolean to define if its an array */
1389
+ isArray: boolean;
1390
+ /** This property is mutually exclusive with ArrayType and can not be used with RecordType */
1391
+ isRecord?: never;
1392
+ [key: string]: unknown;
1393
+ };
1394
+ };
1395
+ };
1396
+ /** Any initial data that the flow can use */
1397
+ data?: Record<any, unknown>;
1398
+ /** A state machine to drive a user through the experience */
1399
+ navigation: {
1400
+ /** The name of the Flow to begin on */
1401
+ BEGIN: string;
1402
+ } & Record<string, string | {
1403
+ /** The first state to kick off the state machine */
1404
+ startState: string;
1405
+ /** An optional expression to run when this Flow starts */
1406
+ onStart?: Expression | {
1407
+ /** The expression to run */
1408
+ exp?: Expression;
1409
+ };
1410
+ /** An optional expression to run when this Flow ends */
1411
+ onEnd?: Expression | {
1412
+ /** The expression to run */
1413
+ exp?: Expression;
1414
+ };
1415
+ [key: string]: undefined | string | Expression | {
1416
+ /** The expression to run */
1417
+ exp?: Expression;
1418
+ } | ({
1419
+ /** Add comments that will not be processing, but are useful for code explanation */
1420
+ _comment?: string;
1421
+ /** A property to determine the type of state this is */
1422
+ state_type: 'VIEW';
1423
+ /** An optional expression to run when this view renders */
1424
+ onStart?: Expression | {
1425
+ /** The expression to run */
1426
+ exp?: Expression;
1427
+ };
1428
+ /** An optional expression to run before view transition */
1429
+ onEnd?: Expression | {
1430
+ /** The expression to run */
1431
+ exp?: Expression;
1432
+ };
1433
+ exp?: never;
1434
+ /** A mapping of transition-name to FlowState name */
1435
+ transitions: Record<string, string>;
1436
+ /** An id corresponding to a view from the 'views' array */
1437
+ ref: string;
1438
+ /** View meta-properties */
1439
+ attributes?: {
1440
+ [key: string]: any;
1441
+ };
1442
+ [key: string]: unknown;
1443
+ } | {
1444
+ /** Add comments that will not be processing, but are useful for code explanation */
1445
+ _comment?: string;
1446
+ /** A property to determine the type of state this is */
1447
+ state_type: 'END';
1448
+ /** An optional expression to run when this view renders */
1449
+ onStart?: Expression | {
1450
+ /** The expression to run */
1451
+ exp?: Expression;
1452
+ };
1453
+ /** An optional expression to run before view transition */
1454
+ onEnd?: Expression | {
1455
+ /** The expression to run */
1456
+ exp?: Expression;
1457
+ };
1458
+ exp?: never;
1459
+ /**
1460
+ * A description of _how_ the flow ended.
1461
+ * If this is a flow started from another flow, the outcome determines the flow transition
1462
+ */
1463
+ outcome: string;
1464
+ [key: string]: unknown;
1465
+ } | {
1466
+ /** Add comments that will not be processing, but are useful for code explanation */
1467
+ _comment?: string;
1468
+ /** A property to determine the type of state this is */
1469
+ state_type: 'FLOW';
1470
+ /** An optional expression to run when this view renders */
1471
+ onStart?: Expression | {
1472
+ /** The expression to run */
1473
+ exp?: Expression;
1474
+ };
1475
+ /** An optional expression to run before view transition */
1476
+ onEnd?: Expression | {
1477
+ /** The expression to run */
1478
+ exp?: Expression;
1479
+ };
1480
+ exp?: never;
1481
+ /** A mapping of transition-name to FlowState name */
1482
+ transitions: Record<string, string>;
1483
+ /** A reference to a FLOW id state to run */
1484
+ ref: string;
1485
+ } | {
1486
+ /** Add comments that will not be processing, but are useful for code explanation */
1487
+ _comment?: string;
1488
+ /** A property to determine the type of state this is */
1489
+ state_type: 'ACTION';
1490
+ /** An optional expression to run when this view renders */
1491
+ onStart?: Expression | {
1492
+ /** The expression to run */
1493
+ exp?: Expression;
1494
+ };
1495
+ /** An optional expression to run before view transition */
1496
+ onEnd?: Expression | {
1497
+ /** The expression to run */
1498
+ exp?: Expression;
1499
+ };
1500
+ /**
1501
+ * An expression to execute.
1502
+ * The return value determines the transition to take
1503
+ */
1504
+ exp: Expression;
1505
+ /** A mapping of transition-name to FlowState name */
1506
+ transitions: Record<string, string>;
1507
+ } | {
1508
+ /** Add comments that will not be processing, but are useful for code explanation */
1509
+ _comment?: string;
1510
+ /** A property to determine the type of state this is */
1511
+ state_type: 'ASYNC_ACTION';
1512
+ /** An optional expression to run when this view renders */
1513
+ onStart?: Expression | {
1514
+ /** The expression to run */
1515
+ exp?: Expression;
1516
+ };
1517
+ /** An optional expression to run before view transition */
1518
+ onEnd?: Expression | {
1519
+ /** The expression to run */
1520
+ exp?: Expression;
1521
+ };
1522
+ /**
1523
+ * An expression to execute.
1524
+ * The return value determines the transition to take
1525
+ */
1526
+ exp: Expression;
1527
+ /** A mapping of transition-name to FlowState name */
1528
+ transitions: Record<string, string>;
1529
+ /** Whether the expression(s) should be awaited before transitioning */
1530
+ await: boolean;
1531
+ } | {
1532
+ /** Add comments that will not be processing, but are useful for code explanation */
1533
+ _comment?: string;
1534
+ /** A property to determine the type of state this is */
1535
+ state_type: 'EXTERNAL';
1536
+ /** An optional expression to run when this view renders */
1537
+ onStart?: Expression | {
1538
+ /** The expression to run */
1539
+ exp?: Expression;
1540
+ };
1541
+ /** An optional expression to run before view transition */
1542
+ onEnd?: Expression | {
1543
+ /** The expression to run */
1544
+ exp?: Expression;
1545
+ };
1546
+ exp?: never;
1547
+ /** A mapping of transition-name to FlowState name */
1548
+ transitions: Record<string, string>;
1549
+ /** A reference for this external state */
1550
+ ref: string;
1551
+ [key: string]: unknown;
1552
+ });
1553
+ }>;
1554
+ [key: string]: unknown;
1555
+ }
1556
+ /** The authored schema object in the JSON payload */
1557
+ export interface Schema.Schema {
1558
+ /** The ROOT object is the top level object to use */
1559
+ ROOT: {
1560
+ [key: string]: {
1561
+ /** The reference of the base type to use */
1562
+ type: string;
1563
+ /**
1564
+ * Any additional validations that are associated with this property
1565
+ * These will add to any base validations associated with the "type"
1566
+ */
1567
+ validation?: Array<{
1568
+ /**
1569
+ * The name of the referenced validation type
1570
+ * This will be used to lookup the proper handler
1571
+ */
1572
+ type: string;
1573
+ /** An optional means of overriding the default message if the validation is triggered */
1574
+ message?: string;
1575
+ /** An optional means of overriding the default severity of the validation if triggered */
1576
+ severity?: 'error' | 'warning';
1577
+ /** When to run this particular validation */
1578
+ trigger?: 'navigation' | 'change' | 'load';
1579
+ /**
1580
+ * Each validation is passed the value of the data to run it's validation against.
1581
+ * By default, this is the value stored in the data-model (deformatted).
1582
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1583
+ */
1584
+ dataTarget?: 'formatted' | 'deformatted';
1585
+ /** Where the error should be displayed */
1586
+ displayTarget?: 'page' | 'section' | 'field';
1587
+ /**
1588
+ * If the validation blocks navigation
1589
+ * true/false - always/never block navigation
1590
+ * once - only block navigation if the validation has not been triggered before
1591
+ */
1592
+ blocking?: boolean | 'once';
1593
+ [key: string]: unknown;
1594
+ }>;
1595
+ /**
1596
+ * A reference to a specific data format to use.
1597
+ * If none is specified, will fallback to that of the base type
1598
+ */
1599
+ format?: {
1600
+ /** The name of the formatter (and de-formatter) to use */
1601
+ type: string;
1602
+ [key: string]: unknown;
1603
+ };
1604
+ /**
1605
+ * A default value for this property.
1606
+ * Any reads for this property will result in this default value being written to the model.
1607
+ */
1608
+ default?: T;
1609
+ [key: string]: unknown;
1610
+ } | {
1611
+ /** The reference of the base type to use */
1612
+ type: string;
1613
+ /**
1614
+ * Any additional validations that are associated with this property
1615
+ * These will add to any base validations associated with the "type"
1616
+ */
1617
+ validation?: Array<{
1618
+ /**
1619
+ * The name of the referenced validation type
1620
+ * This will be used to lookup the proper handler
1621
+ */
1622
+ type: string;
1623
+ /** An optional means of overriding the default message if the validation is triggered */
1624
+ message?: string;
1625
+ /** An optional means of overriding the default severity of the validation if triggered */
1626
+ severity?: 'error' | 'warning';
1627
+ /** When to run this particular validation */
1628
+ trigger?: 'navigation' | 'change' | 'load';
1629
+ /**
1630
+ * Each validation is passed the value of the data to run it's validation against.
1631
+ * By default, this is the value stored in the data-model (deformatted).
1632
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1633
+ */
1634
+ dataTarget?: 'formatted' | 'deformatted';
1635
+ /** Where the error should be displayed */
1636
+ displayTarget?: 'page' | 'section' | 'field';
1637
+ /**
1638
+ * If the validation blocks navigation
1639
+ * true/false - always/never block navigation
1640
+ * once - only block navigation if the validation has not been triggered before
1641
+ */
1642
+ blocking?: boolean | 'once';
1643
+ [key: string]: unknown;
1644
+ }>;
1645
+ /**
1646
+ * A reference to a specific data format to use.
1647
+ * If none is specified, will fallback to that of the base type
1648
+ */
1649
+ format?: {
1650
+ /** The name of the formatter (and de-formatter) to use */
1651
+ type: string;
1652
+ [key: string]: unknown;
1653
+ };
1654
+ /**
1655
+ * A default value for this property.
1656
+ * Any reads for this property will result in this default value being written to the model.
1657
+ */
1658
+ default?: T;
1659
+ /** boolean to define if its a record */
1660
+ isRecord: boolean;
1661
+ /** This property is mutually exclusive with RecordType and can not be used with ArrayType */
1662
+ isArray?: never;
1663
+ [key: string]: unknown;
1664
+ } | {
1665
+ /** The reference of the base type to use */
1666
+ type: string;
1667
+ /**
1668
+ * Any additional validations that are associated with this property
1669
+ * These will add to any base validations associated with the "type"
1670
+ */
1671
+ validation?: Array<{
1672
+ /**
1673
+ * The name of the referenced validation type
1674
+ * This will be used to lookup the proper handler
1675
+ */
1676
+ type: string;
1677
+ /** An optional means of overriding the default message if the validation is triggered */
1678
+ message?: string;
1679
+ /** An optional means of overriding the default severity of the validation if triggered */
1680
+ severity?: 'error' | 'warning';
1681
+ /** When to run this particular validation */
1682
+ trigger?: 'navigation' | 'change' | 'load';
1683
+ /**
1684
+ * Each validation is passed the value of the data to run it's validation against.
1685
+ * By default, this is the value stored in the data-model (deformatted).
1686
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1687
+ */
1688
+ dataTarget?: 'formatted' | 'deformatted';
1689
+ /** Where the error should be displayed */
1690
+ displayTarget?: 'page' | 'section' | 'field';
1691
+ /**
1692
+ * If the validation blocks navigation
1693
+ * true/false - always/never block navigation
1694
+ * once - only block navigation if the validation has not been triggered before
1695
+ */
1696
+ blocking?: boolean | 'once';
1697
+ [key: string]: unknown;
1698
+ }>;
1699
+ /**
1700
+ * A reference to a specific data format to use.
1701
+ * If none is specified, will fallback to that of the base type
1702
+ */
1703
+ format?: {
1704
+ /** The name of the formatter (and de-formatter) to use */
1705
+ type: string;
1706
+ [key: string]: unknown;
1707
+ };
1708
+ /**
1709
+ * A default value for this property.
1710
+ * Any reads for this property will result in this default value being written to the model.
1711
+ */
1712
+ default?: T;
1713
+ /** boolean to define if its an array */
1714
+ isArray: boolean;
1715
+ /** This property is mutually exclusive with ArrayType and can not be used with RecordType */
1716
+ isRecord?: never;
1717
+ [key: string]: unknown;
1718
+ };
1719
+ };
1720
+ [key: string]: {
1721
+ [key: string]: {
1722
+ /** The reference of the base type to use */
1723
+ type: string;
1724
+ /**
1725
+ * Any additional validations that are associated with this property
1726
+ * These will add to any base validations associated with the "type"
1727
+ */
1728
+ validation?: Array<{
1729
+ /**
1730
+ * The name of the referenced validation type
1731
+ * This will be used to lookup the proper handler
1732
+ */
1733
+ type: string;
1734
+ /** An optional means of overriding the default message if the validation is triggered */
1735
+ message?: string;
1736
+ /** An optional means of overriding the default severity of the validation if triggered */
1737
+ severity?: 'error' | 'warning';
1738
+ /** When to run this particular validation */
1739
+ trigger?: 'navigation' | 'change' | 'load';
1740
+ /**
1741
+ * Each validation is passed the value of the data to run it's validation against.
1742
+ * By default, this is the value stored in the data-model (deformatted).
1743
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1744
+ */
1745
+ dataTarget?: 'formatted' | 'deformatted';
1746
+ /** Where the error should be displayed */
1747
+ displayTarget?: 'page' | 'section' | 'field';
1748
+ /**
1749
+ * If the validation blocks navigation
1750
+ * true/false - always/never block navigation
1751
+ * once - only block navigation if the validation has not been triggered before
1752
+ */
1753
+ blocking?: boolean | 'once';
1754
+ [key: string]: unknown;
1755
+ }>;
1756
+ /**
1757
+ * A reference to a specific data format to use.
1758
+ * If none is specified, will fallback to that of the base type
1759
+ */
1760
+ format?: {
1761
+ /** The name of the formatter (and de-formatter) to use */
1762
+ type: string;
1763
+ [key: string]: unknown;
1764
+ };
1765
+ /**
1766
+ * A default value for this property.
1767
+ * Any reads for this property will result in this default value being written to the model.
1768
+ */
1769
+ default?: T;
1770
+ [key: string]: unknown;
1771
+ } | {
1772
+ /** The reference of the base type to use */
1773
+ type: string;
1774
+ /**
1775
+ * Any additional validations that are associated with this property
1776
+ * These will add to any base validations associated with the "type"
1777
+ */
1778
+ validation?: Array<{
1779
+ /**
1780
+ * The name of the referenced validation type
1781
+ * This will be used to lookup the proper handler
1782
+ */
1783
+ type: string;
1784
+ /** An optional means of overriding the default message if the validation is triggered */
1785
+ message?: string;
1786
+ /** An optional means of overriding the default severity of the validation if triggered */
1787
+ severity?: 'error' | 'warning';
1788
+ /** When to run this particular validation */
1789
+ trigger?: 'navigation' | 'change' | 'load';
1790
+ /**
1791
+ * Each validation is passed the value of the data to run it's validation against.
1792
+ * By default, this is the value stored in the data-model (deformatted).
1793
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1794
+ */
1795
+ dataTarget?: 'formatted' | 'deformatted';
1796
+ /** Where the error should be displayed */
1797
+ displayTarget?: 'page' | 'section' | 'field';
1798
+ /**
1799
+ * If the validation blocks navigation
1800
+ * true/false - always/never block navigation
1801
+ * once - only block navigation if the validation has not been triggered before
1802
+ */
1803
+ blocking?: boolean | 'once';
1804
+ [key: string]: unknown;
1805
+ }>;
1806
+ /**
1807
+ * A reference to a specific data format to use.
1808
+ * If none is specified, will fallback to that of the base type
1809
+ */
1810
+ format?: {
1811
+ /** The name of the formatter (and de-formatter) to use */
1812
+ type: string;
1813
+ [key: string]: unknown;
1814
+ };
1815
+ /**
1816
+ * A default value for this property.
1817
+ * Any reads for this property will result in this default value being written to the model.
1818
+ */
1819
+ default?: T;
1820
+ /** boolean to define if its a record */
1821
+ isRecord: boolean;
1822
+ /** This property is mutually exclusive with RecordType and can not be used with ArrayType */
1823
+ isArray?: never;
1824
+ [key: string]: unknown;
1825
+ } | {
1826
+ /** The reference of the base type to use */
1827
+ type: string;
1828
+ /**
1829
+ * Any additional validations that are associated with this property
1830
+ * These will add to any base validations associated with the "type"
1831
+ */
1832
+ validation?: Array<{
1833
+ /**
1834
+ * The name of the referenced validation type
1835
+ * This will be used to lookup the proper handler
1836
+ */
1837
+ type: string;
1838
+ /** An optional means of overriding the default message if the validation is triggered */
1839
+ message?: string;
1840
+ /** An optional means of overriding the default severity of the validation if triggered */
1841
+ severity?: 'error' | 'warning';
1842
+ /** When to run this particular validation */
1843
+ trigger?: 'navigation' | 'change' | 'load';
1844
+ /**
1845
+ * Each validation is passed the value of the data to run it's validation against.
1846
+ * By default, this is the value stored in the data-model (deformatted).
1847
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1848
+ */
1849
+ dataTarget?: 'formatted' | 'deformatted';
1850
+ /** Where the error should be displayed */
1851
+ displayTarget?: 'page' | 'section' | 'field';
1852
+ /**
1853
+ * If the validation blocks navigation
1854
+ * true/false - always/never block navigation
1855
+ * once - only block navigation if the validation has not been triggered before
1856
+ */
1857
+ blocking?: boolean | 'once';
1858
+ [key: string]: unknown;
1859
+ }>;
1860
+ /**
1861
+ * A reference to a specific data format to use.
1862
+ * If none is specified, will fallback to that of the base type
1863
+ */
1864
+ format?: {
1865
+ /** The name of the formatter (and de-formatter) to use */
1866
+ type: string;
1867
+ [key: string]: unknown;
1868
+ };
1869
+ /**
1870
+ * A default value for this property.
1871
+ * Any reads for this property will result in this default value being written to the model.
1872
+ */
1873
+ default?: T;
1874
+ /** boolean to define if its an array */
1875
+ isArray: boolean;
1876
+ /** This property is mutually exclusive with ArrayType and can not be used with RecordType */
1877
+ isRecord?: never;
1878
+ [key: string]: unknown;
1879
+ };
1880
+ };
1881
+ }
1882
+ /** A Node describes a specific object in the tree */
1883
+ export interface Schema.Node {
1884
+ [key: string]: {
1885
+ /** The reference of the base type to use */
1886
+ type: string;
1887
+ /**
1888
+ * Any additional validations that are associated with this property
1889
+ * These will add to any base validations associated with the "type"
1890
+ */
1891
+ validation?: Array<{
1892
+ /**
1893
+ * The name of the referenced validation type
1894
+ * This will be used to lookup the proper handler
1895
+ */
1896
+ type: string;
1897
+ /** An optional means of overriding the default message if the validation is triggered */
1898
+ message?: string;
1899
+ /** An optional means of overriding the default severity of the validation if triggered */
1900
+ severity?: 'error' | 'warning';
1901
+ /** When to run this particular validation */
1902
+ trigger?: 'navigation' | 'change' | 'load';
1903
+ /**
1904
+ * Each validation is passed the value of the data to run it's validation against.
1905
+ * By default, this is the value stored in the data-model (deformatted).
1906
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1907
+ */
1908
+ dataTarget?: 'formatted' | 'deformatted';
1909
+ /** Where the error should be displayed */
1910
+ displayTarget?: 'page' | 'section' | 'field';
1911
+ /**
1912
+ * If the validation blocks navigation
1913
+ * true/false - always/never block navigation
1914
+ * once - only block navigation if the validation has not been triggered before
1915
+ */
1916
+ blocking?: boolean | 'once';
1917
+ [key: string]: unknown;
1918
+ }>;
1919
+ /**
1920
+ * A reference to a specific data format to use.
1921
+ * If none is specified, will fallback to that of the base type
1922
+ */
1923
+ format?: {
1924
+ /** The name of the formatter (and de-formatter) to use */
1925
+ type: string;
1926
+ [key: string]: unknown;
1927
+ };
1928
+ /**
1929
+ * A default value for this property.
1930
+ * Any reads for this property will result in this default value being written to the model.
1931
+ */
1932
+ default?: T;
1933
+ [key: string]: unknown;
1934
+ } | {
1935
+ /** The reference of the base type to use */
1936
+ type: string;
1937
+ /**
1938
+ * Any additional validations that are associated with this property
1939
+ * These will add to any base validations associated with the "type"
1940
+ */
1941
+ validation?: Array<{
1942
+ /**
1943
+ * The name of the referenced validation type
1944
+ * This will be used to lookup the proper handler
1945
+ */
1946
+ type: string;
1947
+ /** An optional means of overriding the default message if the validation is triggered */
1948
+ message?: string;
1949
+ /** An optional means of overriding the default severity of the validation if triggered */
1950
+ severity?: 'error' | 'warning';
1951
+ /** When to run this particular validation */
1952
+ trigger?: 'navigation' | 'change' | 'load';
1953
+ /**
1954
+ * Each validation is passed the value of the data to run it's validation against.
1955
+ * By default, this is the value stored in the data-model (deformatted).
1956
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
1957
+ */
1958
+ dataTarget?: 'formatted' | 'deformatted';
1959
+ /** Where the error should be displayed */
1960
+ displayTarget?: 'page' | 'section' | 'field';
1961
+ /**
1962
+ * If the validation blocks navigation
1963
+ * true/false - always/never block navigation
1964
+ * once - only block navigation if the validation has not been triggered before
1965
+ */
1966
+ blocking?: boolean | 'once';
1967
+ [key: string]: unknown;
1968
+ }>;
1969
+ /**
1970
+ * A reference to a specific data format to use.
1971
+ * If none is specified, will fallback to that of the base type
1972
+ */
1973
+ format?: {
1974
+ /** The name of the formatter (and de-formatter) to use */
1975
+ type: string;
1976
+ [key: string]: unknown;
1977
+ };
1978
+ /**
1979
+ * A default value for this property.
1980
+ * Any reads for this property will result in this default value being written to the model.
1981
+ */
1982
+ default?: T;
1983
+ /** boolean to define if its a record */
1984
+ isRecord: boolean;
1985
+ /** This property is mutually exclusive with RecordType and can not be used with ArrayType */
1986
+ isArray?: never;
1987
+ [key: string]: unknown;
1988
+ } | {
1989
+ /** The reference of the base type to use */
1990
+ type: string;
1991
+ /**
1992
+ * Any additional validations that are associated with this property
1993
+ * These will add to any base validations associated with the "type"
1994
+ */
1995
+ validation?: Array<{
1996
+ /**
1997
+ * The name of the referenced validation type
1998
+ * This will be used to lookup the proper handler
1999
+ */
2000
+ type: string;
2001
+ /** An optional means of overriding the default message if the validation is triggered */
2002
+ message?: string;
2003
+ /** An optional means of overriding the default severity of the validation if triggered */
2004
+ severity?: 'error' | 'warning';
2005
+ /** When to run this particular validation */
2006
+ trigger?: 'navigation' | 'change' | 'load';
2007
+ /**
2008
+ * Each validation is passed the value of the data to run it's validation against.
2009
+ * By default, this is the value stored in the data-model (deformatted).
2010
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
2011
+ */
2012
+ dataTarget?: 'formatted' | 'deformatted';
2013
+ /** Where the error should be displayed */
2014
+ displayTarget?: 'page' | 'section' | 'field';
2015
+ /**
2016
+ * If the validation blocks navigation
2017
+ * true/false - always/never block navigation
2018
+ * once - only block navigation if the validation has not been triggered before
2019
+ */
2020
+ blocking?: boolean | 'once';
2021
+ [key: string]: unknown;
2022
+ }>;
2023
+ /**
2024
+ * A reference to a specific data format to use.
2025
+ * If none is specified, will fallback to that of the base type
2026
+ */
2027
+ format?: {
2028
+ /** The name of the formatter (and de-formatter) to use */
2029
+ type: string;
2030
+ [key: string]: unknown;
2031
+ };
2032
+ /**
2033
+ * A default value for this property.
2034
+ * Any reads for this property will result in this default value being written to the model.
2035
+ */
2036
+ default?: T;
2037
+ /** boolean to define if its an array */
2038
+ isArray: boolean;
2039
+ /** This property is mutually exclusive with ArrayType and can not be used with RecordType */
2040
+ isRecord?: never;
2041
+ [key: string]: unknown;
2042
+ };
2043
+ }
2044
+ export type Schema.DataTypes = {
2045
+ /** The reference of the base type to use */
2046
+ type: string;
2047
+ /**
2048
+ * Any additional validations that are associated with this property
2049
+ * These will add to any base validations associated with the "type"
2050
+ */
2051
+ validation?: Array<{
2052
+ /**
2053
+ * The name of the referenced validation type
2054
+ * This will be used to lookup the proper handler
2055
+ */
2056
+ type: string;
2057
+ /** An optional means of overriding the default message if the validation is triggered */
2058
+ message?: string;
2059
+ /** An optional means of overriding the default severity of the validation if triggered */
2060
+ severity?: 'error' | 'warning';
2061
+ /** When to run this particular validation */
2062
+ trigger?: 'navigation' | 'change' | 'load';
2063
+ /**
2064
+ * Each validation is passed the value of the data to run it's validation against.
2065
+ * By default, this is the value stored in the data-model (deformatted).
2066
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
2067
+ */
2068
+ dataTarget?: 'formatted' | 'deformatted';
2069
+ /** Where the error should be displayed */
2070
+ displayTarget?: 'page' | 'section' | 'field';
2071
+ /**
2072
+ * If the validation blocks navigation
2073
+ * true/false - always/never block navigation
2074
+ * once - only block navigation if the validation has not been triggered before
2075
+ */
2076
+ blocking?: boolean | 'once';
2077
+ [key: string]: unknown;
2078
+ }>;
2079
+ /**
2080
+ * A reference to a specific data format to use.
2081
+ * If none is specified, will fallback to that of the base type
2082
+ */
2083
+ format?: {
2084
+ /** The name of the formatter (and de-formatter) to use */
2085
+ type: string;
2086
+ [key: string]: unknown;
2087
+ };
2088
+ /**
2089
+ * A default value for this property.
2090
+ * Any reads for this property will result in this default value being written to the model.
2091
+ */
2092
+ default?: T;
2093
+ [key: string]: unknown;
2094
+ } | {
2095
+ /** The reference of the base type to use */
2096
+ type: string;
2097
+ /**
2098
+ * Any additional validations that are associated with this property
2099
+ * These will add to any base validations associated with the "type"
2100
+ */
2101
+ validation?: Array<{
2102
+ /**
2103
+ * The name of the referenced validation type
2104
+ * This will be used to lookup the proper handler
2105
+ */
2106
+ type: string;
2107
+ /** An optional means of overriding the default message if the validation is triggered */
2108
+ message?: string;
2109
+ /** An optional means of overriding the default severity of the validation if triggered */
2110
+ severity?: 'error' | 'warning';
2111
+ /** When to run this particular validation */
2112
+ trigger?: 'navigation' | 'change' | 'load';
2113
+ /**
2114
+ * Each validation is passed the value of the data to run it's validation against.
2115
+ * By default, this is the value stored in the data-model (deformatted).
2116
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
2117
+ */
2118
+ dataTarget?: 'formatted' | 'deformatted';
2119
+ /** Where the error should be displayed */
2120
+ displayTarget?: 'page' | 'section' | 'field';
2121
+ /**
2122
+ * If the validation blocks navigation
2123
+ * true/false - always/never block navigation
2124
+ * once - only block navigation if the validation has not been triggered before
2125
+ */
2126
+ blocking?: boolean | 'once';
2127
+ [key: string]: unknown;
2128
+ }>;
2129
+ /**
2130
+ * A reference to a specific data format to use.
2131
+ * If none is specified, will fallback to that of the base type
2132
+ */
2133
+ format?: {
2134
+ /** The name of the formatter (and de-formatter) to use */
2135
+ type: string;
2136
+ [key: string]: unknown;
2137
+ };
2138
+ /**
2139
+ * A default value for this property.
2140
+ * Any reads for this property will result in this default value being written to the model.
2141
+ */
2142
+ default?: T;
2143
+ /** boolean to define if its a record */
2144
+ isRecord: boolean;
2145
+ /** This property is mutually exclusive with RecordType and can not be used with ArrayType */
2146
+ isArray?: never;
2147
+ [key: string]: unknown;
2148
+ } | {
2149
+ /** The reference of the base type to use */
2150
+ type: string;
2151
+ /**
2152
+ * Any additional validations that are associated with this property
2153
+ * These will add to any base validations associated with the "type"
2154
+ */
2155
+ validation?: Array<{
2156
+ /**
2157
+ * The name of the referenced validation type
2158
+ * This will be used to lookup the proper handler
2159
+ */
2160
+ type: string;
2161
+ /** An optional means of overriding the default message if the validation is triggered */
2162
+ message?: string;
2163
+ /** An optional means of overriding the default severity of the validation if triggered */
2164
+ severity?: 'error' | 'warning';
2165
+ /** When to run this particular validation */
2166
+ trigger?: 'navigation' | 'change' | 'load';
2167
+ /**
2168
+ * Each validation is passed the value of the data to run it's validation against.
2169
+ * By default, this is the value stored in the data-model (deformatted).
2170
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
2171
+ */
2172
+ dataTarget?: 'formatted' | 'deformatted';
2173
+ /** Where the error should be displayed */
2174
+ displayTarget?: 'page' | 'section' | 'field';
2175
+ /**
2176
+ * If the validation blocks navigation
2177
+ * true/false - always/never block navigation
2178
+ * once - only block navigation if the validation has not been triggered before
2179
+ */
2180
+ blocking?: boolean | 'once';
2181
+ [key: string]: unknown;
2182
+ }>;
2183
+ /**
2184
+ * A reference to a specific data format to use.
2185
+ * If none is specified, will fallback to that of the base type
2186
+ */
2187
+ format?: {
2188
+ /** The name of the formatter (and de-formatter) to use */
2189
+ type: string;
2190
+ [key: string]: unknown;
2191
+ };
2192
+ /**
2193
+ * A default value for this property.
2194
+ * Any reads for this property will result in this default value being written to the model.
2195
+ */
2196
+ default?: T;
2197
+ /** boolean to define if its an array */
2198
+ isArray: boolean;
2199
+ /** This property is mutually exclusive with ArrayType and can not be used with RecordType */
2200
+ isRecord?: never;
2201
+ [key: string]: unknown;
2202
+ };
2203
+ /** Each prop in the object can have a specific DataType */
2204
+ export interface Schema.DataType<T extends any = unknown> {
2205
+ /** The reference of the base type to use */
2206
+ type: string;
2207
+ /**
2208
+ * Any additional validations that are associated with this property
2209
+ * These will add to any base validations associated with the "type"
2210
+ */
2211
+ validation?: Array<{
2212
+ /**
2213
+ * The name of the referenced validation type
2214
+ * This will be used to lookup the proper handler
2215
+ */
2216
+ type: string;
2217
+ /** An optional means of overriding the default message if the validation is triggered */
2218
+ message?: string;
2219
+ /** An optional means of overriding the default severity of the validation if triggered */
2220
+ severity?: 'error' | 'warning';
2221
+ /** When to run this particular validation */
2222
+ trigger?: 'navigation' | 'change' | 'load';
2223
+ /**
2224
+ * Each validation is passed the value of the data to run it's validation against.
2225
+ * By default, this is the value stored in the data-model (deformatted).
2226
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
2227
+ */
2228
+ dataTarget?: 'formatted' | 'deformatted';
2229
+ /** Where the error should be displayed */
2230
+ displayTarget?: 'page' | 'section' | 'field';
2231
+ /**
2232
+ * If the validation blocks navigation
2233
+ * true/false - always/never block navigation
2234
+ * once - only block navigation if the validation has not been triggered before
2235
+ */
2236
+ blocking?: boolean | 'once';
2237
+ [key: string]: unknown;
2238
+ }>;
2239
+ /**
2240
+ * A reference to a specific data format to use.
2241
+ * If none is specified, will fallback to that of the base type
2242
+ */
2243
+ format?: {
2244
+ /** The name of the formatter (and de-formatter) to use */
2245
+ type: string;
2246
+ [key: string]: unknown;
2247
+ };
2248
+ /**
2249
+ * A default value for this property.
2250
+ * Any reads for this property will result in this default value being written to the model.
2251
+ */
2252
+ default?: T;
2253
+ [key: string]: unknown;
2254
+ }
2255
+ /** Determines if the Datatype is a record object */
2256
+ export interface Schema.RecordType {
2257
+ /** The reference of the base type to use */
2258
+ type: string;
2259
+ /**
2260
+ * Any additional validations that are associated with this property
2261
+ * These will add to any base validations associated with the "type"
2262
+ */
2263
+ validation?: Array<{
2264
+ /**
2265
+ * The name of the referenced validation type
2266
+ * This will be used to lookup the proper handler
2267
+ */
2268
+ type: string;
2269
+ /** An optional means of overriding the default message if the validation is triggered */
2270
+ message?: string;
2271
+ /** An optional means of overriding the default severity of the validation if triggered */
2272
+ severity?: 'error' | 'warning';
2273
+ /** When to run this particular validation */
2274
+ trigger?: 'navigation' | 'change' | 'load';
2275
+ /**
2276
+ * Each validation is passed the value of the data to run it's validation against.
2277
+ * By default, this is the value stored in the data-model (deformatted).
2278
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
2279
+ */
2280
+ dataTarget?: 'formatted' | 'deformatted';
2281
+ /** Where the error should be displayed */
2282
+ displayTarget?: 'page' | 'section' | 'field';
2283
+ /**
2284
+ * If the validation blocks navigation
2285
+ * true/false - always/never block navigation
2286
+ * once - only block navigation if the validation has not been triggered before
2287
+ */
2288
+ blocking?: boolean | 'once';
2289
+ [key: string]: unknown;
2290
+ }>;
2291
+ /**
2292
+ * A reference to a specific data format to use.
2293
+ * If none is specified, will fallback to that of the base type
2294
+ */
2295
+ format?: {
2296
+ /** The name of the formatter (and de-formatter) to use */
2297
+ type: string;
2298
+ [key: string]: unknown;
2299
+ };
2300
+ /**
2301
+ * A default value for this property.
2302
+ * Any reads for this property will result in this default value being written to the model.
2303
+ */
2304
+ default?: T;
2305
+ /** boolean to define if its a record */
2306
+ isRecord: boolean;
2307
+ /** This property is mutually exclusive with RecordType and can not be used with ArrayType */
2308
+ isArray?: never;
2309
+ [key: string]: unknown;
2310
+ }
2311
+ /** Determines if the DataType is an Array Object */
2312
+ export interface Schema.ArrayType {
2313
+ /** The reference of the base type to use */
2314
+ type: string;
2315
+ /**
2316
+ * Any additional validations that are associated with this property
2317
+ * These will add to any base validations associated with the "type"
2318
+ */
2319
+ validation?: Array<{
2320
+ /**
2321
+ * The name of the referenced validation type
2322
+ * This will be used to lookup the proper handler
2323
+ */
2324
+ type: string;
2325
+ /** An optional means of overriding the default message if the validation is triggered */
2326
+ message?: string;
2327
+ /** An optional means of overriding the default severity of the validation if triggered */
2328
+ severity?: 'error' | 'warning';
2329
+ /** When to run this particular validation */
2330
+ trigger?: 'navigation' | 'change' | 'load';
2331
+ /**
2332
+ * Each validation is passed the value of the data to run it's validation against.
2333
+ * By default, this is the value stored in the data-model (deformatted).
2334
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
2335
+ */
2336
+ dataTarget?: 'formatted' | 'deformatted';
2337
+ /** Where the error should be displayed */
2338
+ displayTarget?: 'page' | 'section' | 'field';
2339
+ /**
2340
+ * If the validation blocks navigation
2341
+ * true/false - always/never block navigation
2342
+ * once - only block navigation if the validation has not been triggered before
2343
+ */
2344
+ blocking?: boolean | 'once';
2345
+ [key: string]: unknown;
2346
+ }>;
2347
+ /**
2348
+ * A reference to a specific data format to use.
2349
+ * If none is specified, will fallback to that of the base type
2350
+ */
2351
+ format?: {
2352
+ /** The name of the formatter (and de-formatter) to use */
2353
+ type: string;
2354
+ [key: string]: unknown;
2355
+ };
2356
+ /**
2357
+ * A default value for this property.
2358
+ * Any reads for this property will result in this default value being written to the model.
2359
+ */
2360
+ default?: T;
2361
+ /** boolean to define if its an array */
2362
+ isArray: boolean;
2363
+ /** This property is mutually exclusive with ArrayType and can not be used with RecordType */
2364
+ isRecord?: never;
2365
+ [key: string]: unknown;
2366
+ }
2367
+ /** Helper to compliment \`Schema.DataType\` to provide a way to export a reference to a data type instead of the whole object */
2368
+ export interface Language.DataTypeRef {
2369
+ /** Name of the type in Player Core */
2370
+ type: string;
2371
+ }
2372
+ /** A reference to a specific formatter */
2373
+ export interface Formatting.Reference {
2374
+ /** The name of the formatter (and de-formatter) to use */
2375
+ type: string;
2376
+ [key: string]: unknown;
2377
+ }
2378
+ /**
2379
+ * How serious are you about this error?
2380
+ * Warning validations are reserved for errors that could be ignored by the user without consequence
2381
+ * Errors must be fixed before proceeding
2382
+ */
2383
+ export type Validation.Severity = 'error' | 'warning';
2384
+ /**
2385
+ * When to _first_ start caring about a validation of a data-val.
2386
+ *
2387
+ * load - only check once the first time the binding appears on screen
2388
+ * change - check anytime the data changes
2389
+ * navigation - check once the user attempts to navigate away from a view
2390
+ */
2391
+ export type Validation.Trigger = 'navigation' | 'change' | 'load';
2392
+ /**
2393
+ * Where the error/warning should be displayed.
2394
+ * - \`field\` is the default display target. This renders the error/warning directly underneath the field.
2395
+ * - \`section\` is used to display a message at a parent node that is designated as a "section"
2396
+ * - \`page\` a special section used to display a message at the top of the page.
2397
+ */
2398
+ export type Validation.DisplayTarget = 'page' | 'section' | 'field';
2399
+ /** A reference to a validation object */
2400
+ export interface Validation.Reference {
2401
+ /**
2402
+ * The name of the referenced validation type
2403
+ * This will be used to lookup the proper handler
2404
+ */
2405
+ type: string;
2406
+ /** An optional means of overriding the default message if the validation is triggered */
2407
+ message?: string;
2408
+ /** An optional means of overriding the default severity of the validation if triggered */
2409
+ severity?: 'error' | 'warning';
2410
+ /** When to run this particular validation */
2411
+ trigger?: 'navigation' | 'change' | 'load';
2412
+ /**
2413
+ * Each validation is passed the value of the data to run it's validation against.
2414
+ * By default, this is the value stored in the data-model (deformatted).
2415
+ * In the off chance you'd like this validator to run against the formatted value (the one the user sees), set this option
2416
+ */
2417
+ dataTarget?: 'formatted' | 'deformatted';
2418
+ /** Where the error should be displayed */
2419
+ displayTarget?: 'page' | 'section' | 'field';
2420
+ /**
2421
+ * If the validation blocks navigation
2422
+ * true/false - always/never block navigation
2423
+ * once - only block navigation if the validation has not been triggered before
2424
+ */
2425
+ blocking?: boolean | 'once';
2426
+ [key: string]: unknown;
2427
+ }
2428
+ export interface Validation.CrossfieldReference {
2429
+ /**
2430
+ * The name of the referenced validation type
2431
+ * This will be used to lookup the proper handler
2432
+ */
2433
+ type: string;
2434
+ /** An optional means of overriding the default message if the validation is triggered */
2435
+ message?: string;
2436
+ /** An optional means of overriding the default severity of the validation if triggered */
2437
+ severity?: 'error' | 'warning';
2438
+ /** When to run this particular validation */
2439
+ trigger?: 'navigation' | 'change' | 'load';
2440
+ /** Cross-field references and validation must run against the default (deformatted) value */
2441
+ dataTarget?: never;
2442
+ /** Where the error should be displayed */
2443
+ displayTarget?: 'page' | 'section' | 'field';
2444
+ /**
2445
+ * If the validation blocks navigation
2446
+ * true/false - always/never block navigation
2447
+ * once - only block navigation if the validation has not been triggered before
2448
+ */
2449
+ blocking?: boolean | 'once';
2450
+ /** The binding to associate this validation with */
2451
+ ref?: Binding;
2452
+ [key: string]: unknown;
2453
+ }
2454
+ /**
2455
+ * This is the most generic way of gathering data. The input is bound to a data model using the 'binding' property.
2456
+ * Players can get field type information from the 'schema' definition, thus to decide the input controls for visual rendering.
2457
+ */
2458
+ export interface InputAsset<AnyTextAsset extends Asset = Asset> extends Asset<'input'> {
2459
+ /** Asset container for a field label. */
2460
+ label?: AssetWrapper<AnyTextAsset>;
2461
+ /** Asset container for a note. */
2462
+ note?: AssetWrapper<AnyTextAsset>;
2463
+ /** The location in the data-model to store the data */
2464
+ binding: Binding;
2465
+ /** Optional additional data */
2466
+ metaData?: {
2467
+ /** Additional data to beacon when this input changes */
2468
+ beacon?: string | Record<string, any>;
2469
+ };
2470
+ }
2471
+ export interface TextAsset extends Asset<'text'> {
2472
+ /** The text to display */
2473
+ value: string;
2474
+ /** Any modifiers on the text */
2475
+ modifiers?: Array<{
2476
+ /** The modifier type */
2477
+ type: string;
2478
+ /** Modifiers can be named when used in strings */
2479
+ name?: string;
2480
+ [key: string]: unknown;
2481
+ } | {
2482
+ /** The link type denotes this as a link */
2483
+ type: 'link';
2484
+ /** An optional expression to run before the link is opened */
2485
+ exp?: Expression;
2486
+ /** metaData about the link's target */
2487
+ metaData: {
2488
+ /** The location of the link to load */
2489
+ ref: string;
2490
+ /** Used to indicate an application specific resolver to use */
2491
+ 'mime-type'?: string;
2492
+ };
2493
+ }>;
2494
+ }
2495
+ /**
2496
+ * User actions can be represented in several places.
2497
+ * Each view typically has one or more actions that allow the user to navigate away from that view.
2498
+ * In addition, several asset types can have actions that apply to that asset only.
2499
+ */
2500
+ export interface ActionAsset<AnyTextAsset extends Asset = Asset> extends Asset<'action'> {
2501
+ /** The transition value of the action in the state machine */
2502
+ value?: string;
2503
+ /** A text-like asset for the action's label */
2504
+ label?: AssetWrapper<AnyTextAsset>;
2505
+ /** An optional expression to execute before transitioning */
2506
+ exp?: Expression;
2507
+ /** An optional string that describes the action for screen-readers */
2508
+ accessibility?: string;
2509
+ /** Additional optional data to assist with the action interactions on the page */
2510
+ metaData?: {
2511
+ /** Additional data to beacon */
2512
+ beacon?: string | Record<string, any>;
2513
+ /** Force transition to the next view without checking for validation */
2514
+ skipValidation?: boolean;
2515
+ };
2516
+ }
2517
+ export interface InfoAsset extends Asset<'info'> {
2518
+ /** The string value to show */
2519
+ title?: AssetWrapper;
2520
+ /** subtitle */
2521
+ subTitle?: AssetWrapper;
2522
+ /** Primary place for info */
2523
+ primaryInfo?: AssetWrapper;
2524
+ /** List of actions to show at the bottom of the page */
2525
+ actions?: Array<AssetWrapper>;
2526
+ }
2527
+ export interface CollectionAsset extends Asset<'collection'> {
2528
+ /** An optional label to title the collection */
2529
+ label?: AssetWrapper;
2530
+ /** The string value to show */
2531
+ values?: Array<AssetWrapper>;
2532
+ }"
2533
+ `;
2534
+
2535
+ exports[`Object Recall > Optimized 1`] = `
2536
+ {
2537
+ "additionalProperties": {
2538
+ "type": "unknown",
2539
+ },
2540
+ "description": "This is the most generic way of gathering data. The input is bound to a data model using the 'binding' property.
2541
+ Players can get field type information from the 'schema' definition, thus to decide the input controls for visual rendering.",
2542
+ "extends": undefined,
2543
+ "genericTokens": [
2544
+ {
2545
+ "constraints": {
2546
+ "additionalProperties": {
2547
+ "type": "unknown",
2548
+ },
2549
+ "description": "An asset is the smallest unit of user interaction in a player view",
2550
+ "extends": undefined,
2551
+ "genericTokens": [
2552
+ {
2553
+ "constraints": {
2554
+ "type": "string",
2555
+ },
2556
+ "default": {
2557
+ "type": "string",
2558
+ },
2559
+ "symbol": "T",
2560
+ },
2561
+ ],
2562
+ "name": "Asset",
2563
+ "properties": {
2564
+ "id": {
2565
+ "node": {
2566
+ "description": "Each asset requires a unique id per view",
2567
+ "title": "Asset.id",
2568
+ "type": "string",
2569
+ },
2570
+ "required": true,
2571
+ },
2572
+ "type": {
2573
+ "node": {
2574
+ "description": "The asset type determines the semantics of how a user interacts with a page",
2575
+ "title": "Asset.type",
2576
+ "type": "string",
2577
+ },
2578
+ "required": true,
2579
+ },
2580
+ },
2581
+ "source": "src/index.ts",
2582
+ "title": "Asset",
2583
+ "type": "object",
2584
+ },
2585
+ "default": {
2586
+ "additionalProperties": {
2587
+ "type": "unknown",
2588
+ },
2589
+ "description": "An asset is the smallest unit of user interaction in a player view",
2590
+ "extends": undefined,
2591
+ "genericTokens": [
2592
+ {
2593
+ "constraints": {
2594
+ "type": "string",
2595
+ },
2596
+ "default": {
2597
+ "type": "string",
2598
+ },
2599
+ "symbol": "T",
2600
+ },
2601
+ ],
2602
+ "name": "Asset",
2603
+ "properties": {
2604
+ "id": {
2605
+ "node": {
2606
+ "description": "Each asset requires a unique id per view",
2607
+ "title": "Asset.id",
2608
+ "type": "string",
2609
+ },
2610
+ "required": true,
2611
+ },
2612
+ "type": {
2613
+ "node": {
2614
+ "description": "The asset type determines the semantics of how a user interacts with a page",
2615
+ "title": "Asset.type",
2616
+ "type": "string",
2617
+ },
2618
+ "required": true,
2619
+ },
2620
+ },
2621
+ "source": "src/index.ts",
2622
+ "title": "Asset",
2623
+ "type": "object",
2624
+ },
2625
+ "symbol": "AnyTextAsset",
2626
+ },
2627
+ ],
2628
+ "name": "InputAsset",
2629
+ "properties": {
2630
+ "binding": {
2631
+ "node": {
2632
+ "description": "Bindings describe locations in the data model.",
2633
+ "name": "Binding",
2634
+ "source": "src/index.ts",
2635
+ "title": "Binding",
2636
+ "type": "string",
2637
+ },
2638
+ "required": true,
2639
+ },
2640
+ "id": {
2641
+ "node": {
2642
+ "description": "Each asset requires a unique id per view",
2643
+ "title": "Asset.id",
2644
+ "type": "string",
2645
+ },
2646
+ "required": true,
2647
+ },
2648
+ "label": {
2649
+ "node": {
2650
+ "additionalProperties": {
2651
+ "type": "unknown",
2652
+ },
2653
+ "description": "An object that contains an asset",
2654
+ "extends": undefined,
2655
+ "genericTokens": [],
2656
+ "name": "AssetWrapper",
2657
+ "properties": {
2658
+ "asset": {
2659
+ "node": {
2660
+ "additionalProperties": {
2661
+ "type": "unknown",
2662
+ },
2663
+ "description": "An asset is the smallest unit of user interaction in a player view",
2664
+ "extends": undefined,
2665
+ "genericTokens": [
2666
+ {
2667
+ "constraints": {
2668
+ "type": "string",
2669
+ },
2670
+ "default": {
2671
+ "type": "string",
2672
+ },
2673
+ "symbol": "T",
2674
+ },
2675
+ ],
2676
+ "name": "Asset",
2677
+ "properties": {
2678
+ "id": {
2679
+ "node": {
2680
+ "description": "Each asset requires a unique id per view",
2681
+ "title": "Asset.id",
2682
+ "type": "string",
2683
+ },
2684
+ "required": true,
2685
+ },
2686
+ "type": {
2687
+ "node": {
2688
+ "description": "The asset type determines the semantics of how a user interacts with a page",
2689
+ "title": "Asset.type",
2690
+ "type": "string",
2691
+ },
2692
+ "required": true,
2693
+ },
2694
+ },
2695
+ "source": "src/index.ts",
2696
+ "title": "Asset",
2697
+ "type": "object",
2698
+ },
2699
+ "required": true,
2700
+ },
2701
+ },
2702
+ "source": "src/index.ts",
2703
+ "title": "AssetWrapper",
2704
+ "type": "object",
2705
+ },
2706
+ "required": false,
2707
+ },
2708
+ "metaData": {
2709
+ "node": {
2710
+ "additionalProperties": false,
2711
+ "description": "Optional additional data",
2712
+ "extends": undefined,
2713
+ "properties": {
2714
+ "beacon": {
2715
+ "node": {
2716
+ "description": "Additional data to beacon when this input changes",
2717
+ "name": "BeaconDataType",
2718
+ "or": [
2719
+ {
2720
+ "title": "BeaconDataType",
2721
+ "type": "string",
2722
+ },
2723
+ {
2724
+ "keyType": {
2725
+ "type": "string",
2726
+ },
2727
+ "title": "BeaconDataType",
2728
+ "type": "record",
2729
+ "valueType": {
2730
+ "type": "any",
2731
+ },
2732
+ },
2733
+ ],
2734
+ "source": "/private/var/tmp/_bazel_kreddy8/6fc13ccb395252816f0c23d8394e8532/sandbox/darwin-sandbox/134/execroot/player/node_modules/@player-ui/beacon-plugin/dist/index.d.ts",
2735
+ "title": "InputAsset.metaData.beacon",
2736
+ "type": "or",
2737
+ },
2738
+ "required": false,
2739
+ },
2740
+ },
2741
+ "title": "InputAsset.metaData",
2742
+ "type": "object",
2743
+ },
2744
+ "required": false,
2745
+ },
2746
+ "note": {
2747
+ "node": {
2748
+ "additionalProperties": {
2749
+ "type": "unknown",
2750
+ },
2751
+ "description": "An object that contains an asset",
2752
+ "extends": undefined,
2753
+ "genericTokens": [],
2754
+ "name": "AssetWrapper",
2755
+ "properties": {
2756
+ "asset": {
2757
+ "node": {
2758
+ "additionalProperties": {
2759
+ "type": "unknown",
2760
+ },
2761
+ "description": "An asset is the smallest unit of user interaction in a player view",
2762
+ "extends": undefined,
2763
+ "genericTokens": [
2764
+ {
2765
+ "constraints": {
2766
+ "type": "string",
2767
+ },
2768
+ "default": {
2769
+ "type": "string",
2770
+ },
2771
+ "symbol": "T",
2772
+ },
2773
+ ],
2774
+ "name": "Asset",
2775
+ "properties": {
2776
+ "id": {
2777
+ "node": {
2778
+ "description": "Each asset requires a unique id per view",
2779
+ "title": "Asset.id",
2780
+ "type": "string",
2781
+ },
2782
+ "required": true,
2783
+ },
2784
+ "type": {
2785
+ "node": {
2786
+ "description": "The asset type determines the semantics of how a user interacts with a page",
2787
+ "title": "Asset.type",
2788
+ "type": "string",
2789
+ },
2790
+ "required": true,
2791
+ },
2792
+ },
2793
+ "source": "src/index.ts",
2794
+ "title": "Asset",
2795
+ "type": "object",
2796
+ },
2797
+ "required": true,
2798
+ },
2799
+ },
2800
+ "source": "src/index.ts",
2801
+ "title": "AssetWrapper",
2802
+ "type": "object",
2803
+ },
2804
+ "required": false,
2805
+ },
2806
+ "type": {
2807
+ "node": {
2808
+ "const": "input",
2809
+ "description": "The asset type determines the semantics of how a user interacts with a page",
2810
+ "title": "Asset.type",
2811
+ "type": "string",
2812
+ },
2813
+ "required": true,
2814
+ },
2815
+ },
2816
+ "source": "src/index.ts",
2817
+ "title": "Asset",
2818
+ "type": "object",
2819
+ }
2820
+ `;
2821
+
2822
+ exports[`Object Recall > Processed 1`] = `
2823
+ {
2824
+ "additionalProperties": {
2825
+ "type": "unknown",
2826
+ },
2827
+ "description": "This is the most generic way of gathering data. The input is bound to a data model using the 'binding' property.
2828
+ Players can get field type information from the 'schema' definition, thus to decide the input controls for visual rendering.",
2829
+ "extends": undefined,
2830
+ "genericTokens": [
2831
+ {
2832
+ "constraints": {
2833
+ "ref": "Asset",
2834
+ "type": "ref",
2835
+ },
2836
+ "default": {
2837
+ "ref": "Asset",
2838
+ "type": "ref",
2839
+ },
2840
+ "symbol": "AnyTextAsset",
2841
+ },
2842
+ ],
2843
+ "name": "InputAsset",
2844
+ "properties": {
2845
+ "binding": {
2846
+ "node": {
2847
+ "description": "The location in the data-model to store the data",
2848
+ "ref": "Binding",
2849
+ "title": "InputAsset.binding",
2850
+ "type": "ref",
2851
+ },
2852
+ "required": true,
2853
+ },
2854
+ "id": {
2855
+ "node": {
2856
+ "description": "Each asset requires a unique id per view",
2857
+ "title": "Asset.id",
2858
+ "type": "string",
2859
+ },
2860
+ "required": true,
2861
+ },
2862
+ "label": {
2863
+ "node": {
2864
+ "description": "Asset container for a field label.",
2865
+ "genericArguments": [
2866
+ {
2867
+ "ref": "Asset",
2868
+ "type": "ref",
2869
+ },
2870
+ ],
2871
+ "ref": "AssetWrapper<AnyTextAsset>",
2872
+ "title": "InputAsset.label",
2873
+ "type": "ref",
2874
+ },
2875
+ "required": false,
2876
+ },
2877
+ "metaData": {
2878
+ "node": {
2879
+ "additionalProperties": false,
2880
+ "description": "Optional additional data",
2881
+ "extends": undefined,
2882
+ "properties": {
2883
+ "beacon": {
2884
+ "node": {
2885
+ "description": "Additional data to beacon when this input changes",
2886
+ "name": "BeaconDataType",
2887
+ "or": [
2888
+ {
2889
+ "title": "BeaconDataType",
2890
+ "type": "string",
2891
+ },
2892
+ {
2893
+ "keyType": {
2894
+ "type": "string",
2895
+ },
2896
+ "title": "BeaconDataType",
2897
+ "type": "record",
2898
+ "valueType": {
2899
+ "type": "any",
2900
+ },
2901
+ },
2902
+ ],
2903
+ "source": "/private/var/tmp/_bazel_kreddy8/6fc13ccb395252816f0c23d8394e8532/sandbox/darwin-sandbox/134/execroot/player/node_modules/@player-ui/beacon-plugin/dist/index.d.ts",
2904
+ "title": "InputAsset.metaData.beacon",
2905
+ "type": "or",
2906
+ },
2907
+ "required": false,
2908
+ },
2909
+ },
2910
+ "title": "InputAsset.metaData",
2911
+ "type": "object",
2912
+ },
2913
+ "required": false,
2914
+ },
2915
+ "note": {
2916
+ "node": {
2917
+ "description": "Asset container for a note.",
2918
+ "genericArguments": [
2919
+ {
2920
+ "ref": "Asset",
2921
+ "type": "ref",
2922
+ },
2923
+ ],
2924
+ "ref": "AssetWrapper<AnyTextAsset>",
2925
+ "title": "InputAsset.note",
2926
+ "type": "ref",
2927
+ },
2928
+ "required": false,
2929
+ },
2930
+ "type": {
2931
+ "node": {
2932
+ "const": "input",
2933
+ "description": "The asset type determines the semantics of how a user interacts with a page",
2934
+ "title": "Asset.type",
2935
+ "type": "string",
2936
+ },
2937
+ "required": true,
2938
+ },
2939
+ },
2940
+ "source": "src/index.ts",
2941
+ "title": "Asset",
2942
+ "type": "object",
2943
+ }
2944
+ `;
2945
+
2946
+ exports[`Object Recall > Raw 1`] = `
2947
+ {
2948
+ "additionalProperties": false,
2949
+ "description": "This is the most generic way of gathering data. The input is bound to a data model using the 'binding' property.
2950
+ Players can get field type information from the 'schema' definition, thus to decide the input controls for visual rendering.",
2951
+ "extends": {
2952
+ "genericArguments": [
2953
+ {
2954
+ "const": "input",
2955
+ "type": "string",
2956
+ },
2957
+ ],
2958
+ "ref": "Asset<'input'>",
2959
+ "type": "ref",
2960
+ },
2961
+ "genericTokens": [
2962
+ {
2963
+ "constraints": {
2964
+ "ref": "Asset",
2965
+ "type": "ref",
2966
+ },
2967
+ "default": {
2968
+ "ref": "Asset",
2969
+ "type": "ref",
2970
+ },
2971
+ "symbol": "AnyTextAsset",
2972
+ },
2973
+ ],
2974
+ "name": "InputAsset",
2975
+ "properties": {
2976
+ "binding": {
2977
+ "node": {
2978
+ "description": "The location in the data-model to store the data",
2979
+ "ref": "Binding",
2980
+ "title": "InputAsset.binding",
2981
+ "type": "ref",
2982
+ },
2983
+ "required": true,
2984
+ },
2985
+ "label": {
2986
+ "node": {
2987
+ "description": "Asset container for a field label.",
2988
+ "genericArguments": [
2989
+ {
2990
+ "ref": "AnyTextAsset",
2991
+ "type": "ref",
2992
+ },
2993
+ ],
2994
+ "ref": "AssetWrapper<AnyTextAsset>",
2995
+ "title": "InputAsset.label",
2996
+ "type": "ref",
2997
+ },
2998
+ "required": false,
2999
+ },
3000
+ "metaData": {
3001
+ "node": {
3002
+ "additionalProperties": false,
3003
+ "description": "Optional additional data",
3004
+ "properties": {
3005
+ "beacon": {
3006
+ "node": {
3007
+ "description": "Additional data to beacon when this input changes",
3008
+ "name": "BeaconDataType",
3009
+ "or": [
3010
+ {
3011
+ "title": "BeaconDataType",
3012
+ "type": "string",
3013
+ },
3014
+ {
3015
+ "keyType": {
3016
+ "type": "string",
3017
+ },
3018
+ "title": "BeaconDataType",
3019
+ "type": "record",
3020
+ "valueType": {
3021
+ "type": "any",
3022
+ },
3023
+ },
3024
+ ],
3025
+ "source": "/private/var/tmp/_bazel_kreddy8/6fc13ccb395252816f0c23d8394e8532/sandbox/darwin-sandbox/134/execroot/player/node_modules/@player-ui/beacon-plugin/dist/index.d.ts",
3026
+ "title": "InputAsset.metaData.beacon",
3027
+ "type": "or",
3028
+ },
3029
+ "required": false,
3030
+ },
3031
+ },
3032
+ "title": "InputAsset.metaData",
3033
+ "type": "object",
3034
+ },
3035
+ "required": false,
3036
+ },
3037
+ "note": {
3038
+ "node": {
3039
+ "description": "Asset container for a note.",
3040
+ "genericArguments": [
3041
+ {
3042
+ "ref": "AnyTextAsset",
3043
+ "type": "ref",
3044
+ },
3045
+ ],
3046
+ "ref": "AssetWrapper<AnyTextAsset>",
3047
+ "title": "InputAsset.note",
3048
+ "type": "ref",
3049
+ },
3050
+ "required": false,
3051
+ },
3052
+ },
3053
+ "source": "/private/var/tmp/_bazel_kreddy8/6fc13ccb395252816f0c23d8394e8532/sandbox/darwin-sandbox/134/execroot/player/node_modules/@player-ui/reference-assets-plugin/dist/index.d.ts",
3054
+ "title": "InputAsset",
3055
+ "type": "object",
3056
+ }
3057
+ `;
3058
+
3059
+ exports[`Validation > Basic Validation By Name 1`] = `
3060
+ [
3061
+ {
3062
+ "expected": "string",
3063
+ "message": "Expected type "string" but got "number"",
3064
+ "node": {
3065
+ "children": [
3066
+ {
3067
+ "length": 4,
3068
+ "offset": 13,
3069
+ "parent": [Circular],
3070
+ "type": "string",
3071
+ "value": "id",
3072
+ },
3073
+ {
3074
+ "length": 1,
3075
+ "offset": 19,
3076
+ "parent": [Circular],
3077
+ "type": "number",
3078
+ "value": 1,
3079
+ },
3080
+ ],
3081
+ "colonOffset": 17,
3082
+ "length": 7,
3083
+ "offset": 13,
3084
+ "parent": {
3085
+ "children": [
3086
+ [Circular],
3087
+ {
3088
+ "children": [
3089
+ {
3090
+ "length": 6,
3091
+ "offset": 28,
3092
+ "parent": [Circular],
3093
+ "type": "string",
3094
+ "value": "type",
3095
+ },
3096
+ {
3097
+ "length": 7,
3098
+ "offset": 36,
3099
+ "parent": [Circular],
3100
+ "type": "string",
3101
+ "value": "input",
3102
+ },
3103
+ ],
3104
+ "colonOffset": 34,
3105
+ "length": 15,
3106
+ "offset": 28,
3107
+ "parent": [Circular],
3108
+ "type": "property",
3109
+ },
3110
+ {
3111
+ "children": [
3112
+ {
3113
+ "length": 9,
3114
+ "offset": 51,
3115
+ "parent": [Circular],
3116
+ "type": "string",
3117
+ "value": "binding",
3118
+ },
3119
+ {
3120
+ "length": 11,
3121
+ "offset": 62,
3122
+ "parent": [Circular],
3123
+ "type": "string",
3124
+ "value": "some.data",
3125
+ },
3126
+ ],
3127
+ "colonOffset": 60,
3128
+ "length": 22,
3129
+ "offset": 51,
3130
+ "parent": [Circular],
3131
+ "type": "property",
3132
+ },
3133
+ {
3134
+ "children": [
3135
+ {
3136
+ "length": 7,
3137
+ "offset": 81,
3138
+ "parent": [Circular],
3139
+ "type": "string",
3140
+ "value": "label",
3141
+ },
3142
+ {
3143
+ "children": [
3144
+ {
3145
+ "children": [
3146
+ {
3147
+ "length": 7,
3148
+ "offset": 100,
3149
+ "parent": [Circular],
3150
+ "type": "string",
3151
+ "value": "asset",
3152
+ },
3153
+ {
3154
+ "children": [
3155
+ {
3156
+ "children": [
3157
+ {
3158
+ "length": 7,
3159
+ "offset": 121,
3160
+ "parent": [Circular],
3161
+ "type": "string",
3162
+ "value": "value",
3163
+ },
3164
+ {
3165
+ "length": 17,
3166
+ "offset": 130,
3167
+ "parent": [Circular],
3168
+ "type": "string",
3169
+ "value": "{{input.label}}",
3170
+ },
3171
+ ],
3172
+ "colonOffset": 128,
3173
+ "length": 26,
3174
+ "offset": 121,
3175
+ "parent": [Circular],
3176
+ "type": "property",
3177
+ },
3178
+ ],
3179
+ "length": 48,
3180
+ "offset": 109,
3181
+ "parent": [Circular],
3182
+ "type": "object",
3183
+ },
3184
+ ],
3185
+ "colonOffset": 107,
3186
+ "length": 57,
3187
+ "offset": 100,
3188
+ "parent": [Circular],
3189
+ "type": "property",
3190
+ },
3191
+ ],
3192
+ "length": 75,
3193
+ "offset": 90,
3194
+ "parent": [Circular],
3195
+ "type": "object",
3196
+ },
3197
+ ],
3198
+ "colonOffset": 88,
3199
+ "length": 84,
3200
+ "offset": 81,
3201
+ "parent": [Circular],
3202
+ "type": "property",
3203
+ },
3204
+ ],
3205
+ "length": 165,
3206
+ "offset": 5,
3207
+ "type": "object",
3208
+ },
3209
+ "type": "property",
3210
+ },
3211
+ "severity": 1,
3212
+ "type": "type",
3213
+ },
3214
+ {
3215
+ "message": "Property "id" missing from type "Asset"",
3216
+ "node": {
3217
+ "children": [
3218
+ {
3219
+ "children": [
3220
+ {
3221
+ "length": 7,
3222
+ "offset": 121,
3223
+ "parent": [Circular],
3224
+ "type": "string",
3225
+ "value": "value",
3226
+ },
3227
+ {
3228
+ "length": 17,
3229
+ "offset": 130,
3230
+ "parent": [Circular],
3231
+ "type": "string",
3232
+ "value": "{{input.label}}",
3233
+ },
3234
+ ],
3235
+ "colonOffset": 128,
3236
+ "length": 26,
3237
+ "offset": 121,
3238
+ "parent": [Circular],
3239
+ "type": "property",
3240
+ },
3241
+ ],
3242
+ "length": 48,
3243
+ "offset": 109,
3244
+ "parent": {
3245
+ "children": [
3246
+ {
3247
+ "length": 7,
3248
+ "offset": 100,
3249
+ "parent": [Circular],
3250
+ "type": "string",
3251
+ "value": "asset",
3252
+ },
3253
+ [Circular],
3254
+ ],
3255
+ "colonOffset": 107,
3256
+ "length": 57,
3257
+ "offset": 100,
3258
+ "parent": {
3259
+ "children": [
3260
+ [Circular],
3261
+ ],
3262
+ "length": 75,
3263
+ "offset": 90,
3264
+ "parent": {
3265
+ "children": [
3266
+ {
3267
+ "length": 7,
3268
+ "offset": 81,
3269
+ "parent": [Circular],
3270
+ "type": "string",
3271
+ "value": "label",
3272
+ },
3273
+ [Circular],
3274
+ ],
3275
+ "colonOffset": 88,
3276
+ "length": 84,
3277
+ "offset": 81,
3278
+ "parent": {
3279
+ "children": [
3280
+ {
3281
+ "children": [
3282
+ {
3283
+ "length": 4,
3284
+ "offset": 13,
3285
+ "parent": [Circular],
3286
+ "type": "string",
3287
+ "value": "id",
3288
+ },
3289
+ {
3290
+ "length": 1,
3291
+ "offset": 19,
3292
+ "parent": [Circular],
3293
+ "type": "number",
3294
+ "value": 1,
3295
+ },
3296
+ ],
3297
+ "colonOffset": 17,
3298
+ "length": 7,
3299
+ "offset": 13,
3300
+ "parent": [Circular],
3301
+ "type": "property",
3302
+ },
3303
+ {
3304
+ "children": [
3305
+ {
3306
+ "length": 6,
3307
+ "offset": 28,
3308
+ "parent": [Circular],
3309
+ "type": "string",
3310
+ "value": "type",
3311
+ },
3312
+ {
3313
+ "length": 7,
3314
+ "offset": 36,
3315
+ "parent": [Circular],
3316
+ "type": "string",
3317
+ "value": "input",
3318
+ },
3319
+ ],
3320
+ "colonOffset": 34,
3321
+ "length": 15,
3322
+ "offset": 28,
3323
+ "parent": [Circular],
3324
+ "type": "property",
3325
+ },
3326
+ {
3327
+ "children": [
3328
+ {
3329
+ "length": 9,
3330
+ "offset": 51,
3331
+ "parent": [Circular],
3332
+ "type": "string",
3333
+ "value": "binding",
3334
+ },
3335
+ {
3336
+ "length": 11,
3337
+ "offset": 62,
3338
+ "parent": [Circular],
3339
+ "type": "string",
3340
+ "value": "some.data",
3341
+ },
3342
+ ],
3343
+ "colonOffset": 60,
3344
+ "length": 22,
3345
+ "offset": 51,
3346
+ "parent": [Circular],
3347
+ "type": "property",
3348
+ },
3349
+ [Circular],
3350
+ ],
3351
+ "length": 165,
3352
+ "offset": 5,
3353
+ "type": "object",
3354
+ },
3355
+ "type": "property",
3356
+ },
3357
+ "type": "object",
3358
+ },
3359
+ "type": "property",
3360
+ },
3361
+ "type": "object",
3362
+ },
3363
+ "severity": 1,
3364
+ "type": "missing",
3365
+ },
3366
+ {
3367
+ "message": "Property "type" missing from type "Asset"",
3368
+ "node": {
3369
+ "children": [
3370
+ {
3371
+ "children": [
3372
+ {
3373
+ "length": 7,
3374
+ "offset": 121,
3375
+ "parent": [Circular],
3376
+ "type": "string",
3377
+ "value": "value",
3378
+ },
3379
+ {
3380
+ "length": 17,
3381
+ "offset": 130,
3382
+ "parent": [Circular],
3383
+ "type": "string",
3384
+ "value": "{{input.label}}",
3385
+ },
3386
+ ],
3387
+ "colonOffset": 128,
3388
+ "length": 26,
3389
+ "offset": 121,
3390
+ "parent": [Circular],
3391
+ "type": "property",
3392
+ },
3393
+ ],
3394
+ "length": 48,
3395
+ "offset": 109,
3396
+ "parent": {
3397
+ "children": [
3398
+ {
3399
+ "length": 7,
3400
+ "offset": 100,
3401
+ "parent": [Circular],
3402
+ "type": "string",
3403
+ "value": "asset",
3404
+ },
3405
+ [Circular],
3406
+ ],
3407
+ "colonOffset": 107,
3408
+ "length": 57,
3409
+ "offset": 100,
3410
+ "parent": {
3411
+ "children": [
3412
+ [Circular],
3413
+ ],
3414
+ "length": 75,
3415
+ "offset": 90,
3416
+ "parent": {
3417
+ "children": [
3418
+ {
3419
+ "length": 7,
3420
+ "offset": 81,
3421
+ "parent": [Circular],
3422
+ "type": "string",
3423
+ "value": "label",
3424
+ },
3425
+ [Circular],
3426
+ ],
3427
+ "colonOffset": 88,
3428
+ "length": 84,
3429
+ "offset": 81,
3430
+ "parent": {
3431
+ "children": [
3432
+ {
3433
+ "children": [
3434
+ {
3435
+ "length": 4,
3436
+ "offset": 13,
3437
+ "parent": [Circular],
3438
+ "type": "string",
3439
+ "value": "id",
3440
+ },
3441
+ {
3442
+ "length": 1,
3443
+ "offset": 19,
3444
+ "parent": [Circular],
3445
+ "type": "number",
3446
+ "value": 1,
3447
+ },
3448
+ ],
3449
+ "colonOffset": 17,
3450
+ "length": 7,
3451
+ "offset": 13,
3452
+ "parent": [Circular],
3453
+ "type": "property",
3454
+ },
3455
+ {
3456
+ "children": [
3457
+ {
3458
+ "length": 6,
3459
+ "offset": 28,
3460
+ "parent": [Circular],
3461
+ "type": "string",
3462
+ "value": "type",
3463
+ },
3464
+ {
3465
+ "length": 7,
3466
+ "offset": 36,
3467
+ "parent": [Circular],
3468
+ "type": "string",
3469
+ "value": "input",
3470
+ },
3471
+ ],
3472
+ "colonOffset": 34,
3473
+ "length": 15,
3474
+ "offset": 28,
3475
+ "parent": [Circular],
3476
+ "type": "property",
3477
+ },
3478
+ {
3479
+ "children": [
3480
+ {
3481
+ "length": 9,
3482
+ "offset": 51,
3483
+ "parent": [Circular],
3484
+ "type": "string",
3485
+ "value": "binding",
3486
+ },
3487
+ {
3488
+ "length": 11,
3489
+ "offset": 62,
3490
+ "parent": [Circular],
3491
+ "type": "string",
3492
+ "value": "some.data",
3493
+ },
3494
+ ],
3495
+ "colonOffset": 60,
3496
+ "length": 22,
3497
+ "offset": 51,
3498
+ "parent": [Circular],
3499
+ "type": "property",
3500
+ },
3501
+ [Circular],
3502
+ ],
3503
+ "length": 165,
3504
+ "offset": 5,
3505
+ "type": "object",
3506
+ },
3507
+ "type": "property",
3508
+ },
3509
+ "type": "object",
3510
+ },
3511
+ "type": "property",
3512
+ },
3513
+ "type": "object",
3514
+ },
3515
+ "severity": 1,
3516
+ "type": "missing",
3517
+ },
3518
+ ]
3519
+ `;
3520
+
3521
+ exports[`Validation > Basic Validation By Type (optimized) 1`] = `
3522
+ [
3523
+ {
3524
+ "expected": "string",
3525
+ "message": "Expected type "string" but got "number"",
3526
+ "node": {
3527
+ "children": [
3528
+ {
3529
+ "length": 4,
3530
+ "offset": 13,
3531
+ "parent": [Circular],
3532
+ "type": "string",
3533
+ "value": "id",
3534
+ },
3535
+ {
3536
+ "length": 1,
3537
+ "offset": 19,
3538
+ "parent": [Circular],
3539
+ "type": "number",
3540
+ "value": 1,
3541
+ },
3542
+ ],
3543
+ "colonOffset": 17,
3544
+ "length": 7,
3545
+ "offset": 13,
3546
+ "parent": {
3547
+ "children": [
3548
+ [Circular],
3549
+ {
3550
+ "children": [
3551
+ {
3552
+ "length": 6,
3553
+ "offset": 28,
3554
+ "parent": [Circular],
3555
+ "type": "string",
3556
+ "value": "type",
3557
+ },
3558
+ {
3559
+ "length": 7,
3560
+ "offset": 36,
3561
+ "parent": [Circular],
3562
+ "type": "string",
3563
+ "value": "input",
3564
+ },
3565
+ ],
3566
+ "colonOffset": 34,
3567
+ "length": 15,
3568
+ "offset": 28,
3569
+ "parent": [Circular],
3570
+ "type": "property",
3571
+ },
3572
+ {
3573
+ "children": [
3574
+ {
3575
+ "length": 9,
3576
+ "offset": 51,
3577
+ "parent": [Circular],
3578
+ "type": "string",
3579
+ "value": "binding",
3580
+ },
3581
+ {
3582
+ "length": 11,
3583
+ "offset": 62,
3584
+ "parent": [Circular],
3585
+ "type": "string",
3586
+ "value": "some.data",
3587
+ },
3588
+ ],
3589
+ "colonOffset": 60,
3590
+ "length": 22,
3591
+ "offset": 51,
3592
+ "parent": [Circular],
3593
+ "type": "property",
3594
+ },
3595
+ {
3596
+ "children": [
3597
+ {
3598
+ "length": 7,
3599
+ "offset": 81,
3600
+ "parent": [Circular],
3601
+ "type": "string",
3602
+ "value": "label",
3603
+ },
3604
+ {
3605
+ "children": [
3606
+ {
3607
+ "children": [
3608
+ {
3609
+ "length": 7,
3610
+ "offset": 100,
3611
+ "parent": [Circular],
3612
+ "type": "string",
3613
+ "value": "asset",
3614
+ },
3615
+ {
3616
+ "children": [
3617
+ {
3618
+ "children": [
3619
+ {
3620
+ "length": 7,
3621
+ "offset": 121,
3622
+ "parent": [Circular],
3623
+ "type": "string",
3624
+ "value": "value",
3625
+ },
3626
+ {
3627
+ "length": 17,
3628
+ "offset": 130,
3629
+ "parent": [Circular],
3630
+ "type": "string",
3631
+ "value": "{{input.label}}",
3632
+ },
3633
+ ],
3634
+ "colonOffset": 128,
3635
+ "length": 26,
3636
+ "offset": 121,
3637
+ "parent": [Circular],
3638
+ "type": "property",
3639
+ },
3640
+ ],
3641
+ "length": 48,
3642
+ "offset": 109,
3643
+ "parent": [Circular],
3644
+ "type": "object",
3645
+ },
3646
+ ],
3647
+ "colonOffset": 107,
3648
+ "length": 57,
3649
+ "offset": 100,
3650
+ "parent": [Circular],
3651
+ "type": "property",
3652
+ },
3653
+ ],
3654
+ "length": 75,
3655
+ "offset": 90,
3656
+ "parent": [Circular],
3657
+ "type": "object",
3658
+ },
3659
+ ],
3660
+ "colonOffset": 88,
3661
+ "length": 84,
3662
+ "offset": 81,
3663
+ "parent": [Circular],
3664
+ "type": "property",
3665
+ },
3666
+ ],
3667
+ "length": 165,
3668
+ "offset": 5,
3669
+ "type": "object",
3670
+ },
3671
+ "type": "property",
3672
+ },
3673
+ "severity": 1,
3674
+ "type": "type",
3675
+ },
3676
+ {
3677
+ "message": "Property "id" missing from type "Asset"",
3678
+ "node": {
3679
+ "children": [
3680
+ {
3681
+ "children": [
3682
+ {
3683
+ "length": 7,
3684
+ "offset": 121,
3685
+ "parent": [Circular],
3686
+ "type": "string",
3687
+ "value": "value",
3688
+ },
3689
+ {
3690
+ "length": 17,
3691
+ "offset": 130,
3692
+ "parent": [Circular],
3693
+ "type": "string",
3694
+ "value": "{{input.label}}",
3695
+ },
3696
+ ],
3697
+ "colonOffset": 128,
3698
+ "length": 26,
3699
+ "offset": 121,
3700
+ "parent": [Circular],
3701
+ "type": "property",
3702
+ },
3703
+ ],
3704
+ "length": 48,
3705
+ "offset": 109,
3706
+ "parent": {
3707
+ "children": [
3708
+ {
3709
+ "length": 7,
3710
+ "offset": 100,
3711
+ "parent": [Circular],
3712
+ "type": "string",
3713
+ "value": "asset",
3714
+ },
3715
+ [Circular],
3716
+ ],
3717
+ "colonOffset": 107,
3718
+ "length": 57,
3719
+ "offset": 100,
3720
+ "parent": {
3721
+ "children": [
3722
+ [Circular],
3723
+ ],
3724
+ "length": 75,
3725
+ "offset": 90,
3726
+ "parent": {
3727
+ "children": [
3728
+ {
3729
+ "length": 7,
3730
+ "offset": 81,
3731
+ "parent": [Circular],
3732
+ "type": "string",
3733
+ "value": "label",
3734
+ },
3735
+ [Circular],
3736
+ ],
3737
+ "colonOffset": 88,
3738
+ "length": 84,
3739
+ "offset": 81,
3740
+ "parent": {
3741
+ "children": [
3742
+ {
3743
+ "children": [
3744
+ {
3745
+ "length": 4,
3746
+ "offset": 13,
3747
+ "parent": [Circular],
3748
+ "type": "string",
3749
+ "value": "id",
3750
+ },
3751
+ {
3752
+ "length": 1,
3753
+ "offset": 19,
3754
+ "parent": [Circular],
3755
+ "type": "number",
3756
+ "value": 1,
3757
+ },
3758
+ ],
3759
+ "colonOffset": 17,
3760
+ "length": 7,
3761
+ "offset": 13,
3762
+ "parent": [Circular],
3763
+ "type": "property",
3764
+ },
3765
+ {
3766
+ "children": [
3767
+ {
3768
+ "length": 6,
3769
+ "offset": 28,
3770
+ "parent": [Circular],
3771
+ "type": "string",
3772
+ "value": "type",
3773
+ },
3774
+ {
3775
+ "length": 7,
3776
+ "offset": 36,
3777
+ "parent": [Circular],
3778
+ "type": "string",
3779
+ "value": "input",
3780
+ },
3781
+ ],
3782
+ "colonOffset": 34,
3783
+ "length": 15,
3784
+ "offset": 28,
3785
+ "parent": [Circular],
3786
+ "type": "property",
3787
+ },
3788
+ {
3789
+ "children": [
3790
+ {
3791
+ "length": 9,
3792
+ "offset": 51,
3793
+ "parent": [Circular],
3794
+ "type": "string",
3795
+ "value": "binding",
3796
+ },
3797
+ {
3798
+ "length": 11,
3799
+ "offset": 62,
3800
+ "parent": [Circular],
3801
+ "type": "string",
3802
+ "value": "some.data",
3803
+ },
3804
+ ],
3805
+ "colonOffset": 60,
3806
+ "length": 22,
3807
+ "offset": 51,
3808
+ "parent": [Circular],
3809
+ "type": "property",
3810
+ },
3811
+ [Circular],
3812
+ ],
3813
+ "length": 165,
3814
+ "offset": 5,
3815
+ "type": "object",
3816
+ },
3817
+ "type": "property",
3818
+ },
3819
+ "type": "object",
3820
+ },
3821
+ "type": "property",
3822
+ },
3823
+ "type": "object",
3824
+ },
3825
+ "severity": 1,
3826
+ "type": "missing",
3827
+ },
3828
+ {
3829
+ "message": "Property "type" missing from type "Asset"",
3830
+ "node": {
3831
+ "children": [
3832
+ {
3833
+ "children": [
3834
+ {
3835
+ "length": 7,
3836
+ "offset": 121,
3837
+ "parent": [Circular],
3838
+ "type": "string",
3839
+ "value": "value",
3840
+ },
3841
+ {
3842
+ "length": 17,
3843
+ "offset": 130,
3844
+ "parent": [Circular],
3845
+ "type": "string",
3846
+ "value": "{{input.label}}",
3847
+ },
3848
+ ],
3849
+ "colonOffset": 128,
3850
+ "length": 26,
3851
+ "offset": 121,
3852
+ "parent": [Circular],
3853
+ "type": "property",
3854
+ },
3855
+ ],
3856
+ "length": 48,
3857
+ "offset": 109,
3858
+ "parent": {
3859
+ "children": [
3860
+ {
3861
+ "length": 7,
3862
+ "offset": 100,
3863
+ "parent": [Circular],
3864
+ "type": "string",
3865
+ "value": "asset",
3866
+ },
3867
+ [Circular],
3868
+ ],
3869
+ "colonOffset": 107,
3870
+ "length": 57,
3871
+ "offset": 100,
3872
+ "parent": {
3873
+ "children": [
3874
+ [Circular],
3875
+ ],
3876
+ "length": 75,
3877
+ "offset": 90,
3878
+ "parent": {
3879
+ "children": [
3880
+ {
3881
+ "length": 7,
3882
+ "offset": 81,
3883
+ "parent": [Circular],
3884
+ "type": "string",
3885
+ "value": "label",
3886
+ },
3887
+ [Circular],
3888
+ ],
3889
+ "colonOffset": 88,
3890
+ "length": 84,
3891
+ "offset": 81,
3892
+ "parent": {
3893
+ "children": [
3894
+ {
3895
+ "children": [
3896
+ {
3897
+ "length": 4,
3898
+ "offset": 13,
3899
+ "parent": [Circular],
3900
+ "type": "string",
3901
+ "value": "id",
3902
+ },
3903
+ {
3904
+ "length": 1,
3905
+ "offset": 19,
3906
+ "parent": [Circular],
3907
+ "type": "number",
3908
+ "value": 1,
3909
+ },
3910
+ ],
3911
+ "colonOffset": 17,
3912
+ "length": 7,
3913
+ "offset": 13,
3914
+ "parent": [Circular],
3915
+ "type": "property",
3916
+ },
3917
+ {
3918
+ "children": [
3919
+ {
3920
+ "length": 6,
3921
+ "offset": 28,
3922
+ "parent": [Circular],
3923
+ "type": "string",
3924
+ "value": "type",
3925
+ },
3926
+ {
3927
+ "length": 7,
3928
+ "offset": 36,
3929
+ "parent": [Circular],
3930
+ "type": "string",
3931
+ "value": "input",
3932
+ },
3933
+ ],
3934
+ "colonOffset": 34,
3935
+ "length": 15,
3936
+ "offset": 28,
3937
+ "parent": [Circular],
3938
+ "type": "property",
3939
+ },
3940
+ {
3941
+ "children": [
3942
+ {
3943
+ "length": 9,
3944
+ "offset": 51,
3945
+ "parent": [Circular],
3946
+ "type": "string",
3947
+ "value": "binding",
3948
+ },
3949
+ {
3950
+ "length": 11,
3951
+ "offset": 62,
3952
+ "parent": [Circular],
3953
+ "type": "string",
3954
+ "value": "some.data",
3955
+ },
3956
+ ],
3957
+ "colonOffset": 60,
3958
+ "length": 22,
3959
+ "offset": 51,
3960
+ "parent": [Circular],
3961
+ "type": "property",
3962
+ },
3963
+ [Circular],
3964
+ ],
3965
+ "length": 165,
3966
+ "offset": 5,
3967
+ "type": "object",
3968
+ },
3969
+ "type": "property",
3970
+ },
3971
+ "type": "object",
3972
+ },
3973
+ "type": "property",
3974
+ },
3975
+ "type": "object",
3976
+ },
3977
+ "severity": 1,
3978
+ "type": "missing",
3979
+ },
3980
+ ]
3981
+ `;
3982
+
3983
+ exports[`Validation > Basic Validation By Type (unoptimized) 1`] = `
3984
+ [
3985
+ {
3986
+ "expected": "string",
3987
+ "message": "Expected type "string" but got "number"",
3988
+ "node": {
3989
+ "children": [
3990
+ {
3991
+ "length": 4,
3992
+ "offset": 13,
3993
+ "parent": [Circular],
3994
+ "type": "string",
3995
+ "value": "id",
3996
+ },
3997
+ {
3998
+ "length": 1,
3999
+ "offset": 19,
4000
+ "parent": [Circular],
4001
+ "type": "number",
4002
+ "value": 1,
4003
+ },
4004
+ ],
4005
+ "colonOffset": 17,
4006
+ "length": 7,
4007
+ "offset": 13,
4008
+ "parent": {
4009
+ "children": [
4010
+ [Circular],
4011
+ {
4012
+ "children": [
4013
+ {
4014
+ "length": 6,
4015
+ "offset": 28,
4016
+ "parent": [Circular],
4017
+ "type": "string",
4018
+ "value": "type",
4019
+ },
4020
+ {
4021
+ "length": 7,
4022
+ "offset": 36,
4023
+ "parent": [Circular],
4024
+ "type": "string",
4025
+ "value": "input",
4026
+ },
4027
+ ],
4028
+ "colonOffset": 34,
4029
+ "length": 15,
4030
+ "offset": 28,
4031
+ "parent": [Circular],
4032
+ "type": "property",
4033
+ },
4034
+ {
4035
+ "children": [
4036
+ {
4037
+ "length": 9,
4038
+ "offset": 51,
4039
+ "parent": [Circular],
4040
+ "type": "string",
4041
+ "value": "binding",
4042
+ },
4043
+ {
4044
+ "length": 11,
4045
+ "offset": 62,
4046
+ "parent": [Circular],
4047
+ "type": "string",
4048
+ "value": "some.data",
4049
+ },
4050
+ ],
4051
+ "colonOffset": 60,
4052
+ "length": 22,
4053
+ "offset": 51,
4054
+ "parent": [Circular],
4055
+ "type": "property",
4056
+ },
4057
+ {
4058
+ "children": [
4059
+ {
4060
+ "length": 7,
4061
+ "offset": 81,
4062
+ "parent": [Circular],
4063
+ "type": "string",
4064
+ "value": "label",
4065
+ },
4066
+ {
4067
+ "children": [
4068
+ {
4069
+ "children": [
4070
+ {
4071
+ "length": 7,
4072
+ "offset": 100,
4073
+ "parent": [Circular],
4074
+ "type": "string",
4075
+ "value": "asset",
4076
+ },
4077
+ {
4078
+ "children": [
4079
+ {
4080
+ "children": [
4081
+ {
4082
+ "length": 7,
4083
+ "offset": 121,
4084
+ "parent": [Circular],
4085
+ "type": "string",
4086
+ "value": "value",
4087
+ },
4088
+ {
4089
+ "length": 17,
4090
+ "offset": 130,
4091
+ "parent": [Circular],
4092
+ "type": "string",
4093
+ "value": "{{input.label}}",
4094
+ },
4095
+ ],
4096
+ "colonOffset": 128,
4097
+ "length": 26,
4098
+ "offset": 121,
4099
+ "parent": [Circular],
4100
+ "type": "property",
4101
+ },
4102
+ ],
4103
+ "length": 48,
4104
+ "offset": 109,
4105
+ "parent": [Circular],
4106
+ "type": "object",
4107
+ },
4108
+ ],
4109
+ "colonOffset": 107,
4110
+ "length": 57,
4111
+ "offset": 100,
4112
+ "parent": [Circular],
4113
+ "type": "property",
4114
+ },
4115
+ ],
4116
+ "length": 75,
4117
+ "offset": 90,
4118
+ "parent": [Circular],
4119
+ "type": "object",
4120
+ },
4121
+ ],
4122
+ "colonOffset": 88,
4123
+ "length": 84,
4124
+ "offset": 81,
4125
+ "parent": [Circular],
4126
+ "type": "property",
4127
+ },
4128
+ ],
4129
+ "length": 165,
4130
+ "offset": 5,
4131
+ "type": "object",
4132
+ },
4133
+ "type": "property",
4134
+ },
4135
+ "severity": 1,
4136
+ "type": "type",
4137
+ },
4138
+ {
4139
+ "message": "Property "id" missing from type "Asset"",
4140
+ "node": {
4141
+ "children": [
4142
+ {
4143
+ "children": [
4144
+ {
4145
+ "length": 7,
4146
+ "offset": 121,
4147
+ "parent": [Circular],
4148
+ "type": "string",
4149
+ "value": "value",
4150
+ },
4151
+ {
4152
+ "length": 17,
4153
+ "offset": 130,
4154
+ "parent": [Circular],
4155
+ "type": "string",
4156
+ "value": "{{input.label}}",
4157
+ },
4158
+ ],
4159
+ "colonOffset": 128,
4160
+ "length": 26,
4161
+ "offset": 121,
4162
+ "parent": [Circular],
4163
+ "type": "property",
4164
+ },
4165
+ ],
4166
+ "length": 48,
4167
+ "offset": 109,
4168
+ "parent": {
4169
+ "children": [
4170
+ {
4171
+ "length": 7,
4172
+ "offset": 100,
4173
+ "parent": [Circular],
4174
+ "type": "string",
4175
+ "value": "asset",
4176
+ },
4177
+ [Circular],
4178
+ ],
4179
+ "colonOffset": 107,
4180
+ "length": 57,
4181
+ "offset": 100,
4182
+ "parent": {
4183
+ "children": [
4184
+ [Circular],
4185
+ ],
4186
+ "length": 75,
4187
+ "offset": 90,
4188
+ "parent": {
4189
+ "children": [
4190
+ {
4191
+ "length": 7,
4192
+ "offset": 81,
4193
+ "parent": [Circular],
4194
+ "type": "string",
4195
+ "value": "label",
4196
+ },
4197
+ [Circular],
4198
+ ],
4199
+ "colonOffset": 88,
4200
+ "length": 84,
4201
+ "offset": 81,
4202
+ "parent": {
4203
+ "children": [
4204
+ {
4205
+ "children": [
4206
+ {
4207
+ "length": 4,
4208
+ "offset": 13,
4209
+ "parent": [Circular],
4210
+ "type": "string",
4211
+ "value": "id",
4212
+ },
4213
+ {
4214
+ "length": 1,
4215
+ "offset": 19,
4216
+ "parent": [Circular],
4217
+ "type": "number",
4218
+ "value": 1,
4219
+ },
4220
+ ],
4221
+ "colonOffset": 17,
4222
+ "length": 7,
4223
+ "offset": 13,
4224
+ "parent": [Circular],
4225
+ "type": "property",
4226
+ },
4227
+ {
4228
+ "children": [
4229
+ {
4230
+ "length": 6,
4231
+ "offset": 28,
4232
+ "parent": [Circular],
4233
+ "type": "string",
4234
+ "value": "type",
4235
+ },
4236
+ {
4237
+ "length": 7,
4238
+ "offset": 36,
4239
+ "parent": [Circular],
4240
+ "type": "string",
4241
+ "value": "input",
4242
+ },
4243
+ ],
4244
+ "colonOffset": 34,
4245
+ "length": 15,
4246
+ "offset": 28,
4247
+ "parent": [Circular],
4248
+ "type": "property",
4249
+ },
4250
+ {
4251
+ "children": [
4252
+ {
4253
+ "length": 9,
4254
+ "offset": 51,
4255
+ "parent": [Circular],
4256
+ "type": "string",
4257
+ "value": "binding",
4258
+ },
4259
+ {
4260
+ "length": 11,
4261
+ "offset": 62,
4262
+ "parent": [Circular],
4263
+ "type": "string",
4264
+ "value": "some.data",
4265
+ },
4266
+ ],
4267
+ "colonOffset": 60,
4268
+ "length": 22,
4269
+ "offset": 51,
4270
+ "parent": [Circular],
4271
+ "type": "property",
4272
+ },
4273
+ [Circular],
4274
+ ],
4275
+ "length": 165,
4276
+ "offset": 5,
4277
+ "type": "object",
4278
+ },
4279
+ "type": "property",
4280
+ },
4281
+ "type": "object",
4282
+ },
4283
+ "type": "property",
4284
+ },
4285
+ "type": "object",
4286
+ },
4287
+ "severity": 1,
4288
+ "type": "missing",
4289
+ },
4290
+ {
4291
+ "message": "Property "type" missing from type "Asset"",
4292
+ "node": {
4293
+ "children": [
4294
+ {
4295
+ "children": [
4296
+ {
4297
+ "length": 7,
4298
+ "offset": 121,
4299
+ "parent": [Circular],
4300
+ "type": "string",
4301
+ "value": "value",
4302
+ },
4303
+ {
4304
+ "length": 17,
4305
+ "offset": 130,
4306
+ "parent": [Circular],
4307
+ "type": "string",
4308
+ "value": "{{input.label}}",
4309
+ },
4310
+ ],
4311
+ "colonOffset": 128,
4312
+ "length": 26,
4313
+ "offset": 121,
4314
+ "parent": [Circular],
4315
+ "type": "property",
4316
+ },
4317
+ ],
4318
+ "length": 48,
4319
+ "offset": 109,
4320
+ "parent": {
4321
+ "children": [
4322
+ {
4323
+ "length": 7,
4324
+ "offset": 100,
4325
+ "parent": [Circular],
4326
+ "type": "string",
4327
+ "value": "asset",
4328
+ },
4329
+ [Circular],
4330
+ ],
4331
+ "colonOffset": 107,
4332
+ "length": 57,
4333
+ "offset": 100,
4334
+ "parent": {
4335
+ "children": [
4336
+ [Circular],
4337
+ ],
4338
+ "length": 75,
4339
+ "offset": 90,
4340
+ "parent": {
4341
+ "children": [
4342
+ {
4343
+ "length": 7,
4344
+ "offset": 81,
4345
+ "parent": [Circular],
4346
+ "type": "string",
4347
+ "value": "label",
4348
+ },
4349
+ [Circular],
4350
+ ],
4351
+ "colonOffset": 88,
4352
+ "length": 84,
4353
+ "offset": 81,
4354
+ "parent": {
4355
+ "children": [
4356
+ {
4357
+ "children": [
4358
+ {
4359
+ "length": 4,
4360
+ "offset": 13,
4361
+ "parent": [Circular],
4362
+ "type": "string",
4363
+ "value": "id",
4364
+ },
4365
+ {
4366
+ "length": 1,
4367
+ "offset": 19,
4368
+ "parent": [Circular],
4369
+ "type": "number",
4370
+ "value": 1,
4371
+ },
4372
+ ],
4373
+ "colonOffset": 17,
4374
+ "length": 7,
4375
+ "offset": 13,
4376
+ "parent": [Circular],
4377
+ "type": "property",
4378
+ },
4379
+ {
4380
+ "children": [
4381
+ {
4382
+ "length": 6,
4383
+ "offset": 28,
4384
+ "parent": [Circular],
4385
+ "type": "string",
4386
+ "value": "type",
4387
+ },
4388
+ {
4389
+ "length": 7,
4390
+ "offset": 36,
4391
+ "parent": [Circular],
4392
+ "type": "string",
4393
+ "value": "input",
4394
+ },
4395
+ ],
4396
+ "colonOffset": 34,
4397
+ "length": 15,
4398
+ "offset": 28,
4399
+ "parent": [Circular],
4400
+ "type": "property",
4401
+ },
4402
+ {
4403
+ "children": [
4404
+ {
4405
+ "length": 9,
4406
+ "offset": 51,
4407
+ "parent": [Circular],
4408
+ "type": "string",
4409
+ "value": "binding",
4410
+ },
4411
+ {
4412
+ "length": 11,
4413
+ "offset": 62,
4414
+ "parent": [Circular],
4415
+ "type": "string",
4416
+ "value": "some.data",
4417
+ },
4418
+ ],
4419
+ "colonOffset": 60,
4420
+ "length": 22,
4421
+ "offset": 51,
4422
+ "parent": [Circular],
4423
+ "type": "property",
4424
+ },
4425
+ [Circular],
4426
+ ],
4427
+ "length": 165,
4428
+ "offset": 5,
4429
+ "type": "object",
4430
+ },
4431
+ "type": "property",
4432
+ },
4433
+ "type": "object",
4434
+ },
4435
+ "type": "property",
4436
+ },
4437
+ "type": "object",
4438
+ },
4439
+ "severity": 1,
4440
+ "type": "missing",
4441
+ },
4442
+ ]
4443
+ `;