@riverbankcms/sdk 0.88.0 → 0.89.1
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/dist/{PreviewEditorSidebar-EVRS3C7T.mjs → PreviewEditorSidebar-JDR64FEC.mjs} +3 -3
- package/dist/{PreviewEditorUI-54WD4IGE.mjs → PreviewEditorUI-67TMJMAF.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +8 -0
- package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
- package/dist/_dts/api/src/endpoints.d.ts +8 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/siteMembers.d.ts +6 -1
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/icons/cta.d.ts +3 -3
- package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -2
- package/dist/_dts/blocks/src/system/icons/semantic.d.ts +3 -3
- package/dist/_dts/blocks/src/system/icons/svg.d.ts +72 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/loadStateError.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.state.d.ts +55 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.state.d.ts +39 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.d.ts +4 -27
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.state.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.state.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.state.d.ts +39 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +24 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +35 -0
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +54 -0
- package/dist/_dts/core/src/branded.d.ts +7 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/site-route-target.d.ts +40 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +159 -2
- package/dist/_dts/media-core/src/fileDomain.d.ts +4 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +160 -0
- package/dist/_dts/sdk/src/client/types.d.ts +26 -1
- package/dist/_dts/sdk/src/index.d.ts +3 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/{chunk-YDMBIIS5.mjs → chunk-7N46MZHI.mjs} +1 -1
- package/dist/{chunk-7KOO7RPP.mjs → chunk-7YUAXONX.mjs} +1007 -353
- package/dist/{chunk-O4LVYUVH.mjs → chunk-F645A5UV.mjs} +18 -0
- package/dist/{chunk-ER4UIW4X.mjs → chunk-HKJQERFR.mjs} +7 -7
- package/dist/{chunk-K3JWH6HE.mjs → chunk-TGBJWKMP.mjs} +1 -1
- package/dist/{chunk-HVOBXA3Y.mjs → chunk-ZQRBLCW5.mjs} +2 -2
- package/dist/cli/index.mjs +668 -18
- package/dist/client/{accordion-PT5CGW5N.mjs → accordion-MUCVNGQ7.mjs} +2 -2
- package/dist/client/{bookingForm-2HLRTEYS.mjs → bookingForm-PKD6EFIE.mjs} +192 -76
- package/dist/client/bookings.mjs +436 -191
- package/dist/client/{carousel-Z2LKYSWA.mjs → carousel-3TKQSNJC.mjs} +4 -3
- package/dist/client/{cart-ND5IK4A6.mjs → cart-6XHSZK23.mjs} +8 -7
- package/dist/client/{checkout-EYUSGAY7.mjs → checkout-FVSPM6FI.mjs} +8 -7
- package/dist/client/chunk-6N7YRNYU.mjs +183 -0
- package/dist/client/{chunk-O5JNI3E4.mjs → chunk-7DH35FGA.mjs} +2 -2
- package/dist/client/{chunk-BAWHZ5GM.mjs → chunk-CQKKFEQD.mjs} +195 -61
- package/dist/client/{chunk-X7GVFB7Y.mjs → chunk-EY42X22F.mjs} +3 -3
- package/dist/client/{chunk-6DVPO44G.mjs → chunk-FHU6PFPM.mjs} +1 -1
- package/dist/client/{chunk-H4MHEXYS.mjs → chunk-LQFDYWPJ.mjs} +1 -1
- package/dist/client/{chunk-MHBEWDT7.mjs → chunk-RSQWWUAD.mjs} +122 -50
- package/dist/client/{chunk-GOFO7HRH.mjs → chunk-STJ2NCQM.mjs} +1 -1
- package/dist/client/{chunk-DIRW2LNG.mjs → chunk-UQFY4AHX.mjs} +272 -198
- package/dist/client/{chunk-WCVK4MBJ.mjs → chunk-VGLXACVK.mjs} +1 -1
- package/dist/client/{chunk-BL66UWGD.mjs → chunk-ZJZZA5EP.mjs} +6 -6
- package/dist/client/{chunk-S4G65LGR.mjs → chunk-ZT5XE7FK.mjs} +1 -1
- package/dist/client/client.mjs +3823 -3507
- package/dist/client/{courseRegistration-H3AZBUEG.mjs → courseRegistration-ATZSYDHM.mjs} +6 -6
- package/dist/client/{eventCalendar-FPKJGLGS.mjs → eventCalendar-6T2UGKKP.mjs} +10 -9
- package/dist/client/{eventCombined-QCGIZBUY.mjs → eventCombined-Q4VANXVF.mjs} +10 -9
- package/dist/client/{eventDetails-HIT3BJWU.mjs → eventDetails-DW37E7VW.mjs} +10 -9
- package/dist/client/{eventListing-R4HNWJDN.mjs → eventListing-XURTSAUW.mjs} +10 -9
- package/dist/client/{eventRegistration-Q7BYY5HF.mjs → eventRegistration-MRKEVAXW.mjs} +10 -9
- package/dist/client/{form-NI6YOG6S.mjs → form-WZZFFGMU.mjs} +3 -3
- package/dist/client/{headerSection-SDYGII36.mjs → headerSection-EQYVQBLM.mjs} +3 -3
- package/dist/client/hooks.mjs +18 -0
- package/dist/client/{locationMap-BDETEUQD.mjs → locationMap-MFF5VAZR.mjs} +3 -3
- package/dist/client/{newsletterForm-EKYIU67X.mjs → newsletterForm-JQ77UYIE.mjs} +60 -24
- package/dist/client/{productDetail-5UTGNN76.mjs → productDetail-25LMT3IZ.mjs} +8 -7
- package/dist/client/{productList-7YA5KXZQ.mjs → productList-5ABEMKUG.mjs} +8 -7
- package/dist/client/rendering/client.mjs +3266 -3528
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3143 -3452
- package/dist/client/{shop-AIMUMZYC.mjs → shop-OMMQZ6YO.mjs} +8 -7
- package/dist/preview-next/before-render.mjs +18 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +18 -0
- package/dist/{sdk-runtime-NW472WNT.mjs → sdk-runtime-WNLBZ3ZH.mjs} +6 -6
- package/dist/server/components.mjs +1068 -1540
- package/dist/server/config-validation.mjs +18 -0
- package/dist/server/config.mjs +18 -0
- package/dist/server/data.mjs +18 -0
- package/dist/server/index.mjs +847 -261
- package/dist/server/next.mjs +1708 -1555
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1068 -1540
- package/dist/server/rendering.mjs +1074 -1546
- package/dist/server/routing.mjs +314 -9
- package/dist/server/server.mjs +668 -25
- package/dist/server/theme-bridge.mjs +26 -0
- package/dist/styles/index.css +26 -0
- package/package.json +2 -1
- package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +0 -8
- /package/dist/client/{chunk-LI2C6M5O.mjs → chunk-25W2EQUN.mjs} +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import type { PublicEndpointName } from '../public-api/contracts';
|
|
2
|
+
import type { GetPageParams, GetSiteParams } from './types';
|
|
3
|
+
declare const publishedRuntimeCacheKeyBrand: unique symbol;
|
|
4
|
+
declare const publishedRuntimeCachePayloadSchemaVersionBrand: unique symbol;
|
|
5
|
+
export type PublishedRuntimeCacheKey = string & {
|
|
6
|
+
readonly [publishedRuntimeCacheKeyBrand]: 'PublishedRuntimeCacheKey';
|
|
7
|
+
};
|
|
8
|
+
export type PublishedRuntimeCachePayloadSchemaVersion = number & {
|
|
9
|
+
readonly [publishedRuntimeCachePayloadSchemaVersionBrand]: 'PublishedRuntimeCachePayloadSchemaVersion';
|
|
10
|
+
};
|
|
11
|
+
export declare const DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION: PublishedRuntimeCachePayloadSchemaVersion;
|
|
12
|
+
export type RuntimeCachePolicyKind = 'durable-public-stale' | 'memory-only' | 'live-only';
|
|
13
|
+
export type RuntimeCacheLiveOnlyReason = 'unknown_endpoint' | 'non_get_request' | 'preview_request' | 'force_refresh' | 'opaque_batch_loader' | 'challenge_endpoint' | 'auth_required' | 'safety_sensitive_booking';
|
|
14
|
+
export type RuntimeCachePolicy = Readonly<{
|
|
15
|
+
kind: 'durable-public-stale';
|
|
16
|
+
endpoint: PublicEndpointName;
|
|
17
|
+
freshTtlSec: number;
|
|
18
|
+
staleTtlSec: number;
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
kind: 'memory-only';
|
|
21
|
+
endpoint: PublicEndpointName;
|
|
22
|
+
freshTtlSec: number;
|
|
23
|
+
reason: 'durable_rollout_pending';
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
kind: 'live-only';
|
|
26
|
+
endpoint: string;
|
|
27
|
+
reason: RuntimeCacheLiveOnlyReason;
|
|
28
|
+
}>;
|
|
29
|
+
export type RuntimeCacheParams = Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
30
|
+
export type ResolveRuntimeCachePolicyInput = Readonly<{
|
|
31
|
+
endpoint: string;
|
|
32
|
+
method?: string;
|
|
33
|
+
params?: RuntimeCacheParams;
|
|
34
|
+
}>;
|
|
35
|
+
export declare function resolveRuntimeCachePolicy(input: ResolveRuntimeCachePolicyInput): RuntimeCachePolicy;
|
|
36
|
+
export type GetSiteRuntimeCacheParams = Readonly<Pick<GetSiteParams, 'id' | 'slug' | 'domain' | 'currentPath' | 'force'>>;
|
|
37
|
+
export type GetContentByPathRuntimeCacheParams = Readonly<Pick<GetPageParams, 'siteId' | 'path' | 'preview'>>;
|
|
38
|
+
type KeyDeriverInputByEndpoint = Readonly<{
|
|
39
|
+
getSite: GetSiteRuntimeCacheParams;
|
|
40
|
+
getContentByPath: GetContentByPathRuntimeCacheParams;
|
|
41
|
+
}>;
|
|
42
|
+
export type PublishedRuntimeCacheKeyEndpoint = keyof typeof DURABLE_RUNTIME_CACHE_KEY_DERIVERS;
|
|
43
|
+
export type ParsePublishedRuntimeCacheKeyResult = Readonly<{
|
|
44
|
+
ok: true;
|
|
45
|
+
key: PublishedRuntimeCacheKey;
|
|
46
|
+
endpoint: PublishedRuntimeCacheKeyEndpoint;
|
|
47
|
+
}> | Readonly<{
|
|
48
|
+
ok: false;
|
|
49
|
+
error: 'not_string' | 'invalid_prefix' | 'unknown_endpoint' | 'invalid_param_encoding';
|
|
50
|
+
}>;
|
|
51
|
+
export type ParsePublishedRuntimeCacheKeyDetailsResult = Readonly<{
|
|
52
|
+
ok: true;
|
|
53
|
+
key: PublishedRuntimeCacheKey;
|
|
54
|
+
endpoint: PublishedRuntimeCacheKeyEndpoint;
|
|
55
|
+
normalizedParams: PublishedRuntimeNormalizedParams;
|
|
56
|
+
}> | Readonly<{
|
|
57
|
+
ok: false;
|
|
58
|
+
error: 'not_string' | 'invalid_prefix' | 'unknown_endpoint' | 'invalid_param_encoding';
|
|
59
|
+
}>;
|
|
60
|
+
export type ParsePublishedRuntimeCachePayloadSchemaVersionResult = Readonly<{
|
|
61
|
+
ok: true;
|
|
62
|
+
value: PublishedRuntimeCachePayloadSchemaVersion;
|
|
63
|
+
}> | Readonly<{
|
|
64
|
+
ok: false;
|
|
65
|
+
error: 'not_number' | 'not_integer' | 'not_positive';
|
|
66
|
+
}>;
|
|
67
|
+
export type PublishedRuntimeCacheFreshness = Readonly<{
|
|
68
|
+
kind: 'fresh';
|
|
69
|
+
staleAgeSec: 0;
|
|
70
|
+
}> | Readonly<{
|
|
71
|
+
kind: 'stale';
|
|
72
|
+
staleAgeSec: number;
|
|
73
|
+
}> | Readonly<{
|
|
74
|
+
kind: 'expired';
|
|
75
|
+
}> | Readonly<{
|
|
76
|
+
kind: 'invalid_timestamp';
|
|
77
|
+
field: 'freshUntil' | 'staleUntil';
|
|
78
|
+
}>;
|
|
79
|
+
export type ClassifyPublishedRuntimeCacheFreshnessInput = Readonly<{
|
|
80
|
+
freshUntil: string;
|
|
81
|
+
staleUntil: string;
|
|
82
|
+
now: Date;
|
|
83
|
+
}>;
|
|
84
|
+
export type PublishedRuntimeCacheReadInput = Readonly<{
|
|
85
|
+
cacheKey: PublishedRuntimeCacheKey;
|
|
86
|
+
endpoint: PublishedRuntimeCacheKeyEndpoint;
|
|
87
|
+
payloadSchemaVersion?: PublishedRuntimeCachePayloadSchemaVersion;
|
|
88
|
+
}>;
|
|
89
|
+
export type PublishedRuntimeCacheReadResult<TPayload = unknown> = Readonly<{
|
|
90
|
+
kind: 'hit';
|
|
91
|
+
freshness: 'fresh' | 'stale';
|
|
92
|
+
payload: TPayload;
|
|
93
|
+
staleAgeSec: number;
|
|
94
|
+
}> | Readonly<{
|
|
95
|
+
kind: 'miss';
|
|
96
|
+
reason: 'not_found' | 'expired' | 'schema_mismatch';
|
|
97
|
+
}> | Readonly<{
|
|
98
|
+
kind: 'error';
|
|
99
|
+
error: Readonly<{
|
|
100
|
+
kind: PublishedRuntimeCacheAdapterErrorKind;
|
|
101
|
+
message: string;
|
|
102
|
+
}>;
|
|
103
|
+
}>;
|
|
104
|
+
export type PublishedRuntimeCacheAdapterErrorKind = 'read_failed' | 'corrupt_row' | 'adapter_exception';
|
|
105
|
+
export type PublishedRuntimeCacheWriteInput<TPayload = unknown> = Readonly<{
|
|
106
|
+
cacheKey: PublishedRuntimeCacheKey;
|
|
107
|
+
endpoint: PublishedRuntimeCacheKeyEndpoint;
|
|
108
|
+
normalizedParams: PublishedRuntimeNormalizedParams;
|
|
109
|
+
payload: TPayload;
|
|
110
|
+
siteId?: string | null;
|
|
111
|
+
freshTtlSec: number;
|
|
112
|
+
staleTtlSec: number;
|
|
113
|
+
payloadSchemaVersion?: PublishedRuntimeCachePayloadSchemaVersion;
|
|
114
|
+
writeReason?: string;
|
|
115
|
+
}>;
|
|
116
|
+
export type PublishedRuntimeCacheAdapter = Readonly<{
|
|
117
|
+
read?: <TPayload = unknown>(input: PublishedRuntimeCacheReadInput) => Promise<PublishedRuntimeCacheReadResult<TPayload>>;
|
|
118
|
+
write?: <TPayload = unknown>(input: PublishedRuntimeCacheWriteInput<TPayload>) => void | Promise<void>;
|
|
119
|
+
}>;
|
|
120
|
+
export type DerivePublishedRuntimeCacheKeyInput = {
|
|
121
|
+
[E in PublishedRuntimeCacheKeyEndpoint]: Readonly<{
|
|
122
|
+
endpoint: E;
|
|
123
|
+
params: KeyDeriverInputByEndpoint[E];
|
|
124
|
+
}>;
|
|
125
|
+
}[PublishedRuntimeCacheKeyEndpoint];
|
|
126
|
+
export type PublishedRuntimeNormalizedParams = Readonly<Record<string, string>>;
|
|
127
|
+
export type PublishedRuntimeCacheKeyError = Readonly<{
|
|
128
|
+
kind: 'not_durable_eligible';
|
|
129
|
+
policy: RuntimeCachePolicy;
|
|
130
|
+
}> | Readonly<{
|
|
131
|
+
kind: 'missing_site_identity';
|
|
132
|
+
acceptedParams: readonly ['slug', 'domain', 'id'];
|
|
133
|
+
}> | Readonly<{
|
|
134
|
+
kind: 'missing_required_param';
|
|
135
|
+
endpoint: PublishedRuntimeCacheKeyEndpoint;
|
|
136
|
+
param: 'siteId';
|
|
137
|
+
}>;
|
|
138
|
+
export type DerivePublishedRuntimeCacheKeyResult = Readonly<{
|
|
139
|
+
ok: true;
|
|
140
|
+
endpoint: PublishedRuntimeCacheKeyEndpoint;
|
|
141
|
+
key: PublishedRuntimeCacheKey;
|
|
142
|
+
normalizedParams: PublishedRuntimeNormalizedParams;
|
|
143
|
+
}> | Readonly<{
|
|
144
|
+
ok: false;
|
|
145
|
+
error: PublishedRuntimeCacheKeyError;
|
|
146
|
+
}>;
|
|
147
|
+
export declare function normalizeRuntimePublicPath(value: unknown): string;
|
|
148
|
+
declare function deriveGetSiteKey(params: GetSiteRuntimeCacheParams): DerivePublishedRuntimeCacheKeyResult;
|
|
149
|
+
declare function deriveGetContentByPathKey(params: GetContentByPathRuntimeCacheParams): DerivePublishedRuntimeCacheKeyResult;
|
|
150
|
+
declare const DURABLE_RUNTIME_CACHE_KEY_DERIVERS: {
|
|
151
|
+
readonly getSite: typeof deriveGetSiteKey;
|
|
152
|
+
readonly getContentByPath: typeof deriveGetContentByPathKey;
|
|
153
|
+
};
|
|
154
|
+
export declare function isPublishedRuntimeCacheKeyEndpoint(value: unknown): value is PublishedRuntimeCacheKeyEndpoint;
|
|
155
|
+
export declare function parsePublishedRuntimeCacheKey(value: unknown): ParsePublishedRuntimeCacheKeyResult;
|
|
156
|
+
export declare function parsePublishedRuntimeCacheKeyDetails(value: unknown): ParsePublishedRuntimeCacheKeyDetailsResult;
|
|
157
|
+
export declare function parsePublishedRuntimeCachePayloadSchemaVersion(value: unknown): ParsePublishedRuntimeCachePayloadSchemaVersionResult;
|
|
158
|
+
export declare function classifyPublishedRuntimeCacheFreshness(input: ClassifyPublishedRuntimeCacheFreshnessInput): PublishedRuntimeCacheFreshness;
|
|
159
|
+
export declare function derivePublishedRuntimeCacheKey(input: DerivePublishedRuntimeCacheKeyInput): DerivePublishedRuntimeCacheKeyResult;
|
|
160
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CheckRedirectResponse, EntriesResponse, EntryResponse, PageResponse, PublicBookingServicesResponse, PublicCoursesResponse, PublicFormResponse, PublicFormsResponse, PublicProductsResponse, PublicTeamMembersResponse, PublicMembershipsResponse, PublicPassesResponse, PublicEventDetailsResponse, PublicEventsResponse, ResolveEntrySubrouteResponse, ResolveEventOccurrenceResponse, RoutableContentResponse, SiteResponse, SitemapRoutesResponse, PublicProductCategorySelector } from '../public-api/contracts';
|
|
2
|
+
import type { PublishedRuntimeCacheAdapter, PublishedRuntimeCacheAdapterErrorKind } from './runtimeCachePolicy';
|
|
2
3
|
export type { CheckRedirectResponse, EntriesResponse, EntryResponse, PageResponse, PublicBookingServicesResponse, PublicCoursesResponse, PublicEventsResponse, PublicFormResponse, PublicFormsResponse, PublicProductsResponse, PublicTeamMembersResponse, PublicMembershipsResponse, PublicPassesResponse, PublicEventDetailsResponse, ResolveEntrySubrouteResponse, ResolveEventOccurrenceResponse, RoutableContentResponse, SiteResponse, SitemapRoutesResponse, } from '../public-api/contracts';
|
|
3
4
|
/**
|
|
4
5
|
* Pagination metadata returned when `includeMeta: true`
|
|
@@ -88,12 +89,27 @@ export type GetEntriesByIdentifiersParams = {
|
|
|
88
89
|
* Source of the data returned by a resilient fetch
|
|
89
90
|
*/
|
|
90
91
|
export type ResilienceSource = 'live' | 'cache' | 'stale' | 'prebuild' | 'error';
|
|
92
|
+
export type ResilienceCacheTier = 'memory-fresh' | 'memory-stale' | 'durable-fresh' | 'durable-stale' | 'prebuild';
|
|
93
|
+
export type ResilienceDurableCacheDiagnostic = Readonly<{
|
|
94
|
+
outcome: 'miss';
|
|
95
|
+
reason: 'not_found' | 'expired' | 'schema_mismatch';
|
|
96
|
+
}> | Readonly<{
|
|
97
|
+
outcome: 'error';
|
|
98
|
+
error: Readonly<{
|
|
99
|
+
kind: PublishedRuntimeCacheAdapterErrorKind;
|
|
100
|
+
message: string;
|
|
101
|
+
}>;
|
|
102
|
+
}>;
|
|
91
103
|
/**
|
|
92
104
|
* Status information from a resilient fetch operation
|
|
93
105
|
*/
|
|
94
106
|
export interface ResilienceStatus {
|
|
95
107
|
/** Where the data came from */
|
|
96
108
|
source: ResilienceSource;
|
|
109
|
+
/** More precise cache tier when source is cache/stale/prebuild */
|
|
110
|
+
cacheTier?: ResilienceCacheTier;
|
|
111
|
+
/** Durable cache miss/error details when live origin failed and no durable hit was served */
|
|
112
|
+
durableCache?: ResilienceDurableCacheDiagnostic;
|
|
97
113
|
/** Whether this was a preview request */
|
|
98
114
|
isPreview: boolean;
|
|
99
115
|
/** Cache key used for this request */
|
|
@@ -243,7 +259,8 @@ export type SdkAuthConfig = {
|
|
|
243
259
|
};
|
|
244
260
|
export declare const SDK_CORRELATION_HEADER_NAMES: readonly ["x-request-id", "x-correlation-id", "x-riverbank-monitor-run-id"];
|
|
245
261
|
export type SdkCorrelationHeaderName = (typeof SDK_CORRELATION_HEADER_NAMES)[number];
|
|
246
|
-
export type
|
|
262
|
+
export type SdkDefaultHeaderName = SdkCorrelationHeaderName | 'x-vercel-protection-bypass';
|
|
263
|
+
export type SdkCorrelationHeaders = Readonly<Partial<Record<SdkDefaultHeaderName, string>>>;
|
|
247
264
|
/**
|
|
248
265
|
* Configuration for creating a Riverbank CMS client
|
|
249
266
|
*/
|
|
@@ -286,6 +303,14 @@ export interface RiverbankClientConfig {
|
|
|
286
303
|
* Per-request headers still win when an individual SDK method supplies `options.headers`.
|
|
287
304
|
*/
|
|
288
305
|
defaultHeaders?: SdkCorrelationHeaders;
|
|
306
|
+
/**
|
|
307
|
+
* Optional durable published runtime cache adapter.
|
|
308
|
+
*
|
|
309
|
+
* Used only for default-closed, anonymous published endpoints that the SDK
|
|
310
|
+
* policy marks durable-stale eligible. The SDK owns fallback ordering and
|
|
311
|
+
* metadata; the app owns the storage implementation.
|
|
312
|
+
*/
|
|
313
|
+
publishedRuntimeCache?: PublishedRuntimeCacheAdapter;
|
|
289
314
|
/**
|
|
290
315
|
* Cache configuration
|
|
291
316
|
*/
|
|
@@ -19,12 +19,14 @@
|
|
|
19
19
|
*/
|
|
20
20
|
export { createRiverbankClient, getResilienceStatusFromError, RiverbankApiError, } from './client/index';
|
|
21
21
|
export { SDK_CORRELATION_HEADER_NAMES } from './client/types';
|
|
22
|
-
export type { RiverbankClient, RiverbankClientConfig, SdkCorrelationHeaderName, SdkCorrelationHeaders, SdkAuthConfig, SiteResponse, PageResponse, EntriesResponse, EntriesResponseWithMeta, GetEntriesByIdentifiersParams, GetPageParams, GetSiteParams, PaginationMeta, EntryResponse, ResilienceConfig, ResilienceStatus, ResilientData, ResilienceSource, CircuitState, RetryConfig, CircuitBreakerConfig, } from './client/types';
|
|
22
|
+
export type { RiverbankClient, RiverbankClientConfig, SdkCorrelationHeaderName, SdkCorrelationHeaders, SdkAuthConfig, SiteResponse, PageResponse, EntriesResponse, EntriesResponseWithMeta, GetEntriesByIdentifiersParams, GetPageParams, GetSiteParams, PaginationMeta, EntryResponse, ResilienceConfig, ResilienceDurableCacheDiagnostic, ResilienceStatus, ResilientData, ResilienceSource, CircuitState, RetryConfig, CircuitBreakerConfig, } from './client/types';
|
|
23
23
|
export { prebuildCache } from './prebuild/index';
|
|
24
24
|
export type { PrebuildOptions, PrebuildResult, PrebuildProgress, PrebuildManifest, PrebuildContentType, } from './prebuild/types';
|
|
25
25
|
export { PrebuildLoader, createPrebuildLoader, canUsePrebuild, } from './prebuild/loader';
|
|
26
26
|
export type { PrebuildLoaderConfig, LoadResult } from './prebuild/loader';
|
|
27
27
|
export type { ApiClient } from './public-api/runtime';
|
|
28
28
|
export { buildEndpointURL, API_ENDPOINTS } from './public-api/runtime';
|
|
29
|
+
export { DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION, classifyPublishedRuntimeCacheFreshness, derivePublishedRuntimeCacheKey, isPublishedRuntimeCacheKeyEndpoint, normalizeRuntimePublicPath, parsePublishedRuntimeCacheKey, parsePublishedRuntimeCacheKeyDetails, parsePublishedRuntimeCachePayloadSchemaVersion, resolveRuntimeCachePolicy, } from './client/runtimeCachePolicy';
|
|
30
|
+
export type { ClassifyPublishedRuntimeCacheFreshnessInput, DerivePublishedRuntimeCacheKeyInput, DerivePublishedRuntimeCacheKeyResult, GetContentByPathRuntimeCacheParams, GetSiteRuntimeCacheParams, ParsePublishedRuntimeCacheKeyResult, ParsePublishedRuntimeCacheKeyDetailsResult, ParsePublishedRuntimeCachePayloadSchemaVersionResult, PublishedRuntimeCacheAdapter, PublishedRuntimeCacheAdapterErrorKind, PublishedRuntimeCacheFreshness, PublishedRuntimeCacheKey, PublishedRuntimeCacheKeyEndpoint, PublishedRuntimeCacheKeyError, PublishedRuntimeCachePayloadSchemaVersion, PublishedRuntimeCacheReadInput, PublishedRuntimeCacheReadResult, PublishedRuntimeCacheWriteInput, PublishedRuntimeNormalizedParams, ResolveRuntimeCachePolicyInput, RuntimeCacheLiveOnlyReason, RuntimeCacheParams, RuntimeCachePolicy, RuntimeCachePolicyKind, } from './client/runtimeCachePolicy';
|
|
29
31
|
export type { RiverbankSiteConfig, SiteStyleConfig, SectionBackground, SectionOptionsConfig, ContainerOptionsConfig, SectionSpacing, ContainerMaxWidth, ContainerAlignment, } from './config';
|
|
30
32
|
export { SYSTEM_BLOCK_KINDS, type SystemBlockKind, type CustomBlockKind, type BlockKind, } from './types';
|