Description

Service for creating and managing organizations.

Constructors

Methods

  • Returns list of organizations that the user is a member of, filtered by the given roles. This method supports pagination.

    Parameters

    • userId: string

      user id to filter organizations by

    • roles: string[]

      roles to filter organizations by

    • opts: ParsedPaginatedListQuery

      paginated list query options & filters

    Returns Promise<PaginatedFindResult<OrganizationEntity>>

    paginated organization list query result

  • Update organization in the database, uploading icon image if available

    Parameters

    • orgId: string

      organization id

    • payload: Omit<Partial<Organization>, "iconImageId" | "logoImageId"> & {
          iconImageData?: string;
          logoImageData?: string;
      }

      organization update payload

    Returns Promise<{
        id: string;
    }>

    id of the updated organization

Properties

db: Db
orgRepository: MongoRepository<OrganizationEntity>
uploadService: UploadDataService
COLLECTION_ORGANIZATION: "organizations" = 'organizations'
EXPAND_CHILDREN_LIMIT: 25 = 25

Amount to limit children expansion to

Generated using TypeDoc