@kong-ui-public/analytics-utilities 9.9.0 → 9.9.1-pr.2221.17d4a7fef.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.
@@ -186,11 +186,11 @@ const $s = [
186
186
  "12H",
187
187
  "24H",
188
188
  "7D"
189
- ], to = ["basic", "advanced", "ai"], Oa = {
189
+ ], to = ["basic", "api_usage", "llm_usage"], Oa = {
190
190
  basic: new Set(oe),
191
- advanced: new Set(ue),
192
- ai: new Set(ce)
193
- }, ro = (e, t) => t.filter((r) => Oa[e].has(r.field)), no = [
191
+ api_usage: new Set(ue),
192
+ llm_usage: new Set(ce)
193
+ }, ro = (e, t) => t.filter((r) => Oa[e].has(r.field)), Sa = [
194
194
  "horizontal_bar",
195
195
  "vertical_bar",
196
196
  "gauge",
@@ -215,7 +215,7 @@ const $s = [
215
215
  additionalProperties: {
216
216
  type: "string"
217
217
  }
218
- }, Sa = {
218
+ }, gr = {
219
219
  type: "object",
220
220
  properties: {
221
221
  type: {
@@ -228,7 +228,7 @@ const $s = [
228
228
  },
229
229
  required: ["type", "id"],
230
230
  additionalProperties: !1
231
- }, va = {
231
+ }, _r = {
232
232
  type: "object",
233
233
  properties: {
234
234
  type: {
@@ -245,7 +245,7 @@ const $s = [
245
245
  },
246
246
  required: ["type"],
247
247
  additionalProperties: !1
248
- }, Ma = {
248
+ }, wr = {
249
249
  type: "object",
250
250
  properties: {
251
251
  type: {
@@ -268,7 +268,7 @@ const $s = [
268
268
  },
269
269
  required: ["type"],
270
270
  additionalProperties: !1
271
- }, xa = {
271
+ }, br = {
272
272
  type: "object",
273
273
  properties: {
274
274
  type: {
@@ -291,7 +291,7 @@ const $s = [
291
291
  },
292
292
  required: ["type"],
293
293
  additionalProperties: !1
294
- }, Ea = {
294
+ }, Tr = {
295
295
  type: "object",
296
296
  properties: {
297
297
  type: {
@@ -303,7 +303,7 @@ const $s = [
303
303
  },
304
304
  required: ["type"],
305
305
  additionalProperties: !1
306
- }, Pa = {
306
+ }, Dr = {
307
307
  type: "object",
308
308
  properties: {
309
309
  chartTitle: $,
@@ -321,7 +321,7 @@ const $s = [
321
321
  },
322
322
  required: ["type"],
323
323
  additionalProperties: !1
324
- }, Na = {
324
+ }, Or = {
325
325
  type: "object",
326
326
  properties: {
327
327
  chartTitle: $,
@@ -341,7 +341,7 @@ const $s = [
341
341
  },
342
342
  required: ["type"],
343
343
  additionalProperties: !1
344
- }, Ca = {
344
+ }, Sr = {
345
345
  type: "object",
346
346
  properties: {
347
347
  type: {
@@ -355,7 +355,7 @@ const $s = [
355
355
  },
356
356
  required: ["type"],
357
357
  additionalProperties: !1
358
- }, Ia = {
358
+ }, va = {
359
359
  type: "object",
360
360
  properties: {
361
361
  tz: {
@@ -379,7 +379,7 @@ const $s = [
379
379
  "time_range"
380
380
  ],
381
381
  additionalProperties: !1
382
- }, ka = {
382
+ }, Ma = {
383
383
  type: "object",
384
384
  description: "A duration representing an exact start and end time.",
385
385
  properties: {
@@ -415,8 +415,8 @@ const $s = [
415
415
  type: "object",
416
416
  description: "The time range to query.",
417
417
  anyOf: [
418
- Ia,
419
- ka
418
+ va,
419
+ Ma
420
420
  ],
421
421
  default: {
422
422
  type: "relative",
@@ -497,7 +497,7 @@ const $s = [
497
497
  }
498
498
  ]
499
499
  }
500
- }), Ya = {
500
+ }), vr = {
501
501
  type: "object",
502
502
  description: "A query to launch at the advanced explore API",
503
503
  properties: {
@@ -514,7 +514,7 @@ const $s = [
514
514
  },
515
515
  required: ["datasource"],
516
516
  additionalProperties: !1
517
- }, Ra = {
517
+ }, Mr = {
518
518
  type: "object",
519
519
  description: "A query to launch at the basic explore API",
520
520
  properties: {
@@ -531,7 +531,7 @@ const $s = [
531
531
  },
532
532
  required: ["datasource"],
533
533
  additionalProperties: !1
534
- }, qa = {
534
+ }, xr = {
535
535
  type: "object",
536
536
  description: "A query to launch at the AI explore API",
537
537
  properties: {
@@ -548,28 +548,28 @@ const $s = [
548
548
  },
549
549
  required: ["datasource"],
550
550
  additionalProperties: !1
551
- }, Ha = {
552
- anyOf: [Ya, Ra, qa]
553
- }, ja = {
551
+ }, Er = {
552
+ anyOf: [vr, Mr, xr]
553
+ }, Pr = {
554
554
  type: "object",
555
555
  properties: {
556
- query: Ha,
556
+ query: Er,
557
557
  chart: {
558
558
  anyOf: [
559
- va,
560
- xa,
561
- Ea,
562
- Ma,
563
- Na,
564
- Pa,
565
- Sa,
566
- Ca
559
+ _r,
560
+ br,
561
+ Tr,
562
+ wr,
563
+ Or,
564
+ Dr,
565
+ gr,
566
+ Sr
567
567
  ]
568
568
  }
569
569
  },
570
570
  required: ["query", "chart"],
571
571
  additionalProperties: !1
572
- }, Aa = {
572
+ }, Nr = {
573
573
  type: "object",
574
574
  properties: {
575
575
  position: {
@@ -606,11 +606,11 @@ const $s = [
606
606
  },
607
607
  required: ["position", "size"],
608
608
  additionalProperties: !1
609
- }, Ga = {
609
+ }, Cr = {
610
610
  type: "object",
611
611
  properties: {
612
- definition: ja,
613
- layout: Aa,
612
+ definition: Pr,
613
+ layout: Nr,
614
614
  id: {
615
615
  type: "string",
616
616
  description: "Unique identifier for the tile. If not provided, one will be generated."
@@ -618,12 +618,12 @@ const $s = [
618
618
  },
619
619
  required: ["definition", "layout"],
620
620
  additionalProperties: !1
621
- }, ao = {
621
+ }, xa = {
622
622
  type: "object",
623
623
  properties: {
624
624
  tiles: {
625
625
  type: "array",
626
- items: Ga
626
+ items: Cr
627
627
  },
628
628
  tileHeight: {
629
629
  type: "number",
@@ -647,7 +647,26 @@ const $s = [
647
647
  },
648
648
  required: ["tiles"],
649
649
  additionalProperties: !1
650
- }, Fa = [
650
+ }, no = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
651
+ __proto__: null,
652
+ aiQuerySchema: xr,
653
+ barChartSchema: _r,
654
+ basicQuerySchema: Mr,
655
+ dashboardConfigSchema: xa,
656
+ dashboardTileTypes: Sa,
657
+ donutChartSchema: Tr,
658
+ exploreV4QuerySchema: vr,
659
+ gaugeChartSchema: br,
660
+ metricCardSchema: Or,
661
+ singleValueSchema: Sr,
662
+ slottableSchema: gr,
663
+ tileConfigSchema: Cr,
664
+ tileDefinitionSchema: Pr,
665
+ tileLayoutSchema: Nr,
666
+ timeseriesChartSchema: wr,
667
+ topNTableSchema: Dr,
668
+ validDashboardQuery: Er
669
+ }, Symbol.toStringTag, { value: "Module" })), ao = [
651
670
  "horizontal_bar",
652
671
  "vertical_bar",
653
672
  "gauge",
@@ -662,9 +681,9 @@ const $s = [
662
681
  type: "string"
663
682
  }, V = {
664
683
  type: "string"
665
- }, gr = {
684
+ }, Ir = {
666
685
  type: "boolean"
667
- }, _r = {
686
+ }, kr = {
668
687
  type: ["object", "array"],
669
688
  items: {
670
689
  type: "string"
@@ -672,7 +691,7 @@ const $s = [
672
691
  additionalProperties: {
673
692
  type: "string"
674
693
  }
675
- }, wr = {
694
+ }, Ea = {
676
695
  type: "object",
677
696
  properties: {
678
697
  type: {
@@ -685,7 +704,7 @@ const $s = [
685
704
  },
686
705
  required: ["type", "id"],
687
706
  additionalProperties: !1
688
- }, br = {
707
+ }, Pa = {
689
708
  type: "object",
690
709
  properties: {
691
710
  type: {
@@ -695,14 +714,14 @@ const $s = [
695
714
  stacked: {
696
715
  type: "boolean"
697
716
  },
698
- chart_dataset_colors: _r,
717
+ chart_dataset_colors: kr,
699
718
  synthetics_data_key: de,
700
719
  chart_title: V,
701
- allow_csv_export: gr
720
+ allow_csv_export: Ir
702
721
  },
703
722
  required: ["type"],
704
723
  additionalProperties: !1
705
- }, Tr = {
724
+ }, Na = {
706
725
  type: "object",
707
726
  properties: {
708
727
  type: {
@@ -718,14 +737,14 @@ const $s = [
718
737
  type: "number"
719
738
  }
720
739
  },
721
- chart_dataset_colors: _r,
740
+ chart_dataset_colors: kr,
722
741
  synthetics_data_key: de,
723
742
  chart_title: V,
724
- allow_csv_export: gr
743
+ allow_csv_export: Ir
725
744
  },
726
745
  required: ["type"],
727
746
  additionalProperties: !1
728
- }, Dr = {
747
+ }, Ca = {
729
748
  type: "object",
730
749
  properties: {
731
750
  type: {
@@ -748,7 +767,7 @@ const $s = [
748
767
  },
749
768
  required: ["type"],
750
769
  additionalProperties: !1
751
- }, Or = {
770
+ }, Ia = {
752
771
  type: "object",
753
772
  properties: {
754
773
  type: {
@@ -760,7 +779,7 @@ const $s = [
760
779
  },
761
780
  required: ["type"],
762
781
  additionalProperties: !1
763
- }, Sr = {
782
+ }, ka = {
764
783
  type: "object",
765
784
  properties: {
766
785
  chart_title: V,
@@ -778,7 +797,7 @@ const $s = [
778
797
  },
779
798
  required: ["type"],
780
799
  additionalProperties: !1
781
- }, vr = {
800
+ }, Ya = {
782
801
  type: "object",
783
802
  properties: {
784
803
  chart_title: V,
@@ -798,7 +817,7 @@ const $s = [
798
817
  },
799
818
  required: ["type"],
800
819
  additionalProperties: !1
801
- }, Mr = {
820
+ }, Ra = {
802
821
  type: "object",
803
822
  properties: {
804
823
  type: {
@@ -812,7 +831,7 @@ const $s = [
812
831
  },
813
832
  required: ["type"],
814
833
  additionalProperties: !1
815
- }, Wa = {
834
+ }, qa = {
816
835
  type: "object",
817
836
  properties: {
818
837
  tz: {
@@ -836,7 +855,7 @@ const $s = [
836
855
  "time_range"
837
856
  ],
838
857
  additionalProperties: !1
839
- }, La = {
858
+ }, Ha = {
840
859
  type: "object",
841
860
  description: "A duration representing an exact start and end time.",
842
861
  properties: {
@@ -872,8 +891,8 @@ const $s = [
872
891
  type: "object",
873
892
  description: "The time range to query.",
874
893
  anyOf: [
875
- Wa,
876
- La
894
+ qa,
895
+ Ha
877
896
  ],
878
897
  default: {
879
898
  type: "relative",
@@ -954,7 +973,7 @@ const $s = [
954
973
  }
955
974
  ]
956
975
  }
957
- }), xr = {
976
+ }), ja = {
958
977
  type: "object",
959
978
  description: "A query to launch at the advanced explore API",
960
979
  properties: {
@@ -971,7 +990,7 @@ const $s = [
971
990
  },
972
991
  required: ["datasource"],
973
992
  additionalProperties: !1
974
- }, Er = {
993
+ }, Aa = {
975
994
  type: "object",
976
995
  description: "A query to launch at the basic explore API",
977
996
  properties: {
@@ -988,7 +1007,7 @@ const $s = [
988
1007
  },
989
1008
  required: ["datasource"],
990
1009
  additionalProperties: !1
991
- }, Pr = {
1010
+ }, Ga = {
992
1011
  type: "object",
993
1012
  description: "A query to launch at the AI explore API",
994
1013
  properties: {
@@ -1005,28 +1024,28 @@ const $s = [
1005
1024
  },
1006
1025
  required: ["datasource"],
1007
1026
  additionalProperties: !1
1008
- }, Nr = {
1009
- anyOf: [xr, Er, Pr]
1010
- }, Cr = {
1027
+ }, Fa = {
1028
+ anyOf: [ja, Aa, Ga]
1029
+ }, Wa = {
1011
1030
  type: "object",
1012
1031
  properties: {
1013
- query: Nr,
1032
+ query: Fa,
1014
1033
  chart: {
1015
1034
  anyOf: [
1016
- br,
1017
- Dr,
1018
- Or,
1019
- Tr,
1020
- vr,
1021
- Sr,
1022
- wr,
1023
- Mr
1035
+ Pa,
1036
+ Ca,
1037
+ Ia,
1038
+ Na,
1039
+ Ya,
1040
+ ka,
1041
+ Ea,
1042
+ Ra
1024
1043
  ]
1025
1044
  }
1026
1045
  },
1027
1046
  required: ["query", "chart"],
1028
1047
  additionalProperties: !1
1029
- }, Ir = {
1048
+ }, La = {
1030
1049
  type: "object",
1031
1050
  properties: {
1032
1051
  position: {
@@ -1063,15 +1082,15 @@ const $s = [
1063
1082
  },
1064
1083
  required: ["position", "size"],
1065
1084
  additionalProperties: !1
1066
- }, kr = {
1085
+ }, Ua = {
1067
1086
  type: "object",
1068
1087
  properties: {
1069
1088
  type: {
1070
1089
  type: "string",
1071
1090
  enum: ["chart"]
1072
1091
  },
1073
- definition: Cr,
1074
- layout: Ir,
1092
+ definition: Wa,
1093
+ layout: La,
1075
1094
  id: {
1076
1095
  type: "string",
1077
1096
  description: "Unique identifier for the tile. If not provided, one will be generated."
@@ -1079,7 +1098,7 @@ const $s = [
1079
1098
  },
1080
1099
  required: ["type", "definition", "layout"],
1081
1100
  additionalProperties: !1
1082
- }, Ua = {
1101
+ }, io = {
1083
1102
  type: "object",
1084
1103
  properties: {
1085
1104
  version: {
@@ -1088,7 +1107,7 @@ const $s = [
1088
1107
  },
1089
1108
  tiles: {
1090
1109
  type: "array",
1091
- items: kr
1110
+ items: Ua
1092
1111
  },
1093
1112
  tile_height: {
1094
1113
  type: "number",
@@ -1098,26 +1117,7 @@ const $s = [
1098
1117
  },
1099
1118
  required: ["version", "tiles"],
1100
1119
  additionalProperties: !1
1101
- }, io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1102
- __proto__: null,
1103
- apiUsageQuerySchema: xr,
1104
- barChartSchema: br,
1105
- basicQuerySchema: Er,
1106
- dashboardConfigSchema: Ua,
1107
- dashboardTileTypes: Fa,
1108
- donutChartSchema: Or,
1109
- gaugeChartSchema: Dr,
1110
- llmUsageSchema: Pr,
1111
- metricCardSchema: vr,
1112
- singleValueSchema: Mr,
1113
- slottableSchema: wr,
1114
- tileConfigSchema: kr,
1115
- tileDefinitionSchema: Cr,
1116
- tileLayoutSchema: Ir,
1117
- timeseriesChartSchema: Tr,
1118
- topNTableSchema: Sr,
1119
- validDashboardQuery: Nr
1120
- }, Symbol.toStringTag, { value: "Module" })), Yr = 6048e5, za = 864e5, $a = 60, Va = 3600, Lt = Symbol.for("constructDateFrom");
1120
+ }, Yr = 6048e5, za = 864e5, $a = 60, Va = 3600, Lt = Symbol.for("constructDateFrom");
1121
1121
  function I(e, t) {
1122
1122
  return typeof e == "function" ? e(t) : e && typeof e == "object" && Lt in e ? e[Lt](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
1123
1123
  }
@@ -3913,21 +3913,20 @@ export {
3913
3913
  lo as TimeseriesQueryTime,
3914
3914
  Ys as UnaryQueryTime,
3915
3915
  mr as aiExploreAggregations,
3916
- qa as aiQuerySchema,
3917
- va as barChartSchema,
3916
+ ja as apiUsageQuerySchema,
3917
+ Pa as barChartSchema,
3918
3918
  Be as basicExploreAggregations,
3919
- Ra as basicQuerySchema,
3919
+ Aa as basicQuerySchema,
3920
3920
  zr as ceilToNearestTimeGrain,
3921
- ao as dashboardConfigSchema,
3922
- io as dashboardSchemaV2,
3923
- no as dashboardTileTypes,
3921
+ io as dashboardConfigSchema,
3922
+ ao as dashboardTileTypes,
3923
+ no as dashboardsSchemaV1,
3924
3924
  Oa as datasourceToFilterableDimensions,
3925
3925
  ho as datePickerSelectionToTimeframe,
3926
- Ea as donutChartSchema,
3926
+ Ia as donutChartSchema,
3927
3927
  Ls as dstOffsetHours,
3928
3928
  hr as exploreAggregations,
3929
3929
  lr as exploreFilterTypesV2,
3930
- Ya as exploreV4QuerySchema,
3931
3930
  ce as filterableAiExploreDimensions,
3932
3931
  oe as filterableBasicExploreDimensions,
3933
3932
  ue as filterableExploreDimensions,
@@ -3938,14 +3937,15 @@ export {
3938
3937
  so as formatISOTimeWithTZ,
3939
3938
  cr as formatTime,
3940
3939
  oo as formatTimeRange,
3941
- xa as gaugeChartSchema,
3940
+ Ca as gaugeChartSchema,
3942
3941
  wo as generateCrossSectionalData,
3943
3942
  _o as generateMultipleMetricTimeSeriesData,
3944
3943
  go as generateSingleMetricTimeSeriesData,
3945
3944
  uo as granularitiesToOptions,
3946
3945
  Is as granularityMsToQuery,
3947
3946
  Ze as granularityValues,
3948
- Na as metricCardSchema,
3947
+ Ga as llmUsageSchema,
3948
+ Ya as metricCardSchema,
3949
3949
  co as msToGranularity,
3950
3950
  to as queryDatasources,
3951
3951
  Je as queryableAiExploreDimensions,
@@ -3962,17 +3962,17 @@ export {
3962
3962
  Vs as requestFilterTypeEqualsV2,
3963
3963
  Xs as requestFilterTypeMetricV2,
3964
3964
  Qs as requestFilterTypeWildcardV2,
3965
- Ca as singleValueSchema,
3966
- Sa as slottableSchema,
3965
+ Ra as singleValueSchema,
3966
+ Ea as slottableSchema,
3967
3967
  ro as stripUnknownFilters,
3968
- Ga as tileConfigSchema,
3969
- ja as tileDefinitionSchema,
3970
- Aa as tileLayoutSchema,
3968
+ Ua as tileConfigSchema,
3969
+ Wa as tileDefinitionSchema,
3970
+ La as tileLayoutSchema,
3971
3971
  Zs as timeRangeTypeV2,
3972
3972
  mo as timeframeToDatepickerSelection,
3973
3973
  yo as timeframeToDatepickerTimeperiod,
3974
- Ma as timeseriesChartSchema,
3975
- Pa as topNTableSchema,
3976
- Ha as validDashboardQuery
3974
+ Na as timeseriesChartSchema,
3975
+ ka as topNTableSchema,
3976
+ Fa as validDashboardQuery
3977
3977
  };
3978
3978
  //# sourceMappingURL=vitals-utilities.es.js.map