@sisense/sdk-data 1.10.1 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/cjs/dimensional-model/analytics/factory.d.ts +47 -0
  2. package/dist/cjs/dimensional-model/analytics/factory.js +151 -0
  3. package/dist/cjs/dimensional-model/analytics/factory.test.d.ts +1 -0
  4. package/dist/cjs/dimensional-model/analytics/factory.test.js +99 -0
  5. package/dist/cjs/dimensional-model/attributes.d.ts +139 -0
  6. package/dist/cjs/dimensional-model/attributes.js +342 -0
  7. package/dist/cjs/dimensional-model/attributes.test.d.ts +1 -0
  8. package/dist/cjs/dimensional-model/attributes.test.js +154 -0
  9. package/dist/cjs/dimensional-model/base.d.ts +43 -0
  10. package/dist/cjs/dimensional-model/base.js +58 -0
  11. package/dist/cjs/dimensional-model/base.test.d.ts +1 -0
  12. package/dist/cjs/dimensional-model/base.test.js +17 -0
  13. package/dist/cjs/dimensional-model/data-model.d.ts +13 -0
  14. package/dist/cjs/dimensional-model/data-model.js +37 -0
  15. package/dist/cjs/dimensional-model/dimensions.d.ts +167 -0
  16. package/dist/cjs/dimensional-model/dimensions.js +307 -0
  17. package/dist/cjs/dimensional-model/dimensions.test.d.ts +1 -0
  18. package/dist/cjs/dimensional-model/dimensions.test.js +54 -0
  19. package/dist/cjs/dimensional-model/factory.d.ts +17 -0
  20. package/dist/cjs/dimensional-model/factory.js +54 -0
  21. package/dist/cjs/dimensional-model/filters/factory.d.ts +796 -0
  22. package/dist/cjs/dimensional-model/filters/factory.js +962 -0
  23. package/dist/cjs/dimensional-model/filters/factory.test.d.ts +1 -0
  24. package/dist/cjs/dimensional-model/filters/factory.test.js +366 -0
  25. package/dist/cjs/dimensional-model/filters/filters.d.ts +321 -0
  26. package/dist/cjs/dimensional-model/filters/filters.js +614 -0
  27. package/dist/cjs/dimensional-model/filters/filters.test.d.ts +1 -0
  28. package/dist/cjs/dimensional-model/filters/filters.test.js +225 -0
  29. package/dist/cjs/dimensional-model/filters/utils/attribute-measure-util.d.ts +47 -0
  30. package/dist/cjs/dimensional-model/filters/utils/attribute-measure-util.js +111 -0
  31. package/dist/cjs/dimensional-model/filters/utils/condition-filter-util.d.ts +21 -0
  32. package/dist/cjs/dimensional-model/filters/utils/condition-filter-util.js +194 -0
  33. package/dist/cjs/dimensional-model/filters/utils/date-time-filter-util.d.ts +2 -0
  34. package/dist/cjs/dimensional-model/filters/utils/date-time-filter-util.js +12 -0
  35. package/dist/cjs/dimensional-model/filters/utils/filter-code-util.d.ts +13 -0
  36. package/dist/cjs/dimensional-model/filters/utils/filter-code-util.js +54 -0
  37. package/dist/cjs/dimensional-model/filters/utils/filter-code-util.test.d.ts +1 -0
  38. package/dist/cjs/dimensional-model/filters/utils/filter-code-util.test.js +32 -0
  39. package/dist/cjs/dimensional-model/filters/utils/filter-from-jaql-util.d.ts +73 -0
  40. package/dist/cjs/dimensional-model/filters/utils/filter-from-jaql-util.js +190 -0
  41. package/dist/cjs/dimensional-model/filters/utils/filter-from-jaql-util.test.d.ts +1 -0
  42. package/dist/cjs/dimensional-model/filters/utils/filter-from-jaql-util.test.js +558 -0
  43. package/dist/cjs/dimensional-model/filters/utils/filter-matcher-utils.d.ts +5 -0
  44. package/dist/cjs/dimensional-model/filters/utils/filter-matcher-utils.js +174 -0
  45. package/dist/cjs/dimensional-model/filters/utils/filter-matcher-utils.test.d.ts +1 -0
  46. package/dist/cjs/dimensional-model/filters/utils/filter-matcher-utils.test.js +236 -0
  47. package/dist/cjs/dimensional-model/filters/utils/filter-types-util.d.ts +17 -0
  48. package/dist/cjs/dimensional-model/filters/utils/filter-types-util.js +79 -0
  49. package/dist/cjs/dimensional-model/filters/utils/types.d.ts +200 -0
  50. package/dist/cjs/dimensional-model/filters/utils/types.js +99 -0
  51. package/dist/cjs/dimensional-model/interfaces.d.ts +512 -0
  52. package/dist/cjs/dimensional-model/interfaces.js +31 -0
  53. package/dist/cjs/dimensional-model/measures/factory.d.ts +920 -0
  54. package/dist/cjs/dimensional-model/measures/factory.js +1188 -0
  55. package/dist/cjs/dimensional-model/measures/factory.test.d.ts +1 -0
  56. package/dist/cjs/dimensional-model/measures/factory.test.js +481 -0
  57. package/dist/cjs/dimensional-model/measures/measures.d.ts +217 -0
  58. package/dist/cjs/dimensional-model/measures/measures.js +416 -0
  59. package/dist/cjs/dimensional-model/measures/measures.test.d.ts +1 -0
  60. package/dist/cjs/dimensional-model/measures/measures.test.js +79 -0
  61. package/dist/cjs/dimensional-model/simple-column-types.d.ts +39 -0
  62. package/dist/cjs/dimensional-model/simple-column-types.js +134 -0
  63. package/dist/cjs/dimensional-model/simple-column-types.test.d.ts +1 -0
  64. package/dist/cjs/dimensional-model/simple-column-types.test.js +85 -0
  65. package/dist/cjs/dimensional-model/types.d.ts +256 -0
  66. package/dist/cjs/dimensional-model/types.js +298 -0
  67. package/dist/cjs/dimensional-model/types.test.d.ts +1 -0
  68. package/dist/cjs/dimensional-model/types.test.js +33 -0
  69. package/dist/cjs/index.d.ts +93 -0
  70. package/dist/cjs/index.js +123 -0
  71. package/dist/cjs/interfaces.d.ts +367 -0
  72. package/dist/cjs/interfaces.js +21 -0
  73. package/dist/cjs/translation/initialize-i18n.d.ts +2 -0
  74. package/dist/cjs/translation/initialize-i18n.js +14 -0
  75. package/dist/cjs/translation/resources/en.d.ts +28 -0
  76. package/dist/cjs/translation/resources/en.js +30 -0
  77. package/dist/cjs/translation/resources/index.d.ts +53 -0
  78. package/dist/cjs/translation/resources/index.js +10 -0
  79. package/dist/cjs/translation/resources/uk.d.ts +5 -0
  80. package/dist/cjs/translation/resources/uk.js +30 -0
  81. package/dist/cjs/translation/translatable-error.d.ts +5 -0
  82. package/dist/cjs/translation/translatable-error.js +15 -0
  83. package/dist/cjs/utils.d.ts +37 -0
  84. package/dist/cjs/utils.js +105 -0
  85. package/dist/cjs/utils.test.d.ts +1 -0
  86. package/dist/cjs/utils.test.js +158 -0
  87. package/dist/dimensional-model/attributes.d.ts +1 -0
  88. package/dist/dimensional-model/attributes.js +31 -0
  89. package/dist/dimensional-model/filters/factory.d.ts +80 -42
  90. package/dist/dimensional-model/filters/factory.js +123 -85
  91. package/dist/dimensional-model/filters/filters.d.ts +40 -12
  92. package/dist/dimensional-model/filters/filters.js +75 -24
  93. package/dist/dimensional-model/filters/utils/attribute-measure-util.d.ts +2 -2
  94. package/dist/dimensional-model/filters/utils/attribute-measure-util.js +6 -3
  95. package/dist/dimensional-model/filters/utils/condition-filter-util.d.ts +4 -2
  96. package/dist/dimensional-model/filters/utils/condition-filter-util.js +34 -31
  97. package/dist/dimensional-model/filters/utils/filter-code-util.js +1 -1
  98. package/dist/dimensional-model/filters/utils/filter-from-jaql-util.d.ts +16 -10
  99. package/dist/dimensional-model/filters/utils/filter-from-jaql-util.js +34 -27
  100. package/dist/dimensional-model/filters/utils/filter-matcher-utils.d.ts +5 -0
  101. package/dist/dimensional-model/filters/utils/filter-matcher-utils.js +170 -0
  102. package/dist/dimensional-model/filters/utils/filter-types-util.d.ts +3 -1
  103. package/dist/dimensional-model/filters/utils/filter-types-util.js +2 -2
  104. package/dist/dimensional-model/filters/utils/types.d.ts +1 -1
  105. package/dist/dimensional-model/interfaces.d.ts +6 -0
  106. package/dist/dimensional-model/types.d.ts +9 -3
  107. package/dist/index.d.ts +1 -0
  108. package/dist/index.js +1 -0
  109. package/package.json +18 -9
@@ -0,0 +1,796 @@
1
+ import { DateDimension, LevelAttribute, Attribute, Measure, Filter, BaseMeasure, FilterRelationsNode, FilterRelations } from '../interfaces.js';
2
+ /**
3
+ * Creates a filter representing the union of multiple filters on the same attribute. The resulting
4
+ * union filter filters on items that match any of the given filters.
5
+ *
6
+ * To create 'or' filters using different attributes, use the {@link logic.and | `or()`} function.
7
+ *
8
+ * @example
9
+ * Filter for countries that start with the letter 'A' **or** end with the letter 'A'
10
+ * in the Sample ECommerce data model.
11
+ * ```ts
12
+ * filterFactory.union([
13
+ * filterFactory.startsWith(DM.Country.Country, 'A'),
14
+ * filterFactory.endsWith(DM.Country.Country, 'A'),
15
+ * ])
16
+ * ```
17
+ * @param filters - Filters to union. The filters must all be on the same attribute.
18
+ * @param guid - Optional GUID for the filter
19
+ * @returns A filter instance
20
+ */
21
+ export declare function union(filters: Filter[], guid?: string): Filter;
22
+ /**
23
+ * Creates a filter representing the intersection of multiple filters on the same attribute. The resulting
24
+ * intersection filter filters on items that match all of the given filters.
25
+ *
26
+ * To create 'and' filters using different attributes, use the {@link logic.and | `and()`} function.
27
+ *
28
+ * @example
29
+ * Filter for countries that start with the letter 'A' **and** end with the letter 'A'
30
+ * in the Sample ECommerce data model.
31
+ * ```ts
32
+ * filterFactory.intersection([
33
+ * filterFactory.startsWith(DM.Country.Country, 'A'),
34
+ * filterFactory.endsWith(DM.Country.Country, 'A'),
35
+ * ])
36
+ * ```
37
+ * @param filters - Filters to intersect. The filters must all be on the same attribute.
38
+ * @param guid - Optional GUID for the filter
39
+ * @returns A filter instance
40
+ */
41
+ export declare function intersection(filters: Filter[], guid?: string): Filter;
42
+ /**
43
+ * Creates a filter that excludes items matching the given filter
44
+ * from all items or from items matching the optional input filter.
45
+ *
46
+ * @example
47
+ * Filter for items where the country name does not contain the letter 'A'
48
+ * from the Sample ECommerce data model.
49
+ * ```ts
50
+ * filterFactory.exclude(filterFactory.contains(DM.Country.Country, 'A'))
51
+ * ```
52
+ *
53
+ * Filter for items where the country name starts with the letter 'B' but does not contain the letter 'A'
54
+ * from the Sample ECommerce data model. This filter will match countries like 'Belgium', but will not
55
+ * match countries like 'Bermuda'.
56
+ * ```ts
57
+ * filterFactory.exclude(
58
+ * filterFactory.contains(DM.Country.Country, 'A'),
59
+ * filterFactory.startsWith(DM.Country.Country, 'B')
60
+ * )
61
+ * ```
62
+ * @param filter - Filter to exclude
63
+ * @param input - Input filter to exclude from, on the same attribute. If not provided, the filter excludes from all items.
64
+ * @param guid - Optional GUID for the filter
65
+ * @returns A filter representing an exclusion of the given filter
66
+ * from all attribute members or from the optional input filter
67
+ */
68
+ export declare function exclude(filter: Filter, input?: Filter, guid?: string): Filter;
69
+ /**
70
+ * Creates a filter to isolate attribute values that do not contain a specified string.
71
+ *
72
+ * Matching is case insensitive.
73
+ *
74
+ * You can optionally use wildcard characters for pattern matching, as described in the
75
+ * {@link like | `like()`} function.
76
+ *
77
+ * @example
78
+ * Filter for categories in the Sample ECommerce data model where the category name doesn't contain
79
+ * 'digital'. This filter matches categories not like 'Digital Cameras' and 'MP3 & Digital Media Players'.
80
+ * ```ts
81
+ * filterFactory.contains(DM.Category.Category, 'digital')
82
+ * ```
83
+ * @param attribute - Text attribute to filter on
84
+ * @param value - Value to filter by
85
+ * @param guid - Optional GUID for the filter
86
+ * @returns A filter instance
87
+ */
88
+ export declare function doesntContain(attribute: Attribute, value: string, guid?: string): Filter;
89
+ /**
90
+ * Creates a filter to isolate attribute values that do not end with a specified string.
91
+ *
92
+ * Matching is case insensitive.
93
+ *
94
+ * You can optionally use wildcard characters for pattern matching, as described in the
95
+ * {@link like | `like()`} function.
96
+ *
97
+ * @example
98
+ * Filter for countries in the Sample ECommerce data model where the country name doesn't end with
99
+ * 'land'. This filter matches countries not like 'Iceland' and 'Ireland'.
100
+ * ```ts
101
+ * filterFactory.doesntEndWith(DM.Country.Country, 'land')
102
+ * ```
103
+ * @param attribute - Text attribute to filter on
104
+ * @param value - Value to filter by
105
+ * @param guid - Optional GUID for the filter
106
+ * @returns A filter instance
107
+ */
108
+ export declare function doesntEndWith(attribute: Attribute, value: string, guid?: string): Filter;
109
+ /**
110
+ * Creates a filter to isolate attribute values that do not start with a specified string.
111
+ *
112
+ * Matching is case insensitive.
113
+ *
114
+ * You can optionally use wildcard characters for pattern matching, as described in the
115
+ * {@link like | `like()`} function.
116
+ *
117
+ * @example
118
+ * Filter for countries in the Sample ECommerce data model where the country name doesn't start with
119
+ * 'United'. This filter matches countries not like 'United States' and 'United Kingdom'.
120
+ * ```ts
121
+ * filterFactory.doesntStartWith(DM.Country.Country, 'United')
122
+ * ```
123
+ * @param attribute - Text attribute to filter on
124
+ * @param value - Value to filter by
125
+ * @param guid - Optional GUID for the filter
126
+ * @returns A filter instance
127
+ */
128
+ export declare function doesntStartWith(attribute: Attribute, value: string, guid?: string): Filter;
129
+ /**
130
+ * Creates a filter to isolate attribute values that contain a specified string.
131
+ *
132
+ * Matching is case insensitive.
133
+ *
134
+ * You can optionally use wildcard characters for pattern matching, as described in the
135
+ * {@link like | `like()`} function.
136
+ *
137
+ * @example
138
+ * Filter for categories in the Sample ECommerce data model where the category name contains
139
+ * 'digital'. This filter matches categories like 'Digital Cameras' and 'MP3 & Digital Media Players'.
140
+ * ```ts
141
+ * filterFactory.contains(DM.Category.Category, 'digital')
142
+ * ```
143
+ * @param attribute - Text attribute to filter on
144
+ * @param value - Value to filter by
145
+ * @param guid - Optional GUID for the filter
146
+ * @returns A filter instance
147
+ */
148
+ export declare function contains(attribute: Attribute, value: string, guid?: string): Filter;
149
+ /**
150
+ * Creates a filter to isolate attribute values that end with a specified string.
151
+ *
152
+ * Matching is case insensitive.
153
+ *
154
+ * You can optionally use wildcard characters for pattern matching, as described in the
155
+ * {@link like | `like()`} function.
156
+ *
157
+ * @example
158
+ * Filter for countries in the Sample ECommerce data model where the country name ends with
159
+ * 'land'. This filter matches countries like 'Ireland' and 'Iceland'.
160
+ * ```ts
161
+ * filterFactory.endsWith(DM.Country.Country, 'land')
162
+ * ```
163
+ * @param attribute - Text attribute to filter on
164
+ * @param value - Value to filter by
165
+ * @param guid - Optional GUID for the filter
166
+ * @returns A filter instance
167
+ */
168
+ export declare function endsWith(attribute: Attribute, value: string, guid?: string): Filter;
169
+ /**
170
+ * Creates a filter to isolate attribute values that start with a specified string.
171
+ *
172
+ * Matching is case insensitive.
173
+ *
174
+ * You can optionally use wildcard characters for pattern matching, as described in the
175
+ * {@link like | `like()`} function.
176
+ *
177
+ * @example
178
+ * Filter for countries in the Sample ECommerce data model where the country name starts with
179
+ * 'United'. This filter matches countries like 'United States' and 'United Kingdom'.
180
+ * ```ts
181
+ * filterFactory.startsWith(DM.Country.Country, 'United')
182
+ * ```
183
+ * @param attribute - Text attribute to filter on
184
+ * @param value - Value to filter by
185
+ * @param guid - Optional GUID for the filter
186
+ * @returns A filter instance
187
+ */
188
+ export declare function startsWith(attribute: Attribute, value: string, guid?: string): Filter;
189
+ /**
190
+ * Creates a filter to isolate attribute values that match a specified string pattern.
191
+ *
192
+ * The pattern can include the following wildcard characters:
193
+ *
194
+ * + `_`: Matches a single character
195
+ * + `%`: Matches multiple characters
196
+ *
197
+ * To search for a literal underscore (`_`) or percent symbol (`%`), use the backslash (`\`) escape
198
+ * character.
199
+ *
200
+ * Matching is case insensitive.
201
+ *
202
+ * @example
203
+ * Filter for countries from the Sample ECommerce data model where the country name starts with an
204
+ * 'A' and ends with an 'a'. This filter matches countries like 'Argentina' and 'Australia'.
205
+ * ```ts
206
+ * filterFactory.like(DM.Country.Country, 'A%a')
207
+ * ```
208
+ * @param attribute - Text attribute to filter on
209
+ * @param value - Value to filter by
210
+ * @param guid - Optional GUID for the filter
211
+ * @returns A filter instance
212
+ */
213
+ export declare function like(attribute: Attribute, value: string, guid?: string): Filter;
214
+ /**
215
+ * Creates a filter to isolate attribute values that do not equal a specified string or number.
216
+ *
217
+ * When filtering against a string:
218
+ *
219
+ * + Matching is case insensitive.
220
+ * + You can optionally use wildcard characters for pattern matching, as described in the
221
+ * {@link like | `like()`} function.
222
+ *
223
+ * @example
224
+ * Filter for items not in new condition from the Sample ECommerce data model.
225
+ * ```ts
226
+ * filterFactory.doesntEqual(DM.Commerce.Condition, 'New')
227
+ * ```
228
+ * @param attribute - Text or numeric attribute to filter on
229
+ * @param value - Value to filter by
230
+ * @returns A filter instance
231
+ */
232
+ export declare function doesntEqual(attribute: Attribute, value: string | number, guid?: string): Filter;
233
+ /**
234
+ * Creates a filter to isolate attribute values that equal a specified string or number.
235
+ *
236
+ * When filtering against a string:
237
+ *
238
+ * + Matching is case insensitive.
239
+ * + You can optionally use wildcard characters for pattern matching, as described in the
240
+ * {@link like | `like()`} function.
241
+ *
242
+ * @example
243
+ * Filter for items in new condition from the Sample ECommerce data model.
244
+ * ```ts
245
+ * filterFactory.equals(DM.Commerce.Condition, 'New')
246
+ * ```
247
+ * @param attribute - Text or numeric attribute to filter on
248
+ * @param value - Value to filter by
249
+ * @param guid - Optional GUID for the filter
250
+ * @returns A filter instance
251
+ */
252
+ export declare function equals(attribute: Attribute, value: string | number, guid?: string): Filter;
253
+ /**
254
+ * Creates a filter to isolate attribute values strictly greater than a specified number.
255
+ *
256
+ * @example
257
+ * Filter for items where the cost is greater than 100 from the Sample ECommerce data model.
258
+ * ```ts
259
+ * filterFactory.greaterThan(DM.Commerce.Cost, 100)
260
+ * ```
261
+ * @param attribute - Numeric attribute to filter on
262
+ * @param value - Value to filter by
263
+ * @param guid - Optional GUID for the filter
264
+ * @returns A filter instance
265
+ */
266
+ export declare function greaterThan(attribute: Attribute, value: number, guid?: string): Filter;
267
+ /**
268
+ * Creates a filter to isolate attribute values greater than or equal to a specified number.
269
+ *
270
+ * @example
271
+ * Filter for items where the cost is greater than or equal to 100 from the Sample ECommerce data model.
272
+ * ```ts
273
+ * filterFactory.greaterThanOrEqual(DM.Commerce.Cost, 100)
274
+ * ```
275
+ * @param attribute - Numeric attribute to filter on
276
+ * @param value - Value to filter by
277
+ * @param guid - Optional GUID for the filter
278
+ * @returns A filter instance
279
+ */
280
+ export declare function greaterThanOrEqual(attribute: Attribute, value: number, guid?: string): Filter;
281
+ /**
282
+ * Creates a filter to isolate attribute values strictly less than a specified number.
283
+ *
284
+ * @example
285
+ * Filter for items where the cost is less than 100 from the Sample ECommerce data model.
286
+ * ```ts
287
+ * filterFactory.lessThan(DM.Commerce.Cost, 100)
288
+ * ```
289
+ * @param attribute - Numeric attribute to filter on
290
+ * @param value - Value to filter by
291
+ * @param guid - Optional GUID for the filter
292
+ * @returns A filter instance
293
+ */
294
+ export declare function lessThan(attribute: Attribute, value: number, guid?: string): Filter;
295
+ /**
296
+ * Creates a filter to isolate attribute values less than or equal to a specified number.
297
+ *
298
+ * @example
299
+ * Filter for items where the cost is less than or equal to 100 from the Sample ECommerce data model.
300
+ * ```ts
301
+ * filterFactory.lessThanOrEqual(DM.Commerce.Cost, 100)
302
+ * ```
303
+ * @param attribute - Numeric attribute to filter on
304
+ * @param value - Value to filter by
305
+ * @param guid - Optional GUID for the filter
306
+ * @returns A filter instance
307
+ */
308
+ export declare function lessThanOrEqual(attribute: Attribute, value: number, guid?: string): Filter;
309
+ /**
310
+ * Creates a filter to isolate attribute values within or exactly matching two specified numerical boundaries.
311
+ *
312
+ * @example
313
+ * Filter for items from the Sample ECommerce data model where the cost is greater than or equal to 100 and less than or equal to 200.
314
+ * ```ts
315
+ * filterFactory.between(DM.Commerce.Cost, 100, 200)
316
+ * ```
317
+ * @param attribute - Numeric attribute to filter on
318
+ * @param valueA - Value to filter from
319
+ * @param valueB - Value to filter to
320
+ * @param guid - Optional GUID for the filter
321
+ * @returns A filter instance
322
+ */
323
+ export declare function between(attribute: Attribute, valueA: number, valueB: number, guid?: string): Filter;
324
+ /**
325
+ * Creates a filter that isolates attribute values strictly within two specified numerical boundaries.
326
+ *
327
+ * @example
328
+ * Filter for items from the Sample ECommerce data model where the cost is greater than 100 and less than 200.
329
+ * ```ts
330
+ * filterFactory.betweenNotEqual(DM.Commerce.Cost, 100, 200)
331
+ * ```
332
+ * @param attribute - Numeric attribute to filter on
333
+ * @param valueA - Value to filter from
334
+ * @param valueB - Value to filter to
335
+ * @param guid - Optional GUID for the filter
336
+ * @returns A filter instance
337
+ */
338
+ export declare function betweenNotEqual(attribute: Attribute, valueA: number, valueB: number, guid?: string): Filter;
339
+ /**
340
+ * Creates a custom numeric filter that filters for given attribute values.
341
+ *
342
+ * @example
343
+ * Filter for items where the cost is greater than 100 and less than 200
344
+ * from the Sample ECommerce data model.
345
+ * ```ts
346
+ * filterFactory.numeric(
347
+ * DM.Commerce.Cost,
348
+ * NumericOperators.From,
349
+ * 100,
350
+ * NumericOperators.To,
351
+ * 200
352
+ * )
353
+ * ```
354
+ * @param attribute - Numeric attribute to filter
355
+ * @param operatorA - First operator
356
+ * @param valueA - First value
357
+ * @param operatorB - Second operator
358
+ * @param valueB - Second value
359
+ * @param guid - Optional GUID for the filter
360
+ * @returns A custom numeric filter of the given attribute
361
+ */
362
+ export declare function numeric(attribute: Attribute, operatorA?: string, valueA?: number, operatorB?: string, valueB?: number, guid?: string): Filter;
363
+ /**
364
+ * Creates a filter to isolate attribute values that match any of the specified strings.
365
+ *
366
+ * Matching is case sensitive.
367
+ *
368
+ * @example
369
+ * Filter for items where the condition is 'Used' or 'Refurbished'
370
+ * from the Sample ECommerce data model.
371
+ * ```ts
372
+ * filterFactory.members(DM.Commerce.Condition, ['Used', 'Refurbished'])
373
+ * ```
374
+ * @param attribute - Attribute to filter on
375
+ * @param members - Array of member values to filter by
376
+ * @param guid - Optional GUID for the filter
377
+ * @returns A filter instance
378
+ */
379
+ export declare function members(attribute: Attribute, members: string[], guid?: string): Filter;
380
+ /**
381
+ * Creates a filter to isolate date values starting from and including the given date and level.
382
+ *
383
+ * @example
384
+ * Filter for items in the Sample ECommerce data model where the date is not before the year 2010.
385
+ * ```ts
386
+ * filterFactory.dateFrom(DM.Commerce.Date.Years, '2010-01')
387
+ * ```
388
+ * @param level - Date {@link LevelAttribute} to filter on
389
+ * @param from - Date or string representing the value to filter from
390
+ * @returns A filter instance
391
+ */
392
+ export declare function dateFrom(level: LevelAttribute, from: Date | string, guid?: string): Filter;
393
+ /**
394
+ * Creates a filter to isolate items up until and including the given date and level.
395
+ *
396
+ * @example
397
+ * Filter for items where the date is from the year 2010 or earlier in the Sample ECommerce data model.
398
+ * ```ts
399
+ * filterFactory.dateTo(DM.Commerce.Date.Years, '2010-01')
400
+ * ```
401
+ * @param level - Date {@link LevelAttribute} to filter on
402
+ * @param to - Date or string representing the last member to filter to
403
+ * @param guid - Optional GUID for the filter
404
+ * @returns A filter instance
405
+ */
406
+ export declare function dateTo(level: LevelAttribute, to: Date | string, guid?: string): Filter;
407
+ /**
408
+ * Creates a filter to isolate items between and including the given dates and level.
409
+ *
410
+ * @example
411
+ * Filter for items in the Sample ECommerce data model where the date is from the years 2009, 2010, or 2011.
412
+ * ```ts
413
+ * filterFactory.dateRange(DM.Commerce.Date.Years, '2009-01', '2011-01')
414
+ * ```
415
+ * @param level - Date {@link LevelAttribute} to filter on
416
+ * @param from - Date or string representing the start member to filter from
417
+ * @param to - Date or string representing the end member to filter to
418
+ * @param guid - Optional GUID for the filter
419
+ * @returns A filter instance
420
+ */
421
+ export declare function dateRange(level: LevelAttribute, from?: Date | string, to?: Date | string, guid?: string): Filter;
422
+ /**
423
+ * Creates a filter to isolate items with a date dimension value within a specified range after a
424
+ * given date and level.
425
+ *
426
+ * Although the `offset` can be used to set a beginning date prior to the `anchor`, the filter range always
427
+ * continues forward after the offset beginning date. So, using an `offset` of `-6` and a `count` of `18` when `level`
428
+ * is a month level creates a range that begins 6 month before the `anchor` date and extends to 12 months after
429
+ * the `anchor` date.
430
+ *
431
+ * @example
432
+ * Filter for items in the Sample ECommerce data model where the date is in 2011 or the first half of 2012.
433
+ * ```ts
434
+ * filterFactory.dateRelative(DM.Commerce.Date.Months, 0, 18, '2011-01'),
435
+ * ```
436
+ *
437
+ * Filter for items in the Sample ECommerce data model where the date is in the second half of 2010 or in 2011.
438
+ * ```ts
439
+ * filterFactory.dateRelative(DM.Commerce.Date.Months, -6, 18, '2011-01'),
440
+ * ```
441
+ *
442
+ * Filter for items in the Sample ECommerce data model where the date is in the past 6 months.
443
+ * ```ts
444
+ * filterFactory.dateRelative(DM.Commerce.Date.Months, -6, 6),
445
+ * ```
446
+ * @param level - Date {@link LevelAttribute} to filter on
447
+ * @param offset - Number of levels to skip from the given `anchor` or the default of the current day.
448
+ * Positive numbers skip forwards and negative numbers skip backwards (e.g. `-6` is 6 months backwards when `level` is a months level attribute)
449
+ * @param count - Number of levels to include in the filter (e.g. `6` is 6 months when `level` is a months level attribute)
450
+ * @param anchor - Date to filter from, defaults to the current day
451
+ * @param guid - Optional GUID for the filter
452
+ * @returns A filter instance
453
+ */
454
+ export declare function dateRelative(level: LevelAttribute, offset: number, count: number, anchor?: Date | string, guid?: string): Filter;
455
+ /**
456
+ * Creates a filter to isolate items with a date dimension value within a specified range after a
457
+ * given date and level.
458
+ *
459
+ * @example
460
+ * Filter for items in the Sample ECommerce data model where the date is in 2011 or the first half of 2012.
461
+ * ```ts
462
+ * filterFactory.dateRelativeFrom(DM.Commerce.Date.Months, 0, 18, '2011-01'),
463
+ * ```
464
+ * @param level - Date {@link LevelAttribute} to filter on
465
+ * @param offset - Number of levels to skip from the given `anchor` or the default of the current day (e.g. `6` is 6 months when `level` is a months level attribute)
466
+ * @param count - Number of levels to include in the filter (e.g. `6` is 6 months when `level` is a months level attribute)
467
+ * @param anchor - Date to filter from, defaults to the current day
468
+ * @param guid - Optional GUID for the filter
469
+ * @returns A filter instance
470
+ */
471
+ export declare function dateRelativeFrom(level: LevelAttribute, offset: number, count: number, anchor?: Date | string, guid?: string): Filter;
472
+ /**
473
+ * Creates a filter to isolate items with a date dimension value within a specified range before a
474
+ * given date and level.
475
+ *
476
+ * @example
477
+ * Filter for items in the Sample ECommerce data model where the date is in the first half of 2010 or in 2011.
478
+ * ```ts
479
+ * filterFactory.dateRelativeTo(DM.Commerce.Date.Months, 0, 18, '2011-12'),
480
+ * ```
481
+ * @param level - Date {@link LevelAttribute} to filter on
482
+ * @param offset - Number of levels to skip from the given `anchor` or the default of the current day (e.g. `6` is 6 months when `level` is a months level attribute)
483
+ * @param count - Number of levels to include in the filter (e.g. `6` is 6 months when `level` is a months level attribute)
484
+ * @param anchor - Date to filter to, defaults to the current day
485
+ * @param guid - Optional GUID for the filter
486
+ * @returns A filter instance
487
+ */
488
+ export declare function dateRelativeTo(level: LevelAttribute, offset: number, count: number, anchor?: Date | string, guid?: string): Filter;
489
+ /**
490
+ * Creates a filter to isolate items with a date dimension value in the current calendar year.
491
+ *
492
+ * @example
493
+ * Filter for items where the date is in the current calendar year in the Sample ECommerce data model.
494
+ * ```ts
495
+ * filterFactory.thisYear(DM.Commerce.Date)
496
+ * ```
497
+ * @param dimension - Date dimension to filter
498
+ * @param guid - Optional GUID for the filter
499
+ * @returns A filter instance
500
+ */
501
+ export declare function thisYear(dimension: DateDimension, guid?: string): Filter;
502
+ /**
503
+ * Creates a filter to isolate items with a date dimension value in the current calendar month.
504
+ *
505
+ * @example
506
+ * Filter for items where the date is in the current calendar month in the Sample ECommerce data model.
507
+ * ```ts
508
+ * filterFactory.thisMonth(DM.Commerce.Date)
509
+ * ```
510
+ * @param dimension - Date dimension to filter
511
+ * @param guid - Optional GUID for the filter
512
+ * @returns A filter instance
513
+ */
514
+ export declare function thisMonth(dimension: DateDimension, guid?: string): Filter;
515
+ /**
516
+ * Creates a filter to isolate items with a date dimension value in the current quarter.
517
+ *
518
+ * @example
519
+ * Filter for items where the date is in the current quarter in the Sample ECommerce data model.
520
+ * ```ts
521
+ * filterFactory.thisQuarter(DM.Commerce.Date)
522
+ * ```
523
+ * @param dimension - Date dimension to filter
524
+ * @param guid - Optional GUID for the filter
525
+ * @returns A filter instance
526
+ */
527
+ export declare function thisQuarter(dimension: DateDimension, guid?: string): Filter;
528
+ /**
529
+ * Creates a filter to isolate items with a date dimension value of the current date.
530
+ *
531
+ * @example
532
+ * Filter for items where the date is today in the Sample ECommerce data model.
533
+ * ```ts
534
+ * filterFactory.today(DM.Commerce.Date)
535
+ * ```
536
+ * @param dimension - date dimension to filter
537
+ * @param guid - Optional GUID for the filter
538
+ * @returns A filter instance
539
+ */
540
+ export declare function today(dimension: DateDimension, guid?: string): Filter;
541
+ /**
542
+ * Creates a filter on all measure values matching the provided criteria.
543
+ *
544
+ * @param attribute - Attribute to filter
545
+ * @param measure - Measure to filter by
546
+ * @param operatorA - Operator to apply on `valueA` ({@link NumericOperators})
547
+ * @param valueA - First value
548
+ * @param operatorB - Operator to apply on `valueB` ({@link NumericOperators})
549
+ * @param valueB - Second value
550
+ * @param guid - Optional GUID for the filter
551
+ * @returns A filter representing the provided logic
552
+ * @internal
553
+ */
554
+ export declare function measureBase(attribute: Attribute, measure: Measure, operatorA?: string, valueA?: number, operatorB?: string, valueB?: number, guid?: string): Filter;
555
+ /**
556
+ * Creates a filter to isolate a measure value equal to a given number.
557
+ *
558
+ * @example
559
+ * Filter for categories that have an average revenue equal 50 in the Sample ECommerce data model.
560
+ * ```ts
561
+ * filterFactory.measureEquals(
562
+ * measures.average(DM.Commerce.Revenue),
563
+ * 50
564
+ * )
565
+ * ```
566
+ * @param measure - Measure to filter by
567
+ * @param value - Value
568
+ * @param guid - Optional GUID for the filter
569
+ * @returns A filter instance
570
+ */
571
+ export declare function measureEquals(measure: BaseMeasure, value: number, guid?: string): Filter;
572
+ /**
573
+ * Creates a filter to isolate a measure value greater than to a given number.
574
+ *
575
+ * @example
576
+ * Filter for categories that have an average revenue greater than
577
+ * to 50 in the Sample ECommerce data model.
578
+ * ```ts
579
+ * filterFactory.measureGreaterThan(
580
+ * measures.average(DM.Commerce.Revenue),
581
+ * 50
582
+ * )
583
+ * ```
584
+ * @param measure - Measure to filter by
585
+ * @param value - Min value
586
+ * @param guid - Optional GUID for the filter
587
+ * @returns A filter instance
588
+ */
589
+ export declare function measureGreaterThan(measure: BaseMeasure, value: number, guid?: string): Filter;
590
+ /**
591
+ * Creates a filter to isolate a measure value greater than or equal to a given number.
592
+ *
593
+ * @example
594
+ * Filter for categories that have an average revenue greater than
595
+ * or equal to 50 in the Sample ECommerce data model.
596
+ * ```ts
597
+ * filterFactory.measureGreaterThanOrEqual(
598
+ * measures.average(DM.Commerce.Revenue),
599
+ * 50
600
+ * )
601
+ * ```
602
+ * @param measure - Measure to filter by
603
+ * @param value - Min value
604
+ * @param guid - Optional GUID for the filter
605
+ * @returns A filter instance
606
+ */
607
+ export declare function measureGreaterThanOrEqual(measure: BaseMeasure, value: number, guid?: string): Filter;
608
+ /**
609
+ * Creates a filter to isolate a measure value less than or equal to a given number.
610
+ *
611
+ * @example
612
+ * Filter for categories that have an average revenue less than
613
+ * or equal to 100 in the Sample ECommerce data model.
614
+ * ```ts
615
+ * filterFactory.measureLessThanOrEqual(
616
+ * measures.average(DM.Commerce.Revenue),
617
+ * 100
618
+ * )
619
+ * ```
620
+ * @param measure - Measure to filter by
621
+ * @param value - Max value
622
+ * @param guid - Optional GUID for the filter
623
+ * @returns A filter instance
624
+ */
625
+ export declare function measureLessThanOrEqual(measure: BaseMeasure, value: number, guid?: string): Filter;
626
+ /**
627
+ * Creates a filter to isolate a measure value less than a given number.
628
+ *
629
+ * @example
630
+ * Filter for categories that have an average revenue less than 100 in the Sample ECommerce data model.
631
+ * ```ts
632
+ * filterFactory.measureLessThan(
633
+ * measures.average(DM.Commerce.Revenue),
634
+ * 100
635
+ * )
636
+ * ```
637
+ * @param measure - Measure to filter by
638
+ * @param value - Value
639
+ * @param guid - Optional GUID for the filter
640
+ * @returns A filter instance
641
+ */
642
+ export declare function measureLessThan(measure: BaseMeasure, value: number, guid?: string): Filter;
643
+ /**
644
+ * Creates a filter to isolate a measure value between or equal to two given numbers.
645
+ *
646
+ * @example
647
+ * Filter for categories that have an average revenue greater than or equal to 50 and less than
648
+ * or equal to 100 in the Sample ECommerce data model.
649
+ * ```ts
650
+ * filterFactory.measureBetween(
651
+ * measures.average(DM.Commerce.Revenue),
652
+ * 50,
653
+ * 100
654
+ * )
655
+ * ```
656
+ * @param measure - Measure to filter by
657
+ * @param valueA - Min value
658
+ * @param valueB - Max value
659
+ * @param guid - Optional GUID for the filter
660
+ * @returns A filter instance
661
+ */
662
+ export declare function measureBetween(measure: BaseMeasure, valueA: number, valueB: number, guid?: string): Filter;
663
+ /**
664
+ * Creates a filter to isolate a measure value between but not equal to two given numbers.
665
+ *
666
+ * @example
667
+ * Filter for categories that have an average revenue greater than 50 and less than
668
+ * 100 in the Sample ECommerce data model.
669
+ * ```ts
670
+ * filterFactory.measureBetweenNotEqual(
671
+ * measures.average(DM.Commerce.Revenue),
672
+ * 50,
673
+ * 100
674
+ * )
675
+ * ```
676
+ * @param measure - Measure to filter by
677
+ * @param valueA - Min value
678
+ * @param valueB - Max value
679
+ * @param guid - Optional GUID for the filter
680
+ * @returns A filter instance
681
+ */
682
+ export declare function measureBetweenNotEqual(measure: BaseMeasure, valueA: number, valueB: number, guid?: string): Filter;
683
+ /**
684
+ * Creates a filter to isolate items that rank towards the top for a given measure.
685
+ *
686
+ * @example
687
+ * Filter for age ranges with the top 3 highest total revenue in the Sample ECommerce data model.
688
+ * ```ts
689
+ * filterFactory.topRanking(
690
+ * DM.Commerce.AgeRange,
691
+ * measures.sum(DM.Commerce.Revenue),
692
+ * 3
693
+ * )
694
+ * ```
695
+ * @param attribute - Attribute to filter
696
+ * @param measure - Measure to filter by
697
+ * @param count - Number of members to return
698
+ * @param guid - Optional GUID for the filter
699
+ * @returns A filter instance
700
+ */
701
+ export declare function topRanking(attribute: Attribute, measure: Measure, count: number, guid?: string): Filter;
702
+ /**
703
+ * Creates a filter to isolate items that rank towards the bottom for a given measure.
704
+ *
705
+ * @example
706
+ * Filter for age ranges with the bottom 3 lowest total revenue in the Sample ECommerce data model.
707
+ * ```ts
708
+ * filterFactory.bottomRanking(
709
+ * DM.Commerce.AgeRange,
710
+ * measures.sum(DM.Commerce.Revenue),
711
+ * 3
712
+ * )
713
+ * ```
714
+ * @param attribute - Attribute to filter
715
+ * @param measure - Measure to filter by
716
+ * @param count - Number of members to return
717
+ * @param guid - Optional GUID for the filter
718
+ * @returns A filter instance
719
+ */
720
+ export declare function bottomRanking(attribute: Attribute, measure: Measure, count: number, guid?: string): Filter;
721
+ /**
722
+ * Set of logic operators for filter relations construction
723
+ *
724
+ * These operators are still in beta.
725
+ *
726
+ * @example
727
+ * ```ts
728
+ * import { filters } from '@sisense/sdk-data';
729
+ *
730
+ * // define filters
731
+ * const revenueFilter = filterFactory.greaterThan(DM.Commerce.Revenue, 1000);
732
+ * const countryFilter = filterFactory.members(DM.Commerce.Country, ['USA', 'Canada']);
733
+ * const genderFilter = filterFactory.doesntContain(DM.Commerce.Gender, 'Unspecified');
734
+ * const costFilter = filterFactory.between(DM.Commerce.Cost, 1000, 2000);
735
+ *
736
+ * // create filter relations of two filters
737
+ * const orFilerRelations = filterFactory.logic.or(revenueFilter, countryFilter);
738
+ * // revenueFilter OR countryFilter
739
+ *
740
+ * // filter relations can have nested filter relations
741
+ * const mixedFilterRelations = filterFactory.logic.and(genderFilter, orFilerRelations);
742
+ * // genderFilter AND (revenueFilter OR countryFilter)
743
+ *
744
+ * // array, specified in filter relations, will be converted to an intersection of filters automatically
745
+ * const arrayFilterRelations = filterFactory.logic.or([genderFilter, costFilter], mixedFilterRelations);
746
+ * // (genderFilter AND costFilter) OR (genderFilter AND (revenueFilter OR countryFilter))
747
+ * ```
748
+ * @beta
749
+ */
750
+ export declare namespace logic {
751
+ /**
752
+ * Creates an 'AND' filter relations
753
+ *
754
+ * @example
755
+ * Create filter relations for items that have a revenue greater than 100 and are in new condition
756
+ * in the Sample ECommerce data model.
757
+ * ```ts
758
+ * const revenueFilter = filterFactory.greaterThan(DM.Commerce.Revenue, 100);
759
+ * const conditionFilter = filterFactory.equals(DM.Commerce.Condition, 'New');
760
+ *
761
+ * const andFilerRelation = filterFactory.logic.and(revenueFilter, conditionFilter);
762
+ * ```
763
+ * @param left First filter or filter relations
764
+ * @param right Second filter or filter relations
765
+ * @returns Filter relations
766
+ * @beta
767
+ */
768
+ const and: (left: FilterRelationsNode, right: FilterRelationsNode) => FilterRelations;
769
+ /**
770
+ * Creates an 'OR' filter relations
771
+ *
772
+ * @example
773
+ * Create filter relations for items that have a revenue greater than 100 or are in new condition
774
+ * in the Sample ECommerce data model.
775
+ * ```ts
776
+ * const revenueFilter = filterFactory.greaterThan(DM.Commerce.Revenue, 100);
777
+ * const conditionFilter = filterFactory.equals(DM.Commerce.Condition, 'New');
778
+ *
779
+ * const orFilerRelation = filterFactory.logic.or(revenueFilter, conditionFilter);
780
+ * ```
781
+ * @param left First filter or filter relations
782
+ * @param right Second filter or filter relations
783
+ * @returns Filter relations
784
+ * @beta
785
+ */
786
+ const or: (left: FilterRelationsNode, right: FilterRelationsNode) => FilterRelations;
787
+ }
788
+ /**
789
+ * Creates a filter from JAQL
790
+ *
791
+ * @param jaql - Filter Jaql
792
+ * @param guid - Optional GUID for the filter
793
+ * @returns A filter instance
794
+ * @internal
795
+ */
796
+ export declare function customFilter(jaql: any, guid?: string): Filter;