trycourier 4.16.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 +19 -0
- data/lib/courier/client.rb +4 -0
- data/lib/courier/models/publish_preferences_response.rb +51 -0
- data/lib/courier/models/workspace_preference_archive_params.rb +20 -0
- data/lib/courier/models/workspace_preference_create_params.rb +14 -0
- data/lib/courier/models/workspace_preference_create_request.rb +36 -0
- data/lib/courier/models/workspace_preference_get_response.rb +83 -0
- data/lib/courier/models/workspace_preference_list_params.rb +14 -0
- data/lib/courier/models/workspace_preference_list_response.rb +18 -0
- data/lib/courier/models/workspace_preference_publish_params.rb +14 -0
- data/lib/courier/models/workspace_preference_replace_params.rb +20 -0
- data/lib/courier/models/workspace_preference_replace_request.rb +37 -0
- data/lib/courier/models/workspace_preference_retrieve_params.rb +20 -0
- data/lib/courier/models/workspace_preference_topic_create_request.rb +93 -0
- data/lib/courier/models/workspace_preference_topic_get_response.rb +124 -0
- data/lib/courier/models/workspace_preference_topic_list_response.rb +17 -0
- data/lib/courier/models/workspace_preference_topic_replace_request.rb +90 -0
- data/lib/courier/models/workspace_preferences/topic_archive_params.rb +28 -0
- data/lib/courier/models/workspace_preferences/topic_create_params.rb +22 -0
- data/lib/courier/models/workspace_preferences/topic_list_params.rb +22 -0
- data/lib/courier/models/workspace_preferences/topic_replace_params.rb +28 -0
- data/lib/courier/models/workspace_preferences/topic_retrieve_params.rb +28 -0
- data/lib/courier/models.rb +32 -0
- data/lib/courier/resources/notifications/checks.rb +3 -3
- data/lib/courier/resources/workspace_preferences/topics.rb +176 -0
- data/lib/courier/resources/workspace_preferences.rb +155 -0
- data/lib/courier/version.rb +1 -1
- data/lib/courier.rb +22 -0
- data/rbi/courier/client.rbi +3 -0
- data/rbi/courier/models/publish_preferences_response.rbi +70 -0
- data/rbi/courier/models/workspace_preference_archive_params.rbi +38 -0
- data/rbi/courier/models/workspace_preference_create_params.rbi +30 -0
- data/rbi/courier/models/workspace_preference_create_request.rbi +61 -0
- data/rbi/courier/models/workspace_preference_get_response.rbi +107 -0
- data/rbi/courier/models/workspace_preference_list_params.rbi +30 -0
- data/rbi/courier/models/workspace_preference_list_response.rbi +35 -0
- data/rbi/courier/models/workspace_preference_publish_params.rbi +30 -0
- data/rbi/courier/models/workspace_preference_replace_params.rbi +38 -0
- data/rbi/courier/models/workspace_preference_replace_request.rbi +62 -0
- data/rbi/courier/models/workspace_preference_retrieve_params.rbi +38 -0
- data/rbi/courier/models/workspace_preference_topic_create_request.rbi +186 -0
- data/rbi/courier/models/workspace_preference_topic_get_response.rbi +215 -0
- data/rbi/courier/models/workspace_preference_topic_list_response.rbi +36 -0
- data/rbi/courier/models/workspace_preference_topic_replace_request.rbi +185 -0
- data/rbi/courier/models/workspace_preferences/topic_archive_params.rbi +48 -0
- data/rbi/courier/models/workspace_preferences/topic_create_params.rbi +40 -0
- data/rbi/courier/models/workspace_preferences/topic_list_params.rbi +40 -0
- data/rbi/courier/models/workspace_preferences/topic_replace_params.rbi +48 -0
- data/rbi/courier/models/workspace_preferences/topic_retrieve_params.rbi +48 -0
- data/rbi/courier/models.rbi +45 -0
- data/rbi/courier/resources/notifications/checks.rbi +3 -3
- data/rbi/courier/resources/workspace_preferences/topics.rbi +152 -0
- data/rbi/courier/resources/workspace_preferences.rbi +113 -0
- data/sig/courier/client.rbs +2 -0
- data/sig/courier/models/publish_preferences_response.rbs +40 -0
- data/sig/courier/models/workspace_preference_archive_params.rbs +23 -0
- data/sig/courier/models/workspace_preference_create_params.rbs +15 -0
- data/sig/courier/models/workspace_preference_create_request.rbs +30 -0
- data/sig/courier/models/workspace_preference_get_response.rbs +60 -0
- data/sig/courier/models/workspace_preference_list_params.rbs +15 -0
- data/sig/courier/models/workspace_preference_list_response.rbs +18 -0
- data/sig/courier/models/workspace_preference_publish_params.rbs +15 -0
- data/sig/courier/models/workspace_preference_replace_params.rbs +25 -0
- data/sig/courier/models/workspace_preference_replace_request.rbs +30 -0
- data/sig/courier/models/workspace_preference_retrieve_params.rbs +23 -0
- data/sig/courier/models/workspace_preference_topic_create_request.rbs +68 -0
- data/sig/courier/models/workspace_preference_topic_get_response.rbs +93 -0
- data/sig/courier/models/workspace_preference_topic_list_response.rbs +18 -0
- data/sig/courier/models/workspace_preference_topic_replace_request.rbs +68 -0
- data/sig/courier/models/workspace_preferences/topic_archive_params.rbs +30 -0
- data/sig/courier/models/workspace_preferences/topic_create_params.rbs +27 -0
- data/sig/courier/models/workspace_preferences/topic_list_params.rbs +25 -0
- data/sig/courier/models/workspace_preferences/topic_replace_params.rbs +34 -0
- data/sig/courier/models/workspace_preferences/topic_retrieve_params.rbs +30 -0
- data/sig/courier/models.rbs +32 -0
- data/sig/courier/resources/workspace_preferences/topics.rbs +49 -0
- data/sig/courier/resources/workspace_preferences.rbs +42 -0
- metadata +68 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 767d16490b100cdf1a74b068086a2d8dce286dc441ceaf2d6a1014f7a87e8117
|
|
4
|
+
data.tar.gz: c5d5013207f3876f9a2a98c87ece15788851f3720dc48a4e5814a3a7ba0273d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 170f814c04185d95c823f0309563ba0223b661d4079dc8cddd34785234fe39b2c8c7a1dfa54171f7e752897f82be866d26a6bd97f54a4a06babb23a155aa4b9b
|
|
7
|
+
data.tar.gz: f18775095318e5eafdd9cc9b7cfe8b8109d06f7ba86c61e397436db89173030257808fc07a75b1ffeb7f6f63777fc4c8d6d6e7dded71c29d5c2e601a7a09f7ff
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.17.1 (2026-06-25)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.17.0...v4.17.1](https://github.com/trycourier/courier-ruby/compare/v4.17.0...v4.17.1)
|
|
6
|
+
|
|
7
|
+
### Documentation
|
|
8
|
+
|
|
9
|
+
* **openapi:** add full response examples to every endpoint ([be9724a](https://github.com/trycourier/courier-ruby/commit/be9724a3a5d7317bd31d99160414959b58d1e5bb))
|
|
10
|
+
* **openapi:** reword Cancel Submission description ([68565aa](https://github.com/trycourier/courier-ruby/commit/68565aa1f8de141d9780a390da4b48aeb178624e))
|
|
11
|
+
* **openapi:** reword Get Submission Checks description ([94541e4](https://github.com/trycourier/courier-ruby/commit/94541e4aaebbf1ac567e1047d2ce84e5ad97741b))
|
|
12
|
+
* **openapi:** reword Replace Submission Checks description ([7aa63c1](https://github.com/trycourier/courier-ruby/commit/7aa63c14c83b9585ec963d426f47b2720b5b04cc))
|
|
13
|
+
|
|
14
|
+
## 4.17.0 (2026-06-24)
|
|
15
|
+
|
|
16
|
+
Full Changelog: [v4.16.0...v4.17.0](https://github.com/trycourier/courier-ruby/compare/v4.16.0...v4.17.0)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **preferences:** workspace preference sections & nested topics endpoints ([d53ac7b](https://github.com/trycourier/courier-ruby/commit/d53ac7b093745632465f9b8fc4136964e48ed88f))
|
|
21
|
+
|
|
3
22
|
## 4.16.0 (2026-06-23)
|
|
4
23
|
|
|
5
24
|
Full Changelog: [v4.15.0...v4.16.0](https://github.com/trycourier/courier-ruby/compare/v4.15.0...v4.16.0)
|
data/lib/courier/client.rb
CHANGED
|
@@ -66,6 +66,9 @@ module Courier
|
|
|
66
66
|
# @return [Courier::Resources::RoutingStrategies]
|
|
67
67
|
attr_reader :routing_strategies
|
|
68
68
|
|
|
69
|
+
# @return [Courier::Resources::WorkspacePreferences]
|
|
70
|
+
attr_reader :workspace_preferences
|
|
71
|
+
|
|
69
72
|
# @return [Courier::Resources::Profiles]
|
|
70
73
|
attr_reader :profiles
|
|
71
74
|
|
|
@@ -155,6 +158,7 @@ module Courier
|
|
|
155
158
|
@requests = Courier::Resources::Requests.new(client: self)
|
|
156
159
|
@notifications = Courier::Resources::Notifications.new(client: self)
|
|
157
160
|
@routing_strategies = Courier::Resources::RoutingStrategies.new(client: self)
|
|
161
|
+
@workspace_preferences = Courier::Resources::WorkspacePreferences.new(client: self)
|
|
158
162
|
@profiles = Courier::Resources::Profiles.new(client: self)
|
|
159
163
|
@tenants = Courier::Resources::Tenants.new(client: self)
|
|
160
164
|
@translations = Courier::Resources::Translations.new(client: self)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#publish
|
|
6
|
+
class PublishPreferencesResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute page_id
|
|
8
|
+
# Id of the published page snapshot.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :page_id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute published_at
|
|
14
|
+
# ISO-8601 timestamp of the publish.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :published_at, String
|
|
18
|
+
|
|
19
|
+
# @!attribute published_version
|
|
20
|
+
# Monotonic published version (epoch milliseconds).
|
|
21
|
+
#
|
|
22
|
+
# @return [Float]
|
|
23
|
+
required :published_version, Float
|
|
24
|
+
|
|
25
|
+
# @!attribute preview_url
|
|
26
|
+
# Draft-mode hosted preferences page URL for previewing.
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :preview_url, String, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute published_by
|
|
32
|
+
# Id of the publisher.
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
optional :published_by, String, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!method initialize(page_id:, published_at:, published_version:, preview_url: nil, published_by: nil)
|
|
38
|
+
# Result of publishing the workspace's preferences page.
|
|
39
|
+
#
|
|
40
|
+
# @param page_id [String] Id of the published page snapshot.
|
|
41
|
+
#
|
|
42
|
+
# @param published_at [String] ISO-8601 timestamp of the publish.
|
|
43
|
+
#
|
|
44
|
+
# @param published_version [Float] Monotonic published version (epoch milliseconds).
|
|
45
|
+
#
|
|
46
|
+
# @param preview_url [String, nil] Draft-mode hosted preferences page URL for previewing.
|
|
47
|
+
#
|
|
48
|
+
# @param published_by [String, nil] Id of the publisher.
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#archive
|
|
6
|
+
class WorkspacePreferenceArchiveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute section_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :section_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(section_id:, request_options: {})
|
|
16
|
+
# @param section_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#create
|
|
6
|
+
class WorkspacePreferenceCreateParams < Courier::Models::WorkspacePreferenceCreateRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceCreateRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute name
|
|
7
|
+
# Human-readable name for the workspace preference.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :name, String
|
|
11
|
+
|
|
12
|
+
# @!attribute has_custom_routing
|
|
13
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
14
|
+
#
|
|
15
|
+
# @return [Boolean, nil]
|
|
16
|
+
optional :has_custom_routing, Courier::Internal::Type::Boolean, nil?: true
|
|
17
|
+
|
|
18
|
+
# @!attribute routing_options
|
|
19
|
+
# Default channels for the workspace preference. Defaults to empty if omitted.
|
|
20
|
+
#
|
|
21
|
+
# @return [Array<Symbol, Courier::Models::ChannelClassification>, nil]
|
|
22
|
+
optional :routing_options,
|
|
23
|
+
-> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] },
|
|
24
|
+
nil?: true
|
|
25
|
+
|
|
26
|
+
# @!method initialize(name:, has_custom_routing: nil, routing_options: nil)
|
|
27
|
+
# Request body for creating a workspace preference.
|
|
28
|
+
#
|
|
29
|
+
# @param name [String] Human-readable name for the workspace preference.
|
|
30
|
+
#
|
|
31
|
+
# @param has_custom_routing [Boolean, nil] Whether the workspace preference defines custom routing for its topics.
|
|
32
|
+
#
|
|
33
|
+
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels for the workspace preference. Defaults to empty if omitted.
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#create
|
|
6
|
+
class WorkspacePreferenceGetResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The workspace preference id.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute created
|
|
14
|
+
# ISO-8601 timestamp of when the workspace preference was created.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :created, String
|
|
18
|
+
|
|
19
|
+
# @!attribute has_custom_routing
|
|
20
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
21
|
+
#
|
|
22
|
+
# @return [Boolean]
|
|
23
|
+
required :has_custom_routing, Courier::Internal::Type::Boolean
|
|
24
|
+
|
|
25
|
+
# @!attribute name
|
|
26
|
+
# Human-readable name.
|
|
27
|
+
#
|
|
28
|
+
# @return [String]
|
|
29
|
+
required :name, String
|
|
30
|
+
|
|
31
|
+
# @!attribute routing_options
|
|
32
|
+
# Default channels for the workspace preference. May be empty.
|
|
33
|
+
#
|
|
34
|
+
# @return [Array<Symbol, Courier::Models::ChannelClassification>]
|
|
35
|
+
required :routing_options, -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] }
|
|
36
|
+
|
|
37
|
+
# @!attribute topics
|
|
38
|
+
# The topics contained in this workspace preference.
|
|
39
|
+
#
|
|
40
|
+
# @return [Array<Courier::Models::WorkspacePreferenceTopicGetResponse>]
|
|
41
|
+
required :topics, -> { Courier::Internal::Type::ArrayOf[Courier::WorkspacePreferenceTopicGetResponse] }
|
|
42
|
+
|
|
43
|
+
# @!attribute creator
|
|
44
|
+
# Id of the creator.
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
optional :creator, String, nil?: true
|
|
48
|
+
|
|
49
|
+
# @!attribute updated
|
|
50
|
+
# ISO-8601 timestamp of the last update.
|
|
51
|
+
#
|
|
52
|
+
# @return [String, nil]
|
|
53
|
+
optional :updated, String, nil?: true
|
|
54
|
+
|
|
55
|
+
# @!attribute updater
|
|
56
|
+
# Id of the last updater.
|
|
57
|
+
#
|
|
58
|
+
# @return [String, nil]
|
|
59
|
+
optional :updater, String, nil?: true
|
|
60
|
+
|
|
61
|
+
# @!method initialize(id:, created:, has_custom_routing:, name:, routing_options:, topics:, creator: nil, updated: nil, updater: nil)
|
|
62
|
+
# A workspace preference in your workspace, including its topics.
|
|
63
|
+
#
|
|
64
|
+
# @param id [String] The workspace preference id.
|
|
65
|
+
#
|
|
66
|
+
# @param created [String] ISO-8601 timestamp of when the workspace preference was created.
|
|
67
|
+
#
|
|
68
|
+
# @param has_custom_routing [Boolean] Whether the workspace preference defines custom routing for its topics.
|
|
69
|
+
#
|
|
70
|
+
# @param name [String] Human-readable name.
|
|
71
|
+
#
|
|
72
|
+
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>] Default channels for the workspace preference. May be empty.
|
|
73
|
+
#
|
|
74
|
+
# @param topics [Array<Courier::Models::WorkspacePreferenceTopicGetResponse>] The topics contained in this workspace preference.
|
|
75
|
+
#
|
|
76
|
+
# @param creator [String, nil] Id of the creator.
|
|
77
|
+
#
|
|
78
|
+
# @param updated [String, nil] ISO-8601 timestamp of the last update.
|
|
79
|
+
#
|
|
80
|
+
# @param updater [String, nil] Id of the last updater.
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#list
|
|
6
|
+
class WorkspacePreferenceListParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#list
|
|
6
|
+
class WorkspacePreferenceListResponse < Courier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute results
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Courier::Models::WorkspacePreferenceGetResponse>]
|
|
10
|
+
required :results, -> { Courier::Internal::Type::ArrayOf[Courier::WorkspacePreferenceGetResponse] }
|
|
11
|
+
|
|
12
|
+
# @!method initialize(results:)
|
|
13
|
+
# The workspace's preferences, each with its topics.
|
|
14
|
+
#
|
|
15
|
+
# @param results [Array<Courier::Models::WorkspacePreferenceGetResponse>]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#publish
|
|
6
|
+
class WorkspacePreferencePublishParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#replace
|
|
6
|
+
class WorkspacePreferenceReplaceParams < Courier::Models::WorkspacePreferenceReplaceRequest
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute section_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :section_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(section_id:, request_options: {})
|
|
16
|
+
# @param section_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceReplaceRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute name
|
|
7
|
+
# Human-readable name for the workspace preference.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :name, String
|
|
11
|
+
|
|
12
|
+
# @!attribute has_custom_routing
|
|
13
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
14
|
+
#
|
|
15
|
+
# @return [Boolean, nil]
|
|
16
|
+
optional :has_custom_routing, Courier::Internal::Type::Boolean, nil?: true
|
|
17
|
+
|
|
18
|
+
# @!attribute routing_options
|
|
19
|
+
# Default channels for the workspace preference. Omit to clear.
|
|
20
|
+
#
|
|
21
|
+
# @return [Array<Symbol, Courier::Models::ChannelClassification>, nil]
|
|
22
|
+
optional :routing_options,
|
|
23
|
+
-> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] },
|
|
24
|
+
nil?: true
|
|
25
|
+
|
|
26
|
+
# @!method initialize(name:, has_custom_routing: nil, routing_options: nil)
|
|
27
|
+
# Request body for replacing a workspace preference. Full document replacement;
|
|
28
|
+
# missing optional fields are cleared.
|
|
29
|
+
#
|
|
30
|
+
# @param name [String] Human-readable name for the workspace preference.
|
|
31
|
+
#
|
|
32
|
+
# @param has_custom_routing [Boolean, nil] Whether the workspace preference defines custom routing for its topics.
|
|
33
|
+
#
|
|
34
|
+
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels for the workspace preference. Omit to clear.
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
# @see Courier::Resources::WorkspacePreferences#retrieve
|
|
6
|
+
class WorkspacePreferenceRetrieveParams < Courier::Internal::Type::BaseModel
|
|
7
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Courier::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute section_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :section_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(section_id:, request_options: {})
|
|
16
|
+
# @param section_id [String]
|
|
17
|
+
# @param request_options [Courier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceTopicCreateRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute default_status
|
|
7
|
+
# The default subscription status applied when a recipient has not set their own.
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::DefaultStatus]
|
|
10
|
+
required :default_status, enum: -> { Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus }
|
|
11
|
+
|
|
12
|
+
# @!attribute name
|
|
13
|
+
# Human-readable name for the preference topic.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :name, String
|
|
17
|
+
|
|
18
|
+
# @!attribute allowed_preferences
|
|
19
|
+
# Preference controls a recipient may customize for this topic. Defaults to empty
|
|
20
|
+
# if omitted.
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::AllowedPreference>, nil]
|
|
23
|
+
optional :allowed_preferences,
|
|
24
|
+
-> {
|
|
25
|
+
Courier::Internal::Type::ArrayOf[enum: Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference]
|
|
26
|
+
},
|
|
27
|
+
nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute include_unsubscribe_header
|
|
30
|
+
# Whether to include a list-unsubscribe header on emails for this topic.
|
|
31
|
+
#
|
|
32
|
+
# @return [Boolean, nil]
|
|
33
|
+
optional :include_unsubscribe_header, Courier::Internal::Type::Boolean, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute routing_options
|
|
36
|
+
# Default channels delivered for this topic. Defaults to empty if omitted.
|
|
37
|
+
#
|
|
38
|
+
# @return [Array<Symbol, Courier::Models::ChannelClassification>, nil]
|
|
39
|
+
optional :routing_options,
|
|
40
|
+
-> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] },
|
|
41
|
+
nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute topic_data
|
|
44
|
+
# Arbitrary metadata associated with the topic.
|
|
45
|
+
#
|
|
46
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
47
|
+
optional :topic_data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true
|
|
48
|
+
|
|
49
|
+
# @!method initialize(default_status:, name:, allowed_preferences: nil, include_unsubscribe_header: nil, routing_options: nil, topic_data: nil)
|
|
50
|
+
# Some parameter documentations has been truncated, see
|
|
51
|
+
# {Courier::Models::WorkspacePreferenceTopicCreateRequest} for more details.
|
|
52
|
+
#
|
|
53
|
+
# Request body for creating a preference topic.
|
|
54
|
+
#
|
|
55
|
+
# @param default_status [Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::DefaultStatus] The default subscription status applied when a recipient has not set their own.
|
|
56
|
+
#
|
|
57
|
+
# @param name [String] Human-readable name for the preference topic.
|
|
58
|
+
#
|
|
59
|
+
# @param allowed_preferences [Array<Symbol, Courier::Models::WorkspacePreferenceTopicCreateRequest::AllowedPreference>, nil] Preference controls a recipient may customize for this topic. Defaults to empty
|
|
60
|
+
#
|
|
61
|
+
# @param include_unsubscribe_header [Boolean, nil] Whether to include a list-unsubscribe header on emails for this topic.
|
|
62
|
+
#
|
|
63
|
+
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>, nil] Default channels delivered for this topic. Defaults to empty if omitted.
|
|
64
|
+
#
|
|
65
|
+
# @param topic_data [Hash{Symbol=>Object}, nil] Arbitrary metadata associated with the topic.
|
|
66
|
+
|
|
67
|
+
# The default subscription status applied when a recipient has not set their own.
|
|
68
|
+
#
|
|
69
|
+
# @see Courier::Models::WorkspacePreferenceTopicCreateRequest#default_status
|
|
70
|
+
module DefaultStatus
|
|
71
|
+
extend Courier::Internal::Type::Enum
|
|
72
|
+
|
|
73
|
+
OPTED_OUT = :OPTED_OUT
|
|
74
|
+
OPTED_IN = :OPTED_IN
|
|
75
|
+
REQUIRED = :REQUIRED
|
|
76
|
+
|
|
77
|
+
# @!method self.values
|
|
78
|
+
# @return [Array<Symbol>]
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# A preference control a recipient may customize for a topic.
|
|
82
|
+
module AllowedPreference
|
|
83
|
+
extend Courier::Internal::Type::Enum
|
|
84
|
+
|
|
85
|
+
SNOOZE = :snooze
|
|
86
|
+
CHANNEL_PREFERENCES = :channel_preferences
|
|
87
|
+
|
|
88
|
+
# @!method self.values
|
|
89
|
+
# @return [Array<Symbol>]
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceTopicGetResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
# The preference topic id.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute allowed_preferences
|
|
13
|
+
# Preference controls a recipient may customize. May be empty.
|
|
14
|
+
#
|
|
15
|
+
# @return [Array<Symbol, Courier::Models::WorkspacePreferenceTopicGetResponse::AllowedPreference>]
|
|
16
|
+
required :allowed_preferences,
|
|
17
|
+
-> { Courier::Internal::Type::ArrayOf[enum: Courier::WorkspacePreferenceTopicGetResponse::AllowedPreference] }
|
|
18
|
+
|
|
19
|
+
# @!attribute created
|
|
20
|
+
# ISO-8601 timestamp of when the topic was created.
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :created, String
|
|
24
|
+
|
|
25
|
+
# @!attribute default_status
|
|
26
|
+
# The default subscription status applied when a recipient has not set their own.
|
|
27
|
+
#
|
|
28
|
+
# @return [Symbol, Courier::Models::WorkspacePreferenceTopicGetResponse::DefaultStatus]
|
|
29
|
+
required :default_status, enum: -> { Courier::WorkspacePreferenceTopicGetResponse::DefaultStatus }
|
|
30
|
+
|
|
31
|
+
# @!attribute include_unsubscribe_header
|
|
32
|
+
# Whether a list-unsubscribe header is included on emails for this topic.
|
|
33
|
+
#
|
|
34
|
+
# @return [Boolean]
|
|
35
|
+
required :include_unsubscribe_header, Courier::Internal::Type::Boolean
|
|
36
|
+
|
|
37
|
+
# @!attribute name
|
|
38
|
+
# Human-readable name.
|
|
39
|
+
#
|
|
40
|
+
# @return [String]
|
|
41
|
+
required :name, String
|
|
42
|
+
|
|
43
|
+
# @!attribute routing_options
|
|
44
|
+
# Default channels delivered for this topic. May be empty.
|
|
45
|
+
#
|
|
46
|
+
# @return [Array<Symbol, Courier::Models::ChannelClassification>]
|
|
47
|
+
required :routing_options, -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] }
|
|
48
|
+
|
|
49
|
+
# @!attribute topic_data
|
|
50
|
+
# Arbitrary metadata associated with the topic.
|
|
51
|
+
#
|
|
52
|
+
# @return [Hash{Symbol=>Object}]
|
|
53
|
+
required :topic_data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
|
|
54
|
+
|
|
55
|
+
# @!attribute updated
|
|
56
|
+
# ISO-8601 timestamp of the last update.
|
|
57
|
+
#
|
|
58
|
+
# @return [String]
|
|
59
|
+
required :updated, String
|
|
60
|
+
|
|
61
|
+
# @!attribute creator
|
|
62
|
+
# Id of the creator.
|
|
63
|
+
#
|
|
64
|
+
# @return [String, nil]
|
|
65
|
+
optional :creator, String, nil?: true
|
|
66
|
+
|
|
67
|
+
# @!attribute updater
|
|
68
|
+
# Id of the last updater.
|
|
69
|
+
#
|
|
70
|
+
# @return [String, nil]
|
|
71
|
+
optional :updater, String, nil?: true
|
|
72
|
+
|
|
73
|
+
# @!method initialize(id:, allowed_preferences:, created:, default_status:, include_unsubscribe_header:, name:, routing_options:, topic_data:, updated:, creator: nil, updater: nil)
|
|
74
|
+
# A subscription preference topic in your workspace.
|
|
75
|
+
#
|
|
76
|
+
# @param id [String] The preference topic id.
|
|
77
|
+
#
|
|
78
|
+
# @param allowed_preferences [Array<Symbol, Courier::Models::WorkspacePreferenceTopicGetResponse::AllowedPreference>] Preference controls a recipient may customize. May be empty.
|
|
79
|
+
#
|
|
80
|
+
# @param created [String] ISO-8601 timestamp of when the topic was created.
|
|
81
|
+
#
|
|
82
|
+
# @param default_status [Symbol, Courier::Models::WorkspacePreferenceTopicGetResponse::DefaultStatus] The default subscription status applied when a recipient has not set their own.
|
|
83
|
+
#
|
|
84
|
+
# @param include_unsubscribe_header [Boolean] Whether a list-unsubscribe header is included on emails for this topic.
|
|
85
|
+
#
|
|
86
|
+
# @param name [String] Human-readable name.
|
|
87
|
+
#
|
|
88
|
+
# @param routing_options [Array<Symbol, Courier::Models::ChannelClassification>] Default channels delivered for this topic. May be empty.
|
|
89
|
+
#
|
|
90
|
+
# @param topic_data [Hash{Symbol=>Object}] Arbitrary metadata associated with the topic.
|
|
91
|
+
#
|
|
92
|
+
# @param updated [String] ISO-8601 timestamp of the last update.
|
|
93
|
+
#
|
|
94
|
+
# @param creator [String, nil] Id of the creator.
|
|
95
|
+
#
|
|
96
|
+
# @param updater [String, nil] Id of the last updater.
|
|
97
|
+
|
|
98
|
+
# A preference control a recipient may customize for a topic.
|
|
99
|
+
module AllowedPreference
|
|
100
|
+
extend Courier::Internal::Type::Enum
|
|
101
|
+
|
|
102
|
+
SNOOZE = :snooze
|
|
103
|
+
CHANNEL_PREFERENCES = :channel_preferences
|
|
104
|
+
|
|
105
|
+
# @!method self.values
|
|
106
|
+
# @return [Array<Symbol>]
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# The default subscription status applied when a recipient has not set their own.
|
|
110
|
+
#
|
|
111
|
+
# @see Courier::Models::WorkspacePreferenceTopicGetResponse#default_status
|
|
112
|
+
module DefaultStatus
|
|
113
|
+
extend Courier::Internal::Type::Enum
|
|
114
|
+
|
|
115
|
+
OPTED_OUT = :OPTED_OUT
|
|
116
|
+
OPTED_IN = :OPTED_IN
|
|
117
|
+
REQUIRED = :REQUIRED
|
|
118
|
+
|
|
119
|
+
# @!method self.values
|
|
120
|
+
# @return [Array<Symbol>]
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceTopicListResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute results
|
|
7
|
+
#
|
|
8
|
+
# @return [Array<Courier::Models::WorkspacePreferenceTopicGetResponse>]
|
|
9
|
+
required :results, -> { Courier::Internal::Type::ArrayOf[Courier::WorkspacePreferenceTopicGetResponse] }
|
|
10
|
+
|
|
11
|
+
# @!method initialize(results:)
|
|
12
|
+
# Topics contained in a workspace preference.
|
|
13
|
+
#
|
|
14
|
+
# @param results [Array<Courier::Models::WorkspacePreferenceTopicGetResponse>]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|