bi-sdk-react 0.0.72 → 0.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export type PaneHeaderProps = {
3
- title?: string;
3
+ title?: React.ReactNode;
4
4
  extra?: React.ReactNode;
5
5
  style?: React.CSSProperties;
6
6
  };
@@ -3,7 +3,7 @@ import React from "react";
3
3
  import { HtmlBaseProps, SchemaItemType } from "../../../typing";
4
4
  export type CapsuleRenderProps = {
5
5
  var?: string;
6
- size?: RadioGroupProps['size'];
6
+ size?: RadioGroupProps["size"];
7
7
  options?: {
8
8
  label: string;
9
9
  value: any;
@@ -1,4 +1,4 @@
1
- import React, { MouseEventHandler } from "react";
1
+ import React, { Key, MouseEventHandler } from "react";
2
2
  export type ChatRequestType = {
3
3
  message: string;
4
4
  files?: {
@@ -69,11 +69,33 @@ export type ChatMessageType = {
69
69
  createdAt: string;
70
70
  sending?: boolean;
71
71
  };
72
+ export type ExampleItemType = {
73
+ id: Key;
74
+ name: string;
75
+ description?: string | null;
76
+ cover?: string;
77
+ item: SchemaItemType;
78
+ };
79
+ export type TemplateItemType = {
80
+ id: Key;
81
+ name: string;
82
+ description?: string | null;
83
+ cover?: string;
84
+ schema: PageSchema;
85
+ };
86
+ export type PaginationType<T> = {
87
+ total: number;
88
+ list: T[];
89
+ };
72
90
  export type FetchType = {
73
91
  upload?: (file: File) => Promise<{
74
92
  id: string;
75
93
  name: string;
76
94
  }>;
95
+ exampleList?: (current?: number, size?: number, keyword?: string) => Promise<Omit<ExampleItemType, "item">[] | PaginationType<Omit<ExampleItemType, "item">>>;
96
+ exampleDetail?: (id: Key) => Promise<ExampleItemType>;
97
+ templateList?: (current?: number, size?: number, keyword?: string) => Promise<Omit<TemplateItemType, "schema">[] | PaginationType<Omit<TemplateItemType, "schema">>>;
98
+ templateDetail?: (id: Key) => Promise<TemplateItemType>;
77
99
  ai?: {
78
100
  chat: (bizType: string, bizId: string, conversationId: string | null, request: ChatRequestType) => Promise<ChatResponseType>;
79
101
  conversationList: (bizType: string, bizId: string) => Promise<ChatConversationType[]>;