trycourier 4.6.3 → 4.7.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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +1 -1
  4. data/lib/courier/internal/transport/pooled_net_requester.rb +1 -1
  5. data/lib/courier/models/post_tenant_template_publish_request.rb +22 -0
  6. data/lib/courier/models/post_tenant_template_publish_response.rb +34 -0
  7. data/lib/courier/models/put_tenant_template_request.rb +31 -0
  8. data/lib/courier/models/put_tenant_template_response.rb +38 -0
  9. data/lib/courier/models/send_message_params.rb +49 -3
  10. data/lib/courier/models/tenant_template_input.rb +192 -0
  11. data/lib/courier/models/tenants/template_publish_params.rb +22 -0
  12. data/lib/courier/models/tenants/template_replace_params.rb +22 -0
  13. data/lib/courier/models/tenants/templates/version_retrieve_params.rb +30 -0
  14. data/lib/courier/models.rb +10 -0
  15. data/lib/courier/resources/tenants/templates/versions.rb +60 -0
  16. data/lib/courier/resources/tenants/templates.rb +81 -0
  17. data/lib/courier/version.rb +1 -1
  18. data/lib/courier.rb +9 -0
  19. data/rbi/courier/models/post_tenant_template_publish_request.rbi +36 -0
  20. data/rbi/courier/models/post_tenant_template_publish_response.rbi +49 -0
  21. data/rbi/courier/models/put_tenant_template_request.rbi +53 -0
  22. data/rbi/courier/models/put_tenant_template_response.rbi +52 -0
  23. data/rbi/courier/models/send_message_params.rbi +86 -4
  24. data/rbi/courier/models/tenant_template_input.rbi +408 -0
  25. data/rbi/courier/models/tenants/template_publish_params.rbi +40 -0
  26. data/rbi/courier/models/tenants/template_replace_params.rbi +40 -0
  27. data/rbi/courier/models/tenants/templates/version_retrieve_params.rbi +50 -0
  28. data/rbi/courier/models.rbi +12 -0
  29. data/rbi/courier/resources/tenants/templates/versions.rbi +43 -0
  30. data/rbi/courier/resources/tenants/templates.rbi +59 -0
  31. data/sig/courier/models/post_tenant_template_publish_request.rbs +15 -0
  32. data/sig/courier/models/post_tenant_template_publish_response.rbs +22 -0
  33. data/sig/courier/models/put_tenant_template_request.rbs +24 -0
  34. data/sig/courier/models/put_tenant_template_response.rbs +22 -0
  35. data/sig/courier/models/send_message_params.rbs +19 -0
  36. data/sig/courier/models/tenant_template_input.rbs +167 -0
  37. data/sig/courier/models/tenants/template_publish_params.rbs +27 -0
  38. data/sig/courier/models/tenants/template_replace_params.rbs +27 -0
  39. data/sig/courier/models/tenants/templates/version_retrieve_params.rbs +32 -0
  40. data/sig/courier/models.rbs +10 -0
  41. data/sig/courier/resources/tenants/templates/versions.rbs +18 -0
  42. data/sig/courier/resources/tenants/templates.rbs +17 -0
  43. metadata +29 -2
@@ -0,0 +1,408 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class TenantTemplateInput < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Courier::TenantTemplateInput, Courier::Internal::AnyHash)
9
+ end
10
+
11
+ # Template content configuration including blocks, elements, and message structure
12
+ sig { returns(Courier::ElementalContent) }
13
+ attr_reader :content
14
+
15
+ sig { params(content: Courier::ElementalContent::OrHash).void }
16
+ attr_writer :content
17
+
18
+ # Channel-specific delivery configuration (email, SMS, push, etc.)
19
+ sig do
20
+ returns(
21
+ T.nilable(T::Hash[Symbol, Courier::TenantTemplateInput::Channel])
22
+ )
23
+ end
24
+ attr_reader :channels
25
+
26
+ sig do
27
+ params(
28
+ channels:
29
+ T::Hash[Symbol, Courier::TenantTemplateInput::Channel::OrHash]
30
+ ).void
31
+ end
32
+ attr_writer :channels
33
+
34
+ # Provider-specific delivery configuration for routing to specific email/SMS
35
+ # providers
36
+ sig do
37
+ returns(
38
+ T.nilable(T::Hash[Symbol, Courier::TenantTemplateInput::Provider])
39
+ )
40
+ end
41
+ attr_reader :providers
42
+
43
+ sig do
44
+ params(
45
+ providers:
46
+ T::Hash[Symbol, Courier::TenantTemplateInput::Provider::OrHash]
47
+ ).void
48
+ end
49
+ attr_writer :providers
50
+
51
+ # Message routing configuration for multi-channel delivery strategies
52
+ sig { returns(T.nilable(Courier::MessageRouting)) }
53
+ attr_reader :routing
54
+
55
+ sig { params(routing: Courier::MessageRouting::OrHash).void }
56
+ attr_writer :routing
57
+
58
+ # Template configuration for creating or updating a tenant notification template
59
+ sig do
60
+ params(
61
+ content: Courier::ElementalContent::OrHash,
62
+ channels:
63
+ T::Hash[Symbol, Courier::TenantTemplateInput::Channel::OrHash],
64
+ providers:
65
+ T::Hash[Symbol, Courier::TenantTemplateInput::Provider::OrHash],
66
+ routing: Courier::MessageRouting::OrHash
67
+ ).returns(T.attached_class)
68
+ end
69
+ def self.new(
70
+ # Template content configuration including blocks, elements, and message structure
71
+ content:,
72
+ # Channel-specific delivery configuration (email, SMS, push, etc.)
73
+ channels: nil,
74
+ # Provider-specific delivery configuration for routing to specific email/SMS
75
+ # providers
76
+ providers: nil,
77
+ # Message routing configuration for multi-channel delivery strategies
78
+ routing: nil
79
+ )
80
+ end
81
+
82
+ sig do
83
+ override.returns(
84
+ {
85
+ content: Courier::ElementalContent,
86
+ channels: T::Hash[Symbol, Courier::TenantTemplateInput::Channel],
87
+ providers: T::Hash[Symbol, Courier::TenantTemplateInput::Provider],
88
+ routing: Courier::MessageRouting
89
+ }
90
+ )
91
+ end
92
+ def to_hash
93
+ end
94
+
95
+ class Channel < Courier::Internal::Type::BaseModel
96
+ OrHash =
97
+ T.type_alias do
98
+ T.any(
99
+ Courier::TenantTemplateInput::Channel,
100
+ Courier::Internal::AnyHash
101
+ )
102
+ end
103
+
104
+ # Brand id used for rendering.
105
+ sig { returns(T.nilable(String)) }
106
+ attr_accessor :brand_id
107
+
108
+ # JS conditional with access to data/profile.
109
+ sig { returns(T.nilable(String)) }
110
+ attr_accessor :if_
111
+
112
+ sig do
113
+ returns(T.nilable(Courier::TenantTemplateInput::Channel::Metadata))
114
+ end
115
+ attr_reader :metadata
116
+
117
+ sig do
118
+ params(
119
+ metadata:
120
+ T.nilable(Courier::TenantTemplateInput::Channel::Metadata::OrHash)
121
+ ).void
122
+ end
123
+ attr_writer :metadata
124
+
125
+ # Channel specific overrides.
126
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
127
+ attr_accessor :override
128
+
129
+ # Providers enabled for this channel.
130
+ sig { returns(T.nilable(T::Array[String])) }
131
+ attr_accessor :providers
132
+
133
+ # Defaults to `single`.
134
+ sig do
135
+ returns(
136
+ T.nilable(
137
+ Courier::TenantTemplateInput::Channel::RoutingMethod::OrSymbol
138
+ )
139
+ )
140
+ end
141
+ attr_accessor :routing_method
142
+
143
+ sig do
144
+ returns(T.nilable(Courier::TenantTemplateInput::Channel::Timeouts))
145
+ end
146
+ attr_reader :timeouts
147
+
148
+ sig do
149
+ params(
150
+ timeouts:
151
+ T.nilable(Courier::TenantTemplateInput::Channel::Timeouts::OrHash)
152
+ ).void
153
+ end
154
+ attr_writer :timeouts
155
+
156
+ sig do
157
+ params(
158
+ brand_id: T.nilable(String),
159
+ if_: T.nilable(String),
160
+ metadata:
161
+ T.nilable(
162
+ Courier::TenantTemplateInput::Channel::Metadata::OrHash
163
+ ),
164
+ override: T.nilable(T::Hash[Symbol, T.anything]),
165
+ providers: T.nilable(T::Array[String]),
166
+ routing_method:
167
+ T.nilable(
168
+ Courier::TenantTemplateInput::Channel::RoutingMethod::OrSymbol
169
+ ),
170
+ timeouts:
171
+ T.nilable(Courier::TenantTemplateInput::Channel::Timeouts::OrHash)
172
+ ).returns(T.attached_class)
173
+ end
174
+ def self.new(
175
+ # Brand id used for rendering.
176
+ brand_id: nil,
177
+ # JS conditional with access to data/profile.
178
+ if_: nil,
179
+ metadata: nil,
180
+ # Channel specific overrides.
181
+ override: nil,
182
+ # Providers enabled for this channel.
183
+ providers: nil,
184
+ # Defaults to `single`.
185
+ routing_method: nil,
186
+ timeouts: nil
187
+ )
188
+ end
189
+
190
+ sig do
191
+ override.returns(
192
+ {
193
+ brand_id: T.nilable(String),
194
+ if_: T.nilable(String),
195
+ metadata:
196
+ T.nilable(Courier::TenantTemplateInput::Channel::Metadata),
197
+ override: T.nilable(T::Hash[Symbol, T.anything]),
198
+ providers: T.nilable(T::Array[String]),
199
+ routing_method:
200
+ T.nilable(
201
+ Courier::TenantTemplateInput::Channel::RoutingMethod::OrSymbol
202
+ ),
203
+ timeouts:
204
+ T.nilable(Courier::TenantTemplateInput::Channel::Timeouts)
205
+ }
206
+ )
207
+ end
208
+ def to_hash
209
+ end
210
+
211
+ class Metadata < Courier::Internal::Type::BaseModel
212
+ OrHash =
213
+ T.type_alias do
214
+ T.any(
215
+ Courier::TenantTemplateInput::Channel::Metadata,
216
+ Courier::Internal::AnyHash
217
+ )
218
+ end
219
+
220
+ sig { returns(T.nilable(Courier::Utm)) }
221
+ attr_reader :utm
222
+
223
+ sig { params(utm: T.nilable(Courier::Utm::OrHash)).void }
224
+ attr_writer :utm
225
+
226
+ sig do
227
+ params(utm: T.nilable(Courier::Utm::OrHash)).returns(
228
+ T.attached_class
229
+ )
230
+ end
231
+ def self.new(utm: nil)
232
+ end
233
+
234
+ sig { override.returns({ utm: T.nilable(Courier::Utm) }) }
235
+ def to_hash
236
+ end
237
+ end
238
+
239
+ # Defaults to `single`.
240
+ module RoutingMethod
241
+ extend Courier::Internal::Type::Enum
242
+
243
+ TaggedSymbol =
244
+ T.type_alias do
245
+ T.all(
246
+ Symbol,
247
+ Courier::TenantTemplateInput::Channel::RoutingMethod
248
+ )
249
+ end
250
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
251
+
252
+ ALL =
253
+ T.let(
254
+ :all,
255
+ Courier::TenantTemplateInput::Channel::RoutingMethod::TaggedSymbol
256
+ )
257
+ SINGLE =
258
+ T.let(
259
+ :single,
260
+ Courier::TenantTemplateInput::Channel::RoutingMethod::TaggedSymbol
261
+ )
262
+
263
+ sig do
264
+ override.returns(
265
+ T::Array[
266
+ Courier::TenantTemplateInput::Channel::RoutingMethod::TaggedSymbol
267
+ ]
268
+ )
269
+ end
270
+ def self.values
271
+ end
272
+ end
273
+
274
+ class Timeouts < Courier::Internal::Type::BaseModel
275
+ OrHash =
276
+ T.type_alias do
277
+ T.any(
278
+ Courier::TenantTemplateInput::Channel::Timeouts,
279
+ Courier::Internal::AnyHash
280
+ )
281
+ end
282
+
283
+ sig { returns(T.nilable(Integer)) }
284
+ attr_accessor :channel
285
+
286
+ sig { returns(T.nilable(Integer)) }
287
+ attr_accessor :provider
288
+
289
+ sig do
290
+ params(
291
+ channel: T.nilable(Integer),
292
+ provider: T.nilable(Integer)
293
+ ).returns(T.attached_class)
294
+ end
295
+ def self.new(channel: nil, provider: nil)
296
+ end
297
+
298
+ sig do
299
+ override.returns(
300
+ { channel: T.nilable(Integer), provider: T.nilable(Integer) }
301
+ )
302
+ end
303
+ def to_hash
304
+ end
305
+ end
306
+ end
307
+
308
+ class Provider < Courier::Internal::Type::BaseModel
309
+ OrHash =
310
+ T.type_alias do
311
+ T.any(
312
+ Courier::TenantTemplateInput::Provider,
313
+ Courier::Internal::AnyHash
314
+ )
315
+ end
316
+
317
+ # JS conditional with access to data/profile.
318
+ sig { returns(T.nilable(String)) }
319
+ attr_accessor :if_
320
+
321
+ sig do
322
+ returns(T.nilable(Courier::TenantTemplateInput::Provider::Metadata))
323
+ end
324
+ attr_reader :metadata
325
+
326
+ sig do
327
+ params(
328
+ metadata:
329
+ T.nilable(
330
+ Courier::TenantTemplateInput::Provider::Metadata::OrHash
331
+ )
332
+ ).void
333
+ end
334
+ attr_writer :metadata
335
+
336
+ # Provider-specific overrides.
337
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
338
+ attr_accessor :override
339
+
340
+ sig { returns(T.nilable(Integer)) }
341
+ attr_accessor :timeouts
342
+
343
+ sig do
344
+ params(
345
+ if_: T.nilable(String),
346
+ metadata:
347
+ T.nilable(
348
+ Courier::TenantTemplateInput::Provider::Metadata::OrHash
349
+ ),
350
+ override: T.nilable(T::Hash[Symbol, T.anything]),
351
+ timeouts: T.nilable(Integer)
352
+ ).returns(T.attached_class)
353
+ end
354
+ def self.new(
355
+ # JS conditional with access to data/profile.
356
+ if_: nil,
357
+ metadata: nil,
358
+ # Provider-specific overrides.
359
+ override: nil,
360
+ timeouts: nil
361
+ )
362
+ end
363
+
364
+ sig do
365
+ override.returns(
366
+ {
367
+ if_: T.nilable(String),
368
+ metadata:
369
+ T.nilable(Courier::TenantTemplateInput::Provider::Metadata),
370
+ override: T.nilable(T::Hash[Symbol, T.anything]),
371
+ timeouts: T.nilable(Integer)
372
+ }
373
+ )
374
+ end
375
+ def to_hash
376
+ end
377
+
378
+ class Metadata < Courier::Internal::Type::BaseModel
379
+ OrHash =
380
+ T.type_alias do
381
+ T.any(
382
+ Courier::TenantTemplateInput::Provider::Metadata,
383
+ Courier::Internal::AnyHash
384
+ )
385
+ end
386
+
387
+ sig { returns(T.nilable(Courier::Utm)) }
388
+ attr_reader :utm
389
+
390
+ sig { params(utm: T.nilable(Courier::Utm::OrHash)).void }
391
+ attr_writer :utm
392
+
393
+ sig do
394
+ params(utm: T.nilable(Courier::Utm::OrHash)).returns(
395
+ T.attached_class
396
+ )
397
+ end
398
+ def self.new(utm: nil)
399
+ end
400
+
401
+ sig { override.returns({ utm: T.nilable(Courier::Utm) }) }
402
+ def to_hash
403
+ end
404
+ end
405
+ end
406
+ end
407
+ end
408
+ end
@@ -0,0 +1,40 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module Tenants
6
+ class TemplatePublishParams < Courier::Models::PostTenantTemplatePublishRequest
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::Tenants::TemplatePublishParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :tenant_id
20
+
21
+ sig do
22
+ params(
23
+ tenant_id: String,
24
+ request_options: Courier::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(tenant_id:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ { tenant_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,40 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module Tenants
6
+ class TemplateReplaceParams < Courier::Models::PutTenantTemplateRequest
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::Tenants::TemplateReplaceParams,
14
+ Courier::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :tenant_id
20
+
21
+ sig do
22
+ params(
23
+ tenant_id: String,
24
+ request_options: Courier::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(tenant_id:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ { tenant_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,50 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ module Tenants
6
+ module Templates
7
+ class VersionRetrieveParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ OrHash =
12
+ T.type_alias do
13
+ T.any(
14
+ Courier::Tenants::Templates::VersionRetrieveParams,
15
+ Courier::Internal::AnyHash
16
+ )
17
+ end
18
+
19
+ sig { returns(String) }
20
+ attr_accessor :tenant_id
21
+
22
+ sig { returns(String) }
23
+ attr_accessor :template_id
24
+
25
+ sig do
26
+ params(
27
+ tenant_id: String,
28
+ template_id: String,
29
+ request_options: Courier::RequestOptions::OrHash
30
+ ).returns(T.attached_class)
31
+ end
32
+ def self.new(tenant_id:, template_id:, request_options: {})
33
+ end
34
+
35
+ sig do
36
+ override.returns(
37
+ {
38
+ tenant_id: String,
39
+ template_id: String,
40
+ request_options: Courier::RequestOptions
41
+ }
42
+ )
43
+ end
44
+ def to_hash
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -205,6 +205,12 @@ module Courier
205
205
 
206
206
  Paging = Courier::Models::Paging
207
207
 
208
+ PostTenantTemplatePublishRequest =
209
+ Courier::Models::PostTenantTemplatePublishRequest
210
+
211
+ PostTenantTemplatePublishResponse =
212
+ Courier::Models::PostTenantTemplatePublishResponse
213
+
208
214
  Preference = Courier::Models::Preference
209
215
 
210
216
  PreferenceStatus = Courier::Models::PreferenceStatus
@@ -223,6 +229,10 @@ module Courier
223
229
 
224
230
  PutSubscriptionsRecipient = Courier::Models::PutSubscriptionsRecipient
225
231
 
232
+ PutTenantTemplateRequest = Courier::Models::PutTenantTemplateRequest
233
+
234
+ PutTenantTemplateResponse = Courier::Models::PutTenantTemplateResponse
235
+
226
236
  RecipientPreferences = Courier::Models::RecipientPreferences
227
237
 
228
238
  RequestArchiveParams = Courier::Models::RequestArchiveParams
@@ -277,6 +287,8 @@ module Courier
277
287
 
278
288
  Tenants = Courier::Models::Tenants
279
289
 
290
+ TenantTemplateInput = Courier::Models::TenantTemplateInput
291
+
280
292
  TenantUpdateParams = Courier::Models::TenantUpdateParams
281
293
 
282
294
  TextStyle = Courier::Models::TextStyle
@@ -0,0 +1,43 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class Tenants
6
+ class Templates
7
+ class Versions
8
+ # Fetches a specific version of a tenant template.
9
+ #
10
+ # Supports the following version formats:
11
+ #
12
+ # - `latest` - The most recent version of the template
13
+ # - `published` - The currently published version
14
+ # - `v{version}` - A specific version (e.g., "v1", "v2", "v1.0.0")
15
+ sig do
16
+ params(
17
+ version: String,
18
+ tenant_id: String,
19
+ template_id: String,
20
+ request_options: Courier::RequestOptions::OrHash
21
+ ).returns(Courier::BaseTemplateTenantAssociation)
22
+ end
23
+ def retrieve(
24
+ # Version of the template to retrieve. Accepts "latest", "published", or a
25
+ # specific version string (e.g., "v1", "v2").
26
+ version,
27
+ # Id of the tenant for which to retrieve the template.
28
+ tenant_id:,
29
+ # Id of the template to be retrieved.
30
+ template_id:,
31
+ request_options: {}
32
+ )
33
+ end
34
+
35
+ # @api private
36
+ sig { params(client: Courier::Client).returns(T.attached_class) }
37
+ def self.new(client:)
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -4,6 +4,9 @@ module Courier
4
4
  module Resources
5
5
  class Tenants
6
6
  class Templates
7
+ sig { returns(Courier::Resources::Tenants::Templates::Versions) }
8
+ attr_reader :versions
9
+
7
10
  # Get a Template in Tenant
8
11
  sig do
9
12
  params(
@@ -41,6 +44,62 @@ module Courier
41
44
  )
42
45
  end
43
46
 
47
+ # Publishes a specific version of a notification template for a tenant.
48
+ #
49
+ # The template must already exist in the tenant's notification map. If no version
50
+ # is specified, defaults to publishing the "latest" version.
51
+ sig do
52
+ params(
53
+ template_id: String,
54
+ tenant_id: String,
55
+ version: String,
56
+ request_options: Courier::RequestOptions::OrHash
57
+ ).returns(Courier::PostTenantTemplatePublishResponse)
58
+ end
59
+ def publish(
60
+ # Path param: Id of the template to be published.
61
+ template_id,
62
+ # Path param: Id of the tenant that owns the template.
63
+ tenant_id:,
64
+ # Body param: The version of the template to publish (e.g., "v1", "v2", "latest").
65
+ # If not provided, defaults to "latest".
66
+ version: nil,
67
+ request_options: {}
68
+ )
69
+ end
70
+
71
+ # Creates or updates a notification template for a tenant.
72
+ #
73
+ # If the template already exists for the tenant, it will be updated (200).
74
+ # Otherwise, a new template is created (201).
75
+ #
76
+ # Optionally publishes the template immediately if the `published` flag is set to
77
+ # true.
78
+ sig do
79
+ params(
80
+ template_id: String,
81
+ tenant_id: String,
82
+ template: Courier::TenantTemplateInput::OrHash,
83
+ published: T::Boolean,
84
+ request_options: Courier::RequestOptions::OrHash
85
+ ).returns(Courier::PutTenantTemplateResponse)
86
+ end
87
+ def replace(
88
+ # Path param: Id of the template to be created or updated.
89
+ template_id,
90
+ # Path param: Id of the tenant for which to create or update the template.
91
+ tenant_id:,
92
+ # Body param: Template configuration for creating or updating a tenant
93
+ # notification template
94
+ template:,
95
+ # Body param: Whether to publish the template immediately after saving. When true,
96
+ # the template becomes the active/published version. When false (default), the
97
+ # template is saved as a draft.
98
+ published: nil,
99
+ request_options: {}
100
+ )
101
+ end
102
+
44
103
  # @api private
45
104
  sig { params(client: Courier::Client).returns(T.attached_class) }
46
105
  def self.new(client:)
@@ -0,0 +1,15 @@
1
+ module Courier
2
+ module Models
3
+ type post_tenant_template_publish_request = { version: String }
4
+
5
+ class PostTenantTemplatePublishRequest < Courier::Internal::Type::BaseModel
6
+ attr_reader version: String?
7
+
8
+ def version=: (String) -> String
9
+
10
+ def initialize: (?version: String) -> void
11
+
12
+ def to_hash: -> { version: String }
13
+ end
14
+ end
15
+ end