diff --git a/dev.yml b/dev.yml index 2f410f797..06bd3abbb 100644 --- a/dev.yml +++ b/dev.yml @@ -162,22 +162,22 @@ commands: desc: "Apollo GraphQL schema and code generation commands" subcommands: download_schema: - desc: "Download GraphQL schema. Usage: dev apollo download_schema [accelerated|swift|all]" - syntax: " [accelerated|swift|all]" + desc: "Download GraphQL schema. Usage: dev apollo download_schema [swift|all]" + syntax: " [swift|all]" run: | case "$1" in android) cd platforms/android && ./scripts/apollo_download_schema ;; swift) shift; cd platforms/swift && ./Scripts/apollo_download_schema "$@" ;; - *) echo "Usage: dev apollo download_schema [accelerated|swift|all]"; exit 1 ;; + *) echo "Usage: dev apollo download_schema [swift|all]"; exit 1 ;; esac codegen: - desc: "Generate Apollo models. Usage: dev apollo codegen [accelerated|swift|all]" - syntax: " [accelerated|swift|all]" + desc: "Generate Apollo models. Usage: dev apollo codegen [swift|all]" + syntax: " [swift|all]" run: | case "$1" in android) cd platforms/android && ./scripts/apollo_codegen ;; swift) shift; cd platforms/swift && ./Scripts/apollo_codegen "$@" ;; - *) echo "Usage: dev apollo codegen [accelerated|swift|all]"; exit 1 ;; + *) echo "Usage: dev apollo codegen [swift|all]"; exit 1 ;; esac # Protocol @@ -435,13 +435,13 @@ commands: desc: "Swift Checkout Kit commands" subcommands: build: - desc: Build all Swift packages and sample apps + desc: Build all Swift packages and the sample app run: | set -e cd platforms/swift # ShopifyCheckoutKit-Package builds every library target in - # Package.swift in one xcodebuild invocation. The sample apps act as - # integration compilation checks against the built libraries. + # Package.swift in one xcodebuild invocation. The sample app acts as + # an integration compilation check against the built libraries. ./Scripts/xcode_run build ShopifyCheckoutKit-Package ./Scripts/build_samples subcommands: @@ -449,7 +449,7 @@ commands: desc: Build Swift package targets run: cd platforms/swift && ./Scripts/xcode_run build ShopifyCheckoutKit-Package samples: - desc: Build all sample applications to verify integration + desc: Build the sample application to verify integration run: cd platforms/swift && ./Scripts/build_samples start: @@ -474,10 +474,10 @@ commands: fi DERIVED_DATA="$PWD/../../.build/swift-start-simulator" - cd Samples + cd Samples/CheckoutKitSwiftDemo build_command=( xcodebuild build - -workspace Samples.xcworkspace + -project CheckoutKitSwiftDemo.xcodeproj -scheme CheckoutKitSwiftDemo -sdk iphonesimulator -destination "id=$DEVICE_ID" @@ -538,9 +538,9 @@ commands: test: desc: | - `dev swift test` - Run all tests for the ShopifyCheckoutKit-Package and the sample apps. + `dev swift test` - Run all tests for the ShopifyCheckoutKit-Package and sample app. `dev swift test ` - Run only the specified package test class. - `dev swift test sample [test_class_name]` - Run only the sample app test targets. + `dev swift test sample [test_class_name]` - Run only the sample app test target. syntax: "[test_class_name]" run: | set -e @@ -553,7 +553,7 @@ commands: fi subcommands: sample: - desc: Run the sample app test targets + desc: Run the sample app test target syntax: "[test_class_name]" run: cd platforms/swift && ./Scripts/test_samples "${1:-}" api: @@ -595,20 +595,18 @@ commands: # library targets in Package.swift (ShopifyCheckoutKit, # ShopifyAcceleratedCheckouts, EmbeddedCheckoutProtocol) in one pass. ./Scripts/xcode_run clean ShopifyCheckoutKit-Package - cd Samples - # Sample apps have a "Run Script" build phase that runs during clean - # and exits non-zero when there is nothing to delete. Tolerate it so - # the second sample still gets cleaned. - ../Scripts/xcode_run clean CheckoutKitSwiftDemo || true - ../Scripts/xcode_run clean ShopifyAcceleratedCheckoutsApp || true + cd Samples/CheckoutKitSwiftDemo + # The sample app has a "Run Script" build phase that runs during clean + # and exits non-zero when there is nothing to delete. + ../../Scripts/xcode_run clean CheckoutKitSwiftDemo || true open: desc: Open the Swift package or sample app in Xcode long_desc: | - Opens a Swift workspace in Xcode via `xed`. + Opens the demo Xcode project by default, or the Swift package when requested. - dev swift open Open the demo app workspace (default) - dev swift open demo Open the demo app workspace (aliases: sample, samples) + dev swift open Open the demo app project (default) + dev swift open demo Open the demo app project (aliases: sample, samples) dev swift open lib Open the ShopifyCheckoutKit Swift package (aliases: library, package, module) syntax: optional: "[lib|demo]" @@ -621,17 +619,17 @@ commands: case "${1:-demo}" in demo|sample|samples) - platforms/swift/Scripts/generate_xcode_projects - workspace="platforms/swift/Samples/Samples.xcworkspace" + platforms/swift/Scripts/generate_xcode_projects --spec Samples/CheckoutKitSwiftDemo/project.yml + target="platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo.xcodeproj" ;; - lib|library|package|module) workspace="platforms/swift" ;; + lib|library|package|module) target="platforms/swift" ;; *) echo "Usage: dev swift open [lib|demo]" >&2 exit 1 ;; esac - xed "$workspace" + xed "$target" # React Native react-native: diff --git a/e2e/bitrise.yml b/e2e/bitrise.yml index 6c8394964..e6d4ec3db 100644 --- a/e2e/bitrise.yml +++ b/e2e/bitrise.yml @@ -333,22 +333,22 @@ workflows: - bundle::bootstrap-mint: inputs: - mintfile_dir: platforms/swift - # Both samples build the root package and Apollo iOS from source. Neither changes - # between most pull requests, so DerivedData carries that work across builds. The key - # holds the resolved dependency graph: a pin change rebuilds rather than reuses. - # Xcode's incremental build owns correctness for the source that did change. + # The sample builds the root package and Apollo iOS from source. Those dependencies + # do not change between most pull requests, so DerivedData carries that work across + # builds. The key holds the resolved dependency graph: a pin change rebuilds rather + # than reuses. Xcode's incremental build owns correctness for changed source. - restore-cache@3: inputs: - key: &swift_samples_derived_data_cache_key |- - swift-samples-derived-data-{{ .OS }}-{{ .Arch }}-{{ checksum "Package.resolved" }} + swift-samples-derived-data-{{ .OS }}-{{ .Arch }}-{{ checksum "platforms/swift/Samples/CheckoutKitSwiftDemo/Package.resolved" }} - script@1: - title: Build and test the Swift sample apps + title: Build and test the Swift sample app timeout: 5400 no_output_timeout: 1800 inputs: - content: |- set -euo pipefail - # The samples only need a well-formed storefront configuration to compile, + # The sample only needs a well-formed storefront configuration to compile, # so this job runs on placeholders rather than e2e_configure_storefront, # which asserts the real secrets. Keeping it off them is what lets the job # run on fork pull requests, where Bitrise withholds secrets. diff --git a/e2e/scripts/build_swift_ios b/e2e/scripts/build_swift_ios index ec0c65733..c48e17f54 100755 --- a/e2e/scripts/build_swift_ios +++ b/e2e/scripts/build_swift_ios @@ -8,17 +8,17 @@ source "$script_dir/ios_build_helpers" e2e_configure_storefront -e2e_log "Generating Swift sample Xcode projects" +e2e_log "Generating the Swift sample Xcode project" platforms/swift/Scripts/generate_xcode_projects cd platforms/swift/Samples app_name="CheckoutKitSwiftDemo" -workspace="Samples.xcworkspace" +project="$app_name/$app_name.xcodeproj" scheme="$app_name" e2e_build_ios_device_ipa \ - --workspace "$workspace" \ + --project "$project" \ --scheme "$scheme" \ --app-name "$app_name" \ --bundle-id com.shopify.checkoutkit.swiftdemo \ @@ -34,7 +34,7 @@ simulator_app_zip="$e2e_dir/${app_name}-Simulator.zip" # Builds the simulator app bundle that is zipped for Tophat simulator installs. build_simulator_app() { xcodebuild build \ - -workspace "$workspace" \ + -project "$project" \ -scheme "$scheme" \ -configuration Release \ -skipPackagePluginValidation \ diff --git a/e2e/scripts/build_swift_ios_testflight b/e2e/scripts/build_swift_ios_testflight index 21a21ab31..03fe9e20a 100755 --- a/e2e/scripts/build_swift_ios_testflight +++ b/e2e/scripts/build_swift_ios_testflight @@ -13,7 +13,7 @@ e2e_reject_ios_signing_overrides e2e_configure_storefront -e2e_log "Generating Swift sample Xcode projects" +e2e_log "Generating the Swift sample Xcode project" platforms/swift/Scripts/generate_xcode_projects app_name="CheckoutKitSwiftDemo" @@ -22,7 +22,7 @@ archive_path="$(e2e_deploy_dir)/${app_name}.xcarchive" cd platforms/swift/Samples e2e_build_ios_device_ipa \ - --workspace Samples.xcworkspace \ + --project "$app_name/$app_name.xcodeproj" \ --scheme "$app_name" \ --app-name "$app_name" \ --bundle-id com.shopify.checkoutkit.swiftdemo \ diff --git a/e2e/scripts/run_local_e2e b/e2e/scripts/run_local_e2e index 706d5aeb6..651c6aebc 100755 --- a/e2e/scripts/run_local_e2e +++ b/e2e/scripts/run_local_e2e @@ -365,7 +365,7 @@ build_and_install() { "$ROOT_DIR/Scripts/generate_xcode_projects" cd "$ROOT_DIR/Samples" xcodebuild build \ - -workspace Samples.xcworkspace \ + -project "$APP_NAME/$APP_NAME.xcodeproj" \ -scheme "$APP_NAME" \ -sdk iphonesimulator \ -destination "id=$DEVICE_ID" \ diff --git a/platforms/swift/.swiftformat b/platforms/swift/.swiftformat index a505a70a4..e6f1e0d73 100644 --- a/platforms/swift/.swiftformat +++ b/platforms/swift/.swiftformat @@ -12,4 +12,3 @@ --exclude Sources/ShopifyCheckoutKit/Models.swift --exclude Sources/UniversalCommerceProtocol/EmbeddedCheckoutProtocol/Generated --exclude Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Generated ---exclude Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated diff --git a/platforms/swift/README.md b/platforms/swift/README.md index 2b27a8e6a..a3f6cb0b2 100644 --- a/platforms/swift/README.md +++ b/platforms/swift/README.md @@ -561,8 +561,7 @@ Use `CheckoutProtocol.Client` through `.connect(client)` to observe checkout com See [Samples](Samples/README.md): -- `CheckoutKitSwiftDemo` demonstrates a Storefront API cart flow, buyer identity modes, Customer Account API, checkout presentation, and protocol events. -- `ShopifyAcceleratedCheckoutsApp` demonstrates Shop Pay and Apple Pay accelerated checkout buttons. +- `CheckoutKitSwiftDemo` demonstrates a Storefront API cart flow, buyer identity modes, Customer Account API, checkout presentation, protocol events, and configurable Shop Pay and Apple Pay accelerated checkout buttons. ## Contributing diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/AcceleratedCheckoutsConfiguredView.swift b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/AcceleratedCheckoutsConfiguredView.swift new file mode 100644 index 000000000..92937221c --- /dev/null +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/AcceleratedCheckoutsConfiguredView.swift @@ -0,0 +1,84 @@ +import ShopifyAcceleratedCheckouts +import SwiftUI + +struct AcceleratedCheckoutsConfiguredView: View { + let content: Content + + @AppStorage(AppStorageKeys.requireEmail.rawValue) + private var requireEmail = true + + @AppStorage(AppStorageKeys.requirePhone.rawValue) + private var requirePhone = true + + @AppStorage(AppStorageKeys.locale.rawValue) + private var locale = "en" + + @AppStorage(AppStorageKeys.email.rawValue) + private var email = "" + + @AppStorage(AppStorageKeys.phone.rawValue) + private var phone = "" + + @AppStorage(AppStorageKeys.supportedCountries.rawValue) + private var supportedCountriesString = "" + + var body: some View { + if #available(iOS 16.0, *) { + content + .environment( + \.shopifyAcceleratedCheckoutsConfiguration, + ShopifyAcceleratedCheckouts.Configuration( + storefrontDomain: InfoDictionary.shared.domain, + storefrontAccessToken: InfoDictionary.shared.accessToken, + customer: customer + ) + ) + .environment( + \.shopifyApplePayConfiguration, + ShopifyAcceleratedCheckouts.ApplePayConfiguration( + merchantIdentifier: InfoDictionary.shared.merchantIdentifier, + contactFields: contactFields, + supportedShippingCountries: supportedCountries + ) + ) + .environment(\.locale, Locale(identifier: locale)) + } else { + content + } + } + + @available(iOS 16.0, *) + private var customer: ShopifyAcceleratedCheckouts.Customer? { + guard !email.isEmpty || !phone.isEmpty else { return nil } + + return ShopifyAcceleratedCheckouts.Customer( + email: email.isEmpty ? nil : email, + phoneNumber: phone.isEmpty ? nil : phone + ) + } + + @available(iOS 16.0, *) + private var contactFields: [ShopifyAcceleratedCheckouts.RequiredContactFields] { + var fields: [ShopifyAcceleratedCheckouts.RequiredContactFields] = [] + + if requireEmail { + fields.append(.email) + } + if requirePhone { + fields.append(.phone) + } + + return fields + } + + @available(iOS 16.0, *) + private var supportedCountries: Set? { + let countries = Set( + supportedCountriesString + .split(separator: ",") + .map(String.init) + .filter { !$0.isEmpty } + ) + return countries.isEmpty ? nil : countries + } +} diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/AppDelegate.swift b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/AppDelegate.swift index 43ec803dc..f39111669 100644 --- a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/AppDelegate.swift +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/AppDelegate.swift @@ -1,3 +1,4 @@ +import ShopifyAcceleratedCheckouts import ShopifyCheckoutKit import UIKit @@ -21,6 +22,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let checkoutKitLogLevel: LogLevel = getLogLevel( key: AppStorageKeys.checkoutKitLogLevel.rawValue ) + let acceleratedCheckoutsLogLevel: LogLevel = getLogLevel( + key: AppStorageKeys.acceleratedCheckoutsLogLevel.rawValue + ) let checkoutPreloadingEnabled = UserDefaults.standard.object( forKey: AppStorageKeys.checkoutPreloadingEnabled.rawValue ) as? Bool ?? true @@ -32,8 +36,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate { $0.logLevel = checkoutKitLogLevel $0.preloading.enabled = checkoutPreloadingEnabled } + ShopifyAcceleratedCheckouts.logLevel = acceleratedCheckoutsLogLevel print("[CheckoutKitSwiftDemo] CheckoutKit Log level set to \(checkoutKitLogLevel)") + print( + "[CheckoutKitSwiftDemo] Accelerated Checkouts Log level set to \(acceleratedCheckoutsLogLevel)" + ) UIBarButtonItem.appearance().tintColor = ColorPalette.primaryColor diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/SceneDelegate.swift b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/SceneDelegate.swift index e5ffbfb19..f9485a1e5 100644 --- a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/SceneDelegate.swift +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/App/SceneDelegate.swift @@ -17,9 +17,15 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { var cancellables: Set = [] let uiKitCartController = CartViewController() - let swiftUICartController = UIHostingController(rootView: CartView()) - let productGridController = UIHostingController(rootView: ProductGridView()) - let productGalleryController = UIHostingController(rootView: ProductGalleryView()) + let swiftUICartController = UIHostingController( + rootView: AcceleratedCheckoutsConfiguredView(content: CartView()) + ) + let productGridController = UIHostingController( + rootView: AcceleratedCheckoutsConfiguredView(content: ProductGridView()) + ) + let productGalleryController = UIHostingController( + rootView: AcceleratedCheckoutsConfiguredView(content: ProductGalleryView()) + ) let accountController = UIHostingController(rootView: AccountView()) let settingsController = UIHostingController(rootView: SettingsView()) diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Localizable.xcstrings b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Localizable.xcstrings index 9025e4977..3632f29fe 100644 --- a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Localizable.xcstrings +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Localizable.xcstrings @@ -3,15 +3,37 @@ "strings" : { "%@" : { + }, + "%@ (%@)" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "%1$@ (%2$@)" + } + } + } }, "✓" : { + }, + "Accelerated Checkout Language" : { + + }, + "Accelerated Checkouts" : { + }, "Access your orders, saved addresses, and checkout faster." : { "comment" : "A description of the benefits of signing in to an account.", "isCommentAutoGenerated" : true }, - "Apple Pay" : { + "Apple Pay Button" : { + + }, + "Apple Pay Contact Fields" : { + + }, + "Apple Pay Shipping Countries" : { }, "Authentication" : { @@ -36,9 +58,18 @@ }, "Clear logs" : { + }, + "Configure Accelerated Checkouts" : { + + }, + "Configures the locale inherited by accelerated checkout controls." : { + }, "Configures the visual style of the Apple Pay button." : { + }, + "Controls the level of logging for Accelerated Checkouts operations." : { + }, "Expires: %@" : { "comment" : "A label displaying the expiration date of the user's customer account.", @@ -46,6 +77,9 @@ }, "Features" : { + }, + "Leave the selection empty to allow all shipping countries." : { + }, "Loading products..." : { @@ -55,6 +89,9 @@ }, "Logs" : { + }, + "No countries selected - All countries allowed" : { + }, "No logs available" : { @@ -69,6 +106,9 @@ "Populates the Cart Buyer Identity with values from Storefront.xcconfig" : { "comment" : "A description of how the \"Hardcoded\" buyer identity mode populates the cart buyer identity.", "isCommentAutoGenerated" : true + }, + "Prefilled values override the cart buyer identity for accelerated checkout. When a value is present, Apple Pay does not request that field again." : { + }, "Prefills buyer identity at checkout.\nChanging this setting will clear your cart." : { "comment" : "A description of the \"Prefills buyer identity at checkout\" setting in the Settings view.", @@ -80,6 +120,9 @@ }, "Sample app version" : { + }, + "Selected: %@" : { + }, "shopify_checkout_kit_title" : { "comment" : "The title of the checkout sheet.", @@ -119,6 +162,9 @@ }, "Theme" : { + }, + "These settings apply to new accelerated checkouts and persist between app launches." : { + }, "Universal Links" : { diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/AcceleratedCheckoutsSettingsView.swift b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/AcceleratedCheckoutsSettingsView.swift new file mode 100644 index 000000000..94387087b --- /dev/null +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/AcceleratedCheckoutsSettingsView.swift @@ -0,0 +1,262 @@ +import PassKit +import ShopifyAcceleratedCheckouts +import ShopifyCheckoutKit +import SwiftUI + +struct AcceleratedCheckoutsSettingsView: View { + @AppStorage(AppStorageKeys.acceleratedCheckoutsLogLevel.rawValue) + private var logLevel: LogLevel = .debug { + didSet { + ShopifyAcceleratedCheckouts.logLevel = logLevel + } + } + + @AppStorage(AppStorageKeys.applePayStyle.rawValue) + private var applePayStyle: ApplePayStyleOption = .automatic + + @AppStorage(AppStorageKeys.requireEmail.rawValue) + private var requireEmail = true + + @AppStorage(AppStorageKeys.requirePhone.rawValue) + private var requirePhone = true + + @AppStorage(AppStorageKeys.locale.rawValue) + private var locale = "en" + + @AppStorage(AppStorageKeys.email.rawValue) + private var email = "" + + @AppStorage(AppStorageKeys.phone.rawValue) + private var phone = "" + + @AppStorage(AppStorageKeys.supportedCountries.rawValue) + private var supportedCountriesString = "" + + private let availableLocales: [(name: String, isoCode: String)] = [ + ("English", "en"), + ("English (US)", "en-US"), + ("French", "fr-FR") + ] + + private var selectedCountries: Set { + Set( + supportedCountriesString + .split(separator: ",") + .map(String.init) + .filter { !$0.isEmpty } + ) + } + + var body: some View { + List { + Section { + Text("These settings apply to new accelerated checkouts and persist between app launches.") + .font(.subheadline) + .foregroundStyle(.secondary) + } + + Section( + header: Text("Apple Pay Button"), + footer: Text("Configures the visual style of the Apple Pay button.") + ) { + ForEach(ApplePayStyleOption.allCases, id: \.self) { option in + HStack { + Text(option.title) + Spacer() + if option == applePayStyle { + Text("\u{2713}") + } + } + .background(Color.clear) + .contentShape(Rectangle()) + .onTapGesture { + applePayStyle = option + } + } + } + + Section( + header: Text("Accelerated Checkout Language"), + footer: Text("Configures the locale inherited by accelerated checkout controls.") + ) { + Picker("Language", selection: $locale) { + ForEach(availableLocales, id: \.isoCode) { localeOption in + Text(localeOption.name).tag(localeOption.isoCode) + } + } + .pickerStyle(.menu) + } + + Section( + header: Text("Apple Pay Contact Fields"), + footer: Text( + "Prefilled values override the cart buyer identity for accelerated checkout. When a value is present, Apple Pay does not request that field again." + ) + ) { + Toggle("Require Email from Apple Pay", isOn: $requireEmail) + + TextField("Prefill Email (Optional)", text: $email) + .textContentType(.emailAddress) + .keyboardType(.emailAddress) + .autocapitalization(.none) + .accessibilityLabel("Prefill Email") + + Toggle("Require Phone from Apple Pay", isOn: $requirePhone) + + TextField("Prefill Phone (Optional)", text: $phone) + .textContentType(.telephoneNumber) + .keyboardType(.phonePad) + .accessibilityLabel("Prefill Phone") + } + + Section( + header: Text("Apple Pay Shipping Countries"), + footer: Text("Leave the selection empty to allow all shipping countries.") + ) { + if !selectedCountries.isEmpty { + Text("Selected: \(selectedCountries.sorted().joined(separator: ", "))") + .font(.caption) + .foregroundStyle(.secondary) + } + + NavigationLink("Select Countries (\(selectedCountries.count) selected)") { + CountrySelectionView( + supportedCountriesString: $supportedCountriesString + ) + } + } + + Section( + header: Text("Logging"), + footer: Text("Controls the level of logging for Accelerated Checkouts operations.") + ) { + Picker( + "Log Level", + selection: Binding( + get: { logLevel }, + set: { logLevel = $0 } + ) + ) { + ForEach(LogLevel.allCases, id: \.self) { level in + Text( + level.rawValue.capitalized(with: Locale.current) + ).tag(level) + } + } + .pickerStyle(.menu) + } + } + .listStyle(GroupedListStyle()) + .navigationTitle("Accelerated Checkouts") + .navigationBarTitleDisplayMode(.inline) + } +} + +struct CountrySelectionView: View { + @Binding var supportedCountriesString: String + @State private var searchText = "" + + private static let allCountries: [(code: String, name: String)] = { + let locale = Locale(identifier: "en_US") + + return NSLocale.isoCountryCodes.compactMap { code in + locale.localizedString(forRegionCode: code).map { (code: code, name: $0) } + }.sorted { $0.name < $1.name } + }() + + private var selectedCountries: Set { + Set( + supportedCountriesString + .split(separator: ",") + .map(String.init) + .filter { !$0.isEmpty } + ) + } + + private var filteredCountries: [(code: String, name: String)] { + guard !searchText.isEmpty else { return Self.allCountries } + + return Self.allCountries.filter { country in + country.name.localizedCaseInsensitiveContains(searchText) || + country.code.localizedCaseInsensitiveContains(searchText) + } + } + + var body: some View { + List { + Section { + if selectedCountries.isEmpty { + Text("No countries selected - All countries allowed") + .font(.body.italic()) + .foregroundStyle(.secondary) + } else { + Button("Clear All", role: .destructive) { + supportedCountriesString = "" + } + } + } + + Section("Countries") { + ForEach(filteredCountries, id: \.code) { country in + Button { + toggleCountry(country.code) + } label: { + HStack { + Text("\(country.name) (\(country.code))") + .foregroundStyle(.primary) + Spacer() + if selectedCountries.contains(country.code) { + Image(systemName: "checkmark") + } + } + } + } + } + } + .searchable(text: $searchText, prompt: "Search countries") + .navigationTitle("Select Countries") + .navigationBarTitleDisplayMode(.inline) + } + + private func toggleCountry(_ code: String) { + var countries = selectedCountries + if countries.contains(code) { + countries.remove(code) + } else { + countries.insert(code) + } + supportedCountriesString = countries.sorted().joined(separator: ",") + } +} + +enum ApplePayStyleOption: String, CaseIterable { + case automatic + case black + case white + case whiteOutline + + var title: String { + switch self { + case .automatic: return "Automatic" + case .black: return "Black" + case .white: return "White" + case .whiteOutline: return "White Outline" + } + } + + @available(iOS 16.0, *) + var style: PKPaymentButtonStyle { + switch self { + case .automatic: return .automatic + case .black: return .black + case .white: return .white + case .whiteOutline: return .whiteOutline + } + } +} + +#Preview { + NavigationView { + AcceleratedCheckoutsSettingsView() + } +} diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/Cart/CartView.swift b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/Cart/CartView.swift index 1a30b4535..a5b6864dc 100644 --- a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/Cart/CartView.swift +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/Cart/CartView.swift @@ -69,20 +69,6 @@ struct CartView: View { print("[AcceleratedCheckout] Dismissed") } .connect(client) - .environment( - \.shopifyAcceleratedCheckoutsConfiguration, - ShopifyAcceleratedCheckouts.Configuration( - storefrontDomain: InfoDictionary.shared.domain, - storefrontAccessToken: InfoDictionary.shared.accessToken - ) - ) - .environment( - \.shopifyApplePayConfiguration, - ShopifyAcceleratedCheckouts.ApplePayConfiguration( - merchantIdentifier: InfoDictionary.shared.merchantIdentifier, - contactFields: [.email, .phone] - ) - ) } } diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/ProductGridView.swift b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/ProductGridView.swift index 62c3a4912..66897c8d8 100644 --- a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/ProductGridView.swift +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/ProductGridView.swift @@ -171,6 +171,6 @@ struct ProductGridItem: View { struct ProductGrid_Previews: PreviewProvider { static var previews: some View { - ProductGridView() + AcceleratedCheckoutsConfiguredView(content: ProductGridView()) } } diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/ProductView.swift b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/ProductView.swift index 1bea755ef..044b09a2c 100644 --- a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/ProductView.swift +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/ProductView.swift @@ -213,20 +213,6 @@ struct ProductView: View { .onDismiss { print("[AcceleratedCheckout] Dismissed") } - .environment( - \.shopifyAcceleratedCheckoutsConfiguration, - ShopifyAcceleratedCheckouts.Configuration( - storefrontDomain: InfoDictionary.shared.domain, - storefrontAccessToken: InfoDictionary.shared.accessToken - ) - ) - .environment( - \.shopifyApplePayConfiguration, - ShopifyAcceleratedCheckouts.ApplePayConfiguration( - merchantIdentifier: InfoDictionary.shared.merchantIdentifier, - contactFields: [.email, .phone] - ) - ) } private func addToCart() { @@ -392,6 +378,6 @@ struct ProductGalleryView: View { struct ProductGalleryView_Previews: PreviewProvider { static var previews: some View { - ProductGalleryView() + AcceleratedCheckoutsConfiguredView(content: ProductGalleryView()) } } diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/SettingsView.swift b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/SettingsView.swift index 27c7e2d3b..37ebf2b0f 100644 --- a/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/SettingsView.swift +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Sources/Scenes/SettingsView.swift @@ -1,5 +1,4 @@ import Combine -import PassKit import ShopifyCheckoutKit import SwiftUI @@ -10,6 +9,12 @@ enum AppStorageKeys: String { case preloadObservabilityEnabled case buyerIdentityMode case applePayStyle + case requireEmail + case requirePhone + case locale + case email + case phone + case supportedCountries case windowOpenHandler } @@ -37,9 +42,6 @@ struct SettingsView: View { } } - @AppStorage(AppStorageKeys.applePayStyle.rawValue) - var applePayStyle: ApplePayStyleOption = .automatic - @AppStorage(AppStorageKeys.checkoutPreloadingEnabled.rawValue) var checkoutPreloadingEnabled = true @@ -68,6 +70,12 @@ struct SettingsView: View { .pickerStyle(.menu) } + Section(header: Text("Accelerated Checkouts")) { + NavigationLink(destination: AcceleratedCheckoutsSettingsView()) { + Text("Configure Accelerated Checkouts") + } + } + Section( content: { Picker("Buyer Identity", selection: $config.buyerIdentityMode) { @@ -125,26 +133,6 @@ struct SettingsView: View { } } - Section( - header: Text("Apple Pay"), - footer: Text("Configures the visual style of the Apple Pay button.") - ) { - ForEach(ApplePayStyleOption.allCases, id: \.self) { option in - HStack { - Text(option.title) - Spacer() - if option == applePayStyle { - Text("\u{2713}") - } - } - .background(Color.clear) - .contentShape(Rectangle()) - .onTapGesture { - applePayStyle = option - } - } - } - Section(header: Text("Logging")) { Picker( "Checkout Kit", @@ -329,32 +317,6 @@ extension Configuration.Appearance { } } -enum ApplePayStyleOption: String, CaseIterable { - case automatic - case black - case white - case whiteOutline - - var title: String { - switch self { - case .automatic: return "Automatic" - case .black: return "Black" - case .white: return "White" - case .whiteOutline: return "White Outline" - } - } - - @available(iOS 16.0, *) - var style: PKPaymentButtonStyle { - switch self { - case .automatic: return .automatic - case .black: return .black - case .white: return .white - case .whiteOutline: return .whiteOutline - } - } -} - #Preview { SettingsView() } diff --git a/platforms/swift/Samples/Samples.xcworkspace/xcshareddata/swiftpm/Package.resolved b/platforms/swift/Samples/CheckoutKitSwiftDemo/Package.resolved similarity index 100% rename from platforms/swift/Samples/Samples.xcworkspace/xcshareddata/swiftpm/Package.resolved rename to platforms/swift/Samples/CheckoutKitSwiftDemo/Package.resolved diff --git a/platforms/swift/Samples/CheckoutKitSwiftDemo/README.md b/platforms/swift/Samples/CheckoutKitSwiftDemo/README.md index 436ef5a48..858444dd8 100644 --- a/platforms/swift/Samples/CheckoutKitSwiftDemo/README.md +++ b/platforms/swift/Samples/CheckoutKitSwiftDemo/README.md @@ -7,8 +7,9 @@ This sample demonstrates how to integrate Checkout Kit with the Shopify Storefro - Product listing from the Storefront API - Cart create, add, update, and fetch operations - `cart.checkoutUrl` presentation with `ShopifyCheckoutKit` +- Configurable Shop Pay and Apple Pay accelerated checkout buttons - Checkout lifecycle and completion through `CheckoutProtocol.Client` -- Buyer identity demo data for checkout prefill +- Buyer identity demo data and accelerated checkout email/phone overrides - Customer Account API sign-in and customer access token cart identity - Universal Links entitlements for checkout/offsite-payment returns @@ -42,11 +43,13 @@ CheckoutKitSwiftDemo/ | | | | `-- Queries/ GetProductsQuery, GetCartQuery | | | `-- Schema/ Enums, input objects, objects, interfaces, unions | | |-- App/ App configuration, cart state, and checkout coordination +| | | |-- AcceleratedCheckoutsConfiguredView.swift Accelerated checkout settings environment | | | |-- AppConfiguration.swift Values loaded from Storefront.xcconfig | | | |-- CartManager.swift Cart create, add, update, and fetch operations | | | |-- CheckoutCoordinator.swift Checkout presentation | | | `-- CartResettingCheckoutDelegate.swift | | `-- Scenes/ SwiftUI screens +|-- Package.resolved Swift package dependency pins |-- project.yml XcodeGen project, Info.plist, and entitlements spec `-- Storefront.xcconfig Local store configuration, not checked in ``` @@ -57,8 +60,9 @@ Do not edit files in `Generated/` by hand. Update `.graphql` files and regenerat 1. `Network.swift` creates an `ApolloClient` that points at the configured Storefront API endpoint and attaches the Storefront access token. 2. `StorefrontClient.swift` and `CartManager.swift` call Apollo using generated operation types such as `Storefront.CartCreateMutation` and `Storefront.GetCartQuery`. -3. `CheckoutCoordinator.swift` presents `cart.checkoutUrl` with `ShopifyCheckoutKit`, while `CheckoutProtocolClient.swift` handles typed checkout lifecycle events. -4. Apollo decodes responses into generated Swift types, so schema or operation changes surface as compile errors. +3. `AcceleratedCheckoutsConfiguredView.swift` injects the storefront, Apple Pay, locale, contact-field, buyer contact, and shipping-country configuration used by accelerated checkout buttons. +4. `CheckoutCoordinator.swift` presents `cart.checkoutUrl` with `ShopifyCheckoutKit`, while `CheckoutProtocolClient.swift` handles typed checkout lifecycle events. +5. Apollo decodes responses into generated Swift types, so schema or operation changes surface as compile errors. ## Setup @@ -134,10 +138,10 @@ All commands are run from the **repo root** (`checkout-kit/`): |---------|-------------| | `dev apollo download_schema swift swift` | Download the Storefront API schema for this sample app | | `dev apollo codegen swift swift` | Regenerate Swift types from `.graphql` files | -| `dev apollo codegen swift all` | Regenerate for all sample apps | +| `dev apollo codegen swift all` | Regenerate the Swift sample's types | | `dev swift lint` | Run SwiftLint + SwiftFormat checks | | `dev swift format` | Auto-format and apply safe lint autocorrections | -| `dev swift build samples` | Build all sample apps | +| `dev swift build samples` | Build the Swift sample app | ## Key files @@ -148,7 +152,10 @@ All commands are run from the **repo root** (`checkout-kit/`): | `apollo-codegen-config.json` | Apollo code generation configuration. | | `CheckoutKitSwiftDemo/Sources/Api/Network.swift` | Apollo client setup and authentication interceptor. | | `CheckoutKitSwiftDemo/Sources/Api/StorefrontClient.swift` | Cart input creation and buyer identity mapping. | +| `CheckoutKitSwiftDemo/Sources/App/AcceleratedCheckoutsConfiguredView.swift` | Injects accelerated checkout and Apple Pay configuration into app flows. | +| `CheckoutKitSwiftDemo/Sources/Scenes/AcceleratedCheckoutsSettingsView.swift` | Dedicated accelerated checkout and Apple Pay settings screen. | | `CheckoutKitSwiftDemo/Sources/App/CartManager.swift` | Cart state and Storefront API mutations. | | `CheckoutKitSwiftDemo/Sources/App/CheckoutCoordinator.swift` | Checkout presentation. | | `CheckoutKitSwiftDemo/Sources/CheckoutProtocolClient.swift` | Typed checkout lifecycle handlers. | +| `Package.resolved` | Dependency pins copied into the generated Xcode project's workspace. | | `project.yml` | Generates the Xcode project, Info.plist, and Associated Domains entitlements through XcodeGen. | diff --git a/platforms/swift/Samples/README.md b/platforms/swift/Samples/README.md index bd7560dea..a2ab37d2c 100644 --- a/platforms/swift/Samples/README.md +++ b/platforms/swift/Samples/README.md @@ -1,15 +1,14 @@ # Swift Samples -This directory contains iOS sample apps for Checkout Kit. +This directory contains the iOS sample app for Checkout Kit. -The sample apps read generated `Storefront.xcconfig` files. From the repo root +The sample app reads a generated `Storefront.xcconfig` file. From the repo root or any platform directory, run `dev up` to provision the repo and create or sync them from the shared `.env`. | Sample | Purpose | | --- | --- | -| `CheckoutKitSwiftDemo` | Storefront API cart flow with Apollo iOS, checkout presentation, buyer identity modes, Customer Account API sign-in, and protocol lifecycle events. | -| `ShopifyAcceleratedCheckoutsApp` | SwiftUI Shop Pay and Apple Pay accelerated checkout buttons. | +| `CheckoutKitSwiftDemo` | Storefront API cart flow with Apollo iOS, checkout presentation, Shop Pay and Apple Pay accelerated checkout buttons, buyer identity modes, Customer Account API sign-in, and protocol lifecycle events. | ## Prerequisites @@ -34,31 +33,10 @@ fill in local values, then run `scripts/setup_storefront_env`. The setup script generates `platforms/swift/Samples/CheckoutKitSwiftDemo/Storefront.xcconfig` and the sample Xcode project files from XcodeGen specs. -Open `Samples/Samples.xcworkspace` or -`Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo.xcodeproj` in Xcode, then -build and run the `CheckoutKitSwiftDemo` scheme. +Open `Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo.xcodeproj` in Xcode, +then build and run the `CheckoutKitSwiftDemo` scheme. -XcodeGen generates associated-domain entitlements that read `STOREFRONT_DOMAIN` from `Storefront.xcconfig` at build time. - -## ShopifyAcceleratedCheckoutsApp - -To get started: - -1. Create or sync the shared configuration from the repo root or this platform - directory: - - ```sh - dev up - ``` - -2. If you are not using `dev`, copy the repo-root `.env.example` to `.env`, -fill in local values, then run `scripts/setup_storefront_env`. - -The setup script generates `platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/Storefront.xcconfig`. - -Open `Samples/Samples.xcworkspace` or -`Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.xcodeproj` -in Xcode, then build and run the `ShopifyAcceleratedCheckoutsApp` scheme. +XcodeGen generates associated-domain and Apple Pay entitlements that read values from `Storefront.xcconfig` at build time. The app's Settings tab can configure the accelerated checkout locale, Apple Pay contact fields and button style, buyer email and phone overrides, supported shipping countries, and logging. ## Troubleshooting diff --git a/platforms/swift/Samples/Samples.xcworkspace/contents.xcworkspacedata b/platforms/swift/Samples/Samples.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a6ff91365..000000000 --- a/platforms/swift/Samples/Samples.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/platforms/swift/Samples/Samples.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/platforms/swift/Samples/Samples.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/platforms/swift/Samples/Samples.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/AccentColor.colorset/Contents.json b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb8789700..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 795f498b0..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "images" : [ - { - "filename" : "app-logo.png", - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "tinted" - } - ], - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/AppIcon.appiconset/app-logo.png b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/AppIcon.appiconset/app-logo.png deleted file mode 100644 index b0959226a..000000000 Binary files a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/AppIcon.appiconset/app-logo.png and /dev/null differ diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/Contents.json b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/EnvironmentVariables.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/EnvironmentVariables.swift deleted file mode 100644 index 79c91df93..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/EnvironmentVariables.swift +++ /dev/null @@ -1,22 +0,0 @@ -import Foundation - -public enum EnvironmentVariables { - enum Keys { - static let storefrontAccessToken = "STOREFRONT_ACCESS_TOKEN" - static let storefrontDomain = "STOREFRONT_DOMAIN" - static let apiVersion = "API_VERSION" - } - - private static func getKey(for key: String) -> String { - guard let value = Bundle.main.infoDictionary?[key] as? String else { - fatalError("Environment variable \(key) must be set in the Storefront.xcconfig file") - } - return value - } - - public static let storefrontAccessToken: String = getKey(for: Keys.storefrontAccessToken) - - public static let storefrontDomain: String = getKey(for: Keys.storefrontDomain) - - public static let apiVersion: String = getKey(for: Keys.apiVersion) -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Extensions/Animation+View.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Extensions/Animation+View.swift deleted file mode 100644 index d73a6f04f..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Extensions/Animation+View.swift +++ /dev/null @@ -1,20 +0,0 @@ -import SwiftUI - -extension Animation { - /// Standard spring animation for quantity changes - static var quantityChange: Animation { - .spring(response: 0.3, dampingFraction: 0.7) - } - - /// Standard spring animation for general UI updates - static var standard: Animation { - .spring(response: 0.3, dampingFraction: 0.8) - } -} - -extension View { - /// Animate changes to quantity values - func animateQuantityChange(value: some Equatable) -> some View { - animation(.quantityChange, value: value) - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Extensions/PriceFormatter.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Extensions/PriceFormatter.swift deleted file mode 100644 index 291beca79..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Extensions/PriceFormatter.swift +++ /dev/null @@ -1,49 +0,0 @@ -import Foundation - -extension String { - /// Maps currency code to its symbol - static func currencySymbol(for code: String) -> String { - switch code { - case "USD": return "$" - case "EUR": return "€" - case "GBP": return "£" - case "JPY": return "¥" - case "CAD": return "C$" - case "AUD": return "A$" - default: return code + " " - } - } -} - -extension NumberFormatter { - /// Creates a currency formatter for the given currency code - static func currencyFormatter(for currencyCode: String) -> NumberFormatter { - let formatter = NumberFormatter() - formatter.numberStyle = .currency - formatter.currencyCode = currencyCode - formatter.maximumFractionDigits = 2 - formatter.minimumFractionDigits = 2 - return formatter - } -} - -/// Utility struct for formatting prices -enum PriceFormatter { - /// Formats a price amount with the given currency code - static func format(amount: String, currencyCode: String) -> String { - // Check if the amount is zero - if let decimalAmount = Decimal(string: amount), decimalAmount == 0 { - return "Free" - } - - let formatter = NumberFormatter.currencyFormatter(for: currencyCode) - - if let formattedPrice = formatter.string(from: NSDecimalNumber(string: amount)) { - return formattedPrice - } - - // Fallback to manual formatting - let symbol = String.currencySymbol(for: currencyCode) - return "\(symbol)\(amount)" - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift deleted file mode 100644 index 834294312..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartDeliveryGroupFragment.graphql.swift +++ /dev/null @@ -1,199 +0,0 @@ -// @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 { - static var fragmentDefinition: StaticString { - #"fragment CartDeliveryGroupFragment on CartDeliveryGroup { __typename id groupType deliveryAddress { __typename address1 address2 city countryCodeV2 firstName lastName phone province zip } deliveryOptions { __typename handle title code deliveryMethodType description estimatedCost { __typename amount currencyCode } } selectedDeliveryOption { __typename description title handle estimatedCost { __typename amount currencyCode } } }"# - } - - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartDeliveryGroup } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("id", Storefront.ID.self), - .field("groupType", GraphQLEnum.self), - .field("deliveryAddress", DeliveryAddress.self), - .field("deliveryOptions", [DeliveryOption].self), - .field("selectedDeliveryOption", SelectedDeliveryOption?.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartDeliveryGroupFragment.self - ] } - - /// The ID for the delivery group. - var id: Storefront.ID { __data["id"] } - /// The type of merchandise in the delivery group. - var groupType: GraphQLEnum { __data["groupType"] } - /// 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"] } - - /// DeliveryAddress - /// - /// Parent Type: `MailingAddress` - struct DeliveryAddress: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.MailingAddress } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("address1", String?.self), - .field("address2", String?.self), - .field("city", String?.self), - .field("countryCodeV2", GraphQLEnum?.self), - .field("firstName", String?.self), - .field("lastName", String?.self), - .field("phone", String?.self), - .field("province", String?.self), - .field("zip", String?.self), - ] } - 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"] } - /// 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"] } - } - - /// DeliveryOption - /// - /// Parent Type: `CartDeliveryOption` - struct DeliveryOption: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartDeliveryOption } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("handle", String.self), - .field("title", String?.self), - .field("code", String?.self), - .field("deliveryMethodType", GraphQLEnum.self), - .field("description", String?.self), - .field("estimatedCost", EstimatedCost.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartDeliveryGroupFragment.DeliveryOption.self - ] } - - /// 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"] } - - /// DeliveryOption.EstimatedCost - /// - /// Parent Type: `MoneyV2` - struct EstimatedCost: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.MoneyV2 } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("amount", Storefront.Decimal.self), - .field("currencyCode", GraphQLEnum.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartDeliveryGroupFragment.DeliveryOption.EstimatedCost.self - ] } - - /// Decimal money amount. - var amount: Storefront.Decimal { __data["amount"] } - /// Currency of the money. - var currencyCode: GraphQLEnum { __data["currencyCode"] } - } - } - - /// SelectedDeliveryOption - /// - /// Parent Type: `CartDeliveryOption` - struct SelectedDeliveryOption: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartDeliveryOption } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("description", String?.self), - .field("title", String?.self), - .field("handle", String.self), - .field("estimatedCost", EstimatedCost.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartDeliveryGroupFragment.SelectedDeliveryOption.self - ] } - - /// 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"] } - - /// SelectedDeliveryOption.EstimatedCost - /// - /// Parent Type: `MoneyV2` - struct EstimatedCost: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.MoneyV2 } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("amount", Storefront.Decimal.self), - .field("currencyCode", GraphQLEnum.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartDeliveryGroupFragment.SelectedDeliveryOption.EstimatedCost.self - ] } - - /// Decimal money amount. - var amount: Storefront.Decimal { __data["amount"] } - /// Currency of the money. - var currencyCode: GraphQLEnum { __data["currencyCode"] } - } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartFragment.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartFragment.graphql.swift deleted file mode 100644 index 3297288a4..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartFragment.graphql.swift +++ /dev/null @@ -1,313 +0,0 @@ -// @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 { - static var fragmentDefinition: StaticString { - #"fragment CartFragment on Cart { __typename id checkoutUrl totalQuantity buyerIdentity { __typename email phone customer { __typename email phone } } deliveryGroups(first: 10) { __typename nodes { __typename ...CartDeliveryGroupFragment } } lines(first: 250) { __typename nodes { __typename ...CartLineFragment } } cost { __typename totalAmount { __typename amount currencyCode } subtotalAmount { __typename amount currencyCode } totalTaxAmount { __typename amount currencyCode } } }"# - } - - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Cart } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("id", Storefront.ID.self), - .field("checkoutUrl", Storefront.URL.self), - .field("totalQuantity", Int.self), - .field("buyerIdentity", BuyerIdentity.self), - .field("deliveryGroups", DeliveryGroups.self, arguments: ["first": 10]), - .field("lines", Lines.self, arguments: ["first": 250]), - .field("cost", Cost.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartFragment.self - ] } - - /// A globally-unique ID. - var id: Storefront.ID { __data["id"] } - /// 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"] } - - /// BuyerIdentity - /// - /// Parent Type: `CartBuyerIdentity` - struct BuyerIdentity: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartBuyerIdentity } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("email", String?.self), - .field("phone", String?.self), - .field("customer", Customer?.self), - ] } - 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"] } - /// 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"] } - - /// BuyerIdentity.Customer - /// - /// Parent Type: `Customer` - struct Customer: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Customer } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("email", String?.self), - .field("phone", String?.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartFragment.BuyerIdentity.Customer.self - ] } - - /// The customer’s email address. - var email: String? { __data["email"] } - /// The customer’s phone number. - var phone: String? { __data["phone"] } - } - } - - /// DeliveryGroups - /// - /// Parent Type: `CartDeliveryGroupConnection` - struct DeliveryGroups: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartDeliveryGroupConnection } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("nodes", [Node].self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartFragment.DeliveryGroups.self - ] } - - /// A list of the nodes contained in CartDeliveryGroupEdge. - var nodes: [Node] { __data["nodes"] } - - /// DeliveryGroups.Node - /// - /// Parent Type: `CartDeliveryGroup` - struct Node: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartDeliveryGroup } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .fragment(CartDeliveryGroupFragment.self), - ] } - 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"] } - /// The type of merchandise in the delivery group. - var groupType: GraphQLEnum { __data["groupType"] } - /// 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"] } - - struct Fragments: FragmentContainer { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - var cartDeliveryGroupFragment: CartDeliveryGroupFragment { _toFragment() } - } - - typealias DeliveryAddress = CartDeliveryGroupFragment.DeliveryAddress - - typealias DeliveryOption = CartDeliveryGroupFragment.DeliveryOption - - typealias SelectedDeliveryOption = CartDeliveryGroupFragment.SelectedDeliveryOption - } - } - - /// Lines - /// - /// Parent Type: `BaseCartLineConnection` - struct Lines: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.BaseCartLineConnection } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("nodes", [Node].self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartFragment.Lines.self - ] } - - /// A list of the nodes contained in BaseCartLineEdge. - var nodes: [Node] { __data["nodes"] } - - /// Lines.Node - /// - /// Parent Type: `BaseCartLine` - struct Node: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Interfaces.BaseCartLine } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .fragment(CartLineFragment.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartFragment.Lines.Node.self, - CartLineFragment.self - ] } - - /// 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"] } - - struct Fragments: FragmentContainer { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - var cartLineFragment: CartLineFragment { _toFragment() } - } - - typealias Merchandise = CartLineFragment.Merchandise - - typealias Cost = CartLineFragment.Cost - } - } - - /// Cost - /// - /// Parent Type: `CartCost` - struct Cost: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartCost } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("totalAmount", TotalAmount.self), - .field("subtotalAmount", SubtotalAmount.self), - .field("totalTaxAmount", TotalTaxAmount?.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartFragment.Cost.self - ] } - - /// 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"] } - - /// Cost.TotalAmount - /// - /// Parent Type: `MoneyV2` - struct TotalAmount: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.MoneyV2 } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("amount", Storefront.Decimal.self), - .field("currencyCode", GraphQLEnum.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartFragment.Cost.TotalAmount.self - ] } - - /// Decimal money amount. - var amount: Storefront.Decimal { __data["amount"] } - /// Currency of the money. - var currencyCode: GraphQLEnum { __data["currencyCode"] } - } - - /// Cost.SubtotalAmount - /// - /// Parent Type: `MoneyV2` - struct SubtotalAmount: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.MoneyV2 } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("amount", Storefront.Decimal.self), - .field("currencyCode", GraphQLEnum.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartFragment.Cost.SubtotalAmount.self - ] } - - /// Decimal money amount. - var amount: Storefront.Decimal { __data["amount"] } - /// Currency of the money. - var currencyCode: GraphQLEnum { __data["currencyCode"] } - } - - /// Cost.TotalTaxAmount - /// - /// Parent Type: `MoneyV2` - struct TotalTaxAmount: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.MoneyV2 } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("amount", Storefront.Decimal.self), - .field("currencyCode", GraphQLEnum.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartFragment.Cost.TotalTaxAmount.self - ] } - - /// Decimal money amount. - var amount: Storefront.Decimal { __data["amount"] } - /// Currency of the money. - var currencyCode: GraphQLEnum { __data["currencyCode"] } - } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartLineFragment.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartLineFragment.graphql.swift deleted file mode 100644 index f383a8908..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartLineFragment.graphql.swift +++ /dev/null @@ -1,240 +0,0 @@ -// @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 { - static var fragmentDefinition: StaticString { - #"fragment CartLineFragment on BaseCartLine { __typename id quantity merchandise { __typename ... on ProductVariant { id title image { __typename url } price { __typename amount currencyCode } product { __typename title vendor featuredImage { __typename url } } requiresShipping } } cost { __typename totalAmount { __typename amount currencyCode } } }"# - } - - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Interfaces.BaseCartLine } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("id", Storefront.ID.self), - .field("quantity", Int.self), - .field("merchandise", Merchandise.self), - .field("cost", Cost.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartLineFragment.self - ] } - - /// 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"] } - - /// Merchandise - /// - /// Parent Type: `Merchandise` - struct Merchandise: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Unions.Merchandise } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .inlineFragment(AsProductVariant.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartLineFragment.Merchandise.self - ] } - - var asProductVariant: AsProductVariant? { _asInlineFragment() } - - /// Merchandise.AsProductVariant - /// - /// Parent Type: `ProductVariant` - struct AsProductVariant: Storefront.InlineFragment { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - typealias RootEntityType = CartLineFragment.Merchandise - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.ProductVariant } - static var __selections: [ApolloAPI.Selection] { [ - .field("id", Storefront.ID.self), - .field("title", String.self), - .field("image", Image?.self), - .field("price", Price.self), - .field("product", Product.self), - .field("requiresShipping", Bool.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartLineFragment.Merchandise.self, - CartLineFragment.Merchandise.AsProductVariant.self - ] } - - /// 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"] } - - /// Merchandise.AsProductVariant.Image - /// - /// Parent Type: `Image` - struct Image: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Image } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("url", Storefront.URL.self), - ] } - 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. - /// - /// 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"] } - } - - /// Merchandise.AsProductVariant.Price - /// - /// Parent Type: `MoneyV2` - struct Price: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.MoneyV2 } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("amount", Storefront.Decimal.self), - .field("currencyCode", GraphQLEnum.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartLineFragment.Merchandise.AsProductVariant.Price.self - ] } - - /// Decimal money amount. - var amount: Storefront.Decimal { __data["amount"] } - /// Currency of the money. - var currencyCode: GraphQLEnum { __data["currencyCode"] } - } - - /// Merchandise.AsProductVariant.Product - /// - /// Parent Type: `Product` - struct Product: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Product } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("title", String.self), - .field("vendor", String.self), - .field("featuredImage", FeaturedImage?.self), - ] } - 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 { __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"] } - - /// Merchandise.AsProductVariant.Product.FeaturedImage - /// - /// Parent Type: `Image` - struct FeaturedImage: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Image } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("url", Storefront.URL.self), - ] } - 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. - /// - /// 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"] } - } - } - } - } - - /// Cost - /// - /// Parent Type: `CartLineCost` - struct Cost: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartLineCost } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("totalAmount", TotalAmount.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartLineFragment.Cost.self - ] } - - /// The total cost of the merchandise line. - var totalAmount: TotalAmount { __data["totalAmount"] } - - /// Cost.TotalAmount - /// - /// Parent Type: `MoneyV2` - struct TotalAmount: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.MoneyV2 } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("amount", Storefront.Decimal.self), - .field("currencyCode", GraphQLEnum.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartLineFragment.Cost.TotalAmount.self - ] } - - /// Decimal money amount. - var amount: Storefront.Decimal { __data["amount"] } - /// Currency of the money. - var currencyCode: GraphQLEnum { __data["currencyCode"] } - } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartUserErrorFragment.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartUserErrorFragment.graphql.swift deleted file mode 100644 index 8939655d6..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Fragments/CartUserErrorFragment.graphql.swift +++ /dev/null @@ -1,35 +0,0 @@ -// @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 { - static var fragmentDefinition: StaticString { - #"fragment CartUserErrorFragment on CartUserError { __typename code message field }"# - } - - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartUserError } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("code", GraphQLEnum?.self), - .field("message", String.self), - .field("field", [String]?.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartUserErrorFragment.self - ] } - - /// 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"] } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Mutations/CartCreateMutation.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Mutations/CartCreateMutation.graphql.swift deleted file mode 100644 index 6cca1da6f..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Mutations/CartCreateMutation.graphql.swift +++ /dev/null @@ -1,159 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_exported import ApolloAPI -@_spi(Execution) @_spi(Unsafe) import ApolloAPI - -extension Storefront { - struct CartCreateMutation: GraphQLMutation { - static let operationName: String = "CartCreate" - static let operationDocument: ApolloAPI.OperationDocument = .init( - definition: .init( - #"mutation CartCreate($input: CartInput!, $country: CountryCode!, $language: LanguageCode!) @inContext(country: $country, language: $language) { cartCreate(input: $input) { __typename cart { __typename ...CartFragment } userErrors { __typename ...CartUserErrorFragment } } }"#, - fragments: [CartDeliveryGroupFragment.self, CartFragment.self, CartLineFragment.self, CartUserErrorFragment.self] - )) - - public var input: CartInput - public var country: GraphQLEnum - public var language: GraphQLEnum - - public init( - input: CartInput, - country: GraphQLEnum, - language: GraphQLEnum - ) { - self.input = input - self.country = country - self.language = language - } - - @_spi(Unsafe) public var __variables: Variables? { [ - "input": input, - "country": country, - "language": language - ] } - - struct Data: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Mutation } - static var __selections: [ApolloAPI.Selection] { [ - .field("cartCreate", CartCreate?.self, arguments: ["input": .variable("input")]), - ] } - 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"] } - - /// CartCreate - /// - /// Parent Type: `CartCreatePayload` - struct CartCreate: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartCreatePayload } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("cart", Cart?.self), - .field("userErrors", [UserError].self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartCreateMutation.Data.CartCreate.self - ] } - - /// The new cart. - var cart: Cart? { __data["cart"] } - /// The list of errors that occurred from executing the mutation. - var userErrors: [UserError] { __data["userErrors"] } - - /// CartCreate.Cart - /// - /// Parent Type: `Cart` - struct Cart: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Cart } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .fragment(CartFragment.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartCreateMutation.Data.CartCreate.Cart.self, - CartFragment.self - ] } - - /// A globally-unique ID. - var id: Storefront.ID { __data["id"] } - /// 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"] } - - struct Fragments: FragmentContainer { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - var cartFragment: CartFragment { _toFragment() } - } - - typealias BuyerIdentity = CartFragment.BuyerIdentity - - typealias DeliveryGroups = CartFragment.DeliveryGroups - - typealias Lines = CartFragment.Lines - - typealias Cost = CartFragment.Cost - } - - /// CartCreate.UserError - /// - /// Parent Type: `CartUserError` - struct UserError: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.CartUserError } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .fragment(CartUserErrorFragment.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - CartCreateMutation.Data.CartCreate.UserError.self, - CartUserErrorFragment.self - ] } - - /// 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"] } - - struct Fragments: FragmentContainer { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - var cartUserErrorFragment: CartUserErrorFragment { _toFragment() } - } - } - } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetCartQuery.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetCartQuery.graphql.swift deleted file mode 100644 index f3d99003e..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetCartQuery.graphql.swift +++ /dev/null @@ -1,104 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_exported import ApolloAPI -@_spi(Execution) @_spi(Unsafe) import ApolloAPI - -extension Storefront { - struct GetCartQuery: GraphQLQuery { - static let operationName: String = "GetCart" - static let operationDocument: ApolloAPI.OperationDocument = .init( - definition: .init( - #"query GetCart($id: ID!, $country: CountryCode!, $language: LanguageCode!) @inContext(country: $country, language: $language) { cart(id: $id) { __typename ...CartFragment } }"#, - fragments: [CartDeliveryGroupFragment.self, CartFragment.self, CartLineFragment.self] - )) - - public var id: ID - public var country: GraphQLEnum - public var language: GraphQLEnum - - public init( - id: ID, - country: GraphQLEnum, - language: GraphQLEnum - ) { - self.id = id - self.country = country - self.language = language - } - - @_spi(Unsafe) public var __variables: Variables? { [ - "id": id, - "country": country, - "language": language - ] } - - struct Data: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.QueryRoot } - static var __selections: [ApolloAPI.Selection] { [ - .field("cart", Cart?.self, arguments: ["id": .variable("id")]), - ] } - 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"] } - - /// Cart - /// - /// Parent Type: `Cart` - struct Cart: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Cart } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .fragment(CartFragment.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - GetCartQuery.Data.Cart.self, - CartFragment.self - ] } - - /// A globally-unique ID. - var id: Storefront.ID { __data["id"] } - /// 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"] } - - struct Fragments: FragmentContainer { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - var cartFragment: CartFragment { _toFragment() } - } - - typealias BuyerIdentity = CartFragment.BuyerIdentity - - typealias DeliveryGroups = CartFragment.DeliveryGroups - - typealias Lines = CartFragment.Lines - - typealias Cost = CartFragment.Cost - } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetProductsQuery.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetProductsQuery.graphql.swift deleted file mode 100644 index bba417236..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Operations/Queries/GetProductsQuery.graphql.swift +++ /dev/null @@ -1,233 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_exported import ApolloAPI -@_spi(Execution) @_spi(Unsafe) import ApolloAPI - -extension Storefront { - struct GetProductsQuery: GraphQLQuery { - static let operationName: String = "GetProducts" - static let operationDocument: ApolloAPI.OperationDocument = .init( - definition: .init( - #"query GetProducts($first: Int = 10, $country: CountryCode!, $language: LanguageCode!) @inContext(country: $country, language: $language) { products(first: $first) { __typename nodes { __typename id title featuredImage { __typename url } variants(first: 10) { __typename nodes { __typename id title requiresShipping image { __typename url } price { __typename amount currencyCode } } } } } }"# - )) - - public var first: GraphQLNullable - public var country: GraphQLEnum - public var language: GraphQLEnum - - public init( - first: GraphQLNullable = 10, - country: GraphQLEnum, - language: GraphQLEnum - ) { - self.first = first - self.country = country - self.language = language - } - - @_spi(Unsafe) public var __variables: Variables? { [ - "first": first, - "country": country, - "language": language - ] } - - struct Data: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.QueryRoot } - static var __selections: [ApolloAPI.Selection] { [ - .field("products", Products.self, arguments: ["first": .variable("first")]), - ] } - 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"] } - - /// Products - /// - /// Parent Type: `ProductConnection` - struct Products: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.ProductConnection } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("nodes", [Node].self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - GetProductsQuery.Data.Products.self - ] } - - /// A list of the nodes contained in ProductEdge. - var nodes: [Node] { __data["nodes"] } - - /// Products.Node - /// - /// Parent Type: `Product` - struct Node: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Product } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("id", Storefront.ID.self), - .field("title", String.self), - .field("featuredImage", FeaturedImage?.self), - .field("variants", Variants.self, arguments: ["first": 10]), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - GetProductsQuery.Data.Products.Node.self - ] } - - /// 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"] } - /// The featured image for the product. - /// - /// This field is functionally equivalent to `images(first: 1)`. - var featuredImage: FeaturedImage? { __data["featuredImage"] } - /// A list of [variants](/docs/api/storefront/latest/objects/ProductVariant) that are associated with the product. - var variants: Variants { __data["variants"] } - - /// Products.Node.FeaturedImage - /// - /// Parent Type: `Image` - struct FeaturedImage: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Image } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("url", Storefront.URL.self), - ] } - 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. - /// - /// 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"] } - } - - /// Products.Node.Variants - /// - /// Parent Type: `ProductVariantConnection` - struct Variants: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.ProductVariantConnection } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("nodes", [Node].self), - ] } - 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"] } - - /// Products.Node.Variants.Node - /// - /// Parent Type: `ProductVariant` - struct Node: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.ProductVariant } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("id", Storefront.ID.self), - .field("title", String.self), - .field("requiresShipping", Bool.self), - .field("image", Image?.self), - .field("price", Price.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - GetProductsQuery.Data.Products.Node.Variants.Node.self - ] } - - /// A globally-unique ID. - var id: Storefront.ID { __data["id"] } - /// The product variant’s title. - var title: String { __data["title"] } - /// Whether a customer needs to provide a shipping address when placing an order for the product variant. - var requiresShipping: Bool { __data["requiresShipping"] } - /// 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"] } - - /// Products.Node.Variants.Node.Image - /// - /// Parent Type: `Image` - struct Image: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.Image } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("url", Storefront.URL.self), - ] } - 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. - /// - /// 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"] } - } - - /// Products.Node.Variants.Node.Price - /// - /// Parent Type: `MoneyV2` - struct Price: Storefront.SelectionSet { - let __data: DataDict - init(_dataDict: DataDict) { __data = _dataDict } - - static var __parentType: any ApolloAPI.ParentType { Storefront.Objects.MoneyV2 } - static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("amount", Storefront.Decimal.self), - .field("currencyCode", GraphQLEnum.self), - ] } - static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [ - GetProductsQuery.Data.Products.Node.Variants.Node.Price.self - ] } - - /// Decimal money amount. - var amount: Storefront.Decimal { __data["amount"] } - /// Currency of the money. - var currencyCode: GraphQLEnum { __data["currencyCode"] } - } - } - } - } - } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/CustomScalars/Decimal.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/CustomScalars/Decimal.swift deleted file mode 100644 index 3f080021e..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/CustomScalars/Decimal.swift +++ /dev/null @@ -1,8 +0,0 @@ -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/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/CustomScalars/ID.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/CustomScalars/ID.swift deleted file mode 100644 index c7554cfd5..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/CustomScalars/ID.swift +++ /dev/null @@ -1,6 +0,0 @@ -import ApolloAPI - -extension Storefront { - /// The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID. - typealias ID = String -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/CustomScalars/URL.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/CustomScalars/URL.swift deleted file mode 100644 index 02cb8038a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/CustomScalars/URL.swift +++ /dev/null @@ -1,10 +0,0 @@ -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/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift deleted file mode 100644 index 60da42ae9..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartDeliveryGroupType.graphql.swift +++ /dev/null @@ -1,16 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_spi(Internal) import ApolloAPI - -extension Storefront { - /// Defines what type of merchandise is in the delivery group. - enum CartDeliveryGroupType: String, EnumType { - /// 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" - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartErrorCode.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartErrorCode.graphql.swift deleted file mode 100644 index 9dfbc8625..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CartErrorCode.graphql.swift +++ /dev/null @@ -1,127 +0,0 @@ -// @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" - /// Item cannot be purchased as configured. - case merchandiseNotApplicable = "MERCHANDISE_NOT_APPLICABLE" - /// An error occurred while processing cart transformations. - case merchandiseLineTransformersRunError = "MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR" - /// 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" - /// Bundles and addons cannot be mixed. - case bundlesAndAddonsCannotBeMixed = "BUNDLES_AND_ADDONS_CANNOT_BE_MIXED" - /// Cannot reference existing parent lines by variant_id. - case parentLineInvalidReference = "PARENT_LINE_INVALID_REFERENCE" - /// Parent line not found. - case parentLineNotFound = "PARENT_LINE_NOT_FOUND" - /// Parent line nesting is too deep or circular. - case parentLineNestingTooDeep = "PARENT_LINE_NESTING_TOO_DEEP" - /// Nested cartlines are blocked due to an incompatibility. - case parentLineOperationBlocked = "PARENT_LINE_OPERATION_BLOCKED" - /// The specified gift card recipient is invalid. - case giftCardRecipientInvalid = "GIFT_CARD_RECIPIENT_INVALID" - /// 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" - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CountryCode.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CountryCode.graphql.swift deleted file mode 100644 index 4022b875d..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CountryCode.graphql.swift +++ /dev/null @@ -1,504 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_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 { - /// 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" - /// 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" - /// 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" - /// 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" - /// 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" - /// 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" - /// 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" - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CurrencyCode.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CurrencyCode.graphql.swift deleted file mode 100644 index 47b30dbd2..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/CurrencyCode.graphql.swift +++ /dev/null @@ -1,341 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_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 { - /// 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" - /// 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" - /// Nicaraguan Córdoba (NIO). - case nio = "NIO" - /// Nigerian Naira (NGN). - case ngn = "NGN" - /// Norwegian Kroner (NOK). - case nok = "NOK" - /// 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" - /// 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" - /// 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" - /// 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" - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryAddressValidationStrategy.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryAddressValidationStrategy.graphql.swift deleted file mode 100644 index 25232e2cd..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryAddressValidationStrategy.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @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" - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryMethodType.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryMethodType.graphql.swift deleted file mode 100644 index e05036457..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/DeliveryMethodType.graphql.swift +++ /dev/null @@ -1,23 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_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" - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/LanguageCode.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/LanguageCode.graphql.swift deleted file mode 100644 index f543c931a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/LanguageCode.graphql.swift +++ /dev/null @@ -1,301 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_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 { - /// 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" - /// 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" - /// 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" - /// 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" - /// Oromo. - case om = "OM" - /// Odia. - case or = "OR" - /// Ossetic. - case os = "OS" - /// Punjabi. - case pa = "PA" - /// Polish. - case pl = "PL" - /// 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" - /// 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" - /// 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" - /// 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" - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/PreferenceDeliveryMethodType.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/PreferenceDeliveryMethodType.graphql.swift deleted file mode 100644 index a5485f8e9..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Enums/PreferenceDeliveryMethodType.graphql.swift +++ /dev/null @@ -1,17 +0,0 @@ -// @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" - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/AttributeInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/AttributeInput.graphql.swift deleted file mode 100644 index 913d9702c..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/AttributeInput.graphql.swift +++ /dev/null @@ -1,38 +0,0 @@ -// @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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartAddressInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartAddressInput.graphql.swift deleted file mode 100644 index 8c57e0520..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartAddressInput.graphql.swift +++ /dev/null @@ -1,38 +0,0 @@ -// @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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift deleted file mode 100644 index c2d518b40..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartBuyerIdentityInput.graphql.swift +++ /dev/null @@ -1,76 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_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 - - init(_ data: InputDict) { - __data = data - } - - init( - email: GraphQLNullable = nil, - phone: GraphQLNullable = nil, - companyLocationId: GraphQLNullable = nil, - countryCode: GraphQLNullable> = nil, - customerAccessToken: GraphQLNullable = nil, - preferences: GraphQLNullable = nil - ) { - __data = InputDict([ - "email": email, - "phone": phone, - "companyLocationId": companyLocationId, - "countryCode": countryCode, - "customerAccessToken": customerAccessToken, - "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 } - } - - /// 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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryAddressInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryAddressInput.graphql.swift deleted file mode 100644 index caeb8cc8e..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryAddressInput.graphql.swift +++ /dev/null @@ -1,104 +0,0 @@ -// @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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryCoordinatesPreferenceInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryCoordinatesPreferenceInput.graphql.swift deleted file mode 100644 index 69435f271..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryCoordinatesPreferenceInput.graphql.swift +++ /dev/null @@ -1,48 +0,0 @@ -// @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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryInput.graphql.swift deleted file mode 100644 index 0a029213e..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryInput.graphql.swift +++ /dev/null @@ -1,32 +0,0 @@ -// @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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryPreferenceInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryPreferenceInput.graphql.swift deleted file mode 100644 index 79717c620..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartDeliveryPreferenceInput.graphql.swift +++ /dev/null @@ -1,51 +0,0 @@ -// @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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInput.graphql.swift deleted file mode 100644 index a2d719d47..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInput.graphql.swift +++ /dev/null @@ -1,100 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_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 - - init(_ data: InputDict) { - __data = data - } - - init( - 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 - ]) - } - - /// 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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInputMetafieldInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInputMetafieldInput.graphql.swift deleted file mode 100644 index 5437aec6a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartInputMetafieldInput.graphql.swift +++ /dev/null @@ -1,49 +0,0 @@ -// @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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartLineInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartLineInput.graphql.swift deleted file mode 100644 index a2374a9b8..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartLineInput.graphql.swift +++ /dev/null @@ -1,66 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_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 - - init(_ data: InputDict) { - __data = data - } - - init( - attributes: GraphQLNullable<[AttributeInput]> = nil, - quantity: GraphQLNullable = nil, - merchandiseId: ID, - sellingPlanId: GraphQLNullable = nil, - parent: GraphQLNullable = nil - ) { - __data = InputDict([ - "attributes": attributes, - "quantity": quantity, - "merchandiseId": merchandiseId, - "sellingPlanId": sellingPlanId, - "parent": parent - ]) - } - - /// 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 } - } - - /// The ID of the selling plan that the merchandise is being purchased with. - var sellingPlanId: GraphQLNullable { - get { __data["sellingPlanId"] } - set { __data["sellingPlanId"] = newValue } - } - - /// The parent line item of the cart line. - var parent: GraphQLNullable { - get { __data["parent"] } - set { __data["parent"] = newValue } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartLineParentInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartLineParentInput.graphql.swift deleted file mode 100644 index f4545a902..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartLineParentInput.graphql.swift +++ /dev/null @@ -1,38 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_spi(Internal) @_spi(Unsafe) import ApolloAPI - -extension Storefront { - /// The parent line item of the cart line. - struct CartLineParentInput: InputObject { - private(set) var __data: InputDict - - init(_ data: InputDict) { - __data = data - } - - init( - lineId: GraphQLNullable = nil, - merchandiseId: GraphQLNullable = nil - ) { - __data = InputDict([ - "lineId": lineId, - "merchandiseId": merchandiseId - ]) - } - - /// The id of the parent line item. - var lineId: GraphQLNullable { - get { __data["lineId"] } - set { __data["lineId"] = newValue } - } - - /// The ID of the parent line merchandise. - var merchandiseId: GraphQLNullable { - get { __data["merchandiseId"] } - set { __data["merchandiseId"] = newValue } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartPreferencesInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartPreferencesInput.graphql.swift deleted file mode 100644 index 9245fff6b..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartPreferencesInput.graphql.swift +++ /dev/null @@ -1,41 +0,0 @@ -// @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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartSelectableAddressInput.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartSelectableAddressInput.graphql.swift deleted file mode 100644 index e5c4230f1..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/InputObjects/CartSelectableAddressInput.graphql.swift +++ /dev/null @@ -1,56 +0,0 @@ -// @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 } - } - } - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/BaseCartLine.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/BaseCartLine.graphql.swift deleted file mode 100644 index 61fc8cc1b..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/BaseCartLine.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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", - "ComponentizableCartLine" - ] - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/DisplayableError.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/DisplayableError.graphql.swift deleted file mode 100644 index 13deac40c..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/DisplayableError.graphql.swift +++ /dev/null @@ -1,20 +0,0 @@ -// @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" - ] - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/HasMetafields.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/HasMetafields.graphql.swift deleted file mode 100644 index 02ccfef44..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/HasMetafields.graphql.swift +++ /dev/null @@ -1,31 +0,0 @@ -// @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" - ] - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Media.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Media.graphql.swift deleted file mode 100644 index 44c7f20a2..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Media.graphql.swift +++ /dev/null @@ -1,20 +0,0 @@ -// @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" - ] - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Node.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Node.graphql.swift deleted file mode 100644 index 31b92b0fe..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Node.graphql.swift +++ /dev/null @@ -1,51 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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", - "Shop", - "ShopPayInstallmentsFinancingPlan", - "ShopPayInstallmentsFinancingPlanTerm", - "ShopPayInstallmentsProductVariantPricing", - "ShopPolicy", - "TaxonomyCategory", - "UrlRedirect", - "Video" - ] - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/OnlineStorePublishable.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/OnlineStorePublishable.graphql.swift deleted file mode 100644 index 7bffac38f..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/OnlineStorePublishable.graphql.swift +++ /dev/null @@ -1,20 +0,0 @@ -// @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" - ] - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Trackable.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Trackable.graphql.swift deleted file mode 100644 index 0d0c04681..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Interfaces/Trackable.graphql.swift +++ /dev/null @@ -1,19 +0,0 @@ -// @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" - ] - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/AppliedGiftCard.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/AppliedGiftCard.graphql.swift deleted file mode 100644 index c3026ba84..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/AppliedGiftCard.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Article.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Article.graphql.swift deleted file mode 100644 index b52129757..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Article.graphql.swift +++ /dev/null @@ -1,20 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift deleted file mode 100644 index 7fab79ec2..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/BaseCartLineConnection.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -import ApolloAPI - -extension Storefront.Objects { - /// An auto-generated type for paginating through multiple BaseCartLines. - static let BaseCartLineConnection = ApolloAPI.Object( - typename: "BaseCartLineConnection", - implementedInterfaces: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Blog.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Blog.graphql.swift deleted file mode 100644 index 9a84304ac..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Blog.graphql.swift +++ /dev/null @@ -1,19 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Cart.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Cart.graphql.swift deleted file mode 100644 index b972c9c40..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Cart.graphql.swift +++ /dev/null @@ -1,20 +0,0 @@ -// @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, 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: [ - Storefront.Interfaces.HasMetafields.self, - Storefront.Interfaces.Node.self - ], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift deleted file mode 100644 index 65352dda9..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartBuyerIdentity.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCost.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCost.graphql.swift deleted file mode 100644 index 92f14c18e..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCost.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCreatePayload.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCreatePayload.graphql.swift deleted file mode 100644 index 4ef66532f..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartCreatePayload.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -import ApolloAPI - -extension Storefront.Objects { - /// Return type for `cartCreate` mutation. - static let CartCreatePayload = ApolloAPI.Object( - typename: "CartCreatePayload", - implementedInterfaces: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift deleted file mode 100644 index 36ccf81d7..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroup.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift deleted file mode 100644 index ffc379868..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryGroupConnection.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -import ApolloAPI - -extension Storefront.Objects { - /// An auto-generated type for paginating through multiple CartDeliveryGroups. - static let CartDeliveryGroupConnection = ApolloAPI.Object( - typename: "CartDeliveryGroupConnection", - implementedInterfaces: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryOption.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryOption.graphql.swift deleted file mode 100644 index 0392d699c..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartDeliveryOption.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLine.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLine.graphql.swift deleted file mode 100644 index 5c0ec2f7b..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLine.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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.BaseCartLine.self, - Storefront.Interfaces.Node.self - ], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLineCost.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLineCost.graphql.swift deleted file mode 100644 index 0f4c9b6a8..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartLineCost.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartUserError.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartUserError.graphql.swift deleted file mode 100644 index 699ee5338..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CartUserError.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 cart mutation. - static let CartUserError = ApolloAPI.Object( - typename: "CartUserError", - implementedInterfaces: [Storefront.Interfaces.DisplayableError.self], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Collection.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Collection.graphql.swift deleted file mode 100644 index 6ac7a78c5..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Collection.graphql.swift +++ /dev/null @@ -1,20 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [ - Storefront.Interfaces.HasMetafields.self, - Storefront.Interfaces.Node.self, - Storefront.Interfaces.OnlineStorePublishable.self, - Storefront.Interfaces.Trackable.self - ], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Comment.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Comment.graphql.swift deleted file mode 100644 index 771f5ffce..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Comment.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Company.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Company.graphql.swift deleted file mode 100644 index e2080c884..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Company.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyContact.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyContact.graphql.swift deleted file mode 100644 index b1cca8c33..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyContact.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyLocation.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyLocation.graphql.swift deleted file mode 100644 index 2130e718b..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CompanyLocation.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ComponentizableCartLine.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ComponentizableCartLine.graphql.swift deleted file mode 100644 index e10d4c57c..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ComponentizableCartLine.graphql.swift +++ /dev/null @@ -1,16 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Customer.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Customer.graphql.swift deleted file mode 100644 index a4d625fd4..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Customer.graphql.swift +++ /dev/null @@ -1,17 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [Storefront.Interfaces.HasMetafields.self], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CustomerUserError.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CustomerUserError.graphql.swift deleted file mode 100644 index 5a4f4ba0a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/CustomerUserError.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ExternalVideo.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ExternalVideo.graphql.swift deleted file mode 100644 index fdcfc6efa..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ExternalVideo.graphql.swift +++ /dev/null @@ -1,16 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/GenericFile.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/GenericFile.graphql.swift deleted file mode 100644 index ae63176a4..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/GenericFile.graphql.swift +++ /dev/null @@ -1,17 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Image.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Image.graphql.swift deleted file mode 100644 index 0243d1017..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Image.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Location.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Location.graphql.swift deleted file mode 100644 index 33d8b1b99..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Location.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MailingAddress.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MailingAddress.graphql.swift deleted file mode 100644 index 44f5b82fb..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MailingAddress.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [Storefront.Interfaces.Node.self], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Market.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Market.graphql.swift deleted file mode 100644 index 54627b059..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Market.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaImage.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaImage.graphql.swift deleted file mode 100644 index 275edc928..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaImage.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaPresentation.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaPresentation.graphql.swift deleted file mode 100644 index 6391e5885..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MediaPresentation.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Menu.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Menu.graphql.swift deleted file mode 100644 index 710217282..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Menu.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MenuItem.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MenuItem.graphql.swift deleted file mode 100644 index 0c60bb4ec..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MenuItem.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metafield.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metafield.graphql.swift deleted file mode 100644 index a138488e9..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metafield.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldDeleteUserError.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldDeleteUserError.graphql.swift deleted file mode 100644 index d04f7bb3a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldDeleteUserError.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldsSetUserError.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldsSetUserError.graphql.swift deleted file mode 100644 index 582effc33..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MetafieldsSetUserError.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metaobject.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metaobject.graphql.swift deleted file mode 100644 index e978c19e8..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Metaobject.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Model3d.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Model3d.graphql.swift deleted file mode 100644 index 9bed0a0c8..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Model3d.graphql.swift +++ /dev/null @@ -1,16 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MoneyV2.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MoneyV2.graphql.swift deleted file mode 100644 index 393df3853..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/MoneyV2.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Mutation.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Mutation.graphql.swift deleted file mode 100644 index ec8c61ed0..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Mutation.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Order.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Order.graphql.swift deleted file mode 100644 index 2a78fd0f3..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Order.graphql.swift +++ /dev/null @@ -1,16 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Page.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Page.graphql.swift deleted file mode 100644 index 732bd359d..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Page.graphql.swift +++ /dev/null @@ -1,20 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Product.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Product.graphql.swift deleted file mode 100644 index 0b5f1d447..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Product.graphql.swift +++ /dev/null @@ -1,24 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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: [ - Storefront.Interfaces.HasMetafields.self, - Storefront.Interfaces.Node.self, - Storefront.Interfaces.OnlineStorePublishable.self, - Storefront.Interfaces.Trackable.self - ], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductConnection.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductConnection.graphql.swift deleted file mode 100644 index 7b3e95f5b..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductConnection.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -import ApolloAPI - -extension Storefront.Objects { - /// An auto-generated type for paginating through multiple Products. - static let ProductConnection = ApolloAPI.Object( - typename: "ProductConnection", - implementedInterfaces: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOption.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOption.graphql.swift deleted file mode 100644 index d0966ede8..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOption.graphql.swift +++ /dev/null @@ -1,17 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOptionValue.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOptionValue.graphql.swift deleted file mode 100644 index fb2e14913..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductOptionValue.graphql.swift +++ /dev/null @@ -1,17 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariant.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariant.graphql.swift deleted file mode 100644 index 73ceceabd..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariant.graphql.swift +++ /dev/null @@ -1,20 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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.HasMetafields.self, - Storefront.Interfaces.Node.self - ], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariantConnection.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariantConnection.graphql.swift deleted file mode 100644 index 85d4703e7..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ProductVariantConnection.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -import ApolloAPI - -extension Storefront.Objects { - /// An auto-generated type for paginating through multiple ProductVariants. - static let ProductVariantConnection = ApolloAPI.Object( - typename: "ProductVariantConnection", - implementedInterfaces: [], - keyFields: nil - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/QueryRoot.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/QueryRoot.graphql.swift deleted file mode 100644 index 758b107aa..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/QueryRoot.graphql.swift +++ /dev/null @@ -1,17 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SearchQuerySuggestion.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SearchQuerySuggestion.graphql.swift deleted file mode 100644 index 86c668552..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SearchQuerySuggestion.graphql.swift +++ /dev/null @@ -1,15 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SellingPlan.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SellingPlan.graphql.swift deleted file mode 100644 index 409eb4d3c..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/SellingPlan.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Shop.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Shop.graphql.swift deleted file mode 100644 index 2aaf36b0e..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Shop.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlan.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlan.graphql.swift deleted file mode 100644 index b7b81b7fb..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlan.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlanTerm.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlanTerm.graphql.swift deleted file mode 100644 index 6c86ff1fa..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsFinancingPlanTerm.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsProductVariantPricing.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsProductVariantPricing.graphql.swift deleted file mode 100644 index 751d98a2a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPayInstallmentsProductVariantPricing.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPolicy.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPolicy.graphql.swift deleted file mode 100644 index 5cc20c1a9..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/ShopPolicy.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/TaxonomyCategory.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/TaxonomyCategory.graphql.swift deleted file mode 100644 index 33f8fa358..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/TaxonomyCategory.graphql.swift +++ /dev/null @@ -1,17 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UrlRedirect.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UrlRedirect.graphql.swift deleted file mode 100644 index 0738616f2..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UrlRedirect.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserError.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserError.graphql.swift deleted file mode 100644 index 4dce03631..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserError.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserErrorsShopPayPaymentRequestSessionUserErrors.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserErrorsShopPayPaymentRequestSessionUserErrors.graphql.swift deleted file mode 100644 index 52635ec5f..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/UserErrorsShopPayPaymentRequestSessionUserErrors.graphql.swift +++ /dev/null @@ -1,13 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Video.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Video.graphql.swift deleted file mode 100644 index 1a4409a68..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Objects/Video.graphql.swift +++ /dev/null @@ -1,18 +0,0 @@ -// @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 - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/SchemaConfiguration.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/SchemaConfiguration.swift deleted file mode 100644 index 1f0212c7c..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/SchemaConfiguration.swift +++ /dev/null @@ -1,8 +0,0 @@ -import ApolloAPI - -enum SchemaConfiguration: ApolloAPI.SchemaConfiguration { - static func cacheKeyInfo(for _: ApolloAPI.Object, object _: ApolloAPI.ObjectData) -> CacheKeyInfo? { - // Implement this function to configure cache key resolution for your schema types. - return nil - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/SchemaMetadata.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/SchemaMetadata.graphql.swift deleted file mode 100644 index 76ab0431a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/SchemaMetadata.graphql.swift +++ /dev/null @@ -1,101 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -import ApolloAPI - -protocol Storefront_SelectionSet: ApolloAPI.SelectionSet & ApolloAPI.RootSelectionSet -where Schema == Storefront.SchemaMetadata {} - -protocol Storefront_InlineFragment: ApolloAPI.SelectionSet & ApolloAPI.InlineFragment -where Schema == Storefront.SchemaMetadata {} - -protocol Storefront_MutableSelectionSet: ApolloAPI.MutableRootSelectionSet -where Schema == Storefront.SchemaMetadata {} - -protocol Storefront_MutableInlineFragment: ApolloAPI.MutableSelectionSet & ApolloAPI.InlineFragment -where Schema == Storefront.SchemaMetadata {} - -extension Storefront { - typealias SelectionSet = Storefront_SelectionSet - - typealias InlineFragment = Storefront_InlineFragment - - typealias MutableSelectionSet = Storefront_MutableSelectionSet - - typealias MutableInlineFragment = Storefront_MutableInlineFragment - - enum SchemaMetadata: ApolloAPI.SchemaMetadata { - 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 - case "CartCreatePayload": return Storefront.Objects.CartCreatePayload - case "CartDeliveryGroup": return Storefront.Objects.CartDeliveryGroup - case "CartDeliveryGroupConnection": return Storefront.Objects.CartDeliveryGroupConnection - case "CartDeliveryOption": return Storefront.Objects.CartDeliveryOption - case "CartLine": return Storefront.Objects.CartLine - case "CartLineCost": return Storefront.Objects.CartLineCost - case "CartUserError": return Storefront.Objects.CartUserError - case "Collection": return Storefront.Objects.Collection - 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 "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 - } - } - } - - enum Objects {} - enum Interfaces {} - enum Unions {} - -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Unions/Merchandise.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Unions/Merchandise.graphql.swift deleted file mode 100644 index 0ae4c9064..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Schema/Unions/Merchandise.graphql.swift +++ /dev/null @@ -1,12 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -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] - ) -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Storefront.graphql.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Storefront.graphql.swift deleted file mode 100644 index edb073320..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Generated/Storefront.graphql.swift +++ /dev/null @@ -1,4 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -enum Storefront { } diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Mutations/CartCreate.graphql b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Mutations/CartCreate.graphql deleted file mode 100644 index e11932230..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Mutations/CartCreate.graphql +++ /dev/null @@ -1,10 +0,0 @@ -mutation CartCreate($input: CartInput!, $country: CountryCode!, $language: LanguageCode!) @inContext(country: $country, language: $language) { - cartCreate(input: $input) { - cart { - ...CartFragment - } - userErrors { - ...CartUserErrorFragment - } - } -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartDeliveryGroupFragment.graphql b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartDeliveryGroupFragment.graphql deleted file mode 100644 index 01e505d61..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartDeliveryGroupFragment.graphql +++ /dev/null @@ -1,35 +0,0 @@ -fragment CartDeliveryGroupFragment on CartDeliveryGroup { - id - groupType - deliveryAddress { - address1 - address2 - city - countryCodeV2 - firstName - lastName - phone - province - zip - } - deliveryOptions { - handle - title - code - deliveryMethodType - description - estimatedCost { - amount - currencyCode - } - } - selectedDeliveryOption { - description - title - handle - estimatedCost { - amount - currencyCode - } - } -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartFragment.graphql b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartFragment.graphql deleted file mode 100644 index 99d27d57d..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartFragment.graphql +++ /dev/null @@ -1,37 +0,0 @@ -fragment CartFragment on Cart { - id - checkoutUrl - totalQuantity - buyerIdentity { - email - phone - customer { - email - phone - } - } - deliveryGroups(first: 10) { - nodes { - ...CartDeliveryGroupFragment - } - } - lines(first: 250) { - nodes { - ...CartLineFragment - } - } - cost { - totalAmount { - amount - currencyCode - } - subtotalAmount { - amount - currencyCode - } - totalTaxAmount { - amount - currencyCode - } - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartLineFragment.graphql b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartLineFragment.graphql deleted file mode 100644 index 46508dc68..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartLineFragment.graphql +++ /dev/null @@ -1,31 +0,0 @@ -fragment CartLineFragment on BaseCartLine { - id - quantity - merchandise { - ... on ProductVariant { - id - title - image { - url - } - price { - amount - currencyCode - } - product { - title - vendor - featuredImage { - url - } - } - requiresShipping - } - } - cost { - totalAmount { - amount - currencyCode - } - } -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartQuery.graphql b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartQuery.graphql deleted file mode 100644 index b26e865ce..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartQuery.graphql +++ /dev/null @@ -1,5 +0,0 @@ -query GetCart($id: ID!, $country: CountryCode!, $language: LanguageCode!) @inContext(country: $country, language: $language) { - cart(id: $id) { - ...CartFragment - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartUserErrorFragment.graphql b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartUserErrorFragment.graphql deleted file mode 100644 index 6903c4c65..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/CartUserErrorFragment.graphql +++ /dev/null @@ -1,5 +0,0 @@ -fragment CartUserErrorFragment on CartUserError { - code - message - field -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/GetProducts.graphql b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/GetProducts.graphql deleted file mode 100644 index b8743145a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/GraphQL/Queries/GetProducts.graphql +++ /dev/null @@ -1,25 +0,0 @@ -query GetProducts($first: Int = 10, $country: CountryCode!, $language: LanguageCode!) @inContext(country: $country, language: $language) { - products(first: $first) { - nodes { - id - title - featuredImage { - url - } - variants(first: 10) { - nodes { - id - title - requiresShipping - image { - url - } - price { - amount - currencyCode - } - } - } - } - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Network.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Network.swift deleted file mode 100644 index ae49f5b95..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Network.swift +++ /dev/null @@ -1,164 +0,0 @@ -import Apollo -import ApolloAPI -import Foundation -import ShopifyAcceleratedCheckouts - -typealias Cart = Storefront.CartCreateMutation.Data.CartCreate.Cart -typealias CartLine = Storefront.CartCreateMutation.Data.CartCreate.Cart.Lines.Node -typealias CartProductVariant = Storefront.CartCreateMutation.Data.CartCreate.Cart.Lines.Node - .Merchandise.AsProductVariant -typealias CartProductPrice = Storefront.CartCreateMutation.Data.CartCreate.Cart.Lines.Node - .Merchandise.AsProductVariant.Price -typealias CartLineTotalAmount = Storefront.CartCreateMutation.Data.CartCreate.Cart.Lines.Node.Cost - .TotalAmount -typealias CartTotalAmount = Storefront.CartCreateMutation.Data.CartCreate.Cart.Cost.TotalAmount -typealias Products = Storefront.GetProductsQuery.Data.Products -typealias Product = Storefront.GetProductsQuery.Data.Products.Node -typealias ProductVariants = Storefront.GetProductsQuery.Data.Products.Node.Variants -typealias ProductVariant = Storefront.GetProductsQuery.Data.Products.Node.Variants.Node -typealias ProductPrice = Storefront.GetProductsQuery.Data.Products.Node.Variants.Node.Price - -@MainActor -final class Network { - static let shared = Network() - - /// Get the device's language code mapped to Shopify's LanguageCode enum - private func getLanguageCode() -> GraphQLEnum { - if let languageCode = Locale.current.language.languageCode?.identifier { - let code = languageCode.uppercased() - - // Handle special cases - switch code { - case "ZH": - if let scriptCode = Locale.current.language.script?.identifier { - return GraphQLEnum(scriptCode == "Hans" ? Storefront.LanguageCode.zhCn : Storefront.LanguageCode.zhTw) - } - return GraphQLEnum(Storefront.LanguageCode.zhCn) - case "PT": - if let regionCode = Locale.current.language.region?.identifier { - return GraphQLEnum(regionCode == "BR" ? Storefront.LanguageCode.ptBr : Storefront.LanguageCode.ptPt) - } - return GraphQLEnum(Storefront.LanguageCode.pt) - default: - // Try to map directly to Storefront.LanguageCode - if let mappedCode = Storefront.LanguageCode(rawValue: code) { - return GraphQLEnum(mappedCode) - } - - // Try with just the first two characters - let baseLanguage = String(code.prefix(2)) - if let mappedCode = Storefront.LanguageCode(rawValue: baseLanguage) { - return GraphQLEnum(mappedCode) - } - } - } - - return GraphQLEnum(Storefront.LanguageCode.en) // Default to English - } - - private(set) lazy var apollo: ApolloClient = { - let urlString = - "https://\(EnvironmentVariables.storefrontDomain)/api/\(EnvironmentVariables.apiVersion)/graphql.json" - guard let url = URL(string: urlString) else { - fatalError("Invalid GraphQL endpoint URL: \(urlString)") - } - - let store = ApolloStore() - let transport = RequestChainNetworkTransport( - urlSession: URLSession.shared, - interceptorProvider: StorefrontInterceptorProvider(), - store: store, - endpointURL: url - ) - - return ApolloClient(networkTransport: transport, store: store) - }() - - func getProducts() async -> Products? { - print("Network: Starting product fetch from \(EnvironmentVariables.storefrontDomain)") - - let countryCode = GraphQLEnum(Storefront.CountryCode(rawValue: Locale.current.region?.identifier ?? "US") ?? .us) - let languageCode = getLanguageCode() - - 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 - ) async -> Cart? { - let lines = merchandiseQuantities.map { merchandiseId, quantity in - Storefront.CartLineInput( - quantity: .some(Int32(quantity)), - merchandiseId: merchandiseId - ) - } - - var buyerIdentity: Storefront.CartBuyerIdentityInput? - if let customer = configuration?.customer { - let emailInput: GraphQLNullable = customer.email ?? .none - let phoneInput: GraphQLNullable = customer.phoneNumber ?? .none - - buyerIdentity = Storefront.CartBuyerIdentityInput( - email: emailInput, - phone: phoneInput - ) - } - - let input = Storefront.CartInput( - lines: .some(lines), - buyerIdentity: buyerIdentity ?? .none - ) - - let countryCode = GraphQLEnum(Storefront.CountryCode(rawValue: Locale.current.region?.identifier ?? "US") ?? .us) - let languageCode = getLanguageCode() - - let mutation = Storefront.CartCreateMutation( - input: input, - country: countryCode, - language: languageCode - ) - - do { - let response = try await Network.shared.apollo.perform(mutation: mutation) - return response.data?.cartCreate?.cart - } catch { - print(error) - return nil - } - } -} - -struct StorefrontInterceptorProvider: InterceptorProvider { - func graphQLInterceptors( - for operation: some GraphQLOperation - ) -> [any GraphQLInterceptor] { - DefaultInterceptorProvider.shared.graphQLInterceptors(for: operation) + [ - AuthorizationInterceptor() - ] - } -} - -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 await next(authenticatedRequest) - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Preview Content/Preview Assets.xcassets/Contents.json b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Preview Content/Preview Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Preview Content/Preview Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.swift deleted file mode 100644 index 8c4f0061f..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.swift +++ /dev/null @@ -1,87 +0,0 @@ -import ShopifyAcceleratedCheckouts -import ShopifyCheckoutKit -import SwiftUI - -@main -struct ShopifyAcceleratedCheckoutsApp: App { - @AppStorage(AppStorageKeys.requireEmail.rawValue) var requireEmail: Bool = true - @AppStorage(AppStorageKeys.requirePhone.rawValue) var requirePhone: Bool = true - @AppStorage(AppStorageKeys.locale.rawValue) var locale: String = "en" - @AppStorage(AppStorageKeys.logLevel.rawValue) var logLevel: LogLevel = .debug - @AppStorage(AppStorageKeys.email.rawValue) var email: String = "" - @AppStorage(AppStorageKeys.phone.rawValue) var phone: String = "" - @AppStorage(AppStorageKeys.supportedCountries.rawValue) var supportedCountriesString: String = "" - @State private var configuration: ShopifyAcceleratedCheckouts.Configuration - - init() { - let email = UserDefaults.standard.string(forKey: AppStorageKeys.email.rawValue) ?? "" - let phone = UserDefaults.standard.string(forKey: AppStorageKeys.phone.rawValue) ?? "" - _configuration = State( - initialValue: ShopifyAcceleratedCheckouts.Configuration( - storefrontDomain: EnvironmentVariables.storefrontDomain, - storefrontAccessToken: EnvironmentVariables.storefrontAccessToken, - customer: Self.customer(email: email, phone: phone) - ) - ) - } - - var applePayConfiguration: ShopifyAcceleratedCheckouts.ApplePayConfiguration { - let countries = supportedCountriesString.isEmpty ? nil : Set(supportedCountriesString.split(separator: ",").map { String($0) }) - return createApplePayConfiguration( - requireEmail: requireEmail, - requirePhone: requirePhone, - supportedCountries: countries - ) - } - - var body: some Scene { - WindowGroup { - NavigationStack { - CartBuilderView(configuration: configuration) - .toolbar { - ToolbarItem(placement: .navigationBarTrailing) { - SettingsButton() - } - } - .id("\(requireEmail)-\(requirePhone)-\(supportedCountriesString)") - .onChange(of: email) { _ in updateConfiguration() } - .onChange(of: phone) { _ in updateConfiguration() } - } - .onAppear { - ShopifyAcceleratedCheckouts.logLevel = logLevel - updateConfiguration() - } - .environment(\.shopifyAcceleratedCheckoutsConfiguration, configuration) - .environment(\.shopifyApplePayConfiguration, applePayConfiguration) - } - .environment(\.locale, Locale(identifier: locale)) - } - - private static func customer(email: String, phone: String) -> ShopifyAcceleratedCheckouts.Customer { - ShopifyAcceleratedCheckouts.Customer( - email: email.isEmpty ? nil : email, - phoneNumber: phone.isEmpty ? nil : phone - ) - } - - private func updateConfiguration() { - configuration.customer = Self.customer(email: email, phone: phone) - } -} - -private func createApplePayConfiguration( - requireEmail: Bool, - requirePhone: Bool, - supportedCountries: Set? -) -> ShopifyAcceleratedCheckouts.ApplePayConfiguration { - var fields: [ShopifyAcceleratedCheckouts.RequiredContactFields] = [] - - if requireEmail { fields.append(.email) } - if requirePhone { fields.append(.phone) } - - return ShopifyAcceleratedCheckouts.ApplePayConfiguration( - merchantIdentifier: "merchant.com.shopify.example.ShopifyAcceleratedCheckoutsApp", - contactFields: fields, - supportedShippingCountries: supportedCountries - ) -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/CartBuilderView.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/CartBuilderView.swift deleted file mode 100644 index 2d657212d..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/CartBuilderView.swift +++ /dev/null @@ -1,154 +0,0 @@ -import Apollo -import Foundation -import ShopifyAcceleratedCheckouts -import SwiftUI - -typealias MerchandiseID = String -typealias Quantity = Int - -struct CartBuilderView: View { - var configuration: ShopifyAcceleratedCheckouts.Configuration - @State var cart: Cart? - @State var allProducts: [Product] = [] - /// Products picked with the QuantityPicker, prior to Cart creation - @State var selectedVariants: [MerchandiseID: Quantity] = [:] - @State var isLoadingProducts: Bool = false - @State var isCreatingCart: Bool = false - @State private var scrollViewProxy: ScrollViewProxy? - - var body: some View { - VStack { - ScrollView { - ScrollViewReader { scrollProxy in - VStack(spacing: 20) { - // Invisible anchor for scrolling to top - Color.clear - .frame(height: 1) - .id(ScrollableElement.top) - - // Products Section - ProductsSection( - products: allProducts, - selectedVariants: $selectedVariants, - isLoadingProducts: isLoadingProducts, - onRetry: { Task { await onLoad() } } - ) - - if let cart { - CartDetailsSection( - cart: Binding(get: { cart }, set: { self.cart = $0 }) - ) - .id(ScrollableElement.cartDetails) // Add ID for scrolling to cart - - ButtonSet( - cart: $cart, - firstVariantQuantity: cart.lines.nodes.first?.quantity ?? 1, - onComplete: clearCart - ) - } - - // Bottom padding to ensure content isn't hidden behind sticky buttons - Spacer() - .frame(height: 100) - } - .onAppear { - scrollViewProxy = scrollProxy - } - } - } - - // Sticky Cart Creation Buttons - VStack { - Divider() - CartCreationButtons( - customCart: cart, - selectedVariants: selectedVariants, - isCreatingCart: isCreatingCart, - isLoadingProducts: isLoadingProducts, - hasProducts: !allProducts.isEmpty, - onCreateCart: createCustomCart, - onClearCart: clearCart - ) - .padding(.vertical, 12) - .background(Color(UIColor.systemBackground)) - .shadow(color: Color.black.opacity(0.1), radius: 8, x: 0, y: -2) - } - } - .task { - await onLoad() - } - } - - private enum ScrollableElement: String { - case cartDetails - case top - } - - private func scrollTo(element: ScrollableElement) { - withAnimation(.easeInOut) { - scrollViewProxy?.scrollTo(element, anchor: .top) - } - } - - private func createCustomCart() { - isCreatingCart = true - - Task { - let cart = await Network.shared.createCart( - merchandiseQuantities: selectedVariants, - configuration: configuration - ) - withAnimation { - self.cart = cart - isCreatingCart = false - selectedVariants.removeAll() - } - try? await Task.sleep(nanoseconds: 100_000_000) - scrollTo(element: .cartDetails) - } - } - - private func clearCart() { - withAnimation { - cart = nil - selectedVariants.removeAll() - } - // Trigger scroll using state change - scrollTo(element: .top) - } - - func onLoad() async { - // Prevent multiple simultaneous loads - guard !isLoadingProducts else { - print("Already loading products, skipping...") - return - } - - print("Starting to load products...") - isLoadingProducts = true - - // Ensure products load regardless of any configuration issues - defer { - isLoadingProducts = false - } - - 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") - } - } -} - -#Preview { - let configuration = ShopifyAcceleratedCheckouts.Configuration( - storefrontDomain: EnvironmentVariables.storefrontDomain, - storefrontAccessToken: EnvironmentVariables.storefrontAccessToken - ) - - CartBuilderView(configuration: configuration) -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ButtonSet.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ButtonSet.swift deleted file mode 100644 index df2bf6ce5..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ButtonSet.swift +++ /dev/null @@ -1,107 +0,0 @@ -import Apollo -import ShopifyAcceleratedCheckouts -import ShopifyCheckoutKit -import SwiftUI - -struct ButtonSet: View { - @Binding var cart: Cart? - let firstVariantQuantity: Int - let onComplete: () -> Void - - @State private var cartRenderState: RenderState = .loading - @State private var variantRenderState: RenderState = .loading - - var body: some View { - VStack(spacing: 16) { - if let cartID = cart?.id { - CheckoutSection( - title: "AcceleratedCheckoutButtons(cartID:)", - renderState: $cartRenderState - ) { - AcceleratedCheckoutButtons(cartID: cartID) - .applePayButtonType(.plain) - .onFail { error in - print("❌ Checkout failed: \(error)") - } - .onDismiss { - print("🚫 Checkout dismissed") - } - .onRenderStateChange { - cartRenderState = $0 - } - } - } - - if let merchandise = cart?.lines.nodes.first?.merchandise, - let productVariant = merchandise.asProductVariant - { - CheckoutSection( - title: "AcceleratedCheckoutButtons(variantID: quantity:)", - renderState: $variantRenderState - ) { - AcceleratedCheckoutButtons( - variantID: productVariant.id, - quantity: firstVariantQuantity - ) - .applePayButtonStyle(.whiteOutline) - .applePayButtonType(.buy) - .cornerRadius(24) - .wallets([.applePay, .shopPay]) - .onFail { error in - print("❌ Variant checkout failed: \(error)") - } - .onDismiss { - print("🚫 Variant checkout dismissed") - } - .onRenderStateChange { - variantRenderState = $0 - } - } - } - } - } -} - -// MARK: - Local Components - -private struct CheckoutSection: View { - let title: String - @Binding var renderState: RenderState - @ViewBuilder let content: () -> Content - - var body: some View { - Section { - VStack { - Text(title) - .font(.headline) - .foregroundColor(.primary) - .multilineTextAlignment(.center) - - if case .loading = renderState { - VStack(spacing: 12) { - SkeletonButton(cornerRadius: 8) - SkeletonButton(cornerRadius: 8) - } - } - - if case .error = renderState { - VStack { - Image(systemName: "exclamationmark.triangle") - .foregroundColor(.orange) - .font(.title2) - Text("Unable to load checkout buttons") - .font(.caption) - .foregroundColor(.secondary) - } - .frame(height: 44) - } - - content() - } - } - .padding() - .background(Color.gray.opacity(0.1)) - .cornerRadius(8) - .padding(.horizontal) - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/CartCreationButtons.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/CartCreationButtons.swift deleted file mode 100644 index 93258a50f..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/CartCreationButtons.swift +++ /dev/null @@ -1,72 +0,0 @@ -import Apollo -import SwiftUI - -struct CartCreationButtons: View { - let customCart: Cart? - let selectedVariants: [String: Int] - let isCreatingCart: Bool - let isLoadingProducts: Bool - let hasProducts: Bool - let onCreateCart: () -> Void - let onClearCart: () -> Void - - var body: some View { - VStack(spacing: 8) { - HStack(spacing: 12) { - if customCart != nil { - Button(action: onClearCart) { - Label("Clear Cart", systemImage: "trash") - .frame(maxWidth: .infinity) - .padding() - .background(Color.red.opacity(0.1)) - .foregroundColor(.red) - .cornerRadius(8) - .overlay( - RoundedRectangle(cornerRadius: 8) - .stroke(Color.red, lineWidth: 1) - ) - } - } - - Button(action: onCreateCart) { - HStack { - if isCreatingCart { - ProgressView() - .progressViewStyle(CircularProgressViewStyle(tint: .white)) - .scaleEffect(0.8) - } else { - Image(systemName: "cart.fill") - } - Text(isCreatingCart ? "" : "Create Cart") - } - .frame(maxWidth: .infinity) - .padding() - .background( - isCreatingCart - ? Color.accentColor.opacity(0.8) - : ( - selectedVariants.isEmpty - ? Color.gray.opacity(0.3) : Color.accentColor - ) - ) - .foregroundColor(.white) - .cornerRadius(8) - .opacity(selectedVariants.isEmpty && !isCreatingCart ? 0.6 : 1.0) - } - .disabled(isCreatingCart || selectedVariants.isEmpty) - } - .padding(.horizontal) - - if selectedVariants.isEmpty, !isLoadingProducts, hasProducts { - Text( - customCart != nil - ? "Select products to create a new cart" - : "Select products to create a cart" - ) - .font(.caption) - .foregroundColor(.secondary) - .padding(.horizontal) - } - } - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/CartDetailsSection.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/CartDetailsSection.swift deleted file mode 100644 index 06a6abf35..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/CartDetailsSection.swift +++ /dev/null @@ -1,66 +0,0 @@ -import Apollo -import SwiftUI - -struct CartDetailsSection: View { - @Binding var cart: Cart - - var cartTypeTitle: String { - let variants = cart.lines.nodes.compactMap { $0.merchandise.asProductVariant } - - let hasPhysical = variants.contains { $0.requiresShipping } - let hasDigital = variants.contains { !$0.requiresShipping } - - if hasPhysical, hasDigital { - return "Physical & Digital\nCart" - } - if hasPhysical { - return "Physical Cart" - } - if hasDigital { - return "Digital Cart" - } - - return "Cart" - } - - var body: some View { - VStack(spacing: 20) { - Text(cartTypeTitle) - .fontWeight(.bold) - .font(.largeTitle) - .multilineTextAlignment(.center) - .padding(.top) - - VStack(alignment: .leading, spacing: 12) { - Text("Cart Contents") - .font(.headline) - .padding(.horizontal) - - ForEach(cart.lines.nodes, id: \.id) { line in - if let variant = line.merchandise.asProductVariant { - CartItemRow(line: line, variant: variant) - .font(.caption) - } - } - - // Cart Total - HStack { - Text("Total:") - .font(.headline) - Spacer() - Text(formatPrice(cart.cost.totalAmount)) - .font(.headline) - .fontWeight(.bold) - } - .padding() - .background(Color.gray.opacity(0.1)) - .cornerRadius(8) - .padding(.horizontal) - } - } - } - - private func formatPrice(_ price: CartTotalAmount) -> String { - PriceFormatter.format(amount: price.amount, currencyCode: price.currencyCode.rawValue) - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/CartItemRow.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/CartItemRow.swift deleted file mode 100644 index 95836638d..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/CartItemRow.swift +++ /dev/null @@ -1,54 +0,0 @@ -import Apollo -import Foundation -import SwiftUI - -struct CartItemRow: View { - let line: CartLine - let variant: CartProductVariant - - var body: some View { - HStack(alignment: .top, spacing: 12) { - // Product Image - ProductImage(imageUrl: variant.image?.url, size: 60) - - VStack(alignment: .leading, spacing: 4) { - Text(variant.product.title) - .font(.subheadline) - .fontWeight(.medium) - - VariantTitle(title: variant.title) - - ProductTypeLabel(requiresShipping: variant.requiresShipping) - - Text("Qty: \(line.quantity)") - .font(.caption) - .foregroundColor(.secondary) - } - - Spacer() - - VStack(alignment: .trailing, spacing: 4) { - Text(formatLinePrice(line.cost.totalAmount)) - .font(.subheadline) - .fontWeight(.medium) - - if let unitPriceAmount = Decimal(string: variant.price.amount), unitPriceAmount > 0 { - Text("(\(formatUnitPrice(variant.price)) each)") - .font(.caption) - .foregroundColor(.secondary) - } - } - } - .padding(.horizontal) - } - - private func formatLinePrice(_ price: CartLineTotalAmount) -> String { - PriceFormatter.format(amount: price.amount, currencyCode: price.currencyCode.rawValue) - } - - private func formatUnitPrice(_ price: CartProductPrice) - -> String - { - PriceFormatter.format(amount: price.amount, currencyCode: price.currencyCode.rawValue) - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/EmptyProducts.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/EmptyProducts.swift deleted file mode 100644 index 0caf0951d..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/EmptyProducts.swift +++ /dev/null @@ -1,17 +0,0 @@ -import SwiftUI - -struct EmptyProducts: View { - let onRetry: () -> Void - - var body: some View { - VStack(spacing: 10) { - Text("No products available") - .foregroundColor(.secondary) - - Button("Retry", action: onRetry) - .foregroundColor(.accentColor) - } - .padding() - .frame(maxWidth: .infinity) - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/LanguageSelector.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/LanguageSelector.swift deleted file mode 100644 index 0d0ac5ec9..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/LanguageSelector.swift +++ /dev/null @@ -1,27 +0,0 @@ -import SwiftUI - -struct LanguageSelector: View { - @Binding var locale: String - let availableLocales: [(name: String, isoCode: String)] - let onLocaleChange: (String) -> Void - - var body: some View { - Menu { - ForEach(availableLocales, id: \.isoCode) { localeOption in - Button { - onLocaleChange(localeOption.isoCode) - } label: { - HStack { - Text(localeOption.name) - Spacer() - if locale == localeOption.isoCode { - Image(systemName: "checkmark") - } - } - } - } - } label: { - Label("Language", systemImage: "globe") - } - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/LoadingProducts.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/LoadingProducts.swift deleted file mode 100644 index 4c38402c7..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/LoadingProducts.swift +++ /dev/null @@ -1,17 +0,0 @@ -import SwiftUI - -struct LoadingProducts: View { - var body: some View { - HStack { - Spacer() - ProgressView() - .progressViewStyle(CircularProgressViewStyle()) - .scaleEffect(1.2) - .padding() - Text("Loading products...") - .foregroundColor(.secondary) - Spacer() - } - .padding(.vertical, 40) - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductImage.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductImage.swift deleted file mode 100644 index 8f18ec8a1..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductImage.swift +++ /dev/null @@ -1,43 +0,0 @@ -import SwiftUI - -struct ProductImage: View { - let imageUrl: String? - let size: CGFloat - - init(imageUrl: String?, size: CGFloat = 60) { - self.imageUrl = imageUrl - self.size = size - } - - var body: some View { - if let imageUrlString = imageUrl, - let url = URL(string: imageUrlString) - { - AsyncImage(url: url) { image in - image - .resizable() - .aspectRatio(contentMode: .fill) - .frame(width: size, height: size) - .clipShape(RoundedRectangle(cornerRadius: 8)) - } placeholder: { - RoundedRectangle(cornerRadius: 8) - .fill(Color.gray.opacity(0.2)) - .frame(width: size, height: size) - .overlay( - ProgressView() - .scaleEffect(0.5) - ) - } - } else { - // Placeholder for products without images - RoundedRectangle(cornerRadius: 8) - .fill(Color.gray.opacity(0.1)) - .frame(width: size, height: size) - .overlay( - Image(systemName: "photo") - .foregroundColor(.gray.opacity(0.5)) - .font(size > 60 ? .title3 : .body) - ) - } - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductRow.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductRow.swift deleted file mode 100644 index 3b31392a4..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductRow.swift +++ /dev/null @@ -1,149 +0,0 @@ -import Apollo -import Foundation -import SwiftUI - -struct ProductRow: View { - let product: Product - let variant: ProductVariant - let quantity: Int - let onQuantityChange: (Int) -> Void - - var body: some View { - HStack(alignment: .top, spacing: 12) { - // Product Image - with fallback to product featured image - ProductImage( - imageUrl: variant.image?.url ?? product.featuredImage?.url, - size: 80 - ) - - // Content to the right of image - VStack(alignment: .leading, spacing: 8) { - // Product title - Text("\(product.title)") - .font(.headline) - .frame(maxWidth: .infinity, alignment: .leading) - - // Variant info and quantity in same row - HStack(alignment: .center) { - ProductInfo(variant: variant) - - Spacer() - - QuantityControls( - quantity: quantity, - onQuantityChange: onQuantityChange - ) - } - } - } - .padding() - .background(Color(UIColor.secondarySystemBackground)) - .cornerRadius(8) - .padding(.horizontal) - } -} - -// MARK: - Components - -struct ProductInfo: View { - let variant: ProductVariant - - var formattedPrice: String { - PriceFormatter.format( - amount: variant.price.amount, - currencyCode: variant.price.currencyCode.rawValue - ) - } - - var body: some View { - VStack(alignment: .leading, spacing: 4) { - ProductTypeLabel(requiresShipping: variant.requiresShipping) - .font(.caption) - - VariantTitle(title: variant.title) - - Text(formattedPrice) - .font(.caption) - .fontWeight(.semibold) - } - } -} - -struct QuantityControls: View { - let quantity: Int - let onQuantityChange: (Int) -> Void - - var body: some View { - if quantity == 0 { - AddButton { - withAnimation(.quantityChange) { - onQuantityChange(1) - } - } - .transition(.scale.combined(with: .opacity)) - } else { - QuantityPicker( - quantity: quantity, - onQuantityChange: onQuantityChange - ) - .transition(.scale.combined(with: .opacity)) - } - } -} - -struct AddButton: View { - let action: () -> Void - - var body: some View { - Button(action: action) { - Image(systemName: "plus.circle") - .font(.title2) - .foregroundColor(.accentColor) - } - } -} - -struct QuantityPicker: View { - let quantity: Int - let onQuantityChange: (Int) -> Void - - var body: some View { - HStack(spacing: 12) { - Button( - action: { - withAnimation(.quantityChange) { - onQuantityChange(quantity - 1) - } - }, - label: { - Image(systemName: "minus.circle.fill") - .font(.title3) - .foregroundColor(quantity > 1 ? .accentColor : .red) - } - ) - - Text("\(quantity)") - .font(.body) - .fontWeight(.semibold) - .frame(minWidth: 24) - - Button( - action: { - withAnimation(.quantityChange) { - onQuantityChange(quantity + 1) - } - }, - label: { - Image(systemName: "plus.circle.fill") - .font(.title3) - .foregroundColor(.accentColor) - } - ) - .disabled(quantity >= 99) - } - .padding(.horizontal, 10) - .padding(.vertical, 6) - .background(Color.gray.opacity(0.1)) - .cornerRadius(16) - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductTypeLabel.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductTypeLabel.swift deleted file mode 100644 index 7eb573b35..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductTypeLabel.swift +++ /dev/null @@ -1,25 +0,0 @@ -import SwiftUI - -struct ProductTypeLabel: View { - let requiresShipping: Bool - - var productType: String { - requiresShipping ? "Physical" : "Digital" - } - - var systemImage: String { - requiresShipping ? "shippingbox" : "arrow.down.circle" - } - - var color: Color { - requiresShipping ? .blue : .green - } - - var body: some View { - HStack(spacing: 4) { - Image(systemName: systemImage) - Text(productType) - } - .foregroundColor(color) - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductsSection.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductsSection.swift deleted file mode 100644 index 64e56c3e5..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/ProductsSection.swift +++ /dev/null @@ -1,45 +0,0 @@ -import Apollo -import SwiftUI - -struct ProductsSection: View { - let products: [Product] - @Binding var selectedVariants: [String: Int] - let isLoadingProducts: Bool - let onRetry: () -> Void - - var body: some View { - VStack(alignment: .leading, spacing: 16) { - Text("Products") - .font(.title2) - .fontWeight(.bold) - .padding(.horizontal) - - if isLoadingProducts { - LoadingProducts() - } else if products.isEmpty { - EmptyProducts(onRetry: onRetry) - } else { - ForEach(products, id: \.id) { product in - ForEach(product.variants.nodes, id: \.id) { variant in - ProductRow( - product: product, - variant: variant, - quantity: selectedVariants[variant.id] ?? 0, - onQuantityChange: { newQuantity in - if newQuantity > 0 { - selectedVariants[variant.id] = newQuantity - } else { - selectedVariants.removeValue(forKey: variant.id) - } - } - ) - .animation( - .standard, - value: selectedVariants[variant.id] ?? 0 - ) - } - } - } - } - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/SettingsButton.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/SettingsButton.swift deleted file mode 100644 index 57f91446e..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/SettingsButton.swift +++ /dev/null @@ -1,12 +0,0 @@ -import ShopifyAcceleratedCheckouts -import SwiftUI - -struct SettingsButton: View { - var body: some View { - NavigationLink( - destination: SettingsView() - ) { - Text("Settings") - } - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/SkeletonButton.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/SkeletonButton.swift deleted file mode 100644 index d8aaac166..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/SkeletonButton.swift +++ /dev/null @@ -1,59 +0,0 @@ -import SwiftUI - -struct SkeletonButton: View { - let cornerRadius: CGFloat - @State private var isAnimating = false - - init(cornerRadius: CGFloat = 8) { - self.cornerRadius = cornerRadius - } - - var body: some View { - RoundedRectangle(cornerRadius: cornerRadius) - .fill( - LinearGradient( - colors: [ - Color.gray.opacity(0.3), - Color.gray.opacity(0.1), - Color.gray.opacity(0.3) - ], - startPoint: .leading, - endPoint: .trailing - ) - ) - .frame(height: 44) - .overlay( - RoundedRectangle(cornerRadius: cornerRadius) - .fill( - LinearGradient( - colors: [ - Color.clear, - Color.white.opacity(0.4), - Color.clear - ], - startPoint: .leading, - endPoint: .trailing - ) - ) - .scaleEffect(x: 0.3, y: 1) - .offset(x: isAnimating ? 200 : -200) - .animation( - Animation.linear(duration: 1.5) - .repeatForever(autoreverses: false), - value: isAnimating - ) - ) - .clipped() - .onAppear { - isAnimating = true - } - } -} - -#Preview { - VStack(spacing: 16) { - SkeletonButton() - SkeletonButton(cornerRadius: 24) - } - .padding() -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/VariantTitle.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/VariantTitle.swift deleted file mode 100644 index 7fa7c31bf..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/Components/VariantTitle.swift +++ /dev/null @@ -1,21 +0,0 @@ -import SwiftUI - -struct VariantTitle: View { - let title: String - let font: Font - let prefix: String - - init(title: String, font: Font = .caption, prefix: String = "Variant: ") { - self.title = title - self.font = font - self.prefix = prefix - } - - var body: some View { - if title != "Default Title" { - Text("\(prefix)\(title)") - .font(font) - .foregroundColor(.secondary) - } - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/SettingsView.swift b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/SettingsView.swift deleted file mode 100644 index f5f2cda6d..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Views/SettingsView.swift +++ /dev/null @@ -1,210 +0,0 @@ -import ShopifyAcceleratedCheckouts -import ShopifyCheckoutKit -import SwiftUI - -enum AppStorageKeys: String { - case requireEmail - case requirePhone - case locale - case logLevel - case email - case phone - case supportedCountries -} - -struct SettingsView: View { - @AppStorage(AppStorageKeys.requireEmail.rawValue) var requireEmail: Bool = true - @AppStorage(AppStorageKeys.requirePhone.rawValue) var requirePhone: Bool = true - @AppStorage(AppStorageKeys.locale.rawValue) var locale: String = "en" - @AppStorage(AppStorageKeys.logLevel.rawValue) var logLevel: LogLevel = .debug { - didSet { - ShopifyAcceleratedCheckouts.logLevel = logLevel - } - } - - @AppStorage(AppStorageKeys.email.rawValue) var email: String = "" - @AppStorage(AppStorageKeys.phone.rawValue) var phone: String = "" - @AppStorage(AppStorageKeys.supportedCountries.rawValue) var supportedCountriesString: String = "" - - private let availableLocales: [(name: String, isoCode: String)] = [ - ("English", "en"), - ("English (US)", "en-US"), - ("French", "fr-FR") - ] - - private var selectedCountries: Set { - Set(supportedCountriesString.split(separator: ",").map { String($0) }.filter { !$0.isEmpty }) - } - - private func isCountrySelected(_ code: String) -> Bool { - selectedCountries.contains(code) - } - - var body: some View { - Form { - Text("These settings will apply to new checkouts and persist between app launches") - .font(.subheadline) - - Section("Logging") { - Picker( - "Log Level", - // Binding used instead of $logLevel due to property observers (didSet) - // are not called on published values such as @AppStorage - selection: Binding( - get: { logLevel }, - set: { logLevel = $0 } - ) - ) { - ForEach(LogLevel.allCases, id: \.self) { level in - Text( - level.rawValue.capitalized(with: Locale.current) - ).tag(level) - } - } - .pickerStyle(.menu) - - Text("Controls the level of logging for Accelerated Checkouts operations") - .font(.caption) - .foregroundColor(.secondary) - } - - Section("Language") { - Picker("Language", selection: $locale) { - ForEach(availableLocales, id: \.isoCode) { localeOption in - Text(localeOption.name) - .tag(localeOption.isoCode) - } - } - .pickerStyle(.menu) - - Text("Configures localization for fallback if ApplePay not supported") - .font(.caption) - .foregroundColor(.secondary) - } - - Section("Apple Pay Contact Fields") { - Text("At least one contact field should be present to complete a checkout with Apple Pay. If email or phone is toggled off, you may supply a hardcoded value instead.") - .font(.caption) - .foregroundColor(.secondary) - - Toggle("Require Email from Apple Pay", isOn: $requireEmail) - - TextField("Prefill Email (Optional)", text: $email) - .textContentType(.emailAddress) - .keyboardType(.emailAddress) - .autocapitalization(.none) - .accessibilityLabel("Email field") - - Text("Email will be attached to the buyerIdentity during cartCreate.") - .font(.caption) - .foregroundColor(.secondary) - - Toggle("Require Phone from Apple Pay", isOn: $requirePhone) - - TextField("Prefill Phone (Optional)", text: $phone) - .textContentType(.telephoneNumber) - .keyboardType(.phonePad) - - Text("Phone Number will be attached to the buyerIdentity during cartCreate.") - .font(.caption) - .foregroundColor(.secondary) - } - - Section("Apple Pay Shipping Countries") { - Text("Select countries where Apple Pay shipping is supported. Leave empty to allow all countries.") - .font(.caption) - .foregroundColor(.secondary) - - if !selectedCountries.isEmpty { - Text("Selected: \(selectedCountries.joined(separator: ", "))") - .font(.caption) - .foregroundColor(.blue) - } - - NavigationLink("Select Countries (\(selectedCountries.count) selected)") { - CountrySelectionView( - supportedCountriesString: $supportedCountriesString - ) - } - } - } - .navigationTitle("Settings") - .navigationBarTitleDisplayMode(.inline) - } -} - -struct CountrySelectionView: View { - @Binding var supportedCountriesString: String - @State private var searchText = "" - - private var selectedCountries: Set { - Set(supportedCountriesString.split(separator: ",").map { String($0) }.filter { !$0.isEmpty }) - } - - private func toggleCountry(_ code: String) { - var countries = selectedCountries - if countries.contains(code) { - countries.remove(code) - } else { - countries.insert(code) - } - supportedCountriesString = countries.joined(separator: ",") - } - - /// Dynamically generate all country codes with their display names - private static let allCountries: [(code: String, name: String)] = { - let locale = Locale(identifier: "en_US") - - return NSLocale.isoCountryCodes.compactMap { code in - locale.localizedString(forRegionCode: code).map { (code: code, name: $0) } - }.sorted { $0.name < $1.name } - }() - - private var filteredCountries: [(code: String, name: String)] { - if searchText.isEmpty { - return Self.allCountries - } else { - return Self.allCountries.filter { country in - country.name.localizedCaseInsensitiveContains(searchText) || - country.code.localizedCaseInsensitiveContains(searchText) - } - } - } - - var body: some View { - List { - Section { - if selectedCountries.isEmpty { - Text("No countries selected - All countries allowed") - .foregroundColor(.secondary) - .italic() - } else { - Button("Clear All") { - supportedCountriesString = "" - } - .foregroundColor(.red) - } - } - - Section("Countries") { - ForEach(filteredCountries, id: \.code) { country in - HStack { - Text("\(country.name) (\(country.code))") - Spacer() - if selectedCountries.contains(country.code) { - Image(systemName: "checkmark") - .foregroundColor(.blue) - } - } - .contentShape(Rectangle()) - .onTapGesture { - toggleCountry(country.code) - } - } - } - } - .searchable(text: $searchText, prompt: "Search countries") - .navigationTitle("Select Countries") - .navigationBarTitleDisplayMode(.inline) - } -} diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/apollo-codegen-config.json b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/apollo-codegen-config.json deleted file mode 100644 index 34447043f..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/apollo-codegen-config.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "schemaNamespace" : "Storefront", - "input" : { - "operationSearchPaths" : [ - "**/*.graphql" - ], - "schemaSearchPaths" : [ - "**/*.graphqls" - ] - }, - "output" : { - "testMocks" : { - "none" : { - } - }, - "schemaTypes" : { - "path" : "./ShopifyAcceleratedCheckoutsApp/Generated", - "moduleType" : { - "embeddedInTarget" : { - "name" : "ShopifyAcceleratedCheckoutsApp" - } - } - }, - "operations" : { - "inSchemaModule" : { - } - } - } -} \ No newline at end of file diff --git a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/project.yml b/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/project.yml deleted file mode 100644 index 630775f6a..000000000 --- a/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/project.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: ShopifyAcceleratedCheckoutsApp -options: - minimumXcodeGenVersion: 2.45.0 - deploymentTarget: - iOS: "16.6" - xcodeVersion: "26.2" - projectFormat: xcode16_0 -packages: - ShopifyCheckoutKit: - path: ../../../.. - Apollo: - url: https://github.com/apollographql/apollo-ios.git - from: 2.0.0 -configs: - Debug: debug - Release: release -schemes: - ShopifyAcceleratedCheckoutsApp: - build: - targets: - ShopifyAcceleratedCheckoutsApp: all - run: - config: Debug - language: en - test: - config: Debug - profile: - config: Release - analyze: - config: Debug - archive: - config: Release - management: - shared: true - orderHint: 3 - -targets: - ShopifyAcceleratedCheckoutsApp: - type: application - platform: iOS - sources: - - path: ShopifyAcceleratedCheckoutsApp - type: syncedFolder - excludes: - - Info.plist - configFiles: - Debug: Storefront.xcconfig - Release: Storefront.xcconfig - settings: - base: - PRODUCT_BUNDLE_IDENTIFIER: com.shopify.example.ShopifyAcceleratedCheckoutsApp - DEVELOPMENT_TEAM: $(DEVELOPMENT_TEAM) - SWIFT_VERSION: "6.0" - TARGETED_DEVICE_FAMILY: "1,2" - MARKETING_VERSION: "1.0.1" - CURRENT_PROJECT_VERSION: "1" - ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME: AccentColor - ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS: YES - DEVELOPMENT_ASSET_PATHS: '"ShopifyAcceleratedCheckoutsApp/Preview Content"' - ENABLE_PREVIEWS: YES - INFOPLIST_KEY_CFBundleDisplayName: Accelerated Checkouts - INFOPLIST_KEY_UIApplicationSceneManifest_Generation: YES - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents: YES - INFOPLIST_KEY_UILaunchScreen_Generation: YES - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad: UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone: UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - LD_RUNPATH_SEARCH_PATHS: - - $(inherited) - - "@executable_path/Frameworks" - dependencies: - - package: Apollo - product: Apollo - - package: ShopifyCheckoutKit - product: ShopifyAcceleratedCheckouts - info: - path: ShopifyAcceleratedCheckoutsApp/Info.plist - properties: - STOREFRONT_ACCESS_TOKEN: $(STOREFRONT_ACCESS_TOKEN) - STOREFRONT_DOMAIN: $(STOREFRONT_DOMAIN) - API_VERSION: $(API_VERSION) - ITSAppUsesNonExemptEncryption: false - UILaunchScreen: {} - entitlements: - path: ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.entitlements - properties: {} diff --git a/platforms/swift/Scripts/apollo_codegen b/platforms/swift/Scripts/apollo_codegen index 9a3b3406f..17c86d93b 100755 --- a/platforms/swift/Scripts/apollo_codegen +++ b/platforms/swift/Scripts/apollo_codegen @@ -42,18 +42,11 @@ run_codegen() { APP="${1:-all}" case "$APP" in - accelerated) - run_codegen "Samples/ShopifyAcceleratedCheckoutsApp" "accelerated" - ;; - swift) - run_codegen "Samples/CheckoutKitSwiftDemo" "swift" - ;; - all) - run_codegen "Samples/ShopifyAcceleratedCheckoutsApp" "accelerated" + swift | all) run_codegen "Samples/CheckoutKitSwiftDemo" "swift" ;; *) - echo "❌ Unknown app: $APP. Use 'accelerated', 'swift', or 'all'" + echo "❌ Unknown app: $APP. Use 'swift' or 'all'" exit 1 ;; esac diff --git a/platforms/swift/Scripts/apollo_download_schema b/platforms/swift/Scripts/apollo_download_schema index 9bee168d9..9392bbf68 100755 --- a/platforms/swift/Scripts/apollo_download_schema +++ b/platforms/swift/Scripts/apollo_download_schema @@ -13,7 +13,7 @@ download_schema() { echo "📡 Downloading schema for $name ($scheme)..." cd "$REPO_ROOT/$dir" - BUILD_SETTINGS=$(xcodebuild -showBuildSettings -workspace "$REPO_ROOT/Samples/Samples.xcworkspace" -scheme "$scheme" -disableAutomaticPackageResolution -json 2>/dev/null | jq -r '.[0].buildSettings') + BUILD_SETTINGS=$(xcodebuild -showBuildSettings -project "$REPO_ROOT/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo.xcodeproj" -scheme "$scheme" -disableAutomaticPackageResolution -json 2>/dev/null | jq -r '.[0].buildSettings') TOKEN=$(echo "$BUILD_SETTINGS" | jq -r '.STOREFRONT_ACCESS_TOKEN') DOMAIN=$(echo "$BUILD_SETTINGS" | jq -r '.STOREFRONT_DOMAIN') API_VERSION=$(echo "$BUILD_SETTINGS" | jq -r '.API_VERSION') @@ -49,18 +49,11 @@ download_schema() { APP="${1:-all}" case "$APP" in - accelerated) - download_schema "Samples/ShopifyAcceleratedCheckoutsApp" "ShopifyAcceleratedCheckoutsApp" "accelerated" - ;; - swift) - download_schema "Samples/CheckoutKitSwiftDemo" "CheckoutKitSwiftDemo" "swift" - ;; - all) - download_schema "Samples/ShopifyAcceleratedCheckoutsApp" "ShopifyAcceleratedCheckoutsApp" "accelerated" + swift | all) download_schema "Samples/CheckoutKitSwiftDemo" "CheckoutKitSwiftDemo" "swift" ;; *) - echo "❌ Unknown app: $APP. Use 'accelerated', 'swift', or 'all'" + echo "❌ Unknown app: $APP. Use 'swift' or 'all'" exit 1 ;; esac diff --git a/platforms/swift/Scripts/build_and_test_samples b/platforms/swift/Scripts/build_and_test_samples index a628f76c0..0a1105371 100755 --- a/platforms/swift/Scripts/build_and_test_samples +++ b/platforms/swift/Scripts/build_and_test_samples @@ -4,7 +4,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)" -SAMPLES_DIR="$SCRIPT_DIR/../Samples" +SAMPLE_DIR="$SCRIPT_DIR/../Samples/CheckoutKitSwiftDemo" if ! "$REPO_ROOT/scripts/setup_storefront_env" --check; then echo "Run dev up from the repo root to sync sample app storefront configuration." @@ -13,19 +13,11 @@ fi "$SCRIPT_DIR/generate_xcode_projects" -cd "$SAMPLES_DIR" - -run_app() { - local app="$1" - local action="$2" - - if [[ ! -f "$app/Storefront.xcconfig" ]]; then - echo "Missing Storefront.xcconfig for $app. Run dev up from the repo root." - exit 1 - fi +if [[ ! -f "$SAMPLE_DIR/Storefront.xcconfig" ]]; then + echo "Missing Storefront.xcconfig for CheckoutKitSwiftDemo. Run dev up from the repo root." + exit 1 +fi - "$SCRIPT_DIR/xcode_run" "$action" "$app" -} +cd "$SAMPLE_DIR" -run_app CheckoutKitSwiftDemo "build test" -run_app ShopifyAcceleratedCheckoutsApp "build" +"$SCRIPT_DIR/xcode_run" "build test" CheckoutKitSwiftDemo diff --git a/platforms/swift/Scripts/build_samples b/platforms/swift/Scripts/build_samples index ee3efee64..085da043a 100755 --- a/platforms/swift/Scripts/build_samples +++ b/platforms/swift/Scripts/build_samples @@ -4,7 +4,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)" -SAMPLES_DIR="$SCRIPT_DIR/../Samples" +SAMPLE_DIR="$SCRIPT_DIR/../Samples/CheckoutKitSwiftDemo" if ! "$REPO_ROOT/scripts/setup_storefront_env" --check; then echo "Run dev up from the repo root to sync sample app storefront configuration." @@ -13,16 +13,11 @@ fi "$SCRIPT_DIR/generate_xcode_projects" -cd "$SAMPLES_DIR" - -build_app() { - if [[ ! -f "$1/Storefront.xcconfig" ]]; then - echo "Missing Storefront.xcconfig for $1. Run dev up from the repo root." - exit 1 - fi +if [[ ! -f "$SAMPLE_DIR/Storefront.xcconfig" ]]; then + echo "Missing Storefront.xcconfig for CheckoutKitSwiftDemo. Run dev up from the repo root." + exit 1 +fi - "$SCRIPT_DIR/xcode_run" "clean build" "$1" -} +cd "$SAMPLE_DIR" -build_app CheckoutKitSwiftDemo -build_app ShopifyAcceleratedCheckoutsApp +"$SCRIPT_DIR/xcode_run" "clean build" CheckoutKitSwiftDemo diff --git a/platforms/swift/Scripts/generate_xcode_projects b/platforms/swift/Scripts/generate_xcode_projects index 39d98f627..376a2d342 100755 --- a/platforms/swift/Scripts/generate_xcode_projects +++ b/platforms/swift/Scripts/generate_xcode_projects @@ -5,6 +5,8 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SWIFT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" SWIFT_MINT="$SWIFT_DIR/../../scripts/swift_mint" +SAMPLE_PACKAGE_RESOLVED="Samples/CheckoutKitSwiftDemo/Package.resolved" +SAMPLE_GENERATED_PACKAGE_RESOLVED="Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved" mode="generate" selected_specs=() @@ -44,17 +46,14 @@ done xcodegen_specs=( "Samples/CheckoutKitSwiftDemo/project.yml" - "Samples/ShopifyAcceleratedCheckoutsApp/project.yml" "../react-native/test/rct-integration-app/project.yml" ) required_outputs=( "Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo.xcodeproj/project.pbxproj" + "$SAMPLE_GENERATED_PACKAGE_RESOLVED" "Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/Info.plist" "Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo.entitlements" - "Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.xcodeproj/project.pbxproj" - "Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/Info.plist" - "Samples/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp/ShopifyAcceleratedCheckoutsApp.entitlements" "../react-native/test/rct-integration-app/RCTIntegrationApp.xcodeproj/project.pbxproj" "../react-native/test/rct-integration-app/RCTIntegrationApp/Info.plist" "../react-native/test/rct-integration-app/RCTIntegrationAppTests/Info.plist" @@ -78,11 +77,26 @@ check_generated_outputs() { fi done + if [[ -f "$SWIFT_DIR/$SAMPLE_GENERATED_PACKAGE_RESOLVED" ]] && + ! cmp -s "$SWIFT_DIR/$SAMPLE_PACKAGE_RESOLVED" "$SWIFT_DIR/$SAMPLE_GENERATED_PACKAGE_RESOLVED" + then + echo "Generated sample Package.resolved is out of date. Regenerate the Xcode project." >&2 + missing=1 + fi + if [[ "$missing" -ne 0 ]]; then exit 1 fi } +sync_sample_package_resolution() { + local source="$SWIFT_DIR/$SAMPLE_PACKAGE_RESOLVED" + local destination="$SWIFT_DIR/$SAMPLE_GENERATED_PACKAGE_RESOLVED" + + mkdir -p "$(dirname "$destination")" + cp "$source" "$destination" +} + generate_projects() { local spec local specs=("${xcodegen_specs[@]}") @@ -96,6 +110,10 @@ generate_projects() { for spec in "${specs[@]}"; do (cd "$SWIFT_DIR" && "$SWIFT_MINT" run xcodegen xcodegen generate --spec "$spec" --quiet) done + + if [[ -d "$SWIFT_DIR/Samples/CheckoutKitSwiftDemo/CheckoutKitSwiftDemo.xcodeproj" ]]; then + sync_sample_package_resolution + fi } if [[ "$mode" == "check" ]]; then diff --git a/platforms/swift/Scripts/test_samples b/platforms/swift/Scripts/test_samples index 8ad917cff..6c4593689 100755 --- a/platforms/swift/Scripts/test_samples +++ b/platforms/swift/Scripts/test_samples @@ -4,7 +4,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)" -SAMPLES_DIR="$SCRIPT_DIR/../Samples" +SAMPLE_DIR="$SCRIPT_DIR/../Samples/CheckoutKitSwiftDemo" TEST_FILTER="${1:-}" if ! "$REPO_ROOT/scripts/setup_storefront_env" --check; then @@ -14,7 +14,7 @@ fi "$SCRIPT_DIR/generate_xcode_projects" -if [[ ! -f "$SAMPLES_DIR/CheckoutKitSwiftDemo/Storefront.xcconfig" ]]; then +if [[ ! -f "$SAMPLE_DIR/Storefront.xcconfig" ]]; then echo "Missing Storefront.xcconfig for CheckoutKitSwiftDemo. Run dev up from the repo root." exit 1 fi @@ -23,6 +23,6 @@ if [[ -n "$TEST_FILTER" && "$TEST_FILTER" != */* ]]; then TEST_FILTER="CheckoutKitSwiftDemoTests/$TEST_FILTER" fi -cd "$SAMPLES_DIR" +cd "$SAMPLE_DIR" "$SCRIPT_DIR/xcode_run" test CheckoutKitSwiftDemo "$TEST_FILTER" diff --git a/scripts/setup_storefront_env b/scripts/setup_storefront_env index c94396cc1..ee429b270 100755 --- a/scripts/setup_storefront_env +++ b/scripts/setup_storefront_env @@ -6,7 +6,6 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" ANDROID_ENV="${ROOT_DIR}/platforms/android/samples/CheckoutKitAndroidDemo/.env" SWIFT_DEMO_XCCONFIG="${ROOT_DIR}/platforms/swift/Samples/CheckoutKitSwiftDemo/Storefront.xcconfig" -SWIFT_ACCELERATED_XCCONFIG="${ROOT_DIR}/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/Storefront.xcconfig" REACT_NATIVE_ENV="${ROOT_DIR}/platforms/react-native/sample/.env" REACT_NATIVE_XCCONFIG="${ROOT_DIR}/platforms/react-native/sample/ios/Storefront.xcconfig" @@ -96,7 +95,7 @@ strip_outer_quotes() { # an E2E run is the demo store. --ignore-generated drops them as a source. is_generated_file() { case "$1" in - "$ANDROID_ENV" | "$REACT_NATIVE_ENV" | "$REACT_NATIVE_XCCONFIG" | "$SWIFT_DEMO_XCCONFIG" | "$SWIFT_ACCELERATED_XCCONFIG") + "$ANDROID_ENV" | "$REACT_NATIVE_ENV" | "$REACT_NATIVE_XCCONFIG" | "$SWIFT_DEMO_XCCONFIG") return 0 ;; esac @@ -391,16 +390,14 @@ load_values() { "$(required_config_value STOREFRONT_DOMAIN)" \ "$(read_env_value STOREFRONT_DOMAIN "$ANDROID_ENV")" \ "$(read_env_value STOREFRONT_DOMAIN "$REACT_NATIVE_ENV")" \ - "$(read_env_value STOREFRONT_DOMAIN "$SWIFT_DEMO_XCCONFIG")" \ - "$(read_env_value STOREFRONT_DOMAIN "$SWIFT_ACCELERATED_XCCONFIG")")" + "$(read_env_value STOREFRONT_DOMAIN "$SWIFT_DEMO_XCCONFIG")")" STOREFRONT_DOMAIN_VALUE="$(normalize_storefront_domain "$STOREFRONT_DOMAIN_VALUE")" STOREFRONT_ACCESS_TOKEN_VALUE="$(first_config_value \ "$(required_config_value STOREFRONT_ACCESS_TOKEN)" \ "$(read_env_value STOREFRONT_ACCESS_TOKEN "$ANDROID_ENV")" \ "$(read_env_value STOREFRONT_ACCESS_TOKEN "$REACT_NATIVE_ENV")" \ - "$(read_env_value STOREFRONT_ACCESS_TOKEN "$SWIFT_DEMO_XCCONFIG")" \ - "$(read_env_value STOREFRONT_ACCESS_TOKEN "$SWIFT_ACCELERATED_XCCONFIG")")" + "$(read_env_value STOREFRONT_ACCESS_TOKEN "$SWIFT_DEMO_XCCONFIG")")" API_VERSION_VALUE="$(first_config_value \ "$(read_root_value API_VERSION)" \ @@ -411,7 +408,6 @@ load_values() { "$(read_env_value API_VERSION "$REACT_NATIVE_ENV")" \ "$(read_env_value STOREFRONT_VERSION "$REACT_NATIVE_ENV")" \ "$(read_env_value API_VERSION "$SWIFT_DEMO_XCCONFIG")" \ - "$(read_env_value API_VERSION "$SWIFT_ACCELERATED_XCCONFIG")" \ "$DEFAULT_API_VERSION")" REACT_NATIVE_APPLE_PAY_MERCHANT_IDENTIFIER_VALUE="$(root_or_source_value REACT_NATIVE_APPLE_PAY_MERCHANT_IDENTIFIER \ @@ -446,7 +442,6 @@ load_values() { "$(derive_customer_account_api_version)" \ "$(read_env_value CUSTOMER_ACCOUNT_API_VERSION "$REACT_NATIVE_ENV")" \ "$(read_env_value CUSTOMER_ACCOUNT_API_VERSION "$SWIFT_DEMO_XCCONFIG")" \ - "$(read_env_value CUSTOMER_ACCOUNT_API_VERSION "$SWIFT_ACCELERATED_XCCONFIG")" \ "$DEFAULT_CUSTOMER_ACCOUNT_API_VERSION")" EMAIL_VALUE="$(root_or_source_value EMAIL "$(env_fallback EMAIL)" "$(read_env_value EMAIL "$ANDROID_ENV")" "$(read_env_value PREFILL_EMAIL "$ANDROID_ENV")" "$(read_env_value EMAIL "$REACT_NATIVE_ENV")" "$(read_env_value EMAIL "$SWIFT_DEMO_XCCONFIG")" "checkout-kit@example.com")" @@ -604,18 +599,9 @@ EOF write_xcconfig_assignment PHONE "$PHONE_VALUE" } -generate_swift_accelerated_xcconfig() { - generate_xcconfig_header - write_xcconfig_assignment DEVELOPMENT_TEAM "$DEVELOPMENT_TEAM_VALUE" - write_xcconfig_assignment STOREFRONT_DOMAIN "$STOREFRONT_DOMAIN_VALUE" - write_xcconfig_assignment STOREFRONT_ACCESS_TOKEN "$STOREFRONT_ACCESS_TOKEN_VALUE" - write_xcconfig_assignment API_VERSION "$API_VERSION_VALUE" -} - write_generated_files() { generate_android_env >"$ANDROID_ENV" generate_swift_demo_xcconfig >"$SWIFT_DEMO_XCCONFIG" - generate_swift_accelerated_xcconfig >"$SWIFT_ACCELERATED_XCCONFIG" generate_react_native_env >"$REACT_NATIVE_ENV" generate_react_native_xcconfig >"$REACT_NATIVE_XCCONFIG" @@ -645,7 +631,6 @@ check_generated_files() { check_generated_file "$ANDROID_ENV" generate_android_env || failed="true" check_generated_file "$SWIFT_DEMO_XCCONFIG" generate_swift_demo_xcconfig || failed="true" - check_generated_file "$SWIFT_ACCELERATED_XCCONFIG" generate_swift_accelerated_xcconfig || failed="true" check_generated_file "$REACT_NATIVE_ENV" generate_react_native_env || failed="true" check_generated_file "$REACT_NATIVE_XCCONFIG" generate_react_native_xcconfig || failed="true" diff --git a/scripts/test_setup_storefront_env b/scripts/test_setup_storefront_env index 0a42bf293..833dcdbd5 100755 --- a/scripts/test_setup_storefront_env +++ b/scripts/test_setup_storefront_env @@ -43,8 +43,7 @@ make_fixture() { "$fixture/scripts" \ "$fixture/platforms/android/samples/CheckoutKitAndroidDemo" \ "$fixture/platforms/react-native/sample/ios" \ - "$fixture/platforms/swift/Samples/CheckoutKitSwiftDemo" \ - "$fixture/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp" + "$fixture/platforms/swift/Samples/CheckoutKitSwiftDemo" cp "$REPO_ROOT/scripts/setup_storefront_env" "$fixture/scripts/setup_storefront_env" chmod +x "$fixture/scripts/setup_storefront_env" @@ -68,10 +67,6 @@ swift_demo_xcconfig_of() { printf '%s\n' "$1/platforms/swift/Samples/CheckoutKitSwiftDemo/Storefront.xcconfig" } -swift_accelerated_xcconfig_of() { - printf '%s\n' "$1/platforms/swift/Samples/ShopifyAcceleratedCheckoutsApp/Storefront.xcconfig" -} - assert_file_exists() { [[ -f "$1" ]] || fail "expected generated file is missing: $1" } @@ -232,13 +227,9 @@ test_sync_and_check() { assert_file_exists "$(react_native_env_of "$fixture")" assert_file_exists "$(react_native_xcconfig_of "$fixture")" assert_file_exists "$(swift_demo_xcconfig_of "$fixture")" - assert_file_exists "$(swift_accelerated_xcconfig_of "$fixture")" assert_not_contains "$(react_native_env_of "$fixture")" "CUSTOMER_ACCOUNT_API_VERSION" assert_not_contains "$(swift_demo_xcconfig_of "$fixture")" "CUSTOMER_ACCOUNT_API_VERSION" - assert_not_contains "$(swift_accelerated_xcconfig_of "$fixture")" "CUSTOMER_ACCOUNT_API_VERSION" - assert_not_contains "$(swift_accelerated_xcconfig_of "$fixture")" "CUSTOMER_ACCOUNT_API_CLIENT_ID" - assert_not_contains "$(swift_accelerated_xcconfig_of "$fixture")" "EMAIL" "$fixture/scripts/setup_storefront_env" --check >"$output" 2>&1 assert_output_is_sanitized "$output" @@ -257,7 +248,6 @@ test_sync_and_check() { assert_contains "$(android_env_of "$fixture")" "API_VERSION=2026-01" assert_contains "$(react_native_env_of "$fixture")" "API_VERSION=\"2026-01\"" assert_contains "$(swift_demo_xcconfig_of "$fixture")" "API_VERSION = 2026-01" - assert_contains "$(swift_accelerated_xcconfig_of "$fixture")" "API_VERSION = 2026-01" printf '%s\n' "stale" >"$(android_env_of "$fixture")" if "$fixture/scripts/setup_storefront_env" --check >"$output" 2>&1; then @@ -431,34 +421,29 @@ test_blank_customer_account_api_version_defaults() { # .env.local has to win so a second Apple team can build the sample, and dropping that # override has to blank the xcconfig again rather than recover the team from it. test_development_team_follows_env_and_clears() { - local fixture output demo_xcconfig accelerated_xcconfig + local fixture output demo_xcconfig fixture="$(make_fixture)" output="$fixture/output.log" demo_xcconfig="$(swift_demo_xcconfig_of "$fixture")" - accelerated_xcconfig="$(swift_accelerated_xcconfig_of "$fixture")" write_canonical_root_env "$fixture/.env" synthetic-store.example.myshopify.com "$fixture/scripts/setup_storefront_env" >"$output" 2>&1 assert_output_is_sanitized "$output" assert_contains "$demo_xcconfig" "DEVELOPMENT_TEAM =" - assert_contains "$accelerated_xcconfig" "DEVELOPMENT_TEAM =" assert_not_contains "$demo_xcconfig" "DEVELOPMENT_TEAM = A7XGC83MZE" - assert_not_contains "$accelerated_xcconfig" "DEVELOPMENT_TEAM = A7XGC83MZE" printf 'DEVELOPMENT_TEAM=SYNTHETIC9\n' >"$fixture/.env.local" "$fixture/scripts/setup_storefront_env" >"$output" 2>&1 assert_output_is_sanitized "$output" assert_contains "$demo_xcconfig" "DEVELOPMENT_TEAM = SYNTHETIC9" - assert_contains "$accelerated_xcconfig" "DEVELOPMENT_TEAM = SYNTHETIC9" rm "$fixture/.env.local" "$fixture/scripts/setup_storefront_env" >"$output" 2>&1 assert_output_is_sanitized "$output" assert_not_contains "$demo_xcconfig" "SYNTHETIC9" - assert_not_contains "$accelerated_xcconfig" "SYNTHETIC9" } # Generated platform config is the last fallback, so a checkout that still has it @@ -604,7 +589,7 @@ EOF "STOREFRONT_DOMAIN=overridden-store.example.myshopify.com" } -test_legacy_merchant_identifier_configures_both_samples_without_rewriting_root_env() { +test_legacy_merchant_identifier_configures_apple_pay_samples_without_rewriting_root_env() { local fixture output root_before fixture="$(make_fixture)" output="$fixture/output.log" @@ -628,7 +613,6 @@ EOF assert_contains "$(swift_demo_xcconfig_of "$fixture")" \ "APPLE_PAY_MERCHANT_IDENTIFIER = synthetic-merchant" assert_not_contains "$(android_env_of "$fixture")" "synthetic-merchant" - assert_not_contains "$(swift_accelerated_xcconfig_of "$fixture")" "synthetic-merchant" } test_env_file_selects_an_alternate_source() { @@ -735,7 +719,7 @@ test_env_local_overrides_root_env test_blank_env_local_values_clear_customer_account_config test_env_local_warning_names_only_keys test_env_local_is_never_baked_into_root_env -test_legacy_merchant_identifier_configures_both_samples_without_rewriting_root_env +test_legacy_merchant_identifier_configures_apple_pay_samples_without_rewriting_root_env test_env_file_selects_an_alternate_source test_env_file_takes_its_own_local_overlay test_ignore_generated_excludes_generated_sources