CountryService
Contains methods relating to Country entities.
constructor
method
(connection: TransactionalConnection, listQueryBuilder: ListQueryBuilder, translatableSaver: TranslatableSaver, eventBus: EventBus, translator: TranslatorService) => CountryServicefindAll
method
(ctx: RequestContext, options?: ListQueryOptions<Country>, relations: RelationPaths<Country> = []) => Promise<PaginatedList<Translated<Country>>>findOne
method
(ctx: RequestContext, countryId: ID, relations: RelationPaths<Country> = []) => Promise<Translated<Country> | undefined>findAllAvailable
method
(ctx: RequestContext) => Promise<Array<Translated<Country>>>Returns an array of enabled Countries, intended for use in a public-facing (ie. Shop) API.
findOneByCode
method
(ctx: RequestContext, countryCode: string) => Promise<Translated<Country>>Returns a Country based on its ISO country code.
create
method
(ctx: RequestContext, input: CreateCountryInput) => Promise<Translated<Country>>update
method
(ctx: RequestContext, input: UpdateCountryInput) => Promise<Translated<Country>>delete
method
(ctx: RequestContext, id: ID) => Promise<DeletionResponse>Was this chapter helpful?