@grafana/plugin-types 0.0.51 → 0.0.53

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.
@@ -188,6 +188,8 @@ export interface useMultipleEntitiesProps extends UseMultiEntityTypeParams {
188
188
  additionalMatchers?: EntityFilterPropertyMatcher[];
189
189
  enabled: boolean;
190
190
  matchAllNames?: boolean;
191
+ start: number;
192
+ end: number;
191
193
  }
192
194
  export interface UseEntityParams {
193
195
  entityName?: string;
@@ -199,10 +201,17 @@ export interface UseEntityParams {
199
201
  export interface UseMultiEntityTypeParams {
200
202
  entityName?: string;
201
203
  entityType?: string | string[];
202
- start: number;
203
- end: number;
204
+ start: number | string;
205
+ end: number | string;
204
206
  scope?: Scope;
205
207
  }
208
+ export interface MultiEntityTypeCircleProps extends UseMultiEntityTypeParams {
209
+ withIcon: boolean;
210
+ size?: number;
211
+ fallback?: React.ReactElement;
212
+ matchAllNames?: boolean;
213
+ additionalMatchers?: EntityFilterPropertyMatcher[];
214
+ }
206
215
  export interface Scope {
207
216
  env?: string;
208
217
  site?: string;
@@ -40,6 +40,24 @@ export interface TimeRange {
40
40
  to: DateTime;
41
41
  raw: RawTimeRange;
42
42
  }
43
+ /**
44
+ * Union type of all supported service identifiers.
45
+ * Use this type to ensure type-safe service selection when passing `serviceId` to `ServiceDashboardExtensionProps`.
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * import { ServiceType, ServiceDashboardExtensionProps } from '@grafana/plugin-types/grafana-csp-app';
50
+ *
51
+ * const myService: ServiceType = 'AWS/EC2';
52
+ *
53
+ * const props: ServiceDashboardExtensionProps = {
54
+ * serviceId: myService,
55
+ * initialTimeRange: { from: 'now-1h', to: 'now' },
56
+ * // ...
57
+ * };
58
+ * ```
59
+ */
60
+ export type ServiceType = "AWS/EC2" | "AWS/RDS" | "AWS/S3" | "AWS/NetworkELB" | "AWS/ApplicationELB" | "AWS/SQS" | "AWS/Lambda" | "AWS/ECS" | "AWS/ApiGateway" | "AWS/DynamoDB" | "AWS/ElastiCache" | "AWS/Route53Resolver" | "AWS/BedrockAgentcore" | "AWS/Route53" | "Azure/PostgreSQLFlexibleServers" | "Azure/MySQLFlexibleServer" | "GCP/CloudSQL" | "GCP/AlloyDB";
43
61
  export type ServiceDashboardMetadata = {
44
62
  instanceId?: string;
45
63
  job?: string;
@@ -55,6 +73,11 @@ export type ServiceDashboardExtensionProps = {
55
73
  lokiDatasource?: string;
56
74
  initialTimeRange: TimeRange;
57
75
  onTimeRangeChange?: (timeRange: TimeRange) => void;
76
+ /**
77
+ * The service identifier for the dashboard to display.
78
+ * Use the `ServiceType` type for a list of valid service identifiers.
79
+ * @see {@link ServiceType}
80
+ */
58
81
  serviceId: string;
59
82
  provider?: string;
60
83
  metadata?: ServiceDashboardMetadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-types",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "description": "NPM package consisting of various Grafana plugins exposed types.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Grafana Labs",