@ikas/code-components-mcp 2.11.0 → 2.11.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.
@@ -4,7 +4,7 @@
4
4
  "project-structure": {
5
5
  "title": "Project Structure",
6
6
  "description": "How an ikas code components project is organized",
7
- "content": "An ikas code components project follows this structure:\n\n```\nmy-project/\n├── src/\n│ ├── global.css # Optional: project-wide unscoped CSS (variables, resets)\n│ └── components/\n│ ├── MyComponent/\n│ │ ├── index.tsx # Component implementation (Preact)\n│ │ ├── types.ts # TypeScript props interface\n│ │ └── styles.css # Scoped component styles\n│ └── index.ts # Component exports barrel\n├── ikas.config.json # Component definitions, props, metadata\n├── package.json\n├── tsconfig.json\n└── vite.config.ts\n```\n\nEach component lives in its own directory under `src/components/`. The component's entry point is `index.tsx`, which exports a default Preact function component. The `types.ts` file defines the props interface matching the props declared in `ikas.config.json`. The `styles.css` file contains CSS that is automatically scoped to the component.\n\n### Project with Sub-Components\n\nWhen components grow complex, extract sub-components into `src/sub-components/`. See `get_framework_guide(\"sub-component-patterns\")` for full details.\n\n```\nmy-project/\n├── src/\n│ ├── components/\n│ │ ├── ProductList/\n│ │ │ ├── index.tsx # Imports from ../../sub-components/...\n│ │ │ ├── types.ts # Auto-generated (CLI-managed)\n│ │ │ └── styles.css # component styles (sub-component styles.css collected automatically)\n│ │ └── index.ts\n│ └── sub-components/\n│ ├── ProductCard/\n│ │ ├── index.tsx # Sub-component with inline Props\n│ │ └── styles.css # Sub-component styles\n│ └── FilterSidebar/\n│ ├── index.tsx\n│ └── styles.css\n├── ikas.config.json\n├── package.json\n├── tsconfig.json\n└── vite.config.ts\n```\n\n**Key:** `src/components/` = registered components (in ikas.config.json). `src/sub-components/` = internal helpers (NOT in ikas.config.json).",
7
+ "content": "An ikas code components project follows this structure:\n\n```\nmy-project/\n├── src/\n│ ├── global.css # Optional: project-wide CSS, scoped to this project (variables, fonts, resets)\n│ └── components/\n│ ├── MyComponent/\n│ │ ├── index.tsx # Component implementation (Preact)\n│ │ ├── types.ts # TypeScript props interface\n│ │ └── styles.css # Scoped component styles\n│ └── index.ts # Component exports barrel\n├── ikas.config.json # Component definitions, props, metadata\n├── package.json\n├── tsconfig.json\n└── vite.config.ts\n```\n\nEach component lives in its own directory under `src/components/`. The component's entry point is `index.tsx`, which exports a default Preact function component. The `types.ts` file defines the props interface matching the props declared in `ikas.config.json`. The `styles.css` file contains CSS that is automatically scoped to the component.\n\n### Project with Sub-Components\n\nWhen components grow complex, extract sub-components into `src/sub-components/`. See `get_framework_guide(\"sub-component-patterns\")` for full details.\n\n```\nmy-project/\n├── src/\n│ ├── components/\n│ │ ├── ProductList/\n│ │ │ ├── index.tsx # Imports from ../../sub-components/...\n│ │ │ ├── types.ts # Auto-generated (CLI-managed)\n│ │ │ └── styles.css # component styles (sub-component styles.css collected automatically)\n│ │ └── index.ts\n│ └── sub-components/\n│ ├── ProductCard/\n│ │ ├── index.tsx # Sub-component with inline Props\n│ │ └── styles.css # Sub-component styles\n│ └── FilterSidebar/\n│ ├── index.tsx\n│ └── styles.css\n├── ikas.config.json\n├── package.json\n├── tsconfig.json\n└── vite.config.ts\n```\n\n**Key:** `src/components/` = registered components (in ikas.config.json). `src/sub-components/` = internal helpers (NOT in ikas.config.json).",
8
8
  "tags": [
9
9
  "structure",
10
10
  "project",
@@ -109,7 +109,7 @@
109
109
  "css-scoping": {
110
110
  "title": "CSS Scoping Rules",
111
111
  "description": "How CSS is scoped to prevent conflicts between components",
112
- "content": "CSS files referenced in `ikas.config.json` are automatically scoped at build time.\n\n### How it works:\n- Each component's CSS selectors are prefixed with a unique scope identifier\n- `.my-class` becomes `.[scope]-my-class` in the output\n- This prevents style conflicts between different components on the same page\n\n### Best practices:\n- Use class selectors (`.my-class`) rather than element selectors (`div`, `h1`)\n- Avoid using `!important` - scoping handles isolation\n- Don't use global selectors or `@global` - they won't be scoped\n- Keep CSS in the component's `styles.css` file referenced in config, or in a sub-component's sibling `styles.css` — both are collected and scoped automatically on `dev`/`publish`\n- Nested selectors work: `.parent .child` both get scoped\n\n### Example:\n```css\n/* What you write */\n.product-card {\n padding: 16px;\n border: 1px solid #eee;\n}\n\n.product-card .title {\n font-size: 18px;\n font-weight: bold;\n}\n\n.product-card .price {\n color: #e53e3e;\n}\n```\n\nThe build system transforms this so your `.product-card`, `.title`, and `.price` classes are unique to your component and won't clash with any other component or theme styles.\n\n### Global CSS Exception\n\nThe one intentional exception to scoping is **Global CSS** — project-wide styles defined in `src/global.css` that are loaded unscoped before any component CSS. Global CSS is ideal for CSS custom properties (variables), resets, and shared utility classes. The loading order is: **Global CSS → Shared chunk CSS → Component CSS**, so global styles have the lowest specificity and component styles always win.\n\nSee `get_framework_guide(\"global-css\")` for full details on global CSS setup and usage.",
112
+ "content": "CSS files referenced in `ikas.config.json` are automatically scoped at build time.\n\n### How it works:\n- Each component's CSS selectors are prefixed with a unique scope identifier\n- `.my-class` becomes `.[scope]-my-class` in the output\n- This prevents style conflicts between different components on the same page\n\n### Best practices:\n- Use class selectors (`.my-class`) rather than element selectors (`div`, `h1`)\n- Avoid using `!important` - scoping handles isolation\n- Don't use global selectors or `@global` - they won't be scoped\n- Keep CSS in the component's `styles.css` file referenced in config, or in a sub-component's sibling `styles.css` — both are collected and scoped automatically on `dev`/`publish`\n- Nested selectors work: `.parent .child` both get scoped\n\n### Example:\n```css\n/* What you write */\n.product-card {\n padding: 16px;\n border: 1px solid #eee;\n}\n\n.product-card .title {\n font-size: 18px;\n font-weight: bold;\n}\n\n.product-card .price {\n color: #e53e3e;\n}\n```\n\nThe build system transforms this so your `.product-card`, `.title`, and `.price` classes are unique to your component and won't clash with any other component or theme styles.\n\n### Global CSS Exception\n\nThe one intentional exception to component scoping is **Global CSS** — project-wide styles defined in `src/global.css`. It gets no `.cc_{componentId}` prefix, but it is still isolated to your project: every rule is wrapped in `:where([data-cc-scope~=\"<projectId>\"])`, and `@font-face` / `@keyframes` / `@counter-style` names declared there are prefixed with `cc_<projectId>_` (references in component CSS are rewritten to match automatically). Global CSS is ideal for CSS custom properties (variables), fonts, resets, and shared utility classes. The loading order is: **Global CSS → Shared chunk CSS → Component CSS**, so global styles have the lowest specificity and component styles always win.\n\nSee `get_framework_guide(\"global-css\")` for full details on global CSS setup and usage.",
113
113
  "tags": [
114
114
  "css",
115
115
  "scoping",
@@ -121,8 +121,8 @@
121
121
  },
122
122
  "global-css": {
123
123
  "title": "Global CSS",
124
- "description": "Project-wide unscoped CSS for variables, resets, and shared utilities",
125
- "content": "## Global CSS\n\nGlobal CSS lets you define project-wide styles that are shared across all components — without scoping. This is ideal for:\n\n- **CSS custom properties (variables)** — colors, spacing, typography tokens\n- **CSS resets** — normalize/reset base styles\n- **Base typography** — font-family, line-height defaults\n- **Utility classes** — common layout helpers\n\n### Setup\n\n1. Create a `src/global.css` file in your project root:\n\n```css\n/* src/global.css */\n:root {\n --color-primary: #2563eb;\n --color-secondary: #7c3aed;\n --color-text: #1f2937;\n --color-text-muted: #6b7280;\n --color-border: #e5e7eb;\n --color-background: #ffffff;\n\n --spacing-xs: 4px;\n --spacing-sm: 8px;\n --spacing-md: 16px;\n --spacing-lg: 24px;\n --spacing-xl: 48px;\n\n --font-sans: system-ui, -apple-system, sans-serif;\n --font-mono: ui-monospace, monospace;\n\n --radius-sm: 4px;\n --radius-md: 8px;\n --radius-lg: 16px;\n}\n```\n\n2. Add the `globalStyles` field to `ikas.config.json`:\n\n```json\n{\n \"name\": \"my-project\",\n \"version\": \"1.0.0\",\n \"globalStyles\": \"./src/global.css\",\n \"components\": [...]\n}\n```\n\n### Using Global CSS Variables in Components\n\nOnce defined in `global.css`, CSS custom properties are available in any component's `styles.css`:\n\n```css\n/* src/components/ProductCard/styles.css */\n.product-card {\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n padding: var(--spacing-md);\n font-family: var(--font-sans);\n}\n\n.product-card .title {\n color: var(--color-text);\n}\n\n.product-card .price {\n color: var(--color-primary);\n}\n```\n\n### Loading Order\n\nCSS is loaded in this order, from lowest to highest specificity:\n\n1. **Global CSS** (`global.css`) — unscoped, loaded first\n2. **Shared chunk CSS** — scoped styles from shared internal components (their sibling `styles.css` files, collected automatically)\n3. **Component CSS** (`styles.css`) — scoped per-component styles\n\nBecause global CSS loads first and is unscoped, component-scoped styles will always override global styles when selectors conflict. This means you can safely define base defaults in `global.css` and override them in component `styles.css` files.\n\n### Key Differences from Component CSS\n\n| | Global CSS | Component CSS |\n|---|---|---|\n| **File** | `src/global.css` | `src/components/X/styles.css` |\n| **Scoping** | NOT scoped (no `.cc_` prefix) | Scoped with `.cc_{componentId}` prefix |\n| **Config** | `globalStyles` in ikas.config.json | `styles` on each component |\n| **Purpose** | CSS variables, resets, utilities | Component-specific styles |\n| **Load order** | First (lowest specificity) | Last (highest specificity) |\n\n### Best Practices\n\n- **Use CSS custom properties** for design tokens (colors, spacing, fonts) — they cascade naturally and components can reference them\n- **Keep global CSS minimal** — only put truly shared values here. Component-specific styles belong in the component's `styles.css`\n- **Avoid class selectors in global CSS** that target component internals — use custom properties instead for themeable values\n- **Don't duplicate** — if a style only applies to one component, put it in that component's `styles.css`\n\n### Project Structure with Global CSS\n\n```\nmy-project/\n├── src/\n│ ├── global.css # Project-wide unscoped CSS\n│ └── components/\n│ ├── ProductCard/\n│ │ ├── index.tsx\n│ │ ├── types.ts\n│ │ └── styles.css # Uses var(--color-primary) etc.\n│ └── index.ts\n├── ikas.config.json # Has globalStyles: \"./src/global.css\"\n├── package.json\n└── tsconfig.json\n```\n\nSee `get_framework_guide(\"css-scoping\")` for details on how component CSS scoping works.",
124
+ "description": "Project-wide CSS (scoped to your project) for variables, fonts, resets, and shared utilities",
125
+ "content": "## Global CSS\n\nGlobal CSS lets you define project-wide styles that are shared across all components of your project. It is isolated per project at build time (every rule is wrapped in `:where([data-cc-scope~=\"<projectId>\"])`), but not per component. This is ideal for:\n\n- **CSS custom properties (variables)** — colors, spacing, typography tokens\n- **CSS resets** — normalize/reset base styles\n- **Base typography** — font-family, line-height defaults\n- **Utility classes** — common layout helpers\n\n### Setup\n\n1. Create a `src/global.css` file in your project root:\n\n```css\n/* src/global.css */\n:root {\n --color-primary: #2563eb;\n --color-secondary: #7c3aed;\n --color-text: #1f2937;\n --color-text-muted: #6b7280;\n --color-border: #e5e7eb;\n --color-background: #ffffff;\n\n --spacing-xs: 4px;\n --spacing-sm: 8px;\n --spacing-md: 16px;\n --spacing-lg: 24px;\n --spacing-xl: 48px;\n\n --font-sans: system-ui, -apple-system, sans-serif;\n --font-mono: ui-monospace, monospace;\n\n --radius-sm: 4px;\n --radius-md: 8px;\n --radius-lg: 16px;\n}\n```\n\n2. Add the `globalStyles` field to `ikas.config.json`:\n\n```json\n{\n \"name\": \"my-project\",\n \"version\": \"1.0.0\",\n \"globalStyles\": \"./src/global.css\",\n \"components\": [...]\n}\n```\n\n### Using Global CSS Variables in Components\n\nOnce defined in `global.css`, CSS custom properties are available in any component's `styles.css`:\n\n```css\n/* src/components/ProductCard/styles.css */\n.product-card {\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n padding: var(--spacing-md);\n font-family: var(--font-sans);\n}\n\n.product-card .title {\n color: var(--color-text);\n}\n\n.product-card .price {\n color: var(--color-primary);\n}\n```\n\n### Fonts, Keyframes and Counter Styles\n\n`@font-face`, `@keyframes` and `@counter-style` names live in a document-global namespace, so the build (editor preview and publish alike) prefixes every name declared in `global.css` with `cc_<projectId>_` — `\"Tanker\"` becomes `\"cc_<projectId>_Tanker\"`. You keep writing the plain name; references are rewritten to match automatically in:\n\n- component and shared-chunk CSS: `font`, `font-family`, `animation`, `animation-name`, `list-style`, `list-style-type`, `counter()` / `counters()`\n- CSS custom properties, for **font names only**: `--font-display: \"Tanker\", serif` is rewritten, so `font-family: var(--font-display)` works\n\n```css\n/* src/global.css */\n@font-face {\n font-family: \"Tanker\";\n /* absolute URL — local font files are not shipped with the project */\n src: url(\"https://cdn.example.com/tanker.woff2\") format(\"woff2\");\n font-display: swap;\n}\n\n:root {\n --font-display: \"Tanker\", Georgia, serif;\n}\n```\n\n```css\n/* src/components/Hero/styles.css */\n.hero-headline {\n font-family: var(--font-display); /* or: font-family: \"Tanker\", Georgia, serif; */\n}\n```\n\nNot rewritten — avoid these for names declared in `global.css`:\n\n- inline JS styles (`style={{ fontFamily: \"Tanker\" }}`) — use a class instead\n- keyframe / counter-style names inside custom properties (`--anim: fade`) — reference them from `animation` / `list-style` declarations directly\n- top-level `body { }` / `html { }` rules — they are dropped; style the elements you render (`.hero`, `img`, `[data-x]`)\n\nFonts that come from an external stylesheet (`@import url(\"https://fonts.googleapis.com/...\")` as the first rule of `global.css`) or from the theme's typography tokens (see `get_framework_guide(\"theme-globals\")`) keep their original names and need no rewriting.\n\n### Loading Order\n\nCSS is loaded in this order, from lowest to highest specificity:\n\n1. **Global CSS** (`global.css`) — project-scoped, loaded first\n2. **Shared chunk CSS** — scoped styles from shared internal components (their sibling `styles.css` files, collected automatically)\n3. **Component CSS** (`styles.css`) — scoped per-component styles\n\nBecause global CSS loads first and has the lowest specificity, component-scoped styles will always override global styles when selectors conflict. This means you can safely define base defaults in `global.css` and override them in component `styles.css` files.\n\n### Key Differences from Component CSS\n\n| | Global CSS | Component CSS |\n|---|---|---|\n| **File** | `src/global.css` | `src/components/X/styles.css` |\n| **Scoping** | Scoped per project (`[data-cc-scope]`); no `.cc_{componentId}` prefix | Scoped with `.cc_{componentId}` prefix |\n| **Config** | `globalStyles` in ikas.config.json | `styles` on each component |\n| **Purpose** | CSS variables, resets, utilities | Component-specific styles |\n| **Load order** | First (lowest specificity) | Last (highest specificity) |\n\n### Best Practices\n\n- **Use CSS custom properties** for design tokens (colors, spacing, fonts) — they cascade naturally and components can reference them (font names declared with `@font-face` in `global.css` are rewritten inside custom properties too — see \"Fonts, Keyframes and Counter Styles\")\n- **Keep global CSS minimal** — only put truly shared values here. Component-specific styles belong in the component's `styles.css`\n- **Avoid class selectors in global CSS** that target component internals — use custom properties instead for themeable values\n- **Don't duplicate** — if a style only applies to one component, put it in that component's `styles.css`\n\n### Project Structure with Global CSS\n\n```\nmy-project/\n├── src/\n│ ├── global.css # Project-wide CSS (scoped to the project)\n│ └── components/\n│ ├── ProductCard/\n│ │ ├── index.tsx\n│ │ ├── types.ts\n│ │ └── styles.css # Uses var(--color-primary) etc.\n│ └── index.ts\n├── ikas.config.json # Has globalStyles: \"./src/global.css\"\n├── package.json\n└── tsconfig.json\n```\n\nSee `get_framework_guide(\"css-scoping\")` for details on how component CSS scoping works.",
126
126
  "tags": [
127
127
  "css",
128
128
  "global",
@@ -131,7 +131,11 @@
131
131
  "reset",
132
132
  "utilities",
133
133
  "global.css",
134
- "globalStyles"
134
+ "globalStyles",
135
+ "font-face",
136
+ "fonts",
137
+ "keyframes",
138
+ "counter-style"
135
139
  ]
136
140
  },
137
141
  "dev-server": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-14T08:11:46.617Z",
2
+ "generatedAt": "2026-10-14T12:31:12.919Z",
3
3
  "functions": [
4
4
  {
5
5
  "name": "apiListProductBrand",
@@ -3206,14 +3206,14 @@
3206
3206
  "name": "getIkasOrderRefundableItems",
3207
3207
  "displayName": "getRefundableItems",
3208
3208
  "signature": "function getIkasOrderRefundableItems(order: IkasOrder): IkasOrderLineItem[]",
3209
- "description": "Returns order line items that are eligible for refund based on item status and the merchant's refund day limit settings.",
3209
+ "description": "Returns order line items that are eligible for refund, based on the refundable lines returned by the API for the order.",
3210
3210
  "params": [
3211
3211
  {
3212
3212
  "name": "order",
3213
3213
  "description": "- The IkasOrder to retrieve refundable items from"
3214
3214
  }
3215
3215
  ],
3216
- "returns": "An array of order line items eligible for refund, or an empty array if refunds are disabled",
3216
+ "returns": "An array of order line items eligible for refund, or an empty array if refundable lines are not loaded",
3217
3217
  "returnType": "IkasOrderLineItem[]",
3218
3218
  "example": "```typescript\nimport { getIkasOrderRefundableItems } from \"@ikas/bp-storefront\";\nconst refundableItems = getIkasOrderRefundableItems(order);\n```",
3219
3219
  "categories": [
@@ -3222,7 +3222,8 @@
3222
3222
  ],
3223
3223
  "related": [
3224
3224
  "isIkasOrderRefundable",
3225
- "getIkasOrderRefundedItems"
3225
+ "getIkasOrderRefundedItems",
3226
+ "getIkasOrderRefundReasons"
3226
3227
  ],
3227
3228
  "isAsync": false,
3228
3229
  "isClass": false,
@@ -3232,6 +3233,189 @@
3232
3233
  "IkasOrderLineItem"
3233
3234
  ]
3234
3235
  },
3236
+ {
3237
+ "name": "getIkasOrderRefundReasonId",
3238
+ "displayName": "getRefundReasonId",
3239
+ "signature": "function getIkasOrderRefundReasonId(order: IkasOrder): string | null",
3240
+ "description": "Returns the selected refund reason id for the order's refund request.",
3241
+ "params": [
3242
+ {
3243
+ "name": "order",
3244
+ "description": "- The IkasOrder to read the selected refund reason id from"
3245
+ }
3246
+ ],
3247
+ "returns": "The selected refund reason id, or null if none is selected",
3248
+ "returnType": "string | null",
3249
+ "example": "```typescript\nimport { getIkasOrderRefundReasonId } from \"@ikas/bp-storefront\";\nconst refundReasonId = getIkasOrderRefundReasonId(order);\n```",
3250
+ "categories": [
3251
+ "Order",
3252
+ "Payment"
3253
+ ],
3254
+ "related": [
3255
+ "setIkasOrderRefundReasonId",
3256
+ "getIkasOrderRefundReasons"
3257
+ ],
3258
+ "isAsync": false,
3259
+ "isClass": false,
3260
+ "parameterTypes": [
3261
+ "IkasOrderRefundReasonId",
3262
+ "IkasOrder"
3263
+ ]
3264
+ },
3265
+ {
3266
+ "name": "setIkasOrderRefundReasonId",
3267
+ "displayName": "setRefundReasonId",
3268
+ "signature": "function setIkasOrderRefundReasonId(order: IkasOrder, value: string | null): void",
3269
+ "description": "Sets the selected refund reason id that will be sent with the order's refund request.",
3270
+ "params": [
3271
+ {
3272
+ "name": "order",
3273
+ "description": "- The IkasOrder to set the refund reason id on"
3274
+ },
3275
+ {
3276
+ "name": "value",
3277
+ "description": "- The id of one of the reasons returned by getIkasOrderRefundReasons, or null to clear it"
3278
+ }
3279
+ ],
3280
+ "returnType": "void",
3281
+ "example": "```typescript\nimport { setIkasOrderRefundReasonId, getIkasOrderRefundReasons } from \"@ikas/bp-storefront\";\nconst [firstReason] = getIkasOrderRefundReasons(order);\nsetIkasOrderRefundReasonId(order, firstReason?.id || null);\n```",
3282
+ "categories": [
3283
+ "Order",
3284
+ "Payment"
3285
+ ],
3286
+ "related": [
3287
+ "getIkasOrderRefundReasonId",
3288
+ "getIkasOrderRefundReasons",
3289
+ "refundOrder"
3290
+ ],
3291
+ "isAsync": false,
3292
+ "isClass": false,
3293
+ "parameterTypes": [
3294
+ "IkasOrderRefundReasonId",
3295
+ "IkasOrder"
3296
+ ]
3297
+ },
3298
+ {
3299
+ "name": "getIkasOrderRefundReason",
3300
+ "displayName": "getRefundReason",
3301
+ "signature": "function getIkasOrderRefundReason(order: IkasOrder): string | null",
3302
+ "description": "Returns the free-text refund reason written by the customer for the order's refund request.",
3303
+ "params": [
3304
+ {
3305
+ "name": "order",
3306
+ "description": "- The IkasOrder to read the refund reason note from"
3307
+ }
3308
+ ],
3309
+ "returns": "The refund reason note, or null if none is set",
3310
+ "returnType": "string | null",
3311
+ "example": "```typescript\nimport { getIkasOrderRefundReason } from \"@ikas/bp-storefront\";\nconst reason = getIkasOrderRefundReason(order);\n```",
3312
+ "categories": [
3313
+ "Order",
3314
+ "Payment"
3315
+ ],
3316
+ "related": [
3317
+ "setIkasOrderRefundReason",
3318
+ "getIkasOrderRefundReasonId"
3319
+ ],
3320
+ "isAsync": false,
3321
+ "isClass": false,
3322
+ "parameterTypes": [
3323
+ "IkasOrderRefundReason",
3324
+ "IkasOrder"
3325
+ ]
3326
+ },
3327
+ {
3328
+ "name": "setIkasOrderRefundReason",
3329
+ "displayName": "setRefundReason",
3330
+ "signature": "function setIkasOrderRefundReason(order: IkasOrder, value: string | null): void",
3331
+ "description": "Sets the free-text refund reason that will be sent with the order's refund request.",
3332
+ "params": [
3333
+ {
3334
+ "name": "order",
3335
+ "description": "- The IkasOrder to set the refund reason note on"
3336
+ },
3337
+ {
3338
+ "name": "value",
3339
+ "description": "- The refund reason note, or null to clear it"
3340
+ }
3341
+ ],
3342
+ "returnType": "void",
3343
+ "example": "```typescript\nimport { setIkasOrderRefundReason } from \"@ikas/bp-storefront\";\nsetIkasOrderRefundReason(order, \"The product arrived damaged\");\n```",
3344
+ "categories": [
3345
+ "Order",
3346
+ "Payment"
3347
+ ],
3348
+ "related": [
3349
+ "getIkasOrderRefundReason",
3350
+ "setIkasOrderRefundReasonId",
3351
+ "refundOrder"
3352
+ ],
3353
+ "isAsync": false,
3354
+ "isClass": false,
3355
+ "parameterTypes": [
3356
+ "IkasOrderRefundReason",
3357
+ "IkasOrder"
3358
+ ]
3359
+ },
3360
+ {
3361
+ "name": "getIkasOrderRefundReasons",
3362
+ "displayName": "getRefundReasons",
3363
+ "signature": "function getIkasOrderRefundReasons(order: IkasOrder): IkasOrderRefundReason[]",
3364
+ "description": "Returns the refund reasons the customer can choose from, with titles translated to the current locale.",
3365
+ "params": [
3366
+ {
3367
+ "name": "order",
3368
+ "description": "- The IkasOrder to get refund reasons for"
3369
+ }
3370
+ ],
3371
+ "returns": "An array of refund reasons with localized titles, or an empty array if refundable lines are not loaded",
3372
+ "returnType": "IkasOrderRefundReason[]",
3373
+ "example": "```typescript\nimport { getIkasOrderRefundReasons } from \"@ikas/bp-storefront\";\nconst reasons = getIkasOrderRefundReasons(order);\nreasons.forEach(reason => console.log(reason.id, reason.title));\n```",
3374
+ "categories": [
3375
+ "Order",
3376
+ "Payment"
3377
+ ],
3378
+ "related": [
3379
+ "setIkasOrderRefundReasonId",
3380
+ "getIkasOrderRefundableItems"
3381
+ ],
3382
+ "isAsync": false,
3383
+ "isClass": false,
3384
+ "parameterTypes": [
3385
+ "IkasOrderRefundReasons",
3386
+ "IkasOrder",
3387
+ "IkasOrderRefundReason"
3388
+ ]
3389
+ },
3390
+ {
3391
+ "name": "getIkasOrderReturnMethodDescription",
3392
+ "displayName": "getReturnMethodDescription",
3393
+ "signature": "function getIkasOrderReturnMethodDescription(order: IkasOrder): string | null",
3394
+ "description": "Returns the merchant's return method description for the current locale.",
3395
+ "params": [
3396
+ {
3397
+ "name": "order",
3398
+ "description": "- The IkasOrder to get the return method description for"
3399
+ }
3400
+ ],
3401
+ "returns": "The return method description for the current locale, or null if none exists",
3402
+ "returnType": "string | null",
3403
+ "example": "```typescript\nimport { getIkasOrderReturnMethodDescription } from \"@ikas/bp-storefront\";\nconst description = getIkasOrderReturnMethodDescription(order);\n```",
3404
+ "categories": [
3405
+ "Order",
3406
+ "Payment"
3407
+ ],
3408
+ "related": [
3409
+ "getIkasOrderRefundReasons",
3410
+ "getIkasOrderRefundableItems"
3411
+ ],
3412
+ "isAsync": false,
3413
+ "isClass": false,
3414
+ "parameterTypes": [
3415
+ "IkasOrderReturnMethodDescription",
3416
+ "IkasOrder"
3417
+ ]
3418
+ },
3235
3419
  {
3236
3420
  "name": "isIkasOrderRefundable",
3237
3421
  "displayName": "isRefundable",
@@ -13704,6 +13888,44 @@
13704
13888
  "IkasCustomerAddress"
13705
13889
  ]
13706
13890
  },
13891
+ {
13892
+ "name": "createRefundRequest",
13893
+ "signature": "async function createRefundRequest(customerStore: IkasCustomerStore, order: IkasOrder, email?: string | null): Promise<IkasRefundRequestResult>",
13894
+ "description": "Submit a refund request for an order based on the refund quantities set on each line item,\nalong with the selected refund reason id and refund reason note set on the order.",
13895
+ "params": [
13896
+ {
13897
+ "name": "customerStore",
13898
+ "description": "- The customer store instance"
13899
+ },
13900
+ {
13901
+ "name": "order",
13902
+ "description": "- The order to request a refund for"
13903
+ },
13904
+ {
13905
+ "name": "email",
13906
+ "description": "- Optional email address for guest order refunds"
13907
+ }
13908
+ ],
13909
+ "returns": "Object with isSuccess flag, errorCode on failure and the not allowed lines for REFUND_NOT_ALLOWED",
13910
+ "returnType": "Promise<IkasRefundRequestResult>",
13911
+ "example": "```typescript\nimport { customerStore, createRefundRequest, getOrder } from \"@ikas/bp-storefront\";\n\nasync function handleRefundRequest(orderId: string) {\n const order = await getOrder(customerStore, orderId);\n if (!order) return;\n\n const result = await createRefundRequest(customerStore, order);\n if (result.isSuccess) {\n showToast(\"Refund request submitted\");\n } else if (result.errorCode === \"REFUND_REASON_REQUIRED\") {\n showToast(\"Please select a refund reason\");\n } else {\n showToast(\"Refund request failed\");\n }\n}\n```",
13912
+ "categories": [
13913
+ "Customer"
13914
+ ],
13915
+ "related": [
13916
+ "refundOrder",
13917
+ "getOrder",
13918
+ "setIkasOrderRefundReasonId",
13919
+ "setIkasOrderRefundReason"
13920
+ ],
13921
+ "isAsync": true,
13922
+ "isClass": false,
13923
+ "parameterTypes": [
13924
+ "IkasCustomerStore",
13925
+ "IkasOrder",
13926
+ "IkasRefundRequestResult"
13927
+ ]
13928
+ },
13707
13929
  {
13708
13930
  "name": "refundOrder",
13709
13931
  "signature": "async function refundOrder(customerStore: IkasCustomerStore, order: IkasOrder, email?: string | null): Promise<boolean>",
@@ -13729,6 +13951,7 @@
13729
13951
  "Customer"
13730
13952
  ],
13731
13953
  "related": [
13954
+ "createRefundRequest",
13732
13955
  "getOrder",
13733
13956
  "getOrders",
13734
13957
  "getOrderRefundSettings"
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-14T08:11:46.690Z",
2
+ "generatedAt": "2026-10-14T12:31:12.962Z",
3
3
  "types": [
4
4
  {
5
5
  "name": "TextElementTagTypes",
@@ -6597,6 +6597,31 @@
6597
6597
  "name": "transactions",
6598
6598
  "type": "IkasOrderTransaction[]",
6599
6599
  "optional": true
6600
+ },
6601
+ {
6602
+ "name": "_refundableLines",
6603
+ "type": "IkasRefundableLine[] | null",
6604
+ "optional": true
6605
+ },
6606
+ {
6607
+ "name": "_refundReasons",
6608
+ "type": "IkasOrderRefundReason[] | null",
6609
+ "optional": true
6610
+ },
6611
+ {
6612
+ "name": "_refundTranslations",
6613
+ "type": "IkasOrderRefundSettingsTranslation[] | null",
6614
+ "optional": true
6615
+ },
6616
+ {
6617
+ "name": "_refundReasonId",
6618
+ "type": "string | null",
6619
+ "optional": true
6620
+ },
6621
+ {
6622
+ "name": "_refundReason",
6623
+ "type": "string | null",
6624
+ "optional": true
6600
6625
  }
6601
6626
  ],
6602
6627
  "filePath": "order/index.ts",
@@ -6606,6 +6631,12 @@
6606
6631
  "getIkasOrderTotalItemCount",
6607
6632
  "getIkasOrderDisplayedPackages",
6608
6633
  "getIkasOrderRefundableItems",
6634
+ "getIkasOrderRefundReasonId",
6635
+ "setIkasOrderRefundReasonId",
6636
+ "getIkasOrderRefundReason",
6637
+ "setIkasOrderRefundReason",
6638
+ "getIkasOrderRefundReasons",
6639
+ "getIkasOrderReturnMethodDescription",
6609
6640
  "isIkasOrderRefundable",
6610
6641
  "getIkasOrderUnfullfilledItems",
6611
6642
  "getIkasOrderRefundedItems",
@@ -6628,6 +6659,7 @@
6628
6659
  "getIkasOrderHref",
6629
6660
  "getIkasOrderVariantNames",
6630
6661
  "submitOrderTrackingForm",
6662
+ "createRefundRequest",
6631
6663
  "refundOrder",
6632
6664
  "getOrders",
6633
6665
  "getOrder",
@@ -7008,6 +7040,26 @@
7008
7040
  "type": "number",
7009
7041
  "optional": false
7010
7042
  },
7043
+ {
7044
+ "name": "flow",
7045
+ "type": "IkasOrderRefundFlow | null",
7046
+ "optional": true
7047
+ },
7048
+ {
7049
+ "name": "autoApprove",
7050
+ "type": "boolean",
7051
+ "optional": true
7052
+ },
7053
+ {
7054
+ "name": "isCancellable",
7055
+ "type": "boolean",
7056
+ "optional": true
7057
+ },
7058
+ {
7059
+ "name": "isRefundable",
7060
+ "type": "boolean",
7061
+ "optional": true
7062
+ },
7011
7063
  {
7012
7064
  "name": "_refundQuantity",
7013
7065
  "type": "number | null",
@@ -7858,6 +7910,118 @@
7858
7910
  ],
7859
7911
  "filePath": "order/refund/line-item/index.ts"
7860
7912
  },
7913
+ {
7914
+ "name": "IkasOrderRefundReason",
7915
+ "kind": "type",
7916
+ "domain": "order",
7917
+ "properties": [
7918
+ {
7919
+ "name": "id",
7920
+ "type": "string",
7921
+ "optional": false
7922
+ },
7923
+ {
7924
+ "name": "title",
7925
+ "type": "string",
7926
+ "optional": false
7927
+ },
7928
+ {
7929
+ "name": "translations",
7930
+ "type": "IkasOrderRefundReasonTranslation[] | null",
7931
+ "optional": false
7932
+ }
7933
+ ],
7934
+ "filePath": "order/refund/reason/index.ts",
7935
+ "relatedFunctions": [
7936
+ "getIkasOrderRefundReason",
7937
+ "setIkasOrderRefundReason",
7938
+ "getIkasOrderRefundReasons"
7939
+ ]
7940
+ },
7941
+ {
7942
+ "name": "IkasOrderRefundReasonTranslation",
7943
+ "kind": "type",
7944
+ "domain": "order",
7945
+ "properties": [
7946
+ {
7947
+ "name": "locale",
7948
+ "type": "string",
7949
+ "optional": false
7950
+ },
7951
+ {
7952
+ "name": "title",
7953
+ "type": "string | null",
7954
+ "optional": false
7955
+ }
7956
+ ],
7957
+ "filePath": "order/refund/reason/translation/index.ts"
7958
+ },
7959
+ {
7960
+ "name": "IkasOrderRefundFlow",
7961
+ "kind": "type",
7962
+ "domain": "order",
7963
+ "unionValues": [
7964
+ "CANCEL",
7965
+ "RETURN"
7966
+ ],
7967
+ "filePath": "order/refund/refundable-line/index.ts"
7968
+ },
7969
+ {
7970
+ "name": "IkasRefundableLine",
7971
+ "kind": "type",
7972
+ "domain": "order",
7973
+ "properties": [
7974
+ {
7975
+ "name": "autoApprove",
7976
+ "type": "boolean",
7977
+ "optional": false
7978
+ },
7979
+ {
7980
+ "name": "flow",
7981
+ "type": "IkasOrderRefundFlow | null",
7982
+ "optional": false
7983
+ },
7984
+ {
7985
+ "name": "isCancellable",
7986
+ "type": "boolean",
7987
+ "optional": false
7988
+ },
7989
+ {
7990
+ "name": "isRefundable",
7991
+ "type": "boolean",
7992
+ "optional": false
7993
+ },
7994
+ {
7995
+ "name": "orderLineItemId",
7996
+ "type": "string",
7997
+ "optional": false
7998
+ }
7999
+ ],
8000
+ "filePath": "order/refund/refundable-line/index.ts"
8001
+ },
8002
+ {
8003
+ "name": "IkasRefundableLines",
8004
+ "kind": "type",
8005
+ "domain": "order",
8006
+ "properties": [
8007
+ {
8008
+ "name": "orderLineItems",
8009
+ "type": "IkasRefundableLine[]",
8010
+ "optional": false
8011
+ },
8012
+ {
8013
+ "name": "refundReasons",
8014
+ "type": "IkasOrderRefundReason[]",
8015
+ "optional": false
8016
+ },
8017
+ {
8018
+ "name": "translations",
8019
+ "type": "IkasOrderRefundSettingsTranslation[]",
8020
+ "optional": false
8021
+ }
8022
+ ],
8023
+ "filePath": "order/refund/refundable-lines/index.ts"
8024
+ },
7861
8025
  {
7862
8026
  "name": "IkasOrderRefundSettings",
7863
8027
  "kind": "type",
@@ -7881,6 +8045,24 @@
7881
8045
  ],
7882
8046
  "filePath": "order/refund/settings/index.ts"
7883
8047
  },
8048
+ {
8049
+ "name": "IkasOrderRefundSettingsTranslation",
8050
+ "kind": "type",
8051
+ "domain": "order",
8052
+ "properties": [
8053
+ {
8054
+ "name": "locale",
8055
+ "type": "string",
8056
+ "optional": false
8057
+ },
8058
+ {
8059
+ "name": "returnMethodDescription",
8060
+ "type": "string | null",
8061
+ "optional": false
8062
+ }
8063
+ ],
8064
+ "filePath": "order/refund/settings/translation/index.ts"
8065
+ },
7884
8066
  {
7885
8067
  "name": "IkasOrderShippingLine",
7886
8068
  "kind": "type",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/code-components-mcp",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
4
4
  "description": "MCP server for ikas code components documentation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",