@crowdstrike/logscale-parser-edit 1.158.0--devbuild-2000--sha-b89e22d51ea2f682d93c635f83918f8efe458ac4 → 1.160.0--build-2079--sha-2384efb063d1d91906e4e8176066cecf88812518
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/index.d.ts +29 -2
- package/index.js +482 -676
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* @crowdstrike/logscale-parser-edit
|
3
3
|
*
|
4
|
-
* Allows you to embed an editor for LogScale parsers as a
|
4
|
+
* Allows you to embed an editor for LogScale parsers as a web component.
|
5
5
|
*
|
6
6
|
* ```ts
|
7
7
|
* // Importing the module defines the "logscale-parser-edit" custom element as a side-effect.
|
@@ -23,7 +23,7 @@ export declare interface CommonOptions {
|
|
23
23
|
currentTime?: number;
|
24
24
|
/** Allows you to open the webcomponent's internal shadow DOM.
|
25
25
|
*
|
26
|
-
* This is useful for writing E2E tests where you want to inspect the internal DOM of the
|
26
|
+
* This is useful for writing E2E tests where you want to inspect the internal DOM of the web component.
|
27
27
|
* Do this sparingly, since the internal DOM elements can change between releases of
|
28
28
|
* the webcomponents.
|
29
29
|
*/
|
@@ -102,10 +102,33 @@ export declare interface Options extends CommonOptions {
|
|
102
102
|
readOnly?: boolean;
|
103
103
|
}
|
104
104
|
|
105
|
+
/** LogScale Parser matching the schema https://schemas.humio.com/parser/v0.3.0
|
106
|
+
* @public @sealed
|
107
|
+
*/
|
108
|
+
export declare type Parser = {
|
109
|
+
$schema: "https://schemas.humio.com/parser/v0.3.0";
|
110
|
+
name: string;
|
111
|
+
description?: string | null;
|
112
|
+
script: string;
|
113
|
+
fieldsToBeRemovedBeforeParsing?: string[];
|
114
|
+
tagFields?: string[];
|
115
|
+
testCases?: {
|
116
|
+
event: {
|
117
|
+
rawString: string;
|
118
|
+
};
|
119
|
+
assertions: {
|
120
|
+
outputEventIndex: number;
|
121
|
+
fieldsNotPresent: string[];
|
122
|
+
fieldsHaveValues: Record<string, string>;
|
123
|
+
}[];
|
124
|
+
}[];
|
125
|
+
};
|
126
|
+
|
105
127
|
/** Custom element that embeds the LogScale parser editor.
|
106
128
|
* @public @sealed
|
107
129
|
*/
|
108
130
|
export declare class ParserEdit extends WebcomponentBase<Options> {
|
131
|
+
private _app;
|
109
132
|
/** Requests the parser to be saved. Will trigger the callback provided by `#onSave` once completed (on success or failure).
|
110
133
|
* @public
|
111
134
|
*/
|
@@ -114,6 +137,10 @@ export declare class ParserEdit extends WebcomponentBase<Options> {
|
|
114
137
|
* @public
|
115
138
|
*/
|
116
139
|
onSave(callback: (error: Error) => void): void;
|
140
|
+
/** Extract the current parser from the component.
|
141
|
+
* @public
|
142
|
+
*/
|
143
|
+
exportParserData(): Promise<Parser>;
|
117
144
|
/** Changes the parser editor to be in read-only mode (when given `true`) or in editable mode (when given `false`).
|
118
145
|
* @public
|
119
146
|
*/
|