@crowdstrike/logscale-search 1.133.0--build-1000--sha-eda0b20aa7989fb26e09b9fc1d187b51b1281400 → 1.136.0--build-1093--sha-79e81f65f3475d1356318149af241973c7f30ec4

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.
Files changed (4) hide show
  1. package/index.d.ts +71 -19
  2. package/index.js +522 -529
  3. package/index.js.map +2 -2
  4. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -193,7 +193,7 @@ export declare interface DashboardParams {
193
193
  */
194
194
  end?: string;
195
195
  /** Set to true to make the dashboard `live`. Defaults to `false` */
196
- isLive?: boolean;
196
+ live?: boolean;
197
197
  /**
198
198
  * Set to `true` to make all dashboard queries use `start` and `end` as time window.
199
199
  */
@@ -250,6 +250,35 @@ export declare type FieldColumn = {
250
250
  header?: string;
251
251
  };
252
252
 
253
+ /**
254
+ * A field interaction consists of an `id` used to correlate interaction events to source `FieldInteraction`,
255
+ * and a `label` used to create the label in the field interaction context menu generating clicking a field on an event.
256
+ *
257
+ * The `id` field corresponds to the `interactionId` field on `FieldInteractionEventDetails`.
258
+ *
259
+ * @public
260
+ */
261
+ export declare type FieldInteraction = {
262
+ id: string;
263
+ label: string;
264
+ };
265
+
266
+ /**
267
+ * Event details for the invocation of a `FieldInteraction`.
268
+ *
269
+ * - The `interactionId` field matches the `id` field of a `FieldInteraction`
270
+ * and is used to identify the source `FieldInteraction`of the event.
271
+ * - The `fieldName` field is the name of the field which was clicked on.
272
+ * - The `fieldValue` field carries the value of the field which was clicked on.
273
+ *
274
+ * @public
275
+ */
276
+ export declare type FieldInteractionEventDetails = {
277
+ interactionId: string;
278
+ fieldName: string;
279
+ fieldValue: JsonValue;
280
+ };
281
+
253
282
  /**
254
283
  * A column type for displaying all field values.
255
284
  *
@@ -285,6 +314,22 @@ export declare type InteractionCondition = {
285
314
  "argument": string;
286
315
  };
287
316
 
317
+ /**
318
+ * A typed representation a JSON object.
319
+ *
320
+ * @public
321
+ */
322
+ export declare type JsonObject = {
323
+ [key: string]: JsonValue;
324
+ };
325
+
326
+ /**
327
+ * A typed representation of JSON value.
328
+ *
329
+ * @public
330
+ */
331
+ export declare type JsonValue = string | number | boolean | Array<JsonValue> | JsonObject;
332
+
288
333
  /**
289
334
  * The NavigationTarget type specifies the target of a LogScale navigation event.
290
335
  * These are handled by the `onNavigationTargetChange` hook. Sources of Navigation targets are:
@@ -306,7 +351,7 @@ export declare interface Options extends CommonOptions, SearchViewParams {
306
351
  /** Name of LogScale repository or view */
307
352
  repoOrViewName: string;
308
353
  /** Will initialize the webcomponent in light or dark mode. The theme can be switched through the `setTheme()` method after initialization. */
309
- theme: 'light' | 'dark';
354
+ theme: "light" | "dark";
310
355
  /** If the LSP websocket server is accessed from a different URL than the `apiUrl`, you can set this. */
311
356
  lspURL?: string;
312
357
  /** If provided, this token will be passed in the Authentication header as a Bearer token.
@@ -345,6 +390,13 @@ export declare interface Options extends CommonOptions, SearchViewParams {
345
390
  * interactions panel inside LogScale.
346
391
  */
347
392
  hostInteractions?: Array<Interaction>;
393
+ /**
394
+ * Set custom field interactions available on fields of event.
395
+ *
396
+ * Implement the `onFieldInteractionInvoked` hook on the SearchView instance
397
+ * to react to events related to custom field interactions,
398
+ */
399
+ fieldInteractions?: Array<FieldInteraction>;
348
400
  /**
349
401
  * Hook for handling LogScale navigation targets, e.g. navigating from SearchView to Dashboard or vice versa.
350
402
  *
@@ -390,22 +442,6 @@ export declare interface Options extends CommonOptions, SearchViewParams {
390
442
  showInteractionsPanel?: boolean;
391
443
  }
392
444
 
393
- /**
394
- * A value for a visualization configuration option.
395
- *
396
- * @public
397
- */
398
- export declare type OptionValue = string | number | boolean | Array<OptionValue> | OptionValues;
399
-
400
- /**
401
- * Options for visualization configuration.
402
- *
403
- * @public
404
- */
405
- export declare type OptionValues = {
406
- [key: string]: OptionValue;
407
- };
408
-
409
445
  /**
410
446
  * LogScale parameter values is a map with parameter ids as keys,
411
447
  * and either a string or a string array as single / multi value parameter args, respectively.
@@ -502,6 +538,14 @@ export declare type SearchNavigationTargetInfo = SearchViewParams & {
502
538
  * @public
503
539
  */
504
540
  export declare class SearchView extends WebcomponentBase<Options> {
541
+ /**
542
+ * Set the state of the SearchView.
543
+ *
544
+ * @param searchViewParams - the new search view state
545
+ *
546
+ * @public
547
+ */
548
+ setState(searchViewParams: SearchViewParams): void;
505
549
  /**
506
550
  * Set the query string of the SearchView query editor.
507
551
  *
@@ -544,6 +588,14 @@ export declare class SearchView extends WebcomponentBase<Options> {
544
588
  * @public
545
589
  */
546
590
  onSearchViewStateChanged(callback: (searchViewState: SearchNavigationTargetInfo) => void | null): void;
591
+ /**
592
+ * Implement this hook to receive notifications about invocations of `FieldInteractions` configured on `Options`.
593
+ *
594
+ * @param callback - function for handling notifications of `FieldInteraction` invocations.
595
+ *
596
+ * @public
597
+ */
598
+ onFieldInteractionInvoked(callback: (eventDetails: FieldInteractionEventDetails) => void | null): void;
547
599
  }
548
600
 
549
601
  /**
@@ -596,7 +648,7 @@ export declare interface SearchViewParams {
596
648
  export declare type SearchViewVisualization = {
597
649
  type?: WidgetType;
598
650
  /** The configuration options of a LogScale visualization. */
599
- options?: OptionValues;
651
+ options?: JsonObject;
600
652
  };
601
653
 
602
654
  /**