@riverbankcms/sdk 0.2.1 → 0.4.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/README.md +255 -1
- package/dist/cli/index.js +249 -40
- package/dist/cli/index.js.map +1 -1
- package/dist/client/bookings.js +15 -1
- package/dist/client/bookings.js.map +1 -1
- package/dist/client/bookings.mjs +15 -1
- package/dist/client/bookings.mjs.map +1 -1
- package/dist/client/client.d.mts +2 -2
- package/dist/client/client.d.ts +2 -2
- package/dist/client/client.js +51 -6
- package/dist/client/client.js.map +1 -1
- package/dist/client/client.mjs +51 -6
- package/dist/client/client.mjs.map +1 -1
- package/dist/client/hooks.d.mts +2 -2
- package/dist/client/hooks.d.ts +2 -2
- package/dist/client/rendering/client.js +114 -116
- package/dist/client/rendering/client.js.map +1 -1
- package/dist/client/rendering/client.mjs +114 -116
- package/dist/client/rendering/client.mjs.map +1 -1
- package/dist/client/usePage-BcjWPXvh.d.mts +6388 -0
- package/dist/client/usePage-C3ZKNwY7.d.mts +6393 -0
- package/dist/client/usePage-CrKw1H6Y.d.ts +6338 -0
- package/dist/client/usePage-CyYpOJud.d.ts +6388 -0
- package/dist/client/usePage-DMI8ImsU.d.mts +6338 -0
- package/dist/client/usePage-gpVaeWDy.d.ts +6393 -0
- package/dist/server/{Layout-DK_9OOgb.d.mts → Layout-B_zUr9ci.d.mts} +1 -1
- package/dist/server/{Layout-CLg8oH_S.d.ts → Layout-CHG77dhK.d.ts} +1 -1
- package/dist/server/blockKinds-B6MWzNWp.d.mts +16 -0
- package/dist/server/blockKinds-B6MWzNWp.d.ts +16 -0
- package/dist/server/chunk-BOHTTHY5.mjs +406 -0
- package/dist/server/chunk-BOHTTHY5.mjs.map +1 -0
- package/dist/server/{chunk-5R4NMVXA.js → chunk-BUCJWG6G.js} +5 -5
- package/dist/server/chunk-BUCJWG6G.js.map +1 -0
- package/dist/server/chunk-D2QLTPUJ.mjs +33 -0
- package/dist/server/chunk-D2QLTPUJ.mjs.map +1 -0
- package/dist/server/{chunk-62ZJI564.js → chunk-FPYK6527.js} +4 -4
- package/dist/server/{chunk-62ZJI564.js.map → chunk-FPYK6527.js.map} +1 -1
- package/dist/server/{chunk-YXDDFG3N.js → chunk-G4CKM4EN.js} +1 -1
- package/dist/server/chunk-G4CKM4EN.js.map +1 -0
- package/dist/server/chunk-GERCMTPQ.js +33 -0
- package/dist/server/chunk-GERCMTPQ.js.map +1 -0
- package/dist/server/{chunk-SF63XAX7.js → chunk-IT5ICP43.js} +24 -4
- package/dist/server/chunk-IT5ICP43.js.map +1 -0
- package/dist/server/{chunk-GWBMJPLH.mjs → chunk-M5KTLZTD.mjs} +1 -1
- package/dist/server/chunk-M5KTLZTD.mjs.map +1 -0
- package/dist/server/{chunk-3J46ILMJ.mjs → chunk-N3PX76AP.mjs} +29 -4
- package/dist/server/chunk-N3PX76AP.mjs.map +1 -0
- package/dist/server/{chunk-O5DC7MYW.mjs → chunk-NKXS4TBK.mjs} +24 -4
- package/dist/server/chunk-NKXS4TBK.mjs.map +1 -0
- package/dist/server/{chunk-INWKF3IC.js → chunk-P6CDRJN3.js} +8 -8
- package/dist/server/{chunk-INWKF3IC.js.map → chunk-P6CDRJN3.js.map} +1 -1
- package/dist/server/{chunk-GKYNDDJS.js → chunk-R5B6IOFQ.js} +29 -4
- package/dist/server/chunk-R5B6IOFQ.js.map +1 -0
- package/dist/server/{chunk-FK64TZBT.mjs → chunk-SFQ7VF3G.mjs} +2 -2
- package/dist/server/{chunk-JTAERCX2.mjs → chunk-VVFYHAUD.mjs} +2 -2
- package/dist/server/{chunk-PN3CHDVX.mjs → chunk-XK2YIISA.mjs} +2 -2
- package/dist/server/chunk-XK2YIISA.mjs.map +1 -0
- package/dist/server/chunk-ZIM53VP6.js +406 -0
- package/dist/server/chunk-ZIM53VP6.js.map +1 -0
- package/dist/server/{components-DhIcstww.d.ts → components-BYxloYJm.d.ts} +3 -3
- package/dist/server/{components-BzdA6NAc.d.mts → components-Ci5nlyUj.d.mts} +3 -3
- package/dist/server/components.d.mts +7 -5
- package/dist/server/components.d.ts +7 -5
- package/dist/server/components.js +3 -3
- package/dist/server/components.mjs +2 -2
- package/dist/server/config-validation.d.mts +5 -300
- package/dist/server/config-validation.d.ts +5 -300
- package/dist/server/config-validation.js +6 -3
- package/dist/server/config-validation.js.map +1 -1
- package/dist/server/config-validation.mjs +5 -2
- package/dist/server/config.d.mts +43 -4
- package/dist/server/config.d.ts +43 -4
- package/dist/server/config.js +27 -3
- package/dist/server/config.js.map +1 -1
- package/dist/server/config.mjs +26 -2
- package/dist/server/config.mjs.map +1 -1
- package/dist/server/data.d.mts +5 -3
- package/dist/server/data.d.ts +5 -3
- package/dist/server/data.js +2 -2
- package/dist/server/data.mjs +1 -1
- package/dist/server/{index-BB28KAui.d.ts → index-DbSfrRA0.d.ts} +1 -1
- package/dist/server/{index-C_FVup_o.d.mts → index-Dj7VKH34.d.mts} +1 -1
- package/dist/server/index.d.mts +19 -4
- package/dist/server/index.d.ts +19 -4
- package/dist/server/index.js +6 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +5 -1
- package/dist/server/{loadContent-AQOBf_gP.d.ts → loadContent-BqQ-VPMW.d.ts} +4 -3
- package/dist/server/{loadContent-DBmprsB4.d.mts → loadContent-Czu7xTOU.d.mts} +4 -3
- package/dist/server/{loadPage-BMg8PJxJ.d.ts → loadPage-BElEkA_J.d.ts} +3 -2
- package/dist/server/{loadPage-pg4HimlK.d.mts → loadPage-Dw57_n5N.d.mts} +3 -2
- package/dist/server/loadPage-E3ZC6NHB.js +11 -0
- package/dist/server/{loadPage-3ECPF426.js.map → loadPage-E3ZC6NHB.js.map} +1 -1
- package/dist/server/{loadPage-LW273NYO.mjs → loadPage-E7L7NMR3.mjs} +3 -3
- package/dist/server/metadata.d.mts +5 -3
- package/dist/server/metadata.d.ts +5 -3
- package/dist/server/navigation.d.mts +100 -0
- package/dist/server/navigation.d.ts +100 -0
- package/dist/server/navigation.js +44 -0
- package/dist/server/navigation.js.map +1 -0
- package/dist/server/navigation.mjs +44 -0
- package/dist/server/navigation.mjs.map +1 -0
- package/dist/server/rendering/server.d.mts +8 -6
- package/dist/server/rendering/server.d.ts +8 -6
- package/dist/server/rendering/server.js +4 -4
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.d.mts +9 -7
- package/dist/server/rendering.d.ts +9 -7
- package/dist/server/rendering.js +6 -6
- package/dist/server/rendering.mjs +5 -5
- package/dist/server/routing.d.mts +5 -3
- package/dist/server/routing.d.ts +5 -3
- package/dist/server/routing.js +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/server.d.mts +7 -5
- package/dist/server/server.d.ts +7 -5
- package/dist/server/server.js +4 -4
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.js +7 -7
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/{types-BprgZt-t.d.ts → types-5XdVD2J1.d.ts} +43 -147
- package/dist/server/{types-C0G9IxWO.d.mts → types-BA-J9K8r.d.mts} +43 -147
- package/dist/server/types-BC9eB2KH.d.mts +198 -0
- package/dist/server/{types-_nDnPHpv.d.ts → types-BuZJWVmj.d.mts} +4 -1
- package/dist/server/types-CAnC529E.d.ts +198 -0
- package/dist/server/{types--u4GLCAY.d.ts → types-CMqVHYLG.d.ts} +266 -4
- package/dist/server/{types-_zWJTgv0.d.mts → types-CYfHxUhe.d.mts} +266 -4
- package/dist/server/{types-_nDnPHpv.d.mts → types-DSFvXKhO.d.ts} +4 -1
- package/dist/server/validation-C7W2Fe0i.d.ts +459 -0
- package/dist/server/validation-hg1sqhrt.d.mts +459 -0
- package/package.json +23 -17
- package/dist/server/chunk-3J46ILMJ.mjs.map +0 -1
- package/dist/server/chunk-5R4NMVXA.js.map +0 -1
- package/dist/server/chunk-BPKYRPCQ.mjs +0 -215
- package/dist/server/chunk-BPKYRPCQ.mjs.map +0 -1
- package/dist/server/chunk-GKYNDDJS.js.map +0 -1
- package/dist/server/chunk-GWBMJPLH.mjs.map +0 -1
- package/dist/server/chunk-O5DC7MYW.mjs.map +0 -1
- package/dist/server/chunk-PN3CHDVX.mjs.map +0 -1
- package/dist/server/chunk-SF63XAX7.js.map +0 -1
- package/dist/server/chunk-XLVL5WPH.js +0 -215
- package/dist/server/chunk-XLVL5WPH.js.map +0 -1
- package/dist/server/chunk-YXDDFG3N.js.map +0 -1
- package/dist/server/loadPage-3ECPF426.js +0 -11
- /package/dist/server/{chunk-FK64TZBT.mjs.map → chunk-SFQ7VF3G.mjs.map} +0 -0
- /package/dist/server/{chunk-JTAERCX2.mjs.map → chunk-VVFYHAUD.mjs.map} +0 -0
- /package/dist/server/{loadPage-LW273NYO.mjs.map → loadPage-E7L7NMR3.mjs.map} +0 -0
package/dist/server/server.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { c as createRiverbankClient } from './index-
|
|
2
|
-
export { E as EntriesResponse, b as EntryResponse, P as PageResponse, R as RiverbankClient, a as RiverbankClientConfig, S as SiteResponse } from './types-
|
|
3
|
-
export { L as LoadPageParams, a as LoadPageResult, R as RuntimeSdkConfig, l as loadPage } from './loadPage-
|
|
4
|
-
export { C as ContentEntryData, E as EntryContentResult, L as LoadContentParams, b as LoadContentResult, P as PageContentResult, a as isEntryContent, i as isPageContent, l as loadContent } from './loadContent-
|
|
1
|
+
export { c as createRiverbankClient } from './index-DbSfrRA0.js';
|
|
2
|
+
export { E as EntriesResponse, b as EntryResponse, P as PageResponse, R as RiverbankClient, a as RiverbankClientConfig, S as SiteResponse } from './types-CAnC529E.js';
|
|
3
|
+
export { L as LoadPageParams, a as LoadPageResult, R as RuntimeSdkConfig, l as loadPage } from './loadPage-BElEkA_J.js';
|
|
4
|
+
export { C as ContentEntryData, E as EntryContentResult, L as LoadContentParams, b as LoadContentResult, P as PageContentResult, a as isEntryContent, i as isPageContent, l as loadContent } from './loadContent-BqQ-VPMW.js';
|
|
5
|
+
import './types-5XdVD2J1.js';
|
|
5
6
|
import '@riverbankcms/ai';
|
|
6
7
|
import './schema-Bpy9N5ZI.js';
|
|
7
8
|
import 'zod';
|
|
@@ -9,4 +10,5 @@ import '@riverbankcms/media-storage-supabase';
|
|
|
9
10
|
import '@riverbankcms/db';
|
|
10
11
|
import 'react/jsx-runtime';
|
|
11
12
|
import 'react';
|
|
12
|
-
import './types-
|
|
13
|
+
import './types-DSFvXKhO.js';
|
|
14
|
+
import './blockKinds-B6MWzNWp.js';
|
package/dist/server/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkR5B6IOFQjs = require('./chunk-R5B6IOFQ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -8,8 +8,8 @@ var _chunkGKYNDDJSjs = require('./chunk-GKYNDDJS.js');
|
|
|
8
8
|
var _chunkTO7FD6TQjs = require('./chunk-TO7FD6TQ.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
require('./chunk-
|
|
11
|
+
var _chunkFPYK6527js = require('./chunk-FPYK6527.js');
|
|
12
|
+
require('./chunk-G4CKM4EN.js');
|
|
13
13
|
require('./chunk-HOY77YBF.js');
|
|
14
14
|
require('./chunk-EGTDJ4PL.js');
|
|
15
15
|
require('./chunk-DGUM43GV.js');
|
|
@@ -19,5 +19,5 @@ require('./chunk-DGUM43GV.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.createRiverbankClient =
|
|
22
|
+
exports.createRiverbankClient = _chunkR5B6IOFQjs.createRiverbankClient; exports.isEntryContent = _chunkTO7FD6TQjs.isEntryContent; exports.isPageContent = _chunkTO7FD6TQjs.isPageContent; exports.loadContent = _chunkTO7FD6TQjs.loadContent; exports.loadPage = _chunkFPYK6527js.loadPage;
|
|
23
23
|
//# sourceMappingURL=server.js.map
|
package/dist/server/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRiverbankClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N3PX76AP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isEntryContent,
|
|
6
6
|
isPageContent,
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
} from "./chunk-OP2GHK27.mjs";
|
|
9
9
|
import {
|
|
10
10
|
loadPage
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-VVFYHAUD.mjs";
|
|
12
|
+
import "./chunk-M5KTLZTD.mjs";
|
|
13
13
|
import "./chunk-7DS4Q3GA.mjs";
|
|
14
14
|
import "./chunk-USQF2XTU.mjs";
|
|
15
15
|
import "./chunk-BJTO5JO5.mjs";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkIT5ICP43js = require('./chunk-IT5ICP43.js');
|
|
9
9
|
require('./chunk-EGTDJ4PL.js');
|
|
10
10
|
require('./chunk-DGUM43GV.js');
|
|
11
11
|
|
|
@@ -147,7 +147,7 @@ ${cssLines}
|
|
|
147
147
|
}
|
|
148
148
|
function generateButtonsCss(config, corners, shadows) {
|
|
149
149
|
const buttonConfig = _optionalChain([config, 'access', _7 => _7.components, 'optionalAccess', _8 => _8.buttons]);
|
|
150
|
-
let variants =
|
|
150
|
+
let variants = _chunkIT5ICP43js.getDefaultButtonVariants.call(void 0, );
|
|
151
151
|
if (typeof buttonConfig === "object" && buttonConfig.variants) {
|
|
152
152
|
const requestedIds = new Set(buttonConfig.variants);
|
|
153
153
|
variants = variants.filter((v) => requestedIds.has(v.id));
|
|
@@ -159,11 +159,11 @@ function generateButtonsCss(config, corners, shadows) {
|
|
|
159
159
|
fontWeight: 500,
|
|
160
160
|
textTransform: "none"
|
|
161
161
|
};
|
|
162
|
-
return
|
|
162
|
+
return _chunkIT5ICP43js.generateButtonCoreCss.call(void 0, SCOPE_ID, variants, settings);
|
|
163
163
|
}
|
|
164
164
|
function generateCardsCss(config, corners, shadows) {
|
|
165
165
|
const cardConfig = _optionalChain([config, 'access', _9 => _9.components, 'optionalAccess', _10 => _10.cards]);
|
|
166
|
-
let variants =
|
|
166
|
+
let variants = _chunkIT5ICP43js.getDefaultCardVariants.call(void 0, );
|
|
167
167
|
if (typeof cardConfig === "object" && cardConfig.variants) {
|
|
168
168
|
const requestedIds = new Set(cardConfig.variants);
|
|
169
169
|
variants = variants.filter((v) => requestedIds.has(v.id));
|
|
@@ -173,13 +173,13 @@ function generateCardsCss(config, corners, shadows) {
|
|
|
173
173
|
shadow: shadows,
|
|
174
174
|
borderWidth: "thin"
|
|
175
175
|
};
|
|
176
|
-
return
|
|
176
|
+
return _chunkIT5ICP43js.generateCardCoreCss.call(void 0, SCOPE_ID, variants, settings);
|
|
177
177
|
}
|
|
178
178
|
function generateInputsCss(config, corners, shadows) {
|
|
179
|
-
const settings =
|
|
179
|
+
const settings = _chunkIT5ICP43js.getDefaultInputSettings.call(void 0, );
|
|
180
180
|
settings.corners = corners;
|
|
181
181
|
settings.shadow = shadows === "none" ? "none" : "low";
|
|
182
|
-
return
|
|
182
|
+
return _chunkIT5ICP43js.generateInputCoreCss.call(void 0, SCOPE_ID, settings);
|
|
183
183
|
}
|
|
184
184
|
function generateOverrideCss(overrides) {
|
|
185
185
|
const chunks = [];
|
|
@@ -3491,6 +3491,8 @@ type APIEndpoints = {
|
|
|
3491
3491
|
importSiteBackup: APIEndpoint<FormData, {
|
|
3492
3492
|
siteId: string;
|
|
3493
3493
|
}, BackupImportResponse>;
|
|
3494
|
+
previewBackup: APIEndpoint<FormData, never, BackupPreviewResponse>;
|
|
3495
|
+
importBackupAsNewSite: APIEndpoint<FormData, never, ImportBackupAsNewSiteResponse>;
|
|
3494
3496
|
};
|
|
3495
3497
|
type APICallParams<E extends keyof APIEndpoints> = APIEndpoints[E] extends {
|
|
3496
3498
|
method: 'GET';
|
|
@@ -3831,6 +3833,7 @@ type ApiKeyRecord = {
|
|
|
3831
3833
|
id: string;
|
|
3832
3834
|
name: string;
|
|
3833
3835
|
keyPrefix: string;
|
|
3836
|
+
keyHint: string | null;
|
|
3834
3837
|
keyType: ApiKeyType;
|
|
3835
3838
|
createdAt: string;
|
|
3836
3839
|
lastUsedAt: string | null;
|
|
@@ -3845,6 +3848,7 @@ type PreviewKeyRecord = {
|
|
|
3845
3848
|
id: string;
|
|
3846
3849
|
name: string;
|
|
3847
3850
|
keyPrefix: string;
|
|
3851
|
+
keyHint: string | null;
|
|
3848
3852
|
createdAt: string;
|
|
3849
3853
|
lastUsedAt: string | null;
|
|
3850
3854
|
};
|
|
@@ -3998,152 +4002,44 @@ type BackupImportResponse = {
|
|
|
3998
4002
|
code?: string;
|
|
3999
4003
|
details?: unknown;
|
|
4000
4004
|
};
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
type EntriesResponse = NonNullable<APIEndpoints['listPublishedEntries']['response']>;
|
|
4005
|
-
type EntryResponse = NonNullable<APIEndpoints['getPublishedEntryPreview']['response']>;
|
|
4006
|
-
type PublicFormResponse = NonNullable<APIEndpoints['getPublicFormById']['response']>;
|
|
4007
|
-
type PublicBookingServicesResponse = NonNullable<APIEndpoints['getPublicBookingServices']['response']>;
|
|
4008
|
-
type PublicEventsResponse = NonNullable<APIEndpoints['listPublicEvents']['response']>;
|
|
4009
|
-
/**
|
|
4010
|
-
* Configuration for creating a Riverbank CMS client
|
|
4011
|
-
*/
|
|
4012
|
-
interface RiverbankClientConfig {
|
|
4013
|
-
/**
|
|
4014
|
-
* API key for authentication (format: bld_live_... or bld_test_...)
|
|
4015
|
-
*/
|
|
4016
|
-
apiKey: string;
|
|
4017
|
-
/**
|
|
4018
|
-
* Base URL for the Riverbank CMS API (required; e.g. https://dashboard.example.com/api)
|
|
4019
|
-
*/
|
|
4020
|
-
baseUrl: string;
|
|
4021
|
-
/**
|
|
4022
|
-
* Cache configuration
|
|
4023
|
-
*/
|
|
4024
|
-
cache?: {
|
|
4025
|
-
/**
|
|
4026
|
-
* Enable caching (default: true)
|
|
4027
|
-
*/
|
|
4028
|
-
enabled?: boolean;
|
|
4029
|
-
/**
|
|
4030
|
-
* Time-to-live for cached responses in seconds
|
|
4031
|
-
* @default 300 (5 minutes)
|
|
4032
|
-
*/
|
|
4033
|
-
ttl?: number;
|
|
4034
|
-
/**
|
|
4035
|
-
* Maximum number of cached responses
|
|
4036
|
-
* @default 100
|
|
4037
|
-
*/
|
|
4038
|
-
maxSize?: number;
|
|
4039
|
-
};
|
|
4040
|
-
}
|
|
4041
|
-
/**
|
|
4042
|
-
* Riverbank CMS client interface
|
|
4043
|
-
*/
|
|
4044
|
-
interface RiverbankClient {
|
|
4045
|
-
/**
|
|
4046
|
-
* Fetch site data by slug, domain, or ID
|
|
4047
|
-
*/
|
|
4048
|
-
getSite(params: {
|
|
4049
|
-
slug?: string;
|
|
4050
|
-
domain?: string;
|
|
4051
|
-
id?: string;
|
|
4052
|
-
}): Promise<SiteResponse>;
|
|
4053
|
-
/**
|
|
4054
|
-
* Fetch a specific page by path
|
|
4055
|
-
*
|
|
4056
|
-
* @param params.preview - If true, returns draft content instead of published content (requires API key with site access)
|
|
4057
|
-
*/
|
|
4058
|
-
getPage(params: {
|
|
4059
|
-
siteId: string;
|
|
4060
|
-
path: string;
|
|
4061
|
-
preview?: boolean;
|
|
4062
|
-
}): Promise<PageResponse>;
|
|
4063
|
-
/**
|
|
4064
|
-
* Fetch published content entries with optional pagination, sorting, and preview mode
|
|
4065
|
-
*
|
|
4066
|
-
* @param params.siteId - The site ID
|
|
4067
|
-
* @param params.contentType - The content type key (e.g., 'blog-post', 'product')
|
|
4068
|
-
* @param params.limit - Maximum number of entries to return
|
|
4069
|
-
* @param params.order - Sort order: 'newest' (published_at desc) or 'oldest' (published_at asc)
|
|
4070
|
-
* @param params.preview - If true, includes draft entries (requires API key with site access)
|
|
4071
|
-
* @param params.mode - 'query' for automatic fetching, 'manual' for specific entry IDs
|
|
4072
|
-
* @param params.entryIds - Array of entry IDs to fetch (only used when mode is 'manual')
|
|
4073
|
-
*
|
|
4074
|
-
* @example
|
|
4075
|
-
* ```ts
|
|
4076
|
-
* // Fetch latest 10 blog posts
|
|
4077
|
-
* const entries = await client.getEntries({
|
|
4078
|
-
* siteId: 'site-id',
|
|
4079
|
-
* contentType: 'blog-post',
|
|
4080
|
-
* limit: 10,
|
|
4081
|
-
* order: 'newest',
|
|
4082
|
-
* });
|
|
4083
|
-
*
|
|
4084
|
-
* // Fetch draft entries for preview
|
|
4085
|
-
* const drafts = await client.getEntries({
|
|
4086
|
-
* siteId: 'site-id',
|
|
4087
|
-
* contentType: 'blog-post',
|
|
4088
|
-
* preview: true,
|
|
4089
|
-
* });
|
|
4090
|
-
*
|
|
4091
|
-
* // Fetch specific entries by ID (manual mode)
|
|
4092
|
-
* const specific = await client.getEntries({
|
|
4093
|
-
* siteId: 'site-id',
|
|
4094
|
-
* contentType: 'blog-post',
|
|
4095
|
-
* mode: 'manual',
|
|
4096
|
-
* entryIds: ['uuid-1', 'uuid-2'],
|
|
4097
|
-
* });
|
|
4098
|
-
* ```
|
|
4099
|
-
*/
|
|
4100
|
-
getEntries(params: {
|
|
4101
|
-
siteId: string;
|
|
4102
|
-
contentType: string;
|
|
4103
|
-
limit?: number;
|
|
4104
|
-
/** Sort order for entries. 'order' uses custom ordering (default behavior). */
|
|
4105
|
-
order?: 'newest' | 'oldest' | 'title' | 'order';
|
|
4106
|
-
preview?: boolean;
|
|
4107
|
-
/** Selection mode: 'query' for automatic, 'manual' for specific entry IDs */
|
|
4108
|
-
mode?: 'query' | 'manual';
|
|
4109
|
-
/** Entry IDs to fetch when mode is 'manual' */
|
|
4110
|
-
entryIds?: string[];
|
|
4111
|
-
}): Promise<EntriesResponse>;
|
|
4112
|
-
/**
|
|
4113
|
-
* Fetch a specific content entry by slug
|
|
4114
|
-
*/
|
|
4115
|
-
getEntry(params: {
|
|
4116
|
-
siteId: string;
|
|
4117
|
-
contentType: string;
|
|
4118
|
-
slug: string;
|
|
4119
|
-
}): Promise<EntryResponse>;
|
|
4120
|
-
/**
|
|
4121
|
-
* Fetch a public form definition by ID
|
|
4122
|
-
*/
|
|
4123
|
-
getPublicFormById(params: {
|
|
4124
|
-
formId: string;
|
|
4125
|
-
}): Promise<PublicFormResponse>;
|
|
4126
|
-
/**
|
|
4127
|
-
* Fetch public booking services for a site
|
|
4128
|
-
*/
|
|
4129
|
-
getPublicBookingServices(params: {
|
|
4130
|
-
siteId: string;
|
|
4131
|
-
ids?: string;
|
|
4132
|
-
}): Promise<PublicBookingServicesResponse>;
|
|
4133
|
-
/**
|
|
4134
|
-
* List public events for a site (optionally time-filtered)
|
|
4135
|
-
*/
|
|
4136
|
-
listPublicEvents(params: {
|
|
4005
|
+
type BackupPreviewResponse = {
|
|
4006
|
+
ok: boolean;
|
|
4007
|
+
manifest?: {
|
|
4137
4008
|
siteId: string;
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4009
|
+
siteSlug: string;
|
|
4010
|
+
siteTitle: string;
|
|
4011
|
+
exportedAt: string;
|
|
4012
|
+
tableCount: number;
|
|
4013
|
+
totalRecords: number;
|
|
4014
|
+
pageCount: number;
|
|
4015
|
+
blockCount: number;
|
|
4016
|
+
contentEntryCount: number;
|
|
4017
|
+
formCount: number;
|
|
4018
|
+
navigationMenuCount: number;
|
|
4019
|
+
mediaCount: number;
|
|
4020
|
+
mediaBytes: number;
|
|
4021
|
+
};
|
|
4022
|
+
error?: string;
|
|
4023
|
+
code?: string;
|
|
4024
|
+
};
|
|
4025
|
+
type ImportBackupAsNewSiteResponse = {
|
|
4026
|
+
ok: boolean;
|
|
4027
|
+
siteId?: string;
|
|
4028
|
+
slug?: string;
|
|
4029
|
+
title?: string;
|
|
4030
|
+
counts?: Record<string, {
|
|
4031
|
+
created: number;
|
|
4032
|
+
updated: number;
|
|
4033
|
+
failed: number;
|
|
4034
|
+
}>;
|
|
4035
|
+
warnings?: string[];
|
|
4036
|
+
errors?: Array<{
|
|
4037
|
+
table: string;
|
|
4038
|
+
id: string;
|
|
4039
|
+
error: string;
|
|
4040
|
+
}>;
|
|
4041
|
+
error?: string;
|
|
4042
|
+
code?: string;
|
|
4043
|
+
};
|
|
4148
4044
|
|
|
4149
|
-
export type { APIEndpoints as A, CustomLinkValue as C,
|
|
4045
|
+
export type { APIEndpoints as A, CustomLinkValue as C, ExternalLinkValue as E, HydratedTheme as H, InternalLinkValue as I, LinkPayload as L, NavigationMenuWithItems as N, SiteHeaderContent as S, Theme as T, NavigationItemRecord as a, APICallParams as b, SiteFooterContent as c, LinkValue as d, ExpandedPalette as e };
|
|
@@ -3491,6 +3491,8 @@ type APIEndpoints = {
|
|
|
3491
3491
|
importSiteBackup: APIEndpoint<FormData, {
|
|
3492
3492
|
siteId: string;
|
|
3493
3493
|
}, BackupImportResponse>;
|
|
3494
|
+
previewBackup: APIEndpoint<FormData, never, BackupPreviewResponse>;
|
|
3495
|
+
importBackupAsNewSite: APIEndpoint<FormData, never, ImportBackupAsNewSiteResponse>;
|
|
3494
3496
|
};
|
|
3495
3497
|
type APICallParams<E extends keyof APIEndpoints> = APIEndpoints[E] extends {
|
|
3496
3498
|
method: 'GET';
|
|
@@ -3831,6 +3833,7 @@ type ApiKeyRecord = {
|
|
|
3831
3833
|
id: string;
|
|
3832
3834
|
name: string;
|
|
3833
3835
|
keyPrefix: string;
|
|
3836
|
+
keyHint: string | null;
|
|
3834
3837
|
keyType: ApiKeyType;
|
|
3835
3838
|
createdAt: string;
|
|
3836
3839
|
lastUsedAt: string | null;
|
|
@@ -3845,6 +3848,7 @@ type PreviewKeyRecord = {
|
|
|
3845
3848
|
id: string;
|
|
3846
3849
|
name: string;
|
|
3847
3850
|
keyPrefix: string;
|
|
3851
|
+
keyHint: string | null;
|
|
3848
3852
|
createdAt: string;
|
|
3849
3853
|
lastUsedAt: string | null;
|
|
3850
3854
|
};
|
|
@@ -3998,152 +4002,44 @@ type BackupImportResponse = {
|
|
|
3998
4002
|
code?: string;
|
|
3999
4003
|
details?: unknown;
|
|
4000
4004
|
};
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
type EntriesResponse = NonNullable<APIEndpoints['listPublishedEntries']['response']>;
|
|
4005
|
-
type EntryResponse = NonNullable<APIEndpoints['getPublishedEntryPreview']['response']>;
|
|
4006
|
-
type PublicFormResponse = NonNullable<APIEndpoints['getPublicFormById']['response']>;
|
|
4007
|
-
type PublicBookingServicesResponse = NonNullable<APIEndpoints['getPublicBookingServices']['response']>;
|
|
4008
|
-
type PublicEventsResponse = NonNullable<APIEndpoints['listPublicEvents']['response']>;
|
|
4009
|
-
/**
|
|
4010
|
-
* Configuration for creating a Riverbank CMS client
|
|
4011
|
-
*/
|
|
4012
|
-
interface RiverbankClientConfig {
|
|
4013
|
-
/**
|
|
4014
|
-
* API key for authentication (format: bld_live_... or bld_test_...)
|
|
4015
|
-
*/
|
|
4016
|
-
apiKey: string;
|
|
4017
|
-
/**
|
|
4018
|
-
* Base URL for the Riverbank CMS API (required; e.g. https://dashboard.example.com/api)
|
|
4019
|
-
*/
|
|
4020
|
-
baseUrl: string;
|
|
4021
|
-
/**
|
|
4022
|
-
* Cache configuration
|
|
4023
|
-
*/
|
|
4024
|
-
cache?: {
|
|
4025
|
-
/**
|
|
4026
|
-
* Enable caching (default: true)
|
|
4027
|
-
*/
|
|
4028
|
-
enabled?: boolean;
|
|
4029
|
-
/**
|
|
4030
|
-
* Time-to-live for cached responses in seconds
|
|
4031
|
-
* @default 300 (5 minutes)
|
|
4032
|
-
*/
|
|
4033
|
-
ttl?: number;
|
|
4034
|
-
/**
|
|
4035
|
-
* Maximum number of cached responses
|
|
4036
|
-
* @default 100
|
|
4037
|
-
*/
|
|
4038
|
-
maxSize?: number;
|
|
4039
|
-
};
|
|
4040
|
-
}
|
|
4041
|
-
/**
|
|
4042
|
-
* Riverbank CMS client interface
|
|
4043
|
-
*/
|
|
4044
|
-
interface RiverbankClient {
|
|
4045
|
-
/**
|
|
4046
|
-
* Fetch site data by slug, domain, or ID
|
|
4047
|
-
*/
|
|
4048
|
-
getSite(params: {
|
|
4049
|
-
slug?: string;
|
|
4050
|
-
domain?: string;
|
|
4051
|
-
id?: string;
|
|
4052
|
-
}): Promise<SiteResponse>;
|
|
4053
|
-
/**
|
|
4054
|
-
* Fetch a specific page by path
|
|
4055
|
-
*
|
|
4056
|
-
* @param params.preview - If true, returns draft content instead of published content (requires API key with site access)
|
|
4057
|
-
*/
|
|
4058
|
-
getPage(params: {
|
|
4059
|
-
siteId: string;
|
|
4060
|
-
path: string;
|
|
4061
|
-
preview?: boolean;
|
|
4062
|
-
}): Promise<PageResponse>;
|
|
4063
|
-
/**
|
|
4064
|
-
* Fetch published content entries with optional pagination, sorting, and preview mode
|
|
4065
|
-
*
|
|
4066
|
-
* @param params.siteId - The site ID
|
|
4067
|
-
* @param params.contentType - The content type key (e.g., 'blog-post', 'product')
|
|
4068
|
-
* @param params.limit - Maximum number of entries to return
|
|
4069
|
-
* @param params.order - Sort order: 'newest' (published_at desc) or 'oldest' (published_at asc)
|
|
4070
|
-
* @param params.preview - If true, includes draft entries (requires API key with site access)
|
|
4071
|
-
* @param params.mode - 'query' for automatic fetching, 'manual' for specific entry IDs
|
|
4072
|
-
* @param params.entryIds - Array of entry IDs to fetch (only used when mode is 'manual')
|
|
4073
|
-
*
|
|
4074
|
-
* @example
|
|
4075
|
-
* ```ts
|
|
4076
|
-
* // Fetch latest 10 blog posts
|
|
4077
|
-
* const entries = await client.getEntries({
|
|
4078
|
-
* siteId: 'site-id',
|
|
4079
|
-
* contentType: 'blog-post',
|
|
4080
|
-
* limit: 10,
|
|
4081
|
-
* order: 'newest',
|
|
4082
|
-
* });
|
|
4083
|
-
*
|
|
4084
|
-
* // Fetch draft entries for preview
|
|
4085
|
-
* const drafts = await client.getEntries({
|
|
4086
|
-
* siteId: 'site-id',
|
|
4087
|
-
* contentType: 'blog-post',
|
|
4088
|
-
* preview: true,
|
|
4089
|
-
* });
|
|
4090
|
-
*
|
|
4091
|
-
* // Fetch specific entries by ID (manual mode)
|
|
4092
|
-
* const specific = await client.getEntries({
|
|
4093
|
-
* siteId: 'site-id',
|
|
4094
|
-
* contentType: 'blog-post',
|
|
4095
|
-
* mode: 'manual',
|
|
4096
|
-
* entryIds: ['uuid-1', 'uuid-2'],
|
|
4097
|
-
* });
|
|
4098
|
-
* ```
|
|
4099
|
-
*/
|
|
4100
|
-
getEntries(params: {
|
|
4101
|
-
siteId: string;
|
|
4102
|
-
contentType: string;
|
|
4103
|
-
limit?: number;
|
|
4104
|
-
/** Sort order for entries. 'order' uses custom ordering (default behavior). */
|
|
4105
|
-
order?: 'newest' | 'oldest' | 'title' | 'order';
|
|
4106
|
-
preview?: boolean;
|
|
4107
|
-
/** Selection mode: 'query' for automatic, 'manual' for specific entry IDs */
|
|
4108
|
-
mode?: 'query' | 'manual';
|
|
4109
|
-
/** Entry IDs to fetch when mode is 'manual' */
|
|
4110
|
-
entryIds?: string[];
|
|
4111
|
-
}): Promise<EntriesResponse>;
|
|
4112
|
-
/**
|
|
4113
|
-
* Fetch a specific content entry by slug
|
|
4114
|
-
*/
|
|
4115
|
-
getEntry(params: {
|
|
4116
|
-
siteId: string;
|
|
4117
|
-
contentType: string;
|
|
4118
|
-
slug: string;
|
|
4119
|
-
}): Promise<EntryResponse>;
|
|
4120
|
-
/**
|
|
4121
|
-
* Fetch a public form definition by ID
|
|
4122
|
-
*/
|
|
4123
|
-
getPublicFormById(params: {
|
|
4124
|
-
formId: string;
|
|
4125
|
-
}): Promise<PublicFormResponse>;
|
|
4126
|
-
/**
|
|
4127
|
-
* Fetch public booking services for a site
|
|
4128
|
-
*/
|
|
4129
|
-
getPublicBookingServices(params: {
|
|
4130
|
-
siteId: string;
|
|
4131
|
-
ids?: string;
|
|
4132
|
-
}): Promise<PublicBookingServicesResponse>;
|
|
4133
|
-
/**
|
|
4134
|
-
* List public events for a site (optionally time-filtered)
|
|
4135
|
-
*/
|
|
4136
|
-
listPublicEvents(params: {
|
|
4005
|
+
type BackupPreviewResponse = {
|
|
4006
|
+
ok: boolean;
|
|
4007
|
+
manifest?: {
|
|
4137
4008
|
siteId: string;
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4009
|
+
siteSlug: string;
|
|
4010
|
+
siteTitle: string;
|
|
4011
|
+
exportedAt: string;
|
|
4012
|
+
tableCount: number;
|
|
4013
|
+
totalRecords: number;
|
|
4014
|
+
pageCount: number;
|
|
4015
|
+
blockCount: number;
|
|
4016
|
+
contentEntryCount: number;
|
|
4017
|
+
formCount: number;
|
|
4018
|
+
navigationMenuCount: number;
|
|
4019
|
+
mediaCount: number;
|
|
4020
|
+
mediaBytes: number;
|
|
4021
|
+
};
|
|
4022
|
+
error?: string;
|
|
4023
|
+
code?: string;
|
|
4024
|
+
};
|
|
4025
|
+
type ImportBackupAsNewSiteResponse = {
|
|
4026
|
+
ok: boolean;
|
|
4027
|
+
siteId?: string;
|
|
4028
|
+
slug?: string;
|
|
4029
|
+
title?: string;
|
|
4030
|
+
counts?: Record<string, {
|
|
4031
|
+
created: number;
|
|
4032
|
+
updated: number;
|
|
4033
|
+
failed: number;
|
|
4034
|
+
}>;
|
|
4035
|
+
warnings?: string[];
|
|
4036
|
+
errors?: Array<{
|
|
4037
|
+
table: string;
|
|
4038
|
+
id: string;
|
|
4039
|
+
error: string;
|
|
4040
|
+
}>;
|
|
4041
|
+
error?: string;
|
|
4042
|
+
code?: string;
|
|
4043
|
+
};
|
|
4148
4044
|
|
|
4149
|
-
export type { APIEndpoints as A, CustomLinkValue as C,
|
|
4045
|
+
export type { APIEndpoints as A, CustomLinkValue as C, ExternalLinkValue as E, HydratedTheme as H, InternalLinkValue as I, LinkPayload as L, NavigationMenuWithItems as N, SiteHeaderContent as S, Theme as T, NavigationItemRecord as a, APICallParams as b, SiteFooterContent as c, LinkValue as d, ExpandedPalette as e };
|