@genesislcap/foundation-filters 14.408.0 → 14.409.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -165
- package/package.json +12 -12
- package/docs/api/foundation-filters.clientfilter.filter.md +0 -54
- package/docs/api/foundation-filters.clientfilter.md +0 -42
- package/docs/api/foundation-filters.clientfiltername.md +0 -19
- package/docs/api/foundation-filters.clientfilterrunner.md +0 -38
- package/docs/api/foundation-filters.clientfilterrunner.run.md +0 -66
- package/docs/api/foundation-filters.clientfilterschema.md +0 -22
- package/docs/api/foundation-filters.clientfilterschemas.md +0 -15
- package/docs/api/foundation-filters.defaultclientfilterrunner.container.md +0 -11
- package/docs/api/foundation-filters.defaultclientfilterrunner.md +0 -89
- package/docs/api/foundation-filters.defaultclientfilterrunner.run.md +0 -66
- package/docs/api/foundation-filters.defaultnodeenv.filter.md +0 -52
- package/docs/api/foundation-filters.defaultnodeenv.isdevelopment.md +0 -16
- package/docs/api/foundation-filters.defaultnodeenv.isproduction.md +0 -16
- package/docs/api/foundation-filters.defaultnodeenv.istesting.md +0 -16
- package/docs/api/foundation-filters.defaultnodeenv.md +0 -129
- package/docs/api/foundation-filters.defaultpercentage.filter.md +0 -52
- package/docs/api/foundation-filters.defaultpercentage.md +0 -47
- package/docs/api/foundation-filters.defaulttimewindow.filter.md +0 -52
- package/docs/api/foundation-filters.defaulttimewindow.md +0 -47
- package/docs/api/foundation-filters.defaulturltargeting.filter.md +0 -52
- package/docs/api/foundation-filters.defaulturltargeting.issecure.md +0 -56
- package/docs/api/foundation-filters.defaulturltargeting.md +0 -59
- package/docs/api/foundation-filters.defaultuseragent.filter.md +0 -52
- package/docs/api/foundation-filters.defaultuseragent.issafari.md +0 -16
- package/docs/api/foundation-filters.defaultuseragent.md +0 -91
- package/docs/api/foundation-filters.defaultusertargeting._constructor_.md +0 -48
- package/docs/api/foundation-filters.defaultusertargeting.auth.md +0 -11
- package/docs/api/foundation-filters.defaultusertargeting.filter.md +0 -52
- package/docs/api/foundation-filters.defaultusertargeting.hasadminprofile.md +0 -16
- package/docs/api/foundation-filters.defaultusertargeting.isloggedin.md +0 -16
- package/docs/api/foundation-filters.defaultusertargeting.md +0 -161
- package/docs/api/foundation-filters.getfilterbyname.md +0 -66
- package/docs/api/foundation-filters.logger.md +0 -27
- package/docs/api/foundation-filters.md +0 -519
- package/docs/api/foundation-filters.nodeenv.isdevelopment.md +0 -16
- package/docs/api/foundation-filters.nodeenv.isproduction.md +0 -16
- package/docs/api/foundation-filters.nodeenv.istesting.md +0 -16
- package/docs/api/foundation-filters.nodeenv.md +0 -97
- package/docs/api/foundation-filters.nodeenvfilter.md +0 -58
- package/docs/api/foundation-filters.nodeenvparams.md +0 -25
- package/docs/api/foundation-filters.nodeenvschema.md +0 -19
- package/docs/api/foundation-filters.percentage.md +0 -19
- package/docs/api/foundation-filters.percentagefilter.md +0 -74
- package/docs/api/foundation-filters.percentageparams.md +0 -41
- package/docs/api/foundation-filters.percentageschema.md +0 -19
- package/docs/api/foundation-filters.runner.md +0 -74
- package/docs/api/foundation-filters.timewindow.md +0 -19
- package/docs/api/foundation-filters.timewindowfilter.md +0 -74
- package/docs/api/foundation-filters.timewindowparams.md +0 -59
- package/docs/api/foundation-filters.timewindowschema.md +0 -19
- package/docs/api/foundation-filters.urltargeting.issecure.md +0 -56
- package/docs/api/foundation-filters.urltargeting.md +0 -39
- package/docs/api/foundation-filters.urltargetingfilter.md +0 -122
- package/docs/api/foundation-filters.urltargetingparams.md +0 -30
- package/docs/api/foundation-filters.urltargetingschema.md +0 -19
- package/docs/api/foundation-filters.useragent.issafari.md +0 -16
- package/docs/api/foundation-filters.useragent.md +0 -63
- package/docs/api/foundation-filters.useragentfilter.md +0 -106
- package/docs/api/foundation-filters.useragentparams.md +0 -30
- package/docs/api/foundation-filters.useragentschema.md +0 -19
- package/docs/api/foundation-filters.usertargeting.hasadminprofile.md +0 -16
- package/docs/api/foundation-filters.usertargeting.isloggedin.md +0 -16
- package/docs/api/foundation-filters.usertargeting.md +0 -82
- package/docs/api/foundation-filters.usertargetingfilter.md +0 -106
- package/docs/api/foundation-filters.usertargetingparams.md +0 -29
- package/docs/api/foundation-filters.usertargetingschema.md +0 -19
- package/docs/api/index.md +0 -30
- package/docs/api-report.md.api.md +0 -283
package/README.md
CHANGED
|
@@ -1,184 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @genesislcap/foundation-filters
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](https://www.typescriptlang.org/)
|
|
3
|
+
Documentation for this package is published on the Genesis docs site:
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* [nodeEnv](./docs/api/foundation-filters.nodeenvfilter.md)
|
|
9
|
-
* [percentage](./docs/api/foundation-filters.percentagefilter.md)
|
|
10
|
-
* [timeWindow](./docs/api/foundation-filters.timewindowfilter.md)
|
|
11
|
-
* [urlTargeting](./docs/api/foundation-filters.urltargetingfilter.md)
|
|
12
|
-
* [userAgent](./docs/api/foundation-filters.useragentfilter.md)
|
|
13
|
-
* [userTargeting](./docs/api/foundation-filters.usertargetingfilter.md)
|
|
14
|
-
|
|
15
|
-
These can be run in isolation or as part of a chain using the [runner](./docs/api/foundation-filters.runner.md) function.
|
|
16
|
-
|
|
17
|
-
Client-side filters generally take primitive input parameters, and return `true` or `false` based on these values. They may also access runtime data or state to provide an outcome. They can be used for simple tasks like array or input filtering, or for more advanced use cases - such as driving feature flags, behaviors, directives, etc.
|
|
18
|
-
|
|
19
|
-
Filters can be chained using the utilities provided in this package to handle more complex scenarios. When a filter is used without all the input parameters needed, Genesis logs a warning and returns `true` by convention so that the chain can continue. This is currently controlled at an individual filter level, and may change in time.
|
|
20
|
-
|
|
21
|
-
:::important
|
|
22
|
-
It's important to highlight that filters are purposefully decoupled from any `effect`, like pairing with a `when()` directive or custom-effect logic. This flexibility allows these filters to be reused for numerous purposes.
|
|
23
|
-
:::
|
|
24
|
-
|
|
25
|
-
## Usage
|
|
26
|
-
|
|
27
|
-
Each filter is provided in two flavours:
|
|
28
|
-
|
|
29
|
-
1. *Function*
|
|
30
|
-
|
|
31
|
-
```ts
|
|
32
|
-
import { timeWindowFilter } from '@genesislcap/foundation-filters';
|
|
33
|
-
...
|
|
34
|
-
const outcome = timeWindowFilter('Sun Sep 25 2022 16:51:55 GMT+0000', 'Fri Nov 25 2022 17:51:55 GMT+0000');
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
2. *DI Injected*
|
|
38
|
-
|
|
39
|
-
```ts
|
|
40
|
-
import { TimeWindow } from '@genesislcap/foundation-filters';
|
|
41
|
-
...
|
|
42
|
-
@TimeWindow timeWindow: TimeWindow;
|
|
43
|
-
...
|
|
44
|
-
const outcome = this.timeWindow.filter({
|
|
45
|
-
start: 'Sun Sep 25 2022 16:51:55 GMT+0000',
|
|
46
|
-
end: 'Fri Nov 25 2022 17:51:55 GMT+0000',
|
|
47
|
-
});
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
The function version is pretty self-explanatory, and you may be wondering why you would use the DI injected version. The
|
|
51
|
-
reason is at the point of calling a filter, either directly or indirectly as (say) part of a chain, you may not know what
|
|
52
|
-
data or state from the application it needs to provide its outcome. The DI versions encapsulate this complexity, which aids later refactoring, and leaves callers free to pass only primitive input parameters where possible.
|
|
53
|
-
|
|
54
|
-
### DI use cases
|
|
55
|
-
|
|
56
|
-
```ts
|
|
57
|
-
import { UserTargeting } from '@genesislcap/foundation-filters';
|
|
58
|
-
...
|
|
59
|
-
@UserTargeting userTargeting: UserTargeting;
|
|
60
|
-
...
|
|
61
|
-
const outcome = this.userTargeting.filter({
|
|
62
|
-
profiles: ['ADMIN']
|
|
63
|
-
});
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Here we've used the `UserTargeting` filter without the need to provide the current user or other data points to the underlying function directly. If we source the current user from changes over time, the author of the filter can refactor centrally.
|
|
67
|
-
|
|
68
|
-
All DI-based filters implement the [ClientFilter](./docs/api/foundation-filters.clientfilter.md) interface; however, they may provide other APIs for convenience to abstract underlying implementation details. For example, `UserTargeting` provides a `hasAdminProfile` API, so the previous example can be re-written as:
|
|
69
|
-
|
|
70
|
-
```ts
|
|
71
|
-
import { UserTargeting } from '@genesislcap/foundation-filters';
|
|
72
|
-
...
|
|
73
|
-
@UserTargeting userTargeting: UserTargeting;
|
|
74
|
-
...
|
|
75
|
-
const outcome = this.userTargeting.hasAdminProfile();
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
This is quite a simplistic example, but we hope it helps to highlight that common parameters can be predefined in the
|
|
79
|
-
filters themselves where needed. It is also worth mentioning that DI-based filters are registered as transient, meaning
|
|
80
|
-
you will get a new instance for every dependency request or container.get(). The ClientFilterRunner used to run chained
|
|
81
|
-
filters is also transient.
|
|
82
|
-
|
|
83
|
-
### Client Filter Runner
|
|
84
|
-
|
|
85
|
-
A [ClientFilterRunner](./docs/api/foundation-filters.clientfilterrunner.md) will return true when all the filters in the array pass.
|
|
86
|
-
|
|
87
|
-
```ts
|
|
88
|
-
import { ClientFilterRunner } from '@genesislcap/foundation-filters';
|
|
89
|
-
...
|
|
90
|
-
@customElement({
|
|
91
|
-
name: 'runner-example',
|
|
92
|
-
template: html`
|
|
93
|
-
<template>
|
|
94
|
-
${when(
|
|
95
|
-
(x) => x.seasonsGreetings,
|
|
96
|
-
html`
|
|
97
|
-
<happy-christmas-chome-users></happy-christmas-chome-users>
|
|
98
|
-
`
|
|
99
|
-
)}
|
|
100
|
-
${when(
|
|
101
|
-
(x) => x.santasShift,
|
|
102
|
-
html`
|
|
103
|
-
<working-hard-or-hardly-working>Santa!</working-hard-or-hardly-working>
|
|
104
|
-
`
|
|
105
|
-
)}
|
|
106
|
-
</template>
|
|
107
|
-
`,
|
|
108
|
-
})
|
|
109
|
-
class RunnerExample extends FASTElement {
|
|
110
|
-
@ClientFilterRunner runner: ClientFilterRunner;
|
|
111
|
-
/**
|
|
112
|
-
* This getter will remain reactive to any observable state each filter may use. Filters can be defined with strong
|
|
113
|
-
* typings as shown, or they can be simply loaded in from json files etc. Here we've defined the chain in the element,
|
|
114
|
-
* but you could inject a ClientFilterRunner into a store fragment to centralise and share such logic. Here we're
|
|
115
|
-
* targeting non-admin users on chrome between Christmas and New Year.
|
|
116
|
-
*/
|
|
117
|
-
get seasonsGreetings() {
|
|
118
|
-
return this.runner.run([
|
|
119
|
-
{
|
|
120
|
-
name: 'userTargeting',
|
|
121
|
-
parameters: {
|
|
122
|
-
profiles: ['USER'],
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: 'userAgent',
|
|
127
|
-
parameters: {
|
|
128
|
-
browsers: ['Chrome']
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
name: 'timeWindow',
|
|
133
|
-
parameters: {
|
|
134
|
-
start: '2022-12-25',
|
|
135
|
-
end: '2022-12-31',
|
|
136
|
-
},
|
|
137
|
-
}]);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
get santasShift() {
|
|
141
|
-
return this.runner.run([
|
|
142
|
-
{
|
|
143
|
-
name: 'userTargeting',
|
|
144
|
-
parameters: {
|
|
145
|
-
username: ['santa'],
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
name: 'timeWindow',
|
|
150
|
-
parameters: {
|
|
151
|
-
start: '2022-12-24',
|
|
152
|
-
end: '2022-12-25',
|
|
153
|
-
},
|
|
154
|
-
}]);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
```
|
|
5
|
+
**Docs: [Filters](https://docs.genesis.global/docs/develop/client-capabilities/filters/)**
|
|
158
6
|
|
|
159
7
|
## Installation
|
|
160
8
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
1. Add `@genesislcap/foundation-filters` as a dependency in your `package.json` file. Whenever you change the dependencies of your project, ensure you run the `$ npm run bootstrap` command again. You can find more information in the [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) page.
|
|
9
|
+
Add the package to your `package.json` dependencies. After changing dependencies, run `npm run bootstrap` (or your project's equivalent). See [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) for more information.
|
|
164
10
|
|
|
165
11
|
```json
|
|
166
12
|
{
|
|
167
|
-
...
|
|
168
13
|
"dependencies": {
|
|
169
|
-
...
|
|
170
14
|
"@genesislcap/foundation-filters": "latest"
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
...
|
|
15
|
+
}
|
|
174
16
|
}
|
|
175
17
|
```
|
|
176
18
|
|
|
177
|
-
## [API Docs](./docs/api/index.md)
|
|
178
|
-
|
|
179
19
|
## License
|
|
180
20
|
|
|
181
21
|
Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
|
|
182
22
|
|
|
183
23
|
### Licensed components
|
|
24
|
+
|
|
184
25
|
Genesis low-code platform
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-filters",
|
|
3
3
|
"description": "Genesis Foundation Filters",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.409.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -50,19 +50,19 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@genesislcap/foundation-testing": "14.
|
|
54
|
-
"@genesislcap/genx": "14.
|
|
55
|
-
"@genesislcap/rollup-builder": "14.
|
|
56
|
-
"@genesislcap/ts-builder": "14.
|
|
57
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
58
|
-
"@genesislcap/vite-builder": "14.
|
|
59
|
-
"@genesislcap/webpack-builder": "14.
|
|
53
|
+
"@genesislcap/foundation-testing": "14.409.0",
|
|
54
|
+
"@genesislcap/genx": "14.409.0",
|
|
55
|
+
"@genesislcap/rollup-builder": "14.409.0",
|
|
56
|
+
"@genesislcap/ts-builder": "14.409.0",
|
|
57
|
+
"@genesislcap/uvu-playwright-builder": "14.409.0",
|
|
58
|
+
"@genesislcap/vite-builder": "14.409.0",
|
|
59
|
+
"@genesislcap/webpack-builder": "14.409.0",
|
|
60
60
|
"@types/ua-parser-js": "^0.7.36"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@genesislcap/foundation-comms": "14.
|
|
64
|
-
"@genesislcap/foundation-logger": "14.
|
|
65
|
-
"@genesislcap/foundation-user": "14.
|
|
63
|
+
"@genesislcap/foundation-comms": "14.409.0",
|
|
64
|
+
"@genesislcap/foundation-logger": "14.409.0",
|
|
65
|
+
"@genesislcap/foundation-user": "14.409.0",
|
|
66
66
|
"@microsoft/fast-element": "1.14.0",
|
|
67
67
|
"@microsoft/fast-foundation": "2.50.0",
|
|
68
68
|
"ua-parser-js": "^1.0.32"
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "cbe0459d170f27c35a7de18cec415947aedf4da5"
|
|
79
79
|
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [ClientFilter](./foundation-filters.clientfilter.md) > [filter](./foundation-filters.clientfilter.filter.md)
|
|
4
|
-
|
|
5
|
-
## ClientFilter.filter() method
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
filter(parameters: P): boolean;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>
|
|
16
|
-
|
|
17
|
-
Parameter
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</th><th>
|
|
21
|
-
|
|
22
|
-
Type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</th><th>
|
|
26
|
-
|
|
27
|
-
Description
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</th></tr></thead>
|
|
31
|
-
<tbody><tr><td>
|
|
32
|
-
|
|
33
|
-
parameters
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td><td>
|
|
37
|
-
|
|
38
|
-
P
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</td><td>
|
|
42
|
-
|
|
43
|
-
The filter parameters.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</td></tr>
|
|
47
|
-
</tbody></table>
|
|
48
|
-
|
|
49
|
-
**Returns:**
|
|
50
|
-
|
|
51
|
-
boolean
|
|
52
|
-
|
|
53
|
-
The filter outcome.
|
|
54
|
-
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [ClientFilter](./foundation-filters.clientfilter.md)
|
|
4
|
-
|
|
5
|
-
## ClientFilter interface
|
|
6
|
-
|
|
7
|
-
ClientFilter interface.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export interface ClientFilter<P = any>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Remarks
|
|
16
|
-
|
|
17
|
-
Simplifies access to runtime data / state contained within the DI container.
|
|
18
|
-
|
|
19
|
-
## Methods
|
|
20
|
-
|
|
21
|
-
<table><thead><tr><th>
|
|
22
|
-
|
|
23
|
-
Method
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</th><th>
|
|
27
|
-
|
|
28
|
-
Description
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</th></tr></thead>
|
|
32
|
-
<tbody><tr><td>
|
|
33
|
-
|
|
34
|
-
[filter(parameters)](./foundation-filters.clientfilter.filter.md)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</td><td>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</td></tr>
|
|
41
|
-
</tbody></table>
|
|
42
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [ClientFilterName](./foundation-filters.clientfiltername.md)
|
|
4
|
-
|
|
5
|
-
## ClientFilterName variable
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
**Signature:**
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
ClientFilterName: {
|
|
12
|
-
readonly nodeEnv: "nodeEnv";
|
|
13
|
-
readonly percentage: "percentage";
|
|
14
|
-
readonly timeWindow: "timeWindow";
|
|
15
|
-
readonly urlTargeting: "urlTargeting";
|
|
16
|
-
readonly userAgent: "userAgent";
|
|
17
|
-
readonly userTargeting: "userTargeting";
|
|
18
|
-
}
|
|
19
|
-
```
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [ClientFilterRunner](./foundation-filters.clientfilterrunner.md)
|
|
4
|
-
|
|
5
|
-
## ClientFilterRunner interface
|
|
6
|
-
|
|
7
|
-
ClientFilterRunner DI interface.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export interface ClientFilterRunner
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Methods
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Method
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Description
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th></tr></thead>
|
|
28
|
-
<tbody><tr><td>
|
|
29
|
-
|
|
30
|
-
[run(filters, container)](./foundation-filters.clientfilterrunner.run.md)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</td><td>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td></tr>
|
|
37
|
-
</tbody></table>
|
|
38
|
-
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [ClientFilterRunner](./foundation-filters.clientfilterrunner.md) > [run](./foundation-filters.clientfilterrunner.run.md)
|
|
4
|
-
|
|
5
|
-
## ClientFilterRunner.run() method
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
run(filters: ClientFilterSchemas[], container?: Container): boolean;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>
|
|
16
|
-
|
|
17
|
-
Parameter
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</th><th>
|
|
21
|
-
|
|
22
|
-
Type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</th><th>
|
|
26
|
-
|
|
27
|
-
Description
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</th></tr></thead>
|
|
31
|
-
<tbody><tr><td>
|
|
32
|
-
|
|
33
|
-
filters
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td><td>
|
|
37
|
-
|
|
38
|
-
[ClientFilterSchemas](./foundation-filters.clientfilterschemas.md)<!-- -->\[\]
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</td><td>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</td></tr>
|
|
45
|
-
<tr><td>
|
|
46
|
-
|
|
47
|
-
container
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</td><td>
|
|
51
|
-
|
|
52
|
-
Container
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</td><td>
|
|
56
|
-
|
|
57
|
-
_(Optional)_
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</td></tr>
|
|
61
|
-
</tbody></table>
|
|
62
|
-
|
|
63
|
-
**Returns:**
|
|
64
|
-
|
|
65
|
-
boolean
|
|
66
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [ClientFilterSchema](./foundation-filters.clientfilterschema.md)
|
|
4
|
-
|
|
5
|
-
## ClientFilterSchema type
|
|
6
|
-
|
|
7
|
-
ClientFilterSchema type.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export type ClientFilterSchema<N extends ClientFilterName, P> = {
|
|
13
|
-
readonly name: N;
|
|
14
|
-
readonly parameters: P;
|
|
15
|
-
};
|
|
16
|
-
```
|
|
17
|
-
**References:** [ClientFilterName](./foundation-filters.clientfiltername.md)
|
|
18
|
-
|
|
19
|
-
## Remarks
|
|
20
|
-
|
|
21
|
-
JSON schema type.
|
|
22
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [ClientFilterSchemas](./foundation-filters.clientfilterschemas.md)
|
|
4
|
-
|
|
5
|
-
## ClientFilterSchemas type
|
|
6
|
-
|
|
7
|
-
ClientFilterSchemas type.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export type ClientFilterSchemas = NodeEnvSchema | PercentageSchema | TimeWindowSchema | URLTargetingSchema | UserAgentSchema | UserTargetingSchema;
|
|
13
|
-
```
|
|
14
|
-
**References:** [NodeEnvSchema](./foundation-filters.nodeenvschema.md)<!-- -->, [PercentageSchema](./foundation-filters.percentageschema.md)<!-- -->, [TimeWindowSchema](./foundation-filters.timewindowschema.md)<!-- -->, [URLTargetingSchema](./foundation-filters.urltargetingschema.md)<!-- -->, [UserAgentSchema](./foundation-filters.useragentschema.md)<!-- -->, [UserTargetingSchema](./foundation-filters.usertargetingschema.md)
|
|
15
|
-
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultClientFilterRunner](./foundation-filters.defaultclientfilterrunner.md) > [container](./foundation-filters.defaultclientfilterrunner.container.md)
|
|
4
|
-
|
|
5
|
-
## DefaultClientFilterRunner.container property
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
container: Container;
|
|
11
|
-
```
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultClientFilterRunner](./foundation-filters.defaultclientfilterrunner.md)
|
|
4
|
-
|
|
5
|
-
## DefaultClientFilterRunner class
|
|
6
|
-
|
|
7
|
-
Default ClientFilterRunner DI implementation.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export declare class DefaultClientFilterRunner implements ClientFilterRunner
|
|
13
|
-
```
|
|
14
|
-
**Implements:** [ClientFilterRunner](./foundation-filters.clientfilterrunner.md)
|
|
15
|
-
|
|
16
|
-
## Properties
|
|
17
|
-
|
|
18
|
-
<table><thead><tr><th>
|
|
19
|
-
|
|
20
|
-
Property
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</th><th>
|
|
24
|
-
|
|
25
|
-
Modifiers
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</th><th>
|
|
29
|
-
|
|
30
|
-
Type
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</th><th>
|
|
34
|
-
|
|
35
|
-
Description
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</th></tr></thead>
|
|
39
|
-
<tbody><tr><td>
|
|
40
|
-
|
|
41
|
-
[container](./foundation-filters.defaultclientfilterrunner.container.md)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</td><td>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</td><td>
|
|
48
|
-
|
|
49
|
-
Container
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</td><td>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</td></tr>
|
|
56
|
-
</tbody></table>
|
|
57
|
-
|
|
58
|
-
## Methods
|
|
59
|
-
|
|
60
|
-
<table><thead><tr><th>
|
|
61
|
-
|
|
62
|
-
Method
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</th><th>
|
|
66
|
-
|
|
67
|
-
Modifiers
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</th><th>
|
|
71
|
-
|
|
72
|
-
Description
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</th></tr></thead>
|
|
76
|
-
<tbody><tr><td>
|
|
77
|
-
|
|
78
|
-
[run(filters, container)](./foundation-filters.defaultclientfilterrunner.run.md)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
</td><td>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
</td><td>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</td></tr>
|
|
88
|
-
</tbody></table>
|
|
89
|
-
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-filters](./foundation-filters.md) > [DefaultClientFilterRunner](./foundation-filters.defaultclientfilterrunner.md) > [run](./foundation-filters.defaultclientfilterrunner.run.md)
|
|
4
|
-
|
|
5
|
-
## DefaultClientFilterRunner.run() method
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
run(filters: ClientFilterSchemas[], container?: Container): boolean;
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
|
|
15
|
-
<table><thead><tr><th>
|
|
16
|
-
|
|
17
|
-
Parameter
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</th><th>
|
|
21
|
-
|
|
22
|
-
Type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</th><th>
|
|
26
|
-
|
|
27
|
-
Description
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</th></tr></thead>
|
|
31
|
-
<tbody><tr><td>
|
|
32
|
-
|
|
33
|
-
filters
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td><td>
|
|
37
|
-
|
|
38
|
-
[ClientFilterSchemas](./foundation-filters.clientfilterschemas.md)<!-- -->\[\]
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</td><td>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</td></tr>
|
|
45
|
-
<tr><td>
|
|
46
|
-
|
|
47
|
-
container
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</td><td>
|
|
51
|
-
|
|
52
|
-
Container
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</td><td>
|
|
56
|
-
|
|
57
|
-
_(Optional)_
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</td></tr>
|
|
61
|
-
</tbody></table>
|
|
62
|
-
|
|
63
|
-
**Returns:**
|
|
64
|
-
|
|
65
|
-
boolean
|
|
66
|
-
|