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
data/rbi/courier/client.rbi
CHANGED
|
@@ -61,6 +61,9 @@ module Courier
|
|
|
61
61
|
sig { returns(Courier::Resources::RoutingStrategies) }
|
|
62
62
|
attr_reader :routing_strategies
|
|
63
63
|
|
|
64
|
+
sig { returns(Courier::Resources::WorkspacePreferences) }
|
|
65
|
+
attr_reader :workspace_preferences
|
|
66
|
+
|
|
64
67
|
sig { returns(Courier::Resources::Profiles) }
|
|
65
68
|
attr_reader :profiles
|
|
66
69
|
|
|
@@ -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
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceArchiveParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::WorkspacePreferenceArchiveParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :section_id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
section_id: String,
|
|
23
|
+
request_options: Courier::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(section_id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ section_id: String, request_options: Courier::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceCreateParams < Courier::Models::WorkspacePreferenceCreateRequest
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::WorkspacePreferenceCreateParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(request_options: Courier::RequestOptions::OrHash).returns(
|
|
19
|
+
T.attached_class
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
def self.new(request_options: {})
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig { override.returns({ request_options: Courier::RequestOptions }) }
|
|
26
|
+
def to_hash
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceCreateRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::WorkspacePreferenceCreateRequest,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Human-readable name for the workspace preference.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :name
|
|
17
|
+
|
|
18
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
19
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
20
|
+
attr_accessor :has_custom_routing
|
|
21
|
+
|
|
22
|
+
# Default channels for the workspace preference. Defaults to empty if omitted.
|
|
23
|
+
sig do
|
|
24
|
+
returns(T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]))
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :routing_options
|
|
27
|
+
|
|
28
|
+
# Request body for creating a workspace preference.
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
name: String,
|
|
32
|
+
has_custom_routing: T.nilable(T::Boolean),
|
|
33
|
+
routing_options:
|
|
34
|
+
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol])
|
|
35
|
+
).returns(T.attached_class)
|
|
36
|
+
end
|
|
37
|
+
def self.new(
|
|
38
|
+
# Human-readable name for the workspace preference.
|
|
39
|
+
name:,
|
|
40
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
41
|
+
has_custom_routing: nil,
|
|
42
|
+
# Default channels for the workspace preference. Defaults to empty if omitted.
|
|
43
|
+
routing_options: nil
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
override.returns(
|
|
49
|
+
{
|
|
50
|
+
name: String,
|
|
51
|
+
has_custom_routing: T.nilable(T::Boolean),
|
|
52
|
+
routing_options:
|
|
53
|
+
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol])
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
def to_hash
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceGetResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::WorkspacePreferenceGetResponse,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The workspace preference id.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# ISO-8601 timestamp of when the workspace preference was created.
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :created
|
|
21
|
+
|
|
22
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
23
|
+
sig { returns(T::Boolean) }
|
|
24
|
+
attr_accessor :has_custom_routing
|
|
25
|
+
|
|
26
|
+
# Human-readable name.
|
|
27
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :name
|
|
29
|
+
|
|
30
|
+
# Default channels for the workspace preference. May be empty.
|
|
31
|
+
sig { returns(T::Array[Courier::ChannelClassification::TaggedSymbol]) }
|
|
32
|
+
attr_accessor :routing_options
|
|
33
|
+
|
|
34
|
+
# The topics contained in this workspace preference.
|
|
35
|
+
sig { returns(T::Array[Courier::WorkspacePreferenceTopicGetResponse]) }
|
|
36
|
+
attr_accessor :topics
|
|
37
|
+
|
|
38
|
+
# Id of the creator.
|
|
39
|
+
sig { returns(T.nilable(String)) }
|
|
40
|
+
attr_accessor :creator
|
|
41
|
+
|
|
42
|
+
# ISO-8601 timestamp of the last update.
|
|
43
|
+
sig { returns(T.nilable(String)) }
|
|
44
|
+
attr_accessor :updated
|
|
45
|
+
|
|
46
|
+
# Id of the last updater.
|
|
47
|
+
sig { returns(T.nilable(String)) }
|
|
48
|
+
attr_accessor :updater
|
|
49
|
+
|
|
50
|
+
# A workspace preference in your workspace, including its topics.
|
|
51
|
+
sig do
|
|
52
|
+
params(
|
|
53
|
+
id: String,
|
|
54
|
+
created: String,
|
|
55
|
+
has_custom_routing: T::Boolean,
|
|
56
|
+
name: String,
|
|
57
|
+
routing_options: T::Array[Courier::ChannelClassification::OrSymbol],
|
|
58
|
+
topics:
|
|
59
|
+
T::Array[Courier::WorkspacePreferenceTopicGetResponse::OrHash],
|
|
60
|
+
creator: T.nilable(String),
|
|
61
|
+
updated: T.nilable(String),
|
|
62
|
+
updater: T.nilable(String)
|
|
63
|
+
).returns(T.attached_class)
|
|
64
|
+
end
|
|
65
|
+
def self.new(
|
|
66
|
+
# The workspace preference id.
|
|
67
|
+
id:,
|
|
68
|
+
# ISO-8601 timestamp of when the workspace preference was created.
|
|
69
|
+
created:,
|
|
70
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
71
|
+
has_custom_routing:,
|
|
72
|
+
# Human-readable name.
|
|
73
|
+
name:,
|
|
74
|
+
# Default channels for the workspace preference. May be empty.
|
|
75
|
+
routing_options:,
|
|
76
|
+
# The topics contained in this workspace preference.
|
|
77
|
+
topics:,
|
|
78
|
+
# Id of the creator.
|
|
79
|
+
creator: nil,
|
|
80
|
+
# ISO-8601 timestamp of the last update.
|
|
81
|
+
updated: nil,
|
|
82
|
+
# Id of the last updater.
|
|
83
|
+
updater: nil
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
sig do
|
|
88
|
+
override.returns(
|
|
89
|
+
{
|
|
90
|
+
id: String,
|
|
91
|
+
created: String,
|
|
92
|
+
has_custom_routing: T::Boolean,
|
|
93
|
+
name: String,
|
|
94
|
+
routing_options:
|
|
95
|
+
T::Array[Courier::ChannelClassification::TaggedSymbol],
|
|
96
|
+
topics: T::Array[Courier::WorkspacePreferenceTopicGetResponse],
|
|
97
|
+
creator: T.nilable(String),
|
|
98
|
+
updated: T.nilable(String),
|
|
99
|
+
updater: T.nilable(String)
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
def to_hash
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceListParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::WorkspacePreferenceListParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(request_options: Courier::RequestOptions::OrHash).returns(
|
|
19
|
+
T.attached_class
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
def self.new(request_options: {})
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig { override.returns({ request_options: Courier::RequestOptions }) }
|
|
26
|
+
def to_hash
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceListResponse < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::WorkspacePreferenceListResponse,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(T::Array[Courier::WorkspacePreferenceGetResponse]) }
|
|
15
|
+
attr_accessor :results
|
|
16
|
+
|
|
17
|
+
# The workspace's preferences, each with its topics.
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
results: T::Array[Courier::WorkspacePreferenceGetResponse::OrHash]
|
|
21
|
+
).returns(T.attached_class)
|
|
22
|
+
end
|
|
23
|
+
def self.new(results:)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
override.returns(
|
|
28
|
+
{ results: T::Array[Courier::WorkspacePreferenceGetResponse] }
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferencePublishParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::WorkspacePreferencePublishParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(request_options: Courier::RequestOptions::OrHash).returns(
|
|
19
|
+
T.attached_class
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
def self.new(request_options: {})
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig { override.returns({ request_options: Courier::RequestOptions }) }
|
|
26
|
+
def to_hash
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceReplaceParams < Courier::Models::WorkspacePreferenceReplaceRequest
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::WorkspacePreferenceReplaceParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :section_id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
section_id: String,
|
|
23
|
+
request_options: Courier::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(section_id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ section_id: String, request_options: Courier::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceReplaceRequest < Courier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Courier::WorkspacePreferenceReplaceRequest,
|
|
10
|
+
Courier::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Human-readable name for the workspace preference.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :name
|
|
17
|
+
|
|
18
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
19
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
20
|
+
attr_accessor :has_custom_routing
|
|
21
|
+
|
|
22
|
+
# Default channels for the workspace preference. Omit to clear.
|
|
23
|
+
sig do
|
|
24
|
+
returns(T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]))
|
|
25
|
+
end
|
|
26
|
+
attr_accessor :routing_options
|
|
27
|
+
|
|
28
|
+
# Request body for replacing a workspace preference. Full document replacement;
|
|
29
|
+
# missing optional fields are cleared.
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
name: String,
|
|
33
|
+
has_custom_routing: T.nilable(T::Boolean),
|
|
34
|
+
routing_options:
|
|
35
|
+
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol])
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
# Human-readable name for the workspace preference.
|
|
40
|
+
name:,
|
|
41
|
+
# Whether the workspace preference defines custom routing for its topics.
|
|
42
|
+
has_custom_routing: nil,
|
|
43
|
+
# Default channels for the workspace preference. Omit to clear.
|
|
44
|
+
routing_options: nil
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
sig do
|
|
49
|
+
override.returns(
|
|
50
|
+
{
|
|
51
|
+
name: String,
|
|
52
|
+
has_custom_routing: T.nilable(T::Boolean),
|
|
53
|
+
routing_options:
|
|
54
|
+
T.nilable(T::Array[Courier::ChannelClassification::OrSymbol])
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
def to_hash
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Courier
|
|
4
|
+
module Models
|
|
5
|
+
class WorkspacePreferenceRetrieveParams < Courier::Internal::Type::BaseModel
|
|
6
|
+
extend Courier::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Courier::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Courier::WorkspacePreferenceRetrieveParams,
|
|
13
|
+
Courier::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :section_id
|
|
19
|
+
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
section_id: String,
|
|
23
|
+
request_options: Courier::RequestOptions::OrHash
|
|
24
|
+
).returns(T.attached_class)
|
|
25
|
+
end
|
|
26
|
+
def self.new(section_id:, request_options: {})
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ section_id: String, request_options: Courier::RequestOptions }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|