OBJECT

EmailTemplateRepository

Read operations for EmailTemplate records.

link GraphQL Schema definition

  • type EmailTemplateRepository {
  • # Returns the record with the given id, or null when there is none. Deleted
  • # records are returned as well.
  • #
  • # Arguments
  • # entityId: Id of the record to return.
  • getById(entityId: ID!): EmailTemplateEntity
  • # Returns the records with the given ids; ids without a record are left out.
  • # Deleted records are returned as well.
  • #
  • # Arguments
  • # entityIds: Ids of the records to return.
  • getByIds(entityIds: [ID!]!): [EmailTemplateEntity!]!
  • # Returns the records that match the filter, paged with limit and offset.
  • #
  • # Arguments
  • # limit: Maximum number of records to return.
  • # offset: Number of records to skip from the start of the result.
  • # filter: Conditions the returned records must meet.
  • # orderBy: Sorting of the returned records.
  • # includeDeleted: When true, deleted records are returned as
  • # well. Defaults to false.
  • getAll(
  • limit: Int,
  • offset: Int,
  • filter: EmailTemplateFilterInput,
  • orderBy: [EmailTemplateOrderByInput!],
  • includeDeleted: Boolean
  • ): [EmailTemplateEntity!]!
  • # Returns the records that match the filter as a cursor-paginated connection.
  • #
  • # Arguments
  • # filter: Conditions the returned records must meet.
  • # orderBy: Sorting of the returned records.
  • # includeDeleted: When true, deleted records are returned as
  • # well. Defaults to false.
  • # before: Cursor until which to take entities to result set.
  • # after: Cursor after which to start taking entities to result
  • # set.
  • # first: Number of entities to return from beginning of the
  • # result set.
  • # last: Return only the "last" number of entities from result
  • # set.
  • getByCriteria(
  • filter: EmailTemplateFilterInput,
  • orderBy: [EmailTemplateOrderByInput!],
  • includeDeleted: Boolean,
  • before: String,
  • after: String,
  • first: Int,
  • last: Int
  • ): EmailTemplateEntityConnection
  • # Returns the ids of the fields of a record that changed after the given revision.
  • # Returns an empty list for entities without change tracking.
  • #
  • # Arguments
  • # id: Id of the record.
  • # revision: Revision to compare against; only later changes are
  • # returned.
  • getChangedFieldsSinceRevision(
  • id: UUID!,
  • revision: Int!
  • ): [UUID!]!
  • # Assigns properties of a living entity to a non-living template from its id.
  • #
  • # Arguments
  • # entityId: Source template entity id to personify.
  • # personificationEntityData: Records whose data fill the
  • # placeholders of the template, such as its contact, account or opportunity.
  • previewPersonifiedRecordsById(
  • entityId: ID!,
  • personificationEntityData: [PersonificationEntityDataParams!]!
  • ): EmailTemplatePersonificationResult!
  • # Assigns properties of a living entity to a non-living template from input
  • # object.
  • #
  • # Arguments
  • # entity: Source template entity. It will not create this entity,
  • # just use its data to preview.
  • # personificationEntityData: Records whose data fill the
  • # placeholders of the template, such as its contact, account or opportunity.
  • previewPersonifiedRecords(
  • entity: CreateEmailTemplateInput!,
  • personificationEntityData: [PersonificationEntityDataParams!]!
  • ): EmailTemplatePersonificationResult!
  • # Returns the processes that send the given email template, so the caller can see
  • # which processes a change to the template affects.
  • #
  • # Arguments
  • # entityId: Id of the email template.
  • # operation: Planned change to the template (save, delete or
  • # sharing). Currently ignored: every process that sends the template is returned
  • # for any operation.
  • # sharing: Planned new sharing of the template, when the change
  • # is a sharing change. Currently ignored.
  • getAffectedProcesses(
  • entityId: UUID!,
  • operation: AffectedProcessesOperationType!,
  • sharing: AffectedProcessesSharing
  • ): [AffectedProcessesProcessOutput!]!
  • # Returns the email sequences that send the given email template, so the caller
  • # can see which sequences a change to the template affects.
  • #
  • # Arguments
  • # entityId: Id of the email template.
  • # operation: Planned change to the template (save, delete or
  • # sharing). Currently ignored: every email sequence that sends the template is
  • # returned for any operation.
  • # sharing: Planned new sharing of the template, when the change
  • # is a sharing change. Currently ignored.
  • getAffectedEmailSequences(
  • entityId: UUID!,
  • operation: AffectedProcessesOperationType!,
  • sharing: AffectedProcessesSharing
  • ): [AffectedProcessesProcessOutput!]!
  • # Returns an email template's content and attachments, with a status telling
  • # whether a process can still use it. The status is Deleted for a deleted
  • # template, and Unavailable when the caller cannot open the template but the given
  • # process uses it.
  • #
  • # Arguments
  • # entityId: Id of the email template.
  • # processId: Id of the process that uses the template.
  • getStatusInProcess(entityId: UUID!, processId: UUID): StatusInProcessOutput!
  • # Returns an email template's content and attachments, with a status telling
  • # whether an email sequence can still use it. The status is Deleted for a deleted
  • # template, and Unavailable when the caller cannot open the template but the given
  • # sequence uses it.
  • #
  • # Arguments
  • # entityId: Id of the email template.
  • # emailSequenceId: Id of the email sequence that uses the
  • # template.
  • getStatusInEmailSequence(
  • entityId: UUID!,
  • emailSequenceId: UUID
  • ): StatusInProcessOutput!
  • # Converts an email template body built in the visual (WYSIWYG) editor from MJML
  • # markup into HTML ready to be sent.
  • #
  • # Arguments
  • # body: Template body in MJML markup.
  • convertWysiwygTemplateToHtml(body: String!): String!
  • }