@coveo/thermidor-schema 1.0.0-beta.17 → 1.0.0-beta.19
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/dist/generated/schemas.d.ts +11 -0
- package/dist/generated/schemas.js +7 -1
- package/dist/generated/zod3/schemas.d.ts +107 -0
- package/dist/generated/zod3/schemas.js +7 -1
- package/package.json +1 -1
- package/schema/components/next-actions-bar.schema.json +5 -0
- package/schema/definitions/action-item.schema.json +5 -0
|
@@ -113,6 +113,7 @@ export declare const QueryCompletionSchema: z.ZodObject<{
|
|
|
113
113
|
}, z.core.$strict>;
|
|
114
114
|
export type QueryCompletion = z.infer<typeof QueryCompletionSchema>;
|
|
115
115
|
export declare const SelectActionPayloadSchema: z.ZodObject<{
|
|
116
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
116
117
|
text: z.ZodString;
|
|
117
118
|
type: z.ZodEnum<{
|
|
118
119
|
followup: "followup";
|
|
@@ -121,6 +122,7 @@ export declare const SelectActionPayloadSchema: z.ZodObject<{
|
|
|
121
122
|
}, z.core.$strict>;
|
|
122
123
|
export type SelectActionPayload = z.infer<typeof SelectActionPayloadSchema>;
|
|
123
124
|
export declare const ActionItemSchema: z.ZodObject<{
|
|
125
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
124
126
|
text: z.ZodString;
|
|
125
127
|
type: z.ZodEnum<{
|
|
126
128
|
followup: "followup";
|
|
@@ -536,6 +538,7 @@ export declare const QuerySuggestionsStateSchema: z.ZodObject<{
|
|
|
536
538
|
export type QuerySuggestionsState = z.infer<typeof QuerySuggestionsStateSchema>;
|
|
537
539
|
export declare const SelectActionSchema: z.ZodObject<{
|
|
538
540
|
payload: z.ZodObject<{
|
|
541
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
539
542
|
text: z.ZodString;
|
|
540
543
|
type: z.ZodEnum<{
|
|
541
544
|
followup: "followup";
|
|
@@ -546,6 +549,7 @@ export declare const SelectActionSchema: z.ZodObject<{
|
|
|
546
549
|
export type SelectAction = z.infer<typeof SelectActionSchema>;
|
|
547
550
|
export declare const NextActionsStateSchema: z.ZodObject<{
|
|
548
551
|
suggestedActions: z.ZodArray<z.ZodObject<{
|
|
552
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
549
553
|
text: z.ZodString;
|
|
550
554
|
type: z.ZodEnum<{
|
|
551
555
|
followup: "followup";
|
|
@@ -920,6 +924,7 @@ export type QuerySuggestionsActions = z.infer<typeof QuerySuggestionsActionsSche
|
|
|
920
924
|
export declare const NextActionsBarActionsSchema: z.ZodObject<{
|
|
921
925
|
selectAction: z.ZodObject<{
|
|
922
926
|
payload: z.ZodObject<{
|
|
927
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
923
928
|
text: z.ZodString;
|
|
924
929
|
type: z.ZodEnum<{
|
|
925
930
|
followup: "followup";
|
|
@@ -1291,6 +1296,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
1291
1296
|
actions: z.ZodOptional<z.ZodObject<{
|
|
1292
1297
|
selectAction: z.ZodObject<{
|
|
1293
1298
|
payload: z.ZodObject<{
|
|
1299
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
1294
1300
|
text: z.ZodString;
|
|
1295
1301
|
type: z.ZodEnum<{
|
|
1296
1302
|
followup: "followup";
|
|
@@ -1303,6 +1309,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
1303
1309
|
id: z.ZodString;
|
|
1304
1310
|
state: z.ZodOptional<z.ZodObject<{
|
|
1305
1311
|
suggestedActions: z.ZodArray<z.ZodObject<{
|
|
1312
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
1306
1313
|
text: z.ZodString;
|
|
1307
1314
|
type: z.ZodEnum<{
|
|
1308
1315
|
followup: "followup";
|
|
@@ -1906,6 +1913,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
1906
1913
|
actions: z.ZodOptional<z.ZodObject<{
|
|
1907
1914
|
selectAction: z.ZodObject<{
|
|
1908
1915
|
payload: z.ZodObject<{
|
|
1916
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
1909
1917
|
text: z.ZodString;
|
|
1910
1918
|
type: z.ZodEnum<{
|
|
1911
1919
|
followup: "followup";
|
|
@@ -1918,6 +1926,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
1918
1926
|
id: z.ZodString;
|
|
1919
1927
|
state: z.ZodOptional<z.ZodObject<{
|
|
1920
1928
|
suggestedActions: z.ZodArray<z.ZodObject<{
|
|
1929
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
1921
1930
|
text: z.ZodString;
|
|
1922
1931
|
type: z.ZodEnum<{
|
|
1923
1932
|
followup: "followup";
|
|
@@ -2879,6 +2888,7 @@ export declare const LayoutStackPropsSchema: z.ZodObject<{
|
|
|
2879
2888
|
}, z.core.$strip>;
|
|
2880
2889
|
export declare const NextActionsBarPropsSchema: z.ZodObject<{
|
|
2881
2890
|
suggestedActions: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
2891
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
2882
2892
|
text: z.ZodString;
|
|
2883
2893
|
type: z.ZodEnum<{
|
|
2884
2894
|
followup: "followup";
|
|
@@ -3771,6 +3781,7 @@ export declare const NextActionsBarActionSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
3771
3781
|
followup: "followup";
|
|
3772
3782
|
search: "search";
|
|
3773
3783
|
}>;
|
|
3784
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
3774
3785
|
}, z.core.$strict>;
|
|
3775
3786
|
}, z.core.$strip>;
|
|
3776
3787
|
}, z.core.$strip>]>;
|
|
@@ -76,10 +76,12 @@ export const QueryCompletionSchema = z.strictObject({
|
|
|
76
76
|
score: z.number().optional(),
|
|
77
77
|
});
|
|
78
78
|
export const SelectActionPayloadSchema = z.strictObject({
|
|
79
|
+
optionId: z.string().min(1).optional(),
|
|
79
80
|
text: z.string(),
|
|
80
81
|
type: z.enum(['followup', 'search']),
|
|
81
82
|
});
|
|
82
83
|
export const ActionItemSchema = z.strictObject({
|
|
84
|
+
optionId: z.string().min(1).optional(),
|
|
83
85
|
text: z.string(),
|
|
84
86
|
type: z.enum(['followup', 'search']),
|
|
85
87
|
});
|
|
@@ -957,7 +959,11 @@ export const NextActionsBarActionSchema = z.union([
|
|
|
957
959
|
z.object({
|
|
958
960
|
event: z.object({
|
|
959
961
|
name: z.literal('selectAction'),
|
|
960
|
-
context: z.strictObject({
|
|
962
|
+
context: z.strictObject({
|
|
963
|
+
text: z.string(),
|
|
964
|
+
type: z.enum(['followup', 'search']),
|
|
965
|
+
optionId: z.string().optional(),
|
|
966
|
+
}),
|
|
961
967
|
}),
|
|
962
968
|
}),
|
|
963
969
|
]);
|
|
@@ -263,23 +263,29 @@ export declare const QueryCompletionSchema: z.ZodObject<{
|
|
|
263
263
|
}>;
|
|
264
264
|
export type QueryCompletion = z.infer<typeof QueryCompletionSchema>;
|
|
265
265
|
export declare const SelectActionPayloadSchema: z.ZodObject<{
|
|
266
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
266
267
|
text: z.ZodString;
|
|
267
268
|
type: z.ZodEnum<["followup", "search"]>;
|
|
268
269
|
}, "strict", z.ZodTypeAny, {
|
|
270
|
+
optionId?: string | undefined;
|
|
269
271
|
text: string;
|
|
270
272
|
type: "followup" | "search";
|
|
271
273
|
}, {
|
|
274
|
+
optionId?: string | undefined;
|
|
272
275
|
text: string;
|
|
273
276
|
type: "followup" | "search";
|
|
274
277
|
}>;
|
|
275
278
|
export type SelectActionPayload = z.infer<typeof SelectActionPayloadSchema>;
|
|
276
279
|
export declare const ActionItemSchema: z.ZodObject<{
|
|
280
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
277
281
|
text: z.ZodString;
|
|
278
282
|
type: z.ZodEnum<["followup", "search"]>;
|
|
279
283
|
}, "strict", z.ZodTypeAny, {
|
|
284
|
+
optionId?: string | undefined;
|
|
280
285
|
text: string;
|
|
281
286
|
type: "followup" | "search";
|
|
282
287
|
}, {
|
|
288
|
+
optionId?: string | undefined;
|
|
283
289
|
text: string;
|
|
284
290
|
type: "followup" | "search";
|
|
285
291
|
}>;
|
|
@@ -1690,22 +1696,27 @@ export declare const QuerySuggestionsStateSchema: z.ZodObject<{
|
|
|
1690
1696
|
export type QuerySuggestionsState = z.infer<typeof QuerySuggestionsStateSchema>;
|
|
1691
1697
|
export declare const SelectActionSchema: z.ZodObject<{
|
|
1692
1698
|
payload: z.ZodObject<{
|
|
1699
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
1693
1700
|
text: z.ZodString;
|
|
1694
1701
|
type: z.ZodEnum<["followup", "search"]>;
|
|
1695
1702
|
}, "strict", z.ZodTypeAny, {
|
|
1703
|
+
optionId?: string | undefined;
|
|
1696
1704
|
text: string;
|
|
1697
1705
|
type: "followup" | "search";
|
|
1698
1706
|
}, {
|
|
1707
|
+
optionId?: string | undefined;
|
|
1699
1708
|
text: string;
|
|
1700
1709
|
type: "followup" | "search";
|
|
1701
1710
|
}>;
|
|
1702
1711
|
}, "strict", z.ZodTypeAny, {
|
|
1703
1712
|
payload: {
|
|
1713
|
+
optionId?: string | undefined;
|
|
1704
1714
|
text: string;
|
|
1705
1715
|
type: "followup" | "search";
|
|
1706
1716
|
};
|
|
1707
1717
|
}, {
|
|
1708
1718
|
payload: {
|
|
1719
|
+
optionId?: string | undefined;
|
|
1709
1720
|
text: string;
|
|
1710
1721
|
type: "followup" | "search";
|
|
1711
1722
|
};
|
|
@@ -1713,22 +1724,27 @@ export declare const SelectActionSchema: z.ZodObject<{
|
|
|
1713
1724
|
export type SelectAction = z.infer<typeof SelectActionSchema>;
|
|
1714
1725
|
export declare const NextActionsStateSchema: z.ZodObject<{
|
|
1715
1726
|
suggestedActions: z.ZodArray<z.ZodObject<{
|
|
1727
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
1716
1728
|
text: z.ZodString;
|
|
1717
1729
|
type: z.ZodEnum<["followup", "search"]>;
|
|
1718
1730
|
}, "strict", z.ZodTypeAny, {
|
|
1731
|
+
optionId?: string | undefined;
|
|
1719
1732
|
text: string;
|
|
1720
1733
|
type: "followup" | "search";
|
|
1721
1734
|
}, {
|
|
1735
|
+
optionId?: string | undefined;
|
|
1722
1736
|
text: string;
|
|
1723
1737
|
type: "followup" | "search";
|
|
1724
1738
|
}>, "many">;
|
|
1725
1739
|
}, "strict", z.ZodTypeAny, {
|
|
1726
1740
|
suggestedActions: {
|
|
1741
|
+
optionId?: string | undefined;
|
|
1727
1742
|
text: string;
|
|
1728
1743
|
type: "followup" | "search";
|
|
1729
1744
|
}[];
|
|
1730
1745
|
}, {
|
|
1731
1746
|
suggestedActions: {
|
|
1747
|
+
optionId?: string | undefined;
|
|
1732
1748
|
text: string;
|
|
1733
1749
|
type: "followup" | "search";
|
|
1734
1750
|
}[];
|
|
@@ -3444,22 +3460,27 @@ export type QuerySuggestionsActions = z.infer<typeof QuerySuggestionsActionsSche
|
|
|
3444
3460
|
export declare const NextActionsBarActionsSchema: z.ZodObject<{
|
|
3445
3461
|
selectAction: z.ZodObject<{
|
|
3446
3462
|
payload: z.ZodObject<{
|
|
3463
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
3447
3464
|
text: z.ZodString;
|
|
3448
3465
|
type: z.ZodEnum<["followup", "search"]>;
|
|
3449
3466
|
}, "strict", z.ZodTypeAny, {
|
|
3467
|
+
optionId?: string | undefined;
|
|
3450
3468
|
text: string;
|
|
3451
3469
|
type: "followup" | "search";
|
|
3452
3470
|
}, {
|
|
3471
|
+
optionId?: string | undefined;
|
|
3453
3472
|
text: string;
|
|
3454
3473
|
type: "followup" | "search";
|
|
3455
3474
|
}>;
|
|
3456
3475
|
}, "strict", z.ZodTypeAny, {
|
|
3457
3476
|
payload: {
|
|
3477
|
+
optionId?: string | undefined;
|
|
3458
3478
|
text: string;
|
|
3459
3479
|
type: "followup" | "search";
|
|
3460
3480
|
};
|
|
3461
3481
|
}, {
|
|
3462
3482
|
payload: {
|
|
3483
|
+
optionId?: string | undefined;
|
|
3463
3484
|
text: string;
|
|
3464
3485
|
type: "followup" | "search";
|
|
3465
3486
|
};
|
|
@@ -3467,6 +3488,7 @@ export declare const NextActionsBarActionsSchema: z.ZodObject<{
|
|
|
3467
3488
|
}, "strict", z.ZodTypeAny, {
|
|
3468
3489
|
selectAction: {
|
|
3469
3490
|
payload: {
|
|
3491
|
+
optionId?: string | undefined;
|
|
3470
3492
|
text: string;
|
|
3471
3493
|
type: "followup" | "search";
|
|
3472
3494
|
};
|
|
@@ -3474,6 +3496,7 @@ export declare const NextActionsBarActionsSchema: z.ZodObject<{
|
|
|
3474
3496
|
}, {
|
|
3475
3497
|
selectAction: {
|
|
3476
3498
|
payload: {
|
|
3499
|
+
optionId?: string | undefined;
|
|
3477
3500
|
text: string;
|
|
3478
3501
|
type: "followup" | "search";
|
|
3479
3502
|
};
|
|
@@ -5566,22 +5589,27 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5566
5589
|
actions: z.ZodOptional<z.ZodObject<{
|
|
5567
5590
|
selectAction: z.ZodObject<{
|
|
5568
5591
|
payload: z.ZodObject<{
|
|
5592
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
5569
5593
|
text: z.ZodString;
|
|
5570
5594
|
type: z.ZodEnum<["followup", "search"]>;
|
|
5571
5595
|
}, "strict", z.ZodTypeAny, {
|
|
5596
|
+
optionId?: string | undefined;
|
|
5572
5597
|
text: string;
|
|
5573
5598
|
type: "followup" | "search";
|
|
5574
5599
|
}, {
|
|
5600
|
+
optionId?: string | undefined;
|
|
5575
5601
|
text: string;
|
|
5576
5602
|
type: "followup" | "search";
|
|
5577
5603
|
}>;
|
|
5578
5604
|
}, "strict", z.ZodTypeAny, {
|
|
5579
5605
|
payload: {
|
|
5606
|
+
optionId?: string | undefined;
|
|
5580
5607
|
text: string;
|
|
5581
5608
|
type: "followup" | "search";
|
|
5582
5609
|
};
|
|
5583
5610
|
}, {
|
|
5584
5611
|
payload: {
|
|
5612
|
+
optionId?: string | undefined;
|
|
5585
5613
|
text: string;
|
|
5586
5614
|
type: "followup" | "search";
|
|
5587
5615
|
};
|
|
@@ -5589,6 +5617,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5589
5617
|
}, "strict", z.ZodTypeAny, {
|
|
5590
5618
|
selectAction: {
|
|
5591
5619
|
payload: {
|
|
5620
|
+
optionId?: string | undefined;
|
|
5592
5621
|
text: string;
|
|
5593
5622
|
type: "followup" | "search";
|
|
5594
5623
|
};
|
|
@@ -5596,6 +5625,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5596
5625
|
}, {
|
|
5597
5626
|
selectAction: {
|
|
5598
5627
|
payload: {
|
|
5628
|
+
optionId?: string | undefined;
|
|
5599
5629
|
text: string;
|
|
5600
5630
|
type: "followup" | "search";
|
|
5601
5631
|
};
|
|
@@ -5605,22 +5635,27 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5605
5635
|
id: z.ZodString;
|
|
5606
5636
|
state: z.ZodOptional<z.ZodObject<{
|
|
5607
5637
|
suggestedActions: z.ZodArray<z.ZodObject<{
|
|
5638
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
5608
5639
|
text: z.ZodString;
|
|
5609
5640
|
type: z.ZodEnum<["followup", "search"]>;
|
|
5610
5641
|
}, "strict", z.ZodTypeAny, {
|
|
5642
|
+
optionId?: string | undefined;
|
|
5611
5643
|
text: string;
|
|
5612
5644
|
type: "followup" | "search";
|
|
5613
5645
|
}, {
|
|
5646
|
+
optionId?: string | undefined;
|
|
5614
5647
|
text: string;
|
|
5615
5648
|
type: "followup" | "search";
|
|
5616
5649
|
}>, "many">;
|
|
5617
5650
|
}, "strict", z.ZodTypeAny, {
|
|
5618
5651
|
suggestedActions: {
|
|
5652
|
+
optionId?: string | undefined;
|
|
5619
5653
|
text: string;
|
|
5620
5654
|
type: "followup" | "search";
|
|
5621
5655
|
}[];
|
|
5622
5656
|
}, {
|
|
5623
5657
|
suggestedActions: {
|
|
5658
|
+
optionId?: string | undefined;
|
|
5624
5659
|
text: string;
|
|
5625
5660
|
type: "followup" | "search";
|
|
5626
5661
|
}[];
|
|
@@ -5629,22 +5664,27 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5629
5664
|
actions: z.ZodOptional<z.ZodObject<{
|
|
5630
5665
|
selectAction: z.ZodObject<{
|
|
5631
5666
|
payload: z.ZodObject<{
|
|
5667
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
5632
5668
|
text: z.ZodString;
|
|
5633
5669
|
type: z.ZodEnum<["followup", "search"]>;
|
|
5634
5670
|
}, "strict", z.ZodTypeAny, {
|
|
5671
|
+
optionId?: string | undefined;
|
|
5635
5672
|
text: string;
|
|
5636
5673
|
type: "followup" | "search";
|
|
5637
5674
|
}, {
|
|
5675
|
+
optionId?: string | undefined;
|
|
5638
5676
|
text: string;
|
|
5639
5677
|
type: "followup" | "search";
|
|
5640
5678
|
}>;
|
|
5641
5679
|
}, "strict", z.ZodTypeAny, {
|
|
5642
5680
|
payload: {
|
|
5681
|
+
optionId?: string | undefined;
|
|
5643
5682
|
text: string;
|
|
5644
5683
|
type: "followup" | "search";
|
|
5645
5684
|
};
|
|
5646
5685
|
}, {
|
|
5647
5686
|
payload: {
|
|
5687
|
+
optionId?: string | undefined;
|
|
5648
5688
|
text: string;
|
|
5649
5689
|
type: "followup" | "search";
|
|
5650
5690
|
};
|
|
@@ -5652,6 +5692,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5652
5692
|
}, "strict", z.ZodTypeAny, {
|
|
5653
5693
|
selectAction: {
|
|
5654
5694
|
payload: {
|
|
5695
|
+
optionId?: string | undefined;
|
|
5655
5696
|
text: string;
|
|
5656
5697
|
type: "followup" | "search";
|
|
5657
5698
|
};
|
|
@@ -5659,6 +5700,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5659
5700
|
}, {
|
|
5660
5701
|
selectAction: {
|
|
5661
5702
|
payload: {
|
|
5703
|
+
optionId?: string | undefined;
|
|
5662
5704
|
text: string;
|
|
5663
5705
|
type: "followup" | "search";
|
|
5664
5706
|
};
|
|
@@ -5668,22 +5710,27 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5668
5710
|
id: z.ZodString;
|
|
5669
5711
|
state: z.ZodOptional<z.ZodObject<{
|
|
5670
5712
|
suggestedActions: z.ZodArray<z.ZodObject<{
|
|
5713
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
5671
5714
|
text: z.ZodString;
|
|
5672
5715
|
type: z.ZodEnum<["followup", "search"]>;
|
|
5673
5716
|
}, "strict", z.ZodTypeAny, {
|
|
5717
|
+
optionId?: string | undefined;
|
|
5674
5718
|
text: string;
|
|
5675
5719
|
type: "followup" | "search";
|
|
5676
5720
|
}, {
|
|
5721
|
+
optionId?: string | undefined;
|
|
5677
5722
|
text: string;
|
|
5678
5723
|
type: "followup" | "search";
|
|
5679
5724
|
}>, "many">;
|
|
5680
5725
|
}, "strict", z.ZodTypeAny, {
|
|
5681
5726
|
suggestedActions: {
|
|
5727
|
+
optionId?: string | undefined;
|
|
5682
5728
|
text: string;
|
|
5683
5729
|
type: "followup" | "search";
|
|
5684
5730
|
}[];
|
|
5685
5731
|
}, {
|
|
5686
5732
|
suggestedActions: {
|
|
5733
|
+
optionId?: string | undefined;
|
|
5687
5734
|
text: string;
|
|
5688
5735
|
type: "followup" | "search";
|
|
5689
5736
|
}[];
|
|
@@ -5692,22 +5739,27 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5692
5739
|
actions: z.ZodOptional<z.ZodObject<{
|
|
5693
5740
|
selectAction: z.ZodObject<{
|
|
5694
5741
|
payload: z.ZodObject<{
|
|
5742
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
5695
5743
|
text: z.ZodString;
|
|
5696
5744
|
type: z.ZodEnum<["followup", "search"]>;
|
|
5697
5745
|
}, "strict", z.ZodTypeAny, {
|
|
5746
|
+
optionId?: string | undefined;
|
|
5698
5747
|
text: string;
|
|
5699
5748
|
type: "followup" | "search";
|
|
5700
5749
|
}, {
|
|
5750
|
+
optionId?: string | undefined;
|
|
5701
5751
|
text: string;
|
|
5702
5752
|
type: "followup" | "search";
|
|
5703
5753
|
}>;
|
|
5704
5754
|
}, "strict", z.ZodTypeAny, {
|
|
5705
5755
|
payload: {
|
|
5756
|
+
optionId?: string | undefined;
|
|
5706
5757
|
text: string;
|
|
5707
5758
|
type: "followup" | "search";
|
|
5708
5759
|
};
|
|
5709
5760
|
}, {
|
|
5710
5761
|
payload: {
|
|
5762
|
+
optionId?: string | undefined;
|
|
5711
5763
|
text: string;
|
|
5712
5764
|
type: "followup" | "search";
|
|
5713
5765
|
};
|
|
@@ -5715,6 +5767,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5715
5767
|
}, "strict", z.ZodTypeAny, {
|
|
5716
5768
|
selectAction: {
|
|
5717
5769
|
payload: {
|
|
5770
|
+
optionId?: string | undefined;
|
|
5718
5771
|
text: string;
|
|
5719
5772
|
type: "followup" | "search";
|
|
5720
5773
|
};
|
|
@@ -5722,6 +5775,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5722
5775
|
}, {
|
|
5723
5776
|
selectAction: {
|
|
5724
5777
|
payload: {
|
|
5778
|
+
optionId?: string | undefined;
|
|
5725
5779
|
text: string;
|
|
5726
5780
|
type: "followup" | "search";
|
|
5727
5781
|
};
|
|
@@ -5731,22 +5785,27 @@ export declare const NextActionsBarSchema: z.ZodObject<{
|
|
|
5731
5785
|
id: z.ZodString;
|
|
5732
5786
|
state: z.ZodOptional<z.ZodObject<{
|
|
5733
5787
|
suggestedActions: z.ZodArray<z.ZodObject<{
|
|
5788
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
5734
5789
|
text: z.ZodString;
|
|
5735
5790
|
type: z.ZodEnum<["followup", "search"]>;
|
|
5736
5791
|
}, "strict", z.ZodTypeAny, {
|
|
5792
|
+
optionId?: string | undefined;
|
|
5737
5793
|
text: string;
|
|
5738
5794
|
type: "followup" | "search";
|
|
5739
5795
|
}, {
|
|
5796
|
+
optionId?: string | undefined;
|
|
5740
5797
|
text: string;
|
|
5741
5798
|
type: "followup" | "search";
|
|
5742
5799
|
}>, "many">;
|
|
5743
5800
|
}, "strict", z.ZodTypeAny, {
|
|
5744
5801
|
suggestedActions: {
|
|
5802
|
+
optionId?: string | undefined;
|
|
5745
5803
|
text: string;
|
|
5746
5804
|
type: "followup" | "search";
|
|
5747
5805
|
}[];
|
|
5748
5806
|
}, {
|
|
5749
5807
|
suggestedActions: {
|
|
5808
|
+
optionId?: string | undefined;
|
|
5750
5809
|
text: string;
|
|
5751
5810
|
type: "followup" | "search";
|
|
5752
5811
|
}[];
|
|
@@ -13011,22 +13070,27 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13011
13070
|
actions: z.ZodOptional<z.ZodObject<{
|
|
13012
13071
|
selectAction: z.ZodObject<{
|
|
13013
13072
|
payload: z.ZodObject<{
|
|
13073
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
13014
13074
|
text: z.ZodString;
|
|
13015
13075
|
type: z.ZodEnum<["followup", "search"]>;
|
|
13016
13076
|
}, "strict", z.ZodTypeAny, {
|
|
13077
|
+
optionId?: string | undefined;
|
|
13017
13078
|
text: string;
|
|
13018
13079
|
type: "followup" | "search";
|
|
13019
13080
|
}, {
|
|
13081
|
+
optionId?: string | undefined;
|
|
13020
13082
|
text: string;
|
|
13021
13083
|
type: "followup" | "search";
|
|
13022
13084
|
}>;
|
|
13023
13085
|
}, "strict", z.ZodTypeAny, {
|
|
13024
13086
|
payload: {
|
|
13087
|
+
optionId?: string | undefined;
|
|
13025
13088
|
text: string;
|
|
13026
13089
|
type: "followup" | "search";
|
|
13027
13090
|
};
|
|
13028
13091
|
}, {
|
|
13029
13092
|
payload: {
|
|
13093
|
+
optionId?: string | undefined;
|
|
13030
13094
|
text: string;
|
|
13031
13095
|
type: "followup" | "search";
|
|
13032
13096
|
};
|
|
@@ -13034,6 +13098,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13034
13098
|
}, "strict", z.ZodTypeAny, {
|
|
13035
13099
|
selectAction: {
|
|
13036
13100
|
payload: {
|
|
13101
|
+
optionId?: string | undefined;
|
|
13037
13102
|
text: string;
|
|
13038
13103
|
type: "followup" | "search";
|
|
13039
13104
|
};
|
|
@@ -13041,6 +13106,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13041
13106
|
}, {
|
|
13042
13107
|
selectAction: {
|
|
13043
13108
|
payload: {
|
|
13109
|
+
optionId?: string | undefined;
|
|
13044
13110
|
text: string;
|
|
13045
13111
|
type: "followup" | "search";
|
|
13046
13112
|
};
|
|
@@ -13050,22 +13116,27 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13050
13116
|
id: z.ZodString;
|
|
13051
13117
|
state: z.ZodOptional<z.ZodObject<{
|
|
13052
13118
|
suggestedActions: z.ZodArray<z.ZodObject<{
|
|
13119
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
13053
13120
|
text: z.ZodString;
|
|
13054
13121
|
type: z.ZodEnum<["followup", "search"]>;
|
|
13055
13122
|
}, "strict", z.ZodTypeAny, {
|
|
13123
|
+
optionId?: string | undefined;
|
|
13056
13124
|
text: string;
|
|
13057
13125
|
type: "followup" | "search";
|
|
13058
13126
|
}, {
|
|
13127
|
+
optionId?: string | undefined;
|
|
13059
13128
|
text: string;
|
|
13060
13129
|
type: "followup" | "search";
|
|
13061
13130
|
}>, "many">;
|
|
13062
13131
|
}, "strict", z.ZodTypeAny, {
|
|
13063
13132
|
suggestedActions: {
|
|
13133
|
+
optionId?: string | undefined;
|
|
13064
13134
|
text: string;
|
|
13065
13135
|
type: "followup" | "search";
|
|
13066
13136
|
}[];
|
|
13067
13137
|
}, {
|
|
13068
13138
|
suggestedActions: {
|
|
13139
|
+
optionId?: string | undefined;
|
|
13069
13140
|
text: string;
|
|
13070
13141
|
type: "followup" | "search";
|
|
13071
13142
|
}[];
|
|
@@ -13074,22 +13145,27 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13074
13145
|
actions: z.ZodOptional<z.ZodObject<{
|
|
13075
13146
|
selectAction: z.ZodObject<{
|
|
13076
13147
|
payload: z.ZodObject<{
|
|
13148
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
13077
13149
|
text: z.ZodString;
|
|
13078
13150
|
type: z.ZodEnum<["followup", "search"]>;
|
|
13079
13151
|
}, "strict", z.ZodTypeAny, {
|
|
13152
|
+
optionId?: string | undefined;
|
|
13080
13153
|
text: string;
|
|
13081
13154
|
type: "followup" | "search";
|
|
13082
13155
|
}, {
|
|
13156
|
+
optionId?: string | undefined;
|
|
13083
13157
|
text: string;
|
|
13084
13158
|
type: "followup" | "search";
|
|
13085
13159
|
}>;
|
|
13086
13160
|
}, "strict", z.ZodTypeAny, {
|
|
13087
13161
|
payload: {
|
|
13162
|
+
optionId?: string | undefined;
|
|
13088
13163
|
text: string;
|
|
13089
13164
|
type: "followup" | "search";
|
|
13090
13165
|
};
|
|
13091
13166
|
}, {
|
|
13092
13167
|
payload: {
|
|
13168
|
+
optionId?: string | undefined;
|
|
13093
13169
|
text: string;
|
|
13094
13170
|
type: "followup" | "search";
|
|
13095
13171
|
};
|
|
@@ -13097,6 +13173,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13097
13173
|
}, "strict", z.ZodTypeAny, {
|
|
13098
13174
|
selectAction: {
|
|
13099
13175
|
payload: {
|
|
13176
|
+
optionId?: string | undefined;
|
|
13100
13177
|
text: string;
|
|
13101
13178
|
type: "followup" | "search";
|
|
13102
13179
|
};
|
|
@@ -13104,6 +13181,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13104
13181
|
}, {
|
|
13105
13182
|
selectAction: {
|
|
13106
13183
|
payload: {
|
|
13184
|
+
optionId?: string | undefined;
|
|
13107
13185
|
text: string;
|
|
13108
13186
|
type: "followup" | "search";
|
|
13109
13187
|
};
|
|
@@ -13113,22 +13191,27 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13113
13191
|
id: z.ZodString;
|
|
13114
13192
|
state: z.ZodOptional<z.ZodObject<{
|
|
13115
13193
|
suggestedActions: z.ZodArray<z.ZodObject<{
|
|
13194
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
13116
13195
|
text: z.ZodString;
|
|
13117
13196
|
type: z.ZodEnum<["followup", "search"]>;
|
|
13118
13197
|
}, "strict", z.ZodTypeAny, {
|
|
13198
|
+
optionId?: string | undefined;
|
|
13119
13199
|
text: string;
|
|
13120
13200
|
type: "followup" | "search";
|
|
13121
13201
|
}, {
|
|
13202
|
+
optionId?: string | undefined;
|
|
13122
13203
|
text: string;
|
|
13123
13204
|
type: "followup" | "search";
|
|
13124
13205
|
}>, "many">;
|
|
13125
13206
|
}, "strict", z.ZodTypeAny, {
|
|
13126
13207
|
suggestedActions: {
|
|
13208
|
+
optionId?: string | undefined;
|
|
13127
13209
|
text: string;
|
|
13128
13210
|
type: "followup" | "search";
|
|
13129
13211
|
}[];
|
|
13130
13212
|
}, {
|
|
13131
13213
|
suggestedActions: {
|
|
13214
|
+
optionId?: string | undefined;
|
|
13132
13215
|
text: string;
|
|
13133
13216
|
type: "followup" | "search";
|
|
13134
13217
|
}[];
|
|
@@ -13137,22 +13220,27 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13137
13220
|
actions: z.ZodOptional<z.ZodObject<{
|
|
13138
13221
|
selectAction: z.ZodObject<{
|
|
13139
13222
|
payload: z.ZodObject<{
|
|
13223
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
13140
13224
|
text: z.ZodString;
|
|
13141
13225
|
type: z.ZodEnum<["followup", "search"]>;
|
|
13142
13226
|
}, "strict", z.ZodTypeAny, {
|
|
13227
|
+
optionId?: string | undefined;
|
|
13143
13228
|
text: string;
|
|
13144
13229
|
type: "followup" | "search";
|
|
13145
13230
|
}, {
|
|
13231
|
+
optionId?: string | undefined;
|
|
13146
13232
|
text: string;
|
|
13147
13233
|
type: "followup" | "search";
|
|
13148
13234
|
}>;
|
|
13149
13235
|
}, "strict", z.ZodTypeAny, {
|
|
13150
13236
|
payload: {
|
|
13237
|
+
optionId?: string | undefined;
|
|
13151
13238
|
text: string;
|
|
13152
13239
|
type: "followup" | "search";
|
|
13153
13240
|
};
|
|
13154
13241
|
}, {
|
|
13155
13242
|
payload: {
|
|
13243
|
+
optionId?: string | undefined;
|
|
13156
13244
|
text: string;
|
|
13157
13245
|
type: "followup" | "search";
|
|
13158
13246
|
};
|
|
@@ -13160,6 +13248,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13160
13248
|
}, "strict", z.ZodTypeAny, {
|
|
13161
13249
|
selectAction: {
|
|
13162
13250
|
payload: {
|
|
13251
|
+
optionId?: string | undefined;
|
|
13163
13252
|
text: string;
|
|
13164
13253
|
type: "followup" | "search";
|
|
13165
13254
|
};
|
|
@@ -13167,6 +13256,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13167
13256
|
}, {
|
|
13168
13257
|
selectAction: {
|
|
13169
13258
|
payload: {
|
|
13259
|
+
optionId?: string | undefined;
|
|
13170
13260
|
text: string;
|
|
13171
13261
|
type: "followup" | "search";
|
|
13172
13262
|
};
|
|
@@ -13176,22 +13266,27 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
|
|
|
13176
13266
|
id: z.ZodString;
|
|
13177
13267
|
state: z.ZodOptional<z.ZodObject<{
|
|
13178
13268
|
suggestedActions: z.ZodArray<z.ZodObject<{
|
|
13269
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
13179
13270
|
text: z.ZodString;
|
|
13180
13271
|
type: z.ZodEnum<["followup", "search"]>;
|
|
13181
13272
|
}, "strict", z.ZodTypeAny, {
|
|
13273
|
+
optionId?: string | undefined;
|
|
13182
13274
|
text: string;
|
|
13183
13275
|
type: "followup" | "search";
|
|
13184
13276
|
}, {
|
|
13277
|
+
optionId?: string | undefined;
|
|
13185
13278
|
text: string;
|
|
13186
13279
|
type: "followup" | "search";
|
|
13187
13280
|
}>, "many">;
|
|
13188
13281
|
}, "strict", z.ZodTypeAny, {
|
|
13189
13282
|
suggestedActions: {
|
|
13283
|
+
optionId?: string | undefined;
|
|
13190
13284
|
text: string;
|
|
13191
13285
|
type: "followup" | "search";
|
|
13192
13286
|
}[];
|
|
13193
13287
|
}, {
|
|
13194
13288
|
suggestedActions: {
|
|
13289
|
+
optionId?: string | undefined;
|
|
13195
13290
|
text: string;
|
|
13196
13291
|
type: "followup" | "search";
|
|
13197
13292
|
}[];
|
|
@@ -20365,12 +20460,15 @@ export declare const LayoutStackPropsSchema: z.ZodObject<{
|
|
|
20365
20460
|
}>;
|
|
20366
20461
|
export declare const NextActionsBarPropsSchema: z.ZodObject<{
|
|
20367
20462
|
suggestedActions: z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
20463
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
20368
20464
|
text: z.ZodString;
|
|
20369
20465
|
type: z.ZodEnum<["followup", "search"]>;
|
|
20370
20466
|
}, "strict", z.ZodTypeAny, {
|
|
20467
|
+
optionId?: string | undefined;
|
|
20371
20468
|
text: string;
|
|
20372
20469
|
type: "followup" | "search";
|
|
20373
20470
|
}, {
|
|
20471
|
+
optionId?: string | undefined;
|
|
20374
20472
|
text: string;
|
|
20375
20473
|
type: "followup" | "search";
|
|
20376
20474
|
}>, "many">, z.ZodObject<{
|
|
@@ -20394,6 +20492,7 @@ export declare const NextActionsBarPropsSchema: z.ZodObject<{
|
|
|
20394
20492
|
}>]>;
|
|
20395
20493
|
}, "strip", z.ZodTypeAny, {
|
|
20396
20494
|
suggestedActions: {
|
|
20495
|
+
optionId?: string | undefined;
|
|
20397
20496
|
text: string;
|
|
20398
20497
|
type: "followup" | "search";
|
|
20399
20498
|
}[] | {
|
|
@@ -20405,6 +20504,7 @@ export declare const NextActionsBarPropsSchema: z.ZodObject<{
|
|
|
20405
20504
|
};
|
|
20406
20505
|
}, {
|
|
20407
20506
|
suggestedActions: {
|
|
20507
|
+
optionId?: string | undefined;
|
|
20408
20508
|
text: string;
|
|
20409
20509
|
type: "followup" | "search";
|
|
20410
20510
|
}[] | {
|
|
@@ -22960,24 +23060,29 @@ export declare const NextActionsBarActionSchema: z.ZodObject<{
|
|
|
22960
23060
|
context: z.ZodObject<{
|
|
22961
23061
|
text: z.ZodString;
|
|
22962
23062
|
type: z.ZodEnum<["followup", "search"]>;
|
|
23063
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
22963
23064
|
}, "strict", z.ZodTypeAny, {
|
|
22964
23065
|
text: string;
|
|
22965
23066
|
type: "followup" | "search";
|
|
23067
|
+
optionId?: string | undefined;
|
|
22966
23068
|
}, {
|
|
22967
23069
|
text: string;
|
|
22968
23070
|
type: "followup" | "search";
|
|
23071
|
+
optionId?: string | undefined;
|
|
22969
23072
|
}>;
|
|
22970
23073
|
}, "strip", z.ZodTypeAny, {
|
|
22971
23074
|
name: "selectAction";
|
|
22972
23075
|
context: {
|
|
22973
23076
|
text: string;
|
|
22974
23077
|
type: "followup" | "search";
|
|
23078
|
+
optionId?: string | undefined;
|
|
22975
23079
|
};
|
|
22976
23080
|
}, {
|
|
22977
23081
|
name: "selectAction";
|
|
22978
23082
|
context: {
|
|
22979
23083
|
text: string;
|
|
22980
23084
|
type: "followup" | "search";
|
|
23085
|
+
optionId?: string | undefined;
|
|
22981
23086
|
};
|
|
22982
23087
|
}>;
|
|
22983
23088
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -22986,6 +23091,7 @@ export declare const NextActionsBarActionSchema: z.ZodObject<{
|
|
|
22986
23091
|
context: {
|
|
22987
23092
|
text: string;
|
|
22988
23093
|
type: "followup" | "search";
|
|
23094
|
+
optionId?: string | undefined;
|
|
22989
23095
|
};
|
|
22990
23096
|
};
|
|
22991
23097
|
}, {
|
|
@@ -22994,6 +23100,7 @@ export declare const NextActionsBarActionSchema: z.ZodObject<{
|
|
|
22994
23100
|
context: {
|
|
22995
23101
|
text: string;
|
|
22996
23102
|
type: "followup" | "search";
|
|
23103
|
+
optionId?: string | undefined;
|
|
22997
23104
|
};
|
|
22998
23105
|
};
|
|
22999
23106
|
}>;
|
|
@@ -78,10 +78,12 @@ export const QueryCompletionSchema = z.strictObject({
|
|
|
78
78
|
score: z.number().optional(),
|
|
79
79
|
});
|
|
80
80
|
export const SelectActionPayloadSchema = z.strictObject({
|
|
81
|
+
optionId: z.string().min(1).optional(),
|
|
81
82
|
text: z.string(),
|
|
82
83
|
type: z.enum(['followup', 'search']),
|
|
83
84
|
});
|
|
84
85
|
export const ActionItemSchema = z.strictObject({
|
|
86
|
+
optionId: z.string().min(1).optional(),
|
|
85
87
|
text: z.string(),
|
|
86
88
|
type: z.enum(['followup', 'search']),
|
|
87
89
|
});
|
|
@@ -959,7 +961,11 @@ export const NextActionsBarActionSchema = z.union([
|
|
|
959
961
|
z.object({
|
|
960
962
|
event: z.object({
|
|
961
963
|
name: z.literal('selectAction'),
|
|
962
|
-
context: z.strictObject({
|
|
964
|
+
context: z.strictObject({
|
|
965
|
+
text: z.string(),
|
|
966
|
+
type: z.enum(['followup', 'search']),
|
|
967
|
+
optionId: z.string().optional(),
|
|
968
|
+
}),
|
|
963
969
|
}),
|
|
964
970
|
}),
|
|
965
971
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveo/thermidor-schema",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.19",
|
|
4
4
|
"description": "Zod and TypeScript projections of the Thermidor JSON Schema contract.",
|
|
5
5
|
"homepage": "https://github.com/coveo-platform/thermidor-schema#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -75,6 +75,11 @@
|
|
|
75
75
|
"type": "string",
|
|
76
76
|
"enum": ["followup", "search"],
|
|
77
77
|
"description": "The kind of action selected: \"followup\" or \"search\"."
|
|
78
|
+
},
|
|
79
|
+
"optionId": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"minLength": 1,
|
|
82
|
+
"description": "The optionId of the selected action, echoed unchanged. Present when the selected action carried one."
|
|
78
83
|
}
|
|
79
84
|
},
|
|
80
85
|
"additionalProperties": false
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"type": "string",
|
|
15
15
|
"enum": ["followup", "search"],
|
|
16
16
|
"description": "The kind of action: \"followup\" triggers a conversational follow-up, \"search\" triggers a standalone search."
|
|
17
|
+
},
|
|
18
|
+
"optionId": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"description": "Opaque identifier of the search the backend saved behind a \"search\" action. Set only by the backend, from the search the agent sent; the frontend sends it back unchanged in the selectAction payload so the backend can run that search."
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
24
|
"additionalProperties": false
|