@o3r/rules-engine 15.3.0-prerelease.15 → 15.3.0-prerelease.17

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.
@@ -1,81 +1,72 @@
1
- import * as i0 from '@angular/core';
2
- import { PipeTransform, InjectionToken, ModuleWithProviders, EnvironmentProviders } from '@angular/core';
3
- import * as rxjs from 'rxjs';
4
- import { Observable, BehaviorSubject } from 'rxjs';
5
- import * as _o3r_core from '@o3r/core';
6
- import { RulesEngineAction, ItemIdentifier, Logger, OtterMessageContent, ConnectContentMessage, RequestMessagesContentMessage, MessageDataTypes, DevtoolsCommonOptions, DevtoolsServiceInterface, AsyncStoreItem, AsyncRequest, FailAsyncStoreItemEntitiesActionPayload, SetActionPayload, SetAsyncStoreItemEntitiesActionPayload, FromApiActionPayload, UpdateActionPayload, Serializer, RulesEngineActionHandler } from '@o3r/core';
7
- import * as _o3r_rules_engine from '@o3r/rules-engine';
8
- import { Logger as Logger$1 } from '@o3r/logger';
9
- import * as _ngrx_store from '@ngrx/store';
10
- import { ActionReducer, Action, ReducerTypes, ActionCreator, Store } from '@ngrx/store';
11
- import * as _ngrx_entity from '@ngrx/entity';
12
- import { EntityState } from '@ngrx/entity';
13
- import * as _ngrx_effects from '@ngrx/effects';
14
- import { Actions } from '@ngrx/effects';
15
-
1
+ import { BehaviorSubject, Observable } from "rxjs";
2
+ import { Logger } from "@o3r/logger";
3
+ import { AsyncRequest, AsyncStoreItem, ConnectContentMessage, DevtoolsCommonOptions, DevtoolsServiceInterface, FailAsyncStoreItemEntitiesActionPayload, FromApiActionPayload, ItemIdentifier, Logger as Logger$1, MessageDataTypes, OtterMessageContent, RequestMessagesContentMessage, RulesEngineAction, RulesEngineActionHandler, Serializer, SetActionPayload, SetAsyncStoreItemEntitiesActionPayload, UpdateActionPayload } from "@o3r/core";
4
+ import * as i0 from "@angular/core";
5
+ import { EnvironmentProviders, InjectionToken, ModuleWithProviders, PipeTransform } from "@angular/core";
6
+ import * as i1 from "@ngrx/store";
7
+ import { Action, ActionCreator, ActionReducer, ReducerTypes, Store } from "@ngrx/store";
8
+ import { EntityState } from "@ngrx/entity";
9
+ import * as i2 from "@ngrx/effects";
10
+ import { Actions } from "@ngrx/effects";
16
11
  /** Represents all the supported facts types TOCHECK utils.Date vs Date */
17
- type Facts = string | number | boolean | null | Date | Record<string, unknown> | unknown[];
12
+ export type Facts = string | number | boolean | null | Date | Record<string, unknown> | unknown[];
18
13
  /** Fact basic value type */
19
- type FactBasicValues = number | boolean | string | string[] | boolean[] | number[] | undefined;
14
+ export type FactBasicValues = number | boolean | string | string[] | boolean[] | number[] | undefined;
20
15
  /** Map of fact name / type pairs */
21
- interface FactDefinitions {
22
- [factName: string]: unknown;
16
+ export interface FactDefinitions {
17
+ [factName: string]: unknown;
23
18
  }
24
19
  /** Return type of a fact factory */
25
- type FactFactoryReturn<T> = Observable<T> | Promise<T> | T;
20
+ export type FactFactoryReturn<T> = Observable<T> | Promise<T> | T;
26
21
  /** Set of facts */
27
- type FactSet<T extends FactDefinitions> = {
28
- [P in keyof T]: FactFactoryReturn<T[P] | undefined | null>;
29
- };
22
+ export type FactSet<T extends FactDefinitions> = { [P in keyof T]: FactFactoryReturn<T[P] | undefined | null>; };
30
23
  /** Fact stream type */
31
- type FactValueStream<T = unknown> = Observable<T | undefined>;
24
+ export type FactValueStream<T = unknown> = Observable<T | undefined>;
32
25
  /** Fact stream */
33
- interface Fact<T = unknown> {
34
- /** Fact ID */
35
- id: string;
36
- /** Stream of the fact fact value */
37
- value$: FactValueStream<T>;
26
+ export interface Fact<T = unknown> {
27
+ /** Fact ID */
28
+ id: string;
29
+ /** Stream of the fact fact value */
30
+ value$: FactValueStream<T>;
38
31
  }
39
-
40
32
  /**
41
33
  * Rule Engine operator
42
34
  */
43
- interface Operator<LeftExposed = unknown, RightExposed = unknown, LeftSupported = LeftExposed, RightSupported = RightExposed> {
44
- /** Operator name to use in condition */
45
- name: string;
46
- /** Priority in the dropdown display */
47
- orderingWeight?: number;
48
- /** Left Hand Value validator function */
49
- validateLhs?: unknown extends LeftSupported ? (operand: unknown) => boolean : (operand: unknown) => operand is LeftSupported;
50
- /** Right Hand Value validator function */
51
- validateRhs?: unknown extends RightSupported ? (operand: unknown) => boolean : (operand: unknown) => operand is RightSupported;
52
- /** Evaluate the values */
53
- evaluator: (lhs: LeftSupported, rhs: RightSupported, operatorFactValues?: Record<string, Facts>) => boolean;
54
- /** List of facts names that the operator can depend on */
55
- factImplicitDependencies?: string[];
35
+ export interface Operator<LeftExposed = unknown, RightExposed = unknown, LeftSupported = LeftExposed, RightSupported = RightExposed> {
36
+ /** Operator name to use in condition */
37
+ name: string;
38
+ /** Priority in the dropdown display */
39
+ orderingWeight?: number;
40
+ /** Left Hand Value validator function */
41
+ validateLhs?: unknown extends LeftSupported ? (operand: unknown) => boolean : (operand: unknown) => operand is LeftSupported;
42
+ /** Right Hand Value validator function */
43
+ validateRhs?: unknown extends RightSupported ? (operand: unknown) => boolean : (operand: unknown) => operand is RightSupported;
44
+ /** Evaluate the values */
45
+ evaluator: (lhs: LeftSupported, rhs: RightSupported, operatorFactValues?: Record<string, Facts>) => boolean;
46
+ /** List of facts names that the operator can depend on */
47
+ factImplicitDependencies?: string[];
56
48
  }
57
49
  /**
58
50
  * Rule Engine unary operator
59
51
  */
60
- interface UnaryOperator<L = unknown> {
61
- /** Operator name to use in condition */
62
- name: string;
63
- /** Left Hand Value validator function */
64
- validateLhs?: unknown extends L ? (operand: unknown) => boolean : (operand: unknown) => operand is L;
65
- /** Evaluate the values */
66
- evaluator: (lhs: L) => boolean;
52
+ export interface UnaryOperator<L = unknown> {
53
+ /** Operator name to use in condition */
54
+ name: string;
55
+ /** Left Hand Value validator function */
56
+ validateLhs?: unknown extends L ? (operand: unknown) => boolean : (operand: unknown) => operand is L;
57
+ /** Evaluate the values */
58
+ evaluator: (lhs: L) => boolean;
67
59
  }
68
60
  /**
69
61
  * Alias for supported simple types in AEM to be used in the operators to avoid repetition of the
70
62
  * (string | boolean | Date | number)
71
63
  * This type reference is specifically handled by the rule operator extractor.
72
64
  */
73
- type SupportedSimpleTypes = string | boolean | Date | number | null | undefined;
65
+ export type SupportedSimpleTypes = string | boolean | Date | number | null | undefined;
74
66
  /**
75
67
  * Any input that can be used as single parameter for Date constructor (Date, string, number)
76
68
  */
77
- type DateInput = Date | string | number;
78
-
69
+ export type DateInput = Date | string | number;
79
70
  /**
80
71
  * Execute Operator
81
72
  * @param lhs Left hand side
@@ -83,1510 +74,1484 @@ type DateInput = Date | string | number;
83
74
  * @param operator Operator to compare values
84
75
  * @param operatorFacts Facts that operator can depend on
85
76
  */
86
- declare function executeOperator<L = unknown, R = unknown>(lhs: L, rhs: R, operator: Operator<L, R>, operatorFacts?: Record<string, Facts | undefined>): boolean;
77
+ export declare function executeOperator<L = unknown, R = unknown>(lhs: L, rhs: R, operator: Operator<L, R>, operatorFacts?: Record<string, Facts | undefined>): boolean;
87
78
  /**
88
79
  * Validate a number operand
89
80
  * @param operand value of one of the operands
90
81
  */
91
- declare function numberValidator(operand: unknown): operand is number | string;
82
+ export declare function numberValidator(operand: unknown): operand is number | string;
92
83
  /**
93
84
  * Validate an operand is a range of numbers
94
85
  * @param operatorInput value of one of the operands
95
86
  */
96
- declare function isRangeNumber(operatorInput: unknown): operatorInput is [number | string, number | string];
87
+ export declare function isRangeNumber(operatorInput: unknown): operatorInput is [number | string, number | string];
97
88
  /**
98
89
  * Verifies if the parameter is a valid date for the operator (getTime function available returning a number)
99
90
  * @param operatorInput
100
91
  */
101
- declare const isValidDate: (operatorInput: any) => operatorInput is Date;
92
+ export declare const isValidDate: (operatorInput: any) => operatorInput is Date;
102
93
  /**
103
94
  * Verifies if the parameter is a valid input for Date constructor (new Date returns a valid date)
104
95
  * @param operatorInput
105
96
  */
106
- declare const isValidDateInput: (operatorInput: any) => operatorInput is DateInput;
97
+ export declare const isValidDateInput: (operatorInput: any) => operatorInput is DateInput;
107
98
  /**
108
99
  * Verifies if the parameter is a valid date range
109
100
  * @param operatorInput
110
101
  */
111
- declare const isValidDateRange: (operatorInput: any) => operatorInput is [DateInput, DateInput];
102
+ export declare const isValidDateRange: (operatorInput: any) => operatorInput is [DateInput, DateInput];
112
103
  /**
113
104
  * Verifies if the parameter is a valid time input
114
105
  * @param operatorInput
115
106
  */
116
- declare const isValidTimeInput: (operatorInput: any) => operatorInput is string;
107
+ export declare const isValidTimeInput: (operatorInput: any) => operatorInput is string;
117
108
  /**
118
109
  * Verifies if the parameter is a valid time range
119
110
  * @param operatorInput
120
111
  */
121
- declare const isValidTimeRange: (operatorInput: any) => operatorInput is [string, string];
112
+ export declare const isValidTimeRange: (operatorInput: any) => operatorInput is [string, string];
122
113
  /**
123
114
  * Validate that a value is a supported simple type
124
115
  * @param value value to validate
125
116
  */
126
- declare function isSupportedSimpleTypes(value: unknown): value is SupportedSimpleTypes;
117
+ export declare function isSupportedSimpleTypes(value: unknown): value is SupportedSimpleTypes;
127
118
  /**
128
119
  * Validate that a value is a string
129
120
  * @param value
130
121
  */
131
- declare function isString(value: unknown): value is string;
122
+ export declare function isString(value: unknown): value is string;
132
123
  /**
133
124
  * Parse input to return RegExp
134
125
  * @param inputRegExp
135
126
  */
136
- declare function parseRegExp(inputRegExp: string): RegExp;
137
-
127
+ export declare function parseRegExp(inputRegExp: string): RegExp;
138
128
  /**
139
129
  * Check if any of the variable's value is equal to a specific value
140
130
  * @title contains
141
131
  */
142
- declare const arrayContains: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>;
132
+ export declare const arrayContains: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>;
143
133
  /**
144
134
  * Check if the specified text value is included in the text variable
145
135
  * @title contains
146
136
  */
147
- declare const stringContains: Operator<string, string>;
137
+ export declare const stringContains: Operator<string, string>;
148
138
  /**
149
139
  * Check if every value of the variable is different from a specific value
150
140
  * @title does not contain
151
141
  */
152
- declare const notArrayContains: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>;
142
+ export declare const notArrayContains: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>;
153
143
  /**
154
144
  * Check if the specified text value is not included in the text variable
155
145
  * @title does not contain
156
146
  */
157
- declare const notStringContains: Operator<string, string>;
147
+ export declare const notStringContains: Operator<string, string>;
158
148
  /**
159
149
  * Check if every value of the variable equals a specific value
160
150
  * @title all equal to
161
151
  */
162
- declare const allEqual: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>;
152
+ export declare const allEqual: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>;
163
153
  /**
164
154
  * Check if every numerical value of the variable is greater than a specific value
165
155
  * @title all >
166
156
  */
167
- declare const allGreater: Operator<SupportedSimpleTypes[], number | string>;
157
+ export declare const allGreater: Operator<SupportedSimpleTypes[], number | string>;
168
158
  /**
169
159
  * Check if every value of the variable is in a specific list
170
160
  * @title all in
171
161
  */
172
- declare const allIn: Operator<SupportedSimpleTypes[], SupportedSimpleTypes[]>;
162
+ export declare const allIn: Operator<SupportedSimpleTypes[], SupportedSimpleTypes[]>;
173
163
  /**
174
164
  * Check if every value of the variable is not in a specific list
175
165
  * @title none in
176
166
  */
177
- declare const allNotIn: Operator<SupportedSimpleTypes[], SupportedSimpleTypes[]>;
167
+ export declare const allNotIn: Operator<SupportedSimpleTypes[], SupportedSimpleTypes[]>;
178
168
  /**
179
169
  * Check if every numerical value of the variable is lower than a specific value
180
170
  * @title all <
181
171
  */
182
- declare const allLower: Operator<number[], number | string>;
172
+ export declare const allLower: Operator<number[], number | string>;
183
173
  /**
184
174
  * Check if every string value of the variable matches a specific pattern
185
175
  * @title all match
186
176
  */
187
- declare const allMatch: Operator<string[], string>;
177
+ export declare const allMatch: Operator<string[], string>;
188
178
  /**
189
179
  * Check if every value of the variable is included in a specified range
190
180
  * @title all between
191
181
  */
192
- declare const allRangeNumber: Operator<number[], [number | string, number | string]>;
182
+ export declare const allRangeNumber: Operator<number[], [number | string, number | string]>;
193
183
  /**
194
184
  * Check if at least one of the values of the variable equals a specific value
195
185
  * @title one equal to
196
186
  */
197
- declare const oneEquals: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>;
187
+ export declare const oneEquals: Operator<SupportedSimpleTypes[], SupportedSimpleTypes>;
198
188
  /**
199
189
  * Check if one of the values of the variable is greater than a specific value
200
190
  * @title one >
201
191
  */
202
- declare const oneGreater: Operator<number[], number | string>;
192
+ export declare const oneGreater: Operator<number[], number | string>;
203
193
  /**
204
194
  * Check if at least one of the values of the variable is equal to one in a specified list
205
195
  * @title one in
206
196
  */
207
- declare const oneIn: Operator<SupportedSimpleTypes[], SupportedSimpleTypes[]>;
197
+ export declare const oneIn: Operator<SupportedSimpleTypes[], SupportedSimpleTypes[]>;
208
198
  /**
209
199
  * Check if one of the values of the variable is lower than a specific value
210
200
  * @title one <
211
201
  */
212
- declare const oneLower: Operator<number[], number | string>;
202
+ export declare const oneLower: Operator<number[], number | string>;
213
203
  /**
214
204
  * Check if one of the values of the variable matches a specific pattern
215
205
  * @title one matches
216
206
  */
217
- declare const oneMatches: Operator<string[], string>;
207
+ export declare const oneMatches: Operator<string[], string>;
218
208
  /**
219
209
  * Check if one of the values of the variable is included in a specified range
220
210
  * @title one between
221
211
  */
222
- declare const oneRangeNumber: Operator<number[], [number | string, number | string]>;
212
+ export declare const oneRangeNumber: Operator<number[], [number | string, number | string]>;
223
213
  /**
224
214
  * Check if the number of values of the variable is equal to a specific value
225
215
  * @title number of =
226
216
  */
227
- declare const lengthEquals: Operator<any[], number | string>;
217
+ export declare const lengthEquals: Operator<any[], number | string>;
228
218
  /**
229
219
  * Check if the number of values of the variable is different from a specific value
230
220
  * @title number of ≠
231
221
  */
232
- declare const lengthNotEquals: Operator<any[], number | string>;
222
+ export declare const lengthNotEquals: Operator<any[], number | string>;
233
223
  /**
234
224
  * Check if the number of values of the variable is lower or equal to a specific value
235
225
  * @title number of ≤
236
226
  */
237
- declare const lengthLessThanOrEquals: Operator<any[], number | string>;
227
+ export declare const lengthLessThanOrEquals: Operator<any[], number | string>;
238
228
  /**
239
229
  * Check if the number of values of the variable is lower than a specific value
240
230
  * @title number of <
241
231
  */
242
- declare const lengthLessThan: Operator<any[], number | string>;
232
+ export declare const lengthLessThan: Operator<any[], number | string>;
243
233
  /**
244
234
  * Check if the number of values of the variable is greater or equal to a specific value
245
235
  * @title number of ≥
246
236
  */
247
- declare const lengthGreaterThanOrEquals: Operator<any[], number | string>;
237
+ export declare const lengthGreaterThanOrEquals: Operator<any[], number | string>;
248
238
  /**
249
239
  * Check if the number of values of the variable is greater than a specific value
250
240
  * @title number of >
251
241
  */
252
- declare const lengthGreaterThan: Operator<any[], number | string>;
242
+ export declare const lengthGreaterThan: Operator<any[], number | string>;
253
243
  /** List of all default array operators */
254
- declare const arrayBasedOperators: (Operator<SupportedSimpleTypes[], SupportedSimpleTypes, SupportedSimpleTypes[], SupportedSimpleTypes> | Operator<string, string, string, string> | Operator<SupportedSimpleTypes[], string | number, SupportedSimpleTypes[], string | number> | Operator<SupportedSimpleTypes[], SupportedSimpleTypes[], SupportedSimpleTypes[], SupportedSimpleTypes[]> | Operator<number[], string | number, number[], string | number> | Operator<string[], string, string[], string> | Operator<number[], [string | number, string | number], number[], [string | number, string | number]> | Operator<any[], string | number, any[], string | number>)[];
255
-
244
+ export declare const arrayBasedOperators: (Operator<SupportedSimpleTypes[], SupportedSimpleTypes, SupportedSimpleTypes[], SupportedSimpleTypes> | Operator<string, string, string, string> | Operator<SupportedSimpleTypes[], string | number, SupportedSimpleTypes[], string | number> | Operator<SupportedSimpleTypes[], SupportedSimpleTypes[], SupportedSimpleTypes[], SupportedSimpleTypes[]> | Operator<number[], string | number, number[], string | number> | Operator<string[], string, string[], string> | Operator<number[], [string | number, string | number], number[], [string | number, string | number]> | Operator<any[], string | number, any[], string | number>)[];
256
245
  /**
257
246
  * Check if a variable is equal to a specific value
258
247
  * @title is equal to
259
248
  */
260
- declare const equals: Operator;
249
+ export declare const equals: Operator;
261
250
  /**
262
251
  * Check if a variable is different from a specific value
263
252
  * @title is not equal to
264
253
  */
265
- declare const notEquals: Operator;
254
+ export declare const notEquals: Operator;
266
255
  /**
267
256
  * Check if the variable's value is included in a specified list
268
257
  * @title is in
269
258
  */
270
- declare const inArray: Operator<SupportedSimpleTypes, SupportedSimpleTypes[]>;
259
+ export declare const inArray: Operator<SupportedSimpleTypes, SupportedSimpleTypes[]>;
271
260
  /**
272
261
  * Check if the variable's value is not included in the value list
273
262
  * @title is not in
274
263
  */
275
- declare const notInArray: Operator<SupportedSimpleTypes, SupportedSimpleTypes[]>;
264
+ export declare const notInArray: Operator<SupportedSimpleTypes, SupportedSimpleTypes[]>;
276
265
  /**
277
266
  * Check if the text variable is part of the specified value
278
267
  * @title within
279
268
  */
280
- declare const inString: Operator<string, string>;
269
+ export declare const inString: Operator<string, string>;
281
270
  /**
282
271
  * Check if the text variable is not part of the specified value
283
272
  * @title not within
284
273
  */
285
- declare const notInString: Operator<string, string>;
274
+ export declare const notInString: Operator<string, string>;
286
275
  /**
287
276
  * Check if the variable and its value are defined
288
277
  * @title is defined
289
278
  */
290
- declare const isDefined: UnaryOperator<any>;
279
+ export declare const isDefined: UnaryOperator<any>;
291
280
  /**
292
281
  * Check if the variable and its value are undefined
293
282
  * @title is not defined
294
283
  */
295
- declare const isUndefined: UnaryOperator<any>;
284
+ export declare const isUndefined: UnaryOperator<any>;
296
285
  /**
297
286
  * Check if the text variable matches the specified RegExp pattern
298
287
  * @title matches the pattern
299
288
  */
300
- declare const matchesPattern: Operator<string, string>;
289
+ export declare const matchesPattern: Operator<string, string>;
301
290
  /** List of all default basic operators */
302
- declare const basicOperators: (Operator<string, string, string, string> | Operator<unknown, unknown, unknown, unknown> | Operator<SupportedSimpleTypes, SupportedSimpleTypes[], SupportedSimpleTypes, SupportedSimpleTypes[]> | UnaryOperator<any>)[];
303
-
291
+ export declare const basicOperators: (Operator<string, string, string, string> | Operator<unknown, unknown, unknown, unknown> | Operator<SupportedSimpleTypes, SupportedSimpleTypes[], SupportedSimpleTypes, SupportedSimpleTypes[]> | UnaryOperator<any>)[];
304
292
  /**
305
293
  * Check if a date variable is in a specified date range
306
294
  * @title is between
307
295
  */
308
- declare const inRangeDate: Operator<Date, [DateInput, DateInput], DateInput>;
296
+ export declare const inRangeDate: Operator<Date, [DateInput, DateInput], DateInput>;
309
297
  /**
310
298
  * Check if the value of the variable is in the next x minutes
311
299
  * @title is in next minutes
312
300
  * @returns false for dates before `now` and for dates after `now` + `nextMinutes`, true for dates between `now` and `now` + `nextMinutes`
313
301
  */
314
- declare const dateInNextMinutes: Operator<Date, number, DateInput, string | number>;
302
+ export declare const dateInNextMinutes: Operator<Date, number, DateInput, string | number>;
315
303
  /**
316
304
  * Check if the value of the variable is not in the next x minutes
317
305
  * @title is not in next minutes
318
306
  * @returns false for dates before `now` and for dates between `now` and `now` + `nextMinutes`, true for dates after `now` + `nextMinutes`
319
307
  */
320
- declare const dateNotInNextMinutes: Operator<Date, number, DateInput, string | number>;
308
+ export declare const dateNotInNextMinutes: Operator<Date, number, DateInput, string | number>;
321
309
  /**
322
310
  * Check if a date variable is prior than a specified date
323
311
  * @title is before
324
312
  */
325
- declare const dateBefore: Operator<Date, DateInput, DateInput>;
313
+ export declare const dateBefore: Operator<Date, DateInput, DateInput>;
326
314
  /**
327
315
  * Check if a date variable is posterior than a specified date
328
316
  * @title is after
329
317
  */
330
- declare const dateAfter: Operator<Date, DateInput, DateInput>;
318
+ export declare const dateAfter: Operator<Date, DateInput, DateInput>;
331
319
  /**
332
320
  * Check if a date variable is the same as a specified date
333
321
  * @title is equal to
334
322
  */
335
- declare const dateEquals: Operator<Date, DateInput, DateInput>;
323
+ export declare const dateEquals: Operator<Date, DateInput, DateInput>;
336
324
  /**
337
325
  * Check if a date variable is different from a specified date
338
326
  * @title is not equal
339
327
  */
340
- declare const dateNotEquals: Operator<Date, DateInput, DateInput>;
341
- declare const dateBasedOperators: (Operator<Date, [DateInput, DateInput], DateInput, [DateInput, DateInput]> | Operator<Date, number, DateInput, string | number> | Operator<Date, DateInput, DateInput, DateInput>)[];
342
-
328
+ export declare const dateNotEquals: Operator<Date, DateInput, DateInput>;
329
+ export declare const dateBasedOperators: (Operator<Date, [DateInput, DateInput], DateInput, [DateInput, DateInput]> | Operator<Date, number, DateInput, string | number> | Operator<Date, DateInput, DateInput, DateInput>)[];
343
330
  /**
344
331
  * Check if the number variable is greater or equal to a specific value
345
332
  * @title ≥
346
333
  */
347
- declare const greaterThanOrEqual: Operator<number, number, number | string, number | string>;
334
+ export declare const greaterThanOrEqual: Operator<number, number, number | string, number | string>;
348
335
  /**
349
336
  * Check if the number variable is greater than a specific value
350
337
  * @title >
351
338
  */
352
- declare const greaterThan: Operator<number, number, number | string, number | string>;
339
+ export declare const greaterThan: Operator<number, number, number | string, number | string>;
353
340
  /**
354
341
  * Check if the number variable is lower or equal to a specific value
355
342
  * @title ≤
356
343
  */
357
- declare const lessOrEqual: Operator<number, number, number | string, number | string>;
344
+ export declare const lessOrEqual: Operator<number, number, number | string, number | string>;
358
345
  /**
359
346
  * Check if the number variable is lower than a specific value
360
347
  * @title <
361
348
  */
362
- declare const lessThan: Operator<number, number, number | string, number | string>;
349
+ export declare const lessThan: Operator<number, number, number | string, number | string>;
363
350
  /** List of all default number based operators */
364
- declare const numberBasedOperators: Operator<number, number, string | number, string | number>[];
365
-
366
- declare const operatorList: (_o3r_rules_engine.Operator<_o3r_rules_engine.SupportedSimpleTypes[], _o3r_rules_engine.SupportedSimpleTypes, _o3r_rules_engine.SupportedSimpleTypes[], _o3r_rules_engine.SupportedSimpleTypes> | _o3r_rules_engine.Operator<string, string, string, string> | _o3r_rules_engine.Operator<_o3r_rules_engine.SupportedSimpleTypes[], string | number, _o3r_rules_engine.SupportedSimpleTypes[], string | number> | _o3r_rules_engine.Operator<_o3r_rules_engine.SupportedSimpleTypes[], _o3r_rules_engine.SupportedSimpleTypes[], _o3r_rules_engine.SupportedSimpleTypes[], _o3r_rules_engine.SupportedSimpleTypes[]> | _o3r_rules_engine.Operator<number[], string | number, number[], string | number> | _o3r_rules_engine.Operator<string[], string, string[], string> | _o3r_rules_engine.Operator<number[], [string | number, string | number], number[], [string | number, string | number]> | _o3r_rules_engine.Operator<any[], string | number, any[], string | number> | _o3r_rules_engine.Operator<unknown, unknown, unknown, unknown> | _o3r_rules_engine.Operator<_o3r_rules_engine.SupportedSimpleTypes, _o3r_rules_engine.SupportedSimpleTypes[], _o3r_rules_engine.SupportedSimpleTypes, _o3r_rules_engine.SupportedSimpleTypes[]> | _o3r_rules_engine.UnaryOperator<any> | _o3r_rules_engine.Operator<Date, [_o3r_rules_engine.DateInput, _o3r_rules_engine.DateInput], _o3r_rules_engine.DateInput, [_o3r_rules_engine.DateInput, _o3r_rules_engine.DateInput]> | _o3r_rules_engine.Operator<Date, number, _o3r_rules_engine.DateInput, string | number> | _o3r_rules_engine.Operator<Date, _o3r_rules_engine.DateInput, _o3r_rules_engine.DateInput, _o3r_rules_engine.DateInput> | _o3r_rules_engine.Operator<number, number, string | number, string | number>)[];
367
-
368
- type NativeTypes = string | boolean | number;
351
+ export declare const numberBasedOperators: Operator<number, number, string | number, string | number>[];
352
+ export declare const operatorList: (import("@o3r/rules-engine").Operator<import("@o3r/rules-engine").SupportedSimpleTypes[], import("@o3r/rules-engine").SupportedSimpleTypes, import("@o3r/rules-engine").SupportedSimpleTypes[], import("@o3r/rules-engine").SupportedSimpleTypes> | import("@o3r/rules-engine").Operator<string, string, string, string> | import("@o3r/rules-engine").Operator<import("@o3r/rules-engine").SupportedSimpleTypes[], string | number, import("@o3r/rules-engine").SupportedSimpleTypes[], string | number> | import("@o3r/rules-engine").Operator<import("@o3r/rules-engine").SupportedSimpleTypes[], import("@o3r/rules-engine").SupportedSimpleTypes[], import("@o3r/rules-engine").SupportedSimpleTypes[], import("@o3r/rules-engine").SupportedSimpleTypes[]> | import("@o3r/rules-engine").Operator<number[], string | number, number[], string | number> | import("@o3r/rules-engine").Operator<string[], string, string[], string> | import("@o3r/rules-engine").Operator<number[], [string | number, string | number], number[], [string | number, string | number]> | import("@o3r/rules-engine").Operator<any[], string | number, any[], string | number> | import("@o3r/rules-engine").Operator<unknown, unknown, unknown, unknown> | import("@o3r/rules-engine").Operator<import("@o3r/rules-engine").SupportedSimpleTypes, import("@o3r/rules-engine").SupportedSimpleTypes[], import("@o3r/rules-engine").SupportedSimpleTypes, import("@o3r/rules-engine").SupportedSimpleTypes[]> | import("@o3r/rules-engine").UnaryOperator<any> | import("@o3r/rules-engine").Operator<Date, [import("@o3r/rules-engine").DateInput, import("@o3r/rules-engine").DateInput], import("@o3r/rules-engine").DateInput, [import("@o3r/rules-engine").DateInput, import("@o3r/rules-engine").DateInput]> | import("@o3r/rules-engine").Operator<Date, number, import("@o3r/rules-engine").DateInput, string | number> | import("@o3r/rules-engine").Operator<Date, import("@o3r/rules-engine").DateInput, import("@o3r/rules-engine").DateInput, import("@o3r/rules-engine").DateInput> | import("@o3r/rules-engine").Operator<number, number, string | number, string | number>)[];
353
+ export type NativeTypes = string | boolean | number;
369
354
  /** Generic operand */
370
- interface Operand<T extends string, U extends NativeTypes = NativeTypes> {
371
- /** Operand type */
372
- type: T;
373
- /** Static value */
374
- value: U;
355
+ export interface Operand<T extends string, U extends NativeTypes = NativeTypes> {
356
+ /** Operand type */
357
+ type: T;
358
+ /** Static value */
359
+ value: U;
375
360
  }
376
361
  /** Operand based on fact */
377
- interface OperandFact extends Operand<'FACT', string> {
378
- /** JSONPath to deep read the fact value */
379
- path?: string;
362
+ export interface OperandFact extends Operand<'FACT', string> {
363
+ /** JSONPath to deep read the fact value */
364
+ path?: string;
380
365
  }
381
366
  /** Condition available operand types */
382
- type GenericOperand = OperandFact | Operand<'RUNTIME_FACT', string> | Operand<'LITERAL'>;
367
+ export type GenericOperand = OperandFact | Operand<'RUNTIME_FACT', string> | Operand<'LITERAL'>;
383
368
  /** Condition object interface with unary operator */
384
- interface UnaryOperation {
385
- /** Left Hand Side */
386
- lhs: GenericOperand;
387
- /** Operator */
388
- operator: string;
369
+ export interface UnaryOperation {
370
+ /** Left Hand Side */
371
+ lhs: GenericOperand;
372
+ /** Operator */
373
+ operator: string;
389
374
  }
390
375
  /** Condition object interface */
391
- interface BinaryOperation {
392
- /** Left Hand Side */
393
- lhs: GenericOperand;
394
- /** Right Hand Side */
395
- rhs: GenericOperand;
396
- /** Operator */
397
- operator: string;
376
+ export interface BinaryOperation {
377
+ /** Left Hand Side */
378
+ lhs: GenericOperand;
379
+ /** Right Hand Side */
380
+ rhs: GenericOperand;
381
+ /** Operator */
382
+ operator: string;
398
383
  }
399
384
  /** Nested Condition */
400
- type NestedCondition = UnaryOperation | BinaryOperation | TopLevelCondition;
385
+ export type NestedCondition = UnaryOperation | BinaryOperation | TopLevelCondition;
401
386
  /** All Condition */
402
- type AllConditions = {
403
- all: NestedCondition[];
404
- any?: never;
405
- not?: never;
387
+ export type AllConditions = {
388
+ all: NestedCondition[];
389
+ any?: never;
390
+ not?: never;
406
391
  };
407
392
  /** Any Condition */
408
- type AnyConditions = {
409
- any: NestedCondition[];
410
- all?: never;
411
- not?: never;
393
+ export type AnyConditions = {
394
+ any: NestedCondition[];
395
+ all?: never;
396
+ not?: never;
412
397
  };
413
398
  /** Not Condition */
414
- type NotCondition = {
415
- not: NestedCondition;
416
- all?: never;
417
- any?: never;
399
+ export type NotCondition = {
400
+ not: NestedCondition;
401
+ all?: never;
402
+ any?: never;
418
403
  };
419
404
  /** Top level Condition in the rule definition */
420
- type TopLevelCondition = AllConditions | AnyConditions | NotCondition | UnaryOperation | BinaryOperation;
405
+ export type TopLevelCondition = AllConditions | AnyConditions | NotCondition | UnaryOperation | BinaryOperation;
421
406
  /** Event emitted in case the rule condition is passed */
422
- interface RuleEvent {
423
- /** Type (or name) of the event */
424
- type: string;
425
- /** list of parameter associated to the event */
426
- params?: Record<string, any>;
407
+ export interface RuleEvent {
408
+ /** Type (or name) of the event */
409
+ type: string;
410
+ /** list of parameter associated to the event */
411
+ params?: Record<string, any>;
427
412
  }
428
413
  /** Base for the Rule definition */
429
- interface Rule {
430
- /** Unique id associated to a rule*/
431
- id: string;
432
- /** Runtime facts that are needed for the rule execution (sent by the CMS) */
433
- inputRuntimeFacts: string[];
434
- /** Runtime facts that are created/updated by the rule*/
435
- outputRuntimeFacts: string[];
436
- /** Name of the rule*/
437
- name: string;
438
- /** rootElement of the rule, that contains either a block, either an action list */
439
- rootElement: AllBlock;
414
+ export interface Rule {
415
+ /** Unique id associated to a rule*/
416
+ id: string;
417
+ /** Runtime facts that are needed for the rule execution (sent by the CMS) */
418
+ inputRuntimeFacts: string[];
419
+ /** Runtime facts that are created/updated by the rule*/
420
+ outputRuntimeFacts: string[];
421
+ /** Name of the rule*/
422
+ name: string;
423
+ /** rootElement of the rule, that contains either a block, either an action list */
424
+ rootElement: AllBlock;
440
425
  }
441
426
  /**
442
427
  * List of possible types of actions resulted as output of a rule execution
443
428
  * @deprecated the actions are now depending of executing modules
444
429
  */
445
- type ActionTypes = 'SET_FACT' | 'UPDATE_CONFIG' | 'UPDATE_ASSET' | 'UPDATE_LOCALISATION' | 'UPDATE_PLACEHOLDER';
430
+ export type ActionTypes = 'SET_FACT' | 'UPDATE_CONFIG' | 'UPDATE_ASSET' | 'UPDATE_LOCALISATION' | 'UPDATE_PLACEHOLDER';
446
431
  /** Types associated to the condition blocks that are supported */
447
- type ConditionBlockTypes = 'IF_ELSE';
432
+ export type ConditionBlockTypes = 'IF_ELSE';
448
433
  /** Interface common to all elements */
449
- interface RuleElement {
450
- /** Type of the element*/
451
- elementType: string;
434
+ export interface RuleElement {
435
+ /** Type of the element*/
436
+ elementType: string;
452
437
  }
453
438
  /** Interface common to all actions */
454
- interface ActionBlock extends RuleElement, RulesEngineAction {
455
- elementType: 'ACTION';
456
- actionType: string;
457
- value: any;
439
+ export interface ActionBlock extends RuleElement, RulesEngineAction {
440
+ elementType: 'ACTION';
441
+ actionType: string;
442
+ value: any;
458
443
  }
459
444
  /** Interface of action that sets or updates a temporary fact */
460
- interface ActionSetTemporaryFactBlock extends ActionBlock {
461
- actionType: 'SET_FACT';
462
- fact: string;
445
+ export interface ActionSetTemporaryFactBlock extends ActionBlock {
446
+ actionType: 'SET_FACT';
447
+ fact: string;
463
448
  }
464
449
  /** Interface of block Rule */
465
- interface RuleBlock extends RuleElement {
466
- elementType: 'RULE_BLOCK';
467
- blockType: ConditionBlockTypes;
450
+ export interface RuleBlock extends RuleElement {
451
+ elementType: 'RULE_BLOCK';
452
+ blockType: ConditionBlockTypes;
468
453
  }
469
454
  /** All supported blocks (supporting nested structure) */
470
- type AllBlock = IfElseBlock | (ActionBlock & Record<string, any>);
455
+ export type AllBlock = IfElseBlock | (ActionBlock & Record<string, any>);
471
456
  /** Block representing an 'if else' condition. If no condition specified it will execute success elements only */
472
- interface IfElseBlock extends RuleBlock {
473
- blockType: 'IF_ELSE';
474
- successElements: AllBlock[];
475
- failureElements: AllBlock[];
476
- condition?: TopLevelCondition;
457
+ export interface IfElseBlock extends RuleBlock {
458
+ blockType: 'IF_ELSE';
459
+ successElements: AllBlock[];
460
+ failureElements: AllBlock[];
461
+ condition?: TopLevelCondition;
477
462
  }
478
463
  /** Interface of a ruleset as it's specified in the json file */
479
- interface Ruleset {
480
- /** Unique id of the ruleset*/
481
- id: string;
482
- /** Name of the ruleset */
483
- name: string;
484
- /** Optional ruleset description */
485
- description?: string;
486
- /** List of rules associated to the ruleset */
487
- rules: Rule[];
488
- /** Optional date range where the ruleset will be executed*/
489
- validityRange?: {
490
- from?: string;
491
- to?: string;
492
- };
493
- /**
494
- * Components linked to the ruleset. If present the ruleset will not be active by default.
495
- * 'or' condition: If at least one component has subscribed, the ruleset will become active.
496
- */
497
- linkedComponents?: {
498
- or: ItemIdentifier[];
499
- };
464
+ export interface Ruleset {
465
+ /** Unique id of the ruleset*/
466
+ id: string;
467
+ /** Name of the ruleset */
468
+ name: string;
469
+ /** Optional ruleset description */
470
+ description?: string;
471
+ /** List of rules associated to the ruleset */
472
+ rules: Rule[];
473
+ /** Optional date range where the ruleset will be executed*/
474
+ validityRange?: {
475
+ from?: string;
476
+ to?: string;
477
+ };
478
+ /**
479
+ * Components linked to the ruleset. If present the ruleset will not be active by default.
480
+ * 'or' condition: If at least one component has subscribed, the ruleset will become active.
481
+ */
482
+ linkedComponents?: {
483
+ or: ItemIdentifier[];
484
+ };
500
485
  }
501
-
502
486
  /** Performance object supporting NodeJs Performance and Web Performance reporting */
503
- type CrossPlatformPerformance = {
504
- /** @see Performance.mark */
505
- mark: (...x: Parameters<Performance['mark']>) => ReturnType<Performance['mark']> | void;
506
- /** @see Performance.measure */
507
- measure: (measureName: string, startOrMeasureOptions?: string, endMark?: string) => ReturnType<Performance['measure']> | void;
487
+ export type CrossPlatformPerformance = {
488
+ /** @see Performance.mark */
489
+ mark: (...x: Parameters<Performance['mark']>) => ReturnType<Performance['mark']> | void;
490
+ /** @see Performance.measure */
491
+ measure: (measureName: string, startOrMeasureOptions?: string, endMark?: string) => ReturnType<Performance['measure']> | void;
508
492
  };
509
493
  /** Fact stream object to handle fact reference change */
510
- interface FactObject<T> {
511
- /** Subject of fact stream */
512
- subject: BehaviorSubject<Observable<T> | undefined>;
513
- /** Stream of the fact value */
514
- value$: Observable<T | undefined>;
494
+ export interface FactObject<T> {
495
+ /** Subject of fact stream */
496
+ subject: BehaviorSubject<Observable<T> | undefined>;
497
+ /** Stream of the fact value */
498
+ value$: Observable<T | undefined>;
515
499
  }
516
500
  /** Rule Engine constructor options */
517
- interface RulesEngineOptions {
518
- /** List of facts */
519
- facts?: Fact<Facts>[];
520
- /** List of rules */
521
- rules?: Ruleset[];
522
- /** List of custom operators */
523
- operators?: Operator<any, any>[];
524
- /** Delay before fact stream defaulting value */
525
- factDefaultDelay?: number;
526
- /**
527
- * Skip the rule and fact circular dependency checks
528
- * Turn to true to increase the speed of the upsert of a rule
529
- */
530
- skipCircularDependencyChecks?: boolean;
531
- /**
532
- * Provide debugger instance to the rules engine
533
- */
534
- debugger?: EngineDebugger;
535
- /**
536
- * Instance of the performance reporter to use for performance measurements.
537
- * @default window.performance on browser only, undefined on node
538
- */
539
- performance?: CrossPlatformPerformance;
540
- /**
541
- * Name of the rules engine instance
542
- * @default RulesEngine
543
- */
544
- rulesEngineInstanceName?: string;
545
- /**
546
- * Client to log the warning and error message
547
- */
548
- logger?: Logger;
501
+ export interface RulesEngineOptions {
502
+ /** List of facts */
503
+ facts?: Fact<Facts>[];
504
+ /** List of rules */
505
+ rules?: Ruleset[];
506
+ /** List of custom operators */
507
+ operators?: Operator<any, any>[];
508
+ /** Delay before fact stream defaulting value */
509
+ factDefaultDelay?: number;
510
+ /**
511
+ * Skip the rule and fact circular dependency checks
512
+ * Turn to true to increase the speed of the upsert of a rule
513
+ */
514
+ skipCircularDependencyChecks?: boolean;
515
+ /**
516
+ * Provide debugger instance to the rules engine
517
+ */
518
+ debugger?: EngineDebugger;
519
+ /**
520
+ * Instance of the performance reporter to use for performance measurements.
521
+ * @default window.performance on browser only, undefined on node
522
+ */
523
+ performance?: CrossPlatformPerformance;
524
+ /**
525
+ * Name of the rules engine instance
526
+ * @default RulesEngine
527
+ */
528
+ rulesEngineInstanceName?: string;
529
+ /**
530
+ * Client to log the warning and error message
531
+ */
532
+ logger?: Logger$1;
549
533
  }
550
534
  /** Rule as stored in the rules engine */
551
- interface EngineRule extends Rule {
552
- /** stream of the rule conditions result */
553
- result$: BehaviorSubject<ActionBlock[]>;
535
+ export interface EngineRule extends Rule {
536
+ /** stream of the rule conditions result */
537
+ result$: BehaviorSubject<ActionBlock[]>;
554
538
  }
555
539
  /** Rule as stored in the rules engine */
556
- interface EngineRuleset {
557
- /** Optional date range where the ruleset will be executed, it supports a dateString or a timestamp as number, more info on javascript Date() documentation */
558
- validityRange?: {
559
- from?: string | number;
560
- to?: string | number;
561
- };
562
- /**
563
- * Components linked to the ruleset. If present the ruleset will not be active by default.
564
- * 'or' condition: If at least one component has subscribed, the ruleset will become active.
565
- */
566
- linkedComponents?: {
567
- or: ItemIdentifier[];
568
- };
569
- /** Unique id of the ruleset*/
570
- id: string;
571
- /** Stores the result of each rules from the ruleset */
572
- rulesResultsSubject$: Observable<ActionBlock[]>;
540
+ export interface EngineRuleset {
541
+ /** Optional date range where the ruleset will be executed, it supports a dateString or a timestamp as number, more info on javascript Date() documentation */
542
+ validityRange?: {
543
+ from?: string | number;
544
+ to?: string | number;
545
+ };
546
+ /**
547
+ * Components linked to the ruleset. If present the ruleset will not be active by default.
548
+ * 'or' condition: If at least one component has subscribed, the ruleset will become active.
549
+ */
550
+ linkedComponents?: {
551
+ or: ItemIdentifier[];
552
+ };
553
+ /** Unique id of the ruleset*/
554
+ id: string;
555
+ /** Stores the result of each rules from the ruleset */
556
+ rulesResultsSubject$: Observable<ActionBlock[]>;
573
557
  }
574
558
  /** Timestamp of a rules engine output event */
575
- interface TimedEvent {
576
- /** Timestamp value when the event occurs */
577
- timestamp: number;
578
- /** Duration of the execution */
579
- duration?: number;
559
+ export interface TimedEvent {
560
+ /** Timestamp value when the event occurs */
561
+ timestamp: number;
562
+ /** Duration of the execution */
563
+ duration?: number;
580
564
  }
581
565
  /** Fact change triggering the evaluation of a rule/execution of a ruleset */
582
- interface EvaluationReason {
583
- /** Name of the fact that changed */
584
- factName: string;
585
- /** New value of the fact */
586
- newValue?: Facts;
587
- /** Old value of the fact */
588
- oldValue?: Facts;
566
+ export interface EvaluationReason {
567
+ /** Name of the fact that changed */
568
+ factName: string;
569
+ /** New value of the fact */
570
+ newValue?: Facts;
571
+ /** Old value of the fact */
572
+ oldValue?: Facts;
589
573
  }
590
574
  /** Result object resulted at the end of a rule evaluation */
591
- interface RuleEvaluation extends TimedEvent {
592
- /** Identifier of the evaluation (ruleset name + rule name) */
593
- id: string;
594
- /** Evaluated rule identifier */
595
- rule: Pick<Rule, 'id' | 'name'>;
596
- /** Actions outputted by the rule evaluation */
597
- outputActions: ActionBlock[] | undefined;
598
- /** Map containing the facts changes triggering the rule evaluation */
599
- triggers: Record<string, Record<string, EvaluationReason>>;
600
- /** Error object in case of rule evaluation failure */
601
- error?: any;
602
- /** Runtime facts with values at the end of rule evaluation */
603
- temporaryFacts?: Record<string, Facts>;
604
- /** Flag to notify if the rules evaluation comes from an old ruleset execution */
605
- cached?: boolean;
575
+ export interface RuleEvaluation extends TimedEvent {
576
+ /** Identifier of the evaluation (ruleset name + rule name) */
577
+ id: string;
578
+ /** Evaluated rule identifier */
579
+ rule: Pick<Rule, 'id' | 'name'>;
580
+ /** Actions outputted by the rule evaluation */
581
+ outputActions: ActionBlock[] | undefined;
582
+ /** Map containing the facts changes triggering the rule evaluation */
583
+ triggers: Record<string, Record<string, EvaluationReason>>;
584
+ /** Error object in case of rule evaluation failure */
585
+ error?: any;
586
+ /** Runtime facts with values at the end of rule evaluation */
587
+ temporaryFacts?: Record<string, Facts>;
588
+ /** Flag to notify if the rules evaluation comes from an old ruleset execution */
589
+ cached?: boolean;
606
590
  }
607
591
  /** Wrapped rule evaluation output */
608
- interface RuleEvaluationOutput {
609
- /** Actions emitted at the end of rule evaluation */
610
- actions: ActionBlock[] | undefined;
611
- /** Rule evaluation output object */
612
- evaluation?: RuleEvaluation;
613
- /** Error object emitted at the end of rule evaluation, if any */
614
- error?: any;
592
+ export interface RuleEvaluationOutput {
593
+ /** Actions emitted at the end of rule evaluation */
594
+ actions: ActionBlock[] | undefined;
595
+ /** Rule evaluation output object */
596
+ evaluation?: RuleEvaluation;
597
+ /** Error object emitted at the end of rule evaluation, if any */
598
+ error?: any;
615
599
  }
616
600
  /** Base object resulted at the end of a ruleset execution */
617
- interface BaseRulesetExecution {
618
- /** Id of the ruleset execution */
619
- executionId: string;
620
- /** Id of the ruleset which was executed */
621
- rulesetId: string;
622
- /** Name of the executed ruleset */
623
- rulesetName: string;
624
- /** Counter of executions for the ruleset */
625
- executionCounter: number;
626
- /** All input facts affecting the ruleset */
627
- inputFacts: {
628
- factName: string;
629
- value: Facts;
630
- }[];
631
- /** Runtime facts used across the ruleset */
632
- temporaryFacts?: Record<string, Facts>;
633
- /** Facts changes that triggered the execution of the ruleset */
634
- triggers: Record<string, Record<string, EvaluationReason>>;
635
- /** List of evaluated rules accros ruleset execution */
636
- rulesEvaluations: RuleEvaluation[];
601
+ export interface BaseRulesetExecution {
602
+ /** Id of the ruleset execution */
603
+ executionId: string;
604
+ /** Id of the ruleset which was executed */
605
+ rulesetId: string;
606
+ /** Name of the executed ruleset */
607
+ rulesetName: string;
608
+ /** Counter of executions for the ruleset */
609
+ executionCounter: number;
610
+ /** All input facts affecting the ruleset */
611
+ inputFacts: {
612
+ factName: string;
613
+ value: Facts;
614
+ }[];
615
+ /** Runtime facts used across the ruleset */
616
+ temporaryFacts?: Record<string, Facts>;
617
+ /** Facts changes that triggered the execution of the ruleset */
618
+ triggers: Record<string, Record<string, EvaluationReason>>;
619
+ /** List of evaluated rules accros ruleset execution */
620
+ rulesEvaluations: RuleEvaluation[];
637
621
  }
638
622
  /** Debug event emitted in case of successful ruleset execution */
639
- interface RulesetExecutionEvent extends BaseRulesetExecution, TimedEvent {
640
- /** Event type */
641
- type: 'RulesetExecution';
642
- /** List of the actions emitted at the end of ruleset execution */
643
- outputActions: ActionBlock[];
623
+ export interface RulesetExecutionEvent extends BaseRulesetExecution, TimedEvent {
624
+ /** Event type */
625
+ type: 'RulesetExecution';
626
+ /** List of the actions emitted at the end of ruleset execution */
627
+ outputActions: ActionBlock[];
644
628
  }
645
629
  /** Debug event emitted in case of ruleset execution failure */
646
- interface RulesetExecutionErrorEvent extends BaseRulesetExecution, TimedEvent {
647
- /** Event type */
648
- type: 'RulesetExecutionError';
649
- /** List of rules causing the execution error*/
650
- rulesCausingTheError: Pick<Rule, 'name' | 'id'>[];
651
- /** List of outputted errors */
652
- errors: any[];
630
+ export interface RulesetExecutionErrorEvent extends BaseRulesetExecution, TimedEvent {
631
+ /** Event type */
632
+ type: 'RulesetExecutionError';
633
+ /** List of rules causing the execution error*/
634
+ rulesCausingTheError: Pick<Rule, 'name' | 'id'>[];
635
+ /** List of outputted errors */
636
+ errors: any[];
653
637
  }
654
638
  /** Debug event emitted when active rulesets are changing */
655
- interface ActiveRulesetsEvent extends TimedEvent {
656
- /** Event type */
657
- type: 'ActiveRulesets';
658
- /** List of active rulesets */
659
- rulesets: Pick<Ruleset, 'name' | 'id'>[];
639
+ export interface ActiveRulesetsEvent extends TimedEvent {
640
+ /** Event type */
641
+ type: 'ActiveRulesets';
642
+ /** List of active rulesets */
643
+ rulesets: Pick<Ruleset, 'name' | 'id'>[];
660
644
  }
661
645
  /** Debug event emitted each time the Rules Engine outputs a list of actions */
662
- interface AllActionsEvent extends TimedEvent {
663
- /** event type */
664
- type: 'AllActions';
665
- /** List of emitted actions */
666
- actions: ActionBlock[];
646
+ export interface AllActionsEvent extends TimedEvent {
647
+ /** event type */
648
+ type: 'AllActions';
649
+ /** List of emitted actions */
650
+ actions: ActionBlock[];
667
651
  }
668
652
  /** Debug event emitted when rulesets are registered to the rules engine */
669
- interface AvailableRulesets extends TimedEvent {
670
- /** Event type */
671
- type: 'AvailableRulesets';
672
- /** Registered rulesets list */
673
- availableRulesets: Pick<Ruleset, 'name' | 'id'>[];
653
+ export interface AvailableRulesets extends TimedEvent {
654
+ /** Event type */
655
+ type: 'AvailableRulesets';
656
+ /** Registered rulesets list */
657
+ availableRulesets: Pick<Ruleset, 'name' | 'id'>[];
674
658
  }
675
659
  /** Debug event emitted when facts are updated */
676
- interface AvailableFactsSnapshot extends TimedEvent {
677
- /** Event type */
678
- type: 'AvailableFactsSnapshot';
679
- /** List of all facts */
680
- facts: {
681
- factName: string;
682
- value: Facts;
683
- }[];
660
+ export interface AvailableFactsSnapshot extends TimedEvent {
661
+ /** Event type */
662
+ type: 'AvailableFactsSnapshot';
663
+ /** List of all facts */
664
+ facts: {
665
+ factName: string;
666
+ value: Facts;
667
+ }[];
684
668
  }
685
669
  /** Type of possible debug events emitted by Rules Engine */
686
- type DebugEvent = RulesetExecutionEvent | RulesetExecutionErrorEvent | ActiveRulesetsEvent | AllActionsEvent | AvailableRulesets | AvailableFactsSnapshot;
687
-
670
+ export type DebugEvent = RulesetExecutionEvent | RulesetExecutionErrorEvent | ActiveRulesetsEvent | AllActionsEvent | AvailableRulesets | AvailableFactsSnapshot;
688
671
  /** Rules engine */
689
- declare class RulesEngine {
690
- /** Map of registered fact stream, this map is mutated by the ruleset executors */
691
- private readonly factMap;
692
- /** Subject containing the rulesets and the results stream*/
693
- private readonly rulesetMapSubject;
694
- /** Map of available operators */
695
- operators: Record<string, Operator<unknown, unknown>>;
696
- /** List of events for the current state of the rules engine */
697
- readonly events$: Observable<ActionBlock[]>;
698
- /** Delay before fact stream defaulting value */
699
- factDefaultDelay?: number;
700
- /**
701
- * Instance of engine debug object; Undefined if debugMode is not active
702
- */
703
- readonly engineDebug?: EngineDebugger;
704
- /** Name of the rules engine instance */
705
- readonly rulesEngineInstanceName: string;
706
- /**
707
- * Performance reporter to use for performance measurements.
708
- * @default window.performance on browser only, undefined on node
709
- */
710
- readonly performance: _o3r_rules_engine.CrossPlatformPerformance | undefined;
711
- /**
712
- * Log the engine errors
713
- */
714
- readonly logger?: Logger$1;
715
- /**
716
- * Flag to check if the run is in debug mode or not
717
- */
718
- get debugMode(): boolean;
719
- /**
720
- * Rules engine
721
- * @param options rules engine options
722
- */
723
- constructor(options?: RulesEngineOptions);
724
- /**
725
- * Attach debug events to actions stream if debug engine is activated
726
- */
727
- private handleActionsStreamOutput;
728
- /**
729
- * Create the actions stream event based on provided active rulesets ids; Handle debug too
730
- * @param ruleSets
731
- */
732
- private prepareActionsStream;
733
- /**
734
- * Create or retrieve a fact stream
735
- * The fact stream created will be registered in the engine
736
- * @param id ID of the fact to retrieve
737
- * @param factValue$ Value stream for the fact
738
- */
739
- retrieveOrCreateFactStream<T = Facts>(id: string, factValue$?: Observable<T>): Observable<T | undefined>;
740
- /**
741
- * Retrieve the promise of the latest value of a fact.
742
- * Return undefined if the fact is not defined.
743
- * @param id ID of the fact to retrieve
744
- */
745
- retrieveFactValue<T = unknown>(id: string): Promise<T | undefined> | undefined;
746
- /**
747
- * Update or insert fact in rules engine
748
- * @param facts fact list to add / update
749
- */
750
- upsertFacts<T = unknown>(facts: Fact<T> | Fact<T>[]): void;
751
- /**
752
- * Update or insert rule in rules engine
753
- * @param rulesets
754
- */
755
- upsertRulesets(rulesets: Ruleset[]): void;
756
- /**
757
- * Update or insert operator in rules engine
758
- * @param operators operator list to add / update
759
- */
760
- upsertOperators(operators: (Operator<any, any> | UnaryOperator<any>)[]): void;
761
- /**
762
- * Operator to apply on a stream of rulesets ids
763
- * Returns a stream of actions outputted by the rules engine, corresponding to the rulesetsIds
764
- */
765
- getEventStream<T extends ActionBlock = ActionBlock>(): (rulesetsIds$: Observable<string[] | undefined>) => Observable<T[]>;
766
- /** Get the list of registered facts names */
767
- getRegisteredFactsNames(): string[];
672
+ export declare class RulesEngine {
673
+ /** Map of registered fact stream, this map is mutated by the ruleset executors */
674
+ private readonly factMap;
675
+ /** Subject containing the rulesets and the results stream*/
676
+ private readonly rulesetMapSubject;
677
+ /** Map of available operators */
678
+ operators: Record<string, Operator<unknown, unknown>>;
679
+ /** List of events for the current state of the rules engine */
680
+ readonly events$: Observable<ActionBlock[]>;
681
+ /** Delay before fact stream defaulting value */
682
+ factDefaultDelay?: number;
683
+ /**
684
+ * Instance of engine debug object; Undefined if debugMode is not active
685
+ */
686
+ readonly engineDebug?: EngineDebugger;
687
+ /** Name of the rules engine instance */
688
+ readonly rulesEngineInstanceName: string;
689
+ /**
690
+ * Performance reporter to use for performance measurements.
691
+ * @default window.performance on browser only, undefined on node
692
+ */
693
+ readonly performance: import("@o3r/rules-engine").CrossPlatformPerformance | undefined;
694
+ /**
695
+ * Log the engine errors
696
+ */
697
+ readonly logger?: Logger;
698
+ /**
699
+ * Flag to check if the run is in debug mode or not
700
+ */
701
+ get debugMode(): boolean;
702
+ /**
703
+ * Rules engine
704
+ * @param options rules engine options
705
+ */
706
+ constructor(options?: RulesEngineOptions);
707
+ /**
708
+ * Attach debug events to actions stream if debug engine is activated
709
+ */
710
+ private handleActionsStreamOutput;
711
+ /**
712
+ * Create the actions stream event based on provided active rulesets ids; Handle debug too
713
+ * @param ruleSets
714
+ */
715
+ private prepareActionsStream;
716
+ /**
717
+ * Create or retrieve a fact stream
718
+ * The fact stream created will be registered in the engine
719
+ * @param id ID of the fact to retrieve
720
+ * @param factValue$ Value stream for the fact
721
+ */
722
+ retrieveOrCreateFactStream<T = Facts>(id: string, factValue$?: Observable<T>): Observable<T | undefined>;
723
+ /**
724
+ * Retrieve the promise of the latest value of a fact.
725
+ * Return undefined if the fact is not defined.
726
+ * @param id ID of the fact to retrieve
727
+ */
728
+ retrieveFactValue<T = unknown>(id: string): Promise<T | undefined> | undefined;
729
+ /**
730
+ * Update or insert fact in rules engine
731
+ * @param facts fact list to add / update
732
+ */
733
+ upsertFacts<T = unknown>(facts: Fact<T> | Fact<T>[]): void;
734
+ /**
735
+ * Update or insert rule in rules engine
736
+ * @param rulesets
737
+ */
738
+ upsertRulesets(rulesets: Ruleset[]): void;
739
+ /**
740
+ * Update or insert operator in rules engine
741
+ * @param operators operator list to add / update
742
+ */
743
+ upsertOperators(operators: (Operator<any, any> | UnaryOperator<any>)[]): void;
744
+ /**
745
+ * Operator to apply on a stream of rulesets ids
746
+ * Returns a stream of actions outputted by the rules engine, corresponding to the rulesetsIds
747
+ */
748
+ getEventStream<T extends ActionBlock = ActionBlock>(): (rulesetsIds$: Observable<string[] | undefined>) => Observable<T[]>;
749
+ /** Get the list of registered facts names */
750
+ getRegisteredFactsNames(): string[];
768
751
  }
769
-
770
752
  declare class RulesetExecutor {
771
- /** retrieveFactFunc */
772
- protected readonly rulesEngine: RulesEngine;
773
- /** Map of available operators */
774
- protected readonly operators: Record<string, Operator<unknown, unknown>>;
775
- /** Delay before fact stream defaulting value */
776
- readonly factDefaultDelay?: number;
777
- /** Ruleset associated to the current executor*/
778
- readonly ruleset: Ruleset;
779
- /** Ruleset plugged to the fact stream, that contains actions stream result */
780
- readonly engineRuleset: EngineRuleset;
781
- private executionCounter;
782
- /**
783
- * Create a new ruleset executor
784
- * @param ruleset Ruleset to evaluate
785
- * @param rulesEngine Instance of the rules engine
786
- */
787
- constructor(ruleset: Ruleset, rulesEngine: RulesEngine);
788
- /**
789
- * Recursively explores a rule to identify and collect input facts.
790
- * Input facts are identified based on the 'FACT' type and operator-specific implicit dependencies.
791
- * @param currentObject The current object being explored.
792
- * @param ruleInputFacts A set to store the identified input facts for the rule.
793
- */
794
- private collectRuleInputFacts;
795
- /**
796
- * Report performance mark for a rule run
797
- * @param rule Rule to measure
798
- * @param status status of the rule evaluation
799
- */
800
- protected performanceMark(rule: Rule, status: 'start' | 'end'): void;
801
- /**
802
- * Get operand value stream according to its type
803
- * @param operand operand of the condition
804
- * @param factsValue
805
- * @param runtimeFactValues
806
- */
807
- protected getOperandValue(operand: GenericOperand | undefined, factsValue: Record<string, Facts | undefined>, runtimeFactValues: Record<string, Facts>): unknown;
808
- /**
809
- * Process a root rule from a ruleset, and return the associated actions to be processed
810
- * Will also update the runtimeFactValues map that is ruleset wise
811
- * Note that runtimeFactValues will be mutated by all the runtime facts actions executed
812
- * @param rule
813
- * @param factsValue
814
- * @param runtimeFactValues
815
- * @protected
816
- */
817
- protected evaluateRule(rule: Rule, factsValue: Record<string, Facts | undefined>, runtimeFactValues: Record<string, Facts>): ActionBlock[];
818
- /**
819
- * Recursively process a block to extract all the actions keeping the order
820
- * Note that runtimeFactValues will be mutated by all the runtime facts actions executed
821
- * @param element
822
- * @param factsValue
823
- * @param runtimeFactValues This runtime fact map will be mutated by all the runtime facts actions executed
824
- * @param actions
825
- * @protected
826
- */
827
- protected evaluateBlock(element: AllBlock, factsValue: Record<string, Facts | undefined>, runtimeFactValues: Record<string, Facts>, actions?: ActionBlock[]): ActionBlock[];
828
- /**
829
- * Returns true if the element is a IfElse block
830
- * @param element
831
- * @protected
832
- */
833
- protected isIfElseBlock(element: AllBlock): element is IfElseBlock;
834
- /**
835
- * Returns true if the element is an action block
836
- * @param element
837
- * @protected
838
- */
839
- protected isActionBlock(element: AllBlock): element is ActionBlock;
840
- /**
841
- * Returns true if the action sets a temporary fact
842
- * @param element
843
- * @protected
844
- */
845
- protected isActionSetTemporaryFactBlock(element: ActionBlock): element is ActionSetTemporaryFactBlock;
846
- /**
847
- * Evaluate a condition block
848
- * @param nestedCondition
849
- * @param factsValue
850
- * @param runtimeFactValues
851
- * @protected
852
- */
853
- protected evaluateCondition(nestedCondition: NestedCondition, factsValue: Record<string, Facts | undefined>, runtimeFactValues: Record<string, Facts>): boolean;
854
- /**
855
- * Find rule input facts
856
- * @param obj
857
- */
858
- protected readonly findRuleInputFacts: (obj: AllBlock) => string[];
859
- /**
860
- * Plug ruleset to fact streams and trigger a first evaluation
861
- */
862
- protected plugRuleset(): EngineRuleset;
753
+ /** retrieveFactFunc */
754
+ protected readonly rulesEngine: RulesEngine;
755
+ /** Map of available operators */
756
+ protected readonly operators: Record<string, Operator<unknown, unknown>>;
757
+ /** Delay before fact stream defaulting value */
758
+ readonly factDefaultDelay?: number;
759
+ /** Ruleset associated to the current executor*/
760
+ readonly ruleset: Ruleset;
761
+ /** Ruleset plugged to the fact stream, that contains actions stream result */
762
+ readonly engineRuleset: EngineRuleset;
763
+ private executionCounter;
764
+ /**
765
+ * Create a new ruleset executor
766
+ * @param ruleset Ruleset to evaluate
767
+ * @param rulesEngine Instance of the rules engine
768
+ */
769
+ constructor(ruleset: Ruleset, rulesEngine: RulesEngine);
770
+ /**
771
+ * Recursively explores a rule to identify and collect input facts.
772
+ * Input facts are identified based on the 'FACT' type and operator-specific implicit dependencies.
773
+ * @param currentObject The current object being explored.
774
+ * @param ruleInputFacts A set to store the identified input facts for the rule.
775
+ */
776
+ private collectRuleInputFacts;
777
+ /**
778
+ * Report performance mark for a rule run
779
+ * @param rule Rule to measure
780
+ * @param status status of the rule evaluation
781
+ */
782
+ protected performanceMark(rule: Rule, status: 'start' | 'end'): void;
783
+ /**
784
+ * Get operand value stream according to its type
785
+ * @param operand operand of the condition
786
+ * @param factsValue
787
+ * @param runtimeFactValues
788
+ */
789
+ protected getOperandValue(operand: GenericOperand | undefined, factsValue: Record<string, Facts | undefined>, runtimeFactValues: Record<string, Facts>): unknown;
790
+ /**
791
+ * Process a root rule from a ruleset, and return the associated actions to be processed
792
+ * Will also update the runtimeFactValues map that is ruleset wise
793
+ * Note that runtimeFactValues will be mutated by all the runtime facts actions executed
794
+ * @param rule
795
+ * @param factsValue
796
+ * @param runtimeFactValues
797
+ * @protected
798
+ */
799
+ protected evaluateRule(rule: Rule, factsValue: Record<string, Facts | undefined>, runtimeFactValues: Record<string, Facts>): ActionBlock[];
800
+ /**
801
+ * Recursively process a block to extract all the actions keeping the order
802
+ * Note that runtimeFactValues will be mutated by all the runtime facts actions executed
803
+ * @param element
804
+ * @param factsValue
805
+ * @param runtimeFactValues This runtime fact map will be mutated by all the runtime facts actions executed
806
+ * @param actions
807
+ * @protected
808
+ */
809
+ protected evaluateBlock(element: AllBlock, factsValue: Record<string, Facts | undefined>, runtimeFactValues: Record<string, Facts>, actions?: ActionBlock[]): ActionBlock[];
810
+ /**
811
+ * Returns true if the element is a IfElse block
812
+ * @param element
813
+ * @protected
814
+ */
815
+ protected isIfElseBlock(element: AllBlock): element is IfElseBlock;
816
+ /**
817
+ * Returns true if the element is an action block
818
+ * @param element
819
+ * @protected
820
+ */
821
+ protected isActionBlock(element: AllBlock): element is ActionBlock;
822
+ /**
823
+ * Returns true if the action sets a temporary fact
824
+ * @param element
825
+ * @protected
826
+ */
827
+ protected isActionSetTemporaryFactBlock(element: ActionBlock): element is ActionSetTemporaryFactBlock;
828
+ /**
829
+ * Evaluate a condition block
830
+ * @param nestedCondition
831
+ * @param factsValue
832
+ * @param runtimeFactValues
833
+ * @protected
834
+ */
835
+ protected evaluateCondition(nestedCondition: NestedCondition, factsValue: Record<string, Facts | undefined>, runtimeFactValues: Record<string, Facts>): boolean;
836
+ /**
837
+ * Find rule input facts
838
+ * @param obj
839
+ */
840
+ protected readonly findRuleInputFacts: (obj: AllBlock) => string[];
841
+ /**
842
+ * Plug ruleset to fact streams and trigger a first evaluation
843
+ */
844
+ protected plugRuleset(): EngineRuleset;
863
845
  }
864
-
865
- interface EngineDebuggerOptions {
866
- /**
867
- * Limit of events to keep in the stack before subscribing to the debugEvents$ stream.
868
- * @default undefined no limit
869
- */
870
- eventsStackLimit?: number;
846
+ export interface EngineDebuggerOptions {
847
+ /**
848
+ * Limit of events to keep in the stack before subscribing to the debugEvents$ stream.
849
+ * @default undefined no limit
850
+ */
851
+ eventsStackLimit?: number;
871
852
  }
872
853
  /**
873
854
  * Rules engine debugger object to emit debug events
874
855
  */
875
- declare class EngineDebugger {
876
- private registeredRuleEngine?;
877
- private registeredRulesets;
878
- private readonly debugEventsSubject$;
879
- private performanceMeasures$;
880
- private readonly requestFactsSnapshot;
881
- /** Stream emitting a debug event when is fired; timeline is kept */
882
- readonly debugEvents$: Observable<DebugEvent>;
883
- /** Retrieved the rules engine plugged to the debugger */
884
- get rulesEngine(): RulesEngine | undefined;
885
- /**
886
- * Instantiate a rules engine debugger
887
- * @param options Options to configure the debugger
888
- */
889
- constructor(options?: EngineDebuggerOptions);
890
- private initializePerformanceObserver;
891
- private createBaseExecutionOutputObject;
892
- private rulesetExecution;
893
- private rulesetExecutionError;
894
- /**
895
- * Plug the debugger to a Rule Engine
896
- * @param rulesEngine
897
- */
898
- registerRuleEngine(rulesEngine: RulesEngine): void;
899
- /**
900
- * Handle ruleset execution debug info
901
- * @param currRes
902
- * @param prevRes
903
- * @param allExecutionsValid
904
- * @param rulesetInputFacts
905
- * @param runtimeFactValues
906
- * @param executionCounter
907
- * @param ruleset
908
- */
909
- handleDebugRulesetExecutionInfo(currRes: RuleEvaluationOutput[], prevRes: RuleEvaluationOutput[] | undefined, allExecutionsValid: boolean, rulesetInputFacts: string[], runtimeFactValues: Record<string, Facts>, executionCounter: number, ruleset: Ruleset): {
910
- executionCounter: number;
911
- rulesetOutputExecution: RuleEvaluation[];
912
- allExecutionsValid: boolean;
913
- rulesetTriggers: Record<string, Record<string, EvaluationReason>>;
914
- };
915
- /**
916
- * Emits an 'AvailableRulesets' debug event when rulesets are registered to the rules engine
917
- * @param rulesets
918
- */
919
- addAvailableRulesets(rulesets: Ruleset[]): void;
920
- /**
921
- * Computes and emits an 'ActiveRulesets' debug event when the active rulesets are changing
922
- * @param ruleSetExecutorMap map off all rulesets executors
923
- * @param restrictiveRuleSets ids of the rulesets to activate; if not provided all registered rulesets will be considered as active
924
- */
925
- activeRulesetsChange(ruleSetExecutorMap: Record<string, RulesetExecutor>, restrictiveRuleSets?: string[]): void;
926
- /**
927
- * Emits an 'AllActions' debug event each time the rules engine outputs the list of actions
928
- * @param actions list of outputted actions
929
- */
930
- allActionsChange(actions: ActionBlock[]): void;
931
- /**
932
- * Emits a 'RulesetExecution' debug event at the output of a successful ruleset execution
933
- * @param ruleset
934
- * @param executionCounter
935
- * @param rulesetInputFacts
936
- * @param allOutputActions
937
- * @param runtimeFactValues
938
- * @param rulesetTriggers
939
- * @param rulesExecutions
940
- */
941
- addRulesetExecutionEvent(ruleset: Ruleset, executionCounter: number, rulesetInputFacts: string[], allOutputActions: ActionBlock[], runtimeFactValues: Record<string, Facts>, rulesetTriggers: Record<string, Record<string, EvaluationReason>>, rulesExecutions: RuleEvaluation[]): void;
942
- /**
943
- * Emits a 'RulesetExecutionError' debug event at the output of a failing ruleset execution
944
- * @param ruleset
945
- * @param rulesetInputFacts
946
- * @param executionCounter
947
- * @param runtimeFactValues
948
- * @param rulesetTriggers
949
- * @param rulesExecutions
950
- */
951
- addRulesetExecutionErrorEvent(ruleset: Ruleset, rulesetInputFacts: string[], executionCounter: number, runtimeFactValues: Record<string, Facts>, rulesetTriggers: Record<string, Record<string, EvaluationReason>>, rulesExecutions: RuleEvaluation[]): void;
952
- /**
953
- * Emits a 'AvailableFactsSnapshot' debug event when a fact value is updated
954
- * @param _id
955
- * @param factValue$
956
- */
957
- addAvailableFactsSnapshotEvent(_id: string, factValue$: Observable<any>): void;
958
- /**
959
- * Returns a list of fact name and value pairs
960
- * @param factsNames List of facts names to get the value for
961
- */
962
- getFactsSnapshot(factsNames: string[]): Promise<{
963
- factName: string;
964
- value: any;
965
- }[]>;
856
+ export declare class EngineDebugger {
857
+ private registeredRuleEngine?;
858
+ private registeredRulesets;
859
+ private readonly debugEventsSubject$;
860
+ private performanceMeasures$;
861
+ private readonly requestFactsSnapshot;
862
+ /** Stream emitting a debug event when is fired; timeline is kept */
863
+ readonly debugEvents$: Observable<DebugEvent>;
864
+ /** Retrieved the rules engine plugged to the debugger */
865
+ get rulesEngine(): RulesEngine | undefined;
866
+ /**
867
+ * Instantiate a rules engine debugger
868
+ * @param options Options to configure the debugger
869
+ */
870
+ constructor(options?: EngineDebuggerOptions);
871
+ private initializePerformanceObserver;
872
+ private createBaseExecutionOutputObject;
873
+ private rulesetExecution;
874
+ private rulesetExecutionError;
875
+ /**
876
+ * Plug the debugger to a Rule Engine
877
+ * @param rulesEngine
878
+ */
879
+ registerRuleEngine(rulesEngine: RulesEngine): void;
880
+ /**
881
+ * Handle ruleset execution debug info
882
+ * @param currRes
883
+ * @param prevRes
884
+ * @param allExecutionsValid
885
+ * @param rulesetInputFacts
886
+ * @param runtimeFactValues
887
+ * @param executionCounter
888
+ * @param ruleset
889
+ */
890
+ handleDebugRulesetExecutionInfo(currRes: RuleEvaluationOutput[], prevRes: RuleEvaluationOutput[] | undefined, allExecutionsValid: boolean, rulesetInputFacts: string[], runtimeFactValues: Record<string, Facts>, executionCounter: number, ruleset: Ruleset): {
891
+ executionCounter: number;
892
+ rulesetOutputExecution: RuleEvaluation[];
893
+ allExecutionsValid: boolean;
894
+ rulesetTriggers: Record<string, Record<string, EvaluationReason>>;
895
+ };
896
+ /**
897
+ * Emits an 'AvailableRulesets' debug event when rulesets are registered to the rules engine
898
+ * @param rulesets
899
+ */
900
+ addAvailableRulesets(rulesets: Ruleset[]): void;
901
+ /**
902
+ * Computes and emits an 'ActiveRulesets' debug event when the active rulesets are changing
903
+ * @param ruleSetExecutorMap map off all rulesets executors
904
+ * @param restrictiveRuleSets ids of the rulesets to activate; if not provided all registered rulesets will be considered as active
905
+ */
906
+ activeRulesetsChange(ruleSetExecutorMap: Record<string, RulesetExecutor>, restrictiveRuleSets?: string[]): void;
907
+ /**
908
+ * Emits an 'AllActions' debug event each time the rules engine outputs the list of actions
909
+ * @param actions list of outputted actions
910
+ */
911
+ allActionsChange(actions: ActionBlock[]): void;
912
+ /**
913
+ * Emits a 'RulesetExecution' debug event at the output of a successful ruleset execution
914
+ * @param ruleset
915
+ * @param executionCounter
916
+ * @param rulesetInputFacts
917
+ * @param allOutputActions
918
+ * @param runtimeFactValues
919
+ * @param rulesetTriggers
920
+ * @param rulesExecutions
921
+ */
922
+ addRulesetExecutionEvent(ruleset: Ruleset, executionCounter: number, rulesetInputFacts: string[], allOutputActions: ActionBlock[], runtimeFactValues: Record<string, Facts>, rulesetTriggers: Record<string, Record<string, EvaluationReason>>, rulesExecutions: RuleEvaluation[]): void;
923
+ /**
924
+ * Emits a 'RulesetExecutionError' debug event at the output of a failing ruleset execution
925
+ * @param ruleset
926
+ * @param rulesetInputFacts
927
+ * @param executionCounter
928
+ * @param runtimeFactValues
929
+ * @param rulesetTriggers
930
+ * @param rulesExecutions
931
+ */
932
+ addRulesetExecutionErrorEvent(ruleset: Ruleset, rulesetInputFacts: string[], executionCounter: number, runtimeFactValues: Record<string, Facts>, rulesetTriggers: Record<string, Record<string, EvaluationReason>>, rulesExecutions: RuleEvaluation[]): void;
933
+ /**
934
+ * Emits a 'AvailableFactsSnapshot' debug event when a fact value is updated
935
+ * @param _id
936
+ * @param factValue$
937
+ */
938
+ addAvailableFactsSnapshotEvent(_id: string, factValue$: Observable<any>): void;
939
+ /**
940
+ * Returns a list of fact name and value pairs
941
+ * @param factsNames List of facts names to get the value for
942
+ */
943
+ getFactsSnapshot(factsNames: string[]): Promise<{
944
+ factName: string;
945
+ value: any;
946
+ }[]>;
966
947
  }
967
-
968
948
  /**
969
949
  * Determine if the condition is a properties condition
970
950
  * @param condition Condition to analyze
971
951
  */
972
- declare function isConditionProperties(condition: any): condition is BinaryOperation | UnaryOperation;
952
+ export declare function isConditionProperties(condition: any): condition is BinaryOperation | UnaryOperation;
973
953
  /**
974
954
  * Determine if the given operand is a Fact operand
975
955
  * @param operand Operand to analyze
976
956
  */
977
- declare function isOperandFact(operand: any): operand is OperandFact;
957
+ export declare function isOperandFact(operand: any): operand is OperandFact;
978
958
  /**
979
959
  * Determine if the given operand is a Inner Fact operand
980
960
  * @param operand Operand to analyze
981
961
  */
982
- declare function isOperandRuntimeFact(operand: any): operand is Operand<'RUNTIME_FACT', string>;
962
+ export declare function isOperandRuntimeFact(operand: any): operand is Operand<'RUNTIME_FACT', string>;
983
963
  /**
984
964
  * Determine if the given operand is a Static Value operand
985
965
  * @param operand Operand to analyze
986
966
  */
987
- declare function isOperandLiteral(operand: any): operand is Operand<'LITERAL'>;
967
+ export declare function isOperandLiteral(operand: any): operand is Operand<'LITERAL'>;
988
968
  /**
989
969
  * Determine if the given condition is All based child conditions
990
970
  * @param condition Condition node
991
971
  */
992
- declare function isAllConditions(condition: any): condition is AllConditions;
972
+ export declare function isAllConditions(condition: any): condition is AllConditions;
993
973
  /**
994
974
  * Determine if the given condition is Any based child conditions
995
975
  * @param condition Condition node
996
976
  */
997
- declare function isAnyConditions(condition: any): condition is AnyConditions;
977
+ export declare function isAnyConditions(condition: any): condition is AnyConditions;
998
978
  /**
999
979
  * Determine if the given condition is Not based child conditions
1000
980
  * @param condition Condition node
1001
981
  */
1002
- declare function isNotCondition(condition: any): condition is NotCondition;
1003
-
1004
- declare class FactsSnapshotComponent {
1005
- /**
1006
- * Full list of available facts with their current value
1007
- */
1008
- readonly facts: i0.InputSignal<{
1009
- factName: string;
1010
- value: Facts;
1011
- }[]>;
1012
- /**
1013
- * Search terms
1014
- */
1015
- readonly search: i0.WritableSignal<string>;
1016
- /**
1017
- * Filtered list of facts using search terms
1018
- */
1019
- readonly filteredFacts: i0.Signal<{
1020
- factName: string;
1021
- value: Facts;
1022
- }[]>;
1023
- static ɵfac: i0.ɵɵFactoryDeclaration<FactsSnapshotComponent, never>;
1024
- static ɵcmp: i0.ɵɵComponentDeclaration<FactsSnapshotComponent, "o3r-facts-snapshot", never, { "facts": { "alias": "facts"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
982
+ export declare function isNotCondition(condition: any): condition is NotCondition;
983
+ export declare class FactsSnapshotComponent {
984
+ /**
985
+ * Full list of available facts with their current value
986
+ */
987
+ readonly facts: import("@angular/core").InputSignal<{
988
+ factName: string;
989
+ value: Facts;
990
+ }[]>;
991
+ /**
992
+ * Search terms
993
+ */
994
+ readonly search: import("@angular/core").WritableSignal<string>;
995
+ /**
996
+ * Filtered list of facts using search terms
997
+ */
998
+ readonly filteredFacts: import("@angular/core").Signal<{
999
+ factName: string;
1000
+ value: Facts;
1001
+ }[]>;
1002
+ static ɵfac: i0.ɵɵFactoryDeclaration<FactsSnapshotComponent, never>;
1003
+ static ɵcmp: i0.ɵɵComponentDeclaration<FactsSnapshotComponent, "o3r-facts-snapshot", never, {
1004
+ "facts": {
1005
+ "alias": "facts";
1006
+ "required": true;
1007
+ "isSignal": true;
1008
+ };
1009
+ }, {}, never, never, true, never>;
1025
1010
  }
1026
-
1027
- type RulesetExecutionStatus = 'Error' | 'Active' | 'Deactivated' | 'NoEffect';
1011
+ export type RulesetExecutionStatus = 'Error' | 'Active' | 'Deactivated' | 'NoEffect';
1028
1012
  /**
1029
1013
  * Model of a RulesetExecution with more information for debug purpose
1030
1014
  */
1031
- type RulesetExecutionDebug = (RulesetExecutionEvent | RulesetExecutionErrorEvent) & {
1032
- isActive: boolean;
1033
- status: RulesetExecutionStatus;
1034
- rulesetInformation: Ruleset | undefined;
1015
+ export type RulesetExecutionDebug = (RulesetExecutionEvent | RulesetExecutionErrorEvent) & {
1016
+ isActive: boolean;
1017
+ status: RulesetExecutionStatus;
1018
+ rulesetInformation: Ruleset | undefined;
1035
1019
  };
1036
- declare class RulesetHistoryPresComponent {
1037
- private readonly cd;
1038
- /**
1039
- * Reflects the state of each ruleset expanded elements.
1040
- * Each ruleset entry contains a list of subpanel that can be collapsed or expanded.
1041
- * Ruleset whole panel status is store the 'ruleset' entry.
1042
- * @example
1043
- * Expanded ruleset with rule overview collapsed:
1044
- * {'rulesetId': {'ruleset' : true, 'ruleOverview': false}}
1045
- * @note Collapsing a ruleset will not reset the subpanel expansion status
1046
- */
1047
- expansionStatus: {
1048
- [key: string]: {
1049
- [subpanel: string]: boolean;
1050
- };
1020
+ export declare class RulesetHistoryPresComponent {
1021
+ private readonly cd;
1022
+ /**
1023
+ * Reflects the state of each ruleset expanded elements.
1024
+ * Each ruleset entry contains a list of subpanel that can be collapsed or expanded.
1025
+ * Ruleset whole panel status is store the 'ruleset' entry.
1026
+ * @example
1027
+ * Expanded ruleset with rule overview collapsed:
1028
+ * {'rulesetId': {'ruleset' : true, 'ruleOverview': false}}
1029
+ * @note Collapsing a ruleset will not reset the subpanel expansion status
1030
+ */
1031
+ expansionStatus: {
1032
+ [key: string]: {
1033
+ [subpanel: string]: boolean;
1051
1034
  };
1052
- rulesetExecutions: i0.InputSignal<RulesetExecutionDebug[] | null | undefined>;
1053
- executionDurationFormat: i0.InputSignal<string>;
1054
- /**
1055
- * Toggle a ruleset subpanel
1056
- * @param ruleId
1057
- * @param subpanel element to collapse. 'ruleset' will toggle the whole panel but won't reset the subpanels states.
1058
- */
1059
- toggleExpansion(ruleId: string, subpanel: string): void;
1060
- static ɵfac: i0.ɵɵFactoryDeclaration<RulesetHistoryPresComponent, never>;
1061
- static ɵcmp: i0.ɵɵComponentDeclaration<RulesetHistoryPresComponent, "o3r-ruleset-history-pres", never, { "rulesetExecutions": { "alias": "rulesetExecutions"; "required": false; "isSignal": true; }; "executionDurationFormat": { "alias": "executionDurationFormat"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1035
+ };
1036
+ rulesetExecutions: import("@angular/core").InputSignal<RulesetExecutionDebug[] | null | undefined>;
1037
+ executionDurationFormat: import("@angular/core").InputSignal<string>;
1038
+ /**
1039
+ * Toggle a ruleset subpanel
1040
+ * @param ruleId
1041
+ * @param subpanel element to collapse. 'ruleset' will toggle the whole panel but won't reset the subpanels states.
1042
+ */
1043
+ toggleExpansion(ruleId: string, subpanel: string): void;
1044
+ static ɵfac: i0.ɵɵFactoryDeclaration<RulesetHistoryPresComponent, never>;
1045
+ static ɵcmp: i0.ɵɵComponentDeclaration<RulesetHistoryPresComponent, "o3r-ruleset-history-pres", never, {
1046
+ "rulesetExecutions": {
1047
+ "alias": "rulesetExecutions";
1048
+ "required": false;
1049
+ "isSignal": true;
1050
+ };
1051
+ "executionDurationFormat": {
1052
+ "alias": "executionDurationFormat";
1053
+ "required": false;
1054
+ "isSignal": true;
1055
+ };
1056
+ }, {}, never, never, true, never>;
1062
1057
  }
1063
-
1064
- declare class O3rFallbackToPipe implements PipeTransform {
1065
- transform<T>(value: T, fallback?: string): T | string;
1066
- static ɵfac: i0.ɵɵFactoryDeclaration<O3rFallbackToPipe, never>;
1067
- static ɵpipe: i0.ɵɵPipeDeclaration<O3rFallbackToPipe, "o3rFallbackTo", true>;
1058
+ export declare class O3rFallbackToPipe implements PipeTransform {
1059
+ transform<T>(value: T, fallback?: string): T | string;
1060
+ static ɵfac: i0.ɵɵFactoryDeclaration<O3rFallbackToPipe, never>;
1061
+ static ɵpipe: i0.ɵɵPipeDeclaration<O3rFallbackToPipe, "o3rFallbackTo", true>;
1068
1062
  }
1069
-
1070
- declare class O3rJsonOrStringPipe implements PipeTransform {
1071
- /**
1072
- * @inheritDoc
1073
- */
1074
- transform(value: any): string;
1075
- static ɵfac: i0.ɵɵFactoryDeclaration<O3rJsonOrStringPipe, never>;
1076
- static ɵpipe: i0.ɵɵPipeDeclaration<O3rJsonOrStringPipe, "o3rJsonOrString", true>;
1063
+ export declare class O3rJsonOrStringPipe implements PipeTransform {
1064
+ /**
1065
+ * @inheritDoc
1066
+ */
1067
+ transform(value: any): string;
1068
+ static ɵfac: i0.ɵɵFactoryDeclaration<O3rJsonOrStringPipe, never>;
1069
+ static ɵpipe: i0.ɵɵPipeDeclaration<O3rJsonOrStringPipe, "o3rJsonOrString", true>;
1077
1070
  }
1078
-
1079
1071
  /**
1080
1072
  * Compute the status of the execution depending on its execution event type, the output and whether the execution
1081
1073
  * is still active
1082
1074
  * @param rulesetExecution
1083
1075
  * @param isActive
1084
1076
  */
1085
- declare const getStatus: (rulesetExecution: RulesetExecutionErrorEvent | RulesetExecutionEvent, isActive: boolean) => RulesetExecutionStatus;
1077
+ export declare const getStatus: (rulesetExecution: RulesetExecutionErrorEvent | RulesetExecutionEvent, isActive: boolean) => RulesetExecutionStatus;
1086
1078
  /**
1087
1079
  * Transform the output of the debug reports into the model for the ruleset history debug panel
1088
1080
  * @param events
1089
1081
  * @param rulesetMap
1090
1082
  */
1091
- declare const rulesetReportToHistory: (events: DebugEvent[], rulesetMap: Record<string, Ruleset>) => RulesetExecutionDebug[];
1092
-
1093
- interface RulesEngineDevtoolsServiceOptions extends DevtoolsCommonOptions {
1094
- /** Size of events list emitted by rules engine; When undefined all history will be kept */
1095
- rulesEngineStackLimit?: number;
1083
+ export declare const rulesetReportToHistory: (events: DebugEvent[], rulesetMap: Record<string, Ruleset>) => RulesetExecutionDebug[];
1084
+ export interface RulesEngineDevtoolsServiceOptions extends DevtoolsCommonOptions {
1085
+ /** Size of events list emitted by rules engine; When undefined all history will be kept */
1086
+ rulesEngineStackLimit?: number;
1096
1087
  }
1097
1088
  /** Rules Engine debug event Message Content */
1098
- interface RulesEngineDebugEventsContentMessage extends OtterMessageContent<'rulesEngineEvents'> {
1099
- /** Map of registered rulesets */
1100
- rulesetMap: Record<string, Ruleset>;
1101
- /** List of event from the Rules Engine Debugger */
1102
- events: DebugEvent[];
1089
+ export interface RulesEngineDebugEventsContentMessage extends OtterMessageContent<'rulesEngineEvents'> {
1090
+ /** Map of registered rulesets */
1091
+ rulesetMap: Record<string, Ruleset>;
1092
+ /** List of event from the Rules Engine Debugger */
1093
+ events: DebugEvent[];
1103
1094
  }
1104
1095
  type RulesEngineMessageContents = RulesEngineDebugEventsContentMessage;
1105
1096
  /** List of possible DataTypes for RulesEngine messages */
1106
- type RulesEngineMessageDataTypes = MessageDataTypes<RulesEngineMessageContents>;
1097
+ export type RulesEngineMessageDataTypes = MessageDataTypes<RulesEngineMessageContents>;
1107
1098
  /** List of all messages for configuration purpose */
1108
- type AvailableRulesEngineMessageContents = RulesEngineMessageContents | ConnectContentMessage | RequestMessagesContentMessage<RulesEngineMessageDataTypes>;
1109
- declare const isRulesEngineMessage: (message: any) => message is AvailableRulesEngineMessageContents;
1110
-
1111
- declare class RulesEngineDevtoolsConsoleService implements DevtoolsServiceInterface {
1112
- /** Name of the Window property to access to the devtools */
1113
- static readonly windowModuleName = "rulesEngine";
1114
- private readonly rulesEngineDevtools;
1115
- private readonly options;
1116
- constructor();
1117
- /** @inheritDoc */
1118
- activate(): void;
1119
- /** Return the list of debug events emitted by rules engine */
1120
- getCurrentRulesEngineEventsStack(): Promise<void>;
1121
- /** Returns the list of active rulesets (name and id) at the moment when the function is called */
1122
- getActiveRulesets(): Promise<void>;
1123
- /** Returns the list of available rulesets (name and id) at the moment when the function is called */
1124
- getAvailableRulesets(): Promise<void>;
1125
- /** Returns the list of output actions emitted by the rules engine at the moment when the function is called */
1126
- getAllOutputActions(): Promise<void>;
1127
- /**
1128
- * Get the list of executions for the given ruleset
1129
- * @param rulesetId
1130
- */
1131
- getRulesetExecutions(rulesetId: string): Promise<void>;
1132
- /**
1133
- * Check if the ruleset is activ in the moment when the function is called
1134
- * @param rulesetId
1135
- * @returns True if the ruleset is active; False if the ruleset is inactive or it does not exist
1136
- */
1137
- isRulesetActive(rulesetId: string): Promise<void>;
1138
- /**
1139
- * Get the list of rules executed for the specified ruleset
1140
- * @param rulesetId
1141
- */
1142
- getRulesEvaluationsForRuleset(rulesetId: string): Promise<void>;
1143
- /**
1144
- * Get the list of input facts (name, current value) for the specified ruleset, at the moment when the function is called
1145
- * @param rulesetId
1146
- */
1147
- getInputFactsForRuleset(rulesetId: string): Promise<void>;
1148
- /**
1149
- * Get the list of triggers for the specified ruleset
1150
- * @param rulesetId
1151
- */
1152
- getTriggersForRuleset(rulesetId: string): Promise<void>;
1153
- /**
1154
- * Get the list of outputed actions emitted by the given ruleset, at the moment when the function is called
1155
- * @param rulesetId
1156
- */
1157
- getOutputActionsForRuleset(rulesetId: string): Promise<void>;
1158
- /** Get the list of fact names and corresponding values */
1159
- getAllFactsSnapshot(): Promise<void>;
1160
- /**
1161
- * Retrieve the ruleset information (rules, linkedComponents, validity range etc.) for a ruleset id
1162
- * @param rulesetId
1163
- */
1164
- getRulesetInformation(rulesetId: string): Promise<void>;
1165
- static ɵfac: i0.ɵɵFactoryDeclaration<RulesEngineDevtoolsConsoleService, never>;
1166
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1099
+ export type AvailableRulesEngineMessageContents = RulesEngineMessageContents | ConnectContentMessage | RequestMessagesContentMessage<RulesEngineMessageDataTypes>;
1100
+ export declare const isRulesEngineMessage: (message: any) => message is AvailableRulesEngineMessageContents;
1101
+ export declare class RulesEngineDevtoolsConsoleService implements DevtoolsServiceInterface {
1102
+ /** Name of the Window property to access to the devtools */
1103
+ static readonly windowModuleName = "rulesEngine";
1104
+ private readonly rulesEngineDevtools;
1105
+ private readonly options;
1106
+ constructor();
1107
+ /** @inheritDoc */
1108
+ activate(): void;
1109
+ /** Return the list of debug events emitted by rules engine */
1110
+ getCurrentRulesEngineEventsStack(): Promise<void>;
1111
+ /** Returns the list of active rulesets (name and id) at the moment when the function is called */
1112
+ getActiveRulesets(): Promise<void>;
1113
+ /** Returns the list of available rulesets (name and id) at the moment when the function is called */
1114
+ getAvailableRulesets(): Promise<void>;
1115
+ /** Returns the list of output actions emitted by the rules engine at the moment when the function is called */
1116
+ getAllOutputActions(): Promise<void>;
1117
+ /**
1118
+ * Get the list of executions for the given ruleset
1119
+ * @param rulesetId
1120
+ */
1121
+ getRulesetExecutions(rulesetId: string): Promise<void>;
1122
+ /**
1123
+ * Check if the ruleset is activ in the moment when the function is called
1124
+ * @param rulesetId
1125
+ * @returns True if the ruleset is active; False if the ruleset is inactive or it does not exist
1126
+ */
1127
+ isRulesetActive(rulesetId: string): Promise<void>;
1128
+ /**
1129
+ * Get the list of rules executed for the specified ruleset
1130
+ * @param rulesetId
1131
+ */
1132
+ getRulesEvaluationsForRuleset(rulesetId: string): Promise<void>;
1133
+ /**
1134
+ * Get the list of input facts (name, current value) for the specified ruleset, at the moment when the function is called
1135
+ * @param rulesetId
1136
+ */
1137
+ getInputFactsForRuleset(rulesetId: string): Promise<void>;
1138
+ /**
1139
+ * Get the list of triggers for the specified ruleset
1140
+ * @param rulesetId
1141
+ */
1142
+ getTriggersForRuleset(rulesetId: string): Promise<void>;
1143
+ /**
1144
+ * Get the list of outputed actions emitted by the given ruleset, at the moment when the function is called
1145
+ * @param rulesetId
1146
+ */
1147
+ getOutputActionsForRuleset(rulesetId: string): Promise<void>;
1148
+ /** Get the list of fact names and corresponding values */
1149
+ getAllFactsSnapshot(): Promise<void>;
1150
+ /**
1151
+ * Retrieve the ruleset information (rules, linkedComponents, validity range etc.) for a ruleset id
1152
+ * @param rulesetId
1153
+ */
1154
+ getRulesetInformation(rulesetId: string): Promise<void>;
1155
+ static ɵfac: i0.ɵɵFactoryDeclaration<RulesEngineDevtoolsConsoleService, never>;
1156
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1167
1157
  }
1168
-
1169
- declare class RulesEngineDevtoolsMessageService implements DevtoolsServiceInterface {
1170
- private readonly rulesEngineDevtools;
1171
- private readonly logger;
1172
- private readonly options;
1173
- private readonly forceEmitRulesEngineReport;
1174
- private readonly sendMessage;
1175
- private readonly destroyRef;
1176
- constructor();
1177
- /**
1178
- * Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension
1179
- * @param only restricted list of messages to re-send
1180
- */
1181
- private handleReEmitRequest;
1182
- /**
1183
- * Function to handle the incoming messages from Otter Chrome DevTools extension
1184
- * @param message
1185
- */
1186
- private handleEvents;
1187
- private readonly serializeError;
1188
- /**
1189
- * Serialize exceptions in a way that will display the error message after a JSON.stringify()
1190
- * @param debugEvent
1191
- */
1192
- private serializeReportEvent;
1193
- /**
1194
- * Function to start the rules engine reporting to the Otter Chrome DevTools extension
1195
- */
1196
- private startRulesEngineReport;
1197
- /**
1198
- * Function to connect the plugin to the Otter DevTools extension
1199
- */
1200
- private connectPlugin;
1201
- /** Activate the Otter DevTools */
1202
- activate(): void;
1203
- static ɵfac: i0.ɵɵFactoryDeclaration<RulesEngineDevtoolsMessageService, never>;
1204
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1158
+ export declare class RulesEngineDevtoolsMessageService implements DevtoolsServiceInterface {
1159
+ private readonly rulesEngineDevtools;
1160
+ private readonly logger;
1161
+ private readonly options;
1162
+ private readonly forceEmitRulesEngineReport;
1163
+ private readonly sendMessage;
1164
+ private readonly destroyRef;
1165
+ constructor();
1166
+ /**
1167
+ * Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension
1168
+ * @param only restricted list of messages to re-send
1169
+ */
1170
+ private handleReEmitRequest;
1171
+ /**
1172
+ * Function to handle the incoming messages from Otter Chrome DevTools extension
1173
+ * @param message
1174
+ */
1175
+ private handleEvents;
1176
+ private readonly serializeError;
1177
+ /**
1178
+ * Serialize exceptions in a way that will display the error message after a JSON.stringify()
1179
+ * @param debugEvent
1180
+ */
1181
+ private serializeReportEvent;
1182
+ /**
1183
+ * Function to start the rules engine reporting to the Otter Chrome DevTools extension
1184
+ */
1185
+ private startRulesEngineReport;
1186
+ /**
1187
+ * Function to connect the plugin to the Otter DevTools extension
1188
+ */
1189
+ private connectPlugin;
1190
+ /** Activate the Otter DevTools */
1191
+ activate(): void;
1192
+ static ɵfac: i0.ɵɵFactoryDeclaration<RulesEngineDevtoolsMessageService, never>;
1193
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1205
1194
  }
1206
-
1207
1195
  /**
1208
1196
  * Rulesets model
1209
1197
  */
1210
- interface RulesetsModel extends Ruleset {
1211
- }
1198
+ export interface RulesetsModel extends Ruleset {}
1212
1199
  /**
1213
1200
  * Rulesets state details
1214
1201
  */
1215
- interface RulesetsStateDetails extends AsyncStoreItem {
1216
- }
1202
+ export interface RulesetsStateDetails extends AsyncStoreItem {}
1217
1203
  /**
1218
1204
  * Rulesets store state
1219
1205
  */
1220
- interface RulesetsState extends EntityState<RulesetsModel>, RulesetsStateDetails {
1221
- }
1206
+ export interface RulesetsState extends EntityState<RulesetsModel>, RulesetsStateDetails {}
1222
1207
  /**
1223
1208
  * Name of the Rulesets Store
1224
1209
  */
1225
- declare const RULESETS_STORE_NAME = "rulesets";
1210
+ export declare const RULESETS_STORE_NAME = "rulesets";
1226
1211
  /**
1227
1212
  * Rulesets Store Interface
1228
1213
  */
1229
- interface RulesetsStore {
1230
- /** Rulesets state */
1231
- [RULESETS_STORE_NAME]: RulesetsState;
1214
+ export interface RulesetsStore {
1215
+ /** Rulesets state */
1216
+ [RULESETS_STORE_NAME]: RulesetsState;
1232
1217
  }
1233
-
1234
1218
  /** Token of the Rulesets reducer */
1235
- declare const RULESETS_REDUCER_TOKEN: InjectionToken<ActionReducer<RulesetsState, Action<string>>>;
1219
+ export declare const RULESETS_REDUCER_TOKEN: InjectionToken<ActionReducer<RulesetsState, Action<string>>>;
1236
1220
  /** Provide default reducer for Rulesets store */
1237
- declare function getDefaultRulesetsReducer(): ActionReducer<RulesetsState, Action<string>>;
1221
+ export declare function getDefaultRulesetsReducer(): ActionReducer<RulesetsState, Action<string>>;
1238
1222
  /**
1239
1223
  * @deprecated Will be removed in v16. Use {@link provideRulesetsStore} instead.
1240
1224
  */
1241
- declare class RulesetsStoreModule {
1242
- static forRoot<T extends RulesetsState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<RulesetsStoreModule>;
1243
- static ɵfac: i0.ɵɵFactoryDeclaration<RulesetsStoreModule, never>;
1244
- static ɵmod: i0.ɵɵNgModuleDeclaration<RulesetsStoreModule, never, [typeof _ngrx_store.StoreFeatureModule, typeof _ngrx_effects.EffectsFeatureModule], never>;
1245
- static ɵinj: i0.ɵɵInjectorDeclaration<RulesetsStoreModule>;
1225
+ export declare class RulesetsStoreModule {
1226
+ static forRoot<T extends RulesetsState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<RulesetsStoreModule>;
1227
+ static ɵfac: i0.ɵɵFactoryDeclaration<RulesetsStoreModule, never>;
1228
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RulesetsStoreModule, never, [typeof i1.StoreFeatureModule, typeof i2.EffectsFeatureModule], never>;
1229
+ static ɵinj: i0.ɵɵInjectorDeclaration<RulesetsStoreModule>;
1246
1230
  }
1247
1231
  /**
1248
1232
  * Provide Rulesets feature store.
1249
1233
  * @param reducerFactory Optional factory to override the default reducer.
1250
1234
  */
1251
- declare function provideRulesetsStore(reducerFactory?: () => ActionReducer<RulesetsState, Action>): EnvironmentProviders;
1252
-
1235
+ export declare function provideRulesetsStore(reducerFactory?: () => ActionReducer<RulesetsState, Action>): EnvironmentProviders;
1253
1236
  /**
1254
1237
  * @deprecated Will be removed in v16. Use {@link provideRulesEngineDevtools} instead.
1255
1238
  */
1256
- declare class RulesEngineDevtoolsModule {
1257
- /**
1258
- * Initialize Otter Devtools
1259
- * @param options
1260
- */
1261
- static instrument(options: Partial<RulesEngineDevtoolsServiceOptions>): ModuleWithProviders<RulesEngineDevtoolsModule>;
1262
- static ɵfac: i0.ɵɵFactoryDeclaration<RulesEngineDevtoolsModule, never>;
1263
- static ɵmod: i0.ɵɵNgModuleDeclaration<RulesEngineDevtoolsModule, never, [typeof _ngrx_store.StoreModule, typeof RulesetsStoreModule], never>;
1264
- static ɵinj: i0.ɵɵInjectorDeclaration<RulesEngineDevtoolsModule>;
1239
+ export declare class RulesEngineDevtoolsModule {
1240
+ /**
1241
+ * Initialize Otter Devtools
1242
+ * @param options
1243
+ */
1244
+ static instrument(options: Partial<RulesEngineDevtoolsServiceOptions>): ModuleWithProviders<RulesEngineDevtoolsModule>;
1245
+ static ɵfac: i0.ɵɵFactoryDeclaration<RulesEngineDevtoolsModule, never>;
1246
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RulesEngineDevtoolsModule, never, [typeof i1.StoreModule, typeof RulesetsStoreModule], never>;
1247
+ static ɵinj: i0.ɵɵInjectorDeclaration<RulesEngineDevtoolsModule>;
1265
1248
  }
1266
1249
  /**
1267
1250
  * Provide rules engine devtools functionality.
1268
1251
  * @param options Rules engine devtools options
1269
1252
  */
1270
- declare function provideRulesEngineDevtools(options?: Partial<RulesEngineDevtoolsServiceOptions>): EnvironmentProviders;
1271
-
1253
+ export declare function provideRulesEngineDevtools(options?: Partial<RulesEngineDevtoolsServiceOptions>): EnvironmentProviders;
1272
1254
  /** Action to clear the StateDetails of the store and replace it */
1273
- declare const setRulesets: _ngrx_store.ActionCreator<"[Rulesets] set", (props: SetActionPayload<RulesetsStateDetails>) => SetActionPayload<RulesetsStateDetails> & _ngrx_store.Action<"[Rulesets] set">>;
1255
+ export declare const setRulesets: import("@ngrx/store").ActionCreator<"[Rulesets] set", (props: SetActionPayload<RulesetsStateDetails>) => SetActionPayload<RulesetsStateDetails> & import("@ngrx/store").Action<"[Rulesets] set">>;
1274
1256
  /** Action to change a part or the whole object in the store. */
1275
- declare const updateRulesets: _ngrx_store.ActionCreator<"[Rulesets] update", (props: UpdateActionPayload<RulesetsStateDetails>) => UpdateActionPayload<RulesetsStateDetails> & _ngrx_store.Action<"[Rulesets] update">>;
1257
+ export declare const updateRulesets: import("@ngrx/store").ActionCreator<"[Rulesets] update", (props: UpdateActionPayload<RulesetsStateDetails>) => UpdateActionPayload<RulesetsStateDetails> & import("@ngrx/store").Action<"[Rulesets] update">>;
1276
1258
  /** Action to reset the whole state, by returning it to initial state. */
1277
- declare const resetRulesets: _ngrx_store.ActionCreator<"[Rulesets] reset", () => _ngrx_store.Action<"[Rulesets] reset">>;
1259
+ export declare const resetRulesets: import("@ngrx/store").ActionCreator<"[Rulesets] reset", () => import("@ngrx/store").Action<"[Rulesets] reset">>;
1278
1260
  /** Action to cancel a Request ID registered in the store. Can happen from effect based on a switchMap for instance */
1279
- declare const cancelRulesetsRequest: _ngrx_store.ActionCreator<"[Rulesets] cancel request", (props: AsyncRequest) => AsyncRequest & _ngrx_store.Action<"[Rulesets] cancel request">>;
1261
+ export declare const cancelRulesetsRequest: import("@ngrx/store").ActionCreator<"[Rulesets] cancel request", (props: AsyncRequest) => AsyncRequest & import("@ngrx/store").Action<"[Rulesets] cancel request">>;
1280
1262
  /** Action to clear all rulesets and fill the store with the payload */
1281
- declare const setRulesetsEntities: _ngrx_store.ActionCreator<"[Rulesets] set entities", (props: SetAsyncStoreItemEntitiesActionPayload<RulesetsModel>) => SetAsyncStoreItemEntitiesActionPayload<RulesetsModel> & _ngrx_store.Action<"[Rulesets] set entities">>;
1263
+ export declare const setRulesetsEntities: import("@ngrx/store").ActionCreator<"[Rulesets] set entities", (props: SetAsyncStoreItemEntitiesActionPayload<RulesetsModel>) => SetAsyncStoreItemEntitiesActionPayload<RulesetsModel> & import("@ngrx/store").Action<"[Rulesets] set entities">>;
1282
1264
  /** Action to update rulesets with known IDs, insert the new ones */
1283
- declare const upsertRulesetsEntities: _ngrx_store.ActionCreator<"[Rulesets] upsert entities", (props: SetAsyncStoreItemEntitiesActionPayload<RulesetsModel>) => SetAsyncStoreItemEntitiesActionPayload<RulesetsModel> & _ngrx_store.Action<"[Rulesets] upsert entities">>;
1265
+ export declare const upsertRulesetsEntities: import("@ngrx/store").ActionCreator<"[Rulesets] upsert entities", (props: SetAsyncStoreItemEntitiesActionPayload<RulesetsModel>) => SetAsyncStoreItemEntitiesActionPayload<RulesetsModel> & import("@ngrx/store").Action<"[Rulesets] upsert entities">>;
1284
1266
  /** Action to empty the list of entities, keeping the global state */
1285
- declare const clearRulesetsEntities: _ngrx_store.ActionCreator<"[Rulesets] clear entities", () => _ngrx_store.Action<"[Rulesets] clear entities">>;
1267
+ export declare const clearRulesetsEntities: import("@ngrx/store").ActionCreator<"[Rulesets] clear entities", () => import("@ngrx/store").Action<"[Rulesets] clear entities">>;
1286
1268
  /** Action to update failureStatus for every RulesetsModel */
1287
- declare const failRulesetsEntities: _ngrx_store.ActionCreator<"[Rulesets] fail entities", (props: FailAsyncStoreItemEntitiesActionPayload<any>) => FailAsyncStoreItemEntitiesActionPayload<any> & _ngrx_store.Action<"[Rulesets] fail entities">>;
1269
+ export declare const failRulesetsEntities: import("@ngrx/store").ActionCreator<"[Rulesets] fail entities", (props: FailAsyncStoreItemEntitiesActionPayload<any>) => FailAsyncStoreItemEntitiesActionPayload<any> & import("@ngrx/store").Action<"[Rulesets] fail entities">>;
1288
1270
  /**
1289
1271
  * Action to put the global status of the store in a pending state. Call SET action with the list of RulesetsModels received, when this action resolves.
1290
1272
  * If the call fails, dispatch FAIL_ENTITIES action
1291
1273
  */
1292
- declare const setRulesetsEntitiesFromApi: _ngrx_store.FunctionWithParametersType<[props: FromApiActionPayload<RulesetsModel[]>], FromApiActionPayload<RulesetsModel[]> & AsyncRequest & _ngrx_store.Action<"[Rulesets] set entities from api">> & _ngrx_store.Action<"[Rulesets] set entities from api">;
1274
+ export declare const setRulesetsEntitiesFromApi: import("@ngrx/store").FunctionWithParametersType<[props: FromApiActionPayload<RulesetsModel[]>], FromApiActionPayload<RulesetsModel[]> & AsyncRequest & import("@ngrx/store").Action<"[Rulesets] set entities from api">> & import("@ngrx/store").Action<"[Rulesets] set entities from api">;
1293
1275
  /**
1294
1276
  * Action to put global status of the store in a pending state. Call UPSERT action with the list of RulesetsModels received, when this action resolves.
1295
1277
  * If the call fails, dispatch FAIL_ENTITIES action
1296
1278
  */
1297
- declare const upsertRulesetsEntitiesFromApi: _ngrx_store.FunctionWithParametersType<[props: FromApiActionPayload<RulesetsModel[]>], FromApiActionPayload<RulesetsModel[]> & AsyncRequest & _ngrx_store.Action<"[Rulesets] upsert entities from api">> & _ngrx_store.Action<"[Rulesets] upsert entities from api">;
1298
-
1279
+ export declare const upsertRulesetsEntitiesFromApi: import("@ngrx/store").FunctionWithParametersType<[props: FromApiActionPayload<RulesetsModel[]>], FromApiActionPayload<RulesetsModel[]> & AsyncRequest & import("@ngrx/store").Action<"[Rulesets] upsert entities from api">> & import("@ngrx/store").Action<"[Rulesets] upsert entities from api">;
1299
1280
  /**
1300
1281
  * Service to handle async Rulesets actions
1301
1282
  */
1302
- declare class RulesetsEffect {
1303
- protected actions$: Actions<any>;
1304
- /**
1305
- * Set the entities with the reply content, dispatch failRulesetsEntities if it catches a failure
1306
- */
1307
- setEntitiesFromApi$: rxjs.Observable<(_o3r_core.AsyncRequest & _ngrx_store.Action<"[Rulesets] cancel request">) | (_o3r_core.SetAsyncStoreItemEntitiesActionPayload<_o3r_rules_engine.RulesetsModel> & _ngrx_store.Action<"[Rulesets] set entities">) | (_o3r_core.FailAsyncStoreItemEntitiesActionPayload<any> & _ngrx_store.Action<"[Rulesets] fail entities">)> & _ngrx_effects.CreateEffectMetadata;
1308
- /**
1309
- * Upsert the entities with the reply content, dispatch failRulesetsEntities if it catches a failure
1310
- */
1311
- upsertEntitiesFromApi$: rxjs.Observable<(_o3r_core.FailAsyncStoreItemEntitiesActionPayload<any> & _ngrx_store.Action<"[Rulesets] fail entities">) | (_o3r_core.SetAsyncStoreItemEntitiesActionPayload<_o3r_rules_engine.RulesetsModel> & _ngrx_store.Action<"[Rulesets] upsert entities">)> & _ngrx_effects.CreateEffectMetadata;
1312
- static ɵfac: i0.ɵɵFactoryDeclaration<RulesetsEffect, never>;
1313
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1283
+ export declare class RulesetsEffect {
1284
+ protected actions$: Actions<any>;
1285
+ /**
1286
+ * Set the entities with the reply content, dispatch failRulesetsEntities if it catches a failure
1287
+ */
1288
+ setEntitiesFromApi$: import("rxjs").Observable<(import("@o3r/core").AsyncRequest & import("@ngrx/store").Action<"[Rulesets] cancel request">) | (import("@o3r/core").SetAsyncStoreItemEntitiesActionPayload<import("@o3r/rules-engine").RulesetsModel> & import("@ngrx/store").Action<"[Rulesets] set entities">) | (import("@o3r/core").FailAsyncStoreItemEntitiesActionPayload<any> & import("@ngrx/store").Action<"[Rulesets] fail entities">)> & import("@ngrx/effects").CreateEffectMetadata;
1289
+ /**
1290
+ * Upsert the entities with the reply content, dispatch failRulesetsEntities if it catches a failure
1291
+ */
1292
+ upsertEntitiesFromApi$: import("rxjs").Observable<(import("@o3r/core").FailAsyncStoreItemEntitiesActionPayload<any> & import("@ngrx/store").Action<"[Rulesets] fail entities">) | (import("@o3r/core").SetAsyncStoreItemEntitiesActionPayload<import("@o3r/rules-engine").RulesetsModel> & import("@ngrx/store").Action<"[Rulesets] upsert entities">)> & import("@ngrx/effects").CreateEffectMetadata;
1293
+ static ɵfac: i0.ɵɵFactoryDeclaration<RulesetsEffect, never>;
1294
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1314
1295
  }
1315
-
1316
1296
  /**
1317
1297
  * Rulesets Store adapter
1318
1298
  */
1319
- declare const rulesetsAdapter: _ngrx_entity.EntityAdapter<RulesetsModel, string>;
1299
+ export declare const rulesetsAdapter: import("@ngrx/entity").EntityAdapter<RulesetsModel, string>;
1320
1300
  /**
1321
1301
  * Rulesets Store initial value
1322
1302
  */
1323
- declare const rulesetsInitialState: RulesetsState;
1303
+ export declare const rulesetsInitialState: RulesetsState;
1324
1304
  /**
1325
1305
  * List of basic actions for Rulesets Store
1326
1306
  */
1327
- declare const rulesetsReducerFeatures: ReducerTypes<RulesetsState, ActionCreator[]>[];
1307
+ export declare const rulesetsReducerFeatures: ReducerTypes<RulesetsState, ActionCreator[]>[];
1328
1308
  /**
1329
1309
  * Rulesets Store reducer
1330
1310
  */
1331
- declare const rulesetsReducer: _ngrx_store.ActionReducer<RulesetsState, _ngrx_store.Action<string>>;
1332
-
1311
+ export declare const rulesetsReducer: import("@ngrx/store").ActionReducer<RulesetsState, import("@ngrx/store").Action<string>>;
1333
1312
  /** Select Rulesets State */
1334
- declare const selectRulesetsState: _ngrx_store.MemoizedSelector<object, RulesetsState, _ngrx_store.DefaultProjectorFn<RulesetsState>>;
1313
+ export declare const selectRulesetsState: import("@ngrx/store").MemoizedSelector<object, RulesetsState, import("@ngrx/store").DefaultProjectorFn<RulesetsState>>;
1335
1314
  /** Select the array of Rulesets ids */
1336
- declare const selectRulesetsIds: _ngrx_store.MemoizedSelector<object, string[] | number[], (s1: RulesetsState) => string[] | number[]>;
1315
+ export declare const selectRulesetsIds: import("@ngrx/store").MemoizedSelector<object, string[] | number[], (s1: RulesetsState) => string[] | number[]>;
1337
1316
  /** Select the array of Rulesets */
1338
- declare const selectAllRulesets: _ngrx_store.MemoizedSelector<object, _o3r_rules_engine.RulesetsModel[], (s1: RulesetsState) => _o3r_rules_engine.RulesetsModel[]>;
1317
+ export declare const selectAllRulesets: import("@ngrx/store").MemoizedSelector<object, import("@o3r/rules-engine").RulesetsModel[], (s1: RulesetsState) => import("@o3r/rules-engine").RulesetsModel[]>;
1339
1318
  /** Select the dictionary of Rulesets entities */
1340
- declare const selectRulesetsEntities: _ngrx_store.MemoizedSelector<object, _ngrx_entity.Dictionary<_o3r_rules_engine.RulesetsModel>, (s1: RulesetsState) => _ngrx_entity.Dictionary<_o3r_rules_engine.RulesetsModel>>;
1319
+ export declare const selectRulesetsEntities: import("@ngrx/store").MemoizedSelector<object, import("@ngrx/entity").Dictionary<import("@o3r/rules-engine").RulesetsModel>, (s1: RulesetsState) => import("@ngrx/entity").Dictionary<import("@o3r/rules-engine").RulesetsModel>>;
1341
1320
  /** Select the total Rulesets count */
1342
- declare const selectRulesetsTotal: _ngrx_store.MemoizedSelector<object, number, (s1: RulesetsState) => number>;
1321
+ export declare const selectRulesetsTotal: import("@ngrx/store").MemoizedSelector<object, number, (s1: RulesetsState) => number>;
1343
1322
  /** Select the store pending status */
1344
- declare const selectRulesetsStorePendingStatus: _ngrx_store.MemoizedSelector<object, boolean, (s1: RulesetsState) => boolean>;
1323
+ export declare const selectRulesetsStorePendingStatus: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: RulesetsState) => boolean>;
1345
1324
  /**
1346
1325
  * Returns the rulesets which are in the validity range, if provided
1347
1326
  */
1348
- declare const selectRuleSetsInRange: _ngrx_store.MemoizedSelector<object, _o3r_rules_engine.RulesetsModel[], (s1: _o3r_rules_engine.RulesetsModel[]) => _o3r_rules_engine.RulesetsModel[]>;
1327
+ export declare const selectRuleSetsInRange: import("@ngrx/store").MemoizedSelector<object, import("@o3r/rules-engine").RulesetsModel[], (s1: import("@o3r/rules-engine").RulesetsModel[]) => import("@o3r/rules-engine").RulesetsModel[]>;
1349
1328
  /**
1350
1329
  * Returns the rulesets ids which are not onDemand and in the validity range
1351
1330
  */
1352
- declare const selectActiveRuleSets: _ngrx_store.MemoizedSelector<object, string[], (s1: _o3r_rules_engine.RulesetsModel[]) => string[]>;
1331
+ export declare const selectActiveRuleSets: import("@ngrx/store").MemoizedSelector<object, string[], (s1: import("@o3r/rules-engine").RulesetsModel[]) => string[]>;
1353
1332
  /**
1354
1333
  * Select the map of ruleSets to activate based on linked components
1355
1334
  */
1356
- declare const selectComponentsLinkedToRuleset: _ngrx_store.MemoizedSelector<object, {
1357
- or: {
1358
- [key: string]: string[];
1359
- };
1360
- }, (s1: _o3r_rules_engine.RulesetsModel[]) => {
1361
- or: {
1362
- [key: string]: string[];
1363
- };
1335
+ export declare const selectComponentsLinkedToRuleset: import("@ngrx/store").MemoizedSelector<object, {
1336
+ or: {
1337
+ [key: string]: string[];
1338
+ };
1339
+ }, (s1: import("@o3r/rules-engine").RulesetsModel[]) => {
1340
+ or: {
1341
+ [key: string]: string[];
1342
+ };
1364
1343
  }>;
1365
-
1366
- declare const rulesetsStorageSerializer: (state: RulesetsState) => RulesetsState;
1367
- declare const rulesetsStorageDeserializer: (rawObject: any) => RulesetsState;
1368
- declare const rulesetsStorageSync: Serializer<RulesetsState>;
1369
-
1370
- declare class OtterRulesEngineDevtools {
1371
- protected store: Store<RulesetsStore>;
1372
- private readonly rulesEngineService;
1373
- /** Stream of rules engine report */
1374
- readonly rulesEngineReport$?: Observable<{
1375
- events: DebugEvent[];
1376
- rulesetMap: Record<string, Ruleset>;
1377
- }>;
1378
- /** Stream of rules engine event */
1379
- readonly rulesEngineEvents$?: Observable<DebugEvent[]>;
1380
- /**
1381
- * Return true if the rules engine debug option is activated
1382
- */
1383
- get isRulesEngineDebugActivated(): boolean;
1384
- constructor();
1385
- /** Return the list of debug events emitted by rules engine */
1386
- getCurrentRulesEngineEventsStack(): Promise<DebugEvent[] | undefined>;
1387
- /** Returns the list of active rulesets (name and id) at the moment when the function is called */
1388
- getActiveRulesets(): Promise<Pick<Ruleset, "id" | "name">[]>;
1389
- /** Returns the list of available rulesets (name and id) at the moment when the function is called */
1390
- getAvailableRulesets(): Promise<Pick<Ruleset, "id" | "name">[]>;
1391
- /** Returns the list of output actions emitted by the rules engine at the moment when the function is called */
1392
- getAllOutputActions(): Promise<_o3r_rules_engine.AllActionsEvent | undefined>;
1393
- /**
1394
- * Get the list of executions for the given ruleset
1395
- * @param rulesetId
1396
- */
1397
- getRulesetExecutions(rulesetId: string): Promise<(RulesetExecutionEvent | RulesetExecutionErrorEvent)[] | undefined>;
1398
- /**
1399
- * Check if the ruleset is activ in the moment when the function is called
1400
- * @param rulesetId
1401
- * @returns True if the ruleset is active; False if the ruleset is inactive or it does not exist
1402
- */
1403
- isRulesetActive(rulesetId: string): Promise<boolean>;
1404
- /**
1405
- * Get the list of rules executed for the specified ruleset
1406
- * @param rulesetId
1407
- */
1408
- getRulesEvaluationsForRuleset(rulesetId: string): Promise<_o3r_rules_engine.RuleEvaluation[] | undefined>;
1409
- /**
1410
- * Get the list of input facts (name, current value) for the specified ruleset, at the moment when the function is called
1411
- * @param rulesetId
1412
- */
1413
- getInputFactsForRuleset(rulesetId: string): Promise<{
1414
- factName: string;
1415
- value: _o3r_rules_engine.Facts;
1416
- }[] | undefined>;
1417
- /**
1418
- * Get the list of triggers for the specified ruleset
1419
- * @param rulesetId
1420
- */
1421
- getTriggersForRuleset(rulesetId: string): Promise<_o3r_rules_engine.EvaluationReason[] | undefined>;
1422
- /**
1423
- * Get the list of outputed actions emitted by the given ruleset, at the moment when the function is called
1424
- * @param rulesetId
1425
- */
1426
- getOutputActionsForRuleset(rulesetId: string): Promise<_o3r_rules_engine.ActionBlock[] | undefined>;
1427
- /** Get the list of fact names and corresponding values */
1428
- getAllFactsSnapshot(): Promise<{
1429
- factName: string;
1430
- value: any;
1431
- }[]> | undefined;
1432
- /**
1433
- * Retrieve the ruleset information (rules, linkedComponents, validity range etc.) for a ruleset id
1434
- * @param rulesetId
1435
- */
1436
- getRulesetInformation(rulesetId: string): Promise<Ruleset | undefined>;
1437
- static ɵfac: i0.ɵɵFactoryDeclaration<OtterRulesEngineDevtools, never>;
1438
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1344
+ export declare const rulesetsStorageSerializer: (state: RulesetsState) => RulesetsState;
1345
+ export declare const rulesetsStorageDeserializer: (rawObject: any) => RulesetsState;
1346
+ export declare const rulesetsStorageSync: Serializer<RulesetsState>;
1347
+ export declare class OtterRulesEngineDevtools {
1348
+ protected store: Store<RulesetsStore>;
1349
+ private readonly rulesEngineService;
1350
+ /** Stream of rules engine report */
1351
+ readonly rulesEngineReport$?: Observable<{
1352
+ events: DebugEvent[];
1353
+ rulesetMap: Record<string, Ruleset>;
1354
+ }>;
1355
+ /** Stream of rules engine event */
1356
+ readonly rulesEngineEvents$?: Observable<DebugEvent[]>;
1357
+ /**
1358
+ * Return true if the rules engine debug option is activated
1359
+ */
1360
+ get isRulesEngineDebugActivated(): boolean;
1361
+ constructor();
1362
+ /** Return the list of debug events emitted by rules engine */
1363
+ getCurrentRulesEngineEventsStack(): Promise<DebugEvent[] | undefined>;
1364
+ /** Returns the list of active rulesets (name and id) at the moment when the function is called */
1365
+ getActiveRulesets(): Promise<Pick<Ruleset, "id" | "name">[]>;
1366
+ /** Returns the list of available rulesets (name and id) at the moment when the function is called */
1367
+ getAvailableRulesets(): Promise<Pick<Ruleset, "id" | "name">[]>;
1368
+ /** Returns the list of output actions emitted by the rules engine at the moment when the function is called */
1369
+ getAllOutputActions(): Promise<import("@o3r/rules-engine").AllActionsEvent | undefined>;
1370
+ /**
1371
+ * Get the list of executions for the given ruleset
1372
+ * @param rulesetId
1373
+ */
1374
+ getRulesetExecutions(rulesetId: string): Promise<(RulesetExecutionEvent | RulesetExecutionErrorEvent)[] | undefined>;
1375
+ /**
1376
+ * Check if the ruleset is activ in the moment when the function is called
1377
+ * @param rulesetId
1378
+ * @returns True if the ruleset is active; False if the ruleset is inactive or it does not exist
1379
+ */
1380
+ isRulesetActive(rulesetId: string): Promise<boolean>;
1381
+ /**
1382
+ * Get the list of rules executed for the specified ruleset
1383
+ * @param rulesetId
1384
+ */
1385
+ getRulesEvaluationsForRuleset(rulesetId: string): Promise<import("@o3r/rules-engine").RuleEvaluation[] | undefined>;
1386
+ /**
1387
+ * Get the list of input facts (name, current value) for the specified ruleset, at the moment when the function is called
1388
+ * @param rulesetId
1389
+ */
1390
+ getInputFactsForRuleset(rulesetId: string): Promise<{
1391
+ factName: string;
1392
+ value: import("@o3r/rules-engine").Facts;
1393
+ }[] | undefined>;
1394
+ /**
1395
+ * Get the list of triggers for the specified ruleset
1396
+ * @param rulesetId
1397
+ */
1398
+ getTriggersForRuleset(rulesetId: string): Promise<import("@o3r/rules-engine").EvaluationReason[] | undefined>;
1399
+ /**
1400
+ * Get the list of outputed actions emitted by the given ruleset, at the moment when the function is called
1401
+ * @param rulesetId
1402
+ */
1403
+ getOutputActionsForRuleset(rulesetId: string): Promise<import("@o3r/rules-engine").ActionBlock[] | undefined>;
1404
+ /** Get the list of fact names and corresponding values */
1405
+ getAllFactsSnapshot(): Promise<{
1406
+ factName: string;
1407
+ value: any;
1408
+ }[]> | undefined;
1409
+ /**
1410
+ * Retrieve the ruleset information (rules, linkedComponents, validity range etc.) for a ruleset id
1411
+ * @param rulesetId
1412
+ */
1413
+ getRulesetInformation(rulesetId: string): Promise<Ruleset | undefined>;
1414
+ static ɵfac: i0.ɵɵFactoryDeclaration<OtterRulesEngineDevtools, never>;
1415
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1439
1416
  }
1440
-
1441
- declare const OTTER_RULES_ENGINE_DEVTOOLS_DEFAULT_OPTIONS: Readonly<RulesEngineDevtoolsServiceOptions>;
1442
- declare const OTTER_RULES_ENGINE_DEVTOOLS_OPTIONS: InjectionToken<RulesEngineDevtoolsServiceOptions>;
1443
-
1444
- declare class RulesEngineRunnerService {
1445
- private readonly store;
1446
- private readonly logger;
1447
- /** Rulesets to restrict the execution of the engine */
1448
- protected ruleSets$: Observable<string[] | undefined>;
1449
- /** List of action handlers */
1450
- protected readonly actionHandlers: Set<RulesEngineActionHandler<_o3r_core.RulesEngineAction<string, any>>>;
1451
- /** Observable of component linked to the component */
1452
- protected linkedComponents$: BehaviorSubject<{
1453
- [key: string]: number;
1454
- }>;
1455
- /** Map of engines dedicated to each rule sets */
1456
- readonly engine: RulesEngine;
1457
- /** stream of the whole ruleset results */
1458
- events$: Observable<ActionBlock[]>;
1459
- /** Enable action execution on new state change */
1460
- enabled: boolean;
1461
- constructor();
1462
- /**
1463
- * Execute the list of actions
1464
- * @param actions
1465
- */
1466
- protected executeActions(actions: ActionBlock[]): Promise<void>;
1467
- /**
1468
- * Update or insert fact in the rules engine
1469
- * @param facts fact list to add / update
1470
- */
1471
- upsertFacts(facts: Fact<unknown> | Fact<unknown>[]): void;
1472
- /**
1473
- * Update or insert operator in the rules engine
1474
- * @param operators operator list to add / update
1475
- */
1476
- upsertOperators(operators: (Operator<any, any> | UnaryOperator<any>)[]): void;
1477
- /**
1478
- * Upsert a list of RuleSets to be run in the rules engine
1479
- * @param ruleSets
1480
- */
1481
- upsertRulesets(ruleSets: Ruleset[]): void;
1482
- /**
1483
- * Add action handlers in the rules engine
1484
- * @param actionHandlers
1485
- */
1486
- registerActionHandlers(...actionHandlers: RulesEngineActionHandler[]): void;
1487
- /**
1488
- * Remove action handlers in the rules engine
1489
- * @param actionHandlers
1490
- */
1491
- unregisterActionHandlers(...actionHandlers: RulesEngineActionHandler[]): void;
1492
- /**
1493
- * Enable temporary a rule set
1494
- * @param componentComputedName Name of the component to enable the ruleset for
1495
- */
1496
- enableRuleSetFor(componentComputedName: string): void;
1497
- /**
1498
- * Disable temporary a rule set
1499
- * @param componentComputedName Name of the component to disable the ruleset for
1500
- */
1501
- disableRuleSetFor(componentComputedName: string): void;
1502
- static ɵfac: i0.ɵɵFactoryDeclaration<RulesEngineRunnerService, never>;
1503
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1417
+ export declare const OTTER_RULES_ENGINE_DEVTOOLS_DEFAULT_OPTIONS: Readonly<RulesEngineDevtoolsServiceOptions>;
1418
+ export declare const OTTER_RULES_ENGINE_DEVTOOLS_OPTIONS: InjectionToken<RulesEngineDevtoolsServiceOptions>;
1419
+ export declare class RulesEngineRunnerService {
1420
+ private readonly store;
1421
+ private readonly logger;
1422
+ /** Rulesets to restrict the execution of the engine */
1423
+ protected ruleSets$: Observable<string[] | undefined>;
1424
+ /** List of action handlers */
1425
+ protected readonly actionHandlers: Set<RulesEngineActionHandler<import("@o3r/core").RulesEngineAction<string, any>>>;
1426
+ /** Observable of component linked to the component */
1427
+ protected linkedComponents$: BehaviorSubject<{
1428
+ [key: string]: number;
1429
+ }>;
1430
+ /** Map of engines dedicated to each rule sets */
1431
+ readonly engine: RulesEngine;
1432
+ /** stream of the whole ruleset results */
1433
+ events$: Observable<ActionBlock[]>;
1434
+ /** Enable action execution on new state change */
1435
+ enabled: boolean;
1436
+ constructor();
1437
+ /**
1438
+ * Execute the list of actions
1439
+ * @param actions
1440
+ */
1441
+ protected executeActions(actions: ActionBlock[]): Promise<void>;
1442
+ /**
1443
+ * Update or insert fact in the rules engine
1444
+ * @param facts fact list to add / update
1445
+ */
1446
+ upsertFacts(facts: Fact<unknown> | Fact<unknown>[]): void;
1447
+ /**
1448
+ * Update or insert operator in the rules engine
1449
+ * @param operators operator list to add / update
1450
+ */
1451
+ upsertOperators(operators: (Operator<any, any> | UnaryOperator<any>)[]): void;
1452
+ /**
1453
+ * Upsert a list of RuleSets to be run in the rules engine
1454
+ * @param ruleSets
1455
+ */
1456
+ upsertRulesets(ruleSets: Ruleset[]): void;
1457
+ /**
1458
+ * Add action handlers in the rules engine
1459
+ * @param actionHandlers
1460
+ */
1461
+ registerActionHandlers(...actionHandlers: RulesEngineActionHandler[]): void;
1462
+ /**
1463
+ * Remove action handlers in the rules engine
1464
+ * @param actionHandlers
1465
+ */
1466
+ unregisterActionHandlers(...actionHandlers: RulesEngineActionHandler[]): void;
1467
+ /**
1468
+ * Enable temporary a rule set
1469
+ * @param componentComputedName Name of the component to enable the ruleset for
1470
+ */
1471
+ enableRuleSetFor(componentComputedName: string): void;
1472
+ /**
1473
+ * Disable temporary a rule set
1474
+ * @param componentComputedName Name of the component to disable the ruleset for
1475
+ */
1476
+ disableRuleSetFor(componentComputedName: string): void;
1477
+ static ɵfac: i0.ɵɵFactoryDeclaration<RulesEngineRunnerService, never>;
1478
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1504
1479
  }
1505
-
1506
1480
  /** Abstract fact set service */
1507
- declare abstract class FactsService<T extends FactDefinitions> {
1508
- #private;
1509
- private readonly rulesEngine;
1510
- /** Get the registered state */
1511
- get isRegistered(): boolean;
1512
- /** Set of facts provided */
1513
- abstract facts: FactSet<T>;
1514
- constructor(rulesEngine: RulesEngineRunnerService);
1515
- /** Register the set of facts */
1516
- register(): void;
1481
+ export declare abstract class FactsService<T extends FactDefinitions> {
1482
+ #private;
1483
+ private readonly rulesEngine;
1484
+ /** Get the registered state */
1485
+ get isRegistered(): boolean;
1486
+ /** Set of facts provided */
1487
+ abstract facts: FactSet<T>;
1488
+ constructor(rulesEngine: RulesEngineRunnerService);
1489
+ /** Register the set of facts */
1490
+ register(): void;
1517
1491
  }
1518
-
1519
1492
  /**
1520
1493
  * Interface that contains the portalFacts definition
1521
1494
  * This is one of the reserved fact names, it won't be part of metadata
1522
1495
  */
1523
- interface PortalFacts extends FactDefinitions {
1524
- /**
1525
- * Map of facts coming from the portal
1526
- */
1527
- portalFacts: {
1528
- [key: string]: string;
1529
- };
1496
+ export interface PortalFacts extends FactDefinitions {
1497
+ /**
1498
+ * Map of facts coming from the portal
1499
+ */
1500
+ portalFacts: {
1501
+ [key: string]: string;
1502
+ };
1530
1503
  }
1531
-
1532
1504
  /**
1533
1505
  * Operator facts that provide the current time
1534
1506
  */
1535
- interface CurrentTimeFacts extends FactDefinitions {
1536
- /**
1537
- * The current time as a timestamp
1538
- */
1539
- o3rCurrentTime: number;
1507
+ export interface CurrentTimeFacts extends FactDefinitions {
1508
+ /**
1509
+ * The current time as a timestamp
1510
+ */
1511
+ o3rCurrentTime: number;
1540
1512
  }
1541
-
1542
- declare class CurrentTimeFactsService extends FactsService<CurrentTimeFacts> {
1543
- private readonly currentTimeSubject$;
1544
- /** @inheritDoc */
1545
- facts: {
1546
- o3rCurrentTime: rxjs.Observable<number>;
1547
- };
1548
- constructor();
1549
- /** Compute the current time */
1550
- tick(): void;
1551
- static ɵfac: i0.ɵɵFactoryDeclaration<CurrentTimeFactsService, never>;
1552
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1513
+ export declare class CurrentTimeFactsService extends FactsService<CurrentTimeFacts> {
1514
+ private readonly currentTimeSubject$;
1515
+ /** @inheritDoc */
1516
+ facts: {
1517
+ o3rCurrentTime: import("rxjs").Observable<number>;
1518
+ };
1519
+ constructor();
1520
+ /** Compute the current time */
1521
+ tick(): void;
1522
+ static ɵfac: i0.ɵɵFactoryDeclaration<CurrentTimeFactsService, never>;
1523
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1553
1524
  }
1554
-
1555
1525
  /**
1556
1526
  * Components which are activating ruleset should implement this to be identified by CMS extractor
1557
1527
  */
1558
- interface LinkableToRuleset {
1559
- }
1560
-
1528
+ export interface LinkableToRuleset {}
1561
1529
  /** Determine if the action should be executed */
1562
- declare const RULES_ENGINE_OPTIONS: InjectionToken<boolean>;
1530
+ export declare const RULES_ENGINE_OPTIONS: InjectionToken<boolean>;
1563
1531
  /** Rules engine configuration */
1564
- interface RulesEngineServiceOptions {
1565
- /** Determine if the actions resulting of the rule engine should be executed */
1566
- dryRun: boolean;
1567
- /** Flag to activate the run of Rules Engine in debug mode */
1568
- debug: boolean;
1569
- /** Limit the number of debug events kept in stack */
1570
- debugEventsStackLimit?: number;
1532
+ export interface RulesEngineServiceOptions {
1533
+ /** Determine if the actions resulting of the rule engine should be executed */
1534
+ dryRun: boolean;
1535
+ /** Flag to activate the run of Rules Engine in debug mode */
1536
+ debug: boolean;
1537
+ /** Limit the number of debug events kept in stack */
1538
+ debugEventsStackLimit?: number;
1571
1539
  }
1572
1540
  /** Default Rules engine options */
1573
- declare const DEFAULT_RULES_ENGINE_OPTIONS: Readonly<RulesEngineServiceOptions>;
1574
-
1541
+ export declare const DEFAULT_RULES_ENGINE_OPTIONS: Readonly<RulesEngineServiceOptions>;
1575
1542
  /**
1576
1543
  * @deprecated Will be removed in v16. Use {@link provideRulesEngineRunner} instead.
1577
1544
  */
1578
- declare class RulesEngineRunnerModule {
1579
- static forRoot(options?: Partial<RulesEngineServiceOptions>): ModuleWithProviders<RulesEngineRunnerModule>;
1580
- static ɵfac: i0.ɵɵFactoryDeclaration<RulesEngineRunnerModule, never>;
1581
- static ɵmod: i0.ɵɵNgModuleDeclaration<RulesEngineRunnerModule, never, [typeof _ngrx_store.StoreModule, typeof RulesetsStoreModule], never>;
1582
- static ɵinj: i0.ɵɵInjectorDeclaration<RulesEngineRunnerModule>;
1545
+ export declare class RulesEngineRunnerModule {
1546
+ static forRoot(options?: Partial<RulesEngineServiceOptions>): ModuleWithProviders<RulesEngineRunnerModule>;
1547
+ static ɵfac: i0.ɵɵFactoryDeclaration<RulesEngineRunnerModule, never>;
1548
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RulesEngineRunnerModule, never, [typeof i1.StoreModule, typeof RulesetsStoreModule], never>;
1549
+ static ɵinj: i0.ɵɵInjectorDeclaration<RulesEngineRunnerModule>;
1583
1550
  }
1584
1551
  /**
1585
1552
  * Provide rules engine runner service.
1586
1553
  * @param options Rules engine service options
1587
1554
  */
1588
- declare function provideRulesEngineRunner(options?: Partial<RulesEngineServiceOptions>): EnvironmentProviders;
1589
-
1590
- export { CurrentTimeFactsService, DEFAULT_RULES_ENGINE_OPTIONS, EngineDebugger, FactsService, FactsSnapshotComponent, O3rFallbackToPipe, O3rJsonOrStringPipe, OTTER_RULES_ENGINE_DEVTOOLS_DEFAULT_OPTIONS, OTTER_RULES_ENGINE_DEVTOOLS_OPTIONS, OtterRulesEngineDevtools, RULESETS_REDUCER_TOKEN, RULESETS_STORE_NAME, RULES_ENGINE_OPTIONS, RulesEngine, RulesEngineDevtoolsConsoleService, RulesEngineDevtoolsMessageService, RulesEngineDevtoolsModule, RulesEngineRunnerModule, RulesEngineRunnerService, RulesetHistoryPresComponent, RulesetsEffect, RulesetsStoreModule, allEqual, allGreater, allIn, allLower, allMatch, allNotIn, allRangeNumber, arrayBasedOperators, arrayContains, basicOperators, cancelRulesetsRequest, clearRulesetsEntities, dateAfter, dateBasedOperators, dateBefore, dateEquals, dateInNextMinutes, dateNotEquals, dateNotInNextMinutes, equals, executeOperator, failRulesetsEntities, getDefaultRulesetsReducer, getStatus, greaterThan, greaterThanOrEqual, inArray, inRangeDate, inString, isAllConditions, isAnyConditions, isConditionProperties, isDefined, isNotCondition, isOperandFact, isOperandLiteral, isOperandRuntimeFact, isRangeNumber, isRulesEngineMessage, isString, isSupportedSimpleTypes, isUndefined, isValidDate, isValidDateInput, isValidDateRange, isValidTimeInput, isValidTimeRange, lengthEquals, lengthGreaterThan, lengthGreaterThanOrEquals, lengthLessThan, lengthLessThanOrEquals, lengthNotEquals, lessOrEqual, lessThan, matchesPattern, notArrayContains, notEquals, notInArray, notInString, notStringContains, numberBasedOperators, numberValidator, oneEquals, oneGreater, oneIn, oneLower, oneMatches, oneRangeNumber, operatorList, parseRegExp, provideRulesEngineDevtools, provideRulesEngineRunner, provideRulesetsStore, resetRulesets, rulesetReportToHistory, rulesetsAdapter, rulesetsInitialState, rulesetsReducer, rulesetsReducerFeatures, rulesetsStorageDeserializer, rulesetsStorageSerializer, rulesetsStorageSync, selectActiveRuleSets, selectAllRulesets, selectComponentsLinkedToRuleset, selectRuleSetsInRange, selectRulesetsEntities, selectRulesetsIds, selectRulesetsState, selectRulesetsStorePendingStatus, selectRulesetsTotal, setRulesets, setRulesetsEntities, setRulesetsEntitiesFromApi, stringContains, updateRulesets, upsertRulesetsEntities, upsertRulesetsEntitiesFromApi };
1591
- export type { ActionBlock, ActionSetTemporaryFactBlock, ActionTypes, ActiveRulesetsEvent, AllActionsEvent, AllBlock, AllConditions, AnyConditions, AvailableFactsSnapshot, AvailableRulesEngineMessageContents, AvailableRulesets, BaseRulesetExecution, BinaryOperation, ConditionBlockTypes, CrossPlatformPerformance, CurrentTimeFacts, DateInput, DebugEvent, EngineDebuggerOptions, EngineRule, EngineRuleset, EvaluationReason, Fact, FactBasicValues, FactDefinitions, FactFactoryReturn, FactObject, FactSet, FactValueStream, Facts, GenericOperand, IfElseBlock, LinkableToRuleset, NativeTypes, NestedCondition, NotCondition, Operand, OperandFact, Operator, PortalFacts, Rule, RuleBlock, RuleElement, RuleEvaluation, RuleEvaluationOutput, RuleEvent, RulesEngineDebugEventsContentMessage, RulesEngineDevtoolsServiceOptions, RulesEngineMessageDataTypes, RulesEngineOptions, RulesEngineServiceOptions, Ruleset, RulesetExecutionDebug, RulesetExecutionErrorEvent, RulesetExecutionEvent, RulesetExecutionStatus, RulesetsModel, RulesetsState, RulesetsStateDetails, RulesetsStore, SupportedSimpleTypes, TimedEvent, TopLevelCondition, UnaryOperation, UnaryOperator };
1592
- //# sourceMappingURL=o3r-rules-engine.d.ts.map
1555
+ export declare function provideRulesEngineRunner(options?: Partial<RulesEngineServiceOptions>): EnvironmentProviders;
1556
+ export {};
1557
+ //# sourceMappingURL=o3r-rules-engine.d.ts.map