Add handoff activity
@ -2,6 +2,10 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>NSUserActivityTypes</key>
|
||||||
|
<array>
|
||||||
|
<string>app.omnivore.omnivore.openURL</string>
|
||||||
|
</array>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
||||||
|
|||||||
@ -378,7 +378,6 @@ struct AnimatingCellHeight: AnimatableModifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ToolbarItemGroup(placement: .barTrailing) {
|
ToolbarItemGroup(placement: .barTrailing) {
|
||||||
|
|
||||||
if viewModel.appliedFilter?.name == "Deleted" {
|
if viewModel.appliedFilter?.name == "Deleted" {
|
||||||
if viewModel.isEmptyingTrash {
|
if viewModel.isEmptyingTrash {
|
||||||
ProgressView()
|
ProgressView()
|
||||||
|
|||||||
@ -44,6 +44,8 @@ struct WebReaderContainerView: View {
|
|||||||
|
|
||||||
@State var showExplainSheet = false
|
@State var showExplainSheet = false
|
||||||
|
|
||||||
|
@State var handoffActivity: NSUserActivity?
|
||||||
|
|
||||||
@EnvironmentObject var dataService: DataService
|
@EnvironmentObject var dataService: DataService
|
||||||
@EnvironmentObject var audioController: AudioController
|
@EnvironmentObject var audioController: AudioController
|
||||||
@Environment(\.openURL) var openURL
|
@Environment(\.openURL) var openURL
|
||||||
@ -422,6 +424,8 @@ struct WebReaderContainerView: View {
|
|||||||
.statusBar(hidden: prefersHideStatusBarInReader)
|
.statusBar(hidden: prefersHideStatusBarInReader)
|
||||||
#endif
|
#endif
|
||||||
.onAppear {
|
.onAppear {
|
||||||
|
startUserActivity()
|
||||||
|
|
||||||
dataService.updateLinkReadingProgress(
|
dataService.updateLinkReadingProgress(
|
||||||
itemID: item.unwrappedID,
|
itemID: item.unwrappedID,
|
||||||
readingProgress: max(item.readingProgress, 0.1),
|
readingProgress: max(item.readingProgress, 0.1),
|
||||||
@ -437,6 +441,9 @@ struct WebReaderContainerView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onDisappear {
|
||||||
|
stopUserActivity()
|
||||||
|
}
|
||||||
.confirmationDialog(linkToOpen?.absoluteString ?? "", isPresented: $displayLinkSheet,
|
.confirmationDialog(linkToOpen?.absoluteString ?? "", isPresented: $displayLinkSheet,
|
||||||
titleVisibility: .visible) {
|
titleVisibility: .visible) {
|
||||||
Button(action: {
|
Button(action: {
|
||||||
@ -752,4 +759,22 @@ struct WebReaderContainerView: View {
|
|||||||
|
|
||||||
openURL(url)
|
openURL(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func startUserActivity() {
|
||||||
|
if let slug = item.slug, let webpageURL = URL(string: "https://omnivore.app/me/\(slug)") {
|
||||||
|
let activity = NSUserActivity(activityType: "com.omnivore.omnivore.openURL")
|
||||||
|
activity.title = "Open in Safari"
|
||||||
|
activity.webpageURL = webpageURL
|
||||||
|
activity.isEligibleForHandoff = true
|
||||||
|
activity.becomeCurrent()
|
||||||
|
handoffActivity = activity
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func stopUserActivity() {
|
||||||
|
self.handoffActivity = nil
|
||||||
|
Task {
|
||||||
|
await NSUserActivity.deleteAllSavedUserActivities()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13273,6 +13273,7 @@ extension Objects {
|
|||||||
let optInFeature: [String: Unions.OptInFeatureResult]
|
let optInFeature: [String: Unions.OptInFeatureResult]
|
||||||
let recommend: [String: Unions.RecommendResult]
|
let recommend: [String: Unions.RecommendResult]
|
||||||
let recommendHighlights: [String: Unions.RecommendHighlightsResult]
|
let recommendHighlights: [String: Unions.RecommendHighlightsResult]
|
||||||
|
let replyToEmail: [String: Unions.ReplyToEmailResult]
|
||||||
let reportItem: [String: Objects.ReportItemResult]
|
let reportItem: [String: Objects.ReportItemResult]
|
||||||
let revokeApiKey: [String: Unions.RevokeApiKeyResult]
|
let revokeApiKey: [String: Unions.RevokeApiKeyResult]
|
||||||
let saveArticleReadingProgress: [String: Unions.SaveArticleReadingProgressResult]
|
let saveArticleReadingProgress: [String: Unions.SaveArticleReadingProgressResult]
|
||||||
@ -13475,6 +13476,10 @@ extension Objects.Mutation: Decodable {
|
|||||||
if let value = try container.decode(Unions.RecommendHighlightsResult?.self, forKey: codingKey) {
|
if let value = try container.decode(Unions.RecommendHighlightsResult?.self, forKey: codingKey) {
|
||||||
map.set(key: field, hash: alias, value: value as Any)
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
}
|
}
|
||||||
|
case "replyToEmail":
|
||||||
|
if let value = try container.decode(Unions.ReplyToEmailResult?.self, forKey: codingKey) {
|
||||||
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
|
}
|
||||||
case "reportItem":
|
case "reportItem":
|
||||||
if let value = try container.decode(Objects.ReportItemResult?.self, forKey: codingKey) {
|
if let value = try container.decode(Objects.ReportItemResult?.self, forKey: codingKey) {
|
||||||
map.set(key: field, hash: alias, value: value as Any)
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
@ -13647,6 +13652,7 @@ extension Objects.Mutation: Decodable {
|
|||||||
optInFeature = map["optInFeature"]
|
optInFeature = map["optInFeature"]
|
||||||
recommend = map["recommend"]
|
recommend = map["recommend"]
|
||||||
recommendHighlights = map["recommendHighlights"]
|
recommendHighlights = map["recommendHighlights"]
|
||||||
|
replyToEmail = map["replyToEmail"]
|
||||||
reportItem = map["reportItem"]
|
reportItem = map["reportItem"]
|
||||||
revokeApiKey = map["revokeApiKey"]
|
revokeApiKey = map["revokeApiKey"]
|
||||||
saveArticleReadingProgress = map["saveArticleReadingProgress"]
|
saveArticleReadingProgress = map["saveArticleReadingProgress"]
|
||||||
@ -14404,6 +14410,25 @@ extension Fields where TypeLock == Objects.Mutation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func replyToEmail<Type>(recentEmailId: String, reply: Enums.AllowedReply, selection: Selection<Type, Unions.ReplyToEmailResult>) throws -> Type {
|
||||||
|
let field = GraphQLField.composite(
|
||||||
|
name: "replyToEmail",
|
||||||
|
arguments: [Argument(name: "recentEmailId", type: "ID!", value: recentEmailId), Argument(name: "reply", type: "AllowedReply!", value: reply)],
|
||||||
|
selection: selection.selection
|
||||||
|
)
|
||||||
|
select(field)
|
||||||
|
|
||||||
|
switch response {
|
||||||
|
case let .decoding(data):
|
||||||
|
if let data = data.replyToEmail[field.alias!] {
|
||||||
|
return try selection.decode(data: data)
|
||||||
|
}
|
||||||
|
throw HttpError.badpayload
|
||||||
|
case .mocking:
|
||||||
|
return selection.mock()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func reportItem<Type>(input: InputObjects.ReportItemInput, selection: Selection<Type, Objects.ReportItemResult>) throws -> Type {
|
func reportItem<Type>(input: InputObjects.ReportItemInput, selection: Selection<Type, Objects.ReportItemResult>) throws -> Type {
|
||||||
let field = GraphQLField.composite(
|
let field = GraphQLField.composite(
|
||||||
name: "reportItem",
|
name: "reportItem",
|
||||||
@ -17261,6 +17286,8 @@ extension Objects {
|
|||||||
let from: [String: String]
|
let from: [String: String]
|
||||||
let html: [String: String]
|
let html: [String: String]
|
||||||
let id: [String: String]
|
let id: [String: String]
|
||||||
|
let reply: [String: String]
|
||||||
|
let replyTo: [String: String]
|
||||||
let subject: [String: String]
|
let subject: [String: String]
|
||||||
let text: [String: String]
|
let text: [String: String]
|
||||||
let to: [String: String]
|
let to: [String: String]
|
||||||
@ -17300,6 +17327,14 @@ extension Objects.RecentEmail: Decodable {
|
|||||||
if let value = try container.decode(String?.self, forKey: codingKey) {
|
if let value = try container.decode(String?.self, forKey: codingKey) {
|
||||||
map.set(key: field, hash: alias, value: value as Any)
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
}
|
}
|
||||||
|
case "reply":
|
||||||
|
if let value = try container.decode(String?.self, forKey: codingKey) {
|
||||||
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
|
}
|
||||||
|
case "replyTo":
|
||||||
|
if let value = try container.decode(String?.self, forKey: codingKey) {
|
||||||
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
|
}
|
||||||
case "subject":
|
case "subject":
|
||||||
if let value = try container.decode(String?.self, forKey: codingKey) {
|
if let value = try container.decode(String?.self, forKey: codingKey) {
|
||||||
map.set(key: field, hash: alias, value: value as Any)
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
@ -17330,6 +17365,8 @@ extension Objects.RecentEmail: Decodable {
|
|||||||
from = map["from"]
|
from = map["from"]
|
||||||
html = map["html"]
|
html = map["html"]
|
||||||
id = map["id"]
|
id = map["id"]
|
||||||
|
reply = map["reply"]
|
||||||
|
replyTo = map["replyTo"]
|
||||||
subject = map["subject"]
|
subject = map["subject"]
|
||||||
text = map["text"]
|
text = map["text"]
|
||||||
to = map["to"]
|
to = map["to"]
|
||||||
@ -17407,6 +17444,36 @@ extension Fields where TypeLock == Objects.RecentEmail {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func reply() throws -> String? {
|
||||||
|
let field = GraphQLField.leaf(
|
||||||
|
name: "reply",
|
||||||
|
arguments: []
|
||||||
|
)
|
||||||
|
select(field)
|
||||||
|
|
||||||
|
switch response {
|
||||||
|
case let .decoding(data):
|
||||||
|
return data.reply[field.alias!]
|
||||||
|
case .mocking:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func replyTo() throws -> String? {
|
||||||
|
let field = GraphQLField.leaf(
|
||||||
|
name: "replyTo",
|
||||||
|
arguments: []
|
||||||
|
)
|
||||||
|
select(field)
|
||||||
|
|
||||||
|
switch response {
|
||||||
|
case let .decoding(data):
|
||||||
|
return data.replyTo[field.alias!]
|
||||||
|
case .mocking:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func subject() throws -> String {
|
func subject() throws -> String {
|
||||||
let field = GraphQLField.leaf(
|
let field = GraphQLField.leaf(
|
||||||
name: "subject",
|
name: "subject",
|
||||||
@ -18975,6 +19042,136 @@ extension Selection where TypeLock == Never, Type == Never {
|
|||||||
typealias ReminderSuccess<T> = Selection<T, Objects.ReminderSuccess>
|
typealias ReminderSuccess<T> = Selection<T, Objects.ReminderSuccess>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension Objects {
|
||||||
|
struct ReplyToEmailError {
|
||||||
|
let __typename: TypeName = .replyToEmailError
|
||||||
|
let errorCodes: [String: [Enums.ReplyToEmailErrorCode]]
|
||||||
|
|
||||||
|
enum TypeName: String, Codable {
|
||||||
|
case replyToEmailError = "ReplyToEmailError"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Objects.ReplyToEmailError: Decodable {
|
||||||
|
init(from decoder: Decoder) throws {
|
||||||
|
let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
|
||||||
|
|
||||||
|
var map = HashMap()
|
||||||
|
for codingKey in container.allKeys {
|
||||||
|
if codingKey.isTypenameKey { continue }
|
||||||
|
|
||||||
|
let alias = codingKey.stringValue
|
||||||
|
let field = GraphQLField.getFieldNameFromAlias(alias)
|
||||||
|
|
||||||
|
switch field {
|
||||||
|
case "errorCodes":
|
||||||
|
if let value = try container.decode([Enums.ReplyToEmailErrorCode]?.self, forKey: codingKey) {
|
||||||
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
throw DecodingError.dataCorrupted(
|
||||||
|
DecodingError.Context(
|
||||||
|
codingPath: decoder.codingPath,
|
||||||
|
debugDescription: "Unknown key \(field)."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
errorCodes = map["errorCodes"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Fields where TypeLock == Objects.ReplyToEmailError {
|
||||||
|
func errorCodes() throws -> [Enums.ReplyToEmailErrorCode] {
|
||||||
|
let field = GraphQLField.leaf(
|
||||||
|
name: "errorCodes",
|
||||||
|
arguments: []
|
||||||
|
)
|
||||||
|
select(field)
|
||||||
|
|
||||||
|
switch response {
|
||||||
|
case let .decoding(data):
|
||||||
|
if let data = data.errorCodes[field.alias!] {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
throw HttpError.badpayload
|
||||||
|
case .mocking:
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Selection where TypeLock == Never, Type == Never {
|
||||||
|
typealias ReplyToEmailError<T> = Selection<T, Objects.ReplyToEmailError>
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Objects {
|
||||||
|
struct ReplyToEmailSuccess {
|
||||||
|
let __typename: TypeName = .replyToEmailSuccess
|
||||||
|
let success: [String: Bool]
|
||||||
|
|
||||||
|
enum TypeName: String, Codable {
|
||||||
|
case replyToEmailSuccess = "ReplyToEmailSuccess"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Objects.ReplyToEmailSuccess: Decodable {
|
||||||
|
init(from decoder: Decoder) throws {
|
||||||
|
let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
|
||||||
|
|
||||||
|
var map = HashMap()
|
||||||
|
for codingKey in container.allKeys {
|
||||||
|
if codingKey.isTypenameKey { continue }
|
||||||
|
|
||||||
|
let alias = codingKey.stringValue
|
||||||
|
let field = GraphQLField.getFieldNameFromAlias(alias)
|
||||||
|
|
||||||
|
switch field {
|
||||||
|
case "success":
|
||||||
|
if let value = try container.decode(Bool?.self, forKey: codingKey) {
|
||||||
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
throw DecodingError.dataCorrupted(
|
||||||
|
DecodingError.Context(
|
||||||
|
codingPath: decoder.codingPath,
|
||||||
|
debugDescription: "Unknown key \(field)."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
success = map["success"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Fields where TypeLock == Objects.ReplyToEmailSuccess {
|
||||||
|
func success() throws -> Bool {
|
||||||
|
let field = GraphQLField.leaf(
|
||||||
|
name: "success",
|
||||||
|
arguments: []
|
||||||
|
)
|
||||||
|
select(field)
|
||||||
|
|
||||||
|
switch response {
|
||||||
|
case let .decoding(data):
|
||||||
|
if let data = data.success[field.alias!] {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
throw HttpError.badpayload
|
||||||
|
case .mocking:
|
||||||
|
return Bool.mockValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Selection where TypeLock == Never, Type == Never {
|
||||||
|
typealias ReplyToEmailSuccess<T> = Selection<T, Objects.ReplyToEmailSuccess>
|
||||||
|
}
|
||||||
|
|
||||||
extension Objects {
|
extension Objects {
|
||||||
struct ReportItemResult {
|
struct ReportItemResult {
|
||||||
let __typename: TypeName = .reportItemResult
|
let __typename: TypeName = .reportItemResult
|
||||||
@ -20445,6 +20642,7 @@ extension Objects {
|
|||||||
let directionality: [String: Enums.DirectionalityType]
|
let directionality: [String: Enums.DirectionalityType]
|
||||||
let feedContent: [String: String]
|
let feedContent: [String: String]
|
||||||
let folder: [String: String]
|
let folder: [String: String]
|
||||||
|
let format: [String: String]
|
||||||
let highlights: [String: [Objects.Highlight]]
|
let highlights: [String: [Objects.Highlight]]
|
||||||
let id: [String: String]
|
let id: [String: String]
|
||||||
let image: [String: String]
|
let image: [String: String]
|
||||||
@ -20545,6 +20743,10 @@ extension Objects.SearchItem: Decodable {
|
|||||||
if let value = try container.decode(String?.self, forKey: codingKey) {
|
if let value = try container.decode(String?.self, forKey: codingKey) {
|
||||||
map.set(key: field, hash: alias, value: value as Any)
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
}
|
}
|
||||||
|
case "format":
|
||||||
|
if let value = try container.decode(String?.self, forKey: codingKey) {
|
||||||
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
|
}
|
||||||
case "highlights":
|
case "highlights":
|
||||||
if let value = try container.decode([Objects.Highlight]?.self, forKey: codingKey) {
|
if let value = try container.decode([Objects.Highlight]?.self, forKey: codingKey) {
|
||||||
map.set(key: field, hash: alias, value: value as Any)
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
@ -20699,6 +20901,7 @@ extension Objects.SearchItem: Decodable {
|
|||||||
directionality = map["directionality"]
|
directionality = map["directionality"]
|
||||||
feedContent = map["feedContent"]
|
feedContent = map["feedContent"]
|
||||||
folder = map["folder"]
|
folder = map["folder"]
|
||||||
|
format = map["format"]
|
||||||
highlights = map["highlights"]
|
highlights = map["highlights"]
|
||||||
id = map["id"]
|
id = map["id"]
|
||||||
image = map["image"]
|
image = map["image"]
|
||||||
@ -20925,6 +21128,21 @@ extension Fields where TypeLock == Objects.SearchItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func format() throws -> String? {
|
||||||
|
let field = GraphQLField.leaf(
|
||||||
|
name: "format",
|
||||||
|
arguments: []
|
||||||
|
)
|
||||||
|
select(field)
|
||||||
|
|
||||||
|
switch response {
|
||||||
|
case let .decoding(data):
|
||||||
|
return data.format[field.alias!]
|
||||||
|
case .mocking:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func highlights<Type>(selection: Selection<Type, [Objects.Highlight]?>) throws -> Type {
|
func highlights<Type>(selection: Selection<Type, [Objects.Highlight]?>) throws -> Type {
|
||||||
let field = GraphQLField.composite(
|
let field = GraphQLField.composite(
|
||||||
name: "highlights",
|
name: "highlights",
|
||||||
@ -27785,6 +28003,7 @@ extension Selection where TypeLock == Never, Type == Never {
|
|||||||
extension Objects {
|
extension Objects {
|
||||||
struct UserPersonalization {
|
struct UserPersonalization {
|
||||||
let __typename: TypeName = .userPersonalization
|
let __typename: TypeName = .userPersonalization
|
||||||
|
let digestConfig: [String: String]
|
||||||
let fields: [String: String]
|
let fields: [String: String]
|
||||||
let fontFamily: [String: String]
|
let fontFamily: [String: String]
|
||||||
let fontSize: [String: Int]
|
let fontSize: [String: Int]
|
||||||
@ -27816,6 +28035,10 @@ extension Objects.UserPersonalization: Decodable {
|
|||||||
let field = GraphQLField.getFieldNameFromAlias(alias)
|
let field = GraphQLField.getFieldNameFromAlias(alias)
|
||||||
|
|
||||||
switch field {
|
switch field {
|
||||||
|
case "digestConfig":
|
||||||
|
if let value = try container.decode(String?.self, forKey: codingKey) {
|
||||||
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
|
}
|
||||||
case "fields":
|
case "fields":
|
||||||
if let value = try container.decode(String?.self, forKey: codingKey) {
|
if let value = try container.decode(String?.self, forKey: codingKey) {
|
||||||
map.set(key: field, hash: alias, value: value as Any)
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
@ -27874,6 +28097,7 @@ extension Objects.UserPersonalization: Decodable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
digestConfig = map["digestConfig"]
|
||||||
fields = map["fields"]
|
fields = map["fields"]
|
||||||
fontFamily = map["fontFamily"]
|
fontFamily = map["fontFamily"]
|
||||||
fontSize = map["fontSize"]
|
fontSize = map["fontSize"]
|
||||||
@ -27890,6 +28114,21 @@ extension Objects.UserPersonalization: Decodable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension Fields where TypeLock == Objects.UserPersonalization {
|
extension Fields where TypeLock == Objects.UserPersonalization {
|
||||||
|
func digestConfig() throws -> String? {
|
||||||
|
let field = GraphQLField.leaf(
|
||||||
|
name: "digestConfig",
|
||||||
|
arguments: []
|
||||||
|
)
|
||||||
|
select(field)
|
||||||
|
|
||||||
|
switch response {
|
||||||
|
case let .decoding(data):
|
||||||
|
return data.digestConfig[field.alias!]
|
||||||
|
case .mocking:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func fields() throws -> String? {
|
func fields() throws -> String? {
|
||||||
let field = GraphQLField.leaf(
|
let field = GraphQLField.leaf(
|
||||||
name: "fields",
|
name: "fields",
|
||||||
@ -33777,6 +34016,80 @@ extension Selection where TypeLock == Never, Type == Never {
|
|||||||
typealias ReminderResult<T> = Selection<T, Unions.ReminderResult>
|
typealias ReminderResult<T> = Selection<T, Unions.ReminderResult>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension Unions {
|
||||||
|
struct ReplyToEmailResult {
|
||||||
|
let __typename: TypeName
|
||||||
|
let errorCodes: [String: [Enums.ReplyToEmailErrorCode]]
|
||||||
|
let success: [String: Bool]
|
||||||
|
|
||||||
|
enum TypeName: String, Codable {
|
||||||
|
case replyToEmailError = "ReplyToEmailError"
|
||||||
|
case replyToEmailSuccess = "ReplyToEmailSuccess"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Unions.ReplyToEmailResult: Decodable {
|
||||||
|
init(from decoder: Decoder) throws {
|
||||||
|
let container = try decoder.container(keyedBy: DynamicCodingKeys.self)
|
||||||
|
|
||||||
|
var map = HashMap()
|
||||||
|
for codingKey in container.allKeys {
|
||||||
|
if codingKey.isTypenameKey { continue }
|
||||||
|
|
||||||
|
let alias = codingKey.stringValue
|
||||||
|
let field = GraphQLField.getFieldNameFromAlias(alias)
|
||||||
|
|
||||||
|
switch field {
|
||||||
|
case "errorCodes":
|
||||||
|
if let value = try container.decode([Enums.ReplyToEmailErrorCode]?.self, forKey: codingKey) {
|
||||||
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
|
}
|
||||||
|
case "success":
|
||||||
|
if let value = try container.decode(Bool?.self, forKey: codingKey) {
|
||||||
|
map.set(key: field, hash: alias, value: value as Any)
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
throw DecodingError.dataCorrupted(
|
||||||
|
DecodingError.Context(
|
||||||
|
codingPath: decoder.codingPath,
|
||||||
|
debugDescription: "Unknown key \(field)."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
__typename = try container.decode(TypeName.self, forKey: DynamicCodingKeys(stringValue: "__typename")!)
|
||||||
|
|
||||||
|
errorCodes = map["errorCodes"]
|
||||||
|
success = map["success"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Fields where TypeLock == Unions.ReplyToEmailResult {
|
||||||
|
func on<Type>(replyToEmailError: Selection<Type, Objects.ReplyToEmailError>, replyToEmailSuccess: Selection<Type, Objects.ReplyToEmailSuccess>) throws -> Type {
|
||||||
|
select([GraphQLField.fragment(type: "ReplyToEmailError", selection: replyToEmailError.selection), GraphQLField.fragment(type: "ReplyToEmailSuccess", selection: replyToEmailSuccess.selection)])
|
||||||
|
|
||||||
|
switch response {
|
||||||
|
case let .decoding(data):
|
||||||
|
switch data.__typename {
|
||||||
|
case .replyToEmailError:
|
||||||
|
let data = Objects.ReplyToEmailError(errorCodes: data.errorCodes)
|
||||||
|
return try replyToEmailError.decode(data: data)
|
||||||
|
case .replyToEmailSuccess:
|
||||||
|
let data = Objects.ReplyToEmailSuccess(success: data.success)
|
||||||
|
return try replyToEmailSuccess.decode(data: data)
|
||||||
|
}
|
||||||
|
case .mocking:
|
||||||
|
return replyToEmailError.mock()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Selection where TypeLock == Never, Type == Never {
|
||||||
|
typealias ReplyToEmailResult<T> = Selection<T, Unions.ReplyToEmailResult>
|
||||||
|
}
|
||||||
|
|
||||||
extension Unions {
|
extension Unions {
|
||||||
struct RevokeApiKeyResult {
|
struct RevokeApiKeyResult {
|
||||||
let __typename: TypeName
|
let __typename: TypeName
|
||||||
@ -37206,6 +37519,19 @@ extension Enums {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension Enums {
|
||||||
|
/// AllowedReply
|
||||||
|
enum AllowedReply: String, CaseIterable, Codable {
|
||||||
|
case confirm = "CONFIRM"
|
||||||
|
|
||||||
|
case okay = "OKAY"
|
||||||
|
|
||||||
|
case subscribe = "SUBSCRIBE"
|
||||||
|
|
||||||
|
case yes = "YES"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extension Enums {
|
extension Enums {
|
||||||
/// ApiKeysErrorCode
|
/// ApiKeysErrorCode
|
||||||
enum ApiKeysErrorCode: String, CaseIterable, Codable {
|
enum ApiKeysErrorCode: String, CaseIterable, Codable {
|
||||||
@ -38008,6 +38334,13 @@ extension Enums {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension Enums {
|
||||||
|
/// ReplyToEmailErrorCode
|
||||||
|
enum ReplyToEmailErrorCode: String, CaseIterable, Codable {
|
||||||
|
case unauthorized = "UNAUTHORIZED"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extension Enums {
|
extension Enums {
|
||||||
/// ReportType
|
/// ReportType
|
||||||
enum ReportType: String, CaseIterable, Codable {
|
enum ReportType: String, CaseIterable, Codable {
|
||||||
@ -40044,6 +40377,8 @@ extension InputObjects {
|
|||||||
|
|
||||||
extension InputObjects {
|
extension InputObjects {
|
||||||
struct SetUserPersonalizationInput: Encodable, Hashable {
|
struct SetUserPersonalizationInput: Encodable, Hashable {
|
||||||
|
var digestConfig: OptionalArgument<String> = .absent()
|
||||||
|
|
||||||
var fields: OptionalArgument<String> = .absent()
|
var fields: OptionalArgument<String> = .absent()
|
||||||
|
|
||||||
var fontFamily: OptionalArgument<String> = .absent()
|
var fontFamily: OptionalArgument<String> = .absent()
|
||||||
@ -40068,6 +40403,7 @@ extension InputObjects {
|
|||||||
|
|
||||||
func encode(to encoder: Encoder) throws {
|
func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
|
if digestConfig.hasValue { try container.encode(digestConfig, forKey: .digestConfig) }
|
||||||
if fields.hasValue { try container.encode(fields, forKey: .fields) }
|
if fields.hasValue { try container.encode(fields, forKey: .fields) }
|
||||||
if fontFamily.hasValue { try container.encode(fontFamily, forKey: .fontFamily) }
|
if fontFamily.hasValue { try container.encode(fontFamily, forKey: .fontFamily) }
|
||||||
if fontSize.hasValue { try container.encode(fontSize, forKey: .fontSize) }
|
if fontSize.hasValue { try container.encode(fontSize, forKey: .fontSize) }
|
||||||
@ -40082,6 +40418,7 @@ extension InputObjects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum CodingKeys: String, CodingKey {
|
enum CodingKeys: String, CodingKey {
|
||||||
|
case digestConfig
|
||||||
case fields
|
case fields
|
||||||
case fontFamily
|
case fontFamily
|
||||||
case fontSize
|
case fontSize
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 532 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 711 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 7.5 KiB |