@onlyworlds/sdk 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +76 -214
- package/dist/index.d.mts +446 -6
- package/dist/index.d.ts +446 -6
- package/dist/index.js +138 -6
- package/dist/index.mjs +138 -6
- package/package.json +6 -2
package/dist/index.js
CHANGED
|
@@ -374,6 +374,12 @@ function getElementUnicodeIcon(elementType) {
|
|
|
374
374
|
}
|
|
375
375
|
var FIELD_SCHEMA = {
|
|
376
376
|
ability: {
|
|
377
|
+
// Base fields (shared by all elements)
|
|
378
|
+
name: { type: "text", required: true },
|
|
379
|
+
description: { type: "text", required: false },
|
|
380
|
+
supertype: { type: "text", required: false },
|
|
381
|
+
subtype: { type: "text", required: false },
|
|
382
|
+
image_url: { type: "text", required: false },
|
|
377
383
|
// Mechanics
|
|
378
384
|
activation: { type: "text" },
|
|
379
385
|
duration: { type: "number" },
|
|
@@ -392,6 +398,12 @@ var FIELD_SCHEMA = {
|
|
|
392
398
|
systems: { type: "multi_link", target: "construct" }
|
|
393
399
|
},
|
|
394
400
|
character: {
|
|
401
|
+
// Base fields (shared by all elements)
|
|
402
|
+
name: { type: "text", required: true },
|
|
403
|
+
description: { type: "text", required: false },
|
|
404
|
+
supertype: { type: "text", required: false },
|
|
405
|
+
subtype: { type: "text", required: false },
|
|
406
|
+
image_url: { type: "text", required: false },
|
|
395
407
|
// Constitution
|
|
396
408
|
physicality: { type: "text" },
|
|
397
409
|
mentality: { type: "text" },
|
|
@@ -433,6 +445,12 @@ var FIELD_SCHEMA = {
|
|
|
433
445
|
CHA: { type: "number" }
|
|
434
446
|
},
|
|
435
447
|
collective: {
|
|
448
|
+
// Base fields (shared by all elements)
|
|
449
|
+
name: { type: "text", required: true },
|
|
450
|
+
description: { type: "text", required: false },
|
|
451
|
+
supertype: { type: "text", required: false },
|
|
452
|
+
subtype: { type: "text", required: false },
|
|
453
|
+
image_url: { type: "text", required: false },
|
|
436
454
|
// Formation
|
|
437
455
|
composition: { type: "text" },
|
|
438
456
|
count: { type: "number" },
|
|
@@ -452,6 +470,12 @@ var FIELD_SCHEMA = {
|
|
|
452
470
|
phenomena: { type: "multi_link", target: "phenomenon" }
|
|
453
471
|
},
|
|
454
472
|
construct: {
|
|
473
|
+
// Base fields (shared by all elements)
|
|
474
|
+
name: { type: "text", required: true },
|
|
475
|
+
description: { type: "text", required: false },
|
|
476
|
+
supertype: { type: "text", required: false },
|
|
477
|
+
subtype: { type: "text", required: false },
|
|
478
|
+
image_url: { type: "text", required: false },
|
|
455
479
|
// Nature
|
|
456
480
|
rationale: { type: "text" },
|
|
457
481
|
history: { type: "text" },
|
|
@@ -482,6 +506,12 @@ var FIELD_SCHEMA = {
|
|
|
482
506
|
narratives: { type: "multi_link", target: "narrative" }
|
|
483
507
|
},
|
|
484
508
|
creature: {
|
|
509
|
+
// Base fields (shared by all elements)
|
|
510
|
+
name: { type: "text", required: true },
|
|
511
|
+
description: { type: "text", required: false },
|
|
512
|
+
supertype: { type: "text", required: false },
|
|
513
|
+
subtype: { type: "text", required: false },
|
|
514
|
+
image_url: { type: "text", required: false },
|
|
485
515
|
// Biology
|
|
486
516
|
appearance: { type: "text" },
|
|
487
517
|
weight: { type: "number" },
|
|
@@ -506,6 +536,12 @@ var FIELD_SCHEMA = {
|
|
|
506
536
|
actions: { type: "multi_link", target: "ability" }
|
|
507
537
|
},
|
|
508
538
|
event: {
|
|
539
|
+
// Base fields (shared by all elements)
|
|
540
|
+
name: { type: "text", required: true },
|
|
541
|
+
description: { type: "text", required: false },
|
|
542
|
+
supertype: { type: "text", required: false },
|
|
543
|
+
subtype: { type: "text", required: false },
|
|
544
|
+
image_url: { type: "text", required: false },
|
|
509
545
|
// Nature
|
|
510
546
|
history: { type: "text" },
|
|
511
547
|
challenges: { type: "text" },
|
|
@@ -532,6 +568,12 @@ var FIELD_SCHEMA = {
|
|
|
532
568
|
constructs: { type: "multi_link", target: "construct" }
|
|
533
569
|
},
|
|
534
570
|
family: {
|
|
571
|
+
// Base fields (shared by all elements)
|
|
572
|
+
name: { type: "text", required: true },
|
|
573
|
+
description: { type: "text", required: false },
|
|
574
|
+
supertype: { type: "text", required: false },
|
|
575
|
+
subtype: { type: "text", required: false },
|
|
576
|
+
image_url: { type: "text", required: false },
|
|
535
577
|
// Identity
|
|
536
578
|
spirit: { type: "text" },
|
|
537
579
|
history: { type: "text" },
|
|
@@ -548,6 +590,12 @@ var FIELD_SCHEMA = {
|
|
|
548
590
|
creatures: { type: "multi_link", target: "creature" }
|
|
549
591
|
},
|
|
550
592
|
institution: {
|
|
593
|
+
// Base fields (shared by all elements)
|
|
594
|
+
name: { type: "text", required: true },
|
|
595
|
+
description: { type: "text", required: false },
|
|
596
|
+
supertype: { type: "text", required: false },
|
|
597
|
+
subtype: { type: "text", required: false },
|
|
598
|
+
image_url: { type: "text", required: false },
|
|
551
599
|
// Foundation
|
|
552
600
|
doctrine: { type: "text" },
|
|
553
601
|
founding_date: { type: "number" },
|
|
@@ -563,6 +611,12 @@ var FIELD_SCHEMA = {
|
|
|
563
611
|
constructs: { type: "multi_link", target: "construct" }
|
|
564
612
|
},
|
|
565
613
|
language: {
|
|
614
|
+
// Base fields (shared by all elements)
|
|
615
|
+
name: { type: "text", required: true },
|
|
616
|
+
description: { type: "text", required: false },
|
|
617
|
+
supertype: { type: "text", required: false },
|
|
618
|
+
subtype: { type: "text", required: false },
|
|
619
|
+
image_url: { type: "text", required: false },
|
|
566
620
|
// Structure
|
|
567
621
|
phonology: { type: "text" },
|
|
568
622
|
grammar: { type: "text" },
|
|
@@ -575,6 +629,12 @@ var FIELD_SCHEMA = {
|
|
|
575
629
|
dialects: { type: "multi_link", target: "language" }
|
|
576
630
|
},
|
|
577
631
|
law: {
|
|
632
|
+
// Base fields (shared by all elements)
|
|
633
|
+
name: { type: "text", required: true },
|
|
634
|
+
description: { type: "text", required: false },
|
|
635
|
+
supertype: { type: "text", required: false },
|
|
636
|
+
subtype: { type: "text", required: false },
|
|
637
|
+
image_url: { type: "text", required: false },
|
|
578
638
|
// Code
|
|
579
639
|
declaration: { type: "text" },
|
|
580
640
|
purpose: { type: "text" },
|
|
@@ -590,6 +650,12 @@ var FIELD_SCHEMA = {
|
|
|
590
650
|
enforcers: { type: "multi_link", target: "title" }
|
|
591
651
|
},
|
|
592
652
|
location: {
|
|
653
|
+
// Base fields (shared by all elements)
|
|
654
|
+
name: { type: "text", required: true },
|
|
655
|
+
description: { type: "text", required: false },
|
|
656
|
+
supertype: { type: "text", required: false },
|
|
657
|
+
subtype: { type: "text", required: false },
|
|
658
|
+
image_url: { type: "text", required: false },
|
|
593
659
|
// Setting
|
|
594
660
|
form: { type: "text" },
|
|
595
661
|
function: { type: "text" },
|
|
@@ -630,6 +696,12 @@ var FIELD_SCHEMA = {
|
|
|
630
696
|
defensive_objects: { type: "multi_link", target: "object" }
|
|
631
697
|
},
|
|
632
698
|
map: {
|
|
699
|
+
// Base fields (shared by all elements)
|
|
700
|
+
name: { type: "text", required: true },
|
|
701
|
+
description: { type: "text", required: false },
|
|
702
|
+
supertype: { type: "text", required: false },
|
|
703
|
+
subtype: { type: "text", required: false },
|
|
704
|
+
image_url: { type: "text", required: false },
|
|
633
705
|
// Details
|
|
634
706
|
background_color: { type: "text" },
|
|
635
707
|
hierarchy: { type: "number" },
|
|
@@ -640,14 +712,26 @@ var FIELD_SCHEMA = {
|
|
|
640
712
|
location: { type: "single_link", target: "location" }
|
|
641
713
|
},
|
|
642
714
|
marker: {
|
|
715
|
+
// Base fields (shared by all elements)
|
|
716
|
+
name: { type: "text", required: true },
|
|
717
|
+
description: { type: "text", required: false },
|
|
718
|
+
supertype: { type: "text", required: false },
|
|
719
|
+
subtype: { type: "text", required: false },
|
|
720
|
+
image_url: { type: "text", required: false },
|
|
643
721
|
// Details
|
|
644
722
|
map: { type: "single_link", target: "map" },
|
|
645
723
|
zone: { type: "single_link", target: "zone" },
|
|
646
|
-
x: { type: "
|
|
647
|
-
y: { type: "
|
|
648
|
-
z: { type: "
|
|
724
|
+
x: { type: "number" },
|
|
725
|
+
y: { type: "number" },
|
|
726
|
+
z: { type: "number" }
|
|
649
727
|
},
|
|
650
728
|
narrative: {
|
|
729
|
+
// Base fields (shared by all elements)
|
|
730
|
+
name: { type: "text", required: true },
|
|
731
|
+
description: { type: "text", required: false },
|
|
732
|
+
supertype: { type: "text", required: false },
|
|
733
|
+
subtype: { type: "text", required: false },
|
|
734
|
+
image_url: { type: "text", required: false },
|
|
651
735
|
// Context
|
|
652
736
|
story: { type: "text" },
|
|
653
737
|
consequences: { type: "text" },
|
|
@@ -680,6 +764,12 @@ var FIELD_SCHEMA = {
|
|
|
680
764
|
laws: { type: "multi_link", target: "law" }
|
|
681
765
|
},
|
|
682
766
|
object: {
|
|
767
|
+
// Base fields (shared by all elements)
|
|
768
|
+
name: { type: "text", required: true },
|
|
769
|
+
description: { type: "text", required: false },
|
|
770
|
+
supertype: { type: "text", required: false },
|
|
771
|
+
subtype: { type: "text", required: false },
|
|
772
|
+
image_url: { type: "text", required: false },
|
|
683
773
|
// Form
|
|
684
774
|
aesthetics: { type: "text" },
|
|
685
775
|
weight: { type: "number" },
|
|
@@ -699,6 +789,12 @@ var FIELD_SCHEMA = {
|
|
|
699
789
|
affinities: { type: "multi_link", target: "trait" }
|
|
700
790
|
},
|
|
701
791
|
phenomenon: {
|
|
792
|
+
// Base fields (shared by all elements)
|
|
793
|
+
name: { type: "text", required: true },
|
|
794
|
+
description: { type: "text", required: false },
|
|
795
|
+
supertype: { type: "text", required: false },
|
|
796
|
+
subtype: { type: "text", required: false },
|
|
797
|
+
image_url: { type: "text", required: false },
|
|
702
798
|
// Mechanics
|
|
703
799
|
expression: { type: "text" },
|
|
704
800
|
effects: { type: "text" },
|
|
@@ -713,17 +809,29 @@ var FIELD_SCHEMA = {
|
|
|
713
809
|
environments: { type: "multi_link", target: "location" }
|
|
714
810
|
},
|
|
715
811
|
pin: {
|
|
812
|
+
// Base fields (shared by all elements)
|
|
813
|
+
name: { type: "text", required: true },
|
|
814
|
+
description: { type: "text", required: false },
|
|
815
|
+
supertype: { type: "text", required: false },
|
|
816
|
+
subtype: { type: "text", required: false },
|
|
817
|
+
image_url: { type: "text", required: false },
|
|
716
818
|
// Details
|
|
717
819
|
map: { type: "single_link", target: "map" },
|
|
718
820
|
element_type: { type: "text" },
|
|
719
821
|
// ElementType enum value
|
|
720
822
|
element_id: { type: "single_link", target: "any" },
|
|
721
823
|
// Can reference any element
|
|
722
|
-
x: { type: "
|
|
723
|
-
y: { type: "
|
|
724
|
-
z: { type: "
|
|
824
|
+
x: { type: "number" },
|
|
825
|
+
y: { type: "number" },
|
|
826
|
+
z: { type: "number" }
|
|
725
827
|
},
|
|
726
828
|
relation: {
|
|
829
|
+
// Base fields (shared by all elements)
|
|
830
|
+
name: { type: "text", required: true },
|
|
831
|
+
description: { type: "text", required: false },
|
|
832
|
+
supertype: { type: "text", required: false },
|
|
833
|
+
subtype: { type: "text", required: false },
|
|
834
|
+
image_url: { type: "text", required: false },
|
|
727
835
|
// Nature
|
|
728
836
|
background: { type: "text" },
|
|
729
837
|
start_date: { type: "number" },
|
|
@@ -751,6 +859,12 @@ var FIELD_SCHEMA = {
|
|
|
751
859
|
narratives: { type: "multi_link", target: "narrative" }
|
|
752
860
|
},
|
|
753
861
|
species: {
|
|
862
|
+
// Base fields (shared by all elements)
|
|
863
|
+
name: { type: "text", required: true },
|
|
864
|
+
description: { type: "text", required: false },
|
|
865
|
+
supertype: { type: "text", required: false },
|
|
866
|
+
subtype: { type: "text", required: false },
|
|
867
|
+
image_url: { type: "text", required: false },
|
|
754
868
|
// Biology
|
|
755
869
|
appearance: { type: "text" },
|
|
756
870
|
life_span: { type: "number" },
|
|
@@ -773,6 +887,12 @@ var FIELD_SCHEMA = {
|
|
|
773
887
|
affinities: { type: "multi_link", target: "phenomenon" }
|
|
774
888
|
},
|
|
775
889
|
title: {
|
|
890
|
+
// Base fields (shared by all elements)
|
|
891
|
+
name: { type: "text", required: true },
|
|
892
|
+
description: { type: "text", required: false },
|
|
893
|
+
supertype: { type: "text", required: false },
|
|
894
|
+
subtype: { type: "text", required: false },
|
|
895
|
+
image_url: { type: "text", required: false },
|
|
776
896
|
// Mandate
|
|
777
897
|
authority: { type: "text" },
|
|
778
898
|
eligibility: { type: "text" },
|
|
@@ -801,6 +921,12 @@ var FIELD_SCHEMA = {
|
|
|
801
921
|
languages: { type: "multi_link", target: "language" }
|
|
802
922
|
},
|
|
803
923
|
trait: {
|
|
924
|
+
// Base fields (shared by all elements)
|
|
925
|
+
name: { type: "text", required: true },
|
|
926
|
+
description: { type: "text", required: false },
|
|
927
|
+
supertype: { type: "text", required: false },
|
|
928
|
+
subtype: { type: "text", required: false },
|
|
929
|
+
image_url: { type: "text", required: false },
|
|
804
930
|
// Qualitative
|
|
805
931
|
social_effects: { type: "text" },
|
|
806
932
|
physical_effects: { type: "text" },
|
|
@@ -820,6 +946,12 @@ var FIELD_SCHEMA = {
|
|
|
820
946
|
empowered_abilities: { type: "multi_link", target: "ability" }
|
|
821
947
|
},
|
|
822
948
|
zone: {
|
|
949
|
+
// Base fields (shared by all elements)
|
|
950
|
+
name: { type: "text", required: true },
|
|
951
|
+
description: { type: "text", required: false },
|
|
952
|
+
supertype: { type: "text", required: false },
|
|
953
|
+
subtype: { type: "text", required: false },
|
|
954
|
+
image_url: { type: "text", required: false },
|
|
823
955
|
// Scope
|
|
824
956
|
role: { type: "text" },
|
|
825
957
|
start_date: { type: "number" },
|
package/dist/index.mjs
CHANGED
|
@@ -334,6 +334,12 @@ function getElementUnicodeIcon(elementType) {
|
|
|
334
334
|
}
|
|
335
335
|
var FIELD_SCHEMA = {
|
|
336
336
|
ability: {
|
|
337
|
+
// Base fields (shared by all elements)
|
|
338
|
+
name: { type: "text", required: true },
|
|
339
|
+
description: { type: "text", required: false },
|
|
340
|
+
supertype: { type: "text", required: false },
|
|
341
|
+
subtype: { type: "text", required: false },
|
|
342
|
+
image_url: { type: "text", required: false },
|
|
337
343
|
// Mechanics
|
|
338
344
|
activation: { type: "text" },
|
|
339
345
|
duration: { type: "number" },
|
|
@@ -352,6 +358,12 @@ var FIELD_SCHEMA = {
|
|
|
352
358
|
systems: { type: "multi_link", target: "construct" }
|
|
353
359
|
},
|
|
354
360
|
character: {
|
|
361
|
+
// Base fields (shared by all elements)
|
|
362
|
+
name: { type: "text", required: true },
|
|
363
|
+
description: { type: "text", required: false },
|
|
364
|
+
supertype: { type: "text", required: false },
|
|
365
|
+
subtype: { type: "text", required: false },
|
|
366
|
+
image_url: { type: "text", required: false },
|
|
355
367
|
// Constitution
|
|
356
368
|
physicality: { type: "text" },
|
|
357
369
|
mentality: { type: "text" },
|
|
@@ -393,6 +405,12 @@ var FIELD_SCHEMA = {
|
|
|
393
405
|
CHA: { type: "number" }
|
|
394
406
|
},
|
|
395
407
|
collective: {
|
|
408
|
+
// Base fields (shared by all elements)
|
|
409
|
+
name: { type: "text", required: true },
|
|
410
|
+
description: { type: "text", required: false },
|
|
411
|
+
supertype: { type: "text", required: false },
|
|
412
|
+
subtype: { type: "text", required: false },
|
|
413
|
+
image_url: { type: "text", required: false },
|
|
396
414
|
// Formation
|
|
397
415
|
composition: { type: "text" },
|
|
398
416
|
count: { type: "number" },
|
|
@@ -412,6 +430,12 @@ var FIELD_SCHEMA = {
|
|
|
412
430
|
phenomena: { type: "multi_link", target: "phenomenon" }
|
|
413
431
|
},
|
|
414
432
|
construct: {
|
|
433
|
+
// Base fields (shared by all elements)
|
|
434
|
+
name: { type: "text", required: true },
|
|
435
|
+
description: { type: "text", required: false },
|
|
436
|
+
supertype: { type: "text", required: false },
|
|
437
|
+
subtype: { type: "text", required: false },
|
|
438
|
+
image_url: { type: "text", required: false },
|
|
415
439
|
// Nature
|
|
416
440
|
rationale: { type: "text" },
|
|
417
441
|
history: { type: "text" },
|
|
@@ -442,6 +466,12 @@ var FIELD_SCHEMA = {
|
|
|
442
466
|
narratives: { type: "multi_link", target: "narrative" }
|
|
443
467
|
},
|
|
444
468
|
creature: {
|
|
469
|
+
// Base fields (shared by all elements)
|
|
470
|
+
name: { type: "text", required: true },
|
|
471
|
+
description: { type: "text", required: false },
|
|
472
|
+
supertype: { type: "text", required: false },
|
|
473
|
+
subtype: { type: "text", required: false },
|
|
474
|
+
image_url: { type: "text", required: false },
|
|
445
475
|
// Biology
|
|
446
476
|
appearance: { type: "text" },
|
|
447
477
|
weight: { type: "number" },
|
|
@@ -466,6 +496,12 @@ var FIELD_SCHEMA = {
|
|
|
466
496
|
actions: { type: "multi_link", target: "ability" }
|
|
467
497
|
},
|
|
468
498
|
event: {
|
|
499
|
+
// Base fields (shared by all elements)
|
|
500
|
+
name: { type: "text", required: true },
|
|
501
|
+
description: { type: "text", required: false },
|
|
502
|
+
supertype: { type: "text", required: false },
|
|
503
|
+
subtype: { type: "text", required: false },
|
|
504
|
+
image_url: { type: "text", required: false },
|
|
469
505
|
// Nature
|
|
470
506
|
history: { type: "text" },
|
|
471
507
|
challenges: { type: "text" },
|
|
@@ -492,6 +528,12 @@ var FIELD_SCHEMA = {
|
|
|
492
528
|
constructs: { type: "multi_link", target: "construct" }
|
|
493
529
|
},
|
|
494
530
|
family: {
|
|
531
|
+
// Base fields (shared by all elements)
|
|
532
|
+
name: { type: "text", required: true },
|
|
533
|
+
description: { type: "text", required: false },
|
|
534
|
+
supertype: { type: "text", required: false },
|
|
535
|
+
subtype: { type: "text", required: false },
|
|
536
|
+
image_url: { type: "text", required: false },
|
|
495
537
|
// Identity
|
|
496
538
|
spirit: { type: "text" },
|
|
497
539
|
history: { type: "text" },
|
|
@@ -508,6 +550,12 @@ var FIELD_SCHEMA = {
|
|
|
508
550
|
creatures: { type: "multi_link", target: "creature" }
|
|
509
551
|
},
|
|
510
552
|
institution: {
|
|
553
|
+
// Base fields (shared by all elements)
|
|
554
|
+
name: { type: "text", required: true },
|
|
555
|
+
description: { type: "text", required: false },
|
|
556
|
+
supertype: { type: "text", required: false },
|
|
557
|
+
subtype: { type: "text", required: false },
|
|
558
|
+
image_url: { type: "text", required: false },
|
|
511
559
|
// Foundation
|
|
512
560
|
doctrine: { type: "text" },
|
|
513
561
|
founding_date: { type: "number" },
|
|
@@ -523,6 +571,12 @@ var FIELD_SCHEMA = {
|
|
|
523
571
|
constructs: { type: "multi_link", target: "construct" }
|
|
524
572
|
},
|
|
525
573
|
language: {
|
|
574
|
+
// Base fields (shared by all elements)
|
|
575
|
+
name: { type: "text", required: true },
|
|
576
|
+
description: { type: "text", required: false },
|
|
577
|
+
supertype: { type: "text", required: false },
|
|
578
|
+
subtype: { type: "text", required: false },
|
|
579
|
+
image_url: { type: "text", required: false },
|
|
526
580
|
// Structure
|
|
527
581
|
phonology: { type: "text" },
|
|
528
582
|
grammar: { type: "text" },
|
|
@@ -535,6 +589,12 @@ var FIELD_SCHEMA = {
|
|
|
535
589
|
dialects: { type: "multi_link", target: "language" }
|
|
536
590
|
},
|
|
537
591
|
law: {
|
|
592
|
+
// Base fields (shared by all elements)
|
|
593
|
+
name: { type: "text", required: true },
|
|
594
|
+
description: { type: "text", required: false },
|
|
595
|
+
supertype: { type: "text", required: false },
|
|
596
|
+
subtype: { type: "text", required: false },
|
|
597
|
+
image_url: { type: "text", required: false },
|
|
538
598
|
// Code
|
|
539
599
|
declaration: { type: "text" },
|
|
540
600
|
purpose: { type: "text" },
|
|
@@ -550,6 +610,12 @@ var FIELD_SCHEMA = {
|
|
|
550
610
|
enforcers: { type: "multi_link", target: "title" }
|
|
551
611
|
},
|
|
552
612
|
location: {
|
|
613
|
+
// Base fields (shared by all elements)
|
|
614
|
+
name: { type: "text", required: true },
|
|
615
|
+
description: { type: "text", required: false },
|
|
616
|
+
supertype: { type: "text", required: false },
|
|
617
|
+
subtype: { type: "text", required: false },
|
|
618
|
+
image_url: { type: "text", required: false },
|
|
553
619
|
// Setting
|
|
554
620
|
form: { type: "text" },
|
|
555
621
|
function: { type: "text" },
|
|
@@ -590,6 +656,12 @@ var FIELD_SCHEMA = {
|
|
|
590
656
|
defensive_objects: { type: "multi_link", target: "object" }
|
|
591
657
|
},
|
|
592
658
|
map: {
|
|
659
|
+
// Base fields (shared by all elements)
|
|
660
|
+
name: { type: "text", required: true },
|
|
661
|
+
description: { type: "text", required: false },
|
|
662
|
+
supertype: { type: "text", required: false },
|
|
663
|
+
subtype: { type: "text", required: false },
|
|
664
|
+
image_url: { type: "text", required: false },
|
|
593
665
|
// Details
|
|
594
666
|
background_color: { type: "text" },
|
|
595
667
|
hierarchy: { type: "number" },
|
|
@@ -600,14 +672,26 @@ var FIELD_SCHEMA = {
|
|
|
600
672
|
location: { type: "single_link", target: "location" }
|
|
601
673
|
},
|
|
602
674
|
marker: {
|
|
675
|
+
// Base fields (shared by all elements)
|
|
676
|
+
name: { type: "text", required: true },
|
|
677
|
+
description: { type: "text", required: false },
|
|
678
|
+
supertype: { type: "text", required: false },
|
|
679
|
+
subtype: { type: "text", required: false },
|
|
680
|
+
image_url: { type: "text", required: false },
|
|
603
681
|
// Details
|
|
604
682
|
map: { type: "single_link", target: "map" },
|
|
605
683
|
zone: { type: "single_link", target: "zone" },
|
|
606
|
-
x: { type: "
|
|
607
|
-
y: { type: "
|
|
608
|
-
z: { type: "
|
|
684
|
+
x: { type: "number" },
|
|
685
|
+
y: { type: "number" },
|
|
686
|
+
z: { type: "number" }
|
|
609
687
|
},
|
|
610
688
|
narrative: {
|
|
689
|
+
// Base fields (shared by all elements)
|
|
690
|
+
name: { type: "text", required: true },
|
|
691
|
+
description: { type: "text", required: false },
|
|
692
|
+
supertype: { type: "text", required: false },
|
|
693
|
+
subtype: { type: "text", required: false },
|
|
694
|
+
image_url: { type: "text", required: false },
|
|
611
695
|
// Context
|
|
612
696
|
story: { type: "text" },
|
|
613
697
|
consequences: { type: "text" },
|
|
@@ -640,6 +724,12 @@ var FIELD_SCHEMA = {
|
|
|
640
724
|
laws: { type: "multi_link", target: "law" }
|
|
641
725
|
},
|
|
642
726
|
object: {
|
|
727
|
+
// Base fields (shared by all elements)
|
|
728
|
+
name: { type: "text", required: true },
|
|
729
|
+
description: { type: "text", required: false },
|
|
730
|
+
supertype: { type: "text", required: false },
|
|
731
|
+
subtype: { type: "text", required: false },
|
|
732
|
+
image_url: { type: "text", required: false },
|
|
643
733
|
// Form
|
|
644
734
|
aesthetics: { type: "text" },
|
|
645
735
|
weight: { type: "number" },
|
|
@@ -659,6 +749,12 @@ var FIELD_SCHEMA = {
|
|
|
659
749
|
affinities: { type: "multi_link", target: "trait" }
|
|
660
750
|
},
|
|
661
751
|
phenomenon: {
|
|
752
|
+
// Base fields (shared by all elements)
|
|
753
|
+
name: { type: "text", required: true },
|
|
754
|
+
description: { type: "text", required: false },
|
|
755
|
+
supertype: { type: "text", required: false },
|
|
756
|
+
subtype: { type: "text", required: false },
|
|
757
|
+
image_url: { type: "text", required: false },
|
|
662
758
|
// Mechanics
|
|
663
759
|
expression: { type: "text" },
|
|
664
760
|
effects: { type: "text" },
|
|
@@ -673,17 +769,29 @@ var FIELD_SCHEMA = {
|
|
|
673
769
|
environments: { type: "multi_link", target: "location" }
|
|
674
770
|
},
|
|
675
771
|
pin: {
|
|
772
|
+
// Base fields (shared by all elements)
|
|
773
|
+
name: { type: "text", required: true },
|
|
774
|
+
description: { type: "text", required: false },
|
|
775
|
+
supertype: { type: "text", required: false },
|
|
776
|
+
subtype: { type: "text", required: false },
|
|
777
|
+
image_url: { type: "text", required: false },
|
|
676
778
|
// Details
|
|
677
779
|
map: { type: "single_link", target: "map" },
|
|
678
780
|
element_type: { type: "text" },
|
|
679
781
|
// ElementType enum value
|
|
680
782
|
element_id: { type: "single_link", target: "any" },
|
|
681
783
|
// Can reference any element
|
|
682
|
-
x: { type: "
|
|
683
|
-
y: { type: "
|
|
684
|
-
z: { type: "
|
|
784
|
+
x: { type: "number" },
|
|
785
|
+
y: { type: "number" },
|
|
786
|
+
z: { type: "number" }
|
|
685
787
|
},
|
|
686
788
|
relation: {
|
|
789
|
+
// Base fields (shared by all elements)
|
|
790
|
+
name: { type: "text", required: true },
|
|
791
|
+
description: { type: "text", required: false },
|
|
792
|
+
supertype: { type: "text", required: false },
|
|
793
|
+
subtype: { type: "text", required: false },
|
|
794
|
+
image_url: { type: "text", required: false },
|
|
687
795
|
// Nature
|
|
688
796
|
background: { type: "text" },
|
|
689
797
|
start_date: { type: "number" },
|
|
@@ -711,6 +819,12 @@ var FIELD_SCHEMA = {
|
|
|
711
819
|
narratives: { type: "multi_link", target: "narrative" }
|
|
712
820
|
},
|
|
713
821
|
species: {
|
|
822
|
+
// Base fields (shared by all elements)
|
|
823
|
+
name: { type: "text", required: true },
|
|
824
|
+
description: { type: "text", required: false },
|
|
825
|
+
supertype: { type: "text", required: false },
|
|
826
|
+
subtype: { type: "text", required: false },
|
|
827
|
+
image_url: { type: "text", required: false },
|
|
714
828
|
// Biology
|
|
715
829
|
appearance: { type: "text" },
|
|
716
830
|
life_span: { type: "number" },
|
|
@@ -733,6 +847,12 @@ var FIELD_SCHEMA = {
|
|
|
733
847
|
affinities: { type: "multi_link", target: "phenomenon" }
|
|
734
848
|
},
|
|
735
849
|
title: {
|
|
850
|
+
// Base fields (shared by all elements)
|
|
851
|
+
name: { type: "text", required: true },
|
|
852
|
+
description: { type: "text", required: false },
|
|
853
|
+
supertype: { type: "text", required: false },
|
|
854
|
+
subtype: { type: "text", required: false },
|
|
855
|
+
image_url: { type: "text", required: false },
|
|
736
856
|
// Mandate
|
|
737
857
|
authority: { type: "text" },
|
|
738
858
|
eligibility: { type: "text" },
|
|
@@ -761,6 +881,12 @@ var FIELD_SCHEMA = {
|
|
|
761
881
|
languages: { type: "multi_link", target: "language" }
|
|
762
882
|
},
|
|
763
883
|
trait: {
|
|
884
|
+
// Base fields (shared by all elements)
|
|
885
|
+
name: { type: "text", required: true },
|
|
886
|
+
description: { type: "text", required: false },
|
|
887
|
+
supertype: { type: "text", required: false },
|
|
888
|
+
subtype: { type: "text", required: false },
|
|
889
|
+
image_url: { type: "text", required: false },
|
|
764
890
|
// Qualitative
|
|
765
891
|
social_effects: { type: "text" },
|
|
766
892
|
physical_effects: { type: "text" },
|
|
@@ -780,6 +906,12 @@ var FIELD_SCHEMA = {
|
|
|
780
906
|
empowered_abilities: { type: "multi_link", target: "ability" }
|
|
781
907
|
},
|
|
782
908
|
zone: {
|
|
909
|
+
// Base fields (shared by all elements)
|
|
910
|
+
name: { type: "text", required: true },
|
|
911
|
+
description: { type: "text", required: false },
|
|
912
|
+
supertype: { type: "text", required: false },
|
|
913
|
+
subtype: { type: "text", required: false },
|
|
914
|
+
image_url: { type: "text", required: false },
|
|
783
915
|
// Scope
|
|
784
916
|
role: { type: "text" },
|
|
785
917
|
start_date: { type: "number" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlyworlds/sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,11 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
31
|
-
"url": "git+https://github.com/
|
|
31
|
+
"url": "git+https://github.com/OnlyWorlds/sdk.git"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://onlyworlds.github.io/",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/OnlyWorlds/sdk/issues"
|
|
32
36
|
},
|
|
33
37
|
"devDependencies": {
|
|
34
38
|
"tsup": "^8.0.1",
|