includio-cms 0.16.0 → 0.19.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 (81) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/DOCS.md +1 -1
  3. package/README.md +62 -0
  4. package/dist/admin/api/rest/routes/collections.js +1 -1
  5. package/dist/admin/api/rest/routes/entries.js +1 -1
  6. package/dist/admin/api/rest/routes/singletons.js +1 -1
  7. package/dist/admin/remote/entry.remote.js +20 -3
  8. package/dist/admin/remote/invite.d.ts +1 -1
  9. package/dist/admin/remote/preview.remote.js +10 -2
  10. package/dist/admin/remote/reorder.js +1 -1
  11. package/dist/admin/remote/shop.remote.d.ts +18 -18
  12. package/dist/ai-claude/index.d.ts +9 -0
  13. package/dist/ai-claude/index.js +23 -7
  14. package/dist/ai-openai/index.d.ts +9 -0
  15. package/dist/ai-openai/index.js +28 -9
  16. package/dist/cms/runtime/api.d.ts +10 -6
  17. package/dist/cms/runtime/api.js +7 -7
  18. package/dist/components/ui/accordion/accordion.svelte.d.ts +1 -1
  19. package/dist/components/ui/calendar/calendar.svelte.d.ts +1 -1
  20. package/dist/components/ui/command/command-dialog.svelte.d.ts +1 -1
  21. package/dist/components/ui/command/command-input.svelte.d.ts +1 -1
  22. package/dist/components/ui/command/command.svelte.d.ts +1 -1
  23. package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +1 -1
  24. package/dist/components/ui/input/input.svelte.d.ts +1 -1
  25. package/dist/components/ui/input-group/input-group-input.svelte.d.ts +1 -1
  26. package/dist/components/ui/input-group/input-group-textarea.svelte.d.ts +1 -1
  27. package/dist/components/ui/radio-group/radio-group.svelte.d.ts +1 -1
  28. package/dist/components/ui/sidebar/sidebar-input.svelte.d.ts +1 -1
  29. package/dist/components/ui/tabs/tabs.svelte.d.ts +1 -1
  30. package/dist/components/ui/textarea/textarea.svelte.d.ts +1 -1
  31. package/dist/components/ui/toggle-group/toggle-group-item.svelte.d.ts +1 -1
  32. package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +1 -1
  33. package/dist/core/server/entries/operations/create.js +1 -1
  34. package/dist/core/server/entries/operations/get.d.ts +20 -16
  35. package/dist/core/server/entries/operations/get.js +45 -214
  36. package/dist/core/server/entries/operations/resolveEntry.d.ts +94 -0
  37. package/dist/core/server/entries/operations/resolveEntry.js +210 -0
  38. package/dist/core/server/entries/operations/update.js +1 -1
  39. package/dist/core/server/fields/populateEntry.d.ts +9 -1
  40. package/dist/core/server/fields/populateEntry.js +22 -18
  41. package/dist/core/server/fields/resolveRelationFields.d.ts +2 -1
  42. package/dist/core/server/fields/resolveRelationFields.js +140 -34
  43. package/dist/core/server/fields/resolveRichtextLinks.d.ts +2 -1
  44. package/dist/core/server/fields/resolveRichtextLinks.js +2 -1
  45. package/dist/core/server/fields/resolveUrlFields.d.ts +2 -1
  46. package/dist/core/server/fields/resolveUrlFields.js +6 -5
  47. package/dist/core/server/generator/generator.js +17 -14
  48. package/dist/db-postgres/index.d.ts +4 -0
  49. package/dist/db-postgres/index.js +4 -0
  50. package/dist/email-nodemailer/index.d.ts +9 -0
  51. package/dist/email-nodemailer/index.js +28 -6
  52. package/dist/entity/index.js +1 -1
  53. package/dist/files-local/index.d.ts +4 -0
  54. package/dist/files-local/index.js +4 -0
  55. package/dist/paraglide/messages/_index.d.ts +3 -36
  56. package/dist/paraglide/messages/_index.js +3 -71
  57. package/dist/paraglide/messages/hello_world.d.ts +5 -0
  58. package/dist/paraglide/messages/hello_world.js +33 -0
  59. package/dist/paraglide/messages/login_hello.d.ts +16 -0
  60. package/dist/paraglide/messages/login_hello.js +34 -0
  61. package/dist/paraglide/messages/login_please_login.d.ts +16 -0
  62. package/dist/paraglide/messages/login_please_login.js +34 -0
  63. package/dist/shop/server/populate.d.ts +2 -1
  64. package/dist/shop/server/populate.js +2 -1
  65. package/dist/sveltekit/server/index.d.ts +1 -1
  66. package/dist/sveltekit/server/index.js +1 -1
  67. package/dist/types/adapters/ai.d.ts +8 -0
  68. package/dist/types/adapters/db.d.ts +9 -0
  69. package/dist/types/adapters/email.d.ts +6 -0
  70. package/dist/types/adapters/files.d.ts +5 -0
  71. package/dist/types/plugins.d.ts +6 -2
  72. package/dist/updates/0.18.0/index.d.ts +2 -0
  73. package/dist/updates/0.18.0/index.js +78 -0
  74. package/dist/updates/0.19.0/index.d.ts +2 -0
  75. package/dist/updates/0.19.0/index.js +40 -0
  76. package/dist/updates/index.js +3 -1
  77. package/package.json +14 -5
  78. package/dist/paraglide/messages/en.d.ts +0 -5
  79. package/dist/paraglide/messages/en.js +0 -14
  80. package/dist/paraglide/messages/pl.d.ts +0 -5
  81. package/dist/paraglide/messages/pl.js +0 -14
@@ -179,21 +179,21 @@ function generateAPI(config) {
179
179
  const filePath = join(cmsDir, 'api.ts');
180
180
  let code = `// This file is auto-generated. Do not edit directly.\n\n`;
181
181
  code += `
182
-
182
+
183
183
  import type { SingleEntryMap, SingleSlug, CollectionEntryMap, CollectionSlug, FormEntryMap, SiteLanguage } from './types';
184
- import { getEntry, getEntries, countEntries, createFormSubmission } from 'includio-cms/sveltekit/server';
184
+ import { resolveEntry, resolveEntries, countEntries, createFormSubmission, type PopulateConfig } from 'includio-cms/sveltekit/server';
185
185
 
186
186
  `;
187
187
  code += `
188
188
 
189
189
  interface GetEntryOptions {
190
190
  id?: string;
191
- status?: 'draft' | 'published' | 'scheduled' | 'archived';
192
- dataValues?: Record<string, unknown>;
191
+ status?: 'published' | 'draft' | 'scheduled';
192
+ populate?: PopulateConfig;
193
193
  `;
194
194
  if (config.languages && config.languages.length > 0) {
195
195
  code += `
196
- language?: SiteLanguage;
196
+ locale?: SiteLanguage;
197
197
  `;
198
198
  }
199
199
  code += `
@@ -201,8 +201,11 @@ function generateAPI(config) {
201
201
 
202
202
  interface GetEntriesOptions extends GetEntryOptions {
203
203
  ids?: string[];
204
- dataLike?: Record<string, unknown>;
205
- dataILikeOr?: Record<string, unknown>;
204
+ filter?: {
205
+ dataValues?: Record<string, unknown>;
206
+ dataLike?: Record<string, unknown>;
207
+ dataILikeOr?: Record<string, unknown>;
208
+ };
206
209
  orderBy?: { column: 'createdAt' | 'updatedAt' | 'sortOrder'; direction: 'asc' | 'desc' };
207
210
  dataOrderBy?: { field: string; direction: 'asc' | 'desc' };
208
211
  limit?: number;
@@ -213,25 +216,25 @@ function generateAPI(config) {
213
216
  code += `
214
217
 
215
218
  export async function getSingleEntry<K extends SingleSlug>(slug: K, options: GetEntryOptions = {}): Promise<SingleEntryMap[K] | null> {
216
- return (await getEntry({
217
- slug,
219
+ return (await resolveEntry({
220
+ collection: slug,
218
221
  ...options
219
222
  })) as unknown as SingleEntryMap[K] | null;
220
223
  }
221
224
 
222
225
  export async function getCollectionEntry<K extends CollectionSlug>(slug: K, options: GetEntryOptions = {}): Promise<CollectionEntryMap[K] | null> {
223
- return (await getEntry({
224
- slug,
226
+ return (await resolveEntry({
227
+ collection: slug,
225
228
  ...options
226
229
  })) as unknown as CollectionEntryMap[K] | null;
227
230
  }
228
231
 
229
232
  export async function getCollectionEntries<K extends CollectionSlug>(slug: K, options: GetEntriesOptions = {}): Promise<CollectionEntryMap[K][]> {
230
- return (await getEntries({ slug, ...options })) as unknown as CollectionEntryMap[K][];
233
+ return (await resolveEntries({ collection: slug, ...options })) as unknown as CollectionEntryMap[K][];
231
234
  }
232
235
 
233
- export async function countCollectionEntries<K extends CollectionSlug>(slug: K, options: Omit<GetEntriesOptions, 'limit' | 'offset' | 'orderBy'> = {}): Promise<number> {
234
- return countEntries({ slug, ...options });
236
+ export async function countCollectionEntries<K extends CollectionSlug>(slug: K, options: Omit<GetEntriesOptions, 'limit' | 'offset' | 'orderBy' | 'populate'> = {}): Promise<number> {
237
+ return countEntries({ collection: slug, ...options });
235
238
  }
236
239
 
237
240
  ${config.forms && config.forms.length > 0
@@ -5,4 +5,8 @@ import type { DatabaseAdapter } from '../types/adapters/db.js';
5
5
  export type DatabaseAdapterWithDrizzle = DatabaseAdapter & {
6
6
  _drizzle: ReturnType<typeof drizzle<typeof schema>>;
7
7
  };
8
+ /**
9
+ * Postgres database adapter (drizzle + `postgres`).
10
+ * @public
11
+ */
8
12
  export declare function pg(config: Config): DatabaseAdapterWithDrizzle;
@@ -262,6 +262,10 @@ function buildMediaFileConditions(db, options) {
262
262
  }
263
263
  return conditions;
264
264
  }
265
+ /**
266
+ * Postgres database adapter (drizzle + `postgres`).
267
+ * @public
268
+ */
265
269
  export function pg(config) {
266
270
  const client = postgres(config.databaseUrl);
267
271
  const db = drizzle(client, { schema });
@@ -5,5 +5,14 @@ interface Options {
5
5
  defaultFromName: string;
6
6
  transportOptions: SMTPTransport.Options;
7
7
  }
8
+ /**
9
+ * SMTP email adapter built on `nodemailer`.
10
+ *
11
+ * `nodemailer` is an **optional peer dependency** — install it in your project
12
+ * (`pnpm add nodemailer`) when using this adapter. The SDK loads lazily on first
13
+ * `sendMail()`; missing peer throws a clear error.
14
+ *
15
+ * @public
16
+ */
8
17
  export declare function nodemailerAdapter(options: Options): EmailAdapter;
9
18
  export {};
@@ -1,14 +1,36 @@
1
- import { createTransport } from 'nodemailer';
1
+ /**
2
+ * SMTP email adapter built on `nodemailer`.
3
+ *
4
+ * `nodemailer` is an **optional peer dependency** — install it in your project
5
+ * (`pnpm add nodemailer`) when using this adapter. The SDK loads lazily on first
6
+ * `sendMail()`; missing peer throws a clear error.
7
+ *
8
+ * @public
9
+ */
2
10
  export function nodemailerAdapter(options) {
3
- const transporter = createTransport({
4
- ...options.transportOptions,
5
- from: `"${options.defaultFromName}" <${options.defaultFromAddress}>`
6
- });
11
+ let transporter = null;
12
+ async function getTransporter() {
13
+ if (transporter)
14
+ return transporter;
15
+ let createTransport;
16
+ try {
17
+ ({ createTransport } = await import('nodemailer'));
18
+ }
19
+ catch {
20
+ throw new Error('nodemailer is required for nodemailerAdapter — install it with `pnpm add nodemailer`');
21
+ }
22
+ transporter = createTransport({
23
+ ...options.transportOptions,
24
+ from: `"${options.defaultFromName}" <${options.defaultFromAddress}>`
25
+ });
26
+ return transporter;
27
+ }
7
28
  return {
8
29
  defaultFromAddress: options.defaultFromAddress,
9
30
  defaultFromName: options.defaultFromName,
10
31
  sendMail: async (sendMailOptions) => {
11
- await transporter.sendMail({
32
+ const t = await getTransporter();
33
+ await t.sendMail({
12
34
  ...sendMailOptions,
13
35
  from: `"${options.defaultFromName}" <${options.defaultFromAddress}>`
14
36
  });
@@ -1,6 +1,6 @@
1
1
  import { generateZodSchemaFromFields } from '../core/fields/fieldSchemaToTs.js';
2
2
  import { getFieldsFromConfig } from '../core/fields/layoutUtils.js';
3
- import { getRawEntries } from '../core/server/entries/operations/get.js';
3
+ import { _getRawEntries as getRawEntries } from '../core/server/entries/operations/get.js';
4
4
  export function createEntityAPI(cms, opts) {
5
5
  const db = cms.databaseAdapter;
6
6
  const userId = opts?.userId ?? 'system';
@@ -4,4 +4,8 @@ export interface LocalFilesConfig {
4
4
  ffmpegPath?: string;
5
5
  ffprobePath?: string;
6
6
  }
7
+ /**
8
+ * Local-disk files adapter. Stores uploads under `./static/uploads` (dev) or `/data/uploads` (prod).
9
+ * @public
10
+ */
7
11
  export declare function local(config?: LocalFilesConfig): FilesAdapter;
@@ -19,6 +19,10 @@ async function ensureDir(dir) {
19
19
  // Already exists
20
20
  }
21
21
  }
22
+ /**
23
+ * Local-disk files adapter. Stores uploads under `./static/uploads` (dev) or `/data/uploads` (prod).
24
+ * @public
25
+ */
22
26
  export function local(config) {
23
27
  if (config?.ffmpegPath || config?.ffprobePath) {
24
28
  setFfmpegPaths(config.ffmpegPath, config.ffprobePath);
@@ -1,36 +1,3 @@
1
- export function hello_world(inputs: {
2
- name: NonNullable<unknown>;
3
- }, options?: {
4
- locale?: "en" | "pl";
5
- }): string;
6
- /**
7
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
8
- *
9
- * - Changing this function will be over-written by the next build.
10
- *
11
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
12
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
13
- *
14
- * @param {{}} inputs
15
- * @param {{ locale?: "en" | "pl" }} options
16
- * @returns {string}
17
- */
18
- declare function login_hello(inputs?: {}, options?: {
19
- locale?: "en" | "pl";
20
- }): string;
21
- /**
22
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
23
- *
24
- * - Changing this function will be over-written by the next build.
25
- *
26
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
27
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
28
- *
29
- * @param {{}} inputs
30
- * @param {{ locale?: "en" | "pl" }} options
31
- * @returns {string}
32
- */
33
- declare function login_please_login(inputs?: {}, options?: {
34
- locale?: "en" | "pl";
35
- }): string;
36
- export { login_hello as login.hello, login_please_login as login.please_login };
1
+ export * from "./hello_world.js";
2
+ export * from "./login_hello.js";
3
+ export * from "./login_please_login.js";
@@ -1,72 +1,4 @@
1
1
  /* eslint-disable */
2
- import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from "../runtime.js"
3
- import * as en from "./en.js"
4
- import * as pl from "./pl.js"
5
- /**
6
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
7
- *
8
- * - Changing this function will be over-written by the next build.
9
- *
10
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
11
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
12
- *
13
- * @param {{ name: NonNullable<unknown> }} inputs
14
- * @param {{ locale?: "en" | "pl" }} options
15
- * @returns {string}
16
- */
17
- /* @__NO_SIDE_EFFECTS__ */
18
- export const hello_world = (inputs, options = {}) => {
19
- if (experimentalMiddlewareLocaleSplitting && isServer === false) {
20
- return /** @type {any} */ (globalThis).__paraglide_ssr.hello_world(inputs)
21
- }
22
- const locale = options.locale ?? getLocale()
23
- trackMessageCall("hello_world", locale)
24
- if (locale === "en") return en.hello_world(inputs)
25
- return pl.hello_world(inputs)
26
- };
27
- /**
28
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
29
- *
30
- * - Changing this function will be over-written by the next build.
31
- *
32
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
33
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
34
- *
35
- * @param {{}} inputs
36
- * @param {{ locale?: "en" | "pl" }} options
37
- * @returns {string}
38
- */
39
- /* @__NO_SIDE_EFFECTS__ */
40
- const login_hello = (inputs = {}, options = {}) => {
41
- if (experimentalMiddlewareLocaleSplitting && isServer === false) {
42
- return /** @type {any} */ (globalThis).__paraglide_ssr.login_hello(inputs)
43
- }
44
- const locale = options.locale ?? getLocale()
45
- trackMessageCall("login_hello", locale)
46
- if (locale === "en") return en.login_hello(inputs)
47
- return pl.login_hello(inputs)
48
- };
49
- export { login_hello as "login.hello" }
50
- /**
51
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
52
- *
53
- * - Changing this function will be over-written by the next build.
54
- *
55
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
56
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
57
- *
58
- * @param {{}} inputs
59
- * @param {{ locale?: "en" | "pl" }} options
60
- * @returns {string}
61
- */
62
- /* @__NO_SIDE_EFFECTS__ */
63
- const login_please_login = (inputs = {}, options = {}) => {
64
- if (experimentalMiddlewareLocaleSplitting && isServer === false) {
65
- return /** @type {any} */ (globalThis).__paraglide_ssr.login_please_login(inputs)
66
- }
67
- const locale = options.locale ?? getLocale()
68
- trackMessageCall("login_please_login", locale)
69
- if (locale === "en") return en.login_please_login(inputs)
70
- return pl.login_please_login(inputs)
71
- };
72
- export { login_please_login as "login.please_login" }
2
+ export * from './hello_world.js'
3
+ export * from './login_hello.js'
4
+ export * from './login_please_login.js'
@@ -0,0 +1,5 @@
1
+ export function hello_world(inputs: {
2
+ name: NonNullable<unknown>;
3
+ }, options?: {
4
+ locale?: "en" | "pl";
5
+ }): string;
@@ -0,0 +1,33 @@
1
+ /* eslint-disable */
2
+ import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
3
+
4
+ const en_hello_world = /** @type {(inputs: { name: NonNullable<unknown> }) => string} */ (i) => {
5
+ return `Hello, ${i.name} from en!`
6
+ };
7
+
8
+ const pl_hello_world = /** @type {(inputs: { name: NonNullable<unknown> }) => string} */ (i) => {
9
+ return `Hello, ${i.name} from pl!`
10
+ };
11
+
12
+ /**
13
+ * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
14
+ *
15
+ * - Changing this function will be over-written by the next build.
16
+ *
17
+ * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
18
+ * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
19
+ *
20
+ * @param {{ name: NonNullable<unknown> }} inputs
21
+ * @param {{ locale?: "en" | "pl" }} options
22
+ * @returns {string}
23
+ */
24
+ /* @__NO_SIDE_EFFECTS__ */
25
+ export const hello_world = (inputs, options = {}) => {
26
+ if (experimentalMiddlewareLocaleSplitting && isServer === false) {
27
+ return /** @type {any} */ (globalThis).__paraglide_ssr.hello_world(inputs)
28
+ }
29
+ const locale = options.locale ?? getLocale()
30
+ trackMessageCall("hello_world", locale)
31
+ if (locale === "en") return en_hello_world(inputs)
32
+ return pl_hello_world(inputs)
33
+ };
@@ -0,0 +1,16 @@
1
+ export { login_hello as login.hello };
2
+ /**
3
+ * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
4
+ *
5
+ * - Changing this function will be over-written by the next build.
6
+ *
7
+ * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
8
+ * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
9
+ *
10
+ * @param {{}} inputs
11
+ * @param {{ locale?: "en" | "pl" }} options
12
+ * @returns {string}
13
+ */
14
+ declare function login_hello(inputs?: {}, options?: {
15
+ locale?: "en" | "pl";
16
+ }): string;
@@ -0,0 +1,34 @@
1
+ /* eslint-disable */
2
+ import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
3
+
4
+ const en_login_hello = /** @type {(inputs: {}) => string} */ () => {
5
+ return `Welcome back`
6
+ };
7
+
8
+ const pl_login_hello = /** @type {(inputs: {}) => string} */ () => {
9
+ return `Witaj ponownie`
10
+ };
11
+
12
+ /**
13
+ * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
14
+ *
15
+ * - Changing this function will be over-written by the next build.
16
+ *
17
+ * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
18
+ * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
19
+ *
20
+ * @param {{}} inputs
21
+ * @param {{ locale?: "en" | "pl" }} options
22
+ * @returns {string}
23
+ */
24
+ /* @__NO_SIDE_EFFECTS__ */
25
+ const login_hello = (inputs = {}, options = {}) => {
26
+ if (experimentalMiddlewareLocaleSplitting && isServer === false) {
27
+ return /** @type {any} */ (globalThis).__paraglide_ssr.login_hello(inputs)
28
+ }
29
+ const locale = options.locale ?? getLocale()
30
+ trackMessageCall("login_hello", locale)
31
+ if (locale === "en") return en_login_hello(inputs)
32
+ return pl_login_hello(inputs)
33
+ };
34
+ export { login_hello as "login.hello" }
@@ -0,0 +1,16 @@
1
+ export { login_please_login as login.please_login };
2
+ /**
3
+ * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
4
+ *
5
+ * - Changing this function will be over-written by the next build.
6
+ *
7
+ * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
8
+ * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
9
+ *
10
+ * @param {{}} inputs
11
+ * @param {{ locale?: "en" | "pl" }} options
12
+ * @returns {string}
13
+ */
14
+ declare function login_please_login(inputs?: {}, options?: {
15
+ locale?: "en" | "pl";
16
+ }): string;
@@ -0,0 +1,34 @@
1
+ /* eslint-disable */
2
+ import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
3
+
4
+ const en_login_please_login = /** @type {(inputs: {}) => string} */ () => {
5
+ return `Login to your account`
6
+ };
7
+
8
+ const pl_login_please_login = /** @type {(inputs: {}) => string} */ () => {
9
+ return `Zaloguj się na swoje konto`
10
+ };
11
+
12
+ /**
13
+ * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
14
+ *
15
+ * - Changing this function will be over-written by the next build.
16
+ *
17
+ * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
18
+ * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
19
+ *
20
+ * @param {{}} inputs
21
+ * @param {{ locale?: "en" | "pl" }} options
22
+ * @returns {string}
23
+ */
24
+ /* @__NO_SIDE_EFFECTS__ */
25
+ const login_please_login = (inputs = {}, options = {}) => {
26
+ if (experimentalMiddlewareLocaleSplitting && isServer === false) {
27
+ return /** @type {any} */ (globalThis).__paraglide_ssr.login_please_login(inputs)
28
+ }
29
+ const locale = options.locale ?? getLocale()
30
+ trackMessageCall("login_please_login", locale)
31
+ if (locale === "en") return en_login_please_login(inputs)
32
+ return pl_login_please_login(inputs)
33
+ };
34
+ export { login_please_login as "login.please_login" }
@@ -1,4 +1,5 @@
1
1
  import type { Field } from '../../types/fields.js';
2
+ import type { PopulateCtx } from '../../core/server/entries/operations/resolveEntry.js';
2
3
  export interface PopulatedShopField {
3
4
  /** Netto w PLN (number, ≤6dp). Od 0.15.2. */
4
5
  basePrice: number;
@@ -14,4 +15,4 @@ export interface PopulatedShopField {
14
15
  attributes: Record<string, string> | null;
15
16
  }>;
16
17
  }
17
- export declare function resolveShopFields(data: Record<string, unknown>, fields: Field[], entryId: string | undefined): Promise<Record<string, unknown>>;
18
+ export declare function resolveShopFields(data: Record<string, unknown>, fields: Field[], ctx: PopulateCtx): Promise<Record<string, unknown>>;
@@ -15,7 +15,8 @@ function toPopulated(row) {
15
15
  }))
16
16
  };
17
17
  }
18
- export async function resolveShopFields(data, fields, entryId) {
18
+ export async function resolveShopFields(data, fields, ctx) {
19
+ const entryId = ctx.entryId;
19
20
  if (!entryId)
20
21
  return data;
21
22
  // Skip if shop is not configured
@@ -1,6 +1,6 @@
1
1
  export { includioCMS } from './handle.js';
2
2
  export { cmsLayoutLoad } from './layout.js';
3
- export { getEntry, getEntries, countEntries } from '../../core/server/entries/operations/get.js';
3
+ export { resolveEntry, resolveEntries, countEntries, type ResolveEntryOptions, type ResolveEntriesOptions, type CountEntriesOptions, type PopulateConfig, type ResolveStatus } from '../../core/server/entries/operations/resolveEntry.js';
4
4
  export { createFormSubmission } from '../../core/server/forms/submissions/operations/create.js';
5
5
  export { parseFormDataForSubmission } from '../../core/server/forms/submissions/utils/parseMultipart.js';
6
6
  export { createConsentLog } from '../../core/server/consentLogs/operations/create.js';
@@ -1,6 +1,6 @@
1
1
  export { includioCMS } from './handle.js';
2
2
  export { cmsLayoutLoad } from './layout.js';
3
- export { getEntry, getEntries, countEntries } from '../../core/server/entries/operations/get.js';
3
+ export { resolveEntry, resolveEntries, countEntries } from '../../core/server/entries/operations/resolveEntry.js';
4
4
  export { createFormSubmission } from '../../core/server/forms/submissions/operations/create.js';
5
5
  export { parseFormDataForSubmission } from '../../core/server/forms/submissions/utils/parseMultipart.js';
6
6
  export { createConsentLog } from '../../core/server/consentLogs/operations/create.js';
@@ -1,11 +1,19 @@
1
+ /** @public */
1
2
  export interface AIConfig {
2
3
  apiKey: string;
3
4
  }
5
+ /** @public */
4
6
  export type AIAdapterConfig = {
5
7
  config: AIConfig;
6
8
  adapter: (config: AIConfig, db: AIAdapter) => AIAdapter;
7
9
  };
10
+ /**
11
+ * Contract for AI adapters. Currently powers `generateAltText` (admin media UI).
12
+ * Default implementations: `includio-cms/ai-openai`, `includio-cms/ai-claude`.
13
+ * @public
14
+ */
8
15
  export interface AIAdapter {
9
16
  generateAltText: GenerateAltText;
10
17
  }
18
+ /** @public */
11
19
  export type GenerateAltText = (fileId: string) => Promise<string>;
@@ -4,6 +4,15 @@ import type { ImageFieldStyle } from '../fields.js';
4
4
  import type { FormSubmission } from '../forms.js';
5
5
  import type { ImageStyle, MediaFile, MediaTag, UploadedMediaFile, VideoStyle, VideoStyleStatus } from '../media.js';
6
6
  export type { FilesAdapter } from './files.js';
7
+ /**
8
+ * Contract for database adapters. Drives entries, versions, media, tags, form submissions,
9
+ * consent logs, and image/video styles. Default implementation: `includio-cms/db-postgres`.
10
+ *
11
+ * To build a custom adapter, implement every required method (optionals are marked `?`).
12
+ * See README — "Writing your own adapter".
13
+ *
14
+ * @public
15
+ */
7
16
  export interface DatabaseAdapter {
8
17
  createEntry: CreateEntry;
9
18
  getEntries: GetEntries;
@@ -1,4 +1,10 @@
1
+ /** @public */
1
2
  export type EmailAdapterFactory = () => EmailAdapter;
3
+ /**
4
+ * Contract for email adapters. Used by `better-auth` reset-password flow and form submission
5
+ * notifications. Default implementation: `includio-cms/email-nodemailer`.
6
+ * @public
7
+ */
2
8
  export interface EmailAdapter {
3
9
  sendMail: SendMail;
4
10
  defaultFromAddress: string;
@@ -1,4 +1,9 @@
1
1
  import type { UploadedMediaFile } from '../media.js';
2
+ /**
3
+ * Contract for file storage adapters. Used by media upload pipeline + private file flow
4
+ * (e.g. shop receipts). Default implementation: `includio-cms/files-local`.
5
+ * @public
6
+ */
2
7
  export interface FilesAdapter {
3
8
  downloadFile: DownloadFile;
4
9
  uploadFile: UploadFile;
@@ -2,6 +2,7 @@ import type { Component } from 'svelte';
2
2
  import type { z } from 'zod';
3
3
  import type { RawEntry } from './entries.js';
4
4
  import type { CustomField } from './fields.js';
5
+ import type { PopulateCtx } from '../core/server/entries/operations/resolveEntry.js';
5
6
  export interface CustomFieldDefinition {
6
7
  /** Unique field type slug, e.g. 'photo-grid' */
7
8
  fieldType: string;
@@ -13,8 +14,11 @@ export interface CustomFieldDefinition {
13
14
  zodSchema: (field: CustomField, languages: string[]) => z.ZodType;
14
15
  /** TypeScript type string for codegen */
15
16
  tsType?: string;
16
- /** Populate/resolve step for API output */
17
- populateResolver?: (value: unknown, field: CustomField) => Promise<unknown>;
17
+ /**
18
+ * Populate/resolve step for API output.
19
+ * @experimental ctx (3rd arg) added in 0.17.0 — carries locale/status/depth/visited cascade.
20
+ */
21
+ populateResolver?: (value: unknown, field: CustomField, ctx: PopulateCtx) => Promise<unknown>;
18
22
  }
19
23
  export interface PluginConfig {
20
24
  slug: string;
@@ -0,0 +1,2 @@
1
+ import type { CmsUpdate } from '../index.js';
2
+ export declare const update: CmsUpdate;