@grafana/k6-test-builder 0.5.4 → 0.6.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/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { FocusEventHandler, AnchorHTMLAttributes, ReactNode, ElementType, ReactElement, FunctionComponent } from "react";
2
2
  import { InvalidArchiveError } from "har-to-k6";
3
3
  import { ThemeOptions } from "@material-ui/core/styles/createTheme";
4
+ import { GrafanaTheme2 } from "@grafana/data";
4
5
  /** @todo move this type */
5
6
  interface K6LoadZone {
6
7
  k6_load_zone_id: string;
@@ -264,25 +265,32 @@ interface TestBuilderStandaloneProps {
264
265
  disableAPM?: boolean;
265
266
  }
266
267
  export function TestBuilder({ loading, saving, k6Test, hasCloudExecution, availableLoadZones, DocsLinkComponent, onViewChange, StagesVirtualizationComponent, ScriptEditorComponent, TestBuilderIconComponent, readonlyScriptScenarios, apmConfigs, hasCloudAPM, disableAPM, }: TestBuilderStandaloneProps): JSX.Element;
267
- interface TestMetaInformationProps {
268
- className?: string;
269
- }
270
- export const TestMetaInformation: FunctionComponent<TestMetaInformationProps>;
271
- interface StatusMessageProps {
272
- text?: string | ReactNode;
273
- level: TestBuilderStatus;
268
+ interface Label {
269
+ name: string;
270
+ value: string;
274
271
  }
275
- export const StatusMessage: FunctionComponent<StatusMessageProps>;
276
- export const StatusBar: FunctionComponent<{
277
- className?: string;
278
- }>;
279
- export function useTestBuilderName(): [string, (name: string) => void];
280
- interface MuiThemeProviderProps {
281
- children: ReactNode;
282
- inherit?: boolean;
283
- theme?: ThemeOptions;
272
+ interface Probe {
273
+ id: number;
274
+ tenantId: number;
275
+ commit: string;
276
+ buildstamp: string;
277
+ name: string;
278
+ created: number;
279
+ modified: number;
280
+ public: boolean;
281
+ latitude: number;
282
+ longitude: number;
283
+ region: string;
284
+ online: boolean;
285
+ onlineChange: number;
286
+ labels: Label[];
287
+ version: string;
288
+ deprecated: boolean;
284
289
  }
285
- export function TestBuilderThemeProvider({ children, theme: _theme }: MuiThemeProviderProps): JSX.Element;
290
+ export type SyntheticsBuilderSubmit = (values: TestBuilderTest & {
291
+ script: string;
292
+ }, errors: Error | InvalidArchiveError | undefined) => void;
293
+ export function useGetUnsavedChanges(): [boolean, (value: boolean) => void];
286
294
  declare const grafanaThemeDark: {
287
295
  name: string;
288
296
  isDark: boolean;
@@ -1335,6 +1343,38 @@ declare const grafanaThemeLight: {
1335
1343
  };
1336
1344
  type GrafanaTheme = typeof grafanaThemeDark | typeof grafanaThemeLight;
1337
1345
  export const grafanaThemeToMuiTheme: (theme: GrafanaTheme) => ThemeOptions;
1346
+ interface SyntheticsBuilderStandaloneProps {
1347
+ loading?: boolean;
1348
+ saving: boolean;
1349
+ onSubmit: (values: any, errors: any) => void;
1350
+ k6Test?: TestBuilderTest;
1351
+ availableProbes?: Probe[];
1352
+ DocsLinkComponent?: ElementType<DocsLinkProps>;
1353
+ onViewChange?: (view: string) => void;
1354
+ ScriptEditorComponent?: (props: ScriptEditorProps) => ReactElement;
1355
+ TestBuilderIconComponent?: typeof TestBuilderIcon;
1356
+ readonlyScriptScenarios?: boolean;
1357
+ theme: GrafanaTheme2;
1358
+ }
1359
+ export function SyntheticsBuilder({ loading, saving, k6Test, availableProbes, DocsLinkComponent, onViewChange, ScriptEditorComponent, TestBuilderIconComponent, readonlyScriptScenarios, theme, onSubmit, }: SyntheticsBuilderStandaloneProps): JSX.Element;
1360
+ interface TestMetaInformationProps {
1361
+ className?: string;
1362
+ }
1363
+ export const TestMetaInformation: FunctionComponent<TestMetaInformationProps>;
1364
+ interface StatusMessageProps {
1365
+ text?: string | ReactNode;
1366
+ level: TestBuilderStatus;
1367
+ }
1368
+ export const StatusMessage: FunctionComponent<StatusMessageProps>;
1369
+ export const StatusBar: FunctionComponent<{
1370
+ className?: string;
1371
+ }>;
1372
+ export function useTestBuilderName(): [string, (name: string) => void];
1373
+ interface MuiThemeProviderProps {
1374
+ children: ReactNode;
1375
+ inherit?: boolean;
1376
+ theme?: ThemeOptions;
1377
+ }
1378
+ export function TestBuilderThemeProvider({ children, theme: _theme }: MuiThemeProviderProps): JSX.Element;
1338
1379
  type SetImportsHandler = (value: string[]) => void;
1339
1380
  export function useScriptImports(): [string[] | undefined, SetImportsHandler];
1340
- export function useGetUnsavedChanges(): [boolean, (value: boolean) => void];