diff --git a/Package.resolved b/Package.resolved index f8a69edf6..3ecd69522 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,14 +1,5 @@ { "pins" : [ - { - "identity" : "apollo-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apollographql/apollo-ios.git", - "state" : { - "revision" : "1abd62f6cbc8c1f4405919d7eb6cd8e96967b07c", - "version" : "1.25.3" - } - }, { "identity" : "swiftlintplugin", "kind" : "remoteSourceControl", diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration.xcodeproj/project.pbxproj b/Samples/MobileBuyIntegration/MobileBuyIntegration.xcodeproj/project.pbxproj index 039fafd27..e8503ece0 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration.xcodeproj/project.pbxproj +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration.xcodeproj/project.pbxproj @@ -36,7 +36,6 @@ CB0E948B2F55A11100FA8813 /* CartDeliveryGroup.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E946C2F55A11100FA8813 /* CartDeliveryGroup.graphql.swift */; }; CB0E948C2F55A11100FA8813 /* CartLinesUpdateMutation.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E944F2F55A11100FA8813 /* CartLinesUpdateMutation.graphql.swift */; }; CB0E948D2F55A11100FA8813 /* ProductConnection.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E947C2F55A11100FA8813 /* ProductConnection.graphql.swift */; }; - CB0E948E2F55A11100FA8813 /* Query.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E947F2F55A11100FA8813 /* Query.graphql.swift */; }; CB0E948F2F55A11100FA8813 /* Collection.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E94742F55A11100FA8813 /* Collection.graphql.swift */; }; CB0E94902F55A11100FA8813 /* CartCost.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E946A2F55A11100FA8813 /* CartCost.graphql.swift */; }; CB0E94912F55A11100FA8813 /* CartCreatePayload.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E946B2F55A11100FA8813 /* CartCreatePayload.graphql.swift */; }; @@ -57,7 +56,6 @@ CB0E94A02F55A11100FA8813 /* CartLineUpdateInput.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E94602F55A11100FA8813 /* CartLineUpdateInput.graphql.swift */; }; CB0E94A12F55A11100FA8813 /* CartCreateMutation.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E944D2F55A11100FA8813 /* CartCreateMutation.graphql.swift */; }; CB0E94A22F55A11100FA8813 /* ProductVariantConnection.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E947E2F55A11100FA8813 /* ProductVariantConnection.graphql.swift */; }; - CB0E94A32F55A11100FA8813 /* MailingAddressInput.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E94622F55A11100FA8813 /* MailingAddressInput.graphql.swift */; }; CB0E94A42F55A11100FA8813 /* CartDeliveryOption.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E946E2F55A11100FA8813 /* CartDeliveryOption.graphql.swift */; }; CB0E94A52F55A11100FA8813 /* Node.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E94652F55A11100FA8813 /* Node.graphql.swift */; }; CB0E94A62F55A11100FA8813 /* Cart.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E94682F55A11100FA8813 /* Cart.graphql.swift */; }; @@ -66,7 +64,6 @@ CB0E94A92F55A11100FA8813 /* ProductVariant.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E947D2F55A11100FA8813 /* ProductVariant.graphql.swift */; }; CB0E94AA2F55A11100FA8813 /* CartBuyerIdentity.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E94692F55A11100FA8813 /* CartBuyerIdentity.graphql.swift */; }; CB0E94AB2F55A11100FA8813 /* CountryCode.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E94582F55A11100FA8813 /* CountryCode.graphql.swift */; }; - CB0E94AC2F55A11100FA8813 /* DeliveryAddressInput.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E94612F55A11100FA8813 /* DeliveryAddressInput.graphql.swift */; }; CB0E94AD2F55A11100FA8813 /* BaseCartLine.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E94642F55A11100FA8813 /* BaseCartLine.graphql.swift */; }; CB0E94AE2F55A11100FA8813 /* Product.graphql.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E947B2F55A11100FA8813 /* Product.graphql.swift */; }; CB0E94AF2F55A11100FA8813 /* SchemaConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0E94832F55A11100FA8813 /* SchemaConfiguration.swift */; }; @@ -139,8 +136,6 @@ CB0E945E2F55A11100FA8813 /* CartInput.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartInput.graphql.swift; sourceTree = ""; }; CB0E945F2F55A11100FA8813 /* CartLineInput.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartLineInput.graphql.swift; sourceTree = ""; }; CB0E94602F55A11100FA8813 /* CartLineUpdateInput.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartLineUpdateInput.graphql.swift; sourceTree = ""; }; - CB0E94612F55A11100FA8813 /* DeliveryAddressInput.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeliveryAddressInput.graphql.swift; sourceTree = ""; }; - CB0E94622F55A11100FA8813 /* MailingAddressInput.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MailingAddressInput.graphql.swift; sourceTree = ""; }; CB0E94642F55A11100FA8813 /* BaseCartLine.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCartLine.graphql.swift; sourceTree = ""; }; CB0E94652F55A11100FA8813 /* Node.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Node.graphql.swift; sourceTree = ""; }; CB0E94672F55A11100FA8813 /* BaseCartLineConnection.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCartLineConnection.graphql.swift; sourceTree = ""; }; @@ -167,7 +162,6 @@ CB0E947C2F55A11100FA8813 /* ProductConnection.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductConnection.graphql.swift; sourceTree = ""; }; CB0E947D2F55A11100FA8813 /* ProductVariant.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductVariant.graphql.swift; sourceTree = ""; }; CB0E947E2F55A11100FA8813 /* ProductVariantConnection.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductVariantConnection.graphql.swift; sourceTree = ""; }; - CB0E947F2F55A11100FA8813 /* Query.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Query.graphql.swift; sourceTree = ""; }; CB0E94812F55A11100FA8813 /* Merchandise.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Merchandise.graphql.swift; sourceTree = ""; }; CB0E94832F55A11100FA8813 /* SchemaConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SchemaConfiguration.swift; sourceTree = ""; }; CB0E94842F55A11100FA8813 /* SchemaMetadata.graphql.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SchemaMetadata.graphql.swift; sourceTree = ""; }; @@ -378,8 +372,6 @@ CB0E945E2F55A11100FA8813 /* CartInput.graphql.swift */, CB0E945F2F55A11100FA8813 /* CartLineInput.graphql.swift */, CB0E94602F55A11100FA8813 /* CartLineUpdateInput.graphql.swift */, - CB0E94612F55A11100FA8813 /* DeliveryAddressInput.graphql.swift */, - CB0E94622F55A11100FA8813 /* MailingAddressInput.graphql.swift */, ); path = InputObjects; sourceTree = ""; @@ -420,7 +412,6 @@ CB0E947C2F55A11100FA8813 /* ProductConnection.graphql.swift */, CB0E947D2F55A11100FA8813 /* ProductVariant.graphql.swift */, CB0E947E2F55A11100FA8813 /* ProductVariantConnection.graphql.swift */, - CB0E947F2F55A11100FA8813 /* Query.graphql.swift */, ); path = Objects; sourceTree = ""; @@ -596,7 +587,6 @@ CB0E948B2F55A11100FA8813 /* CartDeliveryGroup.graphql.swift in Sources */, CB0E948C2F55A11100FA8813 /* CartLinesUpdateMutation.graphql.swift in Sources */, CB0E948D2F55A11100FA8813 /* ProductConnection.graphql.swift in Sources */, - CB0E948E2F55A11100FA8813 /* Query.graphql.swift in Sources */, CB0E948F2F55A11100FA8813 /* Collection.graphql.swift in Sources */, CB0E94902F55A11100FA8813 /* CartCost.graphql.swift in Sources */, CB0E94912F55A11100FA8813 /* CartCreatePayload.graphql.swift in Sources */, @@ -617,7 +607,6 @@ CB0E94A02F55A11100FA8813 /* CartLineUpdateInput.graphql.swift in Sources */, CB0E94A12F55A11100FA8813 /* CartCreateMutation.graphql.swift in Sources */, CB0E94A22F55A11100FA8813 /* ProductVariantConnection.graphql.swift in Sources */, - CB0E94A32F55A11100FA8813 /* MailingAddressInput.graphql.swift in Sources */, CB0E94A42F55A11100FA8813 /* CartDeliveryOption.graphql.swift in Sources */, CB0E94A52F55A11100FA8813 /* Node.graphql.swift in Sources */, CB0E94A62F55A11100FA8813 /* Cart.graphql.swift in Sources */, @@ -626,7 +615,6 @@ CB0E94A92F55A11100FA8813 /* ProductVariant.graphql.swift in Sources */, CB0E94AA2F55A11100FA8813 /* CartBuyerIdentity.graphql.swift in Sources */, CB0E94AB2F55A11100FA8813 /* CountryCode.graphql.swift in Sources */, - CB0E94AC2F55A11100FA8813 /* DeliveryAddressInput.graphql.swift in Sources */, CB0E94AD2F55A11100FA8813 /* BaseCartLine.graphql.swift in Sources */, CB0E94AE2F55A11100FA8813 /* Product.graphql.swift in Sources */, CB0E94AF2F55A11100FA8813 /* SchemaConfiguration.swift in Sources */, @@ -897,7 +885,7 @@ repositoryURL = "https://github.com/apollographql/apollo-ios.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 1.23.0; + minimumVersion = 2.0.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/CartManager.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/CartManager.swift index def974527..34bac016e 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/CartManager.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/CartManager.swift @@ -21,8 +21,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -@preconcurrency import Apollo -@preconcurrency import ApolloAPI +import Apollo +import ApolloAPI import Combine import Foundation import PassKit @@ -197,26 +197,17 @@ class CartManager: ObservableObject { } private func performMutation(_ mutation: T) async throws -> T.Data { - try await withCheckedThrowingContinuation { (continuation: CheckedContinuation) in - Network.shared.apollo.perform(mutation: mutation) { result in - switch result { - case let .success(response): - if let data = response.data { - continuation.resume(returning: data) - } else if let errors = response.errors { - continuation.resume( - throwing: Errors.apiErrors( - requestName: String(describing: T.self), - message: errors.map { $0.message ?? "" }.joined(separator: ", ") - ) - ) - } else { - continuation.resume(throwing: Errors.payloadUnwrap) - } - case let .failure(error): - continuation.resume(throwing: error) - } - } + let response = try await Network.shared.apollo.perform(mutation: mutation) + + if let data = response.data { + return data + } else if let errors = response.errors { + throw Errors.apiErrors( + requestName: String(describing: T.self), + message: errors.map { $0.message ?? "" }.joined(separator: ", ") + ) + } else { + throw Errors.payloadUnwrap } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift index 75ccf9a13..6b7886292 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift @@ -2,6 +2,7 @@ // This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { struct CartDeliveryGroupFragment: Storefront.SelectionSet, Fragment { @@ -22,8 +23,8 @@ extension Storefront { [ .field("__typename", String.self), .field("id", Storefront.ID.self), - .field("groupType", GraphQLEnum?.self), - .field("deliveryAddress", DeliveryAddress?.self), + .field("groupType", GraphQLEnum.self), + .field("deliveryAddress", DeliveryAddress.self), .field("deliveryOptions", [DeliveryOption].self), .field("selectedDeliveryOption", SelectedDeliveryOption?.self) ] @@ -35,22 +36,27 @@ extension Storefront { ] } + /// The ID for the delivery group. var id: Storefront.ID { __data["id"] } - var groupType: GraphQLEnum? { + /// The type of merchandise in the delivery group. + var groupType: GraphQLEnum { __data["groupType"] } - var deliveryAddress: DeliveryAddress? { + /// The destination address for the delivery group. + var deliveryAddress: DeliveryAddress { __data["deliveryAddress"] } + /// The delivery options available for the delivery group. var deliveryOptions: [DeliveryOption] { __data["deliveryOptions"] } + /// The selected delivery option for the delivery group. var selectedDeliveryOption: SelectedDeliveryOption? { __data["selectedDeliveryOption"] } @@ -89,38 +95,51 @@ extension Storefront { ] } + /// The first line of the address. Typically the street address or PO Box number. var address1: String? { __data["address1"] } + /// The second line of the address. Typically the number of the apartment, suite, or unit. var address2: String? { __data["address2"] } + /// The name of the city, district, village, or town. var city: String? { __data["city"] } + /// The two-letter code for the country of the address. + /// + /// For example, US. var countryCodeV2: GraphQLEnum? { __data["countryCodeV2"] } + /// The first name of the customer. var firstName: String? { __data["firstName"] } + /// The last name of the customer. var lastName: String? { __data["lastName"] } + /// A unique phone number for the customer. + /// + /// Formatted using E.164 standard. For example, _+16135551111_. var phone: String? { __data["phone"] } + /// The region of the address, such as the province, state, or district. var province: String? { __data["province"] } + /// The zip or postal code of the address. var zip: String? { __data["zip"] } @@ -157,26 +176,32 @@ extension Storefront { ] } + /// The unique identifier of the delivery option. var handle: String { __data["handle"] } + /// The title of the delivery option. var title: String? { __data["title"] } + /// The code of the delivery option. var code: String? { __data["code"] } + /// The method for the delivery option. var deliveryMethodType: GraphQLEnum { __data["deliveryMethodType"] } + /// The description of the delivery option. var description: String? { __data["description"] } + /// The estimated cost for the delivery option. var estimatedCost: EstimatedCost { __data["estimatedCost"] } @@ -197,7 +222,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("amount", String.self), + .field("amount", Storefront.Decimal.self), .field("currencyCode", GraphQLEnum.self) ] } @@ -208,10 +233,12 @@ extension Storefront { ] } - var amount: String { + /// Decimal money amount. + var amount: Storefront.Decimal { __data["amount"] } + /// Currency of the money. var currencyCode: GraphQLEnum { __data["currencyCode"] } @@ -247,18 +274,22 @@ extension Storefront { ] } + /// The description of the delivery option. var description: String? { __data["description"] } + /// The title of the delivery option. var title: String? { __data["title"] } + /// The unique identifier of the delivery option. var handle: String { __data["handle"] } + /// The estimated cost for the delivery option. var estimatedCost: EstimatedCost { __data["estimatedCost"] } @@ -279,7 +310,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("amount", String.self), + .field("amount", Storefront.Decimal.self), .field("currencyCode", GraphQLEnum.self) ] } @@ -290,10 +321,12 @@ extension Storefront { ] } - var amount: String { + /// Decimal money amount. + var amount: Storefront.Decimal { __data["amount"] } + /// Currency of the money. var currencyCode: GraphQLEnum { __data["currencyCode"] } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartFragment.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartFragment.graphql.swift index 43a464ec4..f6d1c1785 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartFragment.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartFragment.graphql.swift @@ -2,6 +2,7 @@ // This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { struct CartFragment: Storefront.SelectionSet, Fragment { @@ -22,7 +23,7 @@ extension Storefront { [ .field("__typename", String.self), .field("id", Storefront.ID.self), - .field("checkoutUrl", String.self), + .field("checkoutUrl", Storefront.URL.self), .field("totalQuantity", Int.self), .field("buyerIdentity", BuyerIdentity.self), .field("deliveryGroups", DeliveryGroups.self, arguments: ["first": 10]), @@ -37,30 +38,38 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } - var checkoutUrl: String { + /// The URL of the checkout for the cart. + var checkoutUrl: Storefront.URL { __data["checkoutUrl"] } + /// The total number of items in the cart. var totalQuantity: Int { __data["totalQuantity"] } + /// Information about the buyer that's interacting with the cart. var buyerIdentity: BuyerIdentity { __data["buyerIdentity"] } + /// The delivery groups available for the cart, based on the buyer identity default + /// delivery address preference or the default address of the logged-in customer. var deliveryGroups: DeliveryGroups { __data["deliveryGroups"] } + /// A list of lines containing information about the items the customer intends to purchase. var lines: Lines { __data["lines"] } + /// The estimated costs that the buyer will pay at checkout. The costs are subject to change and changes will be reflected at checkout. The `cost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). var cost: Cost { __data["cost"] } @@ -93,14 +102,17 @@ extension Storefront { ] } + /// The email address of the buyer that's interacting with the cart. var email: String? { __data["email"] } + /// The phone number of the buyer that's interacting with the cart. var phone: String? { __data["phone"] } + /// The customer account associated with the cart. var customer: Customer? { __data["customer"] } @@ -132,10 +144,12 @@ extension Storefront { ] } + /// The customer’s email address. var email: String? { __data["email"] } + /// The customer’s phone number. var phone: String? { __data["phone"] } @@ -168,6 +182,7 @@ extension Storefront { ] } + /// A list of the nodes contained in CartDeliveryGroupEdge. var nodes: [Node] { __data["nodes"] } @@ -199,22 +214,27 @@ extension Storefront { ] } + /// The ID for the delivery group. var id: Storefront.ID { __data["id"] } - var groupType: GraphQLEnum? { + /// The type of merchandise in the delivery group. + var groupType: GraphQLEnum { __data["groupType"] } - var deliveryAddress: DeliveryAddress? { + /// The destination address for the delivery group. + var deliveryAddress: DeliveryAddress { __data["deliveryAddress"] } + /// The delivery options available for the delivery group. var deliveryOptions: [DeliveryOption] { __data["deliveryOptions"] } + /// The selected delivery option for the delivery group. var selectedDeliveryOption: SelectedDeliveryOption? { __data["selectedDeliveryOption"] } @@ -264,6 +284,7 @@ extension Storefront { ] } + /// A list of the nodes contained in BaseCartLineEdge. var nodes: [Node] { __data["nodes"] } @@ -295,18 +316,22 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } + /// The quantity of the merchandise that the customer intends to purchase. var quantity: Int { __data["quantity"] } + /// The merchandise that the buyer intends to purchase. var merchandise: Merchandise { __data["merchandise"] } + /// The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout. var cost: Cost { __data["cost"] } @@ -356,14 +381,18 @@ extension Storefront { ] } + /// The total amount for the customer to pay. var totalAmount: TotalAmount { __data["totalAmount"] } + /// The amount, before taxes and cart-level discounts, for the customer to pay. var subtotalAmount: SubtotalAmount { __data["subtotalAmount"] } + /// The tax amount for the customer to pay at checkout. + @available(*, deprecated, message: "Tax and duty amounts are no longer available and will be removed in a future version.\nPlease see [the changelog](https://shopify.dev/changelog/tax-and-duties-are-deprecated-in-storefront-cart-api)\nfor more information.") var totalTaxAmount: TotalTaxAmount? { __data["totalTaxAmount"] } @@ -384,7 +413,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("amount", String.self), + .field("amount", Storefront.Decimal.self), .field("currencyCode", GraphQLEnum.self) ] } @@ -395,10 +424,12 @@ extension Storefront { ] } - var amount: String { + /// Decimal money amount. + var amount: Storefront.Decimal { __data["amount"] } + /// Currency of the money. var currencyCode: GraphQLEnum { __data["currencyCode"] } @@ -420,7 +451,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("amount", String.self), + .field("amount", Storefront.Decimal.self), .field("currencyCode", GraphQLEnum.self) ] } @@ -431,10 +462,12 @@ extension Storefront { ] } - var amount: String { + /// Decimal money amount. + var amount: Storefront.Decimal { __data["amount"] } + /// Currency of the money. var currencyCode: GraphQLEnum { __data["currencyCode"] } @@ -456,7 +489,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("amount", String.self), + .field("amount", Storefront.Decimal.self), .field("currencyCode", GraphQLEnum.self) ] } @@ -467,10 +500,12 @@ extension Storefront { ] } - var amount: String { + /// Decimal money amount. + var amount: Storefront.Decimal { __data["amount"] } + /// Currency of the money. var currencyCode: GraphQLEnum { __data["currencyCode"] } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartLineFragment.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartLineFragment.graphql.swift index f423d676e..ffea3e41f 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartLineFragment.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartLineFragment.graphql.swift @@ -2,6 +2,7 @@ // This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { struct CartLineFragment: Storefront.SelectionSet, Fragment { @@ -34,18 +35,22 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } + /// The quantity of the merchandise that the customer intends to purchase. var quantity: Int { __data["quantity"] } + /// The merchandise that the buyer intends to purchase. var merchandise: Merchandise { __data["merchandise"] } + /// The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout. var cost: Cost { __data["cost"] } @@ -112,26 +117,32 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } + /// The product variant’s title. var title: String { __data["title"] } + /// Image associated with the product variant. This field falls back to the product image if no image is available. var image: Image? { __data["image"] } + /// The product variant’s price. var price: Price { __data["price"] } + /// The product object that the product variant belongs to. var product: Product { __data["product"] } + /// Whether a customer needs to provide a shipping address when placing an order for the product variant. var requiresShipping: Bool { __data["requiresShipping"] } @@ -152,7 +163,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("url", String.self) + .field("url", Storefront.URL.self) ] } @@ -162,7 +173,14 @@ extension Storefront { ] } - var url: String { + /// The location of the image as a URL. + /// + /// If no transform options are specified, then the original image will be preserved including any pre-applied transforms. + /// + /// All transformation options are considered "best-effort". Any transformation that the original image type doesn't support will be ignored. + /// + /// If you need multiple variations of the same image, then you can use [GraphQL aliases](https://graphql.org/learn/queries/#aliases). + var url: Storefront.URL { __data["url"] } } @@ -183,7 +201,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("amount", String.self), + .field("amount", Storefront.Decimal.self), .field("currencyCode", GraphQLEnum.self) ] } @@ -194,10 +212,12 @@ extension Storefront { ] } - var amount: String { + /// Decimal money amount. + var amount: Storefront.Decimal { __data["amount"] } + /// Currency of the money. var currencyCode: GraphQLEnum { __data["currencyCode"] } @@ -231,14 +251,20 @@ extension Storefront { ] } + /// The name for the product that displays to customers. The title is used to construct the product's handle. + /// For example, if a product is titled "Black Sunglasses", then the handle is `black-sunglasses`. var title: String { __data["title"] } + /// The name of the product's vendor. var vendor: String { __data["vendor"] } + /// The featured image for the product. + /// + /// This field is functionally equivalent to `images(first: 1)`. var featuredImage: FeaturedImage? { __data["featuredImage"] } @@ -259,7 +285,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("url", String.self) + .field("url", Storefront.URL.self) ] } @@ -269,7 +295,14 @@ extension Storefront { ] } - var url: String { + /// The location of the image as a URL. + /// + /// If no transform options are specified, then the original image will be preserved including any pre-applied transforms. + /// + /// All transformation options are considered "best-effort". Any transformation that the original image type doesn't support will be ignored. + /// + /// If you need multiple variations of the same image, then you can use [GraphQL aliases](https://graphql.org/learn/queries/#aliases). + var url: Storefront.URL { __data["url"] } } @@ -303,6 +336,7 @@ extension Storefront { ] } + /// The total cost of the merchandise line. var totalAmount: TotalAmount { __data["totalAmount"] } @@ -323,7 +357,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("amount", String.self), + .field("amount", Storefront.Decimal.self), .field("currencyCode", GraphQLEnum.self) ] } @@ -334,10 +368,12 @@ extension Storefront { ] } - var amount: String { + /// Decimal money amount. + var amount: Storefront.Decimal { __data["amount"] } + /// Currency of the money. var currencyCode: GraphQLEnum { __data["currencyCode"] } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartUserErrorFragment.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartUserErrorFragment.graphql.swift index 3d4912f9b..9364e48fa 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartUserErrorFragment.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Fragments/CartUserErrorFragment.graphql.swift @@ -2,6 +2,7 @@ // This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { struct CartUserErrorFragment: Storefront.SelectionSet, Fragment { @@ -21,7 +22,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("code", String?.self), + .field("code", GraphQLEnum?.self), .field("message", String.self), .field("field", [String]?.self) ] @@ -33,14 +34,17 @@ extension Storefront { ] } - var code: String? { + /// The error code. + var code: GraphQLEnum? { __data["code"] } + /// The error message. var message: String { __data["message"] } + /// The path to the input field that caused the error. var field: [String]? { __data["field"] } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartCreateMutation.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartCreateMutation.graphql.swift index 4f0072b44..22518f5f0 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartCreateMutation.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartCreateMutation.graphql.swift @@ -2,9 +2,10 @@ // This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { - class CartCreateMutation: GraphQLMutation { + struct CartCreateMutation: GraphQLMutation { static let operationName: String = "CartCreate" static let operationDocument: ApolloAPI.OperationDocument = .init( definition: .init( @@ -27,7 +28,7 @@ extension Storefront { self.language = language } - public var __variables: Variables? { + @_spi(Unsafe) public var __variables: Variables? { [ "input": input, "country": country, @@ -57,6 +58,9 @@ extension Storefront { ] } + /// Creates a new [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) for a buyer session. You can optionally initialize the cart with merchandise lines, discount codes, gift card codes, buyer identity for international pricing, and custom attributes. + /// + /// The returned cart includes a `checkoutUrl` that directs the buyer to complete their purchase. var cartCreate: CartCreate? { __data["cartCreate"] } @@ -88,10 +92,12 @@ extension Storefront { ] } + /// The new cart. var cart: Cart? { __data["cart"] } + /// The list of errors that occurred from executing the mutation. var userErrors: [UserError] { __data["userErrors"] } @@ -123,30 +129,38 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } - var checkoutUrl: String { + /// The URL of the checkout for the cart. + var checkoutUrl: Storefront.URL { __data["checkoutUrl"] } + /// The total number of items in the cart. var totalQuantity: Int { __data["totalQuantity"] } + /// Information about the buyer that's interacting with the cart. var buyerIdentity: BuyerIdentity { __data["buyerIdentity"] } + /// The delivery groups available for the cart, based on the buyer identity default + /// delivery address preference or the default address of the logged-in customer. var deliveryGroups: DeliveryGroups { __data["deliveryGroups"] } + /// A list of lines containing information about the items the customer intends to purchase. var lines: Lines { __data["lines"] } + /// The estimated costs that the buyer will pay at checkout. The costs are subject to change and changes will be reflected at checkout. The `cost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). var cost: Cost { __data["cost"] } @@ -198,14 +212,17 @@ extension Storefront { ] } - var code: String? { + /// The error code. + var code: GraphQLEnum? { __data["code"] } + /// The error message. var message: String { __data["message"] } + /// The path to the input field that caused the error. var field: [String]? { __data["field"] } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartLinesAddMutation.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartLinesAddMutation.graphql.swift index 47c535331..3af3c6403 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartLinesAddMutation.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartLinesAddMutation.graphql.swift @@ -2,9 +2,10 @@ // This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { - class CartLinesAddMutation: GraphQLMutation { + struct CartLinesAddMutation: GraphQLMutation { static let operationName: String = "CartLinesAdd" static let operationDocument: ApolloAPI.OperationDocument = .init( definition: .init( @@ -30,7 +31,7 @@ extension Storefront { self.language = language } - public var __variables: Variables? { + @_spi(Unsafe) public var __variables: Variables? { [ "cartId": cartId, "lines": lines, @@ -64,6 +65,9 @@ extension Storefront { ] } + /// Adds one or more merchandise lines to an existing [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Each line specifies the [product variant](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) to purchase. Quantity defaults to `1` if not provided. + /// + /// You can add up to 250 lines in a single request. Use [`CartLineInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartLineInput) to configure each line's merchandise, quantity, selling plan, custom attributes, and any parent relationships for nested line items such as warranties or add-ons. var cartLinesAdd: CartLinesAdd? { __data["cartLinesAdd"] } @@ -95,10 +99,12 @@ extension Storefront { ] } + /// The updated cart. var cart: Cart? { __data["cart"] } + /// The list of errors that occurred from executing the mutation. var userErrors: [UserError] { __data["userErrors"] } @@ -130,30 +136,38 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } - var checkoutUrl: String { + /// The URL of the checkout for the cart. + var checkoutUrl: Storefront.URL { __data["checkoutUrl"] } + /// The total number of items in the cart. var totalQuantity: Int { __data["totalQuantity"] } + /// Information about the buyer that's interacting with the cart. var buyerIdentity: BuyerIdentity { __data["buyerIdentity"] } + /// The delivery groups available for the cart, based on the buyer identity default + /// delivery address preference or the default address of the logged-in customer. var deliveryGroups: DeliveryGroups { __data["deliveryGroups"] } + /// A list of lines containing information about the items the customer intends to purchase. var lines: Lines { __data["lines"] } + /// The estimated costs that the buyer will pay at checkout. The costs are subject to change and changes will be reflected at checkout. The `cost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). var cost: Cost { __data["cost"] } @@ -205,14 +219,17 @@ extension Storefront { ] } - var code: String? { + /// The error code. + var code: GraphQLEnum? { __data["code"] } + /// The error message. var message: String { __data["message"] } + /// The path to the input field that caused the error. var field: [String]? { __data["field"] } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartLinesUpdateMutation.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartLinesUpdateMutation.graphql.swift index ffa19d080..3c7f746b7 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartLinesUpdateMutation.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Mutations/CartLinesUpdateMutation.graphql.swift @@ -2,9 +2,10 @@ // This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { - class CartLinesUpdateMutation: GraphQLMutation { + struct CartLinesUpdateMutation: GraphQLMutation { static let operationName: String = "CartLinesUpdate" static let operationDocument: ApolloAPI.OperationDocument = .init( definition: .init( @@ -30,7 +31,7 @@ extension Storefront { self.language = language } - public var __variables: Variables? { + @_spi(Unsafe) public var __variables: Variables? { [ "cartId": cartId, "lines": lines, @@ -64,6 +65,9 @@ extension Storefront { ] } + /// Updates one or more merchandise lines on a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). You can modify the quantity, swap the merchandise, change custom attributes, or update the selling plan for each line. You can update a maximum of 250 lines per request. + /// + /// Omitting the [`attributes`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesUpdate#arguments-lines.fields.attributes) field or setting it to null preserves existing line attributes. Pass an empty array to clear all attributes from a line. var cartLinesUpdate: CartLinesUpdate? { __data["cartLinesUpdate"] } @@ -95,10 +99,12 @@ extension Storefront { ] } + /// The updated cart. var cart: Cart? { __data["cart"] } + /// The list of errors that occurred from executing the mutation. var userErrors: [UserError] { __data["userErrors"] } @@ -130,30 +136,38 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } - var checkoutUrl: String { + /// The URL of the checkout for the cart. + var checkoutUrl: Storefront.URL { __data["checkoutUrl"] } + /// The total number of items in the cart. var totalQuantity: Int { __data["totalQuantity"] } + /// Information about the buyer that's interacting with the cart. var buyerIdentity: BuyerIdentity { __data["buyerIdentity"] } + /// The delivery groups available for the cart, based on the buyer identity default + /// delivery address preference or the default address of the logged-in customer. var deliveryGroups: DeliveryGroups { __data["deliveryGroups"] } + /// A list of lines containing information about the items the customer intends to purchase. var lines: Lines { __data["lines"] } + /// The estimated costs that the buyer will pay at checkout. The costs are subject to change and changes will be reflected at checkout. The `cost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). var cost: Cost { __data["cost"] } @@ -205,14 +219,17 @@ extension Storefront { ] } - var code: String? { + /// The error code. + var code: GraphQLEnum? { __data["code"] } + /// The error message. var message: String { __data["message"] } + /// The path to the input field that caused the error. var field: [String]? { __data["field"] } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Queries/GetCartQuery.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Queries/GetCartQuery.graphql.swift index d1e94266b..9384386fa 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Queries/GetCartQuery.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Queries/GetCartQuery.graphql.swift @@ -2,9 +2,10 @@ // This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { - class GetCartQuery: GraphQLQuery { + struct GetCartQuery: GraphQLQuery { static let operationName: String = "GetCart" static let operationDocument: ApolloAPI.OperationDocument = .init( definition: .init( @@ -27,7 +28,7 @@ extension Storefront { self.language = language } - public var __variables: Variables? { + @_spi(Unsafe) public var __variables: Variables? { [ "id": id, "country": country, @@ -42,7 +43,7 @@ extension Storefront { } static var __parentType: any ApolloAPI.ParentType { - Storefront.Objects.Query + Storefront.Objects.QueryRoot } static var __selections: [ApolloAPI.Selection] { @@ -57,6 +58,9 @@ extension Storefront { ] } + /// Returns a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) by its ID. The cart contains the merchandise lines a buyer intends to purchase, along with estimated costs, applied discounts, gift cards, and delivery options. + /// + /// Use the [`checkoutUrl`](https://shopify.dev/docs/api/storefront/latest/queries/cart#returns-Cart.fields.checkoutUrl) field to redirect buyers to Shopify's web checkout when they're ready to complete their purchase. For more information, refer to [Manage a cart with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). var cart: Cart? { __data["cart"] } @@ -88,30 +92,38 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } - var checkoutUrl: String { + /// The URL of the checkout for the cart. + var checkoutUrl: Storefront.URL { __data["checkoutUrl"] } + /// The total number of items in the cart. var totalQuantity: Int { __data["totalQuantity"] } + /// Information about the buyer that's interacting with the cart. var buyerIdentity: BuyerIdentity { __data["buyerIdentity"] } + /// The delivery groups available for the cart, based on the buyer identity default + /// delivery address preference or the default address of the logged-in customer. var deliveryGroups: DeliveryGroups { __data["deliveryGroups"] } + /// A list of lines containing information about the items the customer intends to purchase. var lines: Lines { __data["lines"] } + /// The estimated costs that the buyer will pay at checkout. The costs are subject to change and changes will be reflected at checkout. The `cost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). var cost: Cost { __data["cost"] } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Queries/GetProductsQuery.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Queries/GetProductsQuery.graphql.swift index 5e13625d2..f5920c6b7 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Queries/GetProductsQuery.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Operations/Queries/GetProductsQuery.graphql.swift @@ -2,9 +2,10 @@ // This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { - class GetProductsQuery: GraphQLQuery { + struct GetProductsQuery: GraphQLQuery { static let operationName: String = "GetProducts" static let operationDocument: ApolloAPI.OperationDocument = .init( definition: .init( @@ -12,12 +13,12 @@ extension Storefront { ) ) - public var first: GraphQLNullable + public var first: GraphQLNullable public var country: GraphQLEnum public var language: GraphQLEnum public init( - first: GraphQLNullable = 20, + first: GraphQLNullable = 20, country: GraphQLEnum, language: GraphQLEnum ) { @@ -26,7 +27,7 @@ extension Storefront { self.language = language } - public var __variables: Variables? { + @_spi(Unsafe) public var __variables: Variables? { [ "first": first, "country": country, @@ -41,7 +42,7 @@ extension Storefront { } static var __parentType: any ApolloAPI.ParentType { - Storefront.Objects.Query + Storefront.Objects.QueryRoot } static var __selections: [ApolloAPI.Selection] { @@ -56,6 +57,9 @@ extension Storefront { ] } + /// Returns a paginated list of the shop's [products](https://shopify.dev/docs/api/storefront/current/objects/Product). + /// + /// For full-text storefront search, use the [`search`](https://shopify.dev/docs/api/storefront/current/queries/search) query instead. var products: Products { __data["products"] } @@ -86,6 +90,7 @@ extension Storefront { ] } + /// A list of the nodes contained in ProductEdge. var nodes: [Node] { __data["nodes"] } @@ -123,34 +128,47 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } + /// The name for the product that displays to customers. The title is used to construct the product's handle. + /// For example, if a product is titled "Black Sunglasses", then the handle is `black-sunglasses`. var title: String { __data["title"] } + /// A unique, human-readable string of the product's title. + /// A handle can contain letters, hyphens (`-`), and numbers, but no spaces. + /// The handle is used in the online store URL for the product. var handle: String { __data["handle"] } + /// A single-line description of the product, with [HTML tags](https://developer.mozilla.org/en-US/docs/Web/HTML) removed. var description: String { __data["description"] } + /// The name of the product's vendor. var vendor: String { __data["vendor"] } + /// The featured image for the product. + /// + /// This field is functionally equivalent to `images(first: 1)`. var featuredImage: FeaturedImage? { __data["featuredImage"] } + /// A list of [collections](/docs/api/storefront/latest/objects/Collection) that include the product. var collections: Collections { __data["collections"] } + /// A list of [variants](/docs/api/storefront/latest/objects/ProductVariant) that are associated with the product. var variants: Variants { __data["variants"] } @@ -171,7 +189,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("url", String.self) + .field("url", Storefront.URL.self) ] } @@ -181,7 +199,14 @@ extension Storefront { ] } - var url: String { + /// The location of the image as a URL. + /// + /// If no transform options are specified, then the original image will be preserved including any pre-applied transforms. + /// + /// All transformation options are considered "best-effort". Any transformation that the original image type doesn't support will be ignored. + /// + /// If you need multiple variations of the same image, then you can use [GraphQL aliases](https://graphql.org/learn/queries/#aliases). + var url: Storefront.URL { __data["url"] } } @@ -212,6 +237,7 @@ extension Storefront { ] } + /// A list of the nodes contained in CollectionEdge. var nodes: [Node] { __data["nodes"] } @@ -243,10 +269,12 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } + /// The collection’s name. Limit of 255 characters. var title: String { __data["title"] } @@ -279,6 +307,7 @@ extension Storefront { ] } + /// A list of the nodes contained in ProductVariantEdge. var nodes: [Node] { __data["nodes"] } @@ -312,18 +341,22 @@ extension Storefront { ] } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] } + /// The product variant’s title. var title: String { __data["title"] } + /// Indicates if the product variant is available for sale. var availableForSale: Bool { __data["availableForSale"] } + /// The product variant’s price. var price: Price { __data["price"] } @@ -344,7 +377,7 @@ extension Storefront { static var __selections: [ApolloAPI.Selection] { [ .field("__typename", String.self), - .field("amount", String.self), + .field("amount", Storefront.Decimal.self), .field("currencyCode", GraphQLEnum.self) ] } @@ -355,10 +388,12 @@ extension Storefront { ] } - var amount: String { + /// Decimal money amount. + var amount: Storefront.Decimal { __data["amount"] } + /// Currency of the money. var currencyCode: GraphQLEnum { __data["currencyCode"] } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/CustomScalars/Decimal.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/CustomScalars/Decimal.swift new file mode 100644 index 000000000..5a80b07a6 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/CustomScalars/Decimal.swift @@ -0,0 +1,15 @@ +// @generated +// This file was automatically generated and can be edited to +// implement advanced custom scalar functionality. +// +// Any changes to this file will not be overwritten by future +// code generation execution. + +@_spi(Internal) @_spi(Execution) import ApolloAPI + +extension Storefront { + /// A signed decimal number, which supports arbitrary precision and is serialized as a string. + /// + /// Example values: `"29.99"`, `"29.999"`. + typealias Decimal = String +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/CustomScalars/URL.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/CustomScalars/URL.swift new file mode 100644 index 000000000..db5235439 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/CustomScalars/URL.swift @@ -0,0 +1,17 @@ +// @generated +// This file was automatically generated and can be edited to +// implement advanced custom scalar functionality. +// +// Any changes to this file will not be overwritten by future +// code generation execution. + +@_spi(Internal) @_spi(Execution) import ApolloAPI + +extension Storefront { + /// Represents an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and + /// [RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string. + /// + /// For example, `"https://example.myshopify.com"` is a valid URL. It includes a scheme (`https`) and a host + /// (`example.myshopify.com`). + typealias URL = String +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift index bf1802674..a6e405507 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift @@ -1,11 +1,15 @@ // @generated // This file was automatically generated and should not be edited. -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { + /// Defines what type of merchandise is in the delivery group. enum CartDeliveryGroupType: String, EnumType { - case oneTimePurchase = "ONE_TIME_PURCHASE" + /// The delivery group only contains subscription merchandise. case subscription = "SUBSCRIPTION" + /// The delivery group only contains merchandise that is either a one time purchase or a first delivery of + /// subscription merchandise. + case oneTimePurchase = "ONE_TIME_PURCHASE" } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CartErrorCode.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CartErrorCode.graphql.swift new file mode 100644 index 000000000..206429616 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CartErrorCode.graphql.swift @@ -0,0 +1,110 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) import ApolloAPI + +extension Storefront { + /// Error codes returned by [`CartUserError`](https://shopify.dev/docs/api/storefront/current/objects/CartUserError) during cart mutations. Covers validation failures for addresses, quantities, delivery options, merchandise lines, discount codes, and metafields. + enum CartErrorCode: String, EnumType { + /// The input value is invalid. + case invalid = "INVALID" + /// The input value should be less than the maximum value allowed. + case lessThan = "LESS_THAN" + /// Merchandise line was not found in cart. + case invalidMerchandiseLine = "INVALID_MERCHANDISE_LINE" + /// Missing discount code. + case missingDiscountCode = "MISSING_DISCOUNT_CODE" + /// Missing note. + case missingNote = "MISSING_NOTE" + /// The note length must be below the specified maximum. + case noteTooLong = "NOTE_TOO_LONG" + /// Delivery group was not found in cart. + case invalidDeliveryGroup = "INVALID_DELIVERY_GROUP" + /// Delivery option was not valid. + case invalidDeliveryOption = "INVALID_DELIVERY_OPTION" + /// The delivery group is in a pending state. + case pendingDeliveryGroups = "PENDING_DELIVERY_GROUPS" + /// The payment wasn't valid. + case invalidPayment = "INVALID_PAYMENT" + /// The payment method is not supported. + case paymentMethodNotSupported = "PAYMENT_METHOD_NOT_SUPPORTED" + /// The payment method is not applicable. + case paymentMethodNotApplicable = "PAYMENT_METHOD_NOT_APPLICABLE" + /// The payment is invalid. Deferred payment is required. + case invalidPaymentDeferredPaymentRequired = "INVALID_PAYMENT_DEFERRED_PAYMENT_REQUIRED" + /// Cannot update payment on an empty cart + case invalidPaymentEmptyCart = "INVALID_PAYMENT_EMPTY_CART" + /// Validation failed. + case validationCustom = "VALIDATION_CUSTOM" + /// The metafields were not valid. + case invalidMetafields = "INVALID_METAFIELDS" + /// The customer access token is required when setting a company location. + case missingCustomerAccessToken = "MISSING_CUSTOMER_ACCESS_TOKEN" + /// Company location not found or not allowed. + case invalidCompanyLocation = "INVALID_COMPANY_LOCATION" + /// The quantity must be a multiple of the specified increment. + case invalidIncrement = "INVALID_INCREMENT" + /// The quantity must be above the specified minimum for the item. + case minimumNotMet = "MINIMUM_NOT_MET" + /// The quantity must be below the specified maximum for the item. + case maximumExceeded = "MAXIMUM_EXCEEDED" + /// Too many delivery addresses on Cart. + case tooManyDeliveryAddresses = "TOO_MANY_DELIVERY_ADDRESSES" + /// Only one delivery address can be selected. + case onlyOneDeliveryAddressCanBeSelected = "ONLY_ONE_DELIVERY_ADDRESS_CAN_BE_SELECTED" + /// The delivery address was not found. + case invalidDeliveryAddressId = "INVALID_DELIVERY_ADDRESS_ID" + /// Buyer cannot purchase for company location. + case buyerCannotPurchaseForCompanyLocation = "BUYER_CANNOT_PURCHASE_FOR_COMPANY_LOCATION" + /// The specified address field is required. + case addressFieldIsRequired = "ADDRESS_FIELD_IS_REQUIRED" + /// The specified address field is too long. + case addressFieldIsTooLong = "ADDRESS_FIELD_IS_TOO_LONG" + /// The specified address field contains emojis. + case addressFieldContainsEmojis = "ADDRESS_FIELD_CONTAINS_EMOJIS" + /// The specified address field contains HTML tags. + case addressFieldContainsHtmlTags = "ADDRESS_FIELD_CONTAINS_HTML_TAGS" + /// The specified address field contains a URL. + case addressFieldContainsUrl = "ADDRESS_FIELD_CONTAINS_URL" + /// The specified address field does not match the expected pattern. + case addressFieldDoesNotMatchExpectedPattern = "ADDRESS_FIELD_DOES_NOT_MATCH_EXPECTED_PATTERN" + /// The given zip code is invalid for the provided province. + case invalidZipCodeForProvince = "INVALID_ZIP_CODE_FOR_PROVINCE" + /// The given zip code is invalid for the provided country. + case invalidZipCodeForCountry = "INVALID_ZIP_CODE_FOR_COUNTRY" + /// The given zip code is unsupported. + case zipCodeNotSupported = "ZIP_CODE_NOT_SUPPORTED" + /// The given province cannot be found. + case provinceNotFound = "PROVINCE_NOT_FOUND" + /// A general error occurred during address validation. + case unspecifiedAddressError = "UNSPECIFIED_ADDRESS_ERROR" + /// Credit card has expired. + case paymentsCreditCardBaseExpired = "PAYMENTS_CREDIT_CARD_BASE_EXPIRED" + /// Credit card gateway is not supported. + case paymentsCreditCardBaseGatewayNotSupported = "PAYMENTS_CREDIT_CARD_BASE_GATEWAY_NOT_SUPPORTED" + /// Credit card error. + case paymentsCreditCardGeneric = "PAYMENTS_CREDIT_CARD_GENERIC" + /// Credit card month is invalid. + case paymentsCreditCardMonthInclusion = "PAYMENTS_CREDIT_CARD_MONTH_INCLUSION" + /// Credit card number is invalid. + case paymentsCreditCardNumberInvalid = "PAYMENTS_CREDIT_CARD_NUMBER_INVALID" + /// Credit card number format is invalid. + case paymentsCreditCardNumberInvalidFormat = "PAYMENTS_CREDIT_CARD_NUMBER_INVALID_FORMAT" + /// Credit card verification value is blank. + case paymentsCreditCardVerificationValueBlank = "PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_BLANK" + /// Credit card verification value is invalid for card type. + case paymentsCreditCardVerificationValueInvalidForCardType = "PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_INVALID_FOR_CARD_TYPE" + /// Credit card has expired. + case paymentsCreditCardYearExpired = "PAYMENTS_CREDIT_CARD_YEAR_EXPIRED" + /// Credit card expiry year is invalid. + case paymentsCreditCardYearInvalidExpiryYear = "PAYMENTS_CREDIT_CARD_YEAR_INVALID_EXPIRY_YEAR" + /// Variant can only be purchased with a selling plan. + case variantRequiresSellingPlan = "VARIANT_REQUIRES_SELLING_PLAN" + /// Selling plan is not applicable. + case sellingPlanNotApplicable = "SELLING_PLAN_NOT_APPLICABLE" + /// An error occurred while saving the cart. + case serviceUnavailable = "SERVICE_UNAVAILABLE" + /// The cart is too large to save. + case cartTooLarge = "CART_TOO_LARGE" + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CountryCode.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CountryCode.graphql.swift index 64bd86e50..92f2ee22a 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CountryCode.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CountryCode.graphql.swift @@ -1,63 +1,503 @@ // @generated // This file was automatically generated and should not be edited. -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { + /// The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines. + /// If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision + /// of another country. For example, the territories associated with Spain are represented by the country code `ES`, + /// and the territories associated with the United States of America are represented by the country code `US`. enum CountryCode: String, EnumType { - case ca = "CA" - case us = "US" - case gb = "GB" + /// Afghanistan. + case af = "AF" + /// Åland Islands. + case ax = "AX" + /// Albania. + case al = "AL" + /// Algeria. + case dz = "DZ" + /// Andorra. + case ad = "AD" + /// Angola. + case ao = "AO" + /// Anguilla. + case ai = "AI" + /// Antigua & Barbuda. + case ag = "AG" + /// Argentina. + case ar = "AR" + /// Armenia. + case am = "AM" + /// Aruba. + case aw = "AW" + /// Ascension Island. + case ac = "AC" + /// Australia. case au = "AU" - case de = "DE" - case fr = "FR" - case jp = "JP" - case cn = "CN" + /// Austria. + case at = "AT" + /// Azerbaijan. + case az = "AZ" + /// Bahamas. + case bs = "BS" + /// Bahrain. + case bh = "BH" + /// Bangladesh. + case bd = "BD" + /// Barbados. + case bb = "BB" + /// Belarus. + case by = "BY" + /// Belgium. + case be = "BE" + /// Belize. + case bz = "BZ" + /// Benin. + case bj = "BJ" + /// Bermuda. + case bm = "BM" + /// Bhutan. + case bt = "BT" + /// Bolivia. + case bo = "BO" + /// Bosnia & Herzegovina. + case ba = "BA" + /// Botswana. + case bw = "BW" + /// Bouvet Island. + case bv = "BV" + /// Brazil. case br = "BR" - case `in` = "IN" - case mx = "MX" - case nz = "NZ" - case kr = "KR" - case sg = "SG" + /// British Indian Ocean Territory. + case io = "IO" + /// Brunei. + case bn = "BN" + /// Bulgaria. + case bg = "BG" + /// Burkina Faso. + case bf = "BF" + /// Burundi. + case bi = "BI" + /// Cambodia. + case kh = "KH" + /// Canada. + case ca = "CA" + /// Cape Verde. + case cv = "CV" + /// Caribbean Netherlands. + case bq = "BQ" + /// Cayman Islands. + case ky = "KY" + /// Central African Republic. + case cf = "CF" + /// Chad. + case td = "TD" + /// Chile. + case cl = "CL" + /// China. + case cn = "CN" + /// Christmas Island. + case cx = "CX" + /// Cocos (Keeling) Islands. + case cc = "CC" + /// Colombia. + case co = "CO" + /// Comoros. + case km = "KM" + /// Congo - Brazzaville. + case cg = "CG" + /// Congo - Kinshasa. + case cd = "CD" + /// Cook Islands. + case ck = "CK" + /// Costa Rica. + case cr = "CR" + /// Croatia. + case hr = "HR" + /// Cuba. + case cu = "CU" + /// Curaçao. + case cw = "CW" + /// Cyprus. + case cy = "CY" + /// Czechia. + case cz = "CZ" + /// Côte d’Ivoire. + case ci = "CI" + /// Denmark. + case dk = "DK" + /// Djibouti. + case dj = "DJ" + /// Dominica. + case dm = "DM" + /// Dominican Republic. + case `do` = "DO" + /// Ecuador. + case ec = "EC" + /// Egypt. + case eg = "EG" + /// El Salvador. + case sv = "SV" + /// Equatorial Guinea. + case gq = "GQ" + /// Eritrea. + case er = "ER" + /// Estonia. + case ee = "EE" + /// Eswatini. + case sz = "SZ" + /// Ethiopia. + case et = "ET" + /// Falkland Islands. + case fk = "FK" + /// Faroe Islands. + case fo = "FO" + /// Fiji. + case fj = "FJ" + /// Finland. + case fi = "FI" + /// France. + case fr = "FR" + /// French Guiana. + case gf = "GF" + /// French Polynesia. + case pf = "PF" + /// French Southern Territories. + case tf = "TF" + /// Gabon. + case ga = "GA" + /// Gambia. + case gm = "GM" + /// Georgia. + case ge = "GE" + /// Germany. + case de = "DE" + /// Ghana. + case gh = "GH" + /// Gibraltar. + case gi = "GI" + /// Greece. + case gr = "GR" + /// Greenland. + case gl = "GL" + /// Grenada. + case gd = "GD" + /// Guadeloupe. + case gp = "GP" + /// Guatemala. + case gt = "GT" + /// Guernsey. + case gg = "GG" + /// Guinea. + case gn = "GN" + /// Guinea-Bissau. + case gw = "GW" + /// Guyana. + case gy = "GY" + /// Haiti. + case ht = "HT" + /// Heard & McDonald Islands. + case hm = "HM" + /// Vatican City. + case va = "VA" + /// Honduras. + case hn = "HN" + /// Hong Kong SAR. case hk = "HK" + /// Hungary. + case hu = "HU" + /// Iceland. + case `is` = "IS" + /// India. + case `in` = "IN" + /// Indonesia. + case id = "ID" + /// Iran. + case ir = "IR" + /// Iraq. + case iq = "IQ" + /// Ireland. case ie = "IE" + /// Isle of Man. + case im = "IM" + /// Israel. + case il = "IL" + /// Italy. case it = "IT" + /// Jamaica. + case jm = "JM" + /// Japan. + case jp = "JP" + /// Jersey. + case je = "JE" + /// Jordan. + case jo = "JO" + /// Kazakhstan. + case kz = "KZ" + /// Kenya. + case ke = "KE" + /// Kiribati. + case ki = "KI" + /// North Korea. + case kp = "KP" + /// Kosovo. + case xk = "XK" + /// Kuwait. + case kw = "KW" + /// Kyrgyzstan. + case kg = "KG" + /// Laos. + case la = "LA" + /// Latvia. + case lv = "LV" + /// Lebanon. + case lb = "LB" + /// Lesotho. + case ls = "LS" + /// Liberia. + case lr = "LR" + /// Libya. + case ly = "LY" + /// Liechtenstein. + case li = "LI" + /// Lithuania. + case lt = "LT" + /// Luxembourg. + case lu = "LU" + /// Macao SAR. + case mo = "MO" + /// Madagascar. + case mg = "MG" + /// Malawi. + case mw = "MW" + /// Malaysia. + case my = "MY" + /// Maldives. + case mv = "MV" + /// Mali. + case ml = "ML" + /// Malta. + case mt = "MT" + /// Martinique. + case mq = "MQ" + /// Mauritania. + case mr = "MR" + /// Mauritius. + case mu = "MU" + /// Mayotte. + case yt = "YT" + /// Mexico. + case mx = "MX" + /// Moldova. + case md = "MD" + /// Monaco. + case mc = "MC" + /// Mongolia. + case mn = "MN" + /// Montenegro. + case me = "ME" + /// Montserrat. + case ms = "MS" + /// Morocco. + case ma = "MA" + /// Mozambique. + case mz = "MZ" + /// Myanmar (Burma). + case mm = "MM" + /// Namibia. + case na = "NA" + /// Nauru. + case nr = "NR" + /// Nepal. + case np = "NP" + /// Netherlands. case nl = "NL" - case es = "ES" - case se = "SE" - case dk = "DK" + /// Netherlands Antilles. + case an = "AN" + /// New Caledonia. + case nc = "NC" + /// New Zealand. + case nz = "NZ" + /// Nicaragua. + case ni = "NI" + /// Niger. + case ne = "NE" + /// Nigeria. + case ng = "NG" + /// Niue. + case nu = "NU" + /// Norfolk Island. + case nf = "NF" + /// North Macedonia. + case mk = "MK" + /// Norway. case no = "NO" - case fi = "FI" - case be = "BE" - case at = "AT" - case ch = "CH" - case pt = "PT" - case pl = "PL" - case cz = "CZ" - case il = "IL" - case ae = "AE" - case sa = "SA" - case za = "ZA" - case ph = "PH" - case my = "MY" - case th = "TH" - case vn = "VN" - case id = "ID" - case tw = "TW" - case co = "CO" - case ar = "AR" - case cl = "CL" + /// Oman. + case om = "OM" + /// Pakistan. + case pk = "PK" + /// Palestinian Territories. + case ps = "PS" + /// Panama. + case pa = "PA" + /// Papua New Guinea. + case pg = "PG" + /// Paraguay. + case py = "PY" + /// Peru. case pe = "PE" + /// Philippines. + case ph = "PH" + /// Pitcairn Islands. + case pn = "PN" + /// Poland. + case pl = "PL" + /// Portugal. + case pt = "PT" + /// Qatar. + case qa = "QA" + /// Cameroon. + case cm = "CM" + /// Réunion. + case re = "RE" + /// Romania. case ro = "RO" - case hu = "HU" - case bg = "BG" - case hr = "HR" + /// Russia. + case ru = "RU" + /// Rwanda. + case rw = "RW" + /// St. Barthélemy. + case bl = "BL" + /// St. Helena. + case sh = "SH" + /// St. Kitts & Nevis. + case kn = "KN" + /// St. Lucia. + case lc = "LC" + /// St. Martin. + case mf = "MF" + /// St. Pierre & Miquelon. + case pm = "PM" + /// Samoa. + case ws = "WS" + /// San Marino. + case sm = "SM" + /// São Tomé & Príncipe. + case st = "ST" + /// Saudi Arabia. + case sa = "SA" + /// Senegal. + case sn = "SN" + /// Serbia. + case rs = "RS" + /// Seychelles. + case sc = "SC" + /// Sierra Leone. + case sl = "SL" + /// Singapore. + case sg = "SG" + /// Sint Maarten. + case sx = "SX" + /// Slovakia. case sk = "SK" + /// Slovenia. case si = "SI" - case lt = "LT" - case lv = "LV" - case ee = "EE" - case gr = "GR" + /// Solomon Islands. + case sb = "SB" + /// Somalia. + case so = "SO" + /// South Africa. + case za = "ZA" + /// South Georgia & South Sandwich Islands. + case gs = "GS" + /// South Korea. + case kr = "KR" + /// South Sudan. + case ss = "SS" + /// Spain. + case es = "ES" + /// Sri Lanka. + case lk = "LK" + /// St. Vincent & Grenadines. + case vc = "VC" + /// Sudan. + case sd = "SD" + /// Suriname. + case sr = "SR" + /// Svalbard & Jan Mayen. + case sj = "SJ" + /// Sweden. + case se = "SE" + /// Switzerland. + case ch = "CH" + /// Syria. + case sy = "SY" + /// Taiwan. + case tw = "TW" + /// Tajikistan. + case tj = "TJ" + /// Tanzania. + case tz = "TZ" + /// Thailand. + case th = "TH" + /// Timor-Leste. + case tl = "TL" + /// Togo. + case tg = "TG" + /// Tokelau. + case tk = "TK" + /// Tonga. + case to = "TO" + /// Trinidad & Tobago. + case tt = "TT" + /// Tristan da Cunha. + case ta = "TA" + /// Tunisia. + case tn = "TN" + /// Türkiye. case tr = "TR" + /// Turkmenistan. + case tm = "TM" + /// Turks & Caicos Islands. + case tc = "TC" + /// Tuvalu. + case tv = "TV" + /// Uganda. + case ug = "UG" + /// Ukraine. + case ua = "UA" + /// United Arab Emirates. + case ae = "AE" + /// United Kingdom. + case gb = "GB" + /// United States. + case us = "US" + /// U.S. Outlying Islands. + case um = "UM" + /// Uruguay. + case uy = "UY" + /// Uzbekistan. + case uz = "UZ" + /// Vanuatu. + case vu = "VU" + /// Venezuela. + case ve = "VE" + /// Vietnam. + case vn = "VN" + /// British Virgin Islands. + case vg = "VG" + /// Wallis & Futuna. + case wf = "WF" + /// Western Sahara. + case eh = "EH" + /// Yemen. + case ye = "YE" + /// Zambia. + case zm = "ZM" + /// Zimbabwe. + case zw = "ZW" + /// Unknown Region. + case zz = "ZZ" } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CurrencyCode.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CurrencyCode.graphql.swift index 8d2fe6271..aedcd5ea2 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CurrencyCode.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/CurrencyCode.graphql.swift @@ -1,48 +1,340 @@ // @generated // This file was automatically generated and should not be edited. -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { + /// The three-letter currency codes that represent the world currencies used in + /// stores. These include standard ISO 4217 codes, legacy codes, + /// and non-standard codes. enum CurrencyCode: String, EnumType { - case cad = "CAD" + /// United States Dollars (USD). case usd = "USD" + /// Euro (EUR). + case eur = "EUR" + /// United Kingdom Pounds (GBP). case gbp = "GBP" + /// Canadian Dollars (CAD). + case cad = "CAD" + /// Afghan Afghani (AFN). + case afn = "AFN" + /// Albanian Lek (ALL). + case all = "ALL" + /// Algerian Dinar (DZD). + case dzd = "DZD" + /// Angolan Kwanza (AOA). + case aoa = "AOA" + /// Argentine Pesos (ARS). + case ars = "ARS" + /// Armenian Dram (AMD). + case amd = "AMD" + /// Aruban Florin (AWG). + case awg = "AWG" + /// Australian Dollars (AUD). case aud = "AUD" - case eur = "EUR" - case jpy = "JPY" - case cny = "CNY" + /// Barbadian Dollar (BBD). + case bbd = "BBD" + /// Azerbaijani Manat (AZN). + case azn = "AZN" + /// Bangladesh Taka (BDT). + case bdt = "BDT" + /// Bahamian Dollar (BSD). + case bsd = "BSD" + /// Bahraini Dinar (BHD). + case bhd = "BHD" + /// Burundian Franc (BIF). + case bif = "BIF" + /// Belize Dollar (BZD). + case bzd = "BZD" + /// Bermudian Dollar (BMD). + case bmd = "BMD" + /// Bhutanese Ngultrum (BTN). + case btn = "BTN" + /// Bosnia and Herzegovina Convertible Mark (BAM). + case bam = "BAM" + /// Brazilian Real (BRL). case brl = "BRL" + /// Bolivian Boliviano (BOB). + case bob = "BOB" + /// Botswana Pula (BWP). + case bwp = "BWP" + /// Brunei Dollar (BND). + case bnd = "BND" + /// Bulgarian Lev (BGN). + case bgn = "BGN" + /// Burmese Kyat (MMK). + case mmk = "MMK" + /// Cambodian Riel. + case khr = "KHR" + /// Cape Verdean escudo (CVE). + case cve = "CVE" + /// Cayman Dollars (KYD). + case kyd = "KYD" + /// Central African CFA Franc (XAF). + case xaf = "XAF" + /// Chilean Peso (CLP). + case clp = "CLP" + /// Chinese Yuan Renminbi (CNY). + case cny = "CNY" + /// Colombian Peso (COP). + case cop = "COP" + /// Comorian Franc (KMF). + case kmf = "KMF" + /// Congolese franc (CDF). + case cdf = "CDF" + /// Costa Rican Colones (CRC). + case crc = "CRC" + /// Croatian Kuna (HRK). + case hrk = "HRK" + /// Czech Koruny (CZK). + case czk = "CZK" + /// Danish Kroner (DKK). + case dkk = "DKK" + /// Dominican Peso (DOP). + case dop = "DOP" + /// East Caribbean Dollar (XCD). + case xcd = "XCD" + /// Egyptian Pound (EGP). + case egp = "EGP" + /// Eritrean Nakfa (ERN). + case ern = "ERN" + /// Ethiopian Birr (ETB). + case etb = "ETB" + /// Falkland Islands Pounds (FKP). + case fkp = "FKP" + /// CFP Franc (XPF). + case xpf = "XPF" + /// Fijian Dollars (FJD). + case fjd = "FJD" + /// Gibraltar Pounds (GIP). + case gip = "GIP" + /// Gambian Dalasi (GMD). + case gmd = "GMD" + /// Ghanaian Cedi (GHS). + case ghs = "GHS" + /// Guatemalan Quetzal (GTQ). + case gtq = "GTQ" + /// Guyanese Dollar (GYD). + case gyd = "GYD" + /// Georgian Lari (GEL). + case gel = "GEL" + /// Haitian Gourde (HTG). + case htg = "HTG" + /// Honduran Lempira (HNL). + case hnl = "HNL" + /// Hong Kong Dollars (HKD). + case hkd = "HKD" + /// Hungarian Forint (HUF). + case huf = "HUF" + /// Icelandic Kronur (ISK). + case isk = "ISK" + /// Indian Rupees (INR). case inr = "INR" + /// Indonesian Rupiah (IDR). + case idr = "IDR" + /// Israeli New Shekel (NIS). + case ils = "ILS" + /// Iraqi Dinar (IQD). + case iqd = "IQD" + /// Jamaican Dollars (JMD). + case jmd = "JMD" + /// Japanese Yen (JPY). + case jpy = "JPY" + /// Jersey Pound. + case jep = "JEP" + /// Jordanian Dinar (JOD). + case jod = "JOD" + /// Kazakhstani Tenge (KZT). + case kzt = "KZT" + /// Kenyan Shilling (KES). + case kes = "KES" + /// Kiribati Dollar (KID). + case kid = "KID" + /// Kuwaiti Dinar (KWD). + case kwd = "KWD" + /// Kyrgyzstani Som (KGS). + case kgs = "KGS" + /// Laotian Kip (LAK). + case lak = "LAK" + /// Latvian Lati (LVL). + case lvl = "LVL" + /// Lebanese Pounds (LBP). + case lbp = "LBP" + /// Lesotho Loti (LSL). + case lsl = "LSL" + /// Liberian Dollar (LRD). + case lrd = "LRD" + /// Lithuanian Litai (LTL). + case ltl = "LTL" + /// Malagasy Ariary (MGA). + case mga = "MGA" + /// Macedonia Denar (MKD). + case mkd = "MKD" + /// Macanese Pataca (MOP). + case mop = "MOP" + /// Malawian Kwacha (MWK). + case mwk = "MWK" + /// Maldivian Rufiyaa (MVR). + case mvr = "MVR" + /// Mauritanian Ouguiya (MRU). + case mru = "MRU" + /// Mexican Pesos (MXN). case mxn = "MXN" + /// Malaysian Ringgits (MYR). + case myr = "MYR" + /// Mauritian Rupee (MUR). + case mur = "MUR" + /// Moldovan Leu (MDL). + case mdl = "MDL" + /// Moroccan Dirham. + case mad = "MAD" + /// Mongolian Tugrik. + case mnt = "MNT" + /// Mozambican Metical. + case mzn = "MZN" + /// Namibian Dollar. + case nad = "NAD" + /// Nepalese Rupee (NPR). + case npr = "NPR" + /// Netherlands Antillean Guilder. + case ang = "ANG" + /// New Zealand Dollars (NZD). case nzd = "NZD" - case krw = "KRW" - case sgd = "SGD" - case hkd = "HKD" - case sek = "SEK" - case dkk = "DKK" + /// Nicaraguan Córdoba (NIO). + case nio = "NIO" + /// Nigerian Naira (NGN). + case ngn = "NGN" + /// Norwegian Kroner (NOK). case nok = "NOK" - case chf = "CHF" + /// Omani Rial (OMR). + case omr = "OMR" + /// Panamian Balboa (PAB). + case pab = "PAB" + /// Pakistani Rupee (PKR). + case pkr = "PKR" + /// Papua New Guinean Kina (PGK). + case pgk = "PGK" + /// Paraguayan Guarani (PYG). + case pyg = "PYG" + /// Peruvian Nuevo Sol (PEN). + case pen = "PEN" + /// Philippine Peso (PHP). + case php = "PHP" + /// Polish Zlotych (PLN). case pln = "PLN" - case czk = "CZK" - case ils = "ILS" - case aed = "AED" + /// Qatari Rial (QAR). + case qar = "QAR" + /// Romanian Lei (RON). + case ron = "RON" + /// Russian Rubles (RUB). + case rub = "RUB" + /// Rwandan Franc (RWF). + case rwf = "RWF" + /// Samoan Tala (WST). + case wst = "WST" + /// Saint Helena Pounds (SHP). + case shp = "SHP" + /// Saudi Riyal (SAR). case sar = "SAR" + /// Serbian dinar (RSD). + case rsd = "RSD" + /// Seychellois Rupee (SCR). + case scr = "SCR" + /// Singapore Dollars (SGD). + case sgd = "SGD" + /// Sudanese Pound (SDG). + case sdg = "SDG" + /// Somali Shilling (SOS). + case sos = "SOS" + /// Syrian Pound (SYP). + case syp = "SYP" + /// South African Rand (ZAR). case zar = "ZAR" - case php = "PHP" - case myr = "MYR" - case thb = "THB" - case vnd = "VND" - case idr = "IDR" + /// South Korean Won (KRW). + case krw = "KRW" + /// South Sudanese Pound (SSP). + case ssp = "SSP" + /// Solomon Islands Dollar (SBD). + case sbd = "SBD" + /// Sri Lankan Rupees (LKR). + case lkr = "LKR" + /// Surinamese Dollar (SRD). + case srd = "SRD" + /// Swazi Lilangeni (SZL). + case szl = "SZL" + /// Swedish Kronor (SEK). + case sek = "SEK" + /// Swiss Francs (CHF). + case chf = "CHF" + /// Taiwan Dollars (TWD). case twd = "TWD" - case cop = "COP" - case ars = "ARS" - case clp = "CLP" - case pen = "PEN" - case ron = "RON" - case huf = "HUF" - case bgn = "BGN" - case hrk = "HRK" + /// Thai baht (THB). + case thb = "THB" + /// Tanzanian Shilling (TZS). + case tzs = "TZS" + /// Trinidad and Tobago Dollars (TTD). + case ttd = "TTD" + /// Tunisian Dinar (TND). + case tnd = "TND" + /// Turkish Lira (TRY). case `try` = "TRY" + /// Turkmenistani Manat (TMT). + case tmt = "TMT" + /// Ugandan Shilling (UGX). + case ugx = "UGX" + /// Ukrainian Hryvnia (UAH). + case uah = "UAH" + /// United Arab Emirates Dirham (AED). + case aed = "AED" + /// Uruguayan Pesos (UYU). + case uyu = "UYU" + /// Uzbekistan som (UZS). + case uzs = "UZS" + /// Vanuatu Vatu (VUV). + case vuv = "VUV" + /// Venezuelan Bolivares Soberanos (VES). + case ves = "VES" + /// Vietnamese đồng (VND). + case vnd = "VND" + /// West African CFA franc (XOF). + case xof = "XOF" + /// Yemeni Rial (YER). + case yer = "YER" + /// Zambian Kwacha (ZMW). + case zmw = "ZMW" + /// Belarusian Ruble (BYN). + case byn = "BYN" + /// Belarusian Ruble (BYR). + /// + /// **Deprecated**: `BYR` is deprecated. Use `BYN` available from version `2021-01` onwards instead. + case byr = "BYR" + /// Djiboutian Franc (DJF). + case djf = "DJF" + /// Guinean Franc (GNF). + case gnf = "GNF" + /// Iranian Rial (IRR). + case irr = "IRR" + /// Libyan Dinar (LYD). + case lyd = "LYD" + /// Sierra Leonean Leone (SLL). + case sll = "SLL" + /// Sao Tome And Principe Dobra (STD). + /// + /// **Deprecated**: `STD` is deprecated. Use `STN` available from version `2022-07` onwards instead. + case std = "STD" + /// Sao Tome And Principe Dobra (STN). + case stn = "STN" + /// Tajikistani Somoni (TJS). + case tjs = "TJS" + /// Tongan Pa'anga (TOP). + case top = "TOP" + /// Venezuelan Bolivares (VED). + case ved = "VED" + /// Venezuelan Bolivares (VEF). + /// + /// **Deprecated**: `VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead. + case vef = "VEF" + /// Unrecognized currency. + case xxx = "XXX" } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/DeliveryAddressValidationStrategy.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/DeliveryAddressValidationStrategy.graphql.swift new file mode 100644 index 000000000..ecc12a00a --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/DeliveryAddressValidationStrategy.graphql.swift @@ -0,0 +1,17 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) import ApolloAPI + +extension Storefront { + /// Controls how delivery addresses are validated during cart operations. The default validation checks only the country code, while strict validation verifies all address fields against Shopify's checkout rules and rejects invalid addresses. + /// + /// Used by [`DeliveryAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/DeliveryAddressInput) when setting buyer identity preferences, and by [`CartSelectableAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressInput) and [`CartSelectableAddressUpdateInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressUpdateInput) when managing cart delivery addresses. + enum DeliveryAddressValidationStrategy: String, EnumType { + /// Only the country code is validated. + case countryCodeOnly = "COUNTRY_CODE_ONLY" + /// Strict validation is performed, i.e. all fields in the address are validated + /// according to Shopify's checkout rules. If the address fails validation, the cart will not be updated. + case strict = "STRICT" + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/DeliveryMethodType.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/DeliveryMethodType.graphql.swift index 58a14ab13..a7aabf214 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/DeliveryMethodType.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/DeliveryMethodType.graphql.swift @@ -1,14 +1,22 @@ // @generated // This file was automatically generated and should not be edited. -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { + /// List of different delivery method types. enum DeliveryMethodType: String, EnumType { + /// Shipping. case shipping = "SHIPPING" + /// Local Pickup. case pickUp = "PICK_UP" + /// Retail. case retail = "RETAIL" + /// Local Delivery. case local = "LOCAL" + /// Shipping to a Pickup Point. + case pickupPoint = "PICKUP_POINT" + /// None. case none = "NONE" } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/LanguageCode.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/LanguageCode.graphql.swift index c538c8b6b..245b415fb 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/LanguageCode.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/LanguageCode.graphql.swift @@ -1,48 +1,300 @@ // @generated // This file was automatically generated and should not be edited. -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { + /// Supported languages for retrieving translated storefront content. Pass a language code to the [`@inContext`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/in-context) directive to return product titles, descriptions, and other translatable fields in that language. + /// + /// The [`Localization`](https://shopify.dev/docs/api/storefront/current/objects/Localization) object provides the list of available languages for the active country, and each [`Country`](https://shopify.dev/docs/api/storefront/current/objects/Country) in [`availableCountries`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.availableCountries) includes its own available languages. enum LanguageCode: String, EnumType { - case en = "EN" - case fr = "FR" + /// Afrikaans. + case af = "AF" + /// Akan. + case ak = "AK" + /// Amharic. + case am = "AM" + /// Arabic. + case ar = "AR" + /// Assamese. + case `as` = "AS" + /// Azerbaijani. + case az = "AZ" + /// Belarusian. + case be = "BE" + /// Bulgarian. + case bg = "BG" + /// Bambara. + case bm = "BM" + /// Bangla. + case bn = "BN" + /// Tibetan. + case bo = "BO" + /// Breton. + case br = "BR" + /// Bosnian. + case bs = "BS" + /// Catalan. + case ca = "CA" + /// Chechen. + case ce = "CE" + /// Central Kurdish. + case ckb = "CKB" + /// Czech. + case cs = "CS" + /// Welsh. + case cy = "CY" + /// Danish. + case da = "DA" + /// German. case de = "DE" - case ja = "JA" + /// Dzongkha. + case dz = "DZ" + /// Ewe. + case ee = "EE" + /// Greek. + case el = "EL" + /// English. + case en = "EN" + /// Esperanto. + case eo = "EO" + /// Spanish. case es = "ES" + /// Estonian. + case et = "ET" + /// Basque. + case eu = "EU" + /// Persian. + case fa = "FA" + /// Fulah. + case ff = "FF" + /// Finnish. + case fi = "FI" + /// Filipino. + case fil = "FIL" + /// Faroese. + case fo = "FO" + /// French. + case fr = "FR" + /// Western Frisian. + case fy = "FY" + /// Irish. + case ga = "GA" + /// Scottish Gaelic. + case gd = "GD" + /// Galician. + case gl = "GL" + /// Gujarati. + case gu = "GU" + /// Manx. + case gv = "GV" + /// Hausa. + case ha = "HA" + /// Hebrew. + case he = "HE" + /// Hindi. + case hi = "HI" + /// Croatian. + case hr = "HR" + /// Hungarian. + case hu = "HU" + /// Armenian. + case hy = "HY" + /// Interlingua. + case ia = "IA" + /// Indonesian. + case id = "ID" + /// Igbo. + case ig = "IG" + /// Sichuan Yi. + case ii = "II" + /// Icelandic. + case `is` = "IS" + /// Italian. case it = "IT" - case nl = "NL" - case pt = "PT" - case ptBr = "PT_BR" - case ptPt = "PT_PT" - case zh = "ZH" - case zhCn = "ZH_CN" - case zhTw = "ZH_TW" + /// Japanese. + case ja = "JA" + /// Javanese. + case jv = "JV" + /// Georgian. + case ka = "KA" + /// Kikuyu. + case ki = "KI" + /// Kazakh. + case kk = "KK" + /// Kalaallisut. + case kl = "KL" + /// Khmer. + case km = "KM" + /// Kannada. + case kn = "KN" + /// Korean. case ko = "KO" - case ar = "AR" - case he = "HE" - case ru = "RU" - case sv = "SV" - case da = "DA" + /// Kashmiri. + case ks = "KS" + /// Kurdish. + case ku = "KU" + /// Cornish. + case kw = "KW" + /// Kyrgyz. + case ky = "KY" + /// Luxembourgish. + case lb = "LB" + /// Ganda. + case lg = "LG" + /// Lingala. + case ln = "LN" + /// Lao. + case lo = "LO" + /// Lithuanian. + case lt = "LT" + /// Luba-Katanga. + case lu = "LU" + /// Latvian. + case lv = "LV" + /// Malagasy. + case mg = "MG" + /// Māori. + case mi = "MI" + /// Macedonian. + case mk = "MK" + /// Malayalam. + case ml = "ML" + /// Mongolian. + case mn = "MN" + /// Marathi. + case mr = "MR" + /// Malay. + case ms = "MS" + /// Maltese. + case mt = "MT" + /// Burmese. + case my = "MY" + /// Norwegian (Bokmål). + case nb = "NB" + /// North Ndebele. + case nd = "ND" + /// Nepali. + case ne = "NE" + /// Dutch. + case nl = "NL" + /// Norwegian Nynorsk. + case nn = "NN" + /// Norwegian. case no = "NO" - case fi = "FI" + /// Oromo. + case om = "OM" + /// Odia. + case or = "OR" + /// Ossetic. + case os = "OS" + /// Punjabi. + case pa = "PA" + /// Polish. case pl = "PL" - case cs = "CS" - case hu = "HU" + /// Pashto. + case ps = "PS" + /// Portuguese (Brazil). + case ptBr = "PT_BR" + /// Portuguese (Portugal). + case ptPt = "PT_PT" + /// Quechua. + case qu = "QU" + /// Romansh. + case rm = "RM" + /// Rundi. + case rn = "RN" + /// Romanian. case ro = "RO" - case bg = "BG" - case hr = "HR" + /// Russian. + case ru = "RU" + /// Kinyarwanda. + case rw = "RW" + /// Sanskrit. + case sa = "SA" + /// Sardinian. + case sc = "SC" + /// Sindhi. + case sd = "SD" + /// Northern Sami. + case se = "SE" + /// Sango. + case sg = "SG" + /// Sinhala. + case si = "SI" + /// Slovak. case sk = "SK" + /// Slovenian. case sl = "SL" - case lt = "LT" - case lv = "LV" - case et = "ET" - case el = "EL" - case tr = "TR" + /// Shona. + case sn = "SN" + /// Somali. + case so = "SO" + /// Albanian. + case sq = "SQ" + /// Serbian. + case sr = "SR" + /// Sundanese. + case su = "SU" + /// Swedish. + case sv = "SV" + /// Swahili. + case sw = "SW" + /// Tamil. + case ta = "TA" + /// Telugu. + case te = "TE" + /// Tajik. + case tg = "TG" + /// Thai. case th = "TH" + /// Tigrinya. + case ti = "TI" + /// Turkmen. + case tk = "TK" + /// Tongan. + case to = "TO" + /// Turkish. + case tr = "TR" + /// Tatar. + case tt = "TT" + /// Uyghur. + case ug = "UG" + /// Ukrainian. + case uk = "UK" + /// Urdu. + case ur = "UR" + /// Uzbek. + case uz = "UZ" + /// Vietnamese. case vi = "VI" - case id = "ID" - case ms = "MS" - case hi = "HI" + /// Wolof. + case wo = "WO" + /// Xhosa. + case xh = "XH" + /// Yiddish. + case yi = "YI" + /// Yoruba. + case yo = "YO" + /// Chinese (Simplified). + case zhCn = "ZH_CN" + /// Chinese (Traditional). + case zhTw = "ZH_TW" + /// Zulu. + case zu = "ZU" + /// Chinese. + case zh = "ZH" + /// Portuguese. + case pt = "PT" + /// Church Slavic. + case cu = "CU" + /// Volapük. + case vo = "VO" + /// Latin. + case la = "LA" + /// Serbo-Croatian. + case sh = "SH" + /// Moldavian. + case mo = "MO" } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/PreferenceDeliveryMethodType.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/PreferenceDeliveryMethodType.graphql.swift new file mode 100644 index 000000000..6ab63f63a --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Enums/PreferenceDeliveryMethodType.graphql.swift @@ -0,0 +1,16 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) import ApolloAPI + +extension Storefront { + /// The preferred delivery methods such as shipping, local pickup or through pickup points. + enum PreferenceDeliveryMethodType: String, EnumType { + /// A delivery method used to send items directly to a buyer’s specified address. + case shipping = "SHIPPING" + /// A delivery method used to let buyers receive items directly from a specific location within an area. + case pickUp = "PICK_UP" + /// A delivery method used to let buyers collect purchases at designated locations like parcel lockers. + case pickupPoint = "PICKUP_POINT" + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/AttributeInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/AttributeInput.graphql.swift new file mode 100644 index 000000000..11058cc4c --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/AttributeInput.graphql.swift @@ -0,0 +1,37 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// A custom key-value pair that stores additional information on a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart) or [cart line](https://shopify.dev/docs/api/storefront/current/objects/CartLine). Attributes capture additional information like gift messages, special instructions, or custom order details. Learn more about [managing carts with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). + struct AttributeInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + key: String, + value: String + ) { + __data = InputDict([ + "key": key, + "value": value + ]) + } + + /// Key or name of the attribute. + var key: String { + get { __data["key"] } + set { __data["key"] = newValue } + } + + /// Value of the attribute. + var value: String { + get { __data["value"] } + set { __data["value"] = newValue } + } + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartAddressInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartAddressInput.graphql.swift new file mode 100644 index 000000000..acc3c221b --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartAddressInput.graphql.swift @@ -0,0 +1,37 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// Specifies a delivery address for a cart. Provide either a [`deliveryAddress`](https://shopify.dev/docs/api/storefront/current/input-objects/CartAddressInput#fields-deliveryAddress) with full address details, or a [`copyFromCustomerAddressId`](https://shopify.dev/docs/api/storefront/current/input-objects/CartAddressInput#fields-copyFromCustomerAddressId) to copy from an existing customer address. Used by [`CartSelectableAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressInput) and [`CartSelectableAddressUpdateInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressUpdateInput). + struct CartAddressInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + deliveryAddress: GraphQLNullable = nil, + copyFromCustomerAddressId: GraphQLNullable = nil + ) { + __data = InputDict([ + "deliveryAddress": deliveryAddress, + "copyFromCustomerAddressId": copyFromCustomerAddressId + ]) + } + + /// A delivery address stored on this cart. + var deliveryAddress: GraphQLNullable { + get { __data["deliveryAddress"] } + set { __data["deliveryAddress"] = newValue } + } + + /// Copies details from the customer address to an address on this cart. + var copyFromCustomerAddressId: GraphQLNullable { + get { __data["copyFromCustomerAddressId"] } + set { __data["copyFromCustomerAddressId"] = newValue } + } + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift index 8a6fa6e0a..e2cdd085f 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift @@ -1,9 +1,15 @@ // @generated // This file was automatically generated and should not be edited. -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { + /// The input fields for identifying the buyer associated with a cart. Buyer identity determines [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) and should match the customer's shipping address. + /// + /// Used by [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) and [`cartBuyerIdentityUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartBuyerIdentityUpdate) to set contact information, location, and checkout preferences. + /// + /// > Note: + /// > Preferences prefill fields at checkout but don't sync back to the cart if overwritten. struct CartBuyerIdentityInput: InputObject { private(set) var __data: InputDict @@ -14,42 +20,56 @@ extension Storefront { init( email: GraphQLNullable = nil, phone: GraphQLNullable = nil, + companyLocationId: GraphQLNullable = nil, countryCode: GraphQLNullable> = nil, customerAccessToken: GraphQLNullable = nil, - deliveryAddressPreferences: GraphQLNullable<[DeliveryAddressInput]> = nil + preferences: GraphQLNullable = nil ) { __data = InputDict([ "email": email, "phone": phone, + "companyLocationId": companyLocationId, "countryCode": countryCode, "customerAccessToken": customerAccessToken, - "deliveryAddressPreferences": deliveryAddressPreferences + "preferences": preferences ]) } + /// The email address of the buyer that is interacting with the cart. var email: GraphQLNullable { get { __data["email"] } set { __data["email"] = newValue } } + /// The phone number of the buyer that is interacting with the cart. var phone: GraphQLNullable { get { __data["phone"] } set { __data["phone"] = newValue } } + /// The company location of the buyer that is interacting with the cart. + var companyLocationId: GraphQLNullable { + get { __data["companyLocationId"] } + set { __data["companyLocationId"] = newValue } + } + + /// The country where the buyer is located. var countryCode: GraphQLNullable> { get { __data["countryCode"] } set { __data["countryCode"] = newValue } } + /// The access token used to identify the customer associated with the cart. var customerAccessToken: GraphQLNullable { get { __data["customerAccessToken"] } set { __data["customerAccessToken"] = newValue } } - var deliveryAddressPreferences: GraphQLNullable<[DeliveryAddressInput]> { - get { __data["deliveryAddressPreferences"] } - set { __data["deliveryAddressPreferences"] = newValue } + /// A set of preferences tied to the buyer interacting with the cart. Preferences are used to prefill fields in at checkout to streamline information collection. + /// Preferences are not synced back to the cart if they are overwritten. + var preferences: GraphQLNullable { + get { __data["preferences"] } + set { __data["preferences"] = newValue } } } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/MailingAddressInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryAddressInput.graphql.swift similarity index 60% rename from Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/MailingAddressInput.graphql.swift rename to Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryAddressInput.graphql.swift index 0c7c0e696..2513370b4 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/MailingAddressInput.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryAddressInput.graphql.swift @@ -1,10 +1,11 @@ // @generated // This file was automatically generated and should not be edited. -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { - struct MailingAddressInput: InputObject { + /// The input fields to create or update a cart address. + struct CartDeliveryAddressInput: InputObject { private(set) var __data: InputDict init(_ data: InputDict) { @@ -16,11 +17,11 @@ extension Storefront { address2: GraphQLNullable = nil, city: GraphQLNullable = nil, company: GraphQLNullable = nil, - country: GraphQLNullable = nil, + countryCode: GraphQLNullable> = nil, firstName: GraphQLNullable = nil, lastName: GraphQLNullable = nil, phone: GraphQLNullable = nil, - province: GraphQLNullable = nil, + provinceCode: GraphQLNullable = nil, zip: GraphQLNullable = nil ) { __data = InputDict([ @@ -28,60 +29,72 @@ extension Storefront { "address2": address2, "city": city, "company": company, - "country": country, + "countryCode": countryCode, "firstName": firstName, "lastName": lastName, "phone": phone, - "province": province, + "provinceCode": provinceCode, "zip": zip ]) } + /// The first line of the address. Typically the street address or PO Box number. var address1: GraphQLNullable { get { __data["address1"] } set { __data["address1"] = newValue } } + /// The second line of the address. Typically the number of the apartment, suite, or unit. var address2: GraphQLNullable { get { __data["address2"] } set { __data["address2"] = newValue } } + /// The name of the city, district, village, or town. var city: GraphQLNullable { get { __data["city"] } set { __data["city"] = newValue } } + /// The name of the customer's company or organization. var company: GraphQLNullable { get { __data["company"] } set { __data["company"] = newValue } } - var country: GraphQLNullable { - get { __data["country"] } - set { __data["country"] = newValue } + /// The name of the country. + var countryCode: GraphQLNullable> { + get { __data["countryCode"] } + set { __data["countryCode"] = newValue } } + /// The first name of the customer. var firstName: GraphQLNullable { get { __data["firstName"] } set { __data["firstName"] = newValue } } + /// The last name of the customer. var lastName: GraphQLNullable { get { __data["lastName"] } set { __data["lastName"] = newValue } } + /// A unique phone number for the customer. + /// + /// Formatted using E.164 standard. For example, _+16135551111_. var phone: GraphQLNullable { get { __data["phone"] } set { __data["phone"] = newValue } } - var province: GraphQLNullable { - get { __data["province"] } - set { __data["province"] = newValue } + /// The region of the address, such as the province, state, or district. + var provinceCode: GraphQLNullable { + get { __data["provinceCode"] } + set { __data["provinceCode"] = newValue } } + /// The zip or postal code of the address. var zip: GraphQLNullable { get { __data["zip"] } set { __data["zip"] = newValue } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryCoordinatesPreferenceInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryCoordinatesPreferenceInput.graphql.swift new file mode 100644 index 000000000..eb0f0c3ed --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryCoordinatesPreferenceInput.graphql.swift @@ -0,0 +1,47 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// Preferred location used to find the closest pick up point based on coordinates. + struct CartDeliveryCoordinatesPreferenceInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + latitude: Double, + longitude: Double, + countryCode: GraphQLEnum + ) { + __data = InputDict([ + "latitude": latitude, + "longitude": longitude, + "countryCode": countryCode + ]) + } + + /// The geographic latitude for a given location. Coordinates are required in order to set pickUpHandle for pickup points. + var latitude: Double { + get { __data["latitude"] } + set { __data["latitude"] = newValue } + } + + /// The geographic longitude for a given location. Coordinates are required in order to set pickUpHandle for pickup points. + var longitude: Double { + get { __data["longitude"] } + set { __data["longitude"] = newValue } + } + + /// The two-letter code for the country of the preferred location. + /// + /// For example, US. + var countryCode: GraphQLEnum { + get { __data["countryCode"] } + set { __data["countryCode"] = newValue } + } + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryInput.graphql.swift new file mode 100644 index 000000000..19432992e --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryInput.graphql.swift @@ -0,0 +1,31 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// The input fields for the cart's delivery properties. + struct CartDeliveryInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + addresses: GraphQLNullable<[CartSelectableAddressInput]> = nil + ) { + __data = InputDict([ + "addresses": addresses + ]) + } + + /// Selectable addresses to present to the buyer on the cart. + /// + /// The input must not contain more than `250` values. + var addresses: GraphQLNullable<[CartSelectableAddressInput]> { + get { __data["addresses"] } + set { __data["addresses"] = newValue } + } + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryPreferenceInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryPreferenceInput.graphql.swift new file mode 100644 index 000000000..7ccd890c5 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartDeliveryPreferenceInput.graphql.swift @@ -0,0 +1,50 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// Delivery preferences can be used to prefill the delivery section at checkout. + struct CartDeliveryPreferenceInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + deliveryMethod: GraphQLNullable<[GraphQLEnum]> = nil, + pickupHandle: GraphQLNullable<[String]> = nil, + coordinates: GraphQLNullable = nil + ) { + __data = InputDict([ + "deliveryMethod": deliveryMethod, + "pickupHandle": pickupHandle, + "coordinates": coordinates + ]) + } + + /// The preferred delivery methods such as shipping, local pickup or through pickup points. + /// + /// The input must not contain more than `250` values. + var deliveryMethod: GraphQLNullable<[GraphQLEnum]> { + get { __data["deliveryMethod"] } + set { __data["deliveryMethod"] = newValue } + } + + /// The pickup handle prefills checkout fields with the location for either local pickup or pickup points delivery methods. + /// It accepts both location ID for local pickup and external IDs for pickup points. + /// + /// The input must not contain more than `250` values. + var pickupHandle: GraphQLNullable<[String]> { + get { __data["pickupHandle"] } + set { __data["pickupHandle"] = newValue } + } + + /// The coordinates of a delivery location in order of preference. + var coordinates: GraphQLNullable { + get { __data["coordinates"] } + set { __data["coordinates"] = newValue } + } + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartInput.graphql.swift index bcfebdb78..7faf377f9 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartInput.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartInput.graphql.swift @@ -1,9 +1,12 @@ // @generated // This file was automatically generated and should not be edited. -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { + /// The input fields for creating a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Used by the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation. + /// + /// Accepts merchandise lines, discount codes, gift card codes, and a note. You can also set custom attributes, metafields, buyer identity for international pricing, and delivery addresses. struct CartInput: InputObject { private(set) var __data: InputDict @@ -12,23 +15,85 @@ extension Storefront { } init( + attributes: GraphQLNullable<[AttributeInput]> = nil, lines: GraphQLNullable<[CartLineInput]> = nil, - buyerIdentity: GraphQLNullable = nil + discountCodes: GraphQLNullable<[String]> = nil, + giftCardCodes: GraphQLNullable<[String]> = nil, + note: GraphQLNullable = nil, + buyerIdentity: GraphQLNullable = nil, + delivery: GraphQLNullable = nil, + metafields: GraphQLNullable<[CartInputMetafieldInput]> = nil ) { __data = InputDict([ + "attributes": attributes, "lines": lines, - "buyerIdentity": buyerIdentity + "discountCodes": discountCodes, + "giftCardCodes": giftCardCodes, + "note": note, + "buyerIdentity": buyerIdentity, + "delivery": delivery, + "metafields": metafields ]) } + /// An array of key-value pairs that contains additional information about the cart. + /// + /// The input must not contain more than `250` values. + var attributes: GraphQLNullable<[AttributeInput]> { + get { __data["attributes"] } + set { __data["attributes"] = newValue } + } + + /// A list of merchandise lines to add to the cart. + /// + /// The input must not contain more than `250` values. var lines: GraphQLNullable<[CartLineInput]> { get { __data["lines"] } set { __data["lines"] = newValue } } + /// The case-insensitive discount codes that the customer added at checkout. + /// + /// The input must not contain more than `250` values. + var discountCodes: GraphQLNullable<[String]> { + get { __data["discountCodes"] } + set { __data["discountCodes"] = newValue } + } + + /// The case-insensitive gift card codes. + /// + /// The input must not contain more than `250` values. + var giftCardCodes: GraphQLNullable<[String]> { + get { __data["giftCardCodes"] } + set { __data["giftCardCodes"] = newValue } + } + + /// A note that's associated with the cart. For example, the note can be a personalized message to the buyer. + var note: GraphQLNullable { + get { __data["note"] } + set { __data["note"] = newValue } + } + + /// The customer associated with the cart. Used to determine [international pricing] + /// (https://shopify.dev/custom-storefronts/internationalization/international-pricing). + /// Buyer identity should match the customer's shipping address. var buyerIdentity: GraphQLNullable { get { __data["buyerIdentity"] } set { __data["buyerIdentity"] = newValue } } + + /// The delivery-related fields for the cart. + var delivery: GraphQLNullable { + get { __data["delivery"] } + set { __data["delivery"] = newValue } + } + + /// The metafields to associate with this cart. + /// + /// The input must not contain more than `250` values. + var metafields: GraphQLNullable<[CartInputMetafieldInput]> { + get { __data["metafields"] } + set { __data["metafields"] = newValue } + } } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartInputMetafieldInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartInputMetafieldInput.graphql.swift new file mode 100644 index 000000000..353b89f09 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartInputMetafieldInput.graphql.swift @@ -0,0 +1,48 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// The input fields for a cart metafield value to set. + /// + /// Cart metafields will be copied to order metafields at order creation time if there is a matching order metafield definition with the [`cart to order copyable`](https://shopify.dev/docs/apps/build/metafields/use-metafield-capabilities#cart-to-order-copyable) capability enabled. + struct CartInputMetafieldInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + key: String, + value: String, + type: String + ) { + __data = InputDict([ + "key": key, + "value": value, + "type": type + ]) + } + + /// The key name of the metafield. + var key: String { + get { __data["key"] } + set { __data["key"] = newValue } + } + + /// The data to store in the cart metafield. The data is always stored as a string, regardless of the metafield's type. + var value: String { + get { __data["value"] } + set { __data["value"] = newValue } + } + + /// The type of data that the cart metafield stores. + /// The type of data must be a [supported type](https://shopify.dev/apps/metafields/types). + var type: String { + get { __data["type"] } + set { __data["type"] = newValue } + } + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartLineInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartLineInput.graphql.swift index d8fb64104..bee7ff32b 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartLineInput.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartLineInput.graphql.swift @@ -1,9 +1,12 @@ // @generated // This file was automatically generated and should not be edited. -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { + /// The input fields for adding a merchandise line to a cart. Each line represents a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) the buyer intends to purchase, along with the quantity and optional [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan) for subscriptions. + /// + /// Used by the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation when creating a cart with initial items, and the [`cartLinesAdd`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesAdd) mutation when adding items to an existing cart. struct CartLineInput: InputObject { private(set) var __data: InputDict @@ -12,23 +15,43 @@ extension Storefront { } init( + attributes: GraphQLNullable<[AttributeInput]> = nil, + quantity: GraphQLNullable = nil, merchandiseId: ID, - quantity: GraphQLNullable = nil + sellingPlanId: GraphQLNullable = nil ) { __data = InputDict([ + "attributes": attributes, + "quantity": quantity, "merchandiseId": merchandiseId, - "quantity": quantity + "sellingPlanId": sellingPlanId ]) } + /// An array of key-value pairs that contains additional information about the merchandise line. + /// + /// The input must not contain more than `250` values. + var attributes: GraphQLNullable<[AttributeInput]> { + get { __data["attributes"] } + set { __data["attributes"] = newValue } + } + + /// The quantity of the merchandise. + var quantity: GraphQLNullable { + get { __data["quantity"] } + set { __data["quantity"] = newValue } + } + + /// The ID of the merchandise that the buyer intends to purchase. var merchandiseId: ID { get { __data["merchandiseId"] } set { __data["merchandiseId"] = newValue } } - var quantity: GraphQLNullable { - get { __data["quantity"] } - set { __data["quantity"] = newValue } + /// The ID of the selling plan that the merchandise is being purchased with. + var sellingPlanId: GraphQLNullable { + get { __data["sellingPlanId"] } + set { __data["sellingPlanId"] = newValue } } } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartLineUpdateInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartLineUpdateInput.graphql.swift index cf9d82b5e..6f4e40d49 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartLineUpdateInput.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartLineUpdateInput.graphql.swift @@ -1,9 +1,12 @@ // @generated // This file was automatically generated and should not be edited. -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { + /// The input fields for updating a merchandise line in a cart. Used by the [`cartLinesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesUpdate) mutation. + /// + /// Specify the line item's [`id`](https://shopify.dev/docs/api/storefront/current/input-objects/CartLineUpdateInput#fields-id) along with any fields to modify. You can change the quantity, swap the merchandise, update custom attributes, or associate a different selling plan. struct CartLineUpdateInput: InputObject { private(set) var __data: InputDict @@ -13,22 +16,50 @@ extension Storefront { init( id: ID, - quantity: GraphQLNullable = nil + quantity: GraphQLNullable = nil, + merchandiseId: GraphQLNullable = nil, + attributes: GraphQLNullable<[AttributeInput]> = nil, + sellingPlanId: GraphQLNullable = nil ) { __data = InputDict([ "id": id, - "quantity": quantity + "quantity": quantity, + "merchandiseId": merchandiseId, + "attributes": attributes, + "sellingPlanId": sellingPlanId ]) } + /// The ID of the merchandise line. var id: ID { get { __data["id"] } set { __data["id"] = newValue } } - var quantity: GraphQLNullable { + /// The quantity of the line item. + var quantity: GraphQLNullable { get { __data["quantity"] } set { __data["quantity"] = newValue } } + + /// The ID of the merchandise for the line item. + var merchandiseId: GraphQLNullable { + get { __data["merchandiseId"] } + set { __data["merchandiseId"] = newValue } + } + + /// An array of key-value pairs that contains additional information about the merchandise line. + /// + /// The input must not contain more than `250` values. + var attributes: GraphQLNullable<[AttributeInput]> { + get { __data["attributes"] } + set { __data["attributes"] = newValue } + } + + /// The ID of the selling plan that the merchandise is being purchased with. + var sellingPlanId: GraphQLNullable { + get { __data["sellingPlanId"] } + set { __data["sellingPlanId"] = newValue } + } } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartPreferencesInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartPreferencesInput.graphql.swift new file mode 100644 index 000000000..da09e7e98 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartPreferencesInput.graphql.swift @@ -0,0 +1,40 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// The input fields represent preferences for the buyer that is interacting with the cart. + struct CartPreferencesInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + delivery: GraphQLNullable = nil, + wallet: GraphQLNullable<[String]> = nil + ) { + __data = InputDict([ + "delivery": delivery, + "wallet": wallet + ]) + } + + /// Delivery preferences can be used to prefill the delivery section in at checkout. + var delivery: GraphQLNullable { + get { __data["delivery"] } + set { __data["delivery"] = newValue } + } + + /// Wallet preferences are used to populate relevant payment fields in the checkout flow. + /// Accepted value: `["shop_pay"]`. + /// + /// The input must not contain more than `250` values. + var wallet: GraphQLNullable<[String]> { + get { __data["wallet"] } + set { __data["wallet"] = newValue } + } + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartSelectableAddressInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartSelectableAddressInput.graphql.swift new file mode 100644 index 000000000..2900a7388 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/CartSelectableAddressInput.graphql.swift @@ -0,0 +1,55 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// The input fields for a selectable delivery address to present to the buyer. Used by [`CartDeliveryInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartDeliveryInput) when creating a cart with the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation. + /// + /// You can pre-select an address for the buyer, mark it as one-time use so it isn't saved after checkout, and specify how strictly the address should be validated. + struct CartSelectableAddressInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + address: CartAddressInput, + selected: GraphQLNullable = nil, + oneTimeUse: GraphQLNullable = nil, + validationStrategy: GraphQLNullable> = nil + ) { + __data = InputDict([ + "address": address, + "selected": selected, + "oneTimeUse": oneTimeUse, + "validationStrategy": validationStrategy + ]) + } + + /// Exactly one kind of delivery address. + var address: CartAddressInput { + get { __data["address"] } + set { __data["address"] = newValue } + } + + /// Sets exactly one address as pre-selected for the buyer. + var selected: GraphQLNullable { + get { __data["selected"] } + set { __data["selected"] = newValue } + } + + /// When true, this delivery address will not be associated with the buyer after a successful checkout. + var oneTimeUse: GraphQLNullable { + get { __data["oneTimeUse"] } + set { __data["oneTimeUse"] = newValue } + } + + /// Defines what kind of address validation is requested. + var validationStrategy: GraphQLNullable> { + get { __data["validationStrategy"] } + set { __data["validationStrategy"] = newValue } + } + } +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/DeliveryAddressInput.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/DeliveryAddressInput.graphql.swift deleted file mode 100644 index 7a0dd6581..000000000 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/InputObjects/DeliveryAddressInput.graphql.swift +++ /dev/null @@ -1,27 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -import ApolloAPI - -extension Storefront { - struct DeliveryAddressInput: InputObject { - private(set) var __data: InputDict - - init(_ data: InputDict) { - __data = data - } - - init( - deliveryAddress: GraphQLNullable = nil - ) { - __data = InputDict([ - "deliveryAddress": deliveryAddress - ]) - } - - var deliveryAddress: GraphQLNullable { - get { __data["deliveryAddress"] } - set { __data["deliveryAddress"] = newValue } - } - } -} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/BaseCartLine.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/BaseCartLine.graphql.swift index d478bb188..1b24703ef 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/BaseCartLine.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/BaseCartLine.graphql.swift @@ -4,9 +4,15 @@ import ApolloAPI extension Storefront.Interfaces { + /// Defines the shared fields for items in a shopping cart. Implemented by [`CartLine`](https://shopify.dev/docs/api/storefront/current/objects/CartLine) for individual merchandise and [`ComponentizableCartLine`](https://shopify.dev/docs/api/storefront/current/objects/ComponentizableCartLine) for grouped merchandise like bundles. + /// + /// Each implementation includes the merchandise being purchased, quantity, cost breakdown, applied discounts, custom attributes, and any associated [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan). static let BaseCartLine = ApolloAPI.Interface( name: "BaseCartLine", keyFields: nil, - implementingObjects: ["CartLine"] + implementingObjects: [ + "CartLine", + "ComponentizableCartLine" + ] ) } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/DisplayableError.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/DisplayableError.graphql.swift new file mode 100644 index 000000000..1d681ff57 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/DisplayableError.graphql.swift @@ -0,0 +1,20 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Interfaces { + /// Represents an error in the input of a mutation. + static let DisplayableError = ApolloAPI.Interface( + name: "DisplayableError", + keyFields: nil, + implementingObjects: [ + "CartUserError", + "CustomerUserError", + "MetafieldDeleteUserError", + "MetafieldsSetUserError", + "UserError", + "UserErrorsShopPayPaymentRequestSessionUserErrors" + ] + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/HasMetafields.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/HasMetafields.graphql.swift new file mode 100644 index 000000000..5166414f7 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/HasMetafields.graphql.swift @@ -0,0 +1,31 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Interfaces { + /// Implemented by resources that support custom metadata through [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) objects. Types like [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), and [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) implement this interface to provide consistent access to metafields. + /// + /// You can retrieve a [single metafield](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields#fields-metafield) by namespace and key, or fetch [multiple metafields](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields#fields-metafields) in a single request. If you omit the namespace, then the [app-reserved namespace](https://shopify.dev/docs/apps/build/metafields#app-owned-metafields) is used by default. + static let HasMetafields = ApolloAPI.Interface( + name: "HasMetafields", + keyFields: nil, + implementingObjects: [ + "Article", + "Blog", + "Cart", + "Collection", + "Company", + "CompanyLocation", + "Customer", + "Location", + "Market", + "Order", + "Page", + "Product", + "ProductVariant", + "SellingPlan", + "Shop" + ] + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/Media.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/Media.graphql.swift new file mode 100644 index 000000000..0b485698c --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/Media.graphql.swift @@ -0,0 +1,20 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Interfaces { + /// A common set of fields for media content associated with [products](https://shopify.dev/docs/api/storefront/current/objects/Product). Implementations include [`MediaImage`](https://shopify.dev/docs/api/storefront/current/objects/MediaImage) for Shopify-hosted images, [`Video`](https://shopify.dev/docs/api/storefront/current/objects/Video) for Shopify-hosted videos, [`ExternalVideo`](https://shopify.dev/docs/api/storefront/current/objects/ExternalVideo) for videos hosted on platforms like YouTube or Vimeo, and [`Model3d`](https://shopify.dev/docs/api/storefront/current/objects/Model3d) for 3D models. + /// + /// Each implementation shares fields for alt text, content type, and preview images, while adding type-specific fields like embed URLs for external videos or source files for 3D models. + static let Media = ApolloAPI.Interface( + name: "Media", + keyFields: nil, + implementingObjects: [ + "ExternalVideo", + "MediaImage", + "Model3d", + "Video" + ] + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/Node.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/Node.graphql.swift index b867f9100..d618ab7ad 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/Node.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/Node.graphql.swift @@ -4,12 +4,48 @@ import ApolloAPI extension Storefront.Interfaces { + /// Enables global object identification following the [Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface). Any type implementing this interface has a globally-unique `id` field and can be fetched directly using the [`node`](https://shopify.dev/docs/api/storefront/current/queries/node) or [`nodes`](https://shopify.dev/docs/api/storefront/current/queries/nodes) queries. static let Node = ApolloAPI.Interface( name: "Node", keyFields: nil, implementingObjects: [ + "AppliedGiftCard", + "Article", + "Blog", + "Cart", + "CartLine", + "Collection", + "Comment", + "Company", + "CompanyContact", + "CompanyLocation", + "ComponentizableCartLine", + "ExternalVideo", + "GenericFile", + "Location", + "MailingAddress", + "Market", + "MediaImage", + "MediaPresentation", + "Menu", + "MenuItem", + "Metafield", + "Metaobject", + "Model3d", + "Order", + "Page", + "Product", + "ProductOption", + "ProductOptionValue", "ProductVariant", - "CartLine" + "Shop", + "ShopPayInstallmentsFinancingPlan", + "ShopPayInstallmentsFinancingPlanTerm", + "ShopPayInstallmentsProductVariantPricing", + "ShopPolicy", + "TaxonomyCategory", + "UrlRedirect", + "Video" ] ) } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/OnlineStorePublishable.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/OnlineStorePublishable.graphql.swift new file mode 100644 index 000000000..71b9061f1 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/OnlineStorePublishable.graphql.swift @@ -0,0 +1,20 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Interfaces { + /// Represents a resource that can be published to the Online Store sales channel. + static let OnlineStorePublishable = ApolloAPI.Interface( + name: "OnlineStorePublishable", + keyFields: nil, + implementingObjects: [ + "Article", + "Blog", + "Collection", + "Metaobject", + "Page", + "Product" + ] + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/Trackable.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/Trackable.graphql.swift new file mode 100644 index 000000000..16caf623f --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Interfaces/Trackable.graphql.swift @@ -0,0 +1,19 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Interfaces { + /// Represents a resource that you can track the origin of the search traffic. + static let Trackable = ApolloAPI.Interface( + name: "Trackable", + keyFields: nil, + implementingObjects: [ + "Article", + "Collection", + "Page", + "Product", + "SearchQuerySuggestion" + ] + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/AppliedGiftCard.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/AppliedGiftCard.graphql.swift new file mode 100644 index 000000000..82cdcbf00 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/AppliedGiftCard.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Details about the gift card used on the checkout. + static let AppliedGiftCard = ApolloAPI.Object( + typename: "AppliedGiftCard", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Article.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Article.graphql.swift new file mode 100644 index 000000000..e00a94183 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Article.graphql.swift @@ -0,0 +1,20 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A post that belongs to a [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog). Each article includes content with optional HTML formatting, an excerpt for previews, [`ArticleAuthor`](https://shopify.dev/docs/api/storefront/current/objects/ArticleAuthor) information, and an associated [`Image`](https://shopify.dev/docs/api/storefront/current/objects/Image). + /// + /// Articles can be organized with tags and include [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) metadata. You can manage [comments](https://shopify.dev/docs/api/storefront/current/objects/Comment) when the blog's comment policy enables them. + static let Article = ApolloAPI.Object( + typename: "Article", + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self, + Storefront.Interfaces.OnlineStorePublishable.self, + Storefront.Interfaces.Trackable.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift index 1ad4d99ce..397963f3d 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Objects { + /// An auto-generated type for paginating through multiple BaseCartLines. static let BaseCartLineConnection = ApolloAPI.Object( typename: "BaseCartLineConnection", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Blog.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Blog.graphql.swift new file mode 100644 index 000000000..e0e0857ec --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Blog.graphql.swift @@ -0,0 +1,19 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A blog container for [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects. Stores can have multiple blogs, for example to organize content by topic or purpose. + /// + /// Each blog provides access to its articles, contributing [`ArticleAuthor`](https://shopify.dev/docs/api/storefront/current/objects/ArticleAuthor) objects, and [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information. You can retrieve articles individually [by handle](https://shopify.dev/docs/api/storefront/current/objects/Blog#field-Blog.fields.articleByHandle) or as a [paginated list](https://shopify.dev/docs/api/storefront/current/objects/Blog#field-Blog.fields.articles). + static let Blog = ApolloAPI.Object( + typename: "Blog", + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self, + Storefront.Interfaces.OnlineStorePublishable.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Cart.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Cart.graphql.swift index f062aa71c..3deb99cde 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Cart.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Cart.graphql.swift @@ -4,9 +4,17 @@ import ApolloAPI extension Storefront.Objects { + /// A cart represents the merchandise that a buyer intends to purchase, and the estimated cost associated with the cart, throughout a customer's session. + /// + /// Use the [`checkoutUrl`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-checkoutUrl) field to direct buyers to Shopify's web checkout to complete their purchase. + /// + /// Learn more about [interacting with carts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). static let Cart = ApolloAPI.Object( typename: "Cart", - implementedInterfaces: [], + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self + ], keyFields: nil ) } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift index deee3a300..e61906d36 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift @@ -4,6 +4,9 @@ import ApolloAPI extension Storefront.Objects { + /// Contact information about the buyer interacting with a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart). The buyer's country determines [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) and should match their shipping address. + /// + /// For B2B scenarios, the [`purchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity#field-CartBuyerIdentity.fields.purchasingCompany) field identifies the company and location on whose behalf a business customer purchases. The [`preferences`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity#field-CartBuyerIdentity.fields.preferences) field stores delivery and wallet settings that prefill checkout fields to streamline the buying process. static let CartBuyerIdentity = ApolloAPI.Object( typename: "CartBuyerIdentity", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartCost.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartCost.graphql.swift index 90bce2962..4db413aa5 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartCost.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartCost.graphql.swift @@ -4,6 +4,9 @@ import ApolloAPI extension Storefront.Objects { + /// The estimated costs that a buyer will pay at checkout. The `Cart` object's [`cost`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-Cart.fields.cost) field returns this. The costs are subject to change and changes will be reflected at checkout. Costs reflect [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) based on the buyer's context. + /// + /// Amounts include the subtotal before taxes and cart-level discounts, the checkout charge amount excluding deferred payments, and the total. The subtotal and total amounts each include a corresponding boolean field indicating whether the value is an estimate. static let CartCost = ApolloAPI.Object( typename: "CartCost", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartCreatePayload.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartCreatePayload.graphql.swift index edcd2cad4..865172ce8 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartCreatePayload.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartCreatePayload.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Objects { + /// Return type for `cartCreate` mutation. static let CartCreatePayload = ApolloAPI.Object( typename: "CartCreatePayload", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift index 67eac4387..bfdbf9586 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift @@ -4,6 +4,9 @@ import ApolloAPI extension Storefront.Objects { + /// Groups cart line items that share the same delivery destination. Each group provides the available [`CartDeliveryOption`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryOption) choices for that address, along with the customer's selected option. + /// + /// Access through the [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) object's `deliveryGroups` field. Items are grouped by merchandise type (one-time purchase vs subscription), allowing different delivery methods for each. static let CartDeliveryGroup = ApolloAPI.Object( typename: "CartDeliveryGroup", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift index d4fb042ce..0ee2a8dd4 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Objects { + /// An auto-generated type for paginating through multiple CartDeliveryGroups. static let CartDeliveryGroupConnection = ApolloAPI.Object( typename: "CartDeliveryGroupConnection", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryOption.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryOption.graphql.swift index db511804c..3cea50036 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryOption.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartDeliveryOption.graphql.swift @@ -4,6 +4,9 @@ import ApolloAPI extension Storefront.Objects { + /// A shipping or delivery choice available to customers during checkout. Each option includes a title, estimated cost, and delivery method type such as shipping or local pickup. + /// + /// Returned by the [`CartDeliveryGroup`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup) object's [`deliveryOptions`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup#field-CartDeliveryGroup.fields.deliveryOptions) field and [`selectedDeliveryOption`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup#field-CartDeliveryGroup.fields.selectedDeliveryOption) field. static let CartDeliveryOption = ApolloAPI.Object( typename: "CartDeliveryOption", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLine.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLine.graphql.swift index 531686cd1..9b6a81396 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLine.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLine.graphql.swift @@ -4,11 +4,14 @@ import ApolloAPI extension Storefront.Objects { + /// An item in a customer's [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) representing a product variant they intend to purchase. Each cart line tracks the merchandise, quantity, cost breakdown, and any applied discounts. + /// + /// Cart lines can include custom attributes for additional information like gift wrapping requests, and can be associated with a [`SellingPlanAllocation`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanAllocation) for purchase options like subscriptions, pre-orders, or try-before-you-buy. The [`instructions`](https://shopify.dev/docs/api/storefront/current/objects/CartLine#field-CartLine.fields.instructions) field indicates whether the line can be removed or have its quantity updated. static let CartLine = ApolloAPI.Object( typename: "CartLine", implementedInterfaces: [ - Storefront.Interfaces.Node.self, - Storefront.Interfaces.BaseCartLine.self + Storefront.Interfaces.BaseCartLine.self, + Storefront.Interfaces.Node.self ], keyFields: nil ) diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLineCost.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLineCost.graphql.swift index b40eee9dd..8f9cbadbd 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLineCost.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLineCost.graphql.swift @@ -4,6 +4,9 @@ import ApolloAPI extension Storefront.Objects { + /// Cost breakdown for a single line item in a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart). Includes the per-unit price, the subtotal before line-level discounts, and the final total amount the buyer pays. + /// + /// The [`compareAtAmountPerQuantity`](https://shopify.dev/docs/api/storefront/current/objects/CartLineCost#field-CartLineCost.fields.compareAtAmountPerQuantity) field shows the original price when the item is on sale, enabling the display of savings to customers. static let CartLineCost = ApolloAPI.Object( typename: "CartLineCost", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLinesAddPayload.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLinesAddPayload.graphql.swift index aa9ca3288..7ec55a31d 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLinesAddPayload.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLinesAddPayload.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Objects { + /// Return type for `cartLinesAdd` mutation. static let CartLinesAddPayload = ApolloAPI.Object( typename: "CartLinesAddPayload", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLinesUpdatePayload.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLinesUpdatePayload.graphql.swift index df5a3adbc..a4f43ad4a 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLinesUpdatePayload.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartLinesUpdatePayload.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Objects { + /// Return type for `cartLinesUpdate` mutation. static let CartLinesUpdatePayload = ApolloAPI.Object( typename: "CartLinesUpdatePayload", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartUserError.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartUserError.graphql.swift index b921b61cc..98cb6741f 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartUserError.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CartUserError.graphql.swift @@ -4,9 +4,10 @@ import ApolloAPI extension Storefront.Objects { + /// Represents an error that happens during execution of a cart mutation. static let CartUserError = ApolloAPI.Object( typename: "CartUserError", - implementedInterfaces: [], + implementedInterfaces: [Storefront.Interfaces.DisplayableError.self], keyFields: nil ) } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Collection.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Collection.graphql.swift index fc083e6dc..5438ac75d 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Collection.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Collection.graphql.swift @@ -4,9 +4,17 @@ import ApolloAPI extension Storefront.Objects { + /// A group of products [organized by a merchant](https://help.shopify.com/manual/products/collections) to make their store easier to browse. Collections can help customers discover related products by category, season, promotion, or other criteria. + /// + /// Query a collection's products with [filtering options](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products) like availability, price range, vendor, and tags. Each collection includes [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information, an optional [`Image`](https://shopify.dev/docs/api/storefront/current/objects/Image), and supports custom data through [`metafields`](https://shopify.dev/docs/api/storefront/current/objects/Metafield). static let Collection = ApolloAPI.Object( typename: "Collection", - implementedInterfaces: [], + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self, + Storefront.Interfaces.OnlineStorePublishable.self, + Storefront.Interfaces.Trackable.self + ], keyFields: nil ) } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CollectionConnection.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CollectionConnection.graphql.swift index b610e26fa..8bd47db0c 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CollectionConnection.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CollectionConnection.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Objects { + /// An auto-generated type for paginating through multiple Collections. static let CollectionConnection = ApolloAPI.Object( typename: "CollectionConnection", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Comment.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Comment.graphql.swift new file mode 100644 index 000000000..963a5b6f9 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Comment.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A comment on an article. + static let Comment = ApolloAPI.Object( + typename: "Comment", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Company.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Company.graphql.swift new file mode 100644 index 000000000..bcc140a28 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Company.graphql.swift @@ -0,0 +1,18 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A B2B organization that purchases from the shop. In the Storefront API, company information is accessed through the [`PurchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/PurchasingCompany) object on [`CartBuyerIdentity`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity), which provides the associated location and contact for the current purchasing context. + /// + /// You can store custom data using [metafields](https://shopify.dev/docs/apps/build/metafields). + static let Company = ApolloAPI.Object( + typename: "Company", + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CompanyContact.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CompanyContact.graphql.swift new file mode 100644 index 000000000..23a2afd34 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CompanyContact.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A company's main point of contact. + static let CompanyContact = ApolloAPI.Object( + typename: "CompanyContact", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CompanyLocation.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CompanyLocation.graphql.swift new file mode 100644 index 000000000..ae5000e55 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CompanyLocation.graphql.swift @@ -0,0 +1,18 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A branch or office of a [`Company`](https://shopify.dev/docs/api/storefront/current/objects/Company) where B2B customers can place orders. When a B2B customer selects a location after logging in, the Storefront API contextualizes product queries to return location-specific pricing and quantity rules. + /// + /// Access through the [`PurchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/PurchasingCompany) object, which associates the location with the buyer's [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). + static let CompanyLocation = ApolloAPI.Object( + typename: "CompanyLocation", + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ComponentizableCartLine.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ComponentizableCartLine.graphql.swift new file mode 100644 index 000000000..60c9f5230 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ComponentizableCartLine.graphql.swift @@ -0,0 +1,16 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Represents information about the grouped merchandise in the cart. + static let ComponentizableCartLine = ApolloAPI.Object( + typename: "ComponentizableCartLine", + implementedInterfaces: [ + Storefront.Interfaces.BaseCartLine.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Customer.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Customer.graphql.swift index aee0e2f65..b3f6cfdf9 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Customer.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Customer.graphql.swift @@ -4,9 +4,14 @@ import ApolloAPI extension Storefront.Objects { + /// A customer account with the shop. Includes data such as contact information, [addresses](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) and marketing preferences for logged-in customers, so they don't have to provide these details at every checkout. + /// + /// Access the customer through the [`customer`](https://shopify.dev/docs/api/storefront/current/queries/customer) query using a customer access token obtained from the [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) mutation. + /// + /// The object implements the [`HasMetafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields) interface, enabling retrieval of [custom data](https://shopify.dev/docs/apps/build/custom-data) associated with the customer. static let Customer = ApolloAPI.Object( typename: "Customer", - implementedInterfaces: [], + implementedInterfaces: [Storefront.Interfaces.HasMetafields.self], keyFields: nil ) } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CustomerUserError.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CustomerUserError.graphql.swift new file mode 100644 index 000000000..0dcd3fdb3 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/CustomerUserError.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Represents an error that happens during execution of a customer mutation. + static let CustomerUserError = ApolloAPI.Object( + typename: "CustomerUserError", + implementedInterfaces: [Storefront.Interfaces.DisplayableError.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ExternalVideo.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ExternalVideo.graphql.swift new file mode 100644 index 000000000..5d2249be4 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ExternalVideo.graphql.swift @@ -0,0 +1,16 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Represents a video hosted outside of Shopify. + static let ExternalVideo = ApolloAPI.Object( + typename: "ExternalVideo", + implementedInterfaces: [ + Storefront.Interfaces.Media.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/GenericFile.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/GenericFile.graphql.swift new file mode 100644 index 000000000..225a5c1aa --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/GenericFile.graphql.swift @@ -0,0 +1,17 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Any file that doesn't fit into a designated type like image or video. For example, a PDF or JSON document. Use this object to manage files in a merchant's store. + /// + /// Generic files are commonly referenced through [file reference metafields](https://shopify.dev/docs/apps/build/metafields/list-of-data-types) and returned as part of the [`MetafieldReference`](https://shopify.dev/docs/api/storefront/current/unions/MetafieldReference) union. + /// + /// Includes the file's URL, MIME type, size in bytes, and an optional preview image. + static let GenericFile = ApolloAPI.Object( + typename: "GenericFile", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Image.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Image.graphql.swift index 943a6806d..1e5bf9260 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Image.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Image.graphql.swift @@ -4,6 +4,9 @@ import ApolloAPI extension Storefront.Objects { + /// An image resource with URL, dimensions, and transformation options. Used for product images, collection images, media previews, and other visual content throughout the storefront. + /// + /// The [`url`](https://shopify.dev/docs/api/storefront/current/objects/Image#field-Image.fields.url) field accepts an [`ImageTransformInput`](https://shopify.dev/docs/api/storefront/current/input-objects/ImageTransformInput) argument for resizing, cropping, scaling for retina displays, and converting between image formats. Use the [`thumbhash`](https://shopify.dev/docs/api/storefront/current/objects/Image#field-Image.fields.thumbhash) field to display lightweight placeholders while images load. static let Image = ApolloAPI.Object( typename: "Image", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Location.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Location.graphql.swift new file mode 100644 index 000000000..7142b75e3 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Location.graphql.swift @@ -0,0 +1,18 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A physical store location where product inventory is held and that supports in-store pickup. Provides the location's name, address, and geographic coordinates for proximity-based sorting. Use with [`StoreAvailability`](https://shopify.dev/docs/api/storefront/current/objects/StoreAvailability) to show customers where a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) is available for pickup. + /// + /// Learn more about [supporting local pickup on storefronts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/local-pickup). + static let Location = ApolloAPI.Object( + typename: "Location", + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MailingAddress.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MailingAddress.graphql.swift index 21bc4dbba..faa5ff56b 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MailingAddress.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MailingAddress.graphql.swift @@ -4,9 +4,12 @@ import ApolloAPI extension Storefront.Objects { + /// A physical mailing address associated with a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) or [`Order`](https://shopify.dev/docs/api/storefront/current/objects/Order). Stores standard address components including street address, city, province, country, and postal code, along with customer name and company information. + /// + /// The address includes geographic coordinates and provides pre-formatted output through the [`formatted`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress#field-MailingAddress.fields.formatted) field, which can optionally include or exclude name and company details. static let MailingAddress = ApolloAPI.Object( typename: "MailingAddress", - implementedInterfaces: [], + implementedInterfaces: [Storefront.Interfaces.Node.self], keyFields: nil ) } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Market.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Market.graphql.swift new file mode 100644 index 000000000..27f4a6e9d --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Market.graphql.swift @@ -0,0 +1,18 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// An audience of buyers that a merchant targets for sales. Audiences can include geographic regions, company locations, and retail locations. Markets enable localized shopping experiences with region-specific languages, currencies, and pricing. + /// + /// Each market has a unique [`handle`](https://shopify.dev/docs/api/storefront/current/objects/Market#field-Market.fields.handle) for identification and supports custom data through [`metafields`](https://shopify.dev/docs/api/storefront/current/objects/Metafield). Learn more about [building localized experiences with Shopify Markets](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets). + static let Market = ApolloAPI.Object( + typename: "Market", + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MediaImage.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MediaImage.graphql.swift new file mode 100644 index 000000000..52ee53c81 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MediaImage.graphql.swift @@ -0,0 +1,18 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// An image hosted on Shopify's content delivery network (CDN). Used for product images, brand logos, and other visual content across the storefront. + /// + /// The [`image`](https://shopify.dev/docs/api/storefront/current/objects/MediaImage#field-MediaImage.fields.image) field provides the actual image data with transformation options. Implements the [`Media`](https://shopify.dev/docs/api/storefront/current/interfaces/Media) interface alongside other media types like [`Video`](https://shopify.dev/docs/api/storefront/current/objects/Video) and [`Model3d`](https://shopify.dev/docs/api/storefront/current/objects/Model3d). + static let MediaImage = ApolloAPI.Object( + typename: "MediaImage", + implementedInterfaces: [ + Storefront.Interfaces.Media.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MediaPresentation.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MediaPresentation.graphql.swift new file mode 100644 index 000000000..b0e1afa18 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MediaPresentation.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A media presentation. + static let MediaPresentation = ApolloAPI.Object( + typename: "MediaPresentation", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Menu.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Menu.graphql.swift new file mode 100644 index 000000000..fc17c7c32 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Menu.graphql.swift @@ -0,0 +1,15 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A navigation structure for building store [menus](https://help.shopify.com/manual/online-store/menus-and-links). Each menu contains [`MenuItem`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem) objects that can be nested to create multi-level navigation hierarchies. + /// + /// Menu items can link to [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), [blogs](https://shopify.dev/docs/api/storefront/current/objects/Blog), or external URLs. Use the [`menu`](https://shopify.dev/docs/api/storefront/current/queries/menu) query to retrieve a menu by its handle. + static let Menu = ApolloAPI.Object( + typename: "Menu", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MenuItem.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MenuItem.graphql.swift new file mode 100644 index 000000000..629e96079 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MenuItem.graphql.swift @@ -0,0 +1,15 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A navigation link within a [`Menu`](https://shopify.dev/docs/api/storefront/current/objects/Menu). Each item has a title, URL, and can link to store resources like [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), [blogs](https://shopify.dev/docs/api/storefront/current/objects/Blog), or external URLs. + /// + /// Menu items support nested hierarchies through the [`items`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem#field-MenuItem.fields.items) field, enabling dropdown or multi-level navigation structures. The [`tags`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem#field-MenuItem.fields.tags) field filters results when the item links to a collection specifically. + static let MenuItem = ApolloAPI.Object( + typename: "MenuItem", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Metafield.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Metafield.graphql.swift new file mode 100644 index 000000000..de5868209 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Metafield.graphql.swift @@ -0,0 +1,15 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// [Custom metadata](https://shopify.dev/docs/apps/build/metafields) attached to a Shopify resource such as a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), or [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Each metafield is identified by a namespace and key, and stores a value with an associated type. + /// + /// Values are always stored as strings, but the [`type`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.type) field indicates how to interpret the data. When a metafield's type is a resource reference, use the [`reference`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.reference) or [`references`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.references) fields to retrieve the linked objects. Access metafields on any resource that implements the [`HasMetafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields) interface. + static let Metafield = ApolloAPI.Object( + typename: "Metafield", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MetafieldDeleteUserError.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MetafieldDeleteUserError.graphql.swift new file mode 100644 index 000000000..72e248a1b --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MetafieldDeleteUserError.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// An error that occurs during the execution of cart metafield deletion. + static let MetafieldDeleteUserError = ApolloAPI.Object( + typename: "MetafieldDeleteUserError", + implementedInterfaces: [Storefront.Interfaces.DisplayableError.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MetafieldsSetUserError.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MetafieldsSetUserError.graphql.swift new file mode 100644 index 000000000..0dd6a1791 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MetafieldsSetUserError.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// An error that occurs during the execution of `MetafieldsSet`. + static let MetafieldsSetUserError = ApolloAPI.Object( + typename: "MetafieldsSetUserError", + implementedInterfaces: [Storefront.Interfaces.DisplayableError.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Metaobject.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Metaobject.graphql.swift new file mode 100644 index 000000000..e9f100560 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Metaobject.graphql.swift @@ -0,0 +1,18 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// An instance of [custom structured data](https://shopify.dev/docs/apps/build/metaobjects) defined by a metaobject definition. Metaobjects store reusable content that extends beyond standard Shopify resources, such as size charts, author profiles, or custom content sections. + /// + /// Each metaobject contains fields that match the types and validation rules specified in its definition. [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) references can point to metaobjects, connecting custom data with products, collections, and other resources. If the definition has the `renderable` capability, then the [`seo`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject#field-Metaobject.fields.seo) field provides SEO metadata. If it has the `online_store` capability, then the [`onlineStoreUrl`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject#field-Metaobject.fields.onlineStoreUrl) field returns the public URL. + static let Metaobject = ApolloAPI.Object( + typename: "Metaobject", + implementedInterfaces: [ + Storefront.Interfaces.Node.self, + Storefront.Interfaces.OnlineStorePublishable.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Model3d.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Model3d.graphql.swift new file mode 100644 index 000000000..800d50eb4 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Model3d.graphql.swift @@ -0,0 +1,16 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Represents a Shopify hosted 3D model. + static let Model3d = ApolloAPI.Object( + typename: "Model3d", + implementedInterfaces: [ + Storefront.Interfaces.Media.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MoneyV2.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MoneyV2.graphql.swift index b1d46dd3e..fe411c165 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MoneyV2.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/MoneyV2.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Objects { + /// A precise monetary value with its associated currency. Combines a decimal amount with a three-letter [`CurrencyCode`](https://shopify.dev/docs/api/storefront/current/enums/CurrencyCode) to express prices, costs, and other financial values. For example, 12.99 USD. static let MoneyV2 = ApolloAPI.Object( typename: "MoneyV2", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Mutation.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Mutation.graphql.swift index 357d29861..f9b04a225 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Mutation.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Mutation.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Objects { + /// The schema’s entry-point for mutations. This acts as the public, top-level API from which all mutation queries must start. static let Mutation = ApolloAPI.Object( typename: "Mutation", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Order.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Order.graphql.swift new file mode 100644 index 000000000..64d9464a6 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Order.graphql.swift @@ -0,0 +1,16 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// An order is a customer’s completed request to purchase one or more products from a shop. An order is created when a customer completes the checkout process, during which time they provides an email address, billing address and payment information. + static let Order = ApolloAPI.Object( + typename: "Order", + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Page.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Page.graphql.swift new file mode 100644 index 000000000..85f252c22 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Page.graphql.swift @@ -0,0 +1,20 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A [custom content page](https://help.shopify.com/manual/online-store/add-edit-pages) on a merchant's store. Pages display HTML-formatted content, such as "About Us", contact details, or store policies. + /// + /// Each page has a unique [`handle`](https://shopify.dev/docs/api/storefront/current/objects/Page#field-Page.fields.handle) for URL routing and includes [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information for search engine optimization. Pages support [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) attachments for storing additional custom data. + static let Page = ApolloAPI.Object( + typename: "Page", + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self, + Storefront.Interfaces.OnlineStorePublishable.self, + Storefront.Interfaces.Trackable.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Product.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Product.graphql.swift index 03fec92bd..4fbb9c9b7 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Product.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Product.graphql.swift @@ -4,9 +4,21 @@ import ApolloAPI extension Storefront.Objects { + /// Represents an item listed in a shop's catalog. + /// + /// Products support multiple [product variants](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant), representing different versions of the same product, and can include various [media](https://shopify.dev/docs/api/storefront/current/interfaces/Media) types. Use the [`selectedOrFirstAvailableVariant`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.selectedOrFirstAvailableVariant) or [`variantBySelectedOptions`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.variantBySelectedOptions) fields to help customers find the right variant based on their selections. + /// + /// Products can be organized into [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), associated with [selling plans](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanGroup) for subscriptions, and extended with custom data through [metafields](https://shopify.dev/docs/api/storefront/current/objects/Metafield). + /// + /// Learn more about working with [products and collections](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections). static let Product = ApolloAPI.Object( typename: "Product", - implementedInterfaces: [], + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self, + Storefront.Interfaces.OnlineStorePublishable.self, + Storefront.Interfaces.Trackable.self + ], keyFields: nil ) } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductConnection.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductConnection.graphql.swift index 6da8c957e..2893db127 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductConnection.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductConnection.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Objects { + /// An auto-generated type for paginating through multiple Products. static let ProductConnection = ApolloAPI.Object( typename: "ProductConnection", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductOption.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductOption.graphql.swift new file mode 100644 index 000000000..b630868c5 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductOption.graphql.swift @@ -0,0 +1,17 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A customizable product attribute that customers select when purchasing, such as "Size", "Color", or "Material". Each option has a name and a set of [`ProductOptionValue`](https://shopify.dev/docs/api/storefront/current/objects/ProductOptionValue) objects representing the available choices. + /// + /// Different combinations of option values create distinct [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) objects. Option values can include visual swatches that display colors or images to help customers make selections. Option names have a 255-character limit. + /// + /// Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). + static let ProductOption = ApolloAPI.Object( + typename: "ProductOption", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductOptionValue.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductOptionValue.graphql.swift new file mode 100644 index 000000000..3f0122c09 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductOptionValue.graphql.swift @@ -0,0 +1,17 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A specific value for a [`ProductOption`](https://shopify.dev/docs/api/storefront/current/objects/ProductOption), such as "Red" or "Blue" for a "Color" option. Option values combine across different options to create [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) objects. + /// + /// Each value can include a visual swatch that displays a color or image. The [`firstSelectableVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductOptionValue#field-ProductOptionValue.fields.firstSelectableVariant) field returns the variant that combines this option value with the lowest-position values for all other options. This is useful for building product selection interfaces. + /// + /// Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). + static let ProductOptionValue = ApolloAPI.Object( + typename: "ProductOptionValue", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductVariant.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductVariant.graphql.swift index f833172d6..fee3dbed9 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductVariant.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductVariant.graphql.swift @@ -4,9 +4,17 @@ import ApolloAPI extension Storefront.Objects { + /// A specific version of a [product](https://shopify.dev/docs/api/storefront/current/objects/Product) available for sale, differentiated by options like size or color. For example, a small blue t-shirt and a large blue t-shirt are separate variants of the same product. For more information, see the docs on [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). + /// + /// For products with quantity rules, variants enforce minimum, maximum, and increment constraints on purchases. + /// + /// Variants also support subscriptions and pre-orders through [selling plan allocations](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanAllocation) objects, bundle configurations through [product variant components](https://shopify.dev/docs/api/storefront/current/objects/ProductVariantComponent) objects, and [shop pay installments pricing](https://shopify.dev/docs/api/storefront/current/objects/ShopPayInstallmentsPricing) for flexible payment options. static let ProductVariant = ApolloAPI.Object( typename: "ProductVariant", - implementedInterfaces: [Storefront.Interfaces.Node.self], + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self + ], keyFields: nil ) } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductVariantConnection.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductVariantConnection.graphql.swift index dc31ea8d4..626b14d8a 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductVariantConnection.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ProductVariantConnection.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Objects { + /// An auto-generated type for paginating through multiple ProductVariants. static let ProductVariantConnection = ApolloAPI.Object( typename: "ProductVariantConnection", implementedInterfaces: [], diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Query.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Query.graphql.swift deleted file mode 100644 index 262535367..000000000 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Query.graphql.swift +++ /dev/null @@ -1,12 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -import ApolloAPI - -extension Storefront.Objects { - static let Query = ApolloAPI.Object( - typename: "Query", - implementedInterfaces: [], - keyFields: nil - ) -} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/QueryRoot.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/QueryRoot.graphql.swift new file mode 100644 index 000000000..0adca9c0d --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/QueryRoot.graphql.swift @@ -0,0 +1,17 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// The entry point for all Storefront API queries. Provides access to shop resources including products, collections, carts, and customer data, as well as content like articles and pages. This query acts as the public, top-level type from which all queries must start. + /// + /// Use individual queries like [`product`](https://shopify.dev/docs/api/storefront/current/queries/product) or [`collection`](https://shopify.dev/docs/api/storefront/current/queries/collection) to fetch specific resources by ID or handle. Use plural queries like [`products`](https://shopify.dev/docs/api/storefront/current/queries/products) or [`collections`](https://shopify.dev/docs/api/storefront/current/queries/collections) to retrieve paginated lists with optional filtering and sorting. The [`search`](https://shopify.dev/docs/api/storefront/current/queries/search) and [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries enable storefront search functionality. + /// + /// Explore queries interactively with the [GraphiQL explorer and sample query kit](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/api-exploration). + static let QueryRoot = ApolloAPI.Object( + typename: "QueryRoot", + implementedInterfaces: [], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/SearchQuerySuggestion.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/SearchQuerySuggestion.graphql.swift new file mode 100644 index 000000000..fa3b0a000 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/SearchQuerySuggestion.graphql.swift @@ -0,0 +1,15 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A suggested search term returned by the [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) query. Query suggestions help customers refine their searches by showing relevant terms as they type. + /// + /// The [`text`](https://shopify.dev/docs/api/storefront/current/objects/SearchQuerySuggestion#field-SearchQuerySuggestion.fields.text) field provides the plain suggestion, while [`styledText`](https://shopify.dev/docs/api/storefront/current/objects/SearchQuerySuggestion#field-SearchQuerySuggestion.fields.styledText) includes HTML tags to highlight matching portions. Implements [`Trackable`](https://shopify.dev/docs/api/storefront/current/interfaces/Trackable) for analytics reporting on search traffic origins. + static let SearchQuerySuggestion = ApolloAPI.Object( + typename: "SearchQuerySuggestion", + implementedInterfaces: [Storefront.Interfaces.Trackable.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/SellingPlan.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/SellingPlan.graphql.swift new file mode 100644 index 000000000..b2efdd937 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/SellingPlan.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Represents deferred or recurring purchase options for [products](https://shopify.dev/docs/api/storefront/current/objects/Product) and [product variants](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant), such as subscriptions, pre-orders, or try-before-you-buy. Each selling plan belongs to a [`SellingPlanGroup`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanGroup) and defines billing, pricing, inventory, and delivery policies. + static let SellingPlan = ApolloAPI.Object( + typename: "SellingPlan", + implementedInterfaces: [Storefront.Interfaces.HasMetafields.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Shop.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Shop.graphql.swift new file mode 100644 index 000000000..7569031ef --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Shop.graphql.swift @@ -0,0 +1,18 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// The central hub for store-wide settings and information accessible through the Storefront API. Provides the shop's name, description, and branding configuration including logos and colors through the [`Brand`](https://shopify.dev/docs/api/storefront/current/objects/Brand) object. + /// + /// Access store policies such as privacy, refund, shipping, and terms of service via [`ShopPolicy`](https://shopify.dev/docs/api/storefront/current/objects/ShopPolicy), and the subscription policy via [`ShopPolicyWithDefault`](https://shopify.dev/docs/api/storefront/current/objects/ShopPolicyWithDefault). [`PaymentSettings`](https://shopify.dev/docs/api/storefront/current/objects/PaymentSettings) expose accepted card brands, supported digital wallets, and enabled presentment currencies. The object also includes the primary [`Domain`](https://shopify.dev/docs/api/storefront/current/objects/Domain), countries the shop ships to, [`ShopPayInstallmentsPricing`](https://shopify.dev/docs/api/storefront/current/objects/ShopPayInstallmentsPricing), and [`SocialLoginProvider`](https://shopify.dev/docs/api/storefront/current/objects/SocialLoginProvider) options for customer accounts. + static let Shop = ApolloAPI.Object( + typename: "Shop", + implementedInterfaces: [ + Storefront.Interfaces.HasMetafields.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlan.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlan.graphql.swift new file mode 100644 index 000000000..e0bf0737a --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlan.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// The financing plan in Shop Pay Installments. + static let ShopPayInstallmentsFinancingPlan = ApolloAPI.Object( + typename: "ShopPayInstallmentsFinancingPlan", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlanTerm.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlanTerm.graphql.swift new file mode 100644 index 000000000..005193623 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlanTerm.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// The terms of the financing plan in Shop Pay Installments. + static let ShopPayInstallmentsFinancingPlanTerm = ApolloAPI.Object( + typename: "ShopPayInstallmentsFinancingPlanTerm", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPayInstallmentsProductVariantPricing.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPayInstallmentsProductVariantPricing.graphql.swift new file mode 100644 index 000000000..9e6bf52e8 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPayInstallmentsProductVariantPricing.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// The shop pay installments pricing information for a product variant. + static let ShopPayInstallmentsProductVariantPricing = ApolloAPI.Object( + typename: "ShopPayInstallmentsProductVariantPricing", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPolicy.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPolicy.graphql.swift new file mode 100644 index 000000000..9bebf5c98 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/ShopPolicy.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Policy that a merchant has configured for their store, such as their refund or privacy policy. + static let ShopPolicy = ApolloAPI.Object( + typename: "ShopPolicy", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/TaxonomyCategory.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/TaxonomyCategory.graphql.swift new file mode 100644 index 000000000..43d4ea956 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/TaxonomyCategory.graphql.swift @@ -0,0 +1,17 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A category from Shopify's [Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) assigned to a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product). Categories provide hierarchical classification through the `ancestors` field. + /// + /// The [`ancestors`](https://shopify.dev/docs/api/storefront/current/objects/TaxonomyCategory#field-TaxonomyCategory.fields.ancestors) field returns the parent chain from the immediate parent up to the root. Each ancestor category also includes its own `ancestors`. + /// + /// The [`name`](https://shopify.dev/docs/api/storefront/latest/objects/TaxonomyCategory#field-TaxonomyCategory.fields.name) field returns the localized category name based on the storefront's request language with shop locale fallbacks. If a translation isn't available for the resolved locale, the English taxonomy name is returned. + static let TaxonomyCategory = ApolloAPI.Object( + typename: "TaxonomyCategory", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/UrlRedirect.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/UrlRedirect.graphql.swift new file mode 100644 index 000000000..c5cbdf79d --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/UrlRedirect.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A redirect on the online store. + static let UrlRedirect = ApolloAPI.Object( + typename: "UrlRedirect", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/UserError.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/UserError.graphql.swift new file mode 100644 index 000000000..34e9974cf --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/UserError.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Represents an error in the input of a mutation. + static let UserError = ApolloAPI.Object( + typename: "UserError", + implementedInterfaces: [Storefront.Interfaces.DisplayableError.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/UserErrorsShopPayPaymentRequestSessionUserErrors.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/UserErrorsShopPayPaymentRequestSessionUserErrors.graphql.swift new file mode 100644 index 000000000..18685d1fa --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/UserErrorsShopPayPaymentRequestSessionUserErrors.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Error codes for failed Shop Pay payment request session mutations. + static let UserErrorsShopPayPaymentRequestSessionUserErrors = ApolloAPI.Object( + typename: "UserErrorsShopPayPaymentRequestSessionUserErrors", + implementedInterfaces: [Storefront.Interfaces.DisplayableError.self], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Video.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Video.graphql.swift new file mode 100644 index 000000000..317610398 --- /dev/null +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Objects/Video.graphql.swift @@ -0,0 +1,18 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A video hosted on Shopify's servers. Implements the [`Media`](https://shopify.dev/docs/api/storefront/current/interfaces/Media) interface and provides multiple video sources through the [`sources`](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources) field, each with [format](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources.format), dimensions, and [URL information](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources.url) for adaptive playback. + /// + /// For videos hosted on external platforms like YouTube or Vimeo, use [`ExternalVideo`](https://shopify.dev/docs/api/storefront/current/objects/ExternalVideo) instead. + static let Video = ApolloAPI.Object( + typename: "Video", + implementedInterfaces: [ + Storefront.Interfaces.Media.self, + Storefront.Interfaces.Node.self + ], + keyFields: nil + ) +} diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/SchemaMetadata.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/SchemaMetadata.graphql.swift index 122f34ef2..a03860694 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/SchemaMetadata.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/SchemaMetadata.graphql.swift @@ -25,13 +25,14 @@ extension Storefront { typealias MutableInlineFragment = Storefront_MutableInlineFragment enum SchemaMetadata: ApolloAPI.SchemaMetadata { - /// nonisolated(unsafe) is applied manually whilst we're on Apollo v1 - /// Apollo provides Swift 6 support in v2 - this workaround will be removed then - nonisolated(unsafe) static let configuration: any ApolloAPI.SchemaConfiguration.Type = SchemaConfiguration.self + static let configuration: any ApolloAPI.SchemaConfiguration.Type = SchemaConfiguration.self static func objectType(forTypename typename: String) -> ApolloAPI.Object? { switch typename { + case "AppliedGiftCard": return Storefront.Objects.AppliedGiftCard + case "Article": return Storefront.Objects.Article case "BaseCartLineConnection": return Storefront.Objects.BaseCartLineConnection + case "Blog": return Storefront.Objects.Blog case "Cart": return Storefront.Objects.Cart case "CartBuyerIdentity": return Storefront.Objects.CartBuyerIdentity case "CartCost": return Storefront.Objects.CartCost @@ -46,16 +47,51 @@ extension Storefront { case "CartUserError": return Storefront.Objects.CartUserError case "Collection": return Storefront.Objects.Collection case "CollectionConnection": return Storefront.Objects.CollectionConnection + case "Comment": return Storefront.Objects.Comment + case "Company": return Storefront.Objects.Company + case "CompanyContact": return Storefront.Objects.CompanyContact + case "CompanyLocation": return Storefront.Objects.CompanyLocation + case "ComponentizableCartLine": return Storefront.Objects.ComponentizableCartLine case "Customer": return Storefront.Objects.Customer + case "CustomerUserError": return Storefront.Objects.CustomerUserError + case "ExternalVideo": return Storefront.Objects.ExternalVideo + case "GenericFile": return Storefront.Objects.GenericFile case "Image": return Storefront.Objects.Image + case "Location": return Storefront.Objects.Location case "MailingAddress": return Storefront.Objects.MailingAddress + case "Market": return Storefront.Objects.Market + case "MediaImage": return Storefront.Objects.MediaImage + case "MediaPresentation": return Storefront.Objects.MediaPresentation + case "Menu": return Storefront.Objects.Menu + case "MenuItem": return Storefront.Objects.MenuItem + case "Metafield": return Storefront.Objects.Metafield + case "MetafieldDeleteUserError": return Storefront.Objects.MetafieldDeleteUserError + case "MetafieldsSetUserError": return Storefront.Objects.MetafieldsSetUserError + case "Metaobject": return Storefront.Objects.Metaobject + case "Model3d": return Storefront.Objects.Model3d case "MoneyV2": return Storefront.Objects.MoneyV2 case "Mutation": return Storefront.Objects.Mutation + case "Order": return Storefront.Objects.Order + case "Page": return Storefront.Objects.Page case "Product": return Storefront.Objects.Product case "ProductConnection": return Storefront.Objects.ProductConnection + case "ProductOption": return Storefront.Objects.ProductOption + case "ProductOptionValue": return Storefront.Objects.ProductOptionValue case "ProductVariant": return Storefront.Objects.ProductVariant case "ProductVariantConnection": return Storefront.Objects.ProductVariantConnection - case "Query": return Storefront.Objects.Query + case "QueryRoot": return Storefront.Objects.QueryRoot + case "SearchQuerySuggestion": return Storefront.Objects.SearchQuerySuggestion + case "SellingPlan": return Storefront.Objects.SellingPlan + case "Shop": return Storefront.Objects.Shop + case "ShopPayInstallmentsFinancingPlan": return Storefront.Objects.ShopPayInstallmentsFinancingPlan + case "ShopPayInstallmentsFinancingPlanTerm": return Storefront.Objects.ShopPayInstallmentsFinancingPlanTerm + case "ShopPayInstallmentsProductVariantPricing": return Storefront.Objects.ShopPayInstallmentsProductVariantPricing + case "ShopPolicy": return Storefront.Objects.ShopPolicy + case "TaxonomyCategory": return Storefront.Objects.TaxonomyCategory + case "UrlRedirect": return Storefront.Objects.UrlRedirect + case "UserError": return Storefront.Objects.UserError + case "UserErrorsShopPayPaymentRequestSessionUserErrors": return Storefront.Objects.UserErrorsShopPayPaymentRequestSessionUserErrors + case "Video": return Storefront.Objects.Video default: return nil } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Unions/Merchandise.graphql.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Unions/Merchandise.graphql.swift index a25200608..49f0e10d1 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Unions/Merchandise.graphql.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Generated/Schema/Unions/Merchandise.graphql.swift @@ -4,6 +4,7 @@ import ApolloAPI extension Storefront.Unions { + /// A [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) that a buyer intends to purchase at checkout. static let Merchandise = Union( name: "Merchandise", possibleTypes: [Storefront.Objects.ProductVariant.self] diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Network.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Network.swift index d734047b2..6730d6e49 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Network.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Network.swift @@ -25,7 +25,7 @@ import Apollo import ApolloAPI import Foundation -final class Network: @unchecked Sendable { +final class Network: Sendable { static let shared = Network() private static func getLanguageCode() -> GraphQLEnum { @@ -66,39 +66,36 @@ final class Network: @unchecked Sendable { let apollo: ApolloClient init() { - let client = URLSessionClient() - let cache = InMemoryNormalizedCache() - let store = ApolloStore(cache: cache) - let provider = NetworkInterceptorProvider(client: client, store: store) - let urlString = "https://\(InfoDictionary.shared.domain)/api/\(InfoDictionary.shared.apiVersion)/graphql.json" guard let url = URL(string: urlString) else { fatalError("Invalid GraphQL endpoint URL: \(urlString)") } - let transport = RequestChainNetworkTransport(interceptorProvider: provider, endpointURL: url) - apollo = ApolloClient(networkTransport: transport, store: store) + let transport = RequestChainNetworkTransport( + interceptorProvider: StorefrontInterceptorProvider(), + endpointURL: url + ) + apollo = ApolloClient(networkTransport: transport) } } -class AuthorizationInterceptor: ApolloInterceptor { - public var id: String = UUID().uuidString - - func interceptAsync( - chain: RequestChain, - request: HTTPRequest, - response: HTTPResponse?, - completion: @escaping (Result, Error>) -> Void - ) { - request.addHeader(name: "X-Shopify-Storefront-Access-Token", value: InfoDictionary.shared.accessToken) - chain.proceedAsync(request: request, response: response, interceptor: self, completion: completion) +struct StorefrontInterceptorProvider: InterceptorProvider { + func graphQLInterceptors( + for operation: some GraphQLOperation + ) -> [any GraphQLInterceptor] { + DefaultInterceptorProvider.shared.graphQLInterceptors(for: operation) + [ + AuthorizationInterceptor() + ] } } -class NetworkInterceptorProvider: DefaultInterceptorProvider { - override func interceptors(for operation: some GraphQLOperation) -> [ApolloInterceptor] { - var interceptors = super.interceptors(for: operation) - interceptors.insert(AuthorizationInterceptor(), at: 0) - return interceptors +struct AuthorizationInterceptor: GraphQLInterceptor { + func intercept( + request: Request, + next: NextInterceptorFunction + ) async throws -> InterceptorResultStream { + var authenticatedRequest = request + authenticatedRequest.additionalHeaders["X-Shopify-Storefront-Access-Token"] = InfoDictionary.shared.accessToken + return try await next(authenticatedRequest) } } diff --git a/Samples/MobileBuyIntegration/MobileBuyIntegration/Views/ProductView.swift b/Samples/MobileBuyIntegration/MobileBuyIntegration/Views/ProductView.swift index fae0a22ba..a831b7daa 100644 --- a/Samples/MobileBuyIntegration/MobileBuyIntegration/Views/ProductView.swift +++ b/Samples/MobileBuyIntegration/MobileBuyIntegration/Views/ProductView.swift @@ -204,14 +204,15 @@ class ProductCache: ObservableObject { if let product = cachedProduct { completion(product) } else { - fetchProduct(by: handle) { product in + Task { + let product = await fetchProduct(by: handle) self.cachedProduct = product completion(product) } } } - private func fetchProduct(by _: String?, completion: @escaping (Product?) -> Void) { + private func fetchProduct(by _: String?) async -> Product? { let network = Network.shared let query = Storefront.GetProductsQuery( @@ -220,34 +221,30 @@ class ProductCache: ObservableObject { language: network.languageCode ) - network.apollo.fetch(query: query) { result in - if case let .success(response) = result { - DispatchQueue.main.async { - completion(response.data?.products.nodes.first) - } - } else { - DispatchQueue.main.async { - completion(nil) - } - } + do { + let response = try await network.apollo.fetch(query: query) + return response.data?.products.nodes.first + } catch { + return nil } } public func fetchCollection(limit: Int = 20) { - let network = Network.shared - - let query = Storefront.GetProductsQuery( - first: .some(limit), - country: network.countryCode, - language: network.languageCode - ) - - network.apollo.fetch(query: query) { result in - if case let .success(response) = result { - DispatchQueue.main.async { - self.collection = response.data?.products.nodes - self.cachedProduct = response.data?.products.nodes.first - } + Task { + let network = Network.shared + + let query = Storefront.GetProductsQuery( + first: .some(limit), + country: network.countryCode, + language: network.languageCode + ) + + do { + let response = try await network.apollo.fetch(query: query) + self.collection = response.data?.products.nodes + self.cachedProduct = response.data?.products.nodes.first + } catch { + // Fetch failed silently } } } diff --git a/Samples/Samples.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Samples/Samples.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5e43acd75..ceae7e3b3 100644 --- a/Samples/Samples.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Samples/Samples.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apollographql/apollo-ios.git", "state" : { - "revision" : "d591c1dd55824867877cff4f6551fe32983d7f51", - "version" : "1.23.0" + "revision" : "3b1203b721a81f7995ee73f393aa07b43d301720", + "version" : "2.0.6" } }, { diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.xcodeproj/project.pbxproj b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.xcodeproj/project.pbxproj index c4533fe9b..5040b3ac9 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.xcodeproj/project.pbxproj +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.xcodeproj/project.pbxproj @@ -641,7 +641,7 @@ repositoryURL = "https://github.com/apollographql/apollo-ios.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 1.23.0; + minimumVersion = 2.0.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 2ff5bd53a..88977be4b 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apollographql/apollo-ios.git", "state" : { - "revision" : "d591c1dd55824867877cff4f6551fe32983d7f51", - "version" : "1.23.0" + "revision" : "3b1203b721a81f7995ee73f393aa07b43d301720", + "version" : "2.0.6" } } ], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift index 7af281d61..6b7886292 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift @@ -1,27 +1,8 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { struct CartDeliveryGroupFragment: Storefront.SelectionSet, Fragment { @@ -49,6 +30,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartDeliveryGroupFragment.self + ] + } + /// The ID for the delivery group. var id: Storefront.ID { __data["id"] @@ -102,6 +89,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartDeliveryGroupFragment.DeliveryAddress.self + ] + } + /// The first line of the address. Typically the street address or PO Box number. var address1: String? { __data["address1"] @@ -177,6 +170,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartDeliveryGroupFragment.DeliveryOption.self + ] + } + /// The unique identifier of the delivery option. var handle: String { __data["handle"] @@ -228,6 +227,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartDeliveryGroupFragment.DeliveryOption.EstimatedCost.self + ] + } + /// Decimal money amount. var amount: Storefront.Decimal { __data["amount"] @@ -263,6 +268,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartDeliveryGroupFragment.SelectedDeliveryOption.self + ] + } + /// The description of the delivery option. var description: String? { __data["description"] @@ -304,6 +315,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartDeliveryGroupFragment.SelectedDeliveryOption.EstimatedCost.self + ] + } + /// Decimal money amount. var amount: Storefront.Decimal { __data["amount"] diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartFragment.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartFragment.graphql.swift index 7871c3531..f6d1c1785 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartFragment.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartFragment.graphql.swift @@ -1,27 +1,8 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { struct CartFragment: Storefront.SelectionSet, Fragment { @@ -51,6 +32,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.self + ] + } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] @@ -109,6 +96,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.BuyerIdentity.self + ] + } + /// The email address of the buyer that's interacting with the cart. var email: String? { __data["email"] @@ -145,6 +138,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.BuyerIdentity.Customer.self + ] + } + /// The customer’s email address. var email: String? { __data["email"] @@ -177,6 +176,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.DeliveryGroups.self + ] + } + /// A list of the nodes contained in CartDeliveryGroupEdge. var nodes: [Node] { __data["nodes"] @@ -202,6 +207,13 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.DeliveryGroups.Node.self, + CartDeliveryGroupFragment.self + ] + } + /// The ID for the delivery group. var id: Storefront.ID { __data["id"] @@ -266,6 +278,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.Lines.self + ] + } + /// A list of the nodes contained in BaseCartLineEdge. var nodes: [Node] { __data["nodes"] @@ -291,6 +309,13 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.Lines.Node.self, + CartLineFragment.self + ] + } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] @@ -350,6 +375,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.Cost.self + ] + } + /// The total amount for the customer to pay. var totalAmount: TotalAmount { __data["totalAmount"] @@ -387,6 +418,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.Cost.TotalAmount.self + ] + } + /// Decimal money amount. var amount: Storefront.Decimal { __data["amount"] @@ -419,6 +456,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.Cost.SubtotalAmount.self + ] + } + /// Decimal money amount. var amount: Storefront.Decimal { __data["amount"] @@ -451,6 +494,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartFragment.Cost.TotalTaxAmount.self + ] + } + /// Decimal money amount. var amount: Storefront.Decimal { __data["amount"] diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartLineFragment.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartLineFragment.graphql.swift index 327b1b108..ffea3e41f 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartLineFragment.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartLineFragment.graphql.swift @@ -1,27 +1,8 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { struct CartLineFragment: Storefront.SelectionSet, Fragment { @@ -48,6 +29,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartLineFragment.self + ] + } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] @@ -88,6 +75,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartLineFragment.Merchandise.self + ] + } + var asProductVariant: AsProductVariant? { _asInlineFragment() } @@ -117,6 +110,13 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartLineFragment.Merchandise.self, + CartLineFragment.Merchandise.AsProductVariant.self + ] + } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] @@ -167,6 +167,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartLineFragment.Merchandise.AsProductVariant.Image.self + ] + } + /// The location of the image as a URL. /// /// If no transform options are specified, then the original image will be preserved including any pre-applied transforms. @@ -200,6 +206,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartLineFragment.Merchandise.AsProductVariant.Price.self + ] + } + /// Decimal money amount. var amount: Storefront.Decimal { __data["amount"] @@ -233,6 +245,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartLineFragment.Merchandise.AsProductVariant.Product.self + ] + } + /// The name for the product that displays to customers. The title is used to construct the product's handle. /// For example, if a product is titled "Black Sunglasses", then the handle is `black-sunglasses`. var title: String { @@ -271,6 +289,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartLineFragment.Merchandise.AsProductVariant.Product.FeaturedImage.self + ] + } + /// The location of the image as a URL. /// /// If no transform options are specified, then the original image will be preserved including any pre-applied transforms. @@ -306,6 +330,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartLineFragment.Cost.self + ] + } + /// The total cost of the merchandise line. var totalAmount: TotalAmount { __data["totalAmount"] @@ -332,6 +362,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartLineFragment.Cost.TotalAmount.self + ] + } + /// Decimal money amount. var amount: Storefront.Decimal { __data["amount"] diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartUserErrorFragment.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartUserErrorFragment.graphql.swift index 8c3dbb55a..9364e48fa 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartUserErrorFragment.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartUserErrorFragment.graphql.swift @@ -1,27 +1,8 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { struct CartUserErrorFragment: Storefront.SelectionSet, Fragment { @@ -47,6 +28,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartUserErrorFragment.self + ] + } + /// The error code. var code: GraphQLEnum? { __data["code"] diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Mutations/CartCreateMutation.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Mutations/CartCreateMutation.graphql.swift index 8339221c1..22518f5f0 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Mutations/CartCreateMutation.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Mutations/CartCreateMutation.graphql.swift @@ -1,30 +1,11 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { - class CartCreateMutation: GraphQLMutation { + struct CartCreateMutation: GraphQLMutation { static let operationName: String = "CartCreate" static let operationDocument: ApolloAPI.OperationDocument = .init( definition: .init( @@ -47,7 +28,7 @@ extension Storefront { self.language = language } - public var __variables: Variables? { + @_spi(Unsafe) public var __variables: Variables? { [ "input": input, "country": country, @@ -71,7 +52,15 @@ extension Storefront { ] } - /// Creates a new cart. + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartCreateMutation.Data.self + ] + } + + /// Creates a new [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) for a buyer session. You can optionally initialize the cart with merchandise lines, discount codes, gift card codes, buyer identity for international pricing, and custom attributes. + /// + /// The returned cart includes a `checkoutUrl` that directs the buyer to complete their purchase. var cartCreate: CartCreate? { __data["cartCreate"] } @@ -97,6 +86,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartCreateMutation.Data.CartCreate.self + ] + } + /// The new cart. var cart: Cart? { __data["cart"] @@ -127,6 +122,13 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartCreateMutation.Data.CartCreate.Cart.self, + CartFragment.self + ] + } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] @@ -203,6 +205,13 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + CartCreateMutation.Data.CartCreate.UserError.self, + CartUserErrorFragment.self + ] + } + /// The error code. var code: GraphQLEnum? { __data["code"] diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetCartQuery.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetCartQuery.graphql.swift index 03eaffea0..9384386fa 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetCartQuery.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetCartQuery.graphql.swift @@ -1,30 +1,11 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { - class GetCartQuery: GraphQLQuery { + struct GetCartQuery: GraphQLQuery { static let operationName: String = "GetCart" static let operationDocument: ApolloAPI.OperationDocument = .init( definition: .init( @@ -47,7 +28,7 @@ extension Storefront { self.language = language } - public var __variables: Variables? { + @_spi(Unsafe) public var __variables: Variables? { [ "id": id, "country": country, @@ -71,8 +52,15 @@ extension Storefront { ] } - /// Retrieve a cart by its ID. For more information, refer to - /// [Manage a cart with the Storefront API](https://shopify.dev/custom-storefronts/cart/manage). + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + GetCartQuery.Data.self + ] + } + + /// Returns a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) by its ID. The cart contains the merchandise lines a buyer intends to purchase, along with estimated costs, applied discounts, gift cards, and delivery options. + /// + /// Use the [`checkoutUrl`](https://shopify.dev/docs/api/storefront/latest/queries/cart#returns-Cart.fields.checkoutUrl) field to redirect buyers to Shopify's web checkout when they're ready to complete their purchase. For more information, refer to [Manage a cart with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). var cart: Cart? { __data["cart"] } @@ -97,6 +85,13 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + GetCartQuery.Data.Cart.self, + CartFragment.self + ] + } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetProductsQuery.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetProductsQuery.graphql.swift index 6f4dd0ad0..2ce04c88f 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetProductsQuery.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetProductsQuery.graphql.swift @@ -1,30 +1,11 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. @_exported import ApolloAPI +@_spi(Execution) @_spi(Unsafe) import ApolloAPI extension Storefront { - class GetProductsQuery: GraphQLQuery { + struct GetProductsQuery: GraphQLQuery { static let operationName: String = "GetProducts" static let operationDocument: ApolloAPI.OperationDocument = .init( definition: .init( @@ -32,12 +13,12 @@ extension Storefront { ) ) - public var first: GraphQLNullable + public var first: GraphQLNullable public var country: GraphQLEnum public var language: GraphQLEnum public init( - first: GraphQLNullable = 10, + first: GraphQLNullable = 10, country: GraphQLEnum, language: GraphQLEnum ) { @@ -46,7 +27,7 @@ extension Storefront { self.language = language } - public var __variables: Variables? { + @_spi(Unsafe) public var __variables: Variables? { [ "first": first, "country": country, @@ -70,7 +51,15 @@ extension Storefront { ] } - /// Returns a list of the shop's products. For storefront search, use the [`search`](https://shopify.dev/docs/api/storefront/latest/queries/search) query. + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + GetProductsQuery.Data.self + ] + } + + /// Returns a paginated list of the shop's [products](https://shopify.dev/docs/api/storefront/current/objects/Product). + /// + /// For full-text storefront search, use the [`search`](https://shopify.dev/docs/api/storefront/current/queries/search) query instead. var products: Products { __data["products"] } @@ -95,6 +84,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + GetProductsQuery.Data.Products.self + ] + } + /// A list of the nodes contained in ProductEdge. var nodes: [Node] { __data["nodes"] @@ -123,6 +118,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + GetProductsQuery.Data.Products.Node.self + ] + } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] @@ -166,6 +167,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + GetProductsQuery.Data.Products.Node.FeaturedImage.self + ] + } + /// The location of the image as a URL. /// /// If no transform options are specified, then the original image will be preserved including any pre-applied transforms. @@ -198,6 +205,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + GetProductsQuery.Data.Products.Node.Variants.self + ] + } + /// A list of the nodes contained in ProductVariantEdge. var nodes: [Node] { __data["nodes"] @@ -227,6 +240,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + GetProductsQuery.Data.Products.Node.Variants.Node.self + ] + } + /// A globally-unique ID. var id: Storefront.ID { __data["id"] @@ -272,6 +291,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + GetProductsQuery.Data.Products.Node.Variants.Node.Image.self + ] + } + /// The location of the image as a URL. /// /// If no transform options are specified, then the original image will be preserved including any pre-applied transforms. @@ -305,6 +330,12 @@ extension Storefront { ] } + static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { + [ + GetProductsQuery.Data.Products.Node.Variants.Node.Price.self + ] + } + /// Decimal money amount. var amount: Storefront.Decimal { __data["amount"] diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift index 35100cd0d..a6e405507 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift @@ -1,27 +1,7 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { /// Defines what type of merchandise is in the delivery group. diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartErrorCode.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartErrorCode.graphql.swift index 5f1f4482a..206429616 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartErrorCode.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartErrorCode.graphql.swift @@ -1,30 +1,10 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { - /// Possible error codes that can be returned by `CartUserError`. + /// Error codes returned by [`CartUserError`](https://shopify.dev/docs/api/storefront/current/objects/CartUserError) during cart mutations. Covers validation failures for addresses, quantities, delivery options, merchandise lines, discount codes, and metafields. enum CartErrorCode: String, EnumType { /// The input value is invalid. case invalid = "INVALID" @@ -36,14 +16,22 @@ extension Storefront { case missingDiscountCode = "MISSING_DISCOUNT_CODE" /// Missing note. case missingNote = "MISSING_NOTE" + /// The note length must be below the specified maximum. + case noteTooLong = "NOTE_TOO_LONG" /// Delivery group was not found in cart. case invalidDeliveryGroup = "INVALID_DELIVERY_GROUP" /// Delivery option was not valid. case invalidDeliveryOption = "INVALID_DELIVERY_OPTION" + /// The delivery group is in a pending state. + case pendingDeliveryGroups = "PENDING_DELIVERY_GROUPS" /// The payment wasn't valid. case invalidPayment = "INVALID_PAYMENT" /// The payment method is not supported. case paymentMethodNotSupported = "PAYMENT_METHOD_NOT_SUPPORTED" + /// The payment method is not applicable. + case paymentMethodNotApplicable = "PAYMENT_METHOD_NOT_APPLICABLE" + /// The payment is invalid. Deferred payment is required. + case invalidPaymentDeferredPaymentRequired = "INVALID_PAYMENT_DEFERRED_PAYMENT_REQUIRED" /// Cannot update payment on an empty cart case invalidPaymentEmptyCart = "INVALID_PAYMENT_EMPTY_CART" /// Validation failed. @@ -60,6 +48,14 @@ extension Storefront { case minimumNotMet = "MINIMUM_NOT_MET" /// The quantity must be below the specified maximum for the item. case maximumExceeded = "MAXIMUM_EXCEEDED" + /// Too many delivery addresses on Cart. + case tooManyDeliveryAddresses = "TOO_MANY_DELIVERY_ADDRESSES" + /// Only one delivery address can be selected. + case onlyOneDeliveryAddressCanBeSelected = "ONLY_ONE_DELIVERY_ADDRESS_CAN_BE_SELECTED" + /// The delivery address was not found. + case invalidDeliveryAddressId = "INVALID_DELIVERY_ADDRESS_ID" + /// Buyer cannot purchase for company location. + case buyerCannotPurchaseForCompanyLocation = "BUYER_CANNOT_PURCHASE_FOR_COMPANY_LOCATION" /// The specified address field is required. case addressFieldIsRequired = "ADDRESS_FIELD_IS_REQUIRED" /// The specified address field is too long. @@ -82,5 +78,33 @@ extension Storefront { case provinceNotFound = "PROVINCE_NOT_FOUND" /// A general error occurred during address validation. case unspecifiedAddressError = "UNSPECIFIED_ADDRESS_ERROR" + /// Credit card has expired. + case paymentsCreditCardBaseExpired = "PAYMENTS_CREDIT_CARD_BASE_EXPIRED" + /// Credit card gateway is not supported. + case paymentsCreditCardBaseGatewayNotSupported = "PAYMENTS_CREDIT_CARD_BASE_GATEWAY_NOT_SUPPORTED" + /// Credit card error. + case paymentsCreditCardGeneric = "PAYMENTS_CREDIT_CARD_GENERIC" + /// Credit card month is invalid. + case paymentsCreditCardMonthInclusion = "PAYMENTS_CREDIT_CARD_MONTH_INCLUSION" + /// Credit card number is invalid. + case paymentsCreditCardNumberInvalid = "PAYMENTS_CREDIT_CARD_NUMBER_INVALID" + /// Credit card number format is invalid. + case paymentsCreditCardNumberInvalidFormat = "PAYMENTS_CREDIT_CARD_NUMBER_INVALID_FORMAT" + /// Credit card verification value is blank. + case paymentsCreditCardVerificationValueBlank = "PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_BLANK" + /// Credit card verification value is invalid for card type. + case paymentsCreditCardVerificationValueInvalidForCardType = "PAYMENTS_CREDIT_CARD_VERIFICATION_VALUE_INVALID_FOR_CARD_TYPE" + /// Credit card has expired. + case paymentsCreditCardYearExpired = "PAYMENTS_CREDIT_CARD_YEAR_EXPIRED" + /// Credit card expiry year is invalid. + case paymentsCreditCardYearInvalidExpiryYear = "PAYMENTS_CREDIT_CARD_YEAR_INVALID_EXPIRY_YEAR" + /// Variant can only be purchased with a selling plan. + case variantRequiresSellingPlan = "VARIANT_REQUIRES_SELLING_PLAN" + /// Selling plan is not applicable. + case sellingPlanNotApplicable = "SELLING_PLAN_NOT_APPLICABLE" + /// An error occurred while saving the cart. + case serviceUnavailable = "SERVICE_UNAVAILABLE" + /// The cart is too large to save. + case cartTooLarge = "CART_TOO_LARGE" } } diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CountryCode.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CountryCode.graphql.swift index 264de1337..92f2ee22a 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CountryCode.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CountryCode.graphql.swift @@ -1,27 +1,7 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { /// The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines. diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CurrencyCode.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CurrencyCode.graphql.swift index 795cd88f0..aedcd5ea2 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CurrencyCode.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CurrencyCode.graphql.swift @@ -1,27 +1,7 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { /// The three-letter currency codes that represent the world currencies used in diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryAddressValidationStrategy.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryAddressValidationStrategy.graphql.swift new file mode 100644 index 000000000..ecc12a00a --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryAddressValidationStrategy.graphql.swift @@ -0,0 +1,17 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) import ApolloAPI + +extension Storefront { + /// Controls how delivery addresses are validated during cart operations. The default validation checks only the country code, while strict validation verifies all address fields against Shopify's checkout rules and rejects invalid addresses. + /// + /// Used by [`DeliveryAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/DeliveryAddressInput) when setting buyer identity preferences, and by [`CartSelectableAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressInput) and [`CartSelectableAddressUpdateInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressUpdateInput) when managing cart delivery addresses. + enum DeliveryAddressValidationStrategy: String, EnumType { + /// Only the country code is validated. + case countryCodeOnly = "COUNTRY_CODE_ONLY" + /// Strict validation is performed, i.e. all fields in the address are validated + /// according to Shopify's checkout rules. If the address fails validation, the cart will not be updated. + case strict = "STRICT" + } +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryMethodType.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryMethodType.graphql.swift index e3515f836..a7aabf214 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryMethodType.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryMethodType.graphql.swift @@ -1,27 +1,7 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { /// List of different delivery method types. diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/LanguageCode.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/LanguageCode.graphql.swift index 590bb07ef..245b415fb 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/LanguageCode.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/LanguageCode.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { - /// Language codes supported by Shopify. + /// Supported languages for retrieving translated storefront content. Pass a language code to the [`@inContext`](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/in-context) directive to return product titles, descriptions, and other translatable fields in that language. + /// + /// The [`Localization`](https://shopify.dev/docs/api/storefront/current/objects/Localization) object provides the list of available languages for the active country, and each [`Country`](https://shopify.dev/docs/api/storefront/current/objects/Country) in [`availableCountries`](https://shopify.dev/docs/api/storefront/current/objects/Localization#field-Localization.fields.availableCountries) includes its own available languages. enum LanguageCode: String, EnumType { /// Afrikaans. case af = "AF" diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/PreferenceDeliveryMethodType.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/PreferenceDeliveryMethodType.graphql.swift index 85a308ae5..6ab63f63a 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/PreferenceDeliveryMethodType.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/PreferenceDeliveryMethodType.graphql.swift @@ -1,27 +1,7 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) import ApolloAPI extension Storefront { /// The preferred delivery methods such as shipping, local pickup or through pickup points. diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/AttributeInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/AttributeInput.graphql.swift index e087b8425..11058cc4c 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/AttributeInput.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/AttributeInput.graphql.swift @@ -1,30 +1,10 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { - /// The input fields for an attribute. + /// A custom key-value pair that stores additional information on a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart) or [cart line](https://shopify.dev/docs/api/storefront/current/objects/CartLine). Attributes capture additional information like gift messages, special instructions, or custom order details. Learn more about [managing carts with the Storefront API](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). struct AttributeInput: InputObject { private(set) var __data: InputDict diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartAddressInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartAddressInput.graphql.swift new file mode 100644 index 000000000..acc3c221b --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartAddressInput.graphql.swift @@ -0,0 +1,37 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// Specifies a delivery address for a cart. Provide either a [`deliveryAddress`](https://shopify.dev/docs/api/storefront/current/input-objects/CartAddressInput#fields-deliveryAddress) with full address details, or a [`copyFromCustomerAddressId`](https://shopify.dev/docs/api/storefront/current/input-objects/CartAddressInput#fields-copyFromCustomerAddressId) to copy from an existing customer address. Used by [`CartSelectableAddressInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressInput) and [`CartSelectableAddressUpdateInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartSelectableAddressUpdateInput). + struct CartAddressInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + deliveryAddress: GraphQLNullable = nil, + copyFromCustomerAddressId: GraphQLNullable = nil + ) { + __data = InputDict([ + "deliveryAddress": deliveryAddress, + "copyFromCustomerAddressId": copyFromCustomerAddressId + ]) + } + + /// A delivery address stored on this cart. + var deliveryAddress: GraphQLNullable { + get { __data["deliveryAddress"] } + set { __data["deliveryAddress"] = newValue } + } + + /// Copies details from the customer address to an address on this cart. + var copyFromCustomerAddressId: GraphQLNullable { + get { __data["copyFromCustomerAddressId"] } + set { __data["copyFromCustomerAddressId"] = newValue } + } + } +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift index 8c019c88f..e2cdd085f 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift @@ -1,33 +1,15 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { - /// Specifies the input fields to update the buyer information associated with a cart. - /// Buyer identity is used to determine - /// [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing) - /// and should match the customer's shipping address. + /// The input fields for identifying the buyer associated with a cart. Buyer identity determines [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) and should match the customer's shipping address. + /// + /// Used by [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) and [`cartBuyerIdentityUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartBuyerIdentityUpdate) to set contact information, location, and checkout preferences. + /// + /// > Note: + /// > Preferences prefill fields at checkout but don't sync back to the cart if overwritten. struct CartBuyerIdentityInput: InputObject { private(set) var __data: InputDict diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryAddressInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryAddressInput.graphql.swift new file mode 100644 index 000000000..2513370b4 --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryAddressInput.graphql.swift @@ -0,0 +1,103 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// The input fields to create or update a cart address. + struct CartDeliveryAddressInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + address1: GraphQLNullable = nil, + address2: GraphQLNullable = nil, + city: GraphQLNullable = nil, + company: GraphQLNullable = nil, + countryCode: GraphQLNullable> = nil, + firstName: GraphQLNullable = nil, + lastName: GraphQLNullable = nil, + phone: GraphQLNullable = nil, + provinceCode: GraphQLNullable = nil, + zip: GraphQLNullable = nil + ) { + __data = InputDict([ + "address1": address1, + "address2": address2, + "city": city, + "company": company, + "countryCode": countryCode, + "firstName": firstName, + "lastName": lastName, + "phone": phone, + "provinceCode": provinceCode, + "zip": zip + ]) + } + + /// The first line of the address. Typically the street address or PO Box number. + var address1: GraphQLNullable { + get { __data["address1"] } + set { __data["address1"] = newValue } + } + + /// The second line of the address. Typically the number of the apartment, suite, or unit. + var address2: GraphQLNullable { + get { __data["address2"] } + set { __data["address2"] = newValue } + } + + /// The name of the city, district, village, or town. + var city: GraphQLNullable { + get { __data["city"] } + set { __data["city"] = newValue } + } + + /// The name of the customer's company or organization. + var company: GraphQLNullable { + get { __data["company"] } + set { __data["company"] = newValue } + } + + /// The name of the country. + var countryCode: GraphQLNullable> { + get { __data["countryCode"] } + set { __data["countryCode"] = newValue } + } + + /// The first name of the customer. + var firstName: GraphQLNullable { + get { __data["firstName"] } + set { __data["firstName"] = newValue } + } + + /// The last name of the customer. + var lastName: GraphQLNullable { + get { __data["lastName"] } + set { __data["lastName"] = newValue } + } + + /// A unique phone number for the customer. + /// + /// Formatted using E.164 standard. For example, _+16135551111_. + var phone: GraphQLNullable { + get { __data["phone"] } + set { __data["phone"] = newValue } + } + + /// The region of the address, such as the province, state, or district. + var provinceCode: GraphQLNullable { + get { __data["provinceCode"] } + set { __data["provinceCode"] = newValue } + } + + /// The zip or postal code of the address. + var zip: GraphQLNullable { + get { __data["zip"] } + set { __data["zip"] = newValue } + } + } +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryCoordinatesPreferenceInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryCoordinatesPreferenceInput.graphql.swift index df2126399..eb0f0c3ed 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryCoordinatesPreferenceInput.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryCoordinatesPreferenceInput.graphql.swift @@ -1,27 +1,7 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { /// Preferred location used to find the closest pick up point based on coordinates. diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryInput.graphql.swift new file mode 100644 index 000000000..19432992e --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryInput.graphql.swift @@ -0,0 +1,31 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// The input fields for the cart's delivery properties. + struct CartDeliveryInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + addresses: GraphQLNullable<[CartSelectableAddressInput]> = nil + ) { + __data = InputDict([ + "addresses": addresses + ]) + } + + /// Selectable addresses to present to the buyer on the cart. + /// + /// The input must not contain more than `250` values. + var addresses: GraphQLNullable<[CartSelectableAddressInput]> { + get { __data["addresses"] } + set { __data["addresses"] = newValue } + } + } +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryPreferenceInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryPreferenceInput.graphql.swift index 311b8e173..7ccd890c5 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryPreferenceInput.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryPreferenceInput.graphql.swift @@ -1,27 +1,7 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { /// Delivery preferences can be used to prefill the delivery section at checkout. diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInput.graphql.swift index 80ac0873d..7faf377f9 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInput.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInput.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { - /// The input fields to create a cart. + /// The input fields for creating a [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). Used by the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation. + /// + /// Accepts merchandise lines, discount codes, gift card codes, and a note. You can also set custom attributes, metafields, buyer identity for international pricing, and delivery addresses. struct CartInput: InputObject { private(set) var __data: InputDict @@ -36,16 +18,20 @@ extension Storefront { attributes: GraphQLNullable<[AttributeInput]> = nil, lines: GraphQLNullable<[CartLineInput]> = nil, discountCodes: GraphQLNullable<[String]> = nil, + giftCardCodes: GraphQLNullable<[String]> = nil, note: GraphQLNullable = nil, buyerIdentity: GraphQLNullable = nil, + delivery: GraphQLNullable = nil, metafields: GraphQLNullable<[CartInputMetafieldInput]> = nil ) { __data = InputDict([ "attributes": attributes, "lines": lines, "discountCodes": discountCodes, + "giftCardCodes": giftCardCodes, "note": note, "buyerIdentity": buyerIdentity, + "delivery": delivery, "metafields": metafields ]) } @@ -74,6 +60,14 @@ extension Storefront { set { __data["discountCodes"] = newValue } } + /// The case-insensitive gift card codes. + /// + /// The input must not contain more than `250` values. + var giftCardCodes: GraphQLNullable<[String]> { + get { __data["giftCardCodes"] } + set { __data["giftCardCodes"] = newValue } + } + /// A note that's associated with the cart. For example, the note can be a personalized message to the buyer. var note: GraphQLNullable { get { __data["note"] } @@ -88,6 +82,12 @@ extension Storefront { set { __data["buyerIdentity"] = newValue } } + /// The delivery-related fields for the cart. + var delivery: GraphQLNullable { + get { __data["delivery"] } + set { __data["delivery"] = newValue } + } + /// The metafields to associate with this cart. /// /// The input must not contain more than `250` values. diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInputMetafieldInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInputMetafieldInput.graphql.swift index 2f535cbfa..353b89f09 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInputMetafieldInput.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInputMetafieldInput.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { /// The input fields for a cart metafield value to set. + /// + /// Cart metafields will be copied to order metafields at order creation time if there is a matching order metafield definition with the [`cart to order copyable`](https://shopify.dev/docs/apps/build/metafields/use-metafield-capabilities#cart-to-order-copyable) capability enabled. struct CartInputMetafieldInput: InputObject { private(set) var __data: InputDict diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartLineInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartLineInput.graphql.swift index 76ad00c02..bee7ff32b 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartLineInput.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartLineInput.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { - /// The input fields to create a merchandise line on a cart. + /// The input fields for adding a merchandise line to a cart. Each line represents a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) the buyer intends to purchase, along with the quantity and optional [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan) for subscriptions. + /// + /// Used by the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation when creating a cart with initial items, and the [`cartLinesAdd`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesAdd) mutation when adding items to an existing cart. struct CartLineInput: InputObject { private(set) var __data: InputDict @@ -34,7 +16,7 @@ extension Storefront { init( attributes: GraphQLNullable<[AttributeInput]> = nil, - quantity: GraphQLNullable = nil, + quantity: GraphQLNullable = nil, merchandiseId: ID, sellingPlanId: GraphQLNullable = nil ) { @@ -55,7 +37,7 @@ extension Storefront { } /// The quantity of the merchandise. - var quantity: GraphQLNullable { + var quantity: GraphQLNullable { get { __data["quantity"] } set { __data["quantity"] = newValue } } diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartPreferencesInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartPreferencesInput.graphql.swift index 15e42e898..da09e7e98 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartPreferencesInput.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartPreferencesInput.graphql.swift @@ -1,27 +1,7 @@ -/* - MIT License +// @generated +// This file was automatically generated and should not be edited. - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI +@_spi(Internal) @_spi(Unsafe) import ApolloAPI extension Storefront { /// The input fields represent preferences for the buyer that is interacting with the cart. diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartSelectableAddressInput.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartSelectableAddressInput.graphql.swift new file mode 100644 index 000000000..2900a7388 --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartSelectableAddressInput.graphql.swift @@ -0,0 +1,55 @@ +// @generated +// This file was automatically generated and should not be edited. + +@_spi(Internal) @_spi(Unsafe) import ApolloAPI + +extension Storefront { + /// The input fields for a selectable delivery address to present to the buyer. Used by [`CartDeliveryInput`](https://shopify.dev/docs/api/storefront/current/input-objects/CartDeliveryInput) when creating a cart with the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation. + /// + /// You can pre-select an address for the buyer, mark it as one-time use so it isn't saved after checkout, and specify how strictly the address should be validated. + struct CartSelectableAddressInput: InputObject { + private(set) var __data: InputDict + + init(_ data: InputDict) { + __data = data + } + + init( + address: CartAddressInput, + selected: GraphQLNullable = nil, + oneTimeUse: GraphQLNullable = nil, + validationStrategy: GraphQLNullable> = nil + ) { + __data = InputDict([ + "address": address, + "selected": selected, + "oneTimeUse": oneTimeUse, + "validationStrategy": validationStrategy + ]) + } + + /// Exactly one kind of delivery address. + var address: CartAddressInput { + get { __data["address"] } + set { __data["address"] = newValue } + } + + /// Sets exactly one address as pre-selected for the buyer. + var selected: GraphQLNullable { + get { __data["selected"] } + set { __data["selected"] = newValue } + } + + /// When true, this delivery address will not be associated with the buyer after a successful checkout. + var oneTimeUse: GraphQLNullable { + get { __data["oneTimeUse"] } + set { __data["oneTimeUse"] = newValue } + } + + /// Defines what kind of address validation is requested. + var validationStrategy: GraphQLNullable> { + get { __data["validationStrategy"] } + set { __data["validationStrategy"] = newValue } + } + } +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/BaseCartLine.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/BaseCartLine.graphql.swift index d9f7fc67b..1b24703ef 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/BaseCartLine.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/BaseCartLine.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Interfaces { - /// Represents a cart line common fields. + /// Defines the shared fields for items in a shopping cart. Implemented by [`CartLine`](https://shopify.dev/docs/api/storefront/current/objects/CartLine) for individual merchandise and [`ComponentizableCartLine`](https://shopify.dev/docs/api/storefront/current/objects/ComponentizableCartLine) for grouped merchandise like bundles. + /// + /// Each implementation includes the merchandise being purchased, quantity, cost breakdown, applied discounts, custom attributes, and any associated [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan). static let BaseCartLine = ApolloAPI.Interface( name: "BaseCartLine", keyFields: nil, diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/DisplayableError.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/DisplayableError.graphql.swift index 7f939af35..1d681ff57 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/DisplayableError.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/DisplayableError.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI @@ -30,11 +10,11 @@ extension Storefront.Interfaces { keyFields: nil, implementingObjects: [ "CartUserError", - "CheckoutUserError", "CustomerUserError", "MetafieldDeleteUserError", "MetafieldsSetUserError", - "UserError" + "UserError", + "UserErrorsShopPayPaymentRequestSessionUserErrors" ] ) } diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/HasMetafields.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/HasMetafields.graphql.swift index 6393dd629..5166414f7 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/HasMetafields.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/HasMetafields.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Interfaces { - /// Represents information about the metafields associated to the specified resource. + /// Implemented by resources that support custom metadata through [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) objects. Types like [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), and [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) implement this interface to provide consistent access to metafields. + /// + /// You can retrieve a [single metafield](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields#fields-metafield) by namespace and key, or fetch [multiple metafields](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields#fields-metafields) in a single request. If you omit the namespace, then the [app-reserved namespace](https://shopify.dev/docs/apps/build/metafields#app-owned-metafields) is used by default. static let HasMetafields = ApolloAPI.Interface( name: "HasMetafields", keyFields: nil, @@ -42,6 +24,7 @@ extension Storefront.Interfaces { "Page", "Product", "ProductVariant", + "SellingPlan", "Shop" ] ) diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Media.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Media.graphql.swift index 07e704df0..0b485698c 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Media.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Media.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Interfaces { - /// Represents a media interface. + /// A common set of fields for media content associated with [products](https://shopify.dev/docs/api/storefront/current/objects/Product). Implementations include [`MediaImage`](https://shopify.dev/docs/api/storefront/current/objects/MediaImage) for Shopify-hosted images, [`Video`](https://shopify.dev/docs/api/storefront/current/objects/Video) for Shopify-hosted videos, [`ExternalVideo`](https://shopify.dev/docs/api/storefront/current/objects/ExternalVideo) for videos hosted on platforms like YouTube or Vimeo, and [`Model3d`](https://shopify.dev/docs/api/storefront/current/objects/Model3d) for 3D models. + /// + /// Each implementation shares fields for alt text, content type, and preview images, while adding type-specific fields like embed URLs for external videos or source files for 3D models. static let Media = ApolloAPI.Interface( name: "Media", keyFields: nil, diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Node.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Node.graphql.swift index fc0c98e4b..d618ab7ad 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Node.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Node.graphql.swift @@ -1,33 +1,10 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Interfaces { - /// An object with an ID field to support global identification, in accordance with the - /// [Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface). - /// This interface is used by the [node](/docs/api/storefront/latest/queries/node) - /// and [nodes](/docs/api/storefront/latest/queries/nodes) queries. + /// Enables global object identification following the [Relay specification](https://relay.dev/graphql/objectidentification.htm#sec-Node-Interface). Any type implementing this interface has a globally-unique `id` field and can be fetched directly using the [`node`](https://shopify.dev/docs/api/storefront/current/queries/node) or [`nodes`](https://shopify.dev/docs/api/storefront/current/queries/nodes) queries. static let Node = ApolloAPI.Interface( name: "Node", keyFields: nil, @@ -37,8 +14,6 @@ extension Storefront.Interfaces { "Blog", "Cart", "CartLine", - "Checkout", - "CheckoutLineItem", "Collection", "Comment", "Company", @@ -59,12 +34,16 @@ extension Storefront.Interfaces { "Model3d", "Order", "Page", - "Payment", "Product", "ProductOption", + "ProductOptionValue", "ProductVariant", "Shop", + "ShopPayInstallmentsFinancingPlan", + "ShopPayInstallmentsFinancingPlanTerm", + "ShopPayInstallmentsProductVariantPricing", "ShopPolicy", + "TaxonomyCategory", "UrlRedirect", "Video" ] diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/OnlineStorePublishable.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/OnlineStorePublishable.graphql.swift index 9153fca84..71b9061f1 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/OnlineStorePublishable.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/OnlineStorePublishable.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Trackable.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Trackable.graphql.swift index c274e87ee..16caf623f 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Trackable.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Trackable.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/AppliedGiftCard.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/AppliedGiftCard.graphql.swift index bb8c1ee3b..82cdcbf00 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/AppliedGiftCard.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/AppliedGiftCard.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Article.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Article.graphql.swift index 693df4173..e00a94183 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Article.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Article.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// An article in an online store blog. + /// A post that belongs to a [`Blog`](https://shopify.dev/docs/api/storefront/current/objects/Blog). Each article includes content with optional HTML formatting, an excerpt for previews, [`ArticleAuthor`](https://shopify.dev/docs/api/storefront/current/objects/ArticleAuthor) information, and an associated [`Image`](https://shopify.dev/docs/api/storefront/current/objects/Image). + /// + /// Articles can be organized with tags and include [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) metadata. You can manage [comments](https://shopify.dev/docs/api/storefront/current/objects/Comment) when the blog's comment policy enables them. static let Article = ApolloAPI.Object( typename: "Article", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift index a415f757c..397963f3d 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Blog.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Blog.graphql.swift index bd6b1fbee..e0e0857ec 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Blog.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Blog.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// An online store blog. + /// A blog container for [`Article`](https://shopify.dev/docs/api/storefront/current/objects/Article) objects. Stores can have multiple blogs, for example to organize content by topic or purpose. + /// + /// Each blog provides access to its articles, contributing [`ArticleAuthor`](https://shopify.dev/docs/api/storefront/current/objects/ArticleAuthor) objects, and [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information. You can retrieve articles individually [by handle](https://shopify.dev/docs/api/storefront/current/objects/Blog#field-Blog.fields.articleByHandle) or as a [paginated list](https://shopify.dev/docs/api/storefront/current/objects/Blog#field-Blog.fields.articles). static let Blog = ApolloAPI.Object( typename: "Blog", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Cart.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Cart.graphql.swift index 4ff827209..3deb99cde 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Cart.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Cart.graphql.swift @@ -1,33 +1,14 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// A cart represents the merchandise that a buyer intends to purchase, - /// and the estimated cost associated with the cart. Learn how to - /// [interact with a cart](https://shopify.dev/custom-storefronts/internationalization/international-pricing) - /// during a customer's session. + /// A cart represents the merchandise that a buyer intends to purchase, and the estimated cost associated with the cart, throughout a customer's session. + /// + /// Use the [`checkoutUrl`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-checkoutUrl) field to direct buyers to Shopify's web checkout to complete their purchase. + /// + /// Learn more about [interacting with carts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/cart/manage). static let Cart = ApolloAPI.Object( typename: "Cart", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift index e7f18c261..e61906d36 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Represents information about the buyer that is interacting with the cart. + /// Contact information about the buyer interacting with a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart). The buyer's country determines [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) and should match their shipping address. + /// + /// For B2B scenarios, the [`purchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity#field-CartBuyerIdentity.fields.purchasingCompany) field identifies the company and location on whose behalf a business customer purchases. The [`preferences`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity#field-CartBuyerIdentity.fields.preferences) field stores delivery and wallet settings that prefill checkout fields to streamline the buying process. static let CartBuyerIdentity = ApolloAPI.Object( typename: "CartBuyerIdentity", implementedInterfaces: [], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCost.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCost.graphql.swift index 1e0554013..4db413aa5 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCost.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCost.graphql.swift @@ -1,32 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// The costs that the buyer will pay at checkout. - /// The cart cost uses [`CartBuyerIdentity`](https://shopify.dev/api/storefront/reference/cart/cartbuyeridentity) to determine - /// [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing). + /// The estimated costs that a buyer will pay at checkout. The `Cart` object's [`cost`](https://shopify.dev/docs/api/storefront/current/objects/Cart#field-Cart.fields.cost) field returns this. The costs are subject to change and changes will be reflected at checkout. Costs reflect [international pricing](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets/international-pricing) based on the buyer's context. + /// + /// Amounts include the subtotal before taxes and cart-level discounts, the checkout charge amount excluding deferred payments, and the total. The subtotal and total amounts each include a corresponding boolean field indicating whether the value is an estimate. static let CartCost = ApolloAPI.Object( typename: "CartCost", implementedInterfaces: [], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCreatePayload.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCreatePayload.graphql.swift index 823a8e272..865172ce8 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCreatePayload.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCreatePayload.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift index cf19b112f..bfdbf9586 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Information about the options available for one or more line items to be delivered to a specific address. + /// Groups cart line items that share the same delivery destination. Each group provides the available [`CartDeliveryOption`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryOption) choices for that address, along with the customer's selected option. + /// + /// Access through the [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) object's `deliveryGroups` field. Items are grouped by merchandise type (one-time purchase vs subscription), allowing different delivery methods for each. static let CartDeliveryGroup = ApolloAPI.Object( typename: "CartDeliveryGroup", implementedInterfaces: [], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift index 158e38ac4..0ee2a8dd4 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryOption.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryOption.graphql.swift index aa55852e6..3cea50036 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryOption.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryOption.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Information about a delivery option. + /// A shipping or delivery choice available to customers during checkout. Each option includes a title, estimated cost, and delivery method type such as shipping or local pickup. + /// + /// Returned by the [`CartDeliveryGroup`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup) object's [`deliveryOptions`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup#field-CartDeliveryGroup.fields.deliveryOptions) field and [`selectedDeliveryOption`](https://shopify.dev/docs/api/storefront/current/objects/CartDeliveryGroup#field-CartDeliveryGroup.fields.selectedDeliveryOption) field. static let CartDeliveryOption = ApolloAPI.Object( typename: "CartDeliveryOption", implementedInterfaces: [], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLine.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLine.graphql.swift index 03a86fbfa..9b6a81396 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLine.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLine.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Represents information about the merchandise in the cart. + /// An item in a customer's [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart) representing a product variant they intend to purchase. Each cart line tracks the merchandise, quantity, cost breakdown, and any applied discounts. + /// + /// Cart lines can include custom attributes for additional information like gift wrapping requests, and can be associated with a [`SellingPlanAllocation`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanAllocation) for purchase options like subscriptions, pre-orders, or try-before-you-buy. The [`instructions`](https://shopify.dev/docs/api/storefront/current/objects/CartLine#field-CartLine.fields.instructions) field indicates whether the line can be removed or have its quantity updated. static let CartLine = ApolloAPI.Object( typename: "CartLine", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLineCost.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLineCost.graphql.swift index 6873e4513..8f9cbadbd 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLineCost.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLineCost.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// The cost of the merchandise line that the buyer will pay at checkout. + /// Cost breakdown for a single line item in a [cart](https://shopify.dev/docs/api/storefront/current/objects/Cart). Includes the per-unit price, the subtotal before line-level discounts, and the final total amount the buyer pays. + /// + /// The [`compareAtAmountPerQuantity`](https://shopify.dev/docs/api/storefront/current/objects/CartLineCost#field-CartLineCost.fields.compareAtAmountPerQuantity) field shows the original price when the item is on sale, enabling the display of savings to customers. static let CartLineCost = ApolloAPI.Object( typename: "CartLineCost", implementedInterfaces: [], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartUserError.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartUserError.graphql.swift index 50002bd48..98cb6741f 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartUserError.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartUserError.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Checkout.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Checkout.graphql.swift deleted file mode 100644 index 88ded8c51..000000000 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Checkout.graphql.swift +++ /dev/null @@ -1,35 +0,0 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI - -extension Storefront.Objects { - /// A container for all the information required to checkout items and pay. - /// - /// The Storefront GraphQL Checkout API is deprecated and will be removed in a future version. Please see https://shopify.dev/changelog/deprecation-of-checkout-apis for more information. - static let Checkout = ApolloAPI.Object( - typename: "Checkout", - implementedInterfaces: [Storefront.Interfaces.Node.self], - keyFields: nil - ) -} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CheckoutLineItem.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CheckoutLineItem.graphql.swift deleted file mode 100644 index aea99e938..000000000 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CheckoutLineItem.graphql.swift +++ /dev/null @@ -1,33 +0,0 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI - -extension Storefront.Objects { - /// A single line item in the checkout, grouped by variant and attributes. - static let CheckoutLineItem = ApolloAPI.Object( - typename: "CheckoutLineItem", - implementedInterfaces: [Storefront.Interfaces.Node.self], - keyFields: nil - ) -} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CheckoutUserError.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CheckoutUserError.graphql.swift deleted file mode 100644 index 53ea088ce..000000000 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CheckoutUserError.graphql.swift +++ /dev/null @@ -1,33 +0,0 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI - -extension Storefront.Objects { - /// Represents an error that happens during execution of a checkout mutation. - static let CheckoutUserError = ApolloAPI.Object( - typename: "CheckoutUserError", - implementedInterfaces: [Storefront.Interfaces.DisplayableError.self], - keyFields: nil - ) -} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Collection.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Collection.graphql.swift index 0c9038365..5438ac75d 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Collection.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Collection.graphql.swift @@ -1,31 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// A collection represents a grouping of products that a shop owner can create to - /// organize them or make their shops easier to browse. + /// A group of products [organized by a merchant](https://help.shopify.com/manual/products/collections) to make their store easier to browse. Collections can help customers discover related products by category, season, promotion, or other criteria. + /// + /// Query a collection's products with [filtering options](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products) like availability, price range, vendor, and tags. Each collection includes [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information, an optional [`Image`](https://shopify.dev/docs/api/storefront/current/objects/Image), and supports custom data through [`metafields`](https://shopify.dev/docs/api/storefront/current/objects/Metafield). static let Collection = ApolloAPI.Object( typename: "Collection", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Comment.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Comment.graphql.swift index 43b8c4401..963a5b6f9 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Comment.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Comment.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Company.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Company.graphql.swift index f56f1a3da..bcc140a28 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Company.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Company.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Represents information about a company which is also a customer of the shop. + /// A B2B organization that purchases from the shop. In the Storefront API, company information is accessed through the [`PurchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/PurchasingCompany) object on [`CartBuyerIdentity`](https://shopify.dev/docs/api/storefront/current/objects/CartBuyerIdentity), which provides the associated location and contact for the current purchasing context. + /// + /// You can store custom data using [metafields](https://shopify.dev/docs/apps/build/metafields). static let Company = ApolloAPI.Object( typename: "Company", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyContact.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyContact.graphql.swift index c4c7a3f21..23a2afd34 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyContact.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyContact.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyLocation.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyLocation.graphql.swift index dca75c1d0..ae5000e55 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyLocation.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyLocation.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// A company's location. + /// A branch or office of a [`Company`](https://shopify.dev/docs/api/storefront/current/objects/Company) where B2B customers can place orders. When a B2B customer selects a location after logging in, the Storefront API contextualizes product queries to return location-specific pricing and quantity rules. + /// + /// Access through the [`PurchasingCompany`](https://shopify.dev/docs/api/storefront/current/objects/PurchasingCompany) object, which associates the location with the buyer's [`Cart`](https://shopify.dev/docs/api/storefront/current/objects/Cart). static let CompanyLocation = ApolloAPI.Object( typename: "CompanyLocation", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ComponentizableCartLine.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ComponentizableCartLine.graphql.swift index a92e2a37b..60c9f5230 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ComponentizableCartLine.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ComponentizableCartLine.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Customer.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Customer.graphql.swift index 711e2eaf1..b3f6cfdf9 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Customer.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Customer.graphql.swift @@ -1,30 +1,14 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout. + /// A customer account with the shop. Includes data such as contact information, [addresses](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress) and marketing preferences for logged-in customers, so they don't have to provide these details at every checkout. + /// + /// Access the customer through the [`customer`](https://shopify.dev/docs/api/storefront/current/queries/customer) query using a customer access token obtained from the [`customerAccessTokenCreate`](https://shopify.dev/docs/api/storefront/current/mutations/customerAccessTokenCreate) mutation. + /// + /// The object implements the [`HasMetafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields) interface, enabling retrieval of [custom data](https://shopify.dev/docs/apps/build/custom-data) associated with the customer. static let Customer = ApolloAPI.Object( typename: "Customer", implementedInterfaces: [Storefront.Interfaces.HasMetafields.self], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CustomerUserError.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CustomerUserError.graphql.swift index 486950955..0dcd3fdb3 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CustomerUserError.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CustomerUserError.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ExternalVideo.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ExternalVideo.graphql.swift index e931572e5..5d2249be4 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ExternalVideo.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ExternalVideo.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/GenericFile.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/GenericFile.graphql.swift index 7760362df..225a5c1aa 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/GenericFile.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/GenericFile.graphql.swift @@ -1,30 +1,14 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// The generic file resource lets you manage files in a merchant’s store. Generic files include any file that doesn’t fit into a designated type such as image or video. Example: PDF, JSON. + /// Any file that doesn't fit into a designated type like image or video. For example, a PDF or JSON document. Use this object to manage files in a merchant's store. + /// + /// Generic files are commonly referenced through [file reference metafields](https://shopify.dev/docs/apps/build/metafields/list-of-data-types) and returned as part of the [`MetafieldReference`](https://shopify.dev/docs/api/storefront/current/unions/MetafieldReference) union. + /// + /// Includes the file's URL, MIME type, size in bytes, and an optional preview image. static let GenericFile = ApolloAPI.Object( typename: "GenericFile", implementedInterfaces: [Storefront.Interfaces.Node.self], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Image.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Image.graphql.swift index 003701c15..1e5bf9260 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Image.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Image.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Represents an image resource. + /// An image resource with URL, dimensions, and transformation options. Used for product images, collection images, media previews, and other visual content throughout the storefront. + /// + /// The [`url`](https://shopify.dev/docs/api/storefront/current/objects/Image#field-Image.fields.url) field accepts an [`ImageTransformInput`](https://shopify.dev/docs/api/storefront/current/input-objects/ImageTransformInput) argument for resizing, cropping, scaling for retina displays, and converting between image formats. Use the [`thumbhash`](https://shopify.dev/docs/api/storefront/current/objects/Image#field-Image.fields.thumbhash) field to display lightweight placeholders while images load. static let Image = ApolloAPI.Object( typename: "Image", implementedInterfaces: [], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Location.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Location.graphql.swift index c682ce07e..7142b75e3 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Location.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Location.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Represents a location where product inventory is held. + /// A physical store location where product inventory is held and that supports in-store pickup. Provides the location's name, address, and geographic coordinates for proximity-based sorting. Use with [`StoreAvailability`](https://shopify.dev/docs/api/storefront/current/objects/StoreAvailability) to show customers where a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) is available for pickup. + /// + /// Learn more about [supporting local pickup on storefronts](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/local-pickup). static let Location = ApolloAPI.Object( typename: "Location", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MailingAddress.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MailingAddress.graphql.swift index e91d4440e..faa5ff56b 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MailingAddress.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MailingAddress.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Represents a mailing address for customers and shipping. + /// A physical mailing address associated with a [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer) or [`Order`](https://shopify.dev/docs/api/storefront/current/objects/Order). Stores standard address components including street address, city, province, country, and postal code, along with customer name and company information. + /// + /// The address includes geographic coordinates and provides pre-formatted output through the [`formatted`](https://shopify.dev/docs/api/storefront/current/objects/MailingAddress#field-MailingAddress.fields.formatted) field, which can optionally include or exclude name and company details. static let MailingAddress = ApolloAPI.Object( typename: "MailingAddress", implementedInterfaces: [Storefront.Interfaces.Node.self], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Market.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Market.graphql.swift index 368ca0941..27f4a6e9d 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Market.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Market.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// A group of one or more regions of the world that a merchant is targeting for sales. To learn more about markets, refer to [the Shopify Markets conceptual overview](/docs/apps/markets). + /// An audience of buyers that a merchant targets for sales. Audiences can include geographic regions, company locations, and retail locations. Markets enable localized shopping experiences with region-specific languages, currencies, and pricing. + /// + /// Each market has a unique [`handle`](https://shopify.dev/docs/api/storefront/current/objects/Market#field-Market.fields.handle) for identification and supports custom data through [`metafields`](https://shopify.dev/docs/api/storefront/current/objects/Metafield). Learn more about [building localized experiences with Shopify Markets](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/markets). static let Market = ApolloAPI.Object( typename: "Market", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaImage.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaImage.graphql.swift index 068435360..52ee53c81 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaImage.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaImage.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Represents a Shopify hosted image. + /// An image hosted on Shopify's content delivery network (CDN). Used for product images, brand logos, and other visual content across the storefront. + /// + /// The [`image`](https://shopify.dev/docs/api/storefront/current/objects/MediaImage#field-MediaImage.fields.image) field provides the actual image data with transformation options. Implements the [`Media`](https://shopify.dev/docs/api/storefront/current/interfaces/Media) interface alongside other media types like [`Video`](https://shopify.dev/docs/api/storefront/current/objects/Video) and [`Model3d`](https://shopify.dev/docs/api/storefront/current/objects/Model3d). static let MediaImage = ApolloAPI.Object( typename: "MediaImage", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaPresentation.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaPresentation.graphql.swift index 09862bae3..b0e1afa18 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaPresentation.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaPresentation.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Menu.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Menu.graphql.swift index 98052364a..fc17c7c32 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Menu.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Menu.graphql.swift @@ -1,31 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// A [navigation menu](https://help.shopify.com/manual/online-store/menus-and-links) representing a hierarchy - /// of hyperlinks (items). + /// A navigation structure for building store [menus](https://help.shopify.com/manual/online-store/menus-and-links). Each menu contains [`MenuItem`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem) objects that can be nested to create multi-level navigation hierarchies. + /// + /// Menu items can link to [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), [blogs](https://shopify.dev/docs/api/storefront/current/objects/Blog), or external URLs. Use the [`menu`](https://shopify.dev/docs/api/storefront/current/queries/menu) query to retrieve a menu by its handle. static let Menu = ApolloAPI.Object( typename: "Menu", implementedInterfaces: [Storefront.Interfaces.Node.self], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MenuItem.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MenuItem.graphql.swift index b0cbac80c..629e96079 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MenuItem.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MenuItem.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// A menu item within a parent menu. + /// A navigation link within a [`Menu`](https://shopify.dev/docs/api/storefront/current/objects/Menu). Each item has a title, URL, and can link to store resources like [products](https://shopify.dev/docs/api/storefront/current/objects/Product), [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), [pages](https://shopify.dev/docs/api/storefront/current/objects/Page), [blogs](https://shopify.dev/docs/api/storefront/current/objects/Blog), or external URLs. + /// + /// Menu items support nested hierarchies through the [`items`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem#field-MenuItem.fields.items) field, enabling dropdown or multi-level navigation structures. The [`tags`](https://shopify.dev/docs/api/storefront/current/objects/MenuItem#field-MenuItem.fields.tags) field filters results when the item links to a collection specifically. static let MenuItem = ApolloAPI.Object( typename: "MenuItem", implementedInterfaces: [Storefront.Interfaces.Node.self], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metafield.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metafield.graphql.swift index 0bae50321..de5868209 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metafield.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metafield.graphql.swift @@ -1,31 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Metafields represent custom metadata attached to a resource. Metafields can be sorted into namespaces and are - /// comprised of keys, values, and value types. + /// [Custom metadata](https://shopify.dev/docs/apps/build/metafields) attached to a Shopify resource such as a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/current/objects/Collection), or [`Customer`](https://shopify.dev/docs/api/storefront/current/objects/Customer). Each metafield is identified by a namespace and key, and stores a value with an associated type. + /// + /// Values are always stored as strings, but the [`type`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.type) field indicates how to interpret the data. When a metafield's type is a resource reference, use the [`reference`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.reference) or [`references`](https://shopify.dev/docs/api/storefront/current/objects/Metafield#field-Metafield.fields.references) fields to retrieve the linked objects. Access metafields on any resource that implements the [`HasMetafields`](https://shopify.dev/docs/api/storefront/current/interfaces/HasMetafields) interface. static let Metafield = ApolloAPI.Object( typename: "Metafield", implementedInterfaces: [Storefront.Interfaces.Node.self], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldDeleteUserError.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldDeleteUserError.graphql.swift index 86c5e5fe3..72e248a1b 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldDeleteUserError.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldDeleteUserError.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldsSetUserError.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldsSetUserError.graphql.swift index 21a2e3cc7..0dd6a1791 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldsSetUserError.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldsSetUserError.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metaobject.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metaobject.graphql.swift index 4f03ed30f..e9f100560 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metaobject.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metaobject.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// An instance of a user-defined model based on a MetaobjectDefinition. + /// An instance of [custom structured data](https://shopify.dev/docs/apps/build/metaobjects) defined by a metaobject definition. Metaobjects store reusable content that extends beyond standard Shopify resources, such as size charts, author profiles, or custom content sections. + /// + /// Each metaobject contains fields that match the types and validation rules specified in its definition. [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) references can point to metaobjects, connecting custom data with products, collections, and other resources. If the definition has the `renderable` capability, then the [`seo`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject#field-Metaobject.fields.seo) field provides SEO metadata. If it has the `online_store` capability, then the [`onlineStoreUrl`](https://shopify.dev/docs/api/storefront/current/objects/Metaobject#field-Metaobject.fields.onlineStoreUrl) field returns the public URL. static let Metaobject = ApolloAPI.Object( typename: "Metaobject", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Model3d.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Model3d.graphql.swift index 9506edc8c..800d50eb4 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Model3d.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Model3d.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MoneyV2.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MoneyV2.graphql.swift index 3b649b424..fe411c165 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MoneyV2.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MoneyV2.graphql.swift @@ -1,30 +1,10 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// A monetary value with currency. + /// A precise monetary value with its associated currency. Combines a decimal amount with a three-letter [`CurrencyCode`](https://shopify.dev/docs/api/storefront/current/enums/CurrencyCode) to express prices, costs, and other financial values. For example, 12.99 USD. static let MoneyV2 = ApolloAPI.Object( typename: "MoneyV2", implementedInterfaces: [], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Mutation.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Mutation.graphql.swift index 7b4dc18e2..f9b04a225 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Mutation.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Mutation.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Order.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Order.graphql.swift index 1e74f8748..64d9464a6 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Order.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Order.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Page.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Page.graphql.swift index 3a856be03..85f252c22 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Page.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Page.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Shopify merchants can create pages to hold static HTML content. Each Page object represents a custom page on the online store. + /// A [custom content page](https://help.shopify.com/manual/online-store/add-edit-pages) on a merchant's store. Pages display HTML-formatted content, such as "About Us", contact details, or store policies. + /// + /// Each page has a unique [`handle`](https://shopify.dev/docs/api/storefront/current/objects/Page#field-Page.fields.handle) for URL routing and includes [`SEO`](https://shopify.dev/docs/api/storefront/current/objects/SEO) information for search engine optimization. Pages support [`Metafield`](https://shopify.dev/docs/api/storefront/current/objects/Metafield) attachments for storing additional custom data. static let Page = ApolloAPI.Object( typename: "Page", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Payment.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Payment.graphql.swift deleted file mode 100644 index fab896c9b..000000000 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Payment.graphql.swift +++ /dev/null @@ -1,33 +0,0 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import ApolloAPI - -extension Storefront.Objects { - /// A payment applied to a checkout. - static let Payment = ApolloAPI.Object( - typename: "Payment", - implementedInterfaces: [Storefront.Interfaces.Node.self], - keyFields: nil - ) -} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Product.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Product.graphql.swift index b358fdd37..4fbb9c9b7 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Product.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Product.graphql.swift @@ -1,39 +1,16 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// The `Product` object lets you manage products in a merchant’s store. + /// Represents an item listed in a shop's catalog. + /// + /// Products support multiple [product variants](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant), representing different versions of the same product, and can include various [media](https://shopify.dev/docs/api/storefront/current/interfaces/Media) types. Use the [`selectedOrFirstAvailableVariant`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.selectedOrFirstAvailableVariant) or [`variantBySelectedOptions`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.variantBySelectedOptions) fields to help customers find the right variant based on their selections. /// - /// Products are the goods and services that merchants offer to customers. - /// They can include various details such as title, description, price, images, and options such as size or color. - /// You can use [product variants](/docs/api/storefront/latest/objects/ProductVariant) - /// to create or update different versions of the same product. - /// You can also add or update product [media](/docs/api/storefront/latest/interfaces/Media). - /// Products can be organized by grouping them into a [collection](/docs/api/storefront/latest/objects/Collection). + /// Products can be organized into [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), associated with [selling plans](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanGroup) for subscriptions, and extended with custom data through [metafields](https://shopify.dev/docs/api/storefront/current/objects/Metafield). /// - /// Learn more about working with [products and collections](/docs/storefronts/headless/building-with-the-storefront-api/products-collections). + /// Learn more about working with [products and collections](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections). static let Product = ApolloAPI.Object( typename: "Product", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductConnection.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductConnection.graphql.swift index 13fe788e9..2893db127 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductConnection.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductConnection.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOption.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOption.graphql.swift index 85edac2ea..b630868c5 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOption.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOption.graphql.swift @@ -1,32 +1,14 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Product property names like "Size", "Color", and "Material" that the customers can select. - /// Variants are selected based on permutations of these options. - /// 255 characters limit each. + /// A customizable product attribute that customers select when purchasing, such as "Size", "Color", or "Material". Each option has a name and a set of [`ProductOptionValue`](https://shopify.dev/docs/api/storefront/current/objects/ProductOptionValue) objects representing the available choices. + /// + /// Different combinations of option values create distinct [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) objects. Option values can include visual swatches that display colors or images to help customers make selections. Option names have a 255-character limit. + /// + /// Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). static let ProductOption = ApolloAPI.Object( typename: "ProductOption", implementedInterfaces: [Storefront.Interfaces.Node.self], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOptionValue.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOptionValue.graphql.swift new file mode 100644 index 000000000..3f0122c09 --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOptionValue.graphql.swift @@ -0,0 +1,17 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A specific value for a [`ProductOption`](https://shopify.dev/docs/api/storefront/current/objects/ProductOption), such as "Red" or "Blue" for a "Color" option. Option values combine across different options to create [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) objects. + /// + /// Each value can include a visual swatch that displays a color or image. The [`firstSelectableVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductOptionValue#field-ProductOptionValue.fields.firstSelectableVariant) field returns the variant that combines this option value with the lowest-position values for all other options. This is useful for building product selection interfaces. + /// + /// Learn more about [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). + static let ProductOptionValue = ApolloAPI.Object( + typename: "ProductOptionValue", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariant.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariant.graphql.swift index 63a6b497c..fee3dbed9 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariant.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariant.graphql.swift @@ -1,30 +1,14 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// A product variant represents a different version of a product, such as differing sizes or differing colors. + /// A specific version of a [product](https://shopify.dev/docs/api/storefront/current/objects/Product) available for sale, differentiated by options like size or color. For example, a small blue t-shirt and a large blue t-shirt are separate variants of the same product. For more information, see the docs on [Shopify's product model](https://shopify.dev/docs/apps/build/product-merchandising/products-and-collections). + /// + /// For products with quantity rules, variants enforce minimum, maximum, and increment constraints on purchases. + /// + /// Variants also support subscriptions and pre-orders through [selling plan allocations](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanAllocation) objects, bundle configurations through [product variant components](https://shopify.dev/docs/api/storefront/current/objects/ProductVariantComponent) objects, and [shop pay installments pricing](https://shopify.dev/docs/api/storefront/current/objects/ShopPayInstallmentsPricing) for flexible payment options. static let ProductVariant = ApolloAPI.Object( typename: "ProductVariant", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariantConnection.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariantConnection.graphql.swift index 1c00daaac..626b14d8a 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariantConnection.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariantConnection.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/QueryRoot.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/QueryRoot.graphql.swift index 512712b59..0adca9c0d 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/QueryRoot.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/QueryRoot.graphql.swift @@ -1,30 +1,14 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. + /// The entry point for all Storefront API queries. Provides access to shop resources including products, collections, carts, and customer data, as well as content like articles and pages. This query acts as the public, top-level type from which all queries must start. + /// + /// Use individual queries like [`product`](https://shopify.dev/docs/api/storefront/current/queries/product) or [`collection`](https://shopify.dev/docs/api/storefront/current/queries/collection) to fetch specific resources by ID or handle. Use plural queries like [`products`](https://shopify.dev/docs/api/storefront/current/queries/products) or [`collections`](https://shopify.dev/docs/api/storefront/current/queries/collections) to retrieve paginated lists with optional filtering and sorting. The [`search`](https://shopify.dev/docs/api/storefront/current/queries/search) and [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries enable storefront search functionality. + /// + /// Explore queries interactively with the [GraphiQL explorer and sample query kit](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/api-exploration). static let QueryRoot = ApolloAPI.Object( typename: "QueryRoot", implementedInterfaces: [], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SearchQuerySuggestion.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SearchQuerySuggestion.graphql.swift index 2b9cf732c..fa3b0a000 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SearchQuerySuggestion.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SearchQuerySuggestion.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// A search query suggestion. + /// A suggested search term returned by the [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) query. Query suggestions help customers refine their searches by showing relevant terms as they type. + /// + /// The [`text`](https://shopify.dev/docs/api/storefront/current/objects/SearchQuerySuggestion#field-SearchQuerySuggestion.fields.text) field provides the plain suggestion, while [`styledText`](https://shopify.dev/docs/api/storefront/current/objects/SearchQuerySuggestion#field-SearchQuerySuggestion.fields.styledText) includes HTML tags to highlight matching portions. Implements [`Trackable`](https://shopify.dev/docs/api/storefront/current/interfaces/Trackable) for analytics reporting on search traffic origins. static let SearchQuerySuggestion = ApolloAPI.Object( typename: "SearchQuerySuggestion", implementedInterfaces: [Storefront.Interfaces.Trackable.self], diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SellingPlan.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SellingPlan.graphql.swift new file mode 100644 index 000000000..b2efdd937 --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SellingPlan.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Represents deferred or recurring purchase options for [products](https://shopify.dev/docs/api/storefront/current/objects/Product) and [product variants](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant), such as subscriptions, pre-orders, or try-before-you-buy. Each selling plan belongs to a [`SellingPlanGroup`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanGroup) and defines billing, pricing, inventory, and delivery policies. + static let SellingPlan = ApolloAPI.Object( + typename: "SellingPlan", + implementedInterfaces: [Storefront.Interfaces.HasMetafields.self], + keyFields: nil + ) +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Shop.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Shop.graphql.swift index 5a3bcc66c..7569031ef 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Shop.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Shop.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Shop represents a collection of the general settings and information about the shop. + /// The central hub for store-wide settings and information accessible through the Storefront API. Provides the shop's name, description, and branding configuration including logos and colors through the [`Brand`](https://shopify.dev/docs/api/storefront/current/objects/Brand) object. + /// + /// Access store policies such as privacy, refund, shipping, and terms of service via [`ShopPolicy`](https://shopify.dev/docs/api/storefront/current/objects/ShopPolicy), and the subscription policy via [`ShopPolicyWithDefault`](https://shopify.dev/docs/api/storefront/current/objects/ShopPolicyWithDefault). [`PaymentSettings`](https://shopify.dev/docs/api/storefront/current/objects/PaymentSettings) expose accepted card brands, supported digital wallets, and enabled presentment currencies. The object also includes the primary [`Domain`](https://shopify.dev/docs/api/storefront/current/objects/Domain), countries the shop ships to, [`ShopPayInstallmentsPricing`](https://shopify.dev/docs/api/storefront/current/objects/ShopPayInstallmentsPricing), and [`SocialLoginProvider`](https://shopify.dev/docs/api/storefront/current/objects/SocialLoginProvider) options for customer accounts. static let Shop = ApolloAPI.Object( typename: "Shop", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlan.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlan.graphql.swift new file mode 100644 index 000000000..e0bf0737a --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlan.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// The financing plan in Shop Pay Installments. + static let ShopPayInstallmentsFinancingPlan = ApolloAPI.Object( + typename: "ShopPayInstallmentsFinancingPlan", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlanTerm.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlanTerm.graphql.swift new file mode 100644 index 000000000..005193623 --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlanTerm.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// The terms of the financing plan in Shop Pay Installments. + static let ShopPayInstallmentsFinancingPlanTerm = ApolloAPI.Object( + typename: "ShopPayInstallmentsFinancingPlanTerm", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsProductVariantPricing.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsProductVariantPricing.graphql.swift new file mode 100644 index 000000000..9e6bf52e8 --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsProductVariantPricing.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// The shop pay installments pricing information for a product variant. + static let ShopPayInstallmentsProductVariantPricing = ApolloAPI.Object( + typename: "ShopPayInstallmentsProductVariantPricing", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPolicy.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPolicy.graphql.swift index d17cc1e05..9bebf5c98 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPolicy.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPolicy.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/TaxonomyCategory.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/TaxonomyCategory.graphql.swift new file mode 100644 index 000000000..43d4ea956 --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/TaxonomyCategory.graphql.swift @@ -0,0 +1,17 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// A category from Shopify's [Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17) assigned to a [`Product`](https://shopify.dev/docs/api/storefront/current/objects/Product). Categories provide hierarchical classification through the `ancestors` field. + /// + /// The [`ancestors`](https://shopify.dev/docs/api/storefront/current/objects/TaxonomyCategory#field-TaxonomyCategory.fields.ancestors) field returns the parent chain from the immediate parent up to the root. Each ancestor category also includes its own `ancestors`. + /// + /// The [`name`](https://shopify.dev/docs/api/storefront/latest/objects/TaxonomyCategory#field-TaxonomyCategory.fields.name) field returns the localized category name based on the storefront's request language with shop locale fallbacks. If a translation isn't available for the resolved locale, the English taxonomy name is returned. + static let TaxonomyCategory = ApolloAPI.Object( + typename: "TaxonomyCategory", + implementedInterfaces: [Storefront.Interfaces.Node.self], + keyFields: nil + ) +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UrlRedirect.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UrlRedirect.graphql.swift index 6f218217a..c5cbdf79d 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UrlRedirect.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UrlRedirect.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserError.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserError.graphql.swift index 1e728138d..34e9974cf 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserError.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserError.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserErrorsShopPayPaymentRequestSessionUserErrors.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserErrorsShopPayPaymentRequestSessionUserErrors.graphql.swift new file mode 100644 index 000000000..18685d1fa --- /dev/null +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserErrorsShopPayPaymentRequestSessionUserErrors.graphql.swift @@ -0,0 +1,13 @@ +// @generated +// This file was automatically generated and should not be edited. + +import ApolloAPI + +extension Storefront.Objects { + /// Error codes for failed Shop Pay payment request session mutations. + static let UserErrorsShopPayPaymentRequestSessionUserErrors = ApolloAPI.Object( + typename: "UserErrorsShopPayPaymentRequestSessionUserErrors", + implementedInterfaces: [Storefront.Interfaces.DisplayableError.self], + keyFields: nil + ) +} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Video.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Video.graphql.swift index bf42ce94b..317610398 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Video.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Video.graphql.swift @@ -1,30 +1,12 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Objects { - /// Represents a Shopify hosted video. + /// A video hosted on Shopify's servers. Implements the [`Media`](https://shopify.dev/docs/api/storefront/current/interfaces/Media) interface and provides multiple video sources through the [`sources`](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources) field, each with [format](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources.format), dimensions, and [URL information](https://shopify.dev/docs/api/storefront/current/objects/Video#field-Video.fields.sources.url) for adaptive playback. + /// + /// For videos hosted on external platforms like YouTube or Vimeo, use [`ExternalVideo`](https://shopify.dev/docs/api/storefront/current/objects/ExternalVideo) instead. static let Video = ApolloAPI.Object( typename: "Video", implementedInterfaces: [ diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/SchemaMetadata.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/SchemaMetadata.graphql.swift index c08c87b15..62d4bf197 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/SchemaMetadata.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/SchemaMetadata.graphql.swift @@ -1,25 +1,5 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI @@ -63,9 +43,6 @@ extension Storefront { case "CartLine": return Storefront.Objects.CartLine case "CartLineCost": return Storefront.Objects.CartLineCost case "CartUserError": return Storefront.Objects.CartUserError - case "Checkout": return Storefront.Objects.Checkout - case "CheckoutLineItem": return Storefront.Objects.CheckoutLineItem - case "CheckoutUserError": return Storefront.Objects.CheckoutUserError case "Collection": return Storefront.Objects.Collection case "Comment": return Storefront.Objects.Comment case "Company": return Storefront.Objects.Company @@ -93,18 +70,24 @@ extension Storefront { case "Mutation": return Storefront.Objects.Mutation case "Order": return Storefront.Objects.Order case "Page": return Storefront.Objects.Page - case "Payment": return Storefront.Objects.Payment case "Product": return Storefront.Objects.Product case "ProductConnection": return Storefront.Objects.ProductConnection case "ProductOption": return Storefront.Objects.ProductOption + case "ProductOptionValue": return Storefront.Objects.ProductOptionValue case "ProductVariant": return Storefront.Objects.ProductVariant case "ProductVariantConnection": return Storefront.Objects.ProductVariantConnection case "QueryRoot": return Storefront.Objects.QueryRoot case "SearchQuerySuggestion": return Storefront.Objects.SearchQuerySuggestion + case "SellingPlan": return Storefront.Objects.SellingPlan case "Shop": return Storefront.Objects.Shop + case "ShopPayInstallmentsFinancingPlan": return Storefront.Objects.ShopPayInstallmentsFinancingPlan + case "ShopPayInstallmentsFinancingPlanTerm": return Storefront.Objects.ShopPayInstallmentsFinancingPlanTerm + case "ShopPayInstallmentsProductVariantPricing": return Storefront.Objects.ShopPayInstallmentsProductVariantPricing case "ShopPolicy": return Storefront.Objects.ShopPolicy + case "TaxonomyCategory": return Storefront.Objects.TaxonomyCategory case "UrlRedirect": return Storefront.Objects.UrlRedirect case "UserError": return Storefront.Objects.UserError + case "UserErrorsShopPayPaymentRequestSessionUserErrors": return Storefront.Objects.UserErrorsShopPayPaymentRequestSessionUserErrors case "Video": return Storefront.Objects.Video default: return nil } diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Unions/Merchandise.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Unions/Merchandise.graphql.swift index 32fb446f8..49f0e10d1 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Unions/Merchandise.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Unions/Merchandise.graphql.swift @@ -1,30 +1,10 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. import ApolloAPI extension Storefront.Unions { - /// The merchandise to be purchased at checkout. + /// A [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) that a buyer intends to purchase at checkout. static let Merchandise = Union( name: "Merchandise", possibleTypes: [Storefront.Objects.ProductVariant.self] diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Storefront.graphql.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Storefront.graphql.swift index 0d95280aa..35be04633 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Storefront.graphql.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Storefront.graphql.swift @@ -1,24 +1,4 @@ -/* - MIT License - - Copyright 2023 - Present, Shopify Inc. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ +// @generated +// This file was automatically generated and should not be edited. enum Storefront {} diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Network.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Network.swift index 29133067f..530ac4c30 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Network.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Network.swift @@ -79,11 +79,6 @@ class Network { } private(set) lazy var apollo: ApolloClient = { - let client = URLSessionClient() - let cache = InMemoryNormalizedCache() - let store = ApolloStore(cache: cache) - let provider = NetworkInterceptorProvider(client: client, store: store) - let urlString = "https://\(EnvironmentVariables.storefrontDomain)/api/\(EnvironmentVariables.apiVersion)/graphql.json" guard let url = URL(string: urlString) else { @@ -91,44 +86,39 @@ class Network { } let transport = RequestChainNetworkTransport( - interceptorProvider: provider, endpointURL: url + interceptorProvider: StorefrontInterceptorProvider(), + endpointURL: url ) - return ApolloClient(networkTransport: transport, store: store) + return ApolloClient(networkTransport: transport) }() - func getProducts( - completionHandler: @escaping (Products?) -> Void - ) { + func getProducts() async -> Products? { print("Network: Starting product fetch from \(EnvironmentVariables.storefrontDomain)") - // Get device locale for @inContext directive let countryCode = GraphQLEnum(Storefront.CountryCode(rawValue: Locale.current.region?.identifier ?? "US") ?? .us) let languageCode = getLanguageCode() - Network.shared.apollo.fetch(query: Storefront.GetProductsQuery( - country: countryCode, - language: languageCode - )) { result in - switch result { - case let .success(response): - print("Network: Successfully fetched products") - if let errors = response.errors { - print("Network: GraphQL errors: \(errors)") - } - completionHandler(response.data?.products) - case let .failure(error): - print("Network: Failed to fetch products - \(error.localizedDescription)") - completionHandler(nil) + do { + let response = try await Network.shared.apollo.fetch(query: Storefront.GetProductsQuery( + country: countryCode, + language: languageCode + )) + print("Network: Successfully fetched products") + if let errors = response.errors { + print("Network: GraphQL errors: \(errors)") } + return response.data?.products + } catch { + print("Network: Failed to fetch products - \(error.localizedDescription)") + return nil } } func createCart( merchandiseQuantities: [MerchandiseID: Quantity], - configuration: ShopifyAcceleratedCheckouts.Configuration? = nil, - completionHandler: @escaping (Cart?) -> Void - ) { + configuration: ShopifyAcceleratedCheckouts.Configuration? = nil + ) async -> Cart? { let lines = merchandiseQuantities.map { merchandiseId, quantity in Storefront.CartLineInput( quantity: .some(quantity), @@ -136,7 +126,6 @@ class Network { ) } - // Create buyerIdentity from Customer configuration if available var buyerIdentity: Storefront.CartBuyerIdentityInput? if let customer = configuration?.customer { let emailInput: GraphQLNullable = customer.email ?? .none @@ -153,7 +142,6 @@ class Network { buyerIdentity: buyerIdentity ?? .none ) - // Get device locale for @inContext directive let countryCode = GraphQLEnum(Storefront.CountryCode(rawValue: Locale.current.region?.identifier ?? "US") ?? .us) let languageCode = getLanguageCode() @@ -163,45 +151,33 @@ class Network { language: languageCode ) - Network.shared.apollo.perform(mutation: mutation) { - switch $0 { - case let .success(response): - completionHandler(response.data?.cartCreate?.cart) - case let .failure(error): - print(error) - completionHandler(nil) - } + do { + let response = try await Network.shared.apollo.perform(mutation: mutation) + return response.data?.cartCreate?.cart + } catch { + print(error) + return nil } } } -class AuthorizationInterceptor: ApolloInterceptor { - public var id: String = UUID().uuidString - - func interceptAsync( - chain: RequestChain, - request: HTTPRequest, - response: HTTPResponse?, - completion: @escaping (Result, Error>) -> Void - ) { - request.addHeader( - name: "X-Shopify-Storefront-Access-Token", - value: EnvironmentVariables.storefrontAccessToken - ) - - chain.proceedAsync( - request: request, - response: response, - interceptor: self, - completion: completion - ) +struct StorefrontInterceptorProvider: InterceptorProvider { + func graphQLInterceptors( + for operation: some GraphQLOperation + ) -> [any GraphQLInterceptor] { + DefaultInterceptorProvider.shared.graphQLInterceptors(for: operation) + [ + AuthorizationInterceptor() + ] } } -class NetworkInterceptorProvider: DefaultInterceptorProvider { - override func interceptors(for operation: some GraphQLOperation) -> [ApolloInterceptor] { - var interceptors = super.interceptors(for: operation) - interceptors.insert(AuthorizationInterceptor(), at: 0) - return interceptors +struct AuthorizationInterceptor: GraphQLInterceptor { + func intercept( + request: Request, + next: NextInterceptorFunction + ) async throws -> InterceptorResultStream { + var authenticatedRequest = request + authenticatedRequest.additionalHeaders["X-Shopify-Storefront-Access-Token"] = EnvironmentVariables.storefrontAccessToken + return try await next(authenticatedRequest) } } diff --git a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/CartBuilderView.swift b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/CartBuilderView.swift index b30be73dd..749f8c0f0 100644 --- a/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/CartBuilderView.swift +++ b/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/CartBuilderView.swift @@ -116,17 +116,18 @@ struct CartBuilderView: View { private func createCustomCart() { isCreatingCart = true - Network.shared.createCart(merchandiseQuantities: selectedVariants, configuration: configuration) { cart in + Task { + let cart = await Network.shared.createCart( + merchandiseQuantities: selectedVariants, + configuration: configuration + ) withAnimation { self.cart = cart isCreatingCart = false - // Clear selections after creating cart selectedVariants.removeAll() } - // Trigger scroll to cart after creation - DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { - scrollTo(element: .cartDetails) - } + try? await Task.sleep(nanoseconds: 100_000_000) + scrollTo(element: .cartDetails) } } @@ -154,20 +155,14 @@ struct CartBuilderView: View { isLoadingProducts = false } - await withCheckedContinuation { continuation in - Network.shared.getProducts { products in - DispatchQueue.main.async { - if let products { - print("Loaded \(products.nodes.count) products") - withAnimation { - allProducts = products.nodes - } - } else { - print("Warning: No products returned from API") - } - continuation.resume() - } + let products = await Network.shared.getProducts() + if let products { + print("Loaded \(products.nodes.count) products") + withAnimation { + allProducts = products.nodes } + } else { + print("Warning: No products returned from API") } } }