From 0ef8f10cc6753054214676da962beb39e2219514 Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Wed, 24 Jun 2026 16:12:25 +0100 Subject: [PATCH 1/4] Generate protocol requests/delegations --- .../ShopifyCheckoutKit/CheckoutProtocol.swift | 2 + .../ShopifyCheckoutKit/CheckoutWebView.swift | 23 +-- .../ComposedCheckoutCommunicationClient.swift | 34 ++--- .../ShopifyCheckoutKit/WindowOpen.swift | 2 +- .../CheckoutWebViewTests.swift | 49 +++---- ...osedCheckoutCommunicationClientTests.swift | 24 ++++ .../ShopifyCheckoutProtocol/Auth.swift | 35 +++++ .../ShopifyCheckoutProtocol/Descriptors.swift | 33 +++-- .../EmbeddedCheckoutProtocol+Client.swift | 38 ++--- .../EmbeddedCheckoutProtocol+Codec.swift | 92 +++--------- .../EmbeddedCheckoutProtocol.swift | 2 + .../FulfillmentDelegations.swift | 27 ++++ .../EmbeddedCheckoutProtocol+Event.swift | 12 +- .../PaymentDelegations.swift | 18 +++ .../ShopifyCheckoutProtocol/Ready.swift | 49 +++++++ .../ShopifyCheckoutProtocol/UCPMessage.swift | 2 - .../ClientTests.swift | 117 ++++++++++++---- .../CodecDecodeTests.swift | 64 ++++----- .../CodecEncodeTests.swift | 131 +++++------------- .../DescriptorTests.swift | 2 +- protocol/scripts/generate_swift_catalog.mjs | 2 +- 21 files changed, 426 insertions(+), 332 deletions(-) create mode 100644 protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift create mode 100644 protocol/languages/swift/Sources/ShopifyCheckoutProtocol/FulfillmentDelegations.swift create mode 100644 protocol/languages/swift/Sources/ShopifyCheckoutProtocol/PaymentDelegations.swift create mode 100644 protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift diff --git a/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutProtocol.swift b/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutProtocol.swift index c8e2bb85c..4dbb289a2 100644 --- a/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutProtocol.swift +++ b/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutProtocol.swift @@ -15,6 +15,8 @@ public enum CheckoutProtocol { static let methodNotFoundCode = -32601 static let methodNotFoundMessage = "Method not found" + static let ready = EmbeddedCheckoutProtocol.ready + public static let complete = EmbeddedCheckoutProtocol.Event.complete public static let error = EmbeddedCheckoutProtocol.Event.error public static let fulfillmentChange = EmbeddedCheckoutProtocol.Event.fulfillmentChange diff --git a/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutWebView.swift b/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutWebView.swift index dad0b30de..f3da03147 100644 --- a/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutWebView.swift +++ b/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutWebView.swift @@ -224,6 +224,9 @@ class CheckoutWebView: WKWebView { var openExternalURL: (URL) -> Void = { UIApplication.shared.open($0) } /// Kit-owned client that handles delegations and kit-mandated notifications. Currently: + /// - `ec.ready` - kit-owned handshake. The kit negotiates the supported + /// delegations and answers authoritatively; it is abstracted from consumers + /// and cannot be overridden by a merchant-supplied client. /// - `window.open` - falls back to `UIApplication.shared.open(...)` after a /// `canOpenURL` check (consumers may still override via their own client). /// - `ec.error` - when the payload carries `severity: "unrecoverable"`, dismiss @@ -231,6 +234,10 @@ class CheckoutWebView: WKWebView { /// resource exists to act on, so consumers don't have to wire dismissal in /// every error handler. lazy var defaultsClient: CheckoutProtocol.Client = .init() + .on(CheckoutProtocol.ready) { request in + let supported = Set(CheckoutProtocol.defaultDelegations.map(\.rawValue)) + return ReadyResult(delegate: request.delegate.filter { supported.contains($0) }) + } .on(CheckoutProtocol.complete) { _ in CheckoutWebView.invalidate(disconnect: false) } @@ -254,6 +261,10 @@ class CheckoutWebView: WKWebView { var defaultClientBindings: [String: DefaultClientBinding] { [ + CheckoutProtocol.ready.method: DefaultClientBinding( + client: defaultsClient, + policy: .kitOwned + ), CheckoutProtocol.complete.method: DefaultClientBinding( client: defaultsClient, policy: .alwaysRunAfterMerchant @@ -449,7 +460,7 @@ extension CheckoutWebView: WKScriptMessageHandler { return } - guard let method = CheckoutProtocol.supportedProtocolMethod(body) else { + guard CheckoutProtocol.supportedProtocolMethod(body) != nil else { if let response = CheckoutProtocol.methodNotFoundResponse(forUnsupportedProtocolRequest: body) { Task { @MainActor in await checkoutBridge.sendResponse(self, messageBody: response) @@ -458,16 +469,6 @@ extension CheckoutWebView: WKScriptMessageHandler { return } - if method == EmbeddedCheckoutProtocol.readyMethod, - let response = EmbeddedCheckoutProtocol.acknowledgeReady(body, supportedDelegations: CheckoutProtocol.defaultDelegations.map(\.rawValue)) - { - OSLogger.shared.debug("Handling ec.ready: sending UCP ready acknowledgement, isPreload: \(isPreloadRequest)") - Task { @MainActor in - await checkoutBridge.sendResponse(self, messageBody: response) - } - return - } - Task { @MainActor in let composedClient = ComposedCheckoutCommunicationClient( merchant: client, diff --git a/platforms/swift/Sources/ShopifyCheckoutKit/ComposedCheckoutCommunicationClient.swift b/platforms/swift/Sources/ShopifyCheckoutKit/ComposedCheckoutCommunicationClient.swift index 7e2048366..46ab8763a 100644 --- a/platforms/swift/Sources/ShopifyCheckoutKit/ComposedCheckoutCommunicationClient.swift +++ b/platforms/swift/Sources/ShopifyCheckoutKit/ComposedCheckoutCommunicationClient.swift @@ -6,34 +6,35 @@ import Foundation /// Composes a merchant-supplied protocol client with kit-owned default handlers. /// /// The default bindings make the dispatch policy explicit in one place: -/// request delegations such as `CheckoutProtocol.windowOpen` only fall back to the -/// kit default when the merchant does not return a response, while mandatory kit -/// notifications such as `CheckoutProtocol.error` always run after the merchant client. +/// kit-owned requests such as `CheckoutProtocol.ready` are answered solely by the +/// kit default and never reach the merchant client; request delegations such as +/// `CheckoutProtocol.windowOpen` only fall back to the kit default when the merchant +/// does not return a response; and mandatory kit notifications such as +/// `CheckoutProtocol.error` always run after the merchant client. struct ComposedCheckoutCommunicationClient: CheckoutCommunicationProtocol { let merchant: (any CheckoutCommunicationProtocol)? let defaults: [String: DefaultClientBinding] func process(_ message: String) async -> String? { - guard let method = Self.method(message) else { + guard let method = Self.method(message), let binding = defaults[method] else { return await merchant?.process(message) } - var response = await merchant?.process(message) + switch binding.policy { + case .kitOwned: + return await binding.client.process(message) - if let binding = defaults[method] { - switch binding.policy { - case .alwaysRunAfterMerchant: - let defaultResponse = await binding.client.process(message) - response = response ?? defaultResponse + case .alwaysRunAfterMerchant: + let response = await merchant?.process(message) + let defaultResponse = await binding.client.process(message) + return response ?? defaultResponse - case .runIfUnhandled: - if response == nil { - response = await binding.client.process(message) - } + case .runIfUnhandled: + if let response = await merchant?.process(message) { + return response } + return await binding.client.process(message) } - - return response } private static func method(_ message: String) -> String? { @@ -52,6 +53,7 @@ struct DefaultClientBinding { } enum DefaultClientPolicy { + case kitOwned case alwaysRunAfterMerchant case runIfUnhandled } diff --git a/platforms/swift/Sources/ShopifyCheckoutKit/WindowOpen.swift b/platforms/swift/Sources/ShopifyCheckoutKit/WindowOpen.swift index a0838cb5f..5d493cf13 100644 --- a/platforms/swift/Sources/ShopifyCheckoutKit/WindowOpen.swift +++ b/platforms/swift/Sources/ShopifyCheckoutKit/WindowOpen.swift @@ -55,7 +55,7 @@ public enum WindowOpenResult: ResponsePayload { } extension CheckoutProtocol { - public static let windowOpen = DelegationDescriptor( + public static let windowOpen = RequestDescriptor( method: EmbeddedCheckoutProtocol.Event.windowOpenRequest.method, delegation: "window.open", decode: { params in diff --git a/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutWebViewTests.swift b/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutWebViewTests.swift index adf78179f..4961ccbb3 100644 --- a/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutWebViewTests.swift +++ b/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutWebViewTests.swift @@ -523,9 +523,10 @@ class CheckoutWebViewTests: XCTestCase { // MARK: - ec.ready handshake @MainActor - func testAcknowledgeReadyRespondsToReadyRequest() async throws { + func testReadyHandshakeNegotiatesSupportedDelegations() async throws { let id = "req-ready-1" - let body = #"{"jsonrpc":"2.0","method":"ec.ready","id":"\#(id)","params":{"delegate":[]}}"# + let body = + #"{"jsonrpc":"2.0","method":"ec.ready","id":"\#(id)","params":{"delegate":["window.open","payment.credential"]}}"# let responseSent = expectation(description: "response sent") MockCheckoutBridge.sendResponseExpectation = responseSent let message = MockScriptMessage(body: body) @@ -545,31 +546,15 @@ class CheckoutWebViewTests: XCTestCase { let ucp = try XCTUnwrap(result["ucp"] as? [String: Any]) XCTAssertEqual(ucp["status"] as? String, "success") XCTAssertEqual(ucp["version"] as? String, EmbeddedCheckoutProtocol.specVersion) + let delegate = try XCTUnwrap(result["delegate"] as? [String]) + XCTAssertEqual(delegate, ["window.open"], "Kit negotiates requested delegations down to its defaults") } @MainActor - func testAcknowledgeReadyLogsPreloadState() { - let originalLogger = OSLogger.shared - let logger = TestableOSLogger(prefix: "ShopifyCheckoutKit", logLevel: .all) - OSLogger.shared = logger.logger - defer { OSLogger.shared = originalLogger } - - view.load(checkout: url, isPreload: true) - let body = #"{"jsonrpc":"2.0","method":"ec.ready","id":"r1","params":{"delegate":[]}}"# - let message = MockScriptMessage(body: body) - - view.userContentController(WKUserContentController(), didReceive: message) - - XCTAssertTrue( - logger.capturedMessages.contains { captured in - captured.message.contains("Handling ec.ready: sending UCP ready acknowledgement, isPreload: true") - } + func testReadyIsNotOverridableByMerchantClient() async throws { + view.client = MockBridgeClient( + responseMessage: #"{"jsonrpc":"2.0","id":"r1","result":{"hijacked":true}}"# ) - } - - @MainActor - func testAcknowledgeReadyDoesNotInvokeClient() async { - view.client = MockBridgeClient(responseMessage: "client-response") let body = #"{"jsonrpc":"2.0","method":"ec.ready","id":"r1","params":{"delegate":[]}}"# let responseSent = expectation(description: "response sent") MockCheckoutBridge.sendResponseExpectation = responseSent @@ -579,8 +564,13 @@ class CheckoutWebViewTests: XCTestCase { await fulfillment(of: [responseSent], timeout: 5.0) - let response = try? XCTUnwrap(MockCheckoutBridge.lastResponseBody) - XCTAssertNotEqual(response, "client-response") + let response = try XCTUnwrap(MockCheckoutBridge.lastResponseBody) + let parsed = try XCTUnwrap(try JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) + XCTAssertEqual(parsed["id"] as? String, "r1") + let result = try XCTUnwrap(parsed["result"] as? [String: Any]) + XCTAssertNil(result["hijacked"], "Merchant client must not be able to answer ec.ready") + let ucp = try XCTUnwrap(result["ucp"] as? [String: Any]) + XCTAssertEqual(ucp["status"] as? String, "success") } func testNonReadyMessageDoesNotTriggerReadyAck() { @@ -671,8 +661,8 @@ class CheckoutWebViewTests: XCTestCase { } @MainActor - func testMalformedReadyParamsReturnParseError() async throws { - view.client = MockBridgeClient(responseMessage: "client-response") + func testMalformedReadyParamsReturnInvalidParams() async throws { + view.client = MockBridgeClient() let body = #"{"jsonrpc":"2.0","method":"ec.ready","id":"ready-bad","params":{"delegate":[null]}}"# let responseSent = expectation(description: "response sent") MockCheckoutBridge.sendResponseExpectation = responseSent @@ -683,12 +673,11 @@ class CheckoutWebViewTests: XCTestCase { await fulfillment(of: [responseSent], timeout: 5.0) let response = try XCTUnwrap(MockCheckoutBridge.lastResponseBody) - XCTAssertNotEqual(response, "client-response") let parsed = try XCTUnwrap(try JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) XCTAssertEqual(parsed["id"] as? String, "ready-bad") let error = try XCTUnwrap(parsed["error"] as? [String: Any]) - XCTAssertEqual(error["code"] as? Int, -32700) - XCTAssertEqual(error["message"] as? String, "Parse error") + XCTAssertEqual(error["code"] as? Int, -32602) + XCTAssertEqual(error["message"] as? String, "Invalid params") } @MainActor diff --git a/platforms/swift/Tests/ShopifyCheckoutKitTests/ComposedCheckoutCommunicationClientTests.swift b/platforms/swift/Tests/ShopifyCheckoutKitTests/ComposedCheckoutCommunicationClientTests.swift index a07977c12..72a239207 100644 --- a/platforms/swift/Tests/ShopifyCheckoutKitTests/ComposedCheckoutCommunicationClientTests.swift +++ b/platforms/swift/Tests/ShopifyCheckoutKitTests/ComposedCheckoutCommunicationClientTests.swift @@ -90,6 +90,28 @@ final class ComposedCheckoutCommunicationClientTests: XCTestCase { XCTAssertEqual(defaultMessages, [Self.errorNotification]) } + func testKitOwnedAnswersWithoutConsultingMerchant() async { + let merchant = RecordingClient(response: Self.merchantResponse) + let defaultClient = RecordingClient(response: Self.defaultResponse) + let client = ComposedCheckoutCommunicationClient( + merchant: merchant, + defaults: [ + "ec.ready": DefaultClientBinding( + client: defaultClient, + policy: .kitOwned + ) + ] + ) + + let response = await client.process(Self.readyRequest) + let merchantMessages = await merchant.messages + let defaultMessages = await defaultClient.messages + + XCTAssertEqual(response, Self.defaultResponse) + XCTAssertEqual(merchantMessages, [], "kit-owned methods must never reach the merchant client") + XCTAssertEqual(defaultMessages, [Self.readyRequest]) + } + func testDefaultBindingOnlyRunsForMatchingMethod() async { let defaultClient = RecordingClient(response: Self.defaultResponse) let client = ComposedCheckoutCommunicationClient( @@ -113,6 +135,8 @@ final class ComposedCheckoutCommunicationClientTests: XCTestCase { private static let defaultResponse = #"{"jsonrpc":"2.0","id":"default","result":{}}"# private static let windowOpenRequest = #"{"jsonrpc":"2.0","method":"ec.window.open_request","id":"1","params":{"url":"https://example.com"}}"# + private static let readyRequest = + #"{"jsonrpc":"2.0","method":"ec.ready","id":"1","params":{"delegate":[]}}"# private static let errorNotification = #"{"jsonrpc":"2.0","method":"ec.error","params":{"error":{"messages":[]}}}"# } diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift new file mode 100644 index 000000000..1678fcb39 --- /dev/null +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift @@ -0,0 +1,35 @@ +import Foundation + +public struct AuthRequest: EventPayload { + public let type: String? + + public init(type: String? = nil) { + self.type = type + } +} + +public struct AuthResult: ResponsePayload { + public let credential: String + + public init(credential: String) { + self.credential = credential + } + + private enum CodingKeys: String, CodingKey { + case ucp, credential + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(UCPSuccess(version: EmbeddedCheckoutProtocol.specVersion), forKey: .ucp) + try container.encode(credential, forKey: .credential) + } +} + +extension EmbeddedCheckoutProtocol { + public static let auth = RequestDescriptor( + method: Event.auth.method, + delegation: nil, + decode: { try? JSONDecoder().decode(AuthRequest.self, from: $0) } + ) +} diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Descriptors.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Descriptors.swift index 890f9ba3c..4b92206b8 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Descriptors.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Descriptors.swift @@ -5,27 +5,32 @@ import Foundation /// conformance is explicit — preventing arbitrary types like `[String]` or `Int` /// from silently matching descriptor generic constraints. public protocol EventPayload: Decodable, Sendable {} -/// Marker protocol that constrains which types can be used as delegation response payloads. +/// Marker protocol that constrains which types can be used as request response payloads. /// Like `EventPayload`, this must be a protocol (not a typealias) so that conformance /// is explicit — preventing arbitrary `Encodable & Sendable` types from silently matching. public protocol ResponsePayload: Encodable, Sendable {} +/// A fire-and-forget event: the host pushes state, the consumer reacts, nothing is +/// returned to the web. public struct NotificationDescriptor: Sendable { public let method: String } -public struct RequestDescriptor: Sendable { +/// A request/response event: the web sends a correlated JSON-RPC request, the +/// consumer's handler produces a typed result, and the client encodes the response. +/// +/// This is the single responder model for every id-bearing method — core protocol +/// requests (`ec.ready`, `ec.auth`) and negotiable delegations alike. `delegation` +/// is `nil` for core requests and carries the delegation string for negotiable ones; +/// only the latter contribute to `Client.delegations`. +public struct RequestDescriptor: Sendable { public let method: String -} - -public struct DelegationDescriptor: Sendable { - public let method: String - public let delegation: String + public let delegation: String? let decode: @Sendable (Data) -> Payload? public init( method: String, - delegation: String, + delegation: String? = nil, decode: @escaping @Sendable (Data) -> Payload? ) { self.method = method @@ -33,3 +38,15 @@ public struct DelegationDescriptor Void] - private var delegationEntries: [String: DelegationEntry] + private var requestEntries: [String: RequestEntry] + /// The delegation strings this client can fulfill, derived from the + /// registered request handlers that carry a delegation. Core requests + /// (`ec.ready`, `ec.auth`) have no delegation and are excluded. var delegations: [String] { - delegationEntries.values.map(\.delegation) + requestEntries.values.compactMap(\.delegation) } public init() { notificationHandlers = [:] - delegationEntries = [:] + requestEntries = [:] } @discardableResult @@ -29,14 +32,20 @@ extension EmbeddedCheckoutProtocol { @discardableResult public func on( - _ descriptor: DelegationDescriptor, + _ descriptor: RequestDescriptor, perform: @escaping @MainActor @Sendable (P) async -> R ) -> Client { return copy { - $0.delegationEntries[descriptor.method] = DelegationEntry( + $0.requestEntries[descriptor.method] = RequestEntry( delegation: descriptor.delegation, handler: { id, params in - guard let payload = descriptor.decode(params) else { return nil } + guard let payload = descriptor.decode(params) else { + return EmbeddedCheckoutProtocol.encodeErrorResponse( + id: id, + code: EmbeddedCheckoutProtocol.invalidParamsCode, + message: EmbeddedCheckoutProtocol.invalidParamsMessage + ) + } let result = await perform(payload) return EmbeddedCheckoutProtocol.encodeResponse(id: id, result: result) } @@ -48,22 +57,13 @@ extension EmbeddedCheckoutProtocol { let decoded = EmbeddedCheckoutProtocol.decode(jsonRpc: message) switch decoded { - case let .ready(id, requested): - let accepted = requested.filter(Set(delegations).contains) - return EmbeddedCheckoutProtocol.encodeReadyResponse(id: id, acceptedDelegations: accepted) - - case let .error(id, code, message): - return EmbeddedCheckoutProtocol.encodeErrorResponse(id: id, code: code, message: message) - case let .notification(method, payload): await notificationHandlers[method]?(payload) return nil case let .request(id, method, params): - if let entry = delegationEntries[method] { - return await entry.handler(id, params) - } - return nil + guard let entry = requestEntries[method] else { return nil } + return await entry.handler(id, params) case .unknown: return nil @@ -71,8 +71,8 @@ extension EmbeddedCheckoutProtocol { } } - struct DelegationEntry { - let delegation: String + struct RequestEntry { + let delegation: String? let handler: @MainActor @Sendable (JSONRPCID, Data) async -> String? } } diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol+Codec.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol+Codec.swift index f3f65399d..1100b29c3 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol+Codec.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol+Codec.swift @@ -1,27 +1,5 @@ import Foundation -extension EmbeddedCheckoutProtocol { - /// Returns an `ec.ready` response if the given message is an `ec.ready` request, - /// otherwise `nil`. The response echoes the intersection of the merchant's - /// requested delegations with `supportedDelegations` under a `delegate` array. - public static func acknowledgeReady( - _ message: String, - supportedDelegations: [String] = [] - ) -> String? { - switch decode(jsonRpc: message) { - case let .ready(id, requested): - let accepted = requested.filter(Set(supportedDelegations).contains) - return encodeReadyResponse(id: id, acceptedDelegations: accepted) - - case let .error(id, code, message): - return encodeErrorResponse(id: id, code: code, message: message) - - default: - return nil - } - } -} - extension EmbeddedCheckoutProtocol { static func decode(jsonRpc: String) -> UCPMessage { guard let data = jsonRpc.data(using: .utf8) else { @@ -32,27 +10,16 @@ extension EmbeddedCheckoutProtocol { return .unknown(method: "", rawParams: jsonRpc) } - // Special case so we may intercept and send expected response to initialise the checkout - if envelope.method == "ec.ready", let id = envelope.id { - guard let request = try? JSONDecoder().decode(JSONRPCReadyRequest.self, from: data) else { - return .error(id: id, code: parseErrorCode, message: parseErrorMessage) - } - return .ready(id: id, delegations: request.params.delegate) - } - if envelope.method == "ec.error", let request = try? JSONDecoder().decode(JSONRPCRequest.self, from: data) { return .notification(method: envelope.method, payload: request.params.error) } - if let id = envelope.id, - let params = requestParamsData(for: envelope.method, from: data) { - return .request(id: id, method: envelope.method, params: params) - } - - if let id = envelope.id, - envelope.method == "ec.window.open_request" { - return .error(id: id, code: invalidParamsCode, message: invalidParamsMessage) + // Any id-bearing message is a request. The raw `params` object is lifted + // verbatim; typed decoding (and invalid-params reporting) is the registered + // handler's responsibility, so every request method travels the same rail. + if let id = envelope.id { + return .request(id: id, method: envelope.method, params: rawParams(from: data)) } if let request = try? JSONDecoder().decode(JSONRPCRequest.self, from: data) { @@ -62,19 +29,19 @@ extension EmbeddedCheckoutProtocol { return .unknown(method: envelope.method, rawParams: jsonRpc) } - private static func requestParamsData(for method: String, from data: Data) -> Data? { - switch method { - case "ec.window.open_request": - return try? encodeParams(JSONDecoder().decode(JSONRPCRequest.self, from: data).params) - default: - return try? encodeParams(JSONDecoder().decode(JSONRPCRequest.self, from: data).params) + /// Lifts the top-level `params` object from a JSON-RPC message as standalone + /// `Data`. Absent or non-object params yield an empty object so handlers can + /// decode a defaultable payload; unknown keys are preserved for the handler's + /// typed decode to strip. + private static func rawParams(from data: Data) -> Data { + guard + let object = try? JSONSerialization.jsonObject(with: data) as? [String: Any], + let params = object["params"] as? [String: Any], + let encoded = try? JSONSerialization.data(withJSONObject: params, options: [.sortedKeys]) + else { + return Data("{}".utf8) } - } - - private static func encodeParams(_ params: some Encodable) throws -> Data { - let encoder = JSONEncoder() - encoder.outputFormatting = [.sortedKeys] - return try encoder.encode(params) + return encoded } static func encodeResponse(id: String, result: some Encodable) -> String { @@ -89,18 +56,6 @@ extension EmbeddedCheckoutProtocol { return String(data: data, encoding: .utf8) ?? "{}" } - static func encodeReadyResponse(id: String, acceptedDelegations: [String]) -> String { - encodeReadyResponse(id: .string(id), acceptedDelegations: acceptedDelegations) - } - - static func encodeReadyResponse(id: JSONRPCID, acceptedDelegations: [String]) -> String { - let result = UCPSuccessResult( - ucp: UCPSuccess(version: specVersion), - delegate: acceptedDelegations.isEmpty ? nil : acceptedDelegations - ) - return encodeResponse(id: id, result: result) - } - static func encodeErrorResponse(id: JSONRPCID, code: Int, message: String) -> String { let wrapper = JSONRPCErrorResponse(id: id, error: JSONRPCError(code: code, message: message)) let encoder = JSONEncoder() @@ -110,16 +65,6 @@ extension EmbeddedCheckoutProtocol { } } -struct UCPSuccessResult: Encodable { - let ucp: UCPSuccess - let delegate: [String]? - - init(ucp: UCPSuccess, delegate: [String]? = nil) { - self.ucp = ucp - self.delegate = delegate - } -} - struct UCPSuccess: Encodable { let version: String let status = "success" @@ -129,6 +74,3 @@ struct UCPError: Encodable { let version: String let status = "error" } - -private let invalidParamsCode = -32602 -private let invalidParamsMessage = "Invalid params" diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol.swift index 32373190d..1c5ac009e 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol.swift @@ -6,6 +6,8 @@ public enum EmbeddedCheckoutProtocol { package static let readyMethod = "ec.ready" package static let parseErrorCode = -32700 package static let parseErrorMessage = "Parse error" + package static let invalidParamsCode = -32602 + package static let invalidParamsMessage = "Invalid params" /// Options controlling the query parameters appended to a checkout URL when /// initiating the Embedded Checkout Protocol handshake. diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/FulfillmentDelegations.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/FulfillmentDelegations.swift new file mode 100644 index 000000000..463fafd0b --- /dev/null +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/FulfillmentDelegations.swift @@ -0,0 +1,27 @@ +import Foundation + +public struct AddressChangeCheckout: Codable, Sendable { + public let fulfillment: Fulfillment? + + public init(fulfillment: Fulfillment?) { + self.fulfillment = fulfillment + } +} + +public struct AddressChangeResult: ResponsePayload { + public let checkout: AddressChangeCheckout? + public let ucp: InstrumentsChangeResultUcp + + public init(checkout: AddressChangeCheckout?, ucp: InstrumentsChangeResultUcp) { + self.checkout = checkout + self.ucp = ucp + } +} + +extension EmbeddedCheckoutProtocol { + public static let fulfillmentAddressChange = RequestDescriptor( + method: Event.fulfillmentAddressChangeRequest.method, + delegation: Delegation.fulfillmentAddressChange.rawValue, + decode: { try? JSONDecoder().decode(JSONRPCCheckoutParams.self, from: $0).checkout } + ) +} diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/EmbeddedCheckoutProtocol+Event.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/EmbeddedCheckoutProtocol+Event.swift index 87c3158e5..c2991a870 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/EmbeddedCheckoutProtocol+Event.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/EmbeddedCheckoutProtocol+Event.swift @@ -8,8 +8,8 @@ extension ErrorResponse: EventPayload {} extension EmbeddedCheckoutProtocol { public enum Event { - public static let ready = RequestDescriptor(method: "ec.ready") - public static let auth = RequestDescriptor(method: "ec.auth") + public static let ready = MethodDescriptor(method: "ec.ready") + public static let auth = MethodDescriptor(method: "ec.auth") public static let error = NotificationDescriptor(method: "ec.error") public static let start = NotificationDescriptor(method: "ec.start") public static let complete = NotificationDescriptor(method: "ec.complete") @@ -18,11 +18,11 @@ extension EmbeddedCheckoutProtocol { public static let buyerChange = NotificationDescriptor(method: "ec.buyer.change") public static let totalsChange = NotificationDescriptor(method: "ec.totals.change") public static let paymentChange = NotificationDescriptor(method: "ec.payment.change") - public static let paymentInstrumentsChangeRequest = RequestDescriptor(method: "ec.payment.instruments_change_request") - public static let paymentCredentialRequest = RequestDescriptor(method: "ec.payment.credential_request") - public static let windowOpenRequest = RequestDescriptor(method: "ec.window.open_request") + public static let paymentInstrumentsChangeRequest = MethodDescriptor(method: "ec.payment.instruments_change_request") + public static let paymentCredentialRequest = MethodDescriptor(method: "ec.payment.credential_request") + public static let windowOpenRequest = MethodDescriptor(method: "ec.window.open_request") public static let fulfillmentChange = NotificationDescriptor(method: "ec.fulfillment.change") - public static let fulfillmentAddressChangeRequest = RequestDescriptor(method: "ec.fulfillment.address_change_request") + public static let fulfillmentAddressChangeRequest = MethodDescriptor(method: "ec.fulfillment.address_change_request") public static let all: [String] = [ ready.method, diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/PaymentDelegations.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/PaymentDelegations.swift new file mode 100644 index 000000000..5cace2761 --- /dev/null +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/PaymentDelegations.swift @@ -0,0 +1,18 @@ +import Foundation + +extension InstrumentsChangeResult: ResponsePayload {} +extension CredentialResult: ResponsePayload {} + +extension EmbeddedCheckoutProtocol { + public static let paymentInstrumentsChange = RequestDescriptor( + method: Event.paymentInstrumentsChangeRequest.method, + delegation: Delegation.paymentInstrumentsChange.rawValue, + decode: { try? JSONDecoder().decode(JSONRPCCheckoutParams.self, from: $0).checkout } + ) + + public static let paymentCredential = RequestDescriptor( + method: Event.paymentCredentialRequest.method, + delegation: Delegation.paymentCredential.rawValue, + decode: { try? JSONDecoder().decode(JSONRPCCheckoutParams.self, from: $0).checkout } + ) +} diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift new file mode 100644 index 000000000..dde354252 --- /dev/null +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift @@ -0,0 +1,49 @@ +import Foundation + +public struct ReadyRequest: EventPayload { + public let delegate: [String] + + public init(delegate: [String] = []) { + self.delegate = delegate + } + + private enum CodingKeys: String, CodingKey { + case delegate + } + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: CodingKeys.self) + delegate = try container.decodeIfPresent([String].self, forKey: .delegate) ?? [] + } +} + +public struct ReadyResult: ResponsePayload { + public let delegate: [String] + public let credential: String? + + public init(delegate: [String] = [], credential: String? = nil) { + self.delegate = delegate + self.credential = credential + } + + private enum CodingKeys: String, CodingKey { + case ucp, delegate, credential + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(UCPSuccess(version: EmbeddedCheckoutProtocol.specVersion), forKey: .ucp) + if !delegate.isEmpty { + try container.encode(delegate, forKey: .delegate) + } + try container.encodeIfPresent(credential, forKey: .credential) + } +} + +extension EmbeddedCheckoutProtocol { + public static let ready = RequestDescriptor( + method: Event.ready.method, + delegation: nil, + decode: { try? JSONDecoder().decode(ReadyRequest.self, from: $0) } + ) +} diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/UCPMessage.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/UCPMessage.swift index 9079d1c7f..81d69ec70 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/UCPMessage.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/UCPMessage.swift @@ -3,7 +3,5 @@ import Foundation enum UCPMessage { case notification(method: String, payload: any EventPayload & Sendable) case request(id: JSONRPCID, method: String, params: Data) - case ready(id: JSONRPCID, delegations: [String]) - case error(id: JSONRPCID, code: Int, message: String) case unknown(method: String, rawParams: String) } diff --git a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift index d3add3176..dc7c60f5d 100644 --- a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift +++ b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift @@ -37,7 +37,7 @@ private enum TestDelegationResult: ResponsePayload { } } -private let windowOpenDescriptor = DelegationDescriptor( +private let windowOpenDescriptor = RequestDescriptor( method: EmbeddedCheckoutProtocol.Event.windowOpenRequest.method, delegation: "window.open", decode: { params in @@ -57,6 +57,11 @@ struct ClientTests { return try String(contentsOf: url, encoding: .utf8) } + private func requestFixture() throws -> String { + let url = Bundle.module.url(forResource: "request", withExtension: "json", subdirectory: "Fixtures")! + return try String(contentsOf: url, encoding: .utf8) + } + @Test @MainActor func notificationDispatchesToRegisteredHandler() async throws { var receivedCheckout: Checkout? let client = EmbeddedCheckoutProtocol.Client() @@ -165,7 +170,7 @@ struct ClientTests { #expect(response == nil) } - @Test @MainActor func delegationRequestWithNullURLReturnsInvalidParamsError() async throws { + @Test @MainActor func requestWithUndecodableParamsReturnsInvalidParamsError() async throws { let client = EmbeddedCheckoutProtocol.Client() .on(windowOpenDescriptor) { _ in .success } let request = #""" @@ -177,8 +182,8 @@ struct ClientTests { #expect(parsed["id"] as? String == "req-window-1") let error = try #require(parsed["error"] as? [String: Any]) - #expect(error["code"] as? Int == -32602) - #expect(error["message"] as? String == "Invalid params") + #expect(error["code"] as? Int == EmbeddedCheckoutProtocol.invalidParamsCode) + #expect(error["message"] as? String == EmbeddedCheckoutProtocol.invalidParamsMessage) } @Test @MainActor func delegationRequestLastHandlerWins() async throws { @@ -197,49 +202,111 @@ struct ClientTests { #expect(ucp["status"] as? String == "success") } - @Test @MainActor func delegationAdvertisesDelegationInReadyResponse() async throws { + @Test @MainActor func readyRequestDispatchesToRegisteredHandler() async throws { + let response = try await EmbeddedCheckoutProtocol.Client() + .on(EmbeddedCheckoutProtocol.ready) { _ in ReadyResult() } + .process(readyFixture()) + + let data = try #require(response?.data(using: .utf8)) + let parsed = try #require(JSONSerialization.jsonObject(with: data) as? [String: Any]) + #expect(parsed["id"] as? String == "ready-1") + #expect(parsed["method"] == nil) + #expect(parsed["params"] == nil) + let result = try #require(parsed["result"] as? [String: Any]) + let ucp = try #require(result["ucp"] as? [String: Any]) + #expect(ucp["version"] as? String == EmbeddedCheckoutProtocol.specVersion) + #expect(ucp["status"] as? String == "success") + } + + @Test @MainActor func readyHandlerNegotiatesAcceptedDelegations() async throws { let ready = #""" - {"jsonrpc":"2.0","id":"ready-1","method":"ec.ready","params":{"delegate":["window.open"]}} + {"jsonrpc":"2.0","id":"ready-1","method":"ec.ready","params":{"delegate":["window.open","payment.credential"]}} """# let client = EmbeddedCheckoutProtocol.Client() .on(windowOpenDescriptor) { _ in .success } - - let response = try #require(await client.process(ready)) + let supported = Set(client.delegations) + + let response = try #require( + await client + .on(EmbeddedCheckoutProtocol.ready) { request in + ReadyResult(delegate: request.delegate.filter { supported.contains($0) }) + } + .process(ready) + ) let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) let result = try #require(parsed["result"] as? [String: Any]) let delegate = try #require(result["delegate"] as? [String]) #expect(delegate == ["window.open"]) } - @Test @MainActor func malformedReadyParamsReturnParseError() async throws { + @Test @MainActor func malformedReadyParamsReturnInvalidParamsError() async throws { let ready = #""" {"jsonrpc":"2.0","id":"ready-bad","method":"ec.ready","params":{"delegate":[null]}} """# - let client = EmbeddedCheckoutProtocol.Client() - - let response = try #require(await client.process(ready)) + let response = try #require( + await EmbeddedCheckoutProtocol.Client() + .on(EmbeddedCheckoutProtocol.ready) { _ in ReadyResult() } + .process(ready) + ) let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) #expect(parsed["id"] as? String == "ready-bad") let error = try #require(parsed["error"] as? [String: Any]) - #expect(error["code"] as? Int == EmbeddedCheckoutProtocol.parseErrorCode) - #expect(error["message"] as? String == EmbeddedCheckoutProtocol.parseErrorMessage) + #expect(error["code"] as? Int == EmbeddedCheckoutProtocol.invalidParamsCode) + #expect(error["message"] as? String == EmbeddedCheckoutProtocol.invalidParamsMessage) } - @Test @MainActor func readyReturnsResponse() async throws { - let client = EmbeddedCheckoutProtocol.Client() + @Test @MainActor func authRequestDispatchesToRegisteredHandler() async throws { + let request = #""" + {"jsonrpc":"2.0","id":"auth-1","method":"ec.auth","params":{"type":"shop"}} + """# - let response = try await client.process(readyFixture()) + let response = try #require( + await EmbeddedCheckoutProtocol.Client() + .on(EmbeddedCheckoutProtocol.auth) { _ in AuthResult(credential: "tok-xyz") } + .process(request) + ) + let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) - let data = try #require(response?.data(using: .utf8)) - let parsed = try #require(JSONSerialization.jsonObject(with: data) as? [String: Any]) - #expect(parsed["id"] as? String == "ready-1") - #expect(parsed["method"] == nil) - #expect(parsed["params"] == nil) + #expect(parsed["id"] as? String == "auth-1") let result = try #require(parsed["result"] as? [String: Any]) - let ucp = try #require(result["ucp"] as? [String: Any]) - #expect(ucp["version"] as? String == EmbeddedCheckoutProtocol.specVersion) - #expect(ucp["status"] as? String == "success") + #expect(result["credential"] as? String == "tok-xyz") + } + + @Test @MainActor func paymentCredentialRequestDispatchesWithDecodedCheckout() async throws { + var receivedCheckoutID: String? + let response = try #require( + await EmbeddedCheckoutProtocol.Client() + .on(EmbeddedCheckoutProtocol.paymentCredential) { checkout in + receivedCheckoutID = checkout.id + return CredentialResult( + checkout: nil, + ucp: InstrumentsChangeResultUcp( + capabilities: nil, + paymentHandlers: nil, + services: nil, + status: .success, + version: EmbeddedCheckoutProtocol.specVersion + ), + continueURL: nil, + messages: nil + ) + } + .process(requestFixture()) + ) + let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) + + #expect(receivedCheckoutID == "checkout-789") + #expect(parsed["id"] as? String == "req-456") + #expect(parsed["result"] != nil) + } + + @Test @MainActor func delegationsReflectsOnlyDelegationCarryingHandlers() { + let client = EmbeddedCheckoutProtocol.Client() + .on(EmbeddedCheckoutProtocol.ready) { _ in ReadyResult() } + .on(windowOpenDescriptor) { _ in .success } + + #expect(client.delegations == ["window.open"]) } } diff --git a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecDecodeTests.swift b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecDecodeTests.swift index a2dfefe99..7a0c9933d 100644 --- a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecDecodeTests.swift +++ b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecDecodeTests.swift @@ -75,7 +75,7 @@ struct CodecDecodeTests { #expect(parsed["url"] as? String == "https://example.com/terms") } - @Test func windowOpenRequestDropsUnknownParamsBeforeDispatch() throws { + @Test func requestPreservesUnknownParamKeys() throws { let json = #""" {"jsonrpc":"2.0","id":"req-window-1","method":"ec.window.open_request","params":{"url":"https://example.com/terms","unknown":"value"}} """# @@ -88,23 +88,22 @@ struct CodecDecodeTests { let parsed = try #require(JSONSerialization.jsonObject(with: params) as? [String: Any]) #expect(parsed["url"] as? String == "https://example.com/terms") - #expect(parsed["unknown"] == nil) + #expect(parsed["unknown"] as? String == "value", "Raw lift preserves unknown keys; typed decode strips them downstream") } - @Test func decodesMalformedWindowOpenParamsAsInvalidParamsError() { + @Test func decodesMalformedRequestParamsAsRequest() throws { let json = #""" {"jsonrpc":"2.0","id":"req-window-bad","method":"ec.window.open_request","params":{"url":null}} """# let message = EmbeddedCheckoutProtocol.decode(jsonRpc: json) - guard case let .error(id, code, responseMessage) = message else { - Issue.record("Expected .error, got \(message)") + guard case let .request(id, method, _) = message else { + Issue.record("Expected .request, got \(message)") return } #expect(id == "req-window-bad") - #expect(code == -32602) - #expect(responseMessage == "Invalid params") + #expect(method == "ec.window.open_request") } @Test func decodesUnknownMethod() { @@ -121,81 +120,66 @@ struct CodecDecodeTests { #expect(method == "ec.unknown") } - @Test func decodesReadyRequestWithNumericID() { + @Test func decodesReadyRequestWithNumericID() throws { let json = #""" {"jsonrpc":"2.0","id":1,"method":"ec.ready","params":{"delegate":[]}} """# let message = EmbeddedCheckoutProtocol.decode(jsonRpc: json) - guard case let .ready(id, delegations) = message else { - Issue.record("Expected .ready, got \(message)") + guard case let .request(id, method, _) = message else { + Issue.record("Expected .request, got \(message)") return } #expect(id == .int(1)) - #expect(delegations.isEmpty) + #expect(method == EmbeddedCheckoutProtocol.readyMethod) } - @Test func decodesReadyRequestWithNullID() { + @Test func decodesReadyRequestWithNullID() throws { let json = #""" {"jsonrpc":"2.0","id":null,"method":"ec.ready","params":{"delegate":[]}} """# let message = EmbeddedCheckoutProtocol.decode(jsonRpc: json) - guard case let .ready(id, delegations) = message else { - Issue.record("Expected .ready, got \(message)") + guard case let .request(id, method, _) = message else { + Issue.record("Expected .request, got \(message)") return } #expect(id == .null) - #expect(delegations.isEmpty) + #expect(method == EmbeddedCheckoutProtocol.readyMethod) } - @Test func decodesReadyRequestWithMissingParamsAsEmptyDelegations() { + @Test func decodesReadyRequestWithMissingParamsAsEmptyObject() throws { let json = #""" {"jsonrpc":"2.0","id":"ready-no-params","method":"ec.ready"} """# let message = EmbeddedCheckoutProtocol.decode(jsonRpc: json) - guard case let .ready(id, delegations) = message else { - Issue.record("Expected .ready, got \(message)") + guard case let .request(id, _, params) = message else { + Issue.record("Expected .request, got \(message)") return } #expect(id == "ready-no-params") - #expect(delegations.isEmpty) - } - - @Test func decodesMalformedReadyParamsAsParseError() { - let json = #""" - {"jsonrpc":"2.0","id":"ready-bad","method":"ec.ready","params":{"delegate":[null]}} - """# - let message = EmbeddedCheckoutProtocol.decode(jsonRpc: json) - - guard case let .error(id, code, responseMessage) = message else { - Issue.record("Expected .error, got \(message)") - return - } - - #expect(id == "ready-bad") - #expect(code == EmbeddedCheckoutProtocol.parseErrorCode) - #expect(responseMessage == EmbeddedCheckoutProtocol.parseErrorMessage) + let parsed = try #require(JSONSerialization.jsonObject(with: params) as? [String: Any]) + #expect(parsed.isEmpty) } - @Test func decodesNullReadyParamsAsParseError() { + @Test func decodesNullReadyParamsAsEmptyObject() throws { let json = #""" {"jsonrpc":"2.0","id":"ready-null","method":"ec.ready","params":null} """# let message = EmbeddedCheckoutProtocol.decode(jsonRpc: json) - guard case let .error(id, code, responseMessage) = message else { - Issue.record("Expected .error, got \(message)") + guard case let .request(id, _, params) = message else { + Issue.record("Expected .request, got \(message)") return } #expect(id == "ready-null") - #expect(code == EmbeddedCheckoutProtocol.parseErrorCode) - #expect(responseMessage == EmbeddedCheckoutProtocol.parseErrorMessage) + let parsed = try #require(JSONSerialization.jsonObject(with: params) as? [String: Any]) + #expect(parsed.isEmpty) } @Test func rejectsFractionalJSONRPCID() { diff --git a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecEncodeTests.swift b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecEncodeTests.swift index df780a4de..d2ae7fe39 100644 --- a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecEncodeTests.swift +++ b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecEncodeTests.swift @@ -27,11 +27,10 @@ struct CodecEncodeTests { #expect(parsed["result"] != nil) } - @Test func encodesReadyResponseWithResultEnvelope() throws { - let json = EmbeddedCheckoutProtocol.encodeReadyResponse(id: "ready-1", acceptedDelegations: []) + @Test func encodesReadyResultOmittingEmptyDelegate() throws { + let json = EmbeddedCheckoutProtocol.encodeResponse(id: "ready-1", result: ReadyResult()) let parsed = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) - #expect(parsed["jsonrpc"] as? String == "2.0") #expect(parsed["id"] as? String == "ready-1") #expect(parsed["method"] == nil, "JSON-RPC responses must not carry a method field") #expect(parsed["params"] == nil, "JSON-RPC responses must not carry a params field") @@ -41,121 +40,59 @@ struct CodecEncodeTests { #expect(ucp["version"] as? String == EmbeddedCheckoutProtocol.specVersion) #expect(ucp["status"] as? String == "success") #expect(result["delegate"] == nil, "Empty delegate list must be omitted") + #expect(result["credential"] == nil, "Absent credential must be omitted") } - @Test func encodesReadyResponseEchoesAcceptedDelegations() throws { - let json = EmbeddedCheckoutProtocol.encodeReadyResponse(id: "ready-1", acceptedDelegations: ["window.open"]) + @Test func encodesReadyResultEchoingDelegate() throws { + let json = EmbeddedCheckoutProtocol.encodeResponse( + id: 7, + result: ReadyResult(delegate: ["window.open"]) + ) let parsed = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) + #expect(parsed["id"] as? Int == 7) let result = try #require(parsed["result"] as? [String: Any]) let delegate = try #require(result["delegate"] as? [String]) #expect(delegate == ["window.open"]) } - @Test func encodesReadyResponseWithNumericID() throws { - let json = EmbeddedCheckoutProtocol.encodeReadyResponse(id: 7, acceptedDelegations: []) - let parsed = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) - - #expect(parsed["id"] as? Int == 7) - } - - @Test func encodesReadyResponseWithNullID() throws { - let json = EmbeddedCheckoutProtocol.encodeReadyResponse(id: .null, acceptedDelegations: []) + @Test func encodesReadyResultIncludingCredential() throws { + let json = EmbeddedCheckoutProtocol.encodeResponse( + id: .null, + result: ReadyResult(credential: "tok-123") + ) let parsed = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) #expect(parsed["id"] is NSNull) + let result = try #require(parsed["result"] as? [String: Any]) + #expect(result["credential"] as? String == "tok-123") } - @Test func acknowledgeReadyReturnsResponseForReadyMessage() throws { - let message = #""" - {"jsonrpc":"2.0","id":"ready-1","method":"ec.ready","params":{"delegate":["payment.credential"]}} - """# - - let response = try #require(EmbeddedCheckoutProtocol.acknowledgeReady(message)) - let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) + @Test func encodesAuthResult() throws { + let json = EmbeddedCheckoutProtocol.encodeResponse( + id: "auth-1", + result: AuthResult(credential: "tok-abc") + ) + let parsed = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) - #expect(parsed["id"] as? String == "ready-1") let result = try #require(parsed["result"] as? [String: Any]) + #expect(result["credential"] as? String == "tok-abc") let ucp = try #require(result["ucp"] as? [String: Any]) - #expect(ucp["version"] as? String == EmbeddedCheckoutProtocol.specVersion) #expect(ucp["status"] as? String == "success") + #expect(ucp["version"] as? String == EmbeddedCheckoutProtocol.specVersion) } - @Test func acknowledgeReadyEchoesIntersectionWithSupportedDelegations() throws { - let message = #""" - {"jsonrpc":"2.0","id":"ready-1","method":"ec.ready","params":{"delegate":["payment.credential","window.open","fulfillment.address_change"]}} - """# - - let response = try #require(EmbeddedCheckoutProtocol.acknowledgeReady(message, supportedDelegations: ["window.open"])) - let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) - - let result = try #require(parsed["result"] as? [String: Any]) - let delegate = try #require(result["delegate"] as? [String]) - #expect(delegate == ["window.open"]) - } - - @Test func acknowledgeReadyOmitsDelegateWhenNoIntersection() throws { - let message = #""" - {"jsonrpc":"2.0","id":"ready-1","method":"ec.ready","params":{"delegate":["payment.credential"]}} - """# - - let response = try #require(EmbeddedCheckoutProtocol.acknowledgeReady(message, supportedDelegations: ["window.open"])) - let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) - - let result = try #require(parsed["result"] as? [String: Any]) - #expect(result["delegate"] == nil) - } - - @Test func acknowledgeReadyAcceptsMissingParamsAsEmptyDelegations() throws { - let message = #""" - {"jsonrpc":"2.0","id":"ready-no-params","method":"ec.ready"} - """# - - let response = try #require(EmbeddedCheckoutProtocol.acknowledgeReady(message)) - let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) - - #expect(parsed["id"] as? String == "ready-no-params") - let result = try #require(parsed["result"] as? [String: Any]) - #expect(result["delegate"] == nil) - } - - @Test func acknowledgeReadyReturnsParseErrorForMalformedParams() throws { - let message = #""" - {"jsonrpc":"2.0","id":"ready-bad","method":"ec.ready","params":{"delegate":[null]}} - """# - - let response = try #require(EmbeddedCheckoutProtocol.acknowledgeReady(message)) - let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) - - #expect(parsed["id"] as? String == "ready-bad") - let error = try #require(parsed["error"] as? [String: Any]) - #expect(error["code"] as? Int == EmbeddedCheckoutProtocol.parseErrorCode) - #expect(error["message"] as? String == EmbeddedCheckoutProtocol.parseErrorMessage) - } - - @Test func acknowledgeReadyReturnsParseErrorForNullParams() throws { - let message = #""" - {"jsonrpc":"2.0","id":"ready-null","method":"ec.ready","params":null} - """# - - let response = try #require(EmbeddedCheckoutProtocol.acknowledgeReady(message)) - let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) + @Test func encodesErrorResponse() throws { + let json = EmbeddedCheckoutProtocol.encodeErrorResponse( + id: .string("err-1"), + code: EmbeddedCheckoutProtocol.invalidParamsCode, + message: EmbeddedCheckoutProtocol.invalidParamsMessage + ) + let parsed = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) - #expect(parsed["id"] as? String == "ready-null") + #expect(parsed["id"] as? String == "err-1") let error = try #require(parsed["error"] as? [String: Any]) - #expect(error["code"] as? Int == EmbeddedCheckoutProtocol.parseErrorCode) - #expect(error["message"] as? String == EmbeddedCheckoutProtocol.parseErrorMessage) - } - - @Test func acknowledgeReadyReturnsNilForNonReadyMessage() { - let message = #""" - {"jsonrpc":"2.0","method":"ec.start","params":{"checkout":{"id":"c"}}} - """# - - #expect(EmbeddedCheckoutProtocol.acknowledgeReady(message) == nil) - } - - @Test func acknowledgeReadyReturnsNilForMalformedJSON() { - #expect(EmbeddedCheckoutProtocol.acknowledgeReady("not json") == nil) + #expect(error["code"] as? Int == EmbeddedCheckoutProtocol.invalidParamsCode) + #expect(error["message"] as? String == EmbeddedCheckoutProtocol.invalidParamsMessage) } } diff --git a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/DescriptorTests.swift b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/DescriptorTests.swift index 19e962155..9826317c1 100644 --- a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/DescriptorTests.swift +++ b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/DescriptorTests.swift @@ -35,7 +35,7 @@ struct DescriptorTests { } @Test func requestMethodsBindAsRequestsNotNotifications() { - func method(of descriptor: RequestDescriptor) -> String { descriptor.method } + func method(of descriptor: MethodDescriptor) -> String { descriptor.method } #expect(method(of: EmbeddedCheckoutProtocol.Event.windowOpenRequest) == "ec.window.open_request") #expect(method(of: EmbeddedCheckoutProtocol.Event.paymentCredentialRequest) == "ec.payment.credential_request") diff --git a/protocol/scripts/generate_swift_catalog.mjs b/protocol/scripts/generate_swift_catalog.mjs index 3f3ccf6a4..a9f9af9f3 100644 --- a/protocol/scripts/generate_swift_catalog.mjs +++ b/protocol/scripts/generate_swift_catalog.mjs @@ -156,7 +156,7 @@ extension EmbeddedCheckoutProtocol { ${entries .map(entry => entry.isRequest - ? ` public static let ${entry.identifier} = RequestDescriptor(method: "${entry.method}")` + ? ` public static let ${entry.identifier} = MethodDescriptor(method: "${entry.method}")` : ` public static let ${entry.identifier} = NotificationDescriptor<${entry.payload}>(method: "${entry.method}")`, ) .join('\n')} From fa21ad408c82da28036b9d9335c07e1bd7e4756b Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Wed, 24 Jun 2026 16:12:55 +0100 Subject: [PATCH 2/4] Dump API --- platforms/swift/api/ShopifyCheckoutKit.json | 20 +- .../swift/api/ShopifyCheckoutProtocol.json | 2392 ++++++++++++++--- 2 files changed, 2047 insertions(+), 365 deletions(-) diff --git a/platforms/swift/api/ShopifyCheckoutKit.json b/platforms/swift/api/ShopifyCheckoutKit.json index 8cddb3552..d7a546c7f 100644 --- a/platforms/swift/api/ShopifyCheckoutKit.json +++ b/platforms/swift/api/ShopifyCheckoutKit.json @@ -1571,8 +1571,8 @@ "children": [ { "kind": "TypeNominal", - "name": "DelegationDescriptor", - "printedName": "ShopifyCheckoutProtocol.DelegationDescriptor", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", "children": [ { "kind": "TypeNominal", @@ -1587,12 +1587,12 @@ "usr": "s:18ShopifyCheckoutKit16WindowOpenResultO" } ], - "usr": "s:23ShopifyCheckoutProtocol20DelegationDescriptorV" + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" } ], "declKind": "Var", - "usr": "s:18ShopifyCheckoutKit0B8ProtocolO10windowOpen0abD020DelegationDescriptorVyAA06WindowF7RequestVAA0iF6ResultOGvpZ", - "mangledName": "$s18ShopifyCheckoutKit0B8ProtocolO10windowOpen0abD020DelegationDescriptorVyAA06WindowF7RequestVAA0iF6ResultOGvpZ", + "usr": "s:18ShopifyCheckoutKit0B8ProtocolO10windowOpen0abD017RequestDescriptorVyAA06WindowfG0VAA0iF6ResultOGvpZ", + "mangledName": "$s18ShopifyCheckoutKit0B8ProtocolO10windowOpen0abD017RequestDescriptorVyAA06WindowfG0VAA0iF6ResultOGvpZ", "moduleName": "ShopifyCheckoutKit", "static": true, "declAttributes": [ @@ -1610,8 +1610,8 @@ "children": [ { "kind": "TypeNominal", - "name": "DelegationDescriptor", - "printedName": "ShopifyCheckoutProtocol.DelegationDescriptor", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", "children": [ { "kind": "TypeNominal", @@ -1626,12 +1626,12 @@ "usr": "s:18ShopifyCheckoutKit16WindowOpenResultO" } ], - "usr": "s:23ShopifyCheckoutProtocol20DelegationDescriptorV" + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" } ], "declKind": "Accessor", - "usr": "s:18ShopifyCheckoutKit0B8ProtocolO10windowOpen0abD020DelegationDescriptorVyAA06WindowF7RequestVAA0iF6ResultOGvgZ", - "mangledName": "$s18ShopifyCheckoutKit0B8ProtocolO10windowOpen0abD020DelegationDescriptorVyAA06WindowF7RequestVAA0iF6ResultOGvgZ", + "usr": "s:18ShopifyCheckoutKit0B8ProtocolO10windowOpen0abD017RequestDescriptorVyAA06WindowfG0VAA0iF6ResultOGvgZ", + "mangledName": "$s18ShopifyCheckoutKit0B8ProtocolO10windowOpen0abD017RequestDescriptorVyAA06WindowfG0VAA0iF6ResultOGvgZ", "moduleName": "ShopifyCheckoutKit", "static": true, "implicit": true, diff --git a/platforms/swift/api/ShopifyCheckoutProtocol.json b/platforms/swift/api/ShopifyCheckoutProtocol.json index c7a3341b8..b1d9ddb8d 100644 --- a/platforms/swift/api/ShopifyCheckoutProtocol.json +++ b/platforms/swift/api/ShopifyCheckoutProtocol.json @@ -39,6 +39,331 @@ "declKind": "Import", "moduleName": "ShopifyCheckoutProtocol" }, + { + "kind": "TypeDecl", + "name": "AuthRequest", + "printedName": "AuthRequest", + "children": [ + { + "kind": "Var", + "name": "type", + "printedName": "type", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(type:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4typeACSSSg_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4typeACSSSg_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "EventPayload", + "printedName": "EventPayload", + "usr": "s:23ShopifyCheckoutProtocol12EventPayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol12EventPayloadP" + }, + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "AuthResult", + "printedName": "AuthResult", + "children": [ + { + "kind": "Var", + "name": "credential", + "printedName": "credential", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10credentialSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10credentialSSvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10credentialSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10credentialSSvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(credential:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10credentialACSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10credentialACSS_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "throwing": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "ResponsePayload", + "printedName": "ResponsePayload", + "usr": "s:23ShopifyCheckoutProtocol15ResponsePayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol15ResponsePayloadP" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, { "kind": "TypeDecl", "name": "EventPayload", @@ -265,6 +590,70 @@ "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV6methodSSvg", "mangledName": "$s23ShopifyCheckoutProtocol17RequestDescriptorV6methodSSvg", "moduleName": "ShopifyCheckoutProtocol", + "genericSig": "", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "delegation", + "printedName": "delegation", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV10delegationSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol17RequestDescriptorV10delegationSSSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV10delegationSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol17RequestDescriptorV10delegationSSSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "genericSig": "", "implicit": true, "declAttributes": [ "Transparent" @@ -272,12 +661,91 @@ "accessorKind": "get" } ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(method:delegation:decode:)", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "Payload" + }, + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "Result" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(Foundation.Data) -> Payload?", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Payload?", + "children": [ + { + "kind": "TypeNominal", + "name": "GenericTypeParam", + "printedName": "Payload" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ] + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV6method10delegation6decodeACyxq_GSS_SSSgxSg10Foundation4DataVYbctcfc", + "mangledName": "$s23ShopifyCheckoutProtocol17RequestDescriptorV6method10delegation6decodeACyxq_GSS_SSSgxSg10Foundation4DataVYbctcfc", + "moduleName": "ShopifyCheckoutProtocol", + "genericSig": "", + "init_kind": "Designated" } ], "declKind": "Struct", "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV", "mangledName": "$s23ShopifyCheckoutProtocol17RequestDescriptorV", "moduleName": "ShopifyCheckoutProtocol", + "genericSig": "", "conformances": [ { "kind": "Conformance", @@ -311,8 +779,8 @@ }, { "kind": "TypeDecl", - "name": "DelegationDescriptor", - "printedName": "DelegationDescriptor", + "name": "MethodDescriptor", + "printedName": "MethodDescriptor", "children": [ { "kind": "Var", @@ -327,55 +795,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol20DelegationDescriptorV6methodSSvp", - "mangledName": "$s23ShopifyCheckoutProtocol20DelegationDescriptorV6methodSSvp", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "HasStorage" - ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol20DelegationDescriptorV6methodSSvg", - "mangledName": "$s23ShopifyCheckoutProtocol20DelegationDescriptorV6methodSSvg", - "moduleName": "ShopifyCheckoutProtocol", - "genericSig": "", - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "delegation", - "printedName": "delegation", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol20DelegationDescriptorV10delegationSSvp", - "mangledName": "$s23ShopifyCheckoutProtocol20DelegationDescriptorV10delegationSSvp", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV6methodSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol16MethodDescriptorV6methodSSvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -396,10 +817,9 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol20DelegationDescriptorV10delegationSSvg", - "mangledName": "$s23ShopifyCheckoutProtocol20DelegationDescriptorV10delegationSSvg", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV6methodSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol16MethodDescriptorV6methodSSvg", "moduleName": "ShopifyCheckoutProtocol", - "genericSig": "", "implicit": true, "declAttributes": [ "Transparent" @@ -411,78 +831,32 @@ { "kind": "Constructor", "name": "init", - "printedName": "init(method:delegation:decode:)", + "printedName": "init(method:)", "children": [ { "kind": "TypeNominal", - "name": "DelegationDescriptor", - "printedName": "ShopifyCheckoutProtocol.DelegationDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "GenericTypeParam", - "printedName": "Payload" - }, - { - "kind": "TypeNominal", - "name": "GenericTypeParam", - "printedName": "Result" - } - ], - "usr": "s:23ShopifyCheckoutProtocol20DelegationDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" }, { "kind": "TypeNominal", "name": "String", "printedName": "Swift.String", "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(Foundation.Data) -> Payload?", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Payload?", - "children": [ - { - "kind": "TypeNominal", - "name": "GenericTypeParam", - "printedName": "Payload" - } - ], - "usr": "s:Sq" - }, - { - "kind": "TypeNominal", - "name": "Data", - "printedName": "Foundation.Data", - "usr": "s:10Foundation4DataV" - } - ] } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol20DelegationDescriptorV6method10delegation6decodeACyxq_GSS_SSxSg10Foundation4DataVYbctcfc", - "mangledName": "$s23ShopifyCheckoutProtocol20DelegationDescriptorV6method10delegation6decodeACyxq_GSS_SSxSg10Foundation4DataVYbctcfc", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV6methodACSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol16MethodDescriptorV6methodACSS_tcfc", "moduleName": "ShopifyCheckoutProtocol", - "genericSig": "", "init_kind": "Designated" } ], "declKind": "Struct", - "usr": "s:23ShopifyCheckoutProtocol20DelegationDescriptorV", - "mangledName": "$s23ShopifyCheckoutProtocol20DelegationDescriptorV", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV", + "mangledName": "$s23ShopifyCheckoutProtocol16MethodDescriptorV", "moduleName": "ShopifyCheckoutProtocol", - "genericSig": "", "conformances": [ { "kind": "Conformance", @@ -712,6 +1086,102 @@ } ] }, + { + "kind": "Var", + "name": "invalidParamsCode", + "printedName": "invalidParamsCode", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O17invalidParamsCodeSivpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O17invalidParamsCodeSivpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "isInternal": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O17invalidParamsCodeSivgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O17invalidParamsCodeSivgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "isInternal": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "invalidParamsMessage", + "printedName": "invalidParamsMessage", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O20invalidParamsMessageSSvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O20invalidParamsMessageSSvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "isInternal": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O20invalidParamsMessageSSvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O20invalidParamsMessageSSvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "isInternal": true, + "accessorKind": "get" + } + ] + }, { "kind": "TypeDecl", "name": "Options", @@ -1138,6 +1608,85 @@ "static": true, "funcSelfKind": "NonMutating" }, + { + "kind": "Var", + "name": "auth", + "printedName": "auth", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isFromExtension": true, + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, { "kind": "TypeDecl", "name": "Client", @@ -1233,8 +1782,8 @@ }, { "kind": "TypeNominal", - "name": "DelegationDescriptor", - "printedName": "ShopifyCheckoutProtocol.DelegationDescriptor", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", "children": [ { "kind": "TypeNominal", @@ -1247,7 +1796,7 @@ "printedName": "R" } ], - "usr": "s:23ShopifyCheckoutProtocol20DelegationDescriptorV" + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" }, { "kind": "TypeFunc", @@ -1268,8 +1817,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O6ClientV2on_7performAeA20DelegationDescriptorVyxq_G_q_xYaYbScMYcctAA12EventPayloadRzAA08ResponseK0R_r0_lF", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O6ClientV2on_7performAeA20DelegationDescriptorVyxq_G_q_xYaYbScMYcctAA12EventPayloadRzAA08ResponseK0R_r0_lF", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O6ClientV2on_7performAeA17RequestDescriptorVyxq_G_q_xYaYbScMYcctAA12EventPayloadRzAA08ResponseK0R_r0_lF", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O6ClientV2on_7performAeA17RequestDescriptorVyxq_G_q_xYaYbScMYcctAA12EventPayloadRzAA08ResponseK0R_r0_lF", "moduleName": "ShopifyCheckoutProtocol", "genericSig": "", "declAttributes": [ @@ -1347,53 +1896,83 @@ ] }, { - "kind": "Function", - "name": "acknowledgeReady", - "printedName": "acknowledgeReady(_:supportedDelegations:)", + "kind": "Var", + "name": "fulfillmentAddressChange", + "printedName": "fulfillmentAddressChange", "children": [ { "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", "children": [ { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "Array", - "printedName": "[Swift.String]", - "children": [ + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "AddressChangeResult", + "printedName": "ShopifyCheckoutProtocol.AddressChangeResult", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV" } ], - "hasDefaultArg": true, - "usr": "s:Sa" + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" } ], - "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O16acknowledgeReady_20supportedDelegationsSSSgSS_SaySSGtFZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O16acknowledgeReady_20supportedDelegationsSSSgSS_SaySSGtFZ", + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], "isFromExtension": true, - "funcSelfKind": "NonMutating" + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "AddressChangeResult", + "printedName": "ShopifyCheckoutProtocol.AddressChangeResult", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] }, { "kind": "TypeDecl", @@ -1407,14 +1986,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA17RequestDescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA17RequestDescriptorVvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA16MethodDescriptorVvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA16MethodDescriptorVvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -1431,14 +2010,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA17RequestDescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA17RequestDescriptorVvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA16MethodDescriptorVvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA16MethodDescriptorVvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -1456,14 +2035,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA17RequestDescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA17RequestDescriptorVvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA16MethodDescriptorVvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA16MethodDescriptorVvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -1480,14 +2059,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA17RequestDescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA17RequestDescriptorVvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA16MethodDescriptorVvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA16MethodDescriptorVvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -2025,14 +2604,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA0I10DescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA0I10DescriptorVvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA16MethodDescriptorVvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA16MethodDescriptorVvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -2049,14 +2628,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA0I10DescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA0I10DescriptorVvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA16MethodDescriptorVvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA16MethodDescriptorVvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -2074,14 +2653,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA0H10DescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA0H10DescriptorVvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA16MethodDescriptorVvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA16MethodDescriptorVvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -2098,14 +2677,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA0H10DescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA0H10DescriptorVvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA16MethodDescriptorVvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA16MethodDescriptorVvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -2123,14 +2702,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA0H10DescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA0H10DescriptorVvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA16MethodDescriptorVvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA16MethodDescriptorVvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -2147,14 +2726,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA0H10DescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA0H10DescriptorVvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA16MethodDescriptorVvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA16MethodDescriptorVvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -2237,14 +2816,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA0I10DescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA0I10DescriptorVvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA16MethodDescriptorVvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA16MethodDescriptorVvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -2261,14 +2840,14 @@ "children": [ { "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + "name": "MethodDescriptor", + "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", + "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA0I10DescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA0I10DescriptorVvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA16MethodDescriptorVvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA16MethodDescriptorVvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -2729,223 +3308,886 @@ ] }, { - "kind": "TypeAlias", - "name": "ExtendedGraphemeClusterLiteralType", - "printedName": "ExtendedGraphemeClusterLiteralType", + "kind": "TypeAlias", + "name": "ExtendedGraphemeClusterLiteralType", + "printedName": "ExtendedGraphemeClusterLiteralType", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "TypeAlias", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV34ExtendedGraphemeClusterLiteralTypea", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV34ExtendedGraphemeClusterLiteralTypea", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true + }, + { + "kind": "TypeAlias", + "name": "RawValue", + "printedName": "RawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "TypeAlias", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV8RawValuea", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV8RawValuea", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true + }, + { + "kind": "TypeAlias", + "name": "StringLiteralType", + "printedName": "StringLiteralType", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "TypeAlias", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV17StringLiteralTypea", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV17StringLiteralTypea", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true + }, + { + "kind": "TypeAlias", + "name": "UnicodeScalarLiteralType", + "printedName": "UnicodeScalarLiteralType", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "TypeAlias", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV24UnicodeScalarLiteralTypea", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV24UnicodeScalarLiteralTypea", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "conformances": [ + { + "kind": "Conformance", + "name": "RawRepresentable", + "printedName": "RawRepresentable", + "children": [ + { + "kind": "TypeWitness", + "name": "RawValue", + "printedName": "RawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ] + } + ], + "usr": "s:SY", + "mangledName": "$sSY" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "ExpressibleByStringLiteral", + "printedName": "ExpressibleByStringLiteral", + "children": [ + { + "kind": "TypeWitness", + "name": "StringLiteralType", + "printedName": "StringLiteralType", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ] + } + ], + "usr": "s:s26ExpressibleByStringLiteralP", + "mangledName": "$ss26ExpressibleByStringLiteralP" + }, + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "ExpressibleByExtendedGraphemeClusterLiteral", + "printedName": "ExpressibleByExtendedGraphemeClusterLiteral", + "children": [ + { + "kind": "TypeWitness", + "name": "ExtendedGraphemeClusterLiteralType", + "printedName": "ExtendedGraphemeClusterLiteralType", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ] + } + ], + "usr": "s:s43ExpressibleByExtendedGraphemeClusterLiteralP", + "mangledName": "$ss43ExpressibleByExtendedGraphemeClusterLiteralP" + }, + { + "kind": "Conformance", + "name": "ExpressibleByUnicodeScalarLiteral", + "printedName": "ExpressibleByUnicodeScalarLiteral", + "children": [ + { + "kind": "TypeWitness", + "name": "UnicodeScalarLiteralType", + "printedName": "UnicodeScalarLiteralType", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ] + } + ], + "usr": "s:s33ExpressibleByUnicodeScalarLiteralP", + "mangledName": "$ss33ExpressibleByUnicodeScalarLiteralP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "Var", + "name": "paymentInstrumentsChange", + "printedName": "paymentInstrumentsChange", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResult", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResult", + "usr": "s:23ShopifyCheckoutProtocol23InstrumentsChangeResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isFromExtension": true, + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResult", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResult", + "usr": "s:23ShopifyCheckoutProtocol23InstrumentsChangeResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "paymentCredential", + "printedName": "paymentCredential", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "CredentialResult", + "printedName": "ShopifyCheckoutProtocol.CredentialResult", + "usr": "s:23ShopifyCheckoutProtocol16CredentialResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isFromExtension": true, + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "CredentialResult", + "printedName": "ShopifyCheckoutProtocol.CredentialResult", + "usr": "s:23ShopifyCheckoutProtocol16CredentialResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "ready", + "printedName": "ready", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", "children": [ { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "TypeAlias", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV34ExtendedGraphemeClusterLiteralTypea", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV34ExtendedGraphemeClusterLiteralTypea", - "moduleName": "ShopifyCheckoutProtocol", - "implicit": true - }, - { - "kind": "TypeAlias", - "name": "RawValue", - "printedName": "RawValue", - "children": [ + "name": "ReadyRequest", + "printedName": "ShopifyCheckoutProtocol.ReadyRequest", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" + }, { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" } ], - "declKind": "TypeAlias", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV8RawValuea", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV8RawValuea", - "moduleName": "ShopifyCheckoutProtocol", - "implicit": true - }, + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isFromExtension": true, + "isLet": true, + "hasStorage": true, + "accessors": [ { - "kind": "TypeAlias", - "name": "StringLiteralType", - "printedName": "StringLiteralType", + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", "children": [ { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyRequest", + "printedName": "ShopifyCheckoutProtocol.ReadyRequest", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" + }, + { + "kind": "TypeNominal", + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" } ], - "declKind": "TypeAlias", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV17StringLiteralTypea", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV17StringLiteralTypea", + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvgZ", "moduleName": "ShopifyCheckoutProtocol", - "implicit": true - }, + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + } + ], + "declKind": "Enum", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O", + "moduleName": "ShopifyCheckoutProtocol", + "isEnumExhaustive": true, + "conformances": [ + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "AddressChangeCheckout", + "printedName": "AddressChangeCheckout", + "children": [ + { + "kind": "Var", + "name": "fulfillment", + "printedName": "fulfillment", + "children": [ { - "kind": "TypeAlias", - "name": "UnicodeScalarLiteralType", - "printedName": "UnicodeScalarLiteralType", + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Fulfillment?", "children": [ { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "Fulfillment", + "printedName": "ShopifyCheckoutProtocol.Fulfillment", + "usr": "s:23ShopifyCheckoutProtocol11FulfillmentV" } ], - "declKind": "TypeAlias", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV24UnicodeScalarLiteralTypea", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV24UnicodeScalarLiteralTypea", - "moduleName": "ShopifyCheckoutProtocol", - "implicit": true + "usr": "s:Sq" } ], - "declKind": "Struct", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O10DelegationV", + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V11fulfillmentAA11FulfillmentVSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol013AddressChangeB0V11fulfillmentAA11FulfillmentVSgvp", "moduleName": "ShopifyCheckoutProtocol", - "isFromExtension": true, - "conformances": [ + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ { - "kind": "Conformance", - "name": "RawRepresentable", - "printedName": "RawRepresentable", + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", "children": [ { - "kind": "TypeWitness", - "name": "RawValue", - "printedName": "RawValue", + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Fulfillment?", "children": [ { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "Fulfillment", + "printedName": "ShopifyCheckoutProtocol.Fulfillment", + "usr": "s:23ShopifyCheckoutProtocol11FulfillmentV" } - ] + ], + "usr": "s:Sq" } ], - "usr": "s:SY", - "mangledName": "$sSY" - }, - { - "kind": "Conformance", - "name": "Hashable", - "printedName": "Hashable", - "usr": "s:SH", - "mangledName": "$sSH" - }, + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V11fulfillmentAA11FulfillmentVSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol013AddressChangeB0V11fulfillmentAA11FulfillmentVSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fulfillment:)", + "children": [ { - "kind": "Conformance", - "name": "Sendable", - "printedName": "Sendable", - "usr": "s:s8SendableP", - "mangledName": "$ss8SendableP" + "kind": "TypeNominal", + "name": "AddressChangeCheckout", + "printedName": "ShopifyCheckoutProtocol.AddressChangeCheckout", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V" }, { - "kind": "Conformance", - "name": "ExpressibleByStringLiteral", - "printedName": "ExpressibleByStringLiteral", + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Fulfillment?", "children": [ { - "kind": "TypeWitness", - "name": "StringLiteralType", - "printedName": "StringLiteralType", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ] + "kind": "TypeNominal", + "name": "Fulfillment", + "printedName": "ShopifyCheckoutProtocol.Fulfillment", + "usr": "s:23ShopifyCheckoutProtocol11FulfillmentV" } ], - "usr": "s:s26ExpressibleByStringLiteralP", - "mangledName": "$ss26ExpressibleByStringLiteralP" - }, + "usr": "s:Sq" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V11fulfillmentAcA11FulfillmentVSg_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol013AddressChangeB0V11fulfillmentAcA11FulfillmentVSg_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ { - "kind": "Conformance", - "name": "Equatable", - "printedName": "Equatable", - "usr": "s:SQ", - "mangledName": "$sSQ" + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" }, { - "kind": "Conformance", - "name": "SendableMetatype", - "printedName": "SendableMetatype", - "usr": "s:s16SendableMetatypeP", - "mangledName": "$ss16SendableMetatypeP" + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol013AddressChangeB0V6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AddressChangeCheckout", + "printedName": "ShopifyCheckoutProtocol.AddressChangeCheckout", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V" }, { - "kind": "Conformance", - "name": "ExpressibleByExtendedGraphemeClusterLiteral", - "printedName": "ExpressibleByExtendedGraphemeClusterLiteral", + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol013AddressChangeB0V4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V", + "mangledName": "$s23ShopifyCheckoutProtocol013AddressChangeB0V", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "AddressChangeResult", + "printedName": "AddressChangeResult", + "children": [ + { + "kind": "Var", + "name": "checkout", + "printedName": "checkout", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.AddressChangeCheckout?", "children": [ { - "kind": "TypeWitness", - "name": "ExtendedGraphemeClusterLiteralType", - "printedName": "ExtendedGraphemeClusterLiteralType", + "kind": "TypeNominal", + "name": "AddressChangeCheckout", + "printedName": "ShopifyCheckoutProtocol.AddressChangeCheckout", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV8checkoutAA0deB0VSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol19AddressChangeResultV8checkoutAA0deB0VSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.AddressChangeCheckout?", "children": [ { "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" + "name": "AddressChangeCheckout", + "printedName": "ShopifyCheckoutProtocol.AddressChangeCheckout", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V" } - ] + ], + "usr": "s:Sq" } ], - "usr": "s:s43ExpressibleByExtendedGraphemeClusterLiteralP", - "mangledName": "$ss43ExpressibleByExtendedGraphemeClusterLiteralP" + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV8checkoutAA0deB0VSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol19AddressChangeResultV8checkoutAA0deB0VSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "ucp", + "printedName": "ucp", + "children": [ + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV3ucpAA011InstrumentseF3UcpVvp", + "mangledName": "$s23ShopifyCheckoutProtocol19AddressChangeResultV3ucpAA011InstrumentseF3UcpVvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV3ucpAA011InstrumentseF3UcpVvg", + "mangledName": "$s23ShopifyCheckoutProtocol19AddressChangeResultV3ucpAA011InstrumentseF3UcpVvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(checkout:ucp:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AddressChangeResult", + "printedName": "ShopifyCheckoutProtocol.AddressChangeResult", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV" }, { - "kind": "Conformance", - "name": "ExpressibleByUnicodeScalarLiteral", - "printedName": "ExpressibleByUnicodeScalarLiteral", + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.AddressChangeCheckout?", "children": [ { - "kind": "TypeWitness", - "name": "UnicodeScalarLiteralType", - "printedName": "UnicodeScalarLiteralType", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ] + "kind": "TypeNominal", + "name": "AddressChangeCheckout", + "printedName": "ShopifyCheckoutProtocol.AddressChangeCheckout", + "usr": "s:23ShopifyCheckoutProtocol013AddressChangeB0V" } ], - "usr": "s:s33ExpressibleByUnicodeScalarLiteralP", - "mangledName": "$ss33ExpressibleByUnicodeScalarLiteralP" + "usr": "s:Sq" }, { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV8checkout3ucpAcA0deB0VSg_AA011InstrumentseF3UcpVtcfc", + "mangledName": "$s23ShopifyCheckoutProtocol19AddressChangeResultV8checkout3ucpAcA0deB0VSg_AA011InstrumentseF3UcpVtcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" }, { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" } - ] + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol19AddressChangeResultV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" } ], - "declKind": "Enum", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O", + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV", + "mangledName": "$s23ShopifyCheckoutProtocol19AddressChangeResultV", "moduleName": "ShopifyCheckoutProtocol", - "isEnumExhaustive": true, "conformances": [ + { + "kind": "Conformance", + "name": "ResponsePayload", + "printedName": "ResponsePayload", + "usr": "s:23ShopifyCheckoutProtocol15ResponsePayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol15ResponsePayloadP" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, { "kind": "Conformance", "name": "Copyable", @@ -60096,6 +61338,13 @@ "printedName": "Escapable", "usr": "s:s9EscapableP", "mangledName": "$ss9EscapableP" + }, + { + "kind": "Conformance", + "name": "ResponsePayload", + "printedName": "ResponsePayload", + "usr": "s:23ShopifyCheckoutProtocol15ResponsePayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol15ResponsePayloadP" } ] }, @@ -67976,6 +69225,13 @@ "printedName": "Escapable", "usr": "s:s9EscapableP", "mangledName": "$ss9EscapableP" + }, + { + "kind": "Conformance", + "name": "ResponsePayload", + "printedName": "ResponsePayload", + "usr": "s:23ShopifyCheckoutProtocol15ResponsePayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol15ResponsePayloadP" } ] }, @@ -68765,6 +70021,432 @@ "mangledName": "$ss9EscapableP" } ] + }, + { + "kind": "TypeDecl", + "name": "ReadyRequest", + "printedName": "ReadyRequest", + "children": [ + { + "kind": "Var", + "name": "delegate", + "printedName": "delegate", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV8delegateSaySSGvp", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV8delegateSaySSGvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV8delegateSaySSGvg", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV8delegateSaySSGvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(delegate:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyRequest", + "printedName": "ShopifyCheckoutProtocol.ReadyRequest", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "hasDefaultArg": true, + "usr": "s:Sa" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV8delegateACSaySSG_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV8delegateACSaySSG_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyRequest", + "printedName": "ShopifyCheckoutProtocol.ReadyRequest", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "throwing": true, + "init_kind": "Designated" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "EventPayload", + "printedName": "EventPayload", + "usr": "s:23ShopifyCheckoutProtocol12EventPayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol12EventPayloadP" + }, + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "ReadyResult", + "printedName": "ReadyResult", + "children": [ + { + "kind": "Var", + "name": "delegate", + "printedName": "delegate", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8delegateSaySSGvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8delegateSaySSGvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8delegateSaySSGvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8delegateSaySSGvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "credential", + "printedName": "credential", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(delegate:credential:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" + }, + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "hasDefaultArg": true, + "usr": "s:Sa" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8delegate10credentialACSaySSG_SSSgtcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8delegate10credentialACSaySSG_SSSgtcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "throwing": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "ResponsePayload", + "printedName": "ResponsePayload", + "usr": "s:23ShopifyCheckoutProtocol15ResponsePayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol15ResponsePayloadP" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] } ], "json_format_version": 8 From 72b2a585afe09f10783b16fab0606ae0b3ea0227 Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Wed, 24 Jun 2026 17:47:24 +0100 Subject: [PATCH 3/4] Generate request defs --- .../ShopifyCheckoutKit/CheckoutWebView.swift | 13 +- .../CheckoutWebViewTests.swift | 5 +- .../swift/api/ShopifyCheckoutProtocol.json | 8176 ++++++++++++++--- .../ShopifyCheckoutProtocol/Auth.swift | 27 +- .../EmbeddedCheckoutProtocol+Codec.swift | 10 - .../Generated/Models.swift | 557 +- .../ShopifyCheckoutProtocol/Ready.swift | 41 +- .../ShopifyCheckoutProtocol/UCPResponse.swift | 13 + .../ClientTests.swift | 64 +- .../CodecEncodeTests.swift | 45 +- protocol/scripts/generate_models.mjs | 108 +- 11 files changed, 7821 insertions(+), 1238 deletions(-) create mode 100644 protocol/languages/swift/Sources/ShopifyCheckoutProtocol/UCPResponse.swift diff --git a/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutWebView.swift b/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutWebView.swift index f3da03147..0c5cb3601 100644 --- a/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutWebView.swift +++ b/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutWebView.swift @@ -224,9 +224,11 @@ class CheckoutWebView: WKWebView { var openExternalURL: (URL) -> Void = { UIApplication.shared.open($0) } /// Kit-owned client that handles delegations and kit-mandated notifications. Currently: - /// - `ec.ready` - kit-owned handshake. The kit negotiates the supported - /// delegations and answers authoritatively; it is abstracted from consumers - /// and cannot be overridden by a merchant-supplied client. + /// - `ec.ready` - kit-owned handshake. Supported delegations are announced up + /// front via the `ec_delegate` URL query param; acceptance is implicit, so the + /// ready result carries only the UCP envelope and the kit simply answers the + /// delegated calls it supports. It is abstracted from consumers and cannot be + /// overridden by a merchant-supplied client. /// - `window.open` - falls back to `UIApplication.shared.open(...)` after a /// `canOpenURL` check (consumers may still override via their own client). /// - `ec.error` - when the payload carries `severity: "unrecoverable"`, dismiss @@ -234,9 +236,8 @@ class CheckoutWebView: WKWebView { /// resource exists to act on, so consumers don't have to wire dismissal in /// every error handler. lazy var defaultsClient: CheckoutProtocol.Client = .init() - .on(CheckoutProtocol.ready) { request in - let supported = Set(CheckoutProtocol.defaultDelegations.map(\.rawValue)) - return ReadyResult(delegate: request.delegate.filter { supported.contains($0) }) + .on(CheckoutProtocol.ready) { _ in + ReadyResult(checkout: nil, credential: nil, ucp: .success(), upgrade: nil, continueURL: nil, messages: nil) } .on(CheckoutProtocol.complete) { _ in CheckoutWebView.invalidate(disconnect: false) diff --git a/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutWebViewTests.swift b/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutWebViewTests.swift index 4961ccbb3..f9bbc3a18 100644 --- a/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutWebViewTests.swift +++ b/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutWebViewTests.swift @@ -523,7 +523,7 @@ class CheckoutWebViewTests: XCTestCase { // MARK: - ec.ready handshake @MainActor - func testReadyHandshakeNegotiatesSupportedDelegations() async throws { + func testReadyHandshakeRespondsWithUCPEnvelope() async throws { let id = "req-ready-1" let body = #"{"jsonrpc":"2.0","method":"ec.ready","id":"\#(id)","params":{"delegate":["window.open","payment.credential"]}}"# @@ -546,8 +546,7 @@ class CheckoutWebViewTests: XCTestCase { let ucp = try XCTUnwrap(result["ucp"] as? [String: Any]) XCTAssertEqual(ucp["status"] as? String, "success") XCTAssertEqual(ucp["version"] as? String, EmbeddedCheckoutProtocol.specVersion) - let delegate = try XCTUnwrap(result["delegate"] as? [String]) - XCTAssertEqual(delegate, ["window.open"], "Kit negotiates requested delegations down to its defaults") + XCTAssertNil(result["delegate"], "Ready response no longer echoes a delegate list; delegations are announced via the ec_delegate URL param") } @MainActor diff --git a/platforms/swift/api/ShopifyCheckoutProtocol.json b/platforms/swift/api/ShopifyCheckoutProtocol.json index b1d9ddb8d..6bd0f579c 100644 --- a/platforms/swift/api/ShopifyCheckoutProtocol.json +++ b/platforms/swift/api/ShopifyCheckoutProtocol.json @@ -39,331 +39,6 @@ "declKind": "Import", "moduleName": "ShopifyCheckoutProtocol" }, - { - "kind": "TypeDecl", - "name": "AuthRequest", - "printedName": "AuthRequest", - "children": [ - { - "kind": "Var", - "name": "type", - "printedName": "type", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvp", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "HasStorage" - ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvg", - "moduleName": "ShopifyCheckoutProtocol", - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(type:)", - "children": [ - { - "kind": "TypeNominal", - "name": "AuthRequest", - "printedName": "ShopifyCheckoutProtocol.AuthRequest", - "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "hasDefaultArg": true, - "usr": "s:Sq" - } - ], - "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4typeACSSSg_tcfc", - "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4typeACSSSg_tcfc", - "moduleName": "ShopifyCheckoutProtocol", - "init_kind": "Designated" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(from:)", - "children": [ - { - "kind": "TypeNominal", - "name": "AuthRequest", - "printedName": "ShopifyCheckoutProtocol.AuthRequest", - "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" - }, - { - "kind": "TypeNominal", - "name": "Decoder", - "printedName": "any Swift.Decoder", - "usr": "s:s7DecoderP" - } - ], - "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4fromACs7Decoder_p_tKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4fromACs7Decoder_p_tKcfc", - "moduleName": "ShopifyCheckoutProtocol", - "implicit": true, - "throwing": true, - "init_kind": "Designated" - } - ], - "declKind": "Struct", - "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV", - "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV", - "moduleName": "ShopifyCheckoutProtocol", - "conformances": [ - { - "kind": "Conformance", - "name": "EventPayload", - "printedName": "EventPayload", - "usr": "s:23ShopifyCheckoutProtocol12EventPayloadP", - "mangledName": "$s23ShopifyCheckoutProtocol12EventPayloadP" - }, - { - "kind": "Conformance", - "name": "Decodable", - "printedName": "Decodable", - "usr": "s:Se", - "mangledName": "$sSe" - }, - { - "kind": "Conformance", - "name": "Sendable", - "printedName": "Sendable", - "usr": "s:s8SendableP", - "mangledName": "$ss8SendableP" - }, - { - "kind": "Conformance", - "name": "SendableMetatype", - "printedName": "SendableMetatype", - "usr": "s:s16SendableMetatypeP", - "mangledName": "$ss16SendableMetatypeP" - }, - { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" - }, - { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" - } - ] - }, - { - "kind": "TypeDecl", - "name": "AuthResult", - "printedName": "AuthResult", - "children": [ - { - "kind": "Var", - "name": "credential", - "printedName": "credential", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10credentialSSvp", - "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10credentialSSvp", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "HasStorage" - ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10credentialSSvg", - "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10credentialSSvg", - "moduleName": "ShopifyCheckoutProtocol", - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(credential:)", - "children": [ - { - "kind": "TypeNominal", - "name": "AuthResult", - "printedName": "ShopifyCheckoutProtocol.AuthResult", - "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10credentialACSS_tcfc", - "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10credentialACSS_tcfc", - "moduleName": "ShopifyCheckoutProtocol", - "init_kind": "Designated" - }, - { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" - } - ], - "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol10AuthResultV6encode2toys7Encoder_p_tKF", - "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV6encode2toys7Encoder_p_tKF", - "moduleName": "ShopifyCheckoutProtocol", - "throwing": true, - "funcSelfKind": "NonMutating" - } - ], - "declKind": "Struct", - "usr": "s:23ShopifyCheckoutProtocol10AuthResultV", - "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV", - "moduleName": "ShopifyCheckoutProtocol", - "conformances": [ - { - "kind": "Conformance", - "name": "ResponsePayload", - "printedName": "ResponsePayload", - "usr": "s:23ShopifyCheckoutProtocol15ResponsePayloadP", - "mangledName": "$s23ShopifyCheckoutProtocol15ResponsePayloadP" - }, - { - "kind": "Conformance", - "name": "Encodable", - "printedName": "Encodable", - "usr": "s:SE", - "mangledName": "$sSE" - }, - { - "kind": "Conformance", - "name": "Sendable", - "printedName": "Sendable", - "usr": "s:s8SendableP", - "mangledName": "$ss8SendableP" - }, - { - "kind": "Conformance", - "name": "SendableMetatype", - "printedName": "SendableMetatype", - "usr": "s:s16SendableMetatypeP", - "mangledName": "$ss16SendableMetatypeP" - }, - { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" - }, - { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" - } - ] - }, { "kind": "TypeDecl", "name": "EventPayload", @@ -55097,12 +54772,12 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]", "children": [ { "kind": "TypeNominal", @@ -55113,13 +54788,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]", + "printedName": "[ShopifyCheckoutProtocol.Service]", "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" } ], "usr": "s:Sa" @@ -55132,8 +54807,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV8servicesSDySSSayAA0deF7ServiceVGGSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV8servicesSDySSSayAA0deF7ServiceVGGSgvp", + "usr": "s:23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV8servicesSDySSSayAA7ServiceVGGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV8servicesSDySSSayAA7ServiceVGGSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -55149,12 +54824,12 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]", "children": [ { "kind": "TypeNominal", @@ -55165,13 +54840,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]", + "printedName": "[ShopifyCheckoutProtocol.Service]", "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" } ], "usr": "s:Sa" @@ -55184,8 +54859,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV8servicesSDySSSayAA0deF7ServiceVGGSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV8servicesSDySSSayAA0deF7ServiceVGGSgvg", + "usr": "s:23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV8servicesSDySSSayAA7ServiceVGGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV8servicesSDySSSayAA7ServiceVGGSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -55930,12 +55605,12 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]", "children": [ { "kind": "TypeNominal", @@ -55946,13 +55621,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]", + "printedName": "[ShopifyCheckoutProtocol.Service]", "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" } ], "usr": "s:Sa" @@ -55985,8 +55660,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityeF0VGGSg_SDySSSayAA014PaymentHandlereF0VGGSgSDySSSayAA0deF7ServiceVGGSgAA011UCPCheckouteF6StatusOSgSStcfc", - "mangledName": "$s23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityeF0VGGSg_SDySSSayAA014PaymentHandlereF0VGGSgSDySSSayAA0deF7ServiceVGGSgAA011UCPCheckouteF6StatusOSgSStcfc", + "usr": "s:23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityeF0VGGSg_SDySSSayAA014PaymentHandlereF0VGGSgSDySSSayAA7ServiceVGGSgAA011UCPCheckouteF6StatusOSgSStcfc", + "mangledName": "$s23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityeF0VGGSg_SDySSSayAA014PaymentHandlereF0VGGSgSDySSSayAA7ServiceVGGSgAA011UCPCheckouteF6StatusOSgSStcfc", "moduleName": "ShopifyCheckoutProtocol", "init_kind": "Designated" }, @@ -56230,17 +55905,17 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]??", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]??", "children": [ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]", "children": [ { "kind": "TypeNominal", @@ -56251,13 +55926,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]", + "printedName": "[ShopifyCheckoutProtocol.Service]", "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" } ], "usr": "s:Sa" @@ -56312,8 +55987,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityeF0VGGSgSg_SDySSSayAA014PaymentHandlereF0VGGSgSgSDySSSayAA0deF7ServiceVGGSgSgAA011UCPCheckouteF6StatusOSgSgSSSgtF", - "mangledName": "$s23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityeF0VGGSgSg_SDySSSayAA014PaymentHandlereF0VGGSgSgSDySSSayAA0deF7ServiceVGGSgSgAA011UCPCheckouteF6StatusOSgSgSSSgtF", + "usr": "s:23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityeF0VGGSgSg_SDySSSayAA014PaymentHandlereF0VGGSgSgSDySSSayAA7ServiceVGGSgSgAA011UCPCheckouteF6StatusOSgSgSSSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol22UCPOrderResponseSchemaV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityeF0VGGSgSg_SDySSSayAA014PaymentHandlereF0VGGSgSgSDySSSayAA7ServiceVGGSgSgAA011UCPCheckouteF6StatusOSgSgSSSgtF", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "funcSelfKind": "NonMutating" @@ -56425,8 +56100,8 @@ }, { "kind": "TypeDecl", - "name": "UCPOrderResponseSchemaService", - "printedName": "UCPOrderResponseSchemaService", + "name": "Service", + "printedName": "Service", "children": [ { "kind": "Var", @@ -56463,8 +56138,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6configSDySSAA7JSONAnyCGSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6configSDySSAA7JSONAnyCGSgvp", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV6configSDySSAA7JSONAnyCGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV6configSDySSAA7JSONAnyCGSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -56507,8 +56182,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6configSDySSAA7JSONAnyCGSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6configSDySSAA7JSONAnyCGSgvg", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV6configSDySSAA7JSONAnyCGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV6configSDySSAA7JSONAnyCGSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -56539,8 +56214,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV2idSSSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV2idSSSgvp", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV2idSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV2idSSSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -56569,8 +56244,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV2idSSSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV2idSSSgvg", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV2idSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV2idSSSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -56601,8 +56276,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6schemaSSSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6schemaSSSgvp", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV6schemaSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV6schemaSSSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -56631,8 +56306,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6schemaSSSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6schemaSSSgvg", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV6schemaSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV6schemaSSSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -56663,8 +56338,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV4specSSSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV4specSSSgvp", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV4specSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV4specSSSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -56693,8 +56368,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV4specSSSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV4specSSSgvg", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV4specSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV4specSSSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -56717,8 +56392,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV7versionSSvp", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV7versionSSvp", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV7versionSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV7versionSSvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -56739,8 +56414,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV7versionSSvg", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV7versionSSvg", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV7versionSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV7versionSSvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -56771,8 +56446,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV8endpointSSSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV8endpointSSSgvp", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV8endpointSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV8endpointSSSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -56801,8 +56476,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV8endpointSSSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV8endpointSSSgvg", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV8endpointSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV8endpointSSSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -56825,8 +56500,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV9transportAA9TransportOvp", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV9transportAA9TransportOvp", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV9transportAA9TransportOvp", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV9transportAA9TransportOvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -56847,8 +56522,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV9transportAA9TransportOvg", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV9transportAA9TransportOvg", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV9transportAA9TransportOvg", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV9transportAA9TransportOvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -56865,9 +56540,9 @@ "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" }, { "kind": "TypeNominal", @@ -56967,8 +56642,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSg_SSSgA2OSSAoA9TransportOtcfc", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSg_SSSgA2OSSAoA9TransportOtcfc", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSg_SSSgA2OSSAoA9TransportOtcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSg_SSSgA2OSSAoA9TransportOtcfc", "moduleName": "ShopifyCheckoutProtocol", "init_kind": "Designated" }, @@ -56990,8 +56665,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6encode2toys7Encoder_p_tKF", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV6encode2toys7Encoder_p_tKF", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV6encode2toys7Encoder_p_tKF", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "throwing": true, @@ -57004,9 +56679,9 @@ "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" }, { "kind": "TypeNominal", @@ -57016,8 +56691,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV4fromACs7Decoder_p_tKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV4fromACs7Decoder_p_tKcfc", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV4fromACs7Decoder_p_tKcfc", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "throwing": true, @@ -57030,9 +56705,9 @@ "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" }, { "kind": "TypeNominal", @@ -57042,8 +56717,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV4dataAC10Foundation4DataV_tKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV4dataAC10Foundation4DataV_tKcfc", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV4dataAC10Foundation4DataV_tKcfc", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -57056,9 +56731,9 @@ "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" }, { "kind": "TypeNominal", @@ -57075,8 +56750,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV_5usingACSS_SS10FoundationE8EncodingVtKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV_5usingACSS_SS10FoundationE8EncodingVtKcfc", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -57089,9 +56764,9 @@ "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" }, { "kind": "TypeNominal", @@ -57101,8 +56776,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV7fromURLAC10Foundation0I0V_tKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV7fromURLAC10Foundation0I0V_tKcfc", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV7fromURLAC10Foundation0F0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV7fromURLAC10Foundation0F0V_tKcfc", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -57115,9 +56790,9 @@ "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" }, { "kind": "TypeNominal", @@ -57280,8 +56955,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV4with6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSgSg_SSSgSgA2rqrA9TransportOSgtF", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV4with6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSgSg_SSSgSgA2rqrA9TransportOSgtF", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV4with6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSgSg_SSSgSgA2rqrA9TransportOSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV4with6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSgSg_SSSgSgA2rqrA9TransportOSgtF", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "funcSelfKind": "NonMutating" @@ -57299,8 +56974,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV8jsonData10Foundation0I0VyKF", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV8jsonData10Foundation0I0VyKF", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV8jsonData10Foundation0F0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV8jsonData10Foundation0F0VyKF", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -57334,8 +57009,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -57343,8 +57018,8 @@ } ], "declKind": "Struct", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV", - "mangledName": "$s23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV", + "mangledName": "$s23ShopifyCheckoutProtocol7ServiceV", "moduleName": "ShopifyCheckoutProtocol", "conformances": [ { @@ -58638,12 +58313,12 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]", "children": [ { "kind": "TypeNominal", @@ -58654,13 +58329,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]", + "printedName": "[ShopifyCheckoutProtocol.Service]", "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" } ], "usr": "s:Sa" @@ -58673,8 +58348,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV8servicesSDySSSayAA08UCPOrderE13SchemaServiceVGGSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV8servicesSDySSSayAA08UCPOrderE13SchemaServiceVGGSgvp", + "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV8servicesSDySSSayAA7ServiceVGGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV8servicesSDySSSayAA7ServiceVGGSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -58690,12 +58365,12 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]", "children": [ { "kind": "TypeNominal", @@ -58706,13 +58381,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]", + "printedName": "[ShopifyCheckoutProtocol.Service]", "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" } ], "usr": "s:Sa" @@ -58725,8 +58400,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV8servicesSDySSSayAA08UCPOrderE13SchemaServiceVGGSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV8servicesSDySSSayAA08UCPOrderE13SchemaServiceVGGSgvg", + "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV8servicesSDySSSayAA7ServiceVGGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV8servicesSDySSSayAA7ServiceVGGSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -58743,14 +58418,14 @@ "children": [ { "kind": "TypeNominal", - "name": "StatusEnum", - "printedName": "ShopifyCheckoutProtocol.StatusEnum", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO" + "name": "ErrorStatus", + "printedName": "ShopifyCheckoutProtocol.ErrorStatus", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV6statusAA10StatusEnumOvp", - "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV6statusAA10StatusEnumOvp", + "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV6statusAA0D6StatusOvp", + "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV6statusAA0D6StatusOvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -58765,14 +58440,14 @@ "children": [ { "kind": "TypeNominal", - "name": "StatusEnum", - "printedName": "ShopifyCheckoutProtocol.StatusEnum", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO" + "name": "ErrorStatus", + "printedName": "ShopifyCheckoutProtocol.ErrorStatus", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV6statusAA10StatusEnumOvg", - "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV6statusAA10StatusEnumOvg", + "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV6statusAA0D6StatusOvg", + "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV6statusAA0D6StatusOvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -59455,12 +59130,12 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]", "children": [ { "kind": "TypeNominal", @@ -59471,13 +59146,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]", + "printedName": "[ShopifyCheckoutProtocol.Service]", "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" } ], "usr": "s:Sa" @@ -59490,9 +59165,9 @@ }, { "kind": "TypeNominal", - "name": "StatusEnum", - "printedName": "ShopifyCheckoutProtocol.StatusEnum", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO" + "name": "ErrorStatus", + "printedName": "ShopifyCheckoutProtocol.ErrorStatus", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO" }, { "kind": "TypeNominal", @@ -59502,8 +59177,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityE6SchemaVGGSg_SDySSSayAA014PaymentHandlereN0VGGSgSDySSSayAA08UCPOrdereN7ServiceVGGSgAA10StatusEnumOSStcfc", - "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityE6SchemaVGGSg_SDySSSayAA014PaymentHandlereN0VGGSgSDySSSayAA08UCPOrdereN7ServiceVGGSgAA10StatusEnumOSStcfc", + "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityE6SchemaVGGSg_SDySSSayAA014PaymentHandlereN0VGGSgSDySSSayAA7ServiceVGGSgAA0D6StatusOSStcfc", + "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityE6SchemaVGGSg_SDySSSayAA014PaymentHandlereN0VGGSgSDySSSayAA7ServiceVGGSgAA0D6StatusOSStcfc", "moduleName": "ShopifyCheckoutProtocol", "init_kind": "Designated" }, @@ -59747,17 +59422,17 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]??", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]??", "children": [ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.Service]]", "children": [ { "kind": "TypeNominal", @@ -59768,13 +59443,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.UCPOrderResponseSchemaService]", + "printedName": "[ShopifyCheckoutProtocol.Service]", "children": [ { "kind": "TypeNominal", - "name": "UCPOrderResponseSchemaService", - "printedName": "ShopifyCheckoutProtocol.UCPOrderResponseSchemaService", - "usr": "s:23ShopifyCheckoutProtocol29UCPOrderResponseSchemaServiceV" + "name": "Service", + "printedName": "ShopifyCheckoutProtocol.Service", + "usr": "s:23ShopifyCheckoutProtocol7ServiceV" } ], "usr": "s:Sa" @@ -59792,13 +59467,13 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "ShopifyCheckoutProtocol.StatusEnum?", + "printedName": "ShopifyCheckoutProtocol.ErrorStatus?", "children": [ { "kind": "TypeNominal", - "name": "StatusEnum", - "printedName": "ShopifyCheckoutProtocol.StatusEnum", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO" + "name": "ErrorStatus", + "printedName": "ShopifyCheckoutProtocol.ErrorStatus", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO" } ], "hasDefaultArg": true, @@ -59821,8 +59496,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityE6SchemaVGGSgSg_SDySSSayAA014PaymentHandlereO0VGGSgSgSDySSSayAA08UCPOrdereO7ServiceVGGSgSgAA10StatusEnumOSgSSSgtF", - "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityE6SchemaVGGSgSg_SDySSSayAA014PaymentHandlereO0VGGSgSgSDySSSayAA08UCPOrdereO7ServiceVGGSgSgAA10StatusEnumOSgSSSgtF", + "usr": "s:23ShopifyCheckoutProtocol16ErrorResponseUcpV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityE6SchemaVGGSgSg_SDySSSayAA014PaymentHandlereO0VGGSgSgSDySSSayAA7ServiceVGGSgSgAA0D6StatusOSgSSSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol16ErrorResponseUcpV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA010CapabilityE6SchemaVGGSgSg_SDySSSayAA014PaymentHandlereO0VGGSgSgSDySSSayAA7ServiceVGGSgSgAA0D6StatusOSgSSSgtF", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "funcSelfKind": "NonMutating" @@ -59934,8 +59609,8 @@ }, { "kind": "TypeDecl", - "name": "StatusEnum", - "printedName": "StatusEnum", + "name": "ErrorStatus", + "printedName": "ErrorStatus", "children": [ { "kind": "Var", @@ -59945,24 +59620,24 @@ { "kind": "TypeFunc", "name": "Function", - "printedName": "(ShopifyCheckoutProtocol.StatusEnum.Type) -> ShopifyCheckoutProtocol.StatusEnum", + "printedName": "(ShopifyCheckoutProtocol.ErrorStatus.Type) -> ShopifyCheckoutProtocol.ErrorStatus", "children": [ { "kind": "TypeNominal", - "name": "StatusEnum", - "printedName": "ShopifyCheckoutProtocol.StatusEnum", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO" + "name": "ErrorStatus", + "printedName": "ShopifyCheckoutProtocol.ErrorStatus", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO" }, { "kind": "TypeNominal", "name": "Metatype", - "printedName": "ShopifyCheckoutProtocol.StatusEnum.Type", + "printedName": "ShopifyCheckoutProtocol.ErrorStatus.Type", "children": [ { "kind": "TypeNominal", - "name": "StatusEnum", - "printedName": "ShopifyCheckoutProtocol.StatusEnum", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO" + "name": "ErrorStatus", + "printedName": "ShopifyCheckoutProtocol.ErrorStatus", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO" } ] } @@ -59970,8 +59645,8 @@ } ], "declKind": "EnumElement", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO5erroryA2CmF", - "mangledName": "$s23ShopifyCheckoutProtocol10StatusEnumO5erroryA2CmF", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO5erroryA2CmF", + "mangledName": "$s23ShopifyCheckoutProtocol11ErrorStatusO5erroryA2CmF", "moduleName": "ShopifyCheckoutProtocol" }, { @@ -59982,13 +59657,13 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "ShopifyCheckoutProtocol.StatusEnum?", + "printedName": "ShopifyCheckoutProtocol.ErrorStatus?", "children": [ { "kind": "TypeNominal", - "name": "StatusEnum", - "printedName": "ShopifyCheckoutProtocol.StatusEnum", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO" + "name": "ErrorStatus", + "printedName": "ShopifyCheckoutProtocol.ErrorStatus", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO" } ], "usr": "s:Sq" @@ -60001,8 +59676,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO8rawValueACSgSS_tcfc", - "mangledName": "$s23ShopifyCheckoutProtocol10StatusEnumO8rawValueACSgSS_tcfc", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO8rawValueACSgSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11ErrorStatusO8rawValueACSgSS_tcfc", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -60023,8 +59698,8 @@ } ], "declKind": "TypeAlias", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO8RawValuea", - "mangledName": "$s23ShopifyCheckoutProtocol10StatusEnumO8RawValuea", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO8RawValuea", + "mangledName": "$s23ShopifyCheckoutProtocol11ErrorStatusO8RawValuea", "moduleName": "ShopifyCheckoutProtocol", "implicit": true }, @@ -60041,8 +59716,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO8rawValueSSvp", - "mangledName": "$s23ShopifyCheckoutProtocol10StatusEnumO8rawValueSSvp", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO8rawValueSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ErrorStatusO8rawValueSSvp", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "accessors": [ @@ -60059,8 +59734,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO8rawValueSSvg", - "mangledName": "$s23ShopifyCheckoutProtocol10StatusEnumO8rawValueSSvg", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO8rawValueSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ErrorStatusO8rawValueSSvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -60072,8 +59747,8 @@ } ], "declKind": "Enum", - "usr": "s:23ShopifyCheckoutProtocol10StatusEnumO", - "mangledName": "$s23ShopifyCheckoutProtocol10StatusEnumO", + "usr": "s:23ShopifyCheckoutProtocol11ErrorStatusO", + "mangledName": "$s23ShopifyCheckoutProtocol11ErrorStatusO", "moduleName": "ShopifyCheckoutProtocol", "enumRawTypeName": "String", "isEnumExhaustive": true, @@ -62898,12 +62573,12 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.InstrumentsChangeService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.EmbeddedService]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.InstrumentsChangeService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.EmbeddedService]]", "children": [ { "kind": "TypeNominal", @@ -62914,13 +62589,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.InstrumentsChangeService]", + "printedName": "[ShopifyCheckoutProtocol.EmbeddedService]", "children": [ { "kind": "TypeNominal", - "name": "InstrumentsChangeService", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeService", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV" + "name": "EmbeddedService", + "printedName": "ShopifyCheckoutProtocol.EmbeddedService", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV" } ], "usr": "s:Sa" @@ -62933,8 +62608,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV8servicesSDySSSayAA0dE7ServiceVGGSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV8servicesSDySSSayAA0dE7ServiceVGGSgvp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV8servicesSDySSSayAA15EmbeddedServiceVGGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV8servicesSDySSSayAA15EmbeddedServiceVGGSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -62950,12 +62625,12 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.InstrumentsChangeService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.EmbeddedService]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.InstrumentsChangeService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.EmbeddedService]]", "children": [ { "kind": "TypeNominal", @@ -62966,13 +62641,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.InstrumentsChangeService]", + "printedName": "[ShopifyCheckoutProtocol.EmbeddedService]", "children": [ { "kind": "TypeNominal", - "name": "InstrumentsChangeService", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeService", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV" + "name": "EmbeddedService", + "printedName": "ShopifyCheckoutProtocol.EmbeddedService", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV" } ], "usr": "s:Sa" @@ -62985,8 +62660,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV8servicesSDySSSayAA0dE7ServiceVGGSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV8servicesSDySSSayAA0dE7ServiceVGGSgvg", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV8servicesSDySSSayAA15EmbeddedServiceVGGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV8servicesSDySSSayAA15EmbeddedServiceVGGSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -63715,12 +63390,12 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.InstrumentsChangeService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.EmbeddedService]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.InstrumentsChangeService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.EmbeddedService]]", "children": [ { "kind": "TypeNominal", @@ -63731,13 +63406,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.InstrumentsChangeService]", + "printedName": "[ShopifyCheckoutProtocol.EmbeddedService]", "children": [ { "kind": "TypeNominal", - "name": "InstrumentsChangeService", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeService", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV" + "name": "EmbeddedService", + "printedName": "ShopifyCheckoutProtocol.EmbeddedService", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV" } ], "usr": "s:Sa" @@ -63762,8 +63437,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA17CapabilityElementVGGSg_SDySSSayAA014PaymentHandlerO0VGGSgSDySSSayAA0dE7ServiceVGGSgAA31UCPCheckoutResponseSchemaStatusOSStcfc", - "mangledName": "$s23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA17CapabilityElementVGGSg_SDySSSayAA014PaymentHandlerO0VGGSgSDySSSayAA0dE7ServiceVGGSgAA31UCPCheckoutResponseSchemaStatusOSStcfc", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA17CapabilityElementVGGSg_SDySSSayAA014PaymentHandlerO0VGGSgSDySSSayAA15EmbeddedServiceVGGSgAA31UCPCheckoutResponseSchemaStatusOSStcfc", + "mangledName": "$s23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV12capabilities15paymentHandlers8services6status7versionACSDySSSayAA17CapabilityElementVGGSg_SDySSSayAA014PaymentHandlerO0VGGSgSDySSSayAA15EmbeddedServiceVGGSgAA31UCPCheckoutResponseSchemaStatusOSStcfc", "moduleName": "ShopifyCheckoutProtocol", "init_kind": "Designated" }, @@ -64007,17 +63682,17 @@ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.InstrumentsChangeService]]??", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.EmbeddedService]]??", "children": [ { "kind": "TypeNominal", "name": "Optional", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.InstrumentsChangeService]]?", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.EmbeddedService]]?", "children": [ { "kind": "TypeNominal", "name": "Dictionary", - "printedName": "[Swift.String : [ShopifyCheckoutProtocol.InstrumentsChangeService]]", + "printedName": "[Swift.String : [ShopifyCheckoutProtocol.EmbeddedService]]", "children": [ { "kind": "TypeNominal", @@ -64028,13 +63703,13 @@ { "kind": "TypeNominal", "name": "Array", - "printedName": "[ShopifyCheckoutProtocol.InstrumentsChangeService]", + "printedName": "[ShopifyCheckoutProtocol.EmbeddedService]", "children": [ { "kind": "TypeNominal", - "name": "InstrumentsChangeService", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeService", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV" + "name": "EmbeddedService", + "printedName": "ShopifyCheckoutProtocol.EmbeddedService", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV" } ], "usr": "s:Sa" @@ -64081,8 +63756,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA17CapabilityElementVGGSgSg_SDySSSayAA014PaymentHandlerP0VGGSgSgSDySSSayAA0dE7ServiceVGGSgSgAA31UCPCheckoutResponseSchemaStatusOSgSSSgtF", - "mangledName": "$s23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA17CapabilityElementVGGSgSg_SDySSSayAA014PaymentHandlerP0VGGSgSgSDySSSayAA0dE7ServiceVGGSgSgAA31UCPCheckoutResponseSchemaStatusOSgSSSgtF", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA17CapabilityElementVGGSgSg_SDySSSayAA014PaymentHandlerP0VGGSgSgSDySSSayAA15EmbeddedServiceVGGSgSgAA31UCPCheckoutResponseSchemaStatusOSgSSSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV4with12capabilities15paymentHandlers8services6status7versionACSDySSSayAA17CapabilityElementVGGSgSg_SDySSSayAA014PaymentHandlerP0VGGSgSgSDySSSayAA15EmbeddedServiceVGGSgSgAA31UCPCheckoutResponseSchemaStatusOSgSSSgtF", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "funcSelfKind": "NonMutating" @@ -64141,6 +63816,33 @@ "isFromExtension": true, "throwing": true, "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "success", + "printedName": "success(version:)", + "children": [ + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "hasDefaultArg": true, + "usr": "s:SS" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV7success7versionACSS_tFZ", + "mangledName": "$s23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV7success7versionACSS_tFZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "isFromExtension": true, + "funcSelfKind": "NonMutating" } ], "declKind": "Struct", @@ -67079,8 +66781,8 @@ }, { "kind": "TypeDecl", - "name": "InstrumentsChangeService", - "printedName": "InstrumentsChangeService", + "name": "EmbeddedService", + "printedName": "EmbeddedService", "children": [ { "kind": "Var", @@ -67117,8 +66819,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6configSDySSAA7JSONAnyCGSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6configSDySSAA7JSONAnyCGSgvp", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV6configSDySSAA7JSONAnyCGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV6configSDySSAA7JSONAnyCGSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -67161,8 +66863,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6configSDySSAA7JSONAnyCGSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6configSDySSAA7JSONAnyCGSgvg", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV6configSDySSAA7JSONAnyCGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV6configSDySSAA7JSONAnyCGSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -67193,8 +66895,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV2idSSSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV2idSSSgvp", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV2idSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV2idSSSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -67223,8 +66925,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV2idSSSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV2idSSSgvg", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV2idSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV2idSSSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -67255,8 +66957,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6schemaSSSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6schemaSSSgvp", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV6schemaSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV6schemaSSSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -67285,8 +66987,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6schemaSSSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6schemaSSSgvg", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV6schemaSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV6schemaSSSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -67317,8 +67019,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV4specSSSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV4specSSSgvp", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV4specSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV4specSSSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -67347,8 +67049,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV4specSSSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV4specSSSgvg", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV4specSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV4specSSSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -67371,8 +67073,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV7versionSSvp", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV7versionSSvp", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV7versionSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV7versionSSvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -67393,8 +67095,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV7versionSSvg", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV7versionSSvg", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV7versionSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV7versionSSvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -67425,8 +67127,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV8endpointSSSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV8endpointSSSgvp", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV8endpointSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV8endpointSSSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -67455,8 +67157,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV8endpointSSSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV8endpointSSSgvg", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV8endpointSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV8endpointSSSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -67479,8 +67181,8 @@ } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV9transportAA9TransportOvp", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV9transportAA9TransportOvp", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV9transportAA9TransportOvp", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV9transportAA9TransportOvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -67501,8 +67203,8 @@ } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV9transportAA9TransportOvg", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV9transportAA9TransportOvg", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV9transportAA9TransportOvg", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV9transportAA9TransportOvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -67519,9 +67221,9 @@ "children": [ { "kind": "TypeNominal", - "name": "InstrumentsChangeService", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeService", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV" + "name": "EmbeddedService", + "printedName": "ShopifyCheckoutProtocol.EmbeddedService", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV" }, { "kind": "TypeNominal", @@ -67621,8 +67323,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSg_SSSgA2OSSAoA9TransportOtcfc", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSg_SSSgA2OSSAoA9TransportOtcfc", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSg_SSSgA2OSSAoA9TransportOtcfc", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSg_SSSgA2OSSAoA9TransportOtcfc", "moduleName": "ShopifyCheckoutProtocol", "init_kind": "Designated" }, @@ -67644,8 +67346,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6encode2toys7Encoder_p_tKF", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV6encode2toys7Encoder_p_tKF", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV6encode2toys7Encoder_p_tKF", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "throwing": true, @@ -67658,9 +67360,9 @@ "children": [ { "kind": "TypeNominal", - "name": "InstrumentsChangeService", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeService", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV" + "name": "EmbeddedService", + "printedName": "ShopifyCheckoutProtocol.EmbeddedService", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV" }, { "kind": "TypeNominal", @@ -67670,8 +67372,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV4fromACs7Decoder_p_tKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV4fromACs7Decoder_p_tKcfc", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV4fromACs7Decoder_p_tKcfc", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "throwing": true, @@ -67684,9 +67386,9 @@ "children": [ { "kind": "TypeNominal", - "name": "InstrumentsChangeService", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeService", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV" + "name": "EmbeddedService", + "printedName": "ShopifyCheckoutProtocol.EmbeddedService", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV" }, { "kind": "TypeNominal", @@ -67696,8 +67398,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV4dataAC10Foundation4DataV_tKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV4dataAC10Foundation4DataV_tKcfc", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV4dataAC10Foundation4DataV_tKcfc", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -67710,9 +67412,9 @@ "children": [ { "kind": "TypeNominal", - "name": "InstrumentsChangeService", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeService", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV" + "name": "EmbeddedService", + "printedName": "ShopifyCheckoutProtocol.EmbeddedService", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV" }, { "kind": "TypeNominal", @@ -67729,8 +67431,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV_5usingACSS_SS10FoundationE8EncodingVtKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV_5usingACSS_SS10FoundationE8EncodingVtKcfc", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -67743,9 +67445,9 @@ "children": [ { "kind": "TypeNominal", - "name": "InstrumentsChangeService", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeService", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV" + "name": "EmbeddedService", + "printedName": "ShopifyCheckoutProtocol.EmbeddedService", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV" }, { "kind": "TypeNominal", @@ -67755,8 +67457,8 @@ } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV7fromURLAC10Foundation0H0V_tKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV7fromURLAC10Foundation0H0V_tKcfc", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV7fromURLAC10Foundation0G0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV7fromURLAC10Foundation0G0V_tKcfc", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -67769,9 +67471,9 @@ "children": [ { "kind": "TypeNominal", - "name": "InstrumentsChangeService", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeService", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV" + "name": "EmbeddedService", + "printedName": "ShopifyCheckoutProtocol.EmbeddedService", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV" }, { "kind": "TypeNominal", @@ -67934,8 +67636,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV4with6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSgSg_SSSgSgA2rqrA9TransportOSgtF", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV4with6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSgSg_SSSgSgA2rqrA9TransportOSgtF", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV4with6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSgSg_SSSgSgA2rqrA9TransportOSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV4with6config2id6schema4spec7version8endpoint9transportACSDySSAA7JSONAnyCGSgSg_SSSgSgA2rqrA9TransportOSgtF", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "funcSelfKind": "NonMutating" @@ -67953,8 +67655,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV8jsonData10Foundation0H0VyKF", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV8jsonData10Foundation0H0VyKF", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV8jsonData10Foundation0G0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV8jsonData10Foundation0G0VyKF", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -67988,8 +67690,8 @@ } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", "moduleName": "ShopifyCheckoutProtocol", "isFromExtension": true, "throwing": true, @@ -67997,8 +67699,8 @@ } ], "declKind": "Struct", - "usr": "s:23ShopifyCheckoutProtocol24InstrumentsChangeServiceV", - "mangledName": "$s23ShopifyCheckoutProtocol24InstrumentsChangeServiceV", + "usr": "s:23ShopifyCheckoutProtocol15EmbeddedServiceV", + "mangledName": "$s23ShopifyCheckoutProtocol15EmbeddedServiceV", "moduleName": "ShopifyCheckoutProtocol", "conformances": [ { @@ -69619,278 +69321,38 @@ }, { "kind": "TypeDecl", - "name": "JSONNull", - "printedName": "JSONNull", + "name": "ReadyRequest", + "printedName": "ReadyRequest", "children": [ - { - "kind": "Function", - "name": "==", - "printedName": "==(_:_:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - }, - { - "kind": "TypeNominal", - "name": "JSONNull", - "printedName": "ShopifyCheckoutProtocol.JSONNull", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC" - }, - { - "kind": "TypeNominal", - "name": "JSONNull", - "printedName": "ShopifyCheckoutProtocol.JSONNull", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC" - } - ], - "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC2eeoiySbAC_ACtFZ", - "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC2eeoiySbAC_ACtFZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "declAttributes": [ - "Final" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Function", - "name": "hash", - "printedName": "hash(into:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Hasher", - "printedName": "Swift.Hasher", - "paramValueOwnership": "InOut", - "usr": "s:s6HasherV" - } - ], - "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC4hash4intoys6HasherVz_tF", - "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC4hash4intoys6HasherVz_tF", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "Final" - ], - "funcSelfKind": "NonMutating" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init()", - "children": [ - { - "kind": "TypeNominal", - "name": "JSONNull", - "printedName": "ShopifyCheckoutProtocol.JSONNull", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC" - } - ], - "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullCACycfc", - "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullCACycfc", - "moduleName": "ShopifyCheckoutProtocol", - "init_kind": "Designated" - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(from:)", - "children": [ - { - "kind": "TypeNominal", - "name": "JSONNull", - "printedName": "ShopifyCheckoutProtocol.JSONNull", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC" - }, - { - "kind": "TypeNominal", - "name": "Decoder", - "printedName": "any Swift.Decoder", - "usr": "s:s7DecoderP" - } - ], - "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC4fromACs7Decoder_p_tKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC4fromACs7Decoder_p_tKcfc", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "Required" - ], - "throwing": true, - "init_kind": "Designated" - }, - { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" - } - ], - "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC6encode2toys7Encoder_p_tKF", - "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC6encode2toys7Encoder_p_tKF", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "Final" - ], - "throwing": true, - "funcSelfKind": "NonMutating" - }, { "kind": "Var", - "name": "hashValue", - "printedName": "hashValue", + "name": "auth", + "printedName": "auth", "children": [ { "kind": "TypeNominal", - "name": "Int", - "printedName": "Swift.Int", - "usr": "s:Si" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC9hashValueSivp", - "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC9hashValueSivp", - "moduleName": "ShopifyCheckoutProtocol", - "implicit": true, - "declAttributes": [ - "Final" - ], - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Auth?", "children": [ { "kind": "TypeNominal", - "name": "Int", - "printedName": "Swift.Int", - "usr": "s:Si" + "name": "Auth", + "printedName": "ShopifyCheckoutProtocol.Auth", + "usr": "s:23ShopifyCheckoutProtocol4AuthV" } ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC9hashValueSivg", - "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC9hashValueSivg", - "moduleName": "ShopifyCheckoutProtocol", - "implicit": true, - "declAttributes": [ - "Final" - ], - "accessorKind": "get" - } - ] - } - ], - "declKind": "Class", - "usr": "s:23ShopifyCheckoutProtocol8JSONNullC", - "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "Final" - ], - "conformances": [ - { - "kind": "Conformance", - "name": "Decodable", - "printedName": "Decodable", - "usr": "s:Se", - "mangledName": "$sSe" - }, - { - "kind": "Conformance", - "name": "Encodable", - "printedName": "Encodable", - "usr": "s:SE", - "mangledName": "$sSE" - }, - { - "kind": "Conformance", - "name": "Hashable", - "printedName": "Hashable", - "usr": "s:SH", - "mangledName": "$sSH" - }, - { - "kind": "Conformance", - "name": "Sendable", - "printedName": "Sendable", - "usr": "s:s8SendableP", - "mangledName": "$ss8SendableP" - }, - { - "kind": "Conformance", - "name": "Equatable", - "printedName": "Equatable", - "usr": "s:SQ", - "mangledName": "$sSQ" - }, - { - "kind": "Conformance", - "name": "SendableMetatype", - "printedName": "SendableMetatype", - "usr": "s:s16SendableMetatypeP", - "mangledName": "$ss16SendableMetatypeP" - }, - { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" - }, - { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" - } - ] - }, - { - "kind": "TypeDecl", - "name": "JSONAny", - "printedName": "JSONAny", - "children": [ - { - "kind": "Var", - "name": "value", - "printedName": "value", - "children": [ - { - "kind": "TypeNominal", - "name": "ProtocolComposition", - "printedName": "Any" + "usr": "s:Sq" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC5valueypvp", - "mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC5valueypvp", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV4authAA4AuthVSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV4authAA4AuthVSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ - "Final" + "HasStorage" ], + "isLet": true, + "hasStorage": true, "accessors": [ { "kind": "Accessor", @@ -69899,134 +69361,31 @@ "children": [ { "kind": "TypeNominal", - "name": "ProtocolComposition", - "printedName": "Any" + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Auth?", + "children": [ + { + "kind": "TypeNominal", + "name": "Auth", + "printedName": "ShopifyCheckoutProtocol.Auth", + "usr": "s:23ShopifyCheckoutProtocol4AuthV" + } + ], + "usr": "s:Sq" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC5valueypvg", - "mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC5valueypvg", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV4authAA4AuthVSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV4authAA4AuthVSgvg", "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, "declAttributes": [ - "Final" + "Transparent" ], "accessorKind": "get" } ] }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(from:)", - "children": [ - { - "kind": "TypeNominal", - "name": "JSONAny", - "printedName": "ShopifyCheckoutProtocol.JSONAny", - "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC" - }, - { - "kind": "TypeNominal", - "name": "Decoder", - "printedName": "any Swift.Decoder", - "usr": "s:s7DecoderP" - } - ], - "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC4fromACs7Decoder_p_tKcfc", - "mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC4fromACs7Decoder_p_tKcfc", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "Required" - ], - "throwing": true, - "init_kind": "Designated" - }, - { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" - } - ], - "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC6encode2toys7Encoder_p_tKF", - "mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC6encode2toys7Encoder_p_tKF", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "Final" - ], - "throwing": true, - "funcSelfKind": "NonMutating" - } - ], - "declKind": "Class", - "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC", - "mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "Final" - ], - "conformances": [ - { - "kind": "Conformance", - "name": "Decodable", - "printedName": "Decodable", - "usr": "s:Se", - "mangledName": "$sSe" - }, - { - "kind": "Conformance", - "name": "Encodable", - "printedName": "Encodable", - "usr": "s:SE", - "mangledName": "$sSE" - }, - { - "kind": "Conformance", - "name": "Sendable", - "printedName": "Sendable", - "usr": "s:s8SendableP", - "mangledName": "$ss8SendableP" - }, - { - "kind": "Conformance", - "name": "SendableMetatype", - "printedName": "SendableMetatype", - "usr": "s:s16SendableMetatypeP", - "mangledName": "$ss16SendableMetatypeP" - }, - { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" - }, - { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" - } - ] - }, - { - "kind": "TypeDecl", - "name": "ReadyRequest", - "printedName": "ReadyRequest", - "children": [ { "kind": "Var", "name": "delegate", @@ -70092,7 +69451,7 @@ { "kind": "Constructor", "name": "init", - "printedName": "init(delegate:)", + "printedName": "init(auth:delegate:)", "children": [ { "kind": "TypeNominal", @@ -70100,6 +69459,20 @@ "printedName": "ShopifyCheckoutProtocol.ReadyRequest", "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Auth?", + "children": [ + { + "kind": "TypeNominal", + "name": "Auth", + "printedName": "ShopifyCheckoutProtocol.Auth", + "usr": "s:23ShopifyCheckoutProtocol4AuthV" + } + ], + "usr": "s:Sq" + }, { "kind": "TypeNominal", "name": "Array", @@ -70112,16 +69485,40 @@ "usr": "s:SS" } ], - "hasDefaultArg": true, "usr": "s:Sa" } ], "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV8delegateACSaySSG_tcfc", - "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV8delegateACSaySSG_tcfc", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV4auth8delegateAcA4AuthVSg_SaySSGtcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV4auth8delegateAcA4AuthVSg_SaySSGtcfc", "moduleName": "ShopifyCheckoutProtocol", "init_kind": "Designated" }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -70144,8 +69541,214 @@ "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV4fromACs7Decoder_p_tKcfc", "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV4fromACs7Decoder_p_tKcfc", "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(data:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyRequest", + "printedName": "ShopifyCheckoutProtocol.ReadyRequest", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV4dataAC10Foundation4DataV_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(_:using:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyRequest", + "printedName": "ShopifyCheckoutProtocol.ReadyRequest", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fromURL:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyRequest", + "printedName": "ShopifyCheckoutProtocol.ReadyRequest", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" + }, + { + "kind": "TypeNominal", + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV7fromURLAC10Foundation0G0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV7fromURLAC10Foundation0G0V_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, "throwing": true, "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "with", + "printedName": "with(auth:delegate:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyRequest", + "printedName": "ShopifyCheckoutProtocol.ReadyRequest", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Auth??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Auth?", + "children": [ + { + "kind": "TypeNominal", + "name": "Auth", + "printedName": "ShopifyCheckoutProtocol.Auth", + "usr": "s:23ShopifyCheckoutProtocol4AuthV" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sa" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV4with4auth8delegateAcA4AuthVSgSg_SaySSGSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV4with4auth8delegateAcA4AuthVSgSg_SaySSGSgtF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonData", + "printedName": "jsonData()", + "children": [ + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV8jsonData10Foundation0G0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV8jsonData10Foundation0G0VyKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonString", + "printedName": "jsonString(encoding:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" } ], "declKind": "Struct", @@ -70153,13 +69756,6 @@ "mangledName": "$s23ShopifyCheckoutProtocol12ReadyRequestV", "moduleName": "ShopifyCheckoutProtocol", "conformances": [ - { - "kind": "Conformance", - "name": "EventPayload", - "printedName": "EventPayload", - "usr": "s:23ShopifyCheckoutProtocol12EventPayloadP", - "mangledName": "$s23ShopifyCheckoutProtocol12EventPayloadP" - }, { "kind": "Conformance", "name": "Decodable", @@ -70167,6 +69763,13 @@ "usr": "s:Se", "mangledName": "$sSe" }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, { "kind": "Conformance", "name": "Sendable", @@ -70194,23 +69797,30 @@ "printedName": "Escapable", "usr": "s:s9EscapableP", "mangledName": "$ss9EscapableP" + }, + { + "kind": "Conformance", + "name": "EventPayload", + "printedName": "EventPayload", + "usr": "s:23ShopifyCheckoutProtocol12EventPayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol12EventPayloadP" } ] }, { "kind": "TypeDecl", - "name": "ReadyResult", - "printedName": "ReadyResult", + "name": "Auth", + "printedName": "Auth", "children": [ { "kind": "Var", - "name": "delegate", - "printedName": "delegate", + "name": "type", + "printedName": "type", "children": [ { "kind": "TypeNominal", - "name": "Array", - "printedName": "[Swift.String]", + "name": "Optional", + "printedName": "Swift.String?", "children": [ { "kind": "TypeNominal", @@ -70219,12 +69829,12 @@ "usr": "s:SS" } ], - "usr": "s:Sa" + "usr": "s:Sq" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8delegateSaySSGvp", - "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8delegateSaySSGvp", + "usr": "s:23ShopifyCheckoutProtocol4AuthV4typeSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV4typeSSSgvp", "moduleName": "ShopifyCheckoutProtocol", "declAttributes": [ "HasStorage" @@ -70239,8 +69849,8 @@ "children": [ { "kind": "TypeNominal", - "name": "Array", - "printedName": "[Swift.String]", + "name": "Optional", + "printedName": "Swift.String?", "children": [ { "kind": "TypeNominal", @@ -70249,12 +69859,12 @@ "usr": "s:SS" } ], - "usr": "s:Sa" + "usr": "s:Sq" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8delegateSaySSGvg", - "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8delegateSaySSGvg", + "usr": "s:23ShopifyCheckoutProtocol4AuthV4typeSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV4typeSSSgvg", "moduleName": "ShopifyCheckoutProtocol", "implicit": true, "declAttributes": [ @@ -70265,10 +69875,16 @@ ] }, { - "kind": "Var", - "name": "credential", - "printedName": "credential", + "kind": "Constructor", + "name": "init", + "printedName": "init(type:)", "children": [ + { + "kind": "TypeNominal", + "name": "Auth", + "printedName": "ShopifyCheckoutProtocol.Auth", + "usr": "s:23ShopifyCheckoutProtocol4AuthV" + }, { "kind": "TypeNominal", "name": "Optional", @@ -70284,20 +69900,163 @@ "usr": "s:Sq" } ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvp", - "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvp", + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol4AuthV4typeACSSSg_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV4typeACSSSg_tcfc", "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "HasStorage" + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } ], - "isLet": true, - "hasStorage": true, - "accessors": [ + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol4AuthV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", + "kind": "TypeNominal", + "name": "Auth", + "printedName": "ShopifyCheckoutProtocol.Auth", + "usr": "s:23ShopifyCheckoutProtocol4AuthV" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol4AuthV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(data:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Auth", + "printedName": "ShopifyCheckoutProtocol.Auth", + "usr": "s:23ShopifyCheckoutProtocol4AuthV" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol4AuthV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV4dataAC10Foundation4DataV_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(_:using:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Auth", + "printedName": "ShopifyCheckoutProtocol.Auth", + "usr": "s:23ShopifyCheckoutProtocol4AuthV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol4AuthV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fromURL:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Auth", + "printedName": "ShopifyCheckoutProtocol.Auth", + "usr": "s:23ShopifyCheckoutProtocol4AuthV" + }, + { + "kind": "TypeNominal", + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol4AuthV7fromURLAC10Foundation0F0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV7fromURLAC10Foundation0F0V_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "with", + "printedName": "with(type:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Auth", + "printedName": "ShopifyCheckoutProtocol.Auth", + "usr": "s:23ShopifyCheckoutProtocol4AuthV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String??", "children": [ { "kind": "TypeNominal", @@ -70314,44 +70073,42 @@ "usr": "s:Sq" } ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvg", - "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvg", - "moduleName": "ShopifyCheckoutProtocol", - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "accessorKind": "get" + "hasDefaultArg": true, + "usr": "s:Sq" } - ] + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol4AuthV4with4typeACSSSgSg_tF", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV4with4typeACSSSgSg_tF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "funcSelfKind": "NonMutating" }, { - "kind": "Constructor", - "name": "init", - "printedName": "init(delegate:credential:)", + "kind": "Function", + "name": "jsonData", + "printedName": "jsonData()", "children": [ { "kind": "TypeNominal", - "name": "ReadyResult", - "printedName": "ShopifyCheckoutProtocol.ReadyResult", - "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" - }, - { - "kind": "TypeNominal", - "name": "Array", - "printedName": "[Swift.String]", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "hasDefaultArg": true, - "usr": "s:Sa" - }, + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol4AuthV8jsonData10Foundation0F0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV8jsonData10Foundation0F0VyKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonString", + "printedName": "jsonString(encoding:)", + "children": [ { "kind": "TypeNominal", "name": "Optional", @@ -70364,52 +70121,6319 @@ "usr": "s:SS" } ], - "hasDefaultArg": true, "usr": "s:Sq" - } - ], - "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8delegate10credentialACSaySSG_SSSgtcfc", - "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8delegate10credentialACSaySSG_SSSgtcfc", - "moduleName": "ShopifyCheckoutProtocol", - "init_kind": "Designated" - }, - { - "kind": "Function", - "name": "encode", - "printedName": "encode(to:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" }, { "kind": "TypeNominal", - "name": "Encoder", - "printedName": "any Swift.Encoder", - "usr": "s:s7EncoderP" + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" } ], "declKind": "Func", - "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV6encode2toys7Encoder_p_tKF", - "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV6encode2toys7Encoder_p_tKF", + "usr": "s:23ShopifyCheckoutProtocol4AuthV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, "throwing": true, "funcSelfKind": "NonMutating" } ], "declKind": "Struct", - "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV", - "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV", + "usr": "s:23ShopifyCheckoutProtocol4AuthV", + "mangledName": "$s23ShopifyCheckoutProtocol4AuthV", "moduleName": "ShopifyCheckoutProtocol", "conformances": [ { "kind": "Conformance", - "name": "ResponsePayload", - "printedName": "ResponsePayload", - "usr": "s:23ShopifyCheckoutProtocol15ResponsePayloadP", - "mangledName": "$s23ShopifyCheckoutProtocol15ResponsePayloadP" + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "ReadyResult", + "printedName": "ReadyResult", + "children": [ + { + "kind": "Var", + "name": "checkout", + "printedName": "checkout", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout?", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyCheckout", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8checkoutAA0dB0VSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8checkoutAA0dB0VSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout?", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyCheckout", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8checkoutAA0dB0VSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8checkoutAA0dB0VSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "credential", + "printedName": "credential", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10credentialSSSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "ucp", + "printedName": "ucp", + "children": [ + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV3ucpAA017InstrumentsChangeE3UcpVvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV3ucpAA017InstrumentsChangeE3UcpVvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV3ucpAA017InstrumentsChangeE3UcpVvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV3ucpAA017InstrumentsChangeE3UcpVvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "upgrade", + "printedName": "upgrade", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Upgrade?", + "children": [ + { + "kind": "TypeNominal", + "name": "Upgrade", + "printedName": "ShopifyCheckoutProtocol.Upgrade", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV7upgradeAA7UpgradeVSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV7upgradeAA7UpgradeVSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Upgrade?", + "children": [ + { + "kind": "TypeNominal", + "name": "Upgrade", + "printedName": "ShopifyCheckoutProtocol.Upgrade", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV7upgradeAA7UpgradeVSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV7upgradeAA7UpgradeVSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "continueURL", + "printedName": "continueURL", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV11continueURLSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV11continueURLSSSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV11continueURLSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV11continueURLSSSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "messages", + "printedName": "messages", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.Message]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.Message]", + "children": [ + { + "kind": "TypeNominal", + "name": "Message", + "printedName": "ShopifyCheckoutProtocol.Message", + "usr": "s:23ShopifyCheckoutProtocol7MessageV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8messagesSayAA7MessageVGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8messagesSayAA7MessageVGSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.Message]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.Message]", + "children": [ + { + "kind": "TypeNominal", + "name": "Message", + "printedName": "ShopifyCheckoutProtocol.Message", + "usr": "s:23ShopifyCheckoutProtocol7MessageV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8messagesSayAA7MessageVGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8messagesSayAA7MessageVGSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "TypeDecl", + "name": "CodingKeys", + "printedName": "CodingKeys", + "children": [ + { + "kind": "Var", + "name": "checkout", + "printedName": "checkout", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type) -> ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8checkoutyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8checkoutyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Var", + "name": "credential", + "printedName": "credential", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type) -> ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO10credentialyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO10credentialyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Var", + "name": "ucp", + "printedName": "ucp", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type) -> ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO3ucpyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO3ucpyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Var", + "name": "upgrade", + "printedName": "upgrade", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type) -> ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO7upgradeyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO7upgradeyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Var", + "name": "continueURL", + "printedName": "continueURL", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type) -> ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO11continueURLyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO11continueURLyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Var", + "name": "messages", + "printedName": "messages", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type) -> ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8messagesyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8messagesyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(rawValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8rawValueAESgSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8rawValueAESgSS_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Inlinable" + ], + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(stringValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO11stringValueAESgSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO11stringValueAESgSS_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(intValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8intValueAESgSi_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8intValueAESgSi_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "init_kind": "Designated" + }, + { + "kind": "TypeAlias", + "name": "RawValue", + "printedName": "RawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "TypeAlias", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8RawValuea", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8RawValuea", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true + }, + { + "kind": "Var", + "name": "intValue", + "printedName": "intValue", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.Int?", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8intValueSiSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8intValueSiSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.Int?", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8intValueSiSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8intValueSiSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "rawValue", + "printedName": "rawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8rawValueSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8rawValueSSvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8rawValueSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO8rawValueSSvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Inlinable" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "stringValue", + "printedName": "stringValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO11stringValueSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO11stringValueSSvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO11stringValueSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO11stringValueSSvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessorKind": "get" + } + ] + } + ], + "declKind": "Enum", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10CodingKeysO", + "moduleName": "ShopifyCheckoutProtocol", + "enumRawTypeName": "String", + "isEnumExhaustive": true, + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "RawRepresentable", + "printedName": "RawRepresentable", + "children": [ + { + "kind": "TypeWitness", + "name": "RawValue", + "printedName": "RawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ] + } + ], + "usr": "s:SY", + "mangledName": "$sSY" + }, + { + "kind": "Conformance", + "name": "CodingKey", + "printedName": "CodingKey", + "usr": "s:s9CodingKeyP", + "mangledName": "$ss9CodingKeyP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(checkout:credential:ucp:upgrade:continueURL:messages:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout?", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyCheckout", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Upgrade?", + "children": [ + { + "kind": "TypeNominal", + "name": "Upgrade", + "printedName": "ShopifyCheckoutProtocol.Upgrade", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.Message]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.Message]", + "children": [ + { + "kind": "TypeNominal", + "name": "Message", + "printedName": "ShopifyCheckoutProtocol.Message", + "usr": "s:23ShopifyCheckoutProtocol7MessageV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8checkout10credential3ucp7upgrade11continueURL8messagesAcA0dB0VSg_SSSgAA017InstrumentsChangeE3UcpVAA7UpgradeVSgAMSayAA7MessageVGSgtcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8checkout10credential3ucp7upgrade11continueURL8messagesAcA0dB0VSg_SSSgAA017InstrumentsChangeE3UcpVAA7UpgradeVSgAMSayAA7MessageVGSgtcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(data:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV4dataAC10Foundation4DataV_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(_:using:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fromURL:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" + }, + { + "kind": "TypeNominal", + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV7fromURLAC10Foundation0G0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV7fromURLAC10Foundation0G0V_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "with", + "printedName": "with(checkout:credential:ucp:upgrade:continueURL:messages:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout?", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyCheckout", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp?", + "children": [ + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Upgrade??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.Upgrade?", + "children": [ + { + "kind": "TypeNominal", + "name": "Upgrade", + "printedName": "ShopifyCheckoutProtocol.Upgrade", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.Message]??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.Message]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.Message]", + "children": [ + { + "kind": "TypeNominal", + "name": "Message", + "printedName": "ShopifyCheckoutProtocol.Message", + "usr": "s:23ShopifyCheckoutProtocol7MessageV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV4with8checkout10credential3ucp7upgrade11continueURL8messagesAcA0dB0VSgSg_SSSgSgAA017InstrumentsChangeE3UcpVSgAA7UpgradeVSgSgAPSayAA7MessageVGSgSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV4with8checkout10credential3ucp7upgrade11continueURL8messagesAcA0dB0VSgSg_SSSgSgAA017InstrumentsChangeE3UcpVSgAA7UpgradeVSgSgAPSayAA7MessageVGSgSgtF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonData", + "printedName": "jsonData()", + "children": [ + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV8jsonData10Foundation0G0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV8jsonData10Foundation0G0VyKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonString", + "printedName": "jsonString(encoding:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV", + "mangledName": "$s23ShopifyCheckoutProtocol11ReadyResultV", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + }, + { + "kind": "Conformance", + "name": "ResponsePayload", + "printedName": "ResponsePayload", + "usr": "s:23ShopifyCheckoutProtocol15ResponsePayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol15ResponsePayloadP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "ReadyCheckout", + "printedName": "ReadyCheckout", + "children": [ + { + "kind": "Var", + "name": "fulfillment", + "printedName": "fulfillment", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass?", + "children": [ + { + "kind": "TypeNominal", + "name": "CheckoutFulfillmentClass", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V11fulfillmentAA0B16FulfillmentClassVSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V11fulfillmentAA0B16FulfillmentClassVSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass?", + "children": [ + { + "kind": "TypeNominal", + "name": "CheckoutFulfillmentClass", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V11fulfillmentAA0B16FulfillmentClassVSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V11fulfillmentAA0B16FulfillmentClassVSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "payment", + "printedName": "payment", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment?", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyPayment", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V7paymentAA0D7PaymentVSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V7paymentAA0D7PaymentVSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment?", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyPayment", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V7paymentAA0D7PaymentVSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V7paymentAA0D7PaymentVSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fulfillment:payment:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyCheckout", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass?", + "children": [ + { + "kind": "TypeNominal", + "name": "CheckoutFulfillmentClass", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment?", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyPayment", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V11fulfillment7paymentAcA0B16FulfillmentClassVSg_AA0D7PaymentVSgtcfc", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V11fulfillment7paymentAcA0B16FulfillmentClassVSg_AA0D7PaymentVSgtcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyCheckout", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(data:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyCheckout", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V4dataAC10Foundation4DataV_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(_:using:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyCheckout", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fromURL:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyCheckout", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V" + }, + { + "kind": "TypeNominal", + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V7fromURLAC10Foundation0F0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V7fromURLAC10Foundation0F0V_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "with", + "printedName": "with(fulfillment:payment:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyCheckout", + "printedName": "ShopifyCheckoutProtocol.ReadyCheckout", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass?", + "children": [ + { + "kind": "TypeNominal", + "name": "CheckoutFulfillmentClass", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment?", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyPayment", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V4with11fulfillment7paymentAcA0B16FulfillmentClassVSgSg_AA0D7PaymentVSgSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V4with11fulfillment7paymentAcA0B16FulfillmentClassVSgSg_AA0D7PaymentVSgSgtF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonData", + "printedName": "jsonData()", + "children": [ + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V8jsonData10Foundation0F0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V8jsonData10Foundation0F0VyKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonString", + "printedName": "jsonString(encoding:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol05ReadyB0V", + "mangledName": "$s23ShopifyCheckoutProtocol05ReadyB0V", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "CheckoutFulfillmentClass", + "printedName": "CheckoutFulfillmentClass", + "children": [ + { + "kind": "Var", + "name": "availableMethods", + "printedName": "availableMethods", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentAvailableMethod]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentAvailableMethod]", + "children": [ + { + "kind": "TypeNominal", + "name": "FulfillmentAvailableMethod", + "printedName": "ShopifyCheckoutProtocol.FulfillmentAvailableMethod", + "usr": "s:23ShopifyCheckoutProtocol26FulfillmentAvailableMethodV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV16availableMethodsSayAA0D15AvailableMethodVGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV16availableMethodsSayAA0D15AvailableMethodVGSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentAvailableMethod]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentAvailableMethod]", + "children": [ + { + "kind": "TypeNominal", + "name": "FulfillmentAvailableMethod", + "printedName": "ShopifyCheckoutProtocol.FulfillmentAvailableMethod", + "usr": "s:23ShopifyCheckoutProtocol26FulfillmentAvailableMethodV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV16availableMethodsSayAA0D15AvailableMethodVGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV16availableMethodsSayAA0D15AvailableMethodVGSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "methods", + "printedName": "methods", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentMethod]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentMethod]", + "children": [ + { + "kind": "TypeNominal", + "name": "FulfillmentMethod", + "printedName": "ShopifyCheckoutProtocol.FulfillmentMethod", + "usr": "s:23ShopifyCheckoutProtocol17FulfillmentMethodV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV7methodsSayAA0D6MethodVGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV7methodsSayAA0D6MethodVGSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentMethod]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentMethod]", + "children": [ + { + "kind": "TypeNominal", + "name": "FulfillmentMethod", + "printedName": "ShopifyCheckoutProtocol.FulfillmentMethod", + "usr": "s:23ShopifyCheckoutProtocol17FulfillmentMethodV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV7methodsSayAA0D6MethodVGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV7methodsSayAA0D6MethodVGSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "TypeDecl", + "name": "CodingKeys", + "printedName": "CodingKeys", + "children": [ + { + "kind": "Var", + "name": "availableMethods", + "printedName": "availableMethods", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys.Type) -> ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO16availableMethodsyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO16availableMethodsyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Var", + "name": "methods", + "printedName": "methods", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys.Type) -> ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO7methodsyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO7methodsyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(rawValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8rawValueAESgSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8rawValueAESgSS_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Inlinable" + ], + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(stringValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO11stringValueAESgSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO11stringValueAESgSS_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(intValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8intValueAESgSi_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8intValueAESgSi_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "init_kind": "Designated" + }, + { + "kind": "TypeAlias", + "name": "RawValue", + "printedName": "RawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "TypeAlias", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8RawValuea", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8RawValuea", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true + }, + { + "kind": "Var", + "name": "intValue", + "printedName": "intValue", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.Int?", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8intValueSiSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8intValueSiSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.Int?", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8intValueSiSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8intValueSiSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "rawValue", + "printedName": "rawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8rawValueSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8rawValueSSvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8rawValueSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO8rawValueSSvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Inlinable" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "stringValue", + "printedName": "stringValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO11stringValueSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO11stringValueSSvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO11stringValueSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO11stringValueSSvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessorKind": "get" + } + ] + } + ], + "declKind": "Enum", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10CodingKeysO", + "moduleName": "ShopifyCheckoutProtocol", + "enumRawTypeName": "String", + "isEnumExhaustive": true, + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "RawRepresentable", + "printedName": "RawRepresentable", + "children": [ + { + "kind": "TypeWitness", + "name": "RawValue", + "printedName": "RawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ] + } + ], + "usr": "s:SY", + "mangledName": "$sSY" + }, + { + "kind": "Conformance", + "name": "CodingKey", + "printedName": "CodingKey", + "usr": "s:s9CodingKeyP", + "mangledName": "$ss9CodingKeyP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(availableMethods:methods:)", + "children": [ + { + "kind": "TypeNominal", + "name": "CheckoutFulfillmentClass", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentAvailableMethod]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentAvailableMethod]", + "children": [ + { + "kind": "TypeNominal", + "name": "FulfillmentAvailableMethod", + "printedName": "ShopifyCheckoutProtocol.FulfillmentAvailableMethod", + "usr": "s:23ShopifyCheckoutProtocol26FulfillmentAvailableMethodV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentMethod]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentMethod]", + "children": [ + { + "kind": "TypeNominal", + "name": "FulfillmentMethod", + "printedName": "ShopifyCheckoutProtocol.FulfillmentMethod", + "usr": "s:23ShopifyCheckoutProtocol17FulfillmentMethodV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV16availableMethods7methodsACSayAA0D15AvailableMethodVGSg_SayAA0dJ0VGSgtcfc", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV16availableMethods7methodsACSayAA0D15AvailableMethodVGSg_SayAA0dJ0VGSgtcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "CheckoutFulfillmentClass", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(data:)", + "children": [ + { + "kind": "TypeNominal", + "name": "CheckoutFulfillmentClass", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV4dataAC10Foundation4DataV_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(_:using:)", + "children": [ + { + "kind": "TypeNominal", + "name": "CheckoutFulfillmentClass", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fromURL:)", + "children": [ + { + "kind": "TypeNominal", + "name": "CheckoutFulfillmentClass", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV" + }, + { + "kind": "TypeNominal", + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV7fromURLAC10Foundation0G0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV7fromURLAC10Foundation0G0V_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "with", + "printedName": "with(availableMethods:methods:)", + "children": [ + { + "kind": "TypeNominal", + "name": "CheckoutFulfillmentClass", + "printedName": "ShopifyCheckoutProtocol.CheckoutFulfillmentClass", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentAvailableMethod]??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentAvailableMethod]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentAvailableMethod]", + "children": [ + { + "kind": "TypeNominal", + "name": "FulfillmentAvailableMethod", + "printedName": "ShopifyCheckoutProtocol.FulfillmentAvailableMethod", + "usr": "s:23ShopifyCheckoutProtocol26FulfillmentAvailableMethodV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentMethod]??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentMethod]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.FulfillmentMethod]", + "children": [ + { + "kind": "TypeNominal", + "name": "FulfillmentMethod", + "printedName": "ShopifyCheckoutProtocol.FulfillmentMethod", + "usr": "s:23ShopifyCheckoutProtocol17FulfillmentMethodV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV4with16availableMethods7methodsACSayAA0D15AvailableMethodVGSgSg_SayAA0dK0VGSgSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV4with16availableMethods7methodsACSayAA0D15AvailableMethodVGSgSg_SayAA0dK0VGSgSgtF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonData", + "printedName": "jsonData()", + "children": [ + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV8jsonData10Foundation0G0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV8jsonData10Foundation0G0VyKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonString", + "printedName": "jsonString(encoding:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol0B16FulfillmentClassV", + "mangledName": "$s23ShopifyCheckoutProtocol0B16FulfillmentClassV", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "ReadyPayment", + "printedName": "ReadyPayment", + "children": [ + { + "kind": "Var", + "name": "instruments", + "printedName": "instruments", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.SelectedPaymentInstrument]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.SelectedPaymentInstrument]", + "children": [ + { + "kind": "TypeNominal", + "name": "SelectedPaymentInstrument", + "printedName": "ShopifyCheckoutProtocol.SelectedPaymentInstrument", + "usr": "s:23ShopifyCheckoutProtocol25SelectedPaymentInstrumentV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV11instrumentsSayAA08SelectedE10InstrumentVGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV11instrumentsSayAA08SelectedE10InstrumentVGSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.SelectedPaymentInstrument]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.SelectedPaymentInstrument]", + "children": [ + { + "kind": "TypeNominal", + "name": "SelectedPaymentInstrument", + "printedName": "ShopifyCheckoutProtocol.SelectedPaymentInstrument", + "usr": "s:23ShopifyCheckoutProtocol25SelectedPaymentInstrumentV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV11instrumentsSayAA08SelectedE10InstrumentVGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV11instrumentsSayAA08SelectedE10InstrumentVGSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "selectedInstrumentID", + "printedName": "selectedInstrumentID", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV20selectedInstrumentIDSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV20selectedInstrumentIDSSSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV20selectedInstrumentIDSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV20selectedInstrumentIDSSSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "TypeDecl", + "name": "CodingKeys", + "printedName": "CodingKeys", + "children": [ + { + "kind": "Var", + "name": "instruments", + "printedName": "instruments", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.ReadyPayment.CodingKeys.Type) -> ShopifyCheckoutProtocol.ReadyPayment.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO11instrumentsyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO11instrumentsyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Var", + "name": "selectedInstrumentID", + "printedName": "selectedInstrumentID", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.ReadyPayment.CodingKeys.Type) -> ShopifyCheckoutProtocol.ReadyPayment.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO20selectedInstrumentIDyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO20selectedInstrumentIDyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(rawValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8rawValueAESgSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8rawValueAESgSS_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Inlinable" + ], + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(stringValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO11stringValueAESgSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO11stringValueAESgSS_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(intValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8intValueAESgSi_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8intValueAESgSi_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "init_kind": "Designated" + }, + { + "kind": "TypeAlias", + "name": "RawValue", + "printedName": "RawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "TypeAlias", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8RawValuea", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8RawValuea", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true + }, + { + "kind": "Var", + "name": "intValue", + "printedName": "intValue", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.Int?", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8intValueSiSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8intValueSiSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.Int?", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8intValueSiSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8intValueSiSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "rawValue", + "printedName": "rawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8rawValueSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8rawValueSSvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8rawValueSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO8rawValueSSvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Inlinable" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "stringValue", + "printedName": "stringValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO11stringValueSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO11stringValueSSvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO11stringValueSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO11stringValueSSvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessorKind": "get" + } + ] + } + ], + "declKind": "Enum", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10CodingKeysO", + "moduleName": "ShopifyCheckoutProtocol", + "enumRawTypeName": "String", + "isEnumExhaustive": true, + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "RawRepresentable", + "printedName": "RawRepresentable", + "children": [ + { + "kind": "TypeWitness", + "name": "RawValue", + "printedName": "RawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ] + } + ], + "usr": "s:SY", + "mangledName": "$sSY" + }, + { + "kind": "Conformance", + "name": "CodingKey", + "printedName": "CodingKey", + "usr": "s:s9CodingKeyP", + "mangledName": "$ss9CodingKeyP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(instruments:selectedInstrumentID:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyPayment", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.SelectedPaymentInstrument]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.SelectedPaymentInstrument]", + "children": [ + { + "kind": "TypeNominal", + "name": "SelectedPaymentInstrument", + "printedName": "ShopifyCheckoutProtocol.SelectedPaymentInstrument", + "usr": "s:23ShopifyCheckoutProtocol25SelectedPaymentInstrumentV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV11instruments20selectedInstrumentIDACSayAA08SelectedeH0VGSg_SSSgtcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV11instruments20selectedInstrumentIDACSayAA08SelectedeH0VGSg_SSSgtcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyPayment", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(data:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyPayment", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV4dataAC10Foundation4DataV_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(_:using:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyPayment", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fromURL:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyPayment", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV" + }, + { + "kind": "TypeNominal", + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV7fromURLAC10Foundation0G0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV7fromURLAC10Foundation0G0V_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "with", + "printedName": "with(instruments:selectedInstrumentID:)", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyPayment", + "printedName": "ShopifyCheckoutProtocol.ReadyPayment", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.SelectedPaymentInstrument]??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.SelectedPaymentInstrument]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.SelectedPaymentInstrument]", + "children": [ + { + "kind": "TypeNominal", + "name": "SelectedPaymentInstrument", + "printedName": "ShopifyCheckoutProtocol.SelectedPaymentInstrument", + "usr": "s:23ShopifyCheckoutProtocol25SelectedPaymentInstrumentV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV4with11instruments20selectedInstrumentIDACSayAA08SelectedeI0VGSgSg_SSSgSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV4with11instruments20selectedInstrumentIDACSayAA08SelectedeI0VGSgSg_SSSgSgtF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonData", + "printedName": "jsonData()", + "children": [ + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV8jsonData10Foundation0G0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV8jsonData10Foundation0G0VyKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonString", + "printedName": "jsonString(encoding:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol12ReadyPaymentV", + "mangledName": "$s23ShopifyCheckoutProtocol12ReadyPaymentV", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "Upgrade", + "printedName": "Upgrade", + "children": [ + { + "kind": "Var", + "name": "port", + "printedName": "port", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : ShopifyCheckoutProtocol.JSONAny]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : ShopifyCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "ShopifyCheckoutProtocol.JSONAny", + "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV4portSDySSAA7JSONAnyCGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV4portSDySSAA7JSONAnyCGSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : ShopifyCheckoutProtocol.JSONAny]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : ShopifyCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "ShopifyCheckoutProtocol.JSONAny", + "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV4portSDySSAA7JSONAnyCGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV4portSDySSAA7JSONAnyCGSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(port:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Upgrade", + "printedName": "ShopifyCheckoutProtocol.Upgrade", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : ShopifyCheckoutProtocol.JSONAny]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : ShopifyCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "ShopifyCheckoutProtocol.JSONAny", + "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV4portACSDySSAA7JSONAnyCGSg_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV4portACSDySSAA7JSONAnyCGSg_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Upgrade", + "printedName": "ShopifyCheckoutProtocol.Upgrade", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(data:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Upgrade", + "printedName": "ShopifyCheckoutProtocol.Upgrade", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV4dataAC10Foundation4DataV_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(_:using:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Upgrade", + "printedName": "ShopifyCheckoutProtocol.Upgrade", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fromURL:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Upgrade", + "printedName": "ShopifyCheckoutProtocol.Upgrade", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV" + }, + { + "kind": "TypeNominal", + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV7fromURLAC10Foundation0F0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV7fromURLAC10Foundation0F0V_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "with", + "printedName": "with(port:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Upgrade", + "printedName": "ShopifyCheckoutProtocol.Upgrade", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : ShopifyCheckoutProtocol.JSONAny]??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[Swift.String : ShopifyCheckoutProtocol.JSONAny]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Dictionary", + "printedName": "[Swift.String : ShopifyCheckoutProtocol.JSONAny]", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "ShopifyCheckoutProtocol.JSONAny", + "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC" + } + ], + "usr": "s:SD" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV4with4portACSDySSAA7JSONAnyCGSgSg_tF", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV4with4portACSDySSAA7JSONAnyCGSgSg_tF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonData", + "printedName": "jsonData()", + "children": [ + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV8jsonData10Foundation0F0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV8jsonData10Foundation0F0VyKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonString", + "printedName": "jsonString(encoding:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol7UpgradeV", + "mangledName": "$s23ShopifyCheckoutProtocol7UpgradeV", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "AuthRequest", + "printedName": "AuthRequest", + "children": [ + { + "kind": "Var", + "name": "type", + "printedName": "type", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4typeSSSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(type:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4typeACSSSg_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4typeACSSSg_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(data:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4dataAC10Foundation4DataV_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(_:using:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fromURL:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV7fromURLAC10Foundation0G0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV7fromURLAC10Foundation0G0V_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "with", + "printedName": "with(type:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV4with4typeACSSSgSg_tF", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV4with4typeACSSSgSg_tF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonData", + "printedName": "jsonData()", + "children": [ + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV8jsonData10Foundation0G0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV8jsonData10Foundation0G0VyKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonString", + "printedName": "jsonString(encoding:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV", + "mangledName": "$s23ShopifyCheckoutProtocol11AuthRequestV", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + }, + { + "kind": "Conformance", + "name": "EventPayload", + "printedName": "EventPayload", + "usr": "s:23ShopifyCheckoutProtocol12EventPayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol12EventPayloadP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "AuthResult", + "printedName": "AuthResult", + "children": [ + { + "kind": "Var", + "name": "credential", + "printedName": "credential", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10credentialSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10credentialSSSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10credentialSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10credentialSSSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "ucp", + "printedName": "ucp", + "children": [ + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV3ucpAA017InstrumentsChangeE3UcpVvp", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV3ucpAA017InstrumentsChangeE3UcpVvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV3ucpAA017InstrumentsChangeE3UcpVvg", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV3ucpAA017InstrumentsChangeE3UcpVvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "continueURL", + "printedName": "continueURL", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV11continueURLSSSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV11continueURLSSSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV11continueURLSSSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV11continueURLSSSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "messages", + "printedName": "messages", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.Message]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.Message]", + "children": [ + { + "kind": "TypeNominal", + "name": "Message", + "printedName": "ShopifyCheckoutProtocol.Message", + "usr": "s:23ShopifyCheckoutProtocol7MessageV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV8messagesSayAA7MessageVGSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV8messagesSayAA7MessageVGSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.Message]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.Message]", + "children": [ + { + "kind": "TypeNominal", + "name": "Message", + "printedName": "ShopifyCheckoutProtocol.Message", + "usr": "s:23ShopifyCheckoutProtocol7MessageV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV8messagesSayAA7MessageVGSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV8messagesSayAA7MessageVGSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "TypeDecl", + "name": "CodingKeys", + "printedName": "CodingKeys", + "children": [ + { + "kind": "Var", + "name": "credential", + "printedName": "credential", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.AuthResult.CodingKeys.Type) -> ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO10credentialyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO10credentialyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Var", + "name": "ucp", + "printedName": "ucp", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.AuthResult.CodingKeys.Type) -> ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO3ucpyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO3ucpyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Var", + "name": "continueURL", + "printedName": "continueURL", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.AuthResult.CodingKeys.Type) -> ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO11continueURLyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO11continueURLyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Var", + "name": "messages", + "printedName": "messages", + "children": [ + { + "kind": "TypeFunc", + "name": "Function", + "printedName": "(ShopifyCheckoutProtocol.AuthResult.CodingKeys.Type) -> ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + }, + { + "kind": "TypeNominal", + "name": "Metatype", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys.Type", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + } + ] + } + ] + } + ], + "declKind": "EnumElement", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8messagesyA2EmF", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8messagesyA2EmF", + "moduleName": "ShopifyCheckoutProtocol" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(rawValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8rawValueAESgSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8rawValueAESgSS_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Inlinable" + ], + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(stringValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO11stringValueAESgSS_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO11stringValueAESgSS_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(intValue:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys?", + "children": [ + { + "kind": "TypeNominal", + "name": "CodingKeys", + "printedName": "ShopifyCheckoutProtocol.AuthResult.CodingKeys", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8intValueAESgSi_tcfc", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8intValueAESgSi_tcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "init_kind": "Designated" + }, + { + "kind": "TypeAlias", + "name": "RawValue", + "printedName": "RawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "TypeAlias", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8RawValuea", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8RawValuea", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true + }, + { + "kind": "Var", + "name": "intValue", + "printedName": "intValue", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.Int?", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8intValueSiSgvp", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8intValueSiSgvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.Int?", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8intValueSiSgvg", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8intValueSiSgvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "rawValue", + "printedName": "rawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8rawValueSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8rawValueSSvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8rawValueSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO8rawValueSSvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Inlinable" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "stringValue", + "printedName": "stringValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO11stringValueSSvp", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO11stringValueSSvp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO11stringValueSSvg", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO11stringValueSSvg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "accessorKind": "get" + } + ] + } + ], + "declKind": "Enum", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10CodingKeysO", + "moduleName": "ShopifyCheckoutProtocol", + "enumRawTypeName": "String", + "isEnumExhaustive": true, + "conformances": [ + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "RawRepresentable", + "printedName": "RawRepresentable", + "children": [ + { + "kind": "TypeWitness", + "name": "RawValue", + "printedName": "RawValue", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ] + } + ], + "usr": "s:SY", + "mangledName": "$sSY" + }, + { + "kind": "Conformance", + "name": "CodingKey", + "printedName": "CodingKey", + "usr": "s:s9CodingKeyP", + "mangledName": "$ss9CodingKeyP" + }, + { + "kind": "Conformance", + "name": "CustomDebugStringConvertible", + "printedName": "CustomDebugStringConvertible", + "usr": "s:s28CustomDebugStringConvertibleP", + "mangledName": "$ss28CustomDebugStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "CustomStringConvertible", + "printedName": "CustomStringConvertible", + "usr": "s:s23CustomStringConvertibleP", + "mangledName": "$ss23CustomStringConvertibleP" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(credential:ucp:continueURL:messages:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.Message]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.Message]", + "children": [ + { + "kind": "TypeNominal", + "name": "Message", + "printedName": "ShopifyCheckoutProtocol.Message", + "usr": "s:23ShopifyCheckoutProtocol7MessageV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10credential3ucp11continueURL8messagesACSSSg_AA017InstrumentsChangeE3UcpVAHSayAA7MessageVGSgtcfc", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10credential3ucp11continueURL8messagesACSSSg_AA017InstrumentsChangeE3UcpVAHSayAA7MessageVGSgtcfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(data:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + }, + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV4dataAC10Foundation4DataV_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV4dataAC10Foundation4DataV_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(_:using:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + }, + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV_5usingACSS_SS10FoundationE8EncodingVtKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(fromURL:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + }, + { + "kind": "TypeNominal", + "name": "URL", + "printedName": "Foundation.URL", + "usr": "s:10Foundation3URLV" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV7fromURLAC10Foundation0G0V_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV7fromURLAC10Foundation0G0V_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "with", + "printedName": "with(credential:ucp:continueURL:messages:)", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp?", + "children": [ + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResultUcp", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResultUcp", + "usr": "s:23ShopifyCheckoutProtocol26InstrumentsChangeResultUcpV" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.Message]??", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "[ShopifyCheckoutProtocol.Message]?", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[ShopifyCheckoutProtocol.Message]", + "children": [ + { + "kind": "TypeNominal", + "name": "Message", + "printedName": "ShopifyCheckoutProtocol.Message", + "usr": "s:23ShopifyCheckoutProtocol7MessageV" + } + ], + "usr": "s:Sa" + } + ], + "usr": "s:Sq" + } + ], + "hasDefaultArg": true, + "usr": "s:Sq" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV4with10credential3ucp11continueURL8messagesACSSSgSg_AA017InstrumentsChangeE3UcpVSgAJSayAA7MessageVGSgSgtF", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV4with10credential3ucp11continueURL8messagesACSSSgSg_AA017InstrumentsChangeE3UcpVSgAJSayAA7MessageVGSgSgtF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonData", + "printedName": "jsonData()", + "children": [ + { + "kind": "TypeNominal", + "name": "Data", + "printedName": "Foundation.Data", + "usr": "s:10Foundation4DataV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV8jsonData10Foundation0G0VyKF", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV8jsonData10Foundation0G0VyKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "jsonString", + "printedName": "jsonString(encoding:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Optional", + "printedName": "Swift.String?", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "usr": "s:Sq" + }, + { + "kind": "TypeNominal", + "name": "Encoding", + "printedName": "Swift.String.Encoding", + "hasDefaultArg": true, + "usr": "s:SS10FoundationE8EncodingV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV10jsonString8encodingSSSgSS10FoundationE8EncodingV_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "isFromExtension": true, + "throwing": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Struct", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV", + "mangledName": "$s23ShopifyCheckoutProtocol10AuthResultV", + "moduleName": "ShopifyCheckoutProtocol", + "conformances": [ + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + }, + { + "kind": "Conformance", + "name": "ResponsePayload", + "printedName": "ResponsePayload", + "usr": "s:23ShopifyCheckoutProtocol15ResponsePayloadP", + "mangledName": "$s23ShopifyCheckoutProtocol15ResponsePayloadP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "JSONNull", + "printedName": "JSONNull", + "children": [ + { + "kind": "Function", + "name": "==", + "printedName": "==(_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + }, + { + "kind": "TypeNominal", + "name": "JSONNull", + "printedName": "ShopifyCheckoutProtocol.JSONNull", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC" + }, + { + "kind": "TypeNominal", + "name": "JSONNull", + "printedName": "ShopifyCheckoutProtocol.JSONNull", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC2eeoiySbAC_ACtFZ", + "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC2eeoiySbAC_ACtFZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "Final" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "hash", + "printedName": "hash(into:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Hasher", + "printedName": "Swift.Hasher", + "paramValueOwnership": "InOut", + "usr": "s:s6HasherV" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC4hash4intoys6HasherVz_tF", + "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC4hash4intoys6HasherVz_tF", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "Final" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init()", + "children": [ + { + "kind": "TypeNominal", + "name": "JSONNull", + "printedName": "ShopifyCheckoutProtocol.JSONNull", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullCACycfc", + "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullCACycfc", + "moduleName": "ShopifyCheckoutProtocol", + "init_kind": "Designated" + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "JSONNull", + "printedName": "ShopifyCheckoutProtocol.JSONNull", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "Required" + ], + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "Final" + ], + "throwing": true, + "funcSelfKind": "NonMutating" + }, + { + "kind": "Var", + "name": "hashValue", + "printedName": "hashValue", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC9hashValueSivp", + "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC9hashValueSivp", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "Int", + "printedName": "Swift.Int", + "usr": "s:Si" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC9hashValueSivg", + "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC9hashValueSivg", + "moduleName": "ShopifyCheckoutProtocol", + "implicit": true, + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + } + ], + "declKind": "Class", + "usr": "s:23ShopifyCheckoutProtocol8JSONNullC", + "mangledName": "$s23ShopifyCheckoutProtocol8JSONNullC", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "Final" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" + }, + { + "kind": "Conformance", + "name": "Encodable", + "printedName": "Encodable", + "usr": "s:SE", + "mangledName": "$sSE" + }, + { + "kind": "Conformance", + "name": "Hashable", + "printedName": "Hashable", + "usr": "s:SH", + "mangledName": "$sSH" + }, + { + "kind": "Conformance", + "name": "Sendable", + "printedName": "Sendable", + "usr": "s:s8SendableP", + "mangledName": "$ss8SendableP" + }, + { + "kind": "Conformance", + "name": "Equatable", + "printedName": "Equatable", + "usr": "s:SQ", + "mangledName": "$sSQ" + }, + { + "kind": "Conformance", + "name": "SendableMetatype", + "printedName": "SendableMetatype", + "usr": "s:s16SendableMetatypeP", + "mangledName": "$ss16SendableMetatypeP" + }, + { + "kind": "Conformance", + "name": "Copyable", + "printedName": "Copyable", + "usr": "s:s8CopyableP", + "mangledName": "$ss8CopyableP" + }, + { + "kind": "Conformance", + "name": "Escapable", + "printedName": "Escapable", + "usr": "s:s9EscapableP", + "mangledName": "$ss9EscapableP" + } + ] + }, + { + "kind": "TypeDecl", + "name": "JSONAny", + "printedName": "JSONAny", + "children": [ + { + "kind": "Var", + "name": "value", + "printedName": "value", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC5valueypvp", + "mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC5valueypvp", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "Final" + ], + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "ProtocolComposition", + "printedName": "Any" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC5valueypvg", + "mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC5valueypvg", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "Final" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Constructor", + "name": "init", + "printedName": "init(from:)", + "children": [ + { + "kind": "TypeNominal", + "name": "JSONAny", + "printedName": "ShopifyCheckoutProtocol.JSONAny", + "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC" + }, + { + "kind": "TypeNominal", + "name": "Decoder", + "printedName": "any Swift.Decoder", + "usr": "s:s7DecoderP" + } + ], + "declKind": "Constructor", + "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC4fromACs7Decoder_p_tKcfc", + "mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC4fromACs7Decoder_p_tKcfc", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "Required" + ], + "throwing": true, + "init_kind": "Designated" + }, + { + "kind": "Function", + "name": "encode", + "printedName": "encode(to:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Encoder", + "printedName": "any Swift.Encoder", + "usr": "s:s7EncoderP" + } + ], + "declKind": "Func", + "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC6encode2toys7Encoder_p_tKF", + "mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC6encode2toys7Encoder_p_tKF", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "Final" + ], + "throwing": true, + "funcSelfKind": "NonMutating" + } + ], + "declKind": "Class", + "usr": "s:23ShopifyCheckoutProtocol7JSONAnyC", + "mangledName": "$s23ShopifyCheckoutProtocol7JSONAnyC", + "moduleName": "ShopifyCheckoutProtocol", + "declAttributes": [ + "Final" + ], + "conformances": [ + { + "kind": "Conformance", + "name": "Decodable", + "printedName": "Decodable", + "usr": "s:Se", + "mangledName": "$sSe" }, { "kind": "Conformance", diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift index 1678fcb39..deb58e01b 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift @@ -1,30 +1,7 @@ import Foundation -public struct AuthRequest: EventPayload { - public let type: String? - - public init(type: String? = nil) { - self.type = type - } -} - -public struct AuthResult: ResponsePayload { - public let credential: String - - public init(credential: String) { - self.credential = credential - } - - private enum CodingKeys: String, CodingKey { - case ucp, credential - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(UCPSuccess(version: EmbeddedCheckoutProtocol.specVersion), forKey: .ucp) - try container.encode(credential, forKey: .credential) - } -} +extension AuthRequest: EventPayload {} +extension AuthResult: ResponsePayload {} extension EmbeddedCheckoutProtocol { public static let auth = RequestDescriptor( diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol+Codec.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol+Codec.swift index 1100b29c3..fbcd4c754 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol+Codec.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol+Codec.swift @@ -64,13 +64,3 @@ extension EmbeddedCheckoutProtocol { return String(data: data, encoding: .utf8) ?? "{}" } } - -struct UCPSuccess: Encodable { - let version: String - let status = "success" -} - -struct UCPError: Encodable { - let version: String - let status = "error" -} diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift index 725e85a31..2c52182e0 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift @@ -6,6 +6,10 @@ // let errorResponse = try ErrorResponse(json) // let instrumentsChangeResult = try InstrumentsChangeResult(json) // let credentialResult = try CredentialResult(json) +// let readyRequest = try ReadyRequest(json) +// let readyResult = try ReadyResult(json) +// let authRequest = try AuthRequest(json) +// let authResult = try AuthResult(json) import Foundation @@ -3191,7 +3195,7 @@ public struct UCPOrderResponseSchema: Codable, Sendable { /// Payment handler registry keyed by reverse-domain name. public let paymentHandlers: [String: [PaymentHandlerResponseSchema]]? /// Service registry keyed by reverse-domain name. - public let services: [String: [UCPOrderResponseSchemaService]]? + public let services: [String: [Service]]? /// Application-level status of the UCP operation. public let status: UCPCheckoutResponseSchemaStatus? public let version: String @@ -3202,7 +3206,7 @@ public struct UCPOrderResponseSchema: Codable, Sendable { case services, status, version } - public init(capabilities: [String: [CapabilityResponseSchema]]?, paymentHandlers: [String: [PaymentHandlerResponseSchema]]?, services: [String: [UCPOrderResponseSchemaService]]?, status: UCPCheckoutResponseSchemaStatus?, version: String) { + public init(capabilities: [String: [CapabilityResponseSchema]]?, paymentHandlers: [String: [PaymentHandlerResponseSchema]]?, services: [String: [Service]]?, status: UCPCheckoutResponseSchemaStatus?, version: String) { self.capabilities = capabilities self.paymentHandlers = paymentHandlers self.services = services @@ -3232,7 +3236,7 @@ public extension UCPOrderResponseSchema { func with( capabilities: [String: [CapabilityResponseSchema]]?? = nil, paymentHandlers: [String: [PaymentHandlerResponseSchema]]?? = nil, - services: [String: [UCPOrderResponseSchemaService]]?? = nil, + services: [String: [Service]]?? = nil, status: UCPCheckoutResponseSchemaStatus?? = nil, version: String? = nil ) -> UCPOrderResponseSchema { @@ -3255,8 +3259,8 @@ public extension UCPOrderResponseSchema { } /// Shared foundation for all UCP entities. -// MARK: - UCPOrderResponseSchemaService -public struct UCPOrderResponseSchemaService: Codable, Sendable { +// MARK: - Service +public struct Service: Codable, Sendable { /// Entity-specific configuration. Structure defined by each entity's schema. public let config: [String: JSONAny]? /// Unique identifier for this entity instance. Used to disambiguate when multiple instances @@ -3284,11 +3288,11 @@ public struct UCPOrderResponseSchemaService: Codable, Sendable { } } -// MARK: UCPOrderResponseSchemaService convenience initializers and mutators +// MARK: Service convenience initializers and mutators -public extension UCPOrderResponseSchemaService { +public extension Service { init(data: Data) throws { - self = try newJSONDecoder().decode(UCPOrderResponseSchemaService.self, from: data) + self = try newJSONDecoder().decode(Service.self, from: data) } init(_ json: String, using encoding: String.Encoding = .utf8) throws { @@ -3310,8 +3314,8 @@ public extension UCPOrderResponseSchemaService { version: String? = nil, endpoint: String?? = nil, transport: Transport? = nil - ) -> UCPOrderResponseSchemaService { - return UCPOrderResponseSchemaService( + ) -> Service { + return Service( config: config ?? self.config, id: id ?? self.id, schema: schema ?? self.schema, @@ -3406,9 +3410,9 @@ public struct ErrorResponseUcp: Codable, Sendable { /// Payment handler registry keyed by reverse-domain name. public let paymentHandlers: [String: [PaymentHandlerResponseSchema]]? /// Service registry keyed by reverse-domain name. - public let services: [String: [UCPOrderResponseSchemaService]]? + public let services: [String: [Service]]? /// Application-level status of the UCP operation. - public let status: StatusEnum + public let status: ErrorStatus public let version: String public enum CodingKeys: String, CodingKey { @@ -3417,7 +3421,7 @@ public struct ErrorResponseUcp: Codable, Sendable { case services, status, version } - public init(capabilities: [String: [CapabilityResponseSchema]]?, paymentHandlers: [String: [PaymentHandlerResponseSchema]]?, services: [String: [UCPOrderResponseSchemaService]]?, status: StatusEnum, version: String) { + public init(capabilities: [String: [CapabilityResponseSchema]]?, paymentHandlers: [String: [PaymentHandlerResponseSchema]]?, services: [String: [Service]]?, status: ErrorStatus, version: String) { self.capabilities = capabilities self.paymentHandlers = paymentHandlers self.services = services @@ -3447,8 +3451,8 @@ public extension ErrorResponseUcp { func with( capabilities: [String: [CapabilityResponseSchema]]?? = nil, paymentHandlers: [String: [PaymentHandlerResponseSchema]]?? = nil, - services: [String: [UCPOrderResponseSchemaService]]?? = nil, - status: StatusEnum? = nil, + services: [String: [Service]]?? = nil, + status: ErrorStatus? = nil, version: String? = nil ) -> ErrorResponseUcp { return ErrorResponseUcp( @@ -3470,7 +3474,7 @@ public extension ErrorResponseUcp { } /// Application-level status of the UCP operation. -public enum StatusEnum: String, Codable, Sendable { +public enum ErrorStatus: String, Codable, Sendable { case error = "error" } @@ -3665,7 +3669,7 @@ public struct InstrumentsChangeResultUcp: Codable, Sendable { /// Payment handler registry keyed by reverse-domain name. public let paymentHandlers: [String: [PaymentHandlerElement]]? /// Service registry keyed by reverse-domain name. - public let services: [String: [InstrumentsChangeService]]? + public let services: [String: [EmbeddedService]]? /// Application-level status of the UCP operation. public let status: UCPCheckoutResponseSchemaStatus public let version: String @@ -3676,7 +3680,7 @@ public struct InstrumentsChangeResultUcp: Codable, Sendable { case services, status, version } - public init(capabilities: [String: [CapabilityElement]]?, paymentHandlers: [String: [PaymentHandlerElement]]?, services: [String: [InstrumentsChangeService]]?, status: UCPCheckoutResponseSchemaStatus, version: String) { + public init(capabilities: [String: [CapabilityElement]]?, paymentHandlers: [String: [PaymentHandlerElement]]?, services: [String: [EmbeddedService]]?, status: UCPCheckoutResponseSchemaStatus, version: String) { self.capabilities = capabilities self.paymentHandlers = paymentHandlers self.services = services @@ -3706,7 +3710,7 @@ public extension InstrumentsChangeResultUcp { func with( capabilities: [String: [CapabilityElement]]?? = nil, paymentHandlers: [String: [PaymentHandlerElement]]?? = nil, - services: [String: [InstrumentsChangeService]]?? = nil, + services: [String: [EmbeddedService]]?? = nil, status: UCPCheckoutResponseSchemaStatus? = nil, version: String? = nil ) -> InstrumentsChangeResultUcp { @@ -3939,8 +3943,8 @@ public extension PaymentHandlerAvailableInstrument { } /// Shared foundation for all UCP entities. -// MARK: - InstrumentsChangeService -public struct InstrumentsChangeService: Codable, Sendable { +// MARK: - EmbeddedService +public struct EmbeddedService: Codable, Sendable { /// Entity-specific configuration. Structure defined by each entity's schema. public let config: [String: JSONAny]? /// Unique identifier for this entity instance. Used to disambiguate when multiple instances @@ -3968,11 +3972,11 @@ public struct InstrumentsChangeService: Codable, Sendable { } } -// MARK: InstrumentsChangeService convenience initializers and mutators +// MARK: EmbeddedService convenience initializers and mutators -public extension InstrumentsChangeService { +public extension EmbeddedService { init(data: Data) throws { - self = try newJSONDecoder().decode(InstrumentsChangeService.self, from: data) + self = try newJSONDecoder().decode(EmbeddedService.self, from: data) } init(_ json: String, using encoding: String.Encoding = .utf8) throws { @@ -3994,8 +3998,8 @@ public extension InstrumentsChangeService { version: String? = nil, endpoint: String?? = nil, transport: Transport? = nil - ) -> InstrumentsChangeService { - return InstrumentsChangeService( + ) -> EmbeddedService { + return EmbeddedService( config: config ?? self.config, id: id ?? self.id, schema: schema ?? self.schema, @@ -4130,6 +4134,507 @@ public extension CredentialCheckout { } } +// MARK: - ReadyRequest +public struct ReadyRequest: Codable, Sendable { + public let auth: Auth? + /// Delegation types the merchant accepts. Must be subset of checkout.embedded.delegations. + public let delegate: [String] + + public init(auth: Auth?, delegate: [String]) { + self.auth = auth + self.delegate = delegate + } +} + +// MARK: ReadyRequest convenience initializers and mutators + +public extension ReadyRequest { + init(data: Data) throws { + self = try newJSONDecoder().decode(ReadyRequest.self, from: data) + } + + init(_ json: String, using encoding: String.Encoding = .utf8) throws { + guard let data = json.data(using: encoding) else { + throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil) + } + try self.init(data: data) + } + + init(fromURL url: URL) throws { + try self.init(data: try Data(contentsOf: url)) + } + + func with( + auth: Auth?? = nil, + delegate: [String]? = nil + ) -> ReadyRequest { + return ReadyRequest( + auth: auth ?? self.auth, + delegate: delegate ?? self.delegate + ) + } + + func jsonData() throws -> Data { + return try newJSONEncoder().encode(self) + } + + func jsonString(encoding: String.Encoding = .utf8) throws -> String? { + return String(data: try self.jsonData(), encoding: encoding) + } +} + +// MARK: - Auth +public struct Auth: Codable, Sendable { + public let type: String? + + public init(type: String?) { + self.type = type + } +} + +// MARK: Auth convenience initializers and mutators + +public extension Auth { + init(data: Data) throws { + self = try newJSONDecoder().decode(Auth.self, from: data) + } + + init(_ json: String, using encoding: String.Encoding = .utf8) throws { + guard let data = json.data(using: encoding) else { + throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil) + } + try self.init(data: data) + } + + init(fromURL url: URL) throws { + try self.init(data: try Data(contentsOf: url)) + } + + func with( + type: String?? = nil + ) -> Auth { + return Auth( + type: type ?? self.type + ) + } + + func jsonData() throws -> Data { + return try newJSONEncoder().encode(self) + } + + func jsonString(encoding: String.Encoding = .utf8) throws -> String? { + return String(data: try self.jsonData(), encoding: encoding) + } +} + +/// Handshake response from host. +/// +/// Generic error response when business logic prevents resource creation or failed to +/// retrieve resource. Used when no valid resource can be established. +// MARK: - ReadyResult +public struct ReadyResult: Codable, Sendable { + /// Initial delegation state from host. Fields are permitted only when the corresponding + /// delegation is accepted. + public let checkout: ReadyCheckout? + /// Requested authorization. Some common examples include API key and OAuth token. + public let credential: String? + /// UCP protocol metadata. Status MUST be 'error' for error response. + public let ucp: InstrumentsChangeResultUcp + /// Channel upgrade instructions. If present, switch to provided MessagePort. + public let upgrade: Upgrade? + /// URL for buyer handoff or session recovery. + public let continueURL: String? + /// Array of messages describing why the operation failed. + public let messages: [Message]? + + public enum CodingKeys: String, CodingKey { + case checkout, credential, ucp, upgrade + case continueURL = "continue_url" + case messages + } + + public init(checkout: ReadyCheckout?, credential: String?, ucp: InstrumentsChangeResultUcp, upgrade: Upgrade?, continueURL: String?, messages: [Message]?) { + self.checkout = checkout + self.credential = credential + self.ucp = ucp + self.upgrade = upgrade + self.continueURL = continueURL + self.messages = messages + } +} + +// MARK: ReadyResult convenience initializers and mutators + +public extension ReadyResult { + init(data: Data) throws { + self = try newJSONDecoder().decode(ReadyResult.self, from: data) + } + + init(_ json: String, using encoding: String.Encoding = .utf8) throws { + guard let data = json.data(using: encoding) else { + throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil) + } + try self.init(data: data) + } + + init(fromURL url: URL) throws { + try self.init(data: try Data(contentsOf: url)) + } + + func with( + checkout: ReadyCheckout?? = nil, + credential: String?? = nil, + ucp: InstrumentsChangeResultUcp? = nil, + upgrade: Upgrade?? = nil, + continueURL: String?? = nil, + messages: [Message]?? = nil + ) -> ReadyResult { + return ReadyResult( + checkout: checkout ?? self.checkout, + credential: credential ?? self.credential, + ucp: ucp ?? self.ucp, + upgrade: upgrade ?? self.upgrade, + continueURL: continueURL ?? self.continueURL, + messages: messages ?? self.messages + ) + } + + func jsonData() throws -> Data { + return try newJSONEncoder().encode(self) + } + + func jsonString(encoding: String.Encoding = .utf8) throws -> String? { + return String(data: try self.jsonData(), encoding: encoding) + } +} + +/// Initial delegation state from host. Fields are permitted only when the corresponding +/// delegation is accepted. +// MARK: - ReadyCheckout +public struct ReadyCheckout: Codable, Sendable { + public let fulfillment: CheckoutFulfillmentClass? + /// Payment instruments with selected instrument ID. + public let payment: ReadyPayment? + + public init(fulfillment: CheckoutFulfillmentClass?, payment: ReadyPayment?) { + self.fulfillment = fulfillment + self.payment = payment + } +} + +// MARK: ReadyCheckout convenience initializers and mutators + +public extension ReadyCheckout { + init(data: Data) throws { + self = try newJSONDecoder().decode(ReadyCheckout.self, from: data) + } + + init(_ json: String, using encoding: String.Encoding = .utf8) throws { + guard let data = json.data(using: encoding) else { + throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil) + } + try self.init(data: data) + } + + init(fromURL url: URL) throws { + try self.init(data: try Data(contentsOf: url)) + } + + func with( + fulfillment: CheckoutFulfillmentClass?? = nil, + payment: ReadyPayment?? = nil + ) -> ReadyCheckout { + return ReadyCheckout( + fulfillment: fulfillment ?? self.fulfillment, + payment: payment ?? self.payment + ) + } + + func jsonData() throws -> Data { + return try newJSONEncoder().encode(self) + } + + func jsonString(encoding: String.Encoding = .utf8) throws -> String? { + return String(data: try self.jsonData(), encoding: encoding) + } +} + +/// Container for fulfillment methods and availability. +// MARK: - CheckoutFulfillmentClass +public struct CheckoutFulfillmentClass: Codable, Sendable { + /// Inventory availability hints. + public let availableMethods: [FulfillmentAvailableMethod]? + /// Fulfillment methods for cart items. + public let methods: [FulfillmentMethod]? + + public enum CodingKeys: String, CodingKey { + case availableMethods = "available_methods" + case methods + } + + public init(availableMethods: [FulfillmentAvailableMethod]?, methods: [FulfillmentMethod]?) { + self.availableMethods = availableMethods + self.methods = methods + } +} + +// MARK: CheckoutFulfillmentClass convenience initializers and mutators + +public extension CheckoutFulfillmentClass { + init(data: Data) throws { + self = try newJSONDecoder().decode(CheckoutFulfillmentClass.self, from: data) + } + + init(_ json: String, using encoding: String.Encoding = .utf8) throws { + guard let data = json.data(using: encoding) else { + throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil) + } + try self.init(data: data) + } + + init(fromURL url: URL) throws { + try self.init(data: try Data(contentsOf: url)) + } + + func with( + availableMethods: [FulfillmentAvailableMethod]?? = nil, + methods: [FulfillmentMethod]?? = nil + ) -> CheckoutFulfillmentClass { + return CheckoutFulfillmentClass( + availableMethods: availableMethods ?? self.availableMethods, + methods: methods ?? self.methods + ) + } + + func jsonData() throws -> Data { + return try newJSONEncoder().encode(self) + } + + func jsonString(encoding: String.Encoding = .utf8) throws -> String? { + return String(data: try self.jsonData(), encoding: encoding) + } +} + +/// Payment instruments with selected instrument ID. +/// +/// Payment configuration containing handlers. +// MARK: - ReadyPayment +public struct ReadyPayment: Codable, Sendable { + /// The payment instruments available for this payment. Each instrument is associated with a + /// specific handler via the handler_id field. Handlers can extend the base + /// payment_instrument schema to add handler-specific fields. + public let instruments: [SelectedPaymentInstrument]? + /// ID of the selected payment instrument. + public let selectedInstrumentID: String? + + public enum CodingKeys: String, CodingKey { + case instruments + case selectedInstrumentID = "selected_instrument_id" + } + + public init(instruments: [SelectedPaymentInstrument]?, selectedInstrumentID: String?) { + self.instruments = instruments + self.selectedInstrumentID = selectedInstrumentID + } +} + +// MARK: ReadyPayment convenience initializers and mutators + +public extension ReadyPayment { + init(data: Data) throws { + self = try newJSONDecoder().decode(ReadyPayment.self, from: data) + } + + init(_ json: String, using encoding: String.Encoding = .utf8) throws { + guard let data = json.data(using: encoding) else { + throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil) + } + try self.init(data: data) + } + + init(fromURL url: URL) throws { + try self.init(data: try Data(contentsOf: url)) + } + + func with( + instruments: [SelectedPaymentInstrument]?? = nil, + selectedInstrumentID: String?? = nil + ) -> ReadyPayment { + return ReadyPayment( + instruments: instruments ?? self.instruments, + selectedInstrumentID: selectedInstrumentID ?? self.selectedInstrumentID + ) + } + + func jsonData() throws -> Data { + return try newJSONEncoder().encode(self) + } + + func jsonString(encoding: String.Encoding = .utf8) throws -> String? { + return String(data: try self.jsonData(), encoding: encoding) + } +} + +/// Channel upgrade instructions. If present, switch to provided MessagePort. +// MARK: - Upgrade +public struct Upgrade: Codable, Sendable { + /// MessagePort for upgraded channel. Runtime type is MessagePort. + public let port: [String: JSONAny]? + + public init(port: [String: JSONAny]?) { + self.port = port + } +} + +// MARK: Upgrade convenience initializers and mutators + +public extension Upgrade { + init(data: Data) throws { + self = try newJSONDecoder().decode(Upgrade.self, from: data) + } + + init(_ json: String, using encoding: String.Encoding = .utf8) throws { + guard let data = json.data(using: encoding) else { + throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil) + } + try self.init(data: data) + } + + init(fromURL url: URL) throws { + try self.init(data: try Data(contentsOf: url)) + } + + func with( + port: [String: JSONAny]?? = nil + ) -> Upgrade { + return Upgrade( + port: port ?? self.port + ) + } + + func jsonData() throws -> Data { + return try newJSONEncoder().encode(self) + } + + func jsonString(encoding: String.Encoding = .utf8) throws -> String? { + return String(data: try self.jsonData(), encoding: encoding) + } +} + +// MARK: - AuthRequest +public struct AuthRequest: Codable, Sendable { + public let type: String? + + public init(type: String?) { + self.type = type + } +} + +// MARK: AuthRequest convenience initializers and mutators + +public extension AuthRequest { + init(data: Data) throws { + self = try newJSONDecoder().decode(AuthRequest.self, from: data) + } + + init(_ json: String, using encoding: String.Encoding = .utf8) throws { + guard let data = json.data(using: encoding) else { + throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil) + } + try self.init(data: data) + } + + init(fromURL url: URL) throws { + try self.init(data: try Data(contentsOf: url)) + } + + func with( + type: String?? = nil + ) -> AuthRequest { + return AuthRequest( + type: type ?? self.type + ) + } + + func jsonData() throws -> Data { + return try newJSONEncoder().encode(self) + } + + func jsonString(encoding: String.Encoding = .utf8) throws -> String? { + return String(data: try self.jsonData(), encoding: encoding) + } +} + +/// Auth response from host containing the requested authorization data. +/// +/// Generic error response when business logic prevents resource creation or failed to +/// retrieve resource. Used when no valid resource can be established. +// MARK: - AuthResult +public struct AuthResult: Codable, Sendable { + /// Requested authorization. Some common examples include API key and OAuth token. + public let credential: String? + /// UCP protocol metadata. Status MUST be 'error' for error response. + public let ucp: InstrumentsChangeResultUcp + /// URL for buyer handoff or session recovery. + public let continueURL: String? + /// Array of messages describing why the operation failed. + public let messages: [Message]? + + public enum CodingKeys: String, CodingKey { + case credential, ucp + case continueURL = "continue_url" + case messages + } + + public init(credential: String?, ucp: InstrumentsChangeResultUcp, continueURL: String?, messages: [Message]?) { + self.credential = credential + self.ucp = ucp + self.continueURL = continueURL + self.messages = messages + } +} + +// MARK: AuthResult convenience initializers and mutators + +public extension AuthResult { + init(data: Data) throws { + self = try newJSONDecoder().decode(AuthResult.self, from: data) + } + + init(_ json: String, using encoding: String.Encoding = .utf8) throws { + guard let data = json.data(using: encoding) else { + throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil) + } + try self.init(data: data) + } + + init(fromURL url: URL) throws { + try self.init(data: try Data(contentsOf: url)) + } + + func with( + credential: String?? = nil, + ucp: InstrumentsChangeResultUcp? = nil, + continueURL: String?? = nil, + messages: [Message]?? = nil + ) -> AuthResult { + return AuthResult( + credential: credential ?? self.credential, + ucp: ucp ?? self.ucp, + continueURL: continueURL ?? self.continueURL, + messages: messages ?? self.messages + ) + } + + func jsonData() throws -> Data { + return try newJSONEncoder().encode(self) + } + + func jsonString(encoding: String.Encoding = .utf8) throws -> String? { + return String(data: try self.jsonData(), encoding: encoding) + } +} + // MARK: - Helper functions for creating encoders and decoders func newJSONDecoder() -> JSONDecoder { diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift index dde354252..52c9efa65 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift @@ -1,44 +1,7 @@ import Foundation -public struct ReadyRequest: EventPayload { - public let delegate: [String] - - public init(delegate: [String] = []) { - self.delegate = delegate - } - - private enum CodingKeys: String, CodingKey { - case delegate - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - delegate = try container.decodeIfPresent([String].self, forKey: .delegate) ?? [] - } -} - -public struct ReadyResult: ResponsePayload { - public let delegate: [String] - public let credential: String? - - public init(delegate: [String] = [], credential: String? = nil) { - self.delegate = delegate - self.credential = credential - } - - private enum CodingKeys: String, CodingKey { - case ucp, delegate, credential - } - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(UCPSuccess(version: EmbeddedCheckoutProtocol.specVersion), forKey: .ucp) - if !delegate.isEmpty { - try container.encode(delegate, forKey: .delegate) - } - try container.encodeIfPresent(credential, forKey: .credential) - } -} +extension ReadyRequest: EventPayload {} +extension ReadyResult: ResponsePayload {} extension EmbeddedCheckoutProtocol { public static let ready = RequestDescriptor( diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/UCPResponse.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/UCPResponse.swift new file mode 100644 index 000000000..776bcd49a --- /dev/null +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/UCPResponse.swift @@ -0,0 +1,13 @@ +import Foundation + +extension InstrumentsChangeResultUcp { + public static func success(version: String = EmbeddedCheckoutProtocol.specVersion) -> Self { + InstrumentsChangeResultUcp( + capabilities: nil, + paymentHandlers: nil, + services: nil, + status: .success, + version: version + ) + } +} diff --git a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift index dc7c60f5d..14d8f36b5 100644 --- a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift +++ b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift @@ -204,7 +204,16 @@ struct ClientTests { @Test @MainActor func readyRequestDispatchesToRegisteredHandler() async throws { let response = try await EmbeddedCheckoutProtocol.Client() - .on(EmbeddedCheckoutProtocol.ready) { _ in ReadyResult() } + .on(EmbeddedCheckoutProtocol.ready) { _ in + ReadyResult( + checkout: nil, + credential: nil, + ucp: .success(), + upgrade: nil, + continueURL: nil, + messages: nil + ) + } .process(readyFixture()) let data = try #require(response?.data(using: .utf8)) @@ -218,28 +227,6 @@ struct ClientTests { #expect(ucp["status"] as? String == "success") } - @Test @MainActor func readyHandlerNegotiatesAcceptedDelegations() async throws { - let ready = #""" - {"jsonrpc":"2.0","id":"ready-1","method":"ec.ready","params":{"delegate":["window.open","payment.credential"]}} - """# - - let client = EmbeddedCheckoutProtocol.Client() - .on(windowOpenDescriptor) { _ in .success } - let supported = Set(client.delegations) - - let response = try #require( - await client - .on(EmbeddedCheckoutProtocol.ready) { request in - ReadyResult(delegate: request.delegate.filter { supported.contains($0) }) - } - .process(ready) - ) - let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) - let result = try #require(parsed["result"] as? [String: Any]) - let delegate = try #require(result["delegate"] as? [String]) - #expect(delegate == ["window.open"]) - } - @Test @MainActor func malformedReadyParamsReturnInvalidParamsError() async throws { let ready = #""" {"jsonrpc":"2.0","id":"ready-bad","method":"ec.ready","params":{"delegate":[null]}} @@ -247,7 +234,16 @@ struct ClientTests { let response = try #require( await EmbeddedCheckoutProtocol.Client() - .on(EmbeddedCheckoutProtocol.ready) { _ in ReadyResult() } + .on(EmbeddedCheckoutProtocol.ready) { _ in + ReadyResult( + checkout: nil, + credential: nil, + ucp: .success(), + upgrade: nil, + continueURL: nil, + messages: nil + ) + } .process(ready) ) let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) @@ -264,7 +260,14 @@ struct ClientTests { let response = try #require( await EmbeddedCheckoutProtocol.Client() - .on(EmbeddedCheckoutProtocol.auth) { _ in AuthResult(credential: "tok-xyz") } + .on(EmbeddedCheckoutProtocol.auth) { _ in + AuthResult( + credential: "tok-xyz", + ucp: .success(), + continueURL: nil, + messages: nil + ) + } .process(request) ) let parsed = try #require(JSONSerialization.jsonObject(with: Data(response.utf8)) as? [String: Any]) @@ -304,7 +307,16 @@ struct ClientTests { @Test @MainActor func delegationsReflectsOnlyDelegationCarryingHandlers() { let client = EmbeddedCheckoutProtocol.Client() - .on(EmbeddedCheckoutProtocol.ready) { _ in ReadyResult() } + .on(EmbeddedCheckoutProtocol.ready) { _ in + ReadyResult( + checkout: nil, + credential: nil, + ucp: .success(), + upgrade: nil, + continueURL: nil, + messages: nil + ) + } .on(windowOpenDescriptor) { _ in .success } #expect(client.delegations == ["window.open"]) diff --git a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecEncodeTests.swift b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecEncodeTests.swift index d2ae7fe39..0eb881a0d 100644 --- a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecEncodeTests.swift +++ b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecEncodeTests.swift @@ -27,8 +27,18 @@ struct CodecEncodeTests { #expect(parsed["result"] != nil) } - @Test func encodesReadyResultOmittingEmptyDelegate() throws { - let json = EmbeddedCheckoutProtocol.encodeResponse(id: "ready-1", result: ReadyResult()) + @Test func encodesReadyResultCarryingOnlyUCPEnvelope() throws { + let json = EmbeddedCheckoutProtocol.encodeResponse( + id: "ready-1", + result: ReadyResult( + checkout: nil, + credential: nil, + ucp: .success(), + upgrade: nil, + continueURL: nil, + messages: nil + ) + ) let parsed = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) #expect(parsed["id"] as? String == "ready-1") @@ -39,27 +49,21 @@ struct CodecEncodeTests { let ucp = try #require(result["ucp"] as? [String: Any]) #expect(ucp["version"] as? String == EmbeddedCheckoutProtocol.specVersion) #expect(ucp["status"] as? String == "success") - #expect(result["delegate"] == nil, "Empty delegate list must be omitted") + #expect(result["delegate"] == nil, "Ready response no longer echoes a delegate list") #expect(result["credential"] == nil, "Absent credential must be omitted") } - @Test func encodesReadyResultEchoingDelegate() throws { - let json = EmbeddedCheckoutProtocol.encodeResponse( - id: 7, - result: ReadyResult(delegate: ["window.open"]) - ) - let parsed = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) - - #expect(parsed["id"] as? Int == 7) - let result = try #require(parsed["result"] as? [String: Any]) - let delegate = try #require(result["delegate"] as? [String]) - #expect(delegate == ["window.open"]) - } - @Test func encodesReadyResultIncludingCredential() throws { let json = EmbeddedCheckoutProtocol.encodeResponse( id: .null, - result: ReadyResult(credential: "tok-123") + result: ReadyResult( + checkout: nil, + credential: "tok-123", + ucp: .success(), + upgrade: nil, + continueURL: nil, + messages: nil + ) ) let parsed = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) @@ -71,7 +75,12 @@ struct CodecEncodeTests { @Test func encodesAuthResult() throws { let json = EmbeddedCheckoutProtocol.encodeResponse( id: "auth-1", - result: AuthResult(credential: "tok-abc") + result: AuthResult( + credential: "tok-abc", + ucp: .success(), + continueURL: nil, + messages: nil + ) ) let parsed = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [String: Any]) diff --git a/protocol/scripts/generate_models.mjs b/protocol/scripts/generate_models.mjs index 8f6f31a99..89f51c04a 100755 --- a/protocol/scripts/generate_models.mjs +++ b/protocol/scripts/generate_models.mjs @@ -212,6 +212,29 @@ async function prepareCodegenSchemas(tempDir) { fulfillment.title = "CheckoutFulfillment"; await writeJson(path.join(specDir, "types", "fulfillment.json"), fulfillment); + // The error response branch narrows status to the single const "error"; title + // it so the generated single-case enum stays domain-specific. + const ucp = await readJson(path.join(schemaDir, "ucp.json")); + for (const branch of ucp.$defs.error.allOf ?? []) { + if (branch.properties?.status !== undefined) { + branch.properties.status.title = "ErrorStatus"; + } + } + // The success-branch service binding and the response-branch one resolve to the + // same service node, so quicktype disambiguates the success copy with a + // color-name fallback. Title the success branch's service so it gets a stable + // domain name and the response branches keep theirs. + ucp.$defs.success.allOf.push({ + properties: { + services: { + additionalProperties: { + items: {$ref: "service.json#/$defs/base", title: "EmbeddedService"}, + }, + }, + }, + }); + await writeJson(path.join(schemaDir, "ucp.json"), ucp); + return specDir; } @@ -228,8 +251,12 @@ async function extractResultSchema(specDir, methodName, outputFile, rootTitle, c for (const variant of schema.oneOf ?? []) { if (variant?.properties?.checkout !== undefined) { - variant.properties.checkout.title = checkoutTitle; - variant.properties.checkout.properties.payment = structuredClone(paymentSchema); + if (checkoutTitle !== undefined) { + variant.properties.checkout.title = checkoutTitle; + } + if (paymentSchema !== undefined) { + variant.properties.checkout.properties.payment = structuredClone(paymentSchema); + } } } @@ -238,6 +265,41 @@ async function extractResultSchema(specDir, methodName, outputFile, rootTitle, c await writeJson(path.join(specDir, outputFile), schema); } +// Synthesizes an object schema from an OpenRPC method's `params` array so request +// payload types are generated from the spec alongside their result types. Each +// named param becomes a property; params marked `required` populate the schema's +// `required` list. +async function extractParamsSchema(specDir, methodName, outputFile, rootTitle) { + const service = await readJson(path.join(SERVICES_DIR, "embedded.openrpc.json")); + const method = service.methods.find((candidate) => candidate.name === methodName); + if (method === undefined) { + throw new Error(`Missing OpenRPC method ${methodName}`); + } + + const properties = {}; + const required = []; + for (const param of method.params ?? []) { + properties[param.name] = structuredClone(param.schema); + if (param.required === true) { + required.push(param.name); + } + } + + const schema = { + title: rootTitle, + type: "object", + properties, + }; + if (required.length > 0) { + schema.required = required; + } + rewriteRefs(schema); + + schema.components = service.components; + + await writeJson(path.join(specDir, outputFile), schema); +} + async function runQuicktype(args) { await run(QUICKTYPE_BIN, args); } @@ -247,12 +309,6 @@ async function replaceInFile(file, transform) { await fs.writeFile(file, transform(source)); } -function normalizeQuicktypeFallbacks(source) { - return source - .replace(/\bPurpleStatus\b/g, "StatusEnum") - .replace(/\bPurpleService\b/g, "InstrumentsChangeService"); -} - function assertNoQuicktypeFallbacks(source, output) { const matches = Array.from( source.matchAll(/\b(?:Purple|Fluffy|Tentacled|Sticky|Indigo|Magenta)\w+/g), @@ -267,7 +323,7 @@ function assertNoQuicktypeFallbacks(source, output) { async function normalizeGeneratedFile(output, transform = (source) => source) { await replaceInFile(output, (source) => { - const result = normalizeQuicktypeFallbacks(transform(source)); + const result = transform(source); assertNoQuicktypeFallbacks(result, output); return result; }); @@ -285,6 +341,14 @@ function commonSchemaSources(specDir) { path.join(specDir, "instruments_change_result.json"), "--src", path.join(specDir, "credential_result.json"), + "--src", + path.join(specDir, "ready_request.json"), + "--src", + path.join(specDir, "ready_result.json"), + "--src", + path.join(specDir, "auth_request.json"), + "--src", + path.join(specDir, "auth_result.json"), ]; } @@ -449,6 +513,32 @@ async function main() { "CredentialCheckout", {$ref: "checkout.json#/properties/payment"}, ); + await extractParamsSchema(specDir, "ec.ready", "ready_request.json", "ReadyRequest"); + await extractResultSchema( + specDir, + "ec.ready", + "ready_result.json", + "ReadyResult", + "ReadyCheckout", + { + title: "ReadyPayment", + description: "Payment instruments with selected instrument ID.", + allOf: [ + {$ref: "checkout.json#/properties/payment"}, + { + type: "object", + properties: { + selected_instrument_id: { + type: "string", + description: "ID of the selected payment instrument.", + }, + }, + }, + ], + }, + ); + await extractParamsSchema(specDir, "ec.auth", "auth_request.json", "AuthRequest"); + await extractResultSchema(specDir, "ec.auth", "auth_result.json", "AuthResult"); switch (lang) { case "kotlin": { From 36777cb1f9935b8015a5097c83b4cdb6eba29542 Mon Sep 17 00:00:00 2001 From: Mark Murray <2034704+markmur@users.noreply.github.com> Date: Thu, 25 Jun 2026 09:32:17 +0100 Subject: [PATCH 4/4] Unify code generation (#338) --- .../ShopifyCheckoutKit/CheckoutProtocol.swift | 2 +- .../ShopifyCheckoutKit/WindowOpen.swift | 2 +- .../CheckoutProtocolTests.swift | 2 +- .../swift/api/ShopifyCheckoutProtocol.json | 1341 ++++++++--------- .../ShopifyCheckoutProtocol/Auth.swift | 12 - .../ShopifyCheckoutProtocol/Descriptors.swift | 12 - .../EmbeddedCheckoutProtocol.swift | 1 - .../FulfillmentDelegations.swift | 8 - .../EmbeddedCheckoutProtocol+Event.swift | 66 +- .../PaymentDelegations.swift | 18 - .../ShopifyCheckoutProtocol/Ready.swift | 12 - .../ClientTests.swift | 2 +- .../CodecDecodeTests.swift | 4 +- .../DescriptorTests.swift | 16 +- protocol/scripts/generate_models.mjs | 72 +- protocol/scripts/generate_swift_catalog.mjs | 229 ++- protocol/scripts/method_catalog.mjs | 261 ++++ 17 files changed, 1032 insertions(+), 1028 deletions(-) delete mode 100644 protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift delete mode 100644 protocol/languages/swift/Sources/ShopifyCheckoutProtocol/PaymentDelegations.swift delete mode 100644 protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift create mode 100644 protocol/scripts/method_catalog.mjs diff --git a/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutProtocol.swift b/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutProtocol.swift index 4dbb289a2..37698b18b 100644 --- a/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutProtocol.swift +++ b/platforms/swift/Sources/ShopifyCheckoutKit/CheckoutProtocol.swift @@ -26,7 +26,7 @@ public enum CheckoutProtocol { public static let totalsChange = EmbeddedCheckoutProtocol.Event.totalsChange static let supportedProtocolMethods: Set = [ - EmbeddedCheckoutProtocol.readyMethod, + ready.method, start.method, complete.method, error.method, diff --git a/platforms/swift/Sources/ShopifyCheckoutKit/WindowOpen.swift b/platforms/swift/Sources/ShopifyCheckoutKit/WindowOpen.swift index 5d493cf13..9b5cba693 100644 --- a/platforms/swift/Sources/ShopifyCheckoutKit/WindowOpen.swift +++ b/platforms/swift/Sources/ShopifyCheckoutKit/WindowOpen.swift @@ -56,7 +56,7 @@ public enum WindowOpenResult: ResponsePayload { extension CheckoutProtocol { public static let windowOpen = RequestDescriptor( - method: EmbeddedCheckoutProtocol.Event.windowOpenRequest.method, + method: EmbeddedCheckoutProtocol.Event.windowOpenRequest, delegation: "window.open", decode: { params in try? JSONDecoder().decode(WindowOpenRequest.self, from: params) diff --git a/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutProtocolTests.swift b/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutProtocolTests.swift index 80e5286a5..d1514ddf6 100644 --- a/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutProtocolTests.swift +++ b/platforms/swift/Tests/ShopifyCheckoutKitTests/CheckoutProtocolTests.swift @@ -13,7 +13,7 @@ struct CheckoutProtocolTests { @Test func supportedProtocolMethodsCoverReadyCuratedNotificationsAndWindowOpen() { #expect(CheckoutProtocol.supportedProtocolMethods == [ - EmbeddedCheckoutProtocol.readyMethod, + EmbeddedCheckoutProtocol.Event.ready, "ec.start", "ec.complete", "ec.error", diff --git a/platforms/swift/api/ShopifyCheckoutProtocol.json b/platforms/swift/api/ShopifyCheckoutProtocol.json index 6bd0f579c..78698a2aa 100644 --- a/platforms/swift/api/ShopifyCheckoutProtocol.json +++ b/platforms/swift/api/ShopifyCheckoutProtocol.json @@ -452,117 +452,6 @@ } ] }, - { - "kind": "TypeDecl", - "name": "MethodDescriptor", - "printedName": "MethodDescriptor", - "children": [ - { - "kind": "Var", - "name": "method", - "printedName": "method", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV6methodSSvp", - "mangledName": "$s23ShopifyCheckoutProtocol16MethodDescriptorV6methodSSvp", - "moduleName": "ShopifyCheckoutProtocol", - "declAttributes": [ - "HasStorage" - ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV6methodSSvg", - "mangledName": "$s23ShopifyCheckoutProtocol16MethodDescriptorV6methodSSvg", - "moduleName": "ShopifyCheckoutProtocol", - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(method:)", - "children": [ - { - "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Constructor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV6methodACSS_tcfc", - "mangledName": "$s23ShopifyCheckoutProtocol16MethodDescriptorV6methodACSS_tcfc", - "moduleName": "ShopifyCheckoutProtocol", - "init_kind": "Designated" - } - ], - "declKind": "Struct", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV", - "mangledName": "$s23ShopifyCheckoutProtocol16MethodDescriptorV", - "moduleName": "ShopifyCheckoutProtocol", - "conformances": [ - { - "kind": "Conformance", - "name": "Sendable", - "printedName": "Sendable", - "usr": "s:s8SendableP", - "mangledName": "$ss8SendableP" - }, - { - "kind": "Conformance", - "name": "SendableMetatype", - "printedName": "SendableMetatype", - "usr": "s:s16SendableMetatypeP", - "mangledName": "$ss16SendableMetatypeP" - }, - { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" - }, - { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" - } - ] - }, { "kind": "TypeDecl", "name": "EmbeddedCheckoutProtocol", @@ -617,54 +506,6 @@ } ] }, - { - "kind": "Var", - "name": "readyMethod", - "printedName": "readyMethod", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O11readyMethodSSvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O11readyMethodSSvpZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "isInternal": true, - "declAttributes": [ - "HasInitialValue", - "HasStorage" - ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O11readyMethodSSvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O11readyMethodSSvgZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "implicit": true, - "isInternal": true, - "accessorKind": "get" - } - ] - }, { "kind": "Var", "name": "parseErrorCode", @@ -1283,85 +1124,6 @@ "static": true, "funcSelfKind": "NonMutating" }, - { - "kind": "Var", - "name": "auth", - "printedName": "auth", - "children": [ - { - "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "AuthRequest", - "printedName": "ShopifyCheckoutProtocol.AuthRequest", - "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" - }, - { - "kind": "TypeNominal", - "name": "AuthResult", - "printedName": "ShopifyCheckoutProtocol.AuthResult", - "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvpZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "declAttributes": [ - "HasInitialValue", - "HasStorage" - ], - "isFromExtension": true, - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "AuthRequest", - "printedName": "ShopifyCheckoutProtocol.AuthRequest", - "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" - }, - { - "kind": "TypeNominal", - "name": "AuthResult", - "printedName": "ShopifyCheckoutProtocol.AuthResult", - "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvgZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "isFromExtension": true, - "accessorKind": "get" - } - ] - }, { "kind": "TypeDecl", "name": "Client", @@ -1571,205 +1333,28 @@ ] }, { - "kind": "Var", - "name": "fulfillmentAddressChange", - "printedName": "fulfillmentAddressChange", + "kind": "TypeDecl", + "name": "Event", + "printedName": "Event", "children": [ { - "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "kind": "Var", + "name": "error", + "printedName": "error", "children": [ { "kind": "TypeNominal", - "name": "Checkout", - "printedName": "ShopifyCheckoutProtocol.Checkout", - "usr": "s:23ShopifyCheckoutProtocol0B0V" - }, - { - "kind": "TypeNominal", - "name": "AddressChangeResult", - "printedName": "ShopifyCheckoutProtocol.AddressChangeResult", - "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "declAttributes": [ - "HasInitialValue", - "HasStorage" - ], - "isFromExtension": true, - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "Checkout", - "printedName": "ShopifyCheckoutProtocol.Checkout", - "usr": "s:23ShopifyCheckoutProtocol0B0V" - }, - { - "kind": "TypeNominal", - "name": "AddressChangeResult", - "printedName": "ShopifyCheckoutProtocol.AddressChangeResult", - "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "isFromExtension": true, - "accessorKind": "get" - } - ] - }, - { - "kind": "TypeDecl", - "name": "Event", - "printedName": "Event", - "children": [ - { - "kind": "Var", - "name": "ready", - "printedName": "ready", - "children": [ - { - "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA16MethodDescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA16MethodDescriptorVvpZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "declAttributes": [ - "HasInitialValue", - "HasStorage" - ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA16MethodDescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readyAA16MethodDescriptorVvgZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "auth", - "printedName": "auth", - "children": [ - { - "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA16MethodDescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA16MethodDescriptorVvpZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "declAttributes": [ - "HasInitialValue", - "HasStorage" - ], - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA16MethodDescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authAA16MethodDescriptorVvgZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "error", - "printedName": "error", - "children": [ - { - "kind": "TypeNominal", - "name": "NotificationDescriptor", - "printedName": "ShopifyCheckoutProtocol.NotificationDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "ErrorResponse", - "printedName": "ShopifyCheckoutProtocol.ErrorResponse", - "usr": "s:23ShopifyCheckoutProtocol13ErrorResponseV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol22NotificationDescriptorV" + "name": "NotificationDescriptor", + "printedName": "ShopifyCheckoutProtocol.NotificationDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "ErrorResponse", + "printedName": "ShopifyCheckoutProtocol.ErrorResponse", + "usr": "s:23ShopifyCheckoutProtocol13ErrorResponseV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol22NotificationDescriptorV" } ], "declKind": "Var", @@ -2274,19 +1859,27 @@ }, { "kind": "Var", - "name": "paymentInstrumentsChangeRequest", - "printedName": "paymentInstrumentsChangeRequest", + "name": "fulfillmentChange", + "printedName": "fulfillmentChange", "children": [ { "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" + "name": "NotificationDescriptor", + "printedName": "ShopifyCheckoutProtocol.NotificationDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + } + ], + "usr": "s:23ShopifyCheckoutProtocol22NotificationDescriptorV" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA16MethodDescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA16MethodDescriptorVvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17fulfillmentChangeAA22NotificationDescriptorVyAA0B0VGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17fulfillmentChangeAA22NotificationDescriptorVyAA0B0VGvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -2303,14 +1896,22 @@ "children": [ { "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" + "name": "NotificationDescriptor", + "printedName": "ShopifyCheckoutProtocol.NotificationDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + } + ], + "usr": "s:23ShopifyCheckoutProtocol22NotificationDescriptorV" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA16MethodDescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestAA16MethodDescriptorVvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17fulfillmentChangeAA22NotificationDescriptorVyAA0B0VGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17fulfillmentChangeAA22NotificationDescriptorVyAA0B0VGvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -2323,19 +1924,19 @@ }, { "kind": "Var", - "name": "paymentCredentialRequest", - "printedName": "paymentCredentialRequest", + "name": "ready", + "printedName": "ready", "children": [ { "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA16MethodDescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA16MethodDescriptorVvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readySSvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readySSvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -2352,14 +1953,14 @@ "children": [ { "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA16MethodDescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestAA16MethodDescriptorVvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readySSvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO5readySSvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -2372,19 +1973,19 @@ }, { "kind": "Var", - "name": "windowOpenRequest", - "printedName": "windowOpenRequest", + "name": "auth", + "printedName": "auth", "children": [ { "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA16MethodDescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA16MethodDescriptorVvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authSSvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authSSvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -2401,14 +2002,14 @@ "children": [ { "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA16MethodDescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestAA16MethodDescriptorVvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authSSvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO4authSSvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -2421,27 +2022,19 @@ }, { "kind": "Var", - "name": "fulfillmentChange", - "printedName": "fulfillmentChange", + "name": "paymentInstrumentsChangeRequest", + "printedName": "paymentInstrumentsChangeRequest", "children": [ { "kind": "TypeNominal", - "name": "NotificationDescriptor", - "printedName": "ShopifyCheckoutProtocol.NotificationDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "Checkout", - "printedName": "ShopifyCheckoutProtocol.Checkout", - "usr": "s:23ShopifyCheckoutProtocol0B0V" - } - ], - "usr": "s:23ShopifyCheckoutProtocol22NotificationDescriptorV" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17fulfillmentChangeAA22NotificationDescriptorVyAA0B0VGvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17fulfillmentChangeAA22NotificationDescriptorVyAA0B0VGvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestSSvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestSSvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -2458,22 +2051,14 @@ "children": [ { "kind": "TypeNominal", - "name": "NotificationDescriptor", - "printedName": "ShopifyCheckoutProtocol.NotificationDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "Checkout", - "printedName": "ShopifyCheckoutProtocol.Checkout", - "usr": "s:23ShopifyCheckoutProtocol0B0V" - } - ], - "usr": "s:23ShopifyCheckoutProtocol22NotificationDescriptorV" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17fulfillmentChangeAA22NotificationDescriptorVyAA0B0VGvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17fulfillmentChangeAA22NotificationDescriptorVyAA0B0VGvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestSSvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31paymentInstrumentsChangeRequestSSvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -2486,19 +2071,19 @@ }, { "kind": "Var", - "name": "fulfillmentAddressChangeRequest", - "printedName": "fulfillmentAddressChangeRequest", + "name": "paymentCredentialRequest", + "printedName": "paymentCredentialRequest", "children": [ { "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA16MethodDescriptorVvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA16MethodDescriptorVvpZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestSSvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestSSvpZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "declAttributes": [ @@ -2515,14 +2100,14 @@ "children": [ { "kind": "TypeNominal", - "name": "MethodDescriptor", - "printedName": "ShopifyCheckoutProtocol.MethodDescriptor", - "usr": "s:23ShopifyCheckoutProtocol16MethodDescriptorV" + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" } ], "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA16MethodDescriptorVvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestAA16MethodDescriptorVvgZ", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestSSvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO24paymentCredentialRequestSSvgZ", "moduleName": "ShopifyCheckoutProtocol", "static": true, "implicit": true, @@ -2535,14 +2120,112 @@ }, { "kind": "Var", - "name": "all", - "printedName": "all", + "name": "windowOpenRequest", + "printedName": "windowOpenRequest", "children": [ { "kind": "TypeNominal", - "name": "Array", - "printedName": "[Swift.String]", - "children": [ + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestSSvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestSSvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestSSvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO17windowOpenRequestSSvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "fulfillmentAddressChangeRequest", + "printedName": "fulfillmentAddressChangeRequest", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestSSvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestSSvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "String", + "printedName": "Swift.String", + "usr": "s:SS" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestSSvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5EventO31fulfillmentAddressChangeRequestSSvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "all", + "printedName": "all", + "children": [ + { + "kind": "TypeNominal", + "name": "Array", + "printedName": "[Swift.String]", + "children": [ { "kind": "TypeNominal", "name": "String", @@ -2622,6 +2305,401 @@ } ] }, + { + "kind": "Var", + "name": "ready", + "printedName": "ready", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyRequest", + "printedName": "ShopifyCheckoutProtocol.ReadyRequest", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" + }, + { + "kind": "TypeNominal", + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isFromExtension": true, + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "ReadyRequest", + "printedName": "ShopifyCheckoutProtocol.ReadyRequest", + "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" + }, + { + "kind": "TypeNominal", + "name": "ReadyResult", + "printedName": "ShopifyCheckoutProtocol.ReadyResult", + "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "auth", + "printedName": "auth", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isFromExtension": true, + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "AuthRequest", + "printedName": "ShopifyCheckoutProtocol.AuthRequest", + "usr": "s:23ShopifyCheckoutProtocol11AuthRequestV" + }, + { + "kind": "TypeNominal", + "name": "AuthResult", + "printedName": "ShopifyCheckoutProtocol.AuthResult", + "usr": "s:23ShopifyCheckoutProtocol10AuthResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O4authAA17RequestDescriptorVyAA04AuthF0VAA0H6ResultVGvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "paymentInstrumentsChange", + "printedName": "paymentInstrumentsChange", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResult", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResult", + "usr": "s:23ShopifyCheckoutProtocol23InstrumentsChangeResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isFromExtension": true, + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "InstrumentsChangeResult", + "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResult", + "usr": "s:23ShopifyCheckoutProtocol23InstrumentsChangeResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "paymentCredential", + "printedName": "paymentCredential", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "CredentialResult", + "printedName": "ShopifyCheckoutProtocol.CredentialResult", + "usr": "s:23ShopifyCheckoutProtocol16CredentialResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isFromExtension": true, + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "CredentialResult", + "printedName": "ShopifyCheckoutProtocol.CredentialResult", + "usr": "s:23ShopifyCheckoutProtocol16CredentialResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, + { + "kind": "Var", + "name": "fulfillmentAddressChange", + "printedName": "fulfillmentAddressChange", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "AddressChangeResult", + "printedName": "ShopifyCheckoutProtocol.AddressChangeResult", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Var", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "declAttributes": [ + "HasInitialValue", + "HasStorage" + ], + "isFromExtension": true, + "isLet": true, + "hasStorage": true, + "accessors": [ + { + "kind": "Accessor", + "name": "Get", + "printedName": "Get()", + "children": [ + { + "kind": "TypeNominal", + "name": "RequestDescriptor", + "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", + "children": [ + { + "kind": "TypeNominal", + "name": "Checkout", + "printedName": "ShopifyCheckoutProtocol.Checkout", + "usr": "s:23ShopifyCheckoutProtocol0B0V" + }, + { + "kind": "TypeNominal", + "name": "AddressChangeResult", + "printedName": "ShopifyCheckoutProtocol.AddressChangeResult", + "usr": "s:23ShopifyCheckoutProtocol19AddressChangeResultV" + } + ], + "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" + } + ], + "declKind": "Accessor", + "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", + "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24fulfillmentAddressChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", + "moduleName": "ShopifyCheckoutProtocol", + "static": true, + "implicit": true, + "declAttributes": [ + "Transparent" + ], + "isFromExtension": true, + "accessorKind": "get" + } + ] + }, { "kind": "TypeDecl", "name": "Delegation", @@ -3192,243 +3270,6 @@ "mangledName": "$ss9EscapableP" } ] - }, - { - "kind": "Var", - "name": "paymentInstrumentsChange", - "printedName": "paymentInstrumentsChange", - "children": [ - { - "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "Checkout", - "printedName": "ShopifyCheckoutProtocol.Checkout", - "usr": "s:23ShopifyCheckoutProtocol0B0V" - }, - { - "kind": "TypeNominal", - "name": "InstrumentsChangeResult", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResult", - "usr": "s:23ShopifyCheckoutProtocol23InstrumentsChangeResultV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvpZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "declAttributes": [ - "HasInitialValue", - "HasStorage" - ], - "isFromExtension": true, - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "Checkout", - "printedName": "ShopifyCheckoutProtocol.Checkout", - "usr": "s:23ShopifyCheckoutProtocol0B0V" - }, - { - "kind": "TypeNominal", - "name": "InstrumentsChangeResult", - "printedName": "ShopifyCheckoutProtocol.InstrumentsChangeResult", - "usr": "s:23ShopifyCheckoutProtocol23InstrumentsChangeResultV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O24paymentInstrumentsChangeAA17RequestDescriptorVyAA0B0VAA0fG6ResultVGvgZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "isFromExtension": true, - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "paymentCredential", - "printedName": "paymentCredential", - "children": [ - { - "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "Checkout", - "printedName": "ShopifyCheckoutProtocol.Checkout", - "usr": "s:23ShopifyCheckoutProtocol0B0V" - }, - { - "kind": "TypeNominal", - "name": "CredentialResult", - "printedName": "ShopifyCheckoutProtocol.CredentialResult", - "usr": "s:23ShopifyCheckoutProtocol16CredentialResultV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvpZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "declAttributes": [ - "HasInitialValue", - "HasStorage" - ], - "isFromExtension": true, - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "Checkout", - "printedName": "ShopifyCheckoutProtocol.Checkout", - "usr": "s:23ShopifyCheckoutProtocol0B0V" - }, - { - "kind": "TypeNominal", - "name": "CredentialResult", - "printedName": "ShopifyCheckoutProtocol.CredentialResult", - "usr": "s:23ShopifyCheckoutProtocol16CredentialResultV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O17paymentCredentialAA17RequestDescriptorVyAA0B0VAA0F6ResultVGvgZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "isFromExtension": true, - "accessorKind": "get" - } - ] - }, - { - "kind": "Var", - "name": "ready", - "printedName": "ready", - "children": [ - { - "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "ReadyRequest", - "printedName": "ShopifyCheckoutProtocol.ReadyRequest", - "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" - }, - { - "kind": "TypeNominal", - "name": "ReadyResult", - "printedName": "ShopifyCheckoutProtocol.ReadyResult", - "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" - } - ], - "declKind": "Var", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvpZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvpZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "declAttributes": [ - "HasInitialValue", - "HasStorage" - ], - "isFromExtension": true, - "isLet": true, - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "RequestDescriptor", - "printedName": "ShopifyCheckoutProtocol.RequestDescriptor", - "children": [ - { - "kind": "TypeNominal", - "name": "ReadyRequest", - "printedName": "ShopifyCheckoutProtocol.ReadyRequest", - "usr": "s:23ShopifyCheckoutProtocol12ReadyRequestV" - }, - { - "kind": "TypeNominal", - "name": "ReadyResult", - "printedName": "ShopifyCheckoutProtocol.ReadyResult", - "usr": "s:23ShopifyCheckoutProtocol11ReadyResultV" - } - ], - "usr": "s:23ShopifyCheckoutProtocol17RequestDescriptorV" - } - ], - "declKind": "Accessor", - "usr": "s:23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvgZ", - "mangledName": "$s23ShopifyCheckoutProtocol08EmbeddedbC0O5readyAA17RequestDescriptorVyAA05ReadyF0VAA0H6ResultVGvgZ", - "moduleName": "ShopifyCheckoutProtocol", - "static": true, - "implicit": true, - "declAttributes": [ - "Transparent" - ], - "isFromExtension": true, - "accessorKind": "get" - } - ] } ], "declKind": "Enum", diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift deleted file mode 100644 index deb58e01b..000000000 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Auth.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -extension AuthRequest: EventPayload {} -extension AuthResult: ResponsePayload {} - -extension EmbeddedCheckoutProtocol { - public static let auth = RequestDescriptor( - method: Event.auth.method, - delegation: nil, - decode: { try? JSONDecoder().decode(AuthRequest.self, from: $0) } - ) -} diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Descriptors.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Descriptors.swift index 4b92206b8..7e5eb2f03 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Descriptors.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Descriptors.swift @@ -38,15 +38,3 @@ public struct RequestDescriptor: self.decode = decode } } - -/// Metadata-only descriptor emitted by the generated catalog for result-bearing -/// methods. The code generator cannot know the hand-authored Swift payload/result -/// types, so it supplies the method-name constant only; typed responder behavior -/// comes from the hand-authored `RequestDescriptor` values. -public struct MethodDescriptor: Sendable { - public let method: String - - public init(method: String) { - self.method = method - } -} diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol.swift index 1c5ac009e..b7bc9fca7 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/EmbeddedCheckoutProtocol.swift @@ -3,7 +3,6 @@ import Foundation public enum EmbeddedCheckoutProtocol { public static let specVersion = "2026-04-08" - package static let readyMethod = "ec.ready" package static let parseErrorCode = -32700 package static let parseErrorMessage = "Parse error" package static let invalidParamsCode = -32602 diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/FulfillmentDelegations.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/FulfillmentDelegations.swift index 463fafd0b..0587571ea 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/FulfillmentDelegations.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/FulfillmentDelegations.swift @@ -17,11 +17,3 @@ public struct AddressChangeResult: ResponsePayload { self.ucp = ucp } } - -extension EmbeddedCheckoutProtocol { - public static let fulfillmentAddressChange = RequestDescriptor( - method: Event.fulfillmentAddressChangeRequest.method, - delegation: Delegation.fulfillmentAddressChange.rawValue, - decode: { try? JSONDecoder().decode(JSONRPCCheckoutParams.self, from: $0).checkout } - ) -} diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/EmbeddedCheckoutProtocol+Event.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/EmbeddedCheckoutProtocol+Event.swift index c2991a870..778496dac 100644 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/EmbeddedCheckoutProtocol+Event.swift +++ b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/EmbeddedCheckoutProtocol+Event.swift @@ -3,13 +3,20 @@ import Foundation +extension AuthRequest: EventPayload {} extension Checkout: EventPayload {} extension ErrorResponse: EventPayload {} +extension ReadyRequest: EventPayload {} +extension AuthResult: ResponsePayload {} +extension CredentialResult: ResponsePayload {} +extension InstrumentsChangeResult: ResponsePayload {} +extension ReadyResult: ResponsePayload {} extension EmbeddedCheckoutProtocol { + /// Every `ec.*` method the protocol defines. Notifications resolve to typed + /// `NotificationDescriptor`s; requests resolve to their wire method name, + /// shared by the typed request descriptors and the kit's hand-authored ones. public enum Event { - public static let ready = MethodDescriptor(method: "ec.ready") - public static let auth = MethodDescriptor(method: "ec.auth") public static let error = NotificationDescriptor(method: "ec.error") public static let start = NotificationDescriptor(method: "ec.start") public static let complete = NotificationDescriptor(method: "ec.complete") @@ -18,15 +25,18 @@ extension EmbeddedCheckoutProtocol { public static let buyerChange = NotificationDescriptor(method: "ec.buyer.change") public static let totalsChange = NotificationDescriptor(method: "ec.totals.change") public static let paymentChange = NotificationDescriptor(method: "ec.payment.change") - public static let paymentInstrumentsChangeRequest = MethodDescriptor(method: "ec.payment.instruments_change_request") - public static let paymentCredentialRequest = MethodDescriptor(method: "ec.payment.credential_request") - public static let windowOpenRequest = MethodDescriptor(method: "ec.window.open_request") public static let fulfillmentChange = NotificationDescriptor(method: "ec.fulfillment.change") - public static let fulfillmentAddressChangeRequest = MethodDescriptor(method: "ec.fulfillment.address_change_request") + + public static let ready = "ec.ready" + public static let auth = "ec.auth" + public static let paymentInstrumentsChangeRequest = "ec.payment.instruments_change_request" + public static let paymentCredentialRequest = "ec.payment.credential_request" + public static let windowOpenRequest = "ec.window.open_request" + public static let fulfillmentAddressChangeRequest = "ec.fulfillment.address_change_request" public static let all: [String] = [ - ready.method, - auth.method, + ready, + auth, error.method, start.method, complete.method, @@ -35,15 +45,47 @@ extension EmbeddedCheckoutProtocol { buyerChange.method, totalsChange.method, paymentChange.method, - paymentInstrumentsChangeRequest.method, - paymentCredentialRequest.method, - windowOpenRequest.method, + paymentInstrumentsChangeRequest, + paymentCredentialRequest, + windowOpenRequest, fulfillmentChange.method, - fulfillmentAddressChangeRequest.method, + fulfillmentAddressChangeRequest, ] } } +extension EmbeddedCheckoutProtocol { + public static let ready = RequestDescriptor( + method: Event.ready, + delegation: nil, + decode: { try? JSONDecoder().decode(ReadyRequest.self, from: $0) } + ) + + public static let auth = RequestDescriptor( + method: Event.auth, + delegation: nil, + decode: { try? JSONDecoder().decode(AuthRequest.self, from: $0) } + ) + + public static let paymentInstrumentsChange = RequestDescriptor( + method: Event.paymentInstrumentsChangeRequest, + delegation: "payment.instruments_change", + decode: { try? JSONDecoder().decode(JSONRPCCheckoutParams.self, from: $0).checkout } + ) + + public static let paymentCredential = RequestDescriptor( + method: Event.paymentCredentialRequest, + delegation: "payment.credential", + decode: { try? JSONDecoder().decode(JSONRPCCheckoutParams.self, from: $0).checkout } + ) + + public static let fulfillmentAddressChange = RequestDescriptor( + method: Event.fulfillmentAddressChangeRequest, + delegation: "fulfillment.address_change", + decode: { try? JSONDecoder().decode(JSONRPCCheckoutParams.self, from: $0).checkout } + ) +} + extension EmbeddedCheckoutProtocol { /// Delegations the host can request from the business, as declared by the /// service in `x-delegations`. String-backed and open: a host may advertise diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/PaymentDelegations.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/PaymentDelegations.swift deleted file mode 100644 index 5cace2761..000000000 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/PaymentDelegations.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation - -extension InstrumentsChangeResult: ResponsePayload {} -extension CredentialResult: ResponsePayload {} - -extension EmbeddedCheckoutProtocol { - public static let paymentInstrumentsChange = RequestDescriptor( - method: Event.paymentInstrumentsChangeRequest.method, - delegation: Delegation.paymentInstrumentsChange.rawValue, - decode: { try? JSONDecoder().decode(JSONRPCCheckoutParams.self, from: $0).checkout } - ) - - public static let paymentCredential = RequestDescriptor( - method: Event.paymentCredentialRequest.method, - delegation: Delegation.paymentCredential.rawValue, - decode: { try? JSONDecoder().decode(JSONRPCCheckoutParams.self, from: $0).checkout } - ) -} diff --git a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift b/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift deleted file mode 100644 index 52c9efa65..000000000 --- a/protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Ready.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -extension ReadyRequest: EventPayload {} -extension ReadyResult: ResponsePayload {} - -extension EmbeddedCheckoutProtocol { - public static let ready = RequestDescriptor( - method: Event.ready.method, - delegation: nil, - decode: { try? JSONDecoder().decode(ReadyRequest.self, from: $0) } - ) -} diff --git a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift index 14d8f36b5..2f3a794cb 100644 --- a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift +++ b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/ClientTests.swift @@ -38,7 +38,7 @@ private enum TestDelegationResult: ResponsePayload { } private let windowOpenDescriptor = RequestDescriptor( - method: EmbeddedCheckoutProtocol.Event.windowOpenRequest.method, + method: EmbeddedCheckoutProtocol.Event.windowOpenRequest, delegation: "window.open", decode: { params in try? JSONDecoder().decode(TestURLPayload.self, from: params) diff --git a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecDecodeTests.swift b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecDecodeTests.swift index 7a0c9933d..19bd1f6b0 100644 --- a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecDecodeTests.swift +++ b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/CodecDecodeTests.swift @@ -132,7 +132,7 @@ struct CodecDecodeTests { } #expect(id == .int(1)) - #expect(method == EmbeddedCheckoutProtocol.readyMethod) + #expect(method == EmbeddedCheckoutProtocol.Event.ready) } @Test func decodesReadyRequestWithNullID() throws { @@ -147,7 +147,7 @@ struct CodecDecodeTests { } #expect(id == .null) - #expect(method == EmbeddedCheckoutProtocol.readyMethod) + #expect(method == EmbeddedCheckoutProtocol.Event.ready) } @Test func decodesReadyRequestWithMissingParamsAsEmptyObject() throws { diff --git a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/DescriptorTests.swift b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/DescriptorTests.swift index 9826317c1..fc30017ad 100644 --- a/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/DescriptorTests.swift +++ b/protocol/languages/swift/Tests/ShopifyCheckoutProtocolTests/DescriptorTests.swift @@ -34,19 +34,23 @@ struct DescriptorTests { #expect(EmbeddedCheckoutProtocol.Event.all.contains("ec.buyer.change")) } - @Test func requestMethodsBindAsRequestsNotNotifications() { - func method(of descriptor: MethodDescriptor) -> String { descriptor.method } + @Test func requestMethodsBindAsTypedDescriptors() { + func method(of descriptor: RequestDescriptor) -> String { + descriptor.method + } - #expect(method(of: EmbeddedCheckoutProtocol.Event.windowOpenRequest) == "ec.window.open_request") - #expect(method(of: EmbeddedCheckoutProtocol.Event.paymentCredentialRequest) == "ec.payment.credential_request") + #expect(method(of: EmbeddedCheckoutProtocol.ready) == "ec.ready") + #expect(method(of: EmbeddedCheckoutProtocol.auth) == "ec.auth") + #expect(method(of: EmbeddedCheckoutProtocol.paymentCredential) == "ec.payment.credential_request") #expect( - method(of: EmbeddedCheckoutProtocol.Event.paymentInstrumentsChangeRequest) + method(of: EmbeddedCheckoutProtocol.paymentInstrumentsChange) == "ec.payment.instruments_change_request" ) #expect( - method(of: EmbeddedCheckoutProtocol.Event.fulfillmentAddressChangeRequest) + method(of: EmbeddedCheckoutProtocol.fulfillmentAddressChange) == "ec.fulfillment.address_change_request" ) + #expect(EmbeddedCheckoutProtocol.Event.windowOpenRequest == "ec.window.open_request") } @Test func methodsAreUnique() { diff --git a/protocol/scripts/generate_models.mjs b/protocol/scripts/generate_models.mjs index 89f51c04a..1dcc85380 100755 --- a/protocol/scripts/generate_models.mjs +++ b/protocol/scripts/generate_models.mjs @@ -35,6 +35,7 @@ import { requireQuicktype, run, } from "./codegen_tools.mjs"; +import {MODEL_EXTRACTIONS} from "./method_catalog.mjs"; const SCHEMA_SOURCE_DIR = path.join(PROTOCOL_DIR, "schemas"); const SERVICES_DIR = path.join(PROTOCOL_DIR, "services", "shopping"); @@ -482,63 +483,20 @@ async function main() { try { const specDir = await prepareCodegenSchemas(tempDir); - await extractResultSchema( - specDir, - "ec.payment.instruments_change_request", - "instruments_change_result.json", - "InstrumentsChangeResult", - "InstrumentsChangeCheckout", - { - title: "InstrumentsChangePayment", - description: "Payment instruments with selected instrument ID.", - allOf: [ - {$ref: "checkout.json#/properties/payment"}, - { - type: "object", - properties: { - selected_instrument_id: { - type: "string", - description: "ID of the selected payment instrument.", - }, - }, - }, - ], - }, - ); - await extractResultSchema( - specDir, - "ec.payment.credential_request", - "credential_result.json", - "CredentialResult", - "CredentialCheckout", - {$ref: "checkout.json#/properties/payment"}, - ); - await extractParamsSchema(specDir, "ec.ready", "ready_request.json", "ReadyRequest"); - await extractResultSchema( - specDir, - "ec.ready", - "ready_result.json", - "ReadyResult", - "ReadyCheckout", - { - title: "ReadyPayment", - description: "Payment instruments with selected instrument ID.", - allOf: [ - {$ref: "checkout.json#/properties/payment"}, - { - type: "object", - properties: { - selected_instrument_id: { - type: "string", - description: "ID of the selected payment instrument.", - }, - }, - }, - ], - }, - ); - await extractParamsSchema(specDir, "ec.auth", "auth_request.json", "AuthRequest"); - await extractResultSchema(specDir, "ec.auth", "auth_result.json", "AuthResult"); + for (const extraction of MODEL_EXTRACTIONS) { + if (extraction.kind === "params") { + await extractParamsSchema(specDir, extraction.method, extraction.outputFile, extraction.rootTitle); + } else { + await extractResultSchema( + specDir, + extraction.method, + extraction.outputFile, + extraction.rootTitle, + extraction.checkoutTitle, + extraction.paymentSchema, + ); + } + } switch (lang) { case "kotlin": { diff --git a/protocol/scripts/generate_swift_catalog.mjs b/protocol/scripts/generate_swift_catalog.mjs index a9f9af9f3..996a792f0 100644 --- a/protocol/scripts/generate_swift_catalog.mjs +++ b/protocol/scripts/generate_swift_catalog.mjs @@ -3,146 +3,106 @@ import fs from 'node:fs'; import path from 'node:path'; import {fileURLToPath} from 'node:url'; +import {DELEGATIONS, EC_METHODS, MODEL_EXTRACTIONS} from './method_catalog.mjs'; + const scriptDir = path.dirname(fileURLToPath(import.meta.url)); const protocolRoot = path.resolve(scriptDir, '..'); -const openRpcPath = path.resolve( - protocolRoot, - 'services/shopping/embedded.openrpc.json', -); const outputPath = path.resolve( protocolRoot, 'languages/swift/Sources/ShopifyCheckoutProtocol/Generated/EmbeddedCheckoutProtocol+Event.swift', ); -const fallbackPayload = 'JSONAny'; - -const refPayloadMappings = new Map([ - ['checkout.json', 'Checkout'], - ['cart.json', fallbackPayload], - ['types/error_response.json', 'ErrorResponse'], - ['error_response.json', 'ErrorResponse'], -]); - -function normalizeRef(ref) { - return ref - .replace(/^\.\.\/\.\.\/schemas\/shopping\//, '') - .replace(/^\.\.\/\.\.\/schemas\/common\//, '') - .replace(/#.*$/, ''); -} - -function methodNameToIdentifier(methodName) { - // Drop the leading `ec` capability segment; the enclosing - // EmbeddedCheckoutProtocol.Event namespace already conveys it. - const [, ...parts] = methodName.split(/[._]/g).filter(Boolean); - - return parts - .map((part, index) => - index === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1), - ) - .join(''); -} - -function delegationToIdentifier(delegation) { - return delegation - .split(/[._]/g) - .filter(Boolean) - .map((part, index) => - index === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1), - ) - .join(''); -} - -function resolveMethod(method, openRpcDir) { - if (typeof method.$ref !== 'string') { - return method; - } +const notifications = EC_METHODS.filter(entry => entry.kind === 'notification'); +const requests = EC_METHODS.filter(entry => entry.kind === 'request'); +const protocolRequests = requests.filter(entry => entry.home === 'protocol'); + +// Conformances are emitted only for model-generated types. Notification payloads +// and the params/result types the model generator synthesizes conform here; +// hand-authored types (window.open's payload/result, fulfillment's +// AddressChangeResult) conform alongside their hand-written definitions. +const generatedRequestPayloads = new Set( + MODEL_EXTRACTIONS.filter(extraction => extraction.kind === 'params').map( + extraction => extraction.rootTitle, + ), +); +const generatedResults = new Set( + MODEL_EXTRACTIONS.filter(extraction => extraction.kind === 'result').map( + extraction => extraction.rootTitle, + ), +); - const [filePart, pointer] = method.$ref.split('#'); - const filePath = path.resolve(openRpcDir, filePart); - const document = JSON.parse(fs.readFileSync(filePath, 'utf8')); +const eventPayloadTypes = Array.from( + new Set([ + ...notifications.map(entry => entry.payload), + ...generatedRequestPayloads, + ]), +).sort(); - const segments = (pointer ?? '').split('/').filter(Boolean); - let resolved = document; - for (const segment of segments) { - resolved = resolved?.[segment.replace(/~1/g, '/').replace(/~0/g, '~')]; - } +const responsePayloadTypes = Array.from( + new Set( + protocolRequests + .map(entry => entry.result) + .filter(result => generatedResults.has(result)), + ), +).sort(); - if (!resolved || typeof resolved.name !== 'string') { - throw new Error(`Cannot resolve OpenRPC method $ref: ${method.$ref}`); +function uniqueIdentifiers(entries, key) { + const seen = new Set(); + for (const entry of entries) { + const identifier = entry[key]; + if (seen.has(identifier)) { + throw new Error(`Duplicate catalog identifier: ${identifier}`); + } + seen.add(identifier); } - - return resolved; } -function payloadType(method) { - const params = method.params ?? []; - if (params.length === 0) { - return fallbackPayload; - } - - const ref = params[0]?.schema?.$ref; - if (typeof ref !== 'string') { - return fallbackPayload; +uniqueIdentifiers(EC_METHODS, 'identifier'); +uniqueIdentifiers(protocolRequests, 'descriptorIdentifier'); + +function decodeClosure(entry) { + switch (entry.decode) { + case 'whole': + return `{ try? JSONDecoder().decode(${entry.payload}.self, from: $0) }`; + case 'checkoutUnwrap': + return '{ try? JSONDecoder().decode(JSONRPCCheckoutParams.self, from: $0).checkout }'; + default: + throw new Error(`Unknown decode strategy: ${entry.decode}`); } - - const normalized = normalizeRef(ref); - return refPayloadMappings.get(normalized) ?? fallbackPayload; } -const openRpcDir = path.dirname(openRpcPath); -const openRpc = JSON.parse(fs.readFileSync(openRpcPath, 'utf8')); -const entries = []; - -for (const rawMethod of openRpc.methods ?? []) { - const method = resolveMethod(rawMethod, openRpcDir); - if (typeof method.name !== 'string') { - throw new Error('Encountered OpenRPC method without a name'); - } +const conformances = [ + ...eventPayloadTypes.map(type => `extension ${type}: EventPayload {}`), + ...responsePayloadTypes.map(type => `extension ${type}: ResponsePayload {}`), +].join('\n'); - // Scope the Swift catalog to the Embedded Checkout (`ec.*`) capability. - // Sibling capabilities (e.g. `ep.cart.*`) are excluded until they have a - // typed payload and a consumer. - if (!method.name.startsWith('ec.')) { - continue; - } - - entries.push({ - identifier: methodNameToIdentifier(method.name), - method: method.name, - payload: payloadType(method), - isRequest: method.result != null, - }); -} - -const seen = new Set(); -for (const entry of entries) { - if (seen.has(entry.identifier)) { - throw new Error(`Duplicate catalog identifier: ${entry.identifier}`); - } - seen.add(entry.identifier); -} - -const delegations = (openRpc['x-delegations'] ?? []).map(delegation => ({ - identifier: delegationToIdentifier(delegation), - value: delegation, -})); +const notificationCatalog = notifications + .map( + entry => + ` public static let ${entry.identifier} = NotificationDescriptor<${entry.payload}>(method: "${entry.method}")`, + ) + .join('\n'); -const seenDelegations = new Set(); -for (const delegation of delegations) { - if (seenDelegations.has(delegation.identifier)) { - throw new Error(`Duplicate delegation identifier: ${delegation.identifier}`); - } - seenDelegations.add(delegation.identifier); -} +const requestMethodConstants = requests + .map(entry => ` public static let ${entry.identifier} = "${entry.method}"`) + .join('\n'); -const payloadTypes = Array.from( - new Set(entries.filter(entry => !entry.isRequest).map(entry => entry.payload)), -).sort(); +const allMethods = EC_METHODS.map(entry => + entry.kind === 'notification' + ? ` ${entry.identifier}.method,` + : ` ${entry.identifier},`, +).join('\n'); -const conformances = payloadTypes - .map(type => `extension ${type}: EventPayload {}`) - .join('\n'); +const requestDescriptors = protocolRequests + .map( + entry => ` public static let ${entry.descriptorIdentifier} = RequestDescriptor<${entry.payload}, ${entry.result}>( + method: Event.${entry.identifier}, + delegation: ${entry.delegation === null ? 'nil' : `"${entry.delegation}"`}, + decode: ${decodeClosure(entry)} + )`, + ) + .join('\n\n'); const generated = `// This file is generated by protocol/scripts/generate_swift_catalog.mjs. // Do not edit directly. @@ -152,21 +112,24 @@ import Foundation ${conformances} extension EmbeddedCheckoutProtocol { + /// Every \`ec.*\` method the protocol defines. Notifications resolve to typed + /// \`NotificationDescriptor\`s; requests resolve to their wire method name, + /// shared by the typed request descriptors and the kit's hand-authored ones. public enum Event { -${entries - .map(entry => - entry.isRequest - ? ` public static let ${entry.identifier} = MethodDescriptor(method: "${entry.method}")` - : ` public static let ${entry.identifier} = NotificationDescriptor<${entry.payload}>(method: "${entry.method}")`, - ) - .join('\n')} +${notificationCatalog} + +${requestMethodConstants} public static let all: [String] = [ -${entries.map(entry => ` ${entry.identifier}.method,`).join('\n')} +${allMethods} ] } } +extension EmbeddedCheckoutProtocol { +${requestDescriptors} +} + extension EmbeddedCheckoutProtocol { /// Delegations the host can request from the business, as declared by the /// service in \`x-delegations\`. String-backed and open: a host may advertise @@ -182,15 +145,13 @@ extension EmbeddedCheckoutProtocol { self.rawValue = value } -${delegations - .map( - delegation => - ` public static let ${delegation.identifier} = Delegation(rawValue: "${delegation.value}")`, - ) - .join('\n')} +${DELEGATIONS.map( + delegation => + ` public static let ${delegation.identifier} = Delegation(rawValue: "${delegation.value}")`, +).join('\n')} public static let all: [Delegation] = [ -${delegations.map(delegation => ` .${delegation.identifier},`).join('\n')} +${DELEGATIONS.map(delegation => ` .${delegation.identifier},`).join('\n')} ] } } diff --git a/protocol/scripts/method_catalog.mjs b/protocol/scripts/method_catalog.mjs new file mode 100644 index 000000000..a399892e9 --- /dev/null +++ b/protocol/scripts/method_catalog.mjs @@ -0,0 +1,261 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import {fileURLToPath} from 'node:url'; + +const scriptDir = path.dirname(fileURLToPath(import.meta.url)); +const protocolRoot = path.resolve(scriptDir, '..'); + +const openRpcPath = path.resolve( + protocolRoot, + 'services/shopping/embedded.openrpc.json', +); +const openRpcDir = path.dirname(openRpcPath); + +const fallbackPayload = 'JSONAny'; + +const refPayloadMappings = new Map([ + ['checkout.json', 'Checkout'], + ['cart.json', fallbackPayload], + ['types/error_response.json', 'ErrorResponse'], + ['error_response.json', 'ErrorResponse'], +]); + +function normalizeRef(ref) { + return ref + .replace(/^\.\.\/\.\.\/schemas\/shopping\//, '') + .replace(/^\.\.\/\.\.\/schemas\/common\//, '') + .replace(/#.*$/, ''); +} + +// `ec.line_items.change` -> `lineItemsChange`. The leading `ec` capability +// segment is dropped; the enclosing namespace already conveys it. +export function methodNameToIdentifier(methodName) { + const parts = methodName + .replace(/^ec\./, '') + .split(/[._]/g) + .filter(Boolean); + + return parts + .map((part, index) => + index === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1), + ) + .join(''); +} + +// `payment.instruments_change` -> `paymentInstrumentsChange`. +export function delegationToIdentifier(delegation) { + return delegation + .split(/[._]/g) + .filter(Boolean) + .map((part, index) => + index === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1), + ) + .join(''); +} + +// Public name of a request descriptor: delegated requests are named after the +// delegation (`paymentInstrumentsChange`), core requests after the method +// (`ready`). Keeps the descriptor surface stable as methods gain `_request` +// suffixes. +function descriptorIdentifier(methodName, delegation) { + return delegation + ? delegationToIdentifier(delegation) + : methodNameToIdentifier(methodName); +} + +function resolvePointer(doc, pointer) { + if (!pointer) return doc; + + return pointer + .split('/') + .filter(Boolean) + .reduce((node, rawSegment) => { + if (node == null) return undefined; + const segment = rawSegment.replace(/~1/g, '/').replace(/~0/g, '~'); + return node[segment]; + }, doc); +} + +function resolveMethod(rawMethod, baseDir) { + const ref = rawMethod?.$ref; + if (typeof ref !== 'string') { + return {method: rawMethod, baseDir}; + } + + const [relativePath, pointer = ''] = ref.split('#'); + const targetPath = path.resolve(baseDir, relativePath); + const targetDoc = JSON.parse(fs.readFileSync(targetPath, 'utf8')); + + return { + method: resolvePointer(targetDoc, pointer), + baseDir: path.dirname(targetPath), + }; +} + +function notificationPayload(method) { + const ref = method.params?.[0]?.schema?.$ref; + if (typeof ref !== 'string') { + return fallbackPayload; + } + + return refPayloadMappings.get(normalizeRef(ref)) ?? fallbackPayload; +} + +// A result-bearing method `ec._request` binds to delegation `` when `` +// is declared in `x-delegations`; core requests (`ec.ready`, `ec.auth`) have no +// delegation. +function delegationForMethod(methodName, delegationSet) { + if (!methodName.endsWith('_request')) { + return null; + } + + const candidate = methodName.replace(/^ec\./, '').replace(/_request$/, ''); + return delegationSet.has(candidate) ? candidate : null; +} + +// Payment-instrument schema shared by the instruments-change and ready result +// extractions; only the local title differs. +function selectedInstrumentPayment(title) { + return { + title, + description: 'Payment instruments with selected instrument ID.', + allOf: [ + {$ref: 'checkout.json#/properties/payment'}, + { + type: 'object', + properties: { + selected_instrument_id: { + type: 'string', + description: 'ID of the selected payment instrument.', + }, + }, + }, + ], + }; +} + +// Request payload/result types the model generator synthesizes from the spec. +// `rootTitle`s here are the canonical Swift/Kotlin/TS type names; the Swift +// catalog reads them back to emit fully-typed descriptors. `kind` selects the +// extraction (`params` -> request payload, `result` -> response payload). +export const MODEL_EXTRACTIONS = [ + { + kind: 'result', + method: 'ec.payment.instruments_change_request', + outputFile: 'instruments_change_result.json', + rootTitle: 'InstrumentsChangeResult', + checkoutTitle: 'InstrumentsChangeCheckout', + paymentSchema: selectedInstrumentPayment('InstrumentsChangePayment'), + }, + { + kind: 'result', + method: 'ec.payment.credential_request', + outputFile: 'credential_result.json', + rootTitle: 'CredentialResult', + checkoutTitle: 'CredentialCheckout', + paymentSchema: {$ref: 'checkout.json#/properties/payment'}, + }, + { + kind: 'params', + method: 'ec.ready', + outputFile: 'ready_request.json', + rootTitle: 'ReadyRequest', + }, + { + kind: 'result', + method: 'ec.ready', + outputFile: 'ready_result.json', + rootTitle: 'ReadyResult', + checkoutTitle: 'ReadyCheckout', + paymentSchema: selectedInstrumentPayment('ReadyPayment'), + }, + { + kind: 'params', + method: 'ec.auth', + outputFile: 'auth_request.json', + rootTitle: 'AuthRequest', + }, + { + kind: 'result', + method: 'ec.auth', + outputFile: 'auth_result.json', + rootTitle: 'AuthResult', + }, +]; + +// Per-request binding the spec cannot express: the Swift payload/result type +// names and the decode strategy. `home` is `protocol` when the typed descriptor +// is generated into the protocol package, or `kit` when only the method string +// is generated and the descriptor is hand-authored in the kit (`window.open`, +// whose result encoding is host policy). +// +// `decode`: +// - `whole` decode the params object into `payload` (ready/auth). +// - `checkoutUnwrap` decode `JSONRPCCheckoutParams.checkout` -> `Checkout`. +const REQUEST_BINDINGS = new Map([ + ['ec.ready', {payload: 'ReadyRequest', result: 'ReadyResult', decode: 'whole', home: 'protocol'}], + ['ec.auth', {payload: 'AuthRequest', result: 'AuthResult', decode: 'whole', home: 'protocol'}], + ['ec.payment.instruments_change_request', {payload: 'Checkout', result: 'InstrumentsChangeResult', decode: 'checkoutUnwrap', home: 'protocol'}], + ['ec.payment.credential_request', {payload: 'Checkout', result: 'CredentialResult', decode: 'checkoutUnwrap', home: 'protocol'}], + ['ec.window.open_request', {payload: 'WindowOpenRequest', result: 'WindowOpenResult', decode: 'whole', home: 'kit'}], + ['ec.fulfillment.address_change_request', {payload: 'Checkout', result: 'AddressChangeResult', decode: 'checkoutUnwrap', home: 'protocol'}], +]); + +function buildCatalog() { + const openRpc = JSON.parse(fs.readFileSync(openRpcPath, 'utf8')); + const delegationSet = new Set(openRpc['x-delegations'] ?? []); + + const methods = []; + for (const rawMethod of openRpc.methods ?? []) { + const {method} = resolveMethod(rawMethod, openRpcDir); + if (typeof method?.name !== 'string' || !method.name.startsWith('ec.')) { + continue; + } + + const identifier = methodNameToIdentifier(method.name); + + if (method.result != null) { + const binding = REQUEST_BINDINGS.get(method.name); + if (binding === undefined) { + throw new Error(`No request binding for ${method.name}`); + } + const delegation = delegationForMethod(method.name, delegationSet); + methods.push({ + kind: 'request', + method: method.name, + identifier, + descriptorIdentifier: descriptorIdentifier(method.name, delegation), + payload: binding.payload, + result: binding.result, + decode: binding.decode, + home: binding.home, + delegation, + }); + } else { + methods.push({ + kind: 'notification', + method: method.name, + identifier, + payload: notificationPayload(method), + }); + } + } + + const delegations = (openRpc['x-delegations'] ?? []).map(value => ({ + identifier: delegationToIdentifier(value), + value, + })); + + return {methods, delegations}; +} + +const catalog = buildCatalog(); + +// Ordered catalog of every `ec.*` method, in spec order. Notifications carry a +// `payload`; requests additionally carry `result`, `decode`, `home`, +// `delegation`, and `descriptorIdentifier`. +export const EC_METHODS = catalog.methods; + +// Delegations declared by the service in `x-delegations`, pre-mapped to Swift +// identifiers. +export const DELEGATIONS = catalog.delegations;