[]
The following sections describe the module: common.
• baseUrl: string
The Wyn Enterprise server URL. If your integration and Wyn server are not on the same site, you should provide your Wyn server host.
Example
baseUrl: 'https://your-wyn-server.com/',• token: string
The access token. The token is generated from the Admin portal.
Example
token: 'your-wyn-token',• Optional tokenKey: string
Set the key name used in query parameters; this name is configured in the Wyn config file.
If tokenKey is not specified, the default value 'token' is used.
Example
tokenKey: 'tkn',• Optional useTokenInHeader: boolean
Set if the token should be sent in the request header instead of the query parameter.
The default value is false.
Example
useTokenInHeader: true,Ƭ CustomThemeInfo: Object
Name | Type |
|---|---|
|
|
|
|
|
|
|
|
|
|
displayName: string
modified: string
name: string
pluginVersion: string
themeVariables: Record<string, string | boolean>
• Const DEFAULT_TOKEN_KEY: "token"
• Const themes: string[]
▸ concatUrls(...urls): string
Name | Type |
|---|---|
|
|
string
▸ fetchPluginsInfo(baseUrl, token, tokenKey?, useTokenInHeader?): Promise<Response>
Name | Type | Default value |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Promise<Response>
▸ getCustomThemes(baseUrl, token, tokenKey?, useTokenInHeader?):Promise<CustomThemeInfo[]>
Name | Type | Default value |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Promise<CustomThemeInfo[]>
▸ getVersionAndTheme(baseUrl, token, key, tokenKey?, useTokenInHeader?): Promise<{ theme: any = value.data.me.themeName; version: any }>
Name | Type | Default value |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Promise<{ theme: any = value.data.me.themeName; version: any }>
▸ loadCss(href): Promise<unknown>
Name | Type |
|---|---|
|
|
Promise<unknown>
▸ loadJs(src): Promise<unknown>
Name | Type |
|---|---|
|
|
Promise<unknown>
• Optional useTokenInHeader: boolean
Set if the token should be sent in the request header instead of the query parameter.
The default value is false.
Example
useTokenInHeader: true,