trycourier 4.17.0 → 4.17.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 +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/courier/client.rb +3 -3
- data/lib/courier/models/publish_preferences_response.rb +1 -1
- data/lib/courier/models/{preference_section_archive_params.rb → workspace_preference_archive_params.rb} +2 -2
- data/lib/courier/models/{preference_section_create_params.rb → workspace_preference_create_params.rb} +2 -2
- data/lib/courier/models/{preference_section_create_request.rb → workspace_preference_create_request.rb} +8 -8
- data/lib/courier/models/{preference_section_get_response.rb → workspace_preference_get_response.rb} +15 -15
- data/lib/courier/models/{preference_section_list_params.rb → workspace_preference_list_params.rb} +2 -2
- data/lib/courier/models/workspace_preference_list_response.rb +18 -0
- data/lib/courier/models/{preference_section_publish_params.rb → workspace_preference_publish_params.rb} +2 -2
- data/lib/courier/models/{preference_section_replace_params.rb → workspace_preference_replace_params.rb} +2 -2
- data/lib/courier/models/{preference_section_replace_request.rb → workspace_preference_replace_request.rb} +8 -8
- data/lib/courier/models/{preference_section_retrieve_params.rb → workspace_preference_retrieve_params.rb} +2 -2
- data/lib/courier/models/{preference_topic_create_request.rb → workspace_preference_topic_create_request.rb} +9 -9
- data/lib/courier/models/{preference_topic_get_response.rb → workspace_preference_topic_get_response.rb} +8 -8
- data/lib/courier/models/workspace_preference_topic_list_response.rb +17 -0
- data/lib/courier/models/{preference_topic_replace_request.rb → workspace_preference_topic_replace_request.rb} +8 -8
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rb +2 -2
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rb +3 -3
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rb +2 -2
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rb +3 -3
- data/lib/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rb +2 -2
- data/lib/courier/models.rb +30 -30
- data/lib/courier/resources/notifications/checks.rb +3 -3
- data/lib/courier/resources/{preference_sections → workspace_preferences}/topics.rb +40 -37
- data/lib/courier/resources/{preference_sections.rb → workspace_preferences.rb} +40 -40
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +21 -21
- data/rbi/courier/client.rbi +2 -2
- data/rbi/courier/models/{preference_section_retrieve_params.rbi → workspace_preference_archive_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_create_params.rbi → workspace_preference_create_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_create_request.rbi → workspace_preference_create_request.rbi} +9 -9
- data/rbi/courier/models/{preference_section_get_response.rbi → workspace_preference_get_response.rbi} +17 -16
- data/rbi/courier/models/{preference_section_list_params.rbi → workspace_preference_list_params.rbi} +2 -2
- data/rbi/courier/models/{preference_topic_list_response.rbi → workspace_preference_list_response.rbi} +6 -6
- data/rbi/courier/models/{preference_section_publish_params.rbi → workspace_preference_publish_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_replace_params.rbi → workspace_preference_replace_params.rbi} +2 -2
- data/rbi/courier/models/{preference_section_replace_request.rbi → workspace_preference_replace_request.rbi} +9 -9
- data/rbi/courier/models/{preference_section_archive_params.rbi → workspace_preference_retrieve_params.rbi} +2 -2
- data/rbi/courier/models/{preference_topic_create_request.rbi → workspace_preference_topic_create_request.rbi} +22 -17
- data/rbi/courier/models/{preference_topic_get_response.rbi → workspace_preference_topic_get_response.rbi} +23 -17
- data/rbi/courier/models/workspace_preference_topic_list_response.rbi +36 -0
- data/rbi/courier/models/{preference_topic_replace_request.rbi → workspace_preference_topic_replace_request.rbi} +22 -17
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rbi +2 -2
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rbi +3 -3
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rbi +2 -2
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rbi +3 -3
- data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rbi +2 -2
- data/rbi/courier/models.rbi +43 -36
- data/rbi/courier/resources/notifications/checks.rbi +3 -3
- data/rbi/courier/resources/{preference_sections → workspace_preferences}/topics.rbi +25 -22
- data/rbi/courier/resources/{preference_sections.rbi → workspace_preferences.rbi} +27 -27
- data/sig/courier/client.rbs +1 -1
- data/sig/courier/models/{preference_section_retrieve_params.rbs → workspace_preference_archive_params.rbs} +2 -2
- data/sig/courier/models/{preference_section_create_params.rbs → workspace_preference_create_params.rbs} +2 -2
- data/sig/courier/models/{preference_section_replace_request.rbs → workspace_preference_create_request.rbs} +2 -2
- data/sig/courier/models/{preference_section_get_response.rbs → workspace_preference_get_response.rbs} +6 -6
- data/sig/courier/models/{preference_section_list_params.rbs → workspace_preference_list_params.rbs} +2 -2
- data/sig/courier/models/workspace_preference_list_response.rbs +18 -0
- data/sig/courier/models/{preference_section_publish_params.rbs → workspace_preference_publish_params.rbs} +2 -2
- data/sig/courier/models/{preference_section_replace_params.rbs → workspace_preference_replace_params.rbs} +2 -2
- data/sig/courier/models/{preference_section_create_request.rbs → workspace_preference_replace_request.rbs} +2 -2
- data/sig/courier/models/{preference_section_archive_params.rbs → workspace_preference_retrieve_params.rbs} +2 -2
- data/sig/courier/models/{preference_topic_create_request.rbs → workspace_preference_topic_create_request.rbs} +12 -12
- data/sig/courier/models/{preference_topic_get_response.rbs → workspace_preference_topic_get_response.rbs} +12 -12
- data/sig/courier/models/workspace_preference_topic_list_response.rbs +18 -0
- data/sig/courier/models/{preference_topic_replace_request.rbs → workspace_preference_topic_replace_request.rbs} +12 -12
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rbs +1 -1
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rbs +2 -2
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_list_params.rbs +1 -1
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rbs +2 -2
- data/sig/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rbs +1 -1
- data/sig/courier/models.rbs +30 -30
- data/sig/courier/resources/{preference_sections → workspace_preferences}/topics.rbs +9 -9
- data/sig/courier/resources/{preference_sections.rbs → workspace_preferences.rbs} +6 -6
- metadata +65 -65
- data/lib/courier/models/preference_section_list_response.rb +0 -18
- data/lib/courier/models/preference_topic_list_response.rb +0 -17
- data/rbi/courier/models/preference_section_list_response.rbi +0 -35
- data/sig/courier/models/preference_section_list_response.rbs +0 -18
- data/sig/courier/models/preference_topic_list_response.rbs +0 -16
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferenceTopicReplaceRequest < Courier::Internal::Type::BaseModel
|
|
6
6
|
OrHash =
|
|
7
7
|
T.type_alias do
|
|
8
8
|
T.any(
|
|
9
|
-
Courier::
|
|
9
|
+
Courier::WorkspacePreferenceTopicReplaceRequest,
|
|
10
10
|
Courier::Internal::AnyHash
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# The default subscription status applied when a recipient has not set their own.
|
|
15
15
|
sig do
|
|
16
|
-
returns(
|
|
16
|
+
returns(
|
|
17
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus::OrSymbol
|
|
18
|
+
)
|
|
17
19
|
end
|
|
18
20
|
attr_accessor :default_status
|
|
19
21
|
|
|
@@ -26,7 +28,7 @@ module Courier
|
|
|
26
28
|
returns(
|
|
27
29
|
T.nilable(
|
|
28
30
|
T::Array[
|
|
29
|
-
Courier::
|
|
31
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference::OrSymbol
|
|
30
32
|
]
|
|
31
33
|
)
|
|
32
34
|
)
|
|
@@ -52,12 +54,12 @@ module Courier
|
|
|
52
54
|
sig do
|
|
53
55
|
params(
|
|
54
56
|
default_status:
|
|
55
|
-
Courier::
|
|
57
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus::OrSymbol,
|
|
56
58
|
name: String,
|
|
57
59
|
allowed_preferences:
|
|
58
60
|
T.nilable(
|
|
59
61
|
T::Array[
|
|
60
|
-
Courier::
|
|
62
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference::OrSymbol
|
|
61
63
|
]
|
|
62
64
|
),
|
|
63
65
|
include_unsubscribe_header: T.nilable(T::Boolean),
|
|
@@ -86,12 +88,12 @@ module Courier
|
|
|
86
88
|
override.returns(
|
|
87
89
|
{
|
|
88
90
|
default_status:
|
|
89
|
-
Courier::
|
|
91
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus::OrSymbol,
|
|
90
92
|
name: String,
|
|
91
93
|
allowed_preferences:
|
|
92
94
|
T.nilable(
|
|
93
95
|
T::Array[
|
|
94
|
-
Courier::
|
|
96
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference::OrSymbol
|
|
95
97
|
]
|
|
96
98
|
),
|
|
97
99
|
include_unsubscribe_header: T.nilable(T::Boolean),
|
|
@@ -110,30 +112,33 @@ module Courier
|
|
|
110
112
|
|
|
111
113
|
TaggedSymbol =
|
|
112
114
|
T.type_alias do
|
|
113
|
-
T.all(
|
|
115
|
+
T.all(
|
|
116
|
+
Symbol,
|
|
117
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus
|
|
118
|
+
)
|
|
114
119
|
end
|
|
115
120
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
116
121
|
|
|
117
122
|
OPTED_OUT =
|
|
118
123
|
T.let(
|
|
119
124
|
:OPTED_OUT,
|
|
120
|
-
Courier::
|
|
125
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus::TaggedSymbol
|
|
121
126
|
)
|
|
122
127
|
OPTED_IN =
|
|
123
128
|
T.let(
|
|
124
129
|
:OPTED_IN,
|
|
125
|
-
Courier::
|
|
130
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus::TaggedSymbol
|
|
126
131
|
)
|
|
127
132
|
REQUIRED =
|
|
128
133
|
T.let(
|
|
129
134
|
:REQUIRED,
|
|
130
|
-
Courier::
|
|
135
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus::TaggedSymbol
|
|
131
136
|
)
|
|
132
137
|
|
|
133
138
|
sig do
|
|
134
139
|
override.returns(
|
|
135
140
|
T::Array[
|
|
136
|
-
Courier::
|
|
141
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus::TaggedSymbol
|
|
137
142
|
]
|
|
138
143
|
)
|
|
139
144
|
end
|
|
@@ -149,7 +154,7 @@ module Courier
|
|
|
149
154
|
T.type_alias do
|
|
150
155
|
T.all(
|
|
151
156
|
Symbol,
|
|
152
|
-
Courier::
|
|
157
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference
|
|
153
158
|
)
|
|
154
159
|
end
|
|
155
160
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
@@ -157,18 +162,18 @@ module Courier
|
|
|
157
162
|
SNOOZE =
|
|
158
163
|
T.let(
|
|
159
164
|
:snooze,
|
|
160
|
-
Courier::
|
|
165
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference::TaggedSymbol
|
|
161
166
|
)
|
|
162
167
|
CHANNEL_PREFERENCES =
|
|
163
168
|
T.let(
|
|
164
169
|
:channel_preferences,
|
|
165
|
-
Courier::
|
|
170
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference::TaggedSymbol
|
|
166
171
|
)
|
|
167
172
|
|
|
168
173
|
sig do
|
|
169
174
|
override.returns(
|
|
170
175
|
T::Array[
|
|
171
|
-
Courier::
|
|
176
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference::TaggedSymbol
|
|
172
177
|
]
|
|
173
178
|
)
|
|
174
179
|
end
|
data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_archive_params.rbi
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
5
|
+
module WorkspacePreferences
|
|
6
6
|
class TopicArchiveParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
@@ -10,7 +10,7 @@ module Courier
|
|
|
10
10
|
OrHash =
|
|
11
11
|
T.type_alias do
|
|
12
12
|
T.any(
|
|
13
|
-
Courier::
|
|
13
|
+
Courier::WorkspacePreferences::TopicArchiveParams,
|
|
14
14
|
Courier::Internal::AnyHash
|
|
15
15
|
)
|
|
16
16
|
end
|
data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_create_params.rbi
RENAMED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
class TopicCreateParams < Courier::Models::
|
|
5
|
+
module WorkspacePreferences
|
|
6
|
+
class TopicCreateParams < Courier::Models::WorkspacePreferenceTopicCreateRequest
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
OrHash =
|
|
11
11
|
T.type_alias do
|
|
12
12
|
T.any(
|
|
13
|
-
Courier::
|
|
13
|
+
Courier::WorkspacePreferences::TopicCreateParams,
|
|
14
14
|
Courier::Internal::AnyHash
|
|
15
15
|
)
|
|
16
16
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
5
|
+
module WorkspacePreferences
|
|
6
6
|
class TopicListParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
@@ -10,7 +10,7 @@ module Courier
|
|
|
10
10
|
OrHash =
|
|
11
11
|
T.type_alias do
|
|
12
12
|
T.any(
|
|
13
|
-
Courier::
|
|
13
|
+
Courier::WorkspacePreferences::TopicListParams,
|
|
14
14
|
Courier::Internal::AnyHash
|
|
15
15
|
)
|
|
16
16
|
end
|
data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_replace_params.rbi
RENAMED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
6
|
-
class TopicReplaceParams < Courier::Models::
|
|
5
|
+
module WorkspacePreferences
|
|
6
|
+
class TopicReplaceParams < Courier::Models::WorkspacePreferenceTopicReplaceRequest
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
OrHash =
|
|
11
11
|
T.type_alias do
|
|
12
12
|
T.any(
|
|
13
|
-
Courier::
|
|
13
|
+
Courier::WorkspacePreferences::TopicReplaceParams,
|
|
14
14
|
Courier::Internal::AnyHash
|
|
15
15
|
)
|
|
16
16
|
end
|
data/rbi/courier/models/{preference_sections → workspace_preferences}/topic_retrieve_params.rbi
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Models
|
|
5
|
-
module
|
|
5
|
+
module WorkspacePreferences
|
|
6
6
|
class TopicRetrieveParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
@@ -10,7 +10,7 @@ module Courier
|
|
|
10
10
|
OrHash =
|
|
11
11
|
T.type_alias do
|
|
12
12
|
T.any(
|
|
13
|
-
Courier::
|
|
13
|
+
Courier::WorkspacePreferences::TopicRetrieveParams,
|
|
14
14
|
Courier::Internal::AnyHash
|
|
15
15
|
)
|
|
16
16
|
end
|
data/rbi/courier/models.rbi
CHANGED
|
@@ -381,44 +381,8 @@ module Courier
|
|
|
381
381
|
|
|
382
382
|
Preference = Courier::Models::Preference
|
|
383
383
|
|
|
384
|
-
PreferenceSectionArchiveParams =
|
|
385
|
-
Courier::Models::PreferenceSectionArchiveParams
|
|
386
|
-
|
|
387
|
-
PreferenceSectionCreateParams = Courier::Models::PreferenceSectionCreateParams
|
|
388
|
-
|
|
389
|
-
PreferenceSectionCreateRequest =
|
|
390
|
-
Courier::Models::PreferenceSectionCreateRequest
|
|
391
|
-
|
|
392
|
-
PreferenceSectionGetResponse = Courier::Models::PreferenceSectionGetResponse
|
|
393
|
-
|
|
394
|
-
PreferenceSectionListParams = Courier::Models::PreferenceSectionListParams
|
|
395
|
-
|
|
396
|
-
PreferenceSectionListResponse = Courier::Models::PreferenceSectionListResponse
|
|
397
|
-
|
|
398
|
-
PreferenceSectionPublishParams =
|
|
399
|
-
Courier::Models::PreferenceSectionPublishParams
|
|
400
|
-
|
|
401
|
-
PreferenceSectionReplaceParams =
|
|
402
|
-
Courier::Models::PreferenceSectionReplaceParams
|
|
403
|
-
|
|
404
|
-
PreferenceSectionReplaceRequest =
|
|
405
|
-
Courier::Models::PreferenceSectionReplaceRequest
|
|
406
|
-
|
|
407
|
-
PreferenceSectionRetrieveParams =
|
|
408
|
-
Courier::Models::PreferenceSectionRetrieveParams
|
|
409
|
-
|
|
410
|
-
PreferenceSections = Courier::Models::PreferenceSections
|
|
411
|
-
|
|
412
384
|
PreferenceStatus = Courier::Models::PreferenceStatus
|
|
413
385
|
|
|
414
|
-
PreferenceTopicCreateRequest = Courier::Models::PreferenceTopicCreateRequest
|
|
415
|
-
|
|
416
|
-
PreferenceTopicGetResponse = Courier::Models::PreferenceTopicGetResponse
|
|
417
|
-
|
|
418
|
-
PreferenceTopicListResponse = Courier::Models::PreferenceTopicListResponse
|
|
419
|
-
|
|
420
|
-
PreferenceTopicReplaceRequest = Courier::Models::PreferenceTopicReplaceRequest
|
|
421
|
-
|
|
422
386
|
ProfileCreateParams = Courier::Models::ProfileCreateParams
|
|
423
387
|
|
|
424
388
|
ProfileDeleteParams = Courier::Models::ProfileDeleteParams
|
|
@@ -571,4 +535,47 @@ module Courier
|
|
|
571
535
|
WebhookRecipient = Courier::Models::WebhookRecipient
|
|
572
536
|
|
|
573
537
|
WidgetBackground = Courier::Models::WidgetBackground
|
|
538
|
+
|
|
539
|
+
WorkspacePreferenceArchiveParams =
|
|
540
|
+
Courier::Models::WorkspacePreferenceArchiveParams
|
|
541
|
+
|
|
542
|
+
WorkspacePreferenceCreateParams =
|
|
543
|
+
Courier::Models::WorkspacePreferenceCreateParams
|
|
544
|
+
|
|
545
|
+
WorkspacePreferenceCreateRequest =
|
|
546
|
+
Courier::Models::WorkspacePreferenceCreateRequest
|
|
547
|
+
|
|
548
|
+
WorkspacePreferenceGetResponse =
|
|
549
|
+
Courier::Models::WorkspacePreferenceGetResponse
|
|
550
|
+
|
|
551
|
+
WorkspacePreferenceListParams = Courier::Models::WorkspacePreferenceListParams
|
|
552
|
+
|
|
553
|
+
WorkspacePreferenceListResponse =
|
|
554
|
+
Courier::Models::WorkspacePreferenceListResponse
|
|
555
|
+
|
|
556
|
+
WorkspacePreferencePublishParams =
|
|
557
|
+
Courier::Models::WorkspacePreferencePublishParams
|
|
558
|
+
|
|
559
|
+
WorkspacePreferenceReplaceParams =
|
|
560
|
+
Courier::Models::WorkspacePreferenceReplaceParams
|
|
561
|
+
|
|
562
|
+
WorkspacePreferenceReplaceRequest =
|
|
563
|
+
Courier::Models::WorkspacePreferenceReplaceRequest
|
|
564
|
+
|
|
565
|
+
WorkspacePreferenceRetrieveParams =
|
|
566
|
+
Courier::Models::WorkspacePreferenceRetrieveParams
|
|
567
|
+
|
|
568
|
+
WorkspacePreferences = Courier::Models::WorkspacePreferences
|
|
569
|
+
|
|
570
|
+
WorkspacePreferenceTopicCreateRequest =
|
|
571
|
+
Courier::Models::WorkspacePreferenceTopicCreateRequest
|
|
572
|
+
|
|
573
|
+
WorkspacePreferenceTopicGetResponse =
|
|
574
|
+
Courier::Models::WorkspacePreferenceTopicGetResponse
|
|
575
|
+
|
|
576
|
+
WorkspacePreferenceTopicListResponse =
|
|
577
|
+
Courier::Models::WorkspacePreferenceTopicListResponse
|
|
578
|
+
|
|
579
|
+
WorkspacePreferenceTopicReplaceRequest =
|
|
580
|
+
Courier::Models::WorkspacePreferenceTopicReplaceRequest
|
|
574
581
|
end
|
|
@@ -4,7 +4,7 @@ module Courier
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Notifications
|
|
6
6
|
class Checks
|
|
7
|
-
# Replace the checks for a notification template
|
|
7
|
+
# Replace the submission checks for a notification template.
|
|
8
8
|
sig do
|
|
9
9
|
params(
|
|
10
10
|
submission_id: String,
|
|
@@ -24,7 +24,7 @@ module Courier
|
|
|
24
24
|
)
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
-
# Retrieve the checks for a notification template
|
|
27
|
+
# Retrieve the submission checks for a notification template.
|
|
28
28
|
sig do
|
|
29
29
|
params(
|
|
30
30
|
submission_id: String,
|
|
@@ -41,7 +41,7 @@ module Courier
|
|
|
41
41
|
)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
# Cancel a notification template
|
|
44
|
+
# Cancel a submission for a notification template.
|
|
45
45
|
sig do
|
|
46
46
|
params(
|
|
47
47
|
submission_id: String,
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
|
-
class
|
|
5
|
+
class WorkspacePreferences
|
|
6
6
|
class Topics
|
|
7
|
-
# Create a subscription preference topic inside a
|
|
8
|
-
#
|
|
7
|
+
# Create a subscription preference topic inside a workspace preference. Fails with
|
|
8
|
+
# 404 if the workspace preference does not exist. The topic id is generated and
|
|
9
|
+
# returned.
|
|
9
10
|
sig do
|
|
10
11
|
params(
|
|
11
12
|
section_id: String,
|
|
12
13
|
default_status:
|
|
13
|
-
Courier::
|
|
14
|
+
Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus::OrSymbol,
|
|
14
15
|
name: String,
|
|
15
16
|
allowed_preferences:
|
|
16
17
|
T.nilable(
|
|
17
18
|
T::Array[
|
|
18
|
-
Courier::
|
|
19
|
+
Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference::OrSymbol
|
|
19
20
|
]
|
|
20
21
|
),
|
|
21
22
|
include_unsubscribe_header: T.nilable(T::Boolean),
|
|
@@ -23,10 +24,10 @@ module Courier
|
|
|
23
24
|
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
|
|
24
25
|
topic_data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
25
26
|
request_options: Courier::RequestOptions::OrHash
|
|
26
|
-
).returns(Courier::
|
|
27
|
+
).returns(Courier::WorkspacePreferenceTopicGetResponse)
|
|
27
28
|
end
|
|
28
29
|
def create(
|
|
29
|
-
# Id of the preference
|
|
30
|
+
# Id of the workspace preference to create the topic in.
|
|
30
31
|
section_id,
|
|
31
32
|
# The default subscription status applied when a recipient has not set their own.
|
|
32
33
|
default_status:,
|
|
@@ -45,39 +46,41 @@ module Courier
|
|
|
45
46
|
)
|
|
46
47
|
end
|
|
47
48
|
|
|
48
|
-
# Retrieve a topic within a
|
|
49
|
-
# the topic does not exist, or the topic belongs to a
|
|
49
|
+
# Retrieve a topic within a workspace preference. Returns 404 if the workspace
|
|
50
|
+
# preference does not exist, the topic does not exist, or the topic belongs to a
|
|
51
|
+
# different workspace preference.
|
|
50
52
|
sig do
|
|
51
53
|
params(
|
|
52
54
|
topic_id: String,
|
|
53
55
|
section_id: String,
|
|
54
56
|
request_options: Courier::RequestOptions::OrHash
|
|
55
|
-
).returns(Courier::
|
|
57
|
+
).returns(Courier::WorkspacePreferenceTopicGetResponse)
|
|
56
58
|
end
|
|
57
59
|
def retrieve(
|
|
58
60
|
# Id of the subscription preference topic.
|
|
59
61
|
topic_id,
|
|
60
|
-
# Id of the preference
|
|
62
|
+
# Id of the workspace preference.
|
|
61
63
|
section_id:,
|
|
62
64
|
request_options: {}
|
|
63
65
|
)
|
|
64
66
|
end
|
|
65
67
|
|
|
66
|
-
# List the topics in a preference
|
|
68
|
+
# List the topics in a workspace preference.
|
|
67
69
|
sig do
|
|
68
70
|
params(
|
|
69
71
|
section_id: String,
|
|
70
72
|
request_options: Courier::RequestOptions::OrHash
|
|
71
|
-
).returns(Courier::
|
|
73
|
+
).returns(Courier::WorkspacePreferenceTopicListResponse)
|
|
72
74
|
end
|
|
73
75
|
def list(
|
|
74
|
-
# Id of the preference
|
|
76
|
+
# Id of the workspace preference.
|
|
75
77
|
section_id,
|
|
76
78
|
request_options: {}
|
|
77
79
|
)
|
|
78
80
|
end
|
|
79
81
|
|
|
80
|
-
# Archive a topic and remove it from its
|
|
82
|
+
# Archive a topic and remove it from its workspace preference. Same 404 rules as
|
|
83
|
+
# GET.
|
|
81
84
|
sig do
|
|
82
85
|
params(
|
|
83
86
|
topic_id: String,
|
|
@@ -88,25 +91,25 @@ module Courier
|
|
|
88
91
|
def archive(
|
|
89
92
|
# Id of the subscription preference topic.
|
|
90
93
|
topic_id,
|
|
91
|
-
# Id of the preference
|
|
94
|
+
# Id of the workspace preference.
|
|
92
95
|
section_id:,
|
|
93
96
|
request_options: {}
|
|
94
97
|
)
|
|
95
98
|
end
|
|
96
99
|
|
|
97
|
-
# Replace a topic within a
|
|
98
|
-
# fields are cleared. Same 404 rules as GET.
|
|
100
|
+
# Replace a topic within a workspace preference. Full document replacement;
|
|
101
|
+
# missing optional fields are cleared. Same 404 rules as GET.
|
|
99
102
|
sig do
|
|
100
103
|
params(
|
|
101
104
|
topic_id: String,
|
|
102
105
|
section_id: String,
|
|
103
106
|
default_status:
|
|
104
|
-
Courier::
|
|
107
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus::OrSymbol,
|
|
105
108
|
name: String,
|
|
106
109
|
allowed_preferences:
|
|
107
110
|
T.nilable(
|
|
108
111
|
T::Array[
|
|
109
|
-
Courier::
|
|
112
|
+
Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference::OrSymbol
|
|
110
113
|
]
|
|
111
114
|
),
|
|
112
115
|
include_unsubscribe_header: T.nilable(T::Boolean),
|
|
@@ -114,12 +117,12 @@ module Courier
|
|
|
114
117
|
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
|
|
115
118
|
topic_data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
116
119
|
request_options: Courier::RequestOptions::OrHash
|
|
117
|
-
).returns(Courier::
|
|
120
|
+
).returns(Courier::WorkspacePreferenceTopicGetResponse)
|
|
118
121
|
end
|
|
119
122
|
def replace(
|
|
120
123
|
# Path param: Id of the subscription preference topic.
|
|
121
124
|
topic_id,
|
|
122
|
-
# Path param: Id of the preference
|
|
125
|
+
# Path param: Id of the workspace preference.
|
|
123
126
|
section_id:,
|
|
124
127
|
# Body param: The default subscription status applied when a recipient has not set
|
|
125
128
|
# their own.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Courier
|
|
4
4
|
module Resources
|
|
5
|
-
class
|
|
6
|
-
sig { returns(Courier::Resources::
|
|
5
|
+
class WorkspacePreferences
|
|
6
|
+
sig { returns(Courier::Resources::WorkspacePreferences::Topics) }
|
|
7
7
|
attr_reader :topics
|
|
8
8
|
|
|
9
|
-
# Create a preference
|
|
10
|
-
# returned. Topics are created inside a
|
|
9
|
+
# Create a workspace preference. The workspace preference id is generated and
|
|
10
|
+
# returned. Topics are created inside a workspace preference via POST
|
|
11
11
|
# /preferences/sections/{section_id}/topics.
|
|
12
12
|
sig do
|
|
13
13
|
params(
|
|
@@ -16,45 +16,45 @@ module Courier
|
|
|
16
16
|
routing_options:
|
|
17
17
|
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
|
|
18
18
|
request_options: Courier::RequestOptions::OrHash
|
|
19
|
-
).returns(Courier::
|
|
19
|
+
).returns(Courier::WorkspacePreferenceGetResponse)
|
|
20
20
|
end
|
|
21
21
|
def create(
|
|
22
|
-
# Human-readable name for the
|
|
22
|
+
# Human-readable name for the workspace preference.
|
|
23
23
|
name:,
|
|
24
|
-
# Whether the
|
|
24
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
25
25
|
has_custom_routing: nil,
|
|
26
|
-
# Default channels for the
|
|
26
|
+
# Default channels for the workspace preference. Defaults to empty if omitted.
|
|
27
27
|
routing_options: nil,
|
|
28
28
|
request_options: {}
|
|
29
29
|
)
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
# Retrieve a preference
|
|
32
|
+
# Retrieve a workspace preference by id, including its topics.
|
|
33
33
|
sig do
|
|
34
34
|
params(
|
|
35
35
|
section_id: String,
|
|
36
36
|
request_options: Courier::RequestOptions::OrHash
|
|
37
|
-
).returns(Courier::
|
|
37
|
+
).returns(Courier::WorkspacePreferenceGetResponse)
|
|
38
38
|
end
|
|
39
39
|
def retrieve(
|
|
40
|
-
# Id of the preference
|
|
40
|
+
# Id of the workspace preference.
|
|
41
41
|
section_id,
|
|
42
42
|
request_options: {}
|
|
43
43
|
)
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
# List the workspace's
|
|
47
|
-
# to the workspace of the API key.
|
|
46
|
+
# List the workspace's preferences. Each workspace preference embeds its topics.
|
|
47
|
+
# Scoped to the workspace of the API key.
|
|
48
48
|
sig do
|
|
49
49
|
params(request_options: Courier::RequestOptions::OrHash).returns(
|
|
50
|
-
Courier::
|
|
50
|
+
Courier::WorkspacePreferenceListResponse
|
|
51
51
|
)
|
|
52
52
|
end
|
|
53
53
|
def list(request_options: {})
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
-
# Archive a preference
|
|
57
|
-
# first, otherwise the request fails with 409.
|
|
56
|
+
# Archive a workspace preference. The workspace preference must be empty: delete
|
|
57
|
+
# its topics first, otherwise the request fails with 409.
|
|
58
58
|
sig do
|
|
59
59
|
params(
|
|
60
60
|
section_id: String,
|
|
@@ -62,15 +62,15 @@ module Courier
|
|
|
62
62
|
).void
|
|
63
63
|
end
|
|
64
64
|
def archive(
|
|
65
|
-
# Id of the preference
|
|
65
|
+
# Id of the workspace preference.
|
|
66
66
|
section_id,
|
|
67
67
|
request_options: {}
|
|
68
68
|
)
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
# Publish the workspace's preferences page. Takes a snapshot of every
|
|
72
|
-
# its topics under a new published version, making the current
|
|
73
|
-
# the hosted preferences page (non-draft).
|
|
71
|
+
# Publish the workspace's preferences page. Takes a snapshot of every workspace
|
|
72
|
+
# preference with its topics under a new published version, making the current
|
|
73
|
+
# state visible on the hosted preferences page (non-draft).
|
|
74
74
|
sig do
|
|
75
75
|
params(request_options: Courier::RequestOptions::OrHash).returns(
|
|
76
76
|
Courier::PublishPreferencesResponse
|
|
@@ -79,8 +79,8 @@ module Courier
|
|
|
79
79
|
def publish(request_options: {})
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
-
# Replace a preference
|
|
83
|
-
# are cleared. Topics attached to the
|
|
82
|
+
# Replace a workspace preference. Full document replacement; missing optional
|
|
83
|
+
# fields are cleared. Topics attached to the workspace preference are unaffected.
|
|
84
84
|
sig do
|
|
85
85
|
params(
|
|
86
86
|
section_id: String,
|
|
@@ -89,16 +89,16 @@ module Courier
|
|
|
89
89
|
routing_options:
|
|
90
90
|
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
|
|
91
91
|
request_options: Courier::RequestOptions::OrHash
|
|
92
|
-
).returns(Courier::
|
|
92
|
+
).returns(Courier::WorkspacePreferenceGetResponse)
|
|
93
93
|
end
|
|
94
94
|
def replace(
|
|
95
|
-
# Id of the preference
|
|
95
|
+
# Id of the workspace preference.
|
|
96
96
|
section_id,
|
|
97
|
-
# Human-readable name for the
|
|
97
|
+
# Human-readable name for the workspace preference.
|
|
98
98
|
name:,
|
|
99
|
-
# Whether the
|
|
99
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
100
100
|
has_custom_routing: nil,
|
|
101
|
-
# Default channels for the
|
|
101
|
+
# Default channels for the workspace preference. Omit to clear.
|
|
102
102
|
routing_options: nil,
|
|
103
103
|
request_options: {}
|
|
104
104
|
)
|
data/sig/courier/client.rbs
CHANGED
|
@@ -42,7 +42,7 @@ module Courier
|
|
|
42
42
|
|
|
43
43
|
attr_reader routing_strategies: Courier::Resources::RoutingStrategies
|
|
44
44
|
|
|
45
|
-
attr_reader
|
|
45
|
+
attr_reader workspace_preferences: Courier::Resources::WorkspacePreferences
|
|
46
46
|
|
|
47
47
|
attr_reader profiles: Courier::Resources::Profiles
|
|
48
48
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module Courier
|
|
2
2
|
module Models
|
|
3
|
-
type
|
|
3
|
+
type workspace_preference_archive_params =
|
|
4
4
|
{ section_id: String } & Courier::Internal::Type::request_parameters
|
|
5
5
|
|
|
6
|
-
class
|
|
6
|
+
class WorkspacePreferenceArchiveParams < Courier::Internal::Type::BaseModel
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module Courier
|
|
2
2
|
module Models
|
|
3
|
-
type
|
|
3
|
+
type workspace_preference_create_params =
|
|
4
4
|
{ } & Courier::Internal::Type::request_parameters
|
|
5
5
|
|
|
6
|
-
class
|
|
6
|
+
class WorkspacePreferenceCreateParams < Courier::Models::WorkspacePreferenceCreateRequest
|
|
7
7
|
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Courier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
module Courier
|
|
2
2
|
module Models
|
|
3
|
-
type
|
|
3
|
+
type workspace_preference_create_request =
|
|
4
4
|
{
|
|
5
5
|
name: String,
|
|
6
6
|
has_custom_routing: bool?,
|
|
7
7
|
routing_options: ::Array[Courier::Models::channel_classification]?
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class WorkspacePreferenceCreateRequest < Courier::Internal::Type::BaseModel
|
|
11
11
|
attr_accessor name: String
|
|
12
12
|
|
|
13
13
|
attr_accessor has_custom_routing: bool?
|