{"version":3,"file":"create-toolkit.mjs","names":[],"sources":["../../../src/libs/toolkit/create-toolkit.ts"],"sourcesContent":["import createAuthToolkit from \"./auth/index.js\";\nimport createDocumentsToolkit from \"./documents/index.js\";\nimport createEmailToolkit from \"./email/index.js\";\nimport createLocalesToolkit from \"./locales/index.js\";\nimport createMediaToolkit from \"./media/index.js\";\nimport createPreviewsToolkit from \"./previews/index.js\";\nimport type { Toolkit, ToolkitContext } from \"./types.js\";\n\n/**\n * Creates a server-side toolkit for reading Lucid data.\n *\n * Use this in server code when you want a small, read-focused API for Lucid\n * content, locales, media, and external email sends.\n *\n * For client-side data fetching, use the Lucid SDK instead.\n *\n * When Lucid needs to build absolute URLs, it uses `config.host`, then\n * `request.url`, and finally falls back to the local Lucid URL.\n *\n * Each toolkit method returns Lucid's standard `{ error, data }` response shape.\n *\n * @example\n * ```ts\n * const toolkit = createToolkit(serviceContext);\n *\n * await toolkit.documents.getMultiple({\n *   collectionKey: \"page\",\n *   version: \"published\",\n *   query: {\n *     perPage: 20,\n *   },\n * });\n * ```\n */\nconst createToolkit = (context: ToolkitContext): Toolkit => ({\n\tauth: createAuthToolkit(context),\n\tdocuments: createDocumentsToolkit(context),\n\temail: createEmailToolkit(context),\n\tlocales: createLocalesToolkit(context),\n\tmedia: createMediaToolkit(context),\n\tpreviews: createPreviewsToolkit(context),\n});\n\nexport default createToolkit;\n"],"mappings":"0VAkCA,MAAM,EAAiB,IAAsC,CAC5D,KAAM,EAAkB,CAAO,EAC/B,UAAW,EAAuB,CAAO,EACzC,MAAO,EAAmB,CAAO,EACjC,QAAS,EAAqB,CAAO,EACrC,MAAO,EAAmB,CAAO,EACjC,SAAU,EAAsB,CAAO,CACxC"}