DTO

This module is used to gather all Data Transfer Object definitions in the Novu SDK.

All definitions of format returned by the Novu API are here, which help us to instantiate and document them for developer purpose (instead of getting raw dict without any hint about what is in it).

class novu.dto.ActivityGraphStatesDto(_id: str, count: int, templates: List[str], channels: List[Channel])

Definition of an activity graph states in Novu.

_id: str

Activity graph states ID in Novu internal storage system

channels: List[Channel]

Graph states’ channel.

count: int

Count.

templates: List[str]

Graph states’ template.

class novu.dto.ActivityNotificationDto(_environment_id: str, _organization_id: str, transaction_id: str, created_at: str | None = None, channels: str | None = None, subscriber: DtoDescriptor[ActivityNotificationSubscriberResponseDTO] | None = None, template: DtoDescriptor[ActivityNotificationTemplateResponseDto] | None = None, jobs: DtoDescriptor[ActivityNotificationJobResponseDto] | None = None, _id: str | None = None)

Definition of the notification

_environment_id: str

The environment ID of the notification

_id: str | None = None

The unique ID of the notification

_organization_id: str

The organization ID of the notification

channels: str | None = None

The channels of the notification

created_at: str | None = None

The creation date of the notification

jobs: DtoDescriptor[ActivityNotificationJobResponseDto] | None = None

The jobs of the notification

subscriber: DtoDescriptor[ActivityNotificationSubscriberResponseDTO] | None = None

The subscriber of the notification

template: DtoDescriptor[ActivityNotificationTemplateResponseDto] | None = None

The template of the notification

transaction_id: str

The transaction ID of the notification

class novu.dto.ActivityNotificationExecutionDetailResponseDto(_id: str, _job_id: str, status: str, detail: str, is_retry: bool, is_test: bool, provider_id: dict, source: str, raw: str | None = None)

Definition of the execution of the notification

_id: str

The unique ID of the execution

_job_id: str

The ID of the job that executed the notification

detail: str

The detail of the execution

is_retry: bool

Whether the execution is a retry

is_test: bool

Whether the execution is a test

provider_id: dict

The ID of the provider that executed the notification

raw: str | None = None

The raw data of the execution

source: str

The source of the execution

status: str

The status of the execution

class novu.dto.ActivityNotificationJobResponseDto(_id: str, provider_id: dict, status: str, step: DtoIterableDescriptor[ActivityNotificationStepResponseDto] = None, type: DtoDescriptor[ActivityNotificationTriggerResponseDto] = None, execution_details: DtoIterableDescriptor[ActivityNotificationExecutionDetailResponseDto] = None, digest: dict | None = None, payload: dict | None = None)

Definition of the job that executed the notification

_id: str

The unique ID of the job

digest: dict | None = None

The digest of the job

execution_details: DtoIterableDescriptor[ActivityNotificationExecutionDetailResponseDto] = None

The execution details of the job

payload: dict | None = None

The payload of the job

provider_id: dict

The ID of the provider that executed the job

status: str

The status of the job

step: DtoIterableDescriptor[ActivityNotificationStepResponseDto] = None

The step of the job

class novu.dto.ActivityNotificationStepResponseDto(_id: str, active: bool, filters: dict, template: dict | None = None)

Definition for the Notification for the Step Dto

_id: str

The unique ID of the step

active: bool

Whether the step is active

filters: dict

The filters for the step

template: dict | None = None

The template for the step

class novu.dto.ActivityNotificationSubscriberResponseDTO(_id: str, email: str | None = None, first_name: str | None = None, last_name: str | None = None, phone: str | None = None)

Definition of the specific response for an activity notification subscriber request.

_id: str

The subscriber’s unique ID

email: str | None = None

The subscriber’s email

first_name: str | None = None

The subscriber’s first name

last_name: str | None = None

The subscriber’s last name

phone: str | None = None

The subscriber’s phone number

class novu.dto.ActivityNotificationTemplateResponseDto(name: str, triggers: DtoIterableDescriptor[ActivityNotificationTriggerResponseDto] = None, _id: str | None = None)

Definition of the template used to send the notification

_id: str | None = None

The unique ID of the template

name: str

The name of the template

triggers: DtoIterableDescriptor[ActivityNotificationTriggerResponseDto] = None

The triggers for the template

class novu.dto.ActivityNotificationTriggerResponseDto(type: str, identifier: str, variables: List[dict], subscriber_variables: List[dict] | None = None)

Definition of the triggers for the notifications

identifier: str

The identifier of the trigger

subscriber_variables: List[dict] | None = None

The subscriber variables for the trigger

type: str

The type of trigger

variables: List[dict]

The variables for the trigger

class novu.dto.BlueprintDto(name: str, description: str, _id: str | None = None, _environment_id: str | None = None, _organization_id: str | None = None, _notification_group_id: str | None = None, _creator_id: str | None = None, created_at: str | None = None, updated_at: str | None = None, deleted: bool | None = None, deleted_at: str | None = None, deleted_by: str | None = None, critical: bool | None = None, _parent_id: str | None = None, active: bool | None = None, blueprint_id: str | None = None, draft: bool | None = None, is_blueprint: bool | None = None, notification_group: object | None = None, preference_settings: object | None = None, steps: List[object] | None = None, tags: List[str] | None = None, triggers: List[object] | None = None)

Blueprint definition.

_creator_id: str | None = None

Creator ID in Novu internal storage system.

_environment_id: str | None = None

Environment ID in Novu internal storage system.

_id: str | None = None

Blueprint ID in Novu internal storage system.

_notification_group_id: str | None = None

Notification group ID in Novu internal storage system.

_organization_id: str | None = None

Organization ID in Novu internal storage system.

_parent_id: str | None = None

Parent ID in Novu internal storage system.

active: bool | None = None

Active status of the blueprint.

blueprint_id: str | None = None

Blueprint ID in Novu internal storage system.

created_at: str | None = None

Creation date-time of the blueprint.

critical: bool | None = None

If the blueprint is critical.

deleted: bool | None = None

If the blueprint is deleted.

deleted_at: str | None = None

Date-time of the removal of the blueprint.

deleted_by: str | None = None

User who asked for the removal of the blueprint.

description: str

Blueprint description.

draft: bool | None = None

Draft status of the blueprint.

is_blueprint: bool | None = None

If the object is a blueprint.

name: str

Blueprint name.

notification_group: object | None = None

Notification group object.

preference_settings: object | None = None

Preference settings object.

steps: List[object] | None = None

List of steps in the blueprint.

tags: List[str] | None = None

List of tags associated with the blueprint.

triggers: List[object] | None = None

List of triggers in the blueprint.

updated_at: str | None = None

Last date-time when the blueprint was updated.

class novu.dto.BulkResultSubscriberDto(created: DtoIterableDescriptor[SubscriberDto] = None, updated: DtoIterableDescriptor[SubscriberDto] = None, failed: DtoIterableDescriptor[SubscriberDto] = None)

Definition of paginated subscribers

created: DtoIterableDescriptor[SubscriberDto] = None

List of subscribers that were created during the operation.

failed: DtoIterableDescriptor[SubscriberDto] = None

List of subscribers whose creation (or update) failed.

updated: DtoIterableDescriptor[SubscriberDto] = None

List of subscribers that were updated during the operation.

class novu.dto.ChangeDetailDto(op: str | None = None, path: List[str] | None = None, val: Any | None = None)

Definition of a change detail

op: str | None = None

The operation code of the change

path: List[str] | None = None

The path of the modification

val: Any | None = None

Value of the change, struct depend of the context

class novu.dto.ChangeDto(_id: str | None = None, _environment_id: str | None = None, _organization_id: str | None = None, _entity_id: str | None = None, _parent_id: str | None = None, enabled: bool | None = None, type: ChangeKind | None = None, change: DtoIterableDescriptor[ChangeDetailDto] = None, created_at: str | None = None, updated_at: str | None = None)

Definition of a change

_entity_id: str | None = None

Entity ID in Novu internal storage system

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Change ID in Novu internal storage system

_organization_id: str | None = None

Organization ID in Novu internal storage system

_parent_id: str | None = None

Parent ID in Novu internal storage system

change: DtoIterableDescriptor[ChangeDetailDto] = None

Details about a change

created_at: str | None = None

Date-time of the integration initial configuration

enabled: bool | None = None

If the change was enabled.

type: ChangeKind | None = None

Kind of change applied.

updated_at: str | None = None

Date-time of the last update of the integration

class novu.dto.EnvironmentApiKeyDto(key: str, _user_id: str, _id: str | None = None)

Definition of an environment’s api-key

_id: str | None = None

Environment’s API Key ID in Novu internal storage system

_user_id: str

The user identifier related to the api-key

key: str

The API key

class novu.dto.EnvironmentDto(id: str | None = None, _id: str | None = None, name: str | None = None, identifier: str | None = None, _organization_id: str | None = None, widget: DtoDescriptor[EnvironmentWidgetDto] = None, api_keys: DtoIterableDescriptor[EnvironmentApiKeyDto] = None, created_at: str | None = None, updated_at: str | None = None)

Definition of an environment

_id: str | None = None

Environment ID in Novu internal storage system

_organization_id: str | None = None

Organization ID in Novu internal storage system

api_keys: DtoIterableDescriptor[EnvironmentApiKeyDto] = None

List of API Keys related to the environment

created_at: str | None = None

Creation date of the environment

id: str | None = None

Environment ID in Novu internal storage system

identifier: str | None = None

Identifier of the environment

name: str | None = None

Name of the environment

updated_at: str | None = None

Last update date of the environment

widget: DtoDescriptor[EnvironmentWidgetDto] = None

Environment’s widget settings

class novu.dto.EnvironmentWidgetDto(notification_center_encryption: bool)

Definition of an environment’s widget

notification_center_encryption: bool

If the notification center use encryption

class novu.dto.EventDto(acknowledged: bool, status: EventStatus, transaction_id: str)

Definition of an event

acknowledged: bool

If trigger was acknowledged or not.

status: EventStatus

Status for trigger.

transaction_id: str

Transaction id for trigger.

class novu.dto.ExecutionDetailDto(_id: str | None = None, _job_id: str | None = None, _environment_id: str | None = None, _organization_id: str | None = None, _notification_id: str | None = None, _notification_template_id: str | None = None, _subscriber_id: str | None = None, _message_id: str | None = None, provider_id: str | None = None, transaction_id: str | None = None, channel: ChannelExtended | None = None, detail: str | None = None, source: ExecutionSource | None = None, status: ExecutionStatus | None = None, is_test: bool | None = None, is_retry: bool | None = None, raw: str | None = None, created_at: str | None = None, updated_at: str | None = None)

Definition of an execution detail

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Execution detail ID in Novu internal storage system

_job_id: str | None = None

Job ID in Novu internal storage system

_message_id: str | None = None

Message ID in Novu internal storage system

_notification_id: str | None = None

Notification ID in Novu internal storage system

_notification_template_id: str | None = None

Notification template ID in Novu internal storage system

_organization_id: str | None = None

Organization ID in Novu internal storage system

_subscriber_id: str | None = None

Subscriber ID in Novu internal storage system

channel: ChannelExtended | None = None

Channel used to the execution (or logical step like digest or trigger)

created_at: str | None = None

Creation date of the execution detail

detail: str | None = None

Details of the execution

is_retry: bool | None = None

If this execution detail is related to a retry

is_test: bool | None = None

If this execution is related to a test

provider_id: str | None = None

Provider ID in Novu internal storage system

raw: str | None = None

Raw details of the execution

source: ExecutionSource | None = None

Source of the execution

status: ExecutionStatus | None = None

Status of the execution

transaction_id: str | None = None

Transaction ID in Novu internal storage system

updated_at: str | None = None

Last update date of the execution detail

class novu.dto.FeedDto(name: str, identifier: str | None = None, _id: str | None = None, _environment_id: str | None = None, _organization_id: str | None = None, deleted: bool | None = None, created_at: str | None = None, updated_at: str | None = None, id: str | None = None)

Definition of a feed

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Feed ID in Novu internal storage system

_organization_id: str | None = None

Organization ID in Novu internal storage system

created_at: str | None = None

Creation date of the field

deleted: bool | None = None

If the field is deleted

id: str | None = None

Feed ID in Novu internal storage system

identifier: str | None = None

Feed identifier, should be the given name set by default in Novu

name: str

Name of the feed

updated_at: str | None = None

Last update date of the feed

class novu.dto.FieldFilterPartDto(field: str, value: str, operator: FieldFilterPartOperator, on: FieldFilterPartOn, webhook_url: str | None = None, time_operator: FieldFilterPartTimeOperator | None = None)

Definition of a field filter part

field: str

Field of the field filter part

on: FieldFilterPartOn

On value of the field filter part

operator: FieldFilterPartOperator

Operator of the field filter part

time_operator: FieldFilterPartTimeOperator | None = None

Time operator, only set if the on is set to FieldFilterPartOn.IS_ONLINE_IN_LAST

value: str

Value of the field filter part

If the on is set to FieldFilterPartOn.IS_ONLINE_IN_LAST, this value is a number.

If the on is set to FieldFilterPartOn.IS_ONLINE, this value is a boolean.

webhook_url: str | None = None

Webhook URL, only set if the on is set to FieldFilterPartOn.WEBHOOK

class novu.dto.GroupedBlueprintDto(category: str, general: DtoIterableDescriptor[BlueprintDto] = None, popular: DtoIterableDescriptor[BlueprintDto] = None)

Grouped blueprint definition.

category: str

Blueprint category.

general: DtoIterableDescriptor[BlueprintDto] = None

List of general blueprints in the category.

popular: DtoIterableDescriptor[BlueprintDto] = None

List of popular blueprints in the category.

class novu.dto.IntegrationChannelUsageDto(count: int | None, limit: int | None)

Definition of an integration usage (scoped to a channel)

count: int | None

Usage count of the channel

limit: int | None

Usage limit of the channel

class novu.dto.IntegrationDto(provider_id: SmsProviderIdEnum | PushProviderIdEnum | ChatProviderIdEnum | EmailProviderIdEnum | InAppProviderIdEnum, channel: Channel, active: bool, credentials: Dict[CredentialsKeyEnum, str | bool] | None = None, _id: str | None = None, _environment_id: str | None = None, _organization_id: str | None = None, created_at: str | None = None, updated_at: str | None = None, deleted_at: str | None = None, deleted_by: str | None = None, deleted: bool | None = None)

Definition of an integration

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Integration ID in Novu internal storage system

_organization_id: str | None = None

Organization ID in Novu internal storage system

active: bool

If the provider is active

camel_case_fields: ClassVar[List[str] | None] = ['provider_id', 'channel', 'credentials', 'active']

List of fields to define in the dict during to_camel_case().

If this list is not defined, we have taken all the fields from the data class.

channel: Channel

Integration channel

created_at: str | None = None

Date-time of the integration initial configuration

credentials: Dict[CredentialsKeyEnum, str | bool] | None = None

Credentials of the provider

deleted: bool | None = None

If the integration is deleted

deleted_at: str | None = None

Date-time of the removal of the integration

deleted_by: str | None = None

User how ask for the removal of the integration

provider_id: SmsProviderIdEnum | PushProviderIdEnum | ChatProviderIdEnum | EmailProviderIdEnum | InAppProviderIdEnum

Provider ID, which is one of predefined available enum

updated_at: str | None = None

Date-time of the last update of the integration

class novu.dto.LayoutDto(name: str, description: str, content: str, is_default: bool, variables: DtoIterableDescriptor[LayoutVariableDto] = None, _id: str | None = None, _environment_id: str | None = None, _organization_id: str | None = None, _creator_id: str | None = None, content_type: str | None = None, channel: Channel | None = None, created_at: str | None = None, updated_at: str | None = None, is_deleted: bool | None = None)

Layout definition

_creator_id: str | None = None

Creator ID in Novu internal storage system

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Layout ID in Novu internal storage system

_organization_id: str | None = None

Organization ID in Novu internal storage system

camel_case_fields: ClassVar[List[str] | None] = ['name', 'description', 'content', 'variables', 'is_default']

List of fields to define in the dict during to_camel_case().

If this list is not defined, we have taken all the fields from the data class.

channel: Channel | None = None

Channel of the layout

content: str

Layout content, must contains at least {{{body}}}}

content_type: str | None = None

Content type of the layout

created_at: str | None = None

Creation date-time of the layout

description: str

Layout description

is_default: bool

Layout is the default layout in your environment

is_deleted: bool | None = None

If the layout is deleted

name: str

Layout name

updated_at: str | None = None

Last date-time when the layout was updated

variables: DtoIterableDescriptor[LayoutVariableDto] = None

List of variables used in the layout

class novu.dto.LayoutVariableDto(name: str, type: TemplateVariableTypeEnum, _id: str | None = None, required: bool = False, default_value: str | None = None)

Layout variable definition

_id: str | None = None

Layout variable ID in the Novu storage system

default_value: str | None = None

The variable default value in layout

name: str

Layout variable name

required: bool = False

If this variable is required in layout

type: TemplateVariableTypeEnum

Layout variable type

class novu.dto.MessageDto(identifier: str | None = None, _id: str | None = None, _template_id: str | None = None, _environment_id: str | None = None, _message_template_id: str | None = None, _organization_id: str | None = None, _subscriber_id: str | None = None, _job_id: str | None = None, template_identifier: str | None = None, email: str | None = None, subject: str | None = None, cta: dict | None = None, channel: Channel | None = None, content: str | None = None, provider_id: SmsProviderIdEnum | PushProviderIdEnum | ChatProviderIdEnum | EmailProviderIdEnum | InAppProviderIdEnum | None = None, device_tokens: List[dict] | None = None, seen: bool | None = None, read: bool | None = None, status: str | None = None, transaction_id: str | None = None, payload: dict | None = None, created_at: str | None = None, updated_at: str | None = None, deleted: bool | None = None, last_read_date: str | None = None, last_seen_date: str | None = None)

Definition of an event

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Message Notification ID in Novu internal storage system

_job_id: str | None = None

Job ID in Novu internal storage system

_message_template_id: str | None = None

Message Template ID in Novu internal storage system

_organization_id: str | None = None

Organization ID in Novu internal storage system

_subscriber_id: str | None = None

Subscriber ID in Novu internal storage system

_template_id: str | None = None

Template ID in Novu internal storage system

channel: Channel | None = None

Channel used for the message

content: str | None = None

Content of the message

created_at: str | None = None

Creation date of the message

cta: dict | None = None

Definition of the call to action used on message

deleted: bool | None = None

If the message is deleted

device_tokens: List[dict] | None = None

A list of device tokens used on the provider to send message

email: str | None = None

Email of the subscriber triggered where the message has been sent

identifier: str | None = None

The message identifier

last_read_date: str | None = None

Timestamp of the last read event registered

last_seen_date: str | None = None

Timestamp of the last seen event registered

payload: dict | None = None

Payload used during trigger

provider_id: SmsProviderIdEnum | PushProviderIdEnum | ChatProviderIdEnum | EmailProviderIdEnum | InAppProviderIdEnum | None = None

Provider ID used for the message

read: bool | None = None

If the message has been read

seen: bool | None = None

If the message has been seen.

status: str | None = None

Status of the activity notification

subject: str | None = None

Subject of the email sent

template_identifier: str | None = None

Template ID in Novu internal storage system

transaction_id: str | None = None

Transaction ID in Novu internal storage system

updated_at: str | None = None

Last update date of the message

class novu.dto.NotificationGroupDto(name: str, _id: str | None = None, _environment_id: str | None = None, _organization_id: str | None = None, _parent_id: str | None = None, created_at: str | None = None, updated_at: str | None = None)

Definition of a notification group

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Notification Group ID in Novu internal storage system

_organization_id: str | None = None

Organization ID in Novu internal storage system

_parent_id: str | None = None

Parent ID in Novu internal storage system

created_at: str | None = None

Creation date of the notification group

name: str

Notification group’s name

updated_at: str | None = None

Last update date of the notification group

class novu.dto.NotificationStepDto(_id: str | None = None, _template_id: str | None = None, _parent_id: str | None = None, active: bool | None = None, should_stop_on_fail: bool | None = None, template: dict | None = None, filters: DtoIterableDescriptor[StepFilterDto] = None, metadata: NotificationStepMetadataDto | None = None, replay_callback: dict | None = None)

Definition of a notification step

_id: str | None = None

Notification Step ID in Novu internal storage system

_parent_id: str | None = None

Notification Step ID in Novu internal storage system (parent of this step)

_template_id: str | None = None

Notification Template ID in Novu internal storage system

active: bool | None = None

If this step is active

filters: DtoIterableDescriptor[StepFilterDto] = None

Filters of this template

metadata: NotificationStepMetadataDto | None = None

Metadata of this notification step

replay_callback: dict | None = None

Definition of the replay callback

should_stop_on_fail: bool | None = None

The flow should stop the flow if this step fail ?

template: dict | None = None

Message template of the step

class novu.dto.NotificationStepMetadataDto(type: NotificationStepMetadataType, amount: int | None = None, unit: NotificationStepMetadataUnit | None = None, digest_key: str | None = None, delay_path: str | None = None, backoff_unit: NotificationStepMetadataUnit | None = None, update_mode: bool | None = None)

Definition of metadata for a notification step

amount: int | None = None

The amount of the notification step metadata

backoff_unit: NotificationStepMetadataUnit | None = None

The backoff unit of the notification step metadata

delay_path: str | None = None

Payload path will determine the path in payload for the scheduled date.

That path must be included in your payload on trigger execution and must be a date in strict ISO format.

digest_key: str | None = None

If specified, the digest engine will group the events based on the digestKey and subscriberId, otherwise the digest engine will group the events based only on the subscriberId.

The digest key might come useful when you want a particular subscriber to get events grouped on a custom field. For example when an actor likes the user’s post, you might want to digest based on the post_id key.

type: NotificationStepMetadataType

Define the kind of metadata (regular, backoff or scheduled)

unit: NotificationStepMetadataUnit | None = None

The unit of the notification step metadata

update_mode: bool | None = None

The update mode of the notification step metadata

class novu.dto.NotificationTemplateDto(name: str, description: str | None = None, tags: List[str] | None = None, steps: DtoIterableDescriptor[NotificationStepDto] = None, active: bool | None = None, critical: bool | None = None, draft: bool | None = None, preference_settings: DtoDescriptor[SubscriberPreferenceChannelDto] | None = None, triggers: DtoIterableDescriptor[NotificationTriggerDto] = None, _id: str | None = None, _environment_id: str | None = None, _organization_id: str | None = None, _notification_group_id: str | None = None, _parent_id: str | None = None, _creator_id: str | None = None, notification_group: DtoDescriptor[NotificationGroupDto] | None = None, created_at: str | None = None, updated_at: str | None = None, deleted_at: str | None = None, deleted: bool | None = None)

Definition of a notification template

_creator_id: str | None = None

Creator ID in Novu internal storage system

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Notification Template ID in Novu internal storage system

_notification_group_id: str | None = None

Notification Group ID in Novu internal storage system

_organization_id: str | None = None

Organization ID in Novu internal storage system

_parent_id: str | None = None

Parent ID in Novu internal storage system

active: bool | None = None

If the template is active

created_at: str | None = None

The notification template’s creation date

critical: bool | None = None

If the template should bypass user preferences

deleted: bool | None = None

If the notification template is deleted

deleted_at: str | None = None

The notification template has been deleted at

description: str | None = None

A description of the template

draft: bool | None = None

If the template is a draft

name: str

Name of the template

notification_group: DtoDescriptor[NotificationGroupDto] | None = None

Notification group linked to the notification template

preference_settings: DtoDescriptor[SubscriberPreferenceChannelDto] | None = None

Preference settings of the notification template

steps: DtoIterableDescriptor[NotificationStepDto] = None

Steps of the template, which describe a step of your notification flow

tags: List[str] | None = None

Notification template’s tags

triggers: DtoIterableDescriptor[NotificationTriggerDto] = None

Usable triggers to launch this notification template

updated_at: str | None = None

The last notification template’s update date

class novu.dto.NotificationTemplateFormDto(name: str, notification_group_id: str, description: str | None = None, tags: List[str] | None = None, steps: DtoIterableDescriptor[NotificationStepDto] = None, active: bool | None = None, critical: bool | None = None, draft: bool | None = None, preference_settings: DtoDescriptor[SubscriberPreferenceChannelDto] | None = None)

Definition of a notification template form (create / update)

active: bool | None = None

If the template is active

critical: bool | None = None

If the template should bypass user preferences

description: str | None = None

A description of the template

draft: bool | None = None

If the template is a draft

name: str

Name of the template

notification_group_id: str

Notification Group ID from Novu internal storage system

preference_settings: DtoDescriptor[SubscriberPreferenceChannelDto] | None = None

Preference settings of the notification template

steps: DtoIterableDescriptor[NotificationStepDto] = None

Steps of the template, which describe a step of your notification flow

tags: List[str] | None = None

Notification template’s tags

class novu.dto.NotificationTriggerDto(type: str, identifier: str, variables: DtoIterableDescriptor[NotificationTriggerVariableDto] = None, subscriber_variables: DtoIterableDescriptor[NotificationTriggerVariableDto] = None)

Definition of a trigger for a notification template

identifier: str

Notification trigger’s identifier

subscriber_variables: DtoIterableDescriptor[NotificationTriggerVariableDto] = None

Subscriber’s variables of a notification trigger

type: str

Notification trigger’s type

variables: DtoIterableDescriptor[NotificationTriggerVariableDto] = None

Variables of a notification trigger

class novu.dto.NotificationTriggerVariableDto(name: str)

Definition of a trigger’s variable for notification template

name: str

Notification trigger variable’s name

class novu.dto.PaginatedActivityNotificationDto(page: int = 0, has_more: bool = False, page_size: int = 0, data: DtoIterableDescriptor[ActivityNotificationDto] = None)

Definition of paginated subscribers

data: DtoIterableDescriptor[ActivityNotificationDto] = None

Data

has_more: bool = False

If their is more notifications available

page: int = 0

Page number

page_size: int = 0

Page size

class novu.dto.PaginatedChangeDto(page: int = 0, total_count: int = 0, page_size: int = 0, data: DtoIterableDescriptor[ChangeDto] = None)

Definition of paginated changes

data: DtoIterableDescriptor[ChangeDto] = None

Data

page: int = 0

Page number

page_size: int = 0

Page size

total_count: int = 0

Total count

class novu.dto.PaginatedLayoutDto(page: int = 0, total_count: int = 0, page_size: int = 0, data: DtoIterableDescriptor[LayoutDto] = None)

Paginated layout definition

data: DtoIterableDescriptor[LayoutDto] = None

Data

page: int = 0

Page number

page_size: int = 0

Page size

total_count: int = 0

Total count

class novu.dto.PaginatedMessageDto(page: int = 0, total_count: int = 0, page_size: int = 0, data: DtoIterableDescriptor[MessageDto] = None)

Paginated message definition

data: DtoIterableDescriptor[MessageDto] = None

Data

page: int = 0

Page number

page_size: int = 0

Page size

total_count: int = 0

Total count

class novu.dto.PaginatedNotificationGroupDto(page: int = 0, total_count: int = 0, page_size: int = 0, data: DtoIterableDescriptor[NotificationGroupDto] = None)

Definition of paginated notification groups

data: DtoIterableDescriptor[NotificationGroupDto] = None

Data

page: int = 0

Page number

page_size: int = 0

Page size

total_count: int = 0

Total count

class novu.dto.PaginatedNotificationTemplateDto(page: int = 0, total_count: int = 0, page_size: int = 0, data: DtoIterableDescriptor[NotificationTemplateDto] = None)

Definition of paginated subscribers

data: DtoIterableDescriptor[NotificationTemplateDto] = None

Data

page: int = 0

Page number

page_size: int = 0

Page size

total_count: int = 0

Total count

class novu.dto.PaginatedSubscriberDto(page: int = 0, total_count: int = 0, page_size: int = 0, data: DtoIterableDescriptor[SubscriberDto] = None)

Definition of paginated subscribers

data: DtoIterableDescriptor[SubscriberDto] = None

Data

page: int = 0

Page number

page_size: int = 0

Page size

total_count: int = 0

Total count

class novu.dto.PaginatedTenantDto(page: int = 0, has_more: bool = False, page_size: int = 0, data: DtoIterableDescriptor[TenantDto] = None)

Paginated topic definition

data: DtoIterableDescriptor[TenantDto] = None

Data

has_more: bool = False

Does the list have more items to fetch

page: int = 0

Page number

page_size: int = 0

Page size

class novu.dto.PaginatedTopicDto(page: int = 0, total_count: int = 0, page_size: int = 0, data: DtoIterableDescriptor[TopicDto] = None)

Paginated topic definition

data: DtoIterableDescriptor[TopicDto] = None

Data

page: int = 0

Page number

page_size: int = 0

Page size

total_count: int = 0

Total count

class novu.dto.StepFilterDto(is_negated: bool | None = None, type: StepFilterType | None = None, value: StepFilterValue | None = None, children: DtoIterableDescriptor[FieldFilterPartDto] = None)

Definition of a step filter

children: DtoIterableDescriptor[FieldFilterPartDto] = None

Step filter’s children

is_negated: bool | None = None

If the filter should be negated

type: StepFilterType | None = None

Step filter’s type

value: StepFilterValue | None = None

Step filter’s value

class novu.dto.SubscriberChannelSettingsCredentialsDto(webhook_url: str | None = None, channel: str | None = None, device_tokens: List[str] | None = None)

Credentials payload for the specified provider.

channel: str | None = None

Channel specification for Mattermost chat notifications

device_tokens: List[str] | None = None

Contains an array of the subscriber device tokens for a given provider. Used on Push integrations

webhook_url: str | None = None

Webhook url used by chat app integrations. The webhook should be obtained from the chat app provider

class novu.dto.SubscriberChannelSettingsDto(provider_id: SmsProviderIdEnum | PushProviderIdEnum | ChatProviderIdEnum | EmailProviderIdEnum | InAppProviderIdEnum, _integration_id: str, credentials: DtoDescriptor[SubscriberChannelSettingsCredentialsDto] = None, integration_identifier: str | None = None)

Definition of channel settings for subscriber.

_integration_id: str

Id of the integration that is used for this channel

credentials: DtoDescriptor[SubscriberChannelSettingsCredentialsDto] = None

Credentials of this channel

integration_identifier: str | None = None

The integration identifier

provider_id: SmsProviderIdEnum | PushProviderIdEnum | ChatProviderIdEnum | EmailProviderIdEnum | InAppProviderIdEnum

The provider identifier for the credentials

class novu.dto.SubscriberDto(subscriber_id: str, email: str | None = None, first_name: str | None = None, last_name: str | None = None, phone: str | None = None, avatar: str | None = None, locale: str | None = None, _id: str | None = None, _environment_id: str | None = None, _organization_id: str | None = None, channels: DtoIterableDescriptor[SubscriberChannelSettingsDto] = None, deleted: bool | None = None, created_at: str | None = None, updated_at: str | None = None, is_online: bool | None = None, last_online_at: str | None = None)

Definition of subscriber

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Subscriber ID in Novu internal storage system

_organization_id: str | None = None

Organization ID in Novu internal storage system

avatar: str | None = None

profile picture (must be a public url to access the avatar)

camel_case_fields: ClassVar[List[str] | None] = ['subscriber_id', 'email', 'first_name', 'last_name', 'phone', 'avatar', 'locale', 'channels']

List of fields to define in the dict during to_camel_case().

If this list is not defined, we have taken all the fields from the data class.

channels: DtoIterableDescriptor[SubscriberChannelSettingsDto] = None

Subscriber provider specific credentials

created_at: str | None = None

Creation date of the subscriber

deleted: bool | None = None

If the subscriber is deleted

email: str | None = None

Email of the subscriber

first_name: str | None = None

First name of the subscriber

is_online: bool | None = None

If the subscriber is online

last_name: str | None = None

Last name of the subscriber

last_online_at: str | None = None

Last connection date of the subscriber

locale: str | None = None

language code (we recommend the use of ISO 639 to define them)

phone: str | None = None

Phone number of the subscriber

subscriber_id: str

Subscriber’s ID

updated_at: str | None = None

Last update date of the subscriber

class novu.dto.SubscriberPreferenceChannelDto(email: bool | None = True, sms: bool | None = True, in_app: bool | None = True, chat: bool | None = True, push: bool | None = True)

Definition of a channel activation state in subscriber’s preference

chat: bool | None = True

Chat notification activated?

email: bool | None = True

Email notification activated?

in_app: bool | None = True

In APP notification activated?

push: bool | None = True

Push notification activated?

sms: bool | None = True

SMS notification activated?

class novu.dto.SubscriberPreferenceDto(preference: DtoDescriptor[SubscriberPreferencePreferenceDto] = None, template: DtoDescriptor[SubscriberPreferenceTemplateDto] = None)

Definition of subscriber’s preference

preference: DtoDescriptor[SubscriberPreferencePreferenceDto] = None

Sub-struct in Novu for preference / global activation state

template: DtoDescriptor[SubscriberPreferenceTemplateDto] = None

The identifiers of the template linked to the preferences and its criticality

class novu.dto.SubscriberPreferencePreferenceDto(enabled: bool, channels: DtoDescriptor[SubscriberPreferenceChannelDto] = None)

Definition of subscriber’s preference sub-struct

channels: DtoDescriptor[SubscriberPreferenceChannelDto] = None

The activation states of the different channels

enabled: bool

If the subscriber preference are enabled

class novu.dto.SubscriberPreferenceTemplateDto(_id: str | None = None, name: str | None = None, critical: bool | None = None)

Definition of a template in subscriber’s preference

_id: str | None = None

Subscriber preference template’s ID

critical: bool | None = None

Defines if the user’s preferences will be ignored or not by Novu for the given template.

By defining the template as critical, Novu considers that all steps should be executed ignoring user preferences.

name: str | None = None

Name of the subscriber’s preference template

class novu.dto.TenantDto(identifier: str, name: str, data: dict | None = None, _id: str | None = None, _environment_id: str | None = None, created_at: str | None = None, updated_at: str | None = None)

Tenant definition

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Topic ID in Novu internal system

created_at: str | None = None

Creation date of the subscriber

data: dict | None = None

Unstructured dictionary of data stored on the tenant

identifier: str

Tenant identifier

name: str

Tenant name

updated_at: str | None = None

Last update date of the subscriber

class novu.dto.TopicDto(key: str, name: str | None = None, _id: str | None = None, _organization_id: str | None = None, _environment_id: str | None = None, subscribers: List[str] | None = None)

Topic definition

_environment_id: str | None = None

Environment ID in Novu internal storage system

_id: str | None = None

Topic ID in Novu internal system

_organization_id: str | None = None

Organization ID in Novu internal storage system

camel_case_fields: ClassVar[List[str] | None] = ['key', 'name']

List of fields to define in the dict during to_camel_case().

If this list is not defined, we have taken all the fields from the data class.

key: str

Topic key

name: str | None = None

Name, required during creation

subscribers: List[str] | None = None

List of subscribers in the topic.

class novu.dto.TriggerTopicDto(topic_key: str, type: str)

Topic definition for trigger

topic_key: str

Topic key

type: str

Topic type