@@ -199,6 +199,92 @@ func (r DefaultPreferencesItemParam) MarshalJSON() (data []byte, err error) {
199199 return param .MarshalObject (r , shadow {& r , false })
200200}
201201
202+ // Request body for publishing a tenant template version
203+ type PostTenantTemplatePublishRequestParam struct {
204+ // The version of the template to publish (e.g., "v1", "v2", "latest"). If not
205+ // provided, defaults to "latest".
206+ Version param.Opt [string ] `json:"version,omitzero"`
207+ paramObj
208+ }
209+
210+ func (r PostTenantTemplatePublishRequestParam ) MarshalJSON () (data []byte , err error ) {
211+ type shadow PostTenantTemplatePublishRequestParam
212+ return param .MarshalObject (r , (* shadow )(& r ))
213+ }
214+ func (r * PostTenantTemplatePublishRequestParam ) UnmarshalJSON (data []byte ) error {
215+ return apijson .UnmarshalRoot (data , r )
216+ }
217+
218+ // Response from publishing a tenant template
219+ type PostTenantTemplatePublishResponse struct {
220+ // The template ID
221+ ID string `json:"id,required"`
222+ // The timestamp when the template was published
223+ PublishedAt string `json:"published_at,required"`
224+ // The published version of the template
225+ Version string `json:"version,required"`
226+ // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
227+ JSON struct {
228+ ID respjson.Field
229+ PublishedAt respjson.Field
230+ Version respjson.Field
231+ ExtraFields map [string ]respjson.Field
232+ raw string
233+ } `json:"-"`
234+ }
235+
236+ // Returns the unmodified JSON received from the API
237+ func (r PostTenantTemplatePublishResponse ) RawJSON () string { return r .JSON .raw }
238+ func (r * PostTenantTemplatePublishResponse ) UnmarshalJSON (data []byte ) error {
239+ return apijson .UnmarshalRoot (data , r )
240+ }
241+
242+ // Request body for creating or updating a tenant notification template
243+ //
244+ // The property Template is required.
245+ type PutTenantTemplateRequestParam struct {
246+ // Template configuration for creating or updating a tenant notification template
247+ Template TenantTemplateInputParam `json:"template,omitzero,required"`
248+ // Whether to publish the template immediately after saving. When true, the
249+ // template becomes the active/published version. When false (default), the
250+ // template is saved as a draft.
251+ Published param.Opt [bool ] `json:"published,omitzero"`
252+ paramObj
253+ }
254+
255+ func (r PutTenantTemplateRequestParam ) MarshalJSON () (data []byte , err error ) {
256+ type shadow PutTenantTemplateRequestParam
257+ return param .MarshalObject (r , (* shadow )(& r ))
258+ }
259+ func (r * PutTenantTemplateRequestParam ) UnmarshalJSON (data []byte ) error {
260+ return apijson .UnmarshalRoot (data , r )
261+ }
262+
263+ // Response from creating or updating a tenant notification template
264+ type PutTenantTemplateResponse struct {
265+ // The template ID
266+ ID string `json:"id,required"`
267+ // The version of the saved template
268+ Version string `json:"version,required"`
269+ // The timestamp when the template was published. Only present if the template was
270+ // published as part of this request.
271+ PublishedAt string `json:"published_at,nullable"`
272+ // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
273+ JSON struct {
274+ ID respjson.Field
275+ Version respjson.Field
276+ PublishedAt respjson.Field
277+ ExtraFields map [string ]respjson.Field
278+ raw string
279+ } `json:"-"`
280+ }
281+
282+ // Returns the unmodified JSON received from the API
283+ func (r PutTenantTemplateResponse ) RawJSON () string { return r .JSON .raw }
284+ func (r * PutTenantTemplateResponse ) UnmarshalJSON (data []byte ) error {
285+ return apijson .UnmarshalRoot (data , r )
286+ }
287+
202288type SubscriptionTopicNew struct {
203289 // Any of "OPTED_OUT", "OPTED_IN", "REQUIRED".
204290 Status SubscriptionTopicNewStatus `json:"status,required"`
@@ -362,6 +448,120 @@ func (r *TenantAssociationParam) UnmarshalJSON(data []byte) error {
362448 return apijson .UnmarshalRoot (data , r )
363449}
364450
451+ // Template configuration for creating or updating a tenant notification template
452+ //
453+ // The property Content is required.
454+ type TenantTemplateInputParam struct {
455+ // Template content configuration including blocks, elements, and message structure
456+ Content shared.ElementalContentParam `json:"content,omitzero,required"`
457+ // Channel-specific delivery configuration (email, SMS, push, etc.)
458+ Channels map [string ]TenantTemplateInputChannelParam `json:"channels,omitzero"`
459+ // Provider-specific delivery configuration for routing to specific email/SMS
460+ // providers
461+ Providers map [string ]TenantTemplateInputProviderParam `json:"providers,omitzero"`
462+ // Message routing configuration for multi-channel delivery strategies
463+ Routing shared.MessageRoutingParam `json:"routing,omitzero"`
464+ paramObj
465+ }
466+
467+ func (r TenantTemplateInputParam ) MarshalJSON () (data []byte , err error ) {
468+ type shadow TenantTemplateInputParam
469+ return param .MarshalObject (r , (* shadow )(& r ))
470+ }
471+ func (r * TenantTemplateInputParam ) UnmarshalJSON (data []byte ) error {
472+ return apijson .UnmarshalRoot (data , r )
473+ }
474+
475+ type TenantTemplateInputChannelParam struct {
476+ // Brand id used for rendering.
477+ BrandID param.Opt [string ] `json:"brand_id,omitzero"`
478+ // JS conditional with access to data/profile.
479+ If param.Opt [string ] `json:"if,omitzero"`
480+ Metadata TenantTemplateInputChannelMetadataParam `json:"metadata,omitzero"`
481+ // Channel specific overrides.
482+ Override map [string ]any `json:"override,omitzero"`
483+ // Providers enabled for this channel.
484+ Providers []string `json:"providers,omitzero"`
485+ // Defaults to `single`.
486+ //
487+ // Any of "all", "single".
488+ RoutingMethod string `json:"routing_method,omitzero"`
489+ Timeouts TenantTemplateInputChannelTimeoutsParam `json:"timeouts,omitzero"`
490+ paramObj
491+ }
492+
493+ func (r TenantTemplateInputChannelParam ) MarshalJSON () (data []byte , err error ) {
494+ type shadow TenantTemplateInputChannelParam
495+ return param .MarshalObject (r , (* shadow )(& r ))
496+ }
497+ func (r * TenantTemplateInputChannelParam ) UnmarshalJSON (data []byte ) error {
498+ return apijson .UnmarshalRoot (data , r )
499+ }
500+
501+ func init () {
502+ apijson .RegisterFieldValidator [TenantTemplateInputChannelParam ](
503+ "routing_method" , "all" , "single" ,
504+ )
505+ }
506+
507+ type TenantTemplateInputChannelMetadataParam struct {
508+ Utm shared.UtmParam `json:"utm,omitzero"`
509+ paramObj
510+ }
511+
512+ func (r TenantTemplateInputChannelMetadataParam ) MarshalJSON () (data []byte , err error ) {
513+ type shadow TenantTemplateInputChannelMetadataParam
514+ return param .MarshalObject (r , (* shadow )(& r ))
515+ }
516+ func (r * TenantTemplateInputChannelMetadataParam ) UnmarshalJSON (data []byte ) error {
517+ return apijson .UnmarshalRoot (data , r )
518+ }
519+
520+ type TenantTemplateInputChannelTimeoutsParam struct {
521+ Channel param.Opt [int64 ] `json:"channel,omitzero"`
522+ Provider param.Opt [int64 ] `json:"provider,omitzero"`
523+ paramObj
524+ }
525+
526+ func (r TenantTemplateInputChannelTimeoutsParam ) MarshalJSON () (data []byte , err error ) {
527+ type shadow TenantTemplateInputChannelTimeoutsParam
528+ return param .MarshalObject (r , (* shadow )(& r ))
529+ }
530+ func (r * TenantTemplateInputChannelTimeoutsParam ) UnmarshalJSON (data []byte ) error {
531+ return apijson .UnmarshalRoot (data , r )
532+ }
533+
534+ type TenantTemplateInputProviderParam struct {
535+ // JS conditional with access to data/profile.
536+ If param.Opt [string ] `json:"if,omitzero"`
537+ Timeouts param.Opt [int64 ] `json:"timeouts,omitzero"`
538+ Metadata TenantTemplateInputProviderMetadataParam `json:"metadata,omitzero"`
539+ // Provider-specific overrides.
540+ Override map [string ]any `json:"override,omitzero"`
541+ paramObj
542+ }
543+
544+ func (r TenantTemplateInputProviderParam ) MarshalJSON () (data []byte , err error ) {
545+ type shadow TenantTemplateInputProviderParam
546+ return param .MarshalObject (r , (* shadow )(& r ))
547+ }
548+ func (r * TenantTemplateInputProviderParam ) UnmarshalJSON (data []byte ) error {
549+ return apijson .UnmarshalRoot (data , r )
550+ }
551+
552+ type TenantTemplateInputProviderMetadataParam struct {
553+ Utm shared.UtmParam `json:"utm,omitzero"`
554+ paramObj
555+ }
556+
557+ func (r TenantTemplateInputProviderMetadataParam ) MarshalJSON () (data []byte , err error ) {
558+ type shadow TenantTemplateInputProviderMetadataParam
559+ return param .MarshalObject (r , (* shadow )(& r ))
560+ }
561+ func (r * TenantTemplateInputProviderMetadataParam ) UnmarshalJSON (data []byte ) error {
562+ return apijson .UnmarshalRoot (data , r )
563+ }
564+
365565type TenantListResponse struct {
366566 // Set to true when there are more pages that can be retrieved.
367567 HasMore bool `json:"has_more,required"`
0 commit comments