ochre-sdk 1.0.79 → 1.1.1
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 +60 -3
- package/dist/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/categories.d.mts +249 -0
- package/dist/categories.mjs +259 -0
- package/dist/constants.d.mts +14 -0
- package/dist/constants.mjs +18 -1
- package/dist/errors.d.mts +23 -0
- package/dist/{utilities.mjs → errors.mjs} +33 -84
- package/dist/fetchers/gallery.mjs +15 -51
- package/dist/fetchers/item-children.mjs +20 -66
- package/dist/fetchers/item-links.mjs +26 -79
- package/dist/fetchers/item-ocr-data.d.mts +2 -2
- package/dist/fetchers/item-ocr-data.mjs +11 -15
- package/dist/fetchers/item.d.mts +0 -15
- package/dist/fetchers/item.mjs +20 -72
- package/dist/fetchers/request.d.mts +70 -0
- package/dist/fetchers/request.mjs +100 -0
- package/dist/fetchers/set/items.mjs +27 -73
- package/dist/fetchers/set/property-values.d.mts +2 -3
- package/dist/fetchers/set/property-values.mjs +96 -130
- package/dist/fetchers/website-metadata.mjs +35 -57
- package/dist/fetchers/website.d.mts +2 -3
- package/dist/fetchers/website.mjs +22 -31
- package/dist/getters.d.mts +86 -145
- package/dist/getters.mjs +136 -207
- package/dist/helpers.d.mts +0 -4
- package/dist/helpers.mjs +19 -6
- package/dist/index.d.mts +8 -6
- package/dist/index.mjs +6 -4
- package/dist/ocr.d.mts +37 -0
- package/dist/ocr.mjs +52 -0
- package/dist/parsers/helpers.d.mts +21 -1
- package/dist/parsers/helpers.mjs +26 -6
- package/dist/parsers/index.d.mts +0 -8
- package/dist/parsers/index.mjs +118 -259
- package/dist/parsers/languages.d.mts +72 -0
- package/dist/parsers/languages.mjs +132 -0
- package/dist/parsers/multilingual.d.mts +134 -58
- package/dist/parsers/multilingual.mjs +191 -143
- package/dist/parsers/property-token.d.mts +34 -0
- package/dist/parsers/property-token.mjs +29 -0
- package/dist/parsers/string.d.mts +19 -0
- package/dist/parsers/string.mjs +45 -25
- package/dist/parsers/website/bounds.d.mts +10 -0
- package/dist/parsers/website/bounds.mjs +28 -0
- package/dist/parsers/website/components.d.mts +91 -0
- package/dist/parsers/website/components.mjs +681 -0
- package/dist/parsers/website/index.d.mts +0 -7
- package/dist/parsers/website/index.mjs +92 -1153
- package/dist/parsers/website/links.d.mts +36 -0
- package/dist/parsers/website/links.mjs +58 -0
- package/dist/parsers/website/messages.d.mts +24 -0
- package/dist/parsers/website/messages.mjs +31 -0
- package/dist/parsers/website/options.d.mts +6 -0
- package/dist/parsers/website/options.mjs +114 -0
- package/dist/parsers/website/properties.d.mts +12 -0
- package/dist/parsers/website/properties.mjs +158 -0
- package/dist/parsers/website/reader.d.mts +54 -4
- package/dist/parsers/website/reader.mjs +65 -20
- package/dist/parsers/website/slug.d.mts +64 -0
- package/dist/parsers/website/slug.mjs +82 -0
- package/dist/parsers/website/styles.d.mts +28 -0
- package/dist/parsers/website/styles.mjs +103 -0
- package/dist/parsers/website/walk.d.mts +68 -0
- package/dist/parsers/website/walk.mjs +116 -0
- package/dist/query.d.mts +66 -21
- package/dist/query.mjs +178 -44
- package/dist/reflection.d.mts +64 -0
- package/dist/reflection.mjs +79 -0
- package/dist/schemas.d.mts +7 -0
- package/dist/schemas.mjs +12 -3
- package/dist/types/index.d.mts +31 -31
- package/dist/types/utilities.d.mts +9 -0
- package/dist/types/utilities.mjs +1 -0
- package/dist/types/website.d.mts +54 -58
- package/dist/xml/metadata.d.mts +16 -0
- package/dist/xml/metadata.mjs +32 -11
- package/dist/xml/schemas.d.mts +5970 -3
- package/dist/xml/schemas.mjs +43 -45
- package/dist/xml/types.d.mts +14 -30
- package/dist/xquery.d.mts +46 -0
- package/dist/xquery.mjs +66 -0
- package/package.json +3 -3
- package/dist/utilities.d.mts +0 -54
package/dist/getters.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LanguageCodes,
|
|
1
|
+
import { LanguageCodes, PropertyLike, PropertyValueContent } from "./types/index.mjs";
|
|
2
2
|
//#region src/getters.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Options for property search operations.
|
|
@@ -9,188 +9,129 @@ export type PropertyOptions = {
|
|
|
9
9
|
*/
|
|
10
10
|
includeNestedProperties?: boolean;
|
|
11
11
|
/**
|
|
12
|
-
Whether to limit property values to leaf values.
|
|
12
|
+
Whether to limit property values to leaf values. Applies to the value
|
|
13
|
+
lookups; {@link getProperty} and {@link getUniqueProperties} always return a
|
|
14
|
+
property exactly as it was found.
|
|
13
15
|
*/
|
|
14
16
|
limitToLeafPropertyValues?: boolean;
|
|
15
17
|
};
|
|
16
18
|
type PropertyContent<T extends LanguageCodes> = PropertyValueContent<T>["content"];
|
|
17
19
|
type SearchableProperty<T extends LanguageCodes> = PropertyLike<T>;
|
|
18
20
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* @param options - Search options, including whether to include nested properties
|
|
45
|
-
* @returns Array of property value contents, or null if property not found
|
|
46
|
-
*/
|
|
47
|
-
export declare function getPropertyValueContentsByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): Array<PropertyContent<T>> | null;
|
|
48
|
-
/**
|
|
49
|
-
* Gets the first value of a property with the given variable UUID.
|
|
50
|
-
*
|
|
51
|
-
* @param properties - Array of properties to search through
|
|
52
|
-
* @param variableUuid - The property variable UUID to search for
|
|
53
|
-
* @param options - Search options, including whether to include nested properties
|
|
54
|
-
* @returns The first property value, or null if property not found
|
|
55
|
-
*/
|
|
56
|
-
export declare function getPropertyValueByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): PropertyValueContent<T> | null;
|
|
57
|
-
/**
|
|
58
|
-
* Gets the first value content of a property with the given variable UUID.
|
|
59
|
-
*
|
|
60
|
-
* @param properties - Array of properties to search through
|
|
61
|
-
* @param variableUuid - The property variable UUID to search for
|
|
62
|
-
* @param options - Search options, including whether to include nested properties
|
|
63
|
-
* @returns The first property value content, or null if property not found
|
|
64
|
-
*/
|
|
65
|
-
export declare function getPropertyValueContentByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): PropertyContent<T> | null;
|
|
66
|
-
/**
|
|
67
|
-
* Finds a property by its variable label in an array of properties.
|
|
68
|
-
*
|
|
69
|
-
* @param properties - Array of properties to search through
|
|
70
|
-
* @param variableLabel - The property variable label to search for
|
|
71
|
-
* @param options - Search options, including whether to include nested properties
|
|
72
|
-
* @returns The matching Property object, or null if not found
|
|
73
|
-
*/
|
|
74
|
-
export declare function getPropertyByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableLabel: string, options?: PropertyOptions): Property<T> | null;
|
|
75
|
-
export declare function getPropertyByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableLabel: string, options?: PropertyOptions): SetItemProperty<T> | null;
|
|
76
|
-
export declare function getPropertyByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, options?: PropertyOptions): SimplifiedProperty<T> | null;
|
|
77
|
-
export declare function getPropertyByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableLabel: string, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
|
|
78
|
-
/**
|
|
79
|
-
* Finds a property by its variable label and all values.
|
|
80
|
-
*
|
|
81
|
-
* @param properties - Array of properties to search through
|
|
82
|
-
* @param variableLabel - The property variable label to search for
|
|
83
|
-
* @param values - The property values to search for
|
|
84
|
-
* @param options - Search options, including whether to include nested properties
|
|
85
|
-
* @returns The matching Property object, or null if not found or all values do not match
|
|
86
|
-
*/
|
|
87
|
-
export declare function getPropertyByVariableLabelAndValues<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): Property<T> | null;
|
|
88
|
-
export declare function getPropertyByVariableLabelAndValues<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SetItemProperty<T> | null;
|
|
89
|
-
export declare function getPropertyByVariableLabelAndValues<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SimplifiedProperty<T> | null;
|
|
90
|
-
export declare function getPropertyByVariableLabelAndValues<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableLabel: string, values: ReadonlyArray<PropertyValueContent<T>>, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
|
|
91
|
-
/**
|
|
92
|
-
* Finds a property by its variable label and all value contents.
|
|
93
|
-
*
|
|
94
|
-
* @param properties - Array of properties to search through
|
|
95
|
-
* @param variableLabel - The property variable label to search for
|
|
96
|
-
* @param valueContents - The value contents to search for
|
|
97
|
-
* @param options - Search options, including whether to include nested properties
|
|
98
|
-
* @returns The matching Property object, or null if not found or all value contents do not match
|
|
99
|
-
*/
|
|
100
|
-
export declare function getPropertyByVariableLabelAndValueContents<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): Property<T> | null;
|
|
101
|
-
export declare function getPropertyByVariableLabelAndValueContents<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SetItemProperty<T> | null;
|
|
102
|
-
export declare function getPropertyByVariableLabelAndValueContents<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SimplifiedProperty<T> | null;
|
|
103
|
-
export declare function getPropertyByVariableLabelAndValueContents<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableLabel: string, valueContents: ReadonlyArray<PropertyContent<T>>, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
|
|
21
|
+
* Which property to look for
|
|
22
|
+
*
|
|
23
|
+
* A property is named either by its variable UUID or by its variable label, and
|
|
24
|
+
* a label can be narrowed further by the values the property carries. The value
|
|
25
|
+
* forms differ in what they compare: `values` and `valueContents` require the
|
|
26
|
+
* property to carry exactly that sequence, while `value` and `valueContent`
|
|
27
|
+
* only require it to carry that one among others.
|
|
28
|
+
*/
|
|
29
|
+
export type PropertySelector<T extends LanguageCodes = LanguageCodes> = {
|
|
30
|
+
uuid: string;
|
|
31
|
+
} | {
|
|
32
|
+
label: string;
|
|
33
|
+
} | {
|
|
34
|
+
label: string;
|
|
35
|
+
values: ReadonlyArray<PropertyValueContent<T>>;
|
|
36
|
+
} | {
|
|
37
|
+
label: string;
|
|
38
|
+
valueContents: ReadonlyArray<PropertyContent<T>>;
|
|
39
|
+
} | {
|
|
40
|
+
label: string;
|
|
41
|
+
value: PropertyValueContent<T>;
|
|
42
|
+
} | {
|
|
43
|
+
label: string;
|
|
44
|
+
valueContent: PropertyContent<T>;
|
|
45
|
+
};
|
|
104
46
|
/**
|
|
105
|
-
*
|
|
47
|
+
* Normalize an OCHRE property variable label for comparison
|
|
106
48
|
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* @param
|
|
111
|
-
* @returns The
|
|
49
|
+
* OCHRE varies the casing and the word separator of a property label, so every
|
|
50
|
+
* comparison against a label goes through here. This is the only rule in the
|
|
51
|
+
* SDK for deciding whether a label names a given property.
|
|
52
|
+
* @param value - The label to normalize
|
|
53
|
+
* @returns The normalized label
|
|
112
54
|
*/
|
|
113
|
-
export declare function
|
|
114
|
-
export declare function getPropertyByVariableLabelAndValue<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): SetItemProperty<T> | null;
|
|
115
|
-
export declare function getPropertyByVariableLabelAndValue<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): SimplifiedProperty<T> | null;
|
|
116
|
-
export declare function getPropertyByVariableLabelAndValue<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
|
|
55
|
+
export declare function normalizePropertyVariableLabel(value: string): string;
|
|
117
56
|
/**
|
|
118
|
-
*
|
|
57
|
+
* Keep only the leaf values from an array of property values
|
|
119
58
|
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* @
|
|
59
|
+
* OCHRE property values form a hierarchy, and a value with children is usually
|
|
60
|
+
* a grouping rather than something to show. This asks that of a values array
|
|
61
|
+
* the caller already holds; the same filter is available on the lookups
|
|
62
|
+
* through `limitToLeafPropertyValues`.
|
|
63
|
+
* @param propertyValues - The values to filter
|
|
64
|
+
* @returns The values that have no children
|
|
125
65
|
*/
|
|
126
|
-
export declare function
|
|
127
|
-
export declare function getPropertyByVariableLabelAndValueContent<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SetItemProperty<T> | null;
|
|
128
|
-
export declare function getPropertyByVariableLabelAndValueContent<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SimplifiedProperty<T> | null;
|
|
129
|
-
export declare function getPropertyByVariableLabelAndValueContent<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
|
|
66
|
+
export declare function getLeafPropertyValues<T extends LanguageCodes = LanguageCodes>(propertyValues: ReadonlyArray<PropertyValueContent<T>>): Array<PropertyValueContent<T>>;
|
|
130
67
|
/**
|
|
131
|
-
*
|
|
68
|
+
* Find the property a selector names
|
|
132
69
|
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* @
|
|
136
|
-
* @
|
|
70
|
+
* The property is returned exactly as it was found, so its `values` are
|
|
71
|
+
* whatever the item carries and `limitToLeafPropertyValues` does not apply.
|
|
72
|
+
* Use {@link getPropertyValues} when leaf filtering matters.
|
|
73
|
+
* @param properties - The properties to search
|
|
74
|
+
* @param selector - Which property to look for
|
|
75
|
+
* @param options - Search options
|
|
76
|
+
* @param options.includeNestedProperties - Whether to descend into nested properties
|
|
77
|
+
* @returns The matching property, or null when there is none
|
|
137
78
|
*/
|
|
138
|
-
export declare function
|
|
79
|
+
export declare function getProperty<T extends LanguageCodes = LanguageCodes, TProperty extends PropertyLike<T> = PropertyLike<T>>(properties: ReadonlyArray<TProperty>, selector: PropertySelector<T>, options?: PropertyOptions): TProperty | null;
|
|
139
80
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* @param
|
|
143
|
-
* @param
|
|
144
|
-
* @param options -
|
|
145
|
-
* @
|
|
81
|
+
* Read every value of the property a selector names
|
|
82
|
+
* @param properties - The properties to search
|
|
83
|
+
* @param selector - Which property to look for
|
|
84
|
+
* @param options - Search options
|
|
85
|
+
* @param options.includeNestedProperties - Whether to descend into nested properties
|
|
86
|
+
* @param options.limitToLeafPropertyValues - Whether to keep only leaf values
|
|
87
|
+
* @returns The values, or null when no property matched
|
|
146
88
|
*/
|
|
147
|
-
export declare function
|
|
89
|
+
export declare function getPropertyValues<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, selector: PropertySelector<T>, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
|
|
148
90
|
/**
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* @param
|
|
152
|
-
* @param
|
|
153
|
-
* @param options -
|
|
154
|
-
* @
|
|
91
|
+
* Read the first value of the property a selector names
|
|
92
|
+
* @param properties - The properties to search
|
|
93
|
+
* @param selector - Which property to look for
|
|
94
|
+
* @param options - Search options
|
|
95
|
+
* @param options.includeNestedProperties - Whether to descend into nested properties
|
|
96
|
+
* @param options.limitToLeafPropertyValues - Whether to keep only leaf values
|
|
97
|
+
* @returns The first value, or null when no property matched or it has none
|
|
155
98
|
*/
|
|
156
|
-
export declare function
|
|
99
|
+
export declare function getPropertyValue<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, selector: PropertySelector<T>, options?: PropertyOptions): PropertyValueContent<T> | null;
|
|
157
100
|
/**
|
|
158
101
|
* Gets all unique properties from an array of properties.
|
|
159
102
|
*
|
|
103
|
+
* Properties are returned exactly as they were found, deduplicated by variable
|
|
104
|
+
* UUID, keeping the first occurrence.
|
|
160
105
|
* @param properties - Array of properties to get unique properties from
|
|
161
|
-
* @param options - Search options
|
|
106
|
+
* @param options - Search options
|
|
107
|
+
* @param options.includeNestedProperties - Whether to descend into nested properties
|
|
162
108
|
* @returns Array of unique properties
|
|
163
109
|
*/
|
|
164
|
-
export declare function getUniqueProperties<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<
|
|
165
|
-
export declare function getUniqueProperties<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, options?: PropertyOptions): Array<SetItemProperty<T>>;
|
|
166
|
-
export declare function getUniqueProperties<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, options?: PropertyOptions): Array<SimplifiedProperty<T>>;
|
|
167
|
-
export declare function getUniqueProperties<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, options?: PropertyOptions): Array<SetItemSimplifiedProperty<T>>;
|
|
110
|
+
export declare function getUniqueProperties<T extends LanguageCodes = LanguageCodes, TProperty extends PropertyLike<T> = PropertyLike<T>>(properties: ReadonlyArray<TProperty>, options?: PropertyOptions): Array<TProperty>;
|
|
168
111
|
/**
|
|
169
112
|
* Gets all unique property variable labels from an array of properties.
|
|
170
|
-
*
|
|
171
113
|
* @param properties - Array of properties to get unique property variable labels from
|
|
172
|
-
* @param options - Search options
|
|
114
|
+
* @param options - Search options
|
|
115
|
+
* @param options.includeNestedProperties - Whether to descend into nested properties
|
|
173
116
|
* @returns Array of unique property variable labels
|
|
174
117
|
*/
|
|
175
118
|
export declare function getUniquePropertyVariableLabels<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, options?: PropertyOptions): Array<string>;
|
|
176
119
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
* @param propertyValues - The array of property values to get the leaf property values from
|
|
180
|
-
* @returns The array of leaf property values
|
|
181
|
-
*/
|
|
182
|
-
export declare function getLeafPropertyValues<T extends LanguageCodes = LanguageCodes>(propertyValues: ReadonlyArray<PropertyValueContent<T>>): Array<PropertyValueContent<T>>;
|
|
183
|
-
/**
|
|
184
|
-
* Filters a property based on a variable label and value content criterion.
|
|
120
|
+
* Whether a property matches a variable label and value content criterion.
|
|
185
121
|
*
|
|
186
|
-
*
|
|
122
|
+
* Matching is client-side and deliberately loose: string contents match on a
|
|
123
|
+
* case-insensitive substring, numbers and booleans on equality. A
|
|
124
|
+
* `variableLabel` of "all fields" matches against every property.
|
|
125
|
+
* @param property - The property to test
|
|
187
126
|
* @param filter - Filter criteria containing variable label and value to match
|
|
188
127
|
* @param filter.variableLabel - The variable label to filter by
|
|
189
128
|
* @param filter.value - The value to filter by
|
|
190
|
-
* @param options - Search options
|
|
129
|
+
* @param options - Search options
|
|
130
|
+
* @param options.includeNestedProperties - Whether to descend into nested properties
|
|
131
|
+
* @param options.limitToLeafPropertyValues - Whether to test only leaf values
|
|
191
132
|
* @returns True if the property matches the filter criteria, false otherwise
|
|
192
133
|
*/
|
|
193
|
-
export declare function
|
|
134
|
+
export declare function isPropertyMatchingFilter<T extends LanguageCodes = LanguageCodes>(property: SearchableProperty<T>, filter: {
|
|
194
135
|
variableLabel: string;
|
|
195
136
|
value: PropertyValueContent<T>;
|
|
196
137
|
}, options?: PropertyOptions): boolean;
|