knockapi 1.18.0 → 1.20.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 +32 -0
- data/README.md +1 -1
- data/lib/knockapi/client.rb +12 -0
- data/lib/knockapi/internal/transport/base_client.rb +7 -1
- data/lib/knockapi/internal/transport/pooled_net_requester.rb +6 -2
- data/lib/knockapi/models/identify_user_request.rb +2 -2
- data/lib/knockapi/models/inline_identify_user_request.rb +2 -2
- data/lib/knockapi/models/inline_object_request.rb +11 -3
- data/lib/knockapi/models/object_set_params.rb +11 -3
- data/lib/knockapi/models/objects/bulk_add_subscriptions_params.rb +13 -3
- data/lib/knockapi/models/objects/bulk_set_params.rb +11 -3
- data/lib/knockapi/models/recipients/aws_sns_push_channel_data_devices_only.rb +63 -0
- data/lib/knockapi/models/recipients/aws_sns_push_channel_data_target_arns_only.rb +25 -0
- data/lib/knockapi/models/recipients/channel_data.rb +4 -17
- data/lib/knockapi/models/recipients/channel_data_request.rb +8 -162
- data/lib/knockapi/models/recipients/inline_channel_data_request.rb +6 -160
- data/lib/knockapi/models/recipients/one_signal_channel_data_player_ids_only.rb +20 -0
- data/lib/knockapi/models/recipients/preference_set.rb +12 -54
- data/lib/knockapi/models/recipients/preference_set_channel_setting.rb +21 -0
- data/lib/knockapi/models/recipients/preference_set_request.rb +12 -54
- data/lib/knockapi/models/recipients/push_channel_data_devices_only.rb +60 -0
- data/lib/knockapi/models/recipients/push_channel_data_tokens_only.rb +20 -0
- data/lib/knockapi/models/tenant_get_params.rb +14 -1
- data/lib/knockapi/models/tenant_request.rb +11 -3
- data/lib/knockapi/models/tenant_set_params.rb +24 -3
- data/lib/knockapi/models/users/feed_list_items_params.rb +15 -1
- data/lib/knockapi/resources/objects/bulk.rb +1 -1
- data/lib/knockapi/resources/objects.rb +6 -4
- data/lib/knockapi/resources/tenants.rb +23 -7
- data/lib/knockapi/resources/users/feeds.rb +6 -1
- data/lib/knockapi/resources/users.rb +3 -3
- data/lib/knockapi/version.rb +1 -1
- data/lib/knockapi.rb +7 -0
- data/manifest.yaml +1 -0
- data/rbi/knockapi/client.rbi +7 -0
- data/rbi/knockapi/internal/transport/base_client.rbi +5 -0
- data/rbi/knockapi/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/knockapi/internal/type/base_model.rbi +8 -4
- data/rbi/knockapi/models/identify_user_request.rbi +15 -15
- data/rbi/knockapi/models/inline_identify_user_request.rbi +15 -15
- data/rbi/knockapi/models/inline_object_request.rbi +23 -15
- data/rbi/knockapi/models/object_set_params.rbi +28 -20
- data/rbi/knockapi/models/objects/bulk_add_subscriptions_params.rbi +11 -2
- data/rbi/knockapi/models/objects/bulk_set_params.rbi +23 -15
- data/rbi/knockapi/models/recipients/aws_sns_push_channel_data_devices_only.rbi +120 -0
- data/rbi/knockapi/models/recipients/aws_sns_push_channel_data_target_arns_only.rbi +35 -0
- data/rbi/knockapi/models/recipients/channel_data.rbi +2 -30
- data/rbi/knockapi/models/recipients/channel_data_request.rbi +20 -326
- data/rbi/knockapi/models/recipients/inline_channel_data_request.rbi +5 -309
- data/rbi/knockapi/models/recipients/one_signal_channel_data_player_ids_only.rbi +33 -0
- data/rbi/knockapi/models/recipients/preference_set.rbi +6 -109
- data/rbi/knockapi/models/recipients/preference_set_channel_setting.rbi +38 -0
- data/rbi/knockapi/models/recipients/preference_set_request.rbi +12 -115
- data/rbi/knockapi/models/recipients/push_channel_data_devices_only.rbi +114 -0
- data/rbi/knockapi/models/recipients/push_channel_data_tokens_only.rbi +33 -0
- data/rbi/knockapi/models/tenant_get_params.rbi +28 -5
- data/rbi/knockapi/models/tenant_request.rbi +23 -15
- data/rbi/knockapi/models/tenant_set_params.rbi +38 -15
- data/rbi/knockapi/models/users/feed_list_items_params.rbi +17 -0
- data/rbi/knockapi/resources/objects/bulk.rbi +1 -1
- data/rbi/knockapi/resources/objects.rbi +14 -11
- data/rbi/knockapi/resources/tenants.rbi +21 -8
- data/rbi/knockapi/resources/users/feeds.rbi +6 -0
- data/rbi/knockapi/resources/users.rbi +11 -11
- data/sig/knockapi/client.rbs +3 -0
- data/sig/knockapi/internal/transport/base_client.rbs +2 -0
- data/sig/knockapi/internal/transport/pooled_net_requester.rbs +4 -1
- data/sig/knockapi/models/inline_object_request.rbs +5 -0
- data/sig/knockapi/models/object_set_params.rbs +5 -0
- data/sig/knockapi/models/objects/bulk_add_subscriptions_params.rbs +5 -0
- data/sig/knockapi/models/objects/bulk_set_params.rbs +5 -0
- data/sig/knockapi/models/recipients/aws_sns_push_channel_data_devices_only.rbs +44 -0
- data/sig/knockapi/models/recipients/aws_sns_push_channel_data_target_arns_only.rbs +16 -0
- data/sig/knockapi/models/recipients/channel_data.rbs +1 -12
- data/sig/knockapi/models/recipients/channel_data_request.rbs +5 -116
- data/sig/knockapi/models/recipients/inline_channel_data_request.rbs +5 -116
- data/sig/knockapi/models/recipients/one_signal_channel_data_player_ids_only.rbs +16 -0
- data/sig/knockapi/models/recipients/preference_set.rbs +3 -44
- data/sig/knockapi/models/recipients/preference_set_channel_setting.rbs +16 -0
- data/sig/knockapi/models/recipients/preference_set_request.rbs +3 -44
- data/sig/knockapi/models/recipients/push_channel_data_devices_only.rbs +40 -0
- data/sig/knockapi/models/recipients/push_channel_data_tokens_only.rbs +15 -0
- data/sig/knockapi/models/tenant_get_params.rbs +15 -3
- data/sig/knockapi/models/tenant_request.rbs +5 -0
- data/sig/knockapi/models/tenant_set_params.rbs +12 -0
- data/sig/knockapi/models/users/feed_list_items_params.rbs +7 -0
- data/sig/knockapi/resources/objects.rbs +1 -0
- data/sig/knockapi/resources/tenants.rbs +3 -0
- data/sig/knockapi/resources/users/feeds.rbs +1 -0
- metadata +20 -2
|
@@ -353,17 +353,18 @@ module Knockapi
|
|
|
353
353
|
T::Hash[
|
|
354
354
|
Symbol,
|
|
355
355
|
T.any(
|
|
356
|
-
Knockapi::Recipients::
|
|
357
|
-
Knockapi::Recipients::
|
|
358
|
-
Knockapi::Recipients::
|
|
359
|
-
Knockapi::Recipients::
|
|
360
|
-
Knockapi::Recipients::
|
|
356
|
+
Knockapi::Recipients::PushChannelDataTokensOnly::OrHash,
|
|
357
|
+
Knockapi::Recipients::PushChannelDataDevicesOnly::OrHash,
|
|
358
|
+
Knockapi::Recipients::AwsSnsPushChannelDataTargetArnsOnly::OrHash,
|
|
359
|
+
Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly::OrHash,
|
|
360
|
+
Knockapi::Recipients::OneSignalChannelDataPlayerIDsOnly::OrHash,
|
|
361
361
|
Knockapi::Recipients::SlackChannelData::OrHash,
|
|
362
362
|
Knockapi::Recipients::MsTeamsChannelData::OrHash,
|
|
363
363
|
Knockapi::Recipients::DiscordChannelData::OrHash
|
|
364
364
|
)
|
|
365
365
|
],
|
|
366
366
|
locale: T.nilable(String),
|
|
367
|
+
name: T.nilable(String),
|
|
367
368
|
preferences:
|
|
368
369
|
T::Hash[Symbol, Knockapi::Recipients::PreferenceSetRequest::OrHash],
|
|
369
370
|
timezone: T.nilable(String),
|
|
@@ -380,6 +381,8 @@ module Knockapi
|
|
|
380
381
|
# The locale of the object. Used for
|
|
381
382
|
# [message localization](/concepts/translations).
|
|
382
383
|
locale: nil,
|
|
384
|
+
# An optional name for the object.
|
|
385
|
+
name: nil,
|
|
383
386
|
# Inline set preferences for a recipient, where the key is the preference set id.
|
|
384
387
|
# Preferences that are set inline will be merged into any existing preferences
|
|
385
388
|
# rather than replacing them.
|
|
@@ -403,11 +406,11 @@ module Knockapi
|
|
|
403
406
|
channel_id: String,
|
|
404
407
|
data:
|
|
405
408
|
T.any(
|
|
406
|
-
Knockapi::Recipients::
|
|
407
|
-
Knockapi::Recipients::
|
|
408
|
-
Knockapi::Recipients::
|
|
409
|
-
Knockapi::Recipients::
|
|
410
|
-
Knockapi::Recipients::
|
|
409
|
+
Knockapi::Recipients::PushChannelDataTokensOnly::OrHash,
|
|
410
|
+
Knockapi::Recipients::PushChannelDataDevicesOnly::OrHash,
|
|
411
|
+
Knockapi::Recipients::AwsSnsPushChannelDataTargetArnsOnly::OrHash,
|
|
412
|
+
Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly::OrHash,
|
|
413
|
+
Knockapi::Recipients::OneSignalChannelDataPlayerIDsOnly::OrHash,
|
|
411
414
|
Knockapi::Recipients::SlackChannelData::OrHash,
|
|
412
415
|
Knockapi::Recipients::MsTeamsChannelData::OrHash,
|
|
413
416
|
Knockapi::Recipients::DiscordChannelData::OrHash
|
|
@@ -461,7 +464,7 @@ module Knockapi
|
|
|
461
464
|
Symbol,
|
|
462
465
|
T.any(
|
|
463
466
|
T::Boolean,
|
|
464
|
-
Knockapi::Recipients::
|
|
467
|
+
Knockapi::Recipients::PreferenceSetChannelSetting::OrHash
|
|
465
468
|
)
|
|
466
469
|
]
|
|
467
470
|
),
|
|
@@ -50,12 +50,17 @@ module Knockapi
|
|
|
50
50
|
sig do
|
|
51
51
|
params(
|
|
52
52
|
id: String,
|
|
53
|
+
resolve_full_preference_settings: T::Boolean,
|
|
53
54
|
request_options: Knockapi::RequestOptions::OrHash
|
|
54
55
|
).returns(Knockapi::Tenant)
|
|
55
56
|
end
|
|
56
57
|
def get(
|
|
57
58
|
# The unique identifier for the tenant.
|
|
58
59
|
id,
|
|
60
|
+
# When true, merges environment-level default preferences into the tenant's
|
|
61
|
+
# `settings.preference_set` field before returning the response. Defaults to
|
|
62
|
+
# false.
|
|
63
|
+
resolve_full_preference_settings: nil,
|
|
59
64
|
request_options: {}
|
|
60
65
|
)
|
|
61
66
|
end
|
|
@@ -65,32 +70,40 @@ module Knockapi
|
|
|
65
70
|
sig do
|
|
66
71
|
params(
|
|
67
72
|
id: String,
|
|
73
|
+
resolve_full_preference_settings: T::Boolean,
|
|
68
74
|
channel_data:
|
|
69
75
|
T.nilable(
|
|
70
76
|
T::Hash[
|
|
71
77
|
Symbol,
|
|
72
78
|
T.any(
|
|
73
|
-
Knockapi::Recipients::
|
|
74
|
-
Knockapi::Recipients::
|
|
75
|
-
Knockapi::Recipients::
|
|
76
|
-
Knockapi::Recipients::
|
|
77
|
-
Knockapi::Recipients::
|
|
79
|
+
Knockapi::Recipients::PushChannelDataTokensOnly::OrHash,
|
|
80
|
+
Knockapi::Recipients::PushChannelDataDevicesOnly::OrHash,
|
|
81
|
+
Knockapi::Recipients::AwsSnsPushChannelDataTargetArnsOnly::OrHash,
|
|
82
|
+
Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly::OrHash,
|
|
83
|
+
Knockapi::Recipients::OneSignalChannelDataPlayerIDsOnly::OrHash,
|
|
78
84
|
Knockapi::Recipients::SlackChannelData::OrHash,
|
|
79
85
|
Knockapi::Recipients::MsTeamsChannelData::OrHash,
|
|
80
86
|
Knockapi::Recipients::DiscordChannelData::OrHash
|
|
81
87
|
)
|
|
82
88
|
]
|
|
83
89
|
),
|
|
90
|
+
name: T.nilable(String),
|
|
84
91
|
settings: Knockapi::TenantSetParams::Settings::OrHash,
|
|
85
92
|
request_options: Knockapi::RequestOptions::OrHash
|
|
86
93
|
).returns(Knockapi::Tenant)
|
|
87
94
|
end
|
|
88
95
|
def set(
|
|
89
|
-
# The unique identifier for the tenant.
|
|
96
|
+
# Path param: The unique identifier for the tenant.
|
|
90
97
|
id,
|
|
91
|
-
#
|
|
98
|
+
# Query param: When true, merges environment-level default preferences into the
|
|
99
|
+
# tenant's `settings.preference_set` field before returning the response. Defaults
|
|
100
|
+
# to false.
|
|
101
|
+
resolve_full_preference_settings: nil,
|
|
102
|
+
# Body param: A request to set channel data for a type of channel inline.
|
|
92
103
|
channel_data: nil,
|
|
93
|
-
#
|
|
104
|
+
# Body param: An optional name for the tenant.
|
|
105
|
+
name: nil,
|
|
106
|
+
# Body param: The settings for the tenant. Includes branding and preference set.
|
|
94
107
|
settings: nil,
|
|
95
108
|
request_options: {}
|
|
96
109
|
)
|
|
@@ -43,6 +43,7 @@ module Knockapi
|
|
|
43
43
|
archived: Knockapi::Users::FeedListItemsParams::Archived::OrSymbol,
|
|
44
44
|
before: String,
|
|
45
45
|
has_tenant: T::Boolean,
|
|
46
|
+
locale: String,
|
|
46
47
|
page_size: Integer,
|
|
47
48
|
source: String,
|
|
48
49
|
status: Knockapi::Users::FeedListItemsParams::Status::OrSymbol,
|
|
@@ -69,6 +70,11 @@ module Knockapi
|
|
|
69
70
|
before: nil,
|
|
70
71
|
# Whether the feed items have a tenant.
|
|
71
72
|
has_tenant: nil,
|
|
73
|
+
# The locale to render the feed items in. Must be in the IETF 5646 format (e.g.
|
|
74
|
+
# `en-US`). When not provided, will default to the locale that the feed items were
|
|
75
|
+
# rendered in. Only available for enterprise plan customers using custom
|
|
76
|
+
# translations.
|
|
77
|
+
locale: nil,
|
|
72
78
|
# The number of items per page (defaults to 50).
|
|
73
79
|
page_size: nil,
|
|
74
80
|
# The workflow key associated with the message in the feed.
|
|
@@ -24,11 +24,11 @@ module Knockapi
|
|
|
24
24
|
T::Hash[
|
|
25
25
|
Symbol,
|
|
26
26
|
T.any(
|
|
27
|
-
Knockapi::Recipients::
|
|
28
|
-
Knockapi::Recipients::
|
|
29
|
-
Knockapi::Recipients::
|
|
30
|
-
Knockapi::Recipients::
|
|
31
|
-
Knockapi::Recipients::
|
|
27
|
+
Knockapi::Recipients::PushChannelDataTokensOnly::OrHash,
|
|
28
|
+
Knockapi::Recipients::PushChannelDataDevicesOnly::OrHash,
|
|
29
|
+
Knockapi::Recipients::AwsSnsPushChannelDataTargetArnsOnly::OrHash,
|
|
30
|
+
Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly::OrHash,
|
|
31
|
+
Knockapi::Recipients::OneSignalChannelDataPlayerIDsOnly::OrHash,
|
|
32
32
|
Knockapi::Recipients::SlackChannelData::OrHash,
|
|
33
33
|
Knockapi::Recipients::MsTeamsChannelData::OrHash,
|
|
34
34
|
Knockapi::Recipients::DiscordChannelData::OrHash
|
|
@@ -345,11 +345,11 @@ module Knockapi
|
|
|
345
345
|
channel_id: String,
|
|
346
346
|
data:
|
|
347
347
|
T.any(
|
|
348
|
-
Knockapi::Recipients::
|
|
349
|
-
Knockapi::Recipients::
|
|
350
|
-
Knockapi::Recipients::
|
|
351
|
-
Knockapi::Recipients::
|
|
352
|
-
Knockapi::Recipients::
|
|
348
|
+
Knockapi::Recipients::PushChannelDataTokensOnly::OrHash,
|
|
349
|
+
Knockapi::Recipients::PushChannelDataDevicesOnly::OrHash,
|
|
350
|
+
Knockapi::Recipients::AwsSnsPushChannelDataTargetArnsOnly::OrHash,
|
|
351
|
+
Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly::OrHash,
|
|
352
|
+
Knockapi::Recipients::OneSignalChannelDataPlayerIDsOnly::OrHash,
|
|
353
353
|
Knockapi::Recipients::SlackChannelData::OrHash,
|
|
354
354
|
Knockapi::Recipients::MsTeamsChannelData::OrHash,
|
|
355
355
|
Knockapi::Recipients::DiscordChannelData::OrHash
|
|
@@ -396,7 +396,7 @@ module Knockapi
|
|
|
396
396
|
Symbol,
|
|
397
397
|
T.any(
|
|
398
398
|
T::Boolean,
|
|
399
|
-
Knockapi::Recipients::
|
|
399
|
+
Knockapi::Recipients::PreferenceSetChannelSetting::OrHash
|
|
400
400
|
)
|
|
401
401
|
]
|
|
402
402
|
),
|
data/sig/knockapi/client.rbs
CHANGED
|
@@ -10,6 +10,8 @@ module Knockapi
|
|
|
10
10
|
|
|
11
11
|
attr_reader api_key: String
|
|
12
12
|
|
|
13
|
+
attr_reader branch: String?
|
|
14
|
+
|
|
13
15
|
attr_reader recipients: Knockapi::Resources::Recipients
|
|
14
16
|
|
|
15
17
|
attr_reader users: Knockapi::Resources::Users
|
|
@@ -38,6 +40,7 @@ module Knockapi
|
|
|
38
40
|
|
|
39
41
|
def initialize: (
|
|
40
42
|
?api_key: String?,
|
|
43
|
+
?branch: String?,
|
|
41
44
|
?base_url: String?,
|
|
42
45
|
?max_retries: Integer,
|
|
43
46
|
?timeout: Float,
|
|
@@ -17,7 +17,10 @@ module Knockapi
|
|
|
17
17
|
|
|
18
18
|
DEFAULT_MAX_CONNECTIONS: Integer
|
|
19
19
|
|
|
20
|
-
def self.connect: (
|
|
20
|
+
def self.connect: (
|
|
21
|
+
cert_store: OpenSSL::X509::Store,
|
|
22
|
+
url: URI::Generic
|
|
23
|
+
) -> top
|
|
21
24
|
|
|
22
25
|
def self.calibrate_socket_timeout: (top conn, Float deadline) -> void
|
|
23
26
|
|
|
@@ -6,6 +6,7 @@ module Knockapi
|
|
|
6
6
|
collection: String,
|
|
7
7
|
channel_data: Knockapi::Models::Recipients::inline_channel_data_request?,
|
|
8
8
|
created_at: Time?,
|
|
9
|
+
name: String?,
|
|
9
10
|
preferences: Knockapi::Models::Recipients::inline_preference_set_request?
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -18,6 +19,8 @@ module Knockapi
|
|
|
18
19
|
|
|
19
20
|
attr_accessor created_at: Time?
|
|
20
21
|
|
|
22
|
+
attr_accessor name: String?
|
|
23
|
+
|
|
21
24
|
attr_accessor preferences: Knockapi::Models::Recipients::inline_preference_set_request?
|
|
22
25
|
|
|
23
26
|
def initialize: (
|
|
@@ -25,6 +28,7 @@ module Knockapi
|
|
|
25
28
|
collection: String,
|
|
26
29
|
?channel_data: Knockapi::Models::Recipients::inline_channel_data_request?,
|
|
27
30
|
?created_at: Time?,
|
|
31
|
+
?name: String?,
|
|
28
32
|
?preferences: Knockapi::Models::Recipients::inline_preference_set_request?
|
|
29
33
|
) -> void
|
|
30
34
|
|
|
@@ -33,6 +37,7 @@ module Knockapi
|
|
|
33
37
|
collection: String,
|
|
34
38
|
channel_data: Knockapi::Models::Recipients::inline_channel_data_request?,
|
|
35
39
|
created_at: Time?,
|
|
40
|
+
name: String?,
|
|
36
41
|
preferences: Knockapi::Models::Recipients::inline_preference_set_request?
|
|
37
42
|
}
|
|
38
43
|
end
|
|
@@ -4,6 +4,7 @@ module Knockapi
|
|
|
4
4
|
{
|
|
5
5
|
channel_data: Knockapi::Models::Recipients::inline_channel_data_request,
|
|
6
6
|
locale: String?,
|
|
7
|
+
name: String?,
|
|
7
8
|
preferences: Knockapi::Models::Recipients::inline_preference_set_request,
|
|
8
9
|
timezone: String?
|
|
9
10
|
}
|
|
@@ -21,6 +22,8 @@ module Knockapi
|
|
|
21
22
|
|
|
22
23
|
attr_accessor locale: String?
|
|
23
24
|
|
|
25
|
+
attr_accessor name: String?
|
|
26
|
+
|
|
24
27
|
attr_reader preferences: Knockapi::Models::Recipients::inline_preference_set_request?
|
|
25
28
|
|
|
26
29
|
def preferences=: (
|
|
@@ -32,6 +35,7 @@ module Knockapi
|
|
|
32
35
|
def initialize: (
|
|
33
36
|
?channel_data: Knockapi::Models::Recipients::inline_channel_data_request,
|
|
34
37
|
?locale: String?,
|
|
38
|
+
?name: String?,
|
|
35
39
|
?preferences: Knockapi::Models::Recipients::inline_preference_set_request,
|
|
36
40
|
?timezone: String?,
|
|
37
41
|
?request_options: Knockapi::request_opts
|
|
@@ -40,6 +44,7 @@ module Knockapi
|
|
|
40
44
|
def to_hash: -> {
|
|
41
45
|
channel_data: Knockapi::Models::Recipients::inline_channel_data_request,
|
|
42
46
|
locale: String?,
|
|
47
|
+
name: String?,
|
|
43
48
|
preferences: Knockapi::Models::Recipients::inline_preference_set_request,
|
|
44
49
|
timezone: String?,
|
|
45
50
|
request_options: Knockapi::RequestOptions
|
|
@@ -25,21 +25,26 @@ module Knockapi
|
|
|
25
25
|
|
|
26
26
|
type subscription =
|
|
27
27
|
{
|
|
28
|
+
id: String,
|
|
28
29
|
recipients: ::Array[Knockapi::Models::recipient_request],
|
|
29
30
|
properties: ::Hash[Symbol, top]?
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
class Subscription < Knockapi::Internal::Type::BaseModel
|
|
34
|
+
attr_accessor id: String
|
|
35
|
+
|
|
33
36
|
attr_accessor recipients: ::Array[Knockapi::Models::recipient_request]
|
|
34
37
|
|
|
35
38
|
attr_accessor properties: ::Hash[Symbol, top]?
|
|
36
39
|
|
|
37
40
|
def initialize: (
|
|
41
|
+
id: String,
|
|
38
42
|
recipients: ::Array[Knockapi::Models::recipient_request],
|
|
39
43
|
?properties: ::Hash[Symbol, top]?
|
|
40
44
|
) -> void
|
|
41
45
|
|
|
42
46
|
def to_hash: -> {
|
|
47
|
+
id: String,
|
|
43
48
|
recipients: ::Array[Knockapi::Models::recipient_request],
|
|
44
49
|
properties: ::Hash[Symbol, top]?
|
|
45
50
|
}
|
|
@@ -26,6 +26,7 @@ module Knockapi
|
|
|
26
26
|
id: String,
|
|
27
27
|
channel_data: Knockapi::Models::Recipients::inline_channel_data_request?,
|
|
28
28
|
created_at: Time?,
|
|
29
|
+
name: String?,
|
|
29
30
|
preferences: Knockapi::Models::Recipients::inline_preference_set_request?
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -36,12 +37,15 @@ module Knockapi
|
|
|
36
37
|
|
|
37
38
|
attr_accessor created_at: Time?
|
|
38
39
|
|
|
40
|
+
attr_accessor name: String?
|
|
41
|
+
|
|
39
42
|
attr_accessor preferences: Knockapi::Models::Recipients::inline_preference_set_request?
|
|
40
43
|
|
|
41
44
|
def initialize: (
|
|
42
45
|
id: String,
|
|
43
46
|
?channel_data: Knockapi::Models::Recipients::inline_channel_data_request?,
|
|
44
47
|
?created_at: Time?,
|
|
48
|
+
?name: String?,
|
|
45
49
|
?preferences: Knockapi::Models::Recipients::inline_preference_set_request?
|
|
46
50
|
) -> void
|
|
47
51
|
|
|
@@ -49,6 +53,7 @@ module Knockapi
|
|
|
49
53
|
id: String,
|
|
50
54
|
channel_data: Knockapi::Models::Recipients::inline_channel_data_request?,
|
|
51
55
|
created_at: Time?,
|
|
56
|
+
name: String?,
|
|
52
57
|
preferences: Knockapi::Models::Recipients::inline_preference_set_request?
|
|
53
58
|
}
|
|
54
59
|
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module Knockapi
|
|
2
|
+
module Models
|
|
3
|
+
module Recipients
|
|
4
|
+
type aws_sns_push_channel_data_devices_only =
|
|
5
|
+
{
|
|
6
|
+
devices: ::Array[Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly::Device]
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
class AwsSnsPushChannelDataDevicesOnly < Knockapi::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor devices: ::Array[Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly::Device]
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
devices: ::Array[Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly::Device]
|
|
14
|
+
) -> void
|
|
15
|
+
|
|
16
|
+
def to_hash: -> {
|
|
17
|
+
devices: ::Array[Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly::Device]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type device = { target_arn: String, locale: String?, timezone: String? }
|
|
21
|
+
|
|
22
|
+
class Device < Knockapi::Internal::Type::BaseModel
|
|
23
|
+
attr_accessor target_arn: String
|
|
24
|
+
|
|
25
|
+
attr_accessor locale: String?
|
|
26
|
+
|
|
27
|
+
attr_accessor timezone: String?
|
|
28
|
+
|
|
29
|
+
def initialize: (
|
|
30
|
+
target_arn: String,
|
|
31
|
+
?locale: String?,
|
|
32
|
+
?timezone: String?
|
|
33
|
+
) -> void
|
|
34
|
+
|
|
35
|
+
def to_hash: -> {
|
|
36
|
+
target_arn: String,
|
|
37
|
+
locale: String?,
|
|
38
|
+
timezone: String?
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Knockapi
|
|
2
|
+
module Models
|
|
3
|
+
module Recipients
|
|
4
|
+
type aws_sns_push_channel_data_target_arns_only =
|
|
5
|
+
{ target_arns: ::Array[String] }
|
|
6
|
+
|
|
7
|
+
class AwsSnsPushChannelDataTargetArnsOnly < Knockapi::Internal::Type::BaseModel
|
|
8
|
+
attr_accessor target_arns: ::Array[String]
|
|
9
|
+
|
|
10
|
+
def initialize: (target_arns: ::Array[String]) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { target_arns: ::Array[String] }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -39,7 +39,7 @@ module Knockapi
|
|
|
39
39
|
type data =
|
|
40
40
|
Knockapi::Recipients::RecipientsChannelData::Data::PushChannelDataFull
|
|
41
41
|
| Knockapi::Recipients::RecipientsChannelData::Data::AwssnsPushChannelDataFull
|
|
42
|
-
| Knockapi::Recipients::
|
|
42
|
+
| Knockapi::Recipients::OneSignalChannelDataPlayerIDsOnly
|
|
43
43
|
| Knockapi::Recipients::SlackChannelData
|
|
44
44
|
| Knockapi::Recipients::MsTeamsChannelData
|
|
45
45
|
| Knockapi::Recipients::DiscordChannelData
|
|
@@ -136,17 +136,6 @@ module Knockapi
|
|
|
136
136
|
end
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
-
type one_signal_channel_data_player_ids_only =
|
|
140
|
-
{ player_ids: ::Array[String] }
|
|
141
|
-
|
|
142
|
-
class OneSignalChannelDataPlayerIDsOnly < Knockapi::Internal::Type::BaseModel
|
|
143
|
-
attr_accessor player_ids: ::Array[String]
|
|
144
|
-
|
|
145
|
-
def initialize: (player_ids: ::Array[String]) -> void
|
|
146
|
-
|
|
147
|
-
def to_hash: -> { player_ids: ::Array[String] }
|
|
148
|
-
end
|
|
149
|
-
|
|
150
139
|
def self?.variants: -> ::Array[Knockapi::Models::Recipients::RecipientsChannelData::data]
|
|
151
140
|
end
|
|
152
141
|
|
|
@@ -16,11 +16,11 @@ module Knockapi
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
type data =
|
|
19
|
-
Knockapi::Recipients::
|
|
20
|
-
| Knockapi::Recipients::
|
|
21
|
-
| Knockapi::Recipients::
|
|
22
|
-
| Knockapi::Recipients::
|
|
23
|
-
| Knockapi::Recipients::
|
|
19
|
+
Knockapi::Recipients::PushChannelDataTokensOnly
|
|
20
|
+
| Knockapi::Recipients::PushChannelDataDevicesOnly
|
|
21
|
+
| Knockapi::Recipients::AwsSnsPushChannelDataTargetArnsOnly
|
|
22
|
+
| Knockapi::Recipients::AwsSnsPushChannelDataDevicesOnly
|
|
23
|
+
| Knockapi::Recipients::OneSignalChannelDataPlayerIDsOnly
|
|
24
24
|
| Knockapi::Recipients::SlackChannelData
|
|
25
25
|
| Knockapi::Recipients::MsTeamsChannelData
|
|
26
26
|
| Knockapi::Recipients::DiscordChannelData
|
|
@@ -28,117 +28,6 @@ module Knockapi
|
|
|
28
28
|
module Data
|
|
29
29
|
extend Knockapi::Internal::Type::Union
|
|
30
30
|
|
|
31
|
-
type push_channel_data_tokens_only = { tokens: ::Array[String] }
|
|
32
|
-
|
|
33
|
-
class PushChannelDataTokensOnly < Knockapi::Internal::Type::BaseModel
|
|
34
|
-
attr_accessor tokens: ::Array[String]
|
|
35
|
-
|
|
36
|
-
def initialize: (tokens: ::Array[String]) -> void
|
|
37
|
-
|
|
38
|
-
def to_hash: -> { tokens: ::Array[String] }
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
type push_channel_data_devices_only =
|
|
42
|
-
{
|
|
43
|
-
devices: ::Array[Knockapi::Recipients::ChannelDataRequest::Data::PushChannelDataDevicesOnly::Device]
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
class PushChannelDataDevicesOnly < Knockapi::Internal::Type::BaseModel
|
|
47
|
-
attr_accessor devices: ::Array[Knockapi::Recipients::ChannelDataRequest::Data::PushChannelDataDevicesOnly::Device]
|
|
48
|
-
|
|
49
|
-
def initialize: (
|
|
50
|
-
devices: ::Array[Knockapi::Recipients::ChannelDataRequest::Data::PushChannelDataDevicesOnly::Device]
|
|
51
|
-
) -> void
|
|
52
|
-
|
|
53
|
-
def to_hash: -> {
|
|
54
|
-
devices: ::Array[Knockapi::Recipients::ChannelDataRequest::Data::PushChannelDataDevicesOnly::Device]
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
type device = { token: String, locale: String?, timezone: String? }
|
|
58
|
-
|
|
59
|
-
class Device < Knockapi::Internal::Type::BaseModel
|
|
60
|
-
attr_accessor token: String
|
|
61
|
-
|
|
62
|
-
attr_accessor locale: String?
|
|
63
|
-
|
|
64
|
-
attr_accessor timezone: String?
|
|
65
|
-
|
|
66
|
-
def initialize: (
|
|
67
|
-
token: String,
|
|
68
|
-
?locale: String?,
|
|
69
|
-
?timezone: String?
|
|
70
|
-
) -> void
|
|
71
|
-
|
|
72
|
-
def to_hash: -> {
|
|
73
|
-
token: String,
|
|
74
|
-
locale: String?,
|
|
75
|
-
timezone: String?
|
|
76
|
-
}
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
type awssns_push_channel_data_target_ar_ns_only =
|
|
81
|
-
{ target_arns: ::Array[String] }
|
|
82
|
-
|
|
83
|
-
class AwssnsPushChannelDataTargetArNsOnly < Knockapi::Internal::Type::BaseModel
|
|
84
|
-
attr_accessor target_arns: ::Array[String]
|
|
85
|
-
|
|
86
|
-
def initialize: (target_arns: ::Array[String]) -> void
|
|
87
|
-
|
|
88
|
-
def to_hash: -> { target_arns: ::Array[String] }
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
type awssns_push_channel_data_devices_only =
|
|
92
|
-
{
|
|
93
|
-
devices: ::Array[Knockapi::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataDevicesOnly::Device]
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
class AwssnsPushChannelDataDevicesOnly < Knockapi::Internal::Type::BaseModel
|
|
97
|
-
attr_accessor devices: ::Array[Knockapi::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataDevicesOnly::Device]
|
|
98
|
-
|
|
99
|
-
def initialize: (
|
|
100
|
-
devices: ::Array[Knockapi::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataDevicesOnly::Device]
|
|
101
|
-
) -> void
|
|
102
|
-
|
|
103
|
-
def to_hash: -> {
|
|
104
|
-
devices: ::Array[Knockapi::Recipients::ChannelDataRequest::Data::AwssnsPushChannelDataDevicesOnly::Device]
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
type device =
|
|
108
|
-
{ target_arn: String, locale: String?, timezone: String? }
|
|
109
|
-
|
|
110
|
-
class Device < Knockapi::Internal::Type::BaseModel
|
|
111
|
-
attr_accessor target_arn: String
|
|
112
|
-
|
|
113
|
-
attr_accessor locale: String?
|
|
114
|
-
|
|
115
|
-
attr_accessor timezone: String?
|
|
116
|
-
|
|
117
|
-
def initialize: (
|
|
118
|
-
target_arn: String,
|
|
119
|
-
?locale: String?,
|
|
120
|
-
?timezone: String?
|
|
121
|
-
) -> void
|
|
122
|
-
|
|
123
|
-
def to_hash: -> {
|
|
124
|
-
target_arn: String,
|
|
125
|
-
locale: String?,
|
|
126
|
-
timezone: String?
|
|
127
|
-
}
|
|
128
|
-
end
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
type one_signal_channel_data_player_ids_only =
|
|
132
|
-
{ player_ids: ::Array[String] }
|
|
133
|
-
|
|
134
|
-
class OneSignalChannelDataPlayerIDsOnly < Knockapi::Internal::Type::BaseModel
|
|
135
|
-
attr_accessor player_ids: ::Array[String]
|
|
136
|
-
|
|
137
|
-
def initialize: (player_ids: ::Array[String]) -> void
|
|
138
|
-
|
|
139
|
-
def to_hash: -> { player_ids: ::Array[String] }
|
|
140
|
-
end
|
|
141
|
-
|
|
142
31
|
def self?.variants: -> ::Array[Knockapi::Models::Recipients::ChannelDataRequest::data]
|
|
143
32
|
end
|
|
144
33
|
end
|