@relyio/sdk 0.17.0 → 0.18.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.
- package/CHANGELOG.md +15 -0
- package/dist/automations/index.cjs +70 -0
- package/dist/automations/index.d.cts +1309 -0
- package/dist/automations/index.d.ts +1309 -0
- package/dist/automations/index.js +5 -0
- package/dist/{chunk-RSHMA4KT.cjs → chunk-2SPPU2WG.cjs} +68 -68
- package/dist/chunk-7I3SC7SV.cjs +40 -0
- package/dist/chunk-DI6KFDBO.js +43 -0
- package/dist/chunk-EDE2H37D.js +686 -0
- package/dist/chunk-HDHBYYEY.js +36 -0
- package/dist/{chunk-6E22GYPB.cjs → chunk-IFKF72VJ.cjs} +705 -320
- package/dist/chunk-L6DXCKVQ.cjs +50 -0
- package/dist/chunk-LSI26ZN2.cjs +535 -0
- package/dist/{chunk-TZL374LS.cjs → chunk-M7MWNV3Q.cjs} +21 -21
- package/dist/{chunk-H6IBQSMM.js → chunk-NJQK5STK.js} +3 -3
- package/dist/chunk-R6E4HE7R.js +520 -0
- package/dist/chunk-SHSK7UUY.cjs +706 -0
- package/dist/{chunk-BBUB7C2Z.js → chunk-W2A4OTCI.js} +3 -3
- package/dist/chunk-W7JFHSFM.js +18718 -0
- package/dist/{chunk-5UMY6CS4.js → chunk-ZAKEY6DY.js} +3 -3
- package/dist/chunk-ZAMAR3X2.cjs +18759 -0
- package/dist/{chunk-VS2DEUTN.js → chunk-ZHTJ7GXH.js} +387 -8
- package/dist/{chunk-LSRPMNPT.cjs → chunk-ZO6QDYJG.cjs} +7 -7
- package/dist/client/index.cjs +8 -7
- package/dist/client/index.d.cts +4 -3
- package/dist/client/index.d.ts +4 -3
- package/dist/client/index.js +6 -5
- package/dist/{define-content-type-AuL9-oz6.d.cts → define-content-type-NEQDrvdq.d.cts} +3342 -805
- package/dist/{define-content-type-BGoQxqLf.d.ts → define-content-type-fb-WCD5e.d.ts} +3342 -805
- package/dist/{define-schema-DgCX9YB7.d.ts → define-schema-DZhtvLiK.d.cts} +157 -10
- package/dist/{define-schema-DkXwpp0I.d.cts → define-schema-Dlwh6l_J.d.ts} +157 -10
- package/dist/dev-handshake/index.cjs +9 -9
- package/dist/dev-handshake/index.js +2 -2
- package/dist/extensions/index.cjs +80 -0
- package/dist/extensions/index.d.cts +792 -0
- package/dist/extensions/index.d.ts +792 -0
- package/dist/extensions/index.js +76 -0
- package/dist/functions/index.cjs +68 -0
- package/dist/functions/index.d.cts +6 -0
- package/dist/functions/index.d.ts +6 -0
- package/dist/functions/index.js +59 -0
- package/dist/{index-DaMZ4FQ_.d.ts → index-C4LqrNd1.d.ts} +1 -1
- package/dist/{index-Bp4AiNT3.d.cts → index-Dnmt_UOo.d.cts} +1 -1
- package/dist/{index-DxRmKPrR.d.cts → index-DwHcL6x5.d.cts} +83 -428
- package/dist/{index-BBp8_tn9.d.ts → index-M3luH06A.d.ts} +83 -428
- package/dist/index.cjs +204 -185
- package/dist/index.d.cts +93 -13
- package/dist/index.d.ts +93 -13
- package/dist/index.js +11 -16
- package/dist/markdown/index.cjs +382 -382
- package/dist/markdown/index.js +1 -1
- package/dist/preview/index.cjs +11 -10
- package/dist/preview/index.js +3 -2
- package/dist/register-B53i97A9.d.ts +677 -0
- package/dist/register-BYCs0FpF.d.cts +677 -0
- package/dist/rich-text/index.cjs +12 -12
- package/dist/rich-text/index.d.cts +2 -2
- package/dist/rich-text/index.d.ts +2 -2
- package/dist/rich-text/index.js +2 -2
- package/dist/schema/index.cjs +62 -34
- package/dist/schema/index.d.cts +127 -5
- package/dist/schema/index.d.ts +127 -5
- package/dist/schema/index.js +2 -2
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.cjs +20 -20
- package/dist/utils/index.js +2 -2
- package/package.json +23 -5
- package/dist/chunk-6PTRZP5U.cjs +0 -433
- package/dist/chunk-DIZY6CKM.js +0 -950
- package/dist/chunk-GHYB6IZK.cjs +0 -983
- package/dist/chunk-MWMSFIWN.cjs +0 -17
- package/dist/chunk-OVMIHAYK.js +0 -411
- package/dist/chunk-XQ4QHWZE.js +0 -13
package/dist/index.d.cts
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
import { C as Change, a as ChangesExpiredError, V as VisitorRetry, b as ChangesExpiredReason } from './index-
|
|
2
|
-
export {
|
|
1
|
+
import { C as Change, a as ChangesExpiredError, V as VisitorRetry, b as ChangesExpiredReason } from './index-DwHcL6x5.cjs';
|
|
2
|
+
export { A as ActiveSandbox, aC as AdhocQuery, aD as AdhocRecord, aA as AggregateMetric, aL as AssetClient, aU as AssetEntryResponse, aM as AssetFileBuilder, aS as AssetFileExtracted, aV as AssetFileWhere, b2 as AssetPlacement, aN as AssetUploadBuilder, aP as AssetVisibility, ac as AutocompleteOptions, a7 as AutocompleteResponse, a6 as AutocompleteSuggestion, as as BatchBody, at as BatchCreate, aw as BatchDelete, az as BatchDeleteTarget, an as BatchOperationResult, av as BatchReplace, ap as BatchResponse, ax as BatchSingletonWrite, ao as BatchSummary, ay as BatchTarget, au as BatchUpdate, aq as BatchWrite, ar as BatchWriteOptions, j as ChangesHeadOptions, k as ChangesOptions, W as ChildEntry, B as ChildrenListOptions, z as ChildrenOptions, X as ChildrenRead, e as ClientDefaults, f as ClientSchema, aZ as ConfirmInput, a_ as ConfirmResult, o as ContentClient, b1 as CreateAssetOptions, p as CreateEntryOptions, g as DeployedContentType, D as DeployedLocale, t as DocumentFields, G as DocumentReadOptions, u as DocumentVersion, w as DocumentVersionRow, x as DocumentVersionsOptions, y as DocumentWriteOptions, I as EntryList, E as EntryPlacement, q as EntryWriteOptions, F as FeedChange, J as FieldKey, aR as FileBackend, be as FileErrorCode, aQ as FileStatus, aT as FileStatusResult, bg as FileUploadError, bf as FileUploadErrorCode, bi as FileValidationConstraints, bh as FileValidationError, K as FreshOption, M as GetOptions, H as Health, l as LIVE_KEEPALIVE_INTERVAL_MS, m as LIVE_SOCKET_OPEN_TIMEOUT_MS, N as ListAllOptions, O as ListOptions, n as LiveChangesOptions, L as LocaleCodeOf, Q as LocaleOption, b5 as MultipartCreateResult, b6 as MultipartPart, b7 as MultipartTarget, aE as NamedQueryOptions, aF as NamedQueryParams, U as Paging, aW as PopulatedAssetReference, aX as PresignInput, aY as PresignResult, P as Project, aG as QueryAggregate, aH as QueryAnswer, aI as QueryCall, aB as QueryMetadata, aJ as QueryName, aK as QueryTypeName, Y as ReadAs, h as ReadEntry, _ as ReadLocale, R as RecordsAccessor, a$ as ResolveUrlInput, b0 as ResolveUrlResult, ba as ResourceConflictError, bb as ResourceExpiredError, b9 as ResourceNotFoundError, i as RetryableWriteOptions, S as SandboxState, ab as SearchEntry, ad as SearchFacet, ae as SearchFieldKey, af as SearchHighlight, a4 as SearchHitMetadata, ag as SearchOptions, ah as SearchPage, a5 as SearchResponse, a3 as SearchResultItem, ai as SearchScope, aj as SearchSelected, ak as SearchSortOption, aa as SearchTypeName, al as SearchWhere, s as SettingsClient, am as SimilarOptions, a9 as SimilarResponse, a8 as SimilarResult, r as SingletonClient, $ as SortOption, d as TypedClientConfig, T as TypedRelyIOClient, b3 as UpdateAssetOptions, b8 as UploadProgress, a0 as VersionOptions, b4 as WaitUntilReadyOptions, Z as WithChildren, a1 as WrittenReadScope, a2 as WrittenSort, c as createClient, c as default, aO as isAssetEntry, bd as isMissingEntry, bc as isResourceNotFound, bj as validateFile, v as versionCheckOf } from './index-DwHcL6x5.cjs';
|
|
3
|
+
export { A as AnySchemaDefinition, f as ApiMethod, e as ApiPath, g as ApiSuccessBody, B as BaseRecord, D as DefaultRetryPolicy, H as HttpClient, M as MatchRouteOptions, y as RecordBatchOperation, z as RecordBatchOperationResult, C as RecordBatchOptions, b as RecordBatchResult, a as RecordBatchTarget, n as RecordCallOptions, c as RecordConditionValue, o as RecordFacetBucket, p as RecordFileBytes, q as RecordFileUploadOptions, s as RecordList, t as RecordListOptions, u as RecordMetadata, v as RecordReadOptions, w as RecordUpdateOptions, l as RecordsClient, d as Register, R as RegisteredSchema, j as RetryPolicy, k as RetryableRequest, h as RouteMatch, S as SendOptions, W as Wire, i as isReplaySafe, m as matchRoute, x as refusedOperationOf, r as retryPolicyFor } from './register-BYCs0FpF.cjs';
|
|
3
4
|
export { fields } from './schema/index.cjs';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
5
|
+
import { cJ as SDKError, aU as EntryMetadata } from './define-content-type-NEQDrvdq.cjs';
|
|
6
|
+
export { aP as AnyDeclaredFieldset, cI as ApiResponse, cO as AssetFileBlock, as as AssetReading, ba as AssetServedBlocks, b7 as AssetTypeDefinition, cP as AssetUrls, cQ as BaseContent, B as BaseFieldConfig, cS as BaseSettingsGroup, cR as BaseSingleton, dl as BaseValidationError, aq as BlockOf, de as CacheConfig, dh as CacheStrategy, au as CheckInclude, at as CheckedIncludes, av as ContentReading, aT as ContentTypeDefinition, d7 as ContentTypeSchema, d2 as ContentVersion, d3 as ContentVersionRow, cY as CreateInput, cZ as CreatedContent, d6 as CustomQuery, cX as DateOnlyOperator, df as DebugConfig, aO as DeclaredFieldset, dj as Environment, m as FieldDefinition, aR as FieldMember, d9 as FieldOptions, n as FieldRule, am as FieldSchemaContext, o as FieldType, p as FieldUIConfig, an as FieldValue, F as FieldValues, aN as Fieldset, bd as FileKindConfig, br as FileScanConfig, b as FileUpload, bq as FileUploadConfig, bj as ImageExifConfig, bb as ImageKindConfig, bi as ImageSourceConfig, bh as ImageUploadConfig, aw as IncludablePaths, b9 as InferAssetEntry, b8 as InferAssetType, aV as InferContentType, cr as InferJsonSchema, a$ as InferSingleton, dn as InvalidPayloadError, cs as JsonFieldValue, ct as JsonSchema, cu as JsonValue, ap as Keyed, b6 as KeyedAssetTypeConfig, aS as KeyedContentTypeConfig, r as KeyedEnumConfig, s as KeyedField, t as KeyedFieldOptions, aQ as KeyedFieldsetConfig, b1 as KeyedSettingsGroupConfig, aY as KeyedSingletonConfig, cM as LiveWebSocket, cN as LiveWebSocketConstructor, aW as LocalePublicationFields, w as LocalizationConfig, x as Localized, y as LocalizedDetails, di as LogLevel, N as NeverUniqueFieldConfig, dd as PerformanceMetrics, ay as ReadWith, ax as Reading, db as RealtimeEvent, da as RealtimeEventType, cv as RecordFile, cK as RelyIOConfig, cL as RelyIOConfigUpdate, dg as RequestConfig, d1 as RestoredContent, cG as RetryConfig, c_ as RevisedContent, b2 as SettingsGroupDefinition, az as SettingsReading, ar as ShapeValue, d5 as SingletonContent, aZ as SingletonContentTypeDefinition, a_ as SingletonMetadata, aA as SingletonReading, dc as SubscriptionOptions, ao as UnresolvedEntry, aB as UntypedReading, d4 as UpdateInput, dm as ValidationError, d8 as ValidationRule, dk as ValidationViolation, bk as VariantDefinition, bn as VideoCaptionsConfig, bo as VideoDownloadConfig, bc as VideoKindConfig, bm as VideoPosterConfig, bl as VideoUploadConfig, bp as VideoWatermarkConfig, cV as WhereClause, cU as WhereFieldCondition, cW as WhereOperator, cT as WhereScalar, $ as WidgetOptions, d0 as WrittenSettingsGroup, c$ as WrittenSingleton, b5 as defineAssetType, aL as defineContentType, aC as defineLocale, b0 as defineSettingsGroup, aX as defineSingleton, aM as fieldset } from './define-content-type-NEQDrvdq.cjs';
|
|
7
|
+
export { v as AggregateBlock, $ as AnyQueryParameters, a0 as DeclaredParameters, u as FetchBlock, J as FilterDefinition, D as IncludeDefinition, Z as InferQueryParams, Y as InferQueryResponse, I as InferRecordType, Q as QueryConfig, s as QueryDefinition, _ as QueryParameterValue, q as RecordFieldsOf, d as RecordUpdateFieldsOf, R as RecordWriteFieldsOf, k as SchemaAssetTypeNames, f as SchemaConfig, a as SchemaContentTypeNames, g as SchemaDefinition, b as SchemaEntry, l as SchemaEntryOf, c as SchemaLocaleCodes, i as SchemaQueryNames, j as SchemaSettingsGroupNames, h as SchemaSingletonNames, w as SearchBlock, G as SelectMapping, B as SortCondition, W as WhereCondition, r as defineQuery, e as defineSchema } from './define-schema-DZhtvLiK.cjs';
|
|
6
8
|
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 { n as RICH_TEXT_VOID_TAGS, R as RelyIOFieldAttributes, a as RelyIOFieldName, b as RelyIOFieldPath, c as RelyIOKeyed, q as RichTextAnchorsOption, t as RichTextAttributes, u as RichTextBlocksOf, v as RichTextDeclaredOf, w as RichTextDeclaredWriters, x as RichTextEntryLinkOf, y as RichTextEntryLinkOption, j as RichTextHtmlDeclaredWriters, k as RichTextHtmlFieldOption, l as RichTextHtmlOptions, z as RichTextInlineOf, m as RichTextMarkdownOptions, A as RichTextNodeContext, B as RichTextRenderable, C as RichTextRenderableOf, D as RichTextReplaceableNode, E as RichTextTag, F as RichTextTarget, e as entryHeadingAnchors, g as escapeHtml, o as isDeclaredRichTextNode, r as relyioField, p as renderRichText, d as richTextHeadingAnchors, f as richTextHeadingSlug, h as richTextToHtml, i as richTextToMarkdown, s as safeRichTextHref } from './index-
|
|
8
|
-
export { A as AggregateBlock, L as AnyQueryParameters, M as DeclaredParameters, n as FetchBlock, w as FilterDefinition, I as IncludeDefinition, J as InferQueryParams, G as InferQueryResponse, Q as QueryConfig, l as QueryDefinition, K as QueryParameterValue, 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, o as SearchBlock, v as SelectMapping, s as SortCondition, W as WhereCondition, k as defineQuery, d as defineSchema } from './define-schema-DkXwpp0I.cjs';
|
|
9
|
+
export { n as RICH_TEXT_VOID_TAGS, R as RelyIOFieldAttributes, a as RelyIOFieldName, b as RelyIOFieldPath, c as RelyIOKeyed, q as RichTextAnchorsOption, t as RichTextAttributes, u as RichTextBlocksOf, v as RichTextDeclaredOf, w as RichTextDeclaredWriters, x as RichTextEntryLinkOf, y as RichTextEntryLinkOption, j as RichTextHtmlDeclaredWriters, k as RichTextHtmlFieldOption, l as RichTextHtmlOptions, z as RichTextInlineOf, m as RichTextMarkdownOptions, A as RichTextNodeContext, B as RichTextRenderable, C as RichTextRenderableOf, D as RichTextReplaceableNode, E as RichTextTag, F as RichTextTarget, e as entryHeadingAnchors, g as escapeHtml, o as isDeclaredRichTextNode, r as relyioField, p as renderRichText, d as richTextHeadingAnchors, f as richTextHeadingSlug, h as richTextToHtml, i as richTextToMarkdown, s as safeRichTextHref } from './index-Dnmt_UOo.cjs';
|
|
9
10
|
export { e as RichTextBlock, f as RichTextCellAlignment, g as RichTextCodeBlock, h as RichTextCodeGroup, i as RichTextCodeLines, j as RichTextDivider, d as RichTextEntryLinkMark, k as RichTextHeading, l as RichTextInline, m as RichTextLineBreak, n as RichTextLinkMark, o as RichTextList, p as RichTextListItem, q as RichTextListStyle, r as RichTextMark, s as RichTextMarkType, t as RichTextNode, u as RichTextParagraph, v as RichTextQuote, w as RichTextSpan, x as RichTextStructure, y as RichTextTable, z as RichTextTableCell, B as RichTextTableRow, b as RichTextValue } from './rich-text.d-BWc-5gX1.cjs';
|
|
10
11
|
import './dev-handshake/index.cjs';
|
|
11
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Why a run ended without an answer — the one list every reader, document enum and refusal's details
|
|
15
|
+
* are built from:
|
|
16
|
+
*
|
|
17
|
+
* - `threw` — the customer's code threw, or its promise rejected.
|
|
18
|
+
* - `exceeded-cpu` — past its CPU limit: Cloudflare ended it.
|
|
19
|
+
* - `exceeded-memory` — past 128 MB: Cloudflare ended it.
|
|
20
|
+
* - `exceeded-duration` — a Container past its declared duration: its runner ended it (REL-3832).
|
|
21
|
+
* - `load-failed` — the bundle could not be read or loaded, or does not default-export a Function.
|
|
22
|
+
* - `output-invalid` — it answered something that is not JSON.
|
|
23
|
+
*/
|
|
24
|
+
declare const FUNCTION_RUN_FAILURES: readonly ['threw', 'exceeded-cpu', 'exceeded-memory', 'exceeded-duration', 'load-failed', 'output-invalid'];
|
|
25
|
+
/** Why a run ended without an answer: one of {@link FUNCTION_RUN_FAILURES}. */
|
|
26
|
+
type FunctionRunFailure$1 = (typeof FUNCTION_RUN_FAILURES)[number];
|
|
27
|
+
|
|
12
28
|
/**
|
|
13
29
|
* What a key may do is in its prefix. A RelyIO project key is
|
|
14
30
|
* `rly_{scope}_{region}_v2_{entropy}_{checksum}`: the scope first, then the region of its project's
|
|
@@ -385,6 +401,74 @@ declare class ReadOnlyKeyError extends SDKError {
|
|
|
385
401
|
constructor(message?: string, context?: Record<string, unknown>);
|
|
386
402
|
getUserMessage(): string;
|
|
387
403
|
}
|
|
404
|
+
/**
|
|
405
|
+
* `PUBLISHABLE_KEY_REFUSED` — a publishable key on a Record route (REL-3771). A browser reads none
|
|
406
|
+
* of an app's data: send the call from your server or a Function with a secret key.
|
|
407
|
+
*/
|
|
408
|
+
declare class PublishableKeyRefusedError extends SDKError {
|
|
409
|
+
readonly code = "PUBLISHABLE_KEY_REFUSED";
|
|
410
|
+
readonly retryable = false;
|
|
411
|
+
constructor(message?: string, context?: Record<string, unknown>);
|
|
412
|
+
getUserMessage(): string;
|
|
413
|
+
}
|
|
414
|
+
/** Why a Function run ended without an answer (spec 2, REL-3821): the contract's one list. */
|
|
415
|
+
type FunctionRunFailure = FunctionRunFailure$1;
|
|
416
|
+
/**
|
|
417
|
+
* `FUNCTION_RUN_FAILED` — the Function ran and ended without an answer: its code threw, it was ended
|
|
418
|
+
* at its CPU or memory limit, or its bundle could not be loaded (spec 2, REL-3821). `runId` names the
|
|
419
|
+
* run, whose record and console output Manage serves; `runError` is what the run's code threw.
|
|
420
|
+
*/
|
|
421
|
+
declare class FunctionRunFailedError extends SDKError {
|
|
422
|
+
readonly code = "FUNCTION_RUN_FAILED";
|
|
423
|
+
readonly retryable = false;
|
|
424
|
+
readonly runId?: string;
|
|
425
|
+
readonly failure?: FunctionRunFailure;
|
|
426
|
+
readonly runError?: {
|
|
427
|
+
readonly name: string;
|
|
428
|
+
readonly message: string;
|
|
429
|
+
};
|
|
430
|
+
constructor(message?: string, run?: {
|
|
431
|
+
readonly runId?: string;
|
|
432
|
+
readonly failure?: FunctionRunFailure;
|
|
433
|
+
readonly runError?: {
|
|
434
|
+
readonly name: string;
|
|
435
|
+
readonly message: string;
|
|
436
|
+
};
|
|
437
|
+
}, context?: Record<string, unknown>);
|
|
438
|
+
getUserMessage(): string;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* `FUNCTION_CONTAINERS_BUSY` — the project is running as many Function runs in Containers at once
|
|
442
|
+
* as its plan includes, so this run was not started: nothing ran and nothing was counted (spec 2,
|
|
443
|
+
* REL-3832). `retryAfterMs` is the service's `Retry-After`. Not retried by the client on its own: a
|
|
444
|
+
* Function call is never retried for you. A run started from a schedule or an Automation step waits
|
|
445
|
+
* for a free Container instead.
|
|
446
|
+
*/
|
|
447
|
+
declare class FunctionContainersBusyError extends SDKError {
|
|
448
|
+
readonly code = "FUNCTION_CONTAINERS_BUSY";
|
|
449
|
+
readonly retryable = false;
|
|
450
|
+
/** The Function that was not started. */
|
|
451
|
+
readonly function?: string;
|
|
452
|
+
/** `Retry-After`, in milliseconds, where the response carried a readable one. */
|
|
453
|
+
readonly retryAfterMs?: number;
|
|
454
|
+
constructor(message?: string, name?: string, context?: Record<string, unknown>, retryAfterMs?: number);
|
|
455
|
+
getUserMessage(): string;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* `FUNCTION_RUN_TIMED_OUT` — the call waited five minutes and the run had not answered. The run is
|
|
459
|
+
* not stopped: it goes on to its own limit, and its record says how it ends (spec 2, REL-3821).
|
|
460
|
+
*/
|
|
461
|
+
declare class FunctionRunTimedOutError extends SDKError {
|
|
462
|
+
readonly code = "FUNCTION_RUN_TIMED_OUT";
|
|
463
|
+
readonly retryable = false;
|
|
464
|
+
readonly runId?: string;
|
|
465
|
+
readonly waitedMs?: number;
|
|
466
|
+
constructor(message?: string, run?: {
|
|
467
|
+
readonly runId?: string;
|
|
468
|
+
readonly waitedMs?: number;
|
|
469
|
+
}, context?: Record<string, unknown>);
|
|
470
|
+
getUserMessage(): string;
|
|
471
|
+
}
|
|
388
472
|
/** `PLAN_FEATURE_UNAVAILABLE` — the plan does not include the capability. */
|
|
389
473
|
declare class PlanFeatureUnavailableError extends SDKError {
|
|
390
474
|
readonly code = "PLAN_FEATURE_UNAVAILABLE";
|
|
@@ -667,7 +751,6 @@ interface LanguageSwitcherOption {
|
|
|
667
751
|
status: LocaleStatus['status'];
|
|
668
752
|
isCurrent: boolean;
|
|
669
753
|
isDefault: boolean;
|
|
670
|
-
hasContent: boolean;
|
|
671
754
|
}
|
|
672
755
|
/**
|
|
673
756
|
* Options for building language switcher
|
|
@@ -677,8 +760,6 @@ interface LanguageSwitcherOptions {
|
|
|
677
760
|
currentLocale: string;
|
|
678
761
|
/** Whether to show inactive locales */
|
|
679
762
|
showInactive?: boolean;
|
|
680
|
-
/** Whether to show archived locales */
|
|
681
|
-
showArchived?: boolean;
|
|
682
763
|
/** Custom display name resolver */
|
|
683
764
|
getDisplayName?: (code: string) => string;
|
|
684
765
|
}
|
|
@@ -728,13 +809,12 @@ declare function getFieldFallbackLocale(entry: LocalizedEntry, fieldName: string
|
|
|
728
809
|
* ```typescript
|
|
729
810
|
* const options = localeHelpers.buildLanguageSwitcher(product, {
|
|
730
811
|
* currentLocale: 'en-US',
|
|
731
|
-
* showArchived: false,
|
|
732
812
|
* })
|
|
733
813
|
*
|
|
734
814
|
* // Returns:
|
|
735
815
|
* // [
|
|
736
|
-
* // { code: 'en-US', label: 'English (US)', status: 'published', isCurrent: true, isDefault: true
|
|
737
|
-
* // { code: 'es-ES', label: 'es-ES', status: 'published', isCurrent: false, isDefault: false
|
|
816
|
+
* // { code: 'en-US', label: 'English (US)', status: 'published', isCurrent: true, isDefault: true },
|
|
817
|
+
* // { code: 'es-ES', label: 'es-ES', status: 'published', isCurrent: false, isDefault: false },
|
|
738
818
|
* // ]
|
|
739
819
|
* ```
|
|
740
820
|
*/
|
|
@@ -982,4 +1062,4 @@ declare function snapToLadder(value: number): number;
|
|
|
982
1062
|
|
|
983
1063
|
declare const VERSION = "__VERSION__";
|
|
984
1064
|
|
|
985
|
-
export { AuthorizationError, Change, type ChangeSource, type ChangeSourceOptions, ChangesExpiredError, ChangesExpiredReason, ConnectionError, EntryMetadata, ErrorMapper, FOLLOW_BACK_OFF_MAX_MS, FOLLOW_RETRY_BASE_MS, FOLLOW_RETRY_MAX_MS, type FollowEnd, type FollowOptions, type FollowResync, type FollowState, type FollowVerdict, IMAGE_LADDER, InvalidApiKeyError, type KeyPathSegment, type LanguageSwitcherOption, type LanguageSwitcherOptions, type LiveEdgeEnd, LiveEdgeError, type LocaleMetadata, type LocaleStatus, type LocalizedEntry, MethodNotAllowedError, MissingApiKeyError, NetworkError, PREVIEW_KEY_PREFIX, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, RELYIO_CHANGE_EVENT, RELYIO_RESYNC_EVENT, RateLimitError, ReadOnlyKeyError, type RelyIOChangeDetail, type RelyIOResyncDetail, SDKError, ServerError, ServiceIndeterminateError, TimeoutError, TransactionRolledBackError, type TranslationCompleteness, UnknownContractError, UsageQuotaExceededError, VERSION, buildLanguageSwitcher, classifyFollowFailure, estimateTranslationCompleteness, followChanges, formatKeyPath, getAllLocalizedValues, getAvailableLocaleCodes, getDefaultLocale, getFallbackFields, getFieldFallbackLocale, getLocalizedField, getPublishedLocaleCodes, getRequestedLocale, hasLocale, isFieldFallback, isPreviewKey, isPublishableKey, isPublishedInLocale, localeHelpers, needsTranslation, parseKeyPath, snapToLadder };
|
|
1065
|
+
export { AuthorizationError, Change, type ChangeSource, type ChangeSourceOptions, ChangesExpiredError, ChangesExpiredReason, ConnectionError, EntryMetadata, ErrorMapper, FOLLOW_BACK_OFF_MAX_MS, FOLLOW_RETRY_BASE_MS, FOLLOW_RETRY_MAX_MS, type FollowEnd, type FollowOptions, type FollowResync, type FollowState, type FollowVerdict, FunctionContainersBusyError, FunctionRunFailedError, type FunctionRunFailure, FunctionRunTimedOutError, IMAGE_LADDER, InvalidApiKeyError, type KeyPathSegment, type LanguageSwitcherOption, type LanguageSwitcherOptions, type LiveEdgeEnd, LiveEdgeError, type LocaleMetadata, type LocaleStatus, type LocalizedEntry, MethodNotAllowedError, MissingApiKeyError, NetworkError, PREVIEW_KEY_PREFIX, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, PublishableKeyRefusedError, RELYIO_CHANGE_EVENT, RELYIO_RESYNC_EVENT, RateLimitError, ReadOnlyKeyError, type RelyIOChangeDetail, type RelyIOResyncDetail, SDKError, ServerError, ServiceIndeterminateError, TimeoutError, TransactionRolledBackError, type TranslationCompleteness, UnknownContractError, UsageQuotaExceededError, VERSION, buildLanguageSwitcher, classifyFollowFailure, estimateTranslationCompleteness, followChanges, formatKeyPath, getAllLocalizedValues, getAvailableLocaleCodes, getDefaultLocale, getFallbackFields, getFieldFallbackLocale, getLocalizedField, getPublishedLocaleCodes, getRequestedLocale, hasLocale, isFieldFallback, isPreviewKey, isPublishableKey, isPublishedInLocale, localeHelpers, needsTranslation, parseKeyPath, snapToLadder };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
|
-
import { C as Change, a as ChangesExpiredError, V as VisitorRetry, b as ChangesExpiredReason } from './index-
|
|
2
|
-
export {
|
|
1
|
+
import { C as Change, a as ChangesExpiredError, V as VisitorRetry, b as ChangesExpiredReason } from './index-M3luH06A.js';
|
|
2
|
+
export { A as ActiveSandbox, aC as AdhocQuery, aD as AdhocRecord, aA as AggregateMetric, aL as AssetClient, aU as AssetEntryResponse, aM as AssetFileBuilder, aS as AssetFileExtracted, aV as AssetFileWhere, b2 as AssetPlacement, aN as AssetUploadBuilder, aP as AssetVisibility, ac as AutocompleteOptions, a7 as AutocompleteResponse, a6 as AutocompleteSuggestion, as as BatchBody, at as BatchCreate, aw as BatchDelete, az as BatchDeleteTarget, an as BatchOperationResult, av as BatchReplace, ap as BatchResponse, ax as BatchSingletonWrite, ao as BatchSummary, ay as BatchTarget, au as BatchUpdate, aq as BatchWrite, ar as BatchWriteOptions, j as ChangesHeadOptions, k as ChangesOptions, W as ChildEntry, B as ChildrenListOptions, z as ChildrenOptions, X as ChildrenRead, e as ClientDefaults, f as ClientSchema, aZ as ConfirmInput, a_ as ConfirmResult, o as ContentClient, b1 as CreateAssetOptions, p as CreateEntryOptions, g as DeployedContentType, D as DeployedLocale, t as DocumentFields, G as DocumentReadOptions, u as DocumentVersion, w as DocumentVersionRow, x as DocumentVersionsOptions, y as DocumentWriteOptions, I as EntryList, E as EntryPlacement, q as EntryWriteOptions, F as FeedChange, J as FieldKey, aR as FileBackend, be as FileErrorCode, aQ as FileStatus, aT as FileStatusResult, bg as FileUploadError, bf as FileUploadErrorCode, bi as FileValidationConstraints, bh as FileValidationError, K as FreshOption, M as GetOptions, H as Health, l as LIVE_KEEPALIVE_INTERVAL_MS, m as LIVE_SOCKET_OPEN_TIMEOUT_MS, N as ListAllOptions, O as ListOptions, n as LiveChangesOptions, L as LocaleCodeOf, Q as LocaleOption, b5 as MultipartCreateResult, b6 as MultipartPart, b7 as MultipartTarget, aE as NamedQueryOptions, aF as NamedQueryParams, U as Paging, aW as PopulatedAssetReference, aX as PresignInput, aY as PresignResult, P as Project, aG as QueryAggregate, aH as QueryAnswer, aI as QueryCall, aB as QueryMetadata, aJ as QueryName, aK as QueryTypeName, Y as ReadAs, h as ReadEntry, _ as ReadLocale, R as RecordsAccessor, a$ as ResolveUrlInput, b0 as ResolveUrlResult, ba as ResourceConflictError, bb as ResourceExpiredError, b9 as ResourceNotFoundError, i as RetryableWriteOptions, S as SandboxState, ab as SearchEntry, ad as SearchFacet, ae as SearchFieldKey, af as SearchHighlight, a4 as SearchHitMetadata, ag as SearchOptions, ah as SearchPage, a5 as SearchResponse, a3 as SearchResultItem, ai as SearchScope, aj as SearchSelected, ak as SearchSortOption, aa as SearchTypeName, al as SearchWhere, s as SettingsClient, am as SimilarOptions, a9 as SimilarResponse, a8 as SimilarResult, r as SingletonClient, $ as SortOption, d as TypedClientConfig, T as TypedRelyIOClient, b3 as UpdateAssetOptions, b8 as UploadProgress, a0 as VersionOptions, b4 as WaitUntilReadyOptions, Z as WithChildren, a1 as WrittenReadScope, a2 as WrittenSort, c as createClient, c as default, aO as isAssetEntry, bd as isMissingEntry, bc as isResourceNotFound, bj as validateFile, v as versionCheckOf } from './index-M3luH06A.js';
|
|
3
|
+
export { A as AnySchemaDefinition, f as ApiMethod, e as ApiPath, g as ApiSuccessBody, B as BaseRecord, D as DefaultRetryPolicy, H as HttpClient, M as MatchRouteOptions, y as RecordBatchOperation, z as RecordBatchOperationResult, C as RecordBatchOptions, b as RecordBatchResult, a as RecordBatchTarget, n as RecordCallOptions, c as RecordConditionValue, o as RecordFacetBucket, p as RecordFileBytes, q as RecordFileUploadOptions, s as RecordList, t as RecordListOptions, u as RecordMetadata, v as RecordReadOptions, w as RecordUpdateOptions, l as RecordsClient, d as Register, R as RegisteredSchema, j as RetryPolicy, k as RetryableRequest, h as RouteMatch, S as SendOptions, W as Wire, i as isReplaySafe, m as matchRoute, x as refusedOperationOf, r as retryPolicyFor } from './register-B53i97A9.js';
|
|
3
4
|
export { fields } from './schema/index.js';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
5
|
+
import { cJ as SDKError, aU as EntryMetadata } from './define-content-type-fb-WCD5e.js';
|
|
6
|
+
export { aP as AnyDeclaredFieldset, cI as ApiResponse, cO as AssetFileBlock, as as AssetReading, ba as AssetServedBlocks, b7 as AssetTypeDefinition, cP as AssetUrls, cQ as BaseContent, B as BaseFieldConfig, cS as BaseSettingsGroup, cR as BaseSingleton, dl as BaseValidationError, aq as BlockOf, de as CacheConfig, dh as CacheStrategy, au as CheckInclude, at as CheckedIncludes, av as ContentReading, aT as ContentTypeDefinition, d7 as ContentTypeSchema, d2 as ContentVersion, d3 as ContentVersionRow, cY as CreateInput, cZ as CreatedContent, d6 as CustomQuery, cX as DateOnlyOperator, df as DebugConfig, aO as DeclaredFieldset, dj as Environment, m as FieldDefinition, aR as FieldMember, d9 as FieldOptions, n as FieldRule, am as FieldSchemaContext, o as FieldType, p as FieldUIConfig, an as FieldValue, F as FieldValues, aN as Fieldset, bd as FileKindConfig, br as FileScanConfig, b as FileUpload, bq as FileUploadConfig, bj as ImageExifConfig, bb as ImageKindConfig, bi as ImageSourceConfig, bh as ImageUploadConfig, aw as IncludablePaths, b9 as InferAssetEntry, b8 as InferAssetType, aV as InferContentType, cr as InferJsonSchema, a$ as InferSingleton, dn as InvalidPayloadError, cs as JsonFieldValue, ct as JsonSchema, cu as JsonValue, ap as Keyed, b6 as KeyedAssetTypeConfig, aS as KeyedContentTypeConfig, r as KeyedEnumConfig, s as KeyedField, t as KeyedFieldOptions, aQ as KeyedFieldsetConfig, b1 as KeyedSettingsGroupConfig, aY as KeyedSingletonConfig, cM as LiveWebSocket, cN as LiveWebSocketConstructor, aW as LocalePublicationFields, w as LocalizationConfig, x as Localized, y as LocalizedDetails, di as LogLevel, N as NeverUniqueFieldConfig, dd as PerformanceMetrics, ay as ReadWith, ax as Reading, db as RealtimeEvent, da as RealtimeEventType, cv as RecordFile, cK as RelyIOConfig, cL as RelyIOConfigUpdate, dg as RequestConfig, d1 as RestoredContent, cG as RetryConfig, c_ as RevisedContent, b2 as SettingsGroupDefinition, az as SettingsReading, ar as ShapeValue, d5 as SingletonContent, aZ as SingletonContentTypeDefinition, a_ as SingletonMetadata, aA as SingletonReading, dc as SubscriptionOptions, ao as UnresolvedEntry, aB as UntypedReading, d4 as UpdateInput, dm as ValidationError, d8 as ValidationRule, dk as ValidationViolation, bk as VariantDefinition, bn as VideoCaptionsConfig, bo as VideoDownloadConfig, bc as VideoKindConfig, bm as VideoPosterConfig, bl as VideoUploadConfig, bp as VideoWatermarkConfig, cV as WhereClause, cU as WhereFieldCondition, cW as WhereOperator, cT as WhereScalar, $ as WidgetOptions, d0 as WrittenSettingsGroup, c$ as WrittenSingleton, b5 as defineAssetType, aL as defineContentType, aC as defineLocale, b0 as defineSettingsGroup, aX as defineSingleton, aM as fieldset } from './define-content-type-fb-WCD5e.js';
|
|
7
|
+
export { v as AggregateBlock, $ as AnyQueryParameters, a0 as DeclaredParameters, u as FetchBlock, J as FilterDefinition, D as IncludeDefinition, Z as InferQueryParams, Y as InferQueryResponse, I as InferRecordType, Q as QueryConfig, s as QueryDefinition, _ as QueryParameterValue, q as RecordFieldsOf, d as RecordUpdateFieldsOf, R as RecordWriteFieldsOf, k as SchemaAssetTypeNames, f as SchemaConfig, a as SchemaContentTypeNames, g as SchemaDefinition, b as SchemaEntry, l as SchemaEntryOf, c as SchemaLocaleCodes, i as SchemaQueryNames, j as SchemaSettingsGroupNames, h as SchemaSingletonNames, w as SearchBlock, G as SelectMapping, B as SortCondition, W as WhereCondition, r as defineQuery, e as defineSchema } from './define-schema-Dlwh6l_J.js';
|
|
6
8
|
export { camelToSnake, createDeferred, debounce, deepClone, generateId, isBrowser, isNode, isPlainObject, isValidEmail, isValidUrl, mergeDeep, omit, pick, retry, sleep, snakeToCamel, throttle, toSafeString } from './utils/index.js';
|
|
7
|
-
export { n as RICH_TEXT_VOID_TAGS, R as RelyIOFieldAttributes, a as RelyIOFieldName, b as RelyIOFieldPath, c as RelyIOKeyed, q as RichTextAnchorsOption, t as RichTextAttributes, u as RichTextBlocksOf, v as RichTextDeclaredOf, w as RichTextDeclaredWriters, x as RichTextEntryLinkOf, y as RichTextEntryLinkOption, j as RichTextHtmlDeclaredWriters, k as RichTextHtmlFieldOption, l as RichTextHtmlOptions, z as RichTextInlineOf, m as RichTextMarkdownOptions, A as RichTextNodeContext, B as RichTextRenderable, C as RichTextRenderableOf, D as RichTextReplaceableNode, E as RichTextTag, F as RichTextTarget, e as entryHeadingAnchors, g as escapeHtml, o as isDeclaredRichTextNode, r as relyioField, p as renderRichText, d as richTextHeadingAnchors, f as richTextHeadingSlug, h as richTextToHtml, i as richTextToMarkdown, s as safeRichTextHref } from './index-
|
|
8
|
-
export { A as AggregateBlock, L as AnyQueryParameters, M as DeclaredParameters, n as FetchBlock, w as FilterDefinition, I as IncludeDefinition, J as InferQueryParams, G as InferQueryResponse, Q as QueryConfig, l as QueryDefinition, K as QueryParameterValue, 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, o as SearchBlock, v as SelectMapping, s as SortCondition, W as WhereCondition, k as defineQuery, d as defineSchema } from './define-schema-DgCX9YB7.js';
|
|
9
|
+
export { n as RICH_TEXT_VOID_TAGS, R as RelyIOFieldAttributes, a as RelyIOFieldName, b as RelyIOFieldPath, c as RelyIOKeyed, q as RichTextAnchorsOption, t as RichTextAttributes, u as RichTextBlocksOf, v as RichTextDeclaredOf, w as RichTextDeclaredWriters, x as RichTextEntryLinkOf, y as RichTextEntryLinkOption, j as RichTextHtmlDeclaredWriters, k as RichTextHtmlFieldOption, l as RichTextHtmlOptions, z as RichTextInlineOf, m as RichTextMarkdownOptions, A as RichTextNodeContext, B as RichTextRenderable, C as RichTextRenderableOf, D as RichTextReplaceableNode, E as RichTextTag, F as RichTextTarget, e as entryHeadingAnchors, g as escapeHtml, o as isDeclaredRichTextNode, r as relyioField, p as renderRichText, d as richTextHeadingAnchors, f as richTextHeadingSlug, h as richTextToHtml, i as richTextToMarkdown, s as safeRichTextHref } from './index-C4LqrNd1.js';
|
|
9
10
|
export { e as RichTextBlock, f as RichTextCellAlignment, g as RichTextCodeBlock, h as RichTextCodeGroup, i as RichTextCodeLines, j as RichTextDivider, d as RichTextEntryLinkMark, k as RichTextHeading, l as RichTextInline, m as RichTextLineBreak, n as RichTextLinkMark, o as RichTextList, p as RichTextListItem, q as RichTextListStyle, r as RichTextMark, s as RichTextMarkType, t as RichTextNode, u as RichTextParagraph, v as RichTextQuote, w as RichTextSpan, x as RichTextStructure, y as RichTextTable, z as RichTextTableCell, B as RichTextTableRow, b as RichTextValue } from './rich-text.d-BWc-5gX1.js';
|
|
10
11
|
import './dev-handshake/index.js';
|
|
11
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Why a run ended without an answer — the one list every reader, document enum and refusal's details
|
|
15
|
+
* are built from:
|
|
16
|
+
*
|
|
17
|
+
* - `threw` — the customer's code threw, or its promise rejected.
|
|
18
|
+
* - `exceeded-cpu` — past its CPU limit: Cloudflare ended it.
|
|
19
|
+
* - `exceeded-memory` — past 128 MB: Cloudflare ended it.
|
|
20
|
+
* - `exceeded-duration` — a Container past its declared duration: its runner ended it (REL-3832).
|
|
21
|
+
* - `load-failed` — the bundle could not be read or loaded, or does not default-export a Function.
|
|
22
|
+
* - `output-invalid` — it answered something that is not JSON.
|
|
23
|
+
*/
|
|
24
|
+
declare const FUNCTION_RUN_FAILURES: readonly ['threw', 'exceeded-cpu', 'exceeded-memory', 'exceeded-duration', 'load-failed', 'output-invalid'];
|
|
25
|
+
/** Why a run ended without an answer: one of {@link FUNCTION_RUN_FAILURES}. */
|
|
26
|
+
type FunctionRunFailure$1 = (typeof FUNCTION_RUN_FAILURES)[number];
|
|
27
|
+
|
|
12
28
|
/**
|
|
13
29
|
* What a key may do is in its prefix. A RelyIO project key is
|
|
14
30
|
* `rly_{scope}_{region}_v2_{entropy}_{checksum}`: the scope first, then the region of its project's
|
|
@@ -385,6 +401,74 @@ declare class ReadOnlyKeyError extends SDKError {
|
|
|
385
401
|
constructor(message?: string, context?: Record<string, unknown>);
|
|
386
402
|
getUserMessage(): string;
|
|
387
403
|
}
|
|
404
|
+
/**
|
|
405
|
+
* `PUBLISHABLE_KEY_REFUSED` — a publishable key on a Record route (REL-3771). A browser reads none
|
|
406
|
+
* of an app's data: send the call from your server or a Function with a secret key.
|
|
407
|
+
*/
|
|
408
|
+
declare class PublishableKeyRefusedError extends SDKError {
|
|
409
|
+
readonly code = "PUBLISHABLE_KEY_REFUSED";
|
|
410
|
+
readonly retryable = false;
|
|
411
|
+
constructor(message?: string, context?: Record<string, unknown>);
|
|
412
|
+
getUserMessage(): string;
|
|
413
|
+
}
|
|
414
|
+
/** Why a Function run ended without an answer (spec 2, REL-3821): the contract's one list. */
|
|
415
|
+
type FunctionRunFailure = FunctionRunFailure$1;
|
|
416
|
+
/**
|
|
417
|
+
* `FUNCTION_RUN_FAILED` — the Function ran and ended without an answer: its code threw, it was ended
|
|
418
|
+
* at its CPU or memory limit, or its bundle could not be loaded (spec 2, REL-3821). `runId` names the
|
|
419
|
+
* run, whose record and console output Manage serves; `runError` is what the run's code threw.
|
|
420
|
+
*/
|
|
421
|
+
declare class FunctionRunFailedError extends SDKError {
|
|
422
|
+
readonly code = "FUNCTION_RUN_FAILED";
|
|
423
|
+
readonly retryable = false;
|
|
424
|
+
readonly runId?: string;
|
|
425
|
+
readonly failure?: FunctionRunFailure;
|
|
426
|
+
readonly runError?: {
|
|
427
|
+
readonly name: string;
|
|
428
|
+
readonly message: string;
|
|
429
|
+
};
|
|
430
|
+
constructor(message?: string, run?: {
|
|
431
|
+
readonly runId?: string;
|
|
432
|
+
readonly failure?: FunctionRunFailure;
|
|
433
|
+
readonly runError?: {
|
|
434
|
+
readonly name: string;
|
|
435
|
+
readonly message: string;
|
|
436
|
+
};
|
|
437
|
+
}, context?: Record<string, unknown>);
|
|
438
|
+
getUserMessage(): string;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* `FUNCTION_CONTAINERS_BUSY` — the project is running as many Function runs in Containers at once
|
|
442
|
+
* as its plan includes, so this run was not started: nothing ran and nothing was counted (spec 2,
|
|
443
|
+
* REL-3832). `retryAfterMs` is the service's `Retry-After`. Not retried by the client on its own: a
|
|
444
|
+
* Function call is never retried for you. A run started from a schedule or an Automation step waits
|
|
445
|
+
* for a free Container instead.
|
|
446
|
+
*/
|
|
447
|
+
declare class FunctionContainersBusyError extends SDKError {
|
|
448
|
+
readonly code = "FUNCTION_CONTAINERS_BUSY";
|
|
449
|
+
readonly retryable = false;
|
|
450
|
+
/** The Function that was not started. */
|
|
451
|
+
readonly function?: string;
|
|
452
|
+
/** `Retry-After`, in milliseconds, where the response carried a readable one. */
|
|
453
|
+
readonly retryAfterMs?: number;
|
|
454
|
+
constructor(message?: string, name?: string, context?: Record<string, unknown>, retryAfterMs?: number);
|
|
455
|
+
getUserMessage(): string;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* `FUNCTION_RUN_TIMED_OUT` — the call waited five minutes and the run had not answered. The run is
|
|
459
|
+
* not stopped: it goes on to its own limit, and its record says how it ends (spec 2, REL-3821).
|
|
460
|
+
*/
|
|
461
|
+
declare class FunctionRunTimedOutError extends SDKError {
|
|
462
|
+
readonly code = "FUNCTION_RUN_TIMED_OUT";
|
|
463
|
+
readonly retryable = false;
|
|
464
|
+
readonly runId?: string;
|
|
465
|
+
readonly waitedMs?: number;
|
|
466
|
+
constructor(message?: string, run?: {
|
|
467
|
+
readonly runId?: string;
|
|
468
|
+
readonly waitedMs?: number;
|
|
469
|
+
}, context?: Record<string, unknown>);
|
|
470
|
+
getUserMessage(): string;
|
|
471
|
+
}
|
|
388
472
|
/** `PLAN_FEATURE_UNAVAILABLE` — the plan does not include the capability. */
|
|
389
473
|
declare class PlanFeatureUnavailableError extends SDKError {
|
|
390
474
|
readonly code = "PLAN_FEATURE_UNAVAILABLE";
|
|
@@ -667,7 +751,6 @@ interface LanguageSwitcherOption {
|
|
|
667
751
|
status: LocaleStatus['status'];
|
|
668
752
|
isCurrent: boolean;
|
|
669
753
|
isDefault: boolean;
|
|
670
|
-
hasContent: boolean;
|
|
671
754
|
}
|
|
672
755
|
/**
|
|
673
756
|
* Options for building language switcher
|
|
@@ -677,8 +760,6 @@ interface LanguageSwitcherOptions {
|
|
|
677
760
|
currentLocale: string;
|
|
678
761
|
/** Whether to show inactive locales */
|
|
679
762
|
showInactive?: boolean;
|
|
680
|
-
/** Whether to show archived locales */
|
|
681
|
-
showArchived?: boolean;
|
|
682
763
|
/** Custom display name resolver */
|
|
683
764
|
getDisplayName?: (code: string) => string;
|
|
684
765
|
}
|
|
@@ -728,13 +809,12 @@ declare function getFieldFallbackLocale(entry: LocalizedEntry, fieldName: string
|
|
|
728
809
|
* ```typescript
|
|
729
810
|
* const options = localeHelpers.buildLanguageSwitcher(product, {
|
|
730
811
|
* currentLocale: 'en-US',
|
|
731
|
-
* showArchived: false,
|
|
732
812
|
* })
|
|
733
813
|
*
|
|
734
814
|
* // Returns:
|
|
735
815
|
* // [
|
|
736
|
-
* // { code: 'en-US', label: 'English (US)', status: 'published', isCurrent: true, isDefault: true
|
|
737
|
-
* // { code: 'es-ES', label: 'es-ES', status: 'published', isCurrent: false, isDefault: false
|
|
816
|
+
* // { code: 'en-US', label: 'English (US)', status: 'published', isCurrent: true, isDefault: true },
|
|
817
|
+
* // { code: 'es-ES', label: 'es-ES', status: 'published', isCurrent: false, isDefault: false },
|
|
738
818
|
* // ]
|
|
739
819
|
* ```
|
|
740
820
|
*/
|
|
@@ -982,4 +1062,4 @@ declare function snapToLadder(value: number): number;
|
|
|
982
1062
|
|
|
983
1063
|
declare const VERSION = "__VERSION__";
|
|
984
1064
|
|
|
985
|
-
export { AuthorizationError, Change, type ChangeSource, type ChangeSourceOptions, ChangesExpiredError, ChangesExpiredReason, ConnectionError, EntryMetadata, ErrorMapper, FOLLOW_BACK_OFF_MAX_MS, FOLLOW_RETRY_BASE_MS, FOLLOW_RETRY_MAX_MS, type FollowEnd, type FollowOptions, type FollowResync, type FollowState, type FollowVerdict, IMAGE_LADDER, InvalidApiKeyError, type KeyPathSegment, type LanguageSwitcherOption, type LanguageSwitcherOptions, type LiveEdgeEnd, LiveEdgeError, type LocaleMetadata, type LocaleStatus, type LocalizedEntry, MethodNotAllowedError, MissingApiKeyError, NetworkError, PREVIEW_KEY_PREFIX, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, RELYIO_CHANGE_EVENT, RELYIO_RESYNC_EVENT, RateLimitError, ReadOnlyKeyError, type RelyIOChangeDetail, type RelyIOResyncDetail, SDKError, ServerError, ServiceIndeterminateError, TimeoutError, TransactionRolledBackError, type TranslationCompleteness, UnknownContractError, UsageQuotaExceededError, VERSION, buildLanguageSwitcher, classifyFollowFailure, estimateTranslationCompleteness, followChanges, formatKeyPath, getAllLocalizedValues, getAvailableLocaleCodes, getDefaultLocale, getFallbackFields, getFieldFallbackLocale, getLocalizedField, getPublishedLocaleCodes, getRequestedLocale, hasLocale, isFieldFallback, isPreviewKey, isPublishableKey, isPublishedInLocale, localeHelpers, needsTranslation, parseKeyPath, snapToLadder };
|
|
1065
|
+
export { AuthorizationError, Change, type ChangeSource, type ChangeSourceOptions, ChangesExpiredError, ChangesExpiredReason, ConnectionError, EntryMetadata, ErrorMapper, FOLLOW_BACK_OFF_MAX_MS, FOLLOW_RETRY_BASE_MS, FOLLOW_RETRY_MAX_MS, type FollowEnd, type FollowOptions, type FollowResync, type FollowState, type FollowVerdict, FunctionContainersBusyError, FunctionRunFailedError, type FunctionRunFailure, FunctionRunTimedOutError, IMAGE_LADDER, InvalidApiKeyError, type KeyPathSegment, type LanguageSwitcherOption, type LanguageSwitcherOptions, type LiveEdgeEnd, LiveEdgeError, type LocaleMetadata, type LocaleStatus, type LocalizedEntry, MethodNotAllowedError, MissingApiKeyError, NetworkError, PREVIEW_KEY_PREFIX, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, PublishableKeyRefusedError, RELYIO_CHANGE_EVENT, RELYIO_RESYNC_EVENT, RateLimitError, ReadOnlyKeyError, type RelyIOChangeDetail, type RelyIOResyncDetail, SDKError, ServerError, ServiceIndeterminateError, TimeoutError, TransactionRolledBackError, type TranslationCompleteness, UnknownContractError, UsageQuotaExceededError, VERSION, buildLanguageSwitcher, classifyFollowFailure, estimateTranslationCompleteness, followChanges, formatKeyPath, getAllLocalizedValues, getAvailableLocaleCodes, getDefaultLocale, getFallbackFields, getFieldFallbackLocale, getLocalizedField, getPublishedLocaleCodes, getRequestedLocale, hasLocale, isFieldFallback, isPreviewKey, isPublishableKey, isPublishedInLocale, localeHelpers, needsTranslation, parseKeyPath, snapToLadder };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export { defineAssetType, defineContentType, defineLocale, defineQuery, defineSchema, defineSettingsGroup, defineSingleton, fields, fieldset } from './chunk-DIZY6CKM.js';
|
|
2
|
-
import { LiveEdgeError, SDKError, serviceInstructedDelayMs, isAborted, sleep } from './chunk-VS2DEUTN.js';
|
|
3
|
-
export { AssetClient, AssetFileBuilder, AssetUploadBuilder, AuthorizationError, BaseValidationError, ChangesExpiredError, ConnectionError, ContentClient, DefaultRetryPolicy, ErrorMapper, FileUploadError, FileValidationError, HttpClient, InvalidApiKeyError, InvalidPayloadError, LIVE_KEEPALIVE_INTERVAL_MS, LIVE_SOCKET_OPEN_TIMEOUT_MS, LiveEdgeError, MethodNotAllowedError, MissingApiKeyError, NetworkError, PREVIEW_KEY_PREFIX, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, RateLimitError, ReadOnlyKeyError, ResourceConflictError, ResourceExpiredError, ResourceNotFoundError, SDKError, ServerError, ServiceIndeterminateError, SettingsClient, SingletonClient, TimeoutError, TransactionRolledBackError, TypedRelyIOClient, UnknownContractError, UsageQuotaExceededError, ValidationError, createClient, createClient as default, isAssetEntry, isMissingEntry, isPreviewKey, isPublishableKey, isReplaySafe, isResourceNotFound, matchRoute, retryPolicyFor, validateFile, versionCheckOf } from './chunk-VS2DEUTN.js';
|
|
4
|
-
import './chunk-BBUB7C2Z.js';
|
|
5
|
-
import { VISITOR_ADMISSION_RETRY_AFTER_SECONDS } from './chunk-OVMIHAYK.js';
|
|
6
1
|
import './chunk-IY5LSKXU.js';
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
import {
|
|
2
|
+
export { RICH_TEXT_VOID_TAGS, entryHeadingAnchors, escapeHtml, formatKeyPath, isDeclaredRichTextNode, parseKeyPath, relyioField, renderRichText, richTextHeadingAnchors, richTextHeadingSlug, richTextToHtml, richTextToMarkdown, safeRichTextHref } from './chunk-ZAKEY6DY.js';
|
|
3
|
+
export { defineAssetType, defineContentType, defineLocale, defineQuery, defineSchema, defineSettingsGroup, defineSingleton, fields, fieldset } from './chunk-W7JFHSFM.js';
|
|
4
|
+
import { LiveEdgeError, SDKError, serviceInstructedDelayMs, isAborted, sleep } from './chunk-ZHTJ7GXH.js';
|
|
5
|
+
export { AssetClient, AssetFileBuilder, AssetUploadBuilder, AuthorizationError, BaseValidationError, ChangesExpiredError, ConnectionError, ContentClient, DefaultRetryPolicy, ErrorMapper, FileUploadError, FileValidationError, FunctionContainersBusyError, FunctionRunFailedError, FunctionRunTimedOutError, HttpClient, InvalidApiKeyError, InvalidPayloadError, LIVE_KEEPALIVE_INTERVAL_MS, LIVE_SOCKET_OPEN_TIMEOUT_MS, LiveEdgeError, MethodNotAllowedError, MissingApiKeyError, NetworkError, PREVIEW_KEY_PREFIX, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, PublishableKeyRefusedError, RateLimitError, ReadOnlyKeyError, RecordsClient, ResourceConflictError, ResourceExpiredError, ResourceNotFoundError, SDKError, ServerError, ServiceIndeterminateError, SettingsClient, SingletonClient, TimeoutError, TransactionRolledBackError, TypedRelyIOClient, UnknownContractError, UsageQuotaExceededError, ValidationError, createClient, createClient as default, isAssetEntry, isMissingEntry, isPreviewKey, isPublishableKey, isReplaySafe, isResourceNotFound, matchRoute, refusedOperationOf, retryPolicyFor, validateFile, versionCheckOf } from './chunk-ZHTJ7GXH.js';
|
|
6
|
+
export { camelToSnake, createDeferred, debounce, deepClone, generateId, isBrowser, isNode, isPlainObject, isValidEmail, isValidUrl, mergeDeep, omit, pick, retry, sleep, snakeToCamel, throttle, toSafeString } from './chunk-NJQK5STK.js';
|
|
7
|
+
import './chunk-W2A4OTCI.js';
|
|
8
|
+
import './chunk-HDHBYYEY.js';
|
|
9
|
+
import { VISITOR_ADMISSION_RETRY_AFTER_SECONDS } from './chunk-EDE2H37D.js';
|
|
10
|
+
import { __name } from './chunk-DI6KFDBO.js';
|
|
10
11
|
|
|
11
12
|
/* RelyIO SDK - Built with ❤️ by the RelyIO Team */
|
|
12
13
|
|
|
@@ -147,18 +148,12 @@ __name(getFieldFallbackLocale, "getFieldFallbackLocale");
|
|
|
147
148
|
function buildLanguageSwitcher(entry, options) {
|
|
148
149
|
const availableLocales = entry._metadata?.availableLocales ?? [];
|
|
149
150
|
const defaultLocale = entry._metadata?.defaultLocale;
|
|
150
|
-
return availableLocales.
|
|
151
|
-
if (options.showArchived !== true && locale.status === "archived") {
|
|
152
|
-
return false;
|
|
153
|
-
}
|
|
154
|
-
return true;
|
|
155
|
-
}).map((locale) => ({
|
|
151
|
+
return availableLocales.map((locale) => ({
|
|
156
152
|
code: locale.code,
|
|
157
153
|
label: options.getDisplayName?.(locale.code) ?? locale.code,
|
|
158
154
|
status: locale.status,
|
|
159
155
|
isCurrent: locale.code === options.currentLocale,
|
|
160
|
-
isDefault: locale.code === defaultLocale
|
|
161
|
-
hasContent: locale.status !== "archived"
|
|
156
|
+
isDefault: locale.code === defaultLocale
|
|
162
157
|
}));
|
|
163
158
|
}
|
|
164
159
|
__name(buildLanguageSwitcher, "buildLanguageSwitcher");
|