apologist 1.2.0 → 1.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e27c5f8d43b4ee1b57eb564bd1726321cac37d5c84b811b393d9ce4201286559
4
- data.tar.gz: 3ae4204096640bfa470269728328f80375ff7ca0c08ffb03915fc6cc2d33bf26
3
+ metadata.gz: 175685e51865fc14342e47a473e42329ffc5299500247a844cc8e7269ffcd1e0
4
+ data.tar.gz: 5e227474cc2f01cf206b85fbfdd9a52b7f8b81ece6f0ebe282e35db49f899c97
5
5
  SHA512:
6
- metadata.gz: 33c6b125c14788c2ce7c25d4b365328a3f83aa1026cb99147356a6ea667baaa698ce57fd9e1452a0a7d89dbf6fc83188b62b69ee83a73b3b269f6da5f559e4b0
7
- data.tar.gz: fbd9b0198961d5962b6829a9928ffd512cdb6d1cd43242551f2fb96903b51b9ed3c73b8635276e3c62c5ade138f9f30bddb7c7decba0785a09d1ea672e124a01
6
+ metadata.gz: 1fcc758726ab2c0c52430cd5cb853e650845624fe195c32d377d8a4487d271c64f936835ab00e552873dc6f186972fa9c13c7c834f9e68c095c2578f25d44fe7
7
+ data.tar.gz: '0648f4ed132d31840f9a5eb5fedcf61c933108bf71e9dafc00434a1d7f7d5e09a4c12aafcf5e338007b6499ec9b772dd05a3fb167cd1f83877bc09d4952d51fa'
data/.fern/metadata.json CHANGED
@@ -6,9 +6,9 @@
6
6
  "moduleName": "Apologist",
7
7
  "clientModuleName": "AgentClient"
8
8
  },
9
- "originGitCommit": "b939d4f55706b529800e2b0a7cb51582fd764206",
9
+ "originGitCommit": "4af5bf08f559e976f40a4e68bcf7cb0e46fec955",
10
10
  "originGitCommitIsDirty": false,
11
11
  "invokedBy": "ci",
12
12
  "ciProvider": "github",
13
- "sdkVersion": "1.1.1"
13
+ "sdkVersion": "1.2.1"
14
14
  }
@@ -10,6 +10,98 @@ module Apologist
10
10
  @client = client
11
11
  end
12
12
 
13
+ # Returns the status of the Chatwoot channel. Used as a lightweight health/verification endpoint.
14
+ #
15
+ # @param request_options [Hash]
16
+ # @param params [Hash]
17
+ # @option request_options [String] :base_url
18
+ # @option request_options [Hash{String => Object}] :additional_headers
19
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
20
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
21
+ # @option request_options [Integer] :timeout_in_seconds
22
+ # @option params [String] :id
23
+ #
24
+ # @example
25
+ # client.channels.get_chatwoot_channel_status(id: "id")
26
+ #
27
+ # @return [Apologist::Channels::Types::GetChatwootChannelStatusResponse]
28
+ def get_chatwoot_channel_status(request_options: {}, **params)
29
+ params = Apologist::Internal::Types::Utils.normalize_keys(params)
30
+ request = Apologist::Internal::JSON::Request.new(
31
+ base_url: request_options[:base_url],
32
+ method: "GET",
33
+ path: "channels/#{URI.encode_uri_component(params[:id].to_s)}/chatwoot",
34
+ request_options: request_options
35
+ )
36
+ begin
37
+ response = @client.send(request)
38
+ rescue Net::HTTPRequestTimeout
39
+ raise Apologist::Errors::TimeoutError
40
+ end
41
+ code = response.code.to_i
42
+ if code.between?(200, 299)
43
+ Apologist::Channels::Types::GetChatwootChannelStatusResponse.load(response.body)
44
+ else
45
+ error_class = Apologist::Errors::ResponseError.subclass_for_code(code)
46
+ raise error_class.new(response.body, code: code)
47
+ end
48
+ end
49
+
50
+ # Receives Chatwoot Agent Bot webhook events for the channel. Chatwoot owns the messaging inbox (Facebook, website
51
+ # widget, and others). This Agent replies through the Chatwoot API and maps native bot handoff to conversation
52
+ # pause/resume. Requests are verified via the `X-Chatwoot-Signature` HMAC-SHA256 header using the configured
53
+ # webhook secret unless an `api_key` is present and no secret is set. The route acknowledges immediately (Chatwoot
54
+ # times out in about 5 seconds) and processes events asynchronously.
55
+ #
56
+ # @param request_options [Hash]
57
+ # @param params [Hash]
58
+ # @option request_options [String] :base_url
59
+ # @option request_options [Hash{String => Object}] :additional_headers
60
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
61
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
62
+ # @option request_options [Integer] :timeout_in_seconds
63
+ # @option params [String] :id
64
+ # @option params [String, nil] :chatwoot_signature
65
+ # @option params [String, nil] :chatwoot_timestamp
66
+ #
67
+ # @example
68
+ # client.channels.receive_chatwoot_webhook(
69
+ # id: "id",
70
+ # body: {
71
+ # key: "value"
72
+ # }
73
+ # )
74
+ #
75
+ # @return [untyped]
76
+ def receive_chatwoot_webhook(request_options: {}, **params)
77
+ params = Apologist::Internal::Types::Utils.normalize_keys(params)
78
+ path_param_names = %i[id]
79
+ body_params = params.except(*path_param_names)
80
+
81
+ headers = {}
82
+ headers["X-Chatwoot-Signature"] = params[:chatwoot_signature] if params[:chatwoot_signature]
83
+ headers["X-Chatwoot-Timestamp"] = params[:chatwoot_timestamp] if params[:chatwoot_timestamp]
84
+
85
+ request = Apologist::Internal::JSON::Request.new(
86
+ base_url: request_options[:base_url],
87
+ method: "POST",
88
+ path: "channels/#{URI.encode_uri_component(params[:id].to_s)}/chatwoot",
89
+ headers: headers,
90
+ body: body_params,
91
+ request_options: request_options
92
+ )
93
+ begin
94
+ response = @client.send(request)
95
+ rescue Net::HTTPRequestTimeout
96
+ raise Apologist::Errors::TimeoutError
97
+ end
98
+ code = response.code.to_i
99
+ return if code.between?(200, 299)
100
+
101
+ error_class = Apologist::Errors::ResponseError.subclass_for_code(code)
102
+ raise error_class.new(response.body, code: code)
103
+ end
104
+
13
105
  # Returns the status of the Discord channel. Used as a lightweight health/verification endpoint.
14
106
  #
15
107
  # @param request_options [Hash]
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Apologist
4
+ module Channels
5
+ module Types
6
+ class GetChatwootChannelStatusRequest < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Apologist
4
+ module Channels
5
+ module Types
6
+ class GetChatwootChannelStatusResponse < Internal::Types::Model
7
+ field :status, -> { String }, optional: true, nullable: false
8
+
9
+ field :channel, -> { String }, optional: true, nullable: false
10
+
11
+ field :active, -> { Internal::Types::Boolean }, optional: true, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Apologist
4
+ module Channels
5
+ module Types
6
+ class ReceiveChatwootWebhookRequest < Internal::Types::Model
7
+ field :id, -> { String }, optional: false, nullable: false
8
+
9
+ field :chatwoot_signature, -> { String }, optional: true, nullable: false, api_name: "X-Chatwoot-Signature"
10
+
11
+ field :chatwoot_timestamp, -> { String }, optional: true, nullable: false, api_name: "X-Chatwoot-Timestamp"
12
+
13
+ field :body, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
14
+ end
15
+ end
16
+ end
17
+ end
@@ -20,7 +20,7 @@ module Apologist
20
20
  @raw_client = Apologist::Internal::Http::RawClient.new(
21
21
  base_url: base_url || Apologist::Environment::DEFAULT,
22
22
  headers: {
23
- "User-Agent" => "apologist/1.1.1",
23
+ "User-Agent" => "apologist/1.2.1",
24
24
  "X-Fern-Language" => "Ruby",
25
25
  "x-api-key" => api_key.to_s
26
26
  },
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Apologist
4
+ module Types
5
+ # Result of scrubbing or anonymizing a user's message-adjacent text. Rows and identifiers are kept.
6
+ class UserRedactResponse < Internal::Types::Model
7
+ field :id, -> { String }, optional: true, nullable: false
8
+
9
+ field :mode, -> { Apologist::Types::UserRedactResponseMode }, optional: true, nullable: false
10
+
11
+ field :redact_requested_at, -> { String }, optional: true, nullable: false
12
+
13
+ field :messages_redacted, -> { Integer }, optional: true, nullable: false
14
+
15
+ field :remaining, -> { Integer }, optional: true, nullable: false
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Apologist
4
+ module Types
5
+ module UserRedactResponseMode
6
+ extend Apologist::Internal::Types::Enum
7
+
8
+ SCRUB = "scrub"
9
+ ANONYMIZE = "anonymize"
10
+ end
11
+ end
12
+ end
@@ -188,6 +188,83 @@ module Apologist
188
188
  raise error_class.new(response.body, code: code)
189
189
  end
190
190
  end
191
+
192
+ # Replaces this user's message-adjacent text with a placeholder. Conversation rows, identifiers, flags, and
193
+ # analytics identity stay in place. Repeat calls finish leftover rows.
194
+ #
195
+ # @param request_options [Hash]
196
+ # @param params [Hash]
197
+ # @option request_options [String] :base_url
198
+ # @option request_options [Hash{String => Object}] :additional_headers
199
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
200
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
201
+ # @option request_options [Integer] :timeout_in_seconds
202
+ # @option params [String] :user_id
203
+ #
204
+ # @example
205
+ # client.users.scrub_user(user_id: "user_id")
206
+ #
207
+ # @return [Apologist::Users::Types::ScrubUserResponse]
208
+ def scrub_user(request_options: {}, **params)
209
+ params = Apologist::Internal::Types::Utils.normalize_keys(params)
210
+ request = Apologist::Internal::JSON::Request.new(
211
+ base_url: request_options[:base_url],
212
+ method: "POST",
213
+ path: "users/#{URI.encode_uri_component(params[:user_id].to_s)}/scrub",
214
+ request_options: request_options
215
+ )
216
+ begin
217
+ response = @client.send(request)
218
+ rescue Net::HTTPRequestTimeout
219
+ raise Apologist::Errors::TimeoutError
220
+ end
221
+ code = response.code.to_i
222
+ if code.between?(200, 299)
223
+ Apologist::Users::Types::ScrubUserResponse.load(response.body)
224
+ else
225
+ error_class = Apologist::Errors::ResponseError.subclass_for_code(code)
226
+ raise error_class.new(response.body, code: code)
227
+ end
228
+ end
229
+
230
+ # Redacts detected personal data in this user's message-adjacent text with regex, then an optional hosted
231
+ # redaction service when the Agent has that option on. Conversation rows, identifiers, flags, and analytics
232
+ # identity stay in place. Repeat calls finish leftover rows and skip text that is already redacted.
233
+ #
234
+ # @param request_options [Hash]
235
+ # @param params [Hash]
236
+ # @option request_options [String] :base_url
237
+ # @option request_options [Hash{String => Object}] :additional_headers
238
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
239
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
240
+ # @option request_options [Integer] :timeout_in_seconds
241
+ # @option params [String] :user_id
242
+ #
243
+ # @example
244
+ # client.users.anonymize_user(user_id: "user_id")
245
+ #
246
+ # @return [Apologist::Users::Types::AnonymizeUserResponse]
247
+ def anonymize_user(request_options: {}, **params)
248
+ params = Apologist::Internal::Types::Utils.normalize_keys(params)
249
+ request = Apologist::Internal::JSON::Request.new(
250
+ base_url: request_options[:base_url],
251
+ method: "POST",
252
+ path: "users/#{URI.encode_uri_component(params[:user_id].to_s)}/anonymize",
253
+ request_options: request_options
254
+ )
255
+ begin
256
+ response = @client.send(request)
257
+ rescue Net::HTTPRequestTimeout
258
+ raise Apologist::Errors::TimeoutError
259
+ end
260
+ code = response.code.to_i
261
+ if code.between?(200, 299)
262
+ Apologist::Users::Types::AnonymizeUserResponse.load(response.body)
263
+ else
264
+ error_class = Apologist::Errors::ResponseError.subclass_for_code(code)
265
+ raise error_class.new(response.body, code: code)
266
+ end
267
+ end
191
268
  end
192
269
  end
193
270
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Apologist
4
+ module Users
5
+ module Types
6
+ class AnonymizeUserRequest < Internal::Types::Model
7
+ field :user_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Apologist
4
+ module Users
5
+ module Types
6
+ class AnonymizeUserResponse < Internal::Types::Model
7
+ field :data, -> { Apologist::Types::UserRedactResponse }, optional: true, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Apologist
4
+ module Users
5
+ module Types
6
+ class ScrubUserRequest < Internal::Types::Model
7
+ field :user_id, -> { String }, optional: false, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Apologist
4
+ module Users
5
+ module Types
6
+ class ScrubUserResponse < Internal::Types::Model
7
+ field :data, -> { Apologist::Types::UserRedactResponse }, optional: true, nullable: false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Apologist
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
data/lib/Apologist.rb CHANGED
@@ -55,6 +55,10 @@ require_relative "Apologist/users/types/list_user_flags_response"
55
55
  require_relative "Apologist/users/types/get_user_response"
56
56
  require_relative "Apologist/users/types/user_update_request_tags_item"
57
57
  require_relative "Apologist/users/types/update_user_response"
58
+ require_relative "Apologist/types/user_redact_response_mode"
59
+ require_relative "Apologist/types/user_redact_response"
60
+ require_relative "Apologist/users/types/scrub_user_response"
61
+ require_relative "Apologist/users/types/anonymize_user_response"
58
62
  require_relative "Apologist/benchmarks/types/list_benchmark_runs_response"
59
63
  require_relative "Apologist/benchmarks/types/benchmark_run_request_content"
60
64
  require_relative "Apologist/benchmarks/types/benchmark_run_request_reasoning_effort"
@@ -68,6 +72,7 @@ require_relative "Apologist/conversations/types/list_conversations_response"
68
72
  require_relative "Apologist/conversations/types/get_conversation_response"
69
73
  require_relative "Apologist/conversations/types/pause_conversation_response"
70
74
  require_relative "Apologist/conversations/types/resume_conversation_response"
75
+ require_relative "Apologist/channels/types/get_chatwoot_channel_status_response"
71
76
  require_relative "Apologist/channels/types/get_discord_channel_status_response"
72
77
  require_relative "Apologist/channels/types/get_line_channel_status_response"
73
78
  require_relative "Apologist/channels/types/verify_facebook_webhook_request_hub_mode"
@@ -124,6 +129,8 @@ require_relative "Apologist/users/types/list_users_request"
124
129
  require_relative "Apologist/users/types/list_user_flags_request"
125
130
  require_relative "Apologist/users/types/get_user_request"
126
131
  require_relative "Apologist/users/types/user_update_request"
132
+ require_relative "Apologist/users/types/scrub_user_request"
133
+ require_relative "Apologist/users/types/anonymize_user_request"
127
134
  require_relative "Apologist/benchmarks/client"
128
135
  require_relative "Apologist/benchmarks/types/list_benchmark_runs_request"
129
136
  require_relative "Apologist/benchmarks/types/benchmark_run_request"
@@ -135,6 +142,8 @@ require_relative "Apologist/conversations/types/get_conversation_request"
135
142
  require_relative "Apologist/conversations/types/pause_conversation_request"
136
143
  require_relative "Apologist/conversations/types/resume_conversation_request"
137
144
  require_relative "Apologist/channels/client"
145
+ require_relative "Apologist/channels/types/get_chatwoot_channel_status_request"
146
+ require_relative "Apologist/channels/types/receive_chatwoot_webhook_request"
138
147
  require_relative "Apologist/channels/types/get_discord_channel_status_request"
139
148
  require_relative "Apologist/channels/types/receive_discord_interaction_request"
140
149
  require_relative "Apologist/channels/types/get_line_channel_status_request"
data/reference.md CHANGED
@@ -1924,6 +1924,130 @@ client.users.update_user(user_id: "user_id")
1924
1924
  </dl>
1925
1925
 
1926
1926
 
1927
+ </dd>
1928
+ </dl>
1929
+ </details>
1930
+
1931
+ <details><summary><code>client.users.<a href="/lib/Apologist/users/client.rb">scrub_user</a>(user_id:) -> Apologist::Users::Types::ScrubUserResponse</code></summary>
1932
+ <dl>
1933
+ <dd>
1934
+
1935
+ #### 📝 Description
1936
+
1937
+ <dl>
1938
+ <dd>
1939
+
1940
+ <dl>
1941
+ <dd>
1942
+
1943
+ Replaces this user's message-adjacent text with a placeholder. Conversation rows, identifiers, flags, and analytics identity stay in place. Repeat calls finish leftover rows.
1944
+ </dd>
1945
+ </dl>
1946
+ </dd>
1947
+ </dl>
1948
+
1949
+ #### 🔌 Usage
1950
+
1951
+ <dl>
1952
+ <dd>
1953
+
1954
+ <dl>
1955
+ <dd>
1956
+
1957
+ ```ruby
1958
+ client.users.scrub_user(user_id: "user_id")
1959
+ ```
1960
+ </dd>
1961
+ </dl>
1962
+ </dd>
1963
+ </dl>
1964
+
1965
+ #### ⚙️ Parameters
1966
+
1967
+ <dl>
1968
+ <dd>
1969
+
1970
+ <dl>
1971
+ <dd>
1972
+
1973
+ **user_id:** `String` — The user's external id or internal id
1974
+
1975
+ </dd>
1976
+ </dl>
1977
+
1978
+ <dl>
1979
+ <dd>
1980
+
1981
+ **request_options:** `Apologist::Users::RequestOptions`
1982
+
1983
+ </dd>
1984
+ </dl>
1985
+ </dd>
1986
+ </dl>
1987
+
1988
+
1989
+ </dd>
1990
+ </dl>
1991
+ </details>
1992
+
1993
+ <details><summary><code>client.users.<a href="/lib/Apologist/users/client.rb">anonymize_user</a>(user_id:) -> Apologist::Users::Types::AnonymizeUserResponse</code></summary>
1994
+ <dl>
1995
+ <dd>
1996
+
1997
+ #### 📝 Description
1998
+
1999
+ <dl>
2000
+ <dd>
2001
+
2002
+ <dl>
2003
+ <dd>
2004
+
2005
+ Redacts detected personal data in this user's message-adjacent text with regex, then an optional hosted redaction service when the Agent has that option on. Conversation rows, identifiers, flags, and analytics identity stay in place. Repeat calls finish leftover rows and skip text that is already redacted.
2006
+ </dd>
2007
+ </dl>
2008
+ </dd>
2009
+ </dl>
2010
+
2011
+ #### 🔌 Usage
2012
+
2013
+ <dl>
2014
+ <dd>
2015
+
2016
+ <dl>
2017
+ <dd>
2018
+
2019
+ ```ruby
2020
+ client.users.anonymize_user(user_id: "user_id")
2021
+ ```
2022
+ </dd>
2023
+ </dl>
2024
+ </dd>
2025
+ </dl>
2026
+
2027
+ #### ⚙️ Parameters
2028
+
2029
+ <dl>
2030
+ <dd>
2031
+
2032
+ <dl>
2033
+ <dd>
2034
+
2035
+ **user_id:** `String` — The user's external id or internal id
2036
+
2037
+ </dd>
2038
+ </dl>
2039
+
2040
+ <dl>
2041
+ <dd>
2042
+
2043
+ **request_options:** `Apologist::Users::RequestOptions`
2044
+
2045
+ </dd>
2046
+ </dl>
2047
+ </dd>
2048
+ </dl>
2049
+
2050
+
1927
2051
  </dd>
1928
2052
  </dl>
1929
2053
  </details>
@@ -2693,6 +2817,159 @@ client.conversations.resume_conversation(id: "id")
2693
2817
  </details>
2694
2818
 
2695
2819
  ## Channels
2820
+ <details><summary><code>client.channels.<a href="/lib/Apologist/channels/client.rb">get_chatwoot_channel_status</a>(id:) -> Apologist::Channels::Types::GetChatwootChannelStatusResponse</code></summary>
2821
+ <dl>
2822
+ <dd>
2823
+
2824
+ #### 📝 Description
2825
+
2826
+ <dl>
2827
+ <dd>
2828
+
2829
+ <dl>
2830
+ <dd>
2831
+
2832
+ Returns the status of the Chatwoot channel. Used as a lightweight health/verification endpoint.
2833
+ </dd>
2834
+ </dl>
2835
+ </dd>
2836
+ </dl>
2837
+
2838
+ #### 🔌 Usage
2839
+
2840
+ <dl>
2841
+ <dd>
2842
+
2843
+ <dl>
2844
+ <dd>
2845
+
2846
+ ```ruby
2847
+ client.channels.get_chatwoot_channel_status(id: "id")
2848
+ ```
2849
+ </dd>
2850
+ </dl>
2851
+ </dd>
2852
+ </dl>
2853
+
2854
+ #### ⚙️ Parameters
2855
+
2856
+ <dl>
2857
+ <dd>
2858
+
2859
+ <dl>
2860
+ <dd>
2861
+
2862
+ **id:** `String` — The channel id
2863
+
2864
+ </dd>
2865
+ </dl>
2866
+
2867
+ <dl>
2868
+ <dd>
2869
+
2870
+ **request_options:** `Apologist::Channels::RequestOptions`
2871
+
2872
+ </dd>
2873
+ </dl>
2874
+ </dd>
2875
+ </dl>
2876
+
2877
+
2878
+ </dd>
2879
+ </dl>
2880
+ </details>
2881
+
2882
+ <details><summary><code>client.channels.<a href="/lib/Apologist/channels/client.rb">receive_chatwoot_webhook</a>(id:, request) -> </code></summary>
2883
+ <dl>
2884
+ <dd>
2885
+
2886
+ #### 📝 Description
2887
+
2888
+ <dl>
2889
+ <dd>
2890
+
2891
+ <dl>
2892
+ <dd>
2893
+
2894
+ Receives Chatwoot Agent Bot webhook events for the channel. Chatwoot owns the messaging inbox (Facebook, website widget, and others). This Agent replies through the Chatwoot API and maps native bot handoff to conversation pause/resume. Requests are verified via the `X-Chatwoot-Signature` HMAC-SHA256 header using the configured webhook secret unless an `api_key` is present and no secret is set. The route acknowledges immediately (Chatwoot times out in about 5 seconds) and processes events asynchronously.
2895
+ </dd>
2896
+ </dl>
2897
+ </dd>
2898
+ </dl>
2899
+
2900
+ #### 🔌 Usage
2901
+
2902
+ <dl>
2903
+ <dd>
2904
+
2905
+ <dl>
2906
+ <dd>
2907
+
2908
+ ```ruby
2909
+ client.channels.receive_chatwoot_webhook(
2910
+ id: "id",
2911
+ body: {
2912
+ key: "value"
2913
+ }
2914
+ )
2915
+ ```
2916
+ </dd>
2917
+ </dl>
2918
+ </dd>
2919
+ </dl>
2920
+
2921
+ #### ⚙️ Parameters
2922
+
2923
+ <dl>
2924
+ <dd>
2925
+
2926
+ <dl>
2927
+ <dd>
2928
+
2929
+ **id:** `String` — The channel id
2930
+
2931
+ </dd>
2932
+ </dl>
2933
+
2934
+ <dl>
2935
+ <dd>
2936
+
2937
+ **chatwoot_signature:** `String` — `sha256=` plus hex HMAC-SHA256 of `{timestamp}.{rawBody}` keyed with the Agent Bot webhook secret. Required when the webhook URL does not include an api_key, and whenever a webhook secret is configured.
2938
+
2939
+ </dd>
2940
+ </dl>
2941
+
2942
+ <dl>
2943
+ <dd>
2944
+
2945
+ **chatwoot_timestamp:** `String` — Unix timestamp used in the HMAC payload.
2946
+
2947
+ </dd>
2948
+ </dl>
2949
+
2950
+ <dl>
2951
+ <dd>
2952
+
2953
+ **request:** `Internal::Types::Hash[String, Object]` — Chatwoot Agent Bot webhook payload (`event` plus message or conversation fields).
2954
+
2955
+ </dd>
2956
+ </dl>
2957
+
2958
+ <dl>
2959
+ <dd>
2960
+
2961
+ **request_options:** `Apologist::Channels::RequestOptions`
2962
+
2963
+ </dd>
2964
+ </dl>
2965
+ </dd>
2966
+ </dl>
2967
+
2968
+
2969
+ </dd>
2970
+ </dl>
2971
+ </details>
2972
+
2696
2973
  <details><summary><code>client.channels.<a href="/lib/Apologist/channels/client.rb">get_discord_channel_status</a>(id:) -> Apologist::Channels::Types::GetDiscordChannelStatusResponse</code></summary>
2697
2974
  <dl>
2698
2975
  <dd>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apologist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apologist
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-08-16 00:00:00.000000000 Z
11
+ date: 2026-09-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: The Apologist Ruby library provides convenient access to the Apologist
14
14
  API from Ruby.
@@ -40,11 +40,14 @@ files:
40
40
  - lib/Apologist/benchmarks/types/list_benchmark_runs_request.rb
41
41
  - lib/Apologist/benchmarks/types/list_benchmark_runs_response.rb
42
42
  - lib/Apologist/channels/client.rb
43
+ - lib/Apologist/channels/types/get_chatwoot_channel_status_request.rb
44
+ - lib/Apologist/channels/types/get_chatwoot_channel_status_response.rb
43
45
  - lib/Apologist/channels/types/get_discord_channel_status_request.rb
44
46
  - lib/Apologist/channels/types/get_discord_channel_status_response.rb
45
47
  - lib/Apologist/channels/types/get_instagram_privacy_policy_request.rb
46
48
  - lib/Apologist/channels/types/get_line_channel_status_request.rb
47
49
  - lib/Apologist/channels/types/get_line_channel_status_response.rb
50
+ - lib/Apologist/channels/types/receive_chatwoot_webhook_request.rb
48
51
  - lib/Apologist/channels/types/receive_discord_interaction_request.rb
49
52
  - lib/Apologist/channels/types/receive_facebook_message_request.rb
50
53
  - lib/Apologist/channels/types/receive_line_webhook_request.rb
@@ -154,6 +157,8 @@ files:
154
157
  - lib/Apologist/types/tag_ref.rb
155
158
  - lib/Apologist/types/user.rb
156
159
  - lib/Apologist/types/user_flag.rb
160
+ - lib/Apologist/types/user_redact_response.rb
161
+ - lib/Apologist/types/user_redact_response_mode.rb
157
162
  - lib/Apologist/types/webhook_agent_ref.rb
158
163
  - lib/Apologist/types/webhook_cta.rb
159
164
  - lib/Apologist/types/webhook_evaluation.rb
@@ -163,12 +168,16 @@ files:
163
168
  - lib/Apologist/types/webhook_notification_ref.rb
164
169
  - lib/Apologist/types/webhook_payload.rb
165
170
  - lib/Apologist/users/client.rb
171
+ - lib/Apologist/users/types/anonymize_user_request.rb
172
+ - lib/Apologist/users/types/anonymize_user_response.rb
166
173
  - lib/Apologist/users/types/get_user_request.rb
167
174
  - lib/Apologist/users/types/get_user_response.rb
168
175
  - lib/Apologist/users/types/list_user_flags_request.rb
169
176
  - lib/Apologist/users/types/list_user_flags_response.rb
170
177
  - lib/Apologist/users/types/list_users_request.rb
171
178
  - lib/Apologist/users/types/list_users_response.rb
179
+ - lib/Apologist/users/types/scrub_user_request.rb
180
+ - lib/Apologist/users/types/scrub_user_response.rb
172
181
  - lib/Apologist/users/types/update_user_response.rb
173
182
  - lib/Apologist/users/types/user_update_request.rb
174
183
  - lib/Apologist/users/types/user_update_request_tags_item.rb