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.
Files changed (84) hide show
  1. package/README.md +60 -3
  2. package/dist/_virtual/_rolldown/runtime.mjs +13 -0
  3. package/dist/categories.d.mts +249 -0
  4. package/dist/categories.mjs +259 -0
  5. package/dist/constants.d.mts +14 -0
  6. package/dist/constants.mjs +18 -1
  7. package/dist/errors.d.mts +23 -0
  8. package/dist/{utilities.mjs → errors.mjs} +33 -84
  9. package/dist/fetchers/gallery.mjs +15 -51
  10. package/dist/fetchers/item-children.mjs +20 -66
  11. package/dist/fetchers/item-links.mjs +26 -79
  12. package/dist/fetchers/item-ocr-data.d.mts +2 -2
  13. package/dist/fetchers/item-ocr-data.mjs +11 -15
  14. package/dist/fetchers/item.d.mts +0 -15
  15. package/dist/fetchers/item.mjs +20 -72
  16. package/dist/fetchers/request.d.mts +70 -0
  17. package/dist/fetchers/request.mjs +100 -0
  18. package/dist/fetchers/set/items.mjs +27 -73
  19. package/dist/fetchers/set/property-values.d.mts +2 -3
  20. package/dist/fetchers/set/property-values.mjs +96 -130
  21. package/dist/fetchers/website-metadata.mjs +35 -57
  22. package/dist/fetchers/website.d.mts +2 -3
  23. package/dist/fetchers/website.mjs +22 -31
  24. package/dist/getters.d.mts +86 -145
  25. package/dist/getters.mjs +136 -207
  26. package/dist/helpers.d.mts +0 -4
  27. package/dist/helpers.mjs +19 -6
  28. package/dist/index.d.mts +8 -6
  29. package/dist/index.mjs +6 -4
  30. package/dist/ocr.d.mts +37 -0
  31. package/dist/ocr.mjs +52 -0
  32. package/dist/parsers/helpers.d.mts +21 -1
  33. package/dist/parsers/helpers.mjs +26 -6
  34. package/dist/parsers/index.d.mts +0 -8
  35. package/dist/parsers/index.mjs +118 -259
  36. package/dist/parsers/languages.d.mts +72 -0
  37. package/dist/parsers/languages.mjs +132 -0
  38. package/dist/parsers/multilingual.d.mts +134 -58
  39. package/dist/parsers/multilingual.mjs +191 -143
  40. package/dist/parsers/property-token.d.mts +34 -0
  41. package/dist/parsers/property-token.mjs +29 -0
  42. package/dist/parsers/string.d.mts +19 -0
  43. package/dist/parsers/string.mjs +45 -25
  44. package/dist/parsers/website/bounds.d.mts +10 -0
  45. package/dist/parsers/website/bounds.mjs +28 -0
  46. package/dist/parsers/website/components.d.mts +91 -0
  47. package/dist/parsers/website/components.mjs +681 -0
  48. package/dist/parsers/website/index.d.mts +0 -7
  49. package/dist/parsers/website/index.mjs +92 -1153
  50. package/dist/parsers/website/links.d.mts +36 -0
  51. package/dist/parsers/website/links.mjs +58 -0
  52. package/dist/parsers/website/messages.d.mts +24 -0
  53. package/dist/parsers/website/messages.mjs +31 -0
  54. package/dist/parsers/website/options.d.mts +6 -0
  55. package/dist/parsers/website/options.mjs +114 -0
  56. package/dist/parsers/website/properties.d.mts +12 -0
  57. package/dist/parsers/website/properties.mjs +158 -0
  58. package/dist/parsers/website/reader.d.mts +54 -4
  59. package/dist/parsers/website/reader.mjs +65 -20
  60. package/dist/parsers/website/slug.d.mts +64 -0
  61. package/dist/parsers/website/slug.mjs +82 -0
  62. package/dist/parsers/website/styles.d.mts +28 -0
  63. package/dist/parsers/website/styles.mjs +103 -0
  64. package/dist/parsers/website/walk.d.mts +68 -0
  65. package/dist/parsers/website/walk.mjs +116 -0
  66. package/dist/query.d.mts +66 -21
  67. package/dist/query.mjs +178 -44
  68. package/dist/reflection.d.mts +64 -0
  69. package/dist/reflection.mjs +79 -0
  70. package/dist/schemas.d.mts +7 -0
  71. package/dist/schemas.mjs +12 -3
  72. package/dist/types/index.d.mts +31 -31
  73. package/dist/types/utilities.d.mts +9 -0
  74. package/dist/types/utilities.mjs +1 -0
  75. package/dist/types/website.d.mts +54 -58
  76. package/dist/xml/metadata.d.mts +16 -0
  77. package/dist/xml/metadata.mjs +32 -11
  78. package/dist/xml/schemas.d.mts +5970 -3
  79. package/dist/xml/schemas.mjs +43 -45
  80. package/dist/xml/types.d.mts +14 -30
  81. package/dist/xquery.d.mts +46 -0
  82. package/dist/xquery.mjs +66 -0
  83. package/package.json +3 -3
  84. package/dist/utilities.d.mts +0 -54
@@ -1,4 +1,4 @@
1
- import { LanguageCodes, Property, PropertyLike, PropertyValueContent, SetItemProperty, SetItemSimplifiedProperty, SimplifiedProperty } from "./types/index.mjs";
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
- * Finds a property by its variable UUID in an array of properties.
20
- *
21
- * @param properties - Array of properties to search through
22
- * @param variableUuid - The property variable UUID to search for
23
- * @param options - Search options, including whether to include nested properties
24
- * @returns The matching Property object, or null if not found
25
- */
26
- export declare function getPropertyByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableUuid: string, options?: PropertyOptions): Property<T> | null;
27
- export declare function getPropertyByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemProperty<T>>, variableUuid: string, options?: PropertyOptions): SetItemProperty<T> | null;
28
- export declare function getPropertyByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SimplifiedProperty<T>>, variableUuid: string, options?: PropertyOptions): SimplifiedProperty<T> | null;
29
- export declare function getPropertyByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SetItemSimplifiedProperty<T>>, variableUuid: string, options?: PropertyOptions): SetItemSimplifiedProperty<T> | null;
30
- /**
31
- * Retrieves all values for a property with the given variable UUID.
32
- *
33
- * @param properties - Array of properties to search through
34
- * @param variableUuid - The property variable UUID to search for
35
- * @param options - Search options, including whether to include nested properties
36
- * @returns Array of property values, or null if property not found
37
- */
38
- export declare function getPropertyValuesByVariableUuid<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableUuid: string, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
39
- /**
40
- * Retrieves all value contents for a property with the given variable UUID.
41
- *
42
- * @param properties - Array of properties to search through
43
- * @param variableUuid - The property variable UUID to search for
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
- * Finds a property by its variable label and one value.
47
+ * Normalize an OCHRE property variable label for comparison
106
48
  *
107
- * @param properties - Array of properties to search through
108
- * @param variableLabel - The property variable label to search for
109
- * @param value - The property value to search for
110
- * @param options - Search options, including whether to include nested properties
111
- * @returns The matching Property object, or null if not found or value does not match
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 getPropertyByVariableLabelAndValue<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableLabel: string, value: PropertyValueContent<T>, options?: PropertyOptions): Property<T> | null;
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
- * Finds a property by its variable label and one value content.
57
+ * Keep only the leaf values from an array of property values
119
58
  *
120
- * @param properties - Array of properties to search through
121
- * @param variableLabel - The property variable label to search for
122
- * @param valueContent - The value content to search for
123
- * @param options - Search options, including whether to include nested properties
124
- * @returns The matching Property object, or null if not found or value content does not match
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 getPropertyByVariableLabelAndValueContent<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<Property<T>>, variableLabel: string, valueContent: PropertyContent<T>, options?: PropertyOptions): Property<T> | null;
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
- * Retrieves all values for a property with the given variable label.
68
+ * Find the property a selector names
132
69
  *
133
- * @param properties - Array of properties to search through
134
- * @param variableLabel - The property variable label to search for
135
- * @param options - Search options, including whether to include nested properties
136
- * @returns Array of property values, or null if property not found
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 getPropertyValuesByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableLabel: string, options?: PropertyOptions): Array<PropertyValueContent<T>> | null;
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
- * Gets the first value of a property with the given variable label.
141
- *
142
- * @param properties - Array of properties to search through
143
- * @param variableLabel - The property variable label to search for
144
- * @param options - Search options, including whether to include nested properties
145
- * @returns The first property value, or null if property not found
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 getPropertyValueByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableLabel: string, options?: PropertyOptions): PropertyValueContent<T> | null;
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
- * Gets the first value content of a property with the given variable label.
150
- *
151
- * @param properties - Array of properties to search through
152
- * @param variableLabel - The property variable label to search for
153
- * @param options - Search options, including whether to include nested properties
154
- * @returns The first property value content, or null if property not found
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 getPropertyValueContentByVariableLabel<T extends LanguageCodes = LanguageCodes>(properties: ReadonlyArray<SearchableProperty<T>>, variableLabel: string, options?: PropertyOptions): PropertyContent<T> | null;
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, including whether to include nested properties
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<Property<T>>, options?: PropertyOptions): Array<Property<T>>;
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, including whether to include nested properties
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
- * Get the leaf property values from an array of property values.
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
- * @param property - The property to filter
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, including whether to include nested properties
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 filterProperties<T extends LanguageCodes = LanguageCodes>(property: SearchableProperty<T>, filter: {
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;