Skip to content

Commit 8bcfd4c

Browse files
committed
Update API version for discounts & cart-transform templates
1 parent 68e0ba7 commit 8bcfd4c

File tree

22 files changed

+283
-158
lines changed

22 files changed

+283
-158
lines changed

checkout/javascript/cart-transform/default/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
api_version = "2023-10"
1+
api_version = "2024-01"
22

33
[[extensions]]
44
handle = "{{handle}}"

discounts/javascript/order-discounts/default/schema.graphql

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ schema {
44
}
55

66
"""
7-
Exactly one field of input must be provided, and all others omitted.
7+
Requires that exactly one field must be supplied and that field must not be `null`.
88
"""
99
directive @oneOf on INPUT_OBJECT
1010

@@ -175,7 +175,7 @@ type CartDeliveryOption {
175175
"""
176176
The unique identifier of the delivery option.
177177
"""
178-
handle: String!
178+
handle: Handle!
179179

180180
"""
181181
The title of the delivery option.
@@ -1528,7 +1528,7 @@ enum CountryCode {
15281528
TO
15291529

15301530
"""
1531-
Turkey.
1531+
Türkiye.
15321532
"""
15331533
TR
15341534

@@ -2520,6 +2520,11 @@ type Customer implements HasMetafields {
25202520
"""
25212521
email: String
25222522

2523+
"""
2524+
The customer's first name.
2525+
"""
2526+
firstName: String
2527+
25232528
"""
25242529
Whether the customer has any of the given tags.
25252530
"""
@@ -2545,6 +2550,11 @@ type Customer implements HasMetafields {
25452550
"""
25462551
id: ID!
25472552

2553+
"""
2554+
The customer's last name.
2555+
"""
2556+
lastName: String
2557+
25482558
"""
25492559
Returns a metafield by namespace and key that belongs to the resource.
25502560
"""
@@ -2737,7 +2747,7 @@ input FixedAmount {
27372747
}
27382748

27392749
"""
2740-
The result of the function. This type is deprecated in favor of `FunctionRunResult`.
2750+
The result of the function. In API versions 2023-10 and beyond, this type is deprecated in favor of `FunctionRunResult`.
27412751
"""
27422752
input FunctionResult {
27432753
"""
@@ -2766,6 +2776,13 @@ input FunctionRunResult {
27662776
discounts: [Discount!]!
27672777
}
27682778

2779+
"""
2780+
A function-scoped handle to a refer a resource.
2781+
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
2782+
Example value: `"10079785100"`
2783+
"""
2784+
scalar Handle
2785+
27692786
"""
27702787
Represents information about the metafields associated to the specified resource.
27712788
"""
@@ -3726,7 +3743,7 @@ type Market implements HasMetafields {
37263743
"""
37273744
A human-readable unique string for the market automatically generated from its title.
37283745
"""
3729-
handle: String!
3746+
handle: Handle!
37303747

37313748
"""
37323749
A globally-unique identifier.
@@ -3896,7 +3913,7 @@ type Product implements HasMetafields {
38963913
"""
38973914
A unique human-friendly string of the product's title.
38983915
"""
3899-
handle: String!
3916+
handle: Handle!
39003917

39013918
"""
39023919
Whether the product has any of the given tags.

discounts/javascript/order-discounts/default/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
api_version = "2023-10"
1+
api_version = "2024-01"
22

33
[[extensions]]
44
handle = "{{handle}}"

discounts/javascript/product-discounts/default/schema.graphql

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ schema {
44
}
55

66
"""
7-
Exactly one field of input must be provided, and all others omitted.
7+
Requires that exactly one field must be supplied and that field must not be `null`.
88
"""
99
directive @oneOf on INPUT_OBJECT
1010

@@ -175,7 +175,7 @@ type CartDeliveryOption {
175175
"""
176176
The unique identifier of the delivery option.
177177
"""
178-
handle: String!
178+
handle: Handle!
179179

180180
"""
181181
The title of the delivery option.
@@ -1508,7 +1508,7 @@ enum CountryCode {
15081508
TO
15091509

15101510
"""
1511-
Turkey.
1511+
Türkiye.
15121512
"""
15131513
TR
15141514

@@ -2390,7 +2390,7 @@ enum CurrencyCode {
23902390
VEF @deprecated(reason: "`VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead.")
23912391

23922392
"""
2393-
Venezuelan Bolivares (VES).
2393+
Venezuelan Bolivares Soberanos (VES).
23942394
"""
23952395
VES
23962396

@@ -2500,6 +2500,11 @@ type Customer implements HasMetafields {
25002500
"""
25012501
email: String
25022502

2503+
"""
2504+
The customer's first name.
2505+
"""
2506+
firstName: String
2507+
25032508
"""
25042509
Whether the customer has any of the given tags.
25052510
"""
@@ -2525,6 +2530,11 @@ type Customer implements HasMetafields {
25252530
"""
25262531
id: ID!
25272532

2533+
"""
2534+
The customer's last name.
2535+
"""
2536+
lastName: String
2537+
25282538
"""
25292539
Returns a metafield by namespace and key that belongs to the resource.
25302540
"""
@@ -2665,6 +2675,11 @@ input Discount {
26652675
The strategy that's applied to the list of discounts.
26662676
"""
26672677
enum DiscountApplicationStrategy {
2678+
"""
2679+
Apply all discounts with conditions that are satisfied.
2680+
"""
2681+
ALL
2682+
26682683
"""
26692684
Only apply the first discount with conditions that are satisfied.
26702685
"""
@@ -2717,7 +2732,7 @@ input FixedAmount {
27172732
}
27182733

27192734
"""
2720-
The result of the function. This type is deprecated in favor of `FunctionRunResult`.
2735+
The result of the function. In API versions 2023-10 and beyond, this type is deprecated in favor of `FunctionRunResult`.
27212736
"""
27222737
input FunctionResult {
27232738
"""
@@ -2746,6 +2761,13 @@ input FunctionRunResult {
27462761
discounts: [Discount!]!
27472762
}
27482763

2764+
"""
2765+
A function-scoped handle to a refer a resource.
2766+
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
2767+
Example value: `"10079785100"`
2768+
"""
2769+
scalar Handle
2770+
27492771
"""
27502772
Represents information about the metafields associated to the specified resource.
27512773
"""
@@ -3706,7 +3728,7 @@ type Market implements HasMetafields {
37063728
"""
37073729
A human-readable unique string for the market automatically generated from its title.
37083730
"""
3709-
handle: String!
3731+
handle: Handle!
37103732

37113733
"""
37123734
A globally-unique identifier.
@@ -3844,7 +3866,7 @@ type Product implements HasMetafields {
38443866
"""
38453867
A unique human-friendly string of the product's title.
38463868
"""
3847-
handle: String!
3869+
handle: Handle!
38483870

38493871
"""
38503872
Whether the product has any of the given tags.

discounts/javascript/product-discounts/default/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
api_version = "2023-10"
1+
api_version = "2024-01"
22

33
[[extensions]]
44
handle = "{{handle}}"

discounts/javascript/shipping-discounts/default/schema.graphql

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ schema {
44
}
55

66
"""
7-
Exactly one field of input must be provided, and all others omitted.
7+
Requires that exactly one field must be supplied and that field must not be `null`.
88
"""
99
directive @oneOf on INPUT_OBJECT
1010

@@ -175,7 +175,7 @@ type CartDeliveryOption {
175175
"""
176176
The unique identifier of the delivery option.
177177
"""
178-
handle: String!
178+
handle: Handle!
179179

180180
"""
181181
The title of the delivery option.
@@ -1508,7 +1508,7 @@ enum CountryCode {
15081508
TO
15091509

15101510
"""
1511-
Turkey.
1511+
Türkiye.
15121512
"""
15131513
TR
15141514

@@ -2500,6 +2500,11 @@ type Customer implements HasMetafields {
25002500
"""
25012501
email: String
25022502

2503+
"""
2504+
The customer's first name.
2505+
"""
2506+
firstName: String
2507+
25032508
"""
25042509
Whether the customer has any of the given tags.
25052510
"""
@@ -2525,6 +2530,11 @@ type Customer implements HasMetafields {
25252530
"""
25262531
id: ID!
25272532

2533+
"""
2534+
The customer's last name.
2535+
"""
2536+
lastName: String
2537+
25282538
"""
25292539
Returns a metafield by namespace and key that belongs to the resource.
25302540
"""
@@ -2651,6 +2661,16 @@ enum DeliveryMethod {
26512661
SHIPPING
26522662
}
26532663

2664+
"""
2665+
The target delivery option.
2666+
"""
2667+
input DeliveryOptionTarget {
2668+
"""
2669+
The handle of the target delivery option.
2670+
"""
2671+
handle: Handle!
2672+
}
2673+
26542674
"""
26552675
The discount to be applied.
26562676
"""
@@ -2671,21 +2691,6 @@ input Discount {
26712691
value: Value!
26722692
}
26732693

2674-
"""
2675-
The strategy that's applied to the list of discounts.
2676-
"""
2677-
enum DiscountApplicationStrategy {
2678-
"""
2679-
Only apply the first discount with conditions that are satisfied.
2680-
"""
2681-
FIRST
2682-
2683-
"""
2684-
Only apply the discount that offers the maximum reduction.
2685-
"""
2686-
MAXIMUM
2687-
}
2688-
26892694
"""
26902695
A discount wrapper node.
26912696
"""
@@ -2719,14 +2724,9 @@ input FixedAmount {
27192724
}
27202725

27212726
"""
2722-
The result of the function. This type is deprecated in favor of `FunctionRunResult`.
2727+
The result of the function. In API versions 2023-10 and beyond, this type is deprecated in favor of `FunctionRunResult`.
27232728
"""
27242729
input FunctionResult {
2725-
"""
2726-
The strategy to apply the list of discounts.
2727-
"""
2728-
discountApplicationStrategy: DiscountApplicationStrategy!
2729-
27302730
"""
27312731
The list of discounts to be applied.
27322732
"""
@@ -2737,17 +2737,19 @@ input FunctionResult {
27372737
The result of the function.
27382738
"""
27392739
input FunctionRunResult {
2740-
"""
2741-
The strategy to apply the list of discounts.
2742-
"""
2743-
discountApplicationStrategy: DiscountApplicationStrategy!
2744-
27452740
"""
27462741
The list of discounts to be applied.
27472742
"""
27482743
discounts: [Discount!]!
27492744
}
27502745

2746+
"""
2747+
A function-scoped handle to a refer a resource.
2748+
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
2749+
Example value: `"10079785100"`
2750+
"""
2751+
scalar Handle
2752+
27512753
"""
27522754
Represents information about the metafields associated to the specified resource.
27532755
"""
@@ -3708,7 +3710,7 @@ type Market implements HasMetafields {
37083710
"""
37093711
A human-readable unique string for the market automatically generated from its title.
37103712
"""
3711-
handle: String!
3713+
handle: Handle!
37123714

37133715
"""
37143716
A globally-unique identifier.
@@ -3846,7 +3848,7 @@ type Product implements HasMetafields {
38463848
"""
38473849
A unique human-friendly string of the product's title.
38483850
"""
3849-
handle: String!
3851+
handle: Handle!
38503852

38513853
"""
38523854
Whether the product has any of the given tags.
@@ -4105,6 +4107,11 @@ input Target @oneOf {
41054107
The target delivery group.
41064108
"""
41074109
deliveryGroup: DeliveryGroupTarget
4110+
4111+
"""
4112+
The target delivery option.
4113+
"""
4114+
deliveryOption: DeliveryOptionTarget
41084115
}
41094116

41104117
"""

discounts/javascript/shipping-discounts/default/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
api_version = "2023-10"
1+
api_version = "2024-01"
22

33
[[extensions]]
44
handle = "{{handle}}"

0 commit comments

Comments
 (0)