@coveo/thermidor-schema 1.0.0-beta.32 → 1.0.0-beta.33

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.
@@ -237,6 +237,7 @@ export declare const SelectActionPayloadSchema: z.ZodObject<{
237
237
  export type SelectActionPayload = z.infer<typeof SelectActionPayloadSchema>;
238
238
  export declare const SelectSearchOptionPayloadSchema: z.ZodObject<{
239
239
  optionId: z.ZodString;
240
+ text: z.ZodString;
240
241
  }, z.core.$strict>;
241
242
  export type SelectSearchOptionPayload = z.infer<typeof SelectSearchOptionPayloadSchema>;
242
243
  export declare const ActionItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -752,6 +753,7 @@ export type SelectAction = z.infer<typeof SelectActionSchema>;
752
753
  export declare const SelectSearchOptionSchema: z.ZodObject<{
753
754
  payload: z.ZodObject<{
754
755
  optionId: z.ZodString;
756
+ text: z.ZodString;
755
757
  }, z.core.$strict>;
756
758
  }, z.core.$strict>;
757
759
  export type SelectSearchOption = z.infer<typeof SelectSearchOptionSchema>;
@@ -1234,6 +1236,7 @@ export declare const NextActionsBarActionsSchema: z.ZodObject<{
1234
1236
  selectSearchOption: z.ZodObject<{
1235
1237
  payload: z.ZodObject<{
1236
1238
  optionId: z.ZodString;
1239
+ text: z.ZodString;
1237
1240
  }, z.core.$strict>;
1238
1241
  }, z.core.$strict>;
1239
1242
  }, z.core.$strict>;
@@ -1715,6 +1718,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
1715
1718
  selectSearchOption: z.ZodObject<{
1716
1719
  payload: z.ZodObject<{
1717
1720
  optionId: z.ZodString;
1721
+ text: z.ZodString;
1718
1722
  }, z.core.$strict>;
1719
1723
  }, z.core.$strict>;
1720
1724
  }, z.core.$strict>>;
@@ -2424,6 +2428,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<[z.ZodObj
2424
2428
  selectSearchOption: z.ZodObject<{
2425
2429
  payload: z.ZodObject<{
2426
2430
  optionId: z.ZodString;
2431
+ text: z.ZodString;
2427
2432
  }, z.core.$strict>;
2428
2433
  }, z.core.$strict>;
2429
2434
  }, z.core.$strict>>;
@@ -4548,6 +4553,7 @@ export declare const NextActionsBarActionSchema: z.ZodUnion<readonly [z.ZodObjec
4548
4553
  name: z.ZodLiteral<"selectSearchOption">;
4549
4554
  context: z.ZodObject<{
4550
4555
  optionId: z.ZodString;
4556
+ text: z.ZodString;
4551
4557
  }, z.core.$strict>;
4552
4558
  }, z.core.$strip>;
4553
4559
  }, z.core.$strip>]>;
@@ -152,6 +152,7 @@ export const SelectActionPayloadSchema = z.strictObject({
152
152
  });
153
153
  export const SelectSearchOptionPayloadSchema = z.strictObject({
154
154
  optionId: z.string().min(1),
155
+ text: z.string(),
155
156
  });
156
157
  export const ActionItemSchema = z.discriminatedUnion('type', [
157
158
  FollowupActionItemSchema,
@@ -1149,7 +1150,7 @@ export const NextActionsBarActionSchema = z.union([
1149
1150
  z.object({
1150
1151
  event: z.object({
1151
1152
  name: z.literal('selectSearchOption'),
1152
- context: z.strictObject({ optionId: z.string() }),
1153
+ context: z.strictObject({ optionId: z.string(), text: z.string() }),
1153
1154
  }),
1154
1155
  }),
1155
1156
  ]);
@@ -577,10 +577,13 @@ export declare const SelectActionPayloadSchema: z.ZodObject<{
577
577
  export type SelectActionPayload = z.infer<typeof SelectActionPayloadSchema>;
578
578
  export declare const SelectSearchOptionPayloadSchema: z.ZodObject<{
579
579
  optionId: z.ZodString;
580
+ text: z.ZodString;
580
581
  }, "strict", z.ZodTypeAny, {
581
582
  optionId: string;
583
+ text: string;
582
584
  }, {
583
585
  optionId: string;
586
+ text: string;
584
587
  }>;
585
588
  export type SelectSearchOptionPayload = z.infer<typeof SelectSearchOptionPayloadSchema>;
586
589
  export declare const ActionItemSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -2473,18 +2476,23 @@ export type SelectAction = z.infer<typeof SelectActionSchema>;
2473
2476
  export declare const SelectSearchOptionSchema: z.ZodObject<{
2474
2477
  payload: z.ZodObject<{
2475
2478
  optionId: z.ZodString;
2479
+ text: z.ZodString;
2476
2480
  }, "strict", z.ZodTypeAny, {
2477
2481
  optionId: string;
2482
+ text: string;
2478
2483
  }, {
2479
2484
  optionId: string;
2485
+ text: string;
2480
2486
  }>;
2481
2487
  }, "strict", z.ZodTypeAny, {
2482
2488
  payload: {
2483
2489
  optionId: string;
2490
+ text: string;
2484
2491
  };
2485
2492
  }, {
2486
2493
  payload: {
2487
2494
  optionId: string;
2495
+ text: string;
2488
2496
  };
2489
2497
  }>;
2490
2498
  export type SelectSearchOption = z.infer<typeof SelectSearchOptionSchema>;
@@ -4627,18 +4635,23 @@ export declare const NextActionsBarActionsSchema: z.ZodObject<{
4627
4635
  selectSearchOption: z.ZodObject<{
4628
4636
  payload: z.ZodObject<{
4629
4637
  optionId: z.ZodString;
4638
+ text: z.ZodString;
4630
4639
  }, "strict", z.ZodTypeAny, {
4631
4640
  optionId: string;
4641
+ text: string;
4632
4642
  }, {
4633
4643
  optionId: string;
4644
+ text: string;
4634
4645
  }>;
4635
4646
  }, "strict", z.ZodTypeAny, {
4636
4647
  payload: {
4637
4648
  optionId: string;
4649
+ text: string;
4638
4650
  };
4639
4651
  }, {
4640
4652
  payload: {
4641
4653
  optionId: string;
4654
+ text: string;
4642
4655
  };
4643
4656
  }>;
4644
4657
  }, "strict", z.ZodTypeAny, {
@@ -4651,6 +4664,7 @@ export declare const NextActionsBarActionsSchema: z.ZodObject<{
4651
4664
  selectSearchOption: {
4652
4665
  payload: {
4653
4666
  optionId: string;
4667
+ text: string;
4654
4668
  };
4655
4669
  };
4656
4670
  }, {
@@ -4663,6 +4677,7 @@ export declare const NextActionsBarActionsSchema: z.ZodObject<{
4663
4677
  selectSearchOption: {
4664
4678
  payload: {
4665
4679
  optionId: string;
4680
+ text: string;
4666
4681
  };
4667
4682
  };
4668
4683
  }>;
@@ -7606,18 +7621,23 @@ export declare const NextActionsBarSchema: z.ZodObject<{
7606
7621
  selectSearchOption: z.ZodObject<{
7607
7622
  payload: z.ZodObject<{
7608
7623
  optionId: z.ZodString;
7624
+ text: z.ZodString;
7609
7625
  }, "strict", z.ZodTypeAny, {
7610
7626
  optionId: string;
7627
+ text: string;
7611
7628
  }, {
7612
7629
  optionId: string;
7630
+ text: string;
7613
7631
  }>;
7614
7632
  }, "strict", z.ZodTypeAny, {
7615
7633
  payload: {
7616
7634
  optionId: string;
7635
+ text: string;
7617
7636
  };
7618
7637
  }, {
7619
7638
  payload: {
7620
7639
  optionId: string;
7640
+ text: string;
7621
7641
  };
7622
7642
  }>;
7623
7643
  }, "strict", z.ZodTypeAny, {
@@ -7630,6 +7650,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
7630
7650
  selectSearchOption: {
7631
7651
  payload: {
7632
7652
  optionId: string;
7653
+ text: string;
7633
7654
  };
7634
7655
  };
7635
7656
  }, {
@@ -7642,6 +7663,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
7642
7663
  selectSearchOption: {
7643
7664
  payload: {
7644
7665
  optionId: string;
7666
+ text: string;
7645
7667
  };
7646
7668
  };
7647
7669
  }>>;
@@ -7731,18 +7753,23 @@ export declare const NextActionsBarSchema: z.ZodObject<{
7731
7753
  selectSearchOption: z.ZodObject<{
7732
7754
  payload: z.ZodObject<{
7733
7755
  optionId: z.ZodString;
7756
+ text: z.ZodString;
7734
7757
  }, "strict", z.ZodTypeAny, {
7735
7758
  optionId: string;
7759
+ text: string;
7736
7760
  }, {
7737
7761
  optionId: string;
7762
+ text: string;
7738
7763
  }>;
7739
7764
  }, "strict", z.ZodTypeAny, {
7740
7765
  payload: {
7741
7766
  optionId: string;
7767
+ text: string;
7742
7768
  };
7743
7769
  }, {
7744
7770
  payload: {
7745
7771
  optionId: string;
7772
+ text: string;
7746
7773
  };
7747
7774
  }>;
7748
7775
  }, "strict", z.ZodTypeAny, {
@@ -7755,6 +7782,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
7755
7782
  selectSearchOption: {
7756
7783
  payload: {
7757
7784
  optionId: string;
7785
+ text: string;
7758
7786
  };
7759
7787
  };
7760
7788
  }, {
@@ -7767,6 +7795,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
7767
7795
  selectSearchOption: {
7768
7796
  payload: {
7769
7797
  optionId: string;
7798
+ text: string;
7770
7799
  };
7771
7800
  };
7772
7801
  }>>;
@@ -7856,18 +7885,23 @@ export declare const NextActionsBarSchema: z.ZodObject<{
7856
7885
  selectSearchOption: z.ZodObject<{
7857
7886
  payload: z.ZodObject<{
7858
7887
  optionId: z.ZodString;
7888
+ text: z.ZodString;
7859
7889
  }, "strict", z.ZodTypeAny, {
7860
7890
  optionId: string;
7891
+ text: string;
7861
7892
  }, {
7862
7893
  optionId: string;
7894
+ text: string;
7863
7895
  }>;
7864
7896
  }, "strict", z.ZodTypeAny, {
7865
7897
  payload: {
7866
7898
  optionId: string;
7899
+ text: string;
7867
7900
  };
7868
7901
  }, {
7869
7902
  payload: {
7870
7903
  optionId: string;
7904
+ text: string;
7871
7905
  };
7872
7906
  }>;
7873
7907
  }, "strict", z.ZodTypeAny, {
@@ -7880,6 +7914,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
7880
7914
  selectSearchOption: {
7881
7915
  payload: {
7882
7916
  optionId: string;
7917
+ text: string;
7883
7918
  };
7884
7919
  };
7885
7920
  }, {
@@ -7892,6 +7927,7 @@ export declare const NextActionsBarSchema: z.ZodObject<{
7892
7927
  selectSearchOption: {
7893
7928
  payload: {
7894
7929
  optionId: string;
7930
+ text: string;
7895
7931
  };
7896
7932
  };
7897
7933
  }>>;
@@ -16507,18 +16543,23 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
16507
16543
  selectSearchOption: z.ZodObject<{
16508
16544
  payload: z.ZodObject<{
16509
16545
  optionId: z.ZodString;
16546
+ text: z.ZodString;
16510
16547
  }, "strict", z.ZodTypeAny, {
16511
16548
  optionId: string;
16549
+ text: string;
16512
16550
  }, {
16513
16551
  optionId: string;
16552
+ text: string;
16514
16553
  }>;
16515
16554
  }, "strict", z.ZodTypeAny, {
16516
16555
  payload: {
16517
16556
  optionId: string;
16557
+ text: string;
16518
16558
  };
16519
16559
  }, {
16520
16560
  payload: {
16521
16561
  optionId: string;
16562
+ text: string;
16522
16563
  };
16523
16564
  }>;
16524
16565
  }, "strict", z.ZodTypeAny, {
@@ -16531,6 +16572,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
16531
16572
  selectSearchOption: {
16532
16573
  payload: {
16533
16574
  optionId: string;
16575
+ text: string;
16534
16576
  };
16535
16577
  };
16536
16578
  }, {
@@ -16543,6 +16585,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
16543
16585
  selectSearchOption: {
16544
16586
  payload: {
16545
16587
  optionId: string;
16588
+ text: string;
16546
16589
  };
16547
16590
  };
16548
16591
  }>>;
@@ -16632,18 +16675,23 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
16632
16675
  selectSearchOption: z.ZodObject<{
16633
16676
  payload: z.ZodObject<{
16634
16677
  optionId: z.ZodString;
16678
+ text: z.ZodString;
16635
16679
  }, "strict", z.ZodTypeAny, {
16636
16680
  optionId: string;
16681
+ text: string;
16637
16682
  }, {
16638
16683
  optionId: string;
16684
+ text: string;
16639
16685
  }>;
16640
16686
  }, "strict", z.ZodTypeAny, {
16641
16687
  payload: {
16642
16688
  optionId: string;
16689
+ text: string;
16643
16690
  };
16644
16691
  }, {
16645
16692
  payload: {
16646
16693
  optionId: string;
16694
+ text: string;
16647
16695
  };
16648
16696
  }>;
16649
16697
  }, "strict", z.ZodTypeAny, {
@@ -16656,6 +16704,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
16656
16704
  selectSearchOption: {
16657
16705
  payload: {
16658
16706
  optionId: string;
16707
+ text: string;
16659
16708
  };
16660
16709
  };
16661
16710
  }, {
@@ -16668,6 +16717,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
16668
16717
  selectSearchOption: {
16669
16718
  payload: {
16670
16719
  optionId: string;
16720
+ text: string;
16671
16721
  };
16672
16722
  };
16673
16723
  }>>;
@@ -16757,18 +16807,23 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
16757
16807
  selectSearchOption: z.ZodObject<{
16758
16808
  payload: z.ZodObject<{
16759
16809
  optionId: z.ZodString;
16810
+ text: z.ZodString;
16760
16811
  }, "strict", z.ZodTypeAny, {
16761
16812
  optionId: string;
16813
+ text: string;
16762
16814
  }, {
16763
16815
  optionId: string;
16816
+ text: string;
16764
16817
  }>;
16765
16818
  }, "strict", z.ZodTypeAny, {
16766
16819
  payload: {
16767
16820
  optionId: string;
16821
+ text: string;
16768
16822
  };
16769
16823
  }, {
16770
16824
  payload: {
16771
16825
  optionId: string;
16826
+ text: string;
16772
16827
  };
16773
16828
  }>;
16774
16829
  }, "strict", z.ZodTypeAny, {
@@ -16781,6 +16836,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
16781
16836
  selectSearchOption: {
16782
16837
  payload: {
16783
16838
  optionId: string;
16839
+ text: string;
16784
16840
  };
16785
16841
  };
16786
16842
  }, {
@@ -16793,6 +16849,7 @@ export declare const ComponentContractsSchema: z.ZodDiscriminatedUnion<"componen
16793
16849
  selectSearchOption: {
16794
16850
  payload: {
16795
16851
  optionId: string;
16852
+ text: string;
16796
16853
  };
16797
16854
  };
16798
16855
  }>>;
@@ -29348,20 +29405,25 @@ export declare const NextActionsBarActionSchema: z.ZodUnion<[z.ZodObject<{
29348
29405
  name: z.ZodLiteral<"selectSearchOption">;
29349
29406
  context: z.ZodObject<{
29350
29407
  optionId: z.ZodString;
29408
+ text: z.ZodString;
29351
29409
  }, "strict", z.ZodTypeAny, {
29352
29410
  optionId: string;
29411
+ text: string;
29353
29412
  }, {
29354
29413
  optionId: string;
29414
+ text: string;
29355
29415
  }>;
29356
29416
  }, "strip", z.ZodTypeAny, {
29357
29417
  name: "selectSearchOption";
29358
29418
  context: {
29359
29419
  optionId: string;
29420
+ text: string;
29360
29421
  };
29361
29422
  }, {
29362
29423
  name: "selectSearchOption";
29363
29424
  context: {
29364
29425
  optionId: string;
29426
+ text: string;
29365
29427
  };
29366
29428
  }>;
29367
29429
  }, "strip", z.ZodTypeAny, {
@@ -29369,6 +29431,7 @@ export declare const NextActionsBarActionSchema: z.ZodUnion<[z.ZodObject<{
29369
29431
  name: "selectSearchOption";
29370
29432
  context: {
29371
29433
  optionId: string;
29434
+ text: string;
29372
29435
  };
29373
29436
  };
29374
29437
  }, {
@@ -29376,6 +29439,7 @@ export declare const NextActionsBarActionSchema: z.ZodUnion<[z.ZodObject<{
29376
29439
  name: "selectSearchOption";
29377
29440
  context: {
29378
29441
  optionId: string;
29442
+ text: string;
29379
29443
  };
29380
29444
  };
29381
29445
  }>]>;
@@ -154,6 +154,7 @@ export const SelectActionPayloadSchema = z.strictObject({
154
154
  });
155
155
  export const SelectSearchOptionPayloadSchema = z.strictObject({
156
156
  optionId: z.string().min(1),
157
+ text: z.string(),
157
158
  });
158
159
  export const ActionItemSchema = z.discriminatedUnion('type', [
159
160
  FollowupActionItemSchema,
@@ -1151,7 +1152,7 @@ export const NextActionsBarActionSchema = z.union([
1151
1152
  z.object({
1152
1153
  event: z.object({
1153
1154
  name: z.literal('selectSearchOption'),
1154
- context: z.strictObject({ optionId: z.string() }),
1155
+ context: z.strictObject({ optionId: z.string(), text: z.string() }),
1155
1156
  }),
1156
1157
  }),
1157
1158
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/thermidor-schema",
3
- "version": "1.0.0-beta.32",
3
+ "version": "1.0.0-beta.33",
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": {
@@ -86,7 +86,7 @@
86
86
  },
87
87
  "SelectSearchOptionAction": {
88
88
  "title": "selectSearchOption",
89
- "description": "Signals that the user selected a \"searchOption\" action. The backend runs the search it saved under optionId.",
89
+ "description": "Signals that the user selected a \"searchOption\" action. The backend runs the search it saved under optionId; text is what the user selected, so a consumer can show it.",
90
90
  "allOf": [
91
91
  {
92
92
  "$ref": "https://schema.thermidor.coveo.com/base/action.schema.json"
@@ -95,12 +95,16 @@
95
95
  "properties": {
96
96
  "payload": {
97
97
  "type": "object",
98
- "required": ["optionId"],
98
+ "required": ["optionId", "text"],
99
99
  "properties": {
100
100
  "optionId": {
101
101
  "type": "string",
102
102
  "minLength": 1,
103
103
  "description": "The optionId of the selected action, echoed unchanged."
104
+ },
105
+ "text": {
106
+ "type": "string",
107
+ "description": "The display text of the action the user selected."
104
108
  }
105
109
  },
106
110
  "additionalProperties": false
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.thermidor.coveo.com/definitions/search-option-action-item.schema.json",
4
4
  "title": "SearchOptionActionItem",
5
- "description": "An ActionItem that opens a search the backend saved behind it. Selecting it dispatches selectSearchOption with its optionId.",
5
+ "description": "An ActionItem that opens a search the backend saved behind it. Selecting it dispatches selectSearchOption with its optionId and text.",
6
6
  "type": "object",
7
7
  "required": ["text", "type", "optionId"],
8
8
  "properties": {