@shop-on/theme-server 0.4.0 → 0.6.0
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/dist/account.js +7 -4
- package/dist/analytics-proxy.d.ts +2 -1
- package/dist/analytics-proxy.js +2 -1
- package/dist/blog.d.ts +26 -0
- package/dist/blog.js +65 -1
- package/dist/cart.d.ts +7 -7
- package/dist/checkout.js +1 -1
- package/dist/collection.d.ts +41 -4
- package/dist/collection.js +66 -5
- package/dist/content-version.d.ts +12 -6
- package/dist/content-version.js +25 -4
- package/dist/graphql-env.d.ts +435 -29
- package/dist/graphql.js +8 -2
- package/dist/marketing-cookies.d.ts +6 -4
- package/dist/marketing-cookies.js +35 -14
- package/dist/metafields.d.ts +7 -0
- package/dist/metafields.js +33 -0
- package/dist/page.d.ts +15 -0
- package/dist/page.js +35 -1
- package/dist/product.d.ts +16 -1
- package/dist/product.js +44 -34
- package/dist/recommendations.d.ts +3 -0
- package/dist/recommendations.js +8 -3
- package/dist/schema.storefront.graphql +434 -20
- package/dist/search.d.ts +3 -0
- package/dist/search.js +5 -0
- package/package.json +3 -3
|
@@ -1442,10 +1442,45 @@ enum CropRegionEnum {
|
|
|
1442
1442
|
A supported ISO 4217 currency code
|
|
1443
1443
|
"""
|
|
1444
1444
|
enum CurrencyEnum {
|
|
1445
|
+
"""
|
|
1446
|
+
Chinese yuan
|
|
1447
|
+
"""
|
|
1448
|
+
CNY
|
|
1449
|
+
|
|
1450
|
+
"""
|
|
1451
|
+
Euro
|
|
1452
|
+
"""
|
|
1453
|
+
EUR
|
|
1454
|
+
|
|
1455
|
+
"""
|
|
1456
|
+
Pound sterling
|
|
1457
|
+
"""
|
|
1458
|
+
GBP
|
|
1459
|
+
|
|
1460
|
+
"""
|
|
1461
|
+
Japanese yen
|
|
1462
|
+
"""
|
|
1463
|
+
JPY
|
|
1464
|
+
|
|
1465
|
+
"""
|
|
1466
|
+
South Korean won
|
|
1467
|
+
"""
|
|
1468
|
+
KRW
|
|
1469
|
+
|
|
1445
1470
|
"""
|
|
1446
1471
|
Mongolian tögrög
|
|
1447
1472
|
"""
|
|
1448
1473
|
MNT
|
|
1474
|
+
|
|
1475
|
+
"""
|
|
1476
|
+
Russian ruble
|
|
1477
|
+
"""
|
|
1478
|
+
RUB
|
|
1479
|
+
|
|
1480
|
+
"""
|
|
1481
|
+
US dollar
|
|
1482
|
+
"""
|
|
1483
|
+
USD
|
|
1449
1484
|
}
|
|
1450
1485
|
|
|
1451
1486
|
"""
|
|
@@ -1698,6 +1733,21 @@ input DecimalFilter {
|
|
|
1698
1733
|
lteq: Decimal
|
|
1699
1734
|
}
|
|
1700
1735
|
|
|
1736
|
+
"""
|
|
1737
|
+
What a digital file hands the buyer.
|
|
1738
|
+
"""
|
|
1739
|
+
enum DigitalFileKind {
|
|
1740
|
+
"""
|
|
1741
|
+
Bytes stored privately, downloaded through a short-lived link.
|
|
1742
|
+
"""
|
|
1743
|
+
FILE
|
|
1744
|
+
|
|
1745
|
+
"""
|
|
1746
|
+
A URL the buyer is sent to instead of a file.
|
|
1747
|
+
"""
|
|
1748
|
+
LINK
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1701
1751
|
"""
|
|
1702
1752
|
How an applied discount was triggered.
|
|
1703
1753
|
"""
|
|
@@ -1720,6 +1770,92 @@ enum DiscountTargetTypeEnum {
|
|
|
1720
1770
|
SHIPPING
|
|
1721
1771
|
}
|
|
1722
1772
|
|
|
1773
|
+
"""
|
|
1774
|
+
A buyer's download of one file from their order.
|
|
1775
|
+
"""
|
|
1776
|
+
type DownloadGrant {
|
|
1777
|
+
"""
|
|
1778
|
+
Size of the file. Null on a link.
|
|
1779
|
+
"""
|
|
1780
|
+
byteSize: BigInt
|
|
1781
|
+
|
|
1782
|
+
"""
|
|
1783
|
+
Downloads left. Null = unlimited; 0 once revoked.
|
|
1784
|
+
"""
|
|
1785
|
+
downloadsRemaining: Int
|
|
1786
|
+
|
|
1787
|
+
"""
|
|
1788
|
+
Name of the file. Null on a link.
|
|
1789
|
+
"""
|
|
1790
|
+
filename: String
|
|
1791
|
+
kind: DigitalFileKind!
|
|
1792
|
+
|
|
1793
|
+
"""
|
|
1794
|
+
The order it was bought on, e.g. "#1042".
|
|
1795
|
+
"""
|
|
1796
|
+
orderName: String!
|
|
1797
|
+
state: DownloadGrantState!
|
|
1798
|
+
title: String!
|
|
1799
|
+
|
|
1800
|
+
"""
|
|
1801
|
+
The landing page to download from, or that says it is being prepared. Opening
|
|
1802
|
+
it counts nothing; its Download button does. Null once exhausted or revoked.
|
|
1803
|
+
"""
|
|
1804
|
+
url: String
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
"""
|
|
1808
|
+
Autogenerated input type of DownloadGrantConsume
|
|
1809
|
+
"""
|
|
1810
|
+
input DownloadGrantConsumeInput {
|
|
1811
|
+
"""
|
|
1812
|
+
A unique identifier for the client performing the mutation.
|
|
1813
|
+
"""
|
|
1814
|
+
clientMutationId: String
|
|
1815
|
+
signedId: String!
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
"""
|
|
1819
|
+
Autogenerated return type of DownloadGrantConsume.
|
|
1820
|
+
"""
|
|
1821
|
+
type DownloadGrantConsumePayload {
|
|
1822
|
+
"""
|
|
1823
|
+
A unique identifier for the client performing the mutation.
|
|
1824
|
+
"""
|
|
1825
|
+
clientMutationId: String
|
|
1826
|
+
|
|
1827
|
+
"""
|
|
1828
|
+
Where to send the buyer. Short-lived for a file.
|
|
1829
|
+
"""
|
|
1830
|
+
url: String
|
|
1831
|
+
userErrors: [UserError!]!
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
"""
|
|
1835
|
+
Whether a download can be started now, and why not.
|
|
1836
|
+
"""
|
|
1837
|
+
enum DownloadGrantState {
|
|
1838
|
+
"""
|
|
1839
|
+
Ready to download.
|
|
1840
|
+
"""
|
|
1841
|
+
ACTIVE
|
|
1842
|
+
|
|
1843
|
+
"""
|
|
1844
|
+
Every allowed download has been used.
|
|
1845
|
+
"""
|
|
1846
|
+
EXHAUSTED
|
|
1847
|
+
|
|
1848
|
+
"""
|
|
1849
|
+
The store is preparing it; the buyer gets an email once it is released.
|
|
1850
|
+
"""
|
|
1851
|
+
HELD
|
|
1852
|
+
|
|
1853
|
+
"""
|
|
1854
|
+
The store has withdrawn it.
|
|
1855
|
+
"""
|
|
1856
|
+
REVOKED
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1723
1859
|
"""
|
|
1724
1860
|
Shipping address input on a draft order. All fields optional individually;
|
|
1725
1861
|
completion requires at least address1 + country for shippable lines.
|
|
@@ -2322,6 +2458,13 @@ type LinkedMetafield {
|
|
|
2322
2458
|
Click-attribution ids read from the buyer's browser. Allowlisted + shape-checked server-side.
|
|
2323
2459
|
"""
|
|
2324
2460
|
input MarketingAttributionInput {
|
|
2461
|
+
"""
|
|
2462
|
+
The buyer's marketing cookies as one `name=value; …` string (`_fbp`, `_fbc`,
|
|
2463
|
+
`_ga`, `_ga_<stream>`, `_gcl_aw`, `_gcl_au`, `_ttp`). Parsed server-side and
|
|
2464
|
+
never stored as sent; refused whole over 4KB.
|
|
2465
|
+
"""
|
|
2466
|
+
cookies: String
|
|
2467
|
+
|
|
2325
2468
|
"""
|
|
2326
2469
|
Meta click id (`_fbc` cookie).
|
|
2327
2470
|
"""
|
|
@@ -2391,6 +2534,14 @@ enum MenuItemTypeEnum {
|
|
|
2391
2534
|
PRODUCT
|
|
2392
2535
|
}
|
|
2393
2536
|
|
|
2537
|
+
"""
|
|
2538
|
+
A metafield named by namespace + key.
|
|
2539
|
+
"""
|
|
2540
|
+
input MetafieldKeyInput {
|
|
2541
|
+
key: String!
|
|
2542
|
+
namespace: String!
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2394
2545
|
input MetaobjectDefinitionFilter {
|
|
2395
2546
|
"""
|
|
2396
2547
|
Exact handle match
|
|
@@ -2719,6 +2870,16 @@ type Mutation {
|
|
|
2719
2870
|
input: CustomerUpdateInput!
|
|
2720
2871
|
): CustomerUpdatePayload
|
|
2721
2872
|
|
|
2873
|
+
"""
|
|
2874
|
+
Count one download of a digital file and return the URL to fetch it from.
|
|
2875
|
+
"""
|
|
2876
|
+
downloadGrantConsume(
|
|
2877
|
+
"""
|
|
2878
|
+
Parameters for DownloadGrantConsume
|
|
2879
|
+
"""
|
|
2880
|
+
input: DownloadGrantConsumeInput!
|
|
2881
|
+
): DownloadGrantConsumePayload
|
|
2882
|
+
|
|
2722
2883
|
"""
|
|
2723
2884
|
Buyer-side completion of a draft invoice into a pending-payment order.
|
|
2724
2885
|
"""
|
|
@@ -3457,6 +3618,12 @@ type Query {
|
|
|
3457
3618
|
"""
|
|
3458
3619
|
districts(provinceId: ID!): [AddressDistrict!]!
|
|
3459
3620
|
|
|
3621
|
+
"""
|
|
3622
|
+
The download behind an emailed link, for its landing page. Counts nothing.
|
|
3623
|
+
Null on a bad signed id or one from another shop.
|
|
3624
|
+
"""
|
|
3625
|
+
downloadGrant(signedId: String!): DownloadGrant
|
|
3626
|
+
|
|
3460
3627
|
"""
|
|
3461
3628
|
Resolve a draft order by its plaintext invoice token. Returns null on INVOICE_INVALID / INVOICE_EXPIRED / DRAFT_COMPLETED.
|
|
3462
3629
|
"""
|
|
@@ -4734,6 +4901,45 @@ type ShopArticle implements Node {
|
|
|
4734
4901
|
True if status is published AND published_at is null or past.
|
|
4735
4902
|
"""
|
|
4736
4903
|
isPublished: Boolean!
|
|
4904
|
+
|
|
4905
|
+
"""
|
|
4906
|
+
A metafield attached to this resource, looked up by namespace + key. On the
|
|
4907
|
+
storefront, resolves only when the definition opts in via storefrontVisible.
|
|
4908
|
+
"""
|
|
4909
|
+
metafield(key: String!, namespace: String!): ShopMetafield
|
|
4910
|
+
|
|
4911
|
+
"""
|
|
4912
|
+
Metafields attached to this resource. Optionally scoped by namespace, or to
|
|
4913
|
+
the named namespace + key pairs. On the storefront, only definitions that opt
|
|
4914
|
+
in via storefrontVisible are returned.
|
|
4915
|
+
"""
|
|
4916
|
+
metafields(
|
|
4917
|
+
"""
|
|
4918
|
+
Returns the elements in the list that come after the specified cursor.
|
|
4919
|
+
"""
|
|
4920
|
+
after: String
|
|
4921
|
+
|
|
4922
|
+
"""
|
|
4923
|
+
Returns the elements in the list that come before the specified cursor.
|
|
4924
|
+
"""
|
|
4925
|
+
before: String
|
|
4926
|
+
|
|
4927
|
+
"""
|
|
4928
|
+
Returns the first _n_ elements from the list.
|
|
4929
|
+
"""
|
|
4930
|
+
first: Int
|
|
4931
|
+
|
|
4932
|
+
"""
|
|
4933
|
+
Only the metafields named here (namespace + key). Applied on top of the storefront visibility gate, never around it.
|
|
4934
|
+
"""
|
|
4935
|
+
keys: [MetafieldKeyInput!]
|
|
4936
|
+
|
|
4937
|
+
"""
|
|
4938
|
+
Returns the last _n_ elements from the list.
|
|
4939
|
+
"""
|
|
4940
|
+
last: Int
|
|
4941
|
+
namespace: String
|
|
4942
|
+
): ShopMetafieldConnection!
|
|
4737
4943
|
publishedAt: ISO8601DateTime
|
|
4738
4944
|
|
|
4739
4945
|
"""
|
|
@@ -4865,6 +5071,45 @@ type ShopBlog implements Node {
|
|
|
4865
5071
|
handle: String!
|
|
4866
5072
|
id: ID!
|
|
4867
5073
|
|
|
5074
|
+
"""
|
|
5075
|
+
A metafield attached to this resource, looked up by namespace + key. On the
|
|
5076
|
+
storefront, resolves only when the definition opts in via storefrontVisible.
|
|
5077
|
+
"""
|
|
5078
|
+
metafield(key: String!, namespace: String!): ShopMetafield
|
|
5079
|
+
|
|
5080
|
+
"""
|
|
5081
|
+
Metafields attached to this resource. Optionally scoped by namespace, or to
|
|
5082
|
+
the named namespace + key pairs. On the storefront, only definitions that opt
|
|
5083
|
+
in via storefrontVisible are returned.
|
|
5084
|
+
"""
|
|
5085
|
+
metafields(
|
|
5086
|
+
"""
|
|
5087
|
+
Returns the elements in the list that come after the specified cursor.
|
|
5088
|
+
"""
|
|
5089
|
+
after: String
|
|
5090
|
+
|
|
5091
|
+
"""
|
|
5092
|
+
Returns the elements in the list that come before the specified cursor.
|
|
5093
|
+
"""
|
|
5094
|
+
before: String
|
|
5095
|
+
|
|
5096
|
+
"""
|
|
5097
|
+
Returns the first _n_ elements from the list.
|
|
5098
|
+
"""
|
|
5099
|
+
first: Int
|
|
5100
|
+
|
|
5101
|
+
"""
|
|
5102
|
+
Only the metafields named here (namespace + key). Applied on top of the storefront visibility gate, never around it.
|
|
5103
|
+
"""
|
|
5104
|
+
keys: [MetafieldKeyInput!]
|
|
5105
|
+
|
|
5106
|
+
"""
|
|
5107
|
+
Returns the last _n_ elements from the list.
|
|
5108
|
+
"""
|
|
5109
|
+
last: Int
|
|
5110
|
+
namespace: String
|
|
5111
|
+
): ShopMetafieldConnection!
|
|
5112
|
+
|
|
4868
5113
|
"""
|
|
4869
5114
|
Distinct article tags in this blog (public_visible on storefront), ordered alphabetically — for tag navigation.
|
|
4870
5115
|
"""
|
|
@@ -5150,7 +5395,8 @@ type ShopCheckout implements Node {
|
|
|
5150
5395
|
createdAt: ISO8601DateTime!
|
|
5151
5396
|
|
|
5152
5397
|
"""
|
|
5153
|
-
The checkout's customer.
|
|
5398
|
+
The checkout's customer. Null for a storefront caller without that customer's
|
|
5399
|
+
session, and for a merchant caller who may not read customers.
|
|
5154
5400
|
"""
|
|
5155
5401
|
customer: ShopCustomer
|
|
5156
5402
|
|
|
@@ -5173,6 +5419,12 @@ type ShopCheckout implements Node {
|
|
|
5173
5419
|
discountApplications: [ShopDiscountApplication!]!
|
|
5174
5420
|
email: String
|
|
5175
5421
|
|
|
5422
|
+
"""
|
|
5423
|
+
True when a line sells a downloadable file: the download email is how the
|
|
5424
|
+
buyer gets it, so a phone alone will not complete the checkout.
|
|
5425
|
+
"""
|
|
5426
|
+
emailRequired: Boolean!
|
|
5427
|
+
|
|
5176
5428
|
"""
|
|
5177
5429
|
The normalized code the buyer most recently typed on this checkout, regardless
|
|
5178
5430
|
of whether it ended up being applied. Use this to re-render the cart UI's code
|
|
@@ -5387,6 +5639,45 @@ type ShopCollection implements Node {
|
|
|
5387
5639
|
"""
|
|
5388
5640
|
image: FileInterface
|
|
5389
5641
|
|
|
5642
|
+
"""
|
|
5643
|
+
A metafield attached to this resource, looked up by namespace + key. On the
|
|
5644
|
+
storefront, resolves only when the definition opts in via storefrontVisible.
|
|
5645
|
+
"""
|
|
5646
|
+
metafield(key: String!, namespace: String!): ShopMetafield
|
|
5647
|
+
|
|
5648
|
+
"""
|
|
5649
|
+
Metafields attached to this resource. Optionally scoped by namespace, or to
|
|
5650
|
+
the named namespace + key pairs. On the storefront, only definitions that opt
|
|
5651
|
+
in via storefrontVisible are returned.
|
|
5652
|
+
"""
|
|
5653
|
+
metafields(
|
|
5654
|
+
"""
|
|
5655
|
+
Returns the elements in the list that come after the specified cursor.
|
|
5656
|
+
"""
|
|
5657
|
+
after: String
|
|
5658
|
+
|
|
5659
|
+
"""
|
|
5660
|
+
Returns the elements in the list that come before the specified cursor.
|
|
5661
|
+
"""
|
|
5662
|
+
before: String
|
|
5663
|
+
|
|
5664
|
+
"""
|
|
5665
|
+
Returns the first _n_ elements from the list.
|
|
5666
|
+
"""
|
|
5667
|
+
first: Int
|
|
5668
|
+
|
|
5669
|
+
"""
|
|
5670
|
+
Only the metafields named here (namespace + key). Applied on top of the storefront visibility gate, never around it.
|
|
5671
|
+
"""
|
|
5672
|
+
keys: [MetafieldKeyInput!]
|
|
5673
|
+
|
|
5674
|
+
"""
|
|
5675
|
+
Returns the last _n_ elements from the list.
|
|
5676
|
+
"""
|
|
5677
|
+
last: Int
|
|
5678
|
+
namespace: String
|
|
5679
|
+
): ShopMetafieldConnection!
|
|
5680
|
+
|
|
5390
5681
|
"""
|
|
5391
5682
|
Min/max default-variant price across the unfiltered collection listing, for
|
|
5392
5683
|
seeding the price-filter slider bounds. Unfiltered so the bounds stay stable
|
|
@@ -6892,6 +7183,14 @@ type ShopOrder implements Node {
|
|
|
6892
7183
|
Total line-item discount allocated at completion.
|
|
6893
7184
|
"""
|
|
6894
7185
|
discountAmount: Money!
|
|
7186
|
+
|
|
7187
|
+
"""
|
|
7188
|
+
True while the downloads are not ready yet: the order is paid and they are
|
|
7189
|
+
still being issued, or the store holds one for release. Same rule as
|
|
7190
|
+
`ShopOrderTrackingView.downloadsAwaitingRelease`. False to anyone but the
|
|
7191
|
+
signed-in customer who placed the order.
|
|
7192
|
+
"""
|
|
7193
|
+
downloadsAwaitingRelease: Boolean!
|
|
6895
7194
|
email: String
|
|
6896
7195
|
financialStatus: ShopOrderFinancialStatusEnum!
|
|
6897
7196
|
|
|
@@ -6904,6 +7203,13 @@ type ShopOrder implements Node {
|
|
|
6904
7203
|
"""
|
|
6905
7204
|
fiscalReceipt: ShopFiscalReceipt
|
|
6906
7205
|
fulfillmentStatus: ShopOrderFulfillmentStatusEnum!
|
|
7206
|
+
|
|
7207
|
+
"""
|
|
7208
|
+
True when a line sold a digital file and the order is paid, not cancelled and
|
|
7209
|
+
not refunded in full: there are downloads to ask for. False to anyone but the
|
|
7210
|
+
signed-in customer who placed the order, like the lines' `downloads`.
|
|
7211
|
+
"""
|
|
7212
|
+
hasDownloads: Boolean!
|
|
6907
7213
|
id: ID!
|
|
6908
7214
|
|
|
6909
7215
|
"""
|
|
@@ -7053,6 +7359,12 @@ type ShopOrderLineItem implements Node {
|
|
|
7053
7359
|
"""
|
|
7054
7360
|
customAttributes: [CartLineAttribute!]!
|
|
7055
7361
|
|
|
7362
|
+
"""
|
|
7363
|
+
The files this line bought, issued once the order was paid. Empty on a line
|
|
7364
|
+
that sold none, and to anyone but the signed-in customer who placed the order.
|
|
7365
|
+
"""
|
|
7366
|
+
downloads: [DownloadGrant!]!
|
|
7367
|
+
|
|
7056
7368
|
"""
|
|
7057
7369
|
True when this line sold a digital gift-card product (auto-issued a card once paid).
|
|
7058
7370
|
"""
|
|
@@ -7147,6 +7459,14 @@ type ShopOrderTrackingView {
|
|
|
7147
7459
|
"""
|
|
7148
7460
|
deliveryKind: ShopOrderTrackingViewDeliveryKindEnum!
|
|
7149
7461
|
deliveryOptionTitle: String
|
|
7462
|
+
|
|
7463
|
+
"""
|
|
7464
|
+
True while the downloads are not ready yet: the order is paid and they are
|
|
7465
|
+
still being issued, or the store holds one for release. An all-digital order
|
|
7466
|
+
reads fulfilled from completion, so show "being prepared" instead of links
|
|
7467
|
+
while this is true. False on a link an embedded app minted.
|
|
7468
|
+
"""
|
|
7469
|
+
downloadsAwaitingRelease: Boolean!
|
|
7150
7470
|
financialStatus: ShopOrderFinancialStatusEnum!
|
|
7151
7471
|
fulfillmentStatus: ShopOrderFulfillmentStatusEnum!
|
|
7152
7472
|
|
|
@@ -7216,6 +7536,12 @@ type ShopOrderTrackingViewLineItem {
|
|
|
7216
7536
|
"""
|
|
7217
7537
|
customAttributes: [CartLineAttribute!]!
|
|
7218
7538
|
|
|
7539
|
+
"""
|
|
7540
|
+
The files this line bought, issued once the order was paid. Empty on a line
|
|
7541
|
+
that sold none, and on a link an embedded app minted.
|
|
7542
|
+
"""
|
|
7543
|
+
downloads: [DownloadGrant!]!
|
|
7544
|
+
|
|
7219
7545
|
"""
|
|
7220
7546
|
The bundle this line is a component of; null on a plain line.
|
|
7221
7547
|
"""
|
|
@@ -7281,6 +7607,45 @@ type ShopPage implements Node {
|
|
|
7281
7607
|
True if status is published AND published_at is null or past.
|
|
7282
7608
|
"""
|
|
7283
7609
|
isPublished: Boolean!
|
|
7610
|
+
|
|
7611
|
+
"""
|
|
7612
|
+
A metafield attached to this resource, looked up by namespace + key. On the
|
|
7613
|
+
storefront, resolves only when the definition opts in via storefrontVisible.
|
|
7614
|
+
"""
|
|
7615
|
+
metafield(key: String!, namespace: String!): ShopMetafield
|
|
7616
|
+
|
|
7617
|
+
"""
|
|
7618
|
+
Metafields attached to this resource. Optionally scoped by namespace, or to
|
|
7619
|
+
the named namespace + key pairs. On the storefront, only definitions that opt
|
|
7620
|
+
in via storefrontVisible are returned.
|
|
7621
|
+
"""
|
|
7622
|
+
metafields(
|
|
7623
|
+
"""
|
|
7624
|
+
Returns the elements in the list that come after the specified cursor.
|
|
7625
|
+
"""
|
|
7626
|
+
after: String
|
|
7627
|
+
|
|
7628
|
+
"""
|
|
7629
|
+
Returns the elements in the list that come before the specified cursor.
|
|
7630
|
+
"""
|
|
7631
|
+
before: String
|
|
7632
|
+
|
|
7633
|
+
"""
|
|
7634
|
+
Returns the first _n_ elements from the list.
|
|
7635
|
+
"""
|
|
7636
|
+
first: Int
|
|
7637
|
+
|
|
7638
|
+
"""
|
|
7639
|
+
Only the metafields named here (namespace + key). Applied on top of the storefront visibility gate, never around it.
|
|
7640
|
+
"""
|
|
7641
|
+
keys: [MetafieldKeyInput!]
|
|
7642
|
+
|
|
7643
|
+
"""
|
|
7644
|
+
Returns the last _n_ elements from the list.
|
|
7645
|
+
"""
|
|
7646
|
+
last: Int
|
|
7647
|
+
namespace: String
|
|
7648
|
+
): ShopMetafieldConnection!
|
|
7284
7649
|
publishedAt: ISO8601DateTime
|
|
7285
7650
|
|
|
7286
7651
|
"""
|
|
@@ -7626,14 +7991,15 @@ type ShopProduct implements Node {
|
|
|
7626
7991
|
): FileInterfaceConnection!
|
|
7627
7992
|
|
|
7628
7993
|
"""
|
|
7629
|
-
A metafield attached to this
|
|
7994
|
+
A metafield attached to this resource, looked up by namespace + key. On the
|
|
7630
7995
|
storefront, resolves only when the definition opts in via storefrontVisible.
|
|
7631
7996
|
"""
|
|
7632
7997
|
metafield(key: String!, namespace: String!): ShopMetafield
|
|
7633
7998
|
|
|
7634
7999
|
"""
|
|
7635
|
-
Metafields attached to this
|
|
7636
|
-
storefront, only definitions that opt
|
|
8000
|
+
Metafields attached to this resource. Optionally scoped by namespace, or to
|
|
8001
|
+
the named namespace + key pairs. On the storefront, only definitions that opt
|
|
8002
|
+
in via storefrontVisible are returned.
|
|
7637
8003
|
"""
|
|
7638
8004
|
metafields(
|
|
7639
8005
|
"""
|
|
@@ -7651,6 +8017,11 @@ type ShopProduct implements Node {
|
|
|
7651
8017
|
"""
|
|
7652
8018
|
first: Int
|
|
7653
8019
|
|
|
8020
|
+
"""
|
|
8021
|
+
Only the metafields named here (namespace + key). Applied on top of the storefront visibility gate, never around it.
|
|
8022
|
+
"""
|
|
8023
|
+
keys: [MetafieldKeyInput!]
|
|
8024
|
+
|
|
7654
8025
|
"""
|
|
7655
8026
|
Returns the last _n_ elements from the list.
|
|
7656
8027
|
"""
|
|
@@ -7664,12 +8035,9 @@ type ShopProduct implements Node {
|
|
|
7664
8035
|
options: [ShopProductOption!]!
|
|
7665
8036
|
|
|
7666
8037
|
"""
|
|
7667
|
-
|
|
8038
|
+
Lowest and highest variant price. Null only for a product with no variants.
|
|
7668
8039
|
"""
|
|
7669
|
-
|
|
7670
|
-
@deprecated(
|
|
7671
|
-
reason: "Use `defaultVariant.priceV2` (returns Money for precise decimal arithmetic). The Float-typed `price` will be removed in a future release."
|
|
7672
|
-
)
|
|
8040
|
+
priceRange(currency: CurrencyEnum! = MNT): ShopProductPriceRange
|
|
7673
8041
|
|
|
7674
8042
|
"""
|
|
7675
8043
|
Product classification (display-faithful, free text).
|
|
@@ -7873,6 +8241,21 @@ type ShopProductOptionValue implements Node {
|
|
|
7873
8241
|
position: Int!
|
|
7874
8242
|
}
|
|
7875
8243
|
|
|
8244
|
+
"""
|
|
8245
|
+
The lowest and highest price across a product's variants.
|
|
8246
|
+
"""
|
|
8247
|
+
type ShopProductPriceRange {
|
|
8248
|
+
"""
|
|
8249
|
+
The highest variant price.
|
|
8250
|
+
"""
|
|
8251
|
+
maxVariantPrice: Money!
|
|
8252
|
+
|
|
8253
|
+
"""
|
|
8254
|
+
The lowest variant price.
|
|
8255
|
+
"""
|
|
8256
|
+
minVariantPrice: Money!
|
|
8257
|
+
}
|
|
8258
|
+
|
|
7876
8259
|
"""
|
|
7877
8260
|
A customer review on a product.
|
|
7878
8261
|
"""
|
|
@@ -8208,15 +8591,11 @@ type ShopProductVariant implements Node {
|
|
|
8208
8591
|
On a bundle variant, the component variants one bundle contains. Empty on every other variant.
|
|
8209
8592
|
"""
|
|
8210
8593
|
bundleItems: [ShopProductVariantBundleItem!]!
|
|
8211
|
-
compareAt(currency: CurrencyEnum = MNT): Float!
|
|
8212
|
-
@deprecated(
|
|
8213
|
-
reason: "Use `compareAtV2` (returns Money; null when no sale price). The Float-typed `compareAt` will be removed in a future release."
|
|
8214
|
-
)
|
|
8215
8594
|
|
|
8216
8595
|
"""
|
|
8217
8596
|
Variant compare-at (original) price as a Money value. Null when there is no sale price.
|
|
8218
8597
|
"""
|
|
8219
|
-
compareAtV2(currency: CurrencyEnum = MNT): Money
|
|
8598
|
+
compareAtV2(currency: CurrencyEnum! = MNT): Money
|
|
8220
8599
|
createdAt: ISO8601DateTime!
|
|
8221
8600
|
currency: String!
|
|
8222
8601
|
|
|
@@ -8256,16 +8635,51 @@ type ShopProductVariant implements Node {
|
|
|
8256
8635
|
"""
|
|
8257
8636
|
last: Int
|
|
8258
8637
|
): FileInterfaceConnection!
|
|
8638
|
+
|
|
8639
|
+
"""
|
|
8640
|
+
A metafield attached to this resource, looked up by namespace + key. On the
|
|
8641
|
+
storefront, resolves only when the definition opts in via storefrontVisible.
|
|
8642
|
+
"""
|
|
8643
|
+
metafield(key: String!, namespace: String!): ShopMetafield
|
|
8644
|
+
|
|
8645
|
+
"""
|
|
8646
|
+
Metafields attached to this resource. Optionally scoped by namespace, or to
|
|
8647
|
+
the named namespace + key pairs. On the storefront, only definitions that opt
|
|
8648
|
+
in via storefrontVisible are returned.
|
|
8649
|
+
"""
|
|
8650
|
+
metafields(
|
|
8651
|
+
"""
|
|
8652
|
+
Returns the elements in the list that come after the specified cursor.
|
|
8653
|
+
"""
|
|
8654
|
+
after: String
|
|
8655
|
+
|
|
8656
|
+
"""
|
|
8657
|
+
Returns the elements in the list that come before the specified cursor.
|
|
8658
|
+
"""
|
|
8659
|
+
before: String
|
|
8660
|
+
|
|
8661
|
+
"""
|
|
8662
|
+
Returns the first _n_ elements from the list.
|
|
8663
|
+
"""
|
|
8664
|
+
first: Int
|
|
8665
|
+
|
|
8666
|
+
"""
|
|
8667
|
+
Only the metafields named here (namespace + key). Applied on top of the storefront visibility gate, never around it.
|
|
8668
|
+
"""
|
|
8669
|
+
keys: [MetafieldKeyInput!]
|
|
8670
|
+
|
|
8671
|
+
"""
|
|
8672
|
+
Returns the last _n_ elements from the list.
|
|
8673
|
+
"""
|
|
8674
|
+
last: Int
|
|
8675
|
+
namespace: String
|
|
8676
|
+
): ShopMetafieldConnection!
|
|
8259
8677
|
position: Int!
|
|
8260
|
-
price(currency: CurrencyEnum = MNT): Float!
|
|
8261
|
-
@deprecated(
|
|
8262
|
-
reason: "Use `priceV2` (returns Money for precise decimal arithmetic). The Float-typed `price` will be removed in a future release."
|
|
8263
|
-
)
|
|
8264
8678
|
|
|
8265
8679
|
"""
|
|
8266
8680
|
Variant price as a Money value (Decimal amount + currency).
|
|
8267
8681
|
"""
|
|
8268
|
-
priceV2(currency: CurrencyEnum = MNT): Money!
|
|
8682
|
+
priceV2(currency: CurrencyEnum! = MNT): Money!
|
|
8269
8683
|
|
|
8270
8684
|
"""
|
|
8271
8685
|
The product this variant belongs to.
|
|
@@ -9170,7 +9584,7 @@ type Theme implements Node {
|
|
|
9170
9584
|
metadata: JSON!
|
|
9171
9585
|
name: String!
|
|
9172
9586
|
presets: [ThemePreset!]!
|
|
9173
|
-
price(currency: CurrencyEnum = MNT): Float!
|
|
9587
|
+
price(currency: CurrencyEnum! = MNT): Float!
|
|
9174
9588
|
status: ThemeStatusEnum!
|
|
9175
9589
|
updatedAt: ISO8601DateTime!
|
|
9176
9590
|
}
|
package/dist/search.d.ts
CHANGED
|
@@ -37,6 +37,9 @@ type FetchProductSearchPageInput = {
|
|
|
37
37
|
includeOptions?: boolean;
|
|
38
38
|
includeVariants?: boolean;
|
|
39
39
|
locale?: string;
|
|
40
|
+
/** Storefront-visible metafields (`"namespace.key"`) each card carries, for
|
|
41
|
+
* the `closest_product_metafield` sources bound on it. Omitted ⇒ none. */
|
|
42
|
+
metafieldKeys?: readonly string[];
|
|
40
43
|
};
|
|
41
44
|
/** Server-driven /search page. Returns `null` for blank query (caller
|
|
42
45
|
* route renders the empty-prompt UI) or on GraphQL error. Uncached because
|
package/dist/search.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { graphql, request } from "./graphql.js";
|
|
2
2
|
import { toFileInfo } from "./files.js";
|
|
3
|
+
import { metafieldKeysVariables } from "./product.js";
|
|
3
4
|
import { CollectionImageFragment, CollectionProductNodeFragment, toCollectionProduct, toPriceBounds, variantsVariable } from "./collection.js";
|
|
4
5
|
//#region src/search.ts
|
|
5
6
|
const SEARCH_PAGE_SIZE = 24;
|
|
@@ -10,6 +11,9 @@ const FetchProductSearchPageQuery = graphql(`
|
|
|
10
11
|
$mediaFirst: Int!
|
|
11
12
|
$includeOptions: Boolean!
|
|
12
13
|
$includeVariants: Boolean = false
|
|
14
|
+
$withMetafields: Boolean = false
|
|
15
|
+
$metafieldFirst: Int = 0
|
|
16
|
+
$metafieldKeys: [MetafieldKeyInput!] = []
|
|
13
17
|
$after: String
|
|
14
18
|
$filter: CollectionProductFilterInput
|
|
15
19
|
$sort: ProductSearchSortEnum
|
|
@@ -81,6 +85,7 @@ const fetchProductSearchPage = async (data) => {
|
|
|
81
85
|
mediaFirst,
|
|
82
86
|
includeOptions,
|
|
83
87
|
...variantsVariable(data.includeVariants),
|
|
88
|
+
...metafieldKeysVariables(data.metafieldKeys),
|
|
84
89
|
after: after ?? null,
|
|
85
90
|
filter: filter ?? null,
|
|
86
91
|
sort: sort ?? null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shop-on/theme-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"license": "SEE LICENSE IN dist/LICENSE.md",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"graphql": "17.0.2",
|
|
60
60
|
"graphql-request": "7.4.0",
|
|
61
61
|
"liquidjs": "10.30.0",
|
|
62
|
-
"@shop-on/customer-runtime": "0.
|
|
63
|
-
"@shop-on/theme-runtime": "0.
|
|
62
|
+
"@shop-on/customer-runtime": "0.6.0",
|
|
63
|
+
"@shop-on/theme-runtime": "0.6.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@tanstack/react-start": "1.169.3",
|