@ikas/code-components-mcp 1.4.0-beta.128 → 1.4.0-beta.129

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-07-21T09:36:45.213Z",
2
+ "generatedAt": "2026-07-21T10:59:47.347Z",
3
3
  "functions": [
4
4
  {
5
5
  "name": "apiListProductBrand",
@@ -7999,6 +7999,36 @@
7999
7999
  "IkasProductVariant"
8000
8000
  ]
8001
8001
  },
8002
+ {
8003
+ "name": "getProductVariantTieredDiscountProducts",
8004
+ "displayName": "getTieredDiscountProducts",
8005
+ "signature": "function getProductVariantTieredDiscountProducts(variant: IkasProductVariant): IkasTieredDiscountProduct[]",
8006
+ "description": "Get the tiered-discount breakdown for a product variant, one entry per discount tier.\n\nA tiered discount defines multiple quantity tiers (`campaign.tieredDiscount.rules`), each with its own\namount and quantity range. This resolves every tier against the variant's price and returns the\nper-tier sell/final prices (both raw numbers and formatted strings), matching the storefront runtime.\n\nThe discount `amount` is interpreted by `campaign.type`: `\"RATIO\"` treats it as a percentage,\n`\"FIXED_AMOUNT\"` as an absolute money amount subtracted from the tier total.\n\nReturns an empty array when the variant has no tiered-discount campaign, when a\n`PRODUCT_AND_VARIANT` filter excludes this variant, or when no tier defines a quantity range.",
8007
+ "params": [
8008
+ {
8009
+ "name": "variant",
8010
+ "description": "- The product variant to resolve tiered discounts for"
8011
+ }
8012
+ ],
8013
+ "returns": "An array of tier objects (`amount`, `lineItemQuantityRange`, `type`, sell/final prices with their formatted variants, `salesChannelIds`), or an empty array if no tiered discount applies",
8014
+ "returnType": "IkasTieredDiscountProduct[]",
8015
+ "example": "```typescript\nimport { getProductVariantTieredDiscountProducts, getSelectedProductVariant } from \"@ikas/bp-storefront\";\nimport { IkasProduct } from \"@ikas/bp-storefront\";\n\nfunction TieredDiscountTable({ product }: { product: IkasProduct }) {\n const variant = getSelectedProductVariant(product);\n const tiers = getProductVariantTieredDiscountProducts(variant);\n\n if (!tiers.length) return null;\n\n return (\n <ul>\n {tiers.map((tier, i) => (\n <li key={i}>\n Buy {tier.lineItemQuantityRange.min}+ → {tier.formattedFinalPriceWithQuantity}{\" \"}\n <s>{tier.formattedSellPriceWithQuantity}</s>\n </li>\n ))}\n </ul>\n );\n}\n```",
8016
+ "categories": [
8017
+ "Pricing",
8018
+ "ProductVariant"
8019
+ ],
8020
+ "related": [
8021
+ "getProductVariantAppliedCampaignAmount",
8022
+ "getProductVariantCampaignOffersDiscountPercentage",
8023
+ "getProductVariantFinalPrice"
8024
+ ],
8025
+ "isAsync": false,
8026
+ "isClass": false,
8027
+ "parameterTypes": [
8028
+ "IkasProductVariant",
8029
+ "IkasTieredDiscountProduct"
8030
+ ]
8031
+ },
8002
8032
  {
8003
8033
  "name": "getProductVariantIsBackInStockEnabled",
8004
8034
  "displayName": "isBackInStockEnabled",
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-07-21T09:36:45.237Z",
2
+ "generatedAt": "2026-07-21T10:59:47.371Z",
3
3
  "types": [
4
4
  {
5
5
  "name": "TextElementTagTypes",
@@ -10946,6 +10946,7 @@
10946
10946
  "getProductVariantSellPriceWithCampaignOffers",
10947
10947
  "getProductVariantFormattedSellPriceWithCampaignOffers",
10948
10948
  "getProductVariantCampaignOffersDiscountPercentage",
10949
+ "getProductVariantTieredDiscountProducts",
10949
10950
  "getProductVariantIsBackInStockEnabled",
10950
10951
  "getProductVariantIsBackInStockCustomerLoginRequired",
10951
10952
  "saveProductVariantBackInStockReminder",
@@ -10983,6 +10984,77 @@
10983
10984
  "getProductVariantAppliedCampaignAmount"
10984
10985
  ]
10985
10986
  },
10987
+ {
10988
+ "name": "IkasTieredDiscountProduct",
10989
+ "kind": "type",
10990
+ "domain": "product",
10991
+ "properties": [
10992
+ {
10993
+ "name": "amount",
10994
+ "type": "number | null",
10995
+ "optional": false
10996
+ },
10997
+ {
10998
+ "name": "lineItemQuantityRange",
10999
+ "type": "{ min: number; max: number }",
11000
+ "optional": false
11001
+ },
11002
+ {
11003
+ "name": "type",
11004
+ "type": "IkasCampaignType",
11005
+ "optional": false
11006
+ },
11007
+ {
11008
+ "name": "sellPrice",
11009
+ "type": "number",
11010
+ "optional": false
11011
+ },
11012
+ {
11013
+ "name": "finalPrice",
11014
+ "type": "number",
11015
+ "optional": false
11016
+ },
11017
+ {
11018
+ "name": "sellPriceWithQuantity",
11019
+ "type": "number",
11020
+ "optional": false
11021
+ },
11022
+ {
11023
+ "name": "finalPriceWithQuantity",
11024
+ "type": "number",
11025
+ "optional": false
11026
+ },
11027
+ {
11028
+ "name": "formattedSellPrice",
11029
+ "type": "string",
11030
+ "optional": false
11031
+ },
11032
+ {
11033
+ "name": "formattedSellPriceWithQuantity",
11034
+ "type": "string",
11035
+ "optional": false
11036
+ },
11037
+ {
11038
+ "name": "formattedFinalPrice",
11039
+ "type": "string",
11040
+ "optional": false
11041
+ },
11042
+ {
11043
+ "name": "formattedFinalPriceWithQuantity",
11044
+ "type": "string",
11045
+ "optional": false
11046
+ },
11047
+ {
11048
+ "name": "salesChannelIds",
11049
+ "type": "string[] | null",
11050
+ "optional": false
11051
+ }
11052
+ ],
11053
+ "filePath": "product/variant/index.ts",
11054
+ "relatedFunctions": [
11055
+ "getProductVariantTieredDiscountProducts"
11056
+ ]
11057
+ },
10986
11058
  {
10987
11059
  "name": "IkasProductPrice",
10988
11060
  "kind": "type",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/code-components-mcp",
3
- "version": "1.4.0-beta.128",
3
+ "version": "1.4.0-beta.129",
4
4
  "description": "MCP server for ikas code components documentation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",