# Class Plugin

Plugin Class

#### Hierarchy

- Plugin

- Defined in saltcorn-data/models/plugin.ts:24

#####
Index

### Constructors

constructor

### Properties

configuration?
deploy_private_key?
description?
documentation_link?
has_auth?
has_theme?
id?
location
name
source
unsafe?
version?

### Methods

delete
dependant_views
ready_for_mobile
upgrade_version
upsert
find
findOne
get_cached_plugins
store_by_name
store_plugins_available
store_plugins_available_from_store

## Constructors

### constructor

- new Plugin(o): models.Plugin

- Plugin constructor

  #### Parameters

  - ##### o: models.Plugin | PluginCfg

  #### Returns models.Plugin

  - Defined in saltcorn-data/models/plugin.ts:42

## Properties

### `Optional` configuration

configuration?: any

- Defined in saltcorn-data/models/plugin.ts:30

### `Optional` deploy_private_key

deploy_private_key?: string

- Defined in saltcorn-data/models/plugin.ts:36

### `Optional` description

description?: string

- Defined in saltcorn-data/models/plugin.ts:32

### `Optional` documentation_link

documentation_link?: string

- Defined in saltcorn-data/models/plugin.ts:29

### `Optional` has_auth

has_auth?: boolean

- Defined in saltcorn-data/models/plugin.ts:34

### `Optional` has_theme

has_theme?: boolean

- Defined in saltcorn-data/models/plugin.ts:33

### `Optional` id

id?: number

- Defined in saltcorn-data/models/plugin.ts:25

### location

location: string

- Defined in saltcorn-data/models/plugin.ts:26

### name

name: string

- Defined in saltcorn-data/models/plugin.ts:27

### source

source: PluginSourceType

- Defined in saltcorn-data/models/plugin.ts:31

### `Optional` unsafe

unsafe?: boolean

- Defined in saltcorn-data/models/plugin.ts:35

### `Optional` version

version?: string | number

- Defined in saltcorn-data/models/plugin.ts:28

## Methods

### delete

- delete(): Promise<void>

- Delete plugin

  #### Returns Promise<void>

  - Defined in saltcorn-data/models/plugin.ts:103

### dependant_views

- dependant_views(): Promise<string[]>

- List of views relay on this plugin

  #### Returns Promise<string[]>

  - Defined in saltcorn-data/models/plugin.ts:136

### ready_for_mobile

- ready_for_mobile(): boolean

- #### Returns boolean

  - Defined in saltcorn-data/models/plugin.ts:153

### upgrade_version

- upgrade_version(requirePlugin, newVersion?): Promise<void>

- Upgrade plugin version

  #### Parameters

  - ##### requirePlugin: ((arg0, arg1) => models.Plugin)

    - - (arg0, arg1): models.Plugin

      - #### Parameters

        - ##### arg0: models.Plugin

        - ##### arg1: boolean

        #### Returns models.Plugin

  - ##### `Optional` newVersion: string

  #### Returns Promise<void>

  - Defined in saltcorn-data/models/plugin.ts:115

### upsert

- upsert(): Promise<void>

- Update or Insert plugin

  #### Returns Promise<void>

  - Defined in saltcorn-data/models/plugin.ts:82

### `Static` find

- find(where?): Promise<models.Plugin[]>

- Find plugins

  #### Parameters

  - ##### `Optional` where: Where

    where object

  #### Returns Promise<models.Plugin[]>

  returns plugins list

  - Defined in saltcorn-data/models/plugin.ts:72

### `Static` findOne

- findOne(where): Promise<null | models.Plugin>

- Find one plugin

  #### Parameters

  - ##### where: Where

    where object

  #### Returns Promise<null | models.Plugin>

  return existing plugin or new plugin

  - Defined in saltcorn-data/models/plugin.ts:62

### `Static` get_cached_plugins

- get_cached_plugins(): models.Plugin[]

- #### Returns models.Plugin[]

  - Defined in saltcorn-data/models/plugin.ts:161

### `Static` store_by_name

- store_by_name(name): Promise<null | models.Plugin>

- #### Parameters

  - ##### name: string

  #### Returns Promise<null | models.Plugin>

  - Defined in saltcorn-data/models/plugin.ts:232

### `Static` store_plugins_available

- store_plugins_available(): Promise<models.Plugin[]>

- List plugins available in store

  #### Returns Promise<models.Plugin[]>

  - Defined in saltcorn-data/models/plugin.ts:171

### `Static` store_plugins_available_from_store

- store_plugins_available_from_store(): Promise<models.Plugin[]>

- #### Returns Promise<models.Plugin[]>

  - Defined in saltcorn-data/models/plugin.ts:204

Generated using TypeDoc