Skip to content

Commit

Permalink
Merge pull request #3443 from easyops-cn/nlicro/story_type
Browse files Browse the repository at this point in the history
chore(): update story interface
  • Loading branch information
weareoutman authored Sep 5, 2023
2 parents 06701e9 + 26dab0d commit 79f83bc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
16 changes: 15 additions & 1 deletion etc/brick-types.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2186,11 +2186,13 @@ export interface Story {
// (undocumented)
actions?: Action[];
// (undocumented)
alias?: string[];
// (undocumented)
author?: string;
// (undocumented)
category: string;
// (undocumented)
conf: StoryConf | StoryConf[] | mixConf[];
conf: StoryConf | StoryConf[] | mixConf[] | V3StoryConf;
// (undocumented)
deprecated?: boolean;
// (undocumented)
Expand All @@ -2208,6 +2210,8 @@ export interface Story {
// (undocumented)
previewColumns?: number;
// (undocumented)
source?: string;
// (undocumented)
storyId: string;
// (undocumented)
tags?: I18nData[];
Expand All @@ -2217,6 +2221,8 @@ export interface Story {
type: "brick" | "template";
// (undocumented)
useWidget?: string[];
// (undocumented)
v3Brick?: boolean;
}

// @public
Expand Down Expand Up @@ -2664,5 +2670,13 @@ export interface UseSingleBrickConf {
transformFrom?: string | string[];
}

// Warning: (ae-internal-missing-underscore) The name "V3StoryConf" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export interface V3StoryConf {
// (undocumented)
doc?: string;
}


```
10 changes: 9 additions & 1 deletion packages/brick-types/src/story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,19 @@ export interface SnippetConf {
/** @internal */
export type mixConf = StoryConf | SnippetConf;

/** @internal */
export interface V3StoryConf {
doc?: string;
}

/** @internal */
export interface Story {
category: string;
storyId: string;
deprecated?: boolean;
type: "brick" | "template";
text: I18nData;
conf: StoryConf | StoryConf[] | mixConf[];
conf: StoryConf | StoryConf[] | mixConf[] | V3StoryConf;
description?: I18nData;
tags?: I18nData[];
doc?: string | StoryDoc;
Expand All @@ -65,6 +70,9 @@ export interface Story {
originData?: BuilderCustomTemplateNode;
isCustomTemplate?: boolean;
useWidget?: string[];
v3Brick?: boolean;
source?: string;
alias?: string[];
}

/** @internal */
Expand Down

0 comments on commit 79f83bc

Please sign in to comment.