@dashx/react-native 0.1.25 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +22 -149
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -2
- package/android/gradlew +34 -21
- package/android/gradlew.bat +24 -19
- package/android/src/main/AndroidManifest.xml +2 -8
- package/android/src/main/java/com/dashx/rn/sdk/DashXReactNativeModule.kt +248 -0
- package/android/src/main/java/com/dashx/rn/sdk/{DashXPackage.kt → DashXReactNativePackage.kt} +2 -1
- package/android/src/main/java/com/dashx/rn/sdk/util/ArrayUtil.java +131 -0
- package/android/src/main/java/com/dashx/rn/sdk/util/MapUtil.java +142 -0
- package/android/src/main/java/com/dashx/rn/sdk/{Utils.kt → util/Utils.kt} +5 -5
- package/index.js +68 -72
- package/ios/DashX.swift +110 -95
- package/ios/DashXReactNative-Bridging-Header.h +4 -0
- package/ios/DashXReactNative.m +25 -0
- package/ios/DashXReactNative.xcodeproj/project.pbxproj +280 -0
- package/ios/{DashX.xcworkspace → DashXReactNative.xcworkspace}/contents.xcworkspacedata +1 -1
- package/ios/{DashX.xcworkspace → DashXReactNative.xcworkspace}/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- package/package.json +6 -12
- package/DashX.podspec +0 -27
- package/android/README.md +0 -23
- package/android/src/main/java/com/dashx/rn/sdk/DashXActivityLifecycleCallbacks.kt +0 -93
- package/android/src/main/java/com/dashx/rn/sdk/DashXClientInterceptor.kt +0 -66
- package/android/src/main/java/com/dashx/rn/sdk/DashXExceptionHandler.kt +0 -28
- package/android/src/main/java/com/dashx/rn/sdk/DashXMessagingService.kt +0 -176
- package/android/src/main/java/com/dashx/rn/sdk/DashXModule.kt +0 -193
- package/android/src/main/java/com/dashx/rn/sdk/NotificationReceiver.kt +0 -17
- package/ios/API.swift +0 -2420
- package/ios/Constants.swift +0 -14
- package/ios/DashX.m +0 -17
- package/ios/DashX.xcodeproj/project.pbxproj +0 -356
- package/ios/DashX.xcodeproj/xcshareddata/xcschemes/DashX.xcscheme +0 -67
- package/ios/DashXAppDelegate.swift +0 -73
- package/ios/DashXApplicationLifecycleCallbacks.swift +0 -65
- package/ios/DashXClient.swift +0 -319
- package/ios/DashXData.swift +0 -19
- package/ios/DashXLog.swift +0 -44
- package/ios/DashXUIViewController.swift +0 -15
- package/ios/Network.swift +0 -74
- package/ios/README.md +0 -80
- package/ios/Utils.swift +0 -13
- package/ios/graphql/AddContent.graphql +0 -8
- package/ios/graphql/AddItemToCart.graphql +0 -33
- package/ios/graphql/EditContent.graphql +0 -8
- package/ios/graphql/FetchCart.graphql +0 -33
- package/ios/graphql/FetchContent.graphql +0 -3
- package/ios/graphql/IdentifyAccount.graphql +0 -5
- package/ios/graphql/SearchContent.graphql +0 -3
- package/ios/graphql/SubscribeContact.graphql +0 -6
- package/ios/graphql/TrackEvent.graphql +0 -5
- package/ios/schema.json +0 -37038
package/ios/API.swift
DELETED
|
@@ -1,2420 +0,0 @@
|
|
|
1
|
-
// @generated
|
|
2
|
-
// This file was automatically generated and should not be edited.
|
|
3
|
-
|
|
4
|
-
import Apollo
|
|
5
|
-
import Foundation
|
|
6
|
-
|
|
7
|
-
/// DashXGql namespace
|
|
8
|
-
public enum DashXGql {
|
|
9
|
-
public struct AddContentInput: GraphQLMapConvertible {
|
|
10
|
-
public var graphQLMap: GraphQLMap
|
|
11
|
-
|
|
12
|
-
/// - Parameters:
|
|
13
|
-
/// - contentType
|
|
14
|
-
/// - content
|
|
15
|
-
/// - data
|
|
16
|
-
public init(contentType: String, content: Swift.Optional<String?> = nil, data: JSON) {
|
|
17
|
-
graphQLMap = ["contentType": contentType, "content": content, "data": data]
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public var contentType: String {
|
|
21
|
-
get {
|
|
22
|
-
return graphQLMap["contentType"] as! String
|
|
23
|
-
}
|
|
24
|
-
set {
|
|
25
|
-
graphQLMap.updateValue(newValue, forKey: "contentType")
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public var content: Swift.Optional<String?> {
|
|
30
|
-
get {
|
|
31
|
-
return graphQLMap["content"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
32
|
-
}
|
|
33
|
-
set {
|
|
34
|
-
graphQLMap.updateValue(newValue, forKey: "content")
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public var data: JSON {
|
|
39
|
-
get {
|
|
40
|
-
return graphQLMap["data"] as! JSON
|
|
41
|
-
}
|
|
42
|
-
set {
|
|
43
|
-
graphQLMap.updateValue(newValue, forKey: "data")
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
public struct AddItemToCartInput: GraphQLMapConvertible {
|
|
49
|
-
public var graphQLMap: GraphQLMap
|
|
50
|
-
|
|
51
|
-
/// - Parameters:
|
|
52
|
-
/// - accountUid
|
|
53
|
-
/// - accountAnonymousUid
|
|
54
|
-
/// - itemId
|
|
55
|
-
/// - pricingId
|
|
56
|
-
/// - quantity
|
|
57
|
-
/// - reset
|
|
58
|
-
/// - custom
|
|
59
|
-
public init(accountUid: Swift.Optional<String?> = nil, accountAnonymousUid: Swift.Optional<String?> = nil, itemId: UUID, pricingId: UUID, quantity: Decimal, reset: Bool, custom: Swift.Optional<JSON?> = nil) {
|
|
60
|
-
graphQLMap = ["accountUid": accountUid, "accountAnonymousUid": accountAnonymousUid, "itemId": itemId, "pricingId": pricingId, "quantity": quantity, "reset": reset, "custom": custom]
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
public var accountUid: Swift.Optional<String?> {
|
|
64
|
-
get {
|
|
65
|
-
return graphQLMap["accountUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
66
|
-
}
|
|
67
|
-
set {
|
|
68
|
-
graphQLMap.updateValue(newValue, forKey: "accountUid")
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
public var accountAnonymousUid: Swift.Optional<String?> {
|
|
73
|
-
get {
|
|
74
|
-
return graphQLMap["accountAnonymousUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
75
|
-
}
|
|
76
|
-
set {
|
|
77
|
-
graphQLMap.updateValue(newValue, forKey: "accountAnonymousUid")
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
public var itemId: UUID {
|
|
82
|
-
get {
|
|
83
|
-
return graphQLMap["itemId"] as! UUID
|
|
84
|
-
}
|
|
85
|
-
set {
|
|
86
|
-
graphQLMap.updateValue(newValue, forKey: "itemId")
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
public var pricingId: UUID {
|
|
91
|
-
get {
|
|
92
|
-
return graphQLMap["pricingId"] as! UUID
|
|
93
|
-
}
|
|
94
|
-
set {
|
|
95
|
-
graphQLMap.updateValue(newValue, forKey: "pricingId")
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
public var quantity: Decimal {
|
|
100
|
-
get {
|
|
101
|
-
return graphQLMap["quantity"] as! Decimal
|
|
102
|
-
}
|
|
103
|
-
set {
|
|
104
|
-
graphQLMap.updateValue(newValue, forKey: "quantity")
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
public var reset: Bool {
|
|
109
|
-
get {
|
|
110
|
-
return graphQLMap["reset"] as! Bool
|
|
111
|
-
}
|
|
112
|
-
set {
|
|
113
|
-
graphQLMap.updateValue(newValue, forKey: "reset")
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
public var custom: Swift.Optional<JSON?> {
|
|
118
|
-
get {
|
|
119
|
-
return graphQLMap["custom"] as? Swift.Optional<JSON?> ?? Swift.Optional<JSON?>.none
|
|
120
|
-
}
|
|
121
|
-
set {
|
|
122
|
-
graphQLMap.updateValue(newValue, forKey: "custom")
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
public enum OrderStatus: RawRepresentable, Equatable, Hashable, CaseIterable, Apollo.JSONDecodable, Apollo.JSONEncodable {
|
|
128
|
-
public typealias RawValue = String
|
|
129
|
-
case draft
|
|
130
|
-
case initial
|
|
131
|
-
case checkedOut
|
|
132
|
-
case paid
|
|
133
|
-
case canceled
|
|
134
|
-
/// Auto generated constant for unknown enum values
|
|
135
|
-
case __unknown(RawValue)
|
|
136
|
-
|
|
137
|
-
public init?(rawValue: RawValue) {
|
|
138
|
-
switch rawValue {
|
|
139
|
-
case "DRAFT": self = .draft
|
|
140
|
-
case "INITIAL": self = .initial
|
|
141
|
-
case "CHECKED_OUT": self = .checkedOut
|
|
142
|
-
case "PAID": self = .paid
|
|
143
|
-
case "CANCELED": self = .canceled
|
|
144
|
-
default: self = .__unknown(rawValue)
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
public var rawValue: RawValue {
|
|
149
|
-
switch self {
|
|
150
|
-
case .draft: return "DRAFT"
|
|
151
|
-
case .initial: return "INITIAL"
|
|
152
|
-
case .checkedOut: return "CHECKED_OUT"
|
|
153
|
-
case .paid: return "PAID"
|
|
154
|
-
case .canceled: return "CANCELED"
|
|
155
|
-
case .__unknown(let value): return value
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
public static func == (lhs: OrderStatus, rhs: OrderStatus) -> Bool {
|
|
160
|
-
switch (lhs, rhs) {
|
|
161
|
-
case (.draft, .draft): return true
|
|
162
|
-
case (.initial, .initial): return true
|
|
163
|
-
case (.checkedOut, .checkedOut): return true
|
|
164
|
-
case (.paid, .paid): return true
|
|
165
|
-
case (.canceled, .canceled): return true
|
|
166
|
-
case (.__unknown(let lhsValue), .__unknown(let rhsValue)): return lhsValue == rhsValue
|
|
167
|
-
default: return false
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
public static var allCases: [OrderStatus] {
|
|
172
|
-
return [
|
|
173
|
-
.draft,
|
|
174
|
-
.initial,
|
|
175
|
-
.checkedOut,
|
|
176
|
-
.paid,
|
|
177
|
-
.canceled,
|
|
178
|
-
]
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
public enum CouponDiscountType: RawRepresentable, Equatable, Hashable, CaseIterable, Apollo.JSONDecodable, Apollo.JSONEncodable {
|
|
183
|
-
public typealias RawValue = String
|
|
184
|
-
case fixed
|
|
185
|
-
case percentage
|
|
186
|
-
/// Auto generated constant for unknown enum values
|
|
187
|
-
case __unknown(RawValue)
|
|
188
|
-
|
|
189
|
-
public init?(rawValue: RawValue) {
|
|
190
|
-
switch rawValue {
|
|
191
|
-
case "FIXED": self = .fixed
|
|
192
|
-
case "PERCENTAGE": self = .percentage
|
|
193
|
-
default: self = .__unknown(rawValue)
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
public var rawValue: RawValue {
|
|
198
|
-
switch self {
|
|
199
|
-
case .fixed: return "FIXED"
|
|
200
|
-
case .percentage: return "PERCENTAGE"
|
|
201
|
-
case .__unknown(let value): return value
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
public static func == (lhs: CouponDiscountType, rhs: CouponDiscountType) -> Bool {
|
|
206
|
-
switch (lhs, rhs) {
|
|
207
|
-
case (.fixed, .fixed): return true
|
|
208
|
-
case (.percentage, .percentage): return true
|
|
209
|
-
case (.__unknown(let lhsValue), .__unknown(let rhsValue)): return lhsValue == rhsValue
|
|
210
|
-
default: return false
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
public static var allCases: [CouponDiscountType] {
|
|
215
|
-
return [
|
|
216
|
-
.fixed,
|
|
217
|
-
.percentage,
|
|
218
|
-
]
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
public struct EditContentInput: GraphQLMapConvertible {
|
|
223
|
-
public var graphQLMap: GraphQLMap
|
|
224
|
-
|
|
225
|
-
/// - Parameters:
|
|
226
|
-
/// - contentType
|
|
227
|
-
/// - content
|
|
228
|
-
/// - data
|
|
229
|
-
public init(contentType: String, content: String, data: JSON) {
|
|
230
|
-
graphQLMap = ["contentType": contentType, "content": content, "data": data]
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
public var contentType: String {
|
|
234
|
-
get {
|
|
235
|
-
return graphQLMap["contentType"] as! String
|
|
236
|
-
}
|
|
237
|
-
set {
|
|
238
|
-
graphQLMap.updateValue(newValue, forKey: "contentType")
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
public var content: String {
|
|
243
|
-
get {
|
|
244
|
-
return graphQLMap["content"] as! String
|
|
245
|
-
}
|
|
246
|
-
set {
|
|
247
|
-
graphQLMap.updateValue(newValue, forKey: "content")
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
public var data: JSON {
|
|
252
|
-
get {
|
|
253
|
-
return graphQLMap["data"] as! JSON
|
|
254
|
-
}
|
|
255
|
-
set {
|
|
256
|
-
graphQLMap.updateValue(newValue, forKey: "data")
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
public struct FetchCartInput: GraphQLMapConvertible {
|
|
262
|
-
public var graphQLMap: GraphQLMap
|
|
263
|
-
|
|
264
|
-
/// - Parameters:
|
|
265
|
-
/// - accountUid
|
|
266
|
-
/// - accountAnonymousUid
|
|
267
|
-
/// - orderId
|
|
268
|
-
public init(accountUid: Swift.Optional<String?> = nil, accountAnonymousUid: Swift.Optional<String?> = nil, orderId: Swift.Optional<UUID?> = nil) {
|
|
269
|
-
graphQLMap = ["accountUid": accountUid, "accountAnonymousUid": accountAnonymousUid, "orderId": orderId]
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
public var accountUid: Swift.Optional<String?> {
|
|
273
|
-
get {
|
|
274
|
-
return graphQLMap["accountUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
275
|
-
}
|
|
276
|
-
set {
|
|
277
|
-
graphQLMap.updateValue(newValue, forKey: "accountUid")
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
public var accountAnonymousUid: Swift.Optional<String?> {
|
|
282
|
-
get {
|
|
283
|
-
return graphQLMap["accountAnonymousUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
284
|
-
}
|
|
285
|
-
set {
|
|
286
|
-
graphQLMap.updateValue(newValue, forKey: "accountAnonymousUid")
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
public var orderId: Swift.Optional<UUID?> {
|
|
291
|
-
get {
|
|
292
|
-
return graphQLMap["orderId"] as? Swift.Optional<UUID?> ?? Swift.Optional<UUID?>.none
|
|
293
|
-
}
|
|
294
|
-
set {
|
|
295
|
-
graphQLMap.updateValue(newValue, forKey: "orderId")
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
public struct FetchContentInput: GraphQLMapConvertible {
|
|
301
|
-
public var graphQLMap: GraphQLMap
|
|
302
|
-
|
|
303
|
-
/// - Parameters:
|
|
304
|
-
/// - contentId
|
|
305
|
-
/// - contentType
|
|
306
|
-
/// - content
|
|
307
|
-
/// - preview
|
|
308
|
-
/// - language
|
|
309
|
-
/// - fields
|
|
310
|
-
/// - include
|
|
311
|
-
/// - exclude
|
|
312
|
-
public init(contentId: Swift.Optional<UUID?> = nil, contentType: Swift.Optional<String?> = nil, content: Swift.Optional<String?> = nil, preview: Swift.Optional<Bool?> = nil, language: Swift.Optional<String?> = nil, fields: Swift.Optional<[String]?> = nil, include: Swift.Optional<[String]?> = nil, exclude: Swift.Optional<[String]?> = nil) {
|
|
313
|
-
graphQLMap = ["contentId": contentId, "contentType": contentType, "content": content, "preview": preview, "language": language, "fields": fields, "include": include, "exclude": exclude]
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
public var contentId: Swift.Optional<UUID?> {
|
|
317
|
-
get {
|
|
318
|
-
return graphQLMap["contentId"] as? Swift.Optional<UUID?> ?? Swift.Optional<UUID?>.none
|
|
319
|
-
}
|
|
320
|
-
set {
|
|
321
|
-
graphQLMap.updateValue(newValue, forKey: "contentId")
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
public var contentType: Swift.Optional<String?> {
|
|
326
|
-
get {
|
|
327
|
-
return graphQLMap["contentType"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
328
|
-
}
|
|
329
|
-
set {
|
|
330
|
-
graphQLMap.updateValue(newValue, forKey: "contentType")
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
public var content: Swift.Optional<String?> {
|
|
335
|
-
get {
|
|
336
|
-
return graphQLMap["content"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
337
|
-
}
|
|
338
|
-
set {
|
|
339
|
-
graphQLMap.updateValue(newValue, forKey: "content")
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
public var preview: Swift.Optional<Bool?> {
|
|
344
|
-
get {
|
|
345
|
-
return graphQLMap["preview"] as? Swift.Optional<Bool?> ?? Swift.Optional<Bool?>.none
|
|
346
|
-
}
|
|
347
|
-
set {
|
|
348
|
-
graphQLMap.updateValue(newValue, forKey: "preview")
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
public var language: Swift.Optional<String?> {
|
|
353
|
-
get {
|
|
354
|
-
return graphQLMap["language"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
355
|
-
}
|
|
356
|
-
set {
|
|
357
|
-
graphQLMap.updateValue(newValue, forKey: "language")
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
public var fields: Swift.Optional<[String]?> {
|
|
362
|
-
get {
|
|
363
|
-
return graphQLMap["fields"] as? Swift.Optional<[String]?> ?? Swift.Optional<[String]?>.none
|
|
364
|
-
}
|
|
365
|
-
set {
|
|
366
|
-
graphQLMap.updateValue(newValue, forKey: "fields")
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
public var include: Swift.Optional<[String]?> {
|
|
371
|
-
get {
|
|
372
|
-
return graphQLMap["include"] as? Swift.Optional<[String]?> ?? Swift.Optional<[String]?>.none
|
|
373
|
-
}
|
|
374
|
-
set {
|
|
375
|
-
graphQLMap.updateValue(newValue, forKey: "include")
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
public var exclude: Swift.Optional<[String]?> {
|
|
380
|
-
get {
|
|
381
|
-
return graphQLMap["exclude"] as? Swift.Optional<[String]?> ?? Swift.Optional<[String]?>.none
|
|
382
|
-
}
|
|
383
|
-
set {
|
|
384
|
-
graphQLMap.updateValue(newValue, forKey: "exclude")
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
public struct IdentifyAccountInput: GraphQLMapConvertible {
|
|
390
|
-
public var graphQLMap: GraphQLMap
|
|
391
|
-
|
|
392
|
-
/// - Parameters:
|
|
393
|
-
/// - uid
|
|
394
|
-
/// - anonymousUid
|
|
395
|
-
/// - email
|
|
396
|
-
/// - phone
|
|
397
|
-
/// - name
|
|
398
|
-
/// - firstName
|
|
399
|
-
/// - lastName
|
|
400
|
-
/// - scope
|
|
401
|
-
public init(uid: Swift.Optional<String?> = nil, anonymousUid: Swift.Optional<String?> = nil, email: Swift.Optional<String?> = nil, phone: Swift.Optional<String?> = nil, name: Swift.Optional<String?> = nil, firstName: Swift.Optional<String?> = nil, lastName: Swift.Optional<String?> = nil, scope: Swift.Optional<String?> = nil) {
|
|
402
|
-
graphQLMap = ["uid": uid, "anonymousUid": anonymousUid, "email": email, "phone": phone, "name": name, "firstName": firstName, "lastName": lastName, "scope": scope]
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
public var uid: Swift.Optional<String?> {
|
|
406
|
-
get {
|
|
407
|
-
return graphQLMap["uid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
408
|
-
}
|
|
409
|
-
set {
|
|
410
|
-
graphQLMap.updateValue(newValue, forKey: "uid")
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
public var anonymousUid: Swift.Optional<String?> {
|
|
415
|
-
get {
|
|
416
|
-
return graphQLMap["anonymousUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
417
|
-
}
|
|
418
|
-
set {
|
|
419
|
-
graphQLMap.updateValue(newValue, forKey: "anonymousUid")
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
public var email: Swift.Optional<String?> {
|
|
424
|
-
get {
|
|
425
|
-
return graphQLMap["email"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
426
|
-
}
|
|
427
|
-
set {
|
|
428
|
-
graphQLMap.updateValue(newValue, forKey: "email")
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
public var phone: Swift.Optional<String?> {
|
|
433
|
-
get {
|
|
434
|
-
return graphQLMap["phone"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
435
|
-
}
|
|
436
|
-
set {
|
|
437
|
-
graphQLMap.updateValue(newValue, forKey: "phone")
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
public var name: Swift.Optional<String?> {
|
|
442
|
-
get {
|
|
443
|
-
return graphQLMap["name"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
444
|
-
}
|
|
445
|
-
set {
|
|
446
|
-
graphQLMap.updateValue(newValue, forKey: "name")
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
public var firstName: Swift.Optional<String?> {
|
|
451
|
-
get {
|
|
452
|
-
return graphQLMap["firstName"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
453
|
-
}
|
|
454
|
-
set {
|
|
455
|
-
graphQLMap.updateValue(newValue, forKey: "firstName")
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
public var lastName: Swift.Optional<String?> {
|
|
460
|
-
get {
|
|
461
|
-
return graphQLMap["lastName"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
462
|
-
}
|
|
463
|
-
set {
|
|
464
|
-
graphQLMap.updateValue(newValue, forKey: "lastName")
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
public var scope: Swift.Optional<String?> {
|
|
469
|
-
get {
|
|
470
|
-
return graphQLMap["scope"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
471
|
-
}
|
|
472
|
-
set {
|
|
473
|
-
graphQLMap.updateValue(newValue, forKey: "scope")
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
public struct SearchContentInput: GraphQLMapConvertible {
|
|
479
|
-
public var graphQLMap: GraphQLMap
|
|
480
|
-
|
|
481
|
-
/// - Parameters:
|
|
482
|
-
/// - contentType
|
|
483
|
-
/// - returnType
|
|
484
|
-
/// - filter
|
|
485
|
-
/// - order
|
|
486
|
-
/// - limit
|
|
487
|
-
/// - preview
|
|
488
|
-
/// - language
|
|
489
|
-
/// - fields
|
|
490
|
-
/// - include
|
|
491
|
-
/// - exclude
|
|
492
|
-
public init(contentType: String, returnType: String, filter: Swift.Optional<JSON?> = nil, order: Swift.Optional<JSON?> = nil, limit: Swift.Optional<Int?> = nil, preview: Swift.Optional<Bool?> = nil, language: Swift.Optional<String?> = nil, fields: Swift.Optional<[String]?> = nil, include: Swift.Optional<[String]?> = nil, exclude: Swift.Optional<[String]?> = nil) {
|
|
493
|
-
graphQLMap = ["contentType": contentType, "returnType": returnType, "filter": filter, "order": order, "limit": limit, "preview": preview, "language": language, "fields": fields, "include": include, "exclude": exclude]
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
public var contentType: String {
|
|
497
|
-
get {
|
|
498
|
-
return graphQLMap["contentType"] as! String
|
|
499
|
-
}
|
|
500
|
-
set {
|
|
501
|
-
graphQLMap.updateValue(newValue, forKey: "contentType")
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
public var returnType: String {
|
|
506
|
-
get {
|
|
507
|
-
return graphQLMap["returnType"] as! String
|
|
508
|
-
}
|
|
509
|
-
set {
|
|
510
|
-
graphQLMap.updateValue(newValue, forKey: "returnType")
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
public var filter: Swift.Optional<JSON?> {
|
|
515
|
-
get {
|
|
516
|
-
return graphQLMap["filter"] as? Swift.Optional<JSON?> ?? Swift.Optional<JSON?>.none
|
|
517
|
-
}
|
|
518
|
-
set {
|
|
519
|
-
graphQLMap.updateValue(newValue, forKey: "filter")
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
public var order: Swift.Optional<JSON?> {
|
|
524
|
-
get {
|
|
525
|
-
return graphQLMap["order"] as? Swift.Optional<JSON?> ?? Swift.Optional<JSON?>.none
|
|
526
|
-
}
|
|
527
|
-
set {
|
|
528
|
-
graphQLMap.updateValue(newValue, forKey: "order")
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
public var limit: Swift.Optional<Int?> {
|
|
533
|
-
get {
|
|
534
|
-
return graphQLMap["limit"] as? Swift.Optional<Int?> ?? Swift.Optional<Int?>.none
|
|
535
|
-
}
|
|
536
|
-
set {
|
|
537
|
-
graphQLMap.updateValue(newValue, forKey: "limit")
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
public var preview: Swift.Optional<Bool?> {
|
|
542
|
-
get {
|
|
543
|
-
return graphQLMap["preview"] as? Swift.Optional<Bool?> ?? Swift.Optional<Bool?>.none
|
|
544
|
-
}
|
|
545
|
-
set {
|
|
546
|
-
graphQLMap.updateValue(newValue, forKey: "preview")
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
public var language: Swift.Optional<String?> {
|
|
551
|
-
get {
|
|
552
|
-
return graphQLMap["language"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
553
|
-
}
|
|
554
|
-
set {
|
|
555
|
-
graphQLMap.updateValue(newValue, forKey: "language")
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
public var fields: Swift.Optional<[String]?> {
|
|
560
|
-
get {
|
|
561
|
-
return graphQLMap["fields"] as? Swift.Optional<[String]?> ?? Swift.Optional<[String]?>.none
|
|
562
|
-
}
|
|
563
|
-
set {
|
|
564
|
-
graphQLMap.updateValue(newValue, forKey: "fields")
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
public var include: Swift.Optional<[String]?> {
|
|
569
|
-
get {
|
|
570
|
-
return graphQLMap["include"] as? Swift.Optional<[String]?> ?? Swift.Optional<[String]?>.none
|
|
571
|
-
}
|
|
572
|
-
set {
|
|
573
|
-
graphQLMap.updateValue(newValue, forKey: "include")
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
public var exclude: Swift.Optional<[String]?> {
|
|
578
|
-
get {
|
|
579
|
-
return graphQLMap["exclude"] as? Swift.Optional<[String]?> ?? Swift.Optional<[String]?>.none
|
|
580
|
-
}
|
|
581
|
-
set {
|
|
582
|
-
graphQLMap.updateValue(newValue, forKey: "exclude")
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
public struct SubscribeContactInput: GraphQLMapConvertible {
|
|
588
|
-
public var graphQLMap: GraphQLMap
|
|
589
|
-
|
|
590
|
-
/// - Parameters:
|
|
591
|
-
/// - accountUid
|
|
592
|
-
/// - accountAnonymousUid
|
|
593
|
-
/// - name
|
|
594
|
-
/// - kind
|
|
595
|
-
/// - value
|
|
596
|
-
/// - userAgent
|
|
597
|
-
/// - osName
|
|
598
|
-
/// - osVersion
|
|
599
|
-
/// - deviceModel
|
|
600
|
-
/// - deviceManufacturer
|
|
601
|
-
/// - deviceUid
|
|
602
|
-
/// - deviceAdvertisingUid
|
|
603
|
-
/// - isDeviceAdTrackingEnabled
|
|
604
|
-
/// - tag
|
|
605
|
-
public init(accountUid: Swift.Optional<String?> = nil, accountAnonymousUid: Swift.Optional<String?> = nil, name: Swift.Optional<String?> = nil, kind: ContactKind, value: String, userAgent: Swift.Optional<String?> = nil, osName: Swift.Optional<String?> = nil, osVersion: Swift.Optional<String?> = nil, deviceModel: Swift.Optional<String?> = nil, deviceManufacturer: Swift.Optional<String?> = nil, deviceUid: Swift.Optional<String?> = nil, deviceAdvertisingUid: Swift.Optional<String?> = nil, isDeviceAdTrackingEnabled: Swift.Optional<Bool?> = nil, tag: Swift.Optional<String?> = nil) {
|
|
606
|
-
graphQLMap = ["accountUid": accountUid, "accountAnonymousUid": accountAnonymousUid, "name": name, "kind": kind, "value": value, "userAgent": userAgent, "osName": osName, "osVersion": osVersion, "deviceModel": deviceModel, "deviceManufacturer": deviceManufacturer, "deviceUid": deviceUid, "deviceAdvertisingUid": deviceAdvertisingUid, "isDeviceAdTrackingEnabled": isDeviceAdTrackingEnabled, "tag": tag]
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
public var accountUid: Swift.Optional<String?> {
|
|
610
|
-
get {
|
|
611
|
-
return graphQLMap["accountUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
612
|
-
}
|
|
613
|
-
set {
|
|
614
|
-
graphQLMap.updateValue(newValue, forKey: "accountUid")
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
public var accountAnonymousUid: Swift.Optional<String?> {
|
|
619
|
-
get {
|
|
620
|
-
return graphQLMap["accountAnonymousUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
621
|
-
}
|
|
622
|
-
set {
|
|
623
|
-
graphQLMap.updateValue(newValue, forKey: "accountAnonymousUid")
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
public var name: Swift.Optional<String?> {
|
|
628
|
-
get {
|
|
629
|
-
return graphQLMap["name"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
630
|
-
}
|
|
631
|
-
set {
|
|
632
|
-
graphQLMap.updateValue(newValue, forKey: "name")
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
public var kind: ContactKind {
|
|
637
|
-
get {
|
|
638
|
-
return graphQLMap["kind"] as! ContactKind
|
|
639
|
-
}
|
|
640
|
-
set {
|
|
641
|
-
graphQLMap.updateValue(newValue, forKey: "kind")
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
public var value: String {
|
|
646
|
-
get {
|
|
647
|
-
return graphQLMap["value"] as! String
|
|
648
|
-
}
|
|
649
|
-
set {
|
|
650
|
-
graphQLMap.updateValue(newValue, forKey: "value")
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
public var userAgent: Swift.Optional<String?> {
|
|
655
|
-
get {
|
|
656
|
-
return graphQLMap["userAgent"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
657
|
-
}
|
|
658
|
-
set {
|
|
659
|
-
graphQLMap.updateValue(newValue, forKey: "userAgent")
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
public var osName: Swift.Optional<String?> {
|
|
664
|
-
get {
|
|
665
|
-
return graphQLMap["osName"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
666
|
-
}
|
|
667
|
-
set {
|
|
668
|
-
graphQLMap.updateValue(newValue, forKey: "osName")
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
public var osVersion: Swift.Optional<String?> {
|
|
673
|
-
get {
|
|
674
|
-
return graphQLMap["osVersion"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
675
|
-
}
|
|
676
|
-
set {
|
|
677
|
-
graphQLMap.updateValue(newValue, forKey: "osVersion")
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
public var deviceModel: Swift.Optional<String?> {
|
|
682
|
-
get {
|
|
683
|
-
return graphQLMap["deviceModel"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
684
|
-
}
|
|
685
|
-
set {
|
|
686
|
-
graphQLMap.updateValue(newValue, forKey: "deviceModel")
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
public var deviceManufacturer: Swift.Optional<String?> {
|
|
691
|
-
get {
|
|
692
|
-
return graphQLMap["deviceManufacturer"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
693
|
-
}
|
|
694
|
-
set {
|
|
695
|
-
graphQLMap.updateValue(newValue, forKey: "deviceManufacturer")
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
public var deviceUid: Swift.Optional<String?> {
|
|
700
|
-
get {
|
|
701
|
-
return graphQLMap["deviceUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
702
|
-
}
|
|
703
|
-
set {
|
|
704
|
-
graphQLMap.updateValue(newValue, forKey: "deviceUid")
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
public var deviceAdvertisingUid: Swift.Optional<String?> {
|
|
709
|
-
get {
|
|
710
|
-
return graphQLMap["deviceAdvertisingUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
711
|
-
}
|
|
712
|
-
set {
|
|
713
|
-
graphQLMap.updateValue(newValue, forKey: "deviceAdvertisingUid")
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
public var isDeviceAdTrackingEnabled: Swift.Optional<Bool?> {
|
|
718
|
-
get {
|
|
719
|
-
return graphQLMap["isDeviceAdTrackingEnabled"] as? Swift.Optional<Bool?> ?? Swift.Optional<Bool?>.none
|
|
720
|
-
}
|
|
721
|
-
set {
|
|
722
|
-
graphQLMap.updateValue(newValue, forKey: "isDeviceAdTrackingEnabled")
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
public var tag: Swift.Optional<String?> {
|
|
727
|
-
get {
|
|
728
|
-
return graphQLMap["tag"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
729
|
-
}
|
|
730
|
-
set {
|
|
731
|
-
graphQLMap.updateValue(newValue, forKey: "tag")
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
public enum ContactKind: RawRepresentable, Equatable, Hashable, CaseIterable, Apollo.JSONDecodable, Apollo.JSONEncodable {
|
|
737
|
-
public typealias RawValue = String
|
|
738
|
-
case email
|
|
739
|
-
case phone
|
|
740
|
-
case ios
|
|
741
|
-
case android
|
|
742
|
-
case web
|
|
743
|
-
case whatsapp
|
|
744
|
-
/// Auto generated constant for unknown enum values
|
|
745
|
-
case __unknown(RawValue)
|
|
746
|
-
|
|
747
|
-
public init?(rawValue: RawValue) {
|
|
748
|
-
switch rawValue {
|
|
749
|
-
case "EMAIL": self = .email
|
|
750
|
-
case "PHONE": self = .phone
|
|
751
|
-
case "IOS": self = .ios
|
|
752
|
-
case "ANDROID": self = .android
|
|
753
|
-
case "WEB": self = .web
|
|
754
|
-
case "WHATSAPP": self = .whatsapp
|
|
755
|
-
default: self = .__unknown(rawValue)
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
public var rawValue: RawValue {
|
|
760
|
-
switch self {
|
|
761
|
-
case .email: return "EMAIL"
|
|
762
|
-
case .phone: return "PHONE"
|
|
763
|
-
case .ios: return "IOS"
|
|
764
|
-
case .android: return "ANDROID"
|
|
765
|
-
case .web: return "WEB"
|
|
766
|
-
case .whatsapp: return "WHATSAPP"
|
|
767
|
-
case .__unknown(let value): return value
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
public static func == (lhs: ContactKind, rhs: ContactKind) -> Bool {
|
|
772
|
-
switch (lhs, rhs) {
|
|
773
|
-
case (.email, .email): return true
|
|
774
|
-
case (.phone, .phone): return true
|
|
775
|
-
case (.ios, .ios): return true
|
|
776
|
-
case (.android, .android): return true
|
|
777
|
-
case (.web, .web): return true
|
|
778
|
-
case (.whatsapp, .whatsapp): return true
|
|
779
|
-
case (.__unknown(let lhsValue), .__unknown(let rhsValue)): return lhsValue == rhsValue
|
|
780
|
-
default: return false
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
public static var allCases: [ContactKind] {
|
|
785
|
-
return [
|
|
786
|
-
.email,
|
|
787
|
-
.phone,
|
|
788
|
-
.ios,
|
|
789
|
-
.android,
|
|
790
|
-
.web,
|
|
791
|
-
.whatsapp,
|
|
792
|
-
]
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
public struct TrackEventInput: GraphQLMapConvertible {
|
|
797
|
-
public var graphQLMap: GraphQLMap
|
|
798
|
-
|
|
799
|
-
/// - Parameters:
|
|
800
|
-
/// - event
|
|
801
|
-
/// - accountUid
|
|
802
|
-
/// - accountAnonymousUid
|
|
803
|
-
/// - data
|
|
804
|
-
/// - timestamp
|
|
805
|
-
public init(event: String, accountUid: Swift.Optional<String?> = nil, accountAnonymousUid: Swift.Optional<String?> = nil, data: Swift.Optional<JSON?> = nil, timestamp: Swift.Optional<DateTime?> = nil) {
|
|
806
|
-
graphQLMap = ["event": event, "accountUid": accountUid, "accountAnonymousUid": accountAnonymousUid, "data": data, "timestamp": timestamp]
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
public var event: String {
|
|
810
|
-
get {
|
|
811
|
-
return graphQLMap["event"] as! String
|
|
812
|
-
}
|
|
813
|
-
set {
|
|
814
|
-
graphQLMap.updateValue(newValue, forKey: "event")
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
public var accountUid: Swift.Optional<String?> {
|
|
819
|
-
get {
|
|
820
|
-
return graphQLMap["accountUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
821
|
-
}
|
|
822
|
-
set {
|
|
823
|
-
graphQLMap.updateValue(newValue, forKey: "accountUid")
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
public var accountAnonymousUid: Swift.Optional<String?> {
|
|
828
|
-
get {
|
|
829
|
-
return graphQLMap["accountAnonymousUid"] as? Swift.Optional<String?> ?? Swift.Optional<String?>.none
|
|
830
|
-
}
|
|
831
|
-
set {
|
|
832
|
-
graphQLMap.updateValue(newValue, forKey: "accountAnonymousUid")
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
public var data: Swift.Optional<JSON?> {
|
|
837
|
-
get {
|
|
838
|
-
return graphQLMap["data"] as? Swift.Optional<JSON?> ?? Swift.Optional<JSON?>.none
|
|
839
|
-
}
|
|
840
|
-
set {
|
|
841
|
-
graphQLMap.updateValue(newValue, forKey: "data")
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
public var timestamp: Swift.Optional<DateTime?> {
|
|
846
|
-
get {
|
|
847
|
-
return graphQLMap["timestamp"] as? Swift.Optional<DateTime?> ?? Swift.Optional<DateTime?>.none
|
|
848
|
-
}
|
|
849
|
-
set {
|
|
850
|
-
graphQLMap.updateValue(newValue, forKey: "timestamp")
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
public final class AddContentMutation: GraphQLMutation {
|
|
856
|
-
/// The raw GraphQL definition of this operation.
|
|
857
|
-
public let operationDefinition: String =
|
|
858
|
-
"""
|
|
859
|
-
mutation AddContent($input: AddContentInput!) {
|
|
860
|
-
addContent(input: $input) {
|
|
861
|
-
__typename
|
|
862
|
-
id
|
|
863
|
-
position
|
|
864
|
-
identifier
|
|
865
|
-
data
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
"""
|
|
869
|
-
|
|
870
|
-
public let operationName: String = "AddContent"
|
|
871
|
-
|
|
872
|
-
public var input: AddContentInput
|
|
873
|
-
|
|
874
|
-
public init(input: AddContentInput) {
|
|
875
|
-
self.input = input
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
public var variables: GraphQLMap? {
|
|
879
|
-
return ["input": input]
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
public struct Data: GraphQLSelectionSet {
|
|
883
|
-
public static let possibleTypes: [String] = ["Mutation"]
|
|
884
|
-
|
|
885
|
-
public static var selections: [GraphQLSelection] {
|
|
886
|
-
return [
|
|
887
|
-
GraphQLField("addContent", arguments: ["input": GraphQLVariable("input")], type: .nonNull(.object(AddContent.selections))),
|
|
888
|
-
]
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
public private(set) var resultMap: ResultMap
|
|
892
|
-
|
|
893
|
-
public init(unsafeResultMap: ResultMap) {
|
|
894
|
-
self.resultMap = unsafeResultMap
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
public init(addContent: AddContent) {
|
|
898
|
-
self.init(unsafeResultMap: ["__typename": "Mutation", "addContent": addContent.resultMap])
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
public var addContent: AddContent {
|
|
902
|
-
get {
|
|
903
|
-
return AddContent(unsafeResultMap: resultMap["addContent"]! as! ResultMap)
|
|
904
|
-
}
|
|
905
|
-
set {
|
|
906
|
-
resultMap.updateValue(newValue.resultMap, forKey: "addContent")
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
public struct AddContent: GraphQLSelectionSet {
|
|
911
|
-
public static let possibleTypes: [String] = ["CustomContent"]
|
|
912
|
-
|
|
913
|
-
public static var selections: [GraphQLSelection] {
|
|
914
|
-
return [
|
|
915
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
916
|
-
GraphQLField("id", type: .nonNull(.scalar(UUID.self))),
|
|
917
|
-
GraphQLField("position", type: .nonNull(.scalar(Int.self))),
|
|
918
|
-
GraphQLField("identifier", type: .nonNull(.scalar(String.self))),
|
|
919
|
-
GraphQLField("data", type: .nonNull(.scalar(JSON.self))),
|
|
920
|
-
]
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
public private(set) var resultMap: ResultMap
|
|
924
|
-
|
|
925
|
-
public init(unsafeResultMap: ResultMap) {
|
|
926
|
-
self.resultMap = unsafeResultMap
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
public init(id: UUID, position: Int, identifier: String, data: JSON) {
|
|
930
|
-
self.init(unsafeResultMap: ["__typename": "CustomContent", "id": id, "position": position, "identifier": identifier, "data": data])
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
public var __typename: String {
|
|
934
|
-
get {
|
|
935
|
-
return resultMap["__typename"]! as! String
|
|
936
|
-
}
|
|
937
|
-
set {
|
|
938
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
public var id: UUID {
|
|
943
|
-
get {
|
|
944
|
-
return resultMap["id"]! as! UUID
|
|
945
|
-
}
|
|
946
|
-
set {
|
|
947
|
-
resultMap.updateValue(newValue, forKey: "id")
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
public var position: Int {
|
|
952
|
-
get {
|
|
953
|
-
return resultMap["position"]! as! Int
|
|
954
|
-
}
|
|
955
|
-
set {
|
|
956
|
-
resultMap.updateValue(newValue, forKey: "position")
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
public var identifier: String {
|
|
961
|
-
get {
|
|
962
|
-
return resultMap["identifier"]! as! String
|
|
963
|
-
}
|
|
964
|
-
set {
|
|
965
|
-
resultMap.updateValue(newValue, forKey: "identifier")
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
public var data: JSON {
|
|
970
|
-
get {
|
|
971
|
-
return resultMap["data"]! as! JSON
|
|
972
|
-
}
|
|
973
|
-
set {
|
|
974
|
-
resultMap.updateValue(newValue, forKey: "data")
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
public final class AddItemToCartMutation: GraphQLMutation {
|
|
982
|
-
/// The raw GraphQL definition of this operation.
|
|
983
|
-
public let operationDefinition: String =
|
|
984
|
-
"""
|
|
985
|
-
mutation AddItemToCart($input: AddItemToCartInput!) {
|
|
986
|
-
addItemToCart(input: $input) {
|
|
987
|
-
__typename
|
|
988
|
-
id
|
|
989
|
-
status
|
|
990
|
-
subtotal
|
|
991
|
-
discount
|
|
992
|
-
tax
|
|
993
|
-
total
|
|
994
|
-
gatewayMeta
|
|
995
|
-
currencyCode
|
|
996
|
-
orderItems {
|
|
997
|
-
__typename
|
|
998
|
-
id
|
|
999
|
-
quantity
|
|
1000
|
-
unitPrice
|
|
1001
|
-
subtotal
|
|
1002
|
-
discount
|
|
1003
|
-
tax
|
|
1004
|
-
total
|
|
1005
|
-
custom
|
|
1006
|
-
currencyCode
|
|
1007
|
-
}
|
|
1008
|
-
couponRedemptions {
|
|
1009
|
-
__typename
|
|
1010
|
-
coupon {
|
|
1011
|
-
__typename
|
|
1012
|
-
name
|
|
1013
|
-
identifier
|
|
1014
|
-
discountType
|
|
1015
|
-
discountAmount
|
|
1016
|
-
currencyCode
|
|
1017
|
-
expiresAt
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
"""
|
|
1023
|
-
|
|
1024
|
-
public let operationName: String = "AddItemToCart"
|
|
1025
|
-
|
|
1026
|
-
public var input: AddItemToCartInput
|
|
1027
|
-
|
|
1028
|
-
public init(input: AddItemToCartInput) {
|
|
1029
|
-
self.input = input
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
public var variables: GraphQLMap? {
|
|
1033
|
-
return ["input": input]
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
public struct Data: GraphQLSelectionSet {
|
|
1037
|
-
public static let possibleTypes: [String] = ["Mutation"]
|
|
1038
|
-
|
|
1039
|
-
public static var selections: [GraphQLSelection] {
|
|
1040
|
-
return [
|
|
1041
|
-
GraphQLField("addItemToCart", arguments: ["input": GraphQLVariable("input")], type: .nonNull(.object(AddItemToCart.selections))),
|
|
1042
|
-
]
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
public private(set) var resultMap: ResultMap
|
|
1046
|
-
|
|
1047
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1048
|
-
self.resultMap = unsafeResultMap
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
public init(addItemToCart: AddItemToCart) {
|
|
1052
|
-
self.init(unsafeResultMap: ["__typename": "Mutation", "addItemToCart": addItemToCart.resultMap])
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
public var addItemToCart: AddItemToCart {
|
|
1056
|
-
get {
|
|
1057
|
-
return AddItemToCart(unsafeResultMap: resultMap["addItemToCart"]! as! ResultMap)
|
|
1058
|
-
}
|
|
1059
|
-
set {
|
|
1060
|
-
resultMap.updateValue(newValue.resultMap, forKey: "addItemToCart")
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
public struct AddItemToCart: GraphQLSelectionSet {
|
|
1065
|
-
public static let possibleTypes: [String] = ["Order"]
|
|
1066
|
-
|
|
1067
|
-
public static var selections: [GraphQLSelection] {
|
|
1068
|
-
return [
|
|
1069
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
1070
|
-
GraphQLField("id", type: .nonNull(.scalar(UUID.self))),
|
|
1071
|
-
GraphQLField("status", type: .nonNull(.scalar(OrderStatus.self))),
|
|
1072
|
-
GraphQLField("subtotal", type: .nonNull(.scalar(Decimal.self))),
|
|
1073
|
-
GraphQLField("discount", type: .nonNull(.scalar(Decimal.self))),
|
|
1074
|
-
GraphQLField("tax", type: .nonNull(.scalar(Decimal.self))),
|
|
1075
|
-
GraphQLField("total", type: .nonNull(.scalar(Decimal.self))),
|
|
1076
|
-
GraphQLField("gatewayMeta", type: .scalar(JSON.self)),
|
|
1077
|
-
GraphQLField("currencyCode", type: .nonNull(.scalar(String.self))),
|
|
1078
|
-
GraphQLField("orderItems", type: .nonNull(.list(.nonNull(.object(OrderItem.selections))))),
|
|
1079
|
-
GraphQLField("couponRedemptions", type: .nonNull(.list(.nonNull(.object(CouponRedemption.selections))))),
|
|
1080
|
-
]
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
public private(set) var resultMap: ResultMap
|
|
1084
|
-
|
|
1085
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1086
|
-
self.resultMap = unsafeResultMap
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
public init(id: UUID, status: OrderStatus, subtotal: Decimal, discount: Decimal, tax: Decimal, total: Decimal, gatewayMeta: JSON? = nil, currencyCode: String, orderItems: [OrderItem], couponRedemptions: [CouponRedemption]) {
|
|
1090
|
-
self.init(unsafeResultMap: ["__typename": "Order", "id": id, "status": status, "subtotal": subtotal, "discount": discount, "tax": tax, "total": total, "gatewayMeta": gatewayMeta, "currencyCode": currencyCode, "orderItems": orderItems.map { (value: OrderItem) -> ResultMap in value.resultMap }, "couponRedemptions": couponRedemptions.map { (value: CouponRedemption) -> ResultMap in value.resultMap }])
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
public var __typename: String {
|
|
1094
|
-
get {
|
|
1095
|
-
return resultMap["__typename"]! as! String
|
|
1096
|
-
}
|
|
1097
|
-
set {
|
|
1098
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
public var id: UUID {
|
|
1103
|
-
get {
|
|
1104
|
-
return resultMap["id"]! as! UUID
|
|
1105
|
-
}
|
|
1106
|
-
set {
|
|
1107
|
-
resultMap.updateValue(newValue, forKey: "id")
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
public var status: OrderStatus {
|
|
1112
|
-
get {
|
|
1113
|
-
return resultMap["status"]! as! OrderStatus
|
|
1114
|
-
}
|
|
1115
|
-
set {
|
|
1116
|
-
resultMap.updateValue(newValue, forKey: "status")
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
public var subtotal: Decimal {
|
|
1121
|
-
get {
|
|
1122
|
-
return resultMap["subtotal"]! as! Decimal
|
|
1123
|
-
}
|
|
1124
|
-
set {
|
|
1125
|
-
resultMap.updateValue(newValue, forKey: "subtotal")
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
public var discount: Decimal {
|
|
1130
|
-
get {
|
|
1131
|
-
return resultMap["discount"]! as! Decimal
|
|
1132
|
-
}
|
|
1133
|
-
set {
|
|
1134
|
-
resultMap.updateValue(newValue, forKey: "discount")
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
public var tax: Decimal {
|
|
1139
|
-
get {
|
|
1140
|
-
return resultMap["tax"]! as! Decimal
|
|
1141
|
-
}
|
|
1142
|
-
set {
|
|
1143
|
-
resultMap.updateValue(newValue, forKey: "tax")
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
public var total: Decimal {
|
|
1148
|
-
get {
|
|
1149
|
-
return resultMap["total"]! as! Decimal
|
|
1150
|
-
}
|
|
1151
|
-
set {
|
|
1152
|
-
resultMap.updateValue(newValue, forKey: "total")
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
public var gatewayMeta: JSON? {
|
|
1157
|
-
get {
|
|
1158
|
-
return resultMap["gatewayMeta"] as? JSON
|
|
1159
|
-
}
|
|
1160
|
-
set {
|
|
1161
|
-
resultMap.updateValue(newValue, forKey: "gatewayMeta")
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
public var currencyCode: String {
|
|
1166
|
-
get {
|
|
1167
|
-
return resultMap["currencyCode"]! as! String
|
|
1168
|
-
}
|
|
1169
|
-
set {
|
|
1170
|
-
resultMap.updateValue(newValue, forKey: "currencyCode")
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
public var orderItems: [OrderItem] {
|
|
1175
|
-
get {
|
|
1176
|
-
return (resultMap["orderItems"] as! [ResultMap]).map { (value: ResultMap) -> OrderItem in OrderItem(unsafeResultMap: value) }
|
|
1177
|
-
}
|
|
1178
|
-
set {
|
|
1179
|
-
resultMap.updateValue(newValue.map { (value: OrderItem) -> ResultMap in value.resultMap }, forKey: "orderItems")
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
public var couponRedemptions: [CouponRedemption] {
|
|
1184
|
-
get {
|
|
1185
|
-
return (resultMap["couponRedemptions"] as! [ResultMap]).map { (value: ResultMap) -> CouponRedemption in CouponRedemption(unsafeResultMap: value) }
|
|
1186
|
-
}
|
|
1187
|
-
set {
|
|
1188
|
-
resultMap.updateValue(newValue.map { (value: CouponRedemption) -> ResultMap in value.resultMap }, forKey: "couponRedemptions")
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
public struct OrderItem: GraphQLSelectionSet {
|
|
1193
|
-
public static let possibleTypes: [String] = ["OrderItem"]
|
|
1194
|
-
|
|
1195
|
-
public static var selections: [GraphQLSelection] {
|
|
1196
|
-
return [
|
|
1197
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
1198
|
-
GraphQLField("id", type: .nonNull(.scalar(UUID.self))),
|
|
1199
|
-
GraphQLField("quantity", type: .nonNull(.scalar(Decimal.self))),
|
|
1200
|
-
GraphQLField("unitPrice", type: .nonNull(.scalar(Decimal.self))),
|
|
1201
|
-
GraphQLField("subtotal", type: .nonNull(.scalar(Decimal.self))),
|
|
1202
|
-
GraphQLField("discount", type: .nonNull(.scalar(Decimal.self))),
|
|
1203
|
-
GraphQLField("tax", type: .nonNull(.scalar(Decimal.self))),
|
|
1204
|
-
GraphQLField("total", type: .nonNull(.scalar(Decimal.self))),
|
|
1205
|
-
GraphQLField("custom", type: .nonNull(.scalar(JSON.self))),
|
|
1206
|
-
GraphQLField("currencyCode", type: .nonNull(.scalar(String.self))),
|
|
1207
|
-
]
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
public private(set) var resultMap: ResultMap
|
|
1211
|
-
|
|
1212
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1213
|
-
self.resultMap = unsafeResultMap
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
public init(id: UUID, quantity: Decimal, unitPrice: Decimal, subtotal: Decimal, discount: Decimal, tax: Decimal, total: Decimal, custom: JSON, currencyCode: String) {
|
|
1217
|
-
self.init(unsafeResultMap: ["__typename": "OrderItem", "id": id, "quantity": quantity, "unitPrice": unitPrice, "subtotal": subtotal, "discount": discount, "tax": tax, "total": total, "custom": custom, "currencyCode": currencyCode])
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
public var __typename: String {
|
|
1221
|
-
get {
|
|
1222
|
-
return resultMap["__typename"]! as! String
|
|
1223
|
-
}
|
|
1224
|
-
set {
|
|
1225
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
public var id: UUID {
|
|
1230
|
-
get {
|
|
1231
|
-
return resultMap["id"]! as! UUID
|
|
1232
|
-
}
|
|
1233
|
-
set {
|
|
1234
|
-
resultMap.updateValue(newValue, forKey: "id")
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
public var quantity: Decimal {
|
|
1239
|
-
get {
|
|
1240
|
-
return resultMap["quantity"]! as! Decimal
|
|
1241
|
-
}
|
|
1242
|
-
set {
|
|
1243
|
-
resultMap.updateValue(newValue, forKey: "quantity")
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
public var unitPrice: Decimal {
|
|
1248
|
-
get {
|
|
1249
|
-
return resultMap["unitPrice"]! as! Decimal
|
|
1250
|
-
}
|
|
1251
|
-
set {
|
|
1252
|
-
resultMap.updateValue(newValue, forKey: "unitPrice")
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
public var subtotal: Decimal {
|
|
1257
|
-
get {
|
|
1258
|
-
return resultMap["subtotal"]! as! Decimal
|
|
1259
|
-
}
|
|
1260
|
-
set {
|
|
1261
|
-
resultMap.updateValue(newValue, forKey: "subtotal")
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
public var discount: Decimal {
|
|
1266
|
-
get {
|
|
1267
|
-
return resultMap["discount"]! as! Decimal
|
|
1268
|
-
}
|
|
1269
|
-
set {
|
|
1270
|
-
resultMap.updateValue(newValue, forKey: "discount")
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
public var tax: Decimal {
|
|
1275
|
-
get {
|
|
1276
|
-
return resultMap["tax"]! as! Decimal
|
|
1277
|
-
}
|
|
1278
|
-
set {
|
|
1279
|
-
resultMap.updateValue(newValue, forKey: "tax")
|
|
1280
|
-
}
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
public var total: Decimal {
|
|
1284
|
-
get {
|
|
1285
|
-
return resultMap["total"]! as! Decimal
|
|
1286
|
-
}
|
|
1287
|
-
set {
|
|
1288
|
-
resultMap.updateValue(newValue, forKey: "total")
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
public var custom: JSON {
|
|
1293
|
-
get {
|
|
1294
|
-
return resultMap["custom"]! as! JSON
|
|
1295
|
-
}
|
|
1296
|
-
set {
|
|
1297
|
-
resultMap.updateValue(newValue, forKey: "custom")
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
public var currencyCode: String {
|
|
1302
|
-
get {
|
|
1303
|
-
return resultMap["currencyCode"]! as! String
|
|
1304
|
-
}
|
|
1305
|
-
set {
|
|
1306
|
-
resultMap.updateValue(newValue, forKey: "currencyCode")
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
public struct CouponRedemption: GraphQLSelectionSet {
|
|
1312
|
-
public static let possibleTypes: [String] = ["CouponRedemption"]
|
|
1313
|
-
|
|
1314
|
-
public static var selections: [GraphQLSelection] {
|
|
1315
|
-
return [
|
|
1316
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
1317
|
-
GraphQLField("coupon", type: .nonNull(.object(Coupon.selections))),
|
|
1318
|
-
]
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
public private(set) var resultMap: ResultMap
|
|
1322
|
-
|
|
1323
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1324
|
-
self.resultMap = unsafeResultMap
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
public init(coupon: Coupon) {
|
|
1328
|
-
self.init(unsafeResultMap: ["__typename": "CouponRedemption", "coupon": coupon.resultMap])
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
public var __typename: String {
|
|
1332
|
-
get {
|
|
1333
|
-
return resultMap["__typename"]! as! String
|
|
1334
|
-
}
|
|
1335
|
-
set {
|
|
1336
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
1337
|
-
}
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
public var coupon: Coupon {
|
|
1341
|
-
get {
|
|
1342
|
-
return Coupon(unsafeResultMap: resultMap["coupon"]! as! ResultMap)
|
|
1343
|
-
}
|
|
1344
|
-
set {
|
|
1345
|
-
resultMap.updateValue(newValue.resultMap, forKey: "coupon")
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
public struct Coupon: GraphQLSelectionSet {
|
|
1350
|
-
public static let possibleTypes: [String] = ["Coupon"]
|
|
1351
|
-
|
|
1352
|
-
public static var selections: [GraphQLSelection] {
|
|
1353
|
-
return [
|
|
1354
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
1355
|
-
GraphQLField("name", type: .nonNull(.scalar(String.self))),
|
|
1356
|
-
GraphQLField("identifier", type: .nonNull(.scalar(String.self))),
|
|
1357
|
-
GraphQLField("discountType", type: .nonNull(.scalar(CouponDiscountType.self))),
|
|
1358
|
-
GraphQLField("discountAmount", type: .nonNull(.scalar(Decimal.self))),
|
|
1359
|
-
GraphQLField("currencyCode", type: .scalar(String.self)),
|
|
1360
|
-
GraphQLField("expiresAt", type: .scalar(DateTime.self)),
|
|
1361
|
-
]
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
public private(set) var resultMap: ResultMap
|
|
1365
|
-
|
|
1366
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1367
|
-
self.resultMap = unsafeResultMap
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
public init(name: String, identifier: String, discountType: CouponDiscountType, discountAmount: Decimal, currencyCode: String? = nil, expiresAt: DateTime? = nil) {
|
|
1371
|
-
self.init(unsafeResultMap: ["__typename": "Coupon", "name": name, "identifier": identifier, "discountType": discountType, "discountAmount": discountAmount, "currencyCode": currencyCode, "expiresAt": expiresAt])
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
public var __typename: String {
|
|
1375
|
-
get {
|
|
1376
|
-
return resultMap["__typename"]! as! String
|
|
1377
|
-
}
|
|
1378
|
-
set {
|
|
1379
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
public var name: String {
|
|
1384
|
-
get {
|
|
1385
|
-
return resultMap["name"]! as! String
|
|
1386
|
-
}
|
|
1387
|
-
set {
|
|
1388
|
-
resultMap.updateValue(newValue, forKey: "name")
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
public var identifier: String {
|
|
1393
|
-
get {
|
|
1394
|
-
return resultMap["identifier"]! as! String
|
|
1395
|
-
}
|
|
1396
|
-
set {
|
|
1397
|
-
resultMap.updateValue(newValue, forKey: "identifier")
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
public var discountType: CouponDiscountType {
|
|
1402
|
-
get {
|
|
1403
|
-
return resultMap["discountType"]! as! CouponDiscountType
|
|
1404
|
-
}
|
|
1405
|
-
set {
|
|
1406
|
-
resultMap.updateValue(newValue, forKey: "discountType")
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
public var discountAmount: Decimal {
|
|
1411
|
-
get {
|
|
1412
|
-
return resultMap["discountAmount"]! as! Decimal
|
|
1413
|
-
}
|
|
1414
|
-
set {
|
|
1415
|
-
resultMap.updateValue(newValue, forKey: "discountAmount")
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
public var currencyCode: String? {
|
|
1420
|
-
get {
|
|
1421
|
-
return resultMap["currencyCode"] as? String
|
|
1422
|
-
}
|
|
1423
|
-
set {
|
|
1424
|
-
resultMap.updateValue(newValue, forKey: "currencyCode")
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
public var expiresAt: DateTime? {
|
|
1429
|
-
get {
|
|
1430
|
-
return resultMap["expiresAt"] as? DateTime
|
|
1431
|
-
}
|
|
1432
|
-
set {
|
|
1433
|
-
resultMap.updateValue(newValue, forKey: "expiresAt")
|
|
1434
|
-
}
|
|
1435
|
-
}
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
public final class EditContentMutation: GraphQLMutation {
|
|
1443
|
-
/// The raw GraphQL definition of this operation.
|
|
1444
|
-
public let operationDefinition: String =
|
|
1445
|
-
"""
|
|
1446
|
-
mutation EditContent($input: EditContentInput!) {
|
|
1447
|
-
editContent(input: $input) {
|
|
1448
|
-
__typename
|
|
1449
|
-
id
|
|
1450
|
-
position
|
|
1451
|
-
identifier
|
|
1452
|
-
data
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
"""
|
|
1456
|
-
|
|
1457
|
-
public let operationName: String = "EditContent"
|
|
1458
|
-
|
|
1459
|
-
public var input: EditContentInput
|
|
1460
|
-
|
|
1461
|
-
public init(input: EditContentInput) {
|
|
1462
|
-
self.input = input
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
public var variables: GraphQLMap? {
|
|
1466
|
-
return ["input": input]
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
public struct Data: GraphQLSelectionSet {
|
|
1470
|
-
public static let possibleTypes: [String] = ["Mutation"]
|
|
1471
|
-
|
|
1472
|
-
public static var selections: [GraphQLSelection] {
|
|
1473
|
-
return [
|
|
1474
|
-
GraphQLField("editContent", arguments: ["input": GraphQLVariable("input")], type: .nonNull(.object(EditContent.selections))),
|
|
1475
|
-
]
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
public private(set) var resultMap: ResultMap
|
|
1479
|
-
|
|
1480
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1481
|
-
self.resultMap = unsafeResultMap
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
public init(editContent: EditContent) {
|
|
1485
|
-
self.init(unsafeResultMap: ["__typename": "Mutation", "editContent": editContent.resultMap])
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
public var editContent: EditContent {
|
|
1489
|
-
get {
|
|
1490
|
-
return EditContent(unsafeResultMap: resultMap["editContent"]! as! ResultMap)
|
|
1491
|
-
}
|
|
1492
|
-
set {
|
|
1493
|
-
resultMap.updateValue(newValue.resultMap, forKey: "editContent")
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
public struct EditContent: GraphQLSelectionSet {
|
|
1498
|
-
public static let possibleTypes: [String] = ["CustomContent"]
|
|
1499
|
-
|
|
1500
|
-
public static var selections: [GraphQLSelection] {
|
|
1501
|
-
return [
|
|
1502
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
1503
|
-
GraphQLField("id", type: .nonNull(.scalar(UUID.self))),
|
|
1504
|
-
GraphQLField("position", type: .nonNull(.scalar(Int.self))),
|
|
1505
|
-
GraphQLField("identifier", type: .nonNull(.scalar(String.self))),
|
|
1506
|
-
GraphQLField("data", type: .nonNull(.scalar(JSON.self))),
|
|
1507
|
-
]
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
|
-
public private(set) var resultMap: ResultMap
|
|
1511
|
-
|
|
1512
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1513
|
-
self.resultMap = unsafeResultMap
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
public init(id: UUID, position: Int, identifier: String, data: JSON) {
|
|
1517
|
-
self.init(unsafeResultMap: ["__typename": "CustomContent", "id": id, "position": position, "identifier": identifier, "data": data])
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
public var __typename: String {
|
|
1521
|
-
get {
|
|
1522
|
-
return resultMap["__typename"]! as! String
|
|
1523
|
-
}
|
|
1524
|
-
set {
|
|
1525
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
public var id: UUID {
|
|
1530
|
-
get {
|
|
1531
|
-
return resultMap["id"]! as! UUID
|
|
1532
|
-
}
|
|
1533
|
-
set {
|
|
1534
|
-
resultMap.updateValue(newValue, forKey: "id")
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
public var position: Int {
|
|
1539
|
-
get {
|
|
1540
|
-
return resultMap["position"]! as! Int
|
|
1541
|
-
}
|
|
1542
|
-
set {
|
|
1543
|
-
resultMap.updateValue(newValue, forKey: "position")
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
public var identifier: String {
|
|
1548
|
-
get {
|
|
1549
|
-
return resultMap["identifier"]! as! String
|
|
1550
|
-
}
|
|
1551
|
-
set {
|
|
1552
|
-
resultMap.updateValue(newValue, forKey: "identifier")
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
public var data: JSON {
|
|
1557
|
-
get {
|
|
1558
|
-
return resultMap["data"]! as! JSON
|
|
1559
|
-
}
|
|
1560
|
-
set {
|
|
1561
|
-
resultMap.updateValue(newValue, forKey: "data")
|
|
1562
|
-
}
|
|
1563
|
-
}
|
|
1564
|
-
}
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
public final class FetchCartQuery: GraphQLQuery {
|
|
1569
|
-
/// The raw GraphQL definition of this operation.
|
|
1570
|
-
public let operationDefinition: String =
|
|
1571
|
-
"""
|
|
1572
|
-
query FetchCart($input: FetchCartInput!) {
|
|
1573
|
-
fetchCart(input: $input) {
|
|
1574
|
-
__typename
|
|
1575
|
-
id
|
|
1576
|
-
status
|
|
1577
|
-
subtotal
|
|
1578
|
-
discount
|
|
1579
|
-
tax
|
|
1580
|
-
total
|
|
1581
|
-
gatewayMeta
|
|
1582
|
-
currencyCode
|
|
1583
|
-
orderItems {
|
|
1584
|
-
__typename
|
|
1585
|
-
id
|
|
1586
|
-
quantity
|
|
1587
|
-
unitPrice
|
|
1588
|
-
subtotal
|
|
1589
|
-
discount
|
|
1590
|
-
tax
|
|
1591
|
-
total
|
|
1592
|
-
custom
|
|
1593
|
-
currencyCode
|
|
1594
|
-
}
|
|
1595
|
-
couponRedemptions {
|
|
1596
|
-
__typename
|
|
1597
|
-
coupon {
|
|
1598
|
-
__typename
|
|
1599
|
-
name
|
|
1600
|
-
identifier
|
|
1601
|
-
discountType
|
|
1602
|
-
discountAmount
|
|
1603
|
-
currencyCode
|
|
1604
|
-
expiresAt
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
}
|
|
1608
|
-
}
|
|
1609
|
-
"""
|
|
1610
|
-
|
|
1611
|
-
public let operationName: String = "FetchCart"
|
|
1612
|
-
|
|
1613
|
-
public var input: FetchCartInput
|
|
1614
|
-
|
|
1615
|
-
public init(input: FetchCartInput) {
|
|
1616
|
-
self.input = input
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
public var variables: GraphQLMap? {
|
|
1620
|
-
return ["input": input]
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
public struct Data: GraphQLSelectionSet {
|
|
1624
|
-
public static let possibleTypes: [String] = ["Query"]
|
|
1625
|
-
|
|
1626
|
-
public static var selections: [GraphQLSelection] {
|
|
1627
|
-
return [
|
|
1628
|
-
GraphQLField("fetchCart", arguments: ["input": GraphQLVariable("input")], type: .nonNull(.object(FetchCart.selections))),
|
|
1629
|
-
]
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
public private(set) var resultMap: ResultMap
|
|
1633
|
-
|
|
1634
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1635
|
-
self.resultMap = unsafeResultMap
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
public init(fetchCart: FetchCart) {
|
|
1639
|
-
self.init(unsafeResultMap: ["__typename": "Query", "fetchCart": fetchCart.resultMap])
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
public var fetchCart: FetchCart {
|
|
1643
|
-
get {
|
|
1644
|
-
return FetchCart(unsafeResultMap: resultMap["fetchCart"]! as! ResultMap)
|
|
1645
|
-
}
|
|
1646
|
-
set {
|
|
1647
|
-
resultMap.updateValue(newValue.resultMap, forKey: "fetchCart")
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
public struct FetchCart: GraphQLSelectionSet {
|
|
1652
|
-
public static let possibleTypes: [String] = ["Order"]
|
|
1653
|
-
|
|
1654
|
-
public static var selections: [GraphQLSelection] {
|
|
1655
|
-
return [
|
|
1656
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
1657
|
-
GraphQLField("id", type: .nonNull(.scalar(UUID.self))),
|
|
1658
|
-
GraphQLField("status", type: .nonNull(.scalar(OrderStatus.self))),
|
|
1659
|
-
GraphQLField("subtotal", type: .nonNull(.scalar(Decimal.self))),
|
|
1660
|
-
GraphQLField("discount", type: .nonNull(.scalar(Decimal.self))),
|
|
1661
|
-
GraphQLField("tax", type: .nonNull(.scalar(Decimal.self))),
|
|
1662
|
-
GraphQLField("total", type: .nonNull(.scalar(Decimal.self))),
|
|
1663
|
-
GraphQLField("gatewayMeta", type: .scalar(JSON.self)),
|
|
1664
|
-
GraphQLField("currencyCode", type: .nonNull(.scalar(String.self))),
|
|
1665
|
-
GraphQLField("orderItems", type: .nonNull(.list(.nonNull(.object(OrderItem.selections))))),
|
|
1666
|
-
GraphQLField("couponRedemptions", type: .nonNull(.list(.nonNull(.object(CouponRedemption.selections))))),
|
|
1667
|
-
]
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
public private(set) var resultMap: ResultMap
|
|
1671
|
-
|
|
1672
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1673
|
-
self.resultMap = unsafeResultMap
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
public init(id: UUID, status: OrderStatus, subtotal: Decimal, discount: Decimal, tax: Decimal, total: Decimal, gatewayMeta: JSON? = nil, currencyCode: String, orderItems: [OrderItem], couponRedemptions: [CouponRedemption]) {
|
|
1677
|
-
self.init(unsafeResultMap: ["__typename": "Order", "id": id, "status": status, "subtotal": subtotal, "discount": discount, "tax": tax, "total": total, "gatewayMeta": gatewayMeta, "currencyCode": currencyCode, "orderItems": orderItems.map { (value: OrderItem) -> ResultMap in value.resultMap }, "couponRedemptions": couponRedemptions.map { (value: CouponRedemption) -> ResultMap in value.resultMap }])
|
|
1678
|
-
}
|
|
1679
|
-
|
|
1680
|
-
public var __typename: String {
|
|
1681
|
-
get {
|
|
1682
|
-
return resultMap["__typename"]! as! String
|
|
1683
|
-
}
|
|
1684
|
-
set {
|
|
1685
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
1686
|
-
}
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
public var id: UUID {
|
|
1690
|
-
get {
|
|
1691
|
-
return resultMap["id"]! as! UUID
|
|
1692
|
-
}
|
|
1693
|
-
set {
|
|
1694
|
-
resultMap.updateValue(newValue, forKey: "id")
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
public var status: OrderStatus {
|
|
1699
|
-
get {
|
|
1700
|
-
return resultMap["status"]! as! OrderStatus
|
|
1701
|
-
}
|
|
1702
|
-
set {
|
|
1703
|
-
resultMap.updateValue(newValue, forKey: "status")
|
|
1704
|
-
}
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
public var subtotal: Decimal {
|
|
1708
|
-
get {
|
|
1709
|
-
return resultMap["subtotal"]! as! Decimal
|
|
1710
|
-
}
|
|
1711
|
-
set {
|
|
1712
|
-
resultMap.updateValue(newValue, forKey: "subtotal")
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
public var discount: Decimal {
|
|
1717
|
-
get {
|
|
1718
|
-
return resultMap["discount"]! as! Decimal
|
|
1719
|
-
}
|
|
1720
|
-
set {
|
|
1721
|
-
resultMap.updateValue(newValue, forKey: "discount")
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
public var tax: Decimal {
|
|
1726
|
-
get {
|
|
1727
|
-
return resultMap["tax"]! as! Decimal
|
|
1728
|
-
}
|
|
1729
|
-
set {
|
|
1730
|
-
resultMap.updateValue(newValue, forKey: "tax")
|
|
1731
|
-
}
|
|
1732
|
-
}
|
|
1733
|
-
|
|
1734
|
-
public var total: Decimal {
|
|
1735
|
-
get {
|
|
1736
|
-
return resultMap["total"]! as! Decimal
|
|
1737
|
-
}
|
|
1738
|
-
set {
|
|
1739
|
-
resultMap.updateValue(newValue, forKey: "total")
|
|
1740
|
-
}
|
|
1741
|
-
}
|
|
1742
|
-
|
|
1743
|
-
public var gatewayMeta: JSON? {
|
|
1744
|
-
get {
|
|
1745
|
-
return resultMap["gatewayMeta"] as? JSON
|
|
1746
|
-
}
|
|
1747
|
-
set {
|
|
1748
|
-
resultMap.updateValue(newValue, forKey: "gatewayMeta")
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
public var currencyCode: String {
|
|
1753
|
-
get {
|
|
1754
|
-
return resultMap["currencyCode"]! as! String
|
|
1755
|
-
}
|
|
1756
|
-
set {
|
|
1757
|
-
resultMap.updateValue(newValue, forKey: "currencyCode")
|
|
1758
|
-
}
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
public var orderItems: [OrderItem] {
|
|
1762
|
-
get {
|
|
1763
|
-
return (resultMap["orderItems"] as! [ResultMap]).map { (value: ResultMap) -> OrderItem in OrderItem(unsafeResultMap: value) }
|
|
1764
|
-
}
|
|
1765
|
-
set {
|
|
1766
|
-
resultMap.updateValue(newValue.map { (value: OrderItem) -> ResultMap in value.resultMap }, forKey: "orderItems")
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
public var couponRedemptions: [CouponRedemption] {
|
|
1771
|
-
get {
|
|
1772
|
-
return (resultMap["couponRedemptions"] as! [ResultMap]).map { (value: ResultMap) -> CouponRedemption in CouponRedemption(unsafeResultMap: value) }
|
|
1773
|
-
}
|
|
1774
|
-
set {
|
|
1775
|
-
resultMap.updateValue(newValue.map { (value: CouponRedemption) -> ResultMap in value.resultMap }, forKey: "couponRedemptions")
|
|
1776
|
-
}
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
public struct OrderItem: GraphQLSelectionSet {
|
|
1780
|
-
public static let possibleTypes: [String] = ["OrderItem"]
|
|
1781
|
-
|
|
1782
|
-
public static var selections: [GraphQLSelection] {
|
|
1783
|
-
return [
|
|
1784
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
1785
|
-
GraphQLField("id", type: .nonNull(.scalar(UUID.self))),
|
|
1786
|
-
GraphQLField("quantity", type: .nonNull(.scalar(Decimal.self))),
|
|
1787
|
-
GraphQLField("unitPrice", type: .nonNull(.scalar(Decimal.self))),
|
|
1788
|
-
GraphQLField("subtotal", type: .nonNull(.scalar(Decimal.self))),
|
|
1789
|
-
GraphQLField("discount", type: .nonNull(.scalar(Decimal.self))),
|
|
1790
|
-
GraphQLField("tax", type: .nonNull(.scalar(Decimal.self))),
|
|
1791
|
-
GraphQLField("total", type: .nonNull(.scalar(Decimal.self))),
|
|
1792
|
-
GraphQLField("custom", type: .nonNull(.scalar(JSON.self))),
|
|
1793
|
-
GraphQLField("currencyCode", type: .nonNull(.scalar(String.self))),
|
|
1794
|
-
]
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
public private(set) var resultMap: ResultMap
|
|
1798
|
-
|
|
1799
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1800
|
-
self.resultMap = unsafeResultMap
|
|
1801
|
-
}
|
|
1802
|
-
|
|
1803
|
-
public init(id: UUID, quantity: Decimal, unitPrice: Decimal, subtotal: Decimal, discount: Decimal, tax: Decimal, total: Decimal, custom: JSON, currencyCode: String) {
|
|
1804
|
-
self.init(unsafeResultMap: ["__typename": "OrderItem", "id": id, "quantity": quantity, "unitPrice": unitPrice, "subtotal": subtotal, "discount": discount, "tax": tax, "total": total, "custom": custom, "currencyCode": currencyCode])
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
public var __typename: String {
|
|
1808
|
-
get {
|
|
1809
|
-
return resultMap["__typename"]! as! String
|
|
1810
|
-
}
|
|
1811
|
-
set {
|
|
1812
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
public var id: UUID {
|
|
1817
|
-
get {
|
|
1818
|
-
return resultMap["id"]! as! UUID
|
|
1819
|
-
}
|
|
1820
|
-
set {
|
|
1821
|
-
resultMap.updateValue(newValue, forKey: "id")
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
public var quantity: Decimal {
|
|
1826
|
-
get {
|
|
1827
|
-
return resultMap["quantity"]! as! Decimal
|
|
1828
|
-
}
|
|
1829
|
-
set {
|
|
1830
|
-
resultMap.updateValue(newValue, forKey: "quantity")
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
|
-
public var unitPrice: Decimal {
|
|
1835
|
-
get {
|
|
1836
|
-
return resultMap["unitPrice"]! as! Decimal
|
|
1837
|
-
}
|
|
1838
|
-
set {
|
|
1839
|
-
resultMap.updateValue(newValue, forKey: "unitPrice")
|
|
1840
|
-
}
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
public var subtotal: Decimal {
|
|
1844
|
-
get {
|
|
1845
|
-
return resultMap["subtotal"]! as! Decimal
|
|
1846
|
-
}
|
|
1847
|
-
set {
|
|
1848
|
-
resultMap.updateValue(newValue, forKey: "subtotal")
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
public var discount: Decimal {
|
|
1853
|
-
get {
|
|
1854
|
-
return resultMap["discount"]! as! Decimal
|
|
1855
|
-
}
|
|
1856
|
-
set {
|
|
1857
|
-
resultMap.updateValue(newValue, forKey: "discount")
|
|
1858
|
-
}
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
public var tax: Decimal {
|
|
1862
|
-
get {
|
|
1863
|
-
return resultMap["tax"]! as! Decimal
|
|
1864
|
-
}
|
|
1865
|
-
set {
|
|
1866
|
-
resultMap.updateValue(newValue, forKey: "tax")
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
public var total: Decimal {
|
|
1871
|
-
get {
|
|
1872
|
-
return resultMap["total"]! as! Decimal
|
|
1873
|
-
}
|
|
1874
|
-
set {
|
|
1875
|
-
resultMap.updateValue(newValue, forKey: "total")
|
|
1876
|
-
}
|
|
1877
|
-
}
|
|
1878
|
-
|
|
1879
|
-
public var custom: JSON {
|
|
1880
|
-
get {
|
|
1881
|
-
return resultMap["custom"]! as! JSON
|
|
1882
|
-
}
|
|
1883
|
-
set {
|
|
1884
|
-
resultMap.updateValue(newValue, forKey: "custom")
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
public var currencyCode: String {
|
|
1889
|
-
get {
|
|
1890
|
-
return resultMap["currencyCode"]! as! String
|
|
1891
|
-
}
|
|
1892
|
-
set {
|
|
1893
|
-
resultMap.updateValue(newValue, forKey: "currencyCode")
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
public struct CouponRedemption: GraphQLSelectionSet {
|
|
1899
|
-
public static let possibleTypes: [String] = ["CouponRedemption"]
|
|
1900
|
-
|
|
1901
|
-
public static var selections: [GraphQLSelection] {
|
|
1902
|
-
return [
|
|
1903
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
1904
|
-
GraphQLField("coupon", type: .nonNull(.object(Coupon.selections))),
|
|
1905
|
-
]
|
|
1906
|
-
}
|
|
1907
|
-
|
|
1908
|
-
public private(set) var resultMap: ResultMap
|
|
1909
|
-
|
|
1910
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1911
|
-
self.resultMap = unsafeResultMap
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
public init(coupon: Coupon) {
|
|
1915
|
-
self.init(unsafeResultMap: ["__typename": "CouponRedemption", "coupon": coupon.resultMap])
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
public var __typename: String {
|
|
1919
|
-
get {
|
|
1920
|
-
return resultMap["__typename"]! as! String
|
|
1921
|
-
}
|
|
1922
|
-
set {
|
|
1923
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
|
|
1927
|
-
public var coupon: Coupon {
|
|
1928
|
-
get {
|
|
1929
|
-
return Coupon(unsafeResultMap: resultMap["coupon"]! as! ResultMap)
|
|
1930
|
-
}
|
|
1931
|
-
set {
|
|
1932
|
-
resultMap.updateValue(newValue.resultMap, forKey: "coupon")
|
|
1933
|
-
}
|
|
1934
|
-
}
|
|
1935
|
-
|
|
1936
|
-
public struct Coupon: GraphQLSelectionSet {
|
|
1937
|
-
public static let possibleTypes: [String] = ["Coupon"]
|
|
1938
|
-
|
|
1939
|
-
public static var selections: [GraphQLSelection] {
|
|
1940
|
-
return [
|
|
1941
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
1942
|
-
GraphQLField("name", type: .nonNull(.scalar(String.self))),
|
|
1943
|
-
GraphQLField("identifier", type: .nonNull(.scalar(String.self))),
|
|
1944
|
-
GraphQLField("discountType", type: .nonNull(.scalar(CouponDiscountType.self))),
|
|
1945
|
-
GraphQLField("discountAmount", type: .nonNull(.scalar(Decimal.self))),
|
|
1946
|
-
GraphQLField("currencyCode", type: .scalar(String.self)),
|
|
1947
|
-
GraphQLField("expiresAt", type: .scalar(DateTime.self)),
|
|
1948
|
-
]
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
|
-
public private(set) var resultMap: ResultMap
|
|
1952
|
-
|
|
1953
|
-
public init(unsafeResultMap: ResultMap) {
|
|
1954
|
-
self.resultMap = unsafeResultMap
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
public init(name: String, identifier: String, discountType: CouponDiscountType, discountAmount: Decimal, currencyCode: String? = nil, expiresAt: DateTime? = nil) {
|
|
1958
|
-
self.init(unsafeResultMap: ["__typename": "Coupon", "name": name, "identifier": identifier, "discountType": discountType, "discountAmount": discountAmount, "currencyCode": currencyCode, "expiresAt": expiresAt])
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
public var __typename: String {
|
|
1962
|
-
get {
|
|
1963
|
-
return resultMap["__typename"]! as! String
|
|
1964
|
-
}
|
|
1965
|
-
set {
|
|
1966
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
public var name: String {
|
|
1971
|
-
get {
|
|
1972
|
-
return resultMap["name"]! as! String
|
|
1973
|
-
}
|
|
1974
|
-
set {
|
|
1975
|
-
resultMap.updateValue(newValue, forKey: "name")
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
|
|
1979
|
-
public var identifier: String {
|
|
1980
|
-
get {
|
|
1981
|
-
return resultMap["identifier"]! as! String
|
|
1982
|
-
}
|
|
1983
|
-
set {
|
|
1984
|
-
resultMap.updateValue(newValue, forKey: "identifier")
|
|
1985
|
-
}
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
public var discountType: CouponDiscountType {
|
|
1989
|
-
get {
|
|
1990
|
-
return resultMap["discountType"]! as! CouponDiscountType
|
|
1991
|
-
}
|
|
1992
|
-
set {
|
|
1993
|
-
resultMap.updateValue(newValue, forKey: "discountType")
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
public var discountAmount: Decimal {
|
|
1998
|
-
get {
|
|
1999
|
-
return resultMap["discountAmount"]! as! Decimal
|
|
2000
|
-
}
|
|
2001
|
-
set {
|
|
2002
|
-
resultMap.updateValue(newValue, forKey: "discountAmount")
|
|
2003
|
-
}
|
|
2004
|
-
}
|
|
2005
|
-
|
|
2006
|
-
public var currencyCode: String? {
|
|
2007
|
-
get {
|
|
2008
|
-
return resultMap["currencyCode"] as? String
|
|
2009
|
-
}
|
|
2010
|
-
set {
|
|
2011
|
-
resultMap.updateValue(newValue, forKey: "currencyCode")
|
|
2012
|
-
}
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
public var expiresAt: DateTime? {
|
|
2016
|
-
get {
|
|
2017
|
-
return resultMap["expiresAt"] as? DateTime
|
|
2018
|
-
}
|
|
2019
|
-
set {
|
|
2020
|
-
resultMap.updateValue(newValue, forKey: "expiresAt")
|
|
2021
|
-
}
|
|
2022
|
-
}
|
|
2023
|
-
}
|
|
2024
|
-
}
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
public final class FetchContentQuery: GraphQLQuery {
|
|
2030
|
-
/// The raw GraphQL definition of this operation.
|
|
2031
|
-
public let operationDefinition: String =
|
|
2032
|
-
"""
|
|
2033
|
-
query FetchContent($input: FetchContentInput!) {
|
|
2034
|
-
fetchContent(input: $input)
|
|
2035
|
-
}
|
|
2036
|
-
"""
|
|
2037
|
-
|
|
2038
|
-
public let operationName: String = "FetchContent"
|
|
2039
|
-
|
|
2040
|
-
public var input: FetchContentInput
|
|
2041
|
-
|
|
2042
|
-
public init(input: FetchContentInput) {
|
|
2043
|
-
self.input = input
|
|
2044
|
-
}
|
|
2045
|
-
|
|
2046
|
-
public var variables: GraphQLMap? {
|
|
2047
|
-
return ["input": input]
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
|
-
public struct Data: GraphQLSelectionSet {
|
|
2051
|
-
public static let possibleTypes: [String] = ["Query"]
|
|
2052
|
-
|
|
2053
|
-
public static var selections: [GraphQLSelection] {
|
|
2054
|
-
return [
|
|
2055
|
-
GraphQLField("fetchContent", arguments: ["input": GraphQLVariable("input")], type: .nonNull(.scalar(JSON.self))),
|
|
2056
|
-
]
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
public private(set) var resultMap: ResultMap
|
|
2060
|
-
|
|
2061
|
-
public init(unsafeResultMap: ResultMap) {
|
|
2062
|
-
self.resultMap = unsafeResultMap
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
public init(fetchContent: JSON) {
|
|
2066
|
-
self.init(unsafeResultMap: ["__typename": "Query", "fetchContent": fetchContent])
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
public var fetchContent: JSON {
|
|
2070
|
-
get {
|
|
2071
|
-
return resultMap["fetchContent"]! as! JSON
|
|
2072
|
-
}
|
|
2073
|
-
set {
|
|
2074
|
-
resultMap.updateValue(newValue, forKey: "fetchContent")
|
|
2075
|
-
}
|
|
2076
|
-
}
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
public final class IdentifyAccountMutation: GraphQLMutation {
|
|
2081
|
-
/// The raw GraphQL definition of this operation.
|
|
2082
|
-
public let operationDefinition: String =
|
|
2083
|
-
"""
|
|
2084
|
-
mutation IdentifyAccount($input: IdentifyAccountInput!) {
|
|
2085
|
-
identifyAccount(input: $input) {
|
|
2086
|
-
__typename
|
|
2087
|
-
id
|
|
2088
|
-
}
|
|
2089
|
-
}
|
|
2090
|
-
"""
|
|
2091
|
-
|
|
2092
|
-
public let operationName: String = "IdentifyAccount"
|
|
2093
|
-
|
|
2094
|
-
public var input: IdentifyAccountInput
|
|
2095
|
-
|
|
2096
|
-
public init(input: IdentifyAccountInput) {
|
|
2097
|
-
self.input = input
|
|
2098
|
-
}
|
|
2099
|
-
|
|
2100
|
-
public var variables: GraphQLMap? {
|
|
2101
|
-
return ["input": input]
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
public struct Data: GraphQLSelectionSet {
|
|
2105
|
-
public static let possibleTypes: [String] = ["Mutation"]
|
|
2106
|
-
|
|
2107
|
-
public static var selections: [GraphQLSelection] {
|
|
2108
|
-
return [
|
|
2109
|
-
GraphQLField("identifyAccount", arguments: ["input": GraphQLVariable("input")], type: .nonNull(.object(IdentifyAccount.selections))),
|
|
2110
|
-
]
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
public private(set) var resultMap: ResultMap
|
|
2114
|
-
|
|
2115
|
-
public init(unsafeResultMap: ResultMap) {
|
|
2116
|
-
self.resultMap = unsafeResultMap
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
|
-
public init(identifyAccount: IdentifyAccount) {
|
|
2120
|
-
self.init(unsafeResultMap: ["__typename": "Mutation", "identifyAccount": identifyAccount.resultMap])
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
public var identifyAccount: IdentifyAccount {
|
|
2124
|
-
get {
|
|
2125
|
-
return IdentifyAccount(unsafeResultMap: resultMap["identifyAccount"]! as! ResultMap)
|
|
2126
|
-
}
|
|
2127
|
-
set {
|
|
2128
|
-
resultMap.updateValue(newValue.resultMap, forKey: "identifyAccount")
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
public struct IdentifyAccount: GraphQLSelectionSet {
|
|
2133
|
-
public static let possibleTypes: [String] = ["Account"]
|
|
2134
|
-
|
|
2135
|
-
public static var selections: [GraphQLSelection] {
|
|
2136
|
-
return [
|
|
2137
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
2138
|
-
GraphQLField("id", type: .nonNull(.scalar(UUID.self))),
|
|
2139
|
-
]
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
public private(set) var resultMap: ResultMap
|
|
2143
|
-
|
|
2144
|
-
public init(unsafeResultMap: ResultMap) {
|
|
2145
|
-
self.resultMap = unsafeResultMap
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
public init(id: UUID) {
|
|
2149
|
-
self.init(unsafeResultMap: ["__typename": "Account", "id": id])
|
|
2150
|
-
}
|
|
2151
|
-
|
|
2152
|
-
public var __typename: String {
|
|
2153
|
-
get {
|
|
2154
|
-
return resultMap["__typename"]! as! String
|
|
2155
|
-
}
|
|
2156
|
-
set {
|
|
2157
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
2158
|
-
}
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
public var id: UUID {
|
|
2162
|
-
get {
|
|
2163
|
-
return resultMap["id"]! as! UUID
|
|
2164
|
-
}
|
|
2165
|
-
set {
|
|
2166
|
-
resultMap.updateValue(newValue, forKey: "id")
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
}
|
|
2172
|
-
|
|
2173
|
-
public final class SearchContentQuery: GraphQLQuery {
|
|
2174
|
-
/// The raw GraphQL definition of this operation.
|
|
2175
|
-
public let operationDefinition: String =
|
|
2176
|
-
"""
|
|
2177
|
-
query SearchContent($input: SearchContentInput!) {
|
|
2178
|
-
searchContent(input: $input)
|
|
2179
|
-
}
|
|
2180
|
-
"""
|
|
2181
|
-
|
|
2182
|
-
public let operationName: String = "SearchContent"
|
|
2183
|
-
|
|
2184
|
-
public var input: SearchContentInput
|
|
2185
|
-
|
|
2186
|
-
public init(input: SearchContentInput) {
|
|
2187
|
-
self.input = input
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
|
-
public var variables: GraphQLMap? {
|
|
2191
|
-
return ["input": input]
|
|
2192
|
-
}
|
|
2193
|
-
|
|
2194
|
-
public struct Data: GraphQLSelectionSet {
|
|
2195
|
-
public static let possibleTypes: [String] = ["Query"]
|
|
2196
|
-
|
|
2197
|
-
public static var selections: [GraphQLSelection] {
|
|
2198
|
-
return [
|
|
2199
|
-
GraphQLField("searchContent", arguments: ["input": GraphQLVariable("input")], type: .nonNull(.list(.nonNull(.scalar(JSON.self))))),
|
|
2200
|
-
]
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
public private(set) var resultMap: ResultMap
|
|
2204
|
-
|
|
2205
|
-
public init(unsafeResultMap: ResultMap) {
|
|
2206
|
-
self.resultMap = unsafeResultMap
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2209
|
-
public init(searchContent: [JSON]) {
|
|
2210
|
-
self.init(unsafeResultMap: ["__typename": "Query", "searchContent": searchContent])
|
|
2211
|
-
}
|
|
2212
|
-
|
|
2213
|
-
public var searchContent: [JSON] {
|
|
2214
|
-
get {
|
|
2215
|
-
return resultMap["searchContent"]! as! [JSON]
|
|
2216
|
-
}
|
|
2217
|
-
set {
|
|
2218
|
-
resultMap.updateValue(newValue, forKey: "searchContent")
|
|
2219
|
-
}
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
public final class SubscribeContactMutation: GraphQLMutation {
|
|
2225
|
-
/// The raw GraphQL definition of this operation.
|
|
2226
|
-
public let operationDefinition: String =
|
|
2227
|
-
"""
|
|
2228
|
-
mutation SubscribeContact($input: SubscribeContactInput!) {
|
|
2229
|
-
subscribeContact(input: $input) {
|
|
2230
|
-
__typename
|
|
2231
|
-
id
|
|
2232
|
-
value
|
|
2233
|
-
}
|
|
2234
|
-
}
|
|
2235
|
-
"""
|
|
2236
|
-
|
|
2237
|
-
public let operationName: String = "SubscribeContact"
|
|
2238
|
-
|
|
2239
|
-
public var input: SubscribeContactInput
|
|
2240
|
-
|
|
2241
|
-
public init(input: SubscribeContactInput) {
|
|
2242
|
-
self.input = input
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
public var variables: GraphQLMap? {
|
|
2246
|
-
return ["input": input]
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
public struct Data: GraphQLSelectionSet {
|
|
2250
|
-
public static let possibleTypes: [String] = ["Mutation"]
|
|
2251
|
-
|
|
2252
|
-
public static var selections: [GraphQLSelection] {
|
|
2253
|
-
return [
|
|
2254
|
-
GraphQLField("subscribeContact", arguments: ["input": GraphQLVariable("input")], type: .nonNull(.object(SubscribeContact.selections))),
|
|
2255
|
-
]
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
|
-
public private(set) var resultMap: ResultMap
|
|
2259
|
-
|
|
2260
|
-
public init(unsafeResultMap: ResultMap) {
|
|
2261
|
-
self.resultMap = unsafeResultMap
|
|
2262
|
-
}
|
|
2263
|
-
|
|
2264
|
-
public init(subscribeContact: SubscribeContact) {
|
|
2265
|
-
self.init(unsafeResultMap: ["__typename": "Mutation", "subscribeContact": subscribeContact.resultMap])
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
|
-
public var subscribeContact: SubscribeContact {
|
|
2269
|
-
get {
|
|
2270
|
-
return SubscribeContact(unsafeResultMap: resultMap["subscribeContact"]! as! ResultMap)
|
|
2271
|
-
}
|
|
2272
|
-
set {
|
|
2273
|
-
resultMap.updateValue(newValue.resultMap, forKey: "subscribeContact")
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
public struct SubscribeContact: GraphQLSelectionSet {
|
|
2278
|
-
public static let possibleTypes: [String] = ["Contact"]
|
|
2279
|
-
|
|
2280
|
-
public static var selections: [GraphQLSelection] {
|
|
2281
|
-
return [
|
|
2282
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
2283
|
-
GraphQLField("id", type: .nonNull(.scalar(UUID.self))),
|
|
2284
|
-
GraphQLField("value", type: .nonNull(.scalar(String.self))),
|
|
2285
|
-
]
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2288
|
-
public private(set) var resultMap: ResultMap
|
|
2289
|
-
|
|
2290
|
-
public init(unsafeResultMap: ResultMap) {
|
|
2291
|
-
self.resultMap = unsafeResultMap
|
|
2292
|
-
}
|
|
2293
|
-
|
|
2294
|
-
public init(id: UUID, value: String) {
|
|
2295
|
-
self.init(unsafeResultMap: ["__typename": "Contact", "id": id, "value": value])
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
|
-
public var __typename: String {
|
|
2299
|
-
get {
|
|
2300
|
-
return resultMap["__typename"]! as! String
|
|
2301
|
-
}
|
|
2302
|
-
set {
|
|
2303
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
|
|
2307
|
-
public var id: UUID {
|
|
2308
|
-
get {
|
|
2309
|
-
return resultMap["id"]! as! UUID
|
|
2310
|
-
}
|
|
2311
|
-
set {
|
|
2312
|
-
resultMap.updateValue(newValue, forKey: "id")
|
|
2313
|
-
}
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
public var value: String {
|
|
2317
|
-
get {
|
|
2318
|
-
return resultMap["value"]! as! String
|
|
2319
|
-
}
|
|
2320
|
-
set {
|
|
2321
|
-
resultMap.updateValue(newValue, forKey: "value")
|
|
2322
|
-
}
|
|
2323
|
-
}
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
|
|
2328
|
-
public final class TrackEventMutation: GraphQLMutation {
|
|
2329
|
-
/// The raw GraphQL definition of this operation.
|
|
2330
|
-
public let operationDefinition: String =
|
|
2331
|
-
"""
|
|
2332
|
-
mutation TrackEvent($input: TrackEventInput!) {
|
|
2333
|
-
trackEvent(input: $input) {
|
|
2334
|
-
__typename
|
|
2335
|
-
success
|
|
2336
|
-
}
|
|
2337
|
-
}
|
|
2338
|
-
"""
|
|
2339
|
-
|
|
2340
|
-
public let operationName: String = "TrackEvent"
|
|
2341
|
-
|
|
2342
|
-
public var input: TrackEventInput
|
|
2343
|
-
|
|
2344
|
-
public init(input: TrackEventInput) {
|
|
2345
|
-
self.input = input
|
|
2346
|
-
}
|
|
2347
|
-
|
|
2348
|
-
public var variables: GraphQLMap? {
|
|
2349
|
-
return ["input": input]
|
|
2350
|
-
}
|
|
2351
|
-
|
|
2352
|
-
public struct Data: GraphQLSelectionSet {
|
|
2353
|
-
public static let possibleTypes: [String] = ["Mutation"]
|
|
2354
|
-
|
|
2355
|
-
public static var selections: [GraphQLSelection] {
|
|
2356
|
-
return [
|
|
2357
|
-
GraphQLField("trackEvent", arguments: ["input": GraphQLVariable("input")], type: .nonNull(.object(TrackEvent.selections))),
|
|
2358
|
-
]
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
public private(set) var resultMap: ResultMap
|
|
2362
|
-
|
|
2363
|
-
public init(unsafeResultMap: ResultMap) {
|
|
2364
|
-
self.resultMap = unsafeResultMap
|
|
2365
|
-
}
|
|
2366
|
-
|
|
2367
|
-
public init(trackEvent: TrackEvent) {
|
|
2368
|
-
self.init(unsafeResultMap: ["__typename": "Mutation", "trackEvent": trackEvent.resultMap])
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
public var trackEvent: TrackEvent {
|
|
2372
|
-
get {
|
|
2373
|
-
return TrackEvent(unsafeResultMap: resultMap["trackEvent"]! as! ResultMap)
|
|
2374
|
-
}
|
|
2375
|
-
set {
|
|
2376
|
-
resultMap.updateValue(newValue.resultMap, forKey: "trackEvent")
|
|
2377
|
-
}
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
public struct TrackEvent: GraphQLSelectionSet {
|
|
2381
|
-
public static let possibleTypes: [String] = ["TrackEventResponse"]
|
|
2382
|
-
|
|
2383
|
-
public static var selections: [GraphQLSelection] {
|
|
2384
|
-
return [
|
|
2385
|
-
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
|
|
2386
|
-
GraphQLField("success", type: .nonNull(.scalar(Bool.self))),
|
|
2387
|
-
]
|
|
2388
|
-
}
|
|
2389
|
-
|
|
2390
|
-
public private(set) var resultMap: ResultMap
|
|
2391
|
-
|
|
2392
|
-
public init(unsafeResultMap: ResultMap) {
|
|
2393
|
-
self.resultMap = unsafeResultMap
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
public init(success: Bool) {
|
|
2397
|
-
self.init(unsafeResultMap: ["__typename": "TrackEventResponse", "success": success])
|
|
2398
|
-
}
|
|
2399
|
-
|
|
2400
|
-
public var __typename: String {
|
|
2401
|
-
get {
|
|
2402
|
-
return resultMap["__typename"]! as! String
|
|
2403
|
-
}
|
|
2404
|
-
set {
|
|
2405
|
-
resultMap.updateValue(newValue, forKey: "__typename")
|
|
2406
|
-
}
|
|
2407
|
-
}
|
|
2408
|
-
|
|
2409
|
-
public var success: Bool {
|
|
2410
|
-
get {
|
|
2411
|
-
return resultMap["success"]! as! Bool
|
|
2412
|
-
}
|
|
2413
|
-
set {
|
|
2414
|
-
resultMap.updateValue(newValue, forKey: "success")
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
}
|
|
2419
|
-
}
|
|
2420
|
-
}
|