ZoneService
ZoneService
Contains methods relating to Zone entities.
Signature
class ZoneService {
constructor(connection: TransactionalConnection, configService: ConfigService, eventBus: EventBus, translator: TranslatorService, listQueryBuilder: ListQueryBuilder)
findAll(ctx: RequestContext, options?: ListQueryOptions<Zone>) => Promise<PaginatedList<Zone>>;
findOne(ctx: RequestContext, zoneId: ID) => Promise<Zone | undefined>;
getAllWithMembers(ctx: RequestContext) => Promise<Zone[]>;
create(ctx: RequestContext, input: CreateZoneInput) => Promise<Zone>;
update(ctx: RequestContext, input: UpdateZoneInput) => Promise<Zone>;
delete(ctx: RequestContext, id: ID) => Promise<DeletionResponse>;
addMembersToZone(ctx: RequestContext, { memberIds, zoneId }: MutationAddMembersToZoneArgs) => Promise<Zone>;
removeMembersFromZone(ctx: RequestContext, { memberIds, zoneId }: MutationRemoveMembersFromZoneArgs) => Promise<Zone>;
}
constructor
method
(connection: TransactionalConnection, configService: ConfigService, eventBus: EventBus, translator: TranslatorService, listQueryBuilder: ListQueryBuilder) => ZoneService
findAll
method
(ctx: RequestContext, options?: ListQueryOptions<Zone>) => Promise<PaginatedList<Zone>>
findOne
method
(ctx: RequestContext, zoneId: ID) => Promise<Zone | undefined>
getAllWithMembers
method
(ctx: RequestContext) => Promise<Zone[]>
create
method
(ctx: RequestContext, input: CreateZoneInput) => Promise<Zone>
update
method
(ctx: RequestContext, input: UpdateZoneInput) => Promise<Zone>
delete
method
(ctx: RequestContext, id: ID) => Promise<DeletionResponse>
addMembersToZone
method
(ctx: RequestContext, { memberIds, zoneId }: MutationAddMembersToZoneArgs) => Promise<Zone>
removeMembersFromZone
method
(ctx: RequestContext, { memberIds, zoneId }: MutationRemoveMembersFromZoneArgs) => Promise<Zone>