方法
update
update( diagramId: string, data: { cover?: { alt?: string; grayscale?: boolean; src?: string } | null; description?: string; fields?: Record< string, { help: { show: boolean; text: string | null }; id: string; index: number; label: string; required: boolean; size: "sm" | "lg"; span: number; }, >; groups?: { description: string; id: string; index: number; rows: { fields: { id: string; index: number; span: number }[]; id: string; index: number; }[]; settings: { background: { enabled: boolean }; labelPosition: "top" | "side"; showDescription: boolean; showTitle: boolean; }; title: string; }[]; logo?: { alt?: string; src?: string } | null; settings?: { accentColor?: string; allowPrint?: boolean; containerMaxWidth?: number; maxItemsPerRow?: number; redirectUrl?: string | null; showBranding?: boolean; submission?: { customized?: { enabled?: boolean; text?: string | null }; disallowed?: boolean; disallowedReason?: string | null; }; theme?: "light" | "dark"; }; title?: string; }, versionId: string,): Promise< { data: { createdAt: string; data: | Record<string, unknown> | { cover: { alt: string; grayscale: boolean; src: string } | null; description: string; fields: Record< string, { help: { show: boolean; text: string | null }; id: string; index: number; label: string; required: boolean; size: "sm" | "lg"; span: number; }, >; groups: { description: string; id: string; index: number; rows: { fields: { id: ...
; index: ...
; span: ...
}[]; id: string; index: number; }[]; settings: { background: { enabled: boolean }; labelPosition: "top" | "side"; showDescription: boolean; showTitle: boolean; }; title: string; }[]; logo: { alt: string; src: string } | null; settings: { accentColor: string; allowPrint: boolean; containerMaxWidth: number; maxItemsPerRow: number; redirectUrl: string | null; showBranding: boolean; submission: { customized: { enabled: boolean; text: string | null }; disallowed: boolean; disallowedReason: string | null; }; theme: "light" | "dark"; }; title: string; version: "v1"; }; id: string; updatedAt: string; }; },> 参数
- diagramId: string
- data: {
cover?: { alt?: string; grayscale?: boolean; src?: string } | null;
description?: string;
fields?: Record<
string,
{
help: { show: boolean; text: string
| null };
id: string;
index: number;
label: string;
required: boolean;
size: "sm" | "lg";
span: number;
},
>;
groups?: {
description: string;
id: string;
index: number;
rows: {
fields: { id: string; index: number; span: number }[];
id: string;
index: number;
}[];
settings: {
background: { enabled: boolean };
labelPosition: "top" | "side";
showDescription: boolean;
showTitle: boolean;
};
title: string;
}[];
logo?: { alt?: string; src?: string }
| null;
settings?: {
accentColor?: string;
allowPrint?: boolean;
containerMaxWidth?: number;
maxItemsPerRow?: number;
redirectUrl?: string | null;
showBranding?: boolean;
submission?: {
customized?: { enabled?: boolean; text?: string | null };
disallowed?: boolean;
disallowedReason?: string | null;
};
theme?: "light"
| "dark";
};
title?: string;
} - versionId: string
返回 Promise<
{
data: {
createdAt: string;
data: | Record<string, unknown>
| {
cover: { alt: string; grayscale: boolean; src: string } | null;
description: string;
fields: Record<
string,
{
help: { show: boolean; text: string
| null };
id: string;
index: number;
label: string;
required: boolean;
size: "sm" | "lg";
span: number;
},
>;
groups: {
description: string;
id: string;
index: number;
rows: {
fields: { id: ...; index: ...; span: ... }[];
id: string;
index: number;
}[];
settings: {
background: { enabled: boolean };
labelPosition: "top" | "side";
showDescription: boolean;
showTitle: boolean;
};
title: string;
}[];
logo: { alt: string; src: string }
| null;
settings: {
accentColor: string;
allowPrint: boolean;
containerMaxWidth: number;
maxItemsPerRow: number;
redirectUrl: string | null;
showBranding: boolean;
submission: {
customized: { enabled: boolean; text: string | null };
disallowed: boolean;
disallowedReason: string | null;
};
theme: "light"
| "dark";
};
title: string;
version: "v1";
};
id: string;
updatedAt: string;
};
},
>
问卷数据结构 Diagram 特指问卷的数据结构,一个应用程序应通过
application.currentVersion.snapshot.diagram读取它当前版本的问卷数据结构。