subscribe

Function

create a subscription for user (existing or not) to a newsletter

Parameters

Parameter Type Default Notes
options Required ISubscribeParams

Returns

Promise<ISubscription>
Property Type Notes
action SubscriptionAction
active boolean
cadence Cadence
createdAt string
deliveryMethod DeliveryMethod
entityId string
entityType SubscriptionEntityType
id number
lastDelivery string
metadata ISubscriptionMetadata
notificationSpecId number
updatedAt string
userId string
catalog Optional ISubscriptionCatalog
notificationSpec Optional INotificationSpec
user Optional IUser

Function defined in common/src/newsletters/api/subscriptions.ts:24