moderation_api 2.20.0 → 2.22.0

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.
@@ -15,6 +15,8 @@ module ModerationAPI
15
15
  ),
16
16
  author_id: String,
17
17
  channel: String,
18
+ client_action:
19
+ ModerationAPI::ContentSubmitParams::ClientAction::OrHash,
18
20
  content_id: String,
19
21
  conversation_id: String,
20
22
  do_not_store: T::Boolean,
@@ -66,6 +68,10 @@ module ModerationAPI
66
68
  # Provide a channel ID or key. Will use the project's default channel if not
67
69
  # provided.
68
70
  channel: nil,
71
+ # A recommendation from your own client-side flagging (e.g. a banned-IP list or a
72
+ # third-party tool). Feeds the rules engine and can escalate or override the
73
+ # recommended action. Does not change whether our analysis flagged the content.
74
+ client_action: nil,
69
75
  # The unique ID of the content in your database.
70
76
  content_id: nil,
71
77
  # For example the ID of a chat room or a post
@@ -5,6 +5,7 @@ module ModerationAPI
5
5
  content: ModerationAPI::Models::ContentSubmitParams::content,
6
6
  author_id: String,
7
7
  channel: String,
8
+ client_action: ModerationAPI::ContentSubmitParams::ClientAction,
8
9
  content_id: String,
9
10
  conversation_id: String,
10
11
  do_not_store: bool,
@@ -29,6 +30,12 @@ module ModerationAPI
29
30
 
30
31
  def channel=: (String) -> String
31
32
 
33
+ attr_reader client_action: ModerationAPI::ContentSubmitParams::ClientAction?
34
+
35
+ def client_action=: (
36
+ ModerationAPI::ContentSubmitParams::ClientAction
37
+ ) -> ModerationAPI::ContentSubmitParams::ClientAction
38
+
32
39
  attr_reader content_id: String?
33
40
 
34
41
  def content_id=: (String) -> String
@@ -65,6 +72,7 @@ module ModerationAPI
65
72
  content: ModerationAPI::Models::ContentSubmitParams::content,
66
73
  ?author_id: String,
67
74
  ?channel: String,
75
+ ?client_action: ModerationAPI::ContentSubmitParams::ClientAction,
68
76
  ?content_id: String,
69
77
  ?conversation_id: String,
70
78
  ?do_not_store: bool,
@@ -79,6 +87,7 @@ module ModerationAPI
79
87
  content: ModerationAPI::Models::ContentSubmitParams::content,
80
88
  author_id: String,
81
89
  channel: String,
90
+ client_action: ModerationAPI::ContentSubmitParams::ClientAction,
82
91
  content_id: String,
83
92
  conversation_id: String,
84
93
  do_not_store: bool,
@@ -248,6 +257,69 @@ module ModerationAPI
248
257
  def self?.variants: -> ::Array[ModerationAPI::Models::ContentSubmitParams::content]
249
258
  end
250
259
 
260
+ type client_action =
261
+ {
262
+ action: ModerationAPI::Models::ContentSubmitParams::ClientAction::action,
263
+ behavior: ModerationAPI::Models::ContentSubmitParams::ClientAction::behavior,
264
+ reason: String,
265
+ source: String
266
+ }
267
+
268
+ class ClientAction < ModerationAPI::Internal::Type::BaseModel
269
+ attr_accessor action: ModerationAPI::Models::ContentSubmitParams::ClientAction::action
270
+
271
+ attr_reader behavior: ModerationAPI::Models::ContentSubmitParams::ClientAction::behavior?
272
+
273
+ def behavior=: (
274
+ ModerationAPI::Models::ContentSubmitParams::ClientAction::behavior
275
+ ) -> ModerationAPI::Models::ContentSubmitParams::ClientAction::behavior
276
+
277
+ attr_reader reason: String?
278
+
279
+ def reason=: (String) -> String
280
+
281
+ attr_reader source: String?
282
+
283
+ def source=: (String) -> String
284
+
285
+ def initialize: (
286
+ action: ModerationAPI::Models::ContentSubmitParams::ClientAction::action,
287
+ ?behavior: ModerationAPI::Models::ContentSubmitParams::ClientAction::behavior,
288
+ ?reason: String,
289
+ ?source: String
290
+ ) -> void
291
+
292
+ def to_hash: -> {
293
+ action: ModerationAPI::Models::ContentSubmitParams::ClientAction::action,
294
+ behavior: ModerationAPI::Models::ContentSubmitParams::ClientAction::behavior,
295
+ reason: String,
296
+ source: String
297
+ }
298
+
299
+ type action = :review | :allow | :reject
300
+
301
+ module Action
302
+ extend ModerationAPI::Internal::Type::Enum
303
+
304
+ REVIEW: :review
305
+ ALLOW: :allow
306
+ REJECT: :reject
307
+
308
+ def self?.values: -> ::Array[ModerationAPI::Models::ContentSubmitParams::ClientAction::action]
309
+ end
310
+
311
+ type behavior = :override | :escalate
312
+
313
+ module Behavior
314
+ extend ModerationAPI::Internal::Type::Enum
315
+
316
+ OVERRIDE: :override
317
+ ESCALATE: :escalate
318
+
319
+ def self?.values: -> ::Array[ModerationAPI::Models::ContentSubmitParams::ClientAction::behavior]
320
+ end
321
+ end
322
+
251
323
  type meta_type =
252
324
  :profile
253
325
  | :message
@@ -736,6 +736,7 @@ module ModerationAPI
736
736
  | :rule_match
737
737
  | :rule_default
738
738
  | :rule_fallback
739
+ | :client_override
739
740
 
740
741
  module ReasonCode
741
742
  extend ModerationAPI::Internal::Type::Enum
@@ -749,6 +750,7 @@ module ModerationAPI
749
750
  RULE_MATCH: :rule_match
750
751
  RULE_DEFAULT: :rule_default
751
752
  RULE_FALLBACK: :rule_fallback
753
+ CLIENT_OVERRIDE: :client_override
752
754
 
753
755
  def self?.values: -> ::Array[ModerationAPI::Models::ContentSubmitResponse::Recommendation::reason_code]
754
756
  end
@@ -1846,9 +1846,11 @@ module ModerationAPI
1846
1846
  id: String,
1847
1847
  author_id: String?,
1848
1848
  channel_key: String?,
1849
+ client_action: ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction?,
1849
1850
  content: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::content,
1850
1851
  conversation_id: String?,
1851
1852
  flagged: bool?,
1853
+ flagged_fields: ::Array[String],
1852
1854
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Label]?,
1853
1855
  language: String?,
1854
1856
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::meta_type?,
@@ -1863,12 +1865,16 @@ module ModerationAPI
1863
1865
 
1864
1866
  attr_accessor channel_key: String?
1865
1867
 
1868
+ attr_accessor client_action: ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction?
1869
+
1866
1870
  attr_accessor content: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::content
1867
1871
 
1868
1872
  attr_accessor conversation_id: String?
1869
1873
 
1870
1874
  attr_accessor flagged: bool?
1871
1875
 
1876
+ attr_accessor flagged_fields: ::Array[String]
1877
+
1872
1878
  attr_accessor labels: ::Array[ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Label]?
1873
1879
 
1874
1880
  attr_accessor language: String?
@@ -1883,9 +1889,11 @@ module ModerationAPI
1883
1889
  id: String,
1884
1890
  author_id: String?,
1885
1891
  channel_key: String?,
1892
+ client_action: ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction?,
1886
1893
  content: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::content,
1887
1894
  conversation_id: String?,
1888
1895
  flagged: bool?,
1896
+ flagged_fields: ::Array[String],
1889
1897
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Label]?,
1890
1898
  language: String?,
1891
1899
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::meta_type?,
@@ -1897,9 +1905,11 @@ module ModerationAPI
1897
1905
  id: String,
1898
1906
  author_id: String?,
1899
1907
  channel_key: String?,
1908
+ client_action: ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction?,
1900
1909
  content: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::content,
1901
1910
  conversation_id: String?,
1902
1911
  flagged: bool?,
1912
+ flagged_fields: ::Array[String],
1903
1913
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Label]?,
1904
1914
  language: String?,
1905
1915
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::meta_type?,
@@ -1907,6 +1917,69 @@ module ModerationAPI
1907
1917
  timestamp: Time
1908
1918
  }
1909
1919
 
1920
+ type client_action =
1921
+ {
1922
+ action: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::action,
1923
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior,
1924
+ reason: String,
1925
+ source: String
1926
+ }
1927
+
1928
+ class ClientAction < ModerationAPI::Internal::Type::BaseModel
1929
+ attr_accessor action: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::action
1930
+
1931
+ attr_reader behavior: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior?
1932
+
1933
+ def behavior=: (
1934
+ ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior
1935
+ ) -> ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior
1936
+
1937
+ attr_reader reason: String?
1938
+
1939
+ def reason=: (String) -> String
1940
+
1941
+ attr_reader source: String?
1942
+
1943
+ def source=: (String) -> String
1944
+
1945
+ def initialize: (
1946
+ action: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::action,
1947
+ ?behavior: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior,
1948
+ ?reason: String,
1949
+ ?source: String
1950
+ ) -> void
1951
+
1952
+ def to_hash: -> {
1953
+ action: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::action,
1954
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior,
1955
+ reason: String,
1956
+ source: String
1957
+ }
1958
+
1959
+ type action = :review | :allow | :reject
1960
+
1961
+ module Action
1962
+ extend ModerationAPI::Internal::Type::Enum
1963
+
1964
+ REVIEW: :review
1965
+ ALLOW: :allow
1966
+ REJECT: :reject
1967
+
1968
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::action]
1969
+ end
1970
+
1971
+ type behavior = :override | :escalate
1972
+
1973
+ module Behavior
1974
+ extend ModerationAPI::Internal::Type::Enum
1975
+
1976
+ OVERRIDE: :override
1977
+ ESCALATE: :escalate
1978
+
1979
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior]
1980
+ end
1981
+ end
1982
+
1910
1983
  type content =
1911
1984
  ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Content::Text
1912
1985
  | ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Content::Image
@@ -2795,9 +2868,11 @@ module ModerationAPI
2795
2868
  id: String,
2796
2869
  author_id: String?,
2797
2870
  channel_key: String?,
2871
+ client_action: ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction?,
2798
2872
  content: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::content,
2799
2873
  conversation_id: String?,
2800
2874
  flagged: bool?,
2875
+ flagged_fields: ::Array[String],
2801
2876
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::Label]?,
2802
2877
  language: String?,
2803
2878
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::meta_type?,
@@ -2812,12 +2887,16 @@ module ModerationAPI
2812
2887
 
2813
2888
  attr_accessor channel_key: String?
2814
2889
 
2890
+ attr_accessor client_action: ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction?
2891
+
2815
2892
  attr_accessor content: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::content
2816
2893
 
2817
2894
  attr_accessor conversation_id: String?
2818
2895
 
2819
2896
  attr_accessor flagged: bool?
2820
2897
 
2898
+ attr_accessor flagged_fields: ::Array[String]
2899
+
2821
2900
  attr_accessor labels: ::Array[ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::Label]?
2822
2901
 
2823
2902
  attr_accessor language: String?
@@ -2832,9 +2911,11 @@ module ModerationAPI
2832
2911
  id: String,
2833
2912
  author_id: String?,
2834
2913
  channel_key: String?,
2914
+ client_action: ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction?,
2835
2915
  content: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::content,
2836
2916
  conversation_id: String?,
2837
2917
  flagged: bool?,
2918
+ flagged_fields: ::Array[String],
2838
2919
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::Label]?,
2839
2920
  language: String?,
2840
2921
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::meta_type?,
@@ -2846,9 +2927,11 @@ module ModerationAPI
2846
2927
  id: String,
2847
2928
  author_id: String?,
2848
2929
  channel_key: String?,
2930
+ client_action: ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction?,
2849
2931
  content: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::content,
2850
2932
  conversation_id: String?,
2851
2933
  flagged: bool?,
2934
+ flagged_fields: ::Array[String],
2852
2935
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::Label]?,
2853
2936
  language: String?,
2854
2937
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::meta_type?,
@@ -2856,6 +2939,69 @@ module ModerationAPI
2856
2939
  timestamp: Time
2857
2940
  }
2858
2941
 
2942
+ type client_action =
2943
+ {
2944
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::action,
2945
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior,
2946
+ reason: String,
2947
+ source: String
2948
+ }
2949
+
2950
+ class ClientAction < ModerationAPI::Internal::Type::BaseModel
2951
+ attr_accessor action: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::action
2952
+
2953
+ attr_reader behavior: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior?
2954
+
2955
+ def behavior=: (
2956
+ ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior
2957
+ ) -> ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior
2958
+
2959
+ attr_reader reason: String?
2960
+
2961
+ def reason=: (String) -> String
2962
+
2963
+ attr_reader source: String?
2964
+
2965
+ def source=: (String) -> String
2966
+
2967
+ def initialize: (
2968
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::action,
2969
+ ?behavior: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior,
2970
+ ?reason: String,
2971
+ ?source: String
2972
+ ) -> void
2973
+
2974
+ def to_hash: -> {
2975
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::action,
2976
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior,
2977
+ reason: String,
2978
+ source: String
2979
+ }
2980
+
2981
+ type action = :review | :allow | :reject
2982
+
2983
+ module Action
2984
+ extend ModerationAPI::Internal::Type::Enum
2985
+
2986
+ REVIEW: :review
2987
+ ALLOW: :allow
2988
+ REJECT: :reject
2989
+
2990
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::action]
2991
+ end
2992
+
2993
+ type behavior = :override | :escalate
2994
+
2995
+ module Behavior
2996
+ extend ModerationAPI::Internal::Type::Enum
2997
+
2998
+ OVERRIDE: :override
2999
+ ESCALATE: :escalate
3000
+
3001
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior]
3002
+ end
3003
+ end
3004
+
2859
3005
  type content =
2860
3006
  ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::Content::Text
2861
3007
  | ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::Content::Image
@@ -3549,9 +3695,11 @@ module ModerationAPI
3549
3695
  id: String,
3550
3696
  author_id: String?,
3551
3697
  channel_key: String?,
3698
+ client_action: ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction?,
3552
3699
  content: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::content,
3553
3700
  conversation_id: String?,
3554
3701
  flagged: bool?,
3702
+ flagged_fields: ::Array[String],
3555
3703
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Label]?,
3556
3704
  language: String?,
3557
3705
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::meta_type?,
@@ -3566,12 +3714,16 @@ module ModerationAPI
3566
3714
 
3567
3715
  attr_accessor channel_key: String?
3568
3716
 
3717
+ attr_accessor client_action: ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction?
3718
+
3569
3719
  attr_accessor content: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::content
3570
3720
 
3571
3721
  attr_accessor conversation_id: String?
3572
3722
 
3573
3723
  attr_accessor flagged: bool?
3574
3724
 
3725
+ attr_accessor flagged_fields: ::Array[String]
3726
+
3575
3727
  attr_accessor labels: ::Array[ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Label]?
3576
3728
 
3577
3729
  attr_accessor language: String?
@@ -3586,9 +3738,11 @@ module ModerationAPI
3586
3738
  id: String,
3587
3739
  author_id: String?,
3588
3740
  channel_key: String?,
3741
+ client_action: ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction?,
3589
3742
  content: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::content,
3590
3743
  conversation_id: String?,
3591
3744
  flagged: bool?,
3745
+ flagged_fields: ::Array[String],
3592
3746
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Label]?,
3593
3747
  language: String?,
3594
3748
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::meta_type?,
@@ -3600,9 +3754,11 @@ module ModerationAPI
3600
3754
  id: String,
3601
3755
  author_id: String?,
3602
3756
  channel_key: String?,
3757
+ client_action: ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction?,
3603
3758
  content: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::content,
3604
3759
  conversation_id: String?,
3605
3760
  flagged: bool?,
3761
+ flagged_fields: ::Array[String],
3606
3762
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Label]?,
3607
3763
  language: String?,
3608
3764
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::meta_type?,
@@ -3610,6 +3766,69 @@ module ModerationAPI
3610
3766
  timestamp: Time
3611
3767
  }
3612
3768
 
3769
+ type client_action =
3770
+ {
3771
+ action: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::action,
3772
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior,
3773
+ reason: String,
3774
+ source: String
3775
+ }
3776
+
3777
+ class ClientAction < ModerationAPI::Internal::Type::BaseModel
3778
+ attr_accessor action: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::action
3779
+
3780
+ attr_reader behavior: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior?
3781
+
3782
+ def behavior=: (
3783
+ ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior
3784
+ ) -> ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior
3785
+
3786
+ attr_reader reason: String?
3787
+
3788
+ def reason=: (String) -> String
3789
+
3790
+ attr_reader source: String?
3791
+
3792
+ def source=: (String) -> String
3793
+
3794
+ def initialize: (
3795
+ action: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::action,
3796
+ ?behavior: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior,
3797
+ ?reason: String,
3798
+ ?source: String
3799
+ ) -> void
3800
+
3801
+ def to_hash: -> {
3802
+ action: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::action,
3803
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior,
3804
+ reason: String,
3805
+ source: String
3806
+ }
3807
+
3808
+ type action = :review | :allow | :reject
3809
+
3810
+ module Action
3811
+ extend ModerationAPI::Internal::Type::Enum
3812
+
3813
+ REVIEW: :review
3814
+ ALLOW: :allow
3815
+ REJECT: :reject
3816
+
3817
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::action]
3818
+ end
3819
+
3820
+ type behavior = :override | :escalate
3821
+
3822
+ module Behavior
3823
+ extend ModerationAPI::Internal::Type::Enum
3824
+
3825
+ OVERRIDE: :override
3826
+ ESCALATE: :escalate
3827
+
3828
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior]
3829
+ end
3830
+ end
3831
+
3613
3832
  type content =
3614
3833
  ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Content::Text
3615
3834
  | ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Content::Image
@@ -4303,9 +4522,11 @@ module ModerationAPI
4303
4522
  id: String,
4304
4523
  author_id: String?,
4305
4524
  channel_key: String?,
4525
+ client_action: ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction?,
4306
4526
  content: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::content,
4307
4527
  conversation_id: String?,
4308
4528
  flagged: bool?,
4529
+ flagged_fields: ::Array[String],
4309
4530
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label]?,
4310
4531
  language: String?,
4311
4532
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::meta_type?,
@@ -4320,12 +4541,16 @@ module ModerationAPI
4320
4541
 
4321
4542
  attr_accessor channel_key: String?
4322
4543
 
4544
+ attr_accessor client_action: ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction?
4545
+
4323
4546
  attr_accessor content: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::content
4324
4547
 
4325
4548
  attr_accessor conversation_id: String?
4326
4549
 
4327
4550
  attr_accessor flagged: bool?
4328
4551
 
4552
+ attr_accessor flagged_fields: ::Array[String]
4553
+
4329
4554
  attr_accessor labels: ::Array[ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label]?
4330
4555
 
4331
4556
  attr_accessor language: String?
@@ -4340,9 +4565,11 @@ module ModerationAPI
4340
4565
  id: String,
4341
4566
  author_id: String?,
4342
4567
  channel_key: String?,
4568
+ client_action: ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction?,
4343
4569
  content: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::content,
4344
4570
  conversation_id: String?,
4345
4571
  flagged: bool?,
4572
+ flagged_fields: ::Array[String],
4346
4573
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label]?,
4347
4574
  language: String?,
4348
4575
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::meta_type?,
@@ -4354,9 +4581,11 @@ module ModerationAPI
4354
4581
  id: String,
4355
4582
  author_id: String?,
4356
4583
  channel_key: String?,
4584
+ client_action: ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction?,
4357
4585
  content: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::content,
4358
4586
  conversation_id: String?,
4359
4587
  flagged: bool?,
4588
+ flagged_fields: ::Array[String],
4360
4589
  labels: ::Array[ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::Label]?,
4361
4590
  language: String?,
4362
4591
  meta_type: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::meta_type?,
@@ -4364,6 +4593,69 @@ module ModerationAPI
4364
4593
  timestamp: Time
4365
4594
  }
4366
4595
 
4596
+ type client_action =
4597
+ {
4598
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::action,
4599
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior,
4600
+ reason: String,
4601
+ source: String
4602
+ }
4603
+
4604
+ class ClientAction < ModerationAPI::Internal::Type::BaseModel
4605
+ attr_accessor action: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::action
4606
+
4607
+ attr_reader behavior: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior?
4608
+
4609
+ def behavior=: (
4610
+ ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior
4611
+ ) -> ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior
4612
+
4613
+ attr_reader reason: String?
4614
+
4615
+ def reason=: (String) -> String
4616
+
4617
+ attr_reader source: String?
4618
+
4619
+ def source=: (String) -> String
4620
+
4621
+ def initialize: (
4622
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::action,
4623
+ ?behavior: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior,
4624
+ ?reason: String,
4625
+ ?source: String
4626
+ ) -> void
4627
+
4628
+ def to_hash: -> {
4629
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::action,
4630
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior,
4631
+ reason: String,
4632
+ source: String
4633
+ }
4634
+
4635
+ type action = :review | :allow | :reject
4636
+
4637
+ module Action
4638
+ extend ModerationAPI::Internal::Type::Enum
4639
+
4640
+ REVIEW: :review
4641
+ ALLOW: :allow
4642
+ REJECT: :reject
4643
+
4644
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::action]
4645
+ end
4646
+
4647
+ type behavior = :override | :escalate
4648
+
4649
+ module Behavior
4650
+ extend ModerationAPI::Internal::Type::Enum
4651
+
4652
+ OVERRIDE: :override
4653
+ ESCALATE: :escalate
4654
+
4655
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior]
4656
+ end
4657
+ end
4658
+
4367
4659
  type content =
4368
4660
  ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::Content::Text
4369
4661
  | ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::Content::Image
@@ -5,6 +5,7 @@ module ModerationAPI
5
5
  content: ModerationAPI::Models::ContentSubmitParams::content,
6
6
  ?author_id: String,
7
7
  ?channel: String,
8
+ ?client_action: ModerationAPI::ContentSubmitParams::ClientAction,
8
9
  ?content_id: String,
9
10
  ?conversation_id: String,
10
11
  ?do_not_store: bool,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moderation_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.20.0
4
+ version: 2.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Moderation API
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-01 00:00:00.000000000 Z
11
+ date: 2026-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi