@nasl/types 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,814 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/UILib",
4
+ "definitions": {
5
+ "UILib": {
6
+ "type": "array",
7
+ "items": {
8
+ "$ref": "#/definitions/ViewComponentDeclaration"
9
+ }
10
+ },
11
+ "ViewComponentDeclaration": {
12
+ "type": "object",
13
+ "properties": {
14
+ "concept": {
15
+ "type": "string",
16
+ "const": "ViewComponentDeclaration"
17
+ },
18
+ "name": {
19
+ "type": "string"
20
+ },
21
+ "kebabName": {
22
+ "type": "string"
23
+ },
24
+ "title": {
25
+ "type": "string"
26
+ },
27
+ "group": {
28
+ "type": "string"
29
+ },
30
+ "icon": {
31
+ "type": "string"
32
+ },
33
+ "description": {
34
+ "type": "string"
35
+ },
36
+ "tsTypeParams": {
37
+ "type": "string"
38
+ },
39
+ "props": {
40
+ "type": "array",
41
+ "items": {
42
+ "$ref": "#/definitions/PropDeclaration"
43
+ }
44
+ },
45
+ "readableProps": {
46
+ "type": "array",
47
+ "items": {
48
+ "$ref": "#/definitions/PropDeclaration"
49
+ }
50
+ },
51
+ "events": {
52
+ "type": "array",
53
+ "items": {
54
+ "$ref": "#/definitions/EventDeclaration"
55
+ }
56
+ },
57
+ "slots": {
58
+ "type": "array",
59
+ "items": {
60
+ "$ref": "#/definitions/SlotDeclaration"
61
+ }
62
+ },
63
+ "methods": {
64
+ "type": "array",
65
+ "items": {
66
+ "$ref": "#/definitions/LogicDeclaration"
67
+ }
68
+ },
69
+ "children": {
70
+ "type": "array",
71
+ "items": {
72
+ "$ref": "#/definitions/ViewComponentDeclaration"
73
+ }
74
+ },
75
+ "blocks": {
76
+ "type": "array",
77
+ "items": {
78
+ "$ref": "#/definitions/ViewBlockWithImage"
79
+ }
80
+ },
81
+ "themeVariables": {
82
+ "type": "array",
83
+ "items": {
84
+ "$ref": "#/definitions/ThemeVariable"
85
+ }
86
+ }
87
+ },
88
+ "required": [
89
+ "concept",
90
+ "name",
91
+ "kebabName",
92
+ "title",
93
+ "group",
94
+ "icon",
95
+ "props",
96
+ "readableProps",
97
+ "events",
98
+ "slots",
99
+ "methods",
100
+ "children",
101
+ "blocks",
102
+ "themeVariables"
103
+ ],
104
+ "additionalProperties": false,
105
+ "description": "页面组件"
106
+ },
107
+ "PropDeclaration": {
108
+ "type": "object",
109
+ "properties": {
110
+ "concept": {
111
+ "type": "string",
112
+ "const": "PropDeclaration"
113
+ },
114
+ "name": {
115
+ "type": "string"
116
+ },
117
+ "title": {
118
+ "type": "string"
119
+ },
120
+ "group": {
121
+ "type": "string",
122
+ "enum": [
123
+ "基础信息",
124
+ "数据属性",
125
+ "主要属性",
126
+ "交互属性",
127
+ "状态属性",
128
+ "样式属性",
129
+ "工具属性"
130
+ ]
131
+ },
132
+ "icon": {
133
+ "type": "string"
134
+ },
135
+ "description": {
136
+ "type": "string"
137
+ },
138
+ "tsType": {
139
+ "type": "string"
140
+ },
141
+ "sync": {
142
+ "type": "boolean"
143
+ },
144
+ "tooltipLink": {
145
+ "type": "string"
146
+ },
147
+ "docDescription": {
148
+ "type": "string"
149
+ },
150
+ "bindHide": {
151
+ "type": "boolean"
152
+ },
153
+ "bindOpen": {
154
+ "type": "boolean"
155
+ },
156
+ "tabKind": {
157
+ "type": "string",
158
+ "enum": [
159
+ "property",
160
+ "style"
161
+ ]
162
+ },
163
+ "setter": {
164
+ "$ref": "#/definitions/BaseSetter"
165
+ },
166
+ "tsDesignerValue": {
167
+ "type": "string"
168
+ },
169
+ "tsIf": {
170
+ "type": "string"
171
+ },
172
+ "tsDisabledIf": {
173
+ "type": "string"
174
+ },
175
+ "tsOnChange": {
176
+ "type": "string"
177
+ }
178
+ },
179
+ "required": [
180
+ "concept",
181
+ "name",
182
+ "title",
183
+ "group",
184
+ "tsType",
185
+ "sync",
186
+ "bindHide",
187
+ "bindOpen",
188
+ "tabKind",
189
+ "setter"
190
+ ],
191
+ "additionalProperties": false,
192
+ "description": "组件属性"
193
+ },
194
+ "BaseSetter": {
195
+ "anyOf": [
196
+ {
197
+ "$ref": "#/definitions/InputSetter"
198
+ },
199
+ {
200
+ "$ref": "#/definitions/SwitchSetter"
201
+ },
202
+ {
203
+ "$ref": "#/definitions/EnumSelectSetter"
204
+ },
205
+ {
206
+ "$ref": "#/definitions/CapsulesSetter"
207
+ },
208
+ {
209
+ "$ref": "#/definitions/NumberInputSetter"
210
+ },
211
+ {
212
+ "$ref": "#/definitions/IconSetter"
213
+ },
214
+ {
215
+ "$ref": "#/definitions/ImageSetter"
216
+ },
217
+ {
218
+ "$ref": "#/definitions/PropertySelectSetter"
219
+ }
220
+ ],
221
+ "description": "设置器基类"
222
+ },
223
+ "InputSetter": {
224
+ "type": "object",
225
+ "properties": {
226
+ "concept": {
227
+ "type": "string",
228
+ "const": "InputSetter"
229
+ },
230
+ "placeholder": {
231
+ "type": "string"
232
+ }
233
+ },
234
+ "required": [
235
+ "concept"
236
+ ],
237
+ "additionalProperties": false,
238
+ "description": "输入框设置器"
239
+ },
240
+ "SwitchSetter": {
241
+ "type": "object",
242
+ "properties": {
243
+ "concept": {
244
+ "type": "string",
245
+ "const": "SwitchSetter"
246
+ }
247
+ },
248
+ "required": [
249
+ "concept"
250
+ ],
251
+ "additionalProperties": false,
252
+ "description": "切换设置器"
253
+ },
254
+ "EnumSelectSetter": {
255
+ "type": "object",
256
+ "properties": {
257
+ "concept": {
258
+ "type": "string",
259
+ "const": "EnumSelectSetter"
260
+ },
261
+ "options": {
262
+ "type": "array",
263
+ "items": {
264
+ "$ref": "#/definitions/SetterOption"
265
+ }
266
+ }
267
+ },
268
+ "required": [
269
+ "concept",
270
+ "options"
271
+ ],
272
+ "additionalProperties": false,
273
+ "description": "枚举选择设置器"
274
+ },
275
+ "SetterOption": {
276
+ "type": "object",
277
+ "properties": {
278
+ "concept": {
279
+ "type": "string",
280
+ "const": "SetterOption"
281
+ },
282
+ "value": {
283
+ "type": "string"
284
+ },
285
+ "title": {
286
+ "type": "string"
287
+ },
288
+ "icon": {
289
+ "type": "string"
290
+ },
291
+ "tooltip": {
292
+ "type": "string"
293
+ },
294
+ "tsIf": {
295
+ "type": "string"
296
+ },
297
+ "tsDisabledIf": {
298
+ "type": "string"
299
+ }
300
+ },
301
+ "required": [
302
+ "concept",
303
+ "value",
304
+ "title"
305
+ ],
306
+ "additionalProperties": false,
307
+ "description": "设置器枚举选项"
308
+ },
309
+ "CapsulesSetter": {
310
+ "type": "object",
311
+ "properties": {
312
+ "concept": {
313
+ "type": "string",
314
+ "const": "CapsulesSetter"
315
+ },
316
+ "options": {
317
+ "type": "array",
318
+ "items": {
319
+ "$ref": "#/definitions/SetterOption"
320
+ }
321
+ }
322
+ },
323
+ "required": [
324
+ "concept",
325
+ "options"
326
+ ],
327
+ "additionalProperties": false,
328
+ "description": "胶囊设置器"
329
+ },
330
+ "NumberInputSetter": {
331
+ "type": "object",
332
+ "properties": {
333
+ "concept": {
334
+ "type": "string",
335
+ "const": "NumberInputSetter"
336
+ },
337
+ "placement": {
338
+ "type": "string"
339
+ },
340
+ "min": {
341
+ "type": "number"
342
+ },
343
+ "max": {
344
+ "type": "number"
345
+ },
346
+ "precision": {
347
+ "type": "number"
348
+ },
349
+ "placeholder": {
350
+ "type": "string"
351
+ }
352
+ },
353
+ "required": [
354
+ "concept"
355
+ ],
356
+ "additionalProperties": false,
357
+ "description": "数字输入设置器"
358
+ },
359
+ "IconSetter": {
360
+ "type": "object",
361
+ "properties": {
362
+ "concept": {
363
+ "type": "string",
364
+ "const": "IconSetter"
365
+ },
366
+ "title": {
367
+ "type": "string"
368
+ }
369
+ },
370
+ "required": [
371
+ "concept"
372
+ ],
373
+ "additionalProperties": false,
374
+ "description": "图标设置器"
375
+ },
376
+ "ImageSetter": {
377
+ "type": "object",
378
+ "properties": {
379
+ "concept": {
380
+ "type": "string",
381
+ "const": "ImageSetter"
382
+ }
383
+ },
384
+ "required": [
385
+ "concept"
386
+ ],
387
+ "additionalProperties": false,
388
+ "description": "图片设置器"
389
+ },
390
+ "PropertySelectSetter": {
391
+ "type": "object",
392
+ "properties": {
393
+ "concept": {
394
+ "type": "string",
395
+ "const": "PropertySelectSetter"
396
+ }
397
+ },
398
+ "required": [
399
+ "concept"
400
+ ],
401
+ "additionalProperties": false,
402
+ "description": "属性选择设置器"
403
+ },
404
+ "EventDeclaration": {
405
+ "type": "object",
406
+ "properties": {
407
+ "concept": {
408
+ "type": "string",
409
+ "const": "EventDeclaration"
410
+ },
411
+ "name": {
412
+ "type": "string"
413
+ },
414
+ "title": {
415
+ "type": "string"
416
+ },
417
+ "description": {
418
+ "type": "string"
419
+ },
420
+ "tsType": {
421
+ "type": "string"
422
+ }
423
+ },
424
+ "required": [
425
+ "concept",
426
+ "name",
427
+ "title",
428
+ "tsType"
429
+ ],
430
+ "additionalProperties": false,
431
+ "description": "组件事件"
432
+ },
433
+ "SlotDeclaration": {
434
+ "type": "object",
435
+ "properties": {
436
+ "concept": {
437
+ "type": "string",
438
+ "const": "SlotDeclaration"
439
+ },
440
+ "name": {
441
+ "type": "string"
442
+ },
443
+ "title": {
444
+ "type": "string"
445
+ },
446
+ "description": {
447
+ "type": "string"
448
+ },
449
+ "tsType": {
450
+ "type": "string"
451
+ },
452
+ "emptyBackground": {
453
+ "type": "string"
454
+ },
455
+ "snippets": {
456
+ "type": "array",
457
+ "items": {
458
+ "$ref": "#/definitions/ViewBlockWithImage"
459
+ }
460
+ }
461
+ },
462
+ "required": [
463
+ "concept",
464
+ "name",
465
+ "title",
466
+ "tsType",
467
+ "snippets"
468
+ ],
469
+ "additionalProperties": false,
470
+ "description": "插槽"
471
+ },
472
+ "ViewBlockWithImage": {
473
+ "type": "object",
474
+ "properties": {
475
+ "concept": {
476
+ "type": "string",
477
+ "const": "ViewBlockWithImage"
478
+ },
479
+ "title": {
480
+ "type": "string"
481
+ },
482
+ "code": {
483
+ "type": "string"
484
+ },
485
+ "description": {
486
+ "type": "string"
487
+ },
488
+ "screenshot": {
489
+ "type": "string"
490
+ },
491
+ "drawing": {
492
+ "type": "string"
493
+ }
494
+ },
495
+ "required": [
496
+ "concept",
497
+ "title",
498
+ "code",
499
+ "screenshot",
500
+ "drawing"
501
+ ],
502
+ "additionalProperties": false,
503
+ "description": "带截图的代码块"
504
+ },
505
+ "LogicDeclaration": {
506
+ "type": "object",
507
+ "properties": {
508
+ "concept": {
509
+ "type": "string",
510
+ "const": "LogicDeclaration"
511
+ },
512
+ "name": {
513
+ "type": "string"
514
+ },
515
+ "title": {
516
+ "type": "string"
517
+ },
518
+ "description": {
519
+ "type": "string"
520
+ },
521
+ "typeParams": {
522
+ "type": "array",
523
+ "items": {
524
+ "$ref": "#/definitions/TypeParam"
525
+ }
526
+ },
527
+ "params": {
528
+ "type": "array",
529
+ "items": {
530
+ "$ref": "#/definitions/ParamDeclaration"
531
+ }
532
+ },
533
+ "returns": {
534
+ "type": "array",
535
+ "items": {
536
+ "$ref": "#/definitions/Return"
537
+ }
538
+ }
539
+ },
540
+ "required": [
541
+ "concept",
542
+ "name",
543
+ "title",
544
+ "description",
545
+ "params",
546
+ "returns"
547
+ ],
548
+ "additionalProperties": false,
549
+ "description": "逻辑声明"
550
+ },
551
+ "TypeParam": {
552
+ "type": "object",
553
+ "properties": {
554
+ "concept": {
555
+ "type": "string",
556
+ "const": "TypeParam"
557
+ },
558
+ "name": {
559
+ "type": "string"
560
+ }
561
+ },
562
+ "required": [
563
+ "concept",
564
+ "name"
565
+ ],
566
+ "additionalProperties": false,
567
+ "description": "类型参数"
568
+ },
569
+ "ParamDeclaration": {
570
+ "type": "object",
571
+ "properties": {
572
+ "concept": {
573
+ "type": "string",
574
+ "const": "ParamDeclaration"
575
+ },
576
+ "name": {
577
+ "type": "string"
578
+ },
579
+ "title": {
580
+ "type": "string"
581
+ },
582
+ "description": {
583
+ "type": "string"
584
+ },
585
+ "tsType": {
586
+ "type": "string"
587
+ }
588
+ },
589
+ "required": [
590
+ "concept",
591
+ "name",
592
+ "title",
593
+ "description",
594
+ "tsType"
595
+ ],
596
+ "additionalProperties": false,
597
+ "description": "输入参数声明"
598
+ },
599
+ "Return": {
600
+ "type": "object",
601
+ "properties": {
602
+ "concept": {
603
+ "type": "string",
604
+ "const": "Return"
605
+ },
606
+ "name": {
607
+ "type": "string"
608
+ },
609
+ "description": {
610
+ "type": "string"
611
+ },
612
+ "typeAnnotation": {
613
+ "$ref": "#/definitions/TypeAnnotation"
614
+ },
615
+ "defaultValue": {
616
+ "$ref": "#/definitions/DefaultValue"
617
+ }
618
+ },
619
+ "required": [
620
+ "concept",
621
+ "name",
622
+ "description",
623
+ "typeAnnotation",
624
+ "defaultValue"
625
+ ],
626
+ "additionalProperties": false,
627
+ "description": "输出参数"
628
+ },
629
+ "TypeAnnotation": {
630
+ "type": "object",
631
+ "properties": {
632
+ "concept": {
633
+ "type": "string",
634
+ "const": "TypeAnnotation"
635
+ },
636
+ "typeKind": {
637
+ "type": "string",
638
+ "enum": [
639
+ "primitive",
640
+ "reference",
641
+ "generic",
642
+ "typeParam",
643
+ "function",
644
+ "union",
645
+ "anonymousStructure"
646
+ ]
647
+ },
648
+ "typeNamespace": {
649
+ "type": "string"
650
+ },
651
+ "typeName": {
652
+ "type": "string"
653
+ },
654
+ "typeArguments": {
655
+ "type": "array",
656
+ "items": {
657
+ "$ref": "#/definitions/TypeAnnotation"
658
+ }
659
+ },
660
+ "returnType": {
661
+ "type": "array",
662
+ "items": {
663
+ "$ref": "#/definitions/TypeAnnotation"
664
+ }
665
+ },
666
+ "inferred": {
667
+ "type": "boolean"
668
+ },
669
+ "properties": {
670
+ "type": "array",
671
+ "items": {
672
+ "$ref": "#/definitions/StructureProperty"
673
+ }
674
+ },
675
+ "ruleMap": {
676
+ "type": "object",
677
+ "properties": {
678
+ "size": {
679
+ "type": "number"
680
+ }
681
+ },
682
+ "required": [
683
+ "size"
684
+ ],
685
+ "additionalProperties": false
686
+ }
687
+ },
688
+ "required": [
689
+ "concept",
690
+ "typeKind",
691
+ "typeNamespace",
692
+ "typeName",
693
+ "inferred",
694
+ "ruleMap"
695
+ ],
696
+ "additionalProperties": false,
697
+ "description": "类型标注"
698
+ },
699
+ "StructureProperty": {
700
+ "type": "object",
701
+ "properties": {
702
+ "concept": {
703
+ "type": "string",
704
+ "const": "StructureProperty"
705
+ },
706
+ "name": {
707
+ "type": "string"
708
+ },
709
+ "label": {
710
+ "type": "string"
711
+ },
712
+ "description": {
713
+ "type": "string"
714
+ },
715
+ "typeAnnotation": {
716
+ "$ref": "#/definitions/TypeAnnotation"
717
+ },
718
+ "required": {
719
+ "type": "boolean"
720
+ },
721
+ "defaultValue": {
722
+ "$ref": "#/definitions/DefaultValue"
723
+ },
724
+ "jsonName": {
725
+ "type": "string"
726
+ }
727
+ },
728
+ "required": [
729
+ "concept",
730
+ "name",
731
+ "label",
732
+ "description",
733
+ "typeAnnotation",
734
+ "required",
735
+ "defaultValue",
736
+ "jsonName"
737
+ ],
738
+ "additionalProperties": false,
739
+ "description": "数据结构属性"
740
+ },
741
+ "DefaultValue": {
742
+ "type": "object",
743
+ "properties": {
744
+ "concept": {
745
+ "type": "string",
746
+ "const": "DefaultValue"
747
+ },
748
+ "expression": {
749
+ "$ref": "#/definitions/LogicItem"
750
+ },
751
+ "playground": {
752
+ "type": "array",
753
+ "items": {
754
+ "$ref": "#/definitions/LogicItem"
755
+ }
756
+ }
757
+ },
758
+ "required": [
759
+ "concept",
760
+ "expression",
761
+ "playground"
762
+ ],
763
+ "additionalProperties": false,
764
+ "description": "默认值"
765
+ },
766
+ "LogicItem": {
767
+ "type": "object",
768
+ "properties": {
769
+ "concept": {
770
+ "type": "string",
771
+ "const": "LogicItem"
772
+ },
773
+ "label": {
774
+ "type": "string"
775
+ },
776
+ "description": {
777
+ "type": "string"
778
+ },
779
+ "folded": {
780
+ "type": "boolean"
781
+ },
782
+ "offsetX": {
783
+ "type": "number"
784
+ },
785
+ "offsetY": {
786
+ "type": "number"
787
+ }
788
+ },
789
+ "required": [
790
+ "concept"
791
+ ],
792
+ "additionalProperties": false,
793
+ "description": "逻辑项"
794
+ },
795
+ "ThemeVariable": {
796
+ "type": "object",
797
+ "properties": {
798
+ "concept": {
799
+ "type": "string",
800
+ "const": "ThemeVariable"
801
+ },
802
+ "name": {
803
+ "type": "string"
804
+ }
805
+ },
806
+ "required": [
807
+ "concept",
808
+ "name"
809
+ ],
810
+ "additionalProperties": false,
811
+ "description": "主题变量"
812
+ }
813
+ }
814
+ }