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.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/lib/courier/client.rb +4 -0
  4. data/lib/courier/models/publish_preferences_response.rb +51 -0
  5. data/lib/courier/models/workspace_preference_archive_params.rb +20 -0
  6. data/lib/courier/models/workspace_preference_create_params.rb +14 -0
  7. data/lib/courier/models/workspace_preference_create_request.rb +36 -0
  8. data/lib/courier/models/workspace_preference_get_response.rb +83 -0
  9. data/lib/courier/models/workspace_preference_list_params.rb +14 -0
  10. data/lib/courier/models/workspace_preference_list_response.rb +18 -0
  11. data/lib/courier/models/workspace_preference_publish_params.rb +14 -0
  12. data/lib/courier/models/workspace_preference_replace_params.rb +20 -0
  13. data/lib/courier/models/workspace_preference_replace_request.rb +37 -0
  14. data/lib/courier/models/workspace_preference_retrieve_params.rb +20 -0
  15. data/lib/courier/models/workspace_preference_topic_create_request.rb +93 -0
  16. data/lib/courier/models/workspace_preference_topic_get_response.rb +124 -0
  17. data/lib/courier/models/workspace_preference_topic_list_response.rb +17 -0
  18. data/lib/courier/models/workspace_preference_topic_replace_request.rb +90 -0
  19. data/lib/courier/models/workspace_preferences/topic_archive_params.rb +28 -0
  20. data/lib/courier/models/workspace_preferences/topic_create_params.rb +22 -0
  21. data/lib/courier/models/workspace_preferences/topic_list_params.rb +22 -0
  22. data/lib/courier/models/workspace_preferences/topic_replace_params.rb +28 -0
  23. data/lib/courier/models/workspace_preferences/topic_retrieve_params.rb +28 -0
  24. data/lib/courier/models.rb +32 -0
  25. data/lib/courier/resources/notifications/checks.rb +3 -3
  26. data/lib/courier/resources/workspace_preferences/topics.rb +176 -0
  27. data/lib/courier/resources/workspace_preferences.rb +155 -0
  28. data/lib/courier/version.rb +1 -1
  29. data/lib/courier.rb +22 -0
  30. data/rbi/courier/client.rbi +3 -0
  31. data/rbi/courier/models/publish_preferences_response.rbi +70 -0
  32. data/rbi/courier/models/workspace_preference_archive_params.rbi +38 -0
  33. data/rbi/courier/models/workspace_preference_create_params.rbi +30 -0
  34. data/rbi/courier/models/workspace_preference_create_request.rbi +61 -0
  35. data/rbi/courier/models/workspace_preference_get_response.rbi +107 -0
  36. data/rbi/courier/models/workspace_preference_list_params.rbi +30 -0
  37. data/rbi/courier/models/workspace_preference_list_response.rbi +35 -0
  38. data/rbi/courier/models/workspace_preference_publish_params.rbi +30 -0
  39. data/rbi/courier/models/workspace_preference_replace_params.rbi +38 -0
  40. data/rbi/courier/models/workspace_preference_replace_request.rbi +62 -0
  41. data/rbi/courier/models/workspace_preference_retrieve_params.rbi +38 -0
  42. data/rbi/courier/models/workspace_preference_topic_create_request.rbi +186 -0
  43. data/rbi/courier/models/workspace_preference_topic_get_response.rbi +215 -0
  44. data/rbi/courier/models/workspace_preference_topic_list_response.rbi +36 -0
  45. data/rbi/courier/models/workspace_preference_topic_replace_request.rbi +185 -0
  46. data/rbi/courier/models/workspace_preferences/topic_archive_params.rbi +48 -0
  47. data/rbi/courier/models/workspace_preferences/topic_create_params.rbi +40 -0
  48. data/rbi/courier/models/workspace_preferences/topic_list_params.rbi +40 -0
  49. data/rbi/courier/models/workspace_preferences/topic_replace_params.rbi +48 -0
  50. data/rbi/courier/models/workspace_preferences/topic_retrieve_params.rbi +48 -0
  51. data/rbi/courier/models.rbi +45 -0
  52. data/rbi/courier/resources/notifications/checks.rbi +3 -3
  53. data/rbi/courier/resources/workspace_preferences/topics.rbi +152 -0
  54. data/rbi/courier/resources/workspace_preferences.rbi +113 -0
  55. data/sig/courier/client.rbs +2 -0
  56. data/sig/courier/models/publish_preferences_response.rbs +40 -0
  57. data/sig/courier/models/workspace_preference_archive_params.rbs +23 -0
  58. data/sig/courier/models/workspace_preference_create_params.rbs +15 -0
  59. data/sig/courier/models/workspace_preference_create_request.rbs +30 -0
  60. data/sig/courier/models/workspace_preference_get_response.rbs +60 -0
  61. data/sig/courier/models/workspace_preference_list_params.rbs +15 -0
  62. data/sig/courier/models/workspace_preference_list_response.rbs +18 -0
  63. data/sig/courier/models/workspace_preference_publish_params.rbs +15 -0
  64. data/sig/courier/models/workspace_preference_replace_params.rbs +25 -0
  65. data/sig/courier/models/workspace_preference_replace_request.rbs +30 -0
  66. data/sig/courier/models/workspace_preference_retrieve_params.rbs +23 -0
  67. data/sig/courier/models/workspace_preference_topic_create_request.rbs +68 -0
  68. data/sig/courier/models/workspace_preference_topic_get_response.rbs +93 -0
  69. data/sig/courier/models/workspace_preference_topic_list_response.rbs +18 -0
  70. data/sig/courier/models/workspace_preference_topic_replace_request.rbs +68 -0
  71. data/sig/courier/models/workspace_preferences/topic_archive_params.rbs +30 -0
  72. data/sig/courier/models/workspace_preferences/topic_create_params.rbs +27 -0
  73. data/sig/courier/models/workspace_preferences/topic_list_params.rbs +25 -0
  74. data/sig/courier/models/workspace_preferences/topic_replace_params.rbs +34 -0
  75. data/sig/courier/models/workspace_preferences/topic_retrieve_params.rbs +30 -0
  76. data/sig/courier/models.rbs +32 -0
  77. data/sig/courier/resources/workspace_preferences/topics.rbs +49 -0
  78. data/sig/courier/resources/workspace_preferences.rbs +42 -0
  79. metadata +68 -2
@@ -0,0 +1,40 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module WorkspacePreferences
6
+ class TopicListParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::WorkspacePreferences::TopicListParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :section_id
20
+
21
+ sig do
22
+ params(
23
+ section_id: String,
24
+ request_options: Courier::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(section_id:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ { section_id: String, request_options: Courier::RequestOptions }
33
+ )
34
+ end
35
+ def to_hash
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,48 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module WorkspacePreferences
6
+ class TopicReplaceParams < Courier::Models::WorkspacePreferenceTopicReplaceRequest
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::WorkspacePreferences::TopicReplaceParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :section_id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :topic_id
23
+
24
+ sig do
25
+ params(
26
+ section_id: String,
27
+ topic_id: String,
28
+ request_options: Courier::RequestOptions::OrHash
29
+ ).returns(T.attached_class)
30
+ end
31
+ def self.new(section_id:, topic_id:, request_options: {})
32
+ end
33
+
34
+ sig do
35
+ override.returns(
36
+ {
37
+ section_id: String,
38
+ topic_id: String,
39
+ request_options: Courier::RequestOptions
40
+ }
41
+ )
42
+ end
43
+ def to_hash
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,48 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module WorkspacePreferences
6
+ class TopicRetrieveParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Courier::WorkspacePreferences::TopicRetrieveParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :section_id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :topic_id
23
+
24
+ sig do
25
+ params(
26
+ section_id: String,
27
+ topic_id: String,
28
+ request_options: Courier::RequestOptions::OrHash
29
+ ).returns(T.attached_class)
30
+ end
31
+ def self.new(section_id:, topic_id:, request_options: {})
32
+ end
33
+
34
+ sig do
35
+ override.returns(
36
+ {
37
+ section_id: String,
38
+ topic_id: String,
39
+ request_options: Courier::RequestOptions
40
+ }
41
+ )
42
+ end
43
+ def to_hash
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -411,6 +411,8 @@ module Courier
411
411
 
412
412
  ProviderUpdateParams = Courier::Models::ProviderUpdateParams
413
413
 
414
+ PublishPreferencesResponse = Courier::Models::PublishPreferencesResponse
415
+
414
416
  PutSubscriptionsRecipient = Courier::Models::PutSubscriptionsRecipient
415
417
 
416
418
  PutTenantTemplateRequest = Courier::Models::PutTenantTemplateRequest
@@ -533,4 +535,47 @@ module Courier
533
535
  WebhookRecipient = Courier::Models::WebhookRecipient
534
536
 
535
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
536
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 submission.
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 submission.
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 submission.
44
+ # Cancel a submission for a notification template.
45
45
  sig do
46
46
  params(
47
47
  submission_id: String,
@@ -0,0 +1,152 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class WorkspacePreferences
6
+ class Topics
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.
10
+ sig do
11
+ params(
12
+ section_id: String,
13
+ default_status:
14
+ Courier::WorkspacePreferenceTopicCreateRequest::DefaultStatus::OrSymbol,
15
+ name: String,
16
+ allowed_preferences:
17
+ T.nilable(
18
+ T::Array[
19
+ Courier::WorkspacePreferenceTopicCreateRequest::AllowedPreference::OrSymbol
20
+ ]
21
+ ),
22
+ include_unsubscribe_header: T.nilable(T::Boolean),
23
+ routing_options:
24
+ T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
25
+ topic_data: T.nilable(T::Hash[Symbol, T.anything]),
26
+ request_options: Courier::RequestOptions::OrHash
27
+ ).returns(Courier::WorkspacePreferenceTopicGetResponse)
28
+ end
29
+ def create(
30
+ # Id of the workspace preference to create the topic in.
31
+ section_id,
32
+ # The default subscription status applied when a recipient has not set their own.
33
+ default_status:,
34
+ # Human-readable name for the preference topic.
35
+ name:,
36
+ # Preference controls a recipient may customize for this topic. Defaults to empty
37
+ # if omitted.
38
+ allowed_preferences: nil,
39
+ # Whether to include a list-unsubscribe header on emails for this topic.
40
+ include_unsubscribe_header: nil,
41
+ # Default channels delivered for this topic. Defaults to empty if omitted.
42
+ routing_options: nil,
43
+ # Arbitrary metadata associated with the topic.
44
+ topic_data: nil,
45
+ request_options: {}
46
+ )
47
+ end
48
+
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.
52
+ sig do
53
+ params(
54
+ topic_id: String,
55
+ section_id: String,
56
+ request_options: Courier::RequestOptions::OrHash
57
+ ).returns(Courier::WorkspacePreferenceTopicGetResponse)
58
+ end
59
+ def retrieve(
60
+ # Id of the subscription preference topic.
61
+ topic_id,
62
+ # Id of the workspace preference.
63
+ section_id:,
64
+ request_options: {}
65
+ )
66
+ end
67
+
68
+ # List the topics in a workspace preference.
69
+ sig do
70
+ params(
71
+ section_id: String,
72
+ request_options: Courier::RequestOptions::OrHash
73
+ ).returns(Courier::WorkspacePreferenceTopicListResponse)
74
+ end
75
+ def list(
76
+ # Id of the workspace preference.
77
+ section_id,
78
+ request_options: {}
79
+ )
80
+ end
81
+
82
+ # Archive a topic and remove it from its workspace preference. Same 404 rules as
83
+ # GET.
84
+ sig do
85
+ params(
86
+ topic_id: String,
87
+ section_id: String,
88
+ request_options: Courier::RequestOptions::OrHash
89
+ ).void
90
+ end
91
+ def archive(
92
+ # Id of the subscription preference topic.
93
+ topic_id,
94
+ # Id of the workspace preference.
95
+ section_id:,
96
+ request_options: {}
97
+ )
98
+ end
99
+
100
+ # Replace a topic within a workspace preference. Full document replacement;
101
+ # missing optional fields are cleared. Same 404 rules as GET.
102
+ sig do
103
+ params(
104
+ topic_id: String,
105
+ section_id: String,
106
+ default_status:
107
+ Courier::WorkspacePreferenceTopicReplaceRequest::DefaultStatus::OrSymbol,
108
+ name: String,
109
+ allowed_preferences:
110
+ T.nilable(
111
+ T::Array[
112
+ Courier::WorkspacePreferenceTopicReplaceRequest::AllowedPreference::OrSymbol
113
+ ]
114
+ ),
115
+ include_unsubscribe_header: T.nilable(T::Boolean),
116
+ routing_options:
117
+ T.nilable(T::Array[Courier::ChannelClassification::OrSymbol]),
118
+ topic_data: T.nilable(T::Hash[Symbol, T.anything]),
119
+ request_options: Courier::RequestOptions::OrHash
120
+ ).returns(Courier::WorkspacePreferenceTopicGetResponse)
121
+ end
122
+ def replace(
123
+ # Path param: Id of the subscription preference topic.
124
+ topic_id,
125
+ # Path param: Id of the workspace preference.
126
+ section_id:,
127
+ # Body param: The default subscription status applied when a recipient has not set
128
+ # their own.
129
+ default_status:,
130
+ # Body param: Human-readable name for the preference topic.
131
+ name:,
132
+ # Body param: Preference controls a recipient may customize. Omit to clear.
133
+ allowed_preferences: nil,
134
+ # Body param: Whether to include a list-unsubscribe header on emails for this
135
+ # topic.
136
+ include_unsubscribe_header: nil,
137
+ # Body param: Default channels delivered for this topic. Omit to clear.
138
+ routing_options: nil,
139
+ # Body param: Arbitrary metadata associated with the topic. Omit to clear.
140
+ topic_data: nil,
141
+ request_options: {}
142
+ )
143
+ end
144
+
145
+ # @api private
146
+ sig { params(client: Courier::Client).returns(T.attached_class) }
147
+ def self.new(client:)
148
+ end
149
+ end
150
+ end
151
+ end
152
+ end
@@ -0,0 +1,113 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class WorkspacePreferences
6
+ sig { returns(Courier::Resources::WorkspacePreferences::Topics) }
7
+ attr_reader :topics
8
+
9
+ # Create a workspace preference. The workspace preference id is generated and
10
+ # returned. Topics are created inside a workspace preference 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::WorkspacePreferenceGetResponse)
20
+ end
21
+ def create(
22
+ # Human-readable name for the workspace preference.
23
+ name:,
24
+ # Whether the workspace preference defines custom routing for its topics.
25
+ has_custom_routing: nil,
26
+ # Default channels for the workspace preference. Defaults to empty if omitted.
27
+ routing_options: nil,
28
+ request_options: {}
29
+ )
30
+ end
31
+
32
+ # Retrieve a workspace preference by id, including its topics.
33
+ sig do
34
+ params(
35
+ section_id: String,
36
+ request_options: Courier::RequestOptions::OrHash
37
+ ).returns(Courier::WorkspacePreferenceGetResponse)
38
+ end
39
+ def retrieve(
40
+ # Id of the workspace preference.
41
+ section_id,
42
+ request_options: {}
43
+ )
44
+ end
45
+
46
+ # List the workspace's preferences. Each workspace preference embeds its topics.
47
+ # Scoped to the workspace of the API key.
48
+ sig do
49
+ params(request_options: Courier::RequestOptions::OrHash).returns(
50
+ Courier::WorkspacePreferenceListResponse
51
+ )
52
+ end
53
+ def list(request_options: {})
54
+ end
55
+
56
+ # Archive a workspace preference. The workspace preference must be empty: delete
57
+ # its topics 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 workspace preference.
66
+ section_id,
67
+ request_options: {}
68
+ )
69
+ end
70
+
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
+ 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 workspace preference. Full document replacement; missing optional
83
+ # fields are cleared. Topics attached to the workspace preference 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::WorkspacePreferenceGetResponse)
93
+ end
94
+ def replace(
95
+ # Id of the workspace preference.
96
+ section_id,
97
+ # Human-readable name for the workspace preference.
98
+ name:,
99
+ # Whether the workspace preference defines custom routing for its topics.
100
+ has_custom_routing: nil,
101
+ # Default channels for the workspace preference. 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 workspace_preferences: Courier::Resources::WorkspacePreferences
46
+
45
47
  attr_reader profiles: Courier::Resources::Profiles
46
48
 
47
49
  attr_reader tenants: Courier::Resources::Tenants
@@ -0,0 +1,40 @@
1
+ module Courier
2
+ module Models
3
+ type publish_preferences_response =
4
+ {
5
+ page_id: String,
6
+ published_at: String,
7
+ published_version: Float,
8
+ preview_url: String?,
9
+ published_by: String?
10
+ }
11
+
12
+ class PublishPreferencesResponse < Courier::Internal::Type::BaseModel
13
+ attr_accessor page_id: String
14
+
15
+ attr_accessor published_at: String
16
+
17
+ attr_accessor published_version: Float
18
+
19
+ attr_accessor preview_url: String?
20
+
21
+ attr_accessor published_by: String?
22
+
23
+ def initialize: (
24
+ page_id: String,
25
+ published_at: String,
26
+ published_version: Float,
27
+ ?preview_url: String?,
28
+ ?published_by: String?
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ page_id: String,
33
+ published_at: String,
34
+ published_version: Float,
35
+ preview_url: String?,
36
+ published_by: String?
37
+ }
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type workspace_preference_archive_params =
4
+ { section_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class WorkspacePreferenceArchiveParams < 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 workspace_preference_create_params =
4
+ { } & Courier::Internal::Type::request_parameters
5
+
6
+ class WorkspacePreferenceCreateParams < Courier::Models::WorkspacePreferenceCreateRequest
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 workspace_preference_create_request =
4
+ {
5
+ name: String,
6
+ has_custom_routing: bool?,
7
+ routing_options: ::Array[Courier::Models::channel_classification]?
8
+ }
9
+
10
+ class WorkspacePreferenceCreateRequest < 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 workspace_preference_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::WorkspacePreferenceTopicGetResponse],
11
+ creator: String?,
12
+ updated: String?,
13
+ updater: String?
14
+ }
15
+
16
+ class WorkspacePreferenceGetResponse < 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::WorkspacePreferenceTopicGetResponse]
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::WorkspacePreferenceTopicGetResponse],
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::WorkspacePreferenceTopicGetResponse],
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 workspace_preference_list_params =
4
+ { } & Courier::Internal::Type::request_parameters
5
+
6
+ class WorkspacePreferenceListParams < 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