diff --git a/Buy.xcodeproj/project.pbxproj b/Buy.xcodeproj/project.pbxproj index 8395fcf2..32c83bf4 100644 --- a/Buy.xcodeproj/project.pbxproj +++ b/Buy.xcodeproj/project.pbxproj @@ -186,6 +186,9 @@ 9AA416DB1EE095BB0060029B /* CommentEdge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA416D71EE095BB0060029B /* CommentEdge.swift */; }; 9AA7AC761EBB77660014D95D /* Graph.CacheItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA7AC751EBB77660014D95D /* Graph.CacheItem.swift */; }; 9AA7AC781EBB78160014D95D /* Graph.CacheItemTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA7AC771EBB78160014D95D /* Graph.CacheItemTests.swift */; }; + 9AA997EC2046EC480096734F /* ImageContentType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA997EB2046EC470096734F /* ImageContentType.swift */; }; + 9AA997ED2046EC480096734F /* ImageContentType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA997EB2046EC470096734F /* ImageContentType.swift */; }; + 9AA997EE2046EC480096734F /* ImageContentType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA997EB2046EC470096734F /* ImageContentType.swift */; }; 9AADF1C71EA63ED000D22740 /* MockPaymentMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AADF1C61EA63ED000D22740 /* MockPaymentMethod.swift */; }; 9AADF1C91EA63FB900D22740 /* MockPaymentToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AADF1C81EA63FB900D22740 /* MockPaymentToken.swift */; }; 9AADF1CB1EA640C000D22740 /* MockPayment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AADF1CA1EA640C000D22740 /* MockPayment.swift */; }; @@ -671,6 +674,7 @@ 9AA89E8C1E9BDC650075AC74 /* MockSessionDataTask.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockSessionDataTask.swift; sourceTree = ""; }; 9AA89E951E9D29B40075AC74 /* Graph.QueryError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Graph.QueryError.swift; sourceTree = ""; }; 9AA89E971E9D2BD80075AC74 /* Graph.RetryHandlerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Graph.RetryHandlerTests.swift; sourceTree = ""; }; + 9AA997EB2046EC470096734F /* ImageContentType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageContentType.swift; sourceTree = ""; }; 9AADF1C61EA63ED000D22740 /* MockPaymentMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockPaymentMethod.swift; sourceTree = ""; }; 9AADF1C81EA63FB900D22740 /* MockPaymentToken.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockPaymentToken.swift; sourceTree = ""; }; 9AADF1CA1EA640C000D22740 /* MockPayment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockPayment.swift; sourceTree = ""; }; @@ -825,6 +829,7 @@ 9A0C802E1EAA51C50020F187 /* Domain.swift */, 9A0C802F1EAA51C50020F187 /* Image.swift */, 9A0C80301EAA51C50020F187 /* ImageConnection.swift */, + 9AA997EB2046EC470096734F /* ImageContentType.swift */, 9A0C80311EAA51C50020F187 /* ImageEdge.swift */, 9A0C80321EAA51C50020F187 /* MailingAddress.swift */, 9A0C80331EAA51C50020F187 /* MailingAddressConnection.swift */, @@ -1565,6 +1570,7 @@ 9AC2EFB71F6818180037E0D7 /* CheckoutLineItemInput.swift in Sources */, 9AC2EFB81F6818180037E0D7 /* TokenizedPaymentInput.swift in Sources */, 9AC2EFB91F6818180037E0D7 /* CheckoutLineItem.swift in Sources */, + 9AA997ED2046EC480096734F /* ImageContentType.swift in Sources */, 9AC2EFBA1F6818180037E0D7 /* OrderDisplayFinancialStatus.swift in Sources */, 9AC2EFBB1F6818180037E0D7 /* ProductVariantEdge.swift in Sources */, 9AC2EFBC1F6818180037E0D7 /* AppliedGiftCard.swift in Sources */, @@ -1710,6 +1716,7 @@ 9A0C806C1EAA51C50020F187 /* CheckoutLineItemInput.swift in Sources */, 9A0C80B01EAA51C50020F187 /* TokenizedPaymentInput.swift in Sources */, 9A0C80691EAA51C50020F187 /* CheckoutLineItem.swift in Sources */, + 9AA997EC2046EC480096734F /* ImageContentType.swift in Sources */, 9A0C809A1EAA51C50020F187 /* OrderDisplayFinancialStatus.swift in Sources */, 9A0C80AA1EAA51C50020F187 /* ProductVariantEdge.swift in Sources */, 9A0C80581EAA51C50020F187 /* AppliedGiftCard.swift in Sources */, @@ -1855,6 +1862,7 @@ 9AF256311F6FEE50005BB0C9 /* CheckoutLineItemInput.swift in Sources */, 9AF256321F6FEE50005BB0C9 /* TokenizedPaymentInput.swift in Sources */, 9AF256331F6FEE50005BB0C9 /* CheckoutLineItem.swift in Sources */, + 9AA997EE2046EC480096734F /* ImageContentType.swift in Sources */, 9AF256341F6FEE50005BB0C9 /* OrderDisplayFinancialStatus.swift in Sources */, 9AF256351F6FEE50005BB0C9 /* ProductVariantEdge.swift in Sources */, 9AF256361F6FEE50005BB0C9 /* AppliedGiftCard.swift in Sources */, @@ -1922,11 +1930,11 @@ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 3.1.3; + CURRENT_PROJECT_VERSION = 3.1.4; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 3.1.3; + DYLIB_CURRENT_VERSION = 3.1.4; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Pay/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -1947,11 +1955,11 @@ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 3.1.3; + CURRENT_PROJECT_VERSION = 3.1.4; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 3.1.3; + DYLIB_CURRENT_VERSION = 3.1.4; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Pay/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -2000,11 +2008,11 @@ CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 3.1.3; + CURRENT_PROJECT_VERSION = 3.1.4; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 3.1.3; + DYLIB_CURRENT_VERSION = 3.1.4; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Buy/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -2027,11 +2035,11 @@ CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 3.1.3; + CURRENT_PROJECT_VERSION = 3.1.4; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 3.1.3; + DYLIB_CURRENT_VERSION = 3.1.4; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Buy/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -2162,11 +2170,11 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 3.1.3; + CURRENT_PROJECT_VERSION = 3.1.4; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 3.1.3; + DYLIB_CURRENT_VERSION = 3.1.4; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Buy/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -2184,11 +2192,11 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_IDENTITY = ""; - CURRENT_PROJECT_VERSION = 3.1.3; + CURRENT_PROJECT_VERSION = 3.1.4; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 3.1.3; + DYLIB_CURRENT_VERSION = 3.1.4; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Buy/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -2207,11 +2215,11 @@ CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 3.1.3; + CURRENT_PROJECT_VERSION = 3.1.4; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 3.1.3; + DYLIB_CURRENT_VERSION = 3.1.4; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Buy/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -2236,11 +2244,11 @@ CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 3.1.3; + CURRENT_PROJECT_VERSION = 3.1.4; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 3.1.3; + DYLIB_CURRENT_VERSION = 3.1.4; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Buy/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; diff --git a/Buy/Generated/Storefront/Article.swift b/Buy/Generated/Storefront/Article.swift index 7fb61d6f..7a4a5786 100644 --- a/Buy/Generated/Storefront/Article.swift +++ b/Buy/Generated/Storefront/Article.swift @@ -53,11 +53,11 @@ extension Storefront { /// List of comments posted on the article. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. /// @discardableResult open func comments(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (CommentConnectionQuery) -> Void) -> ArticleQuery { @@ -154,10 +154,10 @@ extension Storefront { /// The image associated with the article. /// /// - parameters: - /// - maxWidth: Image width in pixels between 1 and 2048 - /// - maxHeight: Image height in pixels between 1 and 2048 - /// - crop: If specified, crop the image keeping the specified region - /// - scale: Image size multiplier retina displays. Must be between 1 and 3 + /// - maxWidth: Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. + /// - maxHeight: Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. + /// - crop: Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. + /// - scale: Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. /// @discardableResult open func image(alias: String? = nil, maxWidth: Int32? = nil, maxHeight: Int32? = nil, crop: CropRegion? = nil, scale: Int32? = nil, _ subfields: (ImageQuery) -> Void) -> ArticleQuery { diff --git a/Buy/Generated/Storefront/ArticleSortKeys.swift b/Buy/Generated/Storefront/ArticleSortKeys.swift index 6c4b0d57..b8f857ef 100644 --- a/Buy/Generated/Storefront/ArticleSortKeys.swift +++ b/Buy/Generated/Storefront/ArticleSortKeys.swift @@ -35,6 +35,10 @@ extension Storefront { case id = "ID" + /// During a search (i.e. when the `query` parameter has been specified on the + /// connection) this sorts the results by relevance to the search term(s). When + /// no search query is specified, this sort key is not deterministic and should + /// not be used. case relevance = "RELEVANCE" case title = "TITLE" diff --git a/Buy/Generated/Storefront/Blog.swift b/Buy/Generated/Storefront/Blog.swift index 88aa7ae7..8b6132c2 100644 --- a/Buy/Generated/Storefront/Blog.swift +++ b/Buy/Generated/Storefront/Blog.swift @@ -33,11 +33,11 @@ extension Storefront { /// List of the blog's articles. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. /// @discardableResult open func articles(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (ArticleConnectionQuery) -> Void) -> BlogQuery { diff --git a/Buy/Generated/Storefront/BlogSortKeys.swift b/Buy/Generated/Storefront/BlogSortKeys.swift index 2e6b9919..6d31592a 100644 --- a/Buy/Generated/Storefront/BlogSortKeys.swift +++ b/Buy/Generated/Storefront/BlogSortKeys.swift @@ -33,6 +33,10 @@ extension Storefront { case id = "ID" + /// During a search (i.e. when the `query` parameter has been specified on the + /// connection) this sorts the results by relevance to the search term(s). When + /// no search query is specified, this sort key is not deterministic and should + /// not be used. case relevance = "RELEVANCE" case title = "TITLE" diff --git a/Buy/Generated/Storefront/Checkout.swift b/Buy/Generated/Storefront/Checkout.swift index d7f3932c..f4a66d03 100644 --- a/Buy/Generated/Storefront/Checkout.swift +++ b/Buy/Generated/Storefront/Checkout.swift @@ -110,11 +110,11 @@ extension Storefront { /// in the checkout. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. /// @discardableResult open func lineItems(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (CheckoutLineItemConnectionQuery) -> Void) -> CheckoutQuery { diff --git a/Buy/Generated/Storefront/CheckoutAttributesUpdateInput.swift b/Buy/Generated/Storefront/CheckoutAttributesUpdateInput.swift index fec93a93..bdb201fc 100644 --- a/Buy/Generated/Storefront/CheckoutAttributesUpdateInput.swift +++ b/Buy/Generated/Storefront/CheckoutAttributesUpdateInput.swift @@ -45,7 +45,7 @@ extension Storefront { /// - parameters: /// - note: The text of an optional note that a shop owner can attach to the checkout. /// - customAttributes: A list of extra information that is added to the checkout. - /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of the addresses is still done at complete time. + /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of the addresses is still done at complete time. /// public static func create(note: Input = .undefined, customAttributes: Input<[AttributeInput]> = .undefined, allowPartialAddresses: Input = .undefined) -> CheckoutAttributesUpdateInput { return CheckoutAttributesUpdateInput(note: note, customAttributes: customAttributes, allowPartialAddresses: allowPartialAddresses) @@ -62,7 +62,7 @@ extension Storefront { /// - parameters: /// - note: The text of an optional note that a shop owner can attach to the checkout. /// - customAttributes: A list of extra information that is added to the checkout. - /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of the addresses is still done at complete time. + /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of the addresses is still done at complete time. /// @available(*, deprecated, message: "Use the static create() method instead.") public convenience init(note: String? = nil, customAttributes: [AttributeInput]? = nil, allowPartialAddresses: Bool? = nil) { diff --git a/Buy/Generated/Storefront/CheckoutCreateInput.swift b/Buy/Generated/Storefront/CheckoutCreateInput.swift index 2f88b5e0..737b094f 100644 --- a/Buy/Generated/Storefront/CheckoutCreateInput.swift +++ b/Buy/Generated/Storefront/CheckoutCreateInput.swift @@ -58,7 +58,7 @@ extension Storefront { /// - shippingAddress: The shipping address to where the line items will be shipped. /// - note: The text of an optional note that a shop owner can attach to the checkout. /// - customAttributes: A list of extra information that is added to the checkout. - /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of addresses is still done at complete time. + /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of addresses is still done at complete time. /// public static func create(email: Input = .undefined, lineItems: Input<[CheckoutLineItemInput]> = .undefined, shippingAddress: Input = .undefined, note: Input = .undefined, customAttributes: Input<[AttributeInput]> = .undefined, allowPartialAddresses: Input = .undefined) -> CheckoutCreateInput { return CheckoutCreateInput(email: email, lineItems: lineItems, shippingAddress: shippingAddress, note: note, customAttributes: customAttributes, allowPartialAddresses: allowPartialAddresses) @@ -81,7 +81,7 @@ extension Storefront { /// - shippingAddress: The shipping address to where the line items will be shipped. /// - note: The text of an optional note that a shop owner can attach to the checkout. /// - customAttributes: A list of extra information that is added to the checkout. - /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of addresses is still done at complete time. + /// - allowPartialAddresses: Allows setting partial addresses on a Checkout, skipping the full validation of attributes. The required attributes are city, province, and country. Full validation of addresses is still done at complete time. /// @available(*, deprecated, message: "Use the static create() method instead.") public convenience init(email: String? = nil, lineItems: [CheckoutLineItemInput]? = nil, shippingAddress: MailingAddressInput? = nil, note: String? = nil, customAttributes: [AttributeInput]? = nil, allowPartialAddresses: Bool? = nil) { diff --git a/Buy/Generated/Storefront/Collection.swift b/Buy/Generated/Storefront/Collection.swift index b87433a4..d217d377 100644 --- a/Buy/Generated/Storefront/Collection.swift +++ b/Buy/Generated/Storefront/Collection.swift @@ -76,10 +76,10 @@ extension Storefront { /// Image associated with the collection. /// /// - parameters: - /// - maxWidth: Image width in pixels between 1 and 2048 - /// - maxHeight: Image height in pixels between 1 and 2048 - /// - crop: If specified, crop the image keeping the specified region - /// - scale: Image size multiplier retina displays. Must be between 1 and 3 + /// - maxWidth: Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. + /// - maxHeight: Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. + /// - crop: Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. + /// - scale: Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. /// @discardableResult open func image(alias: String? = nil, maxWidth: Int32? = nil, maxHeight: Int32? = nil, crop: CropRegion? = nil, scale: Int32? = nil, _ subfields: (ImageQuery) -> Void) -> CollectionQuery { @@ -113,12 +113,12 @@ extension Storefront { /// List of products in the collection. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description - /// - sortKey: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. + /// - sortKey: Sort the underlying list by the given key. /// @discardableResult open func products(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, sortKey: ProductCollectionSortKeys? = nil, _ subfields: (ProductConnectionQuery) -> Void) -> CollectionQuery { diff --git a/Buy/Generated/Storefront/CollectionSortKeys.swift b/Buy/Generated/Storefront/CollectionSortKeys.swift index 66d6c2b2..002b937f 100644 --- a/Buy/Generated/Storefront/CollectionSortKeys.swift +++ b/Buy/Generated/Storefront/CollectionSortKeys.swift @@ -31,6 +31,10 @@ extension Storefront { public enum CollectionSortKeys: String { case id = "ID" + /// During a search (i.e. when the `query` parameter has been specified on the + /// connection) this sorts the results by relevance to the search term(s). When + /// no search query is specified, this sort key is not deterministic and should + /// not be used. case relevance = "RELEVANCE" case title = "TITLE" diff --git a/Buy/Generated/Storefront/Customer.swift b/Buy/Generated/Storefront/Customer.swift index 990c4b42..161e71d1 100644 --- a/Buy/Generated/Storefront/Customer.swift +++ b/Buy/Generated/Storefront/Customer.swift @@ -44,11 +44,11 @@ extension Storefront { /// A list of addresses for the customer. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. /// @discardableResult open func addresses(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (MailingAddressConnectionQuery) -> Void) -> CustomerQuery { @@ -138,12 +138,12 @@ extension Storefront { /// The orders associated with the customer. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description - /// - sortKey: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. + /// - sortKey: Sort the underlying list by the given key. /// - query: Supported filter parameters: /// - `processed_at` /// diff --git a/Buy/Generated/Storefront/CustomerUpdatePayload.swift b/Buy/Generated/Storefront/CustomerUpdatePayload.swift index 5822b3ba..05e0af68 100644 --- a/Buy/Generated/Storefront/CustomerUpdatePayload.swift +++ b/Buy/Generated/Storefront/CustomerUpdatePayload.swift @@ -40,6 +40,18 @@ extension Storefront { return self } + /// The newly created customer access token. If the customer's password is + /// updated, all previous access tokens (including the one used to perform this + /// mutation) become invalid, and a new token is generated. + @discardableResult + open func customerAccessToken(alias: String? = nil, _ subfields: (CustomerAccessTokenQuery) -> Void) -> CustomerUpdatePayloadQuery { + let subquery = CustomerAccessTokenQuery() + subfields(subquery) + + addField(field: "customerAccessToken", aliasSuffix: alias, subfields: subquery) + return self + } + /// List of errors that occurred executing the mutation. @discardableResult open func userErrors(alias: String? = nil, _ subfields: (UserErrorQuery) -> Void) -> CustomerUpdatePayloadQuery { @@ -64,6 +76,13 @@ extension Storefront { } return try Customer(fields: value) + case "customerAccessToken": + if value is NSNull { return nil } + guard let value = value as? [String: Any] else { + throw SchemaViolationError(type: CustomerUpdatePayload.self, field: fieldName, value: fieldValue) + } + return try CustomerAccessToken(fields: value) + case "userErrors": guard let value = value as? [[String: Any]] else { throw SchemaViolationError(type: CustomerUpdatePayload.self, field: fieldName, value: fieldValue) @@ -84,6 +103,17 @@ extension Storefront { return field(field: "customer", aliasSuffix: alias) as! Storefront.Customer? } + /// The newly created customer access token. If the customer's password is + /// updated, all previous access tokens (including the one used to perform this + /// mutation) become invalid, and a new token is generated. + open var customerAccessToken: Storefront.CustomerAccessToken? { + return internalGetCustomerAccessToken() + } + + func internalGetCustomerAccessToken(alias: String? = nil) -> Storefront.CustomerAccessToken? { + return field(field: "customerAccessToken", aliasSuffix: alias) as! Storefront.CustomerAccessToken? + } + /// List of errors that occurred executing the mutation. open var userErrors: [Storefront.UserError] { return internalGetUserErrors() @@ -103,6 +133,12 @@ extension Storefront { response.append(contentsOf: value.childResponseObjectMap()) } + case "customerAccessToken": + if let value = internalGetCustomerAccessToken() { + response.append(value) + response.append(contentsOf: value.childResponseObjectMap()) + } + case "userErrors": internalGetUserErrors().forEach { response.append($0) diff --git a/Buy/Generated/Storefront/Image.swift b/Buy/Generated/Storefront/Image.swift index 419b2c82..96fa35ea 100644 --- a/Buy/Generated/Storefront/Image.swift +++ b/Buy/Generated/Storefront/Image.swift @@ -45,12 +45,62 @@ extension Storefront { return self } + /// The location of the original (untransformed) image as a URL. + @discardableResult + open func originalSrc(alias: String? = nil) -> ImageQuery { + addField(field: "originalSrc", aliasSuffix: alias) + return self + } + /// The location of the image as a URL. + @available(*, deprecated, message:"Previously an image had a single `src` field. This could either return the original image\nlocation or a URL that contained transformations such as sizing or scale.\n\nThese transformations were specified by arguments on the parent field.\n\nNow an image has two distinct URL fields: `originalSrc` and `transformedSrc`.\n\n* `originalSrc` - the original, untransformed image URL\n* `transformedSrc` - the image URL with transformations included\n\nTo migrate to the new fields, image transformations should be moved from the parent field to `transformedSrc`.\n\nBefore:\n```graphql\n{\n shop {\n productImages(maxWidth: 200, scale: 2) {\n edges {\n node {\n src\n }\n }\n }\n }\n}\n```\n\nAfter:\n```graphql\n{\n shop {\n productImages {\n edges {\n node {\n transformedSrc(maxWidth: 200, scale: 2)\n }\n }\n }\n }\n}\n```\n") @discardableResult open func src(alias: String? = nil) -> ImageQuery { addField(field: "src", aliasSuffix: alias) return self } + + /// The location of the transformed image as a URL. All transformation + /// arguments are considered "best-effort". If they can be applied to an image, + /// they will be. Otherwise any transformations which an image type does not + /// support will be ignored. + /// + /// - parameters: + /// - maxWidth: Image width in pixels between 1 and 5760. + /// - maxHeight: Image height in pixels between 1 and 5760. + /// - crop: Crops the image according to the specified region. + /// - scale: Image size multiplier for high-resolution retina displays. Must be between 1 and 3. + /// - preferredContentType: Best effort conversion of image into content type (SVG -> PNG, Anything -> JGP, Anything -> WEBP are supported). + /// + @discardableResult + open func transformedSrc(alias: String? = nil, maxWidth: Int32? = nil, maxHeight: Int32? = nil, crop: CropRegion? = nil, scale: Int32? = nil, preferredContentType: ImageContentType? = nil) -> ImageQuery { + var args: [String] = [] + + if let maxWidth = maxWidth { + args.append("maxWidth:\(maxWidth)") + } + + if let maxHeight = maxHeight { + args.append("maxHeight:\(maxHeight)") + } + + if let crop = crop { + args.append("crop:\(crop.rawValue)") + } + + if let scale = scale { + args.append("scale:\(scale)") + } + + if let preferredContentType = preferredContentType { + args.append("preferredContentType:\(preferredContentType.rawValue)") + } + + let argsString: String? = args.isEmpty ? nil : "(\(args.joined(separator: ",")))" + + addField(field: "transformedSrc", aliasSuffix: alias, args: argsString) + return self + } } /// Represents an image resource. @@ -74,12 +124,24 @@ extension Storefront { } return GraphQL.ID(rawValue: value) + case "originalSrc": + guard let value = value as? String else { + throw SchemaViolationError(type: Image.self, field: fieldName, value: fieldValue) + } + return URL(string: value)! + case "src": guard let value = value as? String else { throw SchemaViolationError(type: Image.self, field: fieldName, value: fieldValue) } return URL(string: value)! + case "transformedSrc": + guard let value = value as? String else { + throw SchemaViolationError(type: Image.self, field: fieldName, value: fieldValue) + } + return URL(string: value)! + default: throw SchemaViolationError(type: Image.self, field: fieldName, value: fieldValue) } @@ -103,7 +165,17 @@ extension Storefront { return field(field: "id", aliasSuffix: alias) as! GraphQL.ID? } + /// The location of the original (untransformed) image as a URL. + open var originalSrc: URL { + return internalGetOriginalSrc() + } + + func internalGetOriginalSrc(alias: String? = nil) -> URL { + return field(field: "originalSrc", aliasSuffix: alias) as! URL + } + /// The location of the image as a URL. + @available(*, deprecated, message:"Previously an image had a single `src` field. This could either return the original image\nlocation or a URL that contained transformations such as sizing or scale.\n\nThese transformations were specified by arguments on the parent field.\n\nNow an image has two distinct URL fields: `originalSrc` and `transformedSrc`.\n\n* `originalSrc` - the original, untransformed image URL\n* `transformedSrc` - the image URL with transformations included\n\nTo migrate to the new fields, image transformations should be moved from the parent field to `transformedSrc`.\n\nBefore:\n```graphql\n{\n shop {\n productImages(maxWidth: 200, scale: 2) {\n edges {\n node {\n src\n }\n }\n }\n }\n}\n```\n\nAfter:\n```graphql\n{\n shop {\n productImages {\n edges {\n node {\n transformedSrc(maxWidth: 200, scale: 2)\n }\n }\n }\n }\n}\n```\n") open var src: URL { return internalGetSrc() } @@ -112,6 +184,22 @@ extension Storefront { return field(field: "src", aliasSuffix: alias) as! URL } + /// The location of the transformed image as a URL. All transformation + /// arguments are considered "best-effort". If they can be applied to an image, + /// they will be. Otherwise any transformations which an image type does not + /// support will be ignored. + open var transformedSrc: URL { + return internalGetTransformedSrc() + } + + open func aliasedTransformedSrc(alias: String) -> URL { + return internalGetTransformedSrc(alias: alias) + } + + func internalGetTransformedSrc(alias: String? = nil) -> URL { + return field(field: "transformedSrc", aliasSuffix: alias) as! URL + } + internal override func childResponseObjectMap() -> [GraphQL.AbstractResponse] { return [] } diff --git a/Buy/Generated/Storefront/ImageContentType.swift b/Buy/Generated/Storefront/ImageContentType.swift new file mode 100644 index 00000000..eec125ba --- /dev/null +++ b/Buy/Generated/Storefront/ImageContentType.swift @@ -0,0 +1,40 @@ +// +// ImageContentType.swift +// Buy +// +// Created by Shopify. +// Copyright (c) 2017 Shopify Inc. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import Foundation + +extension Storefront { + /// List of supported image content types. + public enum ImageContentType: String { + case jpg = "JPG" + + case png = "PNG" + + case webp = "WEBP" + + case unknownValue = "" + } +} diff --git a/Buy/Generated/Storefront/Mutation.swift b/Buy/Generated/Storefront/Mutation.swift index 8d2323ae..c8f036a4 100644 --- a/Buy/Generated/Storefront/Mutation.swift +++ b/Buy/Generated/Storefront/Mutation.swift @@ -435,7 +435,9 @@ extension Storefront { return self } - /// Renews a customer access token. + /// Renews a customer access token. Access token renewal must happen *before* a + /// token expires. If a token has already expired, a new one should be created + /// instead via `customerAccessTokenCreate`. /// /// - parameters: /// - customerAccessToken: The access token used to identify the customer. @@ -1104,7 +1106,9 @@ extension Storefront { return field(field: "customerAccessTokenDelete", aliasSuffix: alias) as! Storefront.CustomerAccessTokenDeletePayload? } - /// Renews a customer access token. + /// Renews a customer access token. Access token renewal must happen *before* a + /// token expires. If a token has already expired, a new one should be created + /// instead via `customerAccessTokenCreate`. open var customerAccessTokenRenew: Storefront.CustomerAccessTokenRenewPayload? { return internalGetCustomerAccessTokenRenew() } diff --git a/Buy/Generated/Storefront/Order.swift b/Buy/Generated/Storefront/Order.swift index 799a1bac..3f3671d5 100644 --- a/Buy/Generated/Storefront/Order.swift +++ b/Buy/Generated/Storefront/Order.swift @@ -72,11 +72,11 @@ extension Storefront { /// List of the order’s line items. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. /// @discardableResult open func lineItems(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (OrderLineItemConnectionQuery) -> Void) -> OrderQuery { diff --git a/Buy/Generated/Storefront/OrderSortKeys.swift b/Buy/Generated/Storefront/OrderSortKeys.swift index 55bbb860..5151bbc5 100644 --- a/Buy/Generated/Storefront/OrderSortKeys.swift +++ b/Buy/Generated/Storefront/OrderSortKeys.swift @@ -33,6 +33,10 @@ extension Storefront { case processedAt = "PROCESSED_AT" + /// During a search (i.e. when the `query` parameter has been specified on the + /// connection) this sorts the results by relevance to the search term(s). When + /// no search query is specified, this sort key is not deterministic and should + /// not be used. case relevance = "RELEVANCE" case totalPrice = "TOTAL_PRICE" diff --git a/Buy/Generated/Storefront/Product.swift b/Buy/Generated/Storefront/Product.swift index 2ce67308..2d7e5d34 100644 --- a/Buy/Generated/Storefront/Product.swift +++ b/Buy/Generated/Storefront/Product.swift @@ -38,11 +38,11 @@ extension Storefront { /// List of collections a product belongs to. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. /// @discardableResult open func collections(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, _ subfields: (CollectionConnectionQuery) -> Void) -> ProductQuery { @@ -129,16 +129,16 @@ extension Storefront { /// List of images associated with the product. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description - /// - sortKey: No description - /// - maxWidth: Image width in pixels between 1 and 2048 - /// - maxHeight: Image height in pixels between 1 and 2048 - /// - crop: If specified, crop the image keeping the specified region - /// - scale: Image size multiplier retina displays. Must be between 1 and 3 + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. + /// - sortKey: Sort the underlying list by the given key. + /// - maxWidth: Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. + /// - maxHeight: Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. + /// - crop: Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. + /// - scale: Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. /// @discardableResult open func images(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, sortKey: ProductImageSortKeys? = nil, maxWidth: Int32? = nil, maxHeight: Int32? = nil, crop: CropRegion? = nil, scale: Int32? = nil, _ subfields: (ImageConnectionQuery) -> Void) -> ProductQuery { @@ -287,12 +287,12 @@ extension Storefront { /// List of the product’s variants. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description - /// - sortKey: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. + /// - sortKey: Sort the underlying list by the given key. /// @discardableResult open func variants(alias: String? = nil, first: Int32? = nil, after: String? = nil, last: Int32? = nil, before: String? = nil, reverse: Bool? = nil, sortKey: ProductVariantSortKeys? = nil, _ subfields: (ProductVariantConnectionQuery) -> Void) -> ProductQuery { diff --git a/Buy/Generated/Storefront/ProductCollectionSortKeys.swift b/Buy/Generated/Storefront/ProductCollectionSortKeys.swift index 2dbfe368..f6665bb6 100644 --- a/Buy/Generated/Storefront/ProductCollectionSortKeys.swift +++ b/Buy/Generated/Storefront/ProductCollectionSortKeys.swift @@ -41,6 +41,10 @@ extension Storefront { case price = "PRICE" + /// During a search (i.e. when the `query` parameter has been specified on the + /// connection) this sorts the results by relevance to the search term(s). When + /// no search query is specified, this sort key is not deterministic and should + /// not be used. case relevance = "RELEVANCE" case title = "TITLE" diff --git a/Buy/Generated/Storefront/ProductImageSortKeys.swift b/Buy/Generated/Storefront/ProductImageSortKeys.swift index da9a0706..64eb664b 100644 --- a/Buy/Generated/Storefront/ProductImageSortKeys.swift +++ b/Buy/Generated/Storefront/ProductImageSortKeys.swift @@ -35,6 +35,10 @@ extension Storefront { case position = "POSITION" + /// During a search (i.e. when the `query` parameter has been specified on the + /// connection) this sorts the results by relevance to the search term(s). When + /// no search query is specified, this sort key is not deterministic and should + /// not be used. case relevance = "RELEVANCE" case unknownValue = "" diff --git a/Buy/Generated/Storefront/ProductSortKeys.swift b/Buy/Generated/Storefront/ProductSortKeys.swift index 60d90010..9e88e7e1 100644 --- a/Buy/Generated/Storefront/ProductSortKeys.swift +++ b/Buy/Generated/Storefront/ProductSortKeys.swift @@ -35,6 +35,10 @@ extension Storefront { case productType = "PRODUCT_TYPE" + /// During a search (i.e. when the `query` parameter has been specified on the + /// connection) this sorts the results by relevance to the search term(s). When + /// no search query is specified, this sort key is not deterministic and should + /// not be used. case relevance = "RELEVANCE" case title = "TITLE" diff --git a/Buy/Generated/Storefront/ProductVariant.swift b/Buy/Generated/Storefront/ProductVariant.swift index 58a322db..8ed01138 100644 --- a/Buy/Generated/Storefront/ProductVariant.swift +++ b/Buy/Generated/Storefront/ProductVariant.swift @@ -65,10 +65,10 @@ extension Storefront { /// Image associated with the product variant. /// /// - parameters: - /// - maxWidth: Image width in pixels between 1 and 2048 - /// - maxHeight: Image height in pixels between 1 and 2048 - /// - crop: If specified, crop the image keeping the specified region - /// - scale: Image size multiplier retina displays. Must be between 1 and 3 + /// - maxWidth: Image width in pixels between 1 and 2048. This argument is deprecated: Use `maxWidth` on `Image.transformedSrc` instead. + /// - maxHeight: Image height in pixels between 1 and 2048. This argument is deprecated: Use `maxHeight` on `Image.transformedSrc` instead. + /// - crop: Crops the image according to the specified region. This argument is deprecated: Use `crop` on `Image.transformedSrc` instead. + /// - scale: Image size multiplier for high-resolution retina displays. Must be between 1 and 3. This argument is deprecated: Use `scale` on `Image.transformedSrc` instead. /// @discardableResult open func image(alias: String? = nil, maxWidth: Int32? = nil, maxHeight: Int32? = nil, crop: CropRegion? = nil, scale: Int32? = nil, _ subfields: (ImageQuery) -> Void) -> ProductVariantQuery { diff --git a/Buy/Generated/Storefront/ProductVariantSortKeys.swift b/Buy/Generated/Storefront/ProductVariantSortKeys.swift index 8e4338eb..7c461d2f 100644 --- a/Buy/Generated/Storefront/ProductVariantSortKeys.swift +++ b/Buy/Generated/Storefront/ProductVariantSortKeys.swift @@ -33,6 +33,10 @@ extension Storefront { case position = "POSITION" + /// During a search (i.e. when the `query` parameter has been specified on the + /// connection) this sorts the results by relevance to the search term(s). When + /// no search query is specified, this sort key is not deterministic and should + /// not be used. case relevance = "RELEVANCE" case sku = "SKU" diff --git a/Buy/Generated/Storefront/QueryRoot.swift b/Buy/Generated/Storefront/QueryRoot.swift index cb6d51a5..819e7cce 100644 --- a/Buy/Generated/Storefront/QueryRoot.swift +++ b/Buy/Generated/Storefront/QueryRoot.swift @@ -53,7 +53,7 @@ extension Storefront { /// /// - parameters: - /// - id: No description + /// - id: The ID of the Node to return. /// @discardableResult open func node(alias: String? = nil, id: GraphQL.ID, _ subfields: (NodeQuery) -> Void) -> QueryRootQuery { @@ -72,7 +72,7 @@ extension Storefront { /// /// - parameters: - /// - ids: No description + /// - ids: The IDs of the Nodes to return. /// @discardableResult open func nodes(alias: String? = nil, ids: [GraphQL.ID], _ subfields: (NodeQuery) -> Void) -> QueryRootQuery { diff --git a/Buy/Generated/Storefront/Shop.swift b/Buy/Generated/Storefront/Shop.swift index 4401a399..c3a9f989 100644 --- a/Buy/Generated/Storefront/Shop.swift +++ b/Buy/Generated/Storefront/Shop.swift @@ -35,12 +35,12 @@ extension Storefront { /// List of the shop' articles. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description - /// - sortKey: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. + /// - sortKey: Sort the underlying list by the given key. /// - query: Supported filter parameters: /// - `author` /// - `updated_at` @@ -92,12 +92,12 @@ extension Storefront { /// List of the shop' blogs. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description - /// - sortKey: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. + /// - sortKey: Sort the underlying list by the given key. /// - query: Supported filter parameters: /// - `handle` /// - `title` @@ -176,12 +176,12 @@ extension Storefront { /// List of the shop’s collections. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description - /// - sortKey: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. + /// - sortKey: Sort the underlying list by the given key. /// - query: Supported filter parameters: /// - `title` /// - `collection_type` @@ -331,12 +331,12 @@ extension Storefront { /// List of the shop’s products. /// /// - parameters: - /// - first: No description - /// - after: No description - /// - last: No description - /// - before: No description - /// - reverse: No description - /// - sortKey: No description + /// - first: Returns up to the first `n` elements from the list. + /// - after: Returns the elements that come after the specified cursor. + /// - last: Returns up to the last `n` elements from the list. + /// - before: Returns the elements that come before the specified cursor. + /// - reverse: Reverse the order of the underlying list. + /// - sortKey: Sort the underlying list by the given key. /// - query: Supported filter parameters: /// - `title` /// - `product_type` diff --git a/Buy/Generated/Storefront/WeightUnit.swift b/Buy/Generated/Storefront/WeightUnit.swift index 37ddfbb3..e108651c 100644 --- a/Buy/Generated/Storefront/WeightUnit.swift +++ b/Buy/Generated/Storefront/WeightUnit.swift @@ -27,18 +27,18 @@ import Foundation extension Storefront { - /// Units of measurements for weight. + /// Units of measurement for weight. public enum WeightUnit: String { /// Metric system unit of mass case grams = "GRAMS" - /// 1 equals 1000 grams + /// 1 kilogram equals 1000 grams case kilograms = "KILOGRAMS" /// Imperial system unit of mass case ounces = "OUNCES" - /// 1 equals 16 ounces + /// 1 pound equals 16 ounces case pounds = "POUNDS" case unknownValue = "" diff --git a/Mobile-Buy-SDK.podspec b/Mobile-Buy-SDK.podspec index 6840ca82..eef29b3c 100644 --- a/Mobile-Buy-SDK.podspec +++ b/Mobile-Buy-SDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'Mobile-Buy-SDK' - s.version = '3.1.3' + s.version = '3.1.4' s.summary = 'Create custom Shopify storefront on iOS.' s.description = 'Shopify’s Mobile Buy SDK makes it simple to create custom storefronts in your mobile app. Utitlizing the power and flexibility of GraphQL you can build native storefront experiences using the Shopify platform.' s.homepage = 'https://github.com/Shopify/mobile-buy-sdk-ios' diff --git a/Scripts/update_schema b/Scripts/update_schema index c2fbbd22..fe69eba2 100755 --- a/Scripts/update_schema +++ b/Scripts/update_schema @@ -7,9 +7,10 @@ require 'optparse' require 'graphql_schema' require 'graphql_swift_gen' -endpoint = URI("https://app.shopify.com/services/ping/storefront_graphql_schema") -body = Net::HTTP.get(endpoint) -schema = GraphQLSchema.new(JSON.parse(body)) +shared_storefront_api_key = "4a6c829ec3cb12ef9004bf8ed27adf12" +endpoint = URI("https://app.shopify.com/services/graphql/introspection/storefront?api_client_api_key=#{shared_storefront_api_key}") +body = Net::HTTP.get(endpoint) +schema = GraphQLSchema.new(JSON.parse(body)) customScalars = [ GraphQLSwiftGen::Scalar.new(