createSubscription

Function

create a subscription for user (existing) to a newsletter

Parameters

Parameter Type Default Notes
options Required ICreateSubscriptionParams

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:37