knockapi 1.35.0 → 1.36.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +63 -0
- data/README.md +1 -1
- data/lib/knockapi/client.rb +17 -0
- data/lib/knockapi/internal/transport/base_client.rb +5 -0
- data/lib/knockapi/internal/util.rb +21 -5
- data/lib/knockapi/models/condition.rb +1 -0
- data/lib/knockapi/models/message.rb +33 -1
- data/lib/knockapi/models/message_event.rb +11 -11
- data/lib/knockapi/models/object_unset_preferences_params.rb +32 -0
- data/lib/knockapi/models/providers/ms_team_check_auth_response.rb +9 -1
- data/lib/knockapi/models/recipients/slack_channel_data.rb +21 -6
- data/lib/knockapi/models/tenant.rb +35 -1
- data/lib/knockapi/models/tenant_request.rb +35 -1
- data/lib/knockapi/models/user_unset_preferences_params.rb +26 -0
- data/lib/knockapi/models/users/bulk_set_preferences_params.rb +221 -4
- data/lib/knockapi/models/users/guide_get_channel_response.rb +9 -1
- data/lib/knockapi/models/workflow_cancel_params.rb +6 -6
- data/lib/knockapi/models/workflow_recipient_run.rb +193 -0
- data/lib/knockapi/models/workflow_recipient_run_detail.rb +19 -0
- data/lib/knockapi/models/workflow_recipient_run_event.rb +99 -0
- data/lib/knockapi/models/workflow_recipient_run_get_params.rb +20 -0
- data/lib/knockapi/models/workflow_recipient_run_list_params.rb +112 -0
- data/lib/knockapi/models/workflow_trigger_params.rb +42 -7
- data/lib/knockapi/models.rb +14 -0
- data/lib/knockapi/resources/objects.rb +24 -0
- data/lib/knockapi/resources/users/bulk.rb +4 -1
- data/lib/knockapi/resources/users.rb +22 -0
- data/lib/knockapi/resources/workflow_recipient_runs.rb +81 -0
- data/lib/knockapi/resources/workflows.rb +5 -3
- data/lib/knockapi/version.rb +1 -1
- data/lib/knockapi.rb +8 -0
- data/rbi/knockapi/client.rbi +5 -0
- data/rbi/knockapi/internal/util.rbi +8 -0
- data/rbi/knockapi/models/condition.rbi +2 -0
- data/rbi/knockapi/models/message.rbi +59 -0
- data/rbi/knockapi/models/message_event.rbi +26 -26
- data/rbi/knockapi/models/object_unset_preferences_params.rbi +51 -0
- data/rbi/knockapi/models/providers/ms_team_check_auth_response.rbi +18 -4
- data/rbi/knockapi/models/recipients/slack_channel_data.rbi +57 -7
- data/rbi/knockapi/models/tenant.rbi +36 -0
- data/rbi/knockapi/models/tenant_request.rbi +36 -0
- data/rbi/knockapi/models/user_unset_preferences_params.rbi +46 -0
- data/rbi/knockapi/models/users/bulk_set_preferences_params.rbi +527 -6
- data/rbi/knockapi/models/users/guide_get_channel_response.rbi +11 -0
- data/rbi/knockapi/models/workflow_cancel_params.rbi +10 -10
- data/rbi/knockapi/models/workflow_recipient_run.rbi +318 -0
- data/rbi/knockapi/models/workflow_recipient_run_detail.rbi +39 -0
- data/rbi/knockapi/models/workflow_recipient_run_event.rbi +137 -0
- data/rbi/knockapi/models/workflow_recipient_run_get_params.rbi +38 -0
- data/rbi/knockapi/models/workflow_recipient_run_list_params.rbi +229 -0
- data/rbi/knockapi/models/workflow_trigger_params.rbi +76 -10
- data/rbi/knockapi/models.rbi +16 -0
- data/rbi/knockapi/resources/objects.rbi +20 -0
- data/rbi/knockapi/resources/users/bulk.rbi +4 -2
- data/rbi/knockapi/resources/users.rbi +17 -0
- data/rbi/knockapi/resources/workflow_recipient_runs.rbi +79 -0
- data/rbi/knockapi/resources/workflows.rbi +14 -10
- data/sig/knockapi/client.rbs +2 -0
- data/sig/knockapi/internal/util.rbs +4 -0
- data/sig/knockapi/models/condition.rbs +2 -0
- data/sig/knockapi/models/message.rbs +19 -0
- data/sig/knockapi/models/message_event.rbs +22 -22
- data/sig/knockapi/models/object_unset_preferences_params.rbs +32 -0
- data/sig/knockapi/models/providers/ms_team_check_auth_response.rbs +15 -4
- data/sig/knockapi/models/recipients/slack_channel_data.rbs +21 -4
- data/sig/knockapi/models/tenant.rbs +20 -0
- data/sig/knockapi/models/tenant_request.rbs +20 -0
- data/sig/knockapi/models/user_unset_preferences_params.rbs +28 -0
- data/sig/knockapi/models/users/bulk_set_preferences_params.rbs +149 -4
- data/sig/knockapi/models/users/guide_get_channel_response.rbs +7 -0
- data/sig/knockapi/models/workflow_recipient_run.rbs +146 -0
- data/sig/knockapi/models/workflow_recipient_run_detail.rbs +20 -0
- data/sig/knockapi/models/workflow_recipient_run_event.rbs +73 -0
- data/sig/knockapi/models/workflow_recipient_run_get_params.rbs +20 -0
- data/sig/knockapi/models/workflow_recipient_run_list_params.rbs +109 -0
- data/sig/knockapi/models/workflow_trigger_params.rbs +17 -0
- data/sig/knockapi/models.rbs +14 -0
- data/sig/knockapi/resources/objects.rbs +7 -0
- data/sig/knockapi/resources/users/bulk.rbs +1 -1
- data/sig/knockapi/resources/users.rbs +6 -0
- data/sig/knockapi/resources/workflow_recipient_runs.rbs +26 -0
- data/sig/knockapi/resources/workflows.rbs +1 -0
- metadata +26 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9512ea55f130b0074cda99f4b5cbce22218b2b374567d893aa843180ba173067
|
|
4
|
+
data.tar.gz: 3365e40d1bc73510ed6ecdd0927464da1e8f41e2d960a9b8e6f1714cd68c6773
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e16f9e521a436f507a98d244165ab6de74867de83e8c81f8a90eb705494c2c6e769fadf97fe24b3354e040ce80f72cee2197a7300386b14963a38a2d68b0a3ae
|
|
7
|
+
data.tar.gz: 4d58991a489c340bc60801a68ec479a5da1ff32d625530ef77b5e3ba94450d145c59faa5301be050aed12c2f34d63cbeda01c9e3ef4d318f6c119b4b9bd19d93
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.36.0 (2026-07-06)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.35.0...v1.36.0](https://github.com/knocklabs/knock-ruby/compare/v1.35.0...v1.36.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** added new unset preferences methods ([9b272e8](https://github.com/knocklabs/knock-ruby/commit/9b272e8ced5eb194a57d79ba442fba9539a0c0ef))
|
|
10
|
+
* **api:** api update ([c066457](https://github.com/knocklabs/knock-ruby/commit/c0664574c3f3261d5d9afb01da8ca4fd0abb644a))
|
|
11
|
+
* **api:** api update ([a001440](https://github.com/knocklabs/knock-ruby/commit/a00144037679d27b84ab5cfb46e5e1d1260e603c))
|
|
12
|
+
* **api:** api update ([18c4951](https://github.com/knocklabs/knock-ruby/commit/18c495182324507144e63fa2fe01accddf35422f))
|
|
13
|
+
* **api:** api update ([2401cbd](https://github.com/knocklabs/knock-ruby/commit/2401cbdf0b20836eb2750ade8fcb788577d7e20a))
|
|
14
|
+
* **api:** api update ([6d5c451](https://github.com/knocklabs/knock-ruby/commit/6d5c451ba3f1f76bce75a505edefc72b9fc70aa6))
|
|
15
|
+
* **api:** api update ([9fba1c3](https://github.com/knocklabs/knock-ruby/commit/9fba1c3f1688a4e689ece5407ab4dbda42194e7a))
|
|
16
|
+
* **api:** api update ([81f4210](https://github.com/knocklabs/knock-ruby/commit/81f42102f262f168d22662496a730cafbc8e1ff6))
|
|
17
|
+
* **api:** api update ([c3faad4](https://github.com/knocklabs/knock-ruby/commit/c3faad4ef7886e8310126e60890296bb5f7461b4))
|
|
18
|
+
* **api:** api update ([0a184ac](https://github.com/knocklabs/knock-ruby/commit/0a184ac4c65104b9627beb4dbbf9d7079e054521))
|
|
19
|
+
* **api:** api update ([033b47f](https://github.com/knocklabs/knock-ruby/commit/033b47f1f496c7430f90e4183fbabd54b2e679a1))
|
|
20
|
+
* **api:** api update ([1ca76d9](https://github.com/knocklabs/knock-ruby/commit/1ca76d92a41eadb71e1e443ff74a79c56e9b590b))
|
|
21
|
+
* **api:** api update ([4a24039](https://github.com/knocklabs/knock-ruby/commit/4a2403909e4acac7fc2345f7718cb91e8d7b6482))
|
|
22
|
+
* **api:** api update ([1e5415d](https://github.com/knocklabs/knock-ruby/commit/1e5415d4ac03f8312a7523dface2690c2ea84530))
|
|
23
|
+
* **api:** api update ([a727d66](https://github.com/knocklabs/knock-ruby/commit/a727d6642460cf4d08ddda6d8438b25d0bbe01cd))
|
|
24
|
+
* **api:** api update ([e4c47e9](https://github.com/knocklabs/knock-ruby/commit/e4c47e9f7277754c46edee3ce6a77c3cc8cf62ab))
|
|
25
|
+
* **api:** api update ([306d88b](https://github.com/knocklabs/knock-ruby/commit/306d88b3b83161b50475e2742cc43ca3d220b46b))
|
|
26
|
+
* **api:** api update ([10d9d36](https://github.com/knocklabs/knock-ruby/commit/10d9d36a75265107ad764cd2a6632b1a5c1ee19f))
|
|
27
|
+
* **api:** api update ([d6c0cff](https://github.com/knocklabs/knock-ruby/commit/d6c0cffbcfe754eb69738928ece4a7190d42949e))
|
|
28
|
+
* **api:** api update ([692eda9](https://github.com/knocklabs/knock-ruby/commit/692eda92f04365b34921069ea4ceee12996dc562))
|
|
29
|
+
* **api:** api update ([3c57fe3](https://github.com/knocklabs/knock-ruby/commit/3c57fe3e021d0c7ce2670d03d4666205458397da))
|
|
30
|
+
* **api:** api update ([235f220](https://github.com/knocklabs/knock-ruby/commit/235f220522da41f5ec8f589858879e1885d8be67))
|
|
31
|
+
* **api:** api update ([5c3a9c1](https://github.com/knocklabs/knock-ruby/commit/5c3a9c12f02fb3acbe8263f07dc7fb5d2134fc98))
|
|
32
|
+
* **api:** api update ([e119cef](https://github.com/knocklabs/knock-ruby/commit/e119cef6b64fbeb3eda95e1a9418cdc5d058cd35))
|
|
33
|
+
* **api:** api update ([e2d7908](https://github.com/knocklabs/knock-ruby/commit/e2d7908ccc094c06989d5f78c620ea8b6bdff6f0))
|
|
34
|
+
* **api:** api update ([e697644](https://github.com/knocklabs/knock-ruby/commit/e697644fade546fea5be556f0f51024f8959228e))
|
|
35
|
+
* **api:** api update ([cf13a4e](https://github.com/knocklabs/knock-ruby/commit/cf13a4eac94e30e2bd0256af75cb9547057890aa))
|
|
36
|
+
* **api:** api update ([27e68a8](https://github.com/knocklabs/knock-ruby/commit/27e68a833d6045919ff9b61ee416cd65078c2aa3))
|
|
37
|
+
* **api:** api update ([2d54bf7](https://github.com/knocklabs/knock-ruby/commit/2d54bf7fb14986bfcbe5a4f2cc4a797e65c8e670))
|
|
38
|
+
* **api:** api update ([76bdadc](https://github.com/knocklabs/knock-ruby/commit/76bdadc2b8b10eecfbe70ed14a8f6c040e27374e))
|
|
39
|
+
* **api:** api update ([373e78b](https://github.com/knocklabs/knock-ruby/commit/373e78b7f24449c77d98c0d05c897fdeb05641aa))
|
|
40
|
+
* **api:** api update ([14c7bc7](https://github.com/knocklabs/knock-ruby/commit/14c7bc73e1677dc239ac48035ee0b034709750ae))
|
|
41
|
+
* **api:** api update ([bd57879](https://github.com/knocklabs/knock-ruby/commit/bd578791c347de8b63caf60ba6340f19ac3a6a48))
|
|
42
|
+
* **api:** api update ([da22d6e](https://github.com/knocklabs/knock-ruby/commit/da22d6e5573c3f093d081edcb6881ac23fcf9173))
|
|
43
|
+
* **api:** api update ([628d4cc](https://github.com/knocklabs/knock-ruby/commit/628d4cc040ba05590a453be6824ea9329792f394))
|
|
44
|
+
* **api:** api update ([f710ae2](https://github.com/knocklabs/knock-ruby/commit/f710ae264c9e1acdcf36b41b93e49cd7a8ebaf12))
|
|
45
|
+
* **KNO-12791:** Add workflow recipient run APIs ([1e34f54](https://github.com/knocklabs/knock-ruby/commit/1e34f54ffff850939a1effd58cb9711b442d7a93))
|
|
46
|
+
* support setting headers via env ([ad75b97](https://github.com/knocklabs/knock-ruby/commit/ad75b97225fd6634d7850dde00d5035e64d168a2))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Bug Fixes
|
|
50
|
+
|
|
51
|
+
* align path encoding with RFC 3986 section 3.3 ([3e2268d](https://github.com/knocklabs/knock-ruby/commit/3e2268d3e0547fa66ad253e35c86da963cc36215))
|
|
52
|
+
* **client:** elide content type header on requests without body ([4e8b8cf](https://github.com/knocklabs/knock-ruby/commit/4e8b8cfd2dbdd693a880d960df5e48baa29fce2b))
|
|
53
|
+
* **client:** send content-type header for requests with an omitted optional body ([1baf886](https://github.com/knocklabs/knock-ruby/commit/1baf8869ccefbfe0bd34ae1034dccebf6fc3fc7a))
|
|
54
|
+
* multipart encoding for file arrays ([0715076](https://github.com/knocklabs/knock-ruby/commit/0715076b3cb219501a9bedd7a449f4cedef2babb))
|
|
55
|
+
* variable name typo ([cde1131](https://github.com/knocklabs/knock-ruby/commit/cde113151eb2879204409723971653616876fdee))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Chores
|
|
59
|
+
|
|
60
|
+
* **internal:** bound formatter parallelism to CPU count ([865730b](https://github.com/knocklabs/knock-ruby/commit/865730b23c39620c27f03c6f96eeda4d20f0566d))
|
|
61
|
+
* **internal:** more robust bootstrap script ([1023475](https://github.com/knocklabs/knock-ruby/commit/1023475aa6b6f5c04dae72aaf7ad397aa769e033))
|
|
62
|
+
* **tests:** bump steady to v0.20.1 ([6eb6756](https://github.com/knocklabs/knock-ruby/commit/6eb6756ef89a7b99a3825bd5ab899bf2f0b030e2))
|
|
63
|
+
* **tests:** bump steady to v0.20.2 ([4206b20](https://github.com/knocklabs/knock-ruby/commit/4206b20a8cd60362598da173185bbd236e659eff))
|
|
64
|
+
* **tests:** bump steady to v0.22.1 ([5b37b24](https://github.com/knocklabs/knock-ruby/commit/5b37b2467d9d996161d02d5df3bbdf703f51bad7))
|
|
65
|
+
|
|
3
66
|
## 1.35.0 (2026-03-27)
|
|
4
67
|
|
|
5
68
|
Full Changelog: [v1.34.0...v1.35.0](https://github.com/knocklabs/knock-ruby/compare/v1.34.0...v1.35.0)
|
data/README.md
CHANGED
data/lib/knockapi/client.rb
CHANGED
|
@@ -59,6 +59,11 @@ module Knockapi
|
|
|
59
59
|
# @return [Knockapi::Resources::Workflows]
|
|
60
60
|
attr_reader :workflows
|
|
61
61
|
|
|
62
|
+
# A workflow run represents an individual execution of a workflow for a specific
|
|
63
|
+
# recipient.
|
|
64
|
+
# @return [Knockapi::Resources::WorkflowRecipientRuns]
|
|
65
|
+
attr_reader :workflow_recipient_runs
|
|
66
|
+
|
|
62
67
|
# A schedule is a per-recipient, timezone-aware configuration for when to invoke a
|
|
63
68
|
# workflow.
|
|
64
69
|
# @return [Knockapi::Resources::Schedules]
|
|
@@ -117,6 +122,17 @@ module Knockapi
|
|
|
117
122
|
headers = {
|
|
118
123
|
"x-knock-branch" => (@branch = branch&.to_s)
|
|
119
124
|
}
|
|
125
|
+
custom_headers_env = ENV["KNOCK_CUSTOM_HEADERS"]
|
|
126
|
+
unless custom_headers_env.nil?
|
|
127
|
+
parsed = {}
|
|
128
|
+
custom_headers_env.split("\n").each do |line|
|
|
129
|
+
colon = line.index(":")
|
|
130
|
+
unless colon.nil?
|
|
131
|
+
parsed[line[0...colon].strip] = line[(colon + 1)..].strip
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
headers = parsed.merge(headers)
|
|
135
|
+
end
|
|
120
136
|
|
|
121
137
|
@api_key = api_key.to_s
|
|
122
138
|
|
|
@@ -139,6 +155,7 @@ module Knockapi
|
|
|
139
155
|
@providers = Knockapi::Resources::Providers.new(client: self)
|
|
140
156
|
@integrations = Knockapi::Resources::Integrations.new(client: self)
|
|
141
157
|
@workflows = Knockapi::Resources::Workflows.new(client: self)
|
|
158
|
+
@workflow_recipient_runs = Knockapi::Resources::WorkflowRecipientRuns.new(client: self)
|
|
142
159
|
@schedules = Knockapi::Resources::Schedules.new(client: self)
|
|
143
160
|
@channels = Knockapi::Resources::Channels.new(client: self)
|
|
144
161
|
@audiences = Knockapi::Resources::Audiences.new(client: self)
|
|
@@ -306,6 +306,11 @@ module Knockapi
|
|
|
306
306
|
Knockapi::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
|
|
307
307
|
end
|
|
308
308
|
|
|
309
|
+
# Generated methods always pass `req[:body]` for operations that define a
|
|
310
|
+
# request body, so only elide the content-type header when the operation
|
|
311
|
+
# has no body at all, not when an optional body param was omitted.
|
|
312
|
+
headers.delete("content-type") if body.nil? && !req.key?(:body)
|
|
313
|
+
|
|
309
314
|
url = Knockapi::Internal::Util.join_parsed_uri(
|
|
310
315
|
@base_url_components,
|
|
311
316
|
{**req, path: path, query: query}
|
|
@@ -157,7 +157,7 @@ module Knockapi
|
|
|
157
157
|
in Hash | nil => coerced
|
|
158
158
|
coerced
|
|
159
159
|
else
|
|
160
|
-
message = "Expected a #{Hash} or #{Knockapi::Internal::Type::BaseModel}, got #{
|
|
160
|
+
message = "Expected a #{Hash} or #{Knockapi::Internal::Type::BaseModel}, got #{input.inspect}"
|
|
161
161
|
raise ArgumentError.new(message)
|
|
162
162
|
end
|
|
163
163
|
end
|
|
@@ -237,6 +237,11 @@ module Knockapi
|
|
|
237
237
|
end
|
|
238
238
|
end
|
|
239
239
|
|
|
240
|
+
# @type [Regexp]
|
|
241
|
+
#
|
|
242
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
243
|
+
RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/
|
|
244
|
+
|
|
240
245
|
class << self
|
|
241
246
|
# @api private
|
|
242
247
|
#
|
|
@@ -247,6 +252,15 @@ module Knockapi
|
|
|
247
252
|
"#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
|
|
248
253
|
end
|
|
249
254
|
|
|
255
|
+
# @api private
|
|
256
|
+
#
|
|
257
|
+
# @param path [String, Integer]
|
|
258
|
+
#
|
|
259
|
+
# @return [String]
|
|
260
|
+
def encode_path(path)
|
|
261
|
+
path.to_s.gsub(Knockapi::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
|
|
262
|
+
end
|
|
263
|
+
|
|
250
264
|
# @api private
|
|
251
265
|
#
|
|
252
266
|
# @param path [String, Array<String>]
|
|
@@ -259,7 +273,7 @@ module Knockapi
|
|
|
259
273
|
in []
|
|
260
274
|
""
|
|
261
275
|
in [String => p, *interpolations]
|
|
262
|
-
encoded = interpolations.map {
|
|
276
|
+
encoded = interpolations.map { encode_path(_1) }
|
|
263
277
|
format(p, *encoded)
|
|
264
278
|
end
|
|
265
279
|
end
|
|
@@ -576,10 +590,10 @@ module Knockapi
|
|
|
576
590
|
|
|
577
591
|
case val
|
|
578
592
|
in Knockapi::FilePart unless val.filename.nil?
|
|
579
|
-
filename =
|
|
593
|
+
filename = encode_path(val.filename)
|
|
580
594
|
y << "; filename=\"#{filename}\""
|
|
581
595
|
in Pathname | IO
|
|
582
|
-
filename =
|
|
596
|
+
filename = encode_path(::File.basename(val.to_path))
|
|
583
597
|
y << "; filename=\"#{filename}\""
|
|
584
598
|
else
|
|
585
599
|
end
|
|
@@ -596,6 +610,7 @@ module Knockapi
|
|
|
596
610
|
#
|
|
597
611
|
# @return [Array(String, Enumerable<String>)]
|
|
598
612
|
private def encode_multipart_streaming(body)
|
|
613
|
+
# rubocop:disable Style/CaseEquality
|
|
599
614
|
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
|
|
600
615
|
boundary = SecureRandom.urlsafe_base64(46)
|
|
601
616
|
|
|
@@ -605,7 +620,7 @@ module Knockapi
|
|
|
605
620
|
in Hash
|
|
606
621
|
body.each do |key, val|
|
|
607
622
|
case val
|
|
608
|
-
in Array if val.all? { primitive?(_1) }
|
|
623
|
+
in Array if val.all? { primitive?(_1) || Knockapi::Internal::Type::FileInput === _1 }
|
|
609
624
|
val.each do |v|
|
|
610
625
|
write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
|
|
611
626
|
end
|
|
@@ -621,6 +636,7 @@ module Knockapi
|
|
|
621
636
|
|
|
622
637
|
fused_io = fused_enum(strio) { closing.each(&:call) }
|
|
623
638
|
[boundary, fused_io]
|
|
639
|
+
# rubocop:enable Style/CaseEquality
|
|
624
640
|
end
|
|
625
641
|
|
|
626
642
|
# @api private
|
|
@@ -49,6 +49,7 @@ module Knockapi
|
|
|
49
49
|
EXISTS = :exists
|
|
50
50
|
NOT_EXISTS = :not_exists
|
|
51
51
|
CONTAINS_ALL = :contains_all
|
|
52
|
+
NOT_CONTAINS_ALL = :not_contains_all
|
|
52
53
|
IS_TIMESTAMP = :is_timestamp
|
|
53
54
|
IS_NOT_TIMESTAMP = :is_not_timestamp
|
|
54
55
|
IS_TIMESTAMP_ON_OR_AFTER = :is_timestamp_on_or_after
|
|
@@ -122,6 +122,13 @@ module Knockapi
|
|
|
122
122
|
# @return [Time, nil]
|
|
123
123
|
optional :read_at, Time, nil?: true
|
|
124
124
|
|
|
125
|
+
# @!attribute recipient_snapshot
|
|
126
|
+
# Recipient contact information captured at email send time. Null for non-email
|
|
127
|
+
# channels.
|
|
128
|
+
#
|
|
129
|
+
# @return [Knockapi::Models::Message::RecipientSnapshot, nil]
|
|
130
|
+
optional :recipient_snapshot, -> { Knockapi::Message::RecipientSnapshot }, nil?: true
|
|
131
|
+
|
|
125
132
|
# @!attribute scheduled_at
|
|
126
133
|
# Timestamp when the message was scheduled to be sent.
|
|
127
134
|
#
|
|
@@ -149,7 +156,7 @@ module Knockapi
|
|
|
149
156
|
# @return [String, nil]
|
|
150
157
|
optional :workflow, String, nil?: true
|
|
151
158
|
|
|
152
|
-
# @!method initialize(id:, _typename:, channel_id:, engagement_statuses:, inserted_at:, recipient:, source:, status:, updated_at:, actors: nil, archived_at: nil, channel: nil, clicked_at: nil, data: nil, interacted_at: nil, link_clicked_at: nil, metadata: nil, read_at: nil, scheduled_at: nil, seen_at: nil, tenant: nil, workflow: nil)
|
|
159
|
+
# @!method initialize(id:, _typename:, channel_id:, engagement_statuses:, inserted_at:, recipient:, source:, status:, updated_at:, actors: nil, archived_at: nil, channel: nil, clicked_at: nil, data: nil, interacted_at: nil, link_clicked_at: nil, metadata: nil, read_at: nil, recipient_snapshot: nil, scheduled_at: nil, seen_at: nil, tenant: nil, workflow: nil)
|
|
153
160
|
# Some parameter documentations has been truncated, see
|
|
154
161
|
# {Knockapi::Models::Message} for more details.
|
|
155
162
|
#
|
|
@@ -192,6 +199,8 @@ module Knockapi
|
|
|
192
199
|
#
|
|
193
200
|
# @param read_at [Time, nil] Timestamp when the message was read.
|
|
194
201
|
#
|
|
202
|
+
# @param recipient_snapshot [Knockapi::Models::Message::RecipientSnapshot, nil] Recipient contact information captured at email send time. Null for non-email ch
|
|
203
|
+
#
|
|
195
204
|
# @param scheduled_at [Time, nil] Timestamp when the message was scheduled to be sent.
|
|
196
205
|
#
|
|
197
206
|
# @param seen_at [Time, nil] Timestamp when the message was seen.
|
|
@@ -401,6 +410,29 @@ module Knockapi
|
|
|
401
410
|
# @return [Array<Symbol>]
|
|
402
411
|
end
|
|
403
412
|
end
|
|
413
|
+
|
|
414
|
+
# @see Knockapi::Models::Message#recipient_snapshot
|
|
415
|
+
class RecipientSnapshot < Knockapi::Internal::Type::BaseModel
|
|
416
|
+
# @!attribute email
|
|
417
|
+
# The email address the message was delivered to
|
|
418
|
+
#
|
|
419
|
+
# @return [String, nil]
|
|
420
|
+
optional :email, String
|
|
421
|
+
|
|
422
|
+
# @!attribute name
|
|
423
|
+
# The recipient name at send time
|
|
424
|
+
#
|
|
425
|
+
# @return [String, nil]
|
|
426
|
+
optional :name, String, nil?: true
|
|
427
|
+
|
|
428
|
+
# @!method initialize(email: nil, name: nil)
|
|
429
|
+
# Recipient contact information captured at email send time. Null for non-email
|
|
430
|
+
# channels.
|
|
431
|
+
#
|
|
432
|
+
# @param email [String] The email address the message was delivered to
|
|
433
|
+
#
|
|
434
|
+
# @param name [String, nil] The recipient name at send time
|
|
435
|
+
end
|
|
404
436
|
end
|
|
405
437
|
end
|
|
406
438
|
end
|
|
@@ -66,22 +66,22 @@ module Knockapi
|
|
|
66
66
|
module Type
|
|
67
67
|
extend Knockapi::Internal::Type::Enum
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
MESSAGE_READ = :"message.read"
|
|
70
|
+
MESSAGE_SENT = :"message.sent"
|
|
71
|
+
MESSAGE_SEEN = :"message.seen"
|
|
71
72
|
MESSAGE_CREATED = :"message.created"
|
|
73
|
+
MESSAGE_QUEUED = :"message.queued"
|
|
72
74
|
MESSAGE_DELIVERED = :"message.delivered"
|
|
75
|
+
MESSAGE_BOUNCED = :"message.bounced"
|
|
76
|
+
MESSAGE_UNDELIVERED = :"message.undelivered"
|
|
77
|
+
MESSAGE_NOT_SENT = :"message.not_sent"
|
|
73
78
|
MESSAGE_DELIVERY_ATTEMPTED = :"message.delivery_attempted"
|
|
74
|
-
|
|
79
|
+
MESSAGE_ARCHIVED = :"message.archived"
|
|
75
80
|
MESSAGE_LINK_CLICKED = :"message.link_clicked"
|
|
76
|
-
|
|
77
|
-
MESSAGE_QUEUED = :"message.queued"
|
|
78
|
-
MESSAGE_READ = :"message.read"
|
|
79
|
-
MESSAGE_SEEN = :"message.seen"
|
|
80
|
-
MESSAGE_SENT = :"message.sent"
|
|
81
|
-
MESSAGE_UNARCHIVED = :"message.unarchived"
|
|
82
|
-
MESSAGE_UNDELIVERED = :"message.undelivered"
|
|
83
|
-
MESSAGE_UNREAD = :"message.unread"
|
|
81
|
+
MESSAGE_INTERACTED = :"message.interacted"
|
|
84
82
|
MESSAGE_UNSEEN = :"message.unseen"
|
|
83
|
+
MESSAGE_UNREAD = :"message.unread"
|
|
84
|
+
MESSAGE_UNARCHIVED = :"message.unarchived"
|
|
85
85
|
|
|
86
86
|
# @!method self.values
|
|
87
87
|
# @return [Array<Symbol>]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
# @see Knockapi::Resources::Objects#unset_preferences
|
|
6
|
+
class ObjectUnsetPreferencesParams < Knockapi::Internal::Type::BaseModel
|
|
7
|
+
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Knockapi::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute collection
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :collection, String
|
|
14
|
+
|
|
15
|
+
# @!attribute object_id_
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :object_id_, String
|
|
19
|
+
|
|
20
|
+
# @!attribute id
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :id, String
|
|
24
|
+
|
|
25
|
+
# @!method initialize(collection:, object_id_:, id:, request_options: {})
|
|
26
|
+
# @param collection [String]
|
|
27
|
+
# @param object_id_ [String]
|
|
28
|
+
# @param id [String]
|
|
29
|
+
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -24,17 +24,25 @@ module Knockapi
|
|
|
24
24
|
# @return [Boolean]
|
|
25
25
|
required :ok, Knockapi::Internal::Type::Boolean
|
|
26
26
|
|
|
27
|
+
# @!attribute ms_teams_tenant_id
|
|
28
|
+
# The Microsoft Teams tenant ID for the connected tenant.
|
|
29
|
+
#
|
|
30
|
+
# @return [String, nil]
|
|
31
|
+
optional :ms_teams_tenant_id, String, nil?: true
|
|
32
|
+
|
|
27
33
|
# @!attribute reason
|
|
28
34
|
# The reason for the Microsoft Teams connection if it is not valid.
|
|
29
35
|
#
|
|
30
36
|
# @return [String, nil]
|
|
31
37
|
optional :reason, String, nil?: true
|
|
32
38
|
|
|
33
|
-
# @!method initialize(ok:, reason: nil)
|
|
39
|
+
# @!method initialize(ok:, ms_teams_tenant_id: nil, reason: nil)
|
|
34
40
|
# A Microsoft Teams connection object.
|
|
35
41
|
#
|
|
36
42
|
# @param ok [Boolean] Whether the Microsoft Teams connection is valid.
|
|
37
43
|
#
|
|
44
|
+
# @param ms_teams_tenant_id [String, nil] The Microsoft Teams tenant ID for the connected tenant.
|
|
45
|
+
#
|
|
38
46
|
# @param reason [String, nil] The reason for the Microsoft Teams connection if it is not valid.
|
|
39
47
|
end
|
|
40
48
|
end
|
|
@@ -64,16 +64,31 @@ module Knockapi
|
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
class SlackIncomingWebhookConnection < Knockapi::Internal::Type::BaseModel
|
|
67
|
-
# @!attribute
|
|
68
|
-
#
|
|
67
|
+
# @!attribute incoming_webhook
|
|
68
|
+
# A Slack connection incoming webhook.
|
|
69
69
|
#
|
|
70
|
-
# @return [
|
|
71
|
-
required :
|
|
70
|
+
# @return [Knockapi::Models::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection::IncomingWebhook]
|
|
71
|
+
required :incoming_webhook,
|
|
72
|
+
-> { Knockapi::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection::IncomingWebhook }
|
|
72
73
|
|
|
73
|
-
# @!method initialize(
|
|
74
|
+
# @!method initialize(incoming_webhook:)
|
|
74
75
|
# A Slack connection incoming webhook.
|
|
75
76
|
#
|
|
76
|
-
# @param
|
|
77
|
+
# @param incoming_webhook [Knockapi::Models::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection::IncomingWebhook] A Slack connection incoming webhook.
|
|
78
|
+
|
|
79
|
+
# @see Knockapi::Models::Recipients::SlackChannelData::Connection::SlackIncomingWebhookConnection#incoming_webhook
|
|
80
|
+
class IncomingWebhook < Knockapi::Internal::Type::BaseModel
|
|
81
|
+
# @!attribute url
|
|
82
|
+
# The URL of the incoming webhook for a Slack connection.
|
|
83
|
+
#
|
|
84
|
+
# @return [String]
|
|
85
|
+
required :url, String
|
|
86
|
+
|
|
87
|
+
# @!method initialize(url:)
|
|
88
|
+
# A Slack connection incoming webhook.
|
|
89
|
+
#
|
|
90
|
+
# @param url [String] The URL of the incoming webhook for a Slack connection.
|
|
91
|
+
end
|
|
77
92
|
end
|
|
78
93
|
|
|
79
94
|
# @!method self.variants
|
|
@@ -66,6 +66,32 @@ module Knockapi
|
|
|
66
66
|
|
|
67
67
|
# @see Knockapi::Models::Tenant::Settings#branding
|
|
68
68
|
class Branding < Knockapi::Internal::Type::BaseModel
|
|
69
|
+
# @!attribute dark_icon_url
|
|
70
|
+
# The icon URL for the tenant in dark mode. Falls back to `icon_url` if unset.
|
|
71
|
+
#
|
|
72
|
+
# @return [String, nil]
|
|
73
|
+
optional :dark_icon_url, String, nil?: true
|
|
74
|
+
|
|
75
|
+
# @!attribute dark_logo_url
|
|
76
|
+
# The logo URL for the tenant in dark mode. Falls back to `logo_url` if unset.
|
|
77
|
+
#
|
|
78
|
+
# @return [String, nil]
|
|
79
|
+
optional :dark_logo_url, String, nil?: true
|
|
80
|
+
|
|
81
|
+
# @!attribute dark_primary_color
|
|
82
|
+
# The primary color for the tenant in dark mode, provided as a hex value. Defaults
|
|
83
|
+
# to `#FFFFFF`.
|
|
84
|
+
#
|
|
85
|
+
# @return [String, nil]
|
|
86
|
+
optional :dark_primary_color, String, nil?: true
|
|
87
|
+
|
|
88
|
+
# @!attribute dark_primary_color_contrast
|
|
89
|
+
# The primary color contrast for the tenant in dark mode, provided as a hex value.
|
|
90
|
+
# Defaults to `#000000`.
|
|
91
|
+
#
|
|
92
|
+
# @return [String, nil]
|
|
93
|
+
optional :dark_primary_color_contrast, String, nil?: true
|
|
94
|
+
|
|
69
95
|
# @!attribute icon_url
|
|
70
96
|
# The icon URL for the tenant. Must point to a valid image with an image MIME
|
|
71
97
|
# type.
|
|
@@ -92,12 +118,20 @@ module Knockapi
|
|
|
92
118
|
# @return [String, nil]
|
|
93
119
|
optional :primary_color_contrast, String, nil?: true
|
|
94
120
|
|
|
95
|
-
# @!method initialize(icon_url: nil, logo_url: nil, primary_color: nil, primary_color_contrast: nil)
|
|
121
|
+
# @!method initialize(dark_icon_url: nil, dark_logo_url: nil, dark_primary_color: nil, dark_primary_color_contrast: nil, icon_url: nil, logo_url: nil, primary_color: nil, primary_color_contrast: nil)
|
|
96
122
|
# Some parameter documentations has been truncated, see
|
|
97
123
|
# {Knockapi::Models::Tenant::Settings::Branding} for more details.
|
|
98
124
|
#
|
|
99
125
|
# The branding for the tenant.
|
|
100
126
|
#
|
|
127
|
+
# @param dark_icon_url [String, nil] The icon URL for the tenant in dark mode. Falls back to `icon_url` if unset.
|
|
128
|
+
#
|
|
129
|
+
# @param dark_logo_url [String, nil] The logo URL for the tenant in dark mode. Falls back to `logo_url` if unset.
|
|
130
|
+
#
|
|
131
|
+
# @param dark_primary_color [String, nil] The primary color for the tenant in dark mode, provided as a hex value. Defaults
|
|
132
|
+
#
|
|
133
|
+
# @param dark_primary_color_contrast [String, nil] The primary color contrast for the tenant in dark mode, provided as a hex value.
|
|
134
|
+
#
|
|
101
135
|
# @param icon_url [String, nil] The icon URL for the tenant. Must point to a valid image with an image MIME type
|
|
102
136
|
#
|
|
103
137
|
# @param logo_url [String, nil] The logo URL for the tenant. Must point to a valid image with an image MIME type
|
|
@@ -81,6 +81,32 @@ module Knockapi
|
|
|
81
81
|
|
|
82
82
|
# @see Knockapi::Models::TenantRequest::Settings#branding
|
|
83
83
|
class Branding < Knockapi::Internal::Type::BaseModel
|
|
84
|
+
# @!attribute dark_icon_url
|
|
85
|
+
# The icon URL for the tenant in dark mode. Falls back to `icon_url` if unset.
|
|
86
|
+
#
|
|
87
|
+
# @return [String, nil]
|
|
88
|
+
optional :dark_icon_url, String, nil?: true
|
|
89
|
+
|
|
90
|
+
# @!attribute dark_logo_url
|
|
91
|
+
# The logo URL for the tenant in dark mode. Falls back to `logo_url` if unset.
|
|
92
|
+
#
|
|
93
|
+
# @return [String, nil]
|
|
94
|
+
optional :dark_logo_url, String, nil?: true
|
|
95
|
+
|
|
96
|
+
# @!attribute dark_primary_color
|
|
97
|
+
# The primary color for the tenant in dark mode, provided as a hex value. Defaults
|
|
98
|
+
# to `#FFFFFF`.
|
|
99
|
+
#
|
|
100
|
+
# @return [String, nil]
|
|
101
|
+
optional :dark_primary_color, String, nil?: true
|
|
102
|
+
|
|
103
|
+
# @!attribute dark_primary_color_contrast
|
|
104
|
+
# The primary color contrast for the tenant in dark mode, provided as a hex value.
|
|
105
|
+
# Defaults to `#000000`.
|
|
106
|
+
#
|
|
107
|
+
# @return [String, nil]
|
|
108
|
+
optional :dark_primary_color_contrast, String, nil?: true
|
|
109
|
+
|
|
84
110
|
# @!attribute icon_url
|
|
85
111
|
# The icon URL for the tenant. Must point to a valid image with an image MIME
|
|
86
112
|
# type.
|
|
@@ -107,12 +133,20 @@ module Knockapi
|
|
|
107
133
|
# @return [String, nil]
|
|
108
134
|
optional :primary_color_contrast, String, nil?: true
|
|
109
135
|
|
|
110
|
-
# @!method initialize(icon_url: nil, logo_url: nil, primary_color: nil, primary_color_contrast: nil)
|
|
136
|
+
# @!method initialize(dark_icon_url: nil, dark_logo_url: nil, dark_primary_color: nil, dark_primary_color_contrast: nil, icon_url: nil, logo_url: nil, primary_color: nil, primary_color_contrast: nil)
|
|
111
137
|
# Some parameter documentations has been truncated, see
|
|
112
138
|
# {Knockapi::Models::TenantRequest::Settings::Branding} for more details.
|
|
113
139
|
#
|
|
114
140
|
# The branding for the tenant.
|
|
115
141
|
#
|
|
142
|
+
# @param dark_icon_url [String, nil] The icon URL for the tenant in dark mode. Falls back to `icon_url` if unset.
|
|
143
|
+
#
|
|
144
|
+
# @param dark_logo_url [String, nil] The logo URL for the tenant in dark mode. Falls back to `logo_url` if unset.
|
|
145
|
+
#
|
|
146
|
+
# @param dark_primary_color [String, nil] The primary color for the tenant in dark mode, provided as a hex value. Defaults
|
|
147
|
+
#
|
|
148
|
+
# @param dark_primary_color_contrast [String, nil] The primary color contrast for the tenant in dark mode, provided as a hex value.
|
|
149
|
+
#
|
|
116
150
|
# @param icon_url [String, nil] The icon URL for the tenant. Must point to a valid image with an image MIME type
|
|
117
151
|
#
|
|
118
152
|
# @param logo_url [String, nil] The logo URL for the tenant. Must point to a valid image with an image MIME type
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Knockapi
|
|
4
|
+
module Models
|
|
5
|
+
# @see Knockapi::Resources::Users#unset_preferences
|
|
6
|
+
class UserUnsetPreferencesParams < Knockapi::Internal::Type::BaseModel
|
|
7
|
+
extend Knockapi::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Knockapi::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute user_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :user_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :id, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(user_id:, id:, request_options: {})
|
|
21
|
+
# @param user_id [String]
|
|
22
|
+
# @param id [String]
|
|
23
|
+
# @param request_options [Knockapi::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|