moderation_api 2.20.0 → 2.21.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,6 +1846,7 @@ 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?,
@@ -1863,6 +1864,8 @@ module ModerationAPI
1863
1864
 
1864
1865
  attr_accessor channel_key: String?
1865
1866
 
1867
+ attr_accessor client_action: ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction?
1868
+
1866
1869
  attr_accessor content: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::content
1867
1870
 
1868
1871
  attr_accessor conversation_id: String?
@@ -1883,6 +1886,7 @@ module ModerationAPI
1883
1886
  id: String,
1884
1887
  author_id: String?,
1885
1888
  channel_key: String?,
1889
+ client_action: ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction?,
1886
1890
  content: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::content,
1887
1891
  conversation_id: String?,
1888
1892
  flagged: bool?,
@@ -1897,6 +1901,7 @@ module ModerationAPI
1897
1901
  id: String,
1898
1902
  author_id: String?,
1899
1903
  channel_key: String?,
1904
+ client_action: ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction?,
1900
1905
  content: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::content,
1901
1906
  conversation_id: String?,
1902
1907
  flagged: bool?,
@@ -1907,6 +1912,69 @@ module ModerationAPI
1907
1912
  timestamp: Time
1908
1913
  }
1909
1914
 
1915
+ type client_action =
1916
+ {
1917
+ action: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::action,
1918
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior,
1919
+ reason: String,
1920
+ source: String
1921
+ }
1922
+
1923
+ class ClientAction < ModerationAPI::Internal::Type::BaseModel
1924
+ attr_accessor action: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::action
1925
+
1926
+ attr_reader behavior: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior?
1927
+
1928
+ def behavior=: (
1929
+ ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior
1930
+ ) -> ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior
1931
+
1932
+ attr_reader reason: String?
1933
+
1934
+ def reason=: (String) -> String
1935
+
1936
+ attr_reader source: String?
1937
+
1938
+ def source=: (String) -> String
1939
+
1940
+ def initialize: (
1941
+ action: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::action,
1942
+ ?behavior: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior,
1943
+ ?reason: String,
1944
+ ?source: String
1945
+ ) -> void
1946
+
1947
+ def to_hash: -> {
1948
+ action: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::action,
1949
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior,
1950
+ reason: String,
1951
+ source: String
1952
+ }
1953
+
1954
+ type action = :review | :allow | :reject
1955
+
1956
+ module Action
1957
+ extend ModerationAPI::Internal::Type::Enum
1958
+
1959
+ REVIEW: :review
1960
+ ALLOW: :allow
1961
+ REJECT: :reject
1962
+
1963
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::action]
1964
+ end
1965
+
1966
+ type behavior = :override | :escalate
1967
+
1968
+ module Behavior
1969
+ extend ModerationAPI::Internal::Type::Enum
1970
+
1971
+ OVERRIDE: :override
1972
+ ESCALATE: :escalate
1973
+
1974
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemResolved::Data::Object::Item::ClientAction::behavior]
1975
+ end
1976
+ end
1977
+
1910
1978
  type content =
1911
1979
  ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Content::Text
1912
1980
  | ModerationAPI::WebhookEvent::QueueItemResolved::Data::Object::Item::Content::Image
@@ -2795,6 +2863,7 @@ module ModerationAPI
2795
2863
  id: String,
2796
2864
  author_id: String?,
2797
2865
  channel_key: String?,
2866
+ client_action: ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction?,
2798
2867
  content: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::content,
2799
2868
  conversation_id: String?,
2800
2869
  flagged: bool?,
@@ -2812,6 +2881,8 @@ module ModerationAPI
2812
2881
 
2813
2882
  attr_accessor channel_key: String?
2814
2883
 
2884
+ attr_accessor client_action: ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction?
2885
+
2815
2886
  attr_accessor content: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::content
2816
2887
 
2817
2888
  attr_accessor conversation_id: String?
@@ -2832,6 +2903,7 @@ module ModerationAPI
2832
2903
  id: String,
2833
2904
  author_id: String?,
2834
2905
  channel_key: String?,
2906
+ client_action: ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction?,
2835
2907
  content: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::content,
2836
2908
  conversation_id: String?,
2837
2909
  flagged: bool?,
@@ -2846,6 +2918,7 @@ module ModerationAPI
2846
2918
  id: String,
2847
2919
  author_id: String?,
2848
2920
  channel_key: String?,
2921
+ client_action: ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction?,
2849
2922
  content: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::content,
2850
2923
  conversation_id: String?,
2851
2924
  flagged: bool?,
@@ -2856,6 +2929,69 @@ module ModerationAPI
2856
2929
  timestamp: Time
2857
2930
  }
2858
2931
 
2932
+ type client_action =
2933
+ {
2934
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::action,
2935
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior,
2936
+ reason: String,
2937
+ source: String
2938
+ }
2939
+
2940
+ class ClientAction < ModerationAPI::Internal::Type::BaseModel
2941
+ attr_accessor action: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::action
2942
+
2943
+ attr_reader behavior: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior?
2944
+
2945
+ def behavior=: (
2946
+ ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior
2947
+ ) -> ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior
2948
+
2949
+ attr_reader reason: String?
2950
+
2951
+ def reason=: (String) -> String
2952
+
2953
+ attr_reader source: String?
2954
+
2955
+ def source=: (String) -> String
2956
+
2957
+ def initialize: (
2958
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::action,
2959
+ ?behavior: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior,
2960
+ ?reason: String,
2961
+ ?source: String
2962
+ ) -> void
2963
+
2964
+ def to_hash: -> {
2965
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::action,
2966
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior,
2967
+ reason: String,
2968
+ source: String
2969
+ }
2970
+
2971
+ type action = :review | :allow | :reject
2972
+
2973
+ module Action
2974
+ extend ModerationAPI::Internal::Type::Enum
2975
+
2976
+ REVIEW: :review
2977
+ ALLOW: :allow
2978
+ REJECT: :reject
2979
+
2980
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::action]
2981
+ end
2982
+
2983
+ type behavior = :override | :escalate
2984
+
2985
+ module Behavior
2986
+ extend ModerationAPI::Internal::Type::Enum
2987
+
2988
+ OVERRIDE: :override
2989
+ ESCALATE: :escalate
2990
+
2991
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::behavior]
2992
+ end
2993
+ end
2994
+
2859
2995
  type content =
2860
2996
  ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::Content::Text
2861
2997
  | ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::Content::Image
@@ -3549,6 +3685,7 @@ module ModerationAPI
3549
3685
  id: String,
3550
3686
  author_id: String?,
3551
3687
  channel_key: String?,
3688
+ client_action: ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction?,
3552
3689
  content: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::content,
3553
3690
  conversation_id: String?,
3554
3691
  flagged: bool?,
@@ -3566,6 +3703,8 @@ module ModerationAPI
3566
3703
 
3567
3704
  attr_accessor channel_key: String?
3568
3705
 
3706
+ attr_accessor client_action: ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction?
3707
+
3569
3708
  attr_accessor content: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::content
3570
3709
 
3571
3710
  attr_accessor conversation_id: String?
@@ -3586,6 +3725,7 @@ module ModerationAPI
3586
3725
  id: String,
3587
3726
  author_id: String?,
3588
3727
  channel_key: String?,
3728
+ client_action: ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction?,
3589
3729
  content: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::content,
3590
3730
  conversation_id: String?,
3591
3731
  flagged: bool?,
@@ -3600,6 +3740,7 @@ module ModerationAPI
3600
3740
  id: String,
3601
3741
  author_id: String?,
3602
3742
  channel_key: String?,
3743
+ client_action: ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction?,
3603
3744
  content: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::content,
3604
3745
  conversation_id: String?,
3605
3746
  flagged: bool?,
@@ -3610,6 +3751,69 @@ module ModerationAPI
3610
3751
  timestamp: Time
3611
3752
  }
3612
3753
 
3754
+ type client_action =
3755
+ {
3756
+ action: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::action,
3757
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior,
3758
+ reason: String,
3759
+ source: String
3760
+ }
3761
+
3762
+ class ClientAction < ModerationAPI::Internal::Type::BaseModel
3763
+ attr_accessor action: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::action
3764
+
3765
+ attr_reader behavior: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior?
3766
+
3767
+ def behavior=: (
3768
+ ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior
3769
+ ) -> ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior
3770
+
3771
+ attr_reader reason: String?
3772
+
3773
+ def reason=: (String) -> String
3774
+
3775
+ attr_reader source: String?
3776
+
3777
+ def source=: (String) -> String
3778
+
3779
+ def initialize: (
3780
+ action: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::action,
3781
+ ?behavior: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior,
3782
+ ?reason: String,
3783
+ ?source: String
3784
+ ) -> void
3785
+
3786
+ def to_hash: -> {
3787
+ action: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::action,
3788
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior,
3789
+ reason: String,
3790
+ source: String
3791
+ }
3792
+
3793
+ type action = :review | :allow | :reject
3794
+
3795
+ module Action
3796
+ extend ModerationAPI::Internal::Type::Enum
3797
+
3798
+ REVIEW: :review
3799
+ ALLOW: :allow
3800
+ REJECT: :reject
3801
+
3802
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::action]
3803
+ end
3804
+
3805
+ type behavior = :override | :escalate
3806
+
3807
+ module Behavior
3808
+ extend ModerationAPI::Internal::Type::Enum
3809
+
3810
+ OVERRIDE: :override
3811
+ ESCALATE: :escalate
3812
+
3813
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemRejected::Data::Object::Item::ClientAction::behavior]
3814
+ end
3815
+ end
3816
+
3613
3817
  type content =
3614
3818
  ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Content::Text
3615
3819
  | ModerationAPI::WebhookEvent::QueueItemRejected::Data::Object::Item::Content::Image
@@ -4303,6 +4507,7 @@ module ModerationAPI
4303
4507
  id: String,
4304
4508
  author_id: String?,
4305
4509
  channel_key: String?,
4510
+ client_action: ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction?,
4306
4511
  content: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::content,
4307
4512
  conversation_id: String?,
4308
4513
  flagged: bool?,
@@ -4320,6 +4525,8 @@ module ModerationAPI
4320
4525
 
4321
4526
  attr_accessor channel_key: String?
4322
4527
 
4528
+ attr_accessor client_action: ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction?
4529
+
4323
4530
  attr_accessor content: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::content
4324
4531
 
4325
4532
  attr_accessor conversation_id: String?
@@ -4340,6 +4547,7 @@ module ModerationAPI
4340
4547
  id: String,
4341
4548
  author_id: String?,
4342
4549
  channel_key: String?,
4550
+ client_action: ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction?,
4343
4551
  content: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::content,
4344
4552
  conversation_id: String?,
4345
4553
  flagged: bool?,
@@ -4354,6 +4562,7 @@ module ModerationAPI
4354
4562
  id: String,
4355
4563
  author_id: String?,
4356
4564
  channel_key: String?,
4565
+ client_action: ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction?,
4357
4566
  content: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::content,
4358
4567
  conversation_id: String?,
4359
4568
  flagged: bool?,
@@ -4364,6 +4573,69 @@ module ModerationAPI
4364
4573
  timestamp: Time
4365
4574
  }
4366
4575
 
4576
+ type client_action =
4577
+ {
4578
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::action,
4579
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior,
4580
+ reason: String,
4581
+ source: String
4582
+ }
4583
+
4584
+ class ClientAction < ModerationAPI::Internal::Type::BaseModel
4585
+ attr_accessor action: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::action
4586
+
4587
+ attr_reader behavior: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior?
4588
+
4589
+ def behavior=: (
4590
+ ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior
4591
+ ) -> ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior
4592
+
4593
+ attr_reader reason: String?
4594
+
4595
+ def reason=: (String) -> String
4596
+
4597
+ attr_reader source: String?
4598
+
4599
+ def source=: (String) -> String
4600
+
4601
+ def initialize: (
4602
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::action,
4603
+ ?behavior: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior,
4604
+ ?reason: String,
4605
+ ?source: String
4606
+ ) -> void
4607
+
4608
+ def to_hash: -> {
4609
+ action: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::action,
4610
+ behavior: ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior,
4611
+ reason: String,
4612
+ source: String
4613
+ }
4614
+
4615
+ type action = :review | :allow | :reject
4616
+
4617
+ module Action
4618
+ extend ModerationAPI::Internal::Type::Enum
4619
+
4620
+ REVIEW: :review
4621
+ ALLOW: :allow
4622
+ REJECT: :reject
4623
+
4624
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::action]
4625
+ end
4626
+
4627
+ type behavior = :override | :escalate
4628
+
4629
+ module Behavior
4630
+ extend ModerationAPI::Internal::Type::Enum
4631
+
4632
+ OVERRIDE: :override
4633
+ ESCALATE: :escalate
4634
+
4635
+ def self?.values: -> ::Array[ModerationAPI::Models::WebhookEvent::QueueItemAllowed::Data::Object::Item::ClientAction::behavior]
4636
+ end
4637
+ end
4638
+
4367
4639
  type content =
4368
4640
  ModerationAPI::WebhookEvent::QueueItemAllowed::Data::Object::Item::Content::Text
4369
4641
  | 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.21.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