@@ -578,6 +578,150 @@ public enum GraphAPI {
578
578
}
579
579
}
580
580
581
+ /// Autogenerated input type of TriggerCapiEvent
582
+ public struct TriggerCapiEventInput : GraphQLMapConvertible {
583
+ public var graphQLMap : GraphQLMap
584
+
585
+ /// - Parameters:
586
+ /// - projectId
587
+ /// - eventName
588
+ /// - externalId
589
+ /// - userEmail
590
+ /// - appData
591
+ /// - customData
592
+ /// - waitForConsent
593
+ /// - clientMutationId: A unique identifier for the client performing the mutation.
594
+ public init ( projectId: GraphQLID , eventName: String , externalId: String , userEmail: Swift . Optional < String ? > = nil , appData: Swift . Optional < AppDataInput ? > = nil , customData: Swift . Optional < CustomDataInput ? > = nil , waitForConsent: Swift . Optional < Bool ? > = nil , clientMutationId: Swift . Optional < String ? > = nil ) {
595
+ graphQLMap = [ " projectId " : projectId, " eventName " : eventName, " externalId " : externalId, " userEmail " : userEmail, " appData " : appData, " customData " : customData, " waitForConsent " : waitForConsent, " clientMutationId " : clientMutationId]
596
+ }
597
+
598
+ public var projectId : GraphQLID {
599
+ get {
600
+ return graphQLMap [ " projectId " ] as! GraphQLID
601
+ }
602
+ set {
603
+ graphQLMap. updateValue ( newValue, forKey: " projectId " )
604
+ }
605
+ }
606
+
607
+ public var eventName : String {
608
+ get {
609
+ return graphQLMap [ " eventName " ] as! String
610
+ }
611
+ set {
612
+ graphQLMap. updateValue ( newValue, forKey: " eventName " )
613
+ }
614
+ }
615
+
616
+ public var externalId : String {
617
+ get {
618
+ return graphQLMap [ " externalId " ] as! String
619
+ }
620
+ set {
621
+ graphQLMap. updateValue ( newValue, forKey: " externalId " )
622
+ }
623
+ }
624
+
625
+ public var userEmail : Swift . Optional < String ? > {
626
+ get {
627
+ return graphQLMap [ " userEmail " ] as? Swift . Optional < String ? > ?? Swift . Optional< String?> . none
628
+ }
629
+ set {
630
+ graphQLMap. updateValue ( newValue, forKey: " userEmail " )
631
+ }
632
+ }
633
+
634
+ public var appData : Swift . Optional < AppDataInput ? > {
635
+ get {
636
+ return graphQLMap [ " appData " ] as? Swift . Optional < AppDataInput ? > ?? Swift . Optional< AppDataInput?> . none
637
+ }
638
+ set {
639
+ graphQLMap. updateValue ( newValue, forKey: " appData " )
640
+ }
641
+ }
642
+
643
+ public var customData : Swift . Optional < CustomDataInput ? > {
644
+ get {
645
+ return graphQLMap [ " customData " ] as? Swift . Optional < CustomDataInput ? > ?? Swift . Optional< CustomDataInput?> . none
646
+ }
647
+ set {
648
+ graphQLMap. updateValue ( newValue, forKey: " customData " )
649
+ }
650
+ }
651
+
652
+ public var waitForConsent : Swift . Optional < Bool ? > {
653
+ get {
654
+ return graphQLMap [ " waitForConsent " ] as? Swift . Optional < Bool ? > ?? Swift . Optional< Bool?> . none
655
+ }
656
+ set {
657
+ graphQLMap. updateValue ( newValue, forKey: " waitForConsent " )
658
+ }
659
+ }
660
+
661
+ /// A unique identifier for the client performing the mutation.
662
+ public var clientMutationId : Swift . Optional < String ? > {
663
+ get {
664
+ return graphQLMap [ " clientMutationId " ] as? Swift . Optional < String ? > ?? Swift . Optional< String?> . none
665
+ }
666
+ set {
667
+ graphQLMap. updateValue ( newValue, forKey: " clientMutationId " )
668
+ }
669
+ }
670
+ }
671
+
672
+ /// Parameters for sharing app data and device information with the Conversions API
673
+ public struct AppDataInput : GraphQLMapConvertible {
674
+ public var graphQLMap : GraphQLMap
675
+
676
+ /// - Parameters:
677
+ /// - extinfo: Extended device information, such as screen width and height. Required only for native.
678
+ public init ( extinfo: [ String ] ) {
679
+ graphQLMap = [ " extinfo " : extinfo]
680
+ }
681
+
682
+ /// Extended device information, such as screen width and height. Required only for native.
683
+ public var extinfo : [ String ] {
684
+ get {
685
+ return graphQLMap [ " extinfo " ] as! [ String ]
686
+ }
687
+ set {
688
+ graphQLMap. updateValue ( newValue, forKey: " extinfo " )
689
+ }
690
+ }
691
+ }
692
+
693
+ /// A map that includes additional business data about the CAPI event.
694
+ public struct CustomDataInput : GraphQLMapConvertible {
695
+ public var graphQLMap : GraphQLMap
696
+
697
+ /// - Parameters:
698
+ /// - currency: The currency for the value specified, if applicable. Currency must be a valid ISO 4217 three-digit currency code.
699
+ /// - value: A numeric value associated with this event. This could be a monetary value or a value in some other metric.
700
+ public init ( currency: Swift . Optional < String ? > = nil , value: Swift . Optional < String ? > = nil ) {
701
+ graphQLMap = [ " currency " : currency, " value " : value]
702
+ }
703
+
704
+ /// The currency for the value specified, if applicable. Currency must be a valid ISO 4217 three-digit currency code.
705
+ public var currency : Swift . Optional < String ? > {
706
+ get {
707
+ return graphQLMap [ " currency " ] as? Swift . Optional < String ? > ?? Swift . Optional< String?> . none
708
+ }
709
+ set {
710
+ graphQLMap. updateValue ( newValue, forKey: " currency " )
711
+ }
712
+ }
713
+
714
+ /// A numeric value associated with this event. This could be a monetary value or a value in some other metric.
715
+ public var value : Swift . Optional < String ? > {
716
+ get {
717
+ return graphQLMap [ " value " ] as? Swift . Optional < String ? > ?? Swift . Optional< String?> . none
718
+ }
719
+ set {
720
+ graphQLMap. updateValue ( newValue, forKey: " value " )
721
+ }
722
+ }
723
+ }
724
+
581
725
/// Autogenerated input type of UnwatchProject
582
726
public struct UnwatchProjectInput : GraphQLMapConvertible {
583
727
public var graphQLMap : GraphQLMap
@@ -4190,6 +4334,100 @@ public enum GraphAPI {
4190
4334
}
4191
4335
}
4192
4336
4337
+ public final class TriggerCapiEventMutation : GraphQLMutation {
4338
+ /// The raw GraphQL definition of this operation.
4339
+ public let operationDefinition : String =
4340
+ """
4341
+ mutation triggerCAPIEvent($input: TriggerCapiEventInput!) {
4342
+ triggerCAPIEvent(input: $input) {
4343
+ __typename
4344
+ success
4345
+ }
4346
+ }
4347
+ """
4348
+
4349
+ public let operationName : String = " triggerCAPIEvent "
4350
+
4351
+ public var input : TriggerCapiEventInput
4352
+
4353
+ public init ( input: TriggerCapiEventInput ) {
4354
+ self . input = input
4355
+ }
4356
+
4357
+ public var variables : GraphQLMap ? {
4358
+ return [ " input " : input]
4359
+ }
4360
+
4361
+ public struct Data : GraphQLSelectionSet {
4362
+ public static let possibleTypes : [ String ] = [ " Mutation " ]
4363
+
4364
+ public static var selections : [ GraphQLSelection ] {
4365
+ return [
4366
+ GraphQLField ( " triggerCAPIEvent " , arguments: [ " input " : GraphQLVariable ( " input " ) ] , type: . object( TriggerCapiEvent . selections) ) ,
4367
+ ]
4368
+ }
4369
+
4370
+ public private( set) var resultMap : ResultMap
4371
+
4372
+ public init ( unsafeResultMap: ResultMap ) {
4373
+ self . resultMap = unsafeResultMap
4374
+ }
4375
+
4376
+ public init ( triggerCapiEvent: TriggerCapiEvent ? = nil ) {
4377
+ self . init ( unsafeResultMap: [ " __typename " : " Mutation " , " triggerCAPIEvent " : triggerCapiEvent. flatMap { ( value: TriggerCapiEvent ) -> ResultMap in value. resultMap } ] )
4378
+ }
4379
+
4380
+ /// Triggers Meta's CAPI event for native
4381
+ public var triggerCapiEvent : TriggerCapiEvent ? {
4382
+ get {
4383
+ return ( resultMap [ " triggerCAPIEvent " ] as? ResultMap ) . flatMap { TriggerCapiEvent ( unsafeResultMap: $0) }
4384
+ }
4385
+ set {
4386
+ resultMap. updateValue ( newValue? . resultMap, forKey: " triggerCAPIEvent " )
4387
+ }
4388
+ }
4389
+
4390
+ public struct TriggerCapiEvent : GraphQLSelectionSet {
4391
+ public static let possibleTypes : [ String ] = [ " TriggerCapiEventPayload " ]
4392
+
4393
+ public static var selections : [ GraphQLSelection ] {
4394
+ return [
4395
+ GraphQLField ( " __typename " , type: . nonNull( . scalar( String . self) ) ) ,
4396
+ GraphQLField ( " success " , type: . nonNull( . scalar( Bool . self) ) ) ,
4397
+ ]
4398
+ }
4399
+
4400
+ public private( set) var resultMap : ResultMap
4401
+
4402
+ public init ( unsafeResultMap: ResultMap ) {
4403
+ self . resultMap = unsafeResultMap
4404
+ }
4405
+
4406
+ public init ( success: Bool ) {
4407
+ self . init ( unsafeResultMap: [ " __typename " : " TriggerCapiEventPayload " , " success " : success] )
4408
+ }
4409
+
4410
+ public var __typename : String {
4411
+ get {
4412
+ return resultMap [ " __typename " ] ! as! String
4413
+ }
4414
+ set {
4415
+ resultMap. updateValue ( newValue, forKey: " __typename " )
4416
+ }
4417
+ }
4418
+
4419
+ public var success : Bool {
4420
+ get {
4421
+ return resultMap [ " success " ] ! as! Bool
4422
+ }
4423
+ set {
4424
+ resultMap. updateValue ( newValue, forKey: " success " )
4425
+ }
4426
+ }
4427
+ }
4428
+ }
4429
+ }
4430
+
4193
4431
public final class UnwatchProjectMutation : GraphQLMutation {
4194
4432
/// The raw GraphQL definition of this operation.
4195
4433
public let operationDefinition : String =
0 commit comments