@shopify/cli 3.66.1 → 3.67.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.
Files changed (109) hide show
  1. package/dist/assets/cli-ruby/lib/shopify_cli/theme/dev_server/proxy.rb +3 -7
  2. package/dist/assets/hydrogen/starter/CHANGELOG.md +105 -0
  3. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +79 -0
  4. package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -9
  5. package/dist/assets/hydrogen/starter/app/lib/fragments.ts +6 -0
  6. package/dist/assets/hydrogen/starter/app/lib/search.ts +2 -2
  7. package/dist/assets/hydrogen/starter/app/root.tsx +5 -3
  8. package/dist/assets/hydrogen/starter/app/routes/cart.tsx +14 -0
  9. package/dist/assets/hydrogen/starter/package.json +5 -5
  10. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +5 -0
  11. package/dist/{lib-CPSRXLFM.js → chunk-2HGYYNE5.js} +5 -2
  12. package/dist/{chunk-SVKRBSOG.js → chunk-3N2XGNSD.js} +2 -2
  13. package/dist/{chunk-3DZ2Z5F7.js → chunk-3N6HMQXE.js} +3 -3
  14. package/dist/{chunk-74LQ7ZSW.js → chunk-3SR6OJSK.js} +2 -2
  15. package/dist/{chunk-AV2DDU5Q.js → chunk-4SSP6H2B.js} +2 -2
  16. package/dist/{chunk-E5YZHXRF.js → chunk-AGVZ7LKV.js} +4 -4
  17. package/dist/{chunk-P2HC3CUV.js → chunk-BDRKGBQM.js} +4 -4
  18. package/dist/{chunk-6DU4BL5F.js → chunk-BFQFJ7IZ.js} +28 -17
  19. package/dist/{chunk-PP4BSPLO.js → chunk-CGTFVNVW.js} +9 -4
  20. package/dist/{chunk-AUKMJHJ7.js → chunk-CLB5CEKJ.js} +3 -3
  21. package/dist/{chunk-BPHTUL36.js → chunk-CQXLJ74Q.js} +2 -2
  22. package/dist/{chunk-O5XKA735.js → chunk-CQXTRP7V.js} +2 -2
  23. package/dist/{chunk-VZ6ZDQBM.js → chunk-D3PVKA4S.js} +3 -3
  24. package/dist/{chunk-ECD63UWY.js → chunk-DOGPMXVD.js} +4 -4
  25. package/dist/{chunk-JRECCYJM.js → chunk-DZ3IUP66.js} +75 -75
  26. package/dist/{chunk-47L545SZ.js → chunk-ET3FXEGV.js} +5 -5
  27. package/dist/{chunk-44VQQ5IT.js → chunk-FFJ5GS2L.js} +3 -3
  28. package/dist/{chunk-ICYU4JKU.js → chunk-GBNYQAYW.js} +3 -3
  29. package/dist/{chunk-GO4OU2FC.js → chunk-IKY4YZKM.js} +4 -4
  30. package/dist/{chunk-N766LDXO.js → chunk-JNCUUFQ2.js} +29 -5
  31. package/dist/{chunk-MQCE7QDZ.js → chunk-L7BARKPN.js} +148 -39
  32. package/dist/{chunk-SCWJ5DTS.js → chunk-LE2SHHVG.js} +3 -3
  33. package/dist/{chunk-ZTHIONMB.js → chunk-N4C6AXY7.js} +3 -3
  34. package/dist/{chunk-GXXQT43J.js → chunk-NKKQGCMU.js} +2 -2
  35. package/dist/{chunk-F6BSBHJJ.js → chunk-NZDBLGNM.js} +4 -3
  36. package/dist/{chunk-3ZYNGWAE.js → chunk-OPHICISR.js} +2 -2
  37. package/dist/{chunk-NLZ5VWA3.js → chunk-PRP4S22K.js} +25 -8
  38. package/dist/{chunk-2J35X4IR.js → chunk-RRJXIWCI.js} +2 -2
  39. package/dist/{chunk-ONFQ5XTX.js → chunk-RX32UG2K.js} +7 -7
  40. package/dist/{chunk-EARW2CGK.js → chunk-SG2SU3OS.js} +5 -5
  41. package/dist/{chunk-63OWMCSM.js → chunk-TSKLJ4DZ.js} +4 -4
  42. package/dist/{chunk-SQPCZKX5.js → chunk-TVHQ7O3U.js} +4 -4
  43. package/dist/{chunk-V7KJMBZN.js → chunk-UK3DVACO.js} +3 -3
  44. package/dist/{chunk-YK3ZIR2O.js → chunk-W4K3OTNK.js} +30 -90
  45. package/dist/{chunk-QPYUGCEP.js → chunk-WOL7YMUX.js} +24 -11
  46. package/dist/{chunk-OGVAYZHB.js → chunk-WWCONB45.js} +5 -5
  47. package/dist/{chunk-HJEKQ36N.js → chunk-XHUGASG2.js} +3 -3
  48. package/dist/{chunk-PCGPDW4N.js → chunk-XLTHVJPQ.js} +3 -3
  49. package/dist/cli/commands/auth/logout.js +13 -12
  50. package/dist/cli/commands/auth/logout.test.js +14 -13
  51. package/dist/cli/commands/debug/command-flags.js +12 -11
  52. package/dist/cli/commands/demo/catalog.js +13 -12
  53. package/dist/cli/commands/demo/generate-file.js +13 -12
  54. package/dist/cli/commands/demo/index.js +13 -12
  55. package/dist/cli/commands/demo/print-ai-prompt.js +13 -12
  56. package/dist/cli/commands/docs/generate.js +12 -11
  57. package/dist/cli/commands/docs/generate.test.js +12 -11
  58. package/dist/cli/commands/help.js +12 -11
  59. package/dist/cli/commands/kitchen-sink/async.js +13 -12
  60. package/dist/cli/commands/kitchen-sink/async.test.js +13 -12
  61. package/dist/cli/commands/kitchen-sink/index.js +15 -14
  62. package/dist/cli/commands/kitchen-sink/index.test.js +15 -14
  63. package/dist/cli/commands/kitchen-sink/prompts.js +13 -12
  64. package/dist/cli/commands/kitchen-sink/prompts.test.js +13 -12
  65. package/dist/cli/commands/kitchen-sink/static.js +13 -12
  66. package/dist/cli/commands/kitchen-sink/static.test.js +13 -12
  67. package/dist/cli/commands/search.js +13 -12
  68. package/dist/cli/commands/upgrade.js +13 -12
  69. package/dist/cli/commands/version.js +13 -12
  70. package/dist/cli/commands/version.test.js +13 -12
  71. package/dist/cli/services/commands/search.js +5 -4
  72. package/dist/cli/services/commands/search.test.js +5 -4
  73. package/dist/cli/services/commands/version.js +6 -5
  74. package/dist/cli/services/commands/version.test.js +7 -6
  75. package/dist/cli/services/demo.js +5 -4
  76. package/dist/cli/services/demo.test.js +5 -4
  77. package/dist/cli/services/kitchen-sink/async.js +5 -4
  78. package/dist/cli/services/kitchen-sink/prompts.js +5 -4
  79. package/dist/cli/services/kitchen-sink/static.js +5 -4
  80. package/dist/cli/services/upgrade.js +6 -5
  81. package/dist/cli/services/upgrade.test.js +8 -7
  82. package/dist/configs/all.yml +3 -0
  83. package/dist/configs/recommended.yml +3 -0
  84. package/dist/{constants-C6OOAW2P.js → constants-TR6ABVLJ.js} +4 -2
  85. package/dist/{custom-oclif-loader-DXBW5MGT.js → custom-oclif-loader-EPKORNJY.js} +5 -4
  86. package/dist/data/default_setting_values.json +56 -0
  87. package/dist/data/filters.json +34 -2
  88. package/dist/data/latest.json +1 -1
  89. package/dist/data/objects.json +1644 -6
  90. package/dist/data/section.json +23 -1
  91. package/dist/data/setting.json +411 -2
  92. package/dist/data/shopify_system_translations.json +17 -4
  93. package/dist/data/tags.json +37 -0
  94. package/dist/{error-handler-5G7W7NBW.js → error-handler-ZY662MJL.js} +11 -10
  95. package/dist/hooks/postrun.js +9 -8
  96. package/dist/hooks/prerun.js +9 -8
  97. package/dist/index.js +4326 -1911
  98. package/dist/{lib-6LEA5PZ7.js → lib-4WCTNKJK.js} +2 -2
  99. package/dist/lib-PPXZBVZX.js +6 -0
  100. package/dist/{local-IRPCVBNP.js → local-V2PIQZT7.js} +5 -4
  101. package/dist/{morph-M726AOW6.js → morph-WDFBUXWF.js} +9 -9
  102. package/dist/{node-QK7Q2TRB.js → node-I67G4HEQ.js} +16 -15
  103. package/dist/{node-package-manager-3WV6USI6.js → node-package-manager-FXUBXHFJ.js} +6 -5
  104. package/dist/{system-N2OPVMOD.js → system-DGKNYSEI.js} +7 -6
  105. package/dist/tsconfig.tsbuildinfo +1 -1
  106. package/dist/{ui-GHKHPRP2.js → ui-TPFQMYT2.js} +5 -4
  107. package/dist/{workerd-KAYMO4VM.js → workerd-WCFQKTR2.js} +15 -14
  108. package/oclif.manifest.json +86 -88
  109. package/package.json +7 -7
@@ -1349,6 +1349,1604 @@
1349
1349
  ],
1350
1350
  "summary": "The user associated with the author of the article.",
1351
1351
  "name": "user"
1352
+ },
1353
+ {
1354
+ "deprecated": false,
1355
+ "deprecation_reason": "",
1356
+ "description": "The size of a string is the number of characters that the string includes. The size of an array is the number of items\nin the array.",
1357
+ "examples": [
1358
+ {
1359
+ "name": "",
1360
+ "description": "",
1361
+ "syntax": "",
1362
+ "path": "/collections/sale-potions",
1363
+ "raw_liquid": "{{ collection.title | size }}\n{{ collection.products | size }}",
1364
+ "parameter": false,
1365
+ "display_type": "text",
1366
+ "show_data_tab": false
1367
+ },
1368
+ {
1369
+ "name": "Dot notation",
1370
+ "description": "You can use the `size` filter with dot notation when you need to use it inside a tag or object output.\n",
1371
+ "syntax": "",
1372
+ "path": "/collections/sale-potions",
1373
+ "raw_liquid": "{% if collection.products.size >= 10 %}\n There are 10 or more products in this collection.\n{% else %}\n There are less than 10 products in this collection.\n{% endif %}",
1374
+ "parameter": false,
1375
+ "display_type": "text",
1376
+ "show_data_tab": false
1377
+ }
1378
+ ],
1379
+ "return_type": [
1380
+ {
1381
+ "type": "number",
1382
+ "name": "",
1383
+ "description": "",
1384
+ "array_value": ""
1385
+ }
1386
+ ],
1387
+ "summary": "Returns the size of a string or array.",
1388
+ "name": "size"
1389
+ },
1390
+ {
1391
+ "deprecated": false,
1392
+ "deprecation_reason": "",
1393
+ "description": "",
1394
+ "examples": [
1395
+ {
1396
+ "name": "",
1397
+ "description": "",
1398
+ "syntax": "",
1399
+ "path": "/products/health-potion",
1400
+ "raw_liquid": "{{ product.title | downcase }}",
1401
+ "parameter": false,
1402
+ "display_type": "text",
1403
+ "show_data_tab": true
1404
+ }
1405
+ ],
1406
+ "return_type": [
1407
+ {
1408
+ "type": "string",
1409
+ "name": "",
1410
+ "description": "",
1411
+ "array_value": ""
1412
+ }
1413
+ ],
1414
+ "summary": "Converts a string to all lowercase characters.",
1415
+ "name": "downcase"
1416
+ },
1417
+ {
1418
+ "deprecated": false,
1419
+ "deprecation_reason": "",
1420
+ "description": "",
1421
+ "examples": [
1422
+ {
1423
+ "name": "",
1424
+ "description": "",
1425
+ "syntax": "",
1426
+ "path": "/products/health-potion",
1427
+ "raw_liquid": "{{ product.title | upcase }}",
1428
+ "parameter": false,
1429
+ "display_type": "text",
1430
+ "show_data_tab": true
1431
+ }
1432
+ ],
1433
+ "return_type": [
1434
+ {
1435
+ "type": "string",
1436
+ "name": "",
1437
+ "description": "",
1438
+ "array_value": ""
1439
+ }
1440
+ ],
1441
+ "summary": "Converts a string to all uppercase characters.",
1442
+ "name": "upcase"
1443
+ },
1444
+ {
1445
+ "deprecated": false,
1446
+ "deprecation_reason": "",
1447
+ "description": "",
1448
+ "examples": [
1449
+ {
1450
+ "name": "",
1451
+ "description": "",
1452
+ "syntax": "",
1453
+ "path": "/",
1454
+ "raw_liquid": "{{ 'this sentence should start with a capitalized word.' | capitalize }}",
1455
+ "parameter": false,
1456
+ "display_type": "text",
1457
+ "show_data_tab": true
1458
+ }
1459
+ ],
1460
+ "return_type": [
1461
+ {
1462
+ "type": "string",
1463
+ "name": "",
1464
+ "description": "",
1465
+ "array_value": ""
1466
+ }
1467
+ ],
1468
+ "summary": "Capitalizes the first word in a string and downcases the remaining characters.",
1469
+ "name": "capitalize"
1470
+ },
1471
+ {
1472
+ "deprecated": false,
1473
+ "deprecation_reason": "",
1474
+ "description": "",
1475
+ "examples": [
1476
+ {
1477
+ "name": "",
1478
+ "description": "",
1479
+ "syntax": "",
1480
+ "path": "/",
1481
+ "raw_liquid": "{{ '<p>Text to be escaped.</p>' | escape }}",
1482
+ "parameter": false,
1483
+ "display_type": "text",
1484
+ "show_data_tab": true
1485
+ }
1486
+ ],
1487
+ "return_type": [
1488
+ {
1489
+ "type": "string",
1490
+ "name": "",
1491
+ "description": "",
1492
+ "array_value": ""
1493
+ }
1494
+ ],
1495
+ "summary": "Escapes special characters in HTML, such as `<>`, `'`, and `&`, and converts characters into escape sequences. The filter doesn't effect characters within the string that don’t have a corresponding escape sequence.\".",
1496
+ "name": "escape"
1497
+ },
1498
+ {
1499
+ "deprecated": false,
1500
+ "deprecation_reason": "",
1501
+ "description": "",
1502
+ "examples": [
1503
+ {
1504
+ "name": "",
1505
+ "description": "",
1506
+ "syntax": "",
1507
+ "path": "/",
1508
+ "raw_liquid": "# applying the escape filter to already escaped text escapes characters in HTML entities:\n\n{{ \"<p>Text to be escaped.</p>\" | escape }}\n\n# applying the escape_once filter to already escaped text skips characters in HTML entities:\n\n{{ \"<p>Text to be escaped.</p>\" | escape_once }}\n\n# use escape_once to escape strings where a combination of HTML entities and non-escaped characters might be present:\n\n{{ \"<p>Text to be escaped.</p> & some additional text\" | escape_once }}",
1509
+ "parameter": false,
1510
+ "display_type": "text",
1511
+ "show_data_tab": true
1512
+ }
1513
+ ],
1514
+ "return_type": [
1515
+ {
1516
+ "type": "string",
1517
+ "name": "",
1518
+ "description": "",
1519
+ "array_value": ""
1520
+ }
1521
+ ],
1522
+ "summary": "Escapes a string without changing characters that have already been escaped.",
1523
+ "name": "escape_once"
1524
+ },
1525
+ {
1526
+ "deprecated": false,
1527
+ "deprecation_reason": "",
1528
+ "description": "> Note:\n> Spaces are converted to a `+` character, instead of a percent-encoded character.",
1529
+ "examples": [
1530
+ {
1531
+ "name": "",
1532
+ "description": "",
1533
+ "syntax": "",
1534
+ "path": "/",
1535
+ "raw_liquid": "{{ 'test@test.com' | url_encode }}",
1536
+ "parameter": false,
1537
+ "display_type": "text",
1538
+ "show_data_tab": true
1539
+ }
1540
+ ],
1541
+ "return_type": [
1542
+ {
1543
+ "type": "string",
1544
+ "name": "",
1545
+ "description": "",
1546
+ "array_value": ""
1547
+ }
1548
+ ],
1549
+ "summary": "Converts any URL-unsafe characters in a string to the\n[percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) equivalent.",
1550
+ "name": "url_encode"
1551
+ },
1552
+ {
1553
+ "deprecated": false,
1554
+ "deprecation_reason": "",
1555
+ "description": "",
1556
+ "examples": [
1557
+ {
1558
+ "name": "",
1559
+ "description": "",
1560
+ "syntax": "",
1561
+ "path": "/",
1562
+ "raw_liquid": "{{ 'test%40test.com' | url_decode }}",
1563
+ "parameter": false,
1564
+ "display_type": "text",
1565
+ "show_data_tab": true
1566
+ }
1567
+ ],
1568
+ "return_type": [
1569
+ {
1570
+ "type": "string",
1571
+ "name": "",
1572
+ "description": "",
1573
+ "array_value": ""
1574
+ }
1575
+ ],
1576
+ "summary": "Decodes any [percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) characters\nin a string.",
1577
+ "name": "url_decode"
1578
+ },
1579
+ {
1580
+ "deprecated": false,
1581
+ "deprecation_reason": "",
1582
+ "description": "",
1583
+ "examples": [
1584
+ {
1585
+ "name": "",
1586
+ "description": "",
1587
+ "syntax": "",
1588
+ "path": "/",
1589
+ "raw_liquid": "{{ 'one two three' | base64_encode }}",
1590
+ "parameter": false,
1591
+ "display_type": "text",
1592
+ "show_data_tab": true
1593
+ }
1594
+ ],
1595
+ "return_type": [
1596
+ {
1597
+ "type": "string",
1598
+ "name": "",
1599
+ "description": "",
1600
+ "array_value": ""
1601
+ }
1602
+ ],
1603
+ "summary": "Encodes a string to [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).",
1604
+ "name": "base64_encode"
1605
+ },
1606
+ {
1607
+ "deprecated": false,
1608
+ "deprecation_reason": "",
1609
+ "description": "",
1610
+ "examples": [
1611
+ {
1612
+ "name": "",
1613
+ "description": "",
1614
+ "syntax": "",
1615
+ "path": "/",
1616
+ "raw_liquid": "{{ 'b25lIHR3byB0aHJlZQ==' | base64_decode }}",
1617
+ "parameter": false,
1618
+ "display_type": "text",
1619
+ "show_data_tab": true
1620
+ }
1621
+ ],
1622
+ "return_type": [
1623
+ {
1624
+ "type": "string",
1625
+ "name": "",
1626
+ "description": "",
1627
+ "array_value": ""
1628
+ }
1629
+ ],
1630
+ "summary": "Decodes a string in [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).",
1631
+ "name": "base64_decode"
1632
+ },
1633
+ {
1634
+ "deprecated": false,
1635
+ "deprecation_reason": "",
1636
+ "description": "",
1637
+ "examples": [
1638
+ {
1639
+ "name": "",
1640
+ "description": "To produce URL-safe Base64, this filter uses `-` and `_` in place of `+` and `/`.",
1641
+ "syntax": "",
1642
+ "path": "/",
1643
+ "raw_liquid": "{{ 'one two three' | base64_url_safe_encode }}",
1644
+ "parameter": false,
1645
+ "display_type": "text",
1646
+ "show_data_tab": true
1647
+ }
1648
+ ],
1649
+ "return_type": [
1650
+ {
1651
+ "type": "string",
1652
+ "name": "",
1653
+ "description": "",
1654
+ "array_value": ""
1655
+ }
1656
+ ],
1657
+ "summary": "Encodes a string to URL-safe [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).",
1658
+ "name": "base64_url_safe_encode"
1659
+ },
1660
+ {
1661
+ "deprecated": false,
1662
+ "deprecation_reason": "",
1663
+ "description": "",
1664
+ "examples": [
1665
+ {
1666
+ "name": "",
1667
+ "description": "",
1668
+ "syntax": "",
1669
+ "path": "/",
1670
+ "raw_liquid": "{{ 'b25lIHR3byB0aHJlZQ==' | base64_url_safe_decode }}",
1671
+ "parameter": false,
1672
+ "display_type": "text",
1673
+ "show_data_tab": true
1674
+ }
1675
+ ],
1676
+ "return_type": [
1677
+ {
1678
+ "type": "string",
1679
+ "name": "",
1680
+ "description": "",
1681
+ "array_value": ""
1682
+ }
1683
+ ],
1684
+ "summary": "Decodes a string in URL-safe [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64).",
1685
+ "name": "base64_url_safe_decode"
1686
+ },
1687
+ {
1688
+ "deprecated": false,
1689
+ "deprecation_reason": "",
1690
+ "description": "By default, the substring has a length of one character, and the array series has one array item. However, you can\nprovide a second parameter to specify the number of characters or array items.",
1691
+ "examples": [
1692
+ {
1693
+ "name": "",
1694
+ "description": "",
1695
+ "syntax": "",
1696
+ "path": "/collections/all",
1697
+ "raw_liquid": "{{ collection.title | slice: 0 }}\n{{ collection.title | slice: 0, 5 }}\n\n{{ collection.all_tags | slice: 1, 2 | join: ', ' }}",
1698
+ "parameter": false,
1699
+ "display_type": "text",
1700
+ "show_data_tab": true
1701
+ },
1702
+ {
1703
+ "name": "Negative index",
1704
+ "description": "You can supply a negative index which will count from the end of the string.\n",
1705
+ "syntax": "",
1706
+ "path": "/collections/all",
1707
+ "raw_liquid": "{{ collection.title | slice: -3, 3 }}",
1708
+ "parameter": false,
1709
+ "display_type": "text",
1710
+ "show_data_tab": true
1711
+ }
1712
+ ],
1713
+ "return_type": [
1714
+ {
1715
+ "type": "string",
1716
+ "name": "",
1717
+ "description": "",
1718
+ "array_value": ""
1719
+ }
1720
+ ],
1721
+ "summary": "Returns a substring or series of array items, starting at a given 0-based index.",
1722
+ "name": "slice"
1723
+ },
1724
+ {
1725
+ "deprecated": false,
1726
+ "deprecation_reason": "",
1727
+ "description": "If the specified number of characters is less than the length of the string, then an ellipsis (`...`) is appended to\nthe truncated string. The ellipsis is included in the character count of the truncated string.",
1728
+ "examples": [
1729
+ {
1730
+ "name": "",
1731
+ "description": "",
1732
+ "syntax": "",
1733
+ "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
1734
+ "raw_liquid": "{{ article.title | truncate: 15 }}",
1735
+ "parameter": false,
1736
+ "display_type": "text",
1737
+ "show_data_tab": true
1738
+ },
1739
+ {
1740
+ "name": "Specify a custom ellipsis",
1741
+ "description": "You can provide a second parameter to specify a custom ellipsis. If you don't want an ellipsis, then you can supply an empty string.\n",
1742
+ "syntax": "string | truncate: number, string",
1743
+ "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
1744
+ "raw_liquid": "{{ article.title | truncate: 15, '--' }}\n{{ article.title | truncate: 15, '' }}",
1745
+ "parameter": true,
1746
+ "display_type": "text",
1747
+ "show_data_tab": true
1748
+ }
1749
+ ],
1750
+ "return_type": [
1751
+ {
1752
+ "type": "string",
1753
+ "name": "",
1754
+ "description": "",
1755
+ "array_value": ""
1756
+ }
1757
+ ],
1758
+ "summary": "Truncates a string down to a given number of characters.",
1759
+ "name": "truncate"
1760
+ },
1761
+ {
1762
+ "deprecated": false,
1763
+ "deprecation_reason": "",
1764
+ "description": "If the specified number of words is less than the number of words in the string, then an ellipsis (`...`) is appended to\nthe truncated string.\n\n> Caution:\n> HTML tags are treated as words, so you should strip any HTML from truncated content. If you don't strip HTML, then\n> closing HTML tags can be removed, which can result in unexpected behavior.",
1765
+ "examples": [
1766
+ {
1767
+ "name": "",
1768
+ "description": "",
1769
+ "syntax": "",
1770
+ "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
1771
+ "raw_liquid": "{{ article.content | strip_html | truncatewords: 15 }}",
1772
+ "parameter": false,
1773
+ "display_type": "text",
1774
+ "show_data_tab": true
1775
+ },
1776
+ {
1777
+ "name": "Specify a custom ellipsis",
1778
+ "description": "You can provide a second parameter to specify a custom ellipsis. If you don't want an ellipsis, then you can supply an empty string.\n",
1779
+ "syntax": "string | truncatewords: number, string",
1780
+ "path": "/blogs/potion-notions/how-to-tell-if-you-have-run-out-of-invisibility-potion",
1781
+ "raw_liquid": "{{ article.content | strip_html | truncatewords: 15, '--' }}\n\n{{ article.content | strip_html | truncatewords: 15, '' }}",
1782
+ "parameter": true,
1783
+ "display_type": "text",
1784
+ "show_data_tab": true
1785
+ }
1786
+ ],
1787
+ "return_type": [
1788
+ {
1789
+ "type": "string",
1790
+ "name": "",
1791
+ "description": "",
1792
+ "array_value": ""
1793
+ }
1794
+ ],
1795
+ "summary": "Truncates a string down to a given number of words.",
1796
+ "name": "truncatewords"
1797
+ },
1798
+ {
1799
+ "deprecated": false,
1800
+ "deprecation_reason": "",
1801
+ "description": "",
1802
+ "examples": [
1803
+ {
1804
+ "name": "",
1805
+ "description": "",
1806
+ "syntax": "",
1807
+ "path": "/products/health-potion",
1808
+ "raw_liquid": "{%- assign title_words = product.handle | split: '-' -%}\n\n{% for word in title_words -%}\n {{ word }}\n{%- endfor %}",
1809
+ "parameter": false,
1810
+ "display_type": "text",
1811
+ "show_data_tab": true
1812
+ }
1813
+ ],
1814
+ "return_type": [
1815
+ {
1816
+ "type": "array",
1817
+ "name": "",
1818
+ "description": "",
1819
+ "array_value": "string"
1820
+ }
1821
+ ],
1822
+ "summary": "Splits a string into an array of substrings based on a given separator.",
1823
+ "name": "split"
1824
+ },
1825
+ {
1826
+ "deprecated": false,
1827
+ "deprecation_reason": "",
1828
+ "description": "",
1829
+ "examples": [
1830
+ {
1831
+ "name": "",
1832
+ "description": "",
1833
+ "syntax": "",
1834
+ "path": "/",
1835
+ "raw_liquid": "{%- assign text = ' Some potions create whitespace. ' -%}\n\n\"{{ text }}\"\n\"{{ text | strip }}\"",
1836
+ "parameter": false,
1837
+ "display_type": "text",
1838
+ "show_data_tab": true
1839
+ }
1840
+ ],
1841
+ "return_type": [
1842
+ {
1843
+ "type": "string",
1844
+ "name": "",
1845
+ "description": "",
1846
+ "array_value": ""
1847
+ }
1848
+ ],
1849
+ "summary": "Strips all whitespace from the left and right of a string.",
1850
+ "name": "strip"
1851
+ },
1852
+ {
1853
+ "deprecated": false,
1854
+ "deprecation_reason": "",
1855
+ "description": "",
1856
+ "examples": [
1857
+ {
1858
+ "name": "",
1859
+ "description": "",
1860
+ "syntax": "",
1861
+ "path": "/",
1862
+ "raw_liquid": "{%- assign text = ' Some potions create whitespace. ' -%}\n\n\"{{ text }}\"\n\"{{ text | lstrip }}\"",
1863
+ "parameter": false,
1864
+ "display_type": "text",
1865
+ "show_data_tab": true
1866
+ }
1867
+ ],
1868
+ "return_type": [
1869
+ {
1870
+ "type": "string",
1871
+ "name": "",
1872
+ "description": "",
1873
+ "array_value": ""
1874
+ }
1875
+ ],
1876
+ "summary": "Strips all whitespace from the left of a string.",
1877
+ "name": "lstrip"
1878
+ },
1879
+ {
1880
+ "deprecated": false,
1881
+ "deprecation_reason": "",
1882
+ "description": "",
1883
+ "examples": [
1884
+ {
1885
+ "name": "",
1886
+ "description": "",
1887
+ "syntax": "",
1888
+ "path": "/",
1889
+ "raw_liquid": "{%- assign text = ' Some potions create whitespace. ' -%}\n\n\"{{ text }}\"\n\"{{ text | rstrip }}\"",
1890
+ "parameter": false,
1891
+ "display_type": "text",
1892
+ "show_data_tab": true
1893
+ }
1894
+ ],
1895
+ "return_type": [
1896
+ {
1897
+ "type": "string",
1898
+ "name": "",
1899
+ "description": "",
1900
+ "array_value": ""
1901
+ }
1902
+ ],
1903
+ "summary": "Strips all whitespace from the right of a string.",
1904
+ "name": "rstrip"
1905
+ },
1906
+ {
1907
+ "deprecated": false,
1908
+ "deprecation_reason": "",
1909
+ "description": "",
1910
+ "examples": [
1911
+ {
1912
+ "name": "",
1913
+ "description": "",
1914
+ "syntax": "",
1915
+ "path": "/products/health-potion",
1916
+ "raw_liquid": "<!-- With HTML -->\n{{ product.description }}\n\n<!-- HTML stripped -->\n{{ product.description | strip_html }}",
1917
+ "parameter": false,
1918
+ "display_type": "text",
1919
+ "show_data_tab": true
1920
+ }
1921
+ ],
1922
+ "return_type": [
1923
+ {
1924
+ "type": "string",
1925
+ "name": "",
1926
+ "description": "",
1927
+ "array_value": ""
1928
+ }
1929
+ ],
1930
+ "summary": "Strips all HTML tags from a string.",
1931
+ "name": "strip_html"
1932
+ },
1933
+ {
1934
+ "deprecated": false,
1935
+ "deprecation_reason": "",
1936
+ "description": "",
1937
+ "examples": [
1938
+ {
1939
+ "name": "",
1940
+ "description": "",
1941
+ "syntax": "",
1942
+ "path": "/products/health-potion",
1943
+ "raw_liquid": "<!-- With newlines -->\n{{ product.description }}\n\n<!-- Newlines stripped -->\n{{ product.description | strip_newlines }}",
1944
+ "parameter": false,
1945
+ "display_type": "text",
1946
+ "show_data_tab": true
1947
+ }
1948
+ ],
1949
+ "return_type": [
1950
+ {
1951
+ "type": "string",
1952
+ "name": "",
1953
+ "description": "",
1954
+ "array_value": ""
1955
+ }
1956
+ ],
1957
+ "summary": "Strips all newline characters (line breaks) from a string.",
1958
+ "name": "strip_newlines"
1959
+ },
1960
+ {
1961
+ "deprecated": false,
1962
+ "deprecation_reason": "",
1963
+ "description": "",
1964
+ "examples": [
1965
+ {
1966
+ "name": "",
1967
+ "description": "",
1968
+ "syntax": "",
1969
+ "path": "/collections/sale-potions",
1970
+ "raw_liquid": "{{ collection.all_tags | join }}",
1971
+ "parameter": false,
1972
+ "display_type": "text",
1973
+ "show_data_tab": true
1974
+ },
1975
+ {
1976
+ "name": "Custom separator",
1977
+ "description": "You can specify a custom separator for the joined items.\n",
1978
+ "syntax": "array | join: string",
1979
+ "path": "/collections/sale-potions",
1980
+ "raw_liquid": "{{ collection.all_tags | join: ', ' }}",
1981
+ "parameter": true,
1982
+ "display_type": "text",
1983
+ "show_data_tab": true
1984
+ }
1985
+ ],
1986
+ "return_type": [
1987
+ {
1988
+ "type": "string",
1989
+ "name": "",
1990
+ "description": "",
1991
+ "array_value": ""
1992
+ }
1993
+ ],
1994
+ "summary": "Combines all of the items in an array into a single string, separated by a space.",
1995
+ "name": "join"
1996
+ },
1997
+ {
1998
+ "deprecated": false,
1999
+ "deprecation_reason": "",
2000
+ "description": "",
2001
+ "examples": [
2002
+ {
2003
+ "name": "",
2004
+ "description": "",
2005
+ "syntax": "",
2006
+ "path": "/collections/all",
2007
+ "raw_liquid": "{% assign tags = collection.all_tags | sort %}\n\n{% for tag in tags -%}\n {{ tag }}\n{%- endfor %}",
2008
+ "parameter": false,
2009
+ "display_type": "text",
2010
+ "show_data_tab": true
2011
+ },
2012
+ {
2013
+ "name": "Sort by an array item property",
2014
+ "description": "You can specify an array item property to sort the array items by. You can sort by any property of the object that you're sorting.\n",
2015
+ "syntax": "array | sort: string",
2016
+ "path": "/collections/all",
2017
+ "raw_liquid": "{% assign products = collection.products | sort: 'price' %}\n\n{% for product in products -%}\n {{ product.title }}\n{%- endfor %}",
2018
+ "parameter": true,
2019
+ "display_type": "text",
2020
+ "show_data_tab": true
2021
+ }
2022
+ ],
2023
+ "return_type": [
2024
+ {
2025
+ "type": "array",
2026
+ "name": "",
2027
+ "description": "",
2028
+ "array_value": "untyped"
2029
+ }
2030
+ ],
2031
+ "summary": "Sorts the items in an array in case-sensitive alphabetical, or numerical, order.",
2032
+ "name": "sort"
2033
+ },
2034
+ {
2035
+ "deprecated": false,
2036
+ "deprecation_reason": "",
2037
+ "description": "> Caution:\n> You shouldn't use the `sort_natural` filter to sort numerical values. When comparing items an array, each item is converted to a\n> string, so sorting on numerical values can lead to unexpected results.",
2038
+ "examples": [
2039
+ {
2040
+ "name": "",
2041
+ "description": "",
2042
+ "syntax": "",
2043
+ "path": "/collections/all",
2044
+ "raw_liquid": "{% assign tags = collection.all_tags | sort_natural %}\n\n{% for tag in tags -%}\n {{ tag }}\n{%- endfor %}",
2045
+ "parameter": false,
2046
+ "display_type": "text",
2047
+ "show_data_tab": true
2048
+ },
2049
+ {
2050
+ "name": "Sort by an array item property",
2051
+ "description": "You can specify an array item property to sort the array items by.\n",
2052
+ "syntax": "array | sort_natural: string",
2053
+ "path": "/collections/all",
2054
+ "raw_liquid": "{% assign products = collection.products | sort_natural: 'title' %}\n\n{% for product in products -%}\n {{ product.title }}\n{%- endfor %}",
2055
+ "parameter": true,
2056
+ "display_type": "text",
2057
+ "show_data_tab": true
2058
+ }
2059
+ ],
2060
+ "return_type": [
2061
+ {
2062
+ "type": "array",
2063
+ "name": "",
2064
+ "description": "",
2065
+ "array_value": "untyped"
2066
+ }
2067
+ ],
2068
+ "summary": "Sorts the items in an array in case-insensitive alphabetical order.",
2069
+ "name": "sort_natural"
2070
+ },
2071
+ {
2072
+ "deprecated": false,
2073
+ "deprecation_reason": "",
2074
+ "description": "This requires you to provide both the property name and the associated value.",
2075
+ "examples": [
2076
+ {
2077
+ "name": "",
2078
+ "description": "",
2079
+ "syntax": "",
2080
+ "path": "/collections/all",
2081
+ "raw_liquid": "{% assign polina_products = collection.products | where: 'vendor', \"Polina's Potent Potions\" %}\n\nProducts from Polina's Potent Potions:\n\n{% for product in polina_products -%}\n - {{ product.title }}\n{%- endfor %}",
2082
+ "parameter": false,
2083
+ "display_type": "text",
2084
+ "show_data_tab": true
2085
+ },
2086
+ {
2087
+ "name": "Filter for boolean properties with a `true` value",
2088
+ "description": "You can filter for items that have a `true` value for a boolean property. This requires you to provide only the property name.\n",
2089
+ "syntax": "",
2090
+ "path": "/collections/all",
2091
+ "raw_liquid": "{% assign available_products = collection.products | where: 'available' %}\n\nAvailable products:\n\n{% for product in available_products -%}\n - {{ product.title }}\n{%- endfor %}",
2092
+ "parameter": false,
2093
+ "display_type": "text",
2094
+ "show_data_tab": true
2095
+ }
2096
+ ],
2097
+ "return_type": [
2098
+ {
2099
+ "type": "array",
2100
+ "name": "",
2101
+ "description": "",
2102
+ "array_value": "untyped"
2103
+ }
2104
+ ],
2105
+ "summary": "Filters an array to include only items with a specific property value.",
2106
+ "name": "where"
2107
+ },
2108
+ {
2109
+ "deprecated": false,
2110
+ "deprecation_reason": "",
2111
+ "description": "",
2112
+ "examples": [
2113
+ {
2114
+ "name": "",
2115
+ "description": "",
2116
+ "syntax": "",
2117
+ "path": "/",
2118
+ "raw_liquid": "{% assign potion_array = 'invisibility, health, love, health, invisibility' | split: ', ' %}\n\n{{ potion_array | uniq | join: ', ' }}",
2119
+ "parameter": false,
2120
+ "display_type": "text",
2121
+ "show_data_tab": true
2122
+ }
2123
+ ],
2124
+ "return_type": [
2125
+ {
2126
+ "type": "array",
2127
+ "name": "",
2128
+ "description": "",
2129
+ "array_value": "untyped"
2130
+ }
2131
+ ],
2132
+ "summary": "Removes any duplicate items in an array.",
2133
+ "name": "uniq"
2134
+ },
2135
+ {
2136
+ "deprecated": false,
2137
+ "deprecation_reason": "",
2138
+ "description": "",
2139
+ "examples": [
2140
+ {
2141
+ "name": "",
2142
+ "description": "",
2143
+ "syntax": "",
2144
+ "path": "/collections/sale-potions",
2145
+ "raw_liquid": "Original order:\n{{ collection.products | map: 'title' | join: ', ' }}\n\nReverse order:\n{{ collection.products | reverse | map: 'title' | join: ', ' }}",
2146
+ "parameter": false,
2147
+ "display_type": "text",
2148
+ "show_data_tab": true
2149
+ },
2150
+ {
2151
+ "name": "Reversing strings",
2152
+ "description": "You can't use the `reverse` filter on strings directly. However, you can use the [`split` filter](/docs/api/liquid/filters/split) to create an array of characters in the string, reverse that array, and then use the [`join` filter](/docs/api/liquid/filters/join) to combine them again.\n",
2153
+ "syntax": "",
2154
+ "path": "/collections/sale-potions",
2155
+ "raw_liquid": "{{ collection.title | split: '' | reverse | join: '' }}",
2156
+ "parameter": false,
2157
+ "display_type": "text",
2158
+ "show_data_tab": true
2159
+ }
2160
+ ],
2161
+ "return_type": [
2162
+ {
2163
+ "type": "array",
2164
+ "name": "",
2165
+ "description": "",
2166
+ "array_value": "untyped"
2167
+ }
2168
+ ],
2169
+ "summary": "Reverses the order of the items in an array.",
2170
+ "name": "reverse"
2171
+ },
2172
+ {
2173
+ "deprecated": false,
2174
+ "deprecation_reason": "",
2175
+ "description": "",
2176
+ "examples": [
2177
+ {
2178
+ "name": "",
2179
+ "description": "",
2180
+ "syntax": "",
2181
+ "path": "/collections/sale-potions",
2182
+ "raw_liquid": "{%- assign product_titles = collection.products | map: 'title' -%}\n\n{{ product_titles | join: ', ' }}",
2183
+ "parameter": false,
2184
+ "display_type": "text",
2185
+ "show_data_tab": true
2186
+ }
2187
+ ],
2188
+ "return_type": [
2189
+ {
2190
+ "type": "array",
2191
+ "name": "",
2192
+ "description": "",
2193
+ "array_value": "untyped"
2194
+ }
2195
+ ],
2196
+ "summary": "Creates an array of values from a specific property of the items in an array.",
2197
+ "name": "map"
2198
+ },
2199
+ {
2200
+ "deprecated": false,
2201
+ "deprecation_reason": "",
2202
+ "description": "",
2203
+ "examples": [
2204
+ {
2205
+ "name": "",
2206
+ "description": "",
2207
+ "syntax": "",
2208
+ "path": "/collections/all",
2209
+ "raw_liquid": "{%- assign original_prices = collection.products | map: 'compare_at_price' -%}\n\nOriginal prices:\n\n{% for price in original_prices -%}\n - {{ price }}\n{%- endfor %}\n\n{%- assign compacted_original_prices = original_prices | compact -%}\n\nOriginal prices - compacted:\n\n{% for price in compacted_original_prices -%}\n - {{ price }}\n{%- endfor %}",
2210
+ "parameter": false,
2211
+ "display_type": "text",
2212
+ "show_data_tab": true
2213
+ }
2214
+ ],
2215
+ "return_type": [
2216
+ {
2217
+ "type": "array",
2218
+ "name": "",
2219
+ "description": "",
2220
+ "array_value": "untyped"
2221
+ }
2222
+ ],
2223
+ "summary": "Removes any `nil` items from an array.",
2224
+ "name": "compact"
2225
+ },
2226
+ {
2227
+ "deprecated": false,
2228
+ "deprecation_reason": "",
2229
+ "description": "",
2230
+ "examples": [
2231
+ {
2232
+ "name": "",
2233
+ "description": "",
2234
+ "syntax": "",
2235
+ "path": "/products/komodo-dragon-scale",
2236
+ "raw_liquid": "{{ product.handle | replace: '-', ' ' }}",
2237
+ "parameter": false,
2238
+ "display_type": "text",
2239
+ "show_data_tab": true
2240
+ }
2241
+ ],
2242
+ "return_type": [
2243
+ {
2244
+ "type": "string",
2245
+ "name": "",
2246
+ "description": "",
2247
+ "array_value": ""
2248
+ }
2249
+ ],
2250
+ "summary": "Replaces any instance of a substring inside a string with a given string.",
2251
+ "name": "replace"
2252
+ },
2253
+ {
2254
+ "deprecated": false,
2255
+ "deprecation_reason": "",
2256
+ "description": "",
2257
+ "examples": [
2258
+ {
2259
+ "name": "",
2260
+ "description": "",
2261
+ "syntax": "",
2262
+ "path": "/products/komodo-dragon-scale",
2263
+ "raw_liquid": "{{ product.handle | replace_first: '-', ' ' }}",
2264
+ "parameter": false,
2265
+ "display_type": "text",
2266
+ "show_data_tab": true
2267
+ }
2268
+ ],
2269
+ "return_type": [
2270
+ {
2271
+ "type": "string",
2272
+ "name": "",
2273
+ "description": "",
2274
+ "array_value": ""
2275
+ }
2276
+ ],
2277
+ "summary": "Replaces the first instance of a substring inside a string with a given string.",
2278
+ "name": "replace_first"
2279
+ },
2280
+ {
2281
+ "deprecated": false,
2282
+ "deprecation_reason": "",
2283
+ "description": "",
2284
+ "examples": [
2285
+ {
2286
+ "name": "",
2287
+ "description": "",
2288
+ "syntax": "",
2289
+ "path": "/products/komodo-dragon-scale",
2290
+ "raw_liquid": "{{ product.handle | replace_last: '-', ' ' }}",
2291
+ "parameter": false,
2292
+ "display_type": "text",
2293
+ "show_data_tab": true
2294
+ }
2295
+ ],
2296
+ "return_type": [
2297
+ {
2298
+ "type": "string",
2299
+ "name": "",
2300
+ "description": "",
2301
+ "array_value": ""
2302
+ }
2303
+ ],
2304
+ "summary": "Replaces the last instance of a substring inside a string with a given string.",
2305
+ "name": "replace_last"
2306
+ },
2307
+ {
2308
+ "deprecated": false,
2309
+ "deprecation_reason": "",
2310
+ "description": "",
2311
+ "examples": [
2312
+ {
2313
+ "name": "",
2314
+ "description": "",
2315
+ "syntax": "",
2316
+ "path": "/",
2317
+ "raw_liquid": "{{ \"I can't do it!\" | remove: \"'t\" }}",
2318
+ "parameter": false,
2319
+ "display_type": "text",
2320
+ "show_data_tab": true
2321
+ }
2322
+ ],
2323
+ "return_type": [
2324
+ {
2325
+ "type": "string",
2326
+ "name": "",
2327
+ "description": "",
2328
+ "array_value": ""
2329
+ }
2330
+ ],
2331
+ "summary": "Removes any instance of a substring inside a string.",
2332
+ "name": "remove"
2333
+ },
2334
+ {
2335
+ "deprecated": false,
2336
+ "deprecation_reason": "",
2337
+ "description": "",
2338
+ "examples": [
2339
+ {
2340
+ "name": "",
2341
+ "description": "",
2342
+ "syntax": "",
2343
+ "path": "/",
2344
+ "raw_liquid": "{{ \"I hate it when I accidentally spill my duplication potion accidentally!\" | remove_first: ' accidentally' }}",
2345
+ "parameter": false,
2346
+ "display_type": "text",
2347
+ "show_data_tab": true
2348
+ }
2349
+ ],
2350
+ "return_type": [
2351
+ {
2352
+ "type": "string",
2353
+ "name": "",
2354
+ "description": "",
2355
+ "array_value": ""
2356
+ }
2357
+ ],
2358
+ "summary": "Removes the first instance of a substring inside a string.",
2359
+ "name": "remove_first"
2360
+ },
2361
+ {
2362
+ "deprecated": false,
2363
+ "deprecation_reason": "",
2364
+ "description": "",
2365
+ "examples": [
2366
+ {
2367
+ "name": "",
2368
+ "description": "",
2369
+ "syntax": "",
2370
+ "path": "/",
2371
+ "raw_liquid": "{{ \"I hate it when I accidentally spill my duplication potion accidentally!\" | remove_last: ' accidentally' }}",
2372
+ "parameter": false,
2373
+ "display_type": "text",
2374
+ "show_data_tab": true
2375
+ }
2376
+ ],
2377
+ "return_type": [
2378
+ {
2379
+ "type": "string",
2380
+ "name": "",
2381
+ "description": "",
2382
+ "array_value": ""
2383
+ }
2384
+ ],
2385
+ "summary": "Removes the last instance of a substring inside a string.",
2386
+ "name": "remove_last"
2387
+ },
2388
+ {
2389
+ "deprecated": false,
2390
+ "deprecation_reason": "",
2391
+ "description": "",
2392
+ "examples": [
2393
+ {
2394
+ "name": "",
2395
+ "description": "",
2396
+ "syntax": "",
2397
+ "path": "/products/health-potion",
2398
+ "raw_liquid": "{%- assign path = product.url -%}\n\n{{ request.origin | append: path }}",
2399
+ "parameter": false,
2400
+ "display_type": "text",
2401
+ "show_data_tab": true
2402
+ }
2403
+ ],
2404
+ "return_type": [
2405
+ {
2406
+ "type": "string",
2407
+ "name": "",
2408
+ "description": "",
2409
+ "array_value": ""
2410
+ }
2411
+ ],
2412
+ "summary": "Adds a given string to the end of a string.",
2413
+ "name": "append"
2414
+ },
2415
+ {
2416
+ "deprecated": false,
2417
+ "deprecation_reason": "",
2418
+ "description": "> Note:\n> The `concat` filter won't filter out duplicates. If you want to remove duplicates, then you need to use the\n> [`uniq` filter](/docs/api/liquid/filters/uniq).",
2419
+ "examples": [
2420
+ {
2421
+ "name": "",
2422
+ "description": "",
2423
+ "syntax": "",
2424
+ "path": "/collections/all",
2425
+ "raw_liquid": "{%- assign types_and_vendors = collection.all_types | concat: collection.all_vendors -%}\n\nTypes and vendors:\n\n{% for item in types_and_vendors -%}\n {%- if item != blank -%}\n - {{ item }}\n {%- endif -%}\n{%- endfor %}",
2426
+ "parameter": false,
2427
+ "display_type": "text",
2428
+ "show_data_tab": true
2429
+ }
2430
+ ],
2431
+ "return_type": [
2432
+ {
2433
+ "type": "array",
2434
+ "name": "",
2435
+ "description": "",
2436
+ "array_value": "untyped"
2437
+ }
2438
+ ],
2439
+ "summary": "Concatenates (combines) two arrays.",
2440
+ "name": "concat"
2441
+ },
2442
+ {
2443
+ "deprecated": false,
2444
+ "deprecation_reason": "",
2445
+ "description": "",
2446
+ "examples": [
2447
+ {
2448
+ "name": "",
2449
+ "description": "",
2450
+ "syntax": "",
2451
+ "path": "/products/health-potion",
2452
+ "raw_liquid": "{%- assign origin = request.origin -%}\n\n{{ product.url | prepend: origin }}",
2453
+ "parameter": false,
2454
+ "display_type": "text",
2455
+ "show_data_tab": true
2456
+ }
2457
+ ],
2458
+ "return_type": [
2459
+ {
2460
+ "type": "string",
2461
+ "name": "",
2462
+ "description": "",
2463
+ "array_value": ""
2464
+ }
2465
+ ],
2466
+ "summary": "Adds a given string to the beginning of a string.",
2467
+ "name": "prepend"
2468
+ },
2469
+ {
2470
+ "deprecated": false,
2471
+ "deprecation_reason": "",
2472
+ "description": "",
2473
+ "examples": [
2474
+ {
2475
+ "name": "",
2476
+ "description": "",
2477
+ "syntax": "",
2478
+ "path": "/products/health-potion",
2479
+ "raw_liquid": "{{ product.description | newline_to_br }}",
2480
+ "parameter": false,
2481
+ "display_type": "text",
2482
+ "show_data_tab": true
2483
+ }
2484
+ ],
2485
+ "return_type": [
2486
+ {
2487
+ "type": "string",
2488
+ "name": "",
2489
+ "description": "",
2490
+ "array_value": ""
2491
+ }
2492
+ ],
2493
+ "summary": "Converts newlines (`\\n`) in a string to HTML line breaks (`<br>`).",
2494
+ "name": "newline_to_br"
2495
+ },
2496
+ {
2497
+ "deprecated": false,
2498
+ "deprecation_reason": "",
2499
+ "description": "",
2500
+ "examples": [
2501
+ {
2502
+ "name": "",
2503
+ "description": "",
2504
+ "syntax": "",
2505
+ "path": "/collections/all",
2506
+ "raw_liquid": "{%- assign first_product = collection.products | first -%}\n\n{{ first_product.title }}",
2507
+ "parameter": false,
2508
+ "display_type": "text",
2509
+ "show_data_tab": true
2510
+ },
2511
+ {
2512
+ "name": "Dot notation",
2513
+ "description": "You can use the `first` filter with dot notation when you need to use it inside a tag or object output.\n",
2514
+ "syntax": "",
2515
+ "path": "/collections/all",
2516
+ "raw_liquid": "{{ collection.products.first.title }}",
2517
+ "parameter": false,
2518
+ "display_type": "text",
2519
+ "show_data_tab": true
2520
+ }
2521
+ ],
2522
+ "return_type": [
2523
+ {
2524
+ "type": "untyped",
2525
+ "name": "",
2526
+ "description": "",
2527
+ "array_value": ""
2528
+ }
2529
+ ],
2530
+ "summary": "Returns the first item in an array.",
2531
+ "name": "first"
2532
+ },
2533
+ {
2534
+ "deprecated": false,
2535
+ "deprecation_reason": "",
2536
+ "description": "",
2537
+ "examples": [
2538
+ {
2539
+ "name": "",
2540
+ "description": "",
2541
+ "syntax": "",
2542
+ "path": "/collections/all",
2543
+ "raw_liquid": "{%- assign last_product = collection.products | last -%}\n\n{{ last_product.title }}",
2544
+ "parameter": false,
2545
+ "display_type": "text",
2546
+ "show_data_tab": true
2547
+ },
2548
+ {
2549
+ "name": "Dot notation",
2550
+ "description": "You can use the `last` filter with dot notation when you need to use it inside a tag or object output.\n",
2551
+ "syntax": "",
2552
+ "path": "/collections/all",
2553
+ "raw_liquid": "{{ collection.products.last.title }}",
2554
+ "parameter": false,
2555
+ "display_type": "text",
2556
+ "show_data_tab": true
2557
+ }
2558
+ ],
2559
+ "return_type": [
2560
+ {
2561
+ "type": "untyped",
2562
+ "name": "",
2563
+ "description": "",
2564
+ "array_value": ""
2565
+ }
2566
+ ],
2567
+ "summary": "Returns the last item in an array.",
2568
+ "name": "last"
2569
+ },
2570
+ {
2571
+ "deprecated": false,
2572
+ "deprecation_reason": "",
2573
+ "description": "",
2574
+ "examples": [
2575
+ {
2576
+ "name": "",
2577
+ "description": "",
2578
+ "syntax": "",
2579
+ "path": "/",
2580
+ "raw_liquid": "{{ -3 | abs }}",
2581
+ "parameter": false,
2582
+ "display_type": "text",
2583
+ "show_data_tab": true
2584
+ }
2585
+ ],
2586
+ "return_type": [
2587
+ {
2588
+ "type": "number",
2589
+ "name": "",
2590
+ "description": "",
2591
+ "array_value": ""
2592
+ }
2593
+ ],
2594
+ "summary": "Returns the absolute value of a number.",
2595
+ "name": "abs"
2596
+ },
2597
+ {
2598
+ "deprecated": false,
2599
+ "deprecation_reason": "",
2600
+ "description": "",
2601
+ "examples": [
2602
+ {
2603
+ "name": "",
2604
+ "description": "",
2605
+ "syntax": "",
2606
+ "path": "/",
2607
+ "raw_liquid": "{{ 2 | plus: 2 }}",
2608
+ "parameter": false,
2609
+ "display_type": "text",
2610
+ "show_data_tab": true
2611
+ }
2612
+ ],
2613
+ "return_type": [
2614
+ {
2615
+ "type": "number",
2616
+ "name": "",
2617
+ "description": "",
2618
+ "array_value": ""
2619
+ }
2620
+ ],
2621
+ "summary": "Adds two numbers.",
2622
+ "name": "plus"
2623
+ },
2624
+ {
2625
+ "deprecated": false,
2626
+ "deprecation_reason": "",
2627
+ "description": "",
2628
+ "examples": [
2629
+ {
2630
+ "name": "",
2631
+ "description": "",
2632
+ "syntax": "",
2633
+ "path": "/",
2634
+ "raw_liquid": "{{ 4 | minus: 2 }}",
2635
+ "parameter": false,
2636
+ "display_type": "text",
2637
+ "show_data_tab": true
2638
+ }
2639
+ ],
2640
+ "return_type": [
2641
+ {
2642
+ "type": "number",
2643
+ "name": "",
2644
+ "description": "",
2645
+ "array_value": ""
2646
+ }
2647
+ ],
2648
+ "summary": "Subtracts a given number from another number.",
2649
+ "name": "minus"
2650
+ },
2651
+ {
2652
+ "deprecated": false,
2653
+ "deprecation_reason": "",
2654
+ "description": "",
2655
+ "examples": [
2656
+ {
2657
+ "name": "",
2658
+ "description": "",
2659
+ "syntax": "",
2660
+ "path": "/",
2661
+ "raw_liquid": "{{ 2 | times: 2 }}",
2662
+ "parameter": false,
2663
+ "display_type": "text",
2664
+ "show_data_tab": true
2665
+ }
2666
+ ],
2667
+ "return_type": [
2668
+ {
2669
+ "type": "number",
2670
+ "name": "",
2671
+ "description": "",
2672
+ "array_value": ""
2673
+ }
2674
+ ],
2675
+ "summary": "Multiplies a number by a given number.",
2676
+ "name": "times"
2677
+ },
2678
+ {
2679
+ "deprecated": false,
2680
+ "deprecation_reason": "",
2681
+ "description": "",
2682
+ "examples": [
2683
+ {
2684
+ "name": "",
2685
+ "description": "",
2686
+ "syntax": "",
2687
+ "path": "/",
2688
+ "raw_liquid": "{{ 4 | divided_by: 2 }}\n\n# divisor is an integer\n{{ 20 | divided_by: 7 }}\n\n# divisor is a float \n{{ 20 | divided_by: 7.0 }}",
2689
+ "parameter": false,
2690
+ "display_type": "text",
2691
+ "show_data_tab": true
2692
+ }
2693
+ ],
2694
+ "return_type": [
2695
+ {
2696
+ "type": "number",
2697
+ "name": "",
2698
+ "description": "",
2699
+ "array_value": ""
2700
+ }
2701
+ ],
2702
+ "summary": "Divides a number by a given number. The `divided_by` filter produces a result of the same type as the divisor. This means if you divide by an integer, the result will be an integer, and if you divide by a float, the result will be a float.",
2703
+ "name": "divided_by"
2704
+ },
2705
+ {
2706
+ "deprecated": false,
2707
+ "deprecation_reason": "",
2708
+ "description": "",
2709
+ "examples": [
2710
+ {
2711
+ "name": "",
2712
+ "description": "",
2713
+ "syntax": "",
2714
+ "path": "/",
2715
+ "raw_liquid": "{{ 12 | modulo: 5 }}",
2716
+ "parameter": false,
2717
+ "display_type": "text",
2718
+ "show_data_tab": true
2719
+ }
2720
+ ],
2721
+ "return_type": [
2722
+ {
2723
+ "type": "number",
2724
+ "name": "",
2725
+ "description": "",
2726
+ "array_value": ""
2727
+ }
2728
+ ],
2729
+ "summary": "Returns the remainder of dividing a number by a given number.",
2730
+ "name": "modulo"
2731
+ },
2732
+ {
2733
+ "deprecated": false,
2734
+ "deprecation_reason": "",
2735
+ "description": "",
2736
+ "examples": [
2737
+ {
2738
+ "name": "",
2739
+ "description": "",
2740
+ "syntax": "",
2741
+ "path": "/",
2742
+ "raw_liquid": "{{ 2.7 | round }}\n{{ 1.3 | round }}",
2743
+ "parameter": false,
2744
+ "display_type": "text",
2745
+ "show_data_tab": true
2746
+ },
2747
+ {
2748
+ "name": "Round to a specific number of decimal places",
2749
+ "description": "You can specify a number of decimal places to round to. If you don't specify a number, then the `round` filter rounds to the nearest integer.\n",
2750
+ "syntax": "",
2751
+ "path": "/",
2752
+ "raw_liquid": "{{ 3.14159 | round: 2 }}",
2753
+ "parameter": true,
2754
+ "display_type": "text",
2755
+ "show_data_tab": true
2756
+ }
2757
+ ],
2758
+ "return_type": [
2759
+ {
2760
+ "type": "number",
2761
+ "name": "",
2762
+ "description": "",
2763
+ "array_value": ""
2764
+ }
2765
+ ],
2766
+ "summary": "Rounds a number to the nearest integer.",
2767
+ "name": "round"
2768
+ },
2769
+ {
2770
+ "deprecated": false,
2771
+ "deprecation_reason": "",
2772
+ "description": "",
2773
+ "examples": [
2774
+ {
2775
+ "name": "",
2776
+ "description": "",
2777
+ "syntax": "",
2778
+ "path": "/",
2779
+ "raw_liquid": "{{ 1.2 | ceil }}",
2780
+ "parameter": false,
2781
+ "display_type": "text",
2782
+ "show_data_tab": true
2783
+ }
2784
+ ],
2785
+ "return_type": [
2786
+ {
2787
+ "type": "number",
2788
+ "name": "",
2789
+ "description": "",
2790
+ "array_value": ""
2791
+ }
2792
+ ],
2793
+ "summary": "Rounds a number up to the nearest integer.",
2794
+ "name": "ceil"
2795
+ },
2796
+ {
2797
+ "deprecated": false,
2798
+ "deprecation_reason": "",
2799
+ "description": "",
2800
+ "examples": [
2801
+ {
2802
+ "name": "",
2803
+ "description": "",
2804
+ "syntax": "",
2805
+ "path": "/",
2806
+ "raw_liquid": "{{ 1.2 | floor }}",
2807
+ "parameter": false,
2808
+ "display_type": "text",
2809
+ "show_data_tab": true
2810
+ }
2811
+ ],
2812
+ "return_type": [
2813
+ {
2814
+ "type": "number",
2815
+ "name": "",
2816
+ "description": "",
2817
+ "array_value": ""
2818
+ }
2819
+ ],
2820
+ "summary": "Rounds a number down to the nearest integer.",
2821
+ "name": "floor"
2822
+ },
2823
+ {
2824
+ "deprecated": false,
2825
+ "deprecation_reason": "",
2826
+ "description": "",
2827
+ "examples": [
2828
+ {
2829
+ "name": "",
2830
+ "description": "",
2831
+ "syntax": "",
2832
+ "path": "/",
2833
+ "raw_liquid": "{{ 4 | at_least: 5 }}\n{{ 4 | at_least: 3 }}",
2834
+ "parameter": false,
2835
+ "display_type": "text",
2836
+ "show_data_tab": true
2837
+ }
2838
+ ],
2839
+ "return_type": [
2840
+ {
2841
+ "type": "number",
2842
+ "name": "",
2843
+ "description": "",
2844
+ "array_value": ""
2845
+ }
2846
+ ],
2847
+ "summary": "Limits a number to a minimum value.",
2848
+ "name": "at_least"
2849
+ },
2850
+ {
2851
+ "deprecated": false,
2852
+ "deprecation_reason": "",
2853
+ "description": "",
2854
+ "examples": [
2855
+ {
2856
+ "name": "",
2857
+ "description": "",
2858
+ "syntax": "",
2859
+ "path": "/",
2860
+ "raw_liquid": "{{ 6 | at_most: 5 }}\n{{ 4 | at_most: 5 }}",
2861
+ "parameter": false,
2862
+ "display_type": "text",
2863
+ "show_data_tab": true
2864
+ }
2865
+ ],
2866
+ "return_type": [
2867
+ {
2868
+ "type": "number",
2869
+ "name": "",
2870
+ "description": "",
2871
+ "array_value": ""
2872
+ }
2873
+ ],
2874
+ "summary": "Limits a number to a maximum value.",
2875
+ "name": "at_most"
2876
+ },
2877
+ {
2878
+ "deprecated": false,
2879
+ "deprecation_reason": "",
2880
+ "description": "",
2881
+ "examples": [
2882
+ {
2883
+ "name": "",
2884
+ "description": "",
2885
+ "syntax": "",
2886
+ "path": "/products/health-potion",
2887
+ "raw_liquid": "{{ product.selected_variant.url | default: product.url }}",
2888
+ "parameter": false,
2889
+ "display_type": "text",
2890
+ "show_data_tab": true
2891
+ },
2892
+ {
2893
+ "name": "allow_false",
2894
+ "description": "By default, the `default` filter's value will be used in place of `false` values. You can use the `allow_false` parameter to allow variables to return `false` instead of the default value.\n",
2895
+ "syntax": "variable | default: variable, allow_false: boolean",
2896
+ "path": "/products/health-potion",
2897
+ "raw_liquid": "{%- assign display_price = false -%}\n\n{{ display_price | default: true, allow_false: true }}",
2898
+ "parameter": true,
2899
+ "display_type": "text",
2900
+ "show_data_tab": true
2901
+ }
2902
+ ],
2903
+ "return_type": [
2904
+ {
2905
+ "type": "untyped",
2906
+ "name": "",
2907
+ "description": "",
2908
+ "array_value": ""
2909
+ }
2910
+ ],
2911
+ "summary": "Sets a default value for any variable whose value is one of the following:\n\n- [`empty`](/docs/api/liquid/basics#empty)\n- [`false`](/docs/api/liquid/basics#truthy-and-falsy)\n- [`nil`](/docs/api/liquid/basics#nil)",
2912
+ "name": "default"
2913
+ },
2914
+ {
2915
+ "deprecated": false,
2916
+ "deprecation_reason": "",
2917
+ "description": "",
2918
+ "examples": [
2919
+ {
2920
+ "name": "",
2921
+ "description": "",
2922
+ "syntax": "",
2923
+ "path": "/",
2924
+ "raw_liquid": "{% assign fibonacci = '0, 1, 1, 2, 3, 5' | split: ', ' %}\n\n{{ fibonacci | sum }}",
2925
+ "parameter": false,
2926
+ "display_type": "text",
2927
+ "show_data_tab": true
2928
+ },
2929
+ {
2930
+ "name": "Sum object property values",
2931
+ "description": "For an array of Liquid objects, you can specify a property to sum.",
2932
+ "syntax": "array | sum: string",
2933
+ "path": "/cart",
2934
+ "raw_liquid": "Total quantity of all items in cart:\n{{ cart.items | sum: 'quantity' }}\n\nSubtotal price for all items in cart:\n{{ cart.items | sum: 'final_line_price' | money }}",
2935
+ "parameter": true,
2936
+ "display_type": "text",
2937
+ "show_data_tab": true
2938
+ }
2939
+ ],
2940
+ "return_type": [
2941
+ {
2942
+ "type": "number",
2943
+ "name": "",
2944
+ "description": "",
2945
+ "array_value": ""
2946
+ }
2947
+ ],
2948
+ "summary": "Returns the sum of all elements in an array.",
2949
+ "name": "sum"
1352
2950
  }
1353
2951
  ],
1354
2952
  "summary": "An article, or [blog post](https://help.shopify.com/manual/online-store/blogs/writing-blogs), in a blog.",
@@ -3603,6 +5201,24 @@
3603
5201
  "summary": "The company locations that the current customer has access to, or can interact with.",
3604
5202
  "name": "available_locations"
3605
5203
  },
5204
+ {
5205
+ "deprecated": false,
5206
+ "deprecation_reason": "",
5207
+ "description": "",
5208
+ "examples": [
5209
+
5210
+ ],
5211
+ "return_type": [
5212
+ {
5213
+ "type": "number",
5214
+ "name": "",
5215
+ "description": "",
5216
+ "array_value": ""
5217
+ }
5218
+ ],
5219
+ "summary": "The number of company locations associated with the customer's company.",
5220
+ "name": "available_locations_count"
5221
+ },
3606
5222
  {
3607
5223
  "deprecated": false,
3608
5224
  "deprecation_reason": "",
@@ -4523,7 +6139,7 @@
4523
6139
  {
4524
6140
  "deprecated": false,
4525
6141
  "deprecation_reason": "",
4526
- "description": "To learn about B2B in themes, refer to [Support B2B customers in your theme](/themes/pricing-payments/b2b).",
6142
+ "description": "To learn about B2B in themes, refer to [Support B2B customers in your theme](/themes/pricing-payments/b2b).\n\n> Tip:\n> Use the [paginate](/docs/api/liquid/tags/paginate) tag to choose how many company locations to show at once, up to a limit of 100.",
4527
6143
  "examples": [
4528
6144
 
4529
6145
  ],
@@ -4538,6 +6154,24 @@
4538
6154
  "summary": "The company locations that the customer has access to, or can interact with.",
4539
6155
  "name": "company_available_locations"
4540
6156
  },
6157
+ {
6158
+ "deprecated": false,
6159
+ "deprecation_reason": "",
6160
+ "description": "",
6161
+ "examples": [
6162
+
6163
+ ],
6164
+ "return_type": [
6165
+ {
6166
+ "type": "number",
6167
+ "name": "",
6168
+ "description": "",
6169
+ "array_value": ""
6170
+ }
6171
+ ],
6172
+ "summary": "The number of company locations associated with the customer.",
6173
+ "name": "company_available_locations_count"
6174
+ },
4541
6175
  {
4542
6176
  "deprecated": false,
4543
6177
  "deprecation_reason": "",
@@ -12915,6 +14549,10 @@
12915
14549
  {
12916
14550
  "object": "product_option",
12917
14551
  "property": "values"
14552
+ },
14553
+ {
14554
+ "object": "variant",
14555
+ "property": "options"
12918
14556
  }
12919
14557
  ],
12920
14558
  "template": [
@@ -12976,7 +14614,7 @@
12976
14614
  "array_value": ""
12977
14615
  }
12978
14616
  ],
12979
- "summary": "> Beta:\n> This feature is currently in early access. To be considered for early access to these API updates and the Shopify Product Taxonomy, [sign up here](https://www.shopify.com/editions/winter2024#new-taxonomy).\n\nReturns a [swatch](/docs/api/liquid/objects/swatch) drop for the product option value. If there is no saved `color` or `image` content for the swatch, then the return value is `nil`.",
14617
+ "summary": "Returns a [swatch](/docs/api/liquid/objects/swatch) drop for the product option value. If there is no saved `color` or `image` content for the swatch, then the return value is `nil`.",
12980
14618
  "name": "swatch"
12981
14619
  },
12982
14620
  {
@@ -13000,7 +14638,7 @@
13000
14638
  {
13001
14639
  "deprecated": false,
13002
14640
  "deprecation_reason": "",
13003
- "description": "> Beta:\n> This feature is currently in early access. To be considered for early access to these API updates and/or the Shopify Combined Listings app, please reach out to <a href=\"https://partners.shopify.com/current/support\">Partner support</a>.\n\nIn the context of the selected values for previous options, indicates whether the current option value has any purchaseable combinations in any subsequent options, or whether the current option value is purchaseable if there are no subsequent options.\nFor example, if a product comes in Color/Size/Material and Red/Small/Cotton is selected, `available` will indicate:\n- Color: Whether any variants for the Color option value are available for purchase.\n- Size: Whether any variants for Color:Red and the Size option value are available for purchase.\n- Material: Whether any variants for Color:Red, Size:Small, and the Material option value are available for purchase.",
14641
+ "description": "In the context of the selected values for previous options, indicates whether the current option value has any purchaseable combinations in any subsequent options, or whether the current option value is purchaseable if there are no subsequent options.\nFor example, if a product comes in Color/Size/Material and Red/Small/Cotton is selected, `available` will indicate:\n- Color: Whether any variants for the Color option value are available for purchase.\n- Size: Whether any variants for Color:Red and the Size option value are available for purchase.\n- Material: Whether any variants for Color:Red, Size:Small, and the Material option value are available for purchase.",
13004
14642
  "examples": [
13005
14643
 
13006
14644
  ],
@@ -13018,7 +14656,7 @@
13018
14656
  {
13019
14657
  "deprecated": false,
13020
14658
  "deprecation_reason": "",
13021
- "description": "> Beta:\n> This feature is currently in early access. To be considered for early access to these API updates and/or the Shopify Combined Listings app, please reach out to <a href=\"https://partners.shopify.com/current/support\">Partner support</a>.\n\nIf this option value is selected (`selected == true`), this returns the `selected_or_first_available_variant`.\n\nIf this option value is not selected (`selected == false`), this returns the variant that is associated with the current\noption value and the other currently selected option values.",
14659
+ "description": "If this option value is selected (`selected == true`), this returns the `selected_or_first_available_variant`.\n\nIf this option value is not selected (`selected == false`), this returns the variant that is associated with the current\noption value and the other currently selected option values.",
13022
14660
  "examples": [
13023
14661
 
13024
14662
  ],
@@ -13036,7 +14674,7 @@
13036
14674
  {
13037
14675
  "deprecated": false,
13038
14676
  "deprecation_reason": "",
13039
- "description": "> Beta:\n> This feature is currently in early access. To be considered for early access to these API updates and/or the Shopify Combined Listings app, please reach out to <a href=\"https://partners.shopify.com/current/support\">Partner support</a>.\n\n```liquid\n/products/gorgeous-wooden-computer\n```",
14677
+ "description": "```liquid\n/products/gorgeous-wooden-computer\n```",
13040
14678
  "examples": [
13041
14679
 
13042
14680
  ],
@@ -13490,7 +15128,7 @@
13490
15128
  ],
13491
15129
  "return_type": [
13492
15130
  {
13493
- "type": "string",
15131
+ "type": "product_option_value",
13494
15132
  "name": "",
13495
15133
  "description": "",
13496
15134
  "array_value": ""