@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.
Files changed (147) hide show
  1. package/README.md +255 -1
  2. package/dist/cli/index.js +249 -40
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/client/bookings.js +15 -1
  5. package/dist/client/bookings.js.map +1 -1
  6. package/dist/client/bookings.mjs +15 -1
  7. package/dist/client/bookings.mjs.map +1 -1
  8. package/dist/client/client.d.mts +2 -2
  9. package/dist/client/client.d.ts +2 -2
  10. package/dist/client/client.js +51 -6
  11. package/dist/client/client.js.map +1 -1
  12. package/dist/client/client.mjs +51 -6
  13. package/dist/client/client.mjs.map +1 -1
  14. package/dist/client/hooks.d.mts +2 -2
  15. package/dist/client/hooks.d.ts +2 -2
  16. package/dist/client/rendering/client.js +114 -116
  17. package/dist/client/rendering/client.js.map +1 -1
  18. package/dist/client/rendering/client.mjs +114 -116
  19. package/dist/client/rendering/client.mjs.map +1 -1
  20. package/dist/client/usePage-BcjWPXvh.d.mts +6388 -0
  21. package/dist/client/usePage-C3ZKNwY7.d.mts +6393 -0
  22. package/dist/client/usePage-CrKw1H6Y.d.ts +6338 -0
  23. package/dist/client/usePage-CyYpOJud.d.ts +6388 -0
  24. package/dist/client/usePage-DMI8ImsU.d.mts +6338 -0
  25. package/dist/client/usePage-gpVaeWDy.d.ts +6393 -0
  26. package/dist/server/{Layout-DK_9OOgb.d.mts → Layout-B_zUr9ci.d.mts} +1 -1
  27. package/dist/server/{Layout-CLg8oH_S.d.ts → Layout-CHG77dhK.d.ts} +1 -1
  28. package/dist/server/blockKinds-B6MWzNWp.d.mts +16 -0
  29. package/dist/server/blockKinds-B6MWzNWp.d.ts +16 -0
  30. package/dist/server/chunk-BOHTTHY5.mjs +406 -0
  31. package/dist/server/chunk-BOHTTHY5.mjs.map +1 -0
  32. package/dist/server/{chunk-5R4NMVXA.js → chunk-BUCJWG6G.js} +5 -5
  33. package/dist/server/chunk-BUCJWG6G.js.map +1 -0
  34. package/dist/server/chunk-D2QLTPUJ.mjs +33 -0
  35. package/dist/server/chunk-D2QLTPUJ.mjs.map +1 -0
  36. package/dist/server/{chunk-62ZJI564.js → chunk-FPYK6527.js} +4 -4
  37. package/dist/server/{chunk-62ZJI564.js.map → chunk-FPYK6527.js.map} +1 -1
  38. package/dist/server/{chunk-YXDDFG3N.js → chunk-G4CKM4EN.js} +1 -1
  39. package/dist/server/chunk-G4CKM4EN.js.map +1 -0
  40. package/dist/server/chunk-GERCMTPQ.js +33 -0
  41. package/dist/server/chunk-GERCMTPQ.js.map +1 -0
  42. package/dist/server/{chunk-SF63XAX7.js → chunk-IT5ICP43.js} +24 -4
  43. package/dist/server/chunk-IT5ICP43.js.map +1 -0
  44. package/dist/server/{chunk-GWBMJPLH.mjs → chunk-M5KTLZTD.mjs} +1 -1
  45. package/dist/server/chunk-M5KTLZTD.mjs.map +1 -0
  46. package/dist/server/{chunk-3J46ILMJ.mjs → chunk-N3PX76AP.mjs} +29 -4
  47. package/dist/server/chunk-N3PX76AP.mjs.map +1 -0
  48. package/dist/server/{chunk-O5DC7MYW.mjs → chunk-NKXS4TBK.mjs} +24 -4
  49. package/dist/server/chunk-NKXS4TBK.mjs.map +1 -0
  50. package/dist/server/{chunk-INWKF3IC.js → chunk-P6CDRJN3.js} +8 -8
  51. package/dist/server/{chunk-INWKF3IC.js.map → chunk-P6CDRJN3.js.map} +1 -1
  52. package/dist/server/{chunk-GKYNDDJS.js → chunk-R5B6IOFQ.js} +29 -4
  53. package/dist/server/chunk-R5B6IOFQ.js.map +1 -0
  54. package/dist/server/{chunk-FK64TZBT.mjs → chunk-SFQ7VF3G.mjs} +2 -2
  55. package/dist/server/{chunk-JTAERCX2.mjs → chunk-VVFYHAUD.mjs} +2 -2
  56. package/dist/server/{chunk-PN3CHDVX.mjs → chunk-XK2YIISA.mjs} +2 -2
  57. package/dist/server/chunk-XK2YIISA.mjs.map +1 -0
  58. package/dist/server/chunk-ZIM53VP6.js +406 -0
  59. package/dist/server/chunk-ZIM53VP6.js.map +1 -0
  60. package/dist/server/{components-DhIcstww.d.ts → components-BYxloYJm.d.ts} +3 -3
  61. package/dist/server/{components-BzdA6NAc.d.mts → components-Ci5nlyUj.d.mts} +3 -3
  62. package/dist/server/components.d.mts +7 -5
  63. package/dist/server/components.d.ts +7 -5
  64. package/dist/server/components.js +3 -3
  65. package/dist/server/components.mjs +2 -2
  66. package/dist/server/config-validation.d.mts +5 -300
  67. package/dist/server/config-validation.d.ts +5 -300
  68. package/dist/server/config-validation.js +6 -3
  69. package/dist/server/config-validation.js.map +1 -1
  70. package/dist/server/config-validation.mjs +5 -2
  71. package/dist/server/config.d.mts +43 -4
  72. package/dist/server/config.d.ts +43 -4
  73. package/dist/server/config.js +27 -3
  74. package/dist/server/config.js.map +1 -1
  75. package/dist/server/config.mjs +26 -2
  76. package/dist/server/config.mjs.map +1 -1
  77. package/dist/server/data.d.mts +5 -3
  78. package/dist/server/data.d.ts +5 -3
  79. package/dist/server/data.js +2 -2
  80. package/dist/server/data.mjs +1 -1
  81. package/dist/server/{index-BB28KAui.d.ts → index-DbSfrRA0.d.ts} +1 -1
  82. package/dist/server/{index-C_FVup_o.d.mts → index-Dj7VKH34.d.mts} +1 -1
  83. package/dist/server/index.d.mts +19 -4
  84. package/dist/server/index.d.ts +19 -4
  85. package/dist/server/index.js +6 -2
  86. package/dist/server/index.js.map +1 -1
  87. package/dist/server/index.mjs +5 -1
  88. package/dist/server/{loadContent-AQOBf_gP.d.ts → loadContent-BqQ-VPMW.d.ts} +4 -3
  89. package/dist/server/{loadContent-DBmprsB4.d.mts → loadContent-Czu7xTOU.d.mts} +4 -3
  90. package/dist/server/{loadPage-BMg8PJxJ.d.ts → loadPage-BElEkA_J.d.ts} +3 -2
  91. package/dist/server/{loadPage-pg4HimlK.d.mts → loadPage-Dw57_n5N.d.mts} +3 -2
  92. package/dist/server/loadPage-E3ZC6NHB.js +11 -0
  93. package/dist/server/{loadPage-3ECPF426.js.map → loadPage-E3ZC6NHB.js.map} +1 -1
  94. package/dist/server/{loadPage-LW273NYO.mjs → loadPage-E7L7NMR3.mjs} +3 -3
  95. package/dist/server/metadata.d.mts +5 -3
  96. package/dist/server/metadata.d.ts +5 -3
  97. package/dist/server/navigation.d.mts +100 -0
  98. package/dist/server/navigation.d.ts +100 -0
  99. package/dist/server/navigation.js +44 -0
  100. package/dist/server/navigation.js.map +1 -0
  101. package/dist/server/navigation.mjs +44 -0
  102. package/dist/server/navigation.mjs.map +1 -0
  103. package/dist/server/rendering/server.d.mts +8 -6
  104. package/dist/server/rendering/server.d.ts +8 -6
  105. package/dist/server/rendering/server.js +4 -4
  106. package/dist/server/rendering/server.mjs +3 -3
  107. package/dist/server/rendering.d.mts +9 -7
  108. package/dist/server/rendering.d.ts +9 -7
  109. package/dist/server/rendering.js +6 -6
  110. package/dist/server/rendering.mjs +5 -5
  111. package/dist/server/routing.d.mts +5 -3
  112. package/dist/server/routing.d.ts +5 -3
  113. package/dist/server/routing.js +1 -1
  114. package/dist/server/routing.mjs +1 -1
  115. package/dist/server/server.d.mts +7 -5
  116. package/dist/server/server.d.ts +7 -5
  117. package/dist/server/server.js +4 -4
  118. package/dist/server/server.mjs +3 -3
  119. package/dist/server/theme-bridge.js +7 -7
  120. package/dist/server/theme-bridge.mjs +1 -1
  121. package/dist/server/{types-BprgZt-t.d.ts → types-5XdVD2J1.d.ts} +43 -147
  122. package/dist/server/{types-C0G9IxWO.d.mts → types-BA-J9K8r.d.mts} +43 -147
  123. package/dist/server/types-BC9eB2KH.d.mts +198 -0
  124. package/dist/server/{types-_nDnPHpv.d.ts → types-BuZJWVmj.d.mts} +4 -1
  125. package/dist/server/types-CAnC529E.d.ts +198 -0
  126. package/dist/server/{types--u4GLCAY.d.ts → types-CMqVHYLG.d.ts} +266 -4
  127. package/dist/server/{types-_zWJTgv0.d.mts → types-CYfHxUhe.d.mts} +266 -4
  128. package/dist/server/{types-_nDnPHpv.d.mts → types-DSFvXKhO.d.ts} +4 -1
  129. package/dist/server/validation-C7W2Fe0i.d.ts +459 -0
  130. package/dist/server/validation-hg1sqhrt.d.mts +459 -0
  131. package/package.json +23 -17
  132. package/dist/server/chunk-3J46ILMJ.mjs.map +0 -1
  133. package/dist/server/chunk-5R4NMVXA.js.map +0 -1
  134. package/dist/server/chunk-BPKYRPCQ.mjs +0 -215
  135. package/dist/server/chunk-BPKYRPCQ.mjs.map +0 -1
  136. package/dist/server/chunk-GKYNDDJS.js.map +0 -1
  137. package/dist/server/chunk-GWBMJPLH.mjs.map +0 -1
  138. package/dist/server/chunk-O5DC7MYW.mjs.map +0 -1
  139. package/dist/server/chunk-PN3CHDVX.mjs.map +0 -1
  140. package/dist/server/chunk-SF63XAX7.js.map +0 -1
  141. package/dist/server/chunk-XLVL5WPH.js +0 -215
  142. package/dist/server/chunk-XLVL5WPH.js.map +0 -1
  143. package/dist/server/chunk-YXDDFG3N.js.map +0 -1
  144. package/dist/server/loadPage-3ECPF426.js +0 -11
  145. /package/dist/server/{chunk-FK64TZBT.mjs.map → chunk-SFQ7VF3G.mjs.map} +0 -0
  146. /package/dist/server/{chunk-JTAERCX2.mjs.map → chunk-VVFYHAUD.mjs.map} +0 -0
  147. /package/dist/server/{loadPage-LW273NYO.mjs.map → loadPage-E7L7NMR3.mjs.map} +0 -0
@@ -0,0 +1,198 @@
1
+ import { A as APIEndpoints } from './types-BA-J9K8r.mjs';
2
+
3
+ type SiteResponse = NonNullable<APIEndpoints['getSite']['response']>;
4
+ type PageResponse = NonNullable<APIEndpoints['getContentByPath']['response']>;
5
+ type EntriesResponse = NonNullable<APIEndpoints['listPublishedEntries']['response']>;
6
+ type EntryResponse = NonNullable<APIEndpoints['getPublishedEntryPreview']['response']>;
7
+ type PublicFormResponse = NonNullable<APIEndpoints['getPublicFormById']['response']>;
8
+ type PublicBookingServicesResponse = NonNullable<APIEndpoints['getPublicBookingServices']['response']>;
9
+ type PublicEventsResponse = NonNullable<APIEndpoints['listPublicEvents']['response']>;
10
+ /**
11
+ * Pagination metadata returned when `includeMeta: true`
12
+ */
13
+ interface PaginationMeta {
14
+ /** Total number of entries matching the query (estimated if hasMore is true) */
15
+ total: number;
16
+ /** Whether there are more entries after this page */
17
+ hasMore: boolean;
18
+ /** Number of entries per page */
19
+ limit: number;
20
+ /** Number of entries skipped (offset) */
21
+ offset: number;
22
+ /** Total number of pages (estimated if hasMore is true) */
23
+ totalPages: number;
24
+ /** Current page number (1-indexed) */
25
+ currentPage: number;
26
+ }
27
+ /**
28
+ * Response type when includeMeta is true - includes pagination metadata
29
+ */
30
+ type EntriesResponseWithMeta = {
31
+ entries: EntriesResponse['entries'];
32
+ } & PaginationMeta;
33
+ /**
34
+ * Base parameters for getEntries - shared across all overloads
35
+ */
36
+ interface GetEntriesBaseParams {
37
+ /** The site ID */
38
+ siteId: string;
39
+ /** The content type key (e.g., 'blog-post', 'product') */
40
+ contentType: string;
41
+ /** Maximum number of entries to return (default: 10, max: 50) */
42
+ limit?: number;
43
+ /** Number of entries to skip for pagination */
44
+ offset?: number;
45
+ /** Sort order for entries. 'order' uses custom ordering (default behavior). */
46
+ order?: 'newest' | 'oldest' | 'title' | 'order';
47
+ /** If true, includes draft entries (requires API key with site access) */
48
+ preview?: boolean;
49
+ /** Selection mode: 'query' for automatic, 'manual' for specific entry IDs */
50
+ mode?: 'query' | 'manual';
51
+ /** Entry IDs to fetch when mode is 'manual' */
52
+ entryIds?: string[];
53
+ }
54
+ /**
55
+ * Configuration for creating a Riverbank CMS client
56
+ */
57
+ interface RiverbankClientConfig {
58
+ /**
59
+ * API key for authentication (format: bld_live_... or bld_test_...)
60
+ */
61
+ apiKey: string;
62
+ /**
63
+ * Base URL for the Riverbank CMS API (required; e.g. https://dashboard.example.com/api)
64
+ */
65
+ baseUrl: string;
66
+ /**
67
+ * Cache configuration
68
+ */
69
+ cache?: {
70
+ /**
71
+ * Enable caching (default: true)
72
+ */
73
+ enabled?: boolean;
74
+ /**
75
+ * Time-to-live for cached responses in seconds
76
+ * @default 300 (5 minutes)
77
+ */
78
+ ttl?: number;
79
+ /**
80
+ * Maximum number of cached responses
81
+ * @default 100
82
+ */
83
+ maxSize?: number;
84
+ };
85
+ }
86
+ /**
87
+ * Riverbank CMS client interface
88
+ */
89
+ interface RiverbankClient {
90
+ /**
91
+ * Fetch site data by slug, domain, or ID
92
+ */
93
+ getSite(params: {
94
+ slug?: string;
95
+ domain?: string;
96
+ id?: string;
97
+ }): Promise<SiteResponse>;
98
+ /**
99
+ * Fetch a specific page by path
100
+ *
101
+ * @param params.preview - If true, returns draft content instead of published content (requires API key with site access)
102
+ */
103
+ getPage(params: {
104
+ siteId: string;
105
+ path: string;
106
+ preview?: boolean;
107
+ }): Promise<PageResponse>;
108
+ /**
109
+ * Fetch published content entries with optional pagination, sorting, and preview mode
110
+ *
111
+ * @param params.siteId - The site ID
112
+ * @param params.contentType - The content type key (e.g., 'blog-post', 'product')
113
+ * @param params.limit - Maximum number of entries to return (default: 10, max: 50)
114
+ * @param params.offset - Number of entries to skip for pagination (default: 0)
115
+ * @param params.order - Sort order: 'newest' (published_at desc) or 'oldest' (published_at asc)
116
+ * @param params.preview - If true, includes draft entries (requires API key with site access)
117
+ * @param params.mode - 'query' for automatic fetching, 'manual' for specific entry IDs
118
+ * @param params.entryIds - Array of entry IDs to fetch (only used when mode is 'manual')
119
+ * @param params.includeMeta - If true, returns pagination metadata with the response
120
+ *
121
+ * @example
122
+ * ```ts
123
+ * // Fetch latest 10 blog posts
124
+ * const entries = await client.getEntries({
125
+ * siteId: 'site-id',
126
+ * contentType: 'blog-post',
127
+ * limit: 10,
128
+ * order: 'newest',
129
+ * });
130
+ *
131
+ * // Fetch page 3 with pagination metadata
132
+ * const page3 = await client.getEntries({
133
+ * siteId: 'site-id',
134
+ * contentType: 'blog-post',
135
+ * limit: 10,
136
+ * offset: 20,
137
+ * includeMeta: true,
138
+ * });
139
+ * // page3.entries, page3.total, page3.hasMore, page3.currentPage
140
+ *
141
+ * // Fetch specific entries by ID (manual mode)
142
+ * const specific = await client.getEntries({
143
+ * siteId: 'site-id',
144
+ * contentType: 'blog-post',
145
+ * mode: 'manual',
146
+ * entryIds: ['uuid-1', 'uuid-2'],
147
+ * });
148
+ * ```
149
+ */
150
+ getEntries(params: GetEntriesBaseParams & {
151
+ /** If true, returns pagination metadata with the response */
152
+ includeMeta?: false;
153
+ }): Promise<EntriesResponse>;
154
+ getEntries(params: GetEntriesBaseParams & {
155
+ /** If true, returns pagination metadata with the response */
156
+ includeMeta: true;
157
+ }): Promise<EntriesResponseWithMeta>;
158
+ getEntries(params: GetEntriesBaseParams & {
159
+ includeMeta?: boolean;
160
+ }): Promise<EntriesResponse | EntriesResponseWithMeta>;
161
+ /**
162
+ * Fetch a specific content entry by slug
163
+ */
164
+ getEntry(params: {
165
+ siteId: string;
166
+ contentType: string;
167
+ slug: string;
168
+ }): Promise<EntryResponse>;
169
+ /**
170
+ * Fetch a public form definition by ID
171
+ */
172
+ getPublicFormById(params: {
173
+ formId: string;
174
+ }): Promise<PublicFormResponse>;
175
+ /**
176
+ * Fetch public booking services for a site
177
+ */
178
+ getPublicBookingServices(params: {
179
+ siteId: string;
180
+ ids?: string;
181
+ }): Promise<PublicBookingServicesResponse>;
182
+ /**
183
+ * List public events for a site (optionally time-filtered)
184
+ */
185
+ listPublicEvents(params: {
186
+ siteId: string;
187
+ limit?: number;
188
+ from?: string;
189
+ to?: string;
190
+ stage?: string;
191
+ }): Promise<PublicEventsResponse>;
192
+ /**
193
+ * Force clear the cache
194
+ */
195
+ clearCache(): void;
196
+ }
197
+
198
+ export type { EntriesResponse as E, PageResponse as P, RiverbankClient as R, SiteResponse as S, RiverbankClientConfig as a, EntryResponse as b, EntriesResponseWithMeta as c, PaginationMeta as d };
@@ -1,3 +1,5 @@
1
+ import { B as BlockKind } from './blockKinds-B6MWzNWp.mjs';
2
+
1
3
  /**
2
4
  * Data loading types for block prefetching.
3
5
  * Shared between frontend and SDK implementations.
@@ -30,6 +32,7 @@ type ResolvedBlockData = Record<string, Record<string, unknown>>;
30
32
  * These types enable SDK sites to define loader functions that fetch
31
33
  * data from external APIs (not just CMS endpoints).
32
34
  */
35
+
33
36
  /**
34
37
  * Context provided to code-based data loaders.
35
38
  *
@@ -44,7 +47,7 @@ interface DataLoaderContext {
44
47
  /** Unique block instance ID */
45
48
  blockId: string;
46
49
  /** Block kind (e.g., 'custom.featured-products') */
47
- blockKind: string;
50
+ blockKind: BlockKind;
48
51
  /**
49
52
  * The block's CMS content.
50
53
  * Use this to access field values for parameterizing API calls.
@@ -0,0 +1,198 @@
1
+ import { A as APIEndpoints } from './types-5XdVD2J1.js';
2
+
3
+ type SiteResponse = NonNullable<APIEndpoints['getSite']['response']>;
4
+ type PageResponse = NonNullable<APIEndpoints['getContentByPath']['response']>;
5
+ type EntriesResponse = NonNullable<APIEndpoints['listPublishedEntries']['response']>;
6
+ type EntryResponse = NonNullable<APIEndpoints['getPublishedEntryPreview']['response']>;
7
+ type PublicFormResponse = NonNullable<APIEndpoints['getPublicFormById']['response']>;
8
+ type PublicBookingServicesResponse = NonNullable<APIEndpoints['getPublicBookingServices']['response']>;
9
+ type PublicEventsResponse = NonNullable<APIEndpoints['listPublicEvents']['response']>;
10
+ /**
11
+ * Pagination metadata returned when `includeMeta: true`
12
+ */
13
+ interface PaginationMeta {
14
+ /** Total number of entries matching the query (estimated if hasMore is true) */
15
+ total: number;
16
+ /** Whether there are more entries after this page */
17
+ hasMore: boolean;
18
+ /** Number of entries per page */
19
+ limit: number;
20
+ /** Number of entries skipped (offset) */
21
+ offset: number;
22
+ /** Total number of pages (estimated if hasMore is true) */
23
+ totalPages: number;
24
+ /** Current page number (1-indexed) */
25
+ currentPage: number;
26
+ }
27
+ /**
28
+ * Response type when includeMeta is true - includes pagination metadata
29
+ */
30
+ type EntriesResponseWithMeta = {
31
+ entries: EntriesResponse['entries'];
32
+ } & PaginationMeta;
33
+ /**
34
+ * Base parameters for getEntries - shared across all overloads
35
+ */
36
+ interface GetEntriesBaseParams {
37
+ /** The site ID */
38
+ siteId: string;
39
+ /** The content type key (e.g., 'blog-post', 'product') */
40
+ contentType: string;
41
+ /** Maximum number of entries to return (default: 10, max: 50) */
42
+ limit?: number;
43
+ /** Number of entries to skip for pagination */
44
+ offset?: number;
45
+ /** Sort order for entries. 'order' uses custom ordering (default behavior). */
46
+ order?: 'newest' | 'oldest' | 'title' | 'order';
47
+ /** If true, includes draft entries (requires API key with site access) */
48
+ preview?: boolean;
49
+ /** Selection mode: 'query' for automatic, 'manual' for specific entry IDs */
50
+ mode?: 'query' | 'manual';
51
+ /** Entry IDs to fetch when mode is 'manual' */
52
+ entryIds?: string[];
53
+ }
54
+ /**
55
+ * Configuration for creating a Riverbank CMS client
56
+ */
57
+ interface RiverbankClientConfig {
58
+ /**
59
+ * API key for authentication (format: bld_live_... or bld_test_...)
60
+ */
61
+ apiKey: string;
62
+ /**
63
+ * Base URL for the Riverbank CMS API (required; e.g. https://dashboard.example.com/api)
64
+ */
65
+ baseUrl: string;
66
+ /**
67
+ * Cache configuration
68
+ */
69
+ cache?: {
70
+ /**
71
+ * Enable caching (default: true)
72
+ */
73
+ enabled?: boolean;
74
+ /**
75
+ * Time-to-live for cached responses in seconds
76
+ * @default 300 (5 minutes)
77
+ */
78
+ ttl?: number;
79
+ /**
80
+ * Maximum number of cached responses
81
+ * @default 100
82
+ */
83
+ maxSize?: number;
84
+ };
85
+ }
86
+ /**
87
+ * Riverbank CMS client interface
88
+ */
89
+ interface RiverbankClient {
90
+ /**
91
+ * Fetch site data by slug, domain, or ID
92
+ */
93
+ getSite(params: {
94
+ slug?: string;
95
+ domain?: string;
96
+ id?: string;
97
+ }): Promise<SiteResponse>;
98
+ /**
99
+ * Fetch a specific page by path
100
+ *
101
+ * @param params.preview - If true, returns draft content instead of published content (requires API key with site access)
102
+ */
103
+ getPage(params: {
104
+ siteId: string;
105
+ path: string;
106
+ preview?: boolean;
107
+ }): Promise<PageResponse>;
108
+ /**
109
+ * Fetch published content entries with optional pagination, sorting, and preview mode
110
+ *
111
+ * @param params.siteId - The site ID
112
+ * @param params.contentType - The content type key (e.g., 'blog-post', 'product')
113
+ * @param params.limit - Maximum number of entries to return (default: 10, max: 50)
114
+ * @param params.offset - Number of entries to skip for pagination (default: 0)
115
+ * @param params.order - Sort order: 'newest' (published_at desc) or 'oldest' (published_at asc)
116
+ * @param params.preview - If true, includes draft entries (requires API key with site access)
117
+ * @param params.mode - 'query' for automatic fetching, 'manual' for specific entry IDs
118
+ * @param params.entryIds - Array of entry IDs to fetch (only used when mode is 'manual')
119
+ * @param params.includeMeta - If true, returns pagination metadata with the response
120
+ *
121
+ * @example
122
+ * ```ts
123
+ * // Fetch latest 10 blog posts
124
+ * const entries = await client.getEntries({
125
+ * siteId: 'site-id',
126
+ * contentType: 'blog-post',
127
+ * limit: 10,
128
+ * order: 'newest',
129
+ * });
130
+ *
131
+ * // Fetch page 3 with pagination metadata
132
+ * const page3 = await client.getEntries({
133
+ * siteId: 'site-id',
134
+ * contentType: 'blog-post',
135
+ * limit: 10,
136
+ * offset: 20,
137
+ * includeMeta: true,
138
+ * });
139
+ * // page3.entries, page3.total, page3.hasMore, page3.currentPage
140
+ *
141
+ * // Fetch specific entries by ID (manual mode)
142
+ * const specific = await client.getEntries({
143
+ * siteId: 'site-id',
144
+ * contentType: 'blog-post',
145
+ * mode: 'manual',
146
+ * entryIds: ['uuid-1', 'uuid-2'],
147
+ * });
148
+ * ```
149
+ */
150
+ getEntries(params: GetEntriesBaseParams & {
151
+ /** If true, returns pagination metadata with the response */
152
+ includeMeta?: false;
153
+ }): Promise<EntriesResponse>;
154
+ getEntries(params: GetEntriesBaseParams & {
155
+ /** If true, returns pagination metadata with the response */
156
+ includeMeta: true;
157
+ }): Promise<EntriesResponseWithMeta>;
158
+ getEntries(params: GetEntriesBaseParams & {
159
+ includeMeta?: boolean;
160
+ }): Promise<EntriesResponse | EntriesResponseWithMeta>;
161
+ /**
162
+ * Fetch a specific content entry by slug
163
+ */
164
+ getEntry(params: {
165
+ siteId: string;
166
+ contentType: string;
167
+ slug: string;
168
+ }): Promise<EntryResponse>;
169
+ /**
170
+ * Fetch a public form definition by ID
171
+ */
172
+ getPublicFormById(params: {
173
+ formId: string;
174
+ }): Promise<PublicFormResponse>;
175
+ /**
176
+ * Fetch public booking services for a site
177
+ */
178
+ getPublicBookingServices(params: {
179
+ siteId: string;
180
+ ids?: string;
181
+ }): Promise<PublicBookingServicesResponse>;
182
+ /**
183
+ * List public events for a site (optionally time-filtered)
184
+ */
185
+ listPublicEvents(params: {
186
+ siteId: string;
187
+ limit?: number;
188
+ from?: string;
189
+ to?: string;
190
+ stage?: string;
191
+ }): Promise<PublicEventsResponse>;
192
+ /**
193
+ * Force clear the cache
194
+ */
195
+ clearCache(): void;
196
+ }
197
+
198
+ export type { EntriesResponse as E, PageResponse as P, RiverbankClient as R, SiteResponse as S, RiverbankClientConfig as a, EntryResponse as b, EntriesResponseWithMeta as c, PaginationMeta as d };