neatlogs-cli 0.1.0-team-test.5 → 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.
- package/CHANGELOG.md +23 -4
- package/LICENSE +21 -0
- package/README.md +37 -2
- package/dist/bin.js +674 -464
- package/docs/command-reference.md +18 -18
- package/package.json +3 -2
package/dist/bin.js
CHANGED
|
@@ -148,7 +148,7 @@ var public_openapi_default = {
|
|
|
148
148
|
description: "Local dev"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
|
-
url: "https://cloud.neatlogs.com",
|
|
151
|
+
url: "https://neatlogs-dev-cloud.neatlogs.com",
|
|
152
152
|
description: "dev.neatlogs.com backend"
|
|
153
153
|
},
|
|
154
154
|
{
|
|
@@ -430,7 +430,7 @@ var public_openapi_default = {
|
|
|
430
430
|
instance: {
|
|
431
431
|
type: "string",
|
|
432
432
|
maxLength: 2048,
|
|
433
|
-
pattern: "^\\/
|
|
433
|
+
pattern: "^\\/[aA][pP][iI]\\/[vV][0-9]+\\/[pP][uU][bB][lL][iI][cC](?:\\/[^?#\\r\\n]*)?$"
|
|
434
434
|
},
|
|
435
435
|
requestId: {
|
|
436
436
|
type: "string",
|
|
@@ -477,6 +477,189 @@ var public_openapi_default = {
|
|
|
477
477
|
],
|
|
478
478
|
additionalProperties: false
|
|
479
479
|
},
|
|
480
|
+
PublicDetectionIssueSemanticsInput: {
|
|
481
|
+
type: "object",
|
|
482
|
+
properties: {
|
|
483
|
+
schema_version: {
|
|
484
|
+
type: "string",
|
|
485
|
+
const: "detector-issue-semantics-v1"
|
|
486
|
+
},
|
|
487
|
+
polarity: {
|
|
488
|
+
type: "string",
|
|
489
|
+
enum: [
|
|
490
|
+
"problem",
|
|
491
|
+
"healthy",
|
|
492
|
+
"informational",
|
|
493
|
+
"unknown"
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
authority: {
|
|
497
|
+
default: "none",
|
|
498
|
+
type: "string",
|
|
499
|
+
enum: [
|
|
500
|
+
"none",
|
|
501
|
+
"project_authoritative"
|
|
502
|
+
]
|
|
503
|
+
},
|
|
504
|
+
truth_role: {
|
|
505
|
+
type: "string",
|
|
506
|
+
minLength: 1,
|
|
507
|
+
maxLength: 100
|
|
508
|
+
},
|
|
509
|
+
contract_id: {
|
|
510
|
+
type: "string",
|
|
511
|
+
minLength: 1,
|
|
512
|
+
maxLength: 256
|
|
513
|
+
},
|
|
514
|
+
contract_version: {
|
|
515
|
+
type: "string",
|
|
516
|
+
minLength: 1,
|
|
517
|
+
maxLength: 100
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
required: [
|
|
521
|
+
"schema_version",
|
|
522
|
+
"polarity"
|
|
523
|
+
],
|
|
524
|
+
additionalProperties: false
|
|
525
|
+
},
|
|
526
|
+
PublicDetectionIssueSemanticsOutput: {
|
|
527
|
+
type: "object",
|
|
528
|
+
properties: {
|
|
529
|
+
schema_version: {
|
|
530
|
+
type: "string",
|
|
531
|
+
const: "detector-issue-semantics-v1"
|
|
532
|
+
},
|
|
533
|
+
polarity: {
|
|
534
|
+
type: "string",
|
|
535
|
+
enum: [
|
|
536
|
+
"problem",
|
|
537
|
+
"healthy",
|
|
538
|
+
"informational",
|
|
539
|
+
"unknown"
|
|
540
|
+
]
|
|
541
|
+
},
|
|
542
|
+
authority: {
|
|
543
|
+
default: "none",
|
|
544
|
+
type: "string",
|
|
545
|
+
enum: [
|
|
546
|
+
"none",
|
|
547
|
+
"project_authoritative"
|
|
548
|
+
]
|
|
549
|
+
},
|
|
550
|
+
truth_role: {
|
|
551
|
+
type: "string",
|
|
552
|
+
minLength: 1,
|
|
553
|
+
maxLength: 100
|
|
554
|
+
},
|
|
555
|
+
contract_id: {
|
|
556
|
+
type: "string",
|
|
557
|
+
minLength: 1,
|
|
558
|
+
maxLength: 256
|
|
559
|
+
},
|
|
560
|
+
contract_version: {
|
|
561
|
+
type: "string",
|
|
562
|
+
minLength: 1,
|
|
563
|
+
maxLength: 100
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
required: [
|
|
567
|
+
"schema_version",
|
|
568
|
+
"polarity",
|
|
569
|
+
"authority"
|
|
570
|
+
],
|
|
571
|
+
additionalProperties: false
|
|
572
|
+
},
|
|
573
|
+
PublicDetectionSummary: {
|
|
574
|
+
type: "object",
|
|
575
|
+
properties: {
|
|
576
|
+
createdAt: {
|
|
577
|
+
type: "string",
|
|
578
|
+
format: "date-time",
|
|
579
|
+
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
580
|
+
},
|
|
581
|
+
displayName: {
|
|
582
|
+
type: "string",
|
|
583
|
+
minLength: 1,
|
|
584
|
+
maxLength: 255
|
|
585
|
+
},
|
|
586
|
+
groupId: {
|
|
587
|
+
type: "string",
|
|
588
|
+
format: "uuid",
|
|
589
|
+
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
590
|
+
},
|
|
591
|
+
groupName: {
|
|
592
|
+
anyOf: [
|
|
593
|
+
{
|
|
594
|
+
type: "string",
|
|
595
|
+
maxLength: 255
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
type: "null"
|
|
599
|
+
}
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
id: {
|
|
603
|
+
type: "string",
|
|
604
|
+
format: "uuid",
|
|
605
|
+
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
606
|
+
},
|
|
607
|
+
isActive: {
|
|
608
|
+
type: "boolean"
|
|
609
|
+
},
|
|
610
|
+
issueSemantics: {
|
|
611
|
+
anyOf: [
|
|
612
|
+
{
|
|
613
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
type: "null"
|
|
617
|
+
}
|
|
618
|
+
]
|
|
619
|
+
},
|
|
620
|
+
slug: {
|
|
621
|
+
type: "string",
|
|
622
|
+
minLength: 1,
|
|
623
|
+
maxLength: 100
|
|
624
|
+
},
|
|
625
|
+
threshold: {
|
|
626
|
+
type: "number",
|
|
627
|
+
minimum: 0,
|
|
628
|
+
maximum: 1
|
|
629
|
+
},
|
|
630
|
+
type: {
|
|
631
|
+
type: "string",
|
|
632
|
+
enum: [
|
|
633
|
+
"classifier",
|
|
634
|
+
"regex",
|
|
635
|
+
"conditional",
|
|
636
|
+
"pii",
|
|
637
|
+
"custom_trained",
|
|
638
|
+
"code",
|
|
639
|
+
"trace_rules",
|
|
640
|
+
"decision"
|
|
641
|
+
]
|
|
642
|
+
},
|
|
643
|
+
updatedAt: {
|
|
644
|
+
type: "string",
|
|
645
|
+
format: "date-time",
|
|
646
|
+
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
required: [
|
|
650
|
+
"createdAt",
|
|
651
|
+
"displayName",
|
|
652
|
+
"groupId",
|
|
653
|
+
"groupName",
|
|
654
|
+
"id",
|
|
655
|
+
"isActive",
|
|
656
|
+
"slug",
|
|
657
|
+
"threshold",
|
|
658
|
+
"type",
|
|
659
|
+
"updatedAt"
|
|
660
|
+
],
|
|
661
|
+
additionalProperties: false
|
|
662
|
+
},
|
|
480
663
|
PublicSavedFilter: {
|
|
481
664
|
additionalProperties: false,
|
|
482
665
|
properties: {
|
|
@@ -31116,6 +31299,16 @@ var public_openapi_default = {
|
|
|
31116
31299
|
default: true,
|
|
31117
31300
|
type: "boolean"
|
|
31118
31301
|
},
|
|
31302
|
+
issueSemantics: {
|
|
31303
|
+
anyOf: [
|
|
31304
|
+
{
|
|
31305
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
31306
|
+
},
|
|
31307
|
+
{
|
|
31308
|
+
type: "null"
|
|
31309
|
+
}
|
|
31310
|
+
]
|
|
31311
|
+
},
|
|
31119
31312
|
runOn: {
|
|
31120
31313
|
default: {
|
|
31121
31314
|
frequency: "trace"
|
|
@@ -31253,6 +31446,16 @@ var public_openapi_default = {
|
|
|
31253
31446
|
default: true,
|
|
31254
31447
|
type: "boolean"
|
|
31255
31448
|
},
|
|
31449
|
+
issueSemantics: {
|
|
31450
|
+
anyOf: [
|
|
31451
|
+
{
|
|
31452
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
31453
|
+
},
|
|
31454
|
+
{
|
|
31455
|
+
type: "null"
|
|
31456
|
+
}
|
|
31457
|
+
]
|
|
31458
|
+
},
|
|
31256
31459
|
runOn: {
|
|
31257
31460
|
default: {
|
|
31258
31461
|
frequency: "trace"
|
|
@@ -31418,6 +31621,16 @@ var public_openapi_default = {
|
|
|
31418
31621
|
default: true,
|
|
31419
31622
|
type: "boolean"
|
|
31420
31623
|
},
|
|
31624
|
+
issueSemantics: {
|
|
31625
|
+
anyOf: [
|
|
31626
|
+
{
|
|
31627
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
31628
|
+
},
|
|
31629
|
+
{
|
|
31630
|
+
type: "null"
|
|
31631
|
+
}
|
|
31632
|
+
]
|
|
31633
|
+
},
|
|
31421
31634
|
runOn: {
|
|
31422
31635
|
default: {
|
|
31423
31636
|
frequency: "trace"
|
|
@@ -32257,6 +32470,16 @@ var public_openapi_default = {
|
|
|
32257
32470
|
default: true,
|
|
32258
32471
|
type: "boolean"
|
|
32259
32472
|
},
|
|
32473
|
+
issueSemantics: {
|
|
32474
|
+
anyOf: [
|
|
32475
|
+
{
|
|
32476
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
32477
|
+
},
|
|
32478
|
+
{
|
|
32479
|
+
type: "null"
|
|
32480
|
+
}
|
|
32481
|
+
]
|
|
32482
|
+
},
|
|
32260
32483
|
runOn: {
|
|
32261
32484
|
default: {
|
|
32262
32485
|
frequency: "trace"
|
|
@@ -32951,6 +33174,16 @@ var public_openapi_default = {
|
|
|
32951
33174
|
default: true,
|
|
32952
33175
|
type: "boolean"
|
|
32953
33176
|
},
|
|
33177
|
+
issueSemantics: {
|
|
33178
|
+
anyOf: [
|
|
33179
|
+
{
|
|
33180
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
33181
|
+
},
|
|
33182
|
+
{
|
|
33183
|
+
type: "null"
|
|
33184
|
+
}
|
|
33185
|
+
]
|
|
33186
|
+
},
|
|
32954
33187
|
runOn: {
|
|
32955
33188
|
default: {
|
|
32956
33189
|
frequency: "trace"
|
|
@@ -33088,6 +33321,16 @@ var public_openapi_default = {
|
|
|
33088
33321
|
default: true,
|
|
33089
33322
|
type: "boolean"
|
|
33090
33323
|
},
|
|
33324
|
+
issueSemantics: {
|
|
33325
|
+
anyOf: [
|
|
33326
|
+
{
|
|
33327
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
33328
|
+
},
|
|
33329
|
+
{
|
|
33330
|
+
type: "null"
|
|
33331
|
+
}
|
|
33332
|
+
]
|
|
33333
|
+
},
|
|
33091
33334
|
runOn: {
|
|
33092
33335
|
default: {
|
|
33093
33336
|
frequency: "trace"
|
|
@@ -33253,6 +33496,16 @@ var public_openapi_default = {
|
|
|
33253
33496
|
default: true,
|
|
33254
33497
|
type: "boolean"
|
|
33255
33498
|
},
|
|
33499
|
+
issueSemantics: {
|
|
33500
|
+
anyOf: [
|
|
33501
|
+
{
|
|
33502
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
33503
|
+
},
|
|
33504
|
+
{
|
|
33505
|
+
type: "null"
|
|
33506
|
+
}
|
|
33507
|
+
]
|
|
33508
|
+
},
|
|
33256
33509
|
runOn: {
|
|
33257
33510
|
default: {
|
|
33258
33511
|
frequency: "trace"
|
|
@@ -34092,6 +34345,16 @@ var public_openapi_default = {
|
|
|
34092
34345
|
default: true,
|
|
34093
34346
|
type: "boolean"
|
|
34094
34347
|
},
|
|
34348
|
+
issueSemantics: {
|
|
34349
|
+
anyOf: [
|
|
34350
|
+
{
|
|
34351
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
34352
|
+
},
|
|
34353
|
+
{
|
|
34354
|
+
type: "null"
|
|
34355
|
+
}
|
|
34356
|
+
]
|
|
34357
|
+
},
|
|
34095
34358
|
runOn: {
|
|
34096
34359
|
default: {
|
|
34097
34360
|
frequency: "trace"
|
|
@@ -34799,6 +35062,16 @@ var public_openapi_default = {
|
|
|
34799
35062
|
default: true,
|
|
34800
35063
|
type: "boolean"
|
|
34801
35064
|
},
|
|
35065
|
+
issueSemantics: {
|
|
35066
|
+
anyOf: [
|
|
35067
|
+
{
|
|
35068
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
35069
|
+
},
|
|
35070
|
+
{
|
|
35071
|
+
type: "null"
|
|
35072
|
+
}
|
|
35073
|
+
]
|
|
35074
|
+
},
|
|
34802
35075
|
runOn: {
|
|
34803
35076
|
default: {
|
|
34804
35077
|
frequency: "trace"
|
|
@@ -34936,6 +35209,16 @@ var public_openapi_default = {
|
|
|
34936
35209
|
default: true,
|
|
34937
35210
|
type: "boolean"
|
|
34938
35211
|
},
|
|
35212
|
+
issueSemantics: {
|
|
35213
|
+
anyOf: [
|
|
35214
|
+
{
|
|
35215
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
35216
|
+
},
|
|
35217
|
+
{
|
|
35218
|
+
type: "null"
|
|
35219
|
+
}
|
|
35220
|
+
]
|
|
35221
|
+
},
|
|
34939
35222
|
runOn: {
|
|
34940
35223
|
default: {
|
|
34941
35224
|
frequency: "trace"
|
|
@@ -35101,6 +35384,16 @@ var public_openapi_default = {
|
|
|
35101
35384
|
default: true,
|
|
35102
35385
|
type: "boolean"
|
|
35103
35386
|
},
|
|
35387
|
+
issueSemantics: {
|
|
35388
|
+
anyOf: [
|
|
35389
|
+
{
|
|
35390
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
35391
|
+
},
|
|
35392
|
+
{
|
|
35393
|
+
type: "null"
|
|
35394
|
+
}
|
|
35395
|
+
]
|
|
35396
|
+
},
|
|
35104
35397
|
runOn: {
|
|
35105
35398
|
default: {
|
|
35106
35399
|
frequency: "trace"
|
|
@@ -35940,6 +36233,16 @@ var public_openapi_default = {
|
|
|
35940
36233
|
default: true,
|
|
35941
36234
|
type: "boolean"
|
|
35942
36235
|
},
|
|
36236
|
+
issueSemantics: {
|
|
36237
|
+
anyOf: [
|
|
36238
|
+
{
|
|
36239
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
36240
|
+
},
|
|
36241
|
+
{
|
|
36242
|
+
type: "null"
|
|
36243
|
+
}
|
|
36244
|
+
]
|
|
36245
|
+
},
|
|
35943
36246
|
runOn: {
|
|
35944
36247
|
default: {
|
|
35945
36248
|
frequency: "trace"
|
|
@@ -36586,83 +36889,7 @@ var public_openapi_default = {
|
|
|
36586
36889
|
detections: {
|
|
36587
36890
|
type: "array",
|
|
36588
36891
|
items: {
|
|
36589
|
-
|
|
36590
|
-
properties: {
|
|
36591
|
-
createdAt: {
|
|
36592
|
-
type: "string",
|
|
36593
|
-
format: "date-time",
|
|
36594
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
36595
|
-
},
|
|
36596
|
-
displayName: {
|
|
36597
|
-
type: "string",
|
|
36598
|
-
minLength: 1,
|
|
36599
|
-
maxLength: 255
|
|
36600
|
-
},
|
|
36601
|
-
groupId: {
|
|
36602
|
-
type: "string",
|
|
36603
|
-
format: "uuid",
|
|
36604
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
36605
|
-
},
|
|
36606
|
-
groupName: {
|
|
36607
|
-
anyOf: [
|
|
36608
|
-
{
|
|
36609
|
-
type: "string",
|
|
36610
|
-
maxLength: 255
|
|
36611
|
-
},
|
|
36612
|
-
{
|
|
36613
|
-
type: "null"
|
|
36614
|
-
}
|
|
36615
|
-
]
|
|
36616
|
-
},
|
|
36617
|
-
id: {
|
|
36618
|
-
type: "string",
|
|
36619
|
-
format: "uuid",
|
|
36620
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
36621
|
-
},
|
|
36622
|
-
isActive: {
|
|
36623
|
-
type: "boolean"
|
|
36624
|
-
},
|
|
36625
|
-
slug: {
|
|
36626
|
-
type: "string",
|
|
36627
|
-
minLength: 1,
|
|
36628
|
-
maxLength: 100
|
|
36629
|
-
},
|
|
36630
|
-
threshold: {
|
|
36631
|
-
type: "number",
|
|
36632
|
-
minimum: 0,
|
|
36633
|
-
maximum: 1
|
|
36634
|
-
},
|
|
36635
|
-
type: {
|
|
36636
|
-
type: "string",
|
|
36637
|
-
enum: [
|
|
36638
|
-
"classifier",
|
|
36639
|
-
"regex",
|
|
36640
|
-
"conditional",
|
|
36641
|
-
"pii",
|
|
36642
|
-
"custom_trained",
|
|
36643
|
-
"code",
|
|
36644
|
-
"trace_rules"
|
|
36645
|
-
]
|
|
36646
|
-
},
|
|
36647
|
-
updatedAt: {
|
|
36648
|
-
type: "string",
|
|
36649
|
-
format: "date-time",
|
|
36650
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
36651
|
-
}
|
|
36652
|
-
},
|
|
36653
|
-
required: [
|
|
36654
|
-
"createdAt",
|
|
36655
|
-
"displayName",
|
|
36656
|
-
"groupId",
|
|
36657
|
-
"groupName",
|
|
36658
|
-
"id",
|
|
36659
|
-
"isActive",
|
|
36660
|
-
"slug",
|
|
36661
|
-
"threshold",
|
|
36662
|
-
"type",
|
|
36663
|
-
"updatedAt"
|
|
36664
|
-
],
|
|
36665
|
-
additionalProperties: false
|
|
36892
|
+
$ref: "#/components/schemas/PublicDetectionSummary"
|
|
36666
36893
|
}
|
|
36667
36894
|
},
|
|
36668
36895
|
page: {
|
|
@@ -37213,83 +37440,7 @@ var public_openapi_default = {
|
|
|
37213
37440
|
type: "object",
|
|
37214
37441
|
properties: {
|
|
37215
37442
|
data: {
|
|
37216
|
-
|
|
37217
|
-
properties: {
|
|
37218
|
-
createdAt: {
|
|
37219
|
-
type: "string",
|
|
37220
|
-
format: "date-time",
|
|
37221
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
37222
|
-
},
|
|
37223
|
-
displayName: {
|
|
37224
|
-
type: "string",
|
|
37225
|
-
minLength: 1,
|
|
37226
|
-
maxLength: 255
|
|
37227
|
-
},
|
|
37228
|
-
groupId: {
|
|
37229
|
-
type: "string",
|
|
37230
|
-
format: "uuid",
|
|
37231
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
37232
|
-
},
|
|
37233
|
-
groupName: {
|
|
37234
|
-
anyOf: [
|
|
37235
|
-
{
|
|
37236
|
-
type: "string",
|
|
37237
|
-
maxLength: 255
|
|
37238
|
-
},
|
|
37239
|
-
{
|
|
37240
|
-
type: "null"
|
|
37241
|
-
}
|
|
37242
|
-
]
|
|
37243
|
-
},
|
|
37244
|
-
id: {
|
|
37245
|
-
type: "string",
|
|
37246
|
-
format: "uuid",
|
|
37247
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
37248
|
-
},
|
|
37249
|
-
isActive: {
|
|
37250
|
-
type: "boolean"
|
|
37251
|
-
},
|
|
37252
|
-
slug: {
|
|
37253
|
-
type: "string",
|
|
37254
|
-
minLength: 1,
|
|
37255
|
-
maxLength: 100
|
|
37256
|
-
},
|
|
37257
|
-
threshold: {
|
|
37258
|
-
type: "number",
|
|
37259
|
-
minimum: 0,
|
|
37260
|
-
maximum: 1
|
|
37261
|
-
},
|
|
37262
|
-
type: {
|
|
37263
|
-
type: "string",
|
|
37264
|
-
enum: [
|
|
37265
|
-
"classifier",
|
|
37266
|
-
"regex",
|
|
37267
|
-
"conditional",
|
|
37268
|
-
"pii",
|
|
37269
|
-
"custom_trained",
|
|
37270
|
-
"code",
|
|
37271
|
-
"trace_rules"
|
|
37272
|
-
]
|
|
37273
|
-
},
|
|
37274
|
-
updatedAt: {
|
|
37275
|
-
type: "string",
|
|
37276
|
-
format: "date-time",
|
|
37277
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
37278
|
-
}
|
|
37279
|
-
},
|
|
37280
|
-
required: [
|
|
37281
|
-
"createdAt",
|
|
37282
|
-
"displayName",
|
|
37283
|
-
"groupId",
|
|
37284
|
-
"groupName",
|
|
37285
|
-
"id",
|
|
37286
|
-
"isActive",
|
|
37287
|
-
"slug",
|
|
37288
|
-
"threshold",
|
|
37289
|
-
"type",
|
|
37290
|
-
"updatedAt"
|
|
37291
|
-
],
|
|
37292
|
-
additionalProperties: false
|
|
37443
|
+
$ref: "#/components/schemas/PublicDetectionSummary"
|
|
37293
37444
|
},
|
|
37294
37445
|
requestId: {
|
|
37295
37446
|
type: "string",
|
|
@@ -37732,6 +37883,16 @@ var public_openapi_default = {
|
|
|
37732
37883
|
default: true,
|
|
37733
37884
|
type: "boolean"
|
|
37734
37885
|
},
|
|
37886
|
+
issueSemantics: {
|
|
37887
|
+
anyOf: [
|
|
37888
|
+
{
|
|
37889
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsInput"
|
|
37890
|
+
},
|
|
37891
|
+
{
|
|
37892
|
+
type: "null"
|
|
37893
|
+
}
|
|
37894
|
+
]
|
|
37895
|
+
},
|
|
37735
37896
|
runOn: {
|
|
37736
37897
|
default: {
|
|
37737
37898
|
frequency: "trace"
|
|
@@ -37863,6 +38024,16 @@ var public_openapi_default = {
|
|
|
37863
38024
|
default: true,
|
|
37864
38025
|
type: "boolean"
|
|
37865
38026
|
},
|
|
38027
|
+
issueSemantics: {
|
|
38028
|
+
anyOf: [
|
|
38029
|
+
{
|
|
38030
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsInput"
|
|
38031
|
+
},
|
|
38032
|
+
{
|
|
38033
|
+
type: "null"
|
|
38034
|
+
}
|
|
38035
|
+
]
|
|
38036
|
+
},
|
|
37866
38037
|
runOn: {
|
|
37867
38038
|
default: {
|
|
37868
38039
|
frequency: "trace"
|
|
@@ -38018,6 +38189,16 @@ var public_openapi_default = {
|
|
|
38018
38189
|
default: true,
|
|
38019
38190
|
type: "boolean"
|
|
38020
38191
|
},
|
|
38192
|
+
issueSemantics: {
|
|
38193
|
+
anyOf: [
|
|
38194
|
+
{
|
|
38195
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsInput"
|
|
38196
|
+
},
|
|
38197
|
+
{
|
|
38198
|
+
type: "null"
|
|
38199
|
+
}
|
|
38200
|
+
]
|
|
38201
|
+
},
|
|
38021
38202
|
runOn: {
|
|
38022
38203
|
default: {
|
|
38023
38204
|
frequency: "trace"
|
|
@@ -38851,6 +39032,16 @@ var public_openapi_default = {
|
|
|
38851
39032
|
default: true,
|
|
38852
39033
|
type: "boolean"
|
|
38853
39034
|
},
|
|
39035
|
+
issueSemantics: {
|
|
39036
|
+
anyOf: [
|
|
39037
|
+
{
|
|
39038
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsInput"
|
|
39039
|
+
},
|
|
39040
|
+
{
|
|
39041
|
+
type: "null"
|
|
39042
|
+
}
|
|
39043
|
+
]
|
|
39044
|
+
},
|
|
38854
39045
|
runOn: {
|
|
38855
39046
|
default: {
|
|
38856
39047
|
frequency: "trace"
|
|
@@ -39593,6 +39784,16 @@ var public_openapi_default = {
|
|
|
39593
39784
|
isActive: {
|
|
39594
39785
|
type: "boolean"
|
|
39595
39786
|
},
|
|
39787
|
+
issueSemantics: {
|
|
39788
|
+
anyOf: [
|
|
39789
|
+
{
|
|
39790
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
39791
|
+
},
|
|
39792
|
+
{
|
|
39793
|
+
type: "null"
|
|
39794
|
+
}
|
|
39795
|
+
]
|
|
39796
|
+
},
|
|
39596
39797
|
slug: {
|
|
39597
39798
|
type: "string",
|
|
39598
39799
|
minLength: 1,
|
|
@@ -39777,6 +39978,16 @@ var public_openapi_default = {
|
|
|
39777
39978
|
isActive: {
|
|
39778
39979
|
type: "boolean"
|
|
39779
39980
|
},
|
|
39981
|
+
issueSemantics: {
|
|
39982
|
+
anyOf: [
|
|
39983
|
+
{
|
|
39984
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
39985
|
+
},
|
|
39986
|
+
{
|
|
39987
|
+
type: "null"
|
|
39988
|
+
}
|
|
39989
|
+
]
|
|
39990
|
+
},
|
|
39780
39991
|
slug: {
|
|
39781
39992
|
type: "string",
|
|
39782
39993
|
minLength: 1,
|
|
@@ -39990,6 +40201,16 @@ var public_openapi_default = {
|
|
|
39990
40201
|
isActive: {
|
|
39991
40202
|
type: "boolean"
|
|
39992
40203
|
},
|
|
40204
|
+
issueSemantics: {
|
|
40205
|
+
anyOf: [
|
|
40206
|
+
{
|
|
40207
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
40208
|
+
},
|
|
40209
|
+
{
|
|
40210
|
+
type: "null"
|
|
40211
|
+
}
|
|
40212
|
+
]
|
|
40213
|
+
},
|
|
39993
40214
|
slug: {
|
|
39994
40215
|
type: "string",
|
|
39995
40216
|
minLength: 1,
|
|
@@ -40881,6 +41102,16 @@ var public_openapi_default = {
|
|
|
40881
41102
|
isActive: {
|
|
40882
41103
|
type: "boolean"
|
|
40883
41104
|
},
|
|
41105
|
+
issueSemantics: {
|
|
41106
|
+
anyOf: [
|
|
41107
|
+
{
|
|
41108
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
41109
|
+
},
|
|
41110
|
+
{
|
|
41111
|
+
type: "null"
|
|
41112
|
+
}
|
|
41113
|
+
]
|
|
41114
|
+
},
|
|
40884
41115
|
slug: {
|
|
40885
41116
|
type: "string",
|
|
40886
41117
|
minLength: 1,
|
|
@@ -41071,6 +41302,16 @@ var public_openapi_default = {
|
|
|
41071
41302
|
isActive: {
|
|
41072
41303
|
type: "boolean"
|
|
41073
41304
|
},
|
|
41305
|
+
issueSemantics: {
|
|
41306
|
+
anyOf: [
|
|
41307
|
+
{
|
|
41308
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
41309
|
+
},
|
|
41310
|
+
{
|
|
41311
|
+
type: "null"
|
|
41312
|
+
}
|
|
41313
|
+
]
|
|
41314
|
+
},
|
|
41074
41315
|
slug: {
|
|
41075
41316
|
type: "string",
|
|
41076
41317
|
minLength: 1,
|
|
@@ -41292,6 +41533,16 @@ var public_openapi_default = {
|
|
|
41292
41533
|
isActive: {
|
|
41293
41534
|
type: "boolean"
|
|
41294
41535
|
},
|
|
41536
|
+
issueSemantics: {
|
|
41537
|
+
anyOf: [
|
|
41538
|
+
{
|
|
41539
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
41540
|
+
},
|
|
41541
|
+
{
|
|
41542
|
+
type: "null"
|
|
41543
|
+
}
|
|
41544
|
+
]
|
|
41545
|
+
},
|
|
41295
41546
|
slug: {
|
|
41296
41547
|
type: "string",
|
|
41297
41548
|
minLength: 1,
|
|
@@ -41504,6 +41755,16 @@ var public_openapi_default = {
|
|
|
41504
41755
|
isActive: {
|
|
41505
41756
|
type: "boolean"
|
|
41506
41757
|
},
|
|
41758
|
+
issueSemantics: {
|
|
41759
|
+
anyOf: [
|
|
41760
|
+
{
|
|
41761
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
41762
|
+
},
|
|
41763
|
+
{
|
|
41764
|
+
type: "null"
|
|
41765
|
+
}
|
|
41766
|
+
]
|
|
41767
|
+
},
|
|
41507
41768
|
slug: {
|
|
41508
41769
|
type: "string",
|
|
41509
41770
|
minLength: 1,
|
|
@@ -42612,83 +42873,7 @@ var public_openapi_default = {
|
|
|
42612
42873
|
type: "object",
|
|
42613
42874
|
properties: {
|
|
42614
42875
|
data: {
|
|
42615
|
-
|
|
42616
|
-
properties: {
|
|
42617
|
-
createdAt: {
|
|
42618
|
-
type: "string",
|
|
42619
|
-
format: "date-time",
|
|
42620
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
42621
|
-
},
|
|
42622
|
-
displayName: {
|
|
42623
|
-
type: "string",
|
|
42624
|
-
minLength: 1,
|
|
42625
|
-
maxLength: 255
|
|
42626
|
-
},
|
|
42627
|
-
groupId: {
|
|
42628
|
-
type: "string",
|
|
42629
|
-
format: "uuid",
|
|
42630
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
42631
|
-
},
|
|
42632
|
-
groupName: {
|
|
42633
|
-
anyOf: [
|
|
42634
|
-
{
|
|
42635
|
-
type: "string",
|
|
42636
|
-
maxLength: 255
|
|
42637
|
-
},
|
|
42638
|
-
{
|
|
42639
|
-
type: "null"
|
|
42640
|
-
}
|
|
42641
|
-
]
|
|
42642
|
-
},
|
|
42643
|
-
id: {
|
|
42644
|
-
type: "string",
|
|
42645
|
-
format: "uuid",
|
|
42646
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
42647
|
-
},
|
|
42648
|
-
isActive: {
|
|
42649
|
-
type: "boolean"
|
|
42650
|
-
},
|
|
42651
|
-
slug: {
|
|
42652
|
-
type: "string",
|
|
42653
|
-
minLength: 1,
|
|
42654
|
-
maxLength: 100
|
|
42655
|
-
},
|
|
42656
|
-
threshold: {
|
|
42657
|
-
type: "number",
|
|
42658
|
-
minimum: 0,
|
|
42659
|
-
maximum: 1
|
|
42660
|
-
},
|
|
42661
|
-
type: {
|
|
42662
|
-
type: "string",
|
|
42663
|
-
enum: [
|
|
42664
|
-
"classifier",
|
|
42665
|
-
"regex",
|
|
42666
|
-
"conditional",
|
|
42667
|
-
"pii",
|
|
42668
|
-
"custom_trained",
|
|
42669
|
-
"code",
|
|
42670
|
-
"trace_rules"
|
|
42671
|
-
]
|
|
42672
|
-
},
|
|
42673
|
-
updatedAt: {
|
|
42674
|
-
type: "string",
|
|
42675
|
-
format: "date-time",
|
|
42676
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
42677
|
-
}
|
|
42678
|
-
},
|
|
42679
|
-
required: [
|
|
42680
|
-
"createdAt",
|
|
42681
|
-
"displayName",
|
|
42682
|
-
"groupId",
|
|
42683
|
-
"groupName",
|
|
42684
|
-
"id",
|
|
42685
|
-
"isActive",
|
|
42686
|
-
"slug",
|
|
42687
|
-
"threshold",
|
|
42688
|
-
"type",
|
|
42689
|
-
"updatedAt"
|
|
42690
|
-
],
|
|
42691
|
-
additionalProperties: false
|
|
42876
|
+
$ref: "#/components/schemas/PublicDetectionSummary"
|
|
42692
42877
|
},
|
|
42693
42878
|
requestId: {
|
|
42694
42879
|
type: "string",
|
|
@@ -43973,6 +44158,16 @@ var public_openapi_default = {
|
|
|
43973
44158
|
format: "uuid",
|
|
43974
44159
|
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
43975
44160
|
},
|
|
44161
|
+
issueSemantics: {
|
|
44162
|
+
anyOf: [
|
|
44163
|
+
{
|
|
44164
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsInput"
|
|
44165
|
+
},
|
|
44166
|
+
{
|
|
44167
|
+
type: "null"
|
|
44168
|
+
}
|
|
44169
|
+
]
|
|
44170
|
+
},
|
|
43976
44171
|
runOn: {
|
|
43977
44172
|
type: "object",
|
|
43978
44173
|
properties: {
|
|
@@ -45273,83 +45468,7 @@ var public_openapi_default = {
|
|
|
45273
45468
|
type: "object",
|
|
45274
45469
|
properties: {
|
|
45275
45470
|
data: {
|
|
45276
|
-
|
|
45277
|
-
properties: {
|
|
45278
|
-
createdAt: {
|
|
45279
|
-
type: "string",
|
|
45280
|
-
format: "date-time",
|
|
45281
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
45282
|
-
},
|
|
45283
|
-
displayName: {
|
|
45284
|
-
type: "string",
|
|
45285
|
-
minLength: 1,
|
|
45286
|
-
maxLength: 255
|
|
45287
|
-
},
|
|
45288
|
-
groupId: {
|
|
45289
|
-
type: "string",
|
|
45290
|
-
format: "uuid",
|
|
45291
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
45292
|
-
},
|
|
45293
|
-
groupName: {
|
|
45294
|
-
anyOf: [
|
|
45295
|
-
{
|
|
45296
|
-
type: "string",
|
|
45297
|
-
maxLength: 255
|
|
45298
|
-
},
|
|
45299
|
-
{
|
|
45300
|
-
type: "null"
|
|
45301
|
-
}
|
|
45302
|
-
]
|
|
45303
|
-
},
|
|
45304
|
-
id: {
|
|
45305
|
-
type: "string",
|
|
45306
|
-
format: "uuid",
|
|
45307
|
-
pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
45308
|
-
},
|
|
45309
|
-
isActive: {
|
|
45310
|
-
type: "boolean"
|
|
45311
|
-
},
|
|
45312
|
-
slug: {
|
|
45313
|
-
type: "string",
|
|
45314
|
-
minLength: 1,
|
|
45315
|
-
maxLength: 100
|
|
45316
|
-
},
|
|
45317
|
-
threshold: {
|
|
45318
|
-
type: "number",
|
|
45319
|
-
minimum: 0,
|
|
45320
|
-
maximum: 1
|
|
45321
|
-
},
|
|
45322
|
-
type: {
|
|
45323
|
-
type: "string",
|
|
45324
|
-
enum: [
|
|
45325
|
-
"classifier",
|
|
45326
|
-
"regex",
|
|
45327
|
-
"conditional",
|
|
45328
|
-
"pii",
|
|
45329
|
-
"custom_trained",
|
|
45330
|
-
"code",
|
|
45331
|
-
"trace_rules"
|
|
45332
|
-
]
|
|
45333
|
-
},
|
|
45334
|
-
updatedAt: {
|
|
45335
|
-
type: "string",
|
|
45336
|
-
format: "date-time",
|
|
45337
|
-
pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
45338
|
-
}
|
|
45339
|
-
},
|
|
45340
|
-
required: [
|
|
45341
|
-
"createdAt",
|
|
45342
|
-
"displayName",
|
|
45343
|
-
"groupId",
|
|
45344
|
-
"groupName",
|
|
45345
|
-
"id",
|
|
45346
|
-
"isActive",
|
|
45347
|
-
"slug",
|
|
45348
|
-
"threshold",
|
|
45349
|
-
"type",
|
|
45350
|
-
"updatedAt"
|
|
45351
|
-
],
|
|
45352
|
-
additionalProperties: false
|
|
45471
|
+
$ref: "#/components/schemas/PublicDetectionSummary"
|
|
45353
45472
|
},
|
|
45354
45473
|
requestId: {
|
|
45355
45474
|
type: "string",
|
|
@@ -46461,6 +46580,16 @@ var public_openapi_default = {
|
|
|
46461
46580
|
default: true,
|
|
46462
46581
|
type: "boolean"
|
|
46463
46582
|
},
|
|
46583
|
+
issueSemantics: {
|
|
46584
|
+
anyOf: [
|
|
46585
|
+
{
|
|
46586
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
46587
|
+
},
|
|
46588
|
+
{
|
|
46589
|
+
type: "null"
|
|
46590
|
+
}
|
|
46591
|
+
]
|
|
46592
|
+
},
|
|
46464
46593
|
runOn: {
|
|
46465
46594
|
default: {
|
|
46466
46595
|
frequency: "trace"
|
|
@@ -46598,6 +46727,16 @@ var public_openapi_default = {
|
|
|
46598
46727
|
default: true,
|
|
46599
46728
|
type: "boolean"
|
|
46600
46729
|
},
|
|
46730
|
+
issueSemantics: {
|
|
46731
|
+
anyOf: [
|
|
46732
|
+
{
|
|
46733
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
46734
|
+
},
|
|
46735
|
+
{
|
|
46736
|
+
type: "null"
|
|
46737
|
+
}
|
|
46738
|
+
]
|
|
46739
|
+
},
|
|
46601
46740
|
runOn: {
|
|
46602
46741
|
default: {
|
|
46603
46742
|
frequency: "trace"
|
|
@@ -46763,6 +46902,16 @@ var public_openapi_default = {
|
|
|
46763
46902
|
default: true,
|
|
46764
46903
|
type: "boolean"
|
|
46765
46904
|
},
|
|
46905
|
+
issueSemantics: {
|
|
46906
|
+
anyOf: [
|
|
46907
|
+
{
|
|
46908
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
46909
|
+
},
|
|
46910
|
+
{
|
|
46911
|
+
type: "null"
|
|
46912
|
+
}
|
|
46913
|
+
]
|
|
46914
|
+
},
|
|
46766
46915
|
runOn: {
|
|
46767
46916
|
default: {
|
|
46768
46917
|
frequency: "trace"
|
|
@@ -47602,6 +47751,16 @@ var public_openapi_default = {
|
|
|
47602
47751
|
default: true,
|
|
47603
47752
|
type: "boolean"
|
|
47604
47753
|
},
|
|
47754
|
+
issueSemantics: {
|
|
47755
|
+
anyOf: [
|
|
47756
|
+
{
|
|
47757
|
+
$ref: "#/components/schemas/PublicDetectionIssueSemanticsOutput"
|
|
47758
|
+
},
|
|
47759
|
+
{
|
|
47760
|
+
type: "null"
|
|
47761
|
+
}
|
|
47762
|
+
]
|
|
47763
|
+
},
|
|
47605
47764
|
runOn: {
|
|
47606
47765
|
default: {
|
|
47607
47766
|
frequency: "trace"
|
|
@@ -177002,7 +177161,18 @@ var HUMAN_CLI_OAUTH_SCOPES = Object.freeze(
|
|
|
177002
177161
|
)
|
|
177003
177162
|
);
|
|
177004
177163
|
var ALLOWED_SCOPES = new Set(HUMAN_CLI_OAUTH_SCOPES);
|
|
177005
|
-
var DEFAULT_CLI_OAUTH_SCOPES =
|
|
177164
|
+
var DEFAULT_CLI_OAUTH_SCOPES = Object.freeze([
|
|
177165
|
+
"context:read",
|
|
177166
|
+
"organization:read",
|
|
177167
|
+
"billing:read",
|
|
177168
|
+
"profile:read",
|
|
177169
|
+
"observability:read",
|
|
177170
|
+
"evaluation:read",
|
|
177171
|
+
"configuration:read",
|
|
177172
|
+
"sharing:read",
|
|
177173
|
+
"access:read",
|
|
177174
|
+
"offline_access"
|
|
177175
|
+
]);
|
|
177006
177176
|
var deviceAuthorizationSchema = z.object({
|
|
177007
177177
|
device_code: z.string().regex(DEVICE_CODE),
|
|
177008
177178
|
expires_in: z.number().int().min(60).max(1800),
|
|
@@ -177272,7 +177442,10 @@ function browserError(code, exitCode2 = ExitCode.Authentication) {
|
|
|
177272
177442
|
return new CliError({ code, exitCode: exitCode2 });
|
|
177273
177443
|
}
|
|
177274
177444
|
function closeServer(server) {
|
|
177275
|
-
return new Promise((resolve) =>
|
|
177445
|
+
return new Promise((resolve) => {
|
|
177446
|
+
server.close(() => resolve());
|
|
177447
|
+
server.closeAllConnections();
|
|
177448
|
+
});
|
|
177276
177449
|
}
|
|
177277
177450
|
var BrowserOAuthLogin = class {
|
|
177278
177451
|
#fetch;
|
|
@@ -177431,10 +177604,10 @@ import { Command, CommanderError, Option } from "commander";
|
|
|
177431
177604
|
// package.json
|
|
177432
177605
|
var package_default = {
|
|
177433
177606
|
name: "neatlogs-cli",
|
|
177434
|
-
version: "0.1.0
|
|
177607
|
+
version: "0.1.0",
|
|
177435
177608
|
description: "Non-interactive CLI for the NeatLogs public API",
|
|
177436
177609
|
homepage: "https://github.com/neatlogs/neatlogs-app#readme",
|
|
177437
|
-
license: "
|
|
177610
|
+
license: "MIT",
|
|
177438
177611
|
repository: {
|
|
177439
177612
|
type: "git",
|
|
177440
177613
|
url: "git+https://github.com/neatlogs/neatlogs-app.git",
|
|
@@ -177448,6 +177621,7 @@ var package_default = {
|
|
|
177448
177621
|
"README.md",
|
|
177449
177622
|
"SECURITY.md",
|
|
177450
177623
|
"CHANGELOG.md",
|
|
177624
|
+
"LICENSE",
|
|
177451
177625
|
"docs"
|
|
177452
177626
|
],
|
|
177453
177627
|
type: "module",
|
|
@@ -177919,6 +178093,8 @@ function isJsonLineWithinByteBudget(value, maximumBytes) {
|
|
|
177919
178093
|
|
|
177920
178094
|
// src/handler-builder.ts
|
|
177921
178095
|
var PUBLIC_RESPONSE_COMPONENT_NAMES = [
|
|
178096
|
+
"PublicDetectionIssueSemanticsOutput",
|
|
178097
|
+
"PublicDetectionSummary",
|
|
177922
178098
|
"PublicSavedFilter",
|
|
177923
178099
|
"PublicSavedFilterEnvelope",
|
|
177924
178100
|
"PublicSavedFilterGroup1",
|
|
@@ -183639,9 +183815,15 @@ function isOpaqueId(value, maxLength = 255) {
|
|
|
183639
183815
|
|
|
183640
183816
|
// src/commands/shared.ts
|
|
183641
183817
|
var automaticallyGeneratedMutationKeys = /* @__PURE__ */ new Set();
|
|
183642
|
-
function invalidArguments() {
|
|
183818
|
+
function invalidArguments(error, field) {
|
|
183643
183819
|
throw new CliError({
|
|
183644
183820
|
code: "INVALID_ARGUMENTS",
|
|
183821
|
+
detail: "Check the listed fields and run this command with --help for usage.",
|
|
183822
|
+
errors: error?.issues.slice(0, 20).map((issue) => ({
|
|
183823
|
+
code: issue.code,
|
|
183824
|
+
message: "Invalid value; see command help for the expected format and bounds.",
|
|
183825
|
+
path: [...field ? [field] : [], ...issue.path].map(String).join(".")
|
|
183826
|
+
})),
|
|
183645
183827
|
exitCode: ExitCode.Usage
|
|
183646
183828
|
});
|
|
183647
183829
|
}
|
|
@@ -183661,7 +183843,7 @@ function exactUuidConfirmation(confirmation, target) {
|
|
|
183661
183843
|
}
|
|
183662
183844
|
function uuid3(value) {
|
|
183663
183845
|
const parsed = z20.string().uuid().transform((id) => id.toLowerCase()).safeParse(value);
|
|
183664
|
-
if (!parsed.success) invalidArguments();
|
|
183846
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183665
183847
|
return parsed.data;
|
|
183666
183848
|
}
|
|
183667
183849
|
function mutationKey(value) {
|
|
@@ -183677,12 +183859,12 @@ function postgresUuid(value) {
|
|
|
183677
183859
|
const parsed = z20.string().regex(
|
|
183678
183860
|
/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/
|
|
183679
183861
|
).transform((id) => id.toLowerCase()).safeParse(value);
|
|
183680
|
-
if (!parsed.success) invalidArguments();
|
|
183862
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183681
183863
|
return parsed.data;
|
|
183682
183864
|
}
|
|
183683
183865
|
function opaqueId(value, maxLength = 255) {
|
|
183684
183866
|
const parsed = z20.string().refine((candidate) => isOpaqueId(candidate, maxLength)).safeParse(value);
|
|
183685
|
-
if (!parsed.success) invalidArguments();
|
|
183867
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183686
183868
|
return parsed.data;
|
|
183687
183869
|
}
|
|
183688
183870
|
|
|
@@ -183709,7 +183891,7 @@ function registerAccountCommands(program, executeOnline, readJsonBody) {
|
|
|
183709
183891
|
profile.command("update").option("--name <name>", "public display name").option("--bio <bio>", "public biography").option("--clear-bio", "clear the public biography").option("--timezone <iana>", "IANA timezone").option("--clear-timezone", "clear the timezone").option("--language <language>", "language code").action(
|
|
183710
183892
|
async (options) => {
|
|
183711
183893
|
const parsed = profileUpdateOptionsSchema.safeParse(options);
|
|
183712
|
-
if (!parsed.success) invalidArguments();
|
|
183894
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183713
183895
|
const body = {};
|
|
183714
183896
|
if (parsed.data.name !== void 0) body.name = parsed.data.name;
|
|
183715
183897
|
if (parsed.data.bio !== void 0) body.bio = parsed.data.bio;
|
|
@@ -183793,7 +183975,7 @@ function registerAlertCommands(program, executeOnline, readJsonBody = async () =
|
|
|
183793
183975
|
alerts.command("test").description("dry-run or deliver a bounded alert test").argument("<alert-rule-id>").requiredOption("--mode <mode>", "dry-run or deliver").option("--idempotency-key <key>", "stable UUID for retrying this mutation").action(
|
|
183794
183976
|
async (alertRuleId, options) => {
|
|
183795
183977
|
const mode = testModeSchema.safeParse(options.mode);
|
|
183796
|
-
if (!mode.success) invalidArguments();
|
|
183978
|
+
if (!mode.success) invalidArguments(mode.error);
|
|
183797
183979
|
await executeOnline(testAlertRuleHandler, "curated", {
|
|
183798
183980
|
body: { mode: mode.data === "dry-run" ? "dry_run" : "deliver" },
|
|
183799
183981
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -183850,7 +184032,7 @@ function registerAlertCommands(program, executeOnline, readJsonBody = async () =
|
|
|
183850
184032
|
alerts.command("changes").description("list privacy-safe alert rule changes").argument("<alert-rule-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
183851
184033
|
async (alertRuleId, options) => {
|
|
183852
184034
|
const parsed = changesOptionsSchema.safeParse(options);
|
|
183853
|
-
if (!parsed.success) invalidArguments();
|
|
184035
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183854
184036
|
const query = {};
|
|
183855
184037
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
183856
184038
|
if (parsed.data.limit !== void 0) {
|
|
@@ -183865,7 +184047,7 @@ function registerAlertCommands(program, executeOnline, readJsonBody = async () =
|
|
|
183865
184047
|
alerts.command("history").description("list alert fire history").option("--alert-rule-id <uuid>", "filter by alert rule").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--end-time <timestamp>", "inclusive ISO-8601 end time").option("--limit <number>", "page size (1-100)").option("--start-time <timestamp>", "inclusive ISO-8601 start time").action(
|
|
183866
184048
|
async (options) => {
|
|
183867
184049
|
const parsed = historyOptionsSchema.safeParse(options);
|
|
183868
|
-
if (!parsed.success) invalidArguments();
|
|
184050
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183869
184051
|
const query = {};
|
|
183870
184052
|
if (parsed.data.alertRuleId)
|
|
183871
184053
|
query.alertRuleId = parsed.data.alertRuleId;
|
|
@@ -183880,7 +184062,7 @@ function registerAlertCommands(program, executeOnline, readJsonBody = async () =
|
|
|
183880
184062
|
alerts.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--enabled <state>", "all, true, or false").option("--limit <number>", "page size (1-100)").option("--rule-type <type>", "alert rule type").action(
|
|
183881
184063
|
async (options) => {
|
|
183882
184064
|
const parsed = listOptionsSchema.safeParse(options);
|
|
183883
|
-
if (!parsed.success) invalidArguments();
|
|
184065
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183884
184066
|
const query = {};
|
|
183885
184067
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
183886
184068
|
if (parsed.data.enabled) query.enabled = parsed.data.enabled;
|
|
@@ -183954,7 +184136,7 @@ var savedViewFields = [
|
|
|
183954
184136
|
];
|
|
183955
184137
|
function parseSavedView(body) {
|
|
183956
184138
|
const parsed = savedViewBody.safeParse(boundedBody(body));
|
|
183957
|
-
if (!parsed.success) invalidArguments();
|
|
184139
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183958
184140
|
return {
|
|
183959
184141
|
filters: savedViewFields.flatMap(([sourceField, field, id]) => {
|
|
183960
184142
|
const values = parsed.data.filters[sourceField];
|
|
@@ -183972,7 +184154,7 @@ function parseBase(options) {
|
|
|
183972
184154
|
to: options.to,
|
|
183973
184155
|
workflow: options.workflow
|
|
183974
184156
|
});
|
|
183975
|
-
if (!parsed.success) invalidArguments();
|
|
184157
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
183976
184158
|
const filters = {
|
|
183977
184159
|
...parsed.data.detection ? { detections: parsed.data.detection } : {},
|
|
183978
184160
|
...parsed.data.session ? { sessionIds: parsed.data.session } : {},
|
|
@@ -183991,7 +184173,7 @@ function boundedBody(body) {
|
|
|
183991
184173
|
return body;
|
|
183992
184174
|
}
|
|
183993
184175
|
function scopeOptions(command) {
|
|
183994
|
-
return command.requiredOption("--from <timestamp>", "inclusive RFC 3339 start").requiredOption("--to <timestamp>", "exclusive RFC 3339 end").option("--workflow <names>", "comma-separated workflow names").option("--session <ids>", "comma-separated session IDs").option("--status <values>", "comma-separated OK,ERROR values").option("--detection <names>", "comma-separated detection names");
|
|
184176
|
+
return command.requiredOption("--from <timestamp>", "inclusive RFC 3339 start (required)").requiredOption("--to <timestamp>", "exclusive RFC 3339 end (required)").option("--workflow <names>", "comma-separated workflow names").option("--session <ids>", "comma-separated session IDs").option("--status <values>", "comma-separated OK,ERROR values").option("--detection <names>", "comma-separated detection names");
|
|
183995
184177
|
}
|
|
183996
184178
|
function registerAnalyticsCommands(program, executeOnline, readJsonBody, readExportRequest) {
|
|
183997
184179
|
const analytics = program.command("analytics").description("bounded trace analytics");
|
|
@@ -184002,7 +184184,7 @@ function registerAnalyticsCommands(program, executeOnline, readJsonBody, readExp
|
|
|
184002
184184
|
const parsed = analyticsExportRequestSchema.safeParse(
|
|
184003
184185
|
await readExportRequest()
|
|
184004
184186
|
);
|
|
184005
|
-
if (!parsed.success) invalidArguments();
|
|
184187
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184006
184188
|
await executeOnline(exportAnalyticsHandler, "curated", {
|
|
184007
184189
|
body: parsed.data
|
|
184008
184190
|
});
|
|
@@ -184048,8 +184230,9 @@ function registerAnalyticsCommands(program, executeOnline, readJsonBody, readExp
|
|
|
184048
184230
|
async (options) => {
|
|
184049
184231
|
const field = z23.enum(["workflowName", "detections", "sessionId", "status"]).safeParse(options.field);
|
|
184050
184232
|
const limit2 = z23.coerce.number().int().min(1).max(50).safeParse(options.limit);
|
|
184051
|
-
if (!
|
|
184052
|
-
|
|
184233
|
+
if (!field.success) invalidArguments(field.error, "field");
|
|
184234
|
+
if (!limit2.success) invalidArguments(limit2.error, "limit");
|
|
184235
|
+
if ((options.search?.length ?? 0) > 100) invalidArguments();
|
|
184053
184236
|
const body = boundedBody({
|
|
184054
184237
|
...parseBase(options),
|
|
184055
184238
|
fields: [field.data],
|
|
@@ -184064,7 +184247,7 @@ function registerAnalyticsCommands(program, executeOnline, readJsonBody, readExp
|
|
|
184064
184247
|
scopeOptions(analytics.command("chart")).requiredOption("--granularity <value>", "minute_5, hour, or day").option("--timezone <iana>", "IANA timezone", "UTC").action(
|
|
184065
184248
|
async (options) => {
|
|
184066
184249
|
const granularity = z23.enum(["minute_5", "hour", "day"]).safeParse(options.granularity);
|
|
184067
|
-
if (!granularity.success) invalidArguments();
|
|
184250
|
+
if (!granularity.success) invalidArguments(granularity.error);
|
|
184068
184251
|
const body = boundedBody({
|
|
184069
184252
|
...parseBase(options),
|
|
184070
184253
|
granularity: granularity.data,
|
|
@@ -184254,7 +184437,7 @@ function registerBillingCommands(program, executeOnline) {
|
|
|
184254
184437
|
).option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
184255
184438
|
async (organizationId, options) => {
|
|
184256
184439
|
const parsed = alertOptionsSchema.safeParse(options);
|
|
184257
|
-
if (!parsed.success) invalidArguments();
|
|
184440
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184258
184441
|
const query = {};
|
|
184259
184442
|
if (parsed.data.state) query.state = parsed.data.state;
|
|
184260
184443
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
@@ -184326,7 +184509,7 @@ function registerCommentCommands(program, executeOnline, readContent = async ()
|
|
|
184326
184509
|
);
|
|
184327
184510
|
comments.command("list").requiredOption("--trace <trace-id>", "opaque trace ID").option("--resolved <boolean>", "true or false").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").action(async (options) => {
|
|
184328
184511
|
const parsed = listOptionsSchema2.safeParse(options);
|
|
184329
|
-
if (!parsed.success) invalidArguments();
|
|
184512
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184330
184513
|
await executeOnline(listCommentThreadsHandler, "curated", {
|
|
184331
184514
|
pathParameters: { traceId: opaqueId(parsed.data.trace) },
|
|
184332
184515
|
query: {
|
|
@@ -184338,7 +184521,7 @@ function registerCommentCommands(program, executeOnline, readContent = async ()
|
|
|
184338
184521
|
});
|
|
184339
184522
|
comments.command("get").argument("<thread-id>").requiredOption("--trace <trace-id>", "opaque trace ID").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "message page size (1-50)").action(async (threadId, options) => {
|
|
184340
184523
|
const parsed = getOptionsSchema.safeParse(options);
|
|
184341
|
-
if (!parsed.success) invalidArguments();
|
|
184524
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184342
184525
|
await executeOnline(getCommentThreadHandler, "curated", {
|
|
184343
184526
|
pathParameters: {
|
|
184344
184527
|
threadId: uuid3(threadId),
|
|
@@ -184605,7 +184788,7 @@ var migrationReplacementOptions = lifecycleOptions.extend({
|
|
|
184605
184788
|
function addListCommand(command, handler2, executeOnline) {
|
|
184606
184789
|
command.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").action(async (options) => {
|
|
184607
184790
|
const parsed = listOptions.safeParse(options);
|
|
184608
|
-
if (!parsed.success) invalidArguments();
|
|
184791
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184609
184792
|
const query = {};
|
|
184610
184793
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
184611
184794
|
if (parsed.data.limit !== void 0) {
|
|
@@ -184650,8 +184833,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184650
184833
|
).option("--idempotency-key <key>", "stable UUID for retrying issuance").action(async (migrationId, options) => {
|
|
184651
184834
|
const id = uuid3(migrationId);
|
|
184652
184835
|
const parsed = migrationReplacementOptions.safeParse(options);
|
|
184653
|
-
if (!parsed.success
|
|
184654
|
-
|
|
184836
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184837
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184655
184838
|
const idempotencyKey = mutationKey(parsed.data.idempotencyKey);
|
|
184656
184839
|
const replayKey = randomBytes(32).toString("base64url");
|
|
184657
184840
|
const response = await executeOnline(
|
|
@@ -184681,8 +184864,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184681
184864
|
migrations.command(name).argument("<migration-id>").requiredOption("--confirm <migration-id>", "repeat the migration UUID").option("--idempotency-key <key>", "stable UUID for retrying the action").action(async (migrationId, options) => {
|
|
184682
184865
|
const id = uuid3(migrationId);
|
|
184683
184866
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184684
|
-
if (!parsed.success
|
|
184685
|
-
|
|
184867
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184868
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184686
184869
|
await executeOnline(handler2, "curated", {
|
|
184687
184870
|
body: { confirmation: id },
|
|
184688
184871
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -184701,7 +184884,7 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184701
184884
|
).option("--idempotency-key <key>", "stable UUID for retrying the action").action(async (migrationId, options) => {
|
|
184702
184885
|
const id = uuid3(migrationId);
|
|
184703
184886
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184704
|
-
if (!parsed.success) invalidArguments();
|
|
184887
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184705
184888
|
await executeOnline(revokeCredentialMigrationSourceHandler, "curated", {
|
|
184706
184889
|
body: { confirmation: uuid3(parsed.data.confirm) },
|
|
184707
184890
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -184720,7 +184903,7 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184720
184903
|
[]
|
|
184721
184904
|
).option("--expires-in-days <days>").option("--rate-limit <per-minute>").option("--idempotency-key <key>").action(async (options) => {
|
|
184722
184905
|
const parsed = createApiKeyOptions.safeParse(options);
|
|
184723
|
-
if (!parsed.success) invalidArguments();
|
|
184906
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184724
184907
|
const idempotencyKey = mutationKey(parsed.data.idempotencyKey);
|
|
184725
184908
|
const replayKey = randomBytes(32).toString("base64url");
|
|
184726
184909
|
const response = await executeOnline(createApiKeyHandler, "none", {
|
|
@@ -184752,8 +184935,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184752
184935
|
apiKeys.command("rotate").argument("<credential-id>").requiredOption("--confirm <credential-id>").option("--idempotency-key <key>").action(async (credentialId, options) => {
|
|
184753
184936
|
const id = uuid3(credentialId);
|
|
184754
184937
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184755
|
-
if (!parsed.success
|
|
184756
|
-
|
|
184938
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184939
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184757
184940
|
const idempotencyKey = mutationKey(parsed.data.idempotencyKey);
|
|
184758
184941
|
const replayKey = randomBytes(32).toString("base64url");
|
|
184759
184942
|
const response = await executeOnline(rotateApiKeyHandler, "none", {
|
|
@@ -184778,8 +184961,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184778
184961
|
apiKeys.command("revoke").argument("<credential-id>").requiredOption("--confirm <credential-id>").option("--idempotency-key <key>").action(async (credentialId, options) => {
|
|
184779
184962
|
const id = uuid3(credentialId);
|
|
184780
184963
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184781
|
-
if (!parsed.success
|
|
184782
|
-
|
|
184964
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184965
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184783
184966
|
await executeOnline(revokeApiKeyHandler, "curated", {
|
|
184784
184967
|
body: { confirmation: id },
|
|
184785
184968
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -184790,7 +184973,7 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184790
184973
|
addListCommand(ingest, listIngestCredentialsHandler, executeOnline);
|
|
184791
184974
|
ingest.command("create").requiredOption("--name <name>").option("--expires-in-days <days>").option("--idempotency-key <key>").action(async (options) => {
|
|
184792
184975
|
const parsed = createIngestOptions.safeParse(options);
|
|
184793
|
-
if (!parsed.success) invalidArguments();
|
|
184976
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184794
184977
|
const idempotencyKey = mutationKey(parsed.data.idempotencyKey);
|
|
184795
184978
|
const replayKey = randomBytes(32).toString("base64url");
|
|
184796
184979
|
const response = await executeOnline(
|
|
@@ -184822,8 +185005,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184822
185005
|
ingest.command("rotate").argument("<credential-id>").requiredOption("--confirm <credential-id>").option("--idempotency-key <key>").action(async (credentialId, options) => {
|
|
184823
185006
|
const id = uuid3(credentialId);
|
|
184824
185007
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184825
|
-
if (!parsed.success
|
|
184826
|
-
|
|
185008
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185009
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184827
185010
|
const idempotencyKey = mutationKey(parsed.data.idempotencyKey);
|
|
184828
185011
|
const replayKey = randomBytes(32).toString("base64url");
|
|
184829
185012
|
const response = await executeOnline(
|
|
@@ -184852,8 +185035,8 @@ function registerCredentialCommands(program, executeOnline, renderSecret, resolv
|
|
|
184852
185035
|
ingest.command("revoke").argument("<credential-id>").requiredOption("--confirm <credential-id>").option("--idempotency-key <key>").action(async (credentialId, options) => {
|
|
184853
185036
|
const id = uuid3(credentialId);
|
|
184854
185037
|
const parsed = lifecycleOptions.safeParse(options);
|
|
184855
|
-
if (!parsed.success
|
|
184856
|
-
|
|
185038
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185039
|
+
if (uuid3(parsed.data.confirm) !== id) invalidArguments();
|
|
184857
185040
|
await executeOnline(revokeIngestCredentialHandler, "curated", {
|
|
184858
185041
|
body: { confirmation: id },
|
|
184859
185042
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -184891,13 +185074,15 @@ var jsonObjectSchema = z29.record(z29.string(), z29.unknown());
|
|
|
184891
185074
|
var batchFieldsSchema = z29.array(z29.string().min(1).max(1024)).max(128);
|
|
184892
185075
|
function jsonValue(value, schema, maxBytes) {
|
|
184893
185076
|
if (Buffer.byteLength(value, "utf8") > maxBytes) invalidArguments();
|
|
185077
|
+
let decoded;
|
|
184894
185078
|
try {
|
|
184895
|
-
|
|
184896
|
-
if (!parsed.success) invalidArguments();
|
|
184897
|
-
return parsed.data;
|
|
185079
|
+
decoded = JSON.parse(value);
|
|
184898
185080
|
} catch {
|
|
184899
185081
|
invalidArguments();
|
|
184900
185082
|
}
|
|
185083
|
+
const parsed = schema.safeParse(decoded);
|
|
185084
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185085
|
+
return parsed.data;
|
|
184901
185086
|
}
|
|
184902
185087
|
function registerDetectionCommands(program, executeOnline, readPreviewRequest, readComputeRequest) {
|
|
184903
185088
|
const detections = program.command("detections").description("detection catalog commands");
|
|
@@ -184908,7 +185093,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
184908
185093
|
const parsed = detectionPreviewRequestSchema.safeParse(
|
|
184909
185094
|
await readPreviewRequest()
|
|
184910
185095
|
);
|
|
184911
|
-
if (!parsed.success) invalidArguments();
|
|
185096
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184912
185097
|
await executeOnline(previewDetectionHandler, "curated", {
|
|
184913
185098
|
body: parsed.data
|
|
184914
185099
|
});
|
|
@@ -184920,7 +185105,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
184920
185105
|
const parsed = detectionGenerateRequestSchema.safeParse(
|
|
184921
185106
|
await readComputeRequest()
|
|
184922
185107
|
);
|
|
184923
|
-
if (!parsed.success) invalidArguments();
|
|
185108
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184924
185109
|
await executeOnline(generateDetectionHandler, "curated", {
|
|
184925
185110
|
body: parsed.data
|
|
184926
185111
|
});
|
|
@@ -184932,7 +185117,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
184932
185117
|
const parsed = detectionSuggestionRunRequestSchema.safeParse(
|
|
184933
185118
|
await readComputeRequest()
|
|
184934
185119
|
);
|
|
184935
|
-
if (!parsed.success) invalidArguments();
|
|
185120
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184936
185121
|
await executeOnline(createDetectionSuggestionRunHandler, "curated", {
|
|
184937
185122
|
body: parsed.data,
|
|
184938
185123
|
idempotencyKey: mutationKey(options.idempotencyKey)
|
|
@@ -184959,7 +185144,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
184959
185144
|
cursor: z29.string().min(1).max(1024).optional(),
|
|
184960
185145
|
limit: z29.coerce.number().int().min(1).max(50).optional()
|
|
184961
185146
|
}).strict().safeParse(options);
|
|
184962
|
-
if (!parsed.success) invalidArguments();
|
|
185147
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184963
185148
|
const query = {};
|
|
184964
185149
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
184965
185150
|
if (parsed.data.limit !== void 0)
|
|
@@ -184990,7 +185175,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
184990
185175
|
detections.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--group <uuid>", "filter by detection group UUID").option("--limit <number>", "page size (1-100)").option("--status <status>", "active, paused, disabled, inactive, or all").action(
|
|
184991
185176
|
async (options) => {
|
|
184992
185177
|
const parsed = detectionListOptionsSchema.safeParse(options);
|
|
184993
|
-
if (!parsed.success) invalidArguments();
|
|
185178
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
184994
185179
|
const query = {};
|
|
184995
185180
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
184996
185181
|
if (parsed.data.group) query.groupId = parsed.data.group;
|
|
@@ -185010,8 +185195,9 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185010
185195
|
const type = detectionTypeSchema.safeParse(options.type);
|
|
185011
185196
|
const name = z29.string().trim().min(1).max(255).safeParse(options.name);
|
|
185012
185197
|
const threshold = z29.coerce.number().min(0).max(1).optional().safeParse(options.threshold);
|
|
185013
|
-
if (!
|
|
185014
|
-
|
|
185198
|
+
if (!type.success) invalidArguments(type.error, "type");
|
|
185199
|
+
if (!name.success) invalidArguments(name.error, "name");
|
|
185200
|
+
if (!threshold.success) invalidArguments(threshold.error, "threshold");
|
|
185015
185201
|
const body = {
|
|
185016
185202
|
config: jsonValue(options.config, jsonObjectSchema, 512 * 1024),
|
|
185017
185203
|
displayName: name.data,
|
|
@@ -185048,7 +185234,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185048
185234
|
if (options.group !== void 0) body.groupId = uuid3(options.group);
|
|
185049
185235
|
if (options.name !== void 0) {
|
|
185050
185236
|
const name = z29.string().trim().min(1).max(255).safeParse(options.name);
|
|
185051
|
-
if (!name.success) invalidArguments();
|
|
185237
|
+
if (!name.success) invalidArguments(name.error);
|
|
185052
185238
|
body.displayName = name.data;
|
|
185053
185239
|
}
|
|
185054
185240
|
if (options.clearDescription) body.description = null;
|
|
@@ -185056,7 +185242,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185056
185242
|
body.description = options.description;
|
|
185057
185243
|
if (options.threshold !== void 0) {
|
|
185058
185244
|
const threshold = z29.coerce.number().min(0).max(1).safeParse(options.threshold);
|
|
185059
|
-
if (!threshold.success) invalidArguments();
|
|
185245
|
+
if (!threshold.success) invalidArguments(threshold.error);
|
|
185060
185246
|
body.threshold = threshold.data;
|
|
185061
185247
|
}
|
|
185062
185248
|
if (options.config !== void 0) {
|
|
@@ -185112,7 +185298,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185112
185298
|
detections.command("history").argument("<detection-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185113
185299
|
async (detectionId, options) => {
|
|
185114
185300
|
const parsed = detectionHitOptionsSchema.safeParse(options);
|
|
185115
|
-
if (!parsed.success) invalidArguments();
|
|
185301
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185116
185302
|
const query = {};
|
|
185117
185303
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185118
185304
|
if (parsed.data.limit !== void 0) {
|
|
@@ -185127,7 +185313,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185127
185313
|
detections.command("hits").argument("<detection-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185128
185314
|
async (detectionId, options) => {
|
|
185129
185315
|
const parsed = detectionHitOptionsSchema.safeParse(options);
|
|
185130
|
-
if (!parsed.success) invalidArguments();
|
|
185316
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185131
185317
|
const query = {};
|
|
185132
185318
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185133
185319
|
if (parsed.data.limit !== void 0) {
|
|
@@ -185142,7 +185328,7 @@ function registerDetectionCommands(program, executeOnline, readPreviewRequest, r
|
|
|
185142
185328
|
detections.command("trends").argument("<detection-id>").requiredOption("--from <timestamp>", "inclusive UTC start timestamp").requiredOption("--to <timestamp>", "exclusive UTC end timestamp").option("--granularity <value>", "hour, day, or week", "day").action(
|
|
185143
185329
|
async (detectionId, options) => {
|
|
185144
185330
|
const parsed = detectionTrendOptionsSchema.safeParse(options);
|
|
185145
|
-
if (!parsed.success) invalidArguments();
|
|
185331
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185146
185332
|
await executeOnline(getDetectionTrendsHandler, "curated", {
|
|
185147
185333
|
pathParameters: { detectionId: uuid3(detectionId) },
|
|
185148
185334
|
query: parsed.data
|
|
@@ -185275,7 +185461,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185275
185461
|
).action(
|
|
185276
185462
|
async (evaluationId, options) => {
|
|
185277
185463
|
const parsed = evaluationExportOptionsSchema.safeParse(options);
|
|
185278
|
-
if (!parsed.success) invalidArguments();
|
|
185464
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185279
185465
|
const query = {
|
|
185280
185466
|
from: parsed.data.from,
|
|
185281
185467
|
to: parsed.data.to
|
|
@@ -185308,7 +185494,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185308
185494
|
limit: z30.coerce.number().int().min(1).max(100).optional(),
|
|
185309
185495
|
status: z30.enum(["draft", "active", "completed", "archived", "all"]).optional()
|
|
185310
185496
|
}).strict().safeParse(options);
|
|
185311
|
-
if (!parsed.success) invalidArguments();
|
|
185497
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185312
185498
|
const query = {};
|
|
185313
185499
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185314
185500
|
if (parsed.data.limit !== void 0)
|
|
@@ -185335,7 +185521,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185335
185521
|
const batchSchedule = publicEvaluationDurationSchema.safeParse(
|
|
185336
185522
|
options.batchSchedule
|
|
185337
185523
|
);
|
|
185338
|
-
if (!batchSchedule.success) invalidArguments();
|
|
185524
|
+
if (!batchSchedule.success) invalidArguments(batchSchedule.error);
|
|
185339
185525
|
await executeOnline(updateEvaluationHandler, "curated", {
|
|
185340
185526
|
body: { batchSchedule: batchSchedule.data },
|
|
185341
185527
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -185346,7 +185532,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185346
185532
|
batches.command("list").argument("<evaluation-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185347
185533
|
async (evaluationId, options) => {
|
|
185348
185534
|
const parsed = evaluationItemListOptionsSchema.safeParse(options);
|
|
185349
|
-
if (!parsed.success) invalidArguments();
|
|
185535
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185350
185536
|
const query = {};
|
|
185351
185537
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185352
185538
|
if (parsed.data.limit !== void 0)
|
|
@@ -185384,7 +185570,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185384
185570
|
).action(
|
|
185385
185571
|
async (evaluationId, batchId, options) => {
|
|
185386
185572
|
const parsed = evaluationBatchReportExportOptionsSchema.safeParse(options);
|
|
185387
|
-
if (!parsed.success) invalidArguments();
|
|
185573
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185388
185574
|
const request = {
|
|
185389
185575
|
pathParameters: {
|
|
185390
185576
|
batchId: uuid3(batchId),
|
|
@@ -185410,7 +185596,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185410
185596
|
batches.command("cube").argument("<evaluation-id>").argument("<batch-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185411
185597
|
async (evaluationId, batchId, options) => {
|
|
185412
185598
|
const parsed = evaluationItemListOptionsSchema.safeParse(options);
|
|
185413
|
-
if (!parsed.success) invalidArguments();
|
|
185599
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185414
185600
|
const query = {};
|
|
185415
185601
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185416
185602
|
if (parsed.data.limit !== void 0)
|
|
@@ -185442,7 +185628,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185442
185628
|
maxAssignments: options.maxAssignments,
|
|
185443
185629
|
maxItems: options.maxItems
|
|
185444
185630
|
});
|
|
185445
|
-
if (!body.success) invalidArguments();
|
|
185631
|
+
if (!body.success) invalidArguments(body.error);
|
|
185446
185632
|
await executeOnline(dispatchEvaluationBatchHandler, "curated", {
|
|
185447
185633
|
body: body.data,
|
|
185448
185634
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -185473,7 +185659,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185473
185659
|
evaluations.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").option("--status <status>", "draft, active, completed, archived, or all").action(
|
|
185474
185660
|
async (options) => {
|
|
185475
185661
|
const parsed = evaluationListOptionsSchema.safeParse(options);
|
|
185476
|
-
if (!parsed.success) invalidArguments();
|
|
185662
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185477
185663
|
const query = {};
|
|
185478
185664
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185479
185665
|
if (parsed.data.limit !== void 0)
|
|
@@ -185484,14 +185670,14 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185484
185670
|
);
|
|
185485
185671
|
evaluations.command("stats").option("--period <period>", "24h, 7d, 30d, 90d, or all").action(async (options) => {
|
|
185486
185672
|
const parsed = evaluationStatsOptionsSchema.safeParse(options);
|
|
185487
|
-
if (!parsed.success) invalidArguments();
|
|
185673
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185488
185674
|
const query = {};
|
|
185489
185675
|
if (parsed.data.period) query.period = parsed.data.period;
|
|
185490
185676
|
await executeOnline(getEvaluationStatsHandler, "curated", { query });
|
|
185491
185677
|
});
|
|
185492
185678
|
evaluations.command("cohorts").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(async (options) => {
|
|
185493
185679
|
const parsed = evaluationItemListOptionsSchema.safeParse(options);
|
|
185494
|
-
if (!parsed.success) invalidArguments();
|
|
185680
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185495
185681
|
const query = {};
|
|
185496
185682
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185497
185683
|
if (parsed.data.limit !== void 0)
|
|
@@ -185501,7 +185687,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185501
185687
|
evaluations.command("responses").argument("<evaluation-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185502
185688
|
async (evaluationId, options) => {
|
|
185503
185689
|
const parsed = evaluationItemListOptionsSchema.safeParse(options);
|
|
185504
|
-
if (!parsed.success) invalidArguments();
|
|
185690
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185505
185691
|
const query = {};
|
|
185506
185692
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185507
185693
|
if (parsed.data.limit !== void 0)
|
|
@@ -185545,7 +185731,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185545
185731
|
assignMe: options.assignMe,
|
|
185546
185732
|
reviewDuration: options.reviewDuration
|
|
185547
185733
|
});
|
|
185548
|
-
if (!parsed.success) invalidArguments();
|
|
185734
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185549
185735
|
await executeOnline(launchEvaluationHandler, "curated", {
|
|
185550
185736
|
body: parsed.data,
|
|
185551
185737
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -185632,7 +185818,7 @@ function registerEvaluationCommands(program, executeOnline, readJsonBody) {
|
|
|
185632
185818
|
items.command("list").argument("<evaluation-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185633
185819
|
async (evaluationId, options) => {
|
|
185634
185820
|
const parsed = evaluationItemListOptionsSchema.safeParse(options);
|
|
185635
|
-
if (!parsed.success) invalidArguments();
|
|
185821
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185636
185822
|
const query = {};
|
|
185637
185823
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185638
185824
|
if (parsed.data.limit !== void 0)
|
|
@@ -185727,7 +185913,7 @@ function registerEvaluatorCommands(program, executeOnline, readJsonBody, readRun
|
|
|
185727
185913
|
const parsed = evaluatorRunRequestSchema.safeParse(
|
|
185728
185914
|
await readRunRequest()
|
|
185729
185915
|
);
|
|
185730
|
-
if (!parsed.success) invalidArguments();
|
|
185916
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185731
185917
|
await executeOnline(createEvaluatorRunHandler, "curated", {
|
|
185732
185918
|
body: parsed.data,
|
|
185733
185919
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -185767,7 +185953,7 @@ function registerEvaluatorCommands(program, executeOnline, readJsonBody, readRun
|
|
|
185767
185953
|
const parsed = evaluatorPreviewRequestSchema.safeParse(
|
|
185768
185954
|
await readComputeRequest()
|
|
185769
185955
|
);
|
|
185770
|
-
if (!parsed.success) invalidArguments();
|
|
185956
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185771
185957
|
await executeOnline(previewEvaluatorHandler, "curated", {
|
|
185772
185958
|
body: parsed.data
|
|
185773
185959
|
});
|
|
@@ -185779,7 +185965,7 @@ function registerEvaluatorCommands(program, executeOnline, readJsonBody, readRun
|
|
|
185779
185965
|
const parsed = evaluatorPlaygroundRequestSchema.safeParse(
|
|
185780
185966
|
await readComputeRequest()
|
|
185781
185967
|
);
|
|
185782
|
-
if (!parsed.success) invalidArguments();
|
|
185968
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185783
185969
|
await executeOnline(playgroundEvaluatorHandler, "curated", {
|
|
185784
185970
|
body: parsed.data,
|
|
185785
185971
|
pathParameters: { evaluatorId: uuid3(evaluatorId) }
|
|
@@ -185788,7 +185974,7 @@ function registerEvaluatorCommands(program, executeOnline, readJsonBody, readRun
|
|
|
185788
185974
|
evaluators.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").option("--type <type>", "llm_judge or agent_judge").option("--include-archived", "include archived evaluator definitions").action(
|
|
185789
185975
|
async (options) => {
|
|
185790
185976
|
const parsed = listOptionsSchema3.safeParse(options);
|
|
185791
|
-
if (!parsed.success) invalidArguments();
|
|
185977
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185792
185978
|
const query = {};
|
|
185793
185979
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185794
185980
|
if (parsed.data.includeArchived) query.includeArchived = "true";
|
|
@@ -185811,7 +185997,7 @@ function registerEvaluatorCommands(program, executeOnline, readJsonBody, readRun
|
|
|
185811
185997
|
evaluators.command("runs").argument("<evaluator-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
185812
185998
|
async (evaluatorId, options) => {
|
|
185813
185999
|
const parsed = runListOptionsSchema.safeParse(options);
|
|
185814
|
-
if (!parsed.success) invalidArguments();
|
|
186000
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185815
186001
|
const query = {};
|
|
185816
186002
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
185817
186003
|
if (parsed.data.limit !== void 0)
|
|
@@ -185887,7 +186073,7 @@ var traceOptionSchema = z32.object({ trace: z32.string().min(1).max(255) }).stri
|
|
|
185887
186073
|
var bulkRequestSchema = z32.object({ items: z32.array(z32.unknown()).min(1).max(100) }).strict();
|
|
185888
186074
|
function pageInput(options) {
|
|
185889
186075
|
const parsed = pageOptionsSchema.safeParse(options);
|
|
185890
|
-
if (!parsed.success) invalidArguments();
|
|
186076
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185891
186077
|
return {
|
|
185892
186078
|
pathParameters: { traceId: opaqueId(parsed.data.trace) },
|
|
185893
186079
|
query: {
|
|
@@ -185898,7 +186084,7 @@ function pageInput(options) {
|
|
|
185898
186084
|
}
|
|
185899
186085
|
function traceId(options) {
|
|
185900
186086
|
const parsed = traceOptionSchema.safeParse(options);
|
|
185901
|
-
if (!parsed.success) invalidArguments();
|
|
186087
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185902
186088
|
return opaqueId(parsed.data.trace);
|
|
185903
186089
|
}
|
|
185904
186090
|
function registerFeedbackCommands(program, executeOnline, readJsonBody = async () => invalidArguments(), readBulkRequest = async () => invalidArguments()) {
|
|
@@ -185908,7 +186094,7 @@ function registerFeedbackCommands(program, executeOnline, readJsonBody = async (
|
|
|
185908
186094
|
"read one bounded feedback bulk request from stdin"
|
|
185909
186095
|
).option("--idempotency-key <key>", "stable UUID for retrying this mutation").action(async (options) => {
|
|
185910
186096
|
const parsed = bulkRequestSchema.safeParse(await readBulkRequest());
|
|
185911
|
-
if (!parsed.success) invalidArguments();
|
|
186097
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
185912
186098
|
const response = await executeOnline(
|
|
185913
186099
|
bulkMutateFeedbackHandler,
|
|
185914
186100
|
"curated",
|
|
@@ -186031,7 +186217,7 @@ function registerFilterCommands(program, executeOnline, readJsonBody) {
|
|
|
186031
186217
|
const filters = program.command("filters").description("personal saved trace-filter commands");
|
|
186032
186218
|
filters.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(async (options) => {
|
|
186033
186219
|
const parsed = listOptionsSchema4.safeParse(options);
|
|
186034
|
-
if (!parsed.success) invalidArguments();
|
|
186220
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
186035
186221
|
const query = {};
|
|
186036
186222
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
186037
186223
|
if (parsed.data.limit !== void 0)
|
|
@@ -186088,7 +186274,7 @@ function registerDetectionGroupCommands(program, executeOnline) {
|
|
|
186088
186274
|
const groups = program.command("groups").description("detection group catalog commands");
|
|
186089
186275
|
groups.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(async (options) => {
|
|
186090
186276
|
const parsed = groupListOptionsSchema.safeParse(options);
|
|
186091
|
-
if (!parsed.success) invalidArguments();
|
|
186277
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
186092
186278
|
const query = {};
|
|
186093
186279
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
186094
186280
|
if (parsed.data.limit !== void 0) {
|
|
@@ -186109,7 +186295,9 @@ function registerDetectionGroupCommands(program, executeOnline) {
|
|
|
186109
186295
|
const idempotencyKey = idempotencyKeySchema.safeParse(
|
|
186110
186296
|
options.idempotencyKey
|
|
186111
186297
|
);
|
|
186112
|
-
if (!
|
|
186298
|
+
if (!name.success) invalidArguments(name.error, "name");
|
|
186299
|
+
if (!idempotencyKey.success)
|
|
186300
|
+
invalidArguments(idempotencyKey.error, "idempotencyKey");
|
|
186113
186301
|
await executeOnline(createDetectionGroupHandler, "curated", {
|
|
186114
186302
|
body: { name: name.data },
|
|
186115
186303
|
idempotencyKey: mutationKey(idempotencyKey.data)
|
|
@@ -186125,7 +186313,9 @@ function registerDetectionGroupCommands(program, executeOnline) {
|
|
|
186125
186313
|
const idempotencyKey = idempotencyKeySchema.safeParse(
|
|
186126
186314
|
options.idempotencyKey
|
|
186127
186315
|
);
|
|
186128
|
-
if (!
|
|
186316
|
+
if (!name.success) invalidArguments(name.error, "name");
|
|
186317
|
+
if (!idempotencyKey.success)
|
|
186318
|
+
invalidArguments(idempotencyKey.error, "idempotencyKey");
|
|
186129
186319
|
await executeOnline(updateDetectionGroupHandler, "curated", {
|
|
186130
186320
|
body: { name: name.data },
|
|
186131
186321
|
idempotencyKey: mutationKey(idempotencyKey.data),
|
|
@@ -186146,7 +186336,9 @@ function registerDetectionGroupCommands(program, executeOnline) {
|
|
|
186146
186336
|
const idempotencyKey = idempotencyKeySchema.safeParse(
|
|
186147
186337
|
options.idempotencyKey
|
|
186148
186338
|
);
|
|
186149
|
-
if (
|
|
186339
|
+
if (!idempotencyKey.success)
|
|
186340
|
+
invalidArguments(idempotencyKey.error, "idempotencyKey");
|
|
186341
|
+
if (confirmation !== parsedGroupId) {
|
|
186150
186342
|
invalidArguments();
|
|
186151
186343
|
}
|
|
186152
186344
|
await executeOnline(deleteDetectionGroupHandler, "curated", {
|
|
@@ -186708,6 +186900,10 @@ async function executePublicTransport(input) {
|
|
|
186708
186900
|
}
|
|
186709
186901
|
async function decodePublicResponse(response, handler2, input, prepared) {
|
|
186710
186902
|
const generatedKey = prepared.generatedIdempotencyKey;
|
|
186903
|
+
const responseRequestId = safeString(
|
|
186904
|
+
response.headers.get("x-request-id"),
|
|
186905
|
+
SAFE_REQUEST_ID
|
|
186906
|
+
);
|
|
186711
186907
|
if (response.status >= 300 && response.status < 400) {
|
|
186712
186908
|
throw errorWithGeneratedIdempotencyKey(
|
|
186713
186909
|
new CliError({
|
|
@@ -186740,7 +186936,9 @@ async function decodePublicResponse(response, handler2, input, prepared) {
|
|
|
186740
186936
|
throw errorWithGeneratedIdempotencyKey(
|
|
186741
186937
|
new CliError({
|
|
186742
186938
|
code: "INVALID_RESPONSE",
|
|
186743
|
-
exitCode: ExitCode.ServerOrContract
|
|
186939
|
+
exitCode: ExitCode.ServerOrContract,
|
|
186940
|
+
instance: responseRequestId ? handler2.path : void 0,
|
|
186941
|
+
requestId: responseRequestId
|
|
186744
186942
|
}),
|
|
186745
186943
|
generatedKey
|
|
186746
186944
|
);
|
|
@@ -186750,7 +186948,9 @@ async function decodePublicResponse(response, handler2, input, prepared) {
|
|
|
186750
186948
|
throw errorWithGeneratedIdempotencyKey(
|
|
186751
186949
|
new CliError({
|
|
186752
186950
|
code: "INVALID_RESPONSE",
|
|
186753
|
-
exitCode: ExitCode.ServerOrContract
|
|
186951
|
+
exitCode: ExitCode.ServerOrContract,
|
|
186952
|
+
instance: responseRequestId ? handler2.path : void 0,
|
|
186953
|
+
requestId: responseRequestId
|
|
186754
186954
|
}),
|
|
186755
186955
|
generatedKey
|
|
186756
186956
|
);
|
|
@@ -187330,7 +187530,7 @@ function registerGuestCommands(program, dependencies) {
|
|
|
187330
187530
|
).option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-25)").action(
|
|
187331
187531
|
async (options) => {
|
|
187332
187532
|
const parsedOptions = contextOptions.safeParse(options);
|
|
187333
|
-
if (!parsedOptions.success) invalidArguments();
|
|
187533
|
+
if (!parsedOptions.success) invalidArguments(parsedOptions.error);
|
|
187334
187534
|
const client = clientFor(dependencies);
|
|
187335
187535
|
const request = await parseGuestContextRequest(dependencies.stdin);
|
|
187336
187536
|
const query = {};
|
|
@@ -187385,7 +187585,7 @@ var listOptionsSchema5 = z38.object({
|
|
|
187385
187585
|
}).strict();
|
|
187386
187586
|
function listQuery(options) {
|
|
187387
187587
|
const parsed = listOptionsSchema5.safeParse(options);
|
|
187388
|
-
if (!parsed.success) invalidArguments();
|
|
187588
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187389
187589
|
const query = {};
|
|
187390
187590
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
187391
187591
|
if (parsed.data.limit !== void 0) query.limit = String(parsed.data.limit);
|
|
@@ -187538,12 +187738,12 @@ var issuePageSchema = z39.object({
|
|
|
187538
187738
|
}).strict();
|
|
187539
187739
|
function provider(value) {
|
|
187540
187740
|
const parsed = providerSchema.safeParse(value);
|
|
187541
|
-
if (!parsed.success) invalidArguments();
|
|
187741
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187542
187742
|
return parsed.data;
|
|
187543
187743
|
}
|
|
187544
187744
|
function issuePage(options) {
|
|
187545
187745
|
const parsed = issuePageSchema.safeParse(options);
|
|
187546
|
-
if (!parsed.success) invalidArguments();
|
|
187746
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187547
187747
|
return {
|
|
187548
187748
|
...parsed.data.cursor ? { cursor: parsed.data.cursor } : {},
|
|
187549
187749
|
...parsed.data.limit === void 0 ? {} : { limit: String(parsed.data.limit) }
|
|
@@ -187560,7 +187760,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187560
187760
|
integrations.command("test").argument("<provider-id>").option("--idempotency-key <key>", "stable UUID for retrying this test").action(
|
|
187561
187761
|
async (providerId, options) => {
|
|
187562
187762
|
const parsed = testedProviderSchema.safeParse(providerId);
|
|
187563
|
-
if (!parsed.success) invalidArguments();
|
|
187763
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187564
187764
|
await executeOnline(testIntegrationProviderHandler, "curated", {
|
|
187565
187765
|
body: {},
|
|
187566
187766
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -187571,7 +187771,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187571
187771
|
integrations.command("oauth-start").argument("<provider-id>").option("--idempotency-key <key>", "stable UUID for retrying this handoff").action(
|
|
187572
187772
|
async (providerId, options) => {
|
|
187573
187773
|
const parsed = oauthProviderSchema.safeParse(providerId);
|
|
187574
|
-
if (!parsed.success) invalidArguments();
|
|
187774
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187575
187775
|
await executeOnline(createIntegrationOAuthHandoffHandler, "curated", {
|
|
187576
187776
|
body: {},
|
|
187577
187777
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -187581,7 +187781,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187581
187781
|
);
|
|
187582
187782
|
integrations.command("oauth-status").argument("<provider-id>").argument("<handoff-id>").action(async (providerId, handoffId) => {
|
|
187583
187783
|
const parsed = oauthProviderSchema.safeParse(providerId);
|
|
187584
|
-
if (!parsed.success) invalidArguments();
|
|
187784
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187585
187785
|
await executeOnline(getIntegrationOAuthHandoffHandler, "curated", {
|
|
187586
187786
|
pathParameters: {
|
|
187587
187787
|
handoffId: uuid3(handoffId),
|
|
@@ -187602,7 +187802,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187602
187802
|
).action(
|
|
187603
187803
|
async (providerId, targetIdOrOptions, possibleOptions) => {
|
|
187604
187804
|
const parsedProvider = issueProviderSchema.safeParse(providerId);
|
|
187605
|
-
if (!parsedProvider.success) invalidArguments();
|
|
187805
|
+
if (!parsedProvider.success) invalidArguments(parsedProvider.error);
|
|
187606
187806
|
const hasTarget = name !== "issue-targets";
|
|
187607
187807
|
const options = hasTarget ? possibleOptions : targetIdOrOptions;
|
|
187608
187808
|
const pathParameters = {
|
|
@@ -187610,7 +187810,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187610
187810
|
};
|
|
187611
187811
|
if (hasTarget) {
|
|
187612
187812
|
const parsedTarget = issueTargetSchema.safeParse(targetIdOrOptions);
|
|
187613
|
-
if (!parsedTarget.success) invalidArguments();
|
|
187813
|
+
if (!parsedTarget.success) invalidArguments(parsedTarget.error);
|
|
187614
187814
|
pathParameters.targetId = parsedTarget.data;
|
|
187615
187815
|
}
|
|
187616
187816
|
await executeOnline(handler2, "curated", {
|
|
@@ -187626,7 +187826,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187626
187826
|
).action(
|
|
187627
187827
|
async (providerId, options) => {
|
|
187628
187828
|
const parsed = issueProviderSchema.safeParse(providerId);
|
|
187629
|
-
if (!parsed.success) invalidArguments();
|
|
187829
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187630
187830
|
await executeOnline(createIntegrationIssueRunHandler, "curated", {
|
|
187631
187831
|
body: await readJsonBody(),
|
|
187632
187832
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
@@ -187636,7 +187836,7 @@ function registerIntegrationCommands(program, executeOnline, readJsonBody = asyn
|
|
|
187636
187836
|
);
|
|
187637
187837
|
integrations.command("issue-status").argument("<provider-id>").argument("<run-id>").action(async (providerId, runId) => {
|
|
187638
187838
|
const parsed = issueProviderSchema.safeParse(providerId);
|
|
187639
|
-
if (!parsed.success) invalidArguments();
|
|
187839
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187640
187840
|
await executeOnline(getIntegrationIssueRunHandler, "curated", {
|
|
187641
187841
|
pathParameters: {
|
|
187642
187842
|
providerId: parsed.data,
|
|
@@ -187762,7 +187962,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187762
187962
|
const traces = program.command("traces").description("trace and span metadata commands");
|
|
187763
187963
|
traces.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--from <timestamp>", "inclusive RFC 3339 start timestamp").option("--to <timestamp>", "inclusive RFC 3339 end timestamp").option("--limit <number>", "page size (1-50)").option("--status <status>", "trace status filter").option("--workflow <name>", "workflow name filter").option("--session <id>", "opaque session ID filter").action(async (options) => {
|
|
187764
187964
|
const parsed = traceListOptionsSchema.safeParse(options);
|
|
187765
|
-
if (!parsed.success) invalidArguments();
|
|
187965
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187766
187966
|
const query = dateRangeQuery(
|
|
187767
187967
|
parsed.data,
|
|
187768
187968
|
parsed.data.session ? opaqueId(parsed.data.session) : void 0
|
|
@@ -187792,7 +187992,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187792
187992
|
);
|
|
187793
187993
|
traces.command("export").argument("<trace-id>").option("--format <format>", "safe export format: json, markdown, or csv").action(async (traceId2, options) => {
|
|
187794
187994
|
const parsed = exportFormat.safeParse(options.format);
|
|
187795
|
-
if (!parsed.success) invalidArguments();
|
|
187995
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187796
187996
|
const query = parsed.data ? { format: parsed.data } : void 0;
|
|
187797
187997
|
await executeOnline(
|
|
187798
187998
|
exportPublicTraceHandler,
|
|
@@ -187826,8 +188026,9 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187826
188026
|
async (rawQuery, options) => {
|
|
187827
188027
|
const parsedQuery = searchQuerySchema.safeParse(rawQuery);
|
|
187828
188028
|
const parsedOptions = searchOptionsSchema.safeParse(options);
|
|
187829
|
-
if (!
|
|
187830
|
-
invalidArguments();
|
|
188029
|
+
if (!parsedQuery.success)
|
|
188030
|
+
invalidArguments(parsedQuery.error, "query");
|
|
188031
|
+
if (!parsedOptions.success) invalidArguments(parsedOptions.error);
|
|
187831
188032
|
const body = dateRangeQuery(
|
|
187832
188033
|
parsedOptions.data,
|
|
187833
188034
|
parsedOptions.data.session ? opaqueId(parsedOptions.data.session) : void 0
|
|
@@ -187845,7 +188046,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187845
188046
|
traces.command("raw-spans").argument("<trace-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").option("--status <status>", "span status filter").option("--type <type>", "span type filter").action(
|
|
187846
188047
|
async (traceId2, options) => {
|
|
187847
188048
|
const parsed = spanListOptionsSchema.safeParse(options);
|
|
187848
|
-
if (!parsed.success) invalidArguments();
|
|
188049
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187849
188050
|
const query = {};
|
|
187850
188051
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
187851
188052
|
if (parsed.data.limit !== void 0)
|
|
@@ -187864,7 +188065,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187864
188065
|
).action(
|
|
187865
188066
|
async (traceId2, spanId, options) => {
|
|
187866
188067
|
const fields = payloadFieldsSchema.safeParse(options.fields);
|
|
187867
|
-
if (!fields.success) invalidArguments();
|
|
188068
|
+
if (!fields.success) invalidArguments(fields.error);
|
|
187868
188069
|
await executeOnline(getPublicSpanPayloadHandler, "curated", {
|
|
187869
188070
|
pathParameters: {
|
|
187870
188071
|
spanId: opaqueId(spanId, 128),
|
|
@@ -187878,7 +188079,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187878
188079
|
spans.command("list").argument("<trace-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").option("--status <status>", "span status filter").option("--type <type>", "span type filter").action(
|
|
187879
188080
|
async (traceId2, options) => {
|
|
187880
188081
|
const parsed = spanListOptionsSchema.safeParse(options);
|
|
187881
|
-
if (!parsed.success) invalidArguments();
|
|
188082
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187882
188083
|
const query = {};
|
|
187883
188084
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
187884
188085
|
if (parsed.data.limit !== void 0)
|
|
@@ -187902,7 +188103,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187902
188103
|
const sessions = program.command("sessions").description("session metadata commands");
|
|
187903
188104
|
sessions.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--from <timestamp>", "inclusive RFC 3339 start timestamp").option("--to <timestamp>", "inclusive RFC 3339 end timestamp").option("--limit <number>", "page size (1-50)").option("--status <status>", "session status filter").option("--workflow <name>", "workflow name filter").action(async (options) => {
|
|
187904
188105
|
const parsed = sessionListOptionsSchema.safeParse(options);
|
|
187905
|
-
if (!parsed.success) invalidArguments();
|
|
188106
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187906
188107
|
await executeOnline(listPublicSessionsHandler, "curated", {
|
|
187907
188108
|
query: dateRangeQuery(parsed.data)
|
|
187908
188109
|
});
|
|
@@ -187910,7 +188111,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187910
188111
|
sessions.command("get").argument("<session-id>").option("--cursor <cursor>", "opaque trace cursor from the previous page").option("--limit <number>", "trace page size (1-50)").action(
|
|
187911
188112
|
async (sessionId, options) => {
|
|
187912
188113
|
const parsed = pageOptionsSchema2.safeParse(options);
|
|
187913
|
-
if (!parsed.success) invalidArguments();
|
|
188114
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187914
188115
|
const query = {};
|
|
187915
188116
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
187916
188117
|
if (parsed.data.limit !== void 0)
|
|
@@ -187923,7 +188124,7 @@ function registerObservabilityCommands(program, executeOnline, readJsonBody) {
|
|
|
187923
188124
|
);
|
|
187924
188125
|
sessions.command("export").argument("<session-id>").option("--format <format>", "safe export format: json, markdown, or csv").action(async (sessionId, options) => {
|
|
187925
188126
|
const parsed = exportFormat.safeParse(options.format);
|
|
187926
|
-
if (!parsed.success) invalidArguments();
|
|
188127
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
187927
188128
|
const query = parsed.data ? { format: parsed.data } : void 0;
|
|
187928
188129
|
await executeOnline(
|
|
187929
188130
|
exportPublicSessionHandler,
|
|
@@ -188019,7 +188220,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188019
188220
|
const organizations = program.command("orgs").description("organization discovery commands");
|
|
188020
188221
|
organizations.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(async (options) => {
|
|
188021
188222
|
const parsed = organizationListOptionsSchema.safeParse(options);
|
|
188022
|
-
if (!parsed.success) invalidArguments();
|
|
188223
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188023
188224
|
const query = {};
|
|
188024
188225
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
188025
188226
|
if (parsed.data.limit !== void 0)
|
|
@@ -188035,7 +188236,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188035
188236
|
audit.command("list").argument("<organization-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188036
188237
|
async (organizationId, options) => {
|
|
188037
188238
|
const parsed = organizationAccessListOptionsSchema.safeParse(options);
|
|
188038
|
-
if (!parsed.success) invalidArguments();
|
|
188239
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188039
188240
|
await executeOnline(listAuditLifecycleEventsHandler, "curated", {
|
|
188040
188241
|
pathParameters: { organizationId: uuid3(organizationId) },
|
|
188041
188242
|
query: pageQuery(parsed.data)
|
|
@@ -188045,7 +188246,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188045
188246
|
audit.command("export").argument("<organization-id>").requiredOption("--from <timestamp>", "inclusive ISO 8601 start timestamp").requiredOption("--to <timestamp>", "exclusive ISO 8601 end timestamp").option("--limit <number>", "maximum rows (1-5000)").action(
|
|
188046
188247
|
async (organizationId, options) => {
|
|
188047
188248
|
const parsed = auditExportOptionsSchema.safeParse(options);
|
|
188048
|
-
if (!parsed.success) invalidArguments();
|
|
188249
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188049
188250
|
const query = {
|
|
188050
188251
|
from: parsed.data.from,
|
|
188051
188252
|
to: parsed.data.to
|
|
@@ -188063,7 +188264,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188063
188264
|
members.command("list").argument("<organization-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188064
188265
|
async (organizationId, options) => {
|
|
188065
188266
|
const parsed = organizationAccessListOptionsSchema.safeParse(options);
|
|
188066
|
-
if (!parsed.success) invalidArguments();
|
|
188267
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188067
188268
|
await executeOnline(listOrganizationMembersHandler, "curated", {
|
|
188068
188269
|
pathParameters: { organizationId: uuid3(organizationId) },
|
|
188069
188270
|
query: pageQuery(parsed.data)
|
|
@@ -188090,7 +188291,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188090
188291
|
).action(
|
|
188091
188292
|
async (organizationId, userId, options) => {
|
|
188092
188293
|
const parsed = memberRoleUpdateOptionsSchema.safeParse(options);
|
|
188093
|
-
if (!parsed.success) invalidArguments();
|
|
188294
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188094
188295
|
await executeOnline(updateOrganizationMemberRoleHandler, "curated", {
|
|
188095
188296
|
body: {
|
|
188096
188297
|
expectedRole: parsed.data.expectedRole,
|
|
@@ -188120,7 +188321,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188120
188321
|
).action(
|
|
188121
188322
|
async (organizationId, userId, options) => {
|
|
188122
188323
|
const parsed = memberRemoveOptionsSchema.safeParse(options);
|
|
188123
|
-
if (!parsed.success) invalidArguments();
|
|
188324
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188124
188325
|
const membershipId = postgresUuid(parsed.data.membershipId);
|
|
188125
188326
|
if (postgresUuid(parsed.data.confirm) !== membershipId) {
|
|
188126
188327
|
invalidArguments();
|
|
@@ -188139,7 +188340,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188139
188340
|
invitations.command("list").argument("<organization-id>").option("--state <state>", "all, pending, or expired").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188140
188341
|
async (organizationId, options) => {
|
|
188141
188342
|
const parsed = invitationListOptionsSchema.safeParse(options);
|
|
188142
|
-
if (!parsed.success) invalidArguments();
|
|
188343
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188143
188344
|
const query = {};
|
|
188144
188345
|
if (parsed.data.state) query.state = parsed.data.state;
|
|
188145
188346
|
Object.assign(query, pageQuery(parsed.data));
|
|
@@ -188158,7 +188359,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188158
188359
|
).action(
|
|
188159
188360
|
async (organizationId, options) => {
|
|
188160
188361
|
const parsed = invitationCreateOptionsSchema.safeParse(options);
|
|
188161
|
-
if (!parsed.success) invalidArguments();
|
|
188362
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188162
188363
|
await executeOnline(createOrganizationInvitationHandler, "curated", {
|
|
188163
188364
|
body: { email: parsed.data.email, role: parsed.data.role },
|
|
188164
188365
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -188172,7 +188373,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188172
188373
|
).action(
|
|
188173
188374
|
async (organizationId, invitationId, options) => {
|
|
188174
188375
|
const parsed = invitationMutationOptionsSchema.safeParse(options);
|
|
188175
|
-
if (!parsed.success) invalidArguments();
|
|
188376
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188176
188377
|
await executeOnline(resendOrganizationInvitationHandler, "curated", {
|
|
188177
188378
|
body: { email: parsed.data.email },
|
|
188178
188379
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -188192,7 +188393,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188192
188393
|
).action(
|
|
188193
188394
|
async (organizationId, invitationIdValue, options) => {
|
|
188194
188395
|
const parsed = invitationRevokeOptionsSchema.safeParse(options);
|
|
188195
|
-
if (!parsed.success) invalidArguments();
|
|
188396
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188196
188397
|
const invitationId = uuid3(invitationIdValue);
|
|
188197
188398
|
if (uuid3(parsed.data.confirm) !== invitationId) invalidArguments();
|
|
188198
188399
|
await executeOnline(revokeOrganizationInvitationHandler, "curated", {
|
|
@@ -188214,11 +188415,11 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188214
188415
|
).action(
|
|
188215
188416
|
async (options) => {
|
|
188216
188417
|
const parsed = invitationAcceptOptionsSchema.safeParse(options);
|
|
188217
|
-
if (!parsed.success) invalidArguments();
|
|
188418
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188218
188419
|
const tokenResult = invitationTokenSchema.safeParse(
|
|
188219
188420
|
(await readInvitationToken()).replace(/\r?\n$/, "")
|
|
188220
188421
|
);
|
|
188221
|
-
if (!tokenResult.success) invalidArguments();
|
|
188422
|
+
if (!tokenResult.success) invalidArguments(tokenResult.error);
|
|
188222
188423
|
await executeOnline(acceptOrganizationInvitationHandler, "curated", {
|
|
188223
188424
|
body: { token: tokenResult.data },
|
|
188224
188425
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey)
|
|
@@ -188228,7 +188429,7 @@ function registerOrganizationCommands(program, executeOnline, readInvitationToke
|
|
|
188228
188429
|
const roles = organizations.command("roles").description("organization role assignment options");
|
|
188229
188430
|
roles.command("list").argument("<organization-id>").requiredOption("--action <action>", "invitation or member-role-change").action(async (organizationId, options) => {
|
|
188230
188431
|
const parsed = roleListOptionsSchema.safeParse(options);
|
|
188231
|
-
if (!parsed.success) invalidArguments();
|
|
188432
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188232
188433
|
await executeOnline(listOrganizationRolesHandler, "curated", {
|
|
188233
188434
|
pathParameters: { organizationId: uuid3(organizationId) },
|
|
188234
188435
|
query: { action: parsed.data.action }
|
|
@@ -188349,7 +188550,7 @@ function registerProjectCommands(program, executeOnline) {
|
|
|
188349
188550
|
).action(
|
|
188350
188551
|
async (options) => {
|
|
188351
188552
|
const parsed = projectCreateOptionsSchema.safeParse(options);
|
|
188352
|
-
if (!parsed.success) invalidArguments();
|
|
188553
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188353
188554
|
await executeOnline(createProjectHandler, "curated", {
|
|
188354
188555
|
body: {
|
|
188355
188556
|
name: parsed.data.name,
|
|
@@ -188366,7 +188567,7 @@ function registerProjectCommands(program, executeOnline) {
|
|
|
188366
188567
|
).action(
|
|
188367
188568
|
async (options) => {
|
|
188368
188569
|
const parsed = projectUpdateOptionsSchema.safeParse(options);
|
|
188369
|
-
if (!parsed.success) invalidArguments();
|
|
188570
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188370
188571
|
await executeOnline(updateProjectHandler, "curated", {
|
|
188371
188572
|
body: {
|
|
188372
188573
|
...parsed.data.name === void 0 ? {} : { name: parsed.data.name },
|
|
@@ -188379,7 +188580,7 @@ function registerProjectCommands(program, executeOnline) {
|
|
|
188379
188580
|
projects.command("list").option("--organization <uuid>", "filter by organization UUID").option("--include-archived", "include archived projects").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188380
188581
|
async (options) => {
|
|
188381
188582
|
const parsed = projectListOptionsSchema.safeParse(options);
|
|
188382
|
-
if (!parsed.success) invalidArguments();
|
|
188583
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188383
188584
|
const query = {};
|
|
188384
188585
|
if (parsed.data.organization) {
|
|
188385
188586
|
query.organizationId = parsed.data.organization;
|
|
@@ -188409,7 +188610,7 @@ function registerProjectCommands(program, executeOnline) {
|
|
|
188409
188610
|
"schedule archive-state deletion; recovery does not replay accepted telemetry; not activation-ready until durable accepted-event replay is implemented"
|
|
188410
188611
|
).requiredOption("--project-id <uuid>", "exact project UUID").requiredOption("--project-name <name>", "exact current project name").requiredOption("--digest <sha256>", "preview digest").requiredOption("--confirm <uuid>", "repeat the exact project UUID").option("--idempotency-key <key>", "stable UUID for retrying this schedule").action(async (options) => {
|
|
188411
188612
|
const parsed = projectDeletionScheduleOptionsSchema.safeParse(options);
|
|
188412
|
-
if (!parsed.success) invalidArguments();
|
|
188613
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188413
188614
|
await executeOnline(scheduleProjectDeletionHandler, "curated", {
|
|
188414
188615
|
body: {
|
|
188415
188616
|
digest: parsed.data.digest,
|
|
@@ -188424,7 +188625,7 @@ function registerProjectCommands(program, executeOnline) {
|
|
|
188424
188625
|
"restore archive state only; recovery does not replay accepted telemetry"
|
|
188425
188626
|
).requiredOption("--project-id <uuid>", "exact project UUID").requiredOption("--run-id <uuid>", "deletion run UUID").requiredOption("--confirm <uuid>", "repeat the exact project UUID").option("--idempotency-key <key>", "stable UUID for retrying recovery").action(async (options) => {
|
|
188426
188627
|
const parsed = projectDeletionRecoveryOptionsSchema.safeParse(options);
|
|
188427
|
-
if (!parsed.success) invalidArguments();
|
|
188628
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188428
188629
|
await executeOnline(recoverProjectDeletionHandler, "curated", {
|
|
188429
188630
|
body: {
|
|
188430
188631
|
projectId: parsed.data.projectId,
|
|
@@ -188515,7 +188716,7 @@ async function createPromptFromStdin(input) {
|
|
|
188515
188716
|
}
|
|
188516
188717
|
async function promptBodyFromOptions(options, readPromptContent) {
|
|
188517
188718
|
const name = z43.string().trim().min(1).max(255).safeParse(options.name);
|
|
188518
|
-
if (!name.success) invalidArguments();
|
|
188719
|
+
if (!name.success) invalidArguments(name.error);
|
|
188519
188720
|
if (options.content !== void 0 && options.contentStdin === true) {
|
|
188520
188721
|
invalidArguments();
|
|
188521
188722
|
}
|
|
@@ -188560,7 +188761,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188560
188761
|
prompts.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--label <label>", "active label filter").option("--limit <number>", "page size (1-100)").option("--name <name>", "exact prompt name filter").option("--source <source>", "exact prompt source filter").action(
|
|
188561
188762
|
async (options) => {
|
|
188562
188763
|
const parsed = listOptionsSchema6.safeParse(options);
|
|
188563
|
-
if (!parsed.success) invalidArguments();
|
|
188764
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188564
188765
|
await executeOnline(listPromptsHandler, "curated", {
|
|
188565
188766
|
query: {
|
|
188566
188767
|
...parsed.data.label ? { label: parsed.data.label } : {},
|
|
@@ -188591,7 +188792,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188591
188792
|
"read one bounded prompt label assignment request from stdin"
|
|
188592
188793
|
).option("--idempotency-key <key>", "stable UUID for retrying this mutation").action(async (options) => {
|
|
188593
188794
|
const parsed = bulkLabelRequestSchema.safeParse(await readBulkRequest());
|
|
188594
|
-
if (!parsed.success) invalidArguments();
|
|
188795
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188595
188796
|
await executeOnline(bulkMovePromptLabelsHandler, "curated", {
|
|
188596
188797
|
body: parsed.data,
|
|
188597
188798
|
idempotencyKey: mutationKey(options.idempotencyKey)
|
|
@@ -188605,7 +188806,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188605
188806
|
prompts.command("history").argument("<prompt-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188606
188807
|
async (promptId, options) => {
|
|
188607
188808
|
const parsed = pageOptionsSchema3.safeParse(options);
|
|
188608
|
-
if (!parsed.success) invalidArguments();
|
|
188809
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188609
188810
|
await executeOnline(listPromptHistoryHandler, "curated", {
|
|
188610
188811
|
pathParameters: { promptId: uuid3(promptId) },
|
|
188611
188812
|
query: pageQuery2(parsed.data)
|
|
@@ -188631,7 +188832,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188631
188832
|
prompts.command("changelog").argument("<prompt-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").action(
|
|
188632
188833
|
async (promptId, options) => {
|
|
188633
188834
|
const parsed = collaborationPageOptionsSchema.safeParse(options);
|
|
188634
|
-
if (!parsed.success) invalidArguments();
|
|
188835
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188635
188836
|
await executeOnline(listPromptChangelogHandler, "curated", {
|
|
188636
188837
|
pathParameters: { promptId: uuid3(promptId) },
|
|
188637
188838
|
query: pageQuery2(parsed.data)
|
|
@@ -188641,7 +188842,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188641
188842
|
prompts.command("comments").argument("<prompt-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-20)").action(
|
|
188642
188843
|
async (promptId, options) => {
|
|
188643
188844
|
const parsed = commentPageOptionsSchema.safeParse(options);
|
|
188644
|
-
if (!parsed.success) invalidArguments();
|
|
188845
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188645
188846
|
await executeOnline(listPromptCommentsHandler, "curated", {
|
|
188646
188847
|
pathParameters: { promptId: uuid3(promptId) },
|
|
188647
188848
|
query: pageQuery2(parsed.data)
|
|
@@ -188713,7 +188914,7 @@ function registerPromptCommands(program, executeOnline, readPromptContent, readP
|
|
|
188713
188914
|
prompts.command("label-remove").description("remove one active label from a prompt version").argument("<prompt-id>").argument("<label>").option("--idempotency-key <key>").action(
|
|
188714
188915
|
async (promptId, label, options) => {
|
|
188715
188916
|
const parsedLabel = promptLabelSchema.safeParse(label);
|
|
188716
|
-
if (!parsedLabel.success) invalidArguments();
|
|
188917
|
+
if (!parsedLabel.success) invalidArguments(parsedLabel.error);
|
|
188717
188918
|
await executeOnline(removePromptLabelHandler, "curated", {
|
|
188718
188919
|
idempotencyKey: mutationKey(options.idempotencyKey),
|
|
188719
188920
|
pathParameters: {
|
|
@@ -188855,7 +189056,7 @@ function addAccountPageCommand(parent, handler2, executeOnline) {
|
|
|
188855
189056
|
parent.command("list").argument("<service-account-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188856
189057
|
async (serviceAccountId, options) => {
|
|
188857
189058
|
const parsed = listOptionsSchema7.safeParse(options);
|
|
188858
|
-
if (!parsed.success) invalidArguments();
|
|
189059
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188859
189060
|
await executeOnline(handler2, "curated", {
|
|
188860
189061
|
pathParameters: { serviceAccountId: uuid3(serviceAccountId) },
|
|
188861
189062
|
query: pageQuery3(parsed.data)
|
|
@@ -188873,7 +189074,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188873
189074
|
).option("--description <description>").option("--idempotency-key <key>").action(
|
|
188874
189075
|
async (organizationId, options) => {
|
|
188875
189076
|
const parsed = createOptionsSchema.safeParse(options);
|
|
188876
|
-
if (!parsed.success) invalidArguments();
|
|
189077
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188877
189078
|
const { binding, description, idempotencyKey, name } = parsed.data;
|
|
188878
189079
|
await executeOnline(createServiceAccountHandler, "curated", {
|
|
188879
189080
|
body: {
|
|
@@ -188889,7 +189090,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188889
189090
|
serviceAccounts.command("list").argument("<organization-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
188890
189091
|
async (organizationId, options) => {
|
|
188891
189092
|
const parsed = listOptionsSchema7.safeParse(options);
|
|
188892
|
-
if (!parsed.success) invalidArguments();
|
|
189093
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188893
189094
|
await executeOnline(listServiceAccountsHandler, "curated", {
|
|
188894
189095
|
pathParameters: { organizationId: uuid3(organizationId) },
|
|
188895
189096
|
query: pageQuery3(parsed.data)
|
|
@@ -188904,7 +189105,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188904
189105
|
serviceAccounts.command("update").argument("<service-account-id>").option("--name <name>").option("--description <description>").option("--idempotency-key <key>").action(
|
|
188905
189106
|
async (serviceAccountId, options) => {
|
|
188906
189107
|
const parsed = updateOptionsSchema.safeParse(options);
|
|
188907
|
-
if (!parsed.success) invalidArguments();
|
|
189108
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188908
189109
|
const { idempotencyKey, ...body } = parsed.data;
|
|
188909
189110
|
await executeOnline(updateServiceAccountHandler, "curated", {
|
|
188910
189111
|
body,
|
|
@@ -188920,7 +189121,8 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188920
189121
|
async (serviceAccountId, options) => {
|
|
188921
189122
|
const parsedServiceAccountId = uuid3(serviceAccountId);
|
|
188922
189123
|
const parsed = destructiveReasonOptionsSchema.safeParse(options);
|
|
188923
|
-
if (!parsed.success
|
|
189124
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189125
|
+
if (parsed.data.confirm !== serviceAccountId) {
|
|
188924
189126
|
invalidArguments();
|
|
188925
189127
|
}
|
|
188926
189128
|
await executeOnline(disableServiceAccountHandler, "curated", {
|
|
@@ -188939,7 +189141,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188939
189141
|
bindings.command("add").argument("<service-account-id>").requiredOption("--project-id <project-id>").requiredOption("--role <role>").option("--idempotency-key <key>").action(
|
|
188940
189142
|
async (serviceAccountId, options) => {
|
|
188941
189143
|
const parsed = bindingCreateOptionsSchema.safeParse(options);
|
|
188942
|
-
if (!parsed.success) invalidArguments();
|
|
189144
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188943
189145
|
await executeOnline(createServiceAccountBindingHandler, "curated", {
|
|
188944
189146
|
body: {
|
|
188945
189147
|
projectId: uuid3(parsed.data.projectId),
|
|
@@ -188953,7 +189155,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188953
189155
|
bindings.command("set-role").argument("<service-account-id>").argument("<binding-id>").requiredOption("--role <role>").option("--idempotency-key <key>").action(
|
|
188954
189156
|
async (serviceAccountId, bindingId, options) => {
|
|
188955
189157
|
const parsed = bindingRoleOptionsSchema.safeParse(options);
|
|
188956
|
-
if (!parsed.success) invalidArguments();
|
|
189158
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
188957
189159
|
await executeOnline(updateServiceAccountBindingHandler, "curated", {
|
|
188958
189160
|
body: { role: parsed.data.role },
|
|
188959
189161
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -188970,7 +189172,8 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
188970
189172
|
).option("--idempotency-key <key>").action(
|
|
188971
189173
|
async (serviceAccountId, bindingId, options) => {
|
|
188972
189174
|
const parsed = bindingRemoveOptionsSchema.safeParse(options);
|
|
188973
|
-
if (!parsed.success
|
|
189175
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189176
|
+
if (parsed.data.confirm !== bindingId) {
|
|
188974
189177
|
invalidArguments();
|
|
188975
189178
|
}
|
|
188976
189179
|
await executeOnline(deleteServiceAccountBindingHandler, "curated", {
|
|
@@ -189001,7 +189204,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
189001
189204
|
parsedTokenId
|
|
189002
189205
|
);
|
|
189003
189206
|
const parsed = reasonOptionsSchema.safeParse(reasonOptions);
|
|
189004
|
-
if (!parsed.success) invalidArguments();
|
|
189207
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189005
189208
|
await executeOnline(revokeServiceAccountTokenHandler, "curated", {
|
|
189006
189209
|
body: parsed.data.reason ? { reason: parsed.data.reason } : {},
|
|
189007
189210
|
idempotencyKey: mutationKey(parsed.data.idempotencyKey),
|
|
@@ -189016,7 +189219,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
189016
189219
|
).option("--expires-in-days <days>").option("--idempotency-key <key>").action(
|
|
189017
189220
|
async (serviceAccountId, options) => {
|
|
189018
189221
|
const parsed = mintOptionsSchema.safeParse(options);
|
|
189019
|
-
if (!parsed.success) invalidArguments();
|
|
189222
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189020
189223
|
const body = {
|
|
189021
189224
|
...parsed.data.expiresInDays === void 0 ? {} : { expiresInDays: parsed.data.expiresInDays },
|
|
189022
189225
|
name: parsed.data.name,
|
|
@@ -189055,7 +189258,7 @@ function registerServiceAccountCommands(program, executeOnline, renderSecret, re
|
|
|
189055
189258
|
[]
|
|
189056
189259
|
).option("--expires-in-days <days>").option("--idempotency-key <key>").action(async (tokenId, options) => {
|
|
189057
189260
|
const parsed = mintOptionsSchema.safeParse(options);
|
|
189058
|
-
if (!parsed.success) invalidArguments();
|
|
189261
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189059
189262
|
const body = {
|
|
189060
189263
|
...parsed.data.expiresInDays === void 0 ? {} : { expiresInDays: parsed.data.expiresInDays },
|
|
189061
189264
|
name: parsed.data.name,
|
|
@@ -189197,7 +189400,7 @@ function registerSharingCommands(program, executeOnline, renderSecret, resolvedP
|
|
|
189197
189400
|
const guestLinks = program.command("guest-links").description("redacted guest-link metadata");
|
|
189198
189401
|
guestLinks.command("list").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-50)").action(async (options) => {
|
|
189199
189402
|
const parsed = listOptions2.safeParse(options);
|
|
189200
|
-
if (!parsed.success) invalidArguments();
|
|
189403
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189201
189404
|
const query = {};
|
|
189202
189405
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
189203
189406
|
if (parsed.data.limit !== void 0)
|
|
@@ -189210,7 +189413,7 @@ function registerSharingCommands(program, executeOnline, renderSecret, resolvedP
|
|
|
189210
189413
|
const parsedRecipient = recipientEmail.safeParse(
|
|
189211
189414
|
options.recipientEmail
|
|
189212
189415
|
);
|
|
189213
|
-
if (!parsedRecipient.success) invalidArguments();
|
|
189416
|
+
if (!parsedRecipient.success) invalidArguments(parsedRecipient.error);
|
|
189214
189417
|
const idempotencyKey = mutationKey(options.idempotencyKey);
|
|
189215
189418
|
const replayKey = randomBytes3(32).toString("base64url");
|
|
189216
189419
|
const response = await executeOnline(mintGuestLinkHandler, "none", {
|
|
@@ -189241,7 +189444,7 @@ function registerSharingCommands(program, executeOnline, renderSecret, resolvedP
|
|
|
189241
189444
|
"read one bounded guest-link bulk mint request from stdin"
|
|
189242
189445
|
).option("--idempotency-key <key>", "stable UUID for retrying this mutation").action(async (options) => {
|
|
189243
189446
|
const parsed = bulkMintRequestSchema.safeParse(await readBulkRequest());
|
|
189244
|
-
if (!parsed.success) invalidArguments();
|
|
189447
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189245
189448
|
const idempotencyKey = mutationKey(options.idempotencyKey);
|
|
189246
189449
|
const replayKey = randomBytes3(32).toString("base64url");
|
|
189247
189450
|
const response = await executeOnline(bulkMintGuestLinksHandler, "none", {
|
|
@@ -189268,7 +189471,7 @@ function registerSharingCommands(program, executeOnline, renderSecret, resolvedP
|
|
|
189268
189471
|
"read one bounded guest-link bulk revoke request from stdin"
|
|
189269
189472
|
).option("--idempotency-key <key>", "stable UUID for retrying this mutation").action(async (options) => {
|
|
189270
189473
|
const parsed = bulkRevokeRequestSchema.safeParse(await readBulkRequest());
|
|
189271
|
-
if (!parsed.success) invalidArguments();
|
|
189474
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189272
189475
|
await executeOnline(bulkRevokeGuestLinksHandler, "curated", {
|
|
189273
189476
|
body: parsed.data,
|
|
189274
189477
|
idempotencyKey: mutationKey(options.idempotencyKey)
|
|
@@ -189360,7 +189563,7 @@ function attachSkillMutationCommands(skills, executeOnline, deleteHandler, impor
|
|
|
189360
189563
|
idempotencyKey: z47.string().optional(),
|
|
189361
189564
|
name: z47.string().min(1).max(64).regex(/^[a-z0-9-]+$/).optional()
|
|
189362
189565
|
}).strict().safeParse(options);
|
|
189363
|
-
if (!parsed.success) invalidArguments();
|
|
189566
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189364
189567
|
await executeOnline(importHandler, "curated", {
|
|
189365
189568
|
body: {
|
|
189366
189569
|
...parsed.data.description === void 0 ? {} : { description: parsed.data.description },
|
|
@@ -189407,7 +189610,7 @@ function registerSkillCommands(program, executeOnline, readSkillContent, readUpd
|
|
|
189407
189610
|
).requiredOption("--ref <sha>", "full immutable 40-character commit SHA").requiredOption("--path <path>", "relative path ending in SKILL.md").option("--idempotency-key <key>", "stable UUID for retrying this import").action(
|
|
189408
189611
|
async (options) => {
|
|
189409
189612
|
const parsed = githubImportOptionsSchema.safeParse(options);
|
|
189410
|
-
if (!parsed.success) invalidArguments();
|
|
189613
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189411
189614
|
await executeOnline(importGithubSkillHandler, "curated", {
|
|
189412
189615
|
body: {
|
|
189413
189616
|
path: parsed.data.path,
|
|
@@ -189422,7 +189625,7 @@ function registerSkillCommands(program, executeOnline, readSkillContent, readUpd
|
|
|
189422
189625
|
skills.command("list").option("--include-archived", "include archived evaluator skills").option("--limit <number>", "page size (1-100)").option("--cursor <cursor>", "opaque cursor returned by the previous page").action(
|
|
189423
189626
|
async (options) => {
|
|
189424
189627
|
const parsed = listOptionsSchema8.safeParse(options);
|
|
189425
|
-
if (!parsed.success) invalidArguments();
|
|
189628
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189426
189629
|
const query = {};
|
|
189427
189630
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
189428
189631
|
if (parsed.data.includeArchived) query.includeArchived = "true";
|
|
@@ -189475,7 +189678,7 @@ function registerToolingCommands(program, executeOnline, readJsonBody = async ()
|
|
|
189475
189678
|
var limitSchema = z48.coerce.number().int().min(1).max(100);
|
|
189476
189679
|
function limit(value) {
|
|
189477
189680
|
const parsed = limitSchema.safeParse(value);
|
|
189478
|
-
if (!parsed.success) invalidArguments();
|
|
189681
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189479
189682
|
return parsed.data;
|
|
189480
189683
|
}
|
|
189481
189684
|
function registerConnectionCommands(command, executeOnline, readJsonBody, handlers) {
|
|
@@ -189615,7 +189818,7 @@ function registerWebhookCommands(program, executeOnline, readJsonBody = async ()
|
|
|
189615
189818
|
webhooks.command("deliveries").argument("<webhook-id>").option("--cursor <cursor>", "opaque cursor returned by the previous page").option("--limit <number>", "page size (1-100)").action(
|
|
189616
189819
|
async (webhookId, options) => {
|
|
189617
189820
|
const parsed = deliveryListOptionsSchema.safeParse(options);
|
|
189618
|
-
if (!parsed.success) invalidArguments();
|
|
189821
|
+
if (!parsed.success) invalidArguments(parsed.error);
|
|
189619
189822
|
const query = {};
|
|
189620
189823
|
if (parsed.data.cursor) query.cursor = parsed.data.cursor;
|
|
189621
189824
|
if (parsed.data.limit !== void 0)
|
|
@@ -189818,6 +190021,17 @@ var PUBLIC_EVALUATOR_RUN_REQUEST_MAX_BYTES = 64 * 1024;
|
|
|
189818
190021
|
var PUBLIC_DETECTION_PREVIEW_REQUEST_MAX_BYTES = 320 * 1024;
|
|
189819
190022
|
var PUBLIC_DETECTION_COMPUTE_REQUEST_MAX_BYTES = 64 * 1024;
|
|
189820
190023
|
|
|
190024
|
+
// src/usage-error.ts
|
|
190025
|
+
function commanderUsageError(error) {
|
|
190026
|
+
const option = error.message.match(/--[a-z][a-z0-9-]*/)?.[0];
|
|
190027
|
+
const detail = error.code === "commander.missingMandatoryOptionValue" && option ? `Missing required option ${option}. Run this command with --help for usage.` : "Invalid command arguments. Run this command with --help for usage.";
|
|
190028
|
+
return new CliError({
|
|
190029
|
+
code: "INVALID_ARGUMENTS",
|
|
190030
|
+
detail,
|
|
190031
|
+
exitCode: ExitCode.Usage
|
|
190032
|
+
});
|
|
190033
|
+
}
|
|
190034
|
+
|
|
189821
190035
|
// src/cli.ts
|
|
189822
190036
|
var MAX_GENERIC_BODY_BYTES = 512 * 1024;
|
|
189823
190037
|
var MAX_COMMENT_CONTENT_BYTES = 1e4;
|
|
@@ -190488,14 +190702,10 @@ async function runCli(argv, dependencies) {
|
|
|
190488
190702
|
if (error.code === "commander.helpDisplayed" || error.code === "commander.version") {
|
|
190489
190703
|
return ExitCode.Success;
|
|
190490
190704
|
}
|
|
190491
|
-
const cliError2 =
|
|
190492
|
-
code: "INVALID_ARGUMENTS",
|
|
190493
|
-
exitCode: ExitCode.Usage
|
|
190494
|
-
});
|
|
190705
|
+
const cliError2 = commanderUsageError(error);
|
|
190495
190706
|
if (machineDiagnostics)
|
|
190496
190707
|
writeJson(dependencies.stderr, diagnostic(cliError2));
|
|
190497
|
-
else dependencies.stderr.write(
|
|
190498
|
-
`);
|
|
190708
|
+
else dependencies.stderr.write(humanDiagnostic(cliError2));
|
|
190499
190709
|
return cliError2.exitCode;
|
|
190500
190710
|
}
|
|
190501
190711
|
const cliError = asCliError(error);
|