@seed-hypermedia/client 0.0.56 → 0.0.57

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.
@@ -1096,6 +1096,23 @@ var HMListDomainsRequestSchema = z.object({
1096
1096
  input: HMListDomainsInputSchema,
1097
1097
  output: HMListDomainsOutputSchema
1098
1098
  });
1099
+ var HMDiscoveryStatusInputSchema = z.object({
1100
+ uid: z.string(),
1101
+ path: z.array(z.string()),
1102
+ version: z.string().optional(),
1103
+ /** Accept any discovered version as success, not just `version`. */
1104
+ latest: z.boolean().optional()
1105
+ });
1106
+ var HMDiscoveryStatusOutputSchema = z.object({
1107
+ state: z.enum(["pending", "found", "failed"]),
1108
+ version: z.string().optional(),
1109
+ error: z.string().optional()
1110
+ });
1111
+ var HMDiscoveryStatusRequestSchema = z.object({
1112
+ key: z.literal("DiscoveryStatus"),
1113
+ input: HMDiscoveryStatusInputSchema,
1114
+ output: HMDiscoveryStatusOutputSchema
1115
+ });
1099
1116
  var HMGetRequestSchema = z.discriminatedUnion("key", [
1100
1117
  HMResourceRequestSchema,
1101
1118
  HMResourceMetadataRequestSchema,
@@ -1121,7 +1138,8 @@ var HMGetRequestSchema = z.discriminatedUnion("key", [
1121
1138
  HMInteractionSummaryRequestSchema,
1122
1139
  HMListCommentVersionsRequestSchema,
1123
1140
  HMGetDomainRequestSchema,
1124
- HMListDomainsRequestSchema
1141
+ HMListDomainsRequestSchema,
1142
+ HMDiscoveryStatusRequestSchema
1125
1143
  ]);
1126
1144
  var HMActionSchema = z.discriminatedUnion("key", [
1127
1145
  HMPublishBlobsRequestSchema,
@@ -1153,6 +1171,7 @@ var HMRequestSchema = z.discriminatedUnion("key", [
1153
1171
  HMListCommentVersionsRequestSchema,
1154
1172
  HMGetDomainRequestSchema,
1155
1173
  HMListDomainsRequestSchema,
1174
+ HMDiscoveryStatusRequestSchema,
1156
1175
  HMPublishBlobsRequestSchema,
1157
1176
  HMPrepareDocumentChangeRequestSchema
1158
1177
  ]);
@@ -1478,6 +1497,9 @@ export {
1478
1497
  HMListDomainsInputSchema,
1479
1498
  HMListDomainsOutputSchema,
1480
1499
  HMListDomainsRequestSchema,
1500
+ HMDiscoveryStatusInputSchema,
1501
+ HMDiscoveryStatusOutputSchema,
1502
+ HMDiscoveryStatusRequestSchema,
1481
1503
  HMGetRequestSchema,
1482
1504
  HMActionSchema,
1483
1505
  HMRequestSchema,
@@ -35162,6 +35162,98 @@ export declare const HMListDomainsRequestSchema: z.ZodObject<{
35162
35162
  };
35163
35163
  }>;
35164
35164
  export type HMListDomainsRequest = z.infer<typeof HMListDomainsRequestSchema>;
35165
+ export declare const HMDiscoveryStatusInputSchema: z.ZodObject<{
35166
+ uid: z.ZodString;
35167
+ path: z.ZodArray<z.ZodString, "many">;
35168
+ version: z.ZodOptional<z.ZodString>;
35169
+ /** Accept any discovered version as success, not just `version`. */
35170
+ latest: z.ZodOptional<z.ZodBoolean>;
35171
+ }, "strip", z.ZodTypeAny, {
35172
+ path: string[];
35173
+ uid: string;
35174
+ version?: string | undefined;
35175
+ latest?: boolean | undefined;
35176
+ }, {
35177
+ path: string[];
35178
+ uid: string;
35179
+ version?: string | undefined;
35180
+ latest?: boolean | undefined;
35181
+ }>;
35182
+ export type HMDiscoveryStatusInput = z.infer<typeof HMDiscoveryStatusInputSchema>;
35183
+ export declare const HMDiscoveryStatusOutputSchema: z.ZodObject<{
35184
+ state: z.ZodEnum<["pending", "found", "failed"]>;
35185
+ version: z.ZodOptional<z.ZodString>;
35186
+ error: z.ZodOptional<z.ZodString>;
35187
+ }, "strip", z.ZodTypeAny, {
35188
+ state: "pending" | "found" | "failed";
35189
+ version?: string | undefined;
35190
+ error?: string | undefined;
35191
+ }, {
35192
+ state: "pending" | "found" | "failed";
35193
+ version?: string | undefined;
35194
+ error?: string | undefined;
35195
+ }>;
35196
+ export type HMDiscoveryStatusOutput = z.infer<typeof HMDiscoveryStatusOutputSchema>;
35197
+ export declare const HMDiscoveryStatusRequestSchema: z.ZodObject<{
35198
+ key: z.ZodLiteral<"DiscoveryStatus">;
35199
+ input: z.ZodObject<{
35200
+ uid: z.ZodString;
35201
+ path: z.ZodArray<z.ZodString, "many">;
35202
+ version: z.ZodOptional<z.ZodString>;
35203
+ /** Accept any discovered version as success, not just `version`. */
35204
+ latest: z.ZodOptional<z.ZodBoolean>;
35205
+ }, "strip", z.ZodTypeAny, {
35206
+ path: string[];
35207
+ uid: string;
35208
+ version?: string | undefined;
35209
+ latest?: boolean | undefined;
35210
+ }, {
35211
+ path: string[];
35212
+ uid: string;
35213
+ version?: string | undefined;
35214
+ latest?: boolean | undefined;
35215
+ }>;
35216
+ output: z.ZodObject<{
35217
+ state: z.ZodEnum<["pending", "found", "failed"]>;
35218
+ version: z.ZodOptional<z.ZodString>;
35219
+ error: z.ZodOptional<z.ZodString>;
35220
+ }, "strip", z.ZodTypeAny, {
35221
+ state: "pending" | "found" | "failed";
35222
+ version?: string | undefined;
35223
+ error?: string | undefined;
35224
+ }, {
35225
+ state: "pending" | "found" | "failed";
35226
+ version?: string | undefined;
35227
+ error?: string | undefined;
35228
+ }>;
35229
+ }, "strip", z.ZodTypeAny, {
35230
+ key: "DiscoveryStatus";
35231
+ input: {
35232
+ path: string[];
35233
+ uid: string;
35234
+ version?: string | undefined;
35235
+ latest?: boolean | undefined;
35236
+ };
35237
+ output: {
35238
+ state: "pending" | "found" | "failed";
35239
+ version?: string | undefined;
35240
+ error?: string | undefined;
35241
+ };
35242
+ }, {
35243
+ key: "DiscoveryStatus";
35244
+ input: {
35245
+ path: string[];
35246
+ uid: string;
35247
+ version?: string | undefined;
35248
+ latest?: boolean | undefined;
35249
+ };
35250
+ output: {
35251
+ state: "pending" | "found" | "failed";
35252
+ version?: string | undefined;
35253
+ error?: string | undefined;
35254
+ };
35255
+ }>;
35256
+ export type HMDiscoveryStatusRequest = z.infer<typeof HMDiscoveryStatusRequestSchema>;
35165
35257
  export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObject<{
35166
35258
  key: z.ZodLiteral<"Resource">;
35167
35259
  input: z.ZodObject<{
@@ -47296,6 +47388,64 @@ export declare const HMGetRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodOb
47296
47388
  lastError: string | null;
47297
47389
  }[];
47298
47390
  };
47391
+ }>, z.ZodObject<{
47392
+ key: z.ZodLiteral<"DiscoveryStatus">;
47393
+ input: z.ZodObject<{
47394
+ uid: z.ZodString;
47395
+ path: z.ZodArray<z.ZodString, "many">;
47396
+ version: z.ZodOptional<z.ZodString>;
47397
+ /** Accept any discovered version as success, not just `version`. */
47398
+ latest: z.ZodOptional<z.ZodBoolean>;
47399
+ }, "strip", z.ZodTypeAny, {
47400
+ path: string[];
47401
+ uid: string;
47402
+ version?: string | undefined;
47403
+ latest?: boolean | undefined;
47404
+ }, {
47405
+ path: string[];
47406
+ uid: string;
47407
+ version?: string | undefined;
47408
+ latest?: boolean | undefined;
47409
+ }>;
47410
+ output: z.ZodObject<{
47411
+ state: z.ZodEnum<["pending", "found", "failed"]>;
47412
+ version: z.ZodOptional<z.ZodString>;
47413
+ error: z.ZodOptional<z.ZodString>;
47414
+ }, "strip", z.ZodTypeAny, {
47415
+ state: "pending" | "found" | "failed";
47416
+ version?: string | undefined;
47417
+ error?: string | undefined;
47418
+ }, {
47419
+ state: "pending" | "found" | "failed";
47420
+ version?: string | undefined;
47421
+ error?: string | undefined;
47422
+ }>;
47423
+ }, "strip", z.ZodTypeAny, {
47424
+ key: "DiscoveryStatus";
47425
+ input: {
47426
+ path: string[];
47427
+ uid: string;
47428
+ version?: string | undefined;
47429
+ latest?: boolean | undefined;
47430
+ };
47431
+ output: {
47432
+ state: "pending" | "found" | "failed";
47433
+ version?: string | undefined;
47434
+ error?: string | undefined;
47435
+ };
47436
+ }, {
47437
+ key: "DiscoveryStatus";
47438
+ input: {
47439
+ path: string[];
47440
+ uid: string;
47441
+ version?: string | undefined;
47442
+ latest?: boolean | undefined;
47443
+ };
47444
+ output: {
47445
+ state: "pending" | "found" | "failed";
47446
+ version?: string | undefined;
47447
+ error?: string | undefined;
47448
+ };
47299
47449
  }>]>;
47300
47450
  export type HMGetRequest = z.infer<typeof HMGetRequestSchema>;
47301
47451
  export declare const HMActionSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObject<{
@@ -60202,6 +60352,64 @@ export declare const HMRequestSchema: z.ZodDiscriminatedUnion<"key", [z.ZodObjec
60202
60352
  lastError: string | null;
60203
60353
  }[];
60204
60354
  };
60355
+ }>, z.ZodObject<{
60356
+ key: z.ZodLiteral<"DiscoveryStatus">;
60357
+ input: z.ZodObject<{
60358
+ uid: z.ZodString;
60359
+ path: z.ZodArray<z.ZodString, "many">;
60360
+ version: z.ZodOptional<z.ZodString>;
60361
+ /** Accept any discovered version as success, not just `version`. */
60362
+ latest: z.ZodOptional<z.ZodBoolean>;
60363
+ }, "strip", z.ZodTypeAny, {
60364
+ path: string[];
60365
+ uid: string;
60366
+ version?: string | undefined;
60367
+ latest?: boolean | undefined;
60368
+ }, {
60369
+ path: string[];
60370
+ uid: string;
60371
+ version?: string | undefined;
60372
+ latest?: boolean | undefined;
60373
+ }>;
60374
+ output: z.ZodObject<{
60375
+ state: z.ZodEnum<["pending", "found", "failed"]>;
60376
+ version: z.ZodOptional<z.ZodString>;
60377
+ error: z.ZodOptional<z.ZodString>;
60378
+ }, "strip", z.ZodTypeAny, {
60379
+ state: "pending" | "found" | "failed";
60380
+ version?: string | undefined;
60381
+ error?: string | undefined;
60382
+ }, {
60383
+ state: "pending" | "found" | "failed";
60384
+ version?: string | undefined;
60385
+ error?: string | undefined;
60386
+ }>;
60387
+ }, "strip", z.ZodTypeAny, {
60388
+ key: "DiscoveryStatus";
60389
+ input: {
60390
+ path: string[];
60391
+ uid: string;
60392
+ version?: string | undefined;
60393
+ latest?: boolean | undefined;
60394
+ };
60395
+ output: {
60396
+ state: "pending" | "found" | "failed";
60397
+ version?: string | undefined;
60398
+ error?: string | undefined;
60399
+ };
60400
+ }, {
60401
+ key: "DiscoveryStatus";
60402
+ input: {
60403
+ path: string[];
60404
+ uid: string;
60405
+ version?: string | undefined;
60406
+ latest?: boolean | undefined;
60407
+ };
60408
+ output: {
60409
+ state: "pending" | "found" | "failed";
60410
+ version?: string | undefined;
60411
+ error?: string | undefined;
60412
+ };
60205
60413
  }>, z.ZodObject<{
60206
60414
  key: z.ZodLiteral<"PublishBlobs">;
60207
60415
  input: z.ZodObject<{
package/dist/hm-types.mjs CHANGED
@@ -47,6 +47,9 @@ import {
47
47
  HMContactRecordSchema,
48
48
  HMContactSchema,
49
49
  HMContactSubscribeSchema,
50
+ HMDiscoveryStatusInputSchema,
51
+ HMDiscoveryStatusOutputSchema,
52
+ HMDiscoveryStatusRequestSchema,
50
53
  HMDocumentInfoSchema,
51
54
  HMDocumentMetadataSchema,
52
55
  HMDocumentSchema,
@@ -179,7 +182,7 @@ import {
179
182
  toNumber,
180
183
  unpackHmId,
181
184
  unpackedHmIdSchema
182
- } from "./chunk-64F47WK6.mjs";
185
+ } from "./chunk-RJAN7AV6.mjs";
183
186
  export {
184
187
  BackgroundColorAnnotationSchema,
185
188
  BlockRangeSchema,
@@ -229,6 +232,9 @@ export {
229
232
  HMContactRecordSchema,
230
233
  HMContactSchema,
231
234
  HMContactSubscribeSchema,
235
+ HMDiscoveryStatusInputSchema,
236
+ HMDiscoveryStatusOutputSchema,
237
+ HMDiscoveryStatusRequestSchema,
232
238
  HMDocumentInfoSchema,
233
239
  HMDocumentMetadataSchema,
234
240
  HMDocumentSchema,
package/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  serializeBlockRange,
18
18
  toNumber,
19
19
  unpackHmId
20
- } from "./chunk-64F47WK6.mjs";
20
+ } from "./chunk-RJAN7AV6.mjs";
21
21
 
22
22
  // src/capability.ts
23
23
  import { encode as cborEncode2 } from "@ipld/dag-cbor";
@@ -383,6 +383,12 @@ var QUERY_PARAM_SERIALIZERS = {
383
383
  }),
384
384
  ListCapabilities: (input) => ({
385
385
  targetId: packHmId(input.targetId)
386
+ }),
387
+ DiscoveryStatus: (input) => ({
388
+ uid: input.uid,
389
+ path: input.path.join("/"),
390
+ ...input.version ? { v: input.version } : {},
391
+ ...input.latest ? { l: "" } : {}
386
392
  })
387
393
  };
388
394
  function createSeedClient(baseUrl, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-hypermedia/client",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/seed-hypermedia/seed",