🚨 Announcing Vendure v2 Beta

ZoneService

ZoneService

Contains methods relating to Zone entities.

Signature

class ZoneService {
  constructor(connection: TransactionalConnection, configService: ConfigService, eventBus: EventBus, translator: TranslatorService)
  async findAll(ctx: RequestContext) => Promise<Zone[]>;
  findOne(ctx: RequestContext, zoneId: ID) => Promise<Zone | undefined>;
  async create(ctx: RequestContext, input: CreateZoneInput) => Promise<Zone>;
  async update(ctx: RequestContext, input: UpdateZoneInput) => Promise<Zone>;
  async delete(ctx: RequestContext, id: ID) => Promise<DeletionResponse>;
  async addMembersToZone(ctx: RequestContext, { memberIds, zoneId }: MutationAddMembersToZoneArgs) => Promise<Zone>;
  async removeMembersFromZone(ctx: RequestContext, { memberIds, zoneId }: MutationRemoveMembersFromZoneArgs) => Promise<Zone>;
}

Members

constructor

method
type:
(connection: TransactionalConnection, configService: ConfigService, eventBus: EventBus, translator: TranslatorService) => ZoneService

findAll

async method
type:
(ctx: RequestContext) => Promise<Zone[]>

findOne

method
type:
(ctx: RequestContext, zoneId: ID) => Promise<Zone | undefined>

create

async method
type:
(ctx: RequestContext, input: CreateZoneInput) => Promise<Zone>

update

async method
type:
(ctx: RequestContext, input: UpdateZoneInput) => Promise<Zone>

delete

async method
type:
(ctx: RequestContext, id: ID) => Promise<DeletionResponse>

addMembersToZone

async method
type:
(ctx: RequestContext, { memberIds, zoneId }: MutationAddMembersToZoneArgs) => Promise<Zone>

removeMembersFromZone

async method
type:
(ctx: RequestContext, { memberIds, zoneId }: MutationRemoveMembersFromZoneArgs) => Promise<Zone>