|
2 | 2 | // Licensed under the MIT license. |
3 | 3 |
|
4 | 4 | /** |
5 | | - * SettingSelector is used to select key-values from Azure App Configuration. |
6 | | - * It is used to filter key-values based on keys and labels. |
7 | | - * |
8 | | - * @property keyFilter: |
9 | | - * The key filter to apply when querying Azure App Configuration for key-values. |
10 | | - * An asterisk `*` can be added to the end to return all key-values whose key begins with the key filter. |
11 | | - * e.g. key filter `abc*` returns all key-values whose key starts with `abc`. |
12 | | - * A comma `,` can be used to select multiple key-values. Comma separated filters must exactly match a key to select it. |
13 | | - * Using asterisk to select key-values that begin with a key filter while simultaneously using comma separated key filters is not supported. |
14 | | - * E.g. the key filter `abc*,def` is not supported. The key filters `abc*` and `abc,def` are supported. |
15 | | - * For all other cases the characters: asterisk `*`, comma `,`, and backslash `\` are reserved. Reserved characters must be escaped using a backslash (\). |
16 | | - * e.g. the key filter `a\\b\,\*c*` returns all key-values whose key starts with `a\b,*c`. |
17 | | - * |
18 | | - * @property labelFilter: |
19 | | - * The label filter to apply when querying Azure App Configuration for key-values. |
20 | | - * By default, the "null label" will be used, matching key-values without a label. |
21 | | - * The characters asterisk `*` and comma `,` are not supported. |
22 | | - * Backslash `\` character is reserved and must be escaped using another backslash `\`. |
| 5 | + * SettingSelector is used to select key-values from Azure App Configuration based on keys and labels. |
23 | 6 | */ |
24 | | -export type SettingSelector = { keyFilter: string, labelFilter?: string }; |
| 7 | +export type SettingSelector = { |
| 8 | + /** |
| 9 | + * The key filter to apply when querying Azure App Configuration for key-values. |
| 10 | + * |
| 11 | + * @remarks |
| 12 | + * An asterisk `*` can be added to the end to return all key-values whose key begins with the key filter. |
| 13 | + * e.g. key filter `abc*` returns all key-values whose key starts with `abc`. |
| 14 | + * A comma `,` can be used to select multiple key-values. Comma separated filters must exactly match a key to select it. |
| 15 | + * Using asterisk to select key-values that begin with a key filter while simultaneously using comma separated key filters is not supported. |
| 16 | + * E.g. the key filter `abc*,def` is not supported. The key filters `abc*` and `abc,def` are supported. |
| 17 | + * For all other cases the characters: asterisk `*`, comma `,`, and backslash `\` are reserved. Reserved characters must be escaped using a backslash (\). |
| 18 | + * e.g. the key filter `a\\b\,\*c*` returns all key-values whose key starts with `a\b,*c`. |
| 19 | + */ |
| 20 | + keyFilter: string, |
| 21 | + |
| 22 | + /** |
| 23 | + * The label filter to apply when querying Azure App Configuration for key-values. |
| 24 | + * |
| 25 | + * @remarks |
| 26 | + * By default, the "null label" will be used, matching key-values without a label. |
| 27 | + * The characters asterisk `*` and comma `,` are not supported. |
| 28 | + * Backslash `\` character is reserved and must be escaped using another backslash `\`. |
| 29 | + */ |
| 30 | + labelFilter?: string |
| 31 | +}; |
25 | 32 |
|
26 | 33 | /** |
27 | 34 | * KeyFilter is used to filter key-values based on keys. |
28 | | - * |
29 | | - * @property Any: |
30 | | - * Matches all key-values. |
31 | 35 | */ |
32 | 36 | export enum KeyFilter { |
| 37 | + /** |
| 38 | + * Matches all key-values. |
| 39 | + */ |
33 | 40 | Any = "*" |
34 | 41 | } |
35 | 42 |
|
36 | 43 | /** |
37 | 44 | * LabelFilter is used to filter key-values based on labels. |
38 | | - * |
39 | | - * @property Null: |
40 | | - * Matches key-values without a label. |
41 | 45 | */ |
42 | 46 | export enum LabelFilter { |
| 47 | + /** |
| 48 | + * Matches key-values without a label. |
| 49 | + */ |
43 | 50 | Null = "\0" |
44 | 51 | } |
0 commit comments