libs/core/schemas/src/file-schemas/plugin-metadata-file.schema.ts
Plugin metadata object
Properties |
|
description (Optional) | |
Type |
string
|
Description
|
Relevant information about the Plugin |
id | |
Type |
string
|
Description
|
Unique identifier for the Plugin within the package |
injectable (Optional) | |
Type |
InjectableMetadata
|
Description
|
Information describing the injectable file |
module | |
Type |
string
|
Description
|
Angular Module that implements this plugin |
options (Optional) | |
Type |
OptionsContractType[]
|
Description
|
Describes the given options interface, in case supported by the plugin |
package | |
Type |
string
|
Description
|
Name of the package that provides this plugin |
pluginType | |
Type |
PluginType
|
Description
|
Type of Plugin depending on the functionality provided |
title (Optional) | |
Type |
string
|
Description
|
Human readable title of the Plugin |
version | |
Type |
string
|
Description
|
Version of the package that provides this plugin |
export interface PluginMetadataFileSchema {
/**
* Date of the generation in ISO format (i.e. YYYY-MM-DD)
*/
created: string;
/**
* Unique identifier for the plugin metadata file
*/
hash: string;
/**
* List of all discovered Plugins
* @default []
*/
plugins: SinglePluginMetadata[];
/**
* Version of the schema defined in this file.
*/
version: string;
}
/**
* Plugin metadata object
*/
export interface SinglePluginMetadata {
/**
* Relevant information about the Plugin
*/
description?: string;
/**
* Unique identifier for the Plugin within the package
*/
id: string;
/**
* Information describing the injectable file
*/
injectable?: InjectableMetadata;
/**
* Angular Module that implements this plugin
*/
module: string;
/**
* Describes the given options interface, in case supported by the plugin
*/
options?: OptionsContractType[];
/**
* Name of the package that provides this plugin
*/
package: string;
/**
* Type of Plugin depending on the functionality provided
*/
pluginType: PluginType;
/**
* Human readable title of the Plugin
*/
title?: string;
/**
* Version of the package that provides this plugin
*/
version: string;
}
/**
* Information describing the injectable file
*/
export interface InjectableMetadata {
/**
* Actual class name inside the processed file
*/
className: string;
/**
* Path to the processed file name relative to the library root
*/
file: string;
validation?: Validation;
}
export interface Validation {
/**
* Type of input parameter of the validator function (e.g. 'number', 'string', 'object` etc.), to be provided when necessary via app
* configuration, as part of a form field validation setup
*/
validationParam?: string;
/**
* Validator identifier to be used in the app configuration, when configuring the validator
* for a form field
*/
validatorTypeField: string;
}
/**
* Configuration of your Plugin. Plugin configuration data is optional and depends on the
* implementation of each plugin
* @additionalProperties false
* @default {}
*/
export interface OptionsContractType {
items?: { [key: string]: unknown };
name: string;
properties?: OptionsContractType[];
type: string;
}
/**
* Type of Plugin depending on the functionality provided
*/
export const enum PluginType {
HTTPInterceptor = 'HttpInterceptor',
Other = 'Other',
Validator = 'Validator'
}