Search Results for

    Show / Hide Table of Contents

    Interface IOrganizationService

    Defines the contract for organization management operations in the OEMS system.

    Namespace: OEMS.Core.Application.ApplicationServiceInterfaces
    Assembly: OEMS.Core.dll
    Syntax
    public interface IOrganizationService

    Methods

    AssignOrgAdminAsync(Guid, Guid)

    Assigns administrator privileges to a user within an organization.

    Declaration
    Task AssignOrgAdminAsync(Guid orgId, Guid userId)
    Parameters
    Type Name Description
    Guid orgId

    The unique identifier of the organization.

    Guid userId

    The unique identifier of the user to make an administrator.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    CheckIfEventAtLocation(Guid, Guid)

    Checks if there are any events scheduled at a specific location.

    Declaration
    Task<(bool, List<string> EventNames)> CheckIfEventAtLocation(Guid orgId, Guid locationId)
    Parameters
    Type Name Description
    Guid orgId

    The unique identifier of the organization.

    Guid locationId

    The unique identifier of the location to check.

    Returns
    Type Description
    Task<(bool hasAny, List<string> eventNames)>

    A task that represents the asynchronous operation. The task result contains a tuple indicating whether events exist and a list of event names.

    CreateEventCategory(Guid, CreateCategoryDto)

    Creates a new event category for an organization.

    Declaration
    Task CreateEventCategory(Guid OrgId, CreateCategoryDto createCategoryDto)
    Parameters
    Type Name Description
    Guid OrgId

    The unique identifier of the organization.

    CreateCategoryDto createCategoryDto

    The category creation data transfer object.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    CreateLocation(Guid, CreateLocationDto)

    Creates a new location for an organization.

    Declaration
    Task CreateLocation(Guid OrgId, CreateLocationDto locationDto)
    Parameters
    Type Name Description
    Guid OrgId

    The unique identifier of the organization.

    CreateLocationDto locationDto

    The location creation data transfer object.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    CreateOrganizationAsync(CreateOrganizationDto)

    Creates a new organization in the system.

    Declaration
    Task<OrganizationCreationResultDto> CreateOrganizationAsync(CreateOrganizationDto dto)
    Parameters
    Type Name Description
    CreateOrganizationDto dto

    The organization creation data transfer object.

    Returns
    Type Description
    Task<OrganizationCreationResultDto>

    A task that represents the asynchronous operation. The task result contains the organization creation result.

    CreateOrganizationLegacyAsync(CreateOrganizationDto)

    Creates a new organization using the legacy method.

    Declaration
    Task<CreateOrganizationDto> CreateOrganizationLegacyAsync(CreateOrganizationDto dto)
    Parameters
    Type Name Description
    CreateOrganizationDto dto

    The organization creation data transfer object.

    Returns
    Type Description
    Task<CreateOrganizationDto>

    A task that represents the asynchronous operation. The task result contains the created organization data.

    DeleteCategoryByIdAsync(Guid)

    Deletes an event category by its unique identifier.

    Declaration
    Task DeleteCategoryByIdAsync(Guid categoryId)
    Parameters
    Type Name Description
    Guid categoryId

    The unique identifier of the category to delete.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    DeleteLocationByIdAsync(Guid)

    Deletes a location by its unique identifier.

    Declaration
    Task DeleteLocationByIdAsync(Guid locationId)
    Parameters
    Type Name Description
    Guid locationId

    The unique identifier of the location to delete.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    DeleteMemberAsync(Guid, Guid)

    Removes a member from an organization.

    Declaration
    Task DeleteMemberAsync(Guid userId, Guid organizationId)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user to remove.

    Guid organizationId

    The unique identifier of the organization.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    DeleteOrganizationAsync(Guid)

    Deletes an organization from the system.

    Declaration
    Task DeleteOrganizationAsync(Guid orgId)
    Parameters
    Type Name Description
    Guid orgId

    The unique identifier of the organization to delete.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    GetAllCategorysByOrganizationAsync(Guid)

    Retrieves all event categories for a specific organization.

    Declaration
    Task<List<EventCategoryDto>> GetAllCategorysByOrganizationAsync(Guid organizationId)
    Parameters
    Type Name Description
    Guid organizationId

    The unique identifier of the organization.

    Returns
    Type Description
    Task<List<EventCategoryDto>>

    A task that represents the asynchronous operation. The task result contains a list of event category data transfer objects.

    GetAllLocationsByOrganizationAsync(Guid)

    Retrieves all locations for a specific organization.

    Declaration
    Task<List<LocationDto>> GetAllLocationsByOrganizationAsync(Guid organizationId)
    Parameters
    Type Name Description
    Guid organizationId

    The unique identifier of the organization.

    Returns
    Type Description
    Task<List<LocationDto>>

    A task that represents the asynchronous operation. The task result contains a list of location data transfer objects.

    GetAllOrganizationsAsync(Guid)

    Retrieves all organizations accessible to a specific user.

    Declaration
    Task<IEnumerable<OrganizationDto>> GetAllOrganizationsAsync(Guid userId)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user.

    Returns
    Type Description
    Task<IEnumerable<OrganizationDto>>

    A task that represents the asynchronous operation. The task result contains a collection of organization data transfer objects.

    GetOrganizationBrandingAsync(Guid)

    Gets organization branding settings for the specified organization.

    Declaration
    Task<OrganizationDto?> GetOrganizationBrandingAsync(Guid organizationId)
    Parameters
    Type Name Description
    Guid organizationId

    The unique identifier of the organization to retrieve branding for

    Returns
    Type Description
    Task<OrganizationDto>

    An OrganizationDto containing the organization's branding information including colors and logo, or null if the organization is not found

    GetOrganizationDashboardInformation(Guid)

    Retrieves dashboard information for all organizations accessible to a user.

    Declaration
    Task<IEnumerable<OrganizationDashboardDto>> GetOrganizationDashboardInformation(Guid userId)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user.

    Returns
    Type Description
    Task<IEnumerable<OrganizationDashboardDto>>

    A task that represents the asynchronous operation. The task result contains dashboard information for the user's organizations.

    GetOrganizationMembersAsync(Guid)

    Retrieves all members of a specific organization.

    Declaration
    Task<List<MemberDto>> GetOrganizationMembersAsync(Guid organizationId)
    Parameters
    Type Name Description
    Guid organizationId

    The unique identifier of the organization.

    Returns
    Type Description
    Task<List<MemberDto>>

    A task that represents the asynchronous operation. The task result contains a list of member data transfer objects.

    InviteMemberAsync(string, Guid)

    Invites a new member to join an organization by email.

    Declaration
    Task InviteMemberAsync(string email, Guid organizationId)
    Parameters
    Type Name Description
    string email

    The email address of the person to invite.

    Guid organizationId

    The unique identifier of the organization.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    RemoveOrgAdminAsync(Guid, Guid)

    Removes administrator privileges from a user within an organization.

    Declaration
    Task RemoveOrgAdminAsync(Guid orgId, Guid userId)
    Parameters
    Type Name Description
    Guid orgId

    The unique identifier of the organization.

    Guid userId

    The unique identifier of the user to remove administrator privileges from.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    TransferOrganizationAdminAsync(Guid, Guid, Guid)

    Transfers organization administrator privileges from one user to another.

    Declaration
    Task TransferOrganizationAdminAsync(Guid organizationId, Guid currentAdminUserId, Guid newAdminUserId)
    Parameters
    Type Name Description
    Guid organizationId

    The unique identifier of the organization.

    Guid currentAdminUserId

    The unique identifier of the current administrator.

    Guid newAdminUserId

    The unique identifier of the user who will become the new administrator.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    UpdateCategoryByIdAsync(EventCategoryDto)

    Updates an existing event category.

    Declaration
    Task<EventCategoryDto> UpdateCategoryByIdAsync(EventCategoryDto updateCategoryDto)
    Parameters
    Type Name Description
    EventCategoryDto updateCategoryDto

    The event category data transfer object containing updated information.

    Returns
    Type Description
    Task<EventCategoryDto>

    A task that represents the asynchronous operation. The task result contains the updated event category data transfer object.

    UpdateLocationByIdAsync(LocationDto)

    Updates an existing location.

    Declaration
    Task<LocationDto> UpdateLocationByIdAsync(LocationDto updateLocationDto)
    Parameters
    Type Name Description
    LocationDto updateLocationDto

    The location data transfer object containing updated information.

    Returns
    Type Description
    Task<LocationDto>

    A task that represents the asynchronous operation. The task result contains the updated location data transfer object.

    UpdateMemberDetailsAsync(MemberDto)

    Updates the details of an existing organization member.

    Declaration
    Task UpdateMemberDetailsAsync(MemberDto member)
    Parameters
    Type Name Description
    MemberDto member

    The member data transfer object containing updated information.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    UpdateMemberRolesAsync(Guid, Guid, bool, bool, bool, bool)

    Updates the roles and permissions of a member within an organization.

    Declaration
    Task UpdateMemberRolesAsync(Guid userId, Guid organizationId, bool isAdmin, bool isOrganizer, bool isDesigner, bool isExternal)
    Parameters
    Type Name Description
    Guid userId

    The unique identifier of the user whose roles are being updated.

    Guid organizationId

    The unique identifier of the organization.

    bool isAdmin

    Indicates whether the user should have administrator privileges.

    bool isOrganizer

    Indicates whether the user should have organizer privileges.

    bool isDesigner

    Indicates whether the user should have designer privileges.

    bool isExternal

    Indicates whether the user is an external member.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    UpdateOrganizationAsync(UpdateOrganizationDto)

    Updates an existing organization's information.

    Declaration
    Task UpdateOrganizationAsync(UpdateOrganizationDto dto)
    Parameters
    Type Name Description
    UpdateOrganizationDto dto

    The organization update data transfer object.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    UpdateOrganizationBrandingAsync(Guid, string, Guid?)

    Updates organization branding settings including colors and optionally the logo.

    Declaration
    Task<bool> UpdateOrganizationBrandingAsync(Guid organizationId, string brandingSettings, Guid? logoFileId = null)
    Parameters
    Type Name Description
    Guid organizationId

    The unique identifier of the organization to update

    string brandingSettings

    JSON string containing branding configuration in the format: { "color1": "#primaryColor", "color2": "#secondaryColor" }

    Guid? logoFileId

    Optional file ID for a new organization logo. If provided and not empty, updates the organization's logo. If null or empty, preserves the existing logo.

    Returns
    Type Description
    Task<bool>

    True if the update was successful, false otherwise

    Exceptions
    Type Condition
    KeyNotFoundException

    Thrown when the organization ID does not exist

    In this article
    Back to top Generated by DocFX