Module: notification_template

Copyright 2020 Parsable, Inc
API address: /api/notification_templates
Functionality for Applets

ModuleServicesData typesConstants
notification_templateNotificationTemplateService
NotificationParams
NotificationTemplate
NotificationTemplateField
NotificationTemplateType
ReferenceableNotificationOp
Source

Enumerations

Enumeration: NotificationTemplateType

Notification Templates types Every new Enum added to this list, must be also added to 'notification_templates' table 'type' column

hub1
push2
email3
phone4
webhook5

Data structures

Struct: NotificationTemplate

KeyFieldTypeDescriptionRequirednessDefault value
1idstringdefault
2teamIdstringdefault
3labelstringdefault
4typeNotificationTemplateTypedefault
5payloadstringdefault
6createdAti64default
7updatedAti64default
8archivedAti64default
100attributeslist<abac.AbacAttribute>optional

Struct: NotificationTemplateField

KeyFieldTypeDescriptionRequirednessDefault value
1idstringdefault
2notificationTemplateIdstringdefault
3ownerIdstringdefault
4notificationTemplateNotificationTemplateoptional
5referenceslist<reference.Reference>default
6createdAti64default
7updatedAti64default
8targetslist<reference.Target>default

Struct: ReferenceableNotificationOp

KeyFieldTypeDescriptionRequirednessDefault value
1opnotification_event.NotificationOpdefault
2placeholderslist<reference.Placeholder>default

Struct: Source

KeyFieldTypeDescriptionRequirednessDefault value
1jobIdstringdefault
2jobBaseStepIdstringdefault
3fieldIdstringdefault
4clientIdstringdefault

Struct: NotificationParams

KeyFieldTypeDescriptionRequirednessDefault value
1attributeslist<abac.AbacAttribute>optional


Services

Service: NotificationTemplateService

Function: NotificationTemplateService.create

string create(string teamId,
              string label,
              NotificationTemplateType type,
              ReferenceableNotificationOp payload,
              NotificationParams notificationParams)
    throws common.SystemException
Create a new Notification Template

Function: NotificationTemplateService.createReference

string createReference(string notificationTemplateId,
                       string fieldId,
                       list<reference.Reference> references,
                       list<reference.Target> targets)
    throws common.SystemException

Function: NotificationTemplateService.notify

list<notification_event.NotificationEvent> notify(string teamId,
                                                  Source source)
    throws common.SystemException
Sends a notificationEvent to Notifications backend

Function: NotificationTemplateService.index

list<NotificationTemplate> index(string teamId)
    throws common.SystemException

Function: NotificationTemplateService.get

NotificationTemplate get(string teamId,
                         string notificationTemplateId)
    throws common.SystemException
Get a Notification Template by id

Function: NotificationTemplateService.deleteReference

void deleteReference(string teamId,
                     string notificationTemplateFieldId)
    throws common.SystemException
Delete a single one given link between a NotificationTemplate and a Field

Function: NotificationTemplateService.deleteReferences

void deleteReferences(string teamId,
                      string fieldId)
    throws common.SystemException
Delete all Notification Templates that are linked to a Field

Function: NotificationTemplateService.update

void update(string teamId,
            string notificationTemplateId,
            string label,
            ReferenceableNotificationOp payload,
            NotificationParams notificationParams)
    throws common.SystemException
Update a Notification Template

Function: NotificationTemplateService.archive

void archive(string teamId,
             string notificationTemplateId)
    throws common.SystemException

Function: NotificationTemplateService.unarchive

void unarchive(string teamId,
               string notificationTemplateId)
    throws common.SystemException

Function: NotificationTemplateService.duplicate

string duplicate(string teamId,
                 string notificationTemplateId)
    throws common.SystemException

Function: NotificationTemplateService.updateAttribute

list<abac.AbacAttribute> updateAttribute(common.UUID templateId,
                                         string attributeId,
                                         list<abac.AbacAttributeValue> values,
                                         abac.AbacUploadBehaviour behave)
    throws common.SystemException
Update a single attribute on a notification template return value will always be a list with a single attribute determined by which attribute was updated param templateId: integration template to update param attributeId: the AttributeId of the team level attribute to be updated param values: the new AttributeValues to associated with Attribute attributeId on Integration Template templateId param behave: determine the behaviour of the endpoint, merge or clobber. Default: clobber