trycourier 4.16.0 → 4.17.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.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/lib/courier/client.rb +4 -0
  4. data/lib/courier/models/preference_section_archive_params.rb +20 -0
  5. data/lib/courier/models/preference_section_create_params.rb +14 -0
  6. data/lib/courier/models/preference_section_create_request.rb +36 -0
  7. data/lib/courier/models/preference_section_get_response.rb +83 -0
  8. data/lib/courier/models/preference_section_list_params.rb +14 -0
  9. data/lib/courier/models/preference_section_list_response.rb +18 -0
  10. data/lib/courier/models/preference_section_publish_params.rb +14 -0
  11. data/lib/courier/models/preference_section_replace_params.rb +20 -0
  12. data/lib/courier/models/preference_section_replace_request.rb +37 -0
  13. data/lib/courier/models/preference_section_retrieve_params.rb +20 -0
  14. data/lib/courier/models/preference_sections/topic_archive_params.rb +28 -0
  15. data/lib/courier/models/preference_sections/topic_create_params.rb +22 -0
  16. data/lib/courier/models/preference_sections/topic_list_params.rb +22 -0
  17. data/lib/courier/models/preference_sections/topic_replace_params.rb +28 -0
  18. data/lib/courier/models/preference_sections/topic_retrieve_params.rb +28 -0
  19. data/lib/courier/models/preference_topic_create_request.rb +93 -0
  20. data/lib/courier/models/preference_topic_get_response.rb +124 -0
  21. data/lib/courier/models/preference_topic_list_response.rb +17 -0
  22. data/lib/courier/models/preference_topic_replace_request.rb +90 -0
  23. data/lib/courier/models/publish_preferences_response.rb +51 -0
  24. data/lib/courier/models.rb +32 -0
  25. data/lib/courier/resources/preference_sections/topics.rb +173 -0
  26. data/lib/courier/resources/preference_sections.rb +155 -0
  27. data/lib/courier/version.rb +1 -1
  28. data/lib/courier.rb +22 -0
  29. data/rbi/courier/client.rbi +3 -0
  30. data/rbi/courier/models/preference_section_archive_params.rbi +38 -0
  31. data/rbi/courier/models/preference_section_create_params.rbi +30 -0
  32. data/rbi/courier/models/preference_section_create_request.rbi +61 -0
  33. data/rbi/courier/models/preference_section_get_response.rbi +106 -0
  34. data/rbi/courier/models/preference_section_list_params.rbi +30 -0
  35. data/rbi/courier/models/preference_section_list_response.rbi +35 -0
  36. data/rbi/courier/models/preference_section_publish_params.rbi +30 -0
  37. data/rbi/courier/models/preference_section_replace_params.rbi +38 -0
  38. data/rbi/courier/models/preference_section_replace_request.rbi +62 -0
  39. data/rbi/courier/models/preference_section_retrieve_params.rbi +38 -0
  40. data/rbi/courier/models/preference_sections/topic_archive_params.rbi +48 -0
  41. data/rbi/courier/models/preference_sections/topic_create_params.rbi +40 -0
  42. data/rbi/courier/models/preference_sections/topic_list_params.rbi +40 -0
  43. data/rbi/courier/models/preference_sections/topic_replace_params.rbi +48 -0
  44. data/rbi/courier/models/preference_sections/topic_retrieve_params.rbi +48 -0
  45. data/rbi/courier/models/preference_topic_create_request.rbi +181 -0
  46. data/rbi/courier/models/preference_topic_get_response.rbi +209 -0
  47. data/rbi/courier/models/preference_topic_list_response.rbi +35 -0
  48. data/rbi/courier/models/preference_topic_replace_request.rbi +180 -0
  49. data/rbi/courier/models/publish_preferences_response.rbi +70 -0
  50. data/rbi/courier/models.rbi +38 -0
  51. data/rbi/courier/resources/preference_sections/topics.rbi +149 -0
  52. data/rbi/courier/resources/preference_sections.rbi +113 -0
  53. data/sig/courier/client.rbs +2 -0
  54. data/sig/courier/models/preference_section_archive_params.rbs +23 -0
  55. data/sig/courier/models/preference_section_create_params.rbs +15 -0
  56. data/sig/courier/models/preference_section_create_request.rbs +30 -0
  57. data/sig/courier/models/preference_section_get_response.rbs +60 -0
  58. data/sig/courier/models/preference_section_list_params.rbs +15 -0
  59. data/sig/courier/models/preference_section_list_response.rbs +18 -0
  60. data/sig/courier/models/preference_section_publish_params.rbs +15 -0
  61. data/sig/courier/models/preference_section_replace_params.rbs +25 -0
  62. data/sig/courier/models/preference_section_replace_request.rbs +30 -0
  63. data/sig/courier/models/preference_section_retrieve_params.rbs +23 -0
  64. data/sig/courier/models/preference_sections/topic_archive_params.rbs +30 -0
  65. data/sig/courier/models/preference_sections/topic_create_params.rbs +27 -0
  66. data/sig/courier/models/preference_sections/topic_list_params.rbs +25 -0
  67. data/sig/courier/models/preference_sections/topic_replace_params.rbs +34 -0
  68. data/sig/courier/models/preference_sections/topic_retrieve_params.rbs +30 -0
  69. data/sig/courier/models/preference_topic_create_request.rbs +68 -0
  70. data/sig/courier/models/preference_topic_get_response.rbs +93 -0
  71. data/sig/courier/models/preference_topic_list_response.rbs +16 -0
  72. data/sig/courier/models/preference_topic_replace_request.rbs +68 -0
  73. data/sig/courier/models/publish_preferences_response.rbs +40 -0
  74. data/sig/courier/models.rbs +32 -0
  75. data/sig/courier/resources/preference_sections/topics.rbs +49 -0
  76. data/sig/courier/resources/preference_sections.rbs +42 -0
  77. metadata +68 -2
@@ -0,0 +1,70 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class PublishPreferencesResponse < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Courier::PublishPreferencesResponse, Courier::Internal::AnyHash)
9
+ end
10
+
11
+ # Id of the published page snapshot.
12
+ sig { returns(String) }
13
+ attr_accessor :page_id
14
+
15
+ # ISO-8601 timestamp of the publish.
16
+ sig { returns(String) }
17
+ attr_accessor :published_at
18
+
19
+ # Monotonic published version (epoch milliseconds).
20
+ sig { returns(Float) }
21
+ attr_accessor :published_version
22
+
23
+ # Draft-mode hosted preferences page URL for previewing.
24
+ sig { returns(T.nilable(String)) }
25
+ attr_accessor :preview_url
26
+
27
+ # Id of the publisher.
28
+ sig { returns(T.nilable(String)) }
29
+ attr_accessor :published_by
30
+
31
+ # Result of publishing the workspace's preferences page.
32
+ sig do
33
+ params(
34
+ page_id: String,
35
+ published_at: String,
36
+ published_version: Float,
37
+ preview_url: T.nilable(String),
38
+ published_by: T.nilable(String)
39
+ ).returns(T.attached_class)
40
+ end
41
+ def self.new(
42
+ # Id of the published page snapshot.
43
+ page_id:,
44
+ # ISO-8601 timestamp of the publish.
45
+ published_at:,
46
+ # Monotonic published version (epoch milliseconds).
47
+ published_version:,
48
+ # Draft-mode hosted preferences page URL for previewing.
49
+ preview_url: nil,
50
+ # Id of the publisher.
51
+ published_by: nil
52
+ )
53
+ end
54
+
55
+ sig do
56
+ override.returns(
57
+ {
58
+ page_id: String,
59
+ published_at: String,
60
+ published_version: Float,
61
+ preview_url: T.nilable(String),
62
+ published_by: T.nilable(String)
63
+ }
64
+ )
65
+ end
66
+ def to_hash
67
+ end
68
+ end
69
+ end
70
+ end
@@ -381,8 +381,44 @@ 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
+
384
412
  PreferenceStatus = Courier::Models::PreferenceStatus
385
413
 
414
+ PreferenceTopicCreateRequest = Courier::Models::PreferenceTopicCreateRequest
415
+
416
+ PreferenceTopicGetResponse = Courier::Models::PreferenceTopicGetResponse
417
+
418
+ PreferenceTopicListResponse = Courier::Models::PreferenceTopicListResponse
419
+
420
+ PreferenceTopicReplaceRequest = Courier::Models::PreferenceTopicReplaceRequest
421
+
386
422
  ProfileCreateParams = Courier::Models::ProfileCreateParams
387
423
 
388
424
  ProfileDeleteParams = Courier::Models::ProfileDeleteParams
@@ -411,6 +447,8 @@ module Courier
411
447
 
412
448
  ProviderUpdateParams = Courier::Models::ProviderUpdateParams
413
449
 
450
+ PublishPreferencesResponse = Courier::Models::PublishPreferencesResponse
451
+
414
452
  PutSubscriptionsRecipient = Courier::Models::PutSubscriptionsRecipient
415
453
 
416
454
  PutTenantTemplateRequest = Courier::Models::PutTenantTemplateRequest
@@ -0,0 +1,149 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class PreferenceSections
6
+ class Topics
7
+ # Create a subscription preference topic inside a section. Fails with 404 if the
8
+ # section does not exist. The topic id is generated and returned.
9
+ sig do
10
+ params(
11
+ section_id: String,
12
+ default_status:
13
+ Courier::PreferenceTopicCreateRequest::DefaultStatus::OrSymbol,
14
+ name: String,
15
+ allowed_preferences:
16
+ T.nilable(
17
+ T::Array[
18
+ Courier::PreferenceTopicCreateRequest::AllowedPreference::OrSymbol
19
+ ]
20
+ ),
21
+ include_unsubscribe_header: T.nilable(T::Boolean),
22
+ routing_options:
23
+ T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
24
+ topic_data: T.nilable(T::Hash[Symbol, T.anything]),
25
+ request_options: Courier::RequestOptions::OrHash
26
+ ).returns(Courier::PreferenceTopicGetResponse)
27
+ end
28
+ def create(
29
+ # Id of the preference section to create the topic in.
30
+ section_id,
31
+ # The default subscription status applied when a recipient has not set their own.
32
+ default_status:,
33
+ # Human-readable name for the preference topic.
34
+ name:,
35
+ # Preference controls a recipient may customize for this topic. Defaults to empty
36
+ # if omitted.
37
+ allowed_preferences: nil,
38
+ # Whether to include a list-unsubscribe header on emails for this topic.
39
+ include_unsubscribe_header: nil,
40
+ # Default channels delivered for this topic. Defaults to empty if omitted.
41
+ routing_options: nil,
42
+ # Arbitrary metadata associated with the topic.
43
+ topic_data: nil,
44
+ request_options: {}
45
+ )
46
+ end
47
+
48
+ # Retrieve a topic within a section. Returns 404 if the section does not exist,
49
+ # the topic does not exist, or the topic belongs to a different section.
50
+ sig do
51
+ params(
52
+ topic_id: String,
53
+ section_id: String,
54
+ request_options: Courier::RequestOptions::OrHash
55
+ ).returns(Courier::PreferenceTopicGetResponse)
56
+ end
57
+ def retrieve(
58
+ # Id of the subscription preference topic.
59
+ topic_id,
60
+ # Id of the preference section.
61
+ section_id:,
62
+ request_options: {}
63
+ )
64
+ end
65
+
66
+ # List the topics in a preference section.
67
+ sig do
68
+ params(
69
+ section_id: String,
70
+ request_options: Courier::RequestOptions::OrHash
71
+ ).returns(Courier::PreferenceTopicListResponse)
72
+ end
73
+ def list(
74
+ # Id of the preference section.
75
+ section_id,
76
+ request_options: {}
77
+ )
78
+ end
79
+
80
+ # Archive a topic and remove it from its section. Same 404 rules as GET.
81
+ sig do
82
+ params(
83
+ topic_id: String,
84
+ section_id: String,
85
+ request_options: Courier::RequestOptions::OrHash
86
+ ).void
87
+ end
88
+ def archive(
89
+ # Id of the subscription preference topic.
90
+ topic_id,
91
+ # Id of the preference section.
92
+ section_id:,
93
+ request_options: {}
94
+ )
95
+ end
96
+
97
+ # Replace a topic within a section. Full document replacement; missing optional
98
+ # fields are cleared. Same 404 rules as GET.
99
+ sig do
100
+ params(
101
+ topic_id: String,
102
+ section_id: String,
103
+ default_status:
104
+ Courier::PreferenceTopicReplaceRequest::DefaultStatus::OrSymbol,
105
+ name: String,
106
+ allowed_preferences:
107
+ T.nilable(
108
+ T::Array[
109
+ Courier::PreferenceTopicReplaceRequest::AllowedPreference::OrSymbol
110
+ ]
111
+ ),
112
+ include_unsubscribe_header: T.nilable(T::Boolean),
113
+ routing_options:
114
+ T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
115
+ topic_data: T.nilable(T::Hash[Symbol, T.anything]),
116
+ request_options: Courier::RequestOptions::OrHash
117
+ ).returns(Courier::PreferenceTopicGetResponse)
118
+ end
119
+ def replace(
120
+ # Path param: Id of the subscription preference topic.
121
+ topic_id,
122
+ # Path param: Id of the preference section.
123
+ section_id:,
124
+ # Body param: The default subscription status applied when a recipient has not set
125
+ # their own.
126
+ default_status:,
127
+ # Body param: Human-readable name for the preference topic.
128
+ name:,
129
+ # Body param: Preference controls a recipient may customize. Omit to clear.
130
+ allowed_preferences: nil,
131
+ # Body param: Whether to include a list-unsubscribe header on emails for this
132
+ # topic.
133
+ include_unsubscribe_header: nil,
134
+ # Body param: Default channels delivered for this topic. Omit to clear.
135
+ routing_options: nil,
136
+ # Body param: Arbitrary metadata associated with the topic. Omit to clear.
137
+ topic_data: nil,
138
+ request_options: {}
139
+ )
140
+ end
141
+
142
+ # @api private
143
+ sig { params(client: Courier::Client).returns(T.attached_class) }
144
+ def self.new(client:)
145
+ end
146
+ end
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,113 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class PreferenceSections
6
+ sig { returns(Courier::Resources::PreferenceSections::Topics) }
7
+ attr_reader :topics
8
+
9
+ # Create a preference section in your workspace. The section id is generated and
10
+ # returned. Topics are created inside a section via POST
11
+ # /preferences/sections/{section_id}/topics.
12
+ sig do
13
+ params(
14
+ name: String,
15
+ has_custom_routing: T.nilable(T::Boolean),
16
+ routing_options:
17
+ T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
18
+ request_options: Courier::RequestOptions::OrHash
19
+ ).returns(Courier::PreferenceSectionGetResponse)
20
+ end
21
+ def create(
22
+ # Human-readable name for the section.
23
+ name:,
24
+ # Whether the section defines custom routing for its topics.
25
+ has_custom_routing: nil,
26
+ # Default channels for the section. Defaults to empty if omitted.
27
+ routing_options: nil,
28
+ request_options: {}
29
+ )
30
+ end
31
+
32
+ # Retrieve a preference section by id, including its topics.
33
+ sig do
34
+ params(
35
+ section_id: String,
36
+ request_options: Courier::RequestOptions::OrHash
37
+ ).returns(Courier::PreferenceSectionGetResponse)
38
+ end
39
+ def retrieve(
40
+ # Id of the preference section.
41
+ section_id,
42
+ request_options: {}
43
+ )
44
+ end
45
+
46
+ # List the workspace's preference sections. Each section embeds its topics. Scoped
47
+ # to the workspace of the API key.
48
+ sig do
49
+ params(request_options: Courier::RequestOptions::OrHash).returns(
50
+ Courier::PreferenceSectionListResponse
51
+ )
52
+ end
53
+ def list(request_options: {})
54
+ end
55
+
56
+ # Archive a preference section. The section must be empty: delete its topics
57
+ # first, otherwise the request fails with 409.
58
+ sig do
59
+ params(
60
+ section_id: String,
61
+ request_options: Courier::RequestOptions::OrHash
62
+ ).void
63
+ end
64
+ def archive(
65
+ # Id of the preference section.
66
+ section_id,
67
+ request_options: {}
68
+ )
69
+ end
70
+
71
+ # Publish the workspace's preferences page. Takes a snapshot of every section with
72
+ # its topics under a new published version, making the current state visible on
73
+ # the hosted preferences page (non-draft).
74
+ sig do
75
+ params(request_options: Courier::RequestOptions::OrHash).returns(
76
+ Courier::PublishPreferencesResponse
77
+ )
78
+ end
79
+ def publish(request_options: {})
80
+ end
81
+
82
+ # Replace a preference section. Full document replacement; missing optional fields
83
+ # are cleared. Topics attached to the section are unaffected.
84
+ sig do
85
+ params(
86
+ section_id: String,
87
+ name: String,
88
+ has_custom_routing: T.nilable(T::Boolean),
89
+ routing_options:
90
+ T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
91
+ request_options: Courier::RequestOptions::OrHash
92
+ ).returns(Courier::PreferenceSectionGetResponse)
93
+ end
94
+ def replace(
95
+ # Id of the preference section.
96
+ section_id,
97
+ # Human-readable name for the section.
98
+ name:,
99
+ # Whether the section defines custom routing for its topics.
100
+ has_custom_routing: nil,
101
+ # Default channels for the section. Omit to clear.
102
+ routing_options: nil,
103
+ request_options: {}
104
+ )
105
+ end
106
+
107
+ # @api private
108
+ sig { params(client: Courier::Client).returns(T.attached_class) }
109
+ def self.new(client:)
110
+ end
111
+ end
112
+ end
113
+ end
@@ -42,6 +42,8 @@ module Courier
42
42
 
43
43
  attr_reader routing_strategies: Courier::Resources::RoutingStrategies
44
44
 
45
+ attr_reader preference_sections: Courier::Resources::PreferenceSections
46
+
45
47
  attr_reader profiles: Courier::Resources::Profiles
46
48
 
47
49
  attr_reader tenants: Courier::Resources::Tenants
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_archive_params =
4
+ { section_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class PreferenceSectionArchiveParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor section_id: String
11
+
12
+ def initialize: (
13
+ section_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ section_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,15 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_create_params =
4
+ { } & Courier::Internal::Type::request_parameters
5
+
6
+ class PreferenceSectionCreateParams < Courier::Models::PreferenceSectionCreateRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: Courier::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Courier::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_create_request =
4
+ {
5
+ name: String,
6
+ has_custom_routing: bool?,
7
+ routing_options: ::Array[Courier::Models::channel_classification]?
8
+ }
9
+
10
+ class PreferenceSectionCreateRequest < Courier::Internal::Type::BaseModel
11
+ attr_accessor name: String
12
+
13
+ attr_accessor has_custom_routing: bool?
14
+
15
+ attr_accessor routing_options: ::Array[Courier::Models::channel_classification]?
16
+
17
+ def initialize: (
18
+ name: String,
19
+ ?has_custom_routing: bool?,
20
+ ?routing_options: ::Array[Courier::Models::channel_classification]?
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ name: String,
25
+ has_custom_routing: bool?,
26
+ routing_options: ::Array[Courier::Models::channel_classification]?
27
+ }
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,60 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_get_response =
4
+ {
5
+ id: String,
6
+ created: String,
7
+ has_custom_routing: bool,
8
+ name: String,
9
+ routing_options: ::Array[Courier::Models::channel_classification],
10
+ topics: ::Array[Courier::PreferenceTopicGetResponse],
11
+ creator: String?,
12
+ updated: String?,
13
+ updater: String?
14
+ }
15
+
16
+ class PreferenceSectionGetResponse < Courier::Internal::Type::BaseModel
17
+ attr_accessor id: String
18
+
19
+ attr_accessor created: String
20
+
21
+ attr_accessor has_custom_routing: bool
22
+
23
+ attr_accessor name: String
24
+
25
+ attr_accessor routing_options: ::Array[Courier::Models::channel_classification]
26
+
27
+ attr_accessor topics: ::Array[Courier::PreferenceTopicGetResponse]
28
+
29
+ attr_accessor creator: String?
30
+
31
+ attr_accessor updated: String?
32
+
33
+ attr_accessor updater: String?
34
+
35
+ def initialize: (
36
+ id: String,
37
+ created: String,
38
+ has_custom_routing: bool,
39
+ name: String,
40
+ routing_options: ::Array[Courier::Models::channel_classification],
41
+ topics: ::Array[Courier::PreferenceTopicGetResponse],
42
+ ?creator: String?,
43
+ ?updated: String?,
44
+ ?updater: String?
45
+ ) -> void
46
+
47
+ def to_hash: -> {
48
+ id: String,
49
+ created: String,
50
+ has_custom_routing: bool,
51
+ name: String,
52
+ routing_options: ::Array[Courier::Models::channel_classification],
53
+ topics: ::Array[Courier::PreferenceTopicGetResponse],
54
+ creator: String?,
55
+ updated: String?,
56
+ updater: String?
57
+ }
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,15 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_list_params =
4
+ { } & Courier::Internal::Type::request_parameters
5
+
6
+ class PreferenceSectionListParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: Courier::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Courier::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,18 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_list_response =
4
+ { results: ::Array[Courier::PreferenceSectionGetResponse] }
5
+
6
+ class PreferenceSectionListResponse < Courier::Internal::Type::BaseModel
7
+ attr_accessor results: ::Array[Courier::PreferenceSectionGetResponse]
8
+
9
+ def initialize: (
10
+ results: ::Array[Courier::PreferenceSectionGetResponse]
11
+ ) -> void
12
+
13
+ def to_hash: -> {
14
+ results: ::Array[Courier::PreferenceSectionGetResponse]
15
+ }
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_publish_params =
4
+ { } & Courier::Internal::Type::request_parameters
5
+
6
+ class PreferenceSectionPublishParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: Courier::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Courier::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,25 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_replace_params =
4
+ { section_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class PreferenceSectionReplaceParams < Courier::Models::PreferenceSectionReplaceRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ def section_id: -> String
11
+
12
+ def section_id=: (String _) -> String
13
+
14
+ def initialize: (
15
+ section_id: String,
16
+ ?request_options: Courier::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ section_id: String,
21
+ request_options: Courier::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_replace_request =
4
+ {
5
+ name: String,
6
+ has_custom_routing: bool?,
7
+ routing_options: ::Array[Courier::Models::channel_classification]?
8
+ }
9
+
10
+ class PreferenceSectionReplaceRequest < Courier::Internal::Type::BaseModel
11
+ attr_accessor name: String
12
+
13
+ attr_accessor has_custom_routing: bool?
14
+
15
+ attr_accessor routing_options: ::Array[Courier::Models::channel_classification]?
16
+
17
+ def initialize: (
18
+ name: String,
19
+ ?has_custom_routing: bool?,
20
+ ?routing_options: ::Array[Courier::Models::channel_classification]?
21
+ ) -> void
22
+
23
+ def to_hash: -> {
24
+ name: String,
25
+ has_custom_routing: bool?,
26
+ routing_options: ::Array[Courier::Models::channel_classification]?
27
+ }
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type preference_section_retrieve_params =
4
+ { section_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class PreferenceSectionRetrieveParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor section_id: String
11
+
12
+ def initialize: (
13
+ section_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ section_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,30 @@
1
+ module Courier
2
+ module Models
3
+ module PreferenceSections
4
+ type topic_archive_params =
5
+ { section_id: String, topic_id: String }
6
+ & Courier::Internal::Type::request_parameters
7
+
8
+ class TopicArchiveParams < Courier::Internal::Type::BaseModel
9
+ extend Courier::Internal::Type::RequestParameters::Converter
10
+ include Courier::Internal::Type::RequestParameters
11
+
12
+ attr_accessor section_id: String
13
+
14
+ attr_accessor topic_id: String
15
+
16
+ def initialize: (
17
+ section_id: String,
18
+ topic_id: String,
19
+ ?request_options: Courier::request_opts
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ section_id: String,
24
+ topic_id: String,
25
+ request_options: Courier::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end