growi-plugin.ts 635 B

12345678910111213141516171819202122232425262728
  1. import { GrowiPluginType, GrowiThemeMetadata, HasObjectId } from '@growi/core';
  2. export type IGrowiPluginOrigin = {
  3. url: string,
  4. ghBranch?: string,
  5. ghTag?: string,
  6. }
  7. export type IGrowiPlugin<M extends IGrowiPluginMeta = IGrowiPluginMeta> = {
  8. isEnabled: boolean,
  9. installedPath: string,
  10. organizationName: string,
  11. origin: IGrowiPluginOrigin,
  12. meta: M,
  13. }
  14. export type IGrowiPluginMeta = {
  15. name: string,
  16. types: GrowiPluginType[],
  17. desc?: string,
  18. author?: string,
  19. }
  20. export type IGrowiThemePluginMeta = IGrowiPluginMeta & {
  21. themes: GrowiThemeMetadata[]
  22. }
  23. export type IGrowiPluginHasId = IGrowiPlugin & HasObjectId;