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
| Name | Type |
|---|---|
messageOptions? | MessageDataType<"contextLanguage"> |
Returns
Promise<{ systemLanguageId: string ; languageId: string }>
Defined in
packages/admin-sdk/src/channel.ts:436
subscribeLanguage
▸ subscribeLanguage(method, id?): () => void
Parameters
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
messageOptions? | MessageDataType<"contextLocale"> |
Returns
Promise<{ locale: string ; fallbackLocale: string }>
Defined in
packages/admin-sdk/src/channel.ts:436
subscribeLocale
▸ subscribeLocale(method, id?): () => void
Parameters
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
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
| Name | Type |
|---|---|
responseType | { systemLanguageId: string ; languageId: string } |
responseType.systemLanguageId | string |
responseType.languageId | string |
Defined in
packages/admin-sdk/src/context/index.ts:17
contextEnvironment
Ƭ contextEnvironment: Object
Get the current environment (development or production)
Type declaration
| Name | Type |
|---|---|
responseType | "development" | "production" | "testing" |
Defined in
packages/admin-sdk/src/context/index.ts:27
contextLocale
Ƭ contextLocale: Object
Get the current UI locale
Type declaration
| Name | Type |
|---|---|
responseType | { locale: string ; fallbackLocale: string } |
responseType.locale | string |
responseType.fallbackLocale | string |
Defined in
packages/admin-sdk/src/context/index.ts:34
contextCurrency
Ƭ contextCurrency: Object
Get the system currency
Type declaration
| Name | Type |
|---|---|
responseType | { systemCurrencyISOCode: string ; systemCurrencyId: string } |
responseType.systemCurrencyISOCode | string |
responseType.systemCurrencyId | string |
Defined in
packages/admin-sdk/src/context/index.ts:44
contextShopwareVersion
Ƭ contextShopwareVersion: Object
Get the current Shopware version
Type declaration
| Name | Type |
|---|---|
responseType | string |
Defined in
packages/admin-sdk/src/context/index.ts:54
contextAppInformation
Ƭ contextAppInformation: Object
Get the current app information
Type declaration
| Name | Type |
|---|---|
responseType | { name: string ; version: string ; type: "app" | "plugin" } |
responseType.name | string |
responseType.version | string |
responseType.type | "app" | "plugin" |
Defined in
packages/admin-sdk/src/context/index.ts:61
contextUserInformation
Ƭ contextUserInformation: Object
Get the current user information
Type declaration
| Name | Type |
|---|---|
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.active | boolean |
responseType.admin | boolean |
responseType.avatarId | string |
responseType.email | string |
responseType.firstName | string |
responseType.id | string |
responseType.lastName | string |
responseType.localeId | string |
responseType.title | string |
responseType.type | string |
responseType.username | string |
Defined in
packages/admin-sdk/src/context/index.ts:72
contextModuleInformation
Ƭ contextModuleInformation: Object
Get all registered module information for the extension
Type declaration
| Name | Type |
|---|---|
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