Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ThemeClient

Index

Constructors

Properties

client: HttpClient

Methods

  • Active a theme.

    Parameters

    • themeId: string

      themeId

    Returns Promise<Response<ThemeProperty>>

    ThemeProperty

  • Delete theme by themeId.

    Parameters

    • themeId: string

      themeId

    • Optional deleteSettings: boolean

      whether to delete the theme settings at the same time.

    Returns Promise<Response<ThemeProperty>>

    ThemeProperty

  • exists(template: string): Promise<Response<boolean>>
  • Check template exists

    Parameters

    • template: string

      template name

    Returns Promise<Response<boolean>>

    boolean

  • Fetch theme by uri

    Parameters

    • uri: string

      uri

    Returns Promise<Response<ThemeProperty>>

    void

  • Get theme property by themeId.

    Parameters

    • themeId: string

      themeId

    Returns Promise<Response<ThemeProperty>>

    ThemeProperty

  • getActivatedTemplateContent(filepath: string): Promise<Response<string>>
  • Get activated template content by filepath.

    Parameters

    • filepath: string

      filepath

    Returns Promise<Response<string>>

    template content

  • Get activated theme property.

    Returns Promise<Response<ThemeProperty>>

    ThemeProperty

  • getTemplateContent(themeId: string, filepath: string): Promise<Response<string>>
  • Get template content by themeId and filepath.

    Parameters

    • themeId: string

      themeId

    • filepath: string

      filepath

    Returns Promise<Response<string>>

    template content

  • List all themes.

    Returns Promise<Response<ThemeProperty[]>>

    array of ThemeProperty

  • List activated theme configurations.

    Returns Promise<Response<Group[]>>

    array of configuration group.

  • List activated theme files.

    Returns Promise<Response<ThemeFile[]>>

    array of ThemeFile

  • listActivatedSettings(): Promise<Response<Record<string, unknown>>>
  • List activated theme settings.

    Returns Promise<Response<Record<string, unknown>>>

    Record<string, unknown>

  • listConfigurationGroups(themeId: string): Promise<Response<string[]>>
  • Fetches theme configuration group names by theme id

    Parameters

    • themeId: string

      theme id

    Returns Promise<Response<string[]>>

  • List theme configurations by themeId.

    Parameters

    • themeId: string

      themeId

    Returns Promise<Response<Group[]>>

    array of configuration group.

  • listConfigurationsByGroup(themeId: string, group: string): Promise<Response<Item[]>>
  • Fetches theme configuration group by theme id and group name

    Parameters

    • themeId: string

      theme id

    • group: string

      group name

    Returns Promise<Response<Item[]>>

  • listCustomPostTemplates(): Promise<Response<string[]>>
  • List activated theme custom post templates.

    Returns Promise<Response<string[]>>

    array of template name.

  • listCustomSheetTemplates(): Promise<Response<string[]>>
  • List activated theme custom sheet templates.

    Returns Promise<Response<string[]>>

    array of template name.

  • List theme files by themeId.

    Parameters

    • themeId: string

      themeId

    Returns Promise<Response<ThemeFile[]>>

    array of ThemeFile

  • listSettings(themeId: string): Promise<Response<Record<string, unknown>>>
  • List theme settings by themeId.

    Parameters

    • themeId: string

      themeId

    Returns Promise<Response<Record<string, unknown>>>

    Record<string, unknown>

  • listSettingsByGroup(themeId: string, group: string): Promise<Response<Record<string, unknown>>>
  • Lists theme settings by theme id and group name

    Parameters

    • themeId: string

      theme id

    • group: string

      group name

    Returns Promise<Response<Record<string, unknown>>>

  • Refresh theme list cache.

    Returns Promise<Response<void>>

    void

  • saveActivatedSettings(settings: Record<string, unknown>): Promise<void>
  • Save activated theme settings.

    Parameters

    • settings: Record<string, unknown>

      settings

    Returns Promise<void>

  • saveSettings(themeId: string, settings: Record<string, unknown>): Promise<void>
  • Save settings by themeId.

    Parameters

    • themeId: string

      themeId

    • settings: Record<string, unknown>

      settings

    Returns Promise<void>

  • updateActivatedTemplateContent(params: { content?: string; path?: string }): Promise<Response<void>>
  • Update activated theme template content.

    Parameters

    • params: { content?: string; path?: string }

      path, content

      • Optional content?: string
      • Optional path?: string

    Returns Promise<Response<void>>

    void

  • Update theme by upload.

    Parameters

    • data: unknown

      data

    • options: UploadOptions

      upload options

    • themeId: string

      themeId

    Returns Promise<Response<ThemeProperty>>

    ThemeProperty

  • updateTemplateContent(themeId: string, params: { content?: string; path?: string }): Promise<void>
  • Update theme template content by themeId.

    Parameters

    • themeId: string

      themeId

    • params: { content?: string; path?: string }

      path, content

      • Optional content?: string
      • Optional path?: string

    Returns Promise<void>

  • update theme by fetch.

    Parameters

    • themeId: string

      themeId

    Returns Promise<Response<ThemeProperty>>

    void

  • Upload a theme.

    Parameters

    Returns Promise<Response<ThemeProperty>>

    ThemeProperty

Generated using TypeDoc