@seed-hypermedia/client 0.0.28 → 0.0.30

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.
@@ -683,13 +683,14 @@ var HMSearchInputSchema = z.object({
683
683
  });
684
684
  var HMSearchResultItemSchema = z.object({
685
685
  id: unpackedHmIdSchema,
686
+ commentId: z.string().optional(),
686
687
  metadata: HMDocumentMetadataSchema.optional(),
687
688
  title: z.string(),
688
689
  icon: z.string(),
689
690
  parentNames: z.array(z.string()),
690
691
  versionTime: z.string().optional(),
691
692
  searchQuery: z.string(),
692
- type: z.enum(["document", "contact"])
693
+ type: z.enum(["document", "contact", "comment"])
693
694
  });
694
695
  var HMSearchPayloadSchema = z.object({
695
696
  entities: z.array(HMSearchResultItemSchema),
@@ -15639,6 +15639,7 @@ export declare const HMSearchResultItemSchema: z.ZodObject<{
15639
15639
  targetDocUid?: string | null | undefined;
15640
15640
  targetDocPath?: string[] | null | undefined;
15641
15641
  }>;
15642
+ commentId: z.ZodOptional<z.ZodString>;
15642
15643
  metadata: z.ZodOptional<z.ZodObject<{
15643
15644
  name: z.ZodOptional<z.ZodString>;
15644
15645
  summary: z.ZodOptional<z.ZodString>;
@@ -15709,9 +15710,9 @@ export declare const HMSearchResultItemSchema: z.ZodObject<{
15709
15710
  parentNames: z.ZodArray<z.ZodString, "many">;
15710
15711
  versionTime: z.ZodOptional<z.ZodString>;
15711
15712
  searchQuery: z.ZodString;
15712
- type: z.ZodEnum<["document", "contact"]>;
15713
+ type: z.ZodEnum<["document", "contact", "comment"]>;
15713
15714
  }, "strip", z.ZodTypeAny, {
15714
- type: "document" | "contact";
15715
+ type: "document" | "comment" | "contact";
15715
15716
  id: {
15716
15717
  path: string[] | null;
15717
15718
  version: string | null;
@@ -15754,9 +15755,10 @@ export declare const HMSearchResultItemSchema: z.ZodObject<{
15754
15755
  importCategories?: string | undefined;
15755
15756
  importTags?: string | undefined;
15756
15757
  } | undefined;
15758
+ commentId?: string | undefined;
15757
15759
  versionTime?: string | undefined;
15758
15760
  }, {
15759
- type: "document" | "contact";
15761
+ type: "document" | "comment" | "contact";
15760
15762
  id: {
15761
15763
  path: string[] | null;
15762
15764
  version: string | null;
@@ -15799,6 +15801,7 @@ export declare const HMSearchResultItemSchema: z.ZodObject<{
15799
15801
  importCategories?: string | undefined;
15800
15802
  importTags?: string | undefined;
15801
15803
  } | undefined;
15804
+ commentId?: string | undefined;
15802
15805
  versionTime?: string | undefined;
15803
15806
  }>;
15804
15807
  export declare const HMSearchPayloadSchema: z.ZodObject<{
@@ -15860,6 +15863,7 @@ export declare const HMSearchPayloadSchema: z.ZodObject<{
15860
15863
  targetDocUid?: string | null | undefined;
15861
15864
  targetDocPath?: string[] | null | undefined;
15862
15865
  }>;
15866
+ commentId: z.ZodOptional<z.ZodString>;
15863
15867
  metadata: z.ZodOptional<z.ZodObject<{
15864
15868
  name: z.ZodOptional<z.ZodString>;
15865
15869
  summary: z.ZodOptional<z.ZodString>;
@@ -15930,9 +15934,9 @@ export declare const HMSearchPayloadSchema: z.ZodObject<{
15930
15934
  parentNames: z.ZodArray<z.ZodString, "many">;
15931
15935
  versionTime: z.ZodOptional<z.ZodString>;
15932
15936
  searchQuery: z.ZodString;
15933
- type: z.ZodEnum<["document", "contact"]>;
15937
+ type: z.ZodEnum<["document", "contact", "comment"]>;
15934
15938
  }, "strip", z.ZodTypeAny, {
15935
- type: "document" | "contact";
15939
+ type: "document" | "comment" | "contact";
15936
15940
  id: {
15937
15941
  path: string[] | null;
15938
15942
  version: string | null;
@@ -15975,9 +15979,10 @@ export declare const HMSearchPayloadSchema: z.ZodObject<{
15975
15979
  importCategories?: string | undefined;
15976
15980
  importTags?: string | undefined;
15977
15981
  } | undefined;
15982
+ commentId?: string | undefined;
15978
15983
  versionTime?: string | undefined;
15979
15984
  }, {
15980
- type: "document" | "contact";
15985
+ type: "document" | "comment" | "contact";
15981
15986
  id: {
15982
15987
  path: string[] | null;
15983
15988
  version: string | null;
@@ -16020,13 +16025,14 @@ export declare const HMSearchPayloadSchema: z.ZodObject<{
16020
16025
  importCategories?: string | undefined;
16021
16026
  importTags?: string | undefined;
16022
16027
  } | undefined;
16028
+ commentId?: string | undefined;
16023
16029
  versionTime?: string | undefined;
16024
16030
  }>, "many">;
16025
16031
  searchQuery: z.ZodString;
16026
16032
  }, "strip", z.ZodTypeAny, {
16027
16033
  searchQuery: string;
16028
16034
  entities: {
16029
- type: "document" | "contact";
16035
+ type: "document" | "comment" | "contact";
16030
16036
  id: {
16031
16037
  path: string[] | null;
16032
16038
  version: string | null;
@@ -16069,12 +16075,13 @@ export declare const HMSearchPayloadSchema: z.ZodObject<{
16069
16075
  importCategories?: string | undefined;
16070
16076
  importTags?: string | undefined;
16071
16077
  } | undefined;
16078
+ commentId?: string | undefined;
16072
16079
  versionTime?: string | undefined;
16073
16080
  }[];
16074
16081
  }, {
16075
16082
  searchQuery: string;
16076
16083
  entities: {
16077
- type: "document" | "contact";
16084
+ type: "document" | "comment" | "contact";
16078
16085
  id: {
16079
16086
  path: string[] | null;
16080
16087
  version: string | null;
@@ -16117,6 +16124,7 @@ export declare const HMSearchPayloadSchema: z.ZodObject<{
16117
16124
  importCategories?: string | undefined;
16118
16125
  importTags?: string | undefined;
16119
16126
  } | undefined;
16127
+ commentId?: string | undefined;
16120
16128
  versionTime?: string | undefined;
16121
16129
  }[];
16122
16130
  }>;
@@ -16213,6 +16221,7 @@ export declare const HMSearchRequestSchema: z.ZodObject<{
16213
16221
  targetDocUid?: string | null | undefined;
16214
16222
  targetDocPath?: string[] | null | undefined;
16215
16223
  }>;
16224
+ commentId: z.ZodOptional<z.ZodString>;
16216
16225
  metadata: z.ZodOptional<z.ZodObject<{
16217
16226
  name: z.ZodOptional<z.ZodString>;
16218
16227
  summary: z.ZodOptional<z.ZodString>;
@@ -16283,9 +16292,9 @@ export declare const HMSearchRequestSchema: z.ZodObject<{
16283
16292
  parentNames: z.ZodArray<z.ZodString, "many">;
16284
16293
  versionTime: z.ZodOptional<z.ZodString>;
16285
16294
  searchQuery: z.ZodString;
16286
- type: z.ZodEnum<["document", "contact"]>;
16295
+ type: z.ZodEnum<["document", "contact", "comment"]>;
16287
16296
  }, "strip", z.ZodTypeAny, {
16288
- type: "document" | "contact";
16297
+ type: "document" | "comment" | "contact";
16289
16298
  id: {
16290
16299
  path: string[] | null;
16291
16300
  version: string | null;
@@ -16328,9 +16337,10 @@ export declare const HMSearchRequestSchema: z.ZodObject<{
16328
16337
  importCategories?: string | undefined;
16329
16338
  importTags?: string | undefined;
16330
16339
  } | undefined;
16340
+ commentId?: string | undefined;
16331
16341
  versionTime?: string | undefined;
16332
16342
  }, {
16333
- type: "document" | "contact";
16343
+ type: "document" | "comment" | "contact";
16334
16344
  id: {
16335
16345
  path: string[] | null;
16336
16346
  version: string | null;
@@ -16373,13 +16383,14 @@ export declare const HMSearchRequestSchema: z.ZodObject<{
16373
16383
  importCategories?: string | undefined;
16374
16384
  importTags?: string | undefined;
16375
16385
  } | undefined;
16386
+ commentId?: string | undefined;
16376
16387
  versionTime?: string | undefined;
16377
16388
  }>, "many">;
16378
16389
  searchQuery: z.ZodString;
16379
16390
  }, "strip", z.ZodTypeAny, {
16380
16391
  searchQuery: string;
16381
16392
  entities: {
16382
- type: "document" | "contact";
16393
+ type: "document" | "comment" | "contact";
16383
16394
  id: {
16384
16395
  path: string[] | null;
16385
16396
  version: string | null;
@@ -16422,12 +16433,13 @@ export declare const HMSearchRequestSchema: z.ZodObject<{
16422
16433
  importCategories?: string | undefined;
16423
16434
  importTags?: string | undefined;
16424
16435
  } | undefined;
16436
+ commentId?: string | undefined;
16425
16437
  versionTime?: string | undefined;
16426
16438
  }[];
16427
16439
  }, {
16428
16440
  searchQuery: string;
16429
16441
  entities: {
16430
- type: "document" | "contact";
16442
+ type: "document" | "comment" | "contact";
16431
16443
  id: {
16432
16444
  path: string[] | null;
16433
16445
  version: string | null;
@@ -16470,6 +16482,7 @@ export declare const HMSearchRequestSchema: z.ZodObject<{
16470
16482
  importCategories?: string | undefined;
16471
16483
  importTags?: string | undefined;
16472
16484
  } | undefined;
16485
+ commentId?: string | undefined;
16473
16486
  versionTime?: string | undefined;
16474
16487
  }[];
16475
16488
  }>;
@@ -16489,7 +16502,7 @@ export declare const HMSearchRequestSchema: z.ZodObject<{
16489
16502
  output: {
16490
16503
  searchQuery: string;
16491
16504
  entities: {
16492
- type: "document" | "contact";
16505
+ type: "document" | "comment" | "contact";
16493
16506
  id: {
16494
16507
  path: string[] | null;
16495
16508
  version: string | null;
@@ -16532,6 +16545,7 @@ export declare const HMSearchRequestSchema: z.ZodObject<{
16532
16545
  importCategories?: string | undefined;
16533
16546
  importTags?: string | undefined;
16534
16547
  } | undefined;
16548
+ commentId?: string | undefined;
16535
16549
  versionTime?: string | undefined;
16536
16550
  }[];
16537
16551
  };
@@ -16551,7 +16565,7 @@ export declare const HMSearchRequestSchema: z.ZodObject<{
16551
16565
  output: {
16552
16566
  searchQuery: string;
16553
16567
  entities: {
16554
- type: "document" | "contact";
16568
+ type: "document" | "comment" | "contact";
16555
16569
  id: {
16556
16570
  path: string[] | null;
16557
16571
  version: string | null;
@@ -16594,6 +16608,7 @@ export declare const HMSearchRequestSchema: z.ZodObject<{
16594
16608
  importCategories?: string | undefined;
16595
16609
  importTags?: string | undefined;
16596
16610
  } | undefined;
16611
+ commentId?: string | undefined;
16597
16612
  versionTime?: string | undefined;
16598
16613
  }[];
16599
16614
  };
@@ -30100,6 +30115,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
30100
30115
  targetDocUid?: string | null | undefined;
30101
30116
  targetDocPath?: string[] | null | undefined;
30102
30117
  }>;
30118
+ commentId: z.ZodOptional<z.ZodString>;
30103
30119
  metadata: z.ZodOptional<z.ZodObject<{
30104
30120
  name: z.ZodOptional<z.ZodString>;
30105
30121
  summary: z.ZodOptional<z.ZodString>;
@@ -30170,9 +30186,9 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
30170
30186
  parentNames: z.ZodArray<z.ZodString, "many">;
30171
30187
  versionTime: z.ZodOptional<z.ZodString>;
30172
30188
  searchQuery: z.ZodString;
30173
- type: z.ZodEnum<["document", "contact"]>;
30189
+ type: z.ZodEnum<["document", "contact", "comment"]>;
30174
30190
  }, "strip", z.ZodTypeAny, {
30175
- type: "document" | "contact";
30191
+ type: "document" | "comment" | "contact";
30176
30192
  id: {
30177
30193
  path: string[] | null;
30178
30194
  version: string | null;
@@ -30215,9 +30231,10 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
30215
30231
  importCategories?: string | undefined;
30216
30232
  importTags?: string | undefined;
30217
30233
  } | undefined;
30234
+ commentId?: string | undefined;
30218
30235
  versionTime?: string | undefined;
30219
30236
  }, {
30220
- type: "document" | "contact";
30237
+ type: "document" | "comment" | "contact";
30221
30238
  id: {
30222
30239
  path: string[] | null;
30223
30240
  version: string | null;
@@ -30260,13 +30277,14 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
30260
30277
  importCategories?: string | undefined;
30261
30278
  importTags?: string | undefined;
30262
30279
  } | undefined;
30280
+ commentId?: string | undefined;
30263
30281
  versionTime?: string | undefined;
30264
30282
  }>, "many">;
30265
30283
  searchQuery: z.ZodString;
30266
30284
  }, "strip", z.ZodTypeAny, {
30267
30285
  searchQuery: string;
30268
30286
  entities: {
30269
- type: "document" | "contact";
30287
+ type: "document" | "comment" | "contact";
30270
30288
  id: {
30271
30289
  path: string[] | null;
30272
30290
  version: string | null;
@@ -30309,12 +30327,13 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
30309
30327
  importCategories?: string | undefined;
30310
30328
  importTags?: string | undefined;
30311
30329
  } | undefined;
30330
+ commentId?: string | undefined;
30312
30331
  versionTime?: string | undefined;
30313
30332
  }[];
30314
30333
  }, {
30315
30334
  searchQuery: string;
30316
30335
  entities: {
30317
- type: "document" | "contact";
30336
+ type: "document" | "comment" | "contact";
30318
30337
  id: {
30319
30338
  path: string[] | null;
30320
30339
  version: string | null;
@@ -30357,6 +30376,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
30357
30376
  importCategories?: string | undefined;
30358
30377
  importTags?: string | undefined;
30359
30378
  } | undefined;
30379
+ commentId?: string | undefined;
30360
30380
  versionTime?: string | undefined;
30361
30381
  }[];
30362
30382
  }>;
@@ -30376,7 +30396,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
30376
30396
  output: {
30377
30397
  searchQuery: string;
30378
30398
  entities: {
30379
- type: "document" | "contact";
30399
+ type: "document" | "comment" | "contact";
30380
30400
  id: {
30381
30401
  path: string[] | null;
30382
30402
  version: string | null;
@@ -30419,6 +30439,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
30419
30439
  importCategories?: string | undefined;
30420
30440
  importTags?: string | undefined;
30421
30441
  } | undefined;
30442
+ commentId?: string | undefined;
30422
30443
  versionTime?: string | undefined;
30423
30444
  }[];
30424
30445
  };
@@ -30438,7 +30459,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
30438
30459
  output: {
30439
30460
  searchQuery: string;
30440
30461
  entities: {
30441
- type: "document" | "contact";
30462
+ type: "document" | "comment" | "contact";
30442
30463
  id: {
30443
30464
  path: string[] | null;
30444
30465
  version: string | null;
@@ -30481,6 +30502,7 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
30481
30502
  importCategories?: string | undefined;
30482
30503
  importTags?: string | undefined;
30483
30504
  } | undefined;
30505
+ commentId?: string | undefined;
30484
30506
  versionTime?: string | undefined;
30485
30507
  }[];
30486
30508
  };
@@ -40118,6 +40140,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
40118
40140
  targetDocUid?: string | null | undefined;
40119
40141
  targetDocPath?: string[] | null | undefined;
40120
40142
  }>;
40143
+ commentId: z.ZodOptional<z.ZodString>;
40121
40144
  metadata: z.ZodOptional<z.ZodObject<{
40122
40145
  name: z.ZodOptional<z.ZodString>;
40123
40146
  summary: z.ZodOptional<z.ZodString>;
@@ -40188,9 +40211,9 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
40188
40211
  parentNames: z.ZodArray<z.ZodString, "many">;
40189
40212
  versionTime: z.ZodOptional<z.ZodString>;
40190
40213
  searchQuery: z.ZodString;
40191
- type: z.ZodEnum<["document", "contact"]>;
40214
+ type: z.ZodEnum<["document", "contact", "comment"]>;
40192
40215
  }, "strip", z.ZodTypeAny, {
40193
- type: "document" | "contact";
40216
+ type: "document" | "comment" | "contact";
40194
40217
  id: {
40195
40218
  path: string[] | null;
40196
40219
  version: string | null;
@@ -40233,9 +40256,10 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
40233
40256
  importCategories?: string | undefined;
40234
40257
  importTags?: string | undefined;
40235
40258
  } | undefined;
40259
+ commentId?: string | undefined;
40236
40260
  versionTime?: string | undefined;
40237
40261
  }, {
40238
- type: "document" | "contact";
40262
+ type: "document" | "comment" | "contact";
40239
40263
  id: {
40240
40264
  path: string[] | null;
40241
40265
  version: string | null;
@@ -40278,13 +40302,14 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
40278
40302
  importCategories?: string | undefined;
40279
40303
  importTags?: string | undefined;
40280
40304
  } | undefined;
40305
+ commentId?: string | undefined;
40281
40306
  versionTime?: string | undefined;
40282
40307
  }>, "many">;
40283
40308
  searchQuery: z.ZodString;
40284
40309
  }, "strip", z.ZodTypeAny, {
40285
40310
  searchQuery: string;
40286
40311
  entities: {
40287
- type: "document" | "contact";
40312
+ type: "document" | "comment" | "contact";
40288
40313
  id: {
40289
40314
  path: string[] | null;
40290
40315
  version: string | null;
@@ -40327,12 +40352,13 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
40327
40352
  importCategories?: string | undefined;
40328
40353
  importTags?: string | undefined;
40329
40354
  } | undefined;
40355
+ commentId?: string | undefined;
40330
40356
  versionTime?: string | undefined;
40331
40357
  }[];
40332
40358
  }, {
40333
40359
  searchQuery: string;
40334
40360
  entities: {
40335
- type: "document" | "contact";
40361
+ type: "document" | "comment" | "contact";
40336
40362
  id: {
40337
40363
  path: string[] | null;
40338
40364
  version: string | null;
@@ -40375,6 +40401,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
40375
40401
  importCategories?: string | undefined;
40376
40402
  importTags?: string | undefined;
40377
40403
  } | undefined;
40404
+ commentId?: string | undefined;
40378
40405
  versionTime?: string | undefined;
40379
40406
  }[];
40380
40407
  }>;
@@ -40394,7 +40421,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
40394
40421
  output: {
40395
40422
  searchQuery: string;
40396
40423
  entities: {
40397
- type: "document" | "contact";
40424
+ type: "document" | "comment" | "contact";
40398
40425
  id: {
40399
40426
  path: string[] | null;
40400
40427
  version: string | null;
@@ -40437,6 +40464,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
40437
40464
  importCategories?: string | undefined;
40438
40465
  importTags?: string | undefined;
40439
40466
  } | undefined;
40467
+ commentId?: string | undefined;
40440
40468
  versionTime?: string | undefined;
40441
40469
  }[];
40442
40470
  };
@@ -40456,7 +40484,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
40456
40484
  output: {
40457
40485
  searchQuery: string;
40458
40486
  entities: {
40459
- type: "document" | "contact";
40487
+ type: "document" | "comment" | "contact";
40460
40488
  id: {
40461
40489
  path: string[] | null;
40462
40490
  version: string | null;
@@ -40499,6 +40527,7 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
40499
40527
  importCategories?: string | undefined;
40500
40528
  importTags?: string | undefined;
40501
40529
  } | undefined;
40530
+ commentId?: string | undefined;
40502
40531
  versionTime?: string | undefined;
40503
40532
  }[];
40504
40533
  };
package/dist/hm-types.mjs CHANGED
@@ -165,7 +165,7 @@ import {
165
165
  toNumber,
166
166
  unpackHmId,
167
167
  unpackedHmIdSchema
168
- } from "./chunk-F2YINBVV.mjs";
168
+ } from "./chunk-6HDGDXUX.mjs";
169
169
  export {
170
170
  BlockRangeSchema,
171
171
  BoldAnnotationSchema,
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  serializeBlockRange,
18
18
  toNumber,
19
19
  unpackHmId
20
- } from "./chunk-F2YINBVV.mjs";
20
+ } from "./chunk-6HDGDXUX.mjs";
21
21
 
22
22
  // src/capability.ts
23
23
  import { encode as cborEncode2 } from "@ipld/dag-cbor";
@@ -668,6 +668,20 @@ function cleanContentOfUndefined(content) {
668
668
  if (children) cleanContentOfUndefined(children);
669
669
  });
670
670
  }
671
+ function deepStripUndefined(value) {
672
+ if (Array.isArray(value)) {
673
+ return value.map((item) => deepStripUndefined(item));
674
+ }
675
+ if (value && typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype) {
676
+ const result = {};
677
+ for (const [k, v] of Object.entries(value)) {
678
+ if (v === void 0) continue;
679
+ result[k] = deepStripUndefined(v);
680
+ }
681
+ return result;
682
+ }
683
+ return value;
684
+ }
671
685
  function createUnsignedComment({
672
686
  content,
673
687
  docId,
@@ -724,7 +738,8 @@ async function createCommentBlob({
724
738
  rootReplyCommentVersion,
725
739
  visibility
726
740
  });
727
- const signedComment = await createSignedComment(unsignedComment, signer);
741
+ const cleanedUnsignedComment = deepStripUndefined(unsignedComment);
742
+ const signedComment = await createSignedComment(cleanedUnsignedComment, signer);
728
743
  return cborEncode6(signedComment);
729
744
  }
730
745
  function generateBlockId(length = 8) {
@@ -809,8 +824,9 @@ async function deleteComment(input, signer) {
809
824
  sig: new Uint8Array(64)
810
825
  };
811
826
  if (input.visibility) tombstone.visibility = input.visibility;
812
- tombstone.sig = await signObject(signer, tombstone);
813
- const encoded = cborEncode6(tombstone);
827
+ const cleanedTombstone = deepStripUndefined(tombstone);
828
+ cleanedTombstone.sig = await signObject(signer, cleanedTombstone);
829
+ const encoded = cborEncode6(cleanedTombstone);
814
830
  return toPublishInput(encoded, []);
815
831
  }
816
832
  async function updateComment(input, signer) {
@@ -836,8 +852,9 @@ async function updateComment(input, signer) {
836
852
  if (input.replyParentVersion) comment.replyParent = CID3.parse(input.replyParentVersion);
837
853
  if (input.rootReplyCommentVersion) comment.threadRoot = CID3.parse(input.rootReplyCommentVersion);
838
854
  if (input.visibility) comment.visibility = input.visibility;
839
- comment.sig = await signObject(signer, comment);
840
- const encoded = cborEncode6(comment);
855
+ const cleanedComment = deepStripUndefined(comment);
856
+ cleanedComment.sig = await signObject(signer, cleanedComment);
857
+ const encoded = cborEncode6(cleanedComment);
841
858
  return toPublishInput(encoded, []);
842
859
  }
843
860
  async function commentRecordIdFromBlob(blobData) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-hypermedia/client",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/seed-hypermedia/seed",