@relyio/sdk 0.6.0 → 0.7.0

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 (37) hide show
  1. package/CHANGELOG.md +370 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/{chunk-DY2XT7OF.cjs → chunk-72UK5U7T.cjs} +70 -60
  4. package/dist/{chunk-7ABNXVWL.js → chunk-GYHAVYND.js} +777 -399
  5. package/dist/{chunk-I3ESNANB.js → chunk-H6IBQSMM.js} +2 -2
  6. package/dist/{chunk-HT6NFRM2.cjs → chunk-TZL374LS.cjs} +2 -2
  7. package/dist/{chunk-GCMQUM6N.cjs → chunk-VH2DE7HZ.cjs} +776 -402
  8. package/dist/{chunk-XJVY2CLY.js → chunk-YEJUMW4X.js} +70 -60
  9. package/dist/client/index.cjs +4 -3
  10. package/dist/client/index.d.cts +4 -4
  11. package/dist/client/index.d.ts +4 -4
  12. package/dist/client/index.js +2 -1
  13. package/dist/{index-d1Kz1e19.d.cts → define-content-type-DiVpbwNs.d.cts} +1615 -684
  14. package/dist/{index-yPbhZc6q.d.ts → define-content-type-DiVpbwNs.d.ts} +1615 -684
  15. package/dist/{define-schema-1kr2HIzN.d.cts → define-schema-C-5an28C.d.ts} +189 -85
  16. package/dist/{define-schema-ChvAzY8H.d.ts → define-schema-D7MButVt.d.cts} +189 -85
  17. package/dist/{index-XqoGUaAY.d.ts → index-1G97sNA8.d.ts} +489 -267
  18. package/dist/index-BOQIHnsh.d.ts +818 -0
  19. package/dist/index-DbsTUw3Q.d.cts +818 -0
  20. package/dist/{index-Df1VsfJR.d.cts → index-M0X45k7J.d.cts} +489 -267
  21. package/dist/index.cjs +98 -114
  22. package/dist/index.d.cts +31 -31
  23. package/dist/index.d.ts +31 -31
  24. package/dist/index.js +8 -8
  25. package/dist/schema/index.cjs +35 -35
  26. package/dist/schema/index.d.cts +13 -11
  27. package/dist/schema/index.d.ts +13 -11
  28. package/dist/schema/index.js +1 -1
  29. package/dist/types/index.d.cts +2 -2
  30. package/dist/types/index.d.ts +2 -2
  31. package/dist/utils/index.cjs +19 -19
  32. package/dist/utils/index.d.cts +10 -1
  33. package/dist/utils/index.d.ts +10 -1
  34. package/dist/utils/index.js +1 -1
  35. package/package.json +4 -3
  36. package/dist/define-content-type-CDB3kyeA.d.cts +0 -1173
  37. package/dist/define-content-type-CDB3kyeA.d.ts +0 -1173
package/dist/index.cjs CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkDY2XT7OF_cjs = require('./chunk-DY2XT7OF.cjs');
6
- var chunkGCMQUM6N_cjs = require('./chunk-GCMQUM6N.cjs');
5
+ var chunk72UK5U7T_cjs = require('./chunk-72UK5U7T.cjs');
6
+ var chunkVH2DE7HZ_cjs = require('./chunk-VH2DE7HZ.cjs');
7
7
  require('./chunk-LSRPMNPT.cjs');
8
8
  require('./chunk-PPA2WWOH.cjs');
9
- var chunkHT6NFRM2_cjs = require('./chunk-HT6NFRM2.cjs');
9
+ var chunkTZL374LS_cjs = require('./chunk-TZL374LS.cjs');
10
10
  var chunkMWMSFIWN_cjs = require('./chunk-MWMSFIWN.cjs');
11
11
 
12
12
  /* RelyIO SDK - Built with ❤️ by the RelyIO Team */
@@ -19,8 +19,8 @@ var isPublishableKey = /* @__PURE__ */ chunkMWMSFIWN_cjs.__name((apiKey) => apiK
19
19
  var FOLLOW_RETRY_BASE_MS = 1e3;
20
20
  var FOLLOW_RETRY_MAX_MS = 3e4;
21
21
  function classifyFollowFailure(error) {
22
- if (!(error instanceof chunkGCMQUM6N_cjs.SDKError) || !error.retryable) return { retry: false };
23
- const afterMs = chunkGCMQUM6N_cjs.serviceInstructedDelayMs(error, Date.now());
22
+ if (!(error instanceof chunkVH2DE7HZ_cjs.SDKError) || !error.retryable) return { retry: false };
23
+ const afterMs = chunkVH2DE7HZ_cjs.serviceInstructedDelayMs(error, Date.now());
24
24
  return afterMs === void 0 ? { retry: true } : { retry: true, afterMs };
25
25
  }
26
26
  chunkMWMSFIWN_cjs.__name(classifyFollowFailure, "classifyFollowFailure");
@@ -29,10 +29,10 @@ async function followChanges(source, options) {
29
29
  const classify = options.classify ?? classifyFollowFailure;
30
30
  const random = options.random ?? Math.random;
31
31
  const report = /* @__PURE__ */ chunkMWMSFIWN_cjs.__name((state) => {
32
- if (!chunkGCMQUM6N_cjs.isAborted(signal)) options.onState?.(state);
32
+ if (!chunkVH2DE7HZ_cjs.isAborted(signal)) options.onState?.(state);
33
33
  }, "report");
34
34
  const resync = /* @__PURE__ */ chunkMWMSFIWN_cjs.__name(async (cause) => {
35
- if (chunkGCMQUM6N_cjs.isAborted(signal)) return;
35
+ if (chunkVH2DE7HZ_cjs.isAborted(signal)) return;
36
36
  await onResync(cause);
37
37
  report({ kind: "resynced", resync: cause });
38
38
  }, "resync");
@@ -41,12 +41,12 @@ async function followChanges(source, options) {
41
41
  let unanchored = false;
42
42
  let current;
43
43
  for (; ; ) {
44
- if (chunkGCMQUM6N_cjs.isAborted(signal)) return { kind: "aborted", since };
44
+ if (chunkVH2DE7HZ_cjs.isAborted(signal)) return { kind: "aborted", since };
45
45
  try {
46
46
  if (unanchored) {
47
47
  unanchored = false;
48
48
  await resync({ cause: "no-cursor" });
49
- if (chunkGCMQUM6N_cjs.isAborted(signal)) return { kind: "aborted", since };
49
+ if (chunkVH2DE7HZ_cjs.isAborted(signal)) return { kind: "aborted", since };
50
50
  }
51
51
  report({ kind: "following" });
52
52
  const open = {};
@@ -60,13 +60,13 @@ async function followChanges(source, options) {
60
60
  }, "opened")
61
61
  });
62
62
  for await (const change of changes) {
63
- if (chunkGCMQUM6N_cjs.isAborted(signal)) return { kind: "aborted", since };
63
+ if (chunkVH2DE7HZ_cjs.isAborted(signal)) return { kind: "aborted", since };
64
64
  failures = 0;
65
65
  await onChange(change);
66
66
  since = change.cursor;
67
- if (chunkGCMQUM6N_cjs.isAborted(signal)) return { kind: "aborted", since };
67
+ if (chunkVH2DE7HZ_cjs.isAborted(signal)) return { kind: "aborted", since };
68
68
  }
69
- if (chunkGCMQUM6N_cjs.isAborted(signal)) return { kind: "aborted", since };
69
+ if (chunkVH2DE7HZ_cjs.isAborted(signal)) return { kind: "aborted", since };
70
70
  const error = new Error(
71
71
  "The change source completed without its signal aborting; a source ends only on abort and throws every other end."
72
72
  );
@@ -74,7 +74,7 @@ async function followChanges(source, options) {
74
74
  return { kind: "stopped", since, error };
75
75
  } catch (error) {
76
76
  current = void 0;
77
- if (chunkGCMQUM6N_cjs.isAborted(signal)) return { kind: "aborted", since };
77
+ if (chunkVH2DE7HZ_cjs.isAborted(signal)) return { kind: "aborted", since };
78
78
  const verdict = classify(error);
79
79
  if (!verdict.retry) {
80
80
  report({ kind: "stopped", error });
@@ -83,7 +83,7 @@ async function followChanges(source, options) {
83
83
  failures += 1;
84
84
  const retryInMs = retryDelayMs(failures, verdict.afterMs, random);
85
85
  report({ kind: "reconnecting", error, retryInMs });
86
- await chunkGCMQUM6N_cjs.sleep(retryInMs, signal);
86
+ await chunkVH2DE7HZ_cjs.sleep(retryInMs, signal);
87
87
  if (since === void 0) unanchored = true;
88
88
  }
89
89
  }
@@ -139,20 +139,20 @@ function buildLanguageSwitcher(entry, options) {
139
139
  }
140
140
  chunkMWMSFIWN_cjs.__name(buildLanguageSwitcher, "buildLanguageSwitcher");
141
141
  function getAvailableLocaleCodes(entry) {
142
- return entry._metadata?.availableLocales?.map((l) => l.code) ?? [];
142
+ return entry._metadata?.availableLocales.map((l) => l.code) ?? [];
143
143
  }
144
144
  chunkMWMSFIWN_cjs.__name(getAvailableLocaleCodes, "getAvailableLocaleCodes");
145
145
  var LOCALE_STATUS_PUBLISHED = "published";
146
146
  function getPublishedLocaleCodes(entry) {
147
- return entry._metadata?.availableLocales?.filter((l) => l.status === LOCALE_STATUS_PUBLISHED).map((l) => l.code) ?? [];
147
+ return entry._metadata?.availableLocales.filter((l) => l.status === LOCALE_STATUS_PUBLISHED).map((l) => l.code) ?? [];
148
148
  }
149
149
  chunkMWMSFIWN_cjs.__name(getPublishedLocaleCodes, "getPublishedLocaleCodes");
150
150
  function hasLocale(entry, localeCode) {
151
- return entry._metadata?.availableLocales?.some((l) => l.code === localeCode) ?? false;
151
+ return entry._metadata?.availableLocales.some((l) => l.code === localeCode) ?? false;
152
152
  }
153
153
  chunkMWMSFIWN_cjs.__name(hasLocale, "hasLocale");
154
154
  function isPublishedInLocale(entry, localeCode) {
155
- return entry._metadata?.availableLocales?.some(
155
+ return entry._metadata?.availableLocales.some(
156
156
  (l) => l.code === localeCode && l.status === LOCALE_STATUS_PUBLISHED
157
157
  ) ?? false;
158
158
  }
@@ -277,339 +277,323 @@ var VERSION = "__VERSION__";
277
277
 
278
278
  Object.defineProperty(exports, "defineAssetType", {
279
279
  enumerable: true,
280
- get: function () { return chunkDY2XT7OF_cjs.defineAssetType; }
280
+ get: function () { return chunk72UK5U7T_cjs.defineAssetType; }
281
281
  });
282
282
  Object.defineProperty(exports, "defineComponent", {
283
283
  enumerable: true,
284
- get: function () { return chunkDY2XT7OF_cjs.defineComponent; }
284
+ get: function () { return chunk72UK5U7T_cjs.defineComponent; }
285
285
  });
286
286
  Object.defineProperty(exports, "defineContentType", {
287
287
  enumerable: true,
288
- get: function () { return chunkDY2XT7OF_cjs.defineContentType; }
288
+ get: function () { return chunk72UK5U7T_cjs.defineContentType; }
289
289
  });
290
290
  Object.defineProperty(exports, "defineQuery", {
291
291
  enumerable: true,
292
- get: function () { return chunkDY2XT7OF_cjs.defineQuery; }
292
+ get: function () { return chunk72UK5U7T_cjs.defineQuery; }
293
293
  });
294
294
  Object.defineProperty(exports, "defineSchema", {
295
295
  enumerable: true,
296
- get: function () { return chunkDY2XT7OF_cjs.defineSchema; }
296
+ get: function () { return chunk72UK5U7T_cjs.defineSchema; }
297
297
  });
298
298
  Object.defineProperty(exports, "defineSettingsGroup", {
299
299
  enumerable: true,
300
- get: function () { return chunkDY2XT7OF_cjs.defineSettingsGroup; }
300
+ get: function () { return chunk72UK5U7T_cjs.defineSettingsGroup; }
301
301
  });
302
302
  Object.defineProperty(exports, "defineSingleton", {
303
303
  enumerable: true,
304
- get: function () { return chunkDY2XT7OF_cjs.defineSingleton; }
304
+ get: function () { return chunk72UK5U7T_cjs.defineSingleton; }
305
305
  });
306
306
  Object.defineProperty(exports, "defineSingletonContentType", {
307
307
  enumerable: true,
308
- get: function () { return chunkDY2XT7OF_cjs.defineSingletonContentType; }
308
+ get: function () { return chunk72UK5U7T_cjs.defineSingletonContentType; }
309
309
  });
310
310
  Object.defineProperty(exports, "fields", {
311
311
  enumerable: true,
312
- get: function () { return chunkDY2XT7OF_cjs.fields; }
312
+ get: function () { return chunk72UK5U7T_cjs.fields; }
313
313
  });
314
314
  Object.defineProperty(exports, "fieldset", {
315
315
  enumerable: true,
316
- get: function () { return chunkDY2XT7OF_cjs.fieldset; }
316
+ get: function () { return chunk72UK5U7T_cjs.fieldset; }
317
317
  });
318
318
  Object.defineProperty(exports, "AdhocQueryBuilder", {
319
319
  enumerable: true,
320
- get: function () { return chunkGCMQUM6N_cjs.AdhocQueryBuilder; }
320
+ get: function () { return chunkVH2DE7HZ_cjs.AdhocQueryBuilder; }
321
321
  });
322
322
  Object.defineProperty(exports, "AdhocQueryClient", {
323
323
  enumerable: true,
324
- get: function () { return chunkGCMQUM6N_cjs.AdhocQueryClient; }
324
+ get: function () { return chunkVH2DE7HZ_cjs.AdhocQueryClient; }
325
325
  });
326
326
  Object.defineProperty(exports, "AssetClient", {
327
327
  enumerable: true,
328
- get: function () { return chunkGCMQUM6N_cjs.AssetClient; }
328
+ get: function () { return chunkVH2DE7HZ_cjs.AssetClient; }
329
329
  });
330
330
  Object.defineProperty(exports, "AssetFileBuilder", {
331
331
  enumerable: true,
332
- get: function () { return chunkGCMQUM6N_cjs.AssetFileBuilder; }
332
+ get: function () { return chunkVH2DE7HZ_cjs.AssetFileBuilder; }
333
333
  });
334
334
  Object.defineProperty(exports, "AssetUploadBuilder", {
335
335
  enumerable: true,
336
- get: function () { return chunkGCMQUM6N_cjs.AssetUploadBuilder; }
337
- });
338
- Object.defineProperty(exports, "AuthenticationError", {
339
- enumerable: true,
340
- get: function () { return chunkGCMQUM6N_cjs.AuthenticationError; }
336
+ get: function () { return chunkVH2DE7HZ_cjs.AssetUploadBuilder; }
341
337
  });
342
338
  Object.defineProperty(exports, "AuthorizationError", {
343
339
  enumerable: true,
344
- get: function () { return chunkGCMQUM6N_cjs.AuthorizationError; }
340
+ get: function () { return chunkVH2DE7HZ_cjs.AuthorizationError; }
345
341
  });
346
342
  Object.defineProperty(exports, "AutocompleteBuilder", {
347
343
  enumerable: true,
348
- get: function () { return chunkGCMQUM6N_cjs.AutocompleteBuilder; }
344
+ get: function () { return chunkVH2DE7HZ_cjs.AutocompleteBuilder; }
349
345
  });
350
346
  Object.defineProperty(exports, "BaseValidationError", {
351
347
  enumerable: true,
352
- get: function () { return chunkGCMQUM6N_cjs.BaseValidationError; }
348
+ get: function () { return chunkVH2DE7HZ_cjs.BaseValidationError; }
353
349
  });
354
350
  Object.defineProperty(exports, "BatchBuilder", {
355
351
  enumerable: true,
356
- get: function () { return chunkGCMQUM6N_cjs.BatchBuilder; }
352
+ get: function () { return chunkVH2DE7HZ_cjs.BatchBuilder; }
357
353
  });
358
354
  Object.defineProperty(exports, "BatchClient", {
359
355
  enumerable: true,
360
- get: function () { return chunkGCMQUM6N_cjs.BatchClient; }
356
+ get: function () { return chunkVH2DE7HZ_cjs.BatchClient; }
361
357
  });
362
358
  Object.defineProperty(exports, "ChangesExpiredError", {
363
359
  enumerable: true,
364
- get: function () { return chunkGCMQUM6N_cjs.ChangesExpiredError; }
360
+ get: function () { return chunkVH2DE7HZ_cjs.ChangesExpiredError; }
365
361
  });
366
362
  Object.defineProperty(exports, "ConnectionError", {
367
363
  enumerable: true,
368
- get: function () { return chunkGCMQUM6N_cjs.ConnectionError; }
364
+ get: function () { return chunkVH2DE7HZ_cjs.ConnectionError; }
369
365
  });
370
366
  Object.defineProperty(exports, "ContentByIdBuilder", {
371
367
  enumerable: true,
372
- get: function () { return chunkGCMQUM6N_cjs.ContentByIdBuilder; }
368
+ get: function () { return chunkVH2DE7HZ_cjs.ContentByIdBuilder; }
373
369
  });
374
370
  Object.defineProperty(exports, "ContentClient", {
375
371
  enumerable: true,
376
- get: function () { return chunkGCMQUM6N_cjs.ContentClient; }
372
+ get: function () { return chunkVH2DE7HZ_cjs.ContentClient; }
377
373
  });
378
374
  Object.defineProperty(exports, "ContentQueryBuilder", {
379
375
  enumerable: true,
380
- get: function () { return chunkGCMQUM6N_cjs.ContentQueryBuilder; }
376
+ get: function () { return chunkVH2DE7HZ_cjs.ContentQueryBuilder; }
381
377
  });
382
378
  Object.defineProperty(exports, "ErrorMapper", {
383
379
  enumerable: true,
384
- get: function () { return chunkGCMQUM6N_cjs.ErrorMapper; }
380
+ get: function () { return chunkVH2DE7HZ_cjs.ErrorMapper; }
385
381
  });
386
382
  Object.defineProperty(exports, "FileUploadError", {
387
383
  enumerable: true,
388
- get: function () { return chunkGCMQUM6N_cjs.FileUploadError; }
384
+ get: function () { return chunkVH2DE7HZ_cjs.FileUploadError; }
389
385
  });
390
386
  Object.defineProperty(exports, "FileValidationError", {
391
387
  enumerable: true,
392
- get: function () { return chunkGCMQUM6N_cjs.FileValidationError; }
388
+ get: function () { return chunkVH2DE7HZ_cjs.FileValidationError; }
393
389
  });
394
390
  Object.defineProperty(exports, "HttpClient", {
395
391
  enumerable: true,
396
- get: function () { return chunkGCMQUM6N_cjs.HttpClient; }
392
+ get: function () { return chunkVH2DE7HZ_cjs.HttpClient; }
397
393
  });
398
394
  Object.defineProperty(exports, "InvalidApiKeyError", {
399
395
  enumerable: true,
400
- get: function () { return chunkGCMQUM6N_cjs.InvalidApiKeyError; }
401
- });
402
- Object.defineProperty(exports, "InvalidFieldTypeError", {
403
- enumerable: true,
404
- get: function () { return chunkGCMQUM6N_cjs.InvalidFieldTypeError; }
396
+ get: function () { return chunkVH2DE7HZ_cjs.InvalidApiKeyError; }
405
397
  });
406
398
  Object.defineProperty(exports, "InvalidPayloadError", {
407
399
  enumerable: true,
408
- get: function () { return chunkGCMQUM6N_cjs.InvalidPayloadError; }
400
+ get: function () { return chunkVH2DE7HZ_cjs.InvalidPayloadError; }
409
401
  });
410
402
  Object.defineProperty(exports, "MethodNotAllowedError", {
411
403
  enumerable: true,
412
- get: function () { return chunkGCMQUM6N_cjs.MethodNotAllowedError; }
404
+ get: function () { return chunkVH2DE7HZ_cjs.MethodNotAllowedError; }
413
405
  });
414
406
  Object.defineProperty(exports, "MissingApiKeyError", {
415
407
  enumerable: true,
416
- get: function () { return chunkGCMQUM6N_cjs.MissingApiKeyError; }
408
+ get: function () { return chunkVH2DE7HZ_cjs.MissingApiKeyError; }
417
409
  });
418
410
  Object.defineProperty(exports, "NetworkError", {
419
411
  enumerable: true,
420
- get: function () { return chunkGCMQUM6N_cjs.NetworkError; }
412
+ get: function () { return chunkVH2DE7HZ_cjs.NetworkError; }
421
413
  });
422
414
  Object.defineProperty(exports, "PayloadTooLargeError", {
423
415
  enumerable: true,
424
- get: function () { return chunkGCMQUM6N_cjs.PayloadTooLargeError; }
416
+ get: function () { return chunkVH2DE7HZ_cjs.PayloadTooLargeError; }
425
417
  });
426
418
  Object.defineProperty(exports, "PlanFeatureUnavailableError", {
427
419
  enumerable: true,
428
- get: function () { return chunkGCMQUM6N_cjs.PlanFeatureUnavailableError; }
420
+ get: function () { return chunkVH2DE7HZ_cjs.PlanFeatureUnavailableError; }
429
421
  });
430
422
  Object.defineProperty(exports, "RateLimitError", {
431
423
  enumerable: true,
432
- get: function () { return chunkGCMQUM6N_cjs.RateLimitError; }
424
+ get: function () { return chunkVH2DE7HZ_cjs.RateLimitError; }
433
425
  });
434
426
  Object.defineProperty(exports, "ReadOnlyKeyError", {
435
427
  enumerable: true,
436
- get: function () { return chunkGCMQUM6N_cjs.ReadOnlyKeyError; }
437
- });
438
- Object.defineProperty(exports, "RequiredFieldError", {
439
- enumerable: true,
440
- get: function () { return chunkGCMQUM6N_cjs.RequiredFieldError; }
428
+ get: function () { return chunkVH2DE7HZ_cjs.ReadOnlyKeyError; }
441
429
  });
442
430
  Object.defineProperty(exports, "ResourceConflictError", {
443
431
  enumerable: true,
444
- get: function () { return chunkGCMQUM6N_cjs.ResourceConflictError; }
432
+ get: function () { return chunkVH2DE7HZ_cjs.ResourceConflictError; }
445
433
  });
446
434
  Object.defineProperty(exports, "ResourceExpiredError", {
447
435
  enumerable: true,
448
- get: function () { return chunkGCMQUM6N_cjs.ResourceExpiredError; }
436
+ get: function () { return chunkVH2DE7HZ_cjs.ResourceExpiredError; }
449
437
  });
450
438
  Object.defineProperty(exports, "ResourceNotFoundError", {
451
439
  enumerable: true,
452
- get: function () { return chunkGCMQUM6N_cjs.ResourceNotFoundError; }
440
+ get: function () { return chunkVH2DE7HZ_cjs.ResourceNotFoundError; }
453
441
  });
454
442
  Object.defineProperty(exports, "SDKError", {
455
443
  enumerable: true,
456
- get: function () { return chunkGCMQUM6N_cjs.SDKError; }
457
- });
458
- Object.defineProperty(exports, "SchemaValidationError", {
459
- enumerable: true,
460
- get: function () { return chunkGCMQUM6N_cjs.SchemaValidationError; }
444
+ get: function () { return chunkVH2DE7HZ_cjs.SDKError; }
461
445
  });
462
446
  Object.defineProperty(exports, "SearchBuilder", {
463
447
  enumerable: true,
464
- get: function () { return chunkGCMQUM6N_cjs.SearchBuilder; }
448
+ get: function () { return chunkVH2DE7HZ_cjs.SearchBuilder; }
465
449
  });
466
450
  Object.defineProperty(exports, "SearchClient", {
467
451
  enumerable: true,
468
- get: function () { return chunkGCMQUM6N_cjs.SearchClient; }
452
+ get: function () { return chunkVH2DE7HZ_cjs.SearchClient; }
469
453
  });
470
454
  Object.defineProperty(exports, "ServerError", {
471
455
  enumerable: true,
472
- get: function () { return chunkGCMQUM6N_cjs.ServerError; }
456
+ get: function () { return chunkVH2DE7HZ_cjs.ServerError; }
473
457
  });
474
458
  Object.defineProperty(exports, "ServiceIndeterminateError", {
475
459
  enumerable: true,
476
- get: function () { return chunkGCMQUM6N_cjs.ServiceIndeterminateError; }
460
+ get: function () { return chunkVH2DE7HZ_cjs.ServiceIndeterminateError; }
477
461
  });
478
462
  Object.defineProperty(exports, "SettingsClient", {
479
463
  enumerable: true,
480
- get: function () { return chunkGCMQUM6N_cjs.SettingsClient; }
464
+ get: function () { return chunkVH2DE7HZ_cjs.SettingsClient; }
481
465
  });
482
466
  Object.defineProperty(exports, "SimilarBuilder", {
483
467
  enumerable: true,
484
- get: function () { return chunkGCMQUM6N_cjs.SimilarBuilder; }
468
+ get: function () { return chunkVH2DE7HZ_cjs.SimilarBuilder; }
485
469
  });
486
470
  Object.defineProperty(exports, "SingletonClient", {
487
471
  enumerable: true,
488
- get: function () { return chunkGCMQUM6N_cjs.SingletonClient; }
472
+ get: function () { return chunkVH2DE7HZ_cjs.SingletonClient; }
489
473
  });
490
474
  Object.defineProperty(exports, "TimeoutError", {
491
475
  enumerable: true,
492
- get: function () { return chunkGCMQUM6N_cjs.TimeoutError; }
476
+ get: function () { return chunkVH2DE7HZ_cjs.TimeoutError; }
493
477
  });
494
478
  Object.defineProperty(exports, "TransactionRolledBackError", {
495
479
  enumerable: true,
496
- get: function () { return chunkGCMQUM6N_cjs.TransactionRolledBackError; }
480
+ get: function () { return chunkVH2DE7HZ_cjs.TransactionRolledBackError; }
497
481
  });
498
482
  Object.defineProperty(exports, "TypedRelyIOClient", {
499
483
  enumerable: true,
500
- get: function () { return chunkGCMQUM6N_cjs.TypedRelyIOClient; }
484
+ get: function () { return chunkVH2DE7HZ_cjs.TypedRelyIOClient; }
501
485
  });
502
486
  Object.defineProperty(exports, "UnknownContractError", {
503
487
  enumerable: true,
504
- get: function () { return chunkGCMQUM6N_cjs.UnknownContractError; }
488
+ get: function () { return chunkVH2DE7HZ_cjs.UnknownContractError; }
505
489
  });
506
490
  Object.defineProperty(exports, "UsageQuotaExceededError", {
507
491
  enumerable: true,
508
- get: function () { return chunkGCMQUM6N_cjs.UsageQuotaExceededError; }
492
+ get: function () { return chunkVH2DE7HZ_cjs.UsageQuotaExceededError; }
509
493
  });
510
494
  Object.defineProperty(exports, "ValidationError", {
511
495
  enumerable: true,
512
- get: function () { return chunkGCMQUM6N_cjs.ValidationError; }
496
+ get: function () { return chunkVH2DE7HZ_cjs.ValidationError; }
513
497
  });
514
498
  Object.defineProperty(exports, "createClient", {
515
499
  enumerable: true,
516
- get: function () { return chunkGCMQUM6N_cjs.createClient; }
500
+ get: function () { return chunkVH2DE7HZ_cjs.createClient; }
517
501
  });
518
502
  Object.defineProperty(exports, "default", {
519
503
  enumerable: true,
520
- get: function () { return chunkGCMQUM6N_cjs.createClient; }
504
+ get: function () { return chunkVH2DE7HZ_cjs.createClient; }
521
505
  });
522
506
  Object.defineProperty(exports, "entityTagOf", {
523
507
  enumerable: true,
524
- get: function () { return chunkGCMQUM6N_cjs.entityTagOf; }
508
+ get: function () { return chunkVH2DE7HZ_cjs.entityTagOf; }
525
509
  });
526
510
  Object.defineProperty(exports, "isAssetEntry", {
527
511
  enumerable: true,
528
- get: function () { return chunkGCMQUM6N_cjs.isAssetEntry; }
512
+ get: function () { return chunkVH2DE7HZ_cjs.isAssetEntry; }
529
513
  });
530
514
  Object.defineProperty(exports, "isResourceNotFound", {
531
515
  enumerable: true,
532
- get: function () { return chunkGCMQUM6N_cjs.isResourceNotFound; }
516
+ get: function () { return chunkVH2DE7HZ_cjs.isResourceNotFound; }
533
517
  });
534
518
  Object.defineProperty(exports, "matchRoute", {
535
519
  enumerable: true,
536
- get: function () { return chunkGCMQUM6N_cjs.matchRoute; }
520
+ get: function () { return chunkVH2DE7HZ_cjs.matchRoute; }
537
521
  });
538
522
  Object.defineProperty(exports, "validateFile", {
539
523
  enumerable: true,
540
- get: function () { return chunkGCMQUM6N_cjs.validateFile; }
524
+ get: function () { return chunkVH2DE7HZ_cjs.validateFile; }
541
525
  });
542
526
  Object.defineProperty(exports, "camelToSnake", {
543
527
  enumerable: true,
544
- get: function () { return chunkHT6NFRM2_cjs.camelToSnake; }
528
+ get: function () { return chunkTZL374LS_cjs.camelToSnake; }
545
529
  });
546
530
  Object.defineProperty(exports, "createDeferred", {
547
531
  enumerable: true,
548
- get: function () { return chunkHT6NFRM2_cjs.createDeferred; }
532
+ get: function () { return chunkTZL374LS_cjs.createDeferred; }
549
533
  });
550
534
  Object.defineProperty(exports, "debounce", {
551
535
  enumerable: true,
552
- get: function () { return chunkHT6NFRM2_cjs.debounce; }
536
+ get: function () { return chunkTZL374LS_cjs.debounce; }
553
537
  });
554
538
  Object.defineProperty(exports, "deepClone", {
555
539
  enumerable: true,
556
- get: function () { return chunkHT6NFRM2_cjs.deepClone; }
540
+ get: function () { return chunkTZL374LS_cjs.deepClone; }
557
541
  });
558
542
  Object.defineProperty(exports, "generateId", {
559
543
  enumerable: true,
560
- get: function () { return chunkHT6NFRM2_cjs.generateId; }
544
+ get: function () { return chunkTZL374LS_cjs.generateId; }
561
545
  });
562
546
  Object.defineProperty(exports, "isBrowser", {
563
547
  enumerable: true,
564
- get: function () { return chunkHT6NFRM2_cjs.isBrowser; }
548
+ get: function () { return chunkTZL374LS_cjs.isBrowser; }
565
549
  });
566
550
  Object.defineProperty(exports, "isNode", {
567
551
  enumerable: true,
568
- get: function () { return chunkHT6NFRM2_cjs.isNode; }
552
+ get: function () { return chunkTZL374LS_cjs.isNode; }
569
553
  });
570
554
  Object.defineProperty(exports, "isPlainObject", {
571
555
  enumerable: true,
572
- get: function () { return chunkHT6NFRM2_cjs.isPlainObject; }
556
+ get: function () { return chunkTZL374LS_cjs.isPlainObject; }
573
557
  });
574
558
  Object.defineProperty(exports, "isValidEmail", {
575
559
  enumerable: true,
576
- get: function () { return chunkHT6NFRM2_cjs.isValidEmail; }
560
+ get: function () { return chunkTZL374LS_cjs.isValidEmail; }
577
561
  });
578
562
  Object.defineProperty(exports, "isValidUrl", {
579
563
  enumerable: true,
580
- get: function () { return chunkHT6NFRM2_cjs.isValidUrl; }
564
+ get: function () { return chunkTZL374LS_cjs.isValidUrl; }
581
565
  });
582
566
  Object.defineProperty(exports, "mergeDeep", {
583
567
  enumerable: true,
584
- get: function () { return chunkHT6NFRM2_cjs.mergeDeep; }
568
+ get: function () { return chunkTZL374LS_cjs.mergeDeep; }
585
569
  });
586
570
  Object.defineProperty(exports, "omit", {
587
571
  enumerable: true,
588
- get: function () { return chunkHT6NFRM2_cjs.omit; }
572
+ get: function () { return chunkTZL374LS_cjs.omit; }
589
573
  });
590
574
  Object.defineProperty(exports, "pick", {
591
575
  enumerable: true,
592
- get: function () { return chunkHT6NFRM2_cjs.pick; }
576
+ get: function () { return chunkTZL374LS_cjs.pick; }
593
577
  });
594
578
  Object.defineProperty(exports, "retry", {
595
579
  enumerable: true,
596
- get: function () { return chunkHT6NFRM2_cjs.retry; }
580
+ get: function () { return chunkTZL374LS_cjs.retry; }
597
581
  });
598
582
  Object.defineProperty(exports, "sleep", {
599
583
  enumerable: true,
600
- get: function () { return chunkHT6NFRM2_cjs.sleep; }
584
+ get: function () { return chunkTZL374LS_cjs.sleep; }
601
585
  });
602
586
  Object.defineProperty(exports, "snakeToCamel", {
603
587
  enumerable: true,
604
- get: function () { return chunkHT6NFRM2_cjs.snakeToCamel; }
588
+ get: function () { return chunkTZL374LS_cjs.snakeToCamel; }
605
589
  });
606
590
  Object.defineProperty(exports, "throttle", {
607
591
  enumerable: true,
608
- get: function () { return chunkHT6NFRM2_cjs.throttle; }
592
+ get: function () { return chunkTZL374LS_cjs.throttle; }
609
593
  });
610
594
  Object.defineProperty(exports, "toSafeString", {
611
595
  enumerable: true,
612
- get: function () { return chunkHT6NFRM2_cjs.toSafeString; }
596
+ get: function () { return chunkTZL374LS_cjs.toSafeString; }
613
597
  });
614
598
  exports.FOLLOW_RETRY_BASE_MS = FOLLOW_RETRY_BASE_MS;
615
599
  exports.FOLLOW_RETRY_MAX_MS = FOLLOW_RETRY_MAX_MS;
package/dist/index.d.cts CHANGED
@@ -1,11 +1,12 @@
1
- import { C as ChangesExpiredError, a as Change, b as ChangesExpiredReason } from './index-Df1VsfJR.cjs';
2
- export { A as ActiveSandbox, a1 as AdhocAggregateBlock, a0 as AdhocFetchBlock, $ as AdhocQueryBuilder, _ as AdhocQueryClient, a7 as AdhocQueryDefinition, a8 as AdhocQueryOptions, aa as AdhocQueryResult, a3 as AdhocSearchBlock, a4 as AdhocSimilarBlock, a2 as AggregateMetric, ab as AssetClient, al as AssetEntryResponse, ai as AssetFileBlock, ac as AssetFileBuilder, aj as AssetFileExtracted, ad as AssetUploadBuilder, ak as AssetUrls, af as AssetVisibility, w as AutocompleteBuilder, F as AutocompleteResponse, D as AutocompleteSuggestion, Q as BatchBuilder, O as BatchClient, U as BatchMethod, V as BatchOperation, X as BatchOperationResult, W as BatchOptions, Z as BatchResponse, Y as BatchSummary, k as ChangesHeadOptions, l as ChangesOptions, r as ChildrenOptions, e as ClientSchema, i as ConditionalWriteOptions, ap as ConfirmInput, aq as ConfirmResult, q as ContentByIdBuilder, m as ContentClient, p as ContentQueryBuilder, at as CreateAssetOptions, E as ExtendedQueryResult, ah as FileBackend, aD as FileErrorCode, ag as FileStatus, aE as FileUploadError, aG as FileValidationConstraints, aF as FileValidationError, a5 as FilterValue, a6 as FullTextConfig, H as HttpClient, av as MultipartCreateResult, aw as MultipartPart, ax as MultipartTarget, am as PopulatedAssetReference, an as PresignInput, ao as PresignResult, P as Project, a9 as QueryMetadata, R as Register, f as RegisteredSchema, ar as ResolveUrlInput, as as ResolveUrlResult, aA as ResourceConflictError, aB as ResourceExpiredError, az as ResourceNotFoundError, j as RetryableWriteOptions, S as SandboxState, v as SearchBuilder, u as SearchClient, N as SearchEntry, K as SearchFields, J as SearchFilter, y as SearchMode, B as SearchResponse, z as SearchResultItem, L as SearchSort, M as SearchTypeName, g as SendOptions, o as SettingsClient, t as SettingsFetchOptions, x as SimilarBuilder, I as SimilarResponse, G as SimilarResult, n as SingletonClient, s as SingletonFetchOptions, d as TypedClientConfig, T as TypedRelyIOClient, ay as UploadProgress, au as WaitUntilReadyOptions, c as createClient, c as default, h as entityTagOf, ae as isAssetEntry, aC as isResourceNotFound, aH as validateFile } from './index-Df1VsfJR.cjs';
1
+ import { C as ChangesExpiredError, a as Change, b as ChangesExpiredReason } from './index-M0X45k7J.cjs';
2
+ export { A as ActiveSandbox, a2 as AdhocAggregateBlock, a1 as AdhocFetchBlock, a0 as AdhocQueryBuilder, $ as AdhocQueryClient, a7 as AdhocQueryDefinition, a8 as AdhocQueryOptions, aa as AdhocQueryResult, a4 as AdhocSearchBlock, a3 as AggregateMetric, ab as AssetClient, am as AssetEntryResponse, ai as AssetFileBlock, ac as AssetFileBuilder, aj as AssetFileExtracted, ad as AssetUploadBuilder, al as AssetUrls, af as AssetVisibility, w as AutocompleteBuilder, G as AutocompleteResponse, F as AutocompleteSuggestion, U as BatchBuilder, Q as BatchClient, V as BatchMethod, W as BatchOperation, Y as BatchOperationResult, X as BatchOptions, _ as BatchResponse, Z as BatchSummary, k as ChangesHeadOptions, l as ChangesOptions, r as ChildrenOptions, e as ClientSchema, i as ConditionalWriteOptions, aq as ConfirmInput, ar as ConfirmResult, q as ContentByIdBuilder, m as ContentClient, p as ContentQueryBuilder, au as CreateAssetOptions, E as ExtendedQueryResult, ah as FileBackend, aE as FileErrorCode, ag as FileStatus, ak as FileStatusResult, aG as FileUploadError, aF as FileUploadErrorCode, aI as FileValidationConstraints, aH as FileValidationError, a5 as FilterValue, a6 as FullTextConfig, H as HttpClient, aw as MultipartCreateResult, ax as MultipartPart, ay as MultipartTarget, an as PopulatedAssetReference, ao as PresignInput, ap as PresignResult, P as Project, a9 as QueryMetadata, R as Register, f as RegisteredSchema, as as ResolveUrlInput, at as ResolveUrlResult, aB as ResourceConflictError, aC as ResourceExpiredError, aA as ResourceNotFoundError, j as RetryableWriteOptions, S as SandboxState, v as SearchBuilder, u as SearchClient, O as SearchEntry, L as SearchFields, K as SearchFilter, B as SearchHitMetadata, y as SearchMode, D as SearchResponse, z as SearchResultItem, M as SearchSort, N as SearchTypeName, g as SendOptions, o as SettingsClient, t as SettingsFetchOptions, x as SimilarBuilder, J as SimilarResponse, I as SimilarResult, n as SingletonClient, s as SingletonFetchOptions, d as TypedClientConfig, T as TypedRelyIOClient, az as UploadProgress, av as WaitUntilReadyOptions, c as createClient, c as default, h as entityTagOf, ae as isAssetEntry, aD as isResourceNotFound, aJ as validateFile } from './index-M0X45k7J.cjs';
3
3
  export { fields } from './schema/index.cjs';
4
- import { S as SDKError, B as BaseContent } from './index-d1Kz1e19.cjs';
5
- export { a as ApiMethod, A as ApiPath, v as ApiResponse, b as ApiSuccessBody, z as BaseValidationError, s as CacheConfig, x as CacheStrategy, i as ContentQueryResult, n as ContentTypeSchema, C as CreateInput, l as CustomQuery, D as DebugConfig, E as Environment, o as FieldOptions, F as FieldTypeName, K as InvalidFieldTypeError, I as InvalidPayloadError, L as LogLevel, M as MatchRouteOptions, P as PerformanceMetrics, Q as QueryOptions, t as RealtimeConfig, q as RealtimeEvent, p as RealtimeEventType, R as RelyIOConfig, u as RequestConfig, J as RequiredFieldError, w as RetryConfig, c as RouteMatch, H as SchemaValidationError, k as SettingsGroup, j as SingletonContent, h as SortOptions, r as SubscriptionOptions, U as UpdateInput, G as ValidationError, V as ValidationRule, y as ValidationViolation, f as WhereClause, e as WhereFieldCondition, g as WhereOperator, d as WhereScalar, W as Wire, m as matchRoute } from './index-d1Kz1e19.cjs';
4
+ import { S as SDKError, B as BaseContent } from './index-DbsTUw3Q.cjs';
5
+ export { b as ApiMethod, A as ApiPath, v as ApiResponse, c as ApiSuccessBody, z as BaseValidationError, s as CacheConfig, x as CacheStrategy, j as ContentQueryResult, n as ContentTypeSchema, C as CreateInput, l as CustomQuery, D as DebugConfig, E as Environment, o as FieldOptions, F as FieldTypeName, I as InvalidPayloadError, L as LogLevel, M as MatchRouteOptions, P as PerformanceMetrics, Q as QueryOptions, t as RealtimeConfig, q as RealtimeEvent, p as RealtimeEventType, R as RelyIOConfig, a as RelyIOConfigUpdate, u as RequestConfig, w as RetryConfig, d as RouteMatch, k as SingletonContent, i as SortOptions, r as SubscriptionOptions, U as UpdateInput, G as ValidationError, V as ValidationRule, y as ValidationViolation, g as WhereClause, f as WhereFieldCondition, h as WhereOperator, e as WhereScalar, W as Wire, m as matchRoute } from './index-DbsTUw3Q.cjs';
6
6
  export { camelToSnake, createDeferred, debounce, deepClone, generateId, isBrowser, isNode, isPlainObject, isValidEmail, isValidUrl, mergeDeep, omit, pick, retry, sleep, snakeToCamel, throttle, toSafeString } from './utils/index.cjs';
7
- export { a6 as AggregateBlock, C as ComponentConfig, s as ComponentDefinition, t as ComponentMetadata, a5 as FetchBlock, ag as FilterDefinition, ae as IncludeDefinition, aq as InferQueryParams, ap as InferQueryResponse, a3 as QueryConfig, a4 as QueryDefinition, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, i as SchemaEntry, j as SchemaEntryOf, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, a7 as SearchBlock, af as SelectMapping, x as SettingsGroupConfig, y as SettingsGroupDefinition, a8 as SimilarBlock, ac as SortCondition, a9 as WhereCondition, r as defineComponent, a2 as defineQuery, d as defineSchema, w as defineSettingsGroup } from './define-schema-1kr2HIzN.cjs';
8
- export { a2 as AssetTypeConfig, a5 as AssetTypeDefinition, n as BaseFieldConfig, K as ContentTypeConfig, M as ContentTypeConfigWithFields, N as ContentTypeConfigWithFieldsets, O as ContentTypeDefinition, P as EntryMetadata, c as FieldDefinition, b as FieldRule, u as FieldSchemaContext, o as FieldType, F as FieldUIConfig, v as FieldValue, w as FieldValues, J as Fieldset, a9 as FileKindConfig, an as FileScanConfig, am as FileUploadConfig, af as ImageExifConfig, a7 as ImageKindConfig, ae as ImageSourceConfig, ad as ImageUploadConfig, a6 as InferAssetType, Q as InferContentType, a0 as InferSingleton, $ as InferSingletonContentType, W as LocalePublicationFields, L as LocalizationConfig, Z as SingletonContentTypeDefinition, _ as SingletonMetadata, z as UnresolvedComponent, y as UnresolvedEntry, ag as VariantDefinition, aj as VideoCaptionsConfig, ak as VideoDownloadConfig, a8 as VideoKindConfig, ai as VideoPosterConfig, ah as VideoUploadConfig, al as VideoWatermarkConfig, a1 as defineAssetType, G as defineContentType, Y as defineSingleton, X as defineSingletonContentType, H as fieldset } from './define-content-type-CDB3kyeA.cjs';
7
+ import { Q as EntryMetadata } from './define-content-type-DiVpbwNs.cjs';
8
+ export { a5 as AssetTypeConfig, a9 as AssetTypeDefinition, n as BaseFieldConfig, M as ContentTypeConfig, N as ContentTypeConfigWithFields, O as ContentTypeConfigWithFieldsets, P as ContentTypeDefinition, c as FieldDefinition, b as FieldRule, v as FieldSchemaContext, p as FieldType, F as FieldUIConfig, w as FieldValue, x as FieldValues, K as Fieldset, ad as FileKindConfig, ar as FileScanConfig, aq as FileUploadConfig, aj as ImageExifConfig, ab as ImageKindConfig, ai as ImageSourceConfig, ah as ImageUploadConfig, aa as InferAssetType, W as InferContentType, a3 as InferSingleton, a2 as InferSingletonContentType, X as LocalePublicationFields, L as LocalizationConfig, a0 as SingletonContentTypeDefinition, a1 as SingletonMetadata, G as UnresolvedComponent, z as UnresolvedEntry, ak as VariantDefinition, an as VideoCaptionsConfig, ao as VideoDownloadConfig, ac as VideoKindConfig, am as VideoPosterConfig, al as VideoUploadConfig, ap as VideoWatermarkConfig, a4 as defineAssetType, H as defineContentType, Z as defineSingleton, Y as defineSingletonContentType, J as fieldset } from './define-content-type-DiVpbwNs.cjs';
9
+ export { aa as AggregateBlock, C as ComponentConfig, s as ComponentDefinition, t as ComponentMetadata, a9 as FetchBlock, an as FilterDefinition, aj as IncludeDefinition, ax as InferQueryParams, aw as InferQueryResponse, a5 as QueryConfig, a6 as QueryDefinition, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, i as SchemaEntry, j as SchemaEntryOf, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, ab as SearchBlock, am as SelectMapping, x as SettingsGroupConfig, y as SettingsGroupDefinition, ah as SortCondition, ac as WhereCondition, r as defineComponent, a4 as defineQuery, d as defineSchema, w as defineSettingsGroup } from './define-schema-D7MButVt.cjs';
9
10
  import './dev-handshake/index.cjs';
10
11
 
11
12
  /**
@@ -279,13 +280,13 @@ declare class ConnectionError extends SDKError {
279
280
  * (`INV-API-CODES-ARE-A-CLOSED-UNION`: a code no route declares is deleted, not
280
281
  * retained). An API key that has expired arrives as `INVALID_API_KEY` with
281
282
  * `details.reason: 'expired'`.
283
+ *
284
+ * `AuthenticationError` was deleted by REL-1471 for the same reason. The
285
+ * vocabulary's two 401 codes are `MISSING_API_KEY` and `INVALID_API_KEY`, and
286
+ * the mapper throws `MissingApiKeyError` and `InvalidApiKeyError` for them —
287
+ * so a generic 401 class had no refusal left to stand for, and nothing
288
+ * constructed it.
282
289
  */
283
- declare class AuthenticationError extends SDKError {
284
- readonly code = "AUTHENTICATION_ERROR";
285
- readonly retryable = false;
286
- constructor(message?: string, statusCode?: number, cause?: Error, context?: Record<string, unknown>);
287
- getUserMessage(): string;
288
- }
289
290
  declare class AuthorizationError extends SDKError {
290
291
  readonly code = "AUTHORIZATION_ERROR";
291
292
  readonly retryable = false;
@@ -508,28 +509,27 @@ declare class ErrorMapper {
508
509
  * })
509
510
  * ```
510
511
  */
512
+
511
513
  /**
512
- * Locale status information from entry metadata
514
+ * One locale an entry has content in, as `_metadata.availableLocales` lists it: the document's
515
+ * `EntryLocale`. `version` is that locale's own counter and is always sent.
513
516
  */
514
- interface LocaleStatus {
515
- code: string;
516
- status: 'published' | 'draft' | 'archived';
517
- version?: number;
518
- publishedAt?: string;
519
- }
517
+ type LocaleStatus = EntryMetadata['availableLocales'][number];
520
518
  /**
521
- * Entry metadata with locale information
519
+ * The locale facts of an entry's `_metadata` that these helpers read — a `Pick` of the document's
520
+ * `EntryMetadata`, so what they read is what a read declares, not a second, looser copy of it.
521
+ * `locale`, `defaultLocale` and `availableLocales` are always sent; `requestedLocale`,
522
+ * `localeFallbacksApplied` and `localizations` only when the request asked for them.
522
523
  */
523
- interface LocaleMetadata {
524
- locale?: string;
525
- requestedLocale?: string;
526
- defaultLocale?: string;
527
- localeFallbacksApplied?: Record<string, string>;
528
- availableLocales?: LocaleStatus[];
529
- localizations?: Record<string, unknown>;
530
- }
524
+ type LocaleMetadata = Pick<EntryMetadata, 'locale' | 'requestedLocale' | 'defaultLocale' | 'localeFallbacksApplied' | 'availableLocales' | 'localizations'>;
531
525
  /**
532
- * Entry with locale metadata
526
+ * Entry with locale metadata: an entry read — single, listed, a child or an expanded reference.
527
+ *
528
+ * Not a search or similar hit: a hit's `_metadata` is the document's `SearchHitMetadata`, which
529
+ * carries no `defaultLocale` or `availableLocales`, so passing one here is a compile error rather
530
+ * than an empty answer. That is what let the helpers below read `availableLocales` without an
531
+ * optional chain (REL-1413); the one on `_metadata` stays because a schema-defined query's row
532
+ * carries `_metadata` only when the query selects it.
533
533
  */
534
534
  interface LocalizedEntry {
535
535
  _metadata?: LocaleMetadata;
@@ -541,7 +541,7 @@ interface LocalizedEntry {
541
541
  interface LanguageSwitcherOption {
542
542
  code: string;
543
543
  label: string;
544
- status: 'published' | 'draft' | 'archived';
544
+ status: LocaleStatus['status'];
545
545
  isCurrent: boolean;
546
546
  isDefault: boolean;
547
547
  hasContent: boolean;
@@ -895,4 +895,4 @@ declare function snapToLadder(value: number): number;
895
895
 
896
896
  declare const VERSION = "__VERSION__";
897
897
 
898
- export { AuthenticationError, AuthorizationError, BaseContent, Change, type ChangeSource, type ChangeSourceOptions, ChangesExpiredError, ChangesExpiredReason, ConnectionError, ErrorMapper, FOLLOW_RETRY_BASE_MS, FOLLOW_RETRY_MAX_MS, type FollowEnd, type FollowOptions, type FollowResync, type FollowState, type FollowVerdict, IMAGE_LADDER, InvalidApiKeyError, type LanguageSwitcherOption, type LanguageSwitcherOptions, type LocaleMetadata, type LocaleStatus, type LocalizedEntry, MethodNotAllowedError, MissingApiKeyError, NetworkError, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, RELYIO_CHANGE_EVENT, RELYIO_RESYNC_EVENT, RateLimitError, ReadOnlyKeyError, type RelyIOChangeDetail, type RelyIOFieldAttributes, type RelyIOFieldName, type RelyIOResyncDetail, SDKError, ServerError, ServiceIndeterminateError, TimeoutError, TransactionRolledBackError, type TranslationCompleteness, UnknownContractError, UsageQuotaExceededError, VERSION, buildLanguageSwitcher, classifyFollowFailure, estimateTranslationCompleteness, followChanges, getAllLocalizedValues, getAvailableLocaleCodes, getDefaultLocale, getFallbackFields, getFieldFallbackLocale, getLocalizedField, getPublishedLocaleCodes, getRequestedLocale, hasLocale, isFieldFallback, isPublishableKey, isPublishedInLocale, localeHelpers, needsTranslation, relyioField, snapToLadder };
898
+ export { AuthorizationError, BaseContent, Change, type ChangeSource, type ChangeSourceOptions, ChangesExpiredError, ChangesExpiredReason, ConnectionError, EntryMetadata, ErrorMapper, FOLLOW_RETRY_BASE_MS, FOLLOW_RETRY_MAX_MS, type FollowEnd, type FollowOptions, type FollowResync, type FollowState, type FollowVerdict, IMAGE_LADDER, InvalidApiKeyError, type LanguageSwitcherOption, type LanguageSwitcherOptions, type LocaleMetadata, type LocaleStatus, type LocalizedEntry, MethodNotAllowedError, MissingApiKeyError, NetworkError, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, RELYIO_CHANGE_EVENT, RELYIO_RESYNC_EVENT, RateLimitError, ReadOnlyKeyError, type RelyIOChangeDetail, type RelyIOFieldAttributes, type RelyIOFieldName, type RelyIOResyncDetail, SDKError, ServerError, ServiceIndeterminateError, TimeoutError, TransactionRolledBackError, type TranslationCompleteness, UnknownContractError, UsageQuotaExceededError, VERSION, buildLanguageSwitcher, classifyFollowFailure, estimateTranslationCompleteness, followChanges, getAllLocalizedValues, getAvailableLocaleCodes, getDefaultLocale, getFallbackFields, getFieldFallbackLocale, getLocalizedField, getPublishedLocaleCodes, getRequestedLocale, hasLocale, isFieldFallback, isPublishableKey, isPublishedInLocale, localeHelpers, needsTranslation, relyioField, snapToLadder };