caplets 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -15
- package/dist/index.js +16058 -351
- package/package.json +2 -1
- package/schemas/caplet.schema.json +418 -0
- package/schemas/caplets-config.schema.json +448 -0
|
@@ -156,6 +156,72 @@
|
|
|
156
156
|
"type": "string",
|
|
157
157
|
"format": "uri"
|
|
158
158
|
},
|
|
159
|
+
"resourceMetadataUrl": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"format": "uri"
|
|
162
|
+
},
|
|
163
|
+
"authorizationServerMetadataUrl": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"format": "uri"
|
|
166
|
+
},
|
|
167
|
+
"openidConfigurationUrl": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"format": "uri"
|
|
170
|
+
},
|
|
171
|
+
"clientId": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"minLength": 1
|
|
174
|
+
},
|
|
175
|
+
"clientSecret": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"minLength": 1
|
|
178
|
+
},
|
|
179
|
+
"scopes": {
|
|
180
|
+
"type": "array",
|
|
181
|
+
"items": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"minLength": 1
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"redirectUri": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"format": "uri"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"required": ["type"],
|
|
192
|
+
"additionalProperties": false
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"type": "object",
|
|
196
|
+
"properties": {
|
|
197
|
+
"type": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"const": "oidc"
|
|
200
|
+
},
|
|
201
|
+
"authorizationUrl": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"format": "uri"
|
|
204
|
+
},
|
|
205
|
+
"tokenUrl": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"format": "uri"
|
|
208
|
+
},
|
|
209
|
+
"issuer": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"format": "uri"
|
|
212
|
+
},
|
|
213
|
+
"resourceMetadataUrl": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"format": "uri"
|
|
216
|
+
},
|
|
217
|
+
"authorizationServerMetadataUrl": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"format": "uri"
|
|
220
|
+
},
|
|
221
|
+
"openidConfigurationUrl": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"format": "uri"
|
|
224
|
+
},
|
|
159
225
|
"clientId": {
|
|
160
226
|
"type": "string",
|
|
161
227
|
"minLength": 1
|
|
@@ -305,6 +371,114 @@
|
|
|
305
371
|
},
|
|
306
372
|
"required": ["type", "headers"],
|
|
307
373
|
"additionalProperties": false
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"type": "object",
|
|
377
|
+
"properties": {
|
|
378
|
+
"type": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"const": "oauth2"
|
|
381
|
+
},
|
|
382
|
+
"authorizationUrl": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"format": "uri"
|
|
385
|
+
},
|
|
386
|
+
"tokenUrl": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"format": "uri"
|
|
389
|
+
},
|
|
390
|
+
"issuer": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"format": "uri"
|
|
393
|
+
},
|
|
394
|
+
"resourceMetadataUrl": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"format": "uri"
|
|
397
|
+
},
|
|
398
|
+
"authorizationServerMetadataUrl": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"format": "uri"
|
|
401
|
+
},
|
|
402
|
+
"openidConfigurationUrl": {
|
|
403
|
+
"type": "string",
|
|
404
|
+
"format": "uri"
|
|
405
|
+
},
|
|
406
|
+
"clientId": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"minLength": 1
|
|
409
|
+
},
|
|
410
|
+
"clientSecret": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"minLength": 1
|
|
413
|
+
},
|
|
414
|
+
"scopes": {
|
|
415
|
+
"type": "array",
|
|
416
|
+
"items": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"minLength": 1
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"redirectUri": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"format": "uri"
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"required": ["type"],
|
|
427
|
+
"additionalProperties": false
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"type": "object",
|
|
431
|
+
"properties": {
|
|
432
|
+
"type": {
|
|
433
|
+
"type": "string",
|
|
434
|
+
"const": "oidc"
|
|
435
|
+
},
|
|
436
|
+
"authorizationUrl": {
|
|
437
|
+
"type": "string",
|
|
438
|
+
"format": "uri"
|
|
439
|
+
},
|
|
440
|
+
"tokenUrl": {
|
|
441
|
+
"type": "string",
|
|
442
|
+
"format": "uri"
|
|
443
|
+
},
|
|
444
|
+
"issuer": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"format": "uri"
|
|
447
|
+
},
|
|
448
|
+
"resourceMetadataUrl": {
|
|
449
|
+
"type": "string",
|
|
450
|
+
"format": "uri"
|
|
451
|
+
},
|
|
452
|
+
"authorizationServerMetadataUrl": {
|
|
453
|
+
"type": "string",
|
|
454
|
+
"format": "uri"
|
|
455
|
+
},
|
|
456
|
+
"openidConfigurationUrl": {
|
|
457
|
+
"type": "string",
|
|
458
|
+
"format": "uri"
|
|
459
|
+
},
|
|
460
|
+
"clientId": {
|
|
461
|
+
"type": "string",
|
|
462
|
+
"minLength": 1
|
|
463
|
+
},
|
|
464
|
+
"clientSecret": {
|
|
465
|
+
"type": "string",
|
|
466
|
+
"minLength": 1
|
|
467
|
+
},
|
|
468
|
+
"scopes": {
|
|
469
|
+
"type": "array",
|
|
470
|
+
"items": {
|
|
471
|
+
"type": "string",
|
|
472
|
+
"minLength": 1
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"redirectUri": {
|
|
476
|
+
"type": "string",
|
|
477
|
+
"format": "uri"
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
"required": ["type"],
|
|
481
|
+
"additionalProperties": false
|
|
308
482
|
}
|
|
309
483
|
],
|
|
310
484
|
"description": "Explicit OpenAPI request auth config. Use {\"type\":\"none\"} for public APIs."
|
|
@@ -340,6 +514,280 @@
|
|
|
340
514
|
"required": ["name", "description", "auth"],
|
|
341
515
|
"additionalProperties": false
|
|
342
516
|
}
|
|
517
|
+
},
|
|
518
|
+
"graphqlEndpoints": {
|
|
519
|
+
"default": {},
|
|
520
|
+
"description": "GraphQL endpoints keyed by stable Caplet ID.",
|
|
521
|
+
"type": "object",
|
|
522
|
+
"propertyNames": {
|
|
523
|
+
"type": "string",
|
|
524
|
+
"pattern": "^[a-zA-Z0-9_-]{1,64}$"
|
|
525
|
+
},
|
|
526
|
+
"additionalProperties": {
|
|
527
|
+
"type": "object",
|
|
528
|
+
"properties": {
|
|
529
|
+
"name": {
|
|
530
|
+
"type": "string",
|
|
531
|
+
"minLength": 1,
|
|
532
|
+
"maxLength": 80,
|
|
533
|
+
"description": "Human-readable GraphQL display name."
|
|
534
|
+
},
|
|
535
|
+
"description": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"description": "Capability description shown to agents before GraphQL operations are disclosed."
|
|
538
|
+
},
|
|
539
|
+
"endpointUrl": {
|
|
540
|
+
"type": "string",
|
|
541
|
+
"format": "uri",
|
|
542
|
+
"description": "GraphQL HTTP endpoint URL."
|
|
543
|
+
},
|
|
544
|
+
"schemaPath": {
|
|
545
|
+
"description": "Local GraphQL SDL or introspection path.",
|
|
546
|
+
"type": "string",
|
|
547
|
+
"minLength": 1
|
|
548
|
+
},
|
|
549
|
+
"schemaUrl": {
|
|
550
|
+
"description": "Remote GraphQL SDL or introspection URL.",
|
|
551
|
+
"type": "string",
|
|
552
|
+
"format": "uri"
|
|
553
|
+
},
|
|
554
|
+
"introspection": {
|
|
555
|
+
"description": "Load schema through endpoint introspection.",
|
|
556
|
+
"type": "boolean",
|
|
557
|
+
"const": true
|
|
558
|
+
},
|
|
559
|
+
"operations": {
|
|
560
|
+
"description": "Configured GraphQL operations keyed by stable tool name.",
|
|
561
|
+
"type": "object",
|
|
562
|
+
"propertyNames": {
|
|
563
|
+
"type": "string",
|
|
564
|
+
"pattern": "^[a-zA-Z0-9_-]{1,64}$"
|
|
565
|
+
},
|
|
566
|
+
"additionalProperties": {
|
|
567
|
+
"type": "object",
|
|
568
|
+
"properties": {
|
|
569
|
+
"document": {
|
|
570
|
+
"description": "Inline GraphQL operation document.",
|
|
571
|
+
"type": "string",
|
|
572
|
+
"minLength": 1
|
|
573
|
+
},
|
|
574
|
+
"documentPath": {
|
|
575
|
+
"description": "Path to a GraphQL operation document.",
|
|
576
|
+
"type": "string",
|
|
577
|
+
"minLength": 1
|
|
578
|
+
},
|
|
579
|
+
"operationName": {
|
|
580
|
+
"description": "Operation name to execute.",
|
|
581
|
+
"type": "string",
|
|
582
|
+
"minLength": 1
|
|
583
|
+
},
|
|
584
|
+
"description": {
|
|
585
|
+
"description": "Operation capability description.",
|
|
586
|
+
"type": "string",
|
|
587
|
+
"minLength": 1
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
"additionalProperties": false
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
"auth": {
|
|
594
|
+
"oneOf": [
|
|
595
|
+
{
|
|
596
|
+
"type": "object",
|
|
597
|
+
"properties": {
|
|
598
|
+
"type": {
|
|
599
|
+
"type": "string",
|
|
600
|
+
"const": "none"
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
"required": ["type"],
|
|
604
|
+
"additionalProperties": false
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"type": "object",
|
|
608
|
+
"properties": {
|
|
609
|
+
"type": {
|
|
610
|
+
"type": "string",
|
|
611
|
+
"const": "bearer"
|
|
612
|
+
},
|
|
613
|
+
"token": {
|
|
614
|
+
"type": "string",
|
|
615
|
+
"minLength": 1
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
"required": ["type", "token"],
|
|
619
|
+
"additionalProperties": false
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"type": "object",
|
|
623
|
+
"properties": {
|
|
624
|
+
"type": {
|
|
625
|
+
"type": "string",
|
|
626
|
+
"const": "headers"
|
|
627
|
+
},
|
|
628
|
+
"headers": {
|
|
629
|
+
"type": "object",
|
|
630
|
+
"propertyNames": {
|
|
631
|
+
"type": "string"
|
|
632
|
+
},
|
|
633
|
+
"additionalProperties": {
|
|
634
|
+
"type": "string",
|
|
635
|
+
"minLength": 1
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"required": ["type", "headers"],
|
|
640
|
+
"additionalProperties": false
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"type": "object",
|
|
644
|
+
"properties": {
|
|
645
|
+
"type": {
|
|
646
|
+
"type": "string",
|
|
647
|
+
"const": "oauth2"
|
|
648
|
+
},
|
|
649
|
+
"authorizationUrl": {
|
|
650
|
+
"type": "string",
|
|
651
|
+
"format": "uri"
|
|
652
|
+
},
|
|
653
|
+
"tokenUrl": {
|
|
654
|
+
"type": "string",
|
|
655
|
+
"format": "uri"
|
|
656
|
+
},
|
|
657
|
+
"issuer": {
|
|
658
|
+
"type": "string",
|
|
659
|
+
"format": "uri"
|
|
660
|
+
},
|
|
661
|
+
"resourceMetadataUrl": {
|
|
662
|
+
"type": "string",
|
|
663
|
+
"format": "uri"
|
|
664
|
+
},
|
|
665
|
+
"authorizationServerMetadataUrl": {
|
|
666
|
+
"type": "string",
|
|
667
|
+
"format": "uri"
|
|
668
|
+
},
|
|
669
|
+
"openidConfigurationUrl": {
|
|
670
|
+
"type": "string",
|
|
671
|
+
"format": "uri"
|
|
672
|
+
},
|
|
673
|
+
"clientId": {
|
|
674
|
+
"type": "string",
|
|
675
|
+
"minLength": 1
|
|
676
|
+
},
|
|
677
|
+
"clientSecret": {
|
|
678
|
+
"type": "string",
|
|
679
|
+
"minLength": 1
|
|
680
|
+
},
|
|
681
|
+
"scopes": {
|
|
682
|
+
"type": "array",
|
|
683
|
+
"items": {
|
|
684
|
+
"type": "string",
|
|
685
|
+
"minLength": 1
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
"redirectUri": {
|
|
689
|
+
"type": "string",
|
|
690
|
+
"format": "uri"
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
"required": ["type"],
|
|
694
|
+
"additionalProperties": false
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"type": "object",
|
|
698
|
+
"properties": {
|
|
699
|
+
"type": {
|
|
700
|
+
"type": "string",
|
|
701
|
+
"const": "oidc"
|
|
702
|
+
},
|
|
703
|
+
"authorizationUrl": {
|
|
704
|
+
"type": "string",
|
|
705
|
+
"format": "uri"
|
|
706
|
+
},
|
|
707
|
+
"tokenUrl": {
|
|
708
|
+
"type": "string",
|
|
709
|
+
"format": "uri"
|
|
710
|
+
},
|
|
711
|
+
"issuer": {
|
|
712
|
+
"type": "string",
|
|
713
|
+
"format": "uri"
|
|
714
|
+
},
|
|
715
|
+
"resourceMetadataUrl": {
|
|
716
|
+
"type": "string",
|
|
717
|
+
"format": "uri"
|
|
718
|
+
},
|
|
719
|
+
"authorizationServerMetadataUrl": {
|
|
720
|
+
"type": "string",
|
|
721
|
+
"format": "uri"
|
|
722
|
+
},
|
|
723
|
+
"openidConfigurationUrl": {
|
|
724
|
+
"type": "string",
|
|
725
|
+
"format": "uri"
|
|
726
|
+
},
|
|
727
|
+
"clientId": {
|
|
728
|
+
"type": "string",
|
|
729
|
+
"minLength": 1
|
|
730
|
+
},
|
|
731
|
+
"clientSecret": {
|
|
732
|
+
"type": "string",
|
|
733
|
+
"minLength": 1
|
|
734
|
+
},
|
|
735
|
+
"scopes": {
|
|
736
|
+
"type": "array",
|
|
737
|
+
"items": {
|
|
738
|
+
"type": "string",
|
|
739
|
+
"minLength": 1
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
"redirectUri": {
|
|
743
|
+
"type": "string",
|
|
744
|
+
"format": "uri"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"required": ["type"],
|
|
748
|
+
"additionalProperties": false
|
|
749
|
+
}
|
|
750
|
+
],
|
|
751
|
+
"description": "Explicit GraphQL request auth config. Use {\"type\":\"none\"} for public APIs."
|
|
752
|
+
},
|
|
753
|
+
"tags": {
|
|
754
|
+
"type": "array",
|
|
755
|
+
"items": {
|
|
756
|
+
"type": "string",
|
|
757
|
+
"minLength": 1,
|
|
758
|
+
"maxLength": 80
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
"requestTimeoutMs": {
|
|
762
|
+
"default": 60000,
|
|
763
|
+
"description": "Timeout in milliseconds for GraphQL HTTP requests.",
|
|
764
|
+
"type": "integer",
|
|
765
|
+
"exclusiveMinimum": 0,
|
|
766
|
+
"maximum": 9007199254740991
|
|
767
|
+
},
|
|
768
|
+
"operationCacheTtlMs": {
|
|
769
|
+
"default": 30000,
|
|
770
|
+
"description": "Milliseconds GraphQL operation metadata stays fresh. Set 0 to refresh every time.",
|
|
771
|
+
"type": "integer",
|
|
772
|
+
"minimum": 0,
|
|
773
|
+
"maximum": 9007199254740991
|
|
774
|
+
},
|
|
775
|
+
"selectionDepth": {
|
|
776
|
+
"default": 2,
|
|
777
|
+
"description": "Maximum depth for auto-generated GraphQL selection sets.",
|
|
778
|
+
"type": "integer",
|
|
779
|
+
"exclusiveMinimum": 0,
|
|
780
|
+
"maximum": 5
|
|
781
|
+
},
|
|
782
|
+
"disabled": {
|
|
783
|
+
"default": false,
|
|
784
|
+
"description": "When true, omit this GraphQL Caplet.",
|
|
785
|
+
"type": "boolean"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"required": ["name", "description", "endpointUrl", "auth"],
|
|
789
|
+
"additionalProperties": false
|
|
790
|
+
}
|
|
343
791
|
}
|
|
344
792
|
},
|
|
345
793
|
"additionalProperties": false
|