@ikas/code-components-mcp 1.4.0-beta.210 → 1.4.0-beta.213
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/data/framework.json +1 -1
- package/data/storefront-api.json +227 -4
- package/data/storefront-types.json +184 -2
- package/dist/index.js +48 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/data/framework.json
CHANGED
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
"theme-globals": {
|
|
646
646
|
"title": "Theme Global Settings & Design Tokens",
|
|
647
647
|
"description": "Read and create the theme's global variables and design tokens (colors, typography, breakpoints, keyframes, color schemes) from code components",
|
|
648
|
-
"content": "The theme developer defines global settings in the editor's \"Styles\" panel. Code components can READ these at runtime and an AI agent can CREATE/LIST them via MCP tools. Prefer reusing the theme's existing tokens (colors, typography) over hardcoding values — it keeps components consistent with the store's design.\n\n### Read at runtime (in your .tsx)\n\nImport from `@ikas/bp-storefront`. These work in SSR, client hydration, and the editor canvas:\n\n```tsx\nimport {\n getThemeSetting, getThemeSettings, // global variables (Theme Settings)\n getThemeColors, getThemeTypography, // design tokens\n getThemeBreakpoints, getThemeKeyframes, getThemeColorSchemes,\n} from \"@ikas/bp-storefront\";\n\nconst brand = getThemeSetting(\"_AbC123XyZ\")?.value; // key = variableName, from list_theme_globals\nconst colors = getThemeColors(); // [{ id, name, resolved, cssVar }]\n// resolved = concrete value (e.g. \"#ff0000\"); cssVar = \"var(--<id>)\" (scheme-aware).\n// e.g. style={{ color: colors[0].cssVar }} or className={getThemeTypography()[0].className}\n```\n\nShapes: colors → `{ id, name, resolved, cssVar }`; typography → `{ id, name, resolved, className, breakpoints? }`; breakpoints → `{ id, name, width }`; keyframes → `{ id, name, type, ref }`; color schemes → `{ schemes, values }`. Global variables → `{ name, displayName, type, value }` where `name` is the stable runtime key (`variableName`).\n\n### Responsive breakpoints in CSS\n\n`getThemeBreakpoints()` gives you each breakpoint's `width` in JS, but a CSS media query CANNOT use `var()` in its condition (it parses as valid-looking CSS and then fails SILENTLY). So to make a `@media` query follow a theme breakpoint, write the `min-width`/`max-width` yourself and use a `bp(<breakpointId>)` token for the value — the platform rewrites it to the breakpoint's concrete `<width>px` at render time (in BOTH the editor canvas and the published storefront), against the destination store's LIVE breakpoint width:\n\n```css\n/* styles.css — <breakpointId> from list_theme_globals (theme.breakpoints[].id) */\n.grid { grid-template-columns: repeat(3, 1fr); }\n\n/* applies at <= the breakpoint's width */\n@media (max-width: bp(<breakpointId>)) { .grid { grid-template-columns: 1fr; } }\n\n/* applies at > the breakpoint's width */\n@media (min-width: bp(<breakpointId>)) { .grid { grid-template-columns: repeat(4, 1fr); } }\n```\n\n- `bp(<id>)` resolves to `<width>px`. YOU pick the direction by writing `max-width` or `min-width`.\n- Use the breakpoint **id** (stable across renames), NEVER its name. Get ids from `list_theme_globals` (or the runtime `getThemeBreakpoints()` list).\n- Works anywhere in the condition, including `calc()` — e.g. for a non-overlapping upper bound use `@media (min-width: calc(bp(<id>) + 1px))` so it doesn't collide with a `max-width: bp(<id>)` block at the exact width. Inside `calc()` use PX ARITHMETIC ONLY (`+ 1px`, `* 2`, `- bp(<other>)`): the platform folds it to a concrete px value at render time, and a calc mixing other units (rem/em/vw/%) cannot fold — the whole media block is then silently dropped in production builds.\n- Portable: the token resolves to the destination store's own width, and the breakpoint ships automatically as a dependency when you reference it in CSS. Need one that might not exist everywhere? `create_theme_global` (kind `breakpoint`) it first.\n\n### Using a color scheme\n\nColor schemes have two parts: **slots** (the named color keys, e.g. Background/Text/Primary) and **palettes** (sets of colors for those slots). `getThemeColorSchemes()` returns:\n- `schemes`: the slots — `[{ id, name }]`.\n- `values`: the palettes — `[{ id, name, isDefault, className, colorsByScheme }]`, where `colorsByScheme` maps each **slot id** → `{ resolved, cssVar }`.\n\nA scheme color's `cssVar` is `var(--<slotId>)` and is **palette-scoped**: it only resolves inside an element carrying that palette's `className`. So apply the palette to a wrapper, then reference its slots inside:\n\n```tsx\nconst { values } = getThemeColorSchemes();\nconst palette = values.find((v) => v.isDefault) ?? values[0];\n// Reference slots by their id (from list_theme_globals → colorSchemes.schemes), resolving each\n// slot NAME → id ONCE here. NEVER match a slot by .name at runtime: slot names are NOT unique\n// (installing two design assets can create two \"Background\" slots), so\n// schemes.find(x => x.name === \"Background\") may silently pick the WRONG slot. A slot id is stable,\n// so referencing a slot by id is both correct AND portable.\nconst BACKGROUND = \"aB3xY7kLmN\", TEXT = \"pQ4rS2tUvW\", PRIMARY = \"zX8cV1bN0m\"; // real ids from list_theme_globals\nconst slot = (id: string) => palette?.colorsByScheme[id];\n\n// the palette className makes the slot vars resolve in this subtree\nreturn (\n <section\n className={palette?.className}\n style={{ background: slot(BACKGROUND)?.cssVar, color: slot(TEXT)?.cssVar }}\n >\n <button style={{ background: slot(PRIMARY)?.cssVar }}>Buy</button>\n </section>\n);\n```\n\nUse `colorsByScheme[slotId].resolved` if you need the concrete value instead of the live `var()`. Switching palettes at runtime is just swapping the wrapper's `className`.\n\n### Forcing a palette vs. inheriting the section's scheme\n\nSlot vars (`var(--<slotId>)`) resolve against whichever palette `className` sits on an **ancestor**, so you get two modes:\n\n- **Inherit the section's scheme (default, recommended):** do NOT add a palette `className` — just use the slot `cssVar`s. They resolve to the palette the section is set to. A section's color scheme is chosen in the editor (right panel → \"Color Scheme\"), which renders the section wrapper with that palette's class (`_<schemeId>`); leaving your slots unwrapped lets the merchant re-skin the component by switching the section's scheme, with no code change. The var NAMES are identical across palettes (only the value changes with the active ancestor class), so read the `{slotId → cssVar}` map from any palette and stay unwrapped:\n\n```tsx\nconst { values } = getThemeColorSchemes();\nconst palette = values.find((v) => v.isDefault) ?? values[0]; // any palette; var names match across all\n// slot ids from list_theme_globals → colorSchemes.schemes (resolve name → id once; NEVER match a\n// slot by .name at runtime — names are not unique, so a name lookup can pick the wrong slot).\nconst BACKGROUND = \"aB3xY7kLmN\", TEXT = \"pQ4rS2tUvW\", PRIMARY = \"zX8cV1bN0m\";\nconst slot = (id: string) => palette?.colorsByScheme[id]?.cssVar;\n\n// No palette className here → these inherit the SECTION's active scheme.\nreturn (\n <div style={{ background: slot(BACKGROUND), color: slot(TEXT) }}>\n <button style={{ background: slot(PRIMARY) }}>Buy</button>\n </div>\n);\n```\n\n- **Force a specific palette:** wrap the subtree in that palette's `className` (the example above). Use this only for a region that must always use one fixed palette regardless of the section's scheme.\n\n### Create / list via MCP (requires `ikas theme dev` + connected editor)\n\n- `list_theme_globals` — list every global variable and design token in the project (including ones created manually in the editor). **Call this FIRST** so you reuse existing tokens instead of duplicating them.\n- `create_theme_global` — create one, selected by `kind`:\n - `globalVariable` — `display_name` + `type` (TEXT|RICH_TEXT|IMAGE|COLOR|NUMBER|BOOLEAN|BORDER|SHADOW|ENUM); `value` optional. Value shapes — TEXT/COLOR: string; RICH_TEXT: HTML string; NUMBER: number; BOOLEAN: boolean; IMAGE: `{ url }`; BORDER: `{ width: { value, unit }, style, color }`; SHADOW: `{ x, y, blur, spread, color, position: \"outside\"|\"inside\" }`; ENUM: `enum_type_id` (a project enum id from `list_theme_globals` → `enumTypes[]`) + `value` = one of that enum's option VALUES (not a label). An ENUM setting reads back as `{ type: \"ENUM\", value, enumTypeId, options }`, an ENUM prop of the same enum can be bound to it with `bind_global`, and `themeValue(\"_<id>\")` from `./global-types` narrows to the enum's union type.\n - `color` — `name` + `value` (hex).\n - `typography` — `name` + any of `font_family`/`font_size`/`font_weight`/`line_height`/`letter_spacing`.\n - `breakpoint` — `name` + `width`.\n - `keyframe` — `name` + `points` (`[{ point, styles? }]`); each style is `{ property, value }` with a CSS property name (opacity, transform, filter, background, color, …). Apply the keyframe's `ref` as a CSS `animation-name` and set timing (duration/iteration) where you apply it.\n - `colorScheme` — `name` + `colors` (`[{ slotId? | newSlotName?, value }]`); target an existing slot by `slotId` (its id from list_theme_globals → colorSchemes.schemes / colorsByScheme keys), or create/reuse one by `newSlotName` (use the standard slot names like \"Background\"/\"Text\"/\"PrimaryButton/Background\"). Exactly one per entry.\n\n**CLI equivalents** (if you call the ikas-component CLI directly instead of the MCP tools): read with `list-theme-globals`; create with — globalVariable→`create-global-variable`, color→`create-color`, typography→`create-text-style`, breakpoint→`create-breakpoint`, keyframe→`create-keyframe`, colorScheme→`create-color-scheme`. CLI flags are kebab-case (`--display-name`, `--font-size`, `--colors`, …) and the CLI must be run from the project root.\n\n**Update / delete:** `update_theme_global` (fix a global variable's value/type — identify by `name`) and `delete_theme_global` (`kind` globalVariable→`name`, or a design-token kind→`id`). CLI equivalents: `update-global-variable`, `delete-global-variable`, `delete-design-token`.\n\n**Responsive text styles:** `update_text_style` with `breakpoint_id` (an existing breakpoint id from `list_theme_globals`) sets that breakpoint's overrides instead of the desktop values — only `font_size`, `font_weight`, `line_height`, `letter_spacing`; pass `\"\"` to remove an override. CLI: `update-text-style --id <id> --breakpoint <breakpointId> --font-size 32px`. The editor rejects invalid writes (unknown breakpoint, other properties, italic weight, a property without a desktop value, malformed values, weights the font lacks) — fix the input and retry; breakpoints are not created by this call (use `create_theme_global` kind `breakpoint`).\n\nAfter creating, the new item is readable via the runtime getters above (its key/id comes back in the create result and from `list_theme_globals`).\n\n### Live updates vs snapshots (important)\n\nTheme settings reach your component through two channels — pick the right one or edits won't reflect live:\n\n- **Live (CSS):** use `cssVar` (colors, and color-scheme colors) and `className` (typography text styles). These update **instantly** when the value is edited in the editor, because they map to CSS the editor regenerates live. Prefer these for anything visual.\n - Colors: `style={{ color: token.cssVar }}` (or `background`).\n - Typography: apply the text style's class — `className={t.className}` — do NOT spread `t.resolved` into an inline `style` if you want live updates.\n Text styles can be responsive (per-breakpoint font size, line height, letter spacing and font weight). Apply them with `className` (or the literal `_<id>` class) to get per-breakpoint values automatically. `resolved` contains desktop values only; a responsive style also has `breakpoints: [{ id, width, overrides, resolved }]` (widest first, only breakpoints with own overrides; `overrides` = that breakpoint's own values, `resolved` = full effective style there, inherited from wider breakpoints/desktop). The field is absent when the style has no overrides. When a component is published to another store, the breakpoints its text style overrides use are shipped with it.\n - Color-scheme colors are scoped to the palette: a `var(--<key>)` only resolves inside an element carrying that palette's `className`, so wrap the row: `<div className={paletteValue.className}>…<span style={{background: colorsByScheme[keyId].cssVar}}/>…</div>`.\n- **Snapshot (JS):** `resolved` values, breakpoint `width`, keyframe metadata, and global-variable `value`s are read from JS at render time. They reflect editor edits only when the component **re-renders/remounts** (e.g. its props change, or another action refreshes the canvas) — NOT instantly on a theme-token edit. This is expected, not a bug. Global-variable value edits do trigger a canvas refresh, so they reflect; design-token `resolved` values lag until the next refresh.\n\nRule of thumb: for visuals that must track editor edits live, reference `cssVar` / apply `className`; treat `resolved` and `value` as point-in-time reads.\n\n### Portability (shipping as a partner design asset)\n\nWhen this component is published as a partner design asset and installed into another store, the theme globals it uses are detected at publish time and travel with it. Publish scans the component's compiled output AND the shared chunks it imports; each detected global is added to the asset and created in the destination store on install (unless it is already there), so the references in your code keep resolving there.\n\n- **Global variables travel — hardcoded keys included.** A `themeValue(\"_xyz\")` / `getThemeSetting(\"_xyz\")` / `getThemeSettingValue(\"_xyz\")` call with a literal key ships exactly those variables — default value, groups and types included — also when the call lives in a shared helper file. If no literal key is visible (the key is computed or passed in as a value), or the component calls the iterate-all `getThemeSettings()`, ALL global variables ship. A prop bound to a global variable (via its `privateVarMap`) ships too. You do NOT need to turn a setting into a prop just to make it portable.\n- **Don't mix literal and runtime-built keys.** As soon as ANY literal key is visible in the component's compiled code or the shared chunks it imports, only the literal keys ship — a key built at runtime (`\"_\" + id`, a key read from a prop or another value) is then NOT shipped and resolves to nothing in the destination store. Keep every key literal, or read through `getThemeSettings()`.\n- **Colors, typography, keyframes and breakpoints travel too.** A literal reference in your CSS/JS — a color's `cssVar`, a typography `className` (`_<id>`), a keyframe `ref` (`_<id>`), a `bp(<id>)` token — is detected and ships; the iterate-all accessors (`getThemeColors()`, `getThemeTypography()`, `getThemeKeyframes()`, `getThemeBreakpoints()`) ship the whole category. Iterate the runtime lists when the component should adapt to whatever tokens the destination theme has, rather than to the ones it was built against.\n- **Color schemes always travel in full.** Every scheme slot and palette ships with the asset and is matched by id on install, never by name — so referencing a slot by `var(--<slotId>)` / `colorsByScheme[slotId]` stays valid across stores; resolving it by `.name` does not.\n- **Also travels automatically:** types referenced by your props, nested code components, and shared modules.\n\nRule of thumb: reference globals by the ids/keys `list_theme_globals` returns (never by display name) and they ship with the asset — do not tell the user they must recreate them in the destination store.",
|
|
648
|
+
"content": "The theme developer defines global settings in the editor's \"Styles\" panel. Code components can READ these at runtime and an AI agent can CREATE/LIST them via MCP tools. Prefer reusing the theme's existing tokens (colors, typography) over hardcoding values — it keeps components consistent with the store's design.\n\n### Read at runtime (in your .tsx)\n\nImport from `@ikas/bp-storefront`. These work in SSR, client hydration, and the editor canvas:\n\n```tsx\nimport {\n getThemeSetting, getThemeSettings, // global variables (Theme Settings)\n getThemeColors, getThemeTypography, // design tokens\n getThemeBreakpoints, getThemeKeyframes, getThemeColorSchemes,\n} from \"@ikas/bp-storefront\";\n\nconst brand = getThemeSetting(\"_AbC123XyZ\")?.value; // key = variableName, from list_theme_globals\nconst colors = getThemeColors(); // [{ id, name, resolved, cssVar }]\n// resolved = concrete value (e.g. \"#ff0000\"); cssVar = \"var(--<id>)\" (scheme-aware).\n// e.g. style={{ color: colors[0].cssVar }} or className={getThemeTypography()[0].className}\n```\n\nShapes: colors → `{ id, name, resolved, cssVar }`; typography → `{ id, name, resolved, className, breakpoints? }`; breakpoints → `{ id, name, width }` (widest first); keyframes → `{ id, name, type, ref }`; color schemes → `{ schemes, values }`. Global variables → `{ name, displayName, type, value }` where `name` is the stable runtime key (`variableName`).\n\n### Responsive breakpoints in CSS\n\n`getThemeBreakpoints()` gives you each breakpoint's `width` in JS, but a CSS media query CANNOT use `var()` in its condition (it parses as valid-looking CSS and then fails SILENTLY). So to make a `@media` query follow a theme breakpoint, write the `min-width`/`max-width` yourself and use a `bp(<breakpointId>)` token for the value — the platform rewrites it to the breakpoint's concrete `<width>px` at render time (in BOTH the editor canvas and the published storefront), against the destination store's LIVE breakpoint width:\n\n```css\n/* styles.css — <breakpointId> from list_theme_globals (theme.breakpoints[].id) */\n.grid { grid-template-columns: repeat(3, 1fr); }\n\n/* applies at <= the breakpoint's width */\n@media (max-width: bp(<breakpointId>)) { .grid { grid-template-columns: 1fr; } }\n\n/* applies at > the breakpoint's width */\n@media (min-width: bp(<breakpointId>)) { .grid { grid-template-columns: repeat(4, 1fr); } }\n```\n\n- `bp(<id>)` resolves to `<width>px`. YOU pick the direction by writing `max-width` or `min-width`.\n- Use the breakpoint **id** (stable across renames), NEVER its name. Get ids from `list_theme_globals` (or the runtime `getThemeBreakpoints()` list).\n- Works anywhere in the condition, including `calc()` — e.g. for a non-overlapping upper bound use `@media (min-width: calc(bp(<id>) + 1px))` so it doesn't collide with a `max-width: bp(<id>)` block at the exact width. Inside `calc()` use PX ARITHMETIC ONLY (`+ 1px`, `* 2`, `- bp(<other>)`): the platform folds it to a concrete px value at render time, and a calc mixing other units (rem/em/vw/%) cannot fold — the whole media block is then silently dropped in production builds.\n- Portable: the token resolves to the destination store's own width, and the breakpoint ships automatically as a dependency when you reference it in CSS. Need one that might not exist everywhere? `create_theme_global` (kind `breakpoint`) it first.\n\n### Using a color scheme\n\nColor schemes have two parts: **slots** (the named color keys, e.g. Background/Text/Primary) and **palettes** (sets of colors for those slots). `getThemeColorSchemes()` returns:\n- `schemes`: the slots — `[{ id, name }]`.\n- `values`: the palettes — `[{ id, name, isDefault, className, colorsByScheme }]`, where `colorsByScheme` maps each **slot id** → `{ resolved, cssVar }`.\n\nA scheme color's `cssVar` is `var(--<slotId>)` and is **palette-scoped**: it only resolves inside an element carrying that palette's `className`. So apply the palette to a wrapper, then reference its slots inside:\n\n```tsx\nconst { values } = getThemeColorSchemes();\nconst palette = values.find((v) => v.isDefault) ?? values[0];\n// Reference slots by their id (from list_theme_globals → colorSchemes.schemes), resolving each\n// slot NAME → id ONCE here. NEVER match a slot by .name at runtime: slot names are NOT unique\n// (installing two design assets can create two \"Background\" slots), so\n// schemes.find(x => x.name === \"Background\") may silently pick the WRONG slot. A slot id is stable,\n// so referencing a slot by id is both correct AND portable.\nconst BACKGROUND = \"aB3xY7kLmN\", TEXT = \"pQ4rS2tUvW\", PRIMARY = \"zX8cV1bN0m\"; // real ids from list_theme_globals\nconst slot = (id: string) => palette?.colorsByScheme[id];\n\n// the palette className makes the slot vars resolve in this subtree\nreturn (\n <section\n className={palette?.className}\n style={{ background: slot(BACKGROUND)?.cssVar, color: slot(TEXT)?.cssVar }}\n >\n <button style={{ background: slot(PRIMARY)?.cssVar }}>Buy</button>\n </section>\n);\n```\n\nUse `colorsByScheme[slotId].resolved` if you need the concrete value instead of the live `var()`. Switching palettes at runtime is just swapping the wrapper's `className`.\n\n### Forcing a palette vs. inheriting the section's scheme\n\nSlot vars (`var(--<slotId>)`) resolve against whichever palette `className` sits on an **ancestor**, so you get two modes:\n\n- **Inherit the section's scheme (default, recommended):** do NOT add a palette `className` — just use the slot `cssVar`s. They resolve to the palette the section is set to. A section's color scheme is chosen in the editor (right panel → \"Color Scheme\"), which renders the section wrapper with that palette's class (`_<schemeId>`); leaving your slots unwrapped lets the merchant re-skin the component by switching the section's scheme, with no code change. The var NAMES are identical across palettes (only the value changes with the active ancestor class), so read the `{slotId → cssVar}` map from any palette and stay unwrapped:\n\n```tsx\nconst { values } = getThemeColorSchemes();\nconst palette = values.find((v) => v.isDefault) ?? values[0]; // any palette; var names match across all\n// slot ids from list_theme_globals → colorSchemes.schemes (resolve name → id once; NEVER match a\n// slot by .name at runtime — names are not unique, so a name lookup can pick the wrong slot).\nconst BACKGROUND = \"aB3xY7kLmN\", TEXT = \"pQ4rS2tUvW\", PRIMARY = \"zX8cV1bN0m\";\nconst slot = (id: string) => palette?.colorsByScheme[id]?.cssVar;\n\n// No palette className here → these inherit the SECTION's active scheme.\nreturn (\n <div style={{ background: slot(BACKGROUND), color: slot(TEXT) }}>\n <button style={{ background: slot(PRIMARY) }}>Buy</button>\n </div>\n);\n```\n\n- **Force a specific palette:** wrap the subtree in that palette's `className` (the example above). Use this only for a region that must always use one fixed palette regardless of the section's scheme.\n\n### Create / list via MCP (requires `ikas theme dev` + connected editor)\n\n- `list_theme_globals` — list every global variable and design token in the project (including ones created manually in the editor). **Call this FIRST** so you reuse existing tokens instead of duplicating them.\n- `create_theme_global` — create one, selected by `kind`:\n - `globalVariable` — `display_name` + `type` (TEXT|RICH_TEXT|IMAGE|COLOR|NUMBER|BOOLEAN|BORDER|SHADOW|ENUM); `value` optional. Value shapes — TEXT/COLOR: string; RICH_TEXT: HTML string; NUMBER: number; BOOLEAN: boolean; IMAGE: `{ url }`; BORDER: `{ width: { value, unit }, style, color }`; SHADOW: `{ x, y, blur, spread, color, position: \"outside\"|\"inside\" }`; ENUM: `enum_type_id` (a project enum id from `list_theme_globals` → `enumTypes[]`) + `value` = one of that enum's option VALUES (not a label). An ENUM setting reads back as `{ type: \"ENUM\", value, enumTypeId, options }`, an ENUM prop of the same enum can be bound to it with `bind_global`, and `themeValue(\"_<id>\")` from `./global-types` narrows to the enum's union type.\n - `color` — `name` + `value` (hex).\n - `typography` — `name` + any of `font_family`/`font_size`/`font_weight`/`line_height`/`letter_spacing`.\n - `breakpoint` — `name` + `width`.\n - `keyframe` — `name` + `points` (`[{ point, styles? }]`); each style is `{ property, value }` with a CSS property name (opacity, transform, filter, background, color, …). Apply the keyframe's `ref` as a CSS `animation-name` and set timing (duration/iteration) where you apply it.\n - `colorScheme` — `name` + `colors` (`[{ slotId? | newSlotName?, value }]`); target an existing slot by `slotId` (its id from list_theme_globals → colorSchemes.schemes / colorsByScheme keys), or create/reuse one by `newSlotName` (use the standard slot names like \"Background\"/\"Text\"/\"PrimaryButton/Background\"). Exactly one per entry.\n\n**CLI equivalents** (if you call the ikas-component CLI directly instead of the MCP tools): read with `list-theme-globals`; create with — globalVariable→`create-global-variable`, color→`create-color`, typography→`create-text-style`, breakpoint→`create-breakpoint`, keyframe→`create-keyframe`, colorScheme→`create-color-scheme`. CLI flags are kebab-case (`--display-name`, `--font-size`, `--colors`, …) and the CLI must be run from the project root.\n\n**Update / delete:** `update_theme_global` (fix a global variable's value/type — identify by `name`) and `delete_theme_global` (`kind` globalVariable→`name`, or a design-token kind→`id`). CLI equivalents: `update-global-variable`, `delete-global-variable`, `delete-design-token`.\n\n**Responsive text styles:** `update_text_style` with `breakpoint_id` (an existing breakpoint id from `list_theme_globals`) sets that breakpoint's overrides instead of the desktop values — only `font_size`, `font_weight`, `line_height`, `letter_spacing`; pass `\"\"` to remove an override. CLI: `update-text-style --id <id> --breakpoint <breakpointId> --font-size 32px`. For several breakpoints in ONE call pass `breakpoints: [{ breakpoint_id, font_size?, font_weight?, line_height?, letter_spacing? }]` to `update_text_style` or to `create_theme_global` (kind `typography`, together with the desktop values) — CLI `--breakpoints '[{\"breakpointId\":\"<id>\",\"fontSize\":\"32px\"}]'` on `create-text-style` / `update-text-style`; the whole batch is validated and one invalid entry writes nothing. The editor rejects invalid writes (unknown breakpoint, other properties, italic weight, a property without a desktop value, malformed values, weights the font lacks) — fix the input and retry; breakpoints are not created by this call (use `create_theme_global` kind `breakpoint`).\n\nAfter creating, the new item is readable via the runtime getters above (its key/id comes back in the create result and from `list_theme_globals`).\n\n### Live updates vs snapshots (important)\n\nTheme settings reach your component through two channels — pick the right one or edits won't reflect live:\n\n- **Live (CSS):** use `cssVar` (colors, and color-scheme colors) and `className` (typography text styles). These update **instantly** when the value is edited in the editor, because they map to CSS the editor regenerates live. Prefer these for anything visual.\n - Colors: `style={{ color: token.cssVar }}` (or `background`).\n - Typography: apply the text style's class — `className={t.className}` — do NOT spread `t.resolved` into an inline `style` if you want live updates.\n Text styles can be responsive (per-breakpoint font size, line height, letter spacing and font weight). Apply them with `className` (or the literal `_<id>` class) to get per-breakpoint values automatically. `resolved` contains desktop values only; a responsive style also has `breakpoints: [{ id, width, overrides, resolved }]` (widest first, only breakpoints with own overrides; `overrides` = that breakpoint's own values, `resolved` = full effective style there). Inheritance is chained: a property a breakpoint does not override comes from the nearest WIDER breakpoint that overrides it, else from desktop. Overriding font weight keeps the style's italic (italic is not per breakpoint). `text_overflow: ellipsis` only truncates together with `white_space: nowrap` (a text style property) and `overflow: hidden` (component CSS — not a text style property). The field is absent when the style has no overrides. When a component is published to another store, the breakpoints its text style overrides use are shipped with it.\n - Color-scheme colors are scoped to the palette: a `var(--<key>)` only resolves inside an element carrying that palette's `className`, so wrap the row: `<div className={paletteValue.className}>…<span style={{background: colorsByScheme[keyId].cssVar}}/>…</div>`.\n- **Snapshot (JS):** `resolved` values, breakpoint `width`, keyframe metadata, and global-variable `value`s are read from JS at render time. They reflect editor edits only when the component **re-renders/remounts** (e.g. its props change, or another action refreshes the canvas) — NOT instantly on a theme-token edit. This is expected, not a bug. Global-variable value edits do trigger a canvas refresh, so they reflect; design-token `resolved` values lag until the next refresh.\n\nRule of thumb: for visuals that must track editor edits live, reference `cssVar` / apply `className`; treat `resolved` and `value` as point-in-time reads.\n\n### Portability (shipping as a partner design asset)\n\nWhen this component is published as a partner design asset and installed into another store, the theme globals it uses are detected at publish time and travel with it. Publish scans the component's compiled output AND the shared chunks it imports; each detected global is added to the asset and created in the destination store on install (unless it is already there), so the references in your code keep resolving there.\n\n- **Global variables travel — hardcoded keys included.** A `themeValue(\"_xyz\")` / `getThemeSetting(\"_xyz\")` / `getThemeSettingValue(\"_xyz\")` call with a literal key ships exactly those variables — default value, groups and types included — also when the call lives in a shared helper file. If no literal key is visible (the key is computed or passed in as a value), or the component calls the iterate-all `getThemeSettings()`, ALL global variables ship. A prop bound to a global variable (via its `privateVarMap`) ships too. You do NOT need to turn a setting into a prop just to make it portable.\n- **Don't mix literal and runtime-built keys.** As soon as ANY literal key is visible in the component's compiled code or the shared chunks it imports, only the literal keys ship — a key built at runtime (`\"_\" + id`, a key read from a prop or another value) is then NOT shipped and resolves to nothing in the destination store. Keep every key literal, or read through `getThemeSettings()`.\n- **Colors, typography, keyframes and breakpoints travel too.** A literal reference in your CSS/JS — a color's `cssVar`, a typography `className` (`_<id>`), a keyframe `ref` (`_<id>`), a `bp(<id>)` token — is detected and ships; the iterate-all accessors (`getThemeColors()`, `getThemeTypography()`, `getThemeKeyframes()`, `getThemeBreakpoints()`) ship the whole category. Iterate the runtime lists when the component should adapt to whatever tokens the destination theme has, rather than to the ones it was built against.\n- **Color schemes always travel in full.** Every scheme slot and palette ships with the asset and is matched by id on install, never by name — so referencing a slot by `var(--<slotId>)` / `colorsByScheme[slotId]` stays valid across stores; resolving it by `.name` does not.\n- **Also travels automatically:** types referenced by your props, nested code components, and shared modules.\n\nRule of thumb: reference globals by the ids/keys `list_theme_globals` returns (never by display name) and they ship with the asset — do not tell the user they must recreate them in the destination store.",
|
|
649
649
|
"tags": [
|
|
650
650
|
"theme",
|
|
651
651
|
"global variables",
|
package/data/storefront-api.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-10-
|
|
2
|
+
"generatedAt": "2026-10-07T09:44:31.465Z",
|
|
3
3
|
"functions": [
|
|
4
4
|
{
|
|
5
5
|
"name": "apiListProductBrand",
|
|
@@ -3220,14 +3220,14 @@
|
|
|
3220
3220
|
"name": "getIkasOrderRefundableItems",
|
|
3221
3221
|
"displayName": "getRefundableItems",
|
|
3222
3222
|
"signature": "function getIkasOrderRefundableItems(order: IkasOrder): IkasOrderLineItem[]",
|
|
3223
|
-
"description": "Returns order line items that are eligible for refund based on
|
|
3223
|
+
"description": "Returns order line items that are eligible for refund, based on the refundable lines returned by the API for the order.",
|
|
3224
3224
|
"params": [
|
|
3225
3225
|
{
|
|
3226
3226
|
"name": "order",
|
|
3227
3227
|
"description": "- The IkasOrder to retrieve refundable items from"
|
|
3228
3228
|
}
|
|
3229
3229
|
],
|
|
3230
|
-
"returns": "An array of order line items eligible for refund, or an empty array if
|
|
3230
|
+
"returns": "An array of order line items eligible for refund, or an empty array if refundable lines are not loaded",
|
|
3231
3231
|
"returnType": "IkasOrderLineItem[]",
|
|
3232
3232
|
"example": "```typescript\nimport { getIkasOrderRefundableItems } from \"@ikas/bp-storefront\";\nconst refundableItems = getIkasOrderRefundableItems(order);\n```",
|
|
3233
3233
|
"categories": [
|
|
@@ -3236,7 +3236,8 @@
|
|
|
3236
3236
|
],
|
|
3237
3237
|
"related": [
|
|
3238
3238
|
"isIkasOrderRefundable",
|
|
3239
|
-
"getIkasOrderRefundedItems"
|
|
3239
|
+
"getIkasOrderRefundedItems",
|
|
3240
|
+
"getIkasOrderRefundReasons"
|
|
3240
3241
|
],
|
|
3241
3242
|
"isAsync": false,
|
|
3242
3243
|
"isClass": false,
|
|
@@ -3246,6 +3247,189 @@
|
|
|
3246
3247
|
"IkasOrderLineItem"
|
|
3247
3248
|
]
|
|
3248
3249
|
},
|
|
3250
|
+
{
|
|
3251
|
+
"name": "getIkasOrderRefundReasonId",
|
|
3252
|
+
"displayName": "getRefundReasonId",
|
|
3253
|
+
"signature": "function getIkasOrderRefundReasonId(order: IkasOrder): string | null",
|
|
3254
|
+
"description": "Returns the selected refund reason id for the order's refund request.",
|
|
3255
|
+
"params": [
|
|
3256
|
+
{
|
|
3257
|
+
"name": "order",
|
|
3258
|
+
"description": "- The IkasOrder to read the selected refund reason id from"
|
|
3259
|
+
}
|
|
3260
|
+
],
|
|
3261
|
+
"returns": "The selected refund reason id, or null if none is selected",
|
|
3262
|
+
"returnType": "string | null",
|
|
3263
|
+
"example": "```typescript\nimport { getIkasOrderRefundReasonId } from \"@ikas/bp-storefront\";\nconst refundReasonId = getIkasOrderRefundReasonId(order);\n```",
|
|
3264
|
+
"categories": [
|
|
3265
|
+
"Order",
|
|
3266
|
+
"Payment"
|
|
3267
|
+
],
|
|
3268
|
+
"related": [
|
|
3269
|
+
"setIkasOrderRefundReasonId",
|
|
3270
|
+
"getIkasOrderRefundReasons"
|
|
3271
|
+
],
|
|
3272
|
+
"isAsync": false,
|
|
3273
|
+
"isClass": false,
|
|
3274
|
+
"parameterTypes": [
|
|
3275
|
+
"IkasOrderRefundReasonId",
|
|
3276
|
+
"IkasOrder"
|
|
3277
|
+
]
|
|
3278
|
+
},
|
|
3279
|
+
{
|
|
3280
|
+
"name": "setIkasOrderRefundReasonId",
|
|
3281
|
+
"displayName": "setRefundReasonId",
|
|
3282
|
+
"signature": "function setIkasOrderRefundReasonId(order: IkasOrder, value: string | null): void",
|
|
3283
|
+
"description": "Sets the selected refund reason id that will be sent with the order's refund request.",
|
|
3284
|
+
"params": [
|
|
3285
|
+
{
|
|
3286
|
+
"name": "order",
|
|
3287
|
+
"description": "- The IkasOrder to set the refund reason id on"
|
|
3288
|
+
},
|
|
3289
|
+
{
|
|
3290
|
+
"name": "value",
|
|
3291
|
+
"description": "- The id of one of the reasons returned by getIkasOrderRefundReasons, or null to clear it"
|
|
3292
|
+
}
|
|
3293
|
+
],
|
|
3294
|
+
"returnType": "void",
|
|
3295
|
+
"example": "```typescript\nimport { setIkasOrderRefundReasonId, getIkasOrderRefundReasons } from \"@ikas/bp-storefront\";\nconst [firstReason] = getIkasOrderRefundReasons(order);\nsetIkasOrderRefundReasonId(order, firstReason?.id || null);\n```",
|
|
3296
|
+
"categories": [
|
|
3297
|
+
"Order",
|
|
3298
|
+
"Payment"
|
|
3299
|
+
],
|
|
3300
|
+
"related": [
|
|
3301
|
+
"getIkasOrderRefundReasonId",
|
|
3302
|
+
"getIkasOrderRefundReasons",
|
|
3303
|
+
"refundOrder"
|
|
3304
|
+
],
|
|
3305
|
+
"isAsync": false,
|
|
3306
|
+
"isClass": false,
|
|
3307
|
+
"parameterTypes": [
|
|
3308
|
+
"IkasOrderRefundReasonId",
|
|
3309
|
+
"IkasOrder"
|
|
3310
|
+
]
|
|
3311
|
+
},
|
|
3312
|
+
{
|
|
3313
|
+
"name": "getIkasOrderRefundReason",
|
|
3314
|
+
"displayName": "getRefundReason",
|
|
3315
|
+
"signature": "function getIkasOrderRefundReason(order: IkasOrder): string | null",
|
|
3316
|
+
"description": "Returns the free-text refund reason written by the customer for the order's refund request.",
|
|
3317
|
+
"params": [
|
|
3318
|
+
{
|
|
3319
|
+
"name": "order",
|
|
3320
|
+
"description": "- The IkasOrder to read the refund reason note from"
|
|
3321
|
+
}
|
|
3322
|
+
],
|
|
3323
|
+
"returns": "The refund reason note, or null if none is set",
|
|
3324
|
+
"returnType": "string | null",
|
|
3325
|
+
"example": "```typescript\nimport { getIkasOrderRefundReason } from \"@ikas/bp-storefront\";\nconst reason = getIkasOrderRefundReason(order);\n```",
|
|
3326
|
+
"categories": [
|
|
3327
|
+
"Order",
|
|
3328
|
+
"Payment"
|
|
3329
|
+
],
|
|
3330
|
+
"related": [
|
|
3331
|
+
"setIkasOrderRefundReason",
|
|
3332
|
+
"getIkasOrderRefundReasonId"
|
|
3333
|
+
],
|
|
3334
|
+
"isAsync": false,
|
|
3335
|
+
"isClass": false,
|
|
3336
|
+
"parameterTypes": [
|
|
3337
|
+
"IkasOrderRefundReason",
|
|
3338
|
+
"IkasOrder"
|
|
3339
|
+
]
|
|
3340
|
+
},
|
|
3341
|
+
{
|
|
3342
|
+
"name": "setIkasOrderRefundReason",
|
|
3343
|
+
"displayName": "setRefundReason",
|
|
3344
|
+
"signature": "function setIkasOrderRefundReason(order: IkasOrder, value: string | null): void",
|
|
3345
|
+
"description": "Sets the free-text refund reason that will be sent with the order's refund request.",
|
|
3346
|
+
"params": [
|
|
3347
|
+
{
|
|
3348
|
+
"name": "order",
|
|
3349
|
+
"description": "- The IkasOrder to set the refund reason note on"
|
|
3350
|
+
},
|
|
3351
|
+
{
|
|
3352
|
+
"name": "value",
|
|
3353
|
+
"description": "- The refund reason note, or null to clear it"
|
|
3354
|
+
}
|
|
3355
|
+
],
|
|
3356
|
+
"returnType": "void",
|
|
3357
|
+
"example": "```typescript\nimport { setIkasOrderRefundReason } from \"@ikas/bp-storefront\";\nsetIkasOrderRefundReason(order, \"The product arrived damaged\");\n```",
|
|
3358
|
+
"categories": [
|
|
3359
|
+
"Order",
|
|
3360
|
+
"Payment"
|
|
3361
|
+
],
|
|
3362
|
+
"related": [
|
|
3363
|
+
"getIkasOrderRefundReason",
|
|
3364
|
+
"setIkasOrderRefundReasonId",
|
|
3365
|
+
"refundOrder"
|
|
3366
|
+
],
|
|
3367
|
+
"isAsync": false,
|
|
3368
|
+
"isClass": false,
|
|
3369
|
+
"parameterTypes": [
|
|
3370
|
+
"IkasOrderRefundReason",
|
|
3371
|
+
"IkasOrder"
|
|
3372
|
+
]
|
|
3373
|
+
},
|
|
3374
|
+
{
|
|
3375
|
+
"name": "getIkasOrderRefundReasons",
|
|
3376
|
+
"displayName": "getRefundReasons",
|
|
3377
|
+
"signature": "function getIkasOrderRefundReasons(order: IkasOrder): IkasOrderRefundReason[]",
|
|
3378
|
+
"description": "Returns the refund reasons the customer can choose from, with titles translated to the current locale.",
|
|
3379
|
+
"params": [
|
|
3380
|
+
{
|
|
3381
|
+
"name": "order",
|
|
3382
|
+
"description": "- The IkasOrder to get refund reasons for"
|
|
3383
|
+
}
|
|
3384
|
+
],
|
|
3385
|
+
"returns": "An array of refund reasons with localized titles, or an empty array if refundable lines are not loaded",
|
|
3386
|
+
"returnType": "IkasOrderRefundReason[]",
|
|
3387
|
+
"example": "```typescript\nimport { getIkasOrderRefundReasons } from \"@ikas/bp-storefront\";\nconst reasons = getIkasOrderRefundReasons(order);\nreasons.forEach(reason => console.log(reason.id, reason.title));\n```",
|
|
3388
|
+
"categories": [
|
|
3389
|
+
"Order",
|
|
3390
|
+
"Payment"
|
|
3391
|
+
],
|
|
3392
|
+
"related": [
|
|
3393
|
+
"setIkasOrderRefundReasonId",
|
|
3394
|
+
"getIkasOrderRefundableItems"
|
|
3395
|
+
],
|
|
3396
|
+
"isAsync": false,
|
|
3397
|
+
"isClass": false,
|
|
3398
|
+
"parameterTypes": [
|
|
3399
|
+
"IkasOrderRefundReasons",
|
|
3400
|
+
"IkasOrder",
|
|
3401
|
+
"IkasOrderRefundReason"
|
|
3402
|
+
]
|
|
3403
|
+
},
|
|
3404
|
+
{
|
|
3405
|
+
"name": "getIkasOrderReturnMethodDescription",
|
|
3406
|
+
"displayName": "getReturnMethodDescription",
|
|
3407
|
+
"signature": "function getIkasOrderReturnMethodDescription(order: IkasOrder): string | null",
|
|
3408
|
+
"description": "Returns the merchant's return method description for the current locale.",
|
|
3409
|
+
"params": [
|
|
3410
|
+
{
|
|
3411
|
+
"name": "order",
|
|
3412
|
+
"description": "- The IkasOrder to get the return method description for"
|
|
3413
|
+
}
|
|
3414
|
+
],
|
|
3415
|
+
"returns": "The return method description for the current locale, or null if none exists",
|
|
3416
|
+
"returnType": "string | null",
|
|
3417
|
+
"example": "```typescript\nimport { getIkasOrderReturnMethodDescription } from \"@ikas/bp-storefront\";\nconst description = getIkasOrderReturnMethodDescription(order);\n```",
|
|
3418
|
+
"categories": [
|
|
3419
|
+
"Order",
|
|
3420
|
+
"Payment"
|
|
3421
|
+
],
|
|
3422
|
+
"related": [
|
|
3423
|
+
"getIkasOrderRefundReasons",
|
|
3424
|
+
"getIkasOrderRefundableItems"
|
|
3425
|
+
],
|
|
3426
|
+
"isAsync": false,
|
|
3427
|
+
"isClass": false,
|
|
3428
|
+
"parameterTypes": [
|
|
3429
|
+
"IkasOrderReturnMethodDescription",
|
|
3430
|
+
"IkasOrder"
|
|
3431
|
+
]
|
|
3432
|
+
},
|
|
3249
3433
|
{
|
|
3250
3434
|
"name": "isIkasOrderRefundable",
|
|
3251
3435
|
"displayName": "isRefundable",
|
|
@@ -13718,6 +13902,44 @@
|
|
|
13718
13902
|
"IkasCustomerAddress"
|
|
13719
13903
|
]
|
|
13720
13904
|
},
|
|
13905
|
+
{
|
|
13906
|
+
"name": "createRefundRequest",
|
|
13907
|
+
"signature": "async function createRefundRequest(customerStore: IkasCustomerStore, order: IkasOrder, email?: string | null): Promise<IkasRefundRequestResult>",
|
|
13908
|
+
"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.",
|
|
13909
|
+
"params": [
|
|
13910
|
+
{
|
|
13911
|
+
"name": "customerStore",
|
|
13912
|
+
"description": "- The customer store instance"
|
|
13913
|
+
},
|
|
13914
|
+
{
|
|
13915
|
+
"name": "order",
|
|
13916
|
+
"description": "- The order to request a refund for"
|
|
13917
|
+
},
|
|
13918
|
+
{
|
|
13919
|
+
"name": "email",
|
|
13920
|
+
"description": "- Optional email address for guest order refunds"
|
|
13921
|
+
}
|
|
13922
|
+
],
|
|
13923
|
+
"returns": "Object with isSuccess flag, errorCode on failure and the not allowed lines for REFUND_NOT_ALLOWED",
|
|
13924
|
+
"returnType": "Promise<IkasRefundRequestResult>",
|
|
13925
|
+
"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```",
|
|
13926
|
+
"categories": [
|
|
13927
|
+
"Customer"
|
|
13928
|
+
],
|
|
13929
|
+
"related": [
|
|
13930
|
+
"refundOrder",
|
|
13931
|
+
"getOrder",
|
|
13932
|
+
"setIkasOrderRefundReasonId",
|
|
13933
|
+
"setIkasOrderRefundReason"
|
|
13934
|
+
],
|
|
13935
|
+
"isAsync": true,
|
|
13936
|
+
"isClass": false,
|
|
13937
|
+
"parameterTypes": [
|
|
13938
|
+
"IkasCustomerStore",
|
|
13939
|
+
"IkasOrder",
|
|
13940
|
+
"IkasRefundRequestResult"
|
|
13941
|
+
]
|
|
13942
|
+
},
|
|
13721
13943
|
{
|
|
13722
13944
|
"name": "refundOrder",
|
|
13723
13945
|
"signature": "async function refundOrder(customerStore: IkasCustomerStore, order: IkasOrder, email?: string | null): Promise<boolean>",
|
|
@@ -13743,6 +13965,7 @@
|
|
|
13743
13965
|
"Customer"
|
|
13744
13966
|
],
|
|
13745
13967
|
"related": [
|
|
13968
|
+
"createRefundRequest",
|
|
13746
13969
|
"getOrder",
|
|
13747
13970
|
"getOrders",
|
|
13748
13971
|
"getOrderRefundSettings"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-10-
|
|
2
|
+
"generatedAt": "2026-10-07T09:44:31.494Z",
|
|
3
3
|
"types": [
|
|
4
4
|
{
|
|
5
5
|
"name": "TextElementTagTypes",
|
|
@@ -6625,6 +6625,31 @@
|
|
|
6625
6625
|
"name": "transactions",
|
|
6626
6626
|
"type": "IkasOrderTransaction[]",
|
|
6627
6627
|
"optional": true
|
|
6628
|
+
},
|
|
6629
|
+
{
|
|
6630
|
+
"name": "_refundableLines",
|
|
6631
|
+
"type": "IkasRefundableLine[] | null",
|
|
6632
|
+
"optional": true
|
|
6633
|
+
},
|
|
6634
|
+
{
|
|
6635
|
+
"name": "_refundReasons",
|
|
6636
|
+
"type": "IkasOrderRefundReason[] | null",
|
|
6637
|
+
"optional": true
|
|
6638
|
+
},
|
|
6639
|
+
{
|
|
6640
|
+
"name": "_refundTranslations",
|
|
6641
|
+
"type": "IkasOrderRefundSettingsTranslation[] | null",
|
|
6642
|
+
"optional": true
|
|
6643
|
+
},
|
|
6644
|
+
{
|
|
6645
|
+
"name": "_refundReasonId",
|
|
6646
|
+
"type": "string | null",
|
|
6647
|
+
"optional": true
|
|
6648
|
+
},
|
|
6649
|
+
{
|
|
6650
|
+
"name": "_refundReason",
|
|
6651
|
+
"type": "string | null",
|
|
6652
|
+
"optional": true
|
|
6628
6653
|
}
|
|
6629
6654
|
],
|
|
6630
6655
|
"filePath": "order/index.ts",
|
|
@@ -6634,6 +6659,12 @@
|
|
|
6634
6659
|
"getIkasOrderTotalItemCount",
|
|
6635
6660
|
"getIkasOrderDisplayedPackages",
|
|
6636
6661
|
"getIkasOrderRefundableItems",
|
|
6662
|
+
"getIkasOrderRefundReasonId",
|
|
6663
|
+
"setIkasOrderRefundReasonId",
|
|
6664
|
+
"getIkasOrderRefundReason",
|
|
6665
|
+
"setIkasOrderRefundReason",
|
|
6666
|
+
"getIkasOrderRefundReasons",
|
|
6667
|
+
"getIkasOrderReturnMethodDescription",
|
|
6637
6668
|
"isIkasOrderRefundable",
|
|
6638
6669
|
"getIkasOrderUnfullfilledItems",
|
|
6639
6670
|
"getIkasOrderRefundedItems",
|
|
@@ -6656,6 +6687,7 @@
|
|
|
6656
6687
|
"getIkasOrderHref",
|
|
6657
6688
|
"getIkasOrderVariantNames",
|
|
6658
6689
|
"submitOrderTrackingForm",
|
|
6690
|
+
"createRefundRequest",
|
|
6659
6691
|
"refundOrder",
|
|
6660
6692
|
"getOrders",
|
|
6661
6693
|
"getOrder",
|
|
@@ -7036,6 +7068,26 @@
|
|
|
7036
7068
|
"type": "number",
|
|
7037
7069
|
"optional": false
|
|
7038
7070
|
},
|
|
7071
|
+
{
|
|
7072
|
+
"name": "flow",
|
|
7073
|
+
"type": "IkasOrderRefundFlow | null",
|
|
7074
|
+
"optional": true
|
|
7075
|
+
},
|
|
7076
|
+
{
|
|
7077
|
+
"name": "autoApprove",
|
|
7078
|
+
"type": "boolean",
|
|
7079
|
+
"optional": true
|
|
7080
|
+
},
|
|
7081
|
+
{
|
|
7082
|
+
"name": "isCancellable",
|
|
7083
|
+
"type": "boolean",
|
|
7084
|
+
"optional": true
|
|
7085
|
+
},
|
|
7086
|
+
{
|
|
7087
|
+
"name": "isRefundable",
|
|
7088
|
+
"type": "boolean",
|
|
7089
|
+
"optional": true
|
|
7090
|
+
},
|
|
7039
7091
|
{
|
|
7040
7092
|
"name": "_refundQuantity",
|
|
7041
7093
|
"type": "number | null",
|
|
@@ -7886,6 +7938,118 @@
|
|
|
7886
7938
|
],
|
|
7887
7939
|
"filePath": "order/refund/line-item/index.ts"
|
|
7888
7940
|
},
|
|
7941
|
+
{
|
|
7942
|
+
"name": "IkasOrderRefundReason",
|
|
7943
|
+
"kind": "type",
|
|
7944
|
+
"domain": "order",
|
|
7945
|
+
"properties": [
|
|
7946
|
+
{
|
|
7947
|
+
"name": "id",
|
|
7948
|
+
"type": "string",
|
|
7949
|
+
"optional": false
|
|
7950
|
+
},
|
|
7951
|
+
{
|
|
7952
|
+
"name": "title",
|
|
7953
|
+
"type": "string",
|
|
7954
|
+
"optional": false
|
|
7955
|
+
},
|
|
7956
|
+
{
|
|
7957
|
+
"name": "translations",
|
|
7958
|
+
"type": "IkasOrderRefundReasonTranslation[] | null",
|
|
7959
|
+
"optional": false
|
|
7960
|
+
}
|
|
7961
|
+
],
|
|
7962
|
+
"filePath": "order/refund/reason/index.ts",
|
|
7963
|
+
"relatedFunctions": [
|
|
7964
|
+
"getIkasOrderRefundReason",
|
|
7965
|
+
"setIkasOrderRefundReason",
|
|
7966
|
+
"getIkasOrderRefundReasons"
|
|
7967
|
+
]
|
|
7968
|
+
},
|
|
7969
|
+
{
|
|
7970
|
+
"name": "IkasOrderRefundReasonTranslation",
|
|
7971
|
+
"kind": "type",
|
|
7972
|
+
"domain": "order",
|
|
7973
|
+
"properties": [
|
|
7974
|
+
{
|
|
7975
|
+
"name": "locale",
|
|
7976
|
+
"type": "string",
|
|
7977
|
+
"optional": false
|
|
7978
|
+
},
|
|
7979
|
+
{
|
|
7980
|
+
"name": "title",
|
|
7981
|
+
"type": "string | null",
|
|
7982
|
+
"optional": false
|
|
7983
|
+
}
|
|
7984
|
+
],
|
|
7985
|
+
"filePath": "order/refund/reason/translation/index.ts"
|
|
7986
|
+
},
|
|
7987
|
+
{
|
|
7988
|
+
"name": "IkasOrderRefundFlow",
|
|
7989
|
+
"kind": "type",
|
|
7990
|
+
"domain": "order",
|
|
7991
|
+
"unionValues": [
|
|
7992
|
+
"CANCEL",
|
|
7993
|
+
"RETURN"
|
|
7994
|
+
],
|
|
7995
|
+
"filePath": "order/refund/refundable-line/index.ts"
|
|
7996
|
+
},
|
|
7997
|
+
{
|
|
7998
|
+
"name": "IkasRefundableLine",
|
|
7999
|
+
"kind": "type",
|
|
8000
|
+
"domain": "order",
|
|
8001
|
+
"properties": [
|
|
8002
|
+
{
|
|
8003
|
+
"name": "autoApprove",
|
|
8004
|
+
"type": "boolean",
|
|
8005
|
+
"optional": false
|
|
8006
|
+
},
|
|
8007
|
+
{
|
|
8008
|
+
"name": "flow",
|
|
8009
|
+
"type": "IkasOrderRefundFlow | null",
|
|
8010
|
+
"optional": false
|
|
8011
|
+
},
|
|
8012
|
+
{
|
|
8013
|
+
"name": "isCancellable",
|
|
8014
|
+
"type": "boolean",
|
|
8015
|
+
"optional": false
|
|
8016
|
+
},
|
|
8017
|
+
{
|
|
8018
|
+
"name": "isRefundable",
|
|
8019
|
+
"type": "boolean",
|
|
8020
|
+
"optional": false
|
|
8021
|
+
},
|
|
8022
|
+
{
|
|
8023
|
+
"name": "orderLineItemId",
|
|
8024
|
+
"type": "string",
|
|
8025
|
+
"optional": false
|
|
8026
|
+
}
|
|
8027
|
+
],
|
|
8028
|
+
"filePath": "order/refund/refundable-line/index.ts"
|
|
8029
|
+
},
|
|
8030
|
+
{
|
|
8031
|
+
"name": "IkasRefundableLines",
|
|
8032
|
+
"kind": "type",
|
|
8033
|
+
"domain": "order",
|
|
8034
|
+
"properties": [
|
|
8035
|
+
{
|
|
8036
|
+
"name": "orderLineItems",
|
|
8037
|
+
"type": "IkasRefundableLine[]",
|
|
8038
|
+
"optional": false
|
|
8039
|
+
},
|
|
8040
|
+
{
|
|
8041
|
+
"name": "refundReasons",
|
|
8042
|
+
"type": "IkasOrderRefundReason[]",
|
|
8043
|
+
"optional": false
|
|
8044
|
+
},
|
|
8045
|
+
{
|
|
8046
|
+
"name": "translations",
|
|
8047
|
+
"type": "IkasOrderRefundSettingsTranslation[]",
|
|
8048
|
+
"optional": false
|
|
8049
|
+
}
|
|
8050
|
+
],
|
|
8051
|
+
"filePath": "order/refund/refundable-lines/index.ts"
|
|
8052
|
+
},
|
|
7889
8053
|
{
|
|
7890
8054
|
"name": "IkasOrderRefundSettings",
|
|
7891
8055
|
"kind": "type",
|
|
@@ -7909,6 +8073,24 @@
|
|
|
7909
8073
|
],
|
|
7910
8074
|
"filePath": "order/refund/settings/index.ts"
|
|
7911
8075
|
},
|
|
8076
|
+
{
|
|
8077
|
+
"name": "IkasOrderRefundSettingsTranslation",
|
|
8078
|
+
"kind": "type",
|
|
8079
|
+
"domain": "order",
|
|
8080
|
+
"properties": [
|
|
8081
|
+
{
|
|
8082
|
+
"name": "locale",
|
|
8083
|
+
"type": "string",
|
|
8084
|
+
"optional": false
|
|
8085
|
+
},
|
|
8086
|
+
{
|
|
8087
|
+
"name": "returnMethodDescription",
|
|
8088
|
+
"type": "string | null",
|
|
8089
|
+
"optional": false
|
|
8090
|
+
}
|
|
8091
|
+
],
|
|
8092
|
+
"filePath": "order/refund/settings/translation/index.ts"
|
|
8093
|
+
},
|
|
7912
8094
|
{
|
|
7913
8095
|
"name": "IkasOrderShippingLine",
|
|
7914
8096
|
"kind": "type",
|
|
@@ -15175,7 +15357,7 @@
|
|
|
15175
15357
|
},
|
|
15176
15358
|
{
|
|
15177
15359
|
"name": "width",
|
|
15178
|
-
"type": "number",
|
|
15360
|
+
"type": "number | string",
|
|
15179
15361
|
"optional": true
|
|
15180
15362
|
}
|
|
15181
15363
|
],
|