@phosphorco/bb-thread-metrics 0.1.0 → 0.2.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/CONTRACT.md +83 -1
- package/README.md +28 -1
- package/dist/bb.js +12 -1
- package/dist/index.js +279 -54
- package/dist/testing.js +13 -2
- package/dist/types/bb.d.ts +439 -15
- package/dist/types/index.d.ts +38 -34
- package/dist/types/recent.d.ts +1661 -0
- package/dist/types/testing.d.ts +2 -1
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './recent.js';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
export type { UsageVector } from '@phosphorco/bb-usage-algebra/vector';
|
|
3
4
|
export declare const LIMITS: Readonly<{
|
|
@@ -23,6 +24,7 @@ export declare const METHODS: Readonly<{
|
|
|
23
24
|
describe: "threadMetricsDescribe";
|
|
24
25
|
read: "threadMetricsReadV1";
|
|
25
26
|
detail: "threadMetricsDetailV1";
|
|
27
|
+
recentSnapshot: "threadMetricsRecentSnapshotV1";
|
|
26
28
|
}>;
|
|
27
29
|
export declare const windowSchema: z.ZodEnum<{
|
|
28
30
|
m20: "m20";
|
|
@@ -37,13 +39,13 @@ export declare const coverageSchema: z.ZodEnum<{
|
|
|
37
39
|
}>;
|
|
38
40
|
export declare const coverageReasonSchema: z.ZodEnum<{
|
|
39
41
|
"source-gap": "source-gap";
|
|
42
|
+
unpriced: "unpriced";
|
|
40
43
|
"root-unattested": "root-unattested";
|
|
41
44
|
"history-unavailable": "history-unavailable";
|
|
45
|
+
"missing-thread": "missing-thread";
|
|
42
46
|
"member-cap": "member-cap";
|
|
43
47
|
"depth-cap": "depth-cap";
|
|
44
48
|
"edge-cap": "edge-cap";
|
|
45
|
-
"missing-thread": "missing-thread";
|
|
46
|
-
unpriced: "unpriced";
|
|
47
49
|
retention: "retention";
|
|
48
50
|
"row-cap": "row-cap";
|
|
49
51
|
pagination: "pagination";
|
|
@@ -52,21 +54,21 @@ export declare const coverageReasonSchema: z.ZodEnum<{
|
|
|
52
54
|
export declare const approximationSchema: z.ZodObject<{
|
|
53
55
|
approximate: z.ZodBoolean;
|
|
54
56
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
55
|
-
"source-gap": "source-gap";
|
|
56
57
|
"closest-model": "closest-model";
|
|
57
58
|
"provider-default": "provider-default";
|
|
58
59
|
"model-attribution": "model-attribution";
|
|
59
60
|
"bucket-boundary": "bucket-boundary";
|
|
60
61
|
"missing-price": "missing-price";
|
|
62
|
+
"source-gap": "source-gap";
|
|
61
63
|
}>>;
|
|
62
64
|
rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
63
65
|
providerId: z.ZodString;
|
|
64
66
|
modelId: z.ZodString;
|
|
65
67
|
rateId: z.ZodNullable<z.ZodString>;
|
|
66
68
|
basis: z.ZodEnum<{
|
|
67
|
-
unpriced: "unpriced";
|
|
68
69
|
"closest-model": "closest-model";
|
|
69
70
|
"provider-default": "provider-default";
|
|
71
|
+
unpriced: "unpriced";
|
|
70
72
|
matched: "matched";
|
|
71
73
|
}>;
|
|
72
74
|
}, z.core.$strip>>>;
|
|
@@ -213,13 +215,13 @@ export declare const summaryRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
213
215
|
}>;
|
|
214
216
|
coverageReasons: z.ZodArray<z.ZodEnum<{
|
|
215
217
|
"source-gap": "source-gap";
|
|
218
|
+
unpriced: "unpriced";
|
|
216
219
|
"root-unattested": "root-unattested";
|
|
217
220
|
"history-unavailable": "history-unavailable";
|
|
221
|
+
"missing-thread": "missing-thread";
|
|
218
222
|
"member-cap": "member-cap";
|
|
219
223
|
"depth-cap": "depth-cap";
|
|
220
224
|
"edge-cap": "edge-cap";
|
|
221
|
-
"missing-thread": "missing-thread";
|
|
222
|
-
unpriced: "unpriced";
|
|
223
225
|
retention: "retention";
|
|
224
226
|
"row-cap": "row-cap";
|
|
225
227
|
pagination: "pagination";
|
|
@@ -234,21 +236,21 @@ export declare const summaryRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
234
236
|
approximation: z.ZodObject<{
|
|
235
237
|
approximate: z.ZodBoolean;
|
|
236
238
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
237
|
-
"source-gap": "source-gap";
|
|
238
239
|
"closest-model": "closest-model";
|
|
239
240
|
"provider-default": "provider-default";
|
|
240
241
|
"model-attribution": "model-attribution";
|
|
241
242
|
"bucket-boundary": "bucket-boundary";
|
|
242
243
|
"missing-price": "missing-price";
|
|
244
|
+
"source-gap": "source-gap";
|
|
243
245
|
}>>;
|
|
244
246
|
rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
245
247
|
providerId: z.ZodString;
|
|
246
248
|
modelId: z.ZodString;
|
|
247
249
|
rateId: z.ZodNullable<z.ZodString>;
|
|
248
250
|
basis: z.ZodEnum<{
|
|
249
|
-
unpriced: "unpriced";
|
|
250
251
|
"closest-model": "closest-model";
|
|
251
252
|
"provider-default": "provider-default";
|
|
253
|
+
unpriced: "unpriced";
|
|
252
254
|
matched: "matched";
|
|
253
255
|
}>;
|
|
254
256
|
}, z.core.$strip>>>;
|
|
@@ -309,13 +311,13 @@ export declare const summaryRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
309
311
|
}>;
|
|
310
312
|
coverageReasons: z.ZodArray<z.ZodEnum<{
|
|
311
313
|
"source-gap": "source-gap";
|
|
314
|
+
unpriced: "unpriced";
|
|
312
315
|
"root-unattested": "root-unattested";
|
|
313
316
|
"history-unavailable": "history-unavailable";
|
|
317
|
+
"missing-thread": "missing-thread";
|
|
314
318
|
"member-cap": "member-cap";
|
|
315
319
|
"depth-cap": "depth-cap";
|
|
316
320
|
"edge-cap": "edge-cap";
|
|
317
|
-
"missing-thread": "missing-thread";
|
|
318
|
-
unpriced: "unpriced";
|
|
319
321
|
retention: "retention";
|
|
320
322
|
"row-cap": "row-cap";
|
|
321
323
|
pagination: "pagination";
|
|
@@ -330,21 +332,21 @@ export declare const summaryRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
330
332
|
approximation: z.ZodObject<{
|
|
331
333
|
approximate: z.ZodBoolean;
|
|
332
334
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
333
|
-
"source-gap": "source-gap";
|
|
334
335
|
"closest-model": "closest-model";
|
|
335
336
|
"provider-default": "provider-default";
|
|
336
337
|
"model-attribution": "model-attribution";
|
|
337
338
|
"bucket-boundary": "bucket-boundary";
|
|
338
339
|
"missing-price": "missing-price";
|
|
340
|
+
"source-gap": "source-gap";
|
|
339
341
|
}>>;
|
|
340
342
|
rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
341
343
|
providerId: z.ZodString;
|
|
342
344
|
modelId: z.ZodString;
|
|
343
345
|
rateId: z.ZodNullable<z.ZodString>;
|
|
344
346
|
basis: z.ZodEnum<{
|
|
345
|
-
unpriced: "unpriced";
|
|
346
347
|
"closest-model": "closest-model";
|
|
347
348
|
"provider-default": "provider-default";
|
|
349
|
+
unpriced: "unpriced";
|
|
348
350
|
matched: "matched";
|
|
349
351
|
}>;
|
|
350
352
|
}, z.core.$strip>>>;
|
|
@@ -461,13 +463,13 @@ export declare const readResultSchema: z.ZodObject<{
|
|
|
461
463
|
}>;
|
|
462
464
|
coverageReasons: z.ZodArray<z.ZodEnum<{
|
|
463
465
|
"source-gap": "source-gap";
|
|
466
|
+
unpriced: "unpriced";
|
|
464
467
|
"root-unattested": "root-unattested";
|
|
465
468
|
"history-unavailable": "history-unavailable";
|
|
469
|
+
"missing-thread": "missing-thread";
|
|
466
470
|
"member-cap": "member-cap";
|
|
467
471
|
"depth-cap": "depth-cap";
|
|
468
472
|
"edge-cap": "edge-cap";
|
|
469
|
-
"missing-thread": "missing-thread";
|
|
470
|
-
unpriced: "unpriced";
|
|
471
473
|
retention: "retention";
|
|
472
474
|
"row-cap": "row-cap";
|
|
473
475
|
pagination: "pagination";
|
|
@@ -482,21 +484,21 @@ export declare const readResultSchema: z.ZodObject<{
|
|
|
482
484
|
approximation: z.ZodObject<{
|
|
483
485
|
approximate: z.ZodBoolean;
|
|
484
486
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
485
|
-
"source-gap": "source-gap";
|
|
486
487
|
"closest-model": "closest-model";
|
|
487
488
|
"provider-default": "provider-default";
|
|
488
489
|
"model-attribution": "model-attribution";
|
|
489
490
|
"bucket-boundary": "bucket-boundary";
|
|
490
491
|
"missing-price": "missing-price";
|
|
492
|
+
"source-gap": "source-gap";
|
|
491
493
|
}>>;
|
|
492
494
|
rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
493
495
|
providerId: z.ZodString;
|
|
494
496
|
modelId: z.ZodString;
|
|
495
497
|
rateId: z.ZodNullable<z.ZodString>;
|
|
496
498
|
basis: z.ZodEnum<{
|
|
497
|
-
unpriced: "unpriced";
|
|
498
499
|
"closest-model": "closest-model";
|
|
499
500
|
"provider-default": "provider-default";
|
|
501
|
+
unpriced: "unpriced";
|
|
500
502
|
matched: "matched";
|
|
501
503
|
}>;
|
|
502
504
|
}, z.core.$strip>>>;
|
|
@@ -557,13 +559,13 @@ export declare const readResultSchema: z.ZodObject<{
|
|
|
557
559
|
}>;
|
|
558
560
|
coverageReasons: z.ZodArray<z.ZodEnum<{
|
|
559
561
|
"source-gap": "source-gap";
|
|
562
|
+
unpriced: "unpriced";
|
|
560
563
|
"root-unattested": "root-unattested";
|
|
561
564
|
"history-unavailable": "history-unavailable";
|
|
565
|
+
"missing-thread": "missing-thread";
|
|
562
566
|
"member-cap": "member-cap";
|
|
563
567
|
"depth-cap": "depth-cap";
|
|
564
568
|
"edge-cap": "edge-cap";
|
|
565
|
-
"missing-thread": "missing-thread";
|
|
566
|
-
unpriced: "unpriced";
|
|
567
569
|
retention: "retention";
|
|
568
570
|
"row-cap": "row-cap";
|
|
569
571
|
pagination: "pagination";
|
|
@@ -578,21 +580,21 @@ export declare const readResultSchema: z.ZodObject<{
|
|
|
578
580
|
approximation: z.ZodObject<{
|
|
579
581
|
approximate: z.ZodBoolean;
|
|
580
582
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
581
|
-
"source-gap": "source-gap";
|
|
582
583
|
"closest-model": "closest-model";
|
|
583
584
|
"provider-default": "provider-default";
|
|
584
585
|
"model-attribution": "model-attribution";
|
|
585
586
|
"bucket-boundary": "bucket-boundary";
|
|
586
587
|
"missing-price": "missing-price";
|
|
588
|
+
"source-gap": "source-gap";
|
|
587
589
|
}>>;
|
|
588
590
|
rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
589
591
|
providerId: z.ZodString;
|
|
590
592
|
modelId: z.ZodString;
|
|
591
593
|
rateId: z.ZodNullable<z.ZodString>;
|
|
592
594
|
basis: z.ZodEnum<{
|
|
593
|
-
unpriced: "unpriced";
|
|
594
595
|
"closest-model": "closest-model";
|
|
595
596
|
"provider-default": "provider-default";
|
|
597
|
+
unpriced: "unpriced";
|
|
596
598
|
matched: "matched";
|
|
597
599
|
}>;
|
|
598
600
|
}, z.core.$strip>>>;
|
|
@@ -646,8 +648,8 @@ export declare const detailInputSchema: z.ZodObject<{
|
|
|
646
648
|
}>;
|
|
647
649
|
includeArchived: z.ZodOptional<z.ZodBoolean>;
|
|
648
650
|
axis: z.ZodEnum<{
|
|
649
|
-
model: "model";
|
|
650
651
|
time: "time";
|
|
652
|
+
model: "model";
|
|
651
653
|
}>;
|
|
652
654
|
window: z.ZodEnum<{
|
|
653
655
|
m20: "m20";
|
|
@@ -672,21 +674,21 @@ export declare const detailRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
672
674
|
approximation: z.ZodObject<{
|
|
673
675
|
approximate: z.ZodBoolean;
|
|
674
676
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
675
|
-
"source-gap": "source-gap";
|
|
676
677
|
"closest-model": "closest-model";
|
|
677
678
|
"provider-default": "provider-default";
|
|
678
679
|
"model-attribution": "model-attribution";
|
|
679
680
|
"bucket-boundary": "bucket-boundary";
|
|
680
681
|
"missing-price": "missing-price";
|
|
682
|
+
"source-gap": "source-gap";
|
|
681
683
|
}>>;
|
|
682
684
|
rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
683
685
|
providerId: z.ZodString;
|
|
684
686
|
modelId: z.ZodString;
|
|
685
687
|
rateId: z.ZodNullable<z.ZodString>;
|
|
686
688
|
basis: z.ZodEnum<{
|
|
687
|
-
unpriced: "unpriced";
|
|
688
689
|
"closest-model": "closest-model";
|
|
689
690
|
"provider-default": "provider-default";
|
|
691
|
+
unpriced: "unpriced";
|
|
690
692
|
matched: "matched";
|
|
691
693
|
}>;
|
|
692
694
|
}, z.core.$strip>>>;
|
|
@@ -705,21 +707,21 @@ export declare const detailRowSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
705
707
|
approximation: z.ZodObject<{
|
|
706
708
|
approximate: z.ZodBoolean;
|
|
707
709
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
708
|
-
"source-gap": "source-gap";
|
|
709
710
|
"closest-model": "closest-model";
|
|
710
711
|
"provider-default": "provider-default";
|
|
711
712
|
"model-attribution": "model-attribution";
|
|
712
713
|
"bucket-boundary": "bucket-boundary";
|
|
713
714
|
"missing-price": "missing-price";
|
|
715
|
+
"source-gap": "source-gap";
|
|
714
716
|
}>>;
|
|
715
717
|
rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
716
718
|
providerId: z.ZodString;
|
|
717
719
|
modelId: z.ZodString;
|
|
718
720
|
rateId: z.ZodNullable<z.ZodString>;
|
|
719
721
|
basis: z.ZodEnum<{
|
|
720
|
-
unpriced: "unpriced";
|
|
721
722
|
"closest-model": "closest-model";
|
|
722
723
|
"provider-default": "provider-default";
|
|
724
|
+
unpriced: "unpriced";
|
|
723
725
|
matched: "matched";
|
|
724
726
|
}>;
|
|
725
727
|
}, z.core.$strip>>>;
|
|
@@ -733,8 +735,8 @@ export declare const detailResultSchema: z.ZodObject<{
|
|
|
733
735
|
family: "family";
|
|
734
736
|
}>;
|
|
735
737
|
axis: z.ZodEnum<{
|
|
736
|
-
model: "model";
|
|
737
738
|
time: "time";
|
|
739
|
+
model: "model";
|
|
738
740
|
}>;
|
|
739
741
|
window: z.ZodEnum<{
|
|
740
742
|
m20: "m20";
|
|
@@ -754,13 +756,13 @@ export declare const detailResultSchema: z.ZodObject<{
|
|
|
754
756
|
}>;
|
|
755
757
|
coverageReasons: z.ZodArray<z.ZodEnum<{
|
|
756
758
|
"source-gap": "source-gap";
|
|
759
|
+
unpriced: "unpriced";
|
|
757
760
|
"root-unattested": "root-unattested";
|
|
758
761
|
"history-unavailable": "history-unavailable";
|
|
762
|
+
"missing-thread": "missing-thread";
|
|
759
763
|
"member-cap": "member-cap";
|
|
760
764
|
"depth-cap": "depth-cap";
|
|
761
765
|
"edge-cap": "edge-cap";
|
|
762
|
-
"missing-thread": "missing-thread";
|
|
763
|
-
unpriced: "unpriced";
|
|
764
766
|
retention: "retention";
|
|
765
767
|
"row-cap": "row-cap";
|
|
766
768
|
pagination: "pagination";
|
|
@@ -770,21 +772,21 @@ export declare const detailResultSchema: z.ZodObject<{
|
|
|
770
772
|
approximation: z.ZodObject<{
|
|
771
773
|
approximate: z.ZodBoolean;
|
|
772
774
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
773
|
-
"source-gap": "source-gap";
|
|
774
775
|
"closest-model": "closest-model";
|
|
775
776
|
"provider-default": "provider-default";
|
|
776
777
|
"model-attribution": "model-attribution";
|
|
777
778
|
"bucket-boundary": "bucket-boundary";
|
|
778
779
|
"missing-price": "missing-price";
|
|
780
|
+
"source-gap": "source-gap";
|
|
779
781
|
}>>;
|
|
780
782
|
rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
781
783
|
providerId: z.ZodString;
|
|
782
784
|
modelId: z.ZodString;
|
|
783
785
|
rateId: z.ZodNullable<z.ZodString>;
|
|
784
786
|
basis: z.ZodEnum<{
|
|
785
|
-
unpriced: "unpriced";
|
|
786
787
|
"closest-model": "closest-model";
|
|
787
788
|
"provider-default": "provider-default";
|
|
789
|
+
unpriced: "unpriced";
|
|
788
790
|
matched: "matched";
|
|
789
791
|
}>;
|
|
790
792
|
}, z.core.$strip>>>;
|
|
@@ -812,21 +814,21 @@ export declare const detailResultSchema: z.ZodObject<{
|
|
|
812
814
|
approximation: z.ZodObject<{
|
|
813
815
|
approximate: z.ZodBoolean;
|
|
814
816
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
815
|
-
"source-gap": "source-gap";
|
|
816
817
|
"closest-model": "closest-model";
|
|
817
818
|
"provider-default": "provider-default";
|
|
818
819
|
"model-attribution": "model-attribution";
|
|
819
820
|
"bucket-boundary": "bucket-boundary";
|
|
820
821
|
"missing-price": "missing-price";
|
|
822
|
+
"source-gap": "source-gap";
|
|
821
823
|
}>>;
|
|
822
824
|
rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
823
825
|
providerId: z.ZodString;
|
|
824
826
|
modelId: z.ZodString;
|
|
825
827
|
rateId: z.ZodNullable<z.ZodString>;
|
|
826
828
|
basis: z.ZodEnum<{
|
|
827
|
-
unpriced: "unpriced";
|
|
828
829
|
"closest-model": "closest-model";
|
|
829
830
|
"provider-default": "provider-default";
|
|
831
|
+
unpriced: "unpriced";
|
|
830
832
|
matched: "matched";
|
|
831
833
|
}>;
|
|
832
834
|
}, z.core.$strip>>>;
|
|
@@ -845,21 +847,21 @@ export declare const detailResultSchema: z.ZodObject<{
|
|
|
845
847
|
approximation: z.ZodObject<{
|
|
846
848
|
approximate: z.ZodBoolean;
|
|
847
849
|
reasons: z.ZodArray<z.ZodEnum<{
|
|
848
|
-
"source-gap": "source-gap";
|
|
849
850
|
"closest-model": "closest-model";
|
|
850
851
|
"provider-default": "provider-default";
|
|
851
852
|
"model-attribution": "model-attribution";
|
|
852
853
|
"bucket-boundary": "bucket-boundary";
|
|
853
854
|
"missing-price": "missing-price";
|
|
855
|
+
"source-gap": "source-gap";
|
|
854
856
|
}>>;
|
|
855
857
|
rates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
856
858
|
providerId: z.ZodString;
|
|
857
859
|
modelId: z.ZodString;
|
|
858
860
|
rateId: z.ZodNullable<z.ZodString>;
|
|
859
861
|
basis: z.ZodEnum<{
|
|
860
|
-
unpriced: "unpriced";
|
|
861
862
|
"closest-model": "closest-model";
|
|
862
863
|
"provider-default": "provider-default";
|
|
864
|
+
unpriced: "unpriced";
|
|
863
865
|
matched: "matched";
|
|
864
866
|
}>;
|
|
865
867
|
}, z.core.$strip>>>;
|
|
@@ -876,6 +878,7 @@ export declare const capabilitiesSchema: z.ZodObject<{
|
|
|
876
878
|
summary: z.ZodLiteral<true>;
|
|
877
879
|
series: z.ZodBoolean;
|
|
878
880
|
detail: z.ZodBoolean;
|
|
881
|
+
recentSnapshotV1: z.ZodOptional<z.ZodBoolean>;
|
|
879
882
|
}, z.core.$strip>;
|
|
880
883
|
export declare const describeV1Schema: z.ZodObject<{
|
|
881
884
|
protocol: z.ZodLiteral<"bb-thread-metrics">;
|
|
@@ -884,6 +887,7 @@ export declare const describeV1Schema: z.ZodObject<{
|
|
|
884
887
|
summary: z.ZodLiteral<true>;
|
|
885
888
|
series: z.ZodBoolean;
|
|
886
889
|
detail: z.ZodBoolean;
|
|
890
|
+
recentSnapshotV1: z.ZodOptional<z.ZodBoolean>;
|
|
887
891
|
}, z.core.$strip>;
|
|
888
892
|
}, z.core.$loose>;
|
|
889
893
|
export type ReadInput = z.infer<typeof readInputSchema>;
|