ochre-sdk 1.3.25 → 1.3.26

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 (97) hide show
  1. package/dist/categories.d.mts +56 -56
  2. package/dist/categories.mjs +39 -39
  3. package/dist/constants.d.mts +8 -8
  4. package/dist/constants.mjs +6 -6
  5. package/dist/errors.d.mts +12 -12
  6. package/dist/errors.mjs +22 -23
  7. package/dist/fetchers/container-items.d.mts +28 -28
  8. package/dist/fetchers/container-items.mjs +27 -27
  9. package/dist/fetchers/gallery.d.mts +13 -13
  10. package/dist/fetchers/gallery.mjs +2 -2
  11. package/dist/fetchers/item-children.d.mts +12 -12
  12. package/dist/fetchers/item-children.mjs +2 -2
  13. package/dist/fetchers/item-links.d.mts +10 -10
  14. package/dist/fetchers/item-links.mjs +6 -6
  15. package/dist/fetchers/item-locations.d.mts +20 -20
  16. package/dist/fetchers/item-locations.mjs +3 -3
  17. package/dist/fetchers/item-ocr-data.d.mts +23 -23
  18. package/dist/fetchers/item-ocr-data.mjs +44 -44
  19. package/dist/fetchers/item.d.mts +14 -14
  20. package/dist/fetchers/item.mjs +14 -14
  21. package/dist/fetchers/map-layers.d.mts +15 -15
  22. package/dist/fetchers/map-layers.mjs +12 -11
  23. package/dist/fetchers/request.d.mts +40 -40
  24. package/dist/fetchers/request.mjs +37 -37
  25. package/dist/fetchers/set/items.d.mts +15 -15
  26. package/dist/fetchers/set/items.mjs +1 -1
  27. package/dist/fetchers/set/property-values.d.mts +16 -16
  28. package/dist/fetchers/set/property-values.mjs +43 -43
  29. package/dist/fetchers/tree/items.d.mts +27 -27
  30. package/dist/fetchers/tree/items.mjs +1 -1
  31. package/dist/fetchers/website-metadata.d.mts +4 -4
  32. package/dist/fetchers/website-metadata.mjs +9 -9
  33. package/dist/fetchers/website.d.mts +10 -10
  34. package/dist/fetchers/website.mjs +12 -12
  35. package/dist/getters.d.mts +83 -83
  36. package/dist/getters.mjs +74 -74
  37. package/dist/helpers.d.mts +4 -4
  38. package/dist/helpers.mjs +7 -7
  39. package/dist/index.d.mts +3 -3
  40. package/dist/index.mjs +5 -5
  41. package/dist/languages.d.mts +58 -58
  42. package/dist/languages.mjs +21 -21
  43. package/dist/ocr.d.mts +27 -27
  44. package/dist/ocr.mjs +29 -29
  45. package/dist/parsers/helpers.d.mts +23 -23
  46. package/dist/parsers/helpers.mjs +8 -8
  47. package/dist/parsers/index.d.mts +2 -2
  48. package/dist/parsers/index.mjs +15 -15
  49. package/dist/parsers/languages.d.mts +49 -49
  50. package/dist/parsers/languages.mjs +49 -49
  51. package/dist/parsers/multilingual.d.mts +174 -174
  52. package/dist/parsers/multilingual.mjs +146 -146
  53. package/dist/parsers/partial-date.d.mts +12 -12
  54. package/dist/parsers/partial-date.mjs +11 -11
  55. package/dist/parsers/property-token.d.mts +20 -20
  56. package/dist/parsers/property-token.mjs +16 -16
  57. package/dist/parsers/string.d.mts +33 -33
  58. package/dist/parsers/string.mjs +62 -64
  59. package/dist/parsers/website/bounds.d.mts +6 -6
  60. package/dist/parsers/website/bounds.mjs +5 -5
  61. package/dist/parsers/website/components.d.mts +50 -31
  62. package/dist/parsers/website/components.mjs +79 -51
  63. package/dist/parsers/website/index.d.mts +1 -1
  64. package/dist/parsers/website/index.mjs +43 -47
  65. package/dist/parsers/website/links.d.mts +24 -24
  66. package/dist/parsers/website/links.mjs +18 -18
  67. package/dist/parsers/website/messages.d.mts +16 -16
  68. package/dist/parsers/website/messages.mjs +14 -14
  69. package/dist/parsers/website/options.d.mts +1 -1
  70. package/dist/parsers/website/properties.d.mts +17 -8
  71. package/dist/parsers/website/properties.mjs +22 -10
  72. package/dist/parsers/website/reader.d.mts +55 -46
  73. package/dist/parsers/website/reader.mjs +64 -46
  74. package/dist/parsers/website/slug.d.mts +50 -50
  75. package/dist/parsers/website/slug.mjs +36 -36
  76. package/dist/parsers/website/styles.d.mts +18 -18
  77. package/dist/parsers/website/styles.mjs +19 -19
  78. package/dist/parsers/website/walk.d.mts +46 -46
  79. package/dist/parsers/website/walk.mjs +34 -34
  80. package/dist/query.d.mts +63 -63
  81. package/dist/query.mjs +137 -140
  82. package/dist/reflection.d.mts +51 -51
  83. package/dist/reflection.mjs +45 -45
  84. package/dist/schemas.d.mts +44 -44
  85. package/dist/schemas.mjs +50 -50
  86. package/dist/types/index.d.mts +192 -192
  87. package/dist/types/utilities.d.mts +5 -5
  88. package/dist/types/website.d.mts +67 -62
  89. package/dist/xml/dates.d.mts +9 -9
  90. package/dist/xml/dates.mjs +9 -9
  91. package/dist/xml/metadata.d.mts +14 -14
  92. package/dist/xml/metadata.mjs +18 -18
  93. package/dist/xml/schemas.mjs +24 -24
  94. package/dist/xml/types.d.mts +9 -9
  95. package/dist/xquery.d.mts +49 -49
  96. package/dist/xquery.mjs +50 -50
  97. package/package.json +10 -10
@@ -1,39 +1,39 @@
1
1
  import { Query } from "./types/index.mjs";
2
2
  import * as v from "valibot";
3
3
  /**
4
- * Validates a pseudo-UUID string
5
- * @param value - The string to validate
6
- * @returns True if the string is a valid pseudo-UUID, false otherwise
7
- * @internal
8
- */
4
+ Validates a pseudo-UUID string
5
+ @param value - The string to validate
6
+ @returns True if the string is a valid pseudo-UUID, false otherwise
7
+ @internal
8
+ */
9
9
  export declare function isPseudoUuid(value: string): boolean;
10
10
  /**
11
- * Schema for validating UUIDs
12
- * @internal
13
- */
11
+ Schema for validating UUIDs
12
+ @internal
13
+ */
14
14
  export declare const uuidSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>;
15
15
  /**
16
- * Schema for validating OCHRE language codes
17
- *
18
- * Rejects standard codes OCHRE does not store, naming the OCHRE code to use
19
- * instead (`per` for ISO 639-3 `fas`).
20
- * @internal
21
- */
16
+ Schema for validating OCHRE language codes
17
+
18
+ Rejects standard codes OCHRE does not store, naming the OCHRE code to use
19
+ instead (`per` for ISO 639-3 `fas`).
20
+ @internal
21
+ */
22
22
  export declare const ochreLanguageCodeSchema: v.SchemaWithPipe<readonly [v.StringSchema<"Language code must be a string">, v.CheckAction<string, (issue: v.CheckIssue<string>) => string>]>;
23
23
  /**
24
- * Valid component types for web elements
25
- * @internal
26
- */
24
+ Valid component types for web elements
25
+ @internal
26
+ */
27
27
  export declare const componentSchema: v.PicklistSchema<readonly ["3d-viewer", "advanced-search", "annotated-document", "annotated-image", "audio-player", "bibliography", "button", "collection", "empty-space", "entries", "iframe", "iiif-viewer", "image", "image-gallery", "map", "query", "search-bar", "table", "text", "timeline", "video"], "Invalid/unknown web element component">;
28
28
  /**
29
- * Valid variants for the "collection" component
30
- * @internal
31
- */
29
+ Valid variants for the "collection" component
30
+ @internal
31
+ */
32
32
  export declare const collectionVariantSchema: v.PicklistSchema<readonly ["slide", "table", "card", "tile", "showcase"], undefined>;
33
33
  /**
34
- * Schema for validating gallery parameters
35
- * @internal
36
- */
34
+ Schema for validating gallery parameters
35
+ @internal
36
+ */
37
37
  export declare const gallerySchema: v.ObjectSchema<{
38
38
  readonly uuid: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>;
39
39
  readonly filter: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
@@ -41,37 +41,37 @@ export declare const gallerySchema: v.ObjectSchema<{
41
41
  readonly perPage: v.SchemaWithPipe<readonly [v.NumberSchema<"Per page must be positive">, v.CheckAction<number, "Per page must be positive">]>;
42
42
  }, undefined>;
43
43
  /**
44
- * Schema for validating and parsing render options
45
- * @internal
46
- */
44
+ Schema for validating and parsing render options
45
+ @internal
46
+ */
47
47
  export declare const renderOptionsSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TransformAction<string, string[]>, v.ArraySchema<v.PicklistSchema<["bold", "italic", "underline"], undefined>, undefined>]>;
48
48
  /**
49
- * Schema for validating the parameters for the Set property values fetching function
50
- * @internal
51
- */
49
+ Schema for validating the parameters for the Set property values fetching function
50
+ @internal
51
+ */
52
52
  export declare const setPropertyValuesParametersSchema: v.ObjectSchema<{
53
53
  readonly setScopeUuids: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>, undefined>, v.MinLengthAction<string[], 1, "At least one set scope UUID is required">]>;
54
54
  readonly belongsToCollectionScopeUuids: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>, undefined>, readonly []>;
55
55
  readonly queries: v.OptionalSchema<v.NullableSchema<v.GenericSchema<unknown, Query>, undefined>, null>;
56
56
  readonly attributes: v.OptionalSchema<v.ObjectSchema<{
57
- readonly bibliographies: v.GenericSchema<unknown, boolean>;
58
- readonly periods: v.GenericSchema<unknown, boolean>;
57
+ readonly bibliographies: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
58
+ readonly periods: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
59
59
  }, undefined>, {
60
60
  readonly bibliographies: false;
61
61
  readonly periods: false;
62
62
  }>;
63
- readonly isLimitedToLeafPropertyValues: v.GenericSchema<unknown, boolean>;
64
- readonly language: v.GenericSchema<unknown, string>;
63
+ readonly isLimitedToLeafPropertyValues: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
64
+ readonly language: v.OptionalSchema<v.StringSchema<undefined>, "eng">;
65
65
  }, undefined>;
66
66
  /**
67
- * Schema for validating the parameters for the item OCR data fetching function
68
- * @internal
69
- */
67
+ Schema for validating the parameters for the item OCR data fetching function
68
+ @internal
69
+ */
70
70
  export declare const itemOcrDataParametersSchema: v.ObjectSchema<{
71
71
  readonly uuid: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>;
72
72
  readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "A search value is required">]>;
73
73
  readonly matchMode: v.OptionalSchema<v.PicklistSchema<["includes", "exact"], undefined>, "includes">;
74
- readonly isCaseSensitive: v.GenericSchema<unknown, boolean>;
74
+ readonly isCaseSensitive: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
75
75
  }, undefined>;
76
76
  export declare const setItemsParametersSchema: v.ObjectSchema<{
77
77
  readonly belongsToCollectionScopeUuids: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>, undefined>, readonly []>;
@@ -81,7 +81,7 @@ export declare const setItemsParametersSchema: v.ObjectSchema<{
81
81
  }, undefined>, v.StrictObjectSchema<{
82
82
  readonly target: v.LiteralSchema<"title", undefined>;
83
83
  readonly direction: v.OptionalSchema<v.PicklistSchema<["asc", "desc"], undefined>, "asc">;
84
- readonly language: v.GenericSchema<unknown, string>;
84
+ readonly language: v.OptionalSchema<v.StringSchema<undefined>, "eng">;
85
85
  }, undefined>, v.StrictObjectSchema<{
86
86
  readonly target: v.LiteralSchema<"date", undefined>;
87
87
  readonly direction: v.OptionalSchema<v.PicklistSchema<["asc", "desc"], undefined>, "asc">;
@@ -90,7 +90,7 @@ export declare const setItemsParametersSchema: v.ObjectSchema<{
90
90
  readonly propertyVariableUuid: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>;
91
91
  readonly dataType: v.PicklistSchema<readonly ["string", "integer", "decimal", "boolean", "date", "dateTime", "time", "IDREF"], undefined>;
92
92
  readonly direction: v.OptionalSchema<v.PicklistSchema<["asc", "desc"], undefined>, "asc">;
93
- readonly language: v.GenericSchema<unknown, string>;
93
+ readonly language: v.OptionalSchema<v.StringSchema<undefined>, "eng">;
94
94
  }, undefined>, v.StrictObjectSchema<{
95
95
  readonly target: v.LiteralSchema<"distance", undefined>;
96
96
  readonly latitude: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -90, undefined>, v.MaxValueAction<number, 90, undefined>]>;
@@ -104,9 +104,9 @@ export declare const setItemsParametersSchema: v.ObjectSchema<{
104
104
  readonly setScopeUuids: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>, undefined>, v.MinLengthAction<string[], 1, "At least one set scope UUID is required">]>;
105
105
  }, undefined>;
106
106
  /**
107
- * Schema for validating the parameters of the item locations fetching function
108
- * @internal
109
- */
107
+ Schema for validating the parameters of the item locations fetching function
108
+ @internal
109
+ */
110
110
  export declare const itemLocationsParametersSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
111
111
  readonly setScopeUuids: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>, undefined>, readonly []>;
112
112
  readonly treeScopeUuids: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>, undefined>, readonly []>;
@@ -130,7 +130,7 @@ export declare const treeItemsParametersSchema: v.ObjectSchema<{
130
130
  }, undefined>, v.StrictObjectSchema<{
131
131
  readonly target: v.LiteralSchema<"title", undefined>;
132
132
  readonly direction: v.OptionalSchema<v.PicklistSchema<["asc", "desc"], undefined>, "asc">;
133
- readonly language: v.GenericSchema<unknown, string>;
133
+ readonly language: v.OptionalSchema<v.StringSchema<undefined>, "eng">;
134
134
  }, undefined>, v.StrictObjectSchema<{
135
135
  readonly target: v.LiteralSchema<"date", undefined>;
136
136
  readonly direction: v.OptionalSchema<v.PicklistSchema<["asc", "desc"], undefined>, "asc">;
@@ -139,7 +139,7 @@ export declare const treeItemsParametersSchema: v.ObjectSchema<{
139
139
  readonly propertyVariableUuid: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid pseudo-UUID">]>;
140
140
  readonly dataType: v.PicklistSchema<readonly ["string", "integer", "decimal", "boolean", "date", "dateTime", "time", "IDREF"], undefined>;
141
141
  readonly direction: v.OptionalSchema<v.PicklistSchema<["asc", "desc"], undefined>, "asc">;
142
- readonly language: v.GenericSchema<unknown, string>;
142
+ readonly language: v.OptionalSchema<v.StringSchema<undefined>, "eng">;
143
143
  }, undefined>, v.StrictObjectSchema<{
144
144
  readonly target: v.LiteralSchema<"distance", undefined>;
145
145
  readonly latitude: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, -90, undefined>, v.MaxValueAction<number, 90, undefined>]>;
package/dist/schemas.mjs CHANGED
@@ -4,29 +4,29 @@ import * as v from "valibot";
4
4
  // src/schemas.ts
5
5
  const PSEUDO_UUID_REGEX = /^[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}$/i;
6
6
  /**
7
- * Validates a pseudo-UUID string
8
- * @param value - The string to validate
9
- * @returns True if the string is a valid pseudo-UUID, false otherwise
10
- * @internal
7
+ Validates a pseudo-UUID string
8
+ @param value - The string to validate
9
+ @returns True if the string is a valid pseudo-UUID, false otherwise
10
+ @internal
11
11
  */
12
12
  function isPseudoUuid(value) {
13
13
  return PSEUDO_UUID_REGEX.test(value);
14
14
  }
15
15
  const positiveNumber = (message) => v.pipe(v.number(), v.minValue(1, message));
16
- const defaultString = (value) => v.optional(v.string(), value);
17
- const defaultBoolean = (value) => v.optional(v.boolean(), value);
16
+ const defaultLanguageSchema = v.optional(v.string(), "eng");
17
+ const defaultFalseSchema = v.optional(v.boolean(), false);
18
18
  const sortDirectionSchema = v.optional(v.picklist(["asc", "desc"]), "asc");
19
19
  /**
20
- * Schema for validating UUIDs
21
- * @internal
20
+ Schema for validating UUIDs
21
+ @internal
22
22
  */
23
23
  const uuidSchema = v.pipe(v.string(), v.check(isPseudoUuid, "Invalid pseudo-UUID"));
24
24
  /**
25
- * Schema for validating OCHRE language codes
26
- *
27
- * Rejects standard codes OCHRE does not store, naming the OCHRE code to use
28
- * instead (`per` for ISO 639-3 `fas`).
29
- * @internal
25
+ Schema for validating OCHRE language codes
26
+
27
+ Rejects standard codes OCHRE does not store, naming the OCHRE code to use
28
+ instead (`per` for ISO 639-3 `fas`).
29
+ @internal
30
30
  */
31
31
  const ochreLanguageCodeSchema = v.pipe(v.string("Language code must be a string"), v.check(isOchreLanguageCode, (issue) => {
32
32
  const input = issue.input;
@@ -34,8 +34,8 @@ const ochreLanguageCodeSchema = v.pipe(v.string("Language code must be a string"
34
34
  return ochreCode == null ? `Unknown OCHRE language code "${input}"` : `Unknown OCHRE language code "${input}"; OCHRE publishes this language as "${ochreCode}"`;
35
35
  }));
36
36
  /**
37
- * Valid component types for web elements
38
- * @internal
37
+ Valid component types for web elements
38
+ @internal
39
39
  */
40
40
  const componentSchema = v.picklist([
41
41
  "3d-viewer",
@@ -61,8 +61,8 @@ const componentSchema = v.picklist([
61
61
  "video"
62
62
  ], "Invalid/unknown web element component");
63
63
  /**
64
- * Valid variants for the "collection" component
65
- * @internal
64
+ Valid variants for the "collection" component
65
+ @internal
66
66
  */
67
67
  const collectionVariantSchema = v.picklist([
68
68
  "slide",
@@ -72,8 +72,8 @@ const collectionVariantSchema = v.picklist([
72
72
  "showcase"
73
73
  ]);
74
74
  /**
75
- * Schema for validating gallery parameters
76
- * @internal
75
+ Schema for validating gallery parameters
76
+ @internal
77
77
  */
78
78
  const gallerySchema = v.object({
79
79
  uuid: v.pipe(v.string(), v.check(isPseudoUuid, "Invalid pseudo-UUID")),
@@ -82,8 +82,8 @@ const gallerySchema = v.object({
82
82
  perPage: v.pipe(v.number("Per page must be positive"), v.check((n) => n > 0, "Per page must be positive"))
83
83
  });
84
84
  /**
85
- * Schema for validating and parsing render options
86
- * @internal
85
+ Schema for validating and parsing render options
86
+ @internal
87
87
  */
88
88
  const renderOptionsSchema = v.pipe(v.string(), v.transform((string) => string.split(" ")), v.array(v.picklist([
89
89
  "bold",
@@ -91,25 +91,25 @@ const renderOptionsSchema = v.pipe(v.string(), v.transform((string) => string.sp
91
91
  "underline"
92
92
  ])));
93
93
  /**
94
- * Schema for validating date data types
95
- * @internal
94
+ Schema for validating date data types
95
+ @internal
96
96
  */
97
97
  const dateDataTypeSchema = v.picklist(["date", "dateTime"]);
98
98
  /**
99
- * Shared schema for query fields
100
- * @internal
99
+ Shared schema for query fields
100
+ @internal
101
101
  */
102
102
  const standardQueryFields = {
103
103
  matchMode: v.picklist(["includes", "exact"]),
104
104
  isCaseSensitive: v.boolean(),
105
- language: defaultString("eng"),
105
+ language: defaultLanguageSchema,
106
106
  fallbackLanguage: v.optional(v.string()),
107
- isNegated: defaultBoolean(false)
107
+ isNegated: defaultFalseSchema
108
108
  };
109
109
  const propertyRelationSchema = v.picklist(["related", "inverse"]);
110
110
  /**
111
- * Shared schema for Set queries
112
- * @internal
111
+ Shared schema for Set queries
112
+ @internal
113
113
  */
114
114
  const setQueryLeafSchema = v.union([
115
115
  v.pipe(v.strictObject({
@@ -191,8 +191,8 @@ const setQueryLeafSchema = v.union([
191
191
  })
192
192
  ]);
193
193
  /**
194
- * Schema for validating Set queries
195
- * @internal
194
+ Schema for validating Set queries
195
+ @internal
196
196
  */
197
197
  const setQuerySchema = v.lazy(() => v.union([
198
198
  setQueryLeafSchema,
@@ -200,20 +200,20 @@ const setQuerySchema = v.lazy(() => v.union([
200
200
  v.strictObject({ or: v.pipe(v.array(setQuerySchema), v.minLength(1, "OR groups must contain at least one query")) })
201
201
  ]));
202
202
  /**
203
- * Schema for validating Set queries
204
- * @internal
203
+ Schema for validating Set queries
204
+ @internal
205
205
  */
206
206
  const setQueriesSchema = v.optional(v.nullable(setQuerySchema), null);
207
207
  /**
208
- * Schema for validating Set items sort
209
- * @internal
208
+ Schema for validating Set items sort
209
+ @internal
210
210
  */
211
211
  const setItemsSortSchema = v.optional(v.variant("target", [
212
212
  v.strictObject({ target: v.literal("none") }),
213
213
  v.strictObject({
214
214
  target: v.literal("title"),
215
215
  direction: sortDirectionSchema,
216
- language: defaultString("eng")
216
+ language: defaultLanguageSchema
217
217
  }),
218
218
  v.strictObject({
219
219
  target: v.literal("date"),
@@ -233,7 +233,7 @@ const setItemsSortSchema = v.optional(v.variant("target", [
233
233
  "IDREF"
234
234
  ]),
235
235
  direction: sortDirectionSchema,
236
- language: defaultString("eng")
236
+ language: defaultLanguageSchema
237
237
  }),
238
238
  v.strictObject({
239
239
  target: v.literal("distance"),
@@ -243,36 +243,36 @@ const setItemsSortSchema = v.optional(v.variant("target", [
243
243
  })
244
244
  ]), { target: "none" });
245
245
  /**
246
- * Schema for validating the parameters for the Set property values fetching function
247
- * @internal
246
+ Schema for validating the parameters for the Set property values fetching function
247
+ @internal
248
248
  */
249
249
  const setPropertyValuesParametersSchema = v.object({
250
250
  setScopeUuids: v.pipe(v.array(uuidSchema), v.minLength(1, "At least one set scope UUID is required")),
251
251
  belongsToCollectionScopeUuids: v.optional(v.array(uuidSchema), []),
252
252
  queries: setQueriesSchema,
253
253
  attributes: v.optional(v.object({
254
- bibliographies: defaultBoolean(false),
255
- periods: defaultBoolean(false)
254
+ bibliographies: defaultFalseSchema,
255
+ periods: defaultFalseSchema
256
256
  }), {
257
257
  bibliographies: false,
258
258
  periods: false
259
259
  }),
260
- isLimitedToLeafPropertyValues: defaultBoolean(false),
261
- language: defaultString("eng")
260
+ isLimitedToLeafPropertyValues: defaultFalseSchema,
261
+ language: defaultLanguageSchema
262
262
  });
263
263
  /**
264
- * Schema for validating the parameters for the item OCR data fetching function
265
- * @internal
264
+ Schema for validating the parameters for the item OCR data fetching function
265
+ @internal
266
266
  */
267
267
  const itemOcrDataParametersSchema = v.object({
268
268
  uuid: uuidSchema,
269
269
  value: v.pipe(v.string(), v.check((value) => value.trim() !== "", "A search value is required")),
270
270
  matchMode: v.optional(v.picklist(["includes", "exact"]), "includes"),
271
- isCaseSensitive: defaultBoolean(false)
271
+ isCaseSensitive: defaultFalseSchema
272
272
  });
273
273
  /**
274
- * Schema for validating Set items parameters
275
- * @internal
274
+ Schema for validating Set items parameters
275
+ @internal
276
276
  */
277
277
  const containerItemsParametersEntries = {
278
278
  belongsToCollectionScopeUuids: v.optional(v.array(uuidSchema), []),
@@ -286,8 +286,8 @@ const setItemsParametersSchema = v.object({
286
286
  ...containerItemsParametersEntries
287
287
  });
288
288
  /**
289
- * Schema for validating the parameters of the item locations fetching function
290
- * @internal
289
+ Schema for validating the parameters of the item locations fetching function
290
+ @internal
291
291
  */
292
292
  const itemLocationsParametersSchema = v.pipe(v.object({
293
293
  setScopeUuids: v.optional(v.array(uuidSchema), []),