@seed-hypermedia/client 0.0.57 → 0.0.59

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.
@@ -280,7 +280,7 @@ var HMDocumentMetadataSchema = z.object({
280
280
  // Import taxonomy fields (comma-separated values from external sources like WordPress)
281
281
  importCategories: z.string().optional(),
282
282
  importTags: z.string().optional()
283
- });
283
+ }).passthrough();
284
284
  function hmMetadataJsonCorrection(metadata) {
285
285
  if (typeof metadata.theme === "string") {
286
286
  return {
@@ -290,6 +290,17 @@ function hmMetadataJsonCorrection(metadata) {
290
290
  }
291
291
  return metadata;
292
292
  }
293
+ var BUILTIN_METADATA_KEYS = new Set(Object.keys(HMDocumentMetadataSchema.shape));
294
+ function countCustomMetadataFields(metadata) {
295
+ if (!metadata) return 0;
296
+ let count = 0;
297
+ for (const [key, value] of Object.entries(metadata)) {
298
+ if (BUILTIN_METADATA_KEYS.has(key)) continue;
299
+ if (value === void 0 || value === null) continue;
300
+ count++;
301
+ }
302
+ return count;
303
+ }
293
304
  var visibilityMap = {
294
305
  0: "PUBLIC",
295
306
  1: "PUBLIC",
@@ -871,10 +882,20 @@ var HMListCommentsByAuthorRequestSchema = z.object({
871
882
  var HMRawCitationSchema = z.object({
872
883
  source: z.string(),
873
884
  sourceType: z.string().optional(),
885
+ sourceContext: z.string().optional(),
886
+ sourceBlob: z.object({
887
+ cid: z.string().optional(),
888
+ author: z.string().optional(),
889
+ createTime: HMTimestampSchema.optional()
890
+ }).optional(),
874
891
  sourceDocument: z.string().optional(),
892
+ target: z.string().optional(),
893
+ targetVersion: z.string().optional(),
875
894
  targetFragment: z.string().optional(),
876
895
  isExactVersion: z.boolean().optional(),
877
- targetBlockRevision: z.string().optional()
896
+ targetBlockRevision: z.string().optional(),
897
+ mentionType: z.string().optional(),
898
+ isExact: z.boolean().optional()
878
899
  });
879
900
  var HMListCitationsOutputSchema = z.object({
880
901
  citations: z.array(HMRawCitationSchema)
@@ -1368,6 +1389,8 @@ export {
1368
1389
  HMBlockNodeSchema,
1369
1390
  HMDocumentMetadataSchema,
1370
1391
  hmMetadataJsonCorrection,
1392
+ BUILTIN_METADATA_KEYS,
1393
+ countCustomMetadataFields,
1371
1394
  HMResourceVisibilitySchema,
1372
1395
  HMCommentSchema,
1373
1396
  HMBreadcrumbSchema,