Skip to content

Commit

Permalink
Update API version for discounts & cart-transform templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jharlap committed Jan 9, 2024
1 parent 68e0ba7 commit 8bcfd4c
Show file tree
Hide file tree
Showing 22 changed files with 283 additions and 158 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
api_version = "2023-10"
api_version = "2024-01"

[[extensions]]
handle = "{{handle}}"
Expand Down
29 changes: 23 additions & 6 deletions discounts/javascript/order-discounts/default/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schema {
}

"""
Exactly one field of input must be provided, and all others omitted.
Requires that exactly one field must be supplied and that field must not be `null`.
"""
directive @oneOf on INPUT_OBJECT

Expand Down Expand Up @@ -175,7 +175,7 @@ type CartDeliveryOption {
"""
The unique identifier of the delivery option.
"""
handle: String!
handle: Handle!

"""
The title of the delivery option.
Expand Down Expand Up @@ -1528,7 +1528,7 @@ enum CountryCode {
TO

"""
Turkey.
Türkiye.
"""
TR

Expand Down Expand Up @@ -2520,6 +2520,11 @@ type Customer implements HasMetafields {
"""
email: String

"""
The customer's first name.
"""
firstName: String

"""
Whether the customer has any of the given tags.
"""
Expand All @@ -2545,6 +2550,11 @@ type Customer implements HasMetafields {
"""
id: ID!

"""
The customer's last name.
"""
lastName: String

"""
Returns a metafield by namespace and key that belongs to the resource.
"""
Expand Down Expand Up @@ -2737,7 +2747,7 @@ input FixedAmount {
}

"""
The result of the function. This type is deprecated in favor of `FunctionRunResult`.
The result of the function. In API versions 2023-10 and beyond, this type is deprecated in favor of `FunctionRunResult`.
"""
input FunctionResult {
"""
Expand Down Expand Up @@ -2766,6 +2776,13 @@ input FunctionRunResult {
discounts: [Discount!]!
}

"""
A function-scoped handle to a refer a resource.
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
Example value: `"10079785100"`
"""
scalar Handle

"""
Represents information about the metafields associated to the specified resource.
"""
Expand Down Expand Up @@ -3726,7 +3743,7 @@ type Market implements HasMetafields {
"""
A human-readable unique string for the market automatically generated from its title.
"""
handle: String!
handle: Handle!

"""
A globally-unique identifier.
Expand Down Expand Up @@ -3896,7 +3913,7 @@ type Product implements HasMetafields {
"""
A unique human-friendly string of the product's title.
"""
handle: String!
handle: Handle!

"""
Whether the product has any of the given tags.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
api_version = "2023-10"
api_version = "2024-01"

[[extensions]]
handle = "{{handle}}"
Expand Down
36 changes: 29 additions & 7 deletions discounts/javascript/product-discounts/default/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schema {
}

"""
Exactly one field of input must be provided, and all others omitted.
Requires that exactly one field must be supplied and that field must not be `null`.
"""
directive @oneOf on INPUT_OBJECT

Expand Down Expand Up @@ -175,7 +175,7 @@ type CartDeliveryOption {
"""
The unique identifier of the delivery option.
"""
handle: String!
handle: Handle!

"""
The title of the delivery option.
Expand Down Expand Up @@ -1508,7 +1508,7 @@ enum CountryCode {
TO

"""
Turkey.
Türkiye.
"""
TR

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

"""
Venezuelan Bolivares (VES).
Venezuelan Bolivares Soberanos (VES).
"""
VES

Expand Down Expand Up @@ -2500,6 +2500,11 @@ type Customer implements HasMetafields {
"""
email: String

"""
The customer's first name.
"""
firstName: String

"""
Whether the customer has any of the given tags.
"""
Expand All @@ -2525,6 +2530,11 @@ type Customer implements HasMetafields {
"""
id: ID!

"""
The customer's last name.
"""
lastName: String

"""
Returns a metafield by namespace and key that belongs to the resource.
"""
Expand Down Expand Up @@ -2665,6 +2675,11 @@ input Discount {
The strategy that's applied to the list of discounts.
"""
enum DiscountApplicationStrategy {
"""
Apply all discounts with conditions that are satisfied.
"""
ALL

"""
Only apply the first discount with conditions that are satisfied.
"""
Expand Down Expand Up @@ -2717,7 +2732,7 @@ input FixedAmount {
}

"""
The result of the function. This type is deprecated in favor of `FunctionRunResult`.
The result of the function. In API versions 2023-10 and beyond, this type is deprecated in favor of `FunctionRunResult`.
"""
input FunctionResult {
"""
Expand Down Expand Up @@ -2746,6 +2761,13 @@ input FunctionRunResult {
discounts: [Discount!]!
}

"""
A function-scoped handle to a refer a resource.
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
Example value: `"10079785100"`
"""
scalar Handle

"""
Represents information about the metafields associated to the specified resource.
"""
Expand Down Expand Up @@ -3706,7 +3728,7 @@ type Market implements HasMetafields {
"""
A human-readable unique string for the market automatically generated from its title.
"""
handle: String!
handle: Handle!

"""
A globally-unique identifier.
Expand Down Expand Up @@ -3844,7 +3866,7 @@ type Product implements HasMetafields {
"""
A unique human-friendly string of the product's title.
"""
handle: String!
handle: Handle!

"""
Whether the product has any of the given tags.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
api_version = "2023-10"
api_version = "2024-01"

[[extensions]]
handle = "{{handle}}"
Expand Down
69 changes: 38 additions & 31 deletions discounts/javascript/shipping-discounts/default/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schema {
}

"""
Exactly one field of input must be provided, and all others omitted.
Requires that exactly one field must be supplied and that field must not be `null`.
"""
directive @oneOf on INPUT_OBJECT

Expand Down Expand Up @@ -175,7 +175,7 @@ type CartDeliveryOption {
"""
The unique identifier of the delivery option.
"""
handle: String!
handle: Handle!

"""
The title of the delivery option.
Expand Down Expand Up @@ -1508,7 +1508,7 @@ enum CountryCode {
TO

"""
Turkey.
Türkiye.
"""
TR

Expand Down Expand Up @@ -2500,6 +2500,11 @@ type Customer implements HasMetafields {
"""
email: String

"""
The customer's first name.
"""
firstName: String

"""
Whether the customer has any of the given tags.
"""
Expand All @@ -2525,6 +2530,11 @@ type Customer implements HasMetafields {
"""
id: ID!

"""
The customer's last name.
"""
lastName: String

"""
Returns a metafield by namespace and key that belongs to the resource.
"""
Expand Down Expand Up @@ -2651,6 +2661,16 @@ enum DeliveryMethod {
SHIPPING
}

"""
The target delivery option.
"""
input DeliveryOptionTarget {
"""
The handle of the target delivery option.
"""
handle: Handle!
}

"""
The discount to be applied.
"""
Expand All @@ -2671,21 +2691,6 @@ input Discount {
value: Value!
}

"""
The strategy that's applied to the list of discounts.
"""
enum DiscountApplicationStrategy {
"""
Only apply the first discount with conditions that are satisfied.
"""
FIRST

"""
Only apply the discount that offers the maximum reduction.
"""
MAXIMUM
}

"""
A discount wrapper node.
"""
Expand Down Expand Up @@ -2719,14 +2724,9 @@ input FixedAmount {
}

"""
The result of the function. This type is deprecated in favor of `FunctionRunResult`.
The result of the function. In API versions 2023-10 and beyond, this type is deprecated in favor of `FunctionRunResult`.
"""
input FunctionResult {
"""
The strategy to apply the list of discounts.
"""
discountApplicationStrategy: DiscountApplicationStrategy!

"""
The list of discounts to be applied.
"""
Expand All @@ -2737,17 +2737,19 @@ input FunctionResult {
The result of the function.
"""
input FunctionRunResult {
"""
The strategy to apply the list of discounts.
"""
discountApplicationStrategy: DiscountApplicationStrategy!

"""
The list of discounts to be applied.
"""
discounts: [Discount!]!
}

"""
A function-scoped handle to a refer a resource.
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
Example value: `"10079785100"`
"""
scalar Handle

"""
Represents information about the metafields associated to the specified resource.
"""
Expand Down Expand Up @@ -3708,7 +3710,7 @@ type Market implements HasMetafields {
"""
A human-readable unique string for the market automatically generated from its title.
"""
handle: String!
handle: Handle!

"""
A globally-unique identifier.
Expand Down Expand Up @@ -3846,7 +3848,7 @@ type Product implements HasMetafields {
"""
A unique human-friendly string of the product's title.
"""
handle: String!
handle: Handle!

"""
Whether the product has any of the given tags.
Expand Down Expand Up @@ -4105,6 +4107,11 @@ input Target @oneOf {
The target delivery group.
"""
deliveryGroup: DeliveryGroupTarget

"""
The target delivery option.
"""
deliveryOption: DeliveryOptionTarget
}

"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
api_version = "2023-10"
api_version = "2024-01"

[[extensions]]
handle = "{{handle}}"
Expand Down
Loading

0 comments on commit 8bcfd4c

Please sign in to comment.