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