Search Results for

    Show / Hide Table of Contents

    Class TemplateService

    Inheritance
    object
    TemplateService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OEMS.UI.Services
    Assembly: OEMS.UI.dll
    Syntax
    public class TemplateService

    Constructors

    TemplateService(HttpClient)

    Declaration
    public TemplateService(HttpClient httpClient)
    Parameters
    Type Name Description
    HttpClient httpClient

    Methods

    CreateEmailTemplateAsync(CreateEmailTemplateDto, Guid)

    Creates a new email template in the system.

    Declaration
    public Task<Guid> CreateEmailTemplateAsync(CreateEmailTemplateDto dto, Guid userId)
    Parameters
    Type Name Description
    CreateEmailTemplateDto dto

    The CreateEmailTemplateDto containing the data for the new email template.

    Guid userId

    The unique identifier of the user creating the template.

    Returns
    Type Description
    Task<Guid>

    The unique identifier (Guid) of the newly created email template.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when there is an error in the HTTP request.

    JsonException

    Thrown when the response cannot be deserialized into a Guid.

    CreateProcessStepTemplateAsync(CreateProcessStepTemplateDto)

    Declaration
    public Task<Guid> CreateProcessStepTemplateAsync(CreateProcessStepTemplateDto dto)
    Parameters
    Type Name Description
    CreateProcessStepTemplateDto dto
    Returns
    Type Description
    Task<Guid>

    CreateProcessTemplateAsync(CreateProcessTemplateDto)

    Declaration
    public Task<Guid> CreateProcessTemplateAsync(CreateProcessTemplateDto dto)
    Parameters
    Type Name Description
    CreateProcessTemplateDto dto
    Returns
    Type Description
    Task<Guid>

    DeleteEmailTemplateAsync(Guid)

    Deletes an email template from the system by its unique identifier.

    Declaration
    public Task DeleteEmailTemplateAsync(Guid id)
    Parameters
    Type Name Description
    Guid id

    The unique identifier of the email template to delete.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when there is an error in the HTTP request.

    DeleteProcessStepTemplateAsync(Guid)

    Declaration
    public Task DeleteProcessStepTemplateAsync(Guid id)
    Parameters
    Type Name Description
    Guid id
    Returns
    Type Description
    Task

    DeleteProcessTemplateAsync(Guid)

    Declaration
    public Task DeleteProcessTemplateAsync(Guid id)
    Parameters
    Type Name Description
    Guid id
    Returns
    Type Description
    Task

    GetEmailTemplateByIdAsync(Guid)

    Retrieves a specific email template by its unique identifier.

    Declaration
    public Task<EmailTemplateDto> GetEmailTemplateByIdAsync(Guid id)
    Parameters
    Type Name Description
    Guid id

    The unique identifier of the email template to retrieve.

    Returns
    Type Description
    Task<EmailTemplateDto>

    An EmailTemplateDto object representing the requested email template.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when there is an error in the HTTP request.

    JsonException

    Thrown when the response cannot be deserialized into an EmailTemplateDto.

    GetEmailTemplatesAsync(Guid, Guid)

    Retrieves all email templates for a specified organization.

    Declaration
    public Task<IEnumerable<EmailTemplateDto>> GetEmailTemplatesAsync(Guid organizationId, Guid userId)
    Parameters
    Type Name Description
    Guid organizationId

    The unique identifier of the organization whose email templates should be retrieved.

    Guid userId

    The unique identifier of the user requesting the templates.

    Returns
    Type Description
    Task<IEnumerable<EmailTemplateDto>>

    A collection of EmailTemplateDto objects representing the email templates for the organization. Returns an empty list if no templates are found or if an error occurs.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when there is an error in the HTTP request.

    GetProcessStepTemplateByIdAsync(Guid)

    Declaration
    public Task<ProcessStepTemplateDto> GetProcessStepTemplateByIdAsync(Guid id)
    Parameters
    Type Name Description
    Guid id
    Returns
    Type Description
    Task<ProcessStepTemplateDto>

    GetProcessStepTemplatesAsync(Guid)

    Declaration
    public Task<IEnumerable<ProcessStepTemplateDto>> GetProcessStepTemplatesAsync(Guid processTemplateId)
    Parameters
    Type Name Description
    Guid processTemplateId
    Returns
    Type Description
    Task<IEnumerable<ProcessStepTemplateDto>>

    GetProcessTemplateByIdAsync(Guid)

    Declaration
    public Task<ProcessTemplateDto> GetProcessTemplateByIdAsync(Guid id)
    Parameters
    Type Name Description
    Guid id
    Returns
    Type Description
    Task<ProcessTemplateDto>

    GetProcessTemplatesAsync(Guid)

    Declaration
    public Task<IEnumerable<ProcessTemplateDto>> GetProcessTemplatesAsync(Guid organizationId)
    Parameters
    Type Name Description
    Guid organizationId
    Returns
    Type Description
    Task<IEnumerable<ProcessTemplateDto>>

    UpdateEmailTemplateAsync(UpdateEmailTemplateDto)

    Updates an existing email template with new information.

    Declaration
    public Task UpdateEmailTemplateAsync(UpdateEmailTemplateDto dto)
    Parameters
    Type Name Description
    UpdateEmailTemplateDto dto

    The UpdateEmailTemplateDto containing the updated data for the email template.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    HttpRequestException

    Thrown when there is an error in the HTTP request.

    UpdateProcessStepTemplateAsync(UpdateProcessStepTemplateDto)

    Declaration
    public Task UpdateProcessStepTemplateAsync(UpdateProcessStepTemplateDto dto)
    Parameters
    Type Name Description
    UpdateProcessStepTemplateDto dto
    Returns
    Type Description
    Task

    UpdateProcessStepTemplateSequenceAsync(Guid, int)

    Declaration
    public Task UpdateProcessStepTemplateSequenceAsync(Guid id, int newSequence)
    Parameters
    Type Name Description
    Guid id
    int newSequence
    Returns
    Type Description
    Task

    UpdateProcessTemplateAsync(UpdateProcessTemplateDto)

    Declaration
    public Task UpdateProcessTemplateAsync(UpdateProcessTemplateDto dto)
    Parameters
    Type Name Description
    UpdateProcessTemplateDto dto
    Returns
    Type Description
    Task
    In this article
    Back to top Generated by DocFX