@case-framework/survey-assistant 0.1.0
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.
- package/README.md +212 -0
- package/dist/authoring-references-Cy8J-DWt.d.mts +48 -0
- package/dist/authoring-references-Cy8J-DWt.d.mts.map +1 -0
- package/dist/authoring-references-X6uRaWuf.mjs +68 -0
- package/dist/authoring-references-X6uRaWuf.mjs.map +1 -0
- package/dist/capabilities-B6tvE7fK.mjs +66 -0
- package/dist/capabilities-B6tvE7fK.mjs.map +1 -0
- package/dist/capabilities-DvSKtjAw.d.mts +182 -0
- package/dist/capabilities-DvSKtjAw.d.mts.map +1 -0
- package/dist/capabilities-default.d.mts +15 -0
- package/dist/capabilities-default.d.mts.map +1 -0
- package/dist/capabilities-default.mjs +347 -0
- package/dist/capabilities-default.mjs.map +1 -0
- package/dist/constants-CFUWrRtl.mjs +7 -0
- package/dist/constants-CFUWrRtl.mjs.map +1 -0
- package/dist/constants-Jw0k8ojS.d.mts +67 -0
- package/dist/constants-Jw0k8ojS.d.mts.map +1 -0
- package/dist/controller-proxy-BRDusFiO.d.mts +57 -0
- package/dist/controller-proxy-BRDusFiO.d.mts.map +1 -0
- package/dist/controller-proxy-Duxo2IFE.mjs +92 -0
- package/dist/controller-proxy-Duxo2IFE.mjs.map +1 -0
- package/dist/digest-BsoVq49o.d.mts +9 -0
- package/dist/digest-BsoVq49o.d.mts.map +1 -0
- package/dist/digest.d.mts +2 -0
- package/dist/digest.mjs +20 -0
- package/dist/digest.mjs.map +1 -0
- package/dist/engine-sPvuixWg.mjs +4857 -0
- package/dist/engine-sPvuixWg.mjs.map +1 -0
- package/dist/engine.d.mts +3 -0
- package/dist/engine.mjs +4 -0
- package/dist/index-BWNHkpkh.d.mts +187 -0
- package/dist/index-BWNHkpkh.d.mts.map +1 -0
- package/dist/index-CUqbBjkc.d.mts +641 -0
- package/dist/index-CUqbBjkc.d.mts.map +1 -0
- package/dist/index-MpEMQzTm.d.mts +123 -0
- package/dist/index-MpEMQzTm.d.mts.map +1 -0
- package/dist/index-TFtvBiSQ.d.mts +1149 -0
- package/dist/index-TFtvBiSQ.d.mts.map +1 -0
- package/dist/memory-thread-repository-CJkkVE2-.mjs +718 -0
- package/dist/memory-thread-repository-CJkkVE2-.mjs.map +1 -0
- package/dist/protocol-DV0ka9WT.mjs +1032 -0
- package/dist/protocol-DV0ka9WT.mjs.map +1 -0
- package/dist/protocol.d.mts +3 -0
- package/dist/protocol.mjs +2 -0
- package/dist/react-VuYe-cPh.mjs +521 -0
- package/dist/react-VuYe-cPh.mjs.map +1 -0
- package/dist/react-integration.d.mts +2 -0
- package/dist/react-integration.mjs +3 -0
- package/dist/react.d.mts +3 -0
- package/dist/react.mjs +4 -0
- package/dist/references/assistant-operations.md +287 -0
- package/dist/references/core-rules.md +11 -0
- package/dist/references/embedded-forms.md +80 -0
- package/dist/references/expressions.md +301 -0
- package/dist/references/item-types.md +364 -0
- package/dist/references/localization.md +25 -0
- package/dist/references/rich-text-content.md +193 -0
- package/dist/references/source-material-surveys.md +60 -0
- package/dist/references/survey-data-model.md +109 -0
- package/dist/references/survey-quality.md +23 -0
- package/dist/request-context-jcmXT_Q2.mjs +44 -0
- package/dist/request-context-jcmXT_Q2.mjs.map +1 -0
- package/dist/request-guardrails-C59IWnH8.mjs +73 -0
- package/dist/request-guardrails-C59IWnH8.mjs.map +1 -0
- package/dist/server-agent.d.mts +131 -0
- package/dist/server-agent.d.mts.map +1 -0
- package/dist/server-agent.mjs +229 -0
- package/dist/server-agent.mjs.map +1 -0
- package/dist/server-runtime.d.mts +123 -0
- package/dist/server-runtime.d.mts.map +1 -0
- package/dist/server-runtime.mjs +296 -0
- package/dist/server-runtime.mjs.map +1 -0
- package/dist/server-tasks.d.mts +78 -0
- package/dist/server-tasks.d.mts.map +1 -0
- package/dist/server-tasks.mjs +253 -0
- package/dist/server-tasks.mjs.map +1 -0
- package/dist/server-tools.d.mts +2 -0
- package/dist/server-tools.mjs +2 -0
- package/dist/server.d.mts +52 -0
- package/dist/server.d.mts.map +1 -0
- package/dist/server.mjs +6 -0
- package/dist/storage-postgres.d.mts +37 -0
- package/dist/storage-postgres.d.mts.map +1 -0
- package/dist/storage-postgres.mjs +167 -0
- package/dist/storage-postgres.mjs.map +1 -0
- package/dist/thread-documents-DamIq9Od.d.mts +91 -0
- package/dist/thread-documents-DamIq9Od.d.mts.map +1 -0
- package/dist/thread-handlers-DpynUc64.d.mts +112 -0
- package/dist/thread-handlers-DpynUc64.d.mts.map +1 -0
- package/dist/tools-Hz2p7vyv.mjs +1879 -0
- package/dist/tools-Hz2p7vyv.mjs.map +1 -0
- package/dist/ui.css +2 -0
- package/dist/ui.d.mts +63 -0
- package/dist/ui.d.mts.map +1 -0
- package/dist/ui.mjs +2238 -0
- package/dist/ui.mjs.map +1 -0
- package/package.json +166 -0
- package/ui.css.d.ts +3 -0
|
@@ -0,0 +1,1149 @@
|
|
|
1
|
+
import { i as AssistantItemTypeManifest, o as SurveyAssistantCapabilityManifest } from "./capabilities-DvSKtjAw.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { Content, JsonPatchOperation, JsonValue, RawSurvey, RawSurveyAsset, RawSurveyItem, RichTextImageDimension, SurveyContentImageSource } from "@case-framework/survey-core";
|
|
4
|
+
|
|
5
|
+
//#region src/protocol/errors.d.ts
|
|
6
|
+
declare const surveyAssistantErrorCodeSchema: z.ZodEnum<{
|
|
7
|
+
authorization_failed: "authorization_failed";
|
|
8
|
+
request_failed: "request_failed";
|
|
9
|
+
attachment_unavailable: "attachment_unavailable";
|
|
10
|
+
model_unavailable: "model_unavailable";
|
|
11
|
+
rate_limited: "rate_limited";
|
|
12
|
+
}>;
|
|
13
|
+
type SurveyAssistantErrorCode = z.infer<typeof surveyAssistantErrorCodeSchema>;
|
|
14
|
+
declare const surveyAssistantErrorInfoSchema: z.ZodObject<{
|
|
15
|
+
code: z.ZodEnum<{
|
|
16
|
+
authorization_failed: "authorization_failed";
|
|
17
|
+
request_failed: "request_failed";
|
|
18
|
+
attachment_unavailable: "attachment_unavailable";
|
|
19
|
+
model_unavailable: "model_unavailable";
|
|
20
|
+
rate_limited: "rate_limited";
|
|
21
|
+
}>;
|
|
22
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
type SurveyAssistantErrorInfo = z.infer<typeof surveyAssistantErrorInfoSchema>;
|
|
25
|
+
declare const serializeSurveyAssistantError: (error: SurveyAssistantErrorInfo) => string;
|
|
26
|
+
declare const parseSurveyAssistantError: (value: unknown) => SurveyAssistantErrorInfo;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/protocol/content.d.ts
|
|
29
|
+
declare const jsonValueSchema: z.ZodType<JsonValue>;
|
|
30
|
+
declare const surveyContentSchema: z.ZodType<Content>;
|
|
31
|
+
type SurveyContent = z.infer<typeof surveyContentSchema>;
|
|
32
|
+
type JsonValue$1 = z.infer<typeof jsonValueSchema>;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/protocol/document.d.ts
|
|
35
|
+
interface SurveyDocumentVersionShape {
|
|
36
|
+
sessionId: string | null;
|
|
37
|
+
revision: number;
|
|
38
|
+
historyIndex: number;
|
|
39
|
+
contentHash: string;
|
|
40
|
+
capabilityDigest: string;
|
|
41
|
+
}
|
|
42
|
+
interface SurveyEditorUIContextShape {
|
|
43
|
+
view: "item-editor" | "preview-mode" | "translation-mode" | "asset-manager";
|
|
44
|
+
selectedItemId?: string;
|
|
45
|
+
selectedLocale: string;
|
|
46
|
+
focusItemId?: string;
|
|
47
|
+
recentItemIds?: string[];
|
|
48
|
+
activeSurface?: string;
|
|
49
|
+
openPanels?: string[];
|
|
50
|
+
highlights?: Array<{
|
|
51
|
+
kind: string;
|
|
52
|
+
itemId?: string;
|
|
53
|
+
componentId?: string;
|
|
54
|
+
label?: string;
|
|
55
|
+
details?: string;
|
|
56
|
+
}>;
|
|
57
|
+
history?: {
|
|
58
|
+
currentIndex: number;
|
|
59
|
+
totalEntries: number;
|
|
60
|
+
canUndo: boolean;
|
|
61
|
+
canRedo: boolean;
|
|
62
|
+
recent: Array<{
|
|
63
|
+
index: number;
|
|
64
|
+
kind: "survey-snapshot" | "asset-change";
|
|
65
|
+
label: string;
|
|
66
|
+
source?: "user" | "system" | "assistant";
|
|
67
|
+
timestamp: number;
|
|
68
|
+
isCurrent: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
interface SurveyDocumentSnapshotShape {
|
|
73
|
+
protocolVersion: 1;
|
|
74
|
+
version: SurveyDocumentVersionShape;
|
|
75
|
+
survey: RawSurvey;
|
|
76
|
+
ui: SurveyEditorUIContextShape;
|
|
77
|
+
capabilities: SurveyAssistantCapabilityManifest;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
}
|
|
80
|
+
declare const SURVEY_ASSISTANT_PROTOCOL_VERSION: 1;
|
|
81
|
+
declare const surveyAssistantProtocolVersionSchema: z.ZodLiteral<1>;
|
|
82
|
+
declare const surveyDocumentVersionSchema: z.ZodType<SurveyDocumentVersionShape>;
|
|
83
|
+
declare const surveyEditorUIContextSchema: z.ZodType<SurveyEditorUIContextShape>;
|
|
84
|
+
declare const rawSurveyDocumentSchema: z.ZodType<RawSurvey>;
|
|
85
|
+
declare const surveyDocumentSnapshotSchema: z.ZodType<SurveyDocumentSnapshotShape>;
|
|
86
|
+
declare const surveyAssistantSnapshotSchema: z.ZodType<SurveyDocumentSnapshotShape, unknown, z.core.$ZodTypeInternals<SurveyDocumentSnapshotShape, unknown>>;
|
|
87
|
+
declare const surveyAssistantSnapshotPayloadSchema: z.ZodType<SurveyDocumentSnapshotShape, unknown, z.core.$ZodTypeInternals<SurveyDocumentSnapshotShape, unknown>>;
|
|
88
|
+
type SurveyAssistantProtocolVersion = z.infer<typeof surveyAssistantProtocolVersionSchema>;
|
|
89
|
+
type SurveyDocumentVersion = z.infer<typeof surveyDocumentVersionSchema>;
|
|
90
|
+
type SurveyEditorUIContext = z.infer<typeof surveyEditorUIContextSchema>;
|
|
91
|
+
type RawSurveyDocument = z.infer<typeof rawSurveyDocumentSchema>;
|
|
92
|
+
type SurveyDocumentSnapshot = z.infer<typeof surveyDocumentSnapshotSchema>;
|
|
93
|
+
type SurveyAssistantSnapshot = SurveyDocumentSnapshot;
|
|
94
|
+
type SurveyAssistantSnapshotPayload = SurveyDocumentSnapshot;
|
|
95
|
+
type SurveyAssistantItemCreateStrategy = SurveyAssistantCapabilityManifest["itemTypes"][number]["create"];
|
|
96
|
+
type SurveyAssistantItemTypeManifestEntry = AssistantItemTypeManifest;
|
|
97
|
+
type SurveyAssistantItemRegistryManifest = SurveyAssistantCapabilityManifest;
|
|
98
|
+
type SurveyAssistantDraftChangePrecondition = SurveyDocumentVersion;
|
|
99
|
+
declare const surveyAssistantDraftChangePreconditionSchema: z.ZodType<SurveyDocumentVersionShape, unknown, z.core.$ZodTypeInternals<SurveyDocumentVersionShape, unknown>>;
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/protocol/operations.d.ts
|
|
102
|
+
interface OperationBase {
|
|
103
|
+
id?: string;
|
|
104
|
+
}
|
|
105
|
+
interface ItemTranslation {
|
|
106
|
+
locale: string;
|
|
107
|
+
contentKey: string;
|
|
108
|
+
plainText?: string;
|
|
109
|
+
content?: SurveyContent;
|
|
110
|
+
}
|
|
111
|
+
interface CreateItemOperation extends OperationBase {
|
|
112
|
+
kind: "create-item";
|
|
113
|
+
target: {
|
|
114
|
+
parentItemId: string;
|
|
115
|
+
index?: number;
|
|
116
|
+
};
|
|
117
|
+
item: Omit<RawSurveyItem, "id"> & {
|
|
118
|
+
id?: string;
|
|
119
|
+
};
|
|
120
|
+
translations?: ItemTranslation[];
|
|
121
|
+
}
|
|
122
|
+
interface UpdateItemKeyOperation extends OperationBase {
|
|
123
|
+
kind: "update-item-key";
|
|
124
|
+
itemId: string;
|
|
125
|
+
key: string;
|
|
126
|
+
}
|
|
127
|
+
interface UpdateItemLabelOperation extends OperationBase {
|
|
128
|
+
kind: "update-item-label";
|
|
129
|
+
itemId: string;
|
|
130
|
+
itemLabel: string;
|
|
131
|
+
}
|
|
132
|
+
type ItemColor = "#404040" | "#b91c1c" | "#c2410c" | "#a16207" | "#4d7c0f" | "#047857" | "#0369a1" | "#4338ca" | "#7e22ce" | "#86198f" | "#be123c";
|
|
133
|
+
interface UpdateItemColorOperation extends OperationBase {
|
|
134
|
+
kind: "update-item-color";
|
|
135
|
+
itemId: string;
|
|
136
|
+
color: ItemColor;
|
|
137
|
+
}
|
|
138
|
+
interface UpdateItemTranslationOperation extends OperationBase, ItemTranslation {
|
|
139
|
+
kind: "update-item-translation";
|
|
140
|
+
itemId: string;
|
|
141
|
+
}
|
|
142
|
+
interface UpdatePlacedImageOperation extends OperationBase {
|
|
143
|
+
kind: "update-placed-image";
|
|
144
|
+
itemId: string;
|
|
145
|
+
locale: string;
|
|
146
|
+
contentKey: string;
|
|
147
|
+
/** Zero-based index among image blocks in this rich-text content value. */
|
|
148
|
+
imageIndex: number;
|
|
149
|
+
/** Optional guard that prevents editing a different image after content changed. */
|
|
150
|
+
expectedAssetId?: string;
|
|
151
|
+
changes: {
|
|
152
|
+
source?: SurveyContentImageSource;
|
|
153
|
+
alt?: string | null;
|
|
154
|
+
caption?: string | null;
|
|
155
|
+
width?: RichTextImageDimension | null;
|
|
156
|
+
height?: RichTextImageDimension | null;
|
|
157
|
+
maxWidth?: RichTextImageDimension | null;
|
|
158
|
+
maxHeight?: RichTextImageDimension | null;
|
|
159
|
+
alignment?: "left" | "center" | "right" | null;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
interface PatchItemConfigOperation extends OperationBase {
|
|
163
|
+
kind: "patch-item-config";
|
|
164
|
+
itemId: string;
|
|
165
|
+
/** JSON Patch paths are relative to the item's config root. */
|
|
166
|
+
patches: JsonPatchOperation[];
|
|
167
|
+
}
|
|
168
|
+
interface FormTarget {
|
|
169
|
+
itemId: string;
|
|
170
|
+
/** When present, target the inline embedded form on this choice option. */
|
|
171
|
+
optionId?: string;
|
|
172
|
+
}
|
|
173
|
+
interface UpsertFormFieldGroupOperation extends OperationBase {
|
|
174
|
+
kind: "upsert-form-field-group";
|
|
175
|
+
target: FormTarget;
|
|
176
|
+
index?: number;
|
|
177
|
+
group: Record<string, unknown> & {
|
|
178
|
+
id: string;
|
|
179
|
+
};
|
|
180
|
+
translations?: ItemTranslation[];
|
|
181
|
+
}
|
|
182
|
+
interface RemoveFormFieldGroupOperation extends OperationBase {
|
|
183
|
+
kind: "remove-form-field-group";
|
|
184
|
+
target: FormTarget;
|
|
185
|
+
groupId: string;
|
|
186
|
+
}
|
|
187
|
+
interface ReorderFormFieldGroupsOperation extends OperationBase {
|
|
188
|
+
kind: "reorder-form-field-groups";
|
|
189
|
+
target: FormTarget;
|
|
190
|
+
groupIds: string[];
|
|
191
|
+
}
|
|
192
|
+
interface UpsertFormFieldOperation extends OperationBase {
|
|
193
|
+
kind: "upsert-form-field";
|
|
194
|
+
target: FormTarget;
|
|
195
|
+
groupId: string;
|
|
196
|
+
index?: number;
|
|
197
|
+
field: Record<string, unknown> & {
|
|
198
|
+
id: string;
|
|
199
|
+
key: string;
|
|
200
|
+
type: string;
|
|
201
|
+
};
|
|
202
|
+
translations?: ItemTranslation[];
|
|
203
|
+
}
|
|
204
|
+
interface RemoveFormFieldOperation extends OperationBase {
|
|
205
|
+
kind: "remove-form-field";
|
|
206
|
+
target: FormTarget;
|
|
207
|
+
fieldId: string;
|
|
208
|
+
}
|
|
209
|
+
interface MoveFormFieldOperation extends OperationBase {
|
|
210
|
+
kind: "move-form-field";
|
|
211
|
+
target: FormTarget;
|
|
212
|
+
fieldId: string;
|
|
213
|
+
targetGroupId: string;
|
|
214
|
+
index?: number;
|
|
215
|
+
}
|
|
216
|
+
interface SetEmbeddedFormOperation extends OperationBase {
|
|
217
|
+
kind: "set-embedded-form";
|
|
218
|
+
itemId: string;
|
|
219
|
+
optionId: string;
|
|
220
|
+
form: Record<string, unknown> & {
|
|
221
|
+
id: string;
|
|
222
|
+
fieldGroups: unknown[];
|
|
223
|
+
};
|
|
224
|
+
translations?: ItemTranslation[];
|
|
225
|
+
}
|
|
226
|
+
interface RemoveEmbeddedFormOperation extends OperationBase {
|
|
227
|
+
kind: "remove-embedded-form";
|
|
228
|
+
itemId: string;
|
|
229
|
+
optionId: string;
|
|
230
|
+
}
|
|
231
|
+
interface ChoiceOptionInput {
|
|
232
|
+
id?: string;
|
|
233
|
+
key?: string;
|
|
234
|
+
label: string;
|
|
235
|
+
}
|
|
236
|
+
interface AddChoiceOptionOperation extends OperationBase {
|
|
237
|
+
kind: "add-choice-option";
|
|
238
|
+
itemId: string;
|
|
239
|
+
locale?: string;
|
|
240
|
+
index?: number;
|
|
241
|
+
option: ChoiceOptionInput;
|
|
242
|
+
}
|
|
243
|
+
interface UpdateChoiceOptionLabelOperation extends OperationBase {
|
|
244
|
+
kind: "update-choice-option-label";
|
|
245
|
+
itemId: string;
|
|
246
|
+
optionId: string;
|
|
247
|
+
locale?: string;
|
|
248
|
+
label: string;
|
|
249
|
+
}
|
|
250
|
+
interface RemoveChoiceOptionOperation extends OperationBase {
|
|
251
|
+
kind: "remove-choice-option";
|
|
252
|
+
itemId: string;
|
|
253
|
+
optionId: string;
|
|
254
|
+
}
|
|
255
|
+
interface ReorderChoiceOptionsOperation extends OperationBase {
|
|
256
|
+
kind: "reorder-choice-options";
|
|
257
|
+
itemId: string;
|
|
258
|
+
optionIds: string[];
|
|
259
|
+
}
|
|
260
|
+
interface RemoveItemOperation extends OperationBase {
|
|
261
|
+
kind: "remove-item";
|
|
262
|
+
itemId: string;
|
|
263
|
+
includeChildren?: boolean;
|
|
264
|
+
}
|
|
265
|
+
interface MoveItemOperation extends OperationBase {
|
|
266
|
+
kind: "move-item";
|
|
267
|
+
itemId: string;
|
|
268
|
+
target: {
|
|
269
|
+
parentItemId: string;
|
|
270
|
+
index?: number;
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
interface ReorderItemsOperation extends OperationBase {
|
|
274
|
+
kind: "reorder-items";
|
|
275
|
+
parentItemId: string;
|
|
276
|
+
itemIds: string[];
|
|
277
|
+
}
|
|
278
|
+
interface UpdateSurveyMetadataOperation extends OperationBase {
|
|
279
|
+
kind: "update-survey-metadata";
|
|
280
|
+
values: Record<string, string | null>;
|
|
281
|
+
}
|
|
282
|
+
interface UpdateSurveyPaginationOperation extends OperationBase {
|
|
283
|
+
kind: "update-survey-pagination";
|
|
284
|
+
value: {
|
|
285
|
+
large: number;
|
|
286
|
+
small: number;
|
|
287
|
+
} | null;
|
|
288
|
+
}
|
|
289
|
+
interface UpdateSurveyTranslationOperation extends OperationBase, Omit<ItemTranslation, "contentKey"> {
|
|
290
|
+
kind: "update-survey-translation";
|
|
291
|
+
surface: "surveyCardContent" | "navigationContent" | "validationMessages";
|
|
292
|
+
contentKey: string;
|
|
293
|
+
}
|
|
294
|
+
interface RemoveSurveyLocaleOperation extends OperationBase {
|
|
295
|
+
kind: "remove-survey-locale";
|
|
296
|
+
locale: string;
|
|
297
|
+
}
|
|
298
|
+
interface SetImageAssetOperation extends OperationBase {
|
|
299
|
+
kind: "set-image-asset";
|
|
300
|
+
assetId: string;
|
|
301
|
+
asset: RawSurveyAsset;
|
|
302
|
+
}
|
|
303
|
+
interface UpdateImageAssetMetadataOperation extends OperationBase {
|
|
304
|
+
kind: "update-image-asset-metadata";
|
|
305
|
+
assetId: string;
|
|
306
|
+
metadata: {
|
|
307
|
+
name?: string | null;
|
|
308
|
+
filename?: string | null;
|
|
309
|
+
alt?: string | null;
|
|
310
|
+
width?: number | null;
|
|
311
|
+
height?: number | null;
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
interface RemoveImageAssetOperation extends OperationBase {
|
|
315
|
+
kind: "remove-image-asset";
|
|
316
|
+
assetId: string;
|
|
317
|
+
}
|
|
318
|
+
interface SurveyPatchOperation extends OperationBase {
|
|
319
|
+
kind: "survey-json-patch";
|
|
320
|
+
patches: JsonPatchOperation[];
|
|
321
|
+
}
|
|
322
|
+
type SurveyOperationShape = CreateItemOperation | UpdateItemKeyOperation | UpdateItemLabelOperation | UpdateItemColorOperation | UpdateItemTranslationOperation | UpdatePlacedImageOperation | PatchItemConfigOperation | UpsertFormFieldGroupOperation | RemoveFormFieldGroupOperation | ReorderFormFieldGroupsOperation | UpsertFormFieldOperation | RemoveFormFieldOperation | MoveFormFieldOperation | SetEmbeddedFormOperation | RemoveEmbeddedFormOperation | AddChoiceOptionOperation | UpdateChoiceOptionLabelOperation | RemoveChoiceOptionOperation | ReorderChoiceOptionsOperation | RemoveItemOperation | MoveItemOperation | ReorderItemsOperation | UpdateSurveyMetadataOperation | UpdateSurveyPaginationOperation | UpdateSurveyTranslationOperation | RemoveSurveyLocaleOperation | SetImageAssetOperation | UpdateImageAssetMetadataOperation | RemoveImageAssetOperation | SurveyPatchOperation;
|
|
323
|
+
interface SurveyValidationIssueShape {
|
|
324
|
+
severity: "error" | "warning";
|
|
325
|
+
code: string;
|
|
326
|
+
message: string;
|
|
327
|
+
operationIndex?: number;
|
|
328
|
+
operationId?: string;
|
|
329
|
+
itemId?: string;
|
|
330
|
+
}
|
|
331
|
+
interface SurveyValidationResultShape {
|
|
332
|
+
valid: boolean;
|
|
333
|
+
issues: SurveyValidationIssueShape[];
|
|
334
|
+
warnings: SurveyValidationIssueShape[];
|
|
335
|
+
normalizedOperations: SurveyOperationShape[];
|
|
336
|
+
}
|
|
337
|
+
declare const jsonPatchOperationSchema: z.ZodType<JsonPatchOperation>;
|
|
338
|
+
declare const createItemOperationSchema: z.ZodType<CreateItemOperation>;
|
|
339
|
+
declare const updateItemKeyOperationSchema: z.ZodType<UpdateItemKeyOperation>;
|
|
340
|
+
declare const updateItemLabelOperationSchema: z.ZodType<UpdateItemLabelOperation>;
|
|
341
|
+
declare const updateItemColorOperationSchema: z.ZodType<UpdateItemColorOperation>;
|
|
342
|
+
declare const updateItemTranslationOperationSchema: z.ZodType<UpdateItemTranslationOperation>;
|
|
343
|
+
declare const patchItemConfigOperationSchema: z.ZodType<PatchItemConfigOperation>;
|
|
344
|
+
declare const addChoiceOptionOperationSchema: z.ZodType<AddChoiceOptionOperation>;
|
|
345
|
+
declare const updateChoiceOptionLabelOperationSchema: z.ZodType<UpdateChoiceOptionLabelOperation>;
|
|
346
|
+
declare const removeChoiceOptionOperationSchema: z.ZodType<RemoveChoiceOptionOperation>;
|
|
347
|
+
declare const reorderChoiceOptionsOperationSchema: z.ZodType<ReorderChoiceOptionsOperation>;
|
|
348
|
+
declare const removeItemOperationSchema: z.ZodType<RemoveItemOperation>;
|
|
349
|
+
declare const surveyPatchOperationSchema: z.ZodType<SurveyPatchOperation>;
|
|
350
|
+
declare const surveyOperationSchema: z.ZodType<SurveyOperationShape>;
|
|
351
|
+
declare const surveyValidationIssueSchema: z.ZodType<SurveyValidationIssueShape>;
|
|
352
|
+
declare const surveyValidationResultSchema: z.ZodType<SurveyValidationResultShape>;
|
|
353
|
+
type JsonPatchOperation$1 = z.infer<typeof jsonPatchOperationSchema>;
|
|
354
|
+
type SurveyOperation = z.infer<typeof surveyOperationSchema>;
|
|
355
|
+
type SurveyOperationKind = SurveyOperation["kind"];
|
|
356
|
+
declare const SURVEY_OPERATION_KINDS: readonly ["create-item", "update-item-key", "update-item-label", "update-item-color", "update-item-translation", "update-placed-image", "patch-item-config", "upsert-form-field-group", "remove-form-field-group", "reorder-form-field-groups", "upsert-form-field", "remove-form-field", "move-form-field", "set-embedded-form", "remove-embedded-form", "add-choice-option", "update-choice-option-label", "remove-choice-option", "reorder-choice-options", "remove-item", "move-item", "reorder-items", "update-survey-metadata", "update-survey-pagination", "update-survey-translation", "remove-survey-locale", "set-image-asset", "update-image-asset-metadata", "remove-image-asset", "survey-json-patch"];
|
|
357
|
+
type SurveyValidationIssue = z.infer<typeof surveyValidationIssueSchema>;
|
|
358
|
+
type SurveyValidationResult = z.infer<typeof surveyValidationResultSchema>;
|
|
359
|
+
declare const surveyJsonPatchOperationSchema: z.ZodType<JsonPatchOperation, unknown, z.core.$ZodTypeInternals<JsonPatchOperation, unknown>>;
|
|
360
|
+
declare const surveyAssistantCreateItemOperationSchema: z.ZodType<CreateItemOperation, unknown, z.core.$ZodTypeInternals<CreateItemOperation, unknown>>;
|
|
361
|
+
declare const surveyAssistantUpdateItemKeyOperationSchema: z.ZodType<UpdateItemKeyOperation, unknown, z.core.$ZodTypeInternals<UpdateItemKeyOperation, unknown>>;
|
|
362
|
+
declare const surveyAssistantUpdateItemLabelOperationSchema: z.ZodType<UpdateItemLabelOperation, unknown, z.core.$ZodTypeInternals<UpdateItemLabelOperation, unknown>>;
|
|
363
|
+
declare const surveyAssistantUpdateItemColorOperationSchema: z.ZodType<UpdateItemColorOperation, unknown, z.core.$ZodTypeInternals<UpdateItemColorOperation, unknown>>;
|
|
364
|
+
declare const surveyAssistantUpdateItemTranslationOperationSchema: z.ZodType<UpdateItemTranslationOperation, unknown, z.core.$ZodTypeInternals<UpdateItemTranslationOperation, unknown>>;
|
|
365
|
+
declare const surveyAssistantAddChoiceOptionOperationSchema: z.ZodType<AddChoiceOptionOperation, unknown, z.core.$ZodTypeInternals<AddChoiceOptionOperation, unknown>>;
|
|
366
|
+
declare const surveyAssistantUpdateChoiceOptionLabelOperationSchema: z.ZodType<UpdateChoiceOptionLabelOperation, unknown, z.core.$ZodTypeInternals<UpdateChoiceOptionLabelOperation, unknown>>;
|
|
367
|
+
declare const surveyAssistantRemoveChoiceOptionOperationSchema: z.ZodType<RemoveChoiceOptionOperation, unknown, z.core.$ZodTypeInternals<RemoveChoiceOptionOperation, unknown>>;
|
|
368
|
+
declare const surveyAssistantReorderChoiceOptionsOperationSchema: z.ZodType<ReorderChoiceOptionsOperation, unknown, z.core.$ZodTypeInternals<ReorderChoiceOptionsOperation, unknown>>;
|
|
369
|
+
declare const surveyAssistantRemoveItemOperationSchema: z.ZodType<RemoveItemOperation, unknown, z.core.$ZodTypeInternals<RemoveItemOperation, unknown>>;
|
|
370
|
+
declare const surveyAssistantSurveyJsonPatchOperationSchema: z.ZodType<SurveyPatchOperation, unknown, z.core.$ZodTypeInternals<SurveyPatchOperation, unknown>>;
|
|
371
|
+
declare const surveyAssistantOperationSchema: z.ZodType<SurveyOperationShape, unknown, z.core.$ZodTypeInternals<SurveyOperationShape, unknown>>;
|
|
372
|
+
declare const surveyAssistantValidationIssueSchema: z.ZodType<SurveyValidationIssueShape, unknown, z.core.$ZodTypeInternals<SurveyValidationIssueShape, unknown>>;
|
|
373
|
+
declare const surveyAssistantValidationResultSchema: z.ZodType<SurveyValidationResultShape, unknown, z.core.$ZodTypeInternals<SurveyValidationResultShape, unknown>>;
|
|
374
|
+
type SurveyAssistantOperation = SurveyOperation;
|
|
375
|
+
type SurveyAssistantValidationIssue = SurveyValidationIssue;
|
|
376
|
+
type SurveyAssistantValidationResult = SurveyValidationResult;
|
|
377
|
+
type SurveyAssistantSurveyJsonPatchOperation = z.infer<typeof surveyPatchOperationSchema>;
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/protocol/threads.d.ts
|
|
380
|
+
declare const surveyAssistantThreadSchema: z.ZodObject<{
|
|
381
|
+
id: z.ZodString;
|
|
382
|
+
title: z.ZodString;
|
|
383
|
+
titleMode: z.ZodEnum<{
|
|
384
|
+
automatic: "automatic";
|
|
385
|
+
manual: "manual";
|
|
386
|
+
}>;
|
|
387
|
+
createdAt: z.ZodString;
|
|
388
|
+
updatedAt: z.ZodString;
|
|
389
|
+
}, z.core.$strip>;
|
|
390
|
+
declare const surveyAssistantThreadListSchema: z.ZodObject<{
|
|
391
|
+
threads: z.ZodArray<z.ZodObject<{
|
|
392
|
+
id: z.ZodString;
|
|
393
|
+
title: z.ZodString;
|
|
394
|
+
titleMode: z.ZodEnum<{
|
|
395
|
+
automatic: "automatic";
|
|
396
|
+
manual: "manual";
|
|
397
|
+
}>;
|
|
398
|
+
createdAt: z.ZodString;
|
|
399
|
+
updatedAt: z.ZodString;
|
|
400
|
+
}, z.core.$strip>>;
|
|
401
|
+
}, z.core.$strip>;
|
|
402
|
+
declare const surveyAssistantThreadTranscriptSchema: z.ZodObject<{
|
|
403
|
+
thread: z.ZodObject<{
|
|
404
|
+
id: z.ZodString;
|
|
405
|
+
title: z.ZodString;
|
|
406
|
+
titleMode: z.ZodEnum<{
|
|
407
|
+
automatic: "automatic";
|
|
408
|
+
manual: "manual";
|
|
409
|
+
}>;
|
|
410
|
+
createdAt: z.ZodString;
|
|
411
|
+
updatedAt: z.ZodString;
|
|
412
|
+
}, z.core.$strip>;
|
|
413
|
+
messages: z.ZodArray<z.ZodUnknown>;
|
|
414
|
+
}, z.core.$strip>;
|
|
415
|
+
declare const createSurveyAssistantThreadInputSchema: z.ZodObject<{
|
|
416
|
+
title: z.ZodOptional<z.ZodString>;
|
|
417
|
+
}, z.core.$strip>;
|
|
418
|
+
declare const updateSurveyAssistantThreadInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
419
|
+
mode: z.ZodLiteral<"automatic">;
|
|
420
|
+
title: z.ZodOptional<z.ZodString>;
|
|
421
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
422
|
+
mode: z.ZodOptional<z.ZodLiteral<"manual">>;
|
|
423
|
+
title: z.ZodString;
|
|
424
|
+
}, z.core.$strip>]>;
|
|
425
|
+
type SurveyAssistantThreadTitleMode = "automatic" | "manual";
|
|
426
|
+
type SurveyAssistantThread = z.infer<typeof surveyAssistantThreadSchema>;
|
|
427
|
+
type SurveyAssistantThreadList = z.infer<typeof surveyAssistantThreadListSchema>;
|
|
428
|
+
type SurveyAssistantThreadTranscript = z.infer<typeof surveyAssistantThreadTranscriptSchema>;
|
|
429
|
+
type CreateSurveyAssistantThreadInput = z.infer<typeof createSurveyAssistantThreadInputSchema>;
|
|
430
|
+
type UpdateSurveyAssistantThreadInput = z.infer<typeof updateSurveyAssistantThreadInputSchema>;
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region src/protocol/tasks.d.ts
|
|
433
|
+
declare const surveyAssistantTaskInvocationModeSchema: z.ZodEnum<{
|
|
434
|
+
background: "background";
|
|
435
|
+
user: "user";
|
|
436
|
+
}>;
|
|
437
|
+
type SurveyAssistantTaskInvocationMode = z.infer<typeof surveyAssistantTaskInvocationModeSchema>;
|
|
438
|
+
declare const surveyAssistantSuggestedTextSchema: z.ZodObject<{
|
|
439
|
+
text: z.ZodString;
|
|
440
|
+
}, z.core.$strip>;
|
|
441
|
+
type SurveyAssistantSuggestedText = z.infer<typeof surveyAssistantSuggestedTextSchema>;
|
|
442
|
+
declare const surveyAssistantKeySuggestionCategorySchema: z.ZodEnum<{
|
|
443
|
+
"survey-pattern": "survey-pattern";
|
|
444
|
+
compact: "compact";
|
|
445
|
+
preferred: "preferred";
|
|
446
|
+
fair: "fair";
|
|
447
|
+
}>;
|
|
448
|
+
type SurveyAssistantKeySuggestionCategory = z.infer<typeof surveyAssistantKeySuggestionCategorySchema>;
|
|
449
|
+
declare const surveyAssistantKeySuggestionSchema: z.ZodObject<{
|
|
450
|
+
text: z.ZodString;
|
|
451
|
+
category: z.ZodEnum<{
|
|
452
|
+
"survey-pattern": "survey-pattern";
|
|
453
|
+
compact: "compact";
|
|
454
|
+
preferred: "preferred";
|
|
455
|
+
fair: "fair";
|
|
456
|
+
}>;
|
|
457
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
458
|
+
}, z.core.$strip>;
|
|
459
|
+
type SurveyAssistantKeySuggestion = z.infer<typeof surveyAssistantKeySuggestionSchema>;
|
|
460
|
+
declare const surveyAssistantSuggestItemKeyInputSchema: z.ZodObject<{
|
|
461
|
+
itemId: z.ZodString;
|
|
462
|
+
draftKey: z.ZodString;
|
|
463
|
+
currentKey: z.ZodString;
|
|
464
|
+
siblingKeys: z.ZodArray<z.ZodString>;
|
|
465
|
+
maxSuggestions: z.ZodOptional<z.ZodNumber>;
|
|
466
|
+
}, z.core.$strip>;
|
|
467
|
+
type SurveyAssistantSuggestItemKeyInput = z.infer<typeof surveyAssistantSuggestItemKeyInputSchema>;
|
|
468
|
+
declare const surveyAssistantSuggestItemKeyResultSchema: z.ZodObject<{
|
|
469
|
+
suggestions: z.ZodArray<z.ZodObject<{
|
|
470
|
+
text: z.ZodString;
|
|
471
|
+
category: z.ZodEnum<{
|
|
472
|
+
"survey-pattern": "survey-pattern";
|
|
473
|
+
compact: "compact";
|
|
474
|
+
preferred: "preferred";
|
|
475
|
+
fair: "fair";
|
|
476
|
+
}>;
|
|
477
|
+
rationale: z.ZodOptional<z.ZodString>;
|
|
478
|
+
}, z.core.$strip>>;
|
|
479
|
+
}, z.core.$strip>;
|
|
480
|
+
type SurveyAssistantSuggestItemKeyResult = z.infer<typeof surveyAssistantSuggestItemKeyResultSchema>;
|
|
481
|
+
type SurveyAssistantLabelSuggestion = SurveyAssistantSuggestedText;
|
|
482
|
+
declare const surveyAssistantSuggestItemLabelInputSchema: z.ZodObject<{
|
|
483
|
+
itemId: z.ZodString;
|
|
484
|
+
draftLabel: z.ZodString;
|
|
485
|
+
itemType: z.ZodString;
|
|
486
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
487
|
+
maxSuggestions: z.ZodOptional<z.ZodNumber>;
|
|
488
|
+
}, z.core.$strip>;
|
|
489
|
+
type SurveyAssistantSuggestItemLabelInput = z.infer<typeof surveyAssistantSuggestItemLabelInputSchema>;
|
|
490
|
+
declare const surveyAssistantSuggestItemLabelResultSchema: z.ZodObject<{
|
|
491
|
+
suggestions: z.ZodArray<z.ZodObject<{
|
|
492
|
+
text: z.ZodString;
|
|
493
|
+
}, z.core.$strip>>;
|
|
494
|
+
}, z.core.$strip>;
|
|
495
|
+
type SurveyAssistantSuggestItemLabelResult = z.infer<typeof surveyAssistantSuggestItemLabelResultSchema>;
|
|
496
|
+
declare const surveyAssistantTranslateContentEntrySchema: z.ZodObject<{
|
|
497
|
+
id: z.ZodString;
|
|
498
|
+
text: z.ZodString;
|
|
499
|
+
kind: z.ZodString;
|
|
500
|
+
}, z.core.$strip>;
|
|
501
|
+
type SurveyAssistantTranslateContentEntry = z.infer<typeof surveyAssistantTranslateContentEntrySchema>;
|
|
502
|
+
declare const surveyAssistantTranslateContentInputSchema: z.ZodObject<{
|
|
503
|
+
sourceLocale: z.ZodString;
|
|
504
|
+
targetLocales: z.ZodArray<z.ZodString>;
|
|
505
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
506
|
+
id: z.ZodString;
|
|
507
|
+
text: z.ZodString;
|
|
508
|
+
kind: z.ZodString;
|
|
509
|
+
}, z.core.$strip>>;
|
|
510
|
+
}, z.core.$strip>;
|
|
511
|
+
type SurveyAssistantTranslateContentInput = z.infer<typeof surveyAssistantTranslateContentInputSchema>;
|
|
512
|
+
declare const surveyAssistantTranslateContentResultSchema: z.ZodObject<{
|
|
513
|
+
translations: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
514
|
+
}, z.core.$strip>;
|
|
515
|
+
type SurveyAssistantTranslateContentResult = z.infer<typeof surveyAssistantTranslateContentResultSchema>;
|
|
516
|
+
declare const surveyAssistantTaskItemSummarySchema: z.ZodObject<{
|
|
517
|
+
id: z.ZodString;
|
|
518
|
+
key: z.ZodString;
|
|
519
|
+
fullKey: z.ZodString;
|
|
520
|
+
itemType: z.ZodString;
|
|
521
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
522
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
523
|
+
locale: z.ZodString;
|
|
524
|
+
contentKey: z.ZodString;
|
|
525
|
+
text: z.ZodString;
|
|
526
|
+
}, z.core.$strip>>;
|
|
527
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
528
|
+
}, z.core.$strip>;
|
|
529
|
+
type SurveyAssistantTaskItemSummary = z.infer<typeof surveyAssistantTaskItemSummarySchema>;
|
|
530
|
+
declare const surveyAssistantTaskContextSchema: z.ZodObject<{
|
|
531
|
+
document: z.ZodObject<{
|
|
532
|
+
revision: z.ZodNumber;
|
|
533
|
+
contentHash: z.ZodString;
|
|
534
|
+
capabilityDigest: z.ZodString;
|
|
535
|
+
}, z.core.$strip>;
|
|
536
|
+
survey: z.ZodObject<{
|
|
537
|
+
key: z.ZodOptional<z.ZodString>;
|
|
538
|
+
locales: z.ZodArray<z.ZodString>;
|
|
539
|
+
itemCount: z.ZodNumber;
|
|
540
|
+
selectedLocale: z.ZodString;
|
|
541
|
+
}, z.core.$strip>;
|
|
542
|
+
focus: z.ZodOptional<z.ZodObject<{
|
|
543
|
+
item: z.ZodObject<{
|
|
544
|
+
id: z.ZodString;
|
|
545
|
+
key: z.ZodString;
|
|
546
|
+
fullKey: z.ZodString;
|
|
547
|
+
itemType: z.ZodString;
|
|
548
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
549
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
550
|
+
locale: z.ZodString;
|
|
551
|
+
contentKey: z.ZodString;
|
|
552
|
+
text: z.ZodString;
|
|
553
|
+
}, z.core.$strip>>;
|
|
554
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
555
|
+
}, z.core.$strip>;
|
|
556
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
557
|
+
id: z.ZodString;
|
|
558
|
+
key: z.ZodString;
|
|
559
|
+
fullKey: z.ZodString;
|
|
560
|
+
itemType: z.ZodString;
|
|
561
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
562
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
563
|
+
locale: z.ZodString;
|
|
564
|
+
contentKey: z.ZodString;
|
|
565
|
+
text: z.ZodString;
|
|
566
|
+
}, z.core.$strip>>;
|
|
567
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
568
|
+
}, z.core.$strip>>;
|
|
569
|
+
ancestorPath: z.ZodArray<z.ZodObject<{
|
|
570
|
+
id: z.ZodString;
|
|
571
|
+
key: z.ZodString;
|
|
572
|
+
fullKey: z.ZodString;
|
|
573
|
+
itemType: z.ZodString;
|
|
574
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
575
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
576
|
+
locale: z.ZodString;
|
|
577
|
+
contentKey: z.ZodString;
|
|
578
|
+
text: z.ZodString;
|
|
579
|
+
}, z.core.$strip>>;
|
|
580
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
581
|
+
}, z.core.$strip>>;
|
|
582
|
+
siblingKeys: z.ZodArray<z.ZodString>;
|
|
583
|
+
siblingItems: z.ZodArray<z.ZodObject<{
|
|
584
|
+
id: z.ZodString;
|
|
585
|
+
key: z.ZodString;
|
|
586
|
+
fullKey: z.ZodString;
|
|
587
|
+
itemType: z.ZodString;
|
|
588
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
589
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
590
|
+
locale: z.ZodString;
|
|
591
|
+
contentKey: z.ZodString;
|
|
592
|
+
text: z.ZodString;
|
|
593
|
+
}, z.core.$strip>>;
|
|
594
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
595
|
+
}, z.core.$strip>>;
|
|
596
|
+
siblingItemCount: z.ZodNumber;
|
|
597
|
+
siblingItemsTruncated: z.ZodBoolean;
|
|
598
|
+
relatedItems: z.ZodArray<z.ZodObject<{
|
|
599
|
+
id: z.ZodString;
|
|
600
|
+
key: z.ZodString;
|
|
601
|
+
fullKey: z.ZodString;
|
|
602
|
+
itemType: z.ZodString;
|
|
603
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
604
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
605
|
+
locale: z.ZodString;
|
|
606
|
+
contentKey: z.ZodString;
|
|
607
|
+
text: z.ZodString;
|
|
608
|
+
}, z.core.$strip>>;
|
|
609
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
610
|
+
}, z.core.$strip>>;
|
|
611
|
+
relatedItemCount: z.ZodNumber;
|
|
612
|
+
relatedItemsTruncated: z.ZodBoolean;
|
|
613
|
+
}, z.core.$strip>>;
|
|
614
|
+
naming: z.ZodOptional<z.ZodObject<{
|
|
615
|
+
keyExamples: z.ZodArray<z.ZodObject<{
|
|
616
|
+
itemId: z.ZodString;
|
|
617
|
+
itemType: z.ZodString;
|
|
618
|
+
key: z.ZodString;
|
|
619
|
+
relationship: z.ZodEnum<{
|
|
620
|
+
survey: "survey";
|
|
621
|
+
sibling: "sibling";
|
|
622
|
+
"same-type": "same-type";
|
|
623
|
+
}>;
|
|
624
|
+
}, z.core.$strip>>;
|
|
625
|
+
keyExampleCount: z.ZodNumber;
|
|
626
|
+
keyExamplesTruncated: z.ZodBoolean;
|
|
627
|
+
labelExamples: z.ZodArray<z.ZodObject<{
|
|
628
|
+
itemId: z.ZodString;
|
|
629
|
+
itemType: z.ZodString;
|
|
630
|
+
key: z.ZodString;
|
|
631
|
+
label: z.ZodString;
|
|
632
|
+
relationship: z.ZodEnum<{
|
|
633
|
+
survey: "survey";
|
|
634
|
+
sibling: "sibling";
|
|
635
|
+
"same-type": "same-type";
|
|
636
|
+
}>;
|
|
637
|
+
}, z.core.$strip>>;
|
|
638
|
+
labelExampleCount: z.ZodNumber;
|
|
639
|
+
labelExamplesTruncated: z.ZodBoolean;
|
|
640
|
+
}, z.core.$strip>>;
|
|
641
|
+
translation: z.ZodOptional<z.ZodObject<{
|
|
642
|
+
examples: z.ZodArray<z.ZodObject<{
|
|
643
|
+
itemId: z.ZodString;
|
|
644
|
+
contentKey: z.ZodString;
|
|
645
|
+
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
646
|
+
}, z.core.$strip>>;
|
|
647
|
+
exampleCount: z.ZodNumber;
|
|
648
|
+
examplesTruncated: z.ZodBoolean;
|
|
649
|
+
}, z.core.$strip>>;
|
|
650
|
+
}, z.core.$strip>;
|
|
651
|
+
type SurveyAssistantTaskContext = z.infer<typeof surveyAssistantTaskContextSchema>;
|
|
652
|
+
declare const surveyAssistantTaskRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
653
|
+
taskId: z.ZodLiteral<"suggest-item-key">;
|
|
654
|
+
input: z.ZodObject<{
|
|
655
|
+
itemId: z.ZodString;
|
|
656
|
+
draftKey: z.ZodString;
|
|
657
|
+
currentKey: z.ZodString;
|
|
658
|
+
siblingKeys: z.ZodArray<z.ZodString>;
|
|
659
|
+
maxSuggestions: z.ZodOptional<z.ZodNumber>;
|
|
660
|
+
}, z.core.$strip>;
|
|
661
|
+
context: z.ZodObject<{
|
|
662
|
+
document: z.ZodObject<{
|
|
663
|
+
revision: z.ZodNumber;
|
|
664
|
+
contentHash: z.ZodString;
|
|
665
|
+
capabilityDigest: z.ZodString;
|
|
666
|
+
}, z.core.$strip>;
|
|
667
|
+
survey: z.ZodObject<{
|
|
668
|
+
key: z.ZodOptional<z.ZodString>;
|
|
669
|
+
locales: z.ZodArray<z.ZodString>;
|
|
670
|
+
itemCount: z.ZodNumber;
|
|
671
|
+
selectedLocale: z.ZodString;
|
|
672
|
+
}, z.core.$strip>;
|
|
673
|
+
focus: z.ZodOptional<z.ZodObject<{
|
|
674
|
+
item: z.ZodObject<{
|
|
675
|
+
id: z.ZodString;
|
|
676
|
+
key: z.ZodString;
|
|
677
|
+
fullKey: z.ZodString;
|
|
678
|
+
itemType: z.ZodString;
|
|
679
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
680
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
681
|
+
locale: z.ZodString;
|
|
682
|
+
contentKey: z.ZodString;
|
|
683
|
+
text: z.ZodString;
|
|
684
|
+
}, z.core.$strip>>;
|
|
685
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
686
|
+
}, z.core.$strip>;
|
|
687
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
688
|
+
id: z.ZodString;
|
|
689
|
+
key: z.ZodString;
|
|
690
|
+
fullKey: z.ZodString;
|
|
691
|
+
itemType: z.ZodString;
|
|
692
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
693
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
694
|
+
locale: z.ZodString;
|
|
695
|
+
contentKey: z.ZodString;
|
|
696
|
+
text: z.ZodString;
|
|
697
|
+
}, z.core.$strip>>;
|
|
698
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
699
|
+
}, z.core.$strip>>;
|
|
700
|
+
ancestorPath: z.ZodArray<z.ZodObject<{
|
|
701
|
+
id: z.ZodString;
|
|
702
|
+
key: z.ZodString;
|
|
703
|
+
fullKey: z.ZodString;
|
|
704
|
+
itemType: z.ZodString;
|
|
705
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
706
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
707
|
+
locale: z.ZodString;
|
|
708
|
+
contentKey: z.ZodString;
|
|
709
|
+
text: z.ZodString;
|
|
710
|
+
}, z.core.$strip>>;
|
|
711
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
712
|
+
}, z.core.$strip>>;
|
|
713
|
+
siblingKeys: z.ZodArray<z.ZodString>;
|
|
714
|
+
siblingItems: z.ZodArray<z.ZodObject<{
|
|
715
|
+
id: z.ZodString;
|
|
716
|
+
key: z.ZodString;
|
|
717
|
+
fullKey: z.ZodString;
|
|
718
|
+
itemType: z.ZodString;
|
|
719
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
720
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
721
|
+
locale: z.ZodString;
|
|
722
|
+
contentKey: z.ZodString;
|
|
723
|
+
text: z.ZodString;
|
|
724
|
+
}, z.core.$strip>>;
|
|
725
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
726
|
+
}, z.core.$strip>>;
|
|
727
|
+
siblingItemCount: z.ZodNumber;
|
|
728
|
+
siblingItemsTruncated: z.ZodBoolean;
|
|
729
|
+
relatedItems: z.ZodArray<z.ZodObject<{
|
|
730
|
+
id: z.ZodString;
|
|
731
|
+
key: z.ZodString;
|
|
732
|
+
fullKey: z.ZodString;
|
|
733
|
+
itemType: z.ZodString;
|
|
734
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
735
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
736
|
+
locale: z.ZodString;
|
|
737
|
+
contentKey: z.ZodString;
|
|
738
|
+
text: z.ZodString;
|
|
739
|
+
}, z.core.$strip>>;
|
|
740
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
741
|
+
}, z.core.$strip>>;
|
|
742
|
+
relatedItemCount: z.ZodNumber;
|
|
743
|
+
relatedItemsTruncated: z.ZodBoolean;
|
|
744
|
+
}, z.core.$strip>>;
|
|
745
|
+
naming: z.ZodOptional<z.ZodObject<{
|
|
746
|
+
keyExamples: z.ZodArray<z.ZodObject<{
|
|
747
|
+
itemId: z.ZodString;
|
|
748
|
+
itemType: z.ZodString;
|
|
749
|
+
key: z.ZodString;
|
|
750
|
+
relationship: z.ZodEnum<{
|
|
751
|
+
survey: "survey";
|
|
752
|
+
sibling: "sibling";
|
|
753
|
+
"same-type": "same-type";
|
|
754
|
+
}>;
|
|
755
|
+
}, z.core.$strip>>;
|
|
756
|
+
keyExampleCount: z.ZodNumber;
|
|
757
|
+
keyExamplesTruncated: z.ZodBoolean;
|
|
758
|
+
labelExamples: z.ZodArray<z.ZodObject<{
|
|
759
|
+
itemId: z.ZodString;
|
|
760
|
+
itemType: z.ZodString;
|
|
761
|
+
key: z.ZodString;
|
|
762
|
+
label: z.ZodString;
|
|
763
|
+
relationship: z.ZodEnum<{
|
|
764
|
+
survey: "survey";
|
|
765
|
+
sibling: "sibling";
|
|
766
|
+
"same-type": "same-type";
|
|
767
|
+
}>;
|
|
768
|
+
}, z.core.$strip>>;
|
|
769
|
+
labelExampleCount: z.ZodNumber;
|
|
770
|
+
labelExamplesTruncated: z.ZodBoolean;
|
|
771
|
+
}, z.core.$strip>>;
|
|
772
|
+
translation: z.ZodOptional<z.ZodObject<{
|
|
773
|
+
examples: z.ZodArray<z.ZodObject<{
|
|
774
|
+
itemId: z.ZodString;
|
|
775
|
+
contentKey: z.ZodString;
|
|
776
|
+
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
777
|
+
}, z.core.$strip>>;
|
|
778
|
+
exampleCount: z.ZodNumber;
|
|
779
|
+
examplesTruncated: z.ZodBoolean;
|
|
780
|
+
}, z.core.$strip>>;
|
|
781
|
+
}, z.core.$strip>;
|
|
782
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
783
|
+
background: "background";
|
|
784
|
+
user: "user";
|
|
785
|
+
}>>;
|
|
786
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
787
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
788
|
+
taskId: z.ZodLiteral<"suggest-item-label">;
|
|
789
|
+
input: z.ZodObject<{
|
|
790
|
+
itemId: z.ZodString;
|
|
791
|
+
draftLabel: z.ZodString;
|
|
792
|
+
itemType: z.ZodString;
|
|
793
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
794
|
+
maxSuggestions: z.ZodOptional<z.ZodNumber>;
|
|
795
|
+
}, z.core.$strip>;
|
|
796
|
+
context: z.ZodObject<{
|
|
797
|
+
document: z.ZodObject<{
|
|
798
|
+
revision: z.ZodNumber;
|
|
799
|
+
contentHash: z.ZodString;
|
|
800
|
+
capabilityDigest: z.ZodString;
|
|
801
|
+
}, z.core.$strip>;
|
|
802
|
+
survey: z.ZodObject<{
|
|
803
|
+
key: z.ZodOptional<z.ZodString>;
|
|
804
|
+
locales: z.ZodArray<z.ZodString>;
|
|
805
|
+
itemCount: z.ZodNumber;
|
|
806
|
+
selectedLocale: z.ZodString;
|
|
807
|
+
}, z.core.$strip>;
|
|
808
|
+
focus: z.ZodOptional<z.ZodObject<{
|
|
809
|
+
item: z.ZodObject<{
|
|
810
|
+
id: z.ZodString;
|
|
811
|
+
key: z.ZodString;
|
|
812
|
+
fullKey: z.ZodString;
|
|
813
|
+
itemType: z.ZodString;
|
|
814
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
815
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
816
|
+
locale: z.ZodString;
|
|
817
|
+
contentKey: z.ZodString;
|
|
818
|
+
text: z.ZodString;
|
|
819
|
+
}, z.core.$strip>>;
|
|
820
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
821
|
+
}, z.core.$strip>;
|
|
822
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
823
|
+
id: z.ZodString;
|
|
824
|
+
key: z.ZodString;
|
|
825
|
+
fullKey: z.ZodString;
|
|
826
|
+
itemType: z.ZodString;
|
|
827
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
828
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
829
|
+
locale: z.ZodString;
|
|
830
|
+
contentKey: z.ZodString;
|
|
831
|
+
text: z.ZodString;
|
|
832
|
+
}, z.core.$strip>>;
|
|
833
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
834
|
+
}, z.core.$strip>>;
|
|
835
|
+
ancestorPath: z.ZodArray<z.ZodObject<{
|
|
836
|
+
id: z.ZodString;
|
|
837
|
+
key: z.ZodString;
|
|
838
|
+
fullKey: z.ZodString;
|
|
839
|
+
itemType: z.ZodString;
|
|
840
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
841
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
842
|
+
locale: z.ZodString;
|
|
843
|
+
contentKey: z.ZodString;
|
|
844
|
+
text: z.ZodString;
|
|
845
|
+
}, z.core.$strip>>;
|
|
846
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
847
|
+
}, z.core.$strip>>;
|
|
848
|
+
siblingKeys: z.ZodArray<z.ZodString>;
|
|
849
|
+
siblingItems: z.ZodArray<z.ZodObject<{
|
|
850
|
+
id: z.ZodString;
|
|
851
|
+
key: z.ZodString;
|
|
852
|
+
fullKey: z.ZodString;
|
|
853
|
+
itemType: z.ZodString;
|
|
854
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
855
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
856
|
+
locale: z.ZodString;
|
|
857
|
+
contentKey: z.ZodString;
|
|
858
|
+
text: z.ZodString;
|
|
859
|
+
}, z.core.$strip>>;
|
|
860
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
861
|
+
}, z.core.$strip>>;
|
|
862
|
+
siblingItemCount: z.ZodNumber;
|
|
863
|
+
siblingItemsTruncated: z.ZodBoolean;
|
|
864
|
+
relatedItems: z.ZodArray<z.ZodObject<{
|
|
865
|
+
id: z.ZodString;
|
|
866
|
+
key: z.ZodString;
|
|
867
|
+
fullKey: z.ZodString;
|
|
868
|
+
itemType: z.ZodString;
|
|
869
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
870
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
871
|
+
locale: z.ZodString;
|
|
872
|
+
contentKey: z.ZodString;
|
|
873
|
+
text: z.ZodString;
|
|
874
|
+
}, z.core.$strip>>;
|
|
875
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
876
|
+
}, z.core.$strip>>;
|
|
877
|
+
relatedItemCount: z.ZodNumber;
|
|
878
|
+
relatedItemsTruncated: z.ZodBoolean;
|
|
879
|
+
}, z.core.$strip>>;
|
|
880
|
+
naming: z.ZodOptional<z.ZodObject<{
|
|
881
|
+
keyExamples: z.ZodArray<z.ZodObject<{
|
|
882
|
+
itemId: z.ZodString;
|
|
883
|
+
itemType: z.ZodString;
|
|
884
|
+
key: z.ZodString;
|
|
885
|
+
relationship: z.ZodEnum<{
|
|
886
|
+
survey: "survey";
|
|
887
|
+
sibling: "sibling";
|
|
888
|
+
"same-type": "same-type";
|
|
889
|
+
}>;
|
|
890
|
+
}, z.core.$strip>>;
|
|
891
|
+
keyExampleCount: z.ZodNumber;
|
|
892
|
+
keyExamplesTruncated: z.ZodBoolean;
|
|
893
|
+
labelExamples: z.ZodArray<z.ZodObject<{
|
|
894
|
+
itemId: z.ZodString;
|
|
895
|
+
itemType: z.ZodString;
|
|
896
|
+
key: z.ZodString;
|
|
897
|
+
label: z.ZodString;
|
|
898
|
+
relationship: z.ZodEnum<{
|
|
899
|
+
survey: "survey";
|
|
900
|
+
sibling: "sibling";
|
|
901
|
+
"same-type": "same-type";
|
|
902
|
+
}>;
|
|
903
|
+
}, z.core.$strip>>;
|
|
904
|
+
labelExampleCount: z.ZodNumber;
|
|
905
|
+
labelExamplesTruncated: z.ZodBoolean;
|
|
906
|
+
}, z.core.$strip>>;
|
|
907
|
+
translation: z.ZodOptional<z.ZodObject<{
|
|
908
|
+
examples: z.ZodArray<z.ZodObject<{
|
|
909
|
+
itemId: z.ZodString;
|
|
910
|
+
contentKey: z.ZodString;
|
|
911
|
+
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
912
|
+
}, z.core.$strip>>;
|
|
913
|
+
exampleCount: z.ZodNumber;
|
|
914
|
+
examplesTruncated: z.ZodBoolean;
|
|
915
|
+
}, z.core.$strip>>;
|
|
916
|
+
}, z.core.$strip>;
|
|
917
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
918
|
+
background: "background";
|
|
919
|
+
user: "user";
|
|
920
|
+
}>>;
|
|
921
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
922
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
923
|
+
taskId: z.ZodLiteral<"translate-content">;
|
|
924
|
+
input: z.ZodObject<{
|
|
925
|
+
sourceLocale: z.ZodString;
|
|
926
|
+
targetLocales: z.ZodArray<z.ZodString>;
|
|
927
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
928
|
+
id: z.ZodString;
|
|
929
|
+
text: z.ZodString;
|
|
930
|
+
kind: z.ZodString;
|
|
931
|
+
}, z.core.$strip>>;
|
|
932
|
+
}, z.core.$strip>;
|
|
933
|
+
context: z.ZodObject<{
|
|
934
|
+
document: z.ZodObject<{
|
|
935
|
+
revision: z.ZodNumber;
|
|
936
|
+
contentHash: z.ZodString;
|
|
937
|
+
capabilityDigest: z.ZodString;
|
|
938
|
+
}, z.core.$strip>;
|
|
939
|
+
survey: z.ZodObject<{
|
|
940
|
+
key: z.ZodOptional<z.ZodString>;
|
|
941
|
+
locales: z.ZodArray<z.ZodString>;
|
|
942
|
+
itemCount: z.ZodNumber;
|
|
943
|
+
selectedLocale: z.ZodString;
|
|
944
|
+
}, z.core.$strip>;
|
|
945
|
+
focus: z.ZodOptional<z.ZodObject<{
|
|
946
|
+
item: z.ZodObject<{
|
|
947
|
+
id: z.ZodString;
|
|
948
|
+
key: z.ZodString;
|
|
949
|
+
fullKey: z.ZodString;
|
|
950
|
+
itemType: z.ZodString;
|
|
951
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
952
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
953
|
+
locale: z.ZodString;
|
|
954
|
+
contentKey: z.ZodString;
|
|
955
|
+
text: z.ZodString;
|
|
956
|
+
}, z.core.$strip>>;
|
|
957
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
958
|
+
}, z.core.$strip>;
|
|
959
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
960
|
+
id: z.ZodString;
|
|
961
|
+
key: z.ZodString;
|
|
962
|
+
fullKey: z.ZodString;
|
|
963
|
+
itemType: z.ZodString;
|
|
964
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
965
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
966
|
+
locale: z.ZodString;
|
|
967
|
+
contentKey: z.ZodString;
|
|
968
|
+
text: z.ZodString;
|
|
969
|
+
}, z.core.$strip>>;
|
|
970
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
971
|
+
}, z.core.$strip>>;
|
|
972
|
+
ancestorPath: z.ZodArray<z.ZodObject<{
|
|
973
|
+
id: z.ZodString;
|
|
974
|
+
key: z.ZodString;
|
|
975
|
+
fullKey: z.ZodString;
|
|
976
|
+
itemType: z.ZodString;
|
|
977
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
978
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
979
|
+
locale: z.ZodString;
|
|
980
|
+
contentKey: z.ZodString;
|
|
981
|
+
text: z.ZodString;
|
|
982
|
+
}, z.core.$strip>>;
|
|
983
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
984
|
+
}, z.core.$strip>>;
|
|
985
|
+
siblingKeys: z.ZodArray<z.ZodString>;
|
|
986
|
+
siblingItems: z.ZodArray<z.ZodObject<{
|
|
987
|
+
id: z.ZodString;
|
|
988
|
+
key: z.ZodString;
|
|
989
|
+
fullKey: z.ZodString;
|
|
990
|
+
itemType: z.ZodString;
|
|
991
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
992
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
993
|
+
locale: z.ZodString;
|
|
994
|
+
contentKey: z.ZodString;
|
|
995
|
+
text: z.ZodString;
|
|
996
|
+
}, z.core.$strip>>;
|
|
997
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
998
|
+
}, z.core.$strip>>;
|
|
999
|
+
siblingItemCount: z.ZodNumber;
|
|
1000
|
+
siblingItemsTruncated: z.ZodBoolean;
|
|
1001
|
+
relatedItems: z.ZodArray<z.ZodObject<{
|
|
1002
|
+
id: z.ZodString;
|
|
1003
|
+
key: z.ZodString;
|
|
1004
|
+
fullKey: z.ZodString;
|
|
1005
|
+
itemType: z.ZodString;
|
|
1006
|
+
itemLabel: z.ZodOptional<z.ZodString>;
|
|
1007
|
+
visibleText: z.ZodArray<z.ZodObject<{
|
|
1008
|
+
locale: z.ZodString;
|
|
1009
|
+
contentKey: z.ZodString;
|
|
1010
|
+
text: z.ZodString;
|
|
1011
|
+
}, z.core.$strip>>;
|
|
1012
|
+
visibleTextTruncated: z.ZodBoolean;
|
|
1013
|
+
}, z.core.$strip>>;
|
|
1014
|
+
relatedItemCount: z.ZodNumber;
|
|
1015
|
+
relatedItemsTruncated: z.ZodBoolean;
|
|
1016
|
+
}, z.core.$strip>>;
|
|
1017
|
+
naming: z.ZodOptional<z.ZodObject<{
|
|
1018
|
+
keyExamples: z.ZodArray<z.ZodObject<{
|
|
1019
|
+
itemId: z.ZodString;
|
|
1020
|
+
itemType: z.ZodString;
|
|
1021
|
+
key: z.ZodString;
|
|
1022
|
+
relationship: z.ZodEnum<{
|
|
1023
|
+
survey: "survey";
|
|
1024
|
+
sibling: "sibling";
|
|
1025
|
+
"same-type": "same-type";
|
|
1026
|
+
}>;
|
|
1027
|
+
}, z.core.$strip>>;
|
|
1028
|
+
keyExampleCount: z.ZodNumber;
|
|
1029
|
+
keyExamplesTruncated: z.ZodBoolean;
|
|
1030
|
+
labelExamples: z.ZodArray<z.ZodObject<{
|
|
1031
|
+
itemId: z.ZodString;
|
|
1032
|
+
itemType: z.ZodString;
|
|
1033
|
+
key: z.ZodString;
|
|
1034
|
+
label: z.ZodString;
|
|
1035
|
+
relationship: z.ZodEnum<{
|
|
1036
|
+
survey: "survey";
|
|
1037
|
+
sibling: "sibling";
|
|
1038
|
+
"same-type": "same-type";
|
|
1039
|
+
}>;
|
|
1040
|
+
}, z.core.$strip>>;
|
|
1041
|
+
labelExampleCount: z.ZodNumber;
|
|
1042
|
+
labelExamplesTruncated: z.ZodBoolean;
|
|
1043
|
+
}, z.core.$strip>>;
|
|
1044
|
+
translation: z.ZodOptional<z.ZodObject<{
|
|
1045
|
+
examples: z.ZodArray<z.ZodObject<{
|
|
1046
|
+
itemId: z.ZodString;
|
|
1047
|
+
contentKey: z.ZodString;
|
|
1048
|
+
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1049
|
+
}, z.core.$strip>>;
|
|
1050
|
+
exampleCount: z.ZodNumber;
|
|
1051
|
+
examplesTruncated: z.ZodBoolean;
|
|
1052
|
+
}, z.core.$strip>>;
|
|
1053
|
+
}, z.core.$strip>;
|
|
1054
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
1055
|
+
background: "background";
|
|
1056
|
+
user: "user";
|
|
1057
|
+
}>>;
|
|
1058
|
+
modelId: z.ZodOptional<z.ZodString>;
|
|
1059
|
+
}, z.core.$strip>], "taskId">;
|
|
1060
|
+
type SurveyAssistantTaskRequest = z.infer<typeof surveyAssistantTaskRequestSchema>;
|
|
1061
|
+
//#endregion
|
|
1062
|
+
//#region src/protocol/models.d.ts
|
|
1063
|
+
declare const surveyAssistantModelOptionSchema: z.ZodObject<{
|
|
1064
|
+
id: z.ZodString;
|
|
1065
|
+
label: z.ZodString;
|
|
1066
|
+
}, z.core.$strip>;
|
|
1067
|
+
declare const surveyAssistantModelCatalogSchema: z.ZodObject<{
|
|
1068
|
+
defaultModelId: z.ZodString;
|
|
1069
|
+
models: z.ZodArray<z.ZodObject<{
|
|
1070
|
+
id: z.ZodString;
|
|
1071
|
+
label: z.ZodString;
|
|
1072
|
+
}, z.core.$strip>>;
|
|
1073
|
+
}, z.core.$strip>;
|
|
1074
|
+
type SurveyAssistantModelOption = z.infer<typeof surveyAssistantModelOptionSchema>;
|
|
1075
|
+
type SurveyAssistantModelCatalog = z.infer<typeof surveyAssistantModelCatalogSchema>;
|
|
1076
|
+
//#endregion
|
|
1077
|
+
//#region src/protocol/lifecycle.d.ts
|
|
1078
|
+
interface SurveyChangeSetShape {
|
|
1079
|
+
protocolVersion: 1;
|
|
1080
|
+
id: string;
|
|
1081
|
+
turnId: string;
|
|
1082
|
+
status: "validated" | "rejected";
|
|
1083
|
+
summary: string;
|
|
1084
|
+
operations: SurveyOperation[];
|
|
1085
|
+
supersedesChangeIds?: string[];
|
|
1086
|
+
precondition?: SurveyDocumentVersion;
|
|
1087
|
+
validation: SurveyValidationResult;
|
|
1088
|
+
createdAt: string;
|
|
1089
|
+
}
|
|
1090
|
+
interface SurveyAssistantTurnFinalShape {
|
|
1091
|
+
protocolVersion: 1;
|
|
1092
|
+
turnId: string;
|
|
1093
|
+
status: "completed" | "failed" | "aborted";
|
|
1094
|
+
executableChangeSetIds: string[];
|
|
1095
|
+
blockedChangeSetIds?: string[];
|
|
1096
|
+
createdAt: string;
|
|
1097
|
+
}
|
|
1098
|
+
type SurveyAssistantApplyPolicyShape = "auto" | "review" | "deny";
|
|
1099
|
+
declare const SURVEY_ASSISTANT_TURN_FINAL_DATA_NAME: "survey-assistant-turn-final";
|
|
1100
|
+
declare const SURVEY_ASSISTANT_TURN_FINAL_PART_TYPE: "data-survey-assistant-turn-final";
|
|
1101
|
+
type SurveyApplyStatusShape = "applied" | "rejected" | "stale" | "failed";
|
|
1102
|
+
interface SurveyApplyResultShape {
|
|
1103
|
+
status: SurveyApplyStatusShape;
|
|
1104
|
+
changeId: string;
|
|
1105
|
+
summary: string;
|
|
1106
|
+
message: string;
|
|
1107
|
+
appliedOperations: number;
|
|
1108
|
+
issues?: SurveyValidationIssue[];
|
|
1109
|
+
}
|
|
1110
|
+
interface SurveyBatchApplyResultShape {
|
|
1111
|
+
results: SurveyApplyResultShape[];
|
|
1112
|
+
}
|
|
1113
|
+
interface ApplyReceiptShape {
|
|
1114
|
+
protocolVersion: 1;
|
|
1115
|
+
turnId: string;
|
|
1116
|
+
changeSetId: string;
|
|
1117
|
+
beforeVersion: SurveyDocumentVersion;
|
|
1118
|
+
afterVersion?: SurveyDocumentVersion;
|
|
1119
|
+
status: SurveyApplyStatusShape;
|
|
1120
|
+
operationCount: number;
|
|
1121
|
+
commit?: {
|
|
1122
|
+
id?: string;
|
|
1123
|
+
index?: number;
|
|
1124
|
+
};
|
|
1125
|
+
issues?: SurveyValidationIssue[];
|
|
1126
|
+
createdAt: string;
|
|
1127
|
+
}
|
|
1128
|
+
declare const surveyChangeSetSchema: z.ZodType<SurveyChangeSetShape>;
|
|
1129
|
+
declare const surveyAssistantTurnFinalSchema: z.ZodType<SurveyAssistantTurnFinalShape>;
|
|
1130
|
+
declare const surveyAssistantApplyPolicySchema: z.ZodType<SurveyAssistantApplyPolicyShape>;
|
|
1131
|
+
declare const surveyApplyStatusSchema: z.ZodType<SurveyApplyStatusShape>;
|
|
1132
|
+
declare const surveyApplyResultSchema: z.ZodType<SurveyApplyResultShape>;
|
|
1133
|
+
declare const surveyBatchApplyResultSchema: z.ZodType<SurveyBatchApplyResultShape>;
|
|
1134
|
+
declare const applyReceiptSchema: z.ZodType<ApplyReceiptShape>;
|
|
1135
|
+
type SurveyChangeSet = z.infer<typeof surveyChangeSetSchema>;
|
|
1136
|
+
type SurveyAssistantTurnFinal = z.infer<typeof surveyAssistantTurnFinalSchema>;
|
|
1137
|
+
type SurveyAssistantApplyPolicy = z.infer<typeof surveyAssistantApplyPolicySchema>;
|
|
1138
|
+
type SurveyApplyStatus = z.infer<typeof surveyApplyStatusSchema>;
|
|
1139
|
+
type SurveyApplyResult = z.infer<typeof surveyApplyResultSchema>;
|
|
1140
|
+
type SurveyBatchApplyResult = z.infer<typeof surveyBatchApplyResultSchema>;
|
|
1141
|
+
type ApplyReceipt = z.infer<typeof applyReceiptSchema>;
|
|
1142
|
+
declare const surveyAssistantDraftChangeEventSchema: z.ZodType<SurveyChangeSetShape, unknown, z.core.$ZodTypeInternals<SurveyChangeSetShape, unknown>>;
|
|
1143
|
+
type SurveyAssistantDraftChangeEvent = SurveyChangeSet;
|
|
1144
|
+
type SurveyAssistantApplyStatus = SurveyApplyStatus;
|
|
1145
|
+
type SurveyAssistantApplyResult = SurveyApplyResult;
|
|
1146
|
+
type SurveyAssistantBatchApplyResult = SurveyBatchApplyResult;
|
|
1147
|
+
//#endregion
|
|
1148
|
+
export { surveyAssistantTranslateContentInputSchema as $, RawSurveyDocument as $t, SurveyAssistantSuggestItemKeyResult as A, surveyAssistantCreateItemOperationSchema as At, SurveyAssistantTranslateContentResult as B, surveyAssistantUpdateItemTranslationOperationSchema as Bt, SurveyAssistantModelOption as C, SurveyAssistantErrorCode as Cn, createItemOperationSchema as Ct, SurveyAssistantKeySuggestionCategory as D, surveyAssistantErrorCodeSchema as Dn, removeItemOperationSchema as Dt, SurveyAssistantKeySuggestion as E, serializeSurveyAssistantError as En, removeChoiceOptionOperationSchema as Et, SurveyAssistantTaskInvocationMode as F, surveyAssistantSurveyJsonPatchOperationSchema as Ft, surveyAssistantSuggestItemLabelInputSchema as G, surveyPatchOperationSchema as Gt, surveyAssistantKeySuggestionSchema as H, surveyAssistantValidationResultSchema as Ht, SurveyAssistantTaskItemSummary as I, surveyAssistantUpdateChoiceOptionLabelOperationSchema as It, surveyAssistantTaskContextSchema as J, updateChoiceOptionLabelOperationSchema as Jt, surveyAssistantSuggestItemLabelResultSchema as K, surveyValidationIssueSchema as Kt, SurveyAssistantTaskRequest as L, surveyAssistantUpdateItemColorOperationSchema as Lt, SurveyAssistantSuggestItemLabelResult as M, surveyAssistantRemoveChoiceOptionOperationSchema as Mt, SurveyAssistantSuggestedText as N, surveyAssistantRemoveItemOperationSchema as Nt, SurveyAssistantLabelSuggestion as O, surveyAssistantErrorInfoSchema as On, reorderChoiceOptionsOperationSchema as Ot, SurveyAssistantTaskContext as P, surveyAssistantReorderChoiceOptionsOperationSchema as Pt, surveyAssistantTranslateContentEntrySchema as Q, updateItemTranslationOperationSchema as Qt, SurveyAssistantTranslateContentEntry as R, surveyAssistantUpdateItemKeyOperationSchema as Rt, SurveyAssistantModelCatalog as S, surveyContentSchema as Sn, addChoiceOptionOperationSchema as St, surveyAssistantModelOptionSchema as T, parseSurveyAssistantError as Tn, patchItemConfigOperationSchema as Tt, surveyAssistantSuggestItemKeyInputSchema as U, surveyJsonPatchOperationSchema as Ut, surveyAssistantKeySuggestionCategorySchema as V, surveyAssistantValidationIssueSchema as Vt, surveyAssistantSuggestItemKeyResultSchema as W, surveyOperationSchema as Wt, surveyAssistantTaskItemSummarySchema as X, updateItemKeyOperationSchema as Xt, surveyAssistantTaskInvocationModeSchema as Y, updateItemColorOperationSchema as Yt, surveyAssistantTaskRequestSchema as Z, updateItemLabelOperationSchema as Zt, surveyAssistantApplyPolicySchema as _, surveyDocumentVersionSchema as _n, SurveyAssistantValidationResult as _t, SurveyApplyStatus as a, SurveyAssistantProtocolVersion as an, SurveyAssistantThreadTranscript as at, surveyBatchApplyResultSchema as b, SurveyContent as bn, SurveyValidationIssue as bt, SurveyAssistantApplyStatus as c, SurveyDocumentSnapshot as cn, surveyAssistantThreadListSchema as ct, SurveyAssistantTurnFinal as d, rawSurveyDocumentSchema as dn, updateSurveyAssistantThreadInputSchema as dt, SURVEY_ASSISTANT_PROTOCOL_VERSION as en, surveyAssistantTranslateContentResultSchema as et, SurveyBatchApplyResult as f, surveyAssistantDraftChangePreconditionSchema as fn, JsonPatchOperation$1 as ft, surveyApplyStatusSchema as g, surveyDocumentSnapshotSchema as gn, SurveyAssistantValidationIssue as gt, surveyApplyResultSchema as h, surveyAssistantSnapshotSchema as hn, SurveyAssistantSurveyJsonPatchOperation as ht, SurveyApplyResult as i, SurveyAssistantItemTypeManifestEntry as in, SurveyAssistantThreadTitleMode as it, SurveyAssistantSuggestItemLabelInput as j, surveyAssistantOperationSchema as jt, SurveyAssistantSuggestItemKeyInput as k, surveyAssistantAddChoiceOptionOperationSchema as kt, SurveyAssistantBatchApplyResult as l, SurveyDocumentVersion as ln, surveyAssistantThreadSchema as lt, applyReceiptSchema as m, surveyAssistantSnapshotPayloadSchema as mn, SurveyAssistantOperation as mt, SURVEY_ASSISTANT_TURN_FINAL_DATA_NAME as n, SurveyAssistantItemCreateStrategy as nn, SurveyAssistantThread as nt, SurveyAssistantApplyPolicy as o, SurveyAssistantSnapshot as on, UpdateSurveyAssistantThreadInput as ot, SurveyChangeSet as p, surveyAssistantProtocolVersionSchema as pn, SURVEY_OPERATION_KINDS as pt, surveyAssistantSuggestedTextSchema as q, surveyValidationResultSchema as qt, SURVEY_ASSISTANT_TURN_FINAL_PART_TYPE as r, SurveyAssistantItemRegistryManifest as rn, SurveyAssistantThreadList as rt, SurveyAssistantApplyResult as s, SurveyAssistantSnapshotPayload as sn, createSurveyAssistantThreadInputSchema as st, ApplyReceipt as t, SurveyAssistantDraftChangePrecondition as tn, CreateSurveyAssistantThreadInput as tt, SurveyAssistantDraftChangeEvent as u, SurveyEditorUIContext as un, surveyAssistantThreadTranscriptSchema as ut, surveyAssistantDraftChangeEventSchema as v, surveyEditorUIContextSchema as vn, SurveyOperation as vt, surveyAssistantModelCatalogSchema as w, SurveyAssistantErrorInfo as wn, jsonPatchOperationSchema as wt, surveyChangeSetSchema as x, jsonValueSchema as xn, SurveyValidationResult as xt, surveyAssistantTurnFinalSchema as y, JsonValue$1 as yn, SurveyOperationKind as yt, SurveyAssistantTranslateContentInput as z, surveyAssistantUpdateItemLabelOperationSchema as zt };
|
|
1149
|
+
//# sourceMappingURL=index-TFtvBiSQ.d.mts.map
|