Skip to main content

Module: context

Functions

getLanguage

getLanguage(messageOptions?): Promise<{ systemLanguageId: string ; languageId: string }>

Factory method which creates a sender so that the type doesn't need to be defined and can be hidden. Also this allows to use a send method without a required second argument if the default options are defined.

Parameters

NameType
messageOptions?MessageDataType<"contextLanguage">

Returns

Promise<{ systemLanguageId: string ; languageId: string }>

Defined in

packages/admin-sdk/src/channel.ts:436


subscribeLanguage

subscribeLanguage(method, id?): () => void

Parameters

NameType
method(data: { systemLanguageId: string ; languageId: string }) => void | Promise<unknown>
id?string

Returns

fn

▸ (): void

Returns

void

Defined in

packages/admin-sdk/src/channel.ts:477


getEnvironment

getEnvironment(messageOptions?): Promise<"development" | "production" | "testing">

Factory method which creates a sender so that the type doesn't need to be defined and can be hidden. Also this allows to use a send method without a required second argument if the default options are defined.

Parameters

NameType
messageOptions?MessageDataType<"contextEnvironment">

Returns

Promise<"development" | "production" | "testing">

Defined in

packages/admin-sdk/src/channel.ts:436


getLocale

getLocale(messageOptions?): Promise<{ locale: string ; fallbackLocale: string }>

Factory method which creates a sender so that the type doesn't need to be defined and can be hidden. Also this allows to use a send method without a required second argument if the default options are defined.

Parameters

NameType
messageOptions?MessageDataType<"contextLocale">

Returns

Promise<{ locale: string ; fallbackLocale: string }>

Defined in

packages/admin-sdk/src/channel.ts:436


subscribeLocale

subscribeLocale(method, id?): () => void

Parameters

NameType
method(data: { locale: string ; fallbackLocale: string }) => void | Promise<unknown>
id?string

Returns

fn

▸ (): void

Returns

void

Defined in

packages/admin-sdk/src/channel.ts:477


getCurrency

getCurrency(messageOptions?): Promise<{ systemCurrencyISOCode: string ; systemCurrencyId: string }>

Factory method which creates a sender so that the type doesn't need to be defined and can be hidden. Also this allows to use a send method without a required second argument if the default options are defined.

Parameters

NameType
messageOptions?MessageDataType<"contextCurrency">

Returns

Promise<{ systemCurrencyISOCode: string ; systemCurrencyId: string }>

Defined in

packages/admin-sdk/src/channel.ts:436


getShopwareVersion

getShopwareVersion(messageOptions?): Promise<string>

Factory method which creates a sender so that the type doesn't need to be defined and can be hidden. Also this allows to use a send method without a required second argument if the default options are defined.

Parameters

NameType
messageOptions?MessageDataType<"contextShopwareVersion">

Returns

Promise<string>

Defined in

packages/admin-sdk/src/channel.ts:436


getUserInformation

getUserInformation(messageOptions?): Promise<{ aclRoles: { name: string ; type: string ; id: string ; privileges: string[] }[] ; active: boolean ; admin: boolean ; avatarId: string ; email: string ; firstName: string ; id: string ; lastName: string ; localeId: string ; title: string ; type: string ; username: string }>

Factory method which creates a sender so that the type doesn't need to be defined and can be hidden. Also this allows to use a send method without a required second argument if the default options are defined.

Parameters

NameType
messageOptions?MessageDataType<"contextUserInformation">

Returns

Promise<{ aclRoles: { name: string ; type: string ; id: string ; privileges: string[] }[] ; active: boolean ; admin: boolean ; avatarId: string ; email: string ; firstName: string ; id: string ; lastName: string ; localeId: string ; title: string ; type: string ; username: string }>

Defined in

packages/admin-sdk/src/channel.ts:436


getAppInformation

getAppInformation(messageOptions?): Promise<{ name: string ; version: string ; type: "app" | "plugin" }>

Factory method which creates a sender so that the type doesn't need to be defined and can be hidden. Also this allows to use a send method without a required second argument if the default options are defined.

Parameters

NameType
messageOptions?MessageDataType<"contextAppInformation">

Returns

Promise<{ name: string ; version: string ; type: "app" | "plugin" }>

Defined in

packages/admin-sdk/src/channel.ts:436


getModuleInformation

getModuleInformation(messageOptions?): Promise<{ modules: { displaySearchBar: boolean ; heading: string ; id: string ; locationId: string }[] }>

Factory method which creates a sender so that the type doesn't need to be defined and can be hidden. Also this allows to use a send method without a required second argument if the default options are defined.

Parameters

NameType
messageOptions?MessageDataType<"contextModuleInformation">

Returns

Promise<{ modules: { displaySearchBar: boolean ; heading: string ; id: string ; locationId: string }[] }>

Defined in

packages/admin-sdk/src/channel.ts:436

Type Aliases

contextLanguage

Ƭ contextLanguage: Object

Get the current content language

Type declaration

NameType
responseType{ systemLanguageId: string ; languageId: string }
responseType.systemLanguageIdstring
responseType.languageIdstring

Defined in

packages/admin-sdk/src/context/index.ts:17


contextEnvironment

Ƭ contextEnvironment: Object

Get the current environment (development or production)

Type declaration

NameType
responseType"development" | "production" | "testing"

Defined in

packages/admin-sdk/src/context/index.ts:27


contextLocale

Ƭ contextLocale: Object

Get the current UI locale

Type declaration

NameType
responseType{ locale: string ; fallbackLocale: string }
responseType.localestring
responseType.fallbackLocalestring

Defined in

packages/admin-sdk/src/context/index.ts:34


contextCurrency

Ƭ contextCurrency: Object

Get the system currency

Type declaration

NameType
responseType{ systemCurrencyISOCode: string ; systemCurrencyId: string }
responseType.systemCurrencyISOCodestring
responseType.systemCurrencyIdstring

Defined in

packages/admin-sdk/src/context/index.ts:44


contextShopwareVersion

Ƭ contextShopwareVersion: Object

Get the current Shopware version

Type declaration

NameType
responseTypestring

Defined in

packages/admin-sdk/src/context/index.ts:54


contextAppInformation

Ƭ contextAppInformation: Object

Get the current app information

Type declaration

NameType
responseType{ name: string ; version: string ; type: "app" | "plugin" }
responseType.namestring
responseType.versionstring
responseType.type"app" | "plugin"

Defined in

packages/admin-sdk/src/context/index.ts:61


contextUserInformation

Ƭ contextUserInformation: Object

Get the current user information

Type declaration

NameType
responseType{ aclRoles: { name: string ; type: string ; id: string ; privileges: string[] }[] ; active: boolean ; admin: boolean ; avatarId: string ; email: string ; firstName: string ; id: string ; lastName: string ; localeId: string ; title: string ; type: string ; username: string }
responseType.aclRoles{ name: string ; type: string ; id: string ; privileges: string[] }[]
responseType.activeboolean
responseType.adminboolean
responseType.avatarIdstring
responseType.emailstring
responseType.firstNamestring
responseType.idstring
responseType.lastNamestring
responseType.localeIdstring
responseType.titlestring
responseType.typestring
responseType.usernamestring

Defined in

packages/admin-sdk/src/context/index.ts:72


contextModuleInformation

Ƭ contextModuleInformation: Object

Get all registered module information for the extension

Type declaration

NameType
responseType{ modules: { displaySearchBar: boolean ; heading: string ; id: string ; locationId: string }[] }
responseType.modules{ displaySearchBar: boolean ; heading: string ; id: string ; locationId: string }[]

Defined in

packages/admin-sdk/src/context/index.ts:97