@operla-ai/sdk 0.3.4 → 0.3.6

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.
@@ -50,12 +50,33 @@ export type ListResponses = {
50
50
  * Successful response
51
51
  */
52
52
  200: {
53
+ /**
54
+ * Agents visible at the caller's scope.
55
+ */
53
56
  agents: Array<{
57
+ /**
58
+ * Machine name of the agent (e.g. `orchestrator`, `response`, `specialist_billing`).
59
+ */
54
60
  name: string;
61
+ /**
62
+ * Human-readable label shown in the dashboard.
63
+ */
55
64
  label: string;
65
+ /**
66
+ * Cascade level of this view (global / organization / entity).
67
+ */
56
68
  scope: {
69
+ /**
70
+ * Cascade level this config lives at — `global` (whole tenant), `organization` (per-org override), or `entity` (per-entity override).
71
+ */
57
72
  level: 'global' | 'organization' | 'entity';
73
+ /**
74
+ * ID of the organization when `level` is `organization` or `entity`.
75
+ */
58
76
  organizationId?: string;
77
+ /**
78
+ * ID of the entity when `level` is `entity`.
79
+ */
59
80
  entityId?: string;
60
81
  };
61
82
  /**
@@ -84,12 +105,58 @@ export type CreateData = {
84
105
  * Hard rules to attach to the agent at creation.
85
106
  */
86
107
  hardRules?: Array<{
108
+ /**
109
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
110
+ */
87
111
  name: string;
112
+ /**
113
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
114
+ */
88
115
  instruction: string;
89
- triggers?: {
90
- intents?: Array<string>;
91
- };
116
+ /**
117
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
118
+ */
119
+ intents?: Array<string>;
120
+ /**
121
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
122
+ */
92
123
  priority?: number;
124
+ /**
125
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
126
+ */
127
+ disabled?: boolean;
128
+ }>;
129
+ /**
130
+ * Few-shot examples to attach to the agent at creation.
131
+ */
132
+ examples?: Array<{
133
+ /**
134
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
135
+ */
136
+ name?: string;
137
+ /**
138
+ * Short human-readable description of the scenario this example illustrates.
139
+ */
140
+ description: string;
141
+ /**
142
+ * User message used as the example input.
143
+ */
144
+ input: string;
145
+ /**
146
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
147
+ */
148
+ output?: unknown;
149
+ /**
150
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
151
+ */
152
+ context?: unknown;
153
+ /**
154
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
155
+ */
156
+ intents?: Array<string>;
157
+ /**
158
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
159
+ */
93
160
  disabled?: boolean;
94
161
  }>;
95
162
  };
@@ -135,87 +202,317 @@ export type CreateResponses = {
135
202
  * Successful response
136
203
  */
137
204
  200: {
205
+ /**
206
+ * Machine name of the agent (e.g. `orchestrator`, `response`, `specialist_billing`).
207
+ */
138
208
  name: string;
209
+ /**
210
+ * Human-readable label shown in the dashboard.
211
+ */
139
212
  label: string;
213
+ /**
214
+ * Cascade level of this view (global / organization / entity).
215
+ */
140
216
  scope: {
217
+ /**
218
+ * Cascade level this config lives at — `global` (whole tenant), `organization` (per-org override), or `entity` (per-entity override).
219
+ */
141
220
  level: 'global' | 'organization' | 'entity';
221
+ /**
222
+ * ID of the organization when `level` is `organization` or `entity`.
223
+ */
142
224
  organizationId?: string;
225
+ /**
226
+ * ID of the entity when `level` is `entity`.
227
+ */
143
228
  entityId?: string;
144
229
  };
145
230
  /**
146
231
  * The agent config the runtime sees at the request scope, after cascade resolution.
147
232
  */
148
233
  resolved: {
234
+ /**
235
+ * Monotonic version number of this snapshot at its scope.
236
+ */
149
237
  version: number;
238
+ /**
239
+ * System prompt active in this snapshot. Omitted on override snapshots that inherit the prompt from the cascade.
240
+ */
150
241
  prompt?: string;
242
+ /**
243
+ * Resolved list of hard rules. On override snapshots, may be omitted when the override doesn't customise rules.
244
+ */
151
245
  hardRules?: Array<{
246
+ /**
247
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
248
+ */
152
249
  name: string;
250
+ /**
251
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
252
+ */
153
253
  instruction: string;
154
- triggers?: {
155
- intents?: Array<string>;
156
- };
254
+ /**
255
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
256
+ */
257
+ intents?: Array<string>;
258
+ /**
259
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
260
+ */
157
261
  priority?: number;
262
+ /**
263
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
264
+ */
158
265
  disabled?: boolean;
159
266
  }>;
267
+ /**
268
+ * Resolved list of few-shot examples. On override snapshots, may be omitted when the override doesn't customise examples.
269
+ */
270
+ examples?: Array<{
271
+ /**
272
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
273
+ */
274
+ name?: string;
275
+ /**
276
+ * Short human-readable description of the scenario this example illustrates.
277
+ */
278
+ description: string;
279
+ /**
280
+ * User message used as the example input.
281
+ */
282
+ input: string;
283
+ /**
284
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
285
+ */
286
+ output?: unknown;
287
+ /**
288
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
289
+ */
290
+ context?: unknown;
291
+ /**
292
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
293
+ */
294
+ intents?: Array<string>;
295
+ /**
296
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
297
+ */
298
+ disabled?: boolean;
299
+ }>;
300
+ /**
301
+ * Toggled user-context fields exposed to the agent.
302
+ */
160
303
  userContextConfig?: {
161
304
  [key: string]: boolean;
162
305
  };
306
+ /**
307
+ * Per-channel writing style (response agent only).
308
+ */
163
309
  responseConfig?: {
310
+ /**
311
+ * Writing style applied when the conversation channel is email.
312
+ */
164
313
  email?: {
314
+ /**
315
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
316
+ */
165
317
  greeting?: string;
318
+ /**
319
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
320
+ */
166
321
  signature?: string;
322
+ /**
323
+ * Writing tone for this channel.
324
+ */
167
325
  tone?: 'empathetic' | 'formal' | 'friendly';
326
+ /**
327
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
328
+ */
168
329
  addressForm?: 'formal' | 'informal';
330
+ /**
331
+ * Allow the agent to use one emoji per message. Defaults to `false`.
332
+ */
169
333
  allowEmojis?: boolean;
170
334
  };
335
+ /**
336
+ * Writing style applied when the conversation channel is chat.
337
+ */
171
338
  chat?: {
339
+ /**
340
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
341
+ */
172
342
  greeting?: string;
343
+ /**
344
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
345
+ */
173
346
  signature?: string;
347
+ /**
348
+ * Writing tone for this channel.
349
+ */
174
350
  tone?: 'empathetic' | 'formal' | 'friendly';
351
+ /**
352
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
353
+ */
175
354
  addressForm?: 'formal' | 'informal';
355
+ /**
356
+ * Allow the agent to use one emoji per message. Defaults to `false`.
357
+ */
176
358
  allowEmojis?: boolean;
177
359
  };
178
360
  };
361
+ /**
362
+ * Optional release note attached when this version was published.
363
+ */
179
364
  message?: string;
365
+ /**
366
+ * ISO timestamp of the publication that produced this snapshot.
367
+ */
180
368
  publishedAt?: string;
369
+ /**
370
+ * ISO timestamp of the last draft edit (drafts only).
371
+ */
181
372
  updatedAt?: string;
182
373
  };
183
374
  /**
184
375
  * Override draft at this scope, when one exists.
185
376
  */
186
377
  draft?: {
378
+ /**
379
+ * Monotonic version number of this snapshot at its scope.
380
+ */
187
381
  version: number;
382
+ /**
383
+ * System prompt active in this snapshot. Omitted on override snapshots that inherit the prompt from the cascade.
384
+ */
188
385
  prompt?: string;
386
+ /**
387
+ * Resolved list of hard rules. On override snapshots, may be omitted when the override doesn't customise rules.
388
+ */
189
389
  hardRules?: Array<{
390
+ /**
391
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
392
+ */
190
393
  name: string;
394
+ /**
395
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
396
+ */
191
397
  instruction: string;
192
- triggers?: {
193
- intents?: Array<string>;
194
- };
398
+ /**
399
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
400
+ */
401
+ intents?: Array<string>;
402
+ /**
403
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
404
+ */
195
405
  priority?: number;
406
+ /**
407
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
408
+ */
196
409
  disabled?: boolean;
197
410
  }>;
411
+ /**
412
+ * Resolved list of few-shot examples. On override snapshots, may be omitted when the override doesn't customise examples.
413
+ */
414
+ examples?: Array<{
415
+ /**
416
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
417
+ */
418
+ name?: string;
419
+ /**
420
+ * Short human-readable description of the scenario this example illustrates.
421
+ */
422
+ description: string;
423
+ /**
424
+ * User message used as the example input.
425
+ */
426
+ input: string;
427
+ /**
428
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
429
+ */
430
+ output?: unknown;
431
+ /**
432
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
433
+ */
434
+ context?: unknown;
435
+ /**
436
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
437
+ */
438
+ intents?: Array<string>;
439
+ /**
440
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
441
+ */
442
+ disabled?: boolean;
443
+ }>;
444
+ /**
445
+ * Toggled user-context fields exposed to the agent.
446
+ */
198
447
  userContextConfig?: {
199
448
  [key: string]: boolean;
200
449
  };
450
+ /**
451
+ * Per-channel writing style (response agent only).
452
+ */
201
453
  responseConfig?: {
454
+ /**
455
+ * Writing style applied when the conversation channel is email.
456
+ */
202
457
  email?: {
458
+ /**
459
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
460
+ */
203
461
  greeting?: string;
462
+ /**
463
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
464
+ */
204
465
  signature?: string;
466
+ /**
467
+ * Writing tone for this channel.
468
+ */
205
469
  tone?: 'empathetic' | 'formal' | 'friendly';
470
+ /**
471
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
472
+ */
206
473
  addressForm?: 'formal' | 'informal';
474
+ /**
475
+ * Allow the agent to use one emoji per message. Defaults to `false`.
476
+ */
207
477
  allowEmojis?: boolean;
208
478
  };
479
+ /**
480
+ * Writing style applied when the conversation channel is chat.
481
+ */
209
482
  chat?: {
483
+ /**
484
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
485
+ */
210
486
  greeting?: string;
487
+ /**
488
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
489
+ */
211
490
  signature?: string;
491
+ /**
492
+ * Writing tone for this channel.
493
+ */
212
494
  tone?: 'empathetic' | 'formal' | 'friendly';
495
+ /**
496
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
497
+ */
213
498
  addressForm?: 'formal' | 'informal';
499
+ /**
500
+ * Allow the agent to use one emoji per message. Defaults to `false`.
501
+ */
214
502
  allowEmojis?: boolean;
215
503
  };
216
504
  };
505
+ /**
506
+ * Optional release note attached when this version was published.
507
+ */
217
508
  message?: string;
509
+ /**
510
+ * ISO timestamp of the publication that produced this snapshot.
511
+ */
218
512
  publishedAt?: string;
513
+ /**
514
+ * ISO timestamp of the last draft edit (drafts only).
515
+ */
219
516
  updatedAt?: string;
220
517
  };
221
518
  };
@@ -270,6 +567,9 @@ export type DeleteResponses = {
270
567
  * Successful response
271
568
  */
272
569
  200: {
570
+ /**
571
+ * Confirmation message describing the deletion outcome.
572
+ */
273
573
  message: string;
274
574
  };
275
575
  };
@@ -328,87 +628,317 @@ export type GetResponses = {
328
628
  * Successful response
329
629
  */
330
630
  200: {
631
+ /**
632
+ * Machine name of the agent (e.g. `orchestrator`, `response`, `specialist_billing`).
633
+ */
331
634
  name: string;
635
+ /**
636
+ * Human-readable label shown in the dashboard.
637
+ */
332
638
  label: string;
639
+ /**
640
+ * Cascade level of this view (global / organization / entity).
641
+ */
333
642
  scope: {
643
+ /**
644
+ * Cascade level this config lives at — `global` (whole tenant), `organization` (per-org override), or `entity` (per-entity override).
645
+ */
334
646
  level: 'global' | 'organization' | 'entity';
647
+ /**
648
+ * ID of the organization when `level` is `organization` or `entity`.
649
+ */
335
650
  organizationId?: string;
651
+ /**
652
+ * ID of the entity when `level` is `entity`.
653
+ */
336
654
  entityId?: string;
337
655
  };
338
656
  /**
339
657
  * The agent config the runtime sees at the request scope, after cascade resolution.
340
658
  */
341
659
  resolved: {
660
+ /**
661
+ * Monotonic version number of this snapshot at its scope.
662
+ */
342
663
  version: number;
664
+ /**
665
+ * System prompt active in this snapshot. Omitted on override snapshots that inherit the prompt from the cascade.
666
+ */
343
667
  prompt?: string;
668
+ /**
669
+ * Resolved list of hard rules. On override snapshots, may be omitted when the override doesn't customise rules.
670
+ */
344
671
  hardRules?: Array<{
672
+ /**
673
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
674
+ */
345
675
  name: string;
676
+ /**
677
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
678
+ */
346
679
  instruction: string;
347
- triggers?: {
348
- intents?: Array<string>;
349
- };
680
+ /**
681
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
682
+ */
683
+ intents?: Array<string>;
684
+ /**
685
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
686
+ */
350
687
  priority?: number;
688
+ /**
689
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
690
+ */
691
+ disabled?: boolean;
692
+ }>;
693
+ /**
694
+ * Resolved list of few-shot examples. On override snapshots, may be omitted when the override doesn't customise examples.
695
+ */
696
+ examples?: Array<{
697
+ /**
698
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
699
+ */
700
+ name?: string;
701
+ /**
702
+ * Short human-readable description of the scenario this example illustrates.
703
+ */
704
+ description: string;
705
+ /**
706
+ * User message used as the example input.
707
+ */
708
+ input: string;
709
+ /**
710
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
711
+ */
712
+ output?: unknown;
713
+ /**
714
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
715
+ */
716
+ context?: unknown;
717
+ /**
718
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
719
+ */
720
+ intents?: Array<string>;
721
+ /**
722
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
723
+ */
351
724
  disabled?: boolean;
352
725
  }>;
726
+ /**
727
+ * Toggled user-context fields exposed to the agent.
728
+ */
353
729
  userContextConfig?: {
354
730
  [key: string]: boolean;
355
731
  };
732
+ /**
733
+ * Per-channel writing style (response agent only).
734
+ */
356
735
  responseConfig?: {
736
+ /**
737
+ * Writing style applied when the conversation channel is email.
738
+ */
357
739
  email?: {
740
+ /**
741
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
742
+ */
358
743
  greeting?: string;
744
+ /**
745
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
746
+ */
359
747
  signature?: string;
748
+ /**
749
+ * Writing tone for this channel.
750
+ */
360
751
  tone?: 'empathetic' | 'formal' | 'friendly';
752
+ /**
753
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
754
+ */
361
755
  addressForm?: 'formal' | 'informal';
756
+ /**
757
+ * Allow the agent to use one emoji per message. Defaults to `false`.
758
+ */
362
759
  allowEmojis?: boolean;
363
760
  };
761
+ /**
762
+ * Writing style applied when the conversation channel is chat.
763
+ */
364
764
  chat?: {
765
+ /**
766
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
767
+ */
365
768
  greeting?: string;
769
+ /**
770
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
771
+ */
366
772
  signature?: string;
773
+ /**
774
+ * Writing tone for this channel.
775
+ */
367
776
  tone?: 'empathetic' | 'formal' | 'friendly';
777
+ /**
778
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
779
+ */
368
780
  addressForm?: 'formal' | 'informal';
781
+ /**
782
+ * Allow the agent to use one emoji per message. Defaults to `false`.
783
+ */
369
784
  allowEmojis?: boolean;
370
785
  };
371
786
  };
787
+ /**
788
+ * Optional release note attached when this version was published.
789
+ */
372
790
  message?: string;
791
+ /**
792
+ * ISO timestamp of the publication that produced this snapshot.
793
+ */
373
794
  publishedAt?: string;
795
+ /**
796
+ * ISO timestamp of the last draft edit (drafts only).
797
+ */
374
798
  updatedAt?: string;
375
799
  };
376
800
  /**
377
801
  * Override draft at this scope, when one exists.
378
802
  */
379
803
  draft?: {
804
+ /**
805
+ * Monotonic version number of this snapshot at its scope.
806
+ */
380
807
  version: number;
808
+ /**
809
+ * System prompt active in this snapshot. Omitted on override snapshots that inherit the prompt from the cascade.
810
+ */
381
811
  prompt?: string;
812
+ /**
813
+ * Resolved list of hard rules. On override snapshots, may be omitted when the override doesn't customise rules.
814
+ */
382
815
  hardRules?: Array<{
816
+ /**
817
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
818
+ */
383
819
  name: string;
820
+ /**
821
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
822
+ */
384
823
  instruction: string;
385
- triggers?: {
386
- intents?: Array<string>;
387
- };
824
+ /**
825
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
826
+ */
827
+ intents?: Array<string>;
828
+ /**
829
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
830
+ */
388
831
  priority?: number;
832
+ /**
833
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
834
+ */
389
835
  disabled?: boolean;
390
836
  }>;
837
+ /**
838
+ * Resolved list of few-shot examples. On override snapshots, may be omitted when the override doesn't customise examples.
839
+ */
840
+ examples?: Array<{
841
+ /**
842
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
843
+ */
844
+ name?: string;
845
+ /**
846
+ * Short human-readable description of the scenario this example illustrates.
847
+ */
848
+ description: string;
849
+ /**
850
+ * User message used as the example input.
851
+ */
852
+ input: string;
853
+ /**
854
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
855
+ */
856
+ output?: unknown;
857
+ /**
858
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
859
+ */
860
+ context?: unknown;
861
+ /**
862
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
863
+ */
864
+ intents?: Array<string>;
865
+ /**
866
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
867
+ */
868
+ disabled?: boolean;
869
+ }>;
870
+ /**
871
+ * Toggled user-context fields exposed to the agent.
872
+ */
391
873
  userContextConfig?: {
392
874
  [key: string]: boolean;
393
875
  };
876
+ /**
877
+ * Per-channel writing style (response agent only).
878
+ */
394
879
  responseConfig?: {
880
+ /**
881
+ * Writing style applied when the conversation channel is email.
882
+ */
395
883
  email?: {
884
+ /**
885
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
886
+ */
396
887
  greeting?: string;
888
+ /**
889
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
890
+ */
397
891
  signature?: string;
892
+ /**
893
+ * Writing tone for this channel.
894
+ */
398
895
  tone?: 'empathetic' | 'formal' | 'friendly';
896
+ /**
897
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
898
+ */
399
899
  addressForm?: 'formal' | 'informal';
900
+ /**
901
+ * Allow the agent to use one emoji per message. Defaults to `false`.
902
+ */
400
903
  allowEmojis?: boolean;
401
904
  };
905
+ /**
906
+ * Writing style applied when the conversation channel is chat.
907
+ */
402
908
  chat?: {
909
+ /**
910
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
911
+ */
403
912
  greeting?: string;
913
+ /**
914
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
915
+ */
404
916
  signature?: string;
917
+ /**
918
+ * Writing tone for this channel.
919
+ */
405
920
  tone?: 'empathetic' | 'formal' | 'friendly';
921
+ /**
922
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
923
+ */
406
924
  addressForm?: 'formal' | 'informal';
925
+ /**
926
+ * Allow the agent to use one emoji per message. Defaults to `false`.
927
+ */
407
928
  allowEmojis?: boolean;
408
929
  };
409
930
  };
931
+ /**
932
+ * Optional release note attached when this version was published.
933
+ */
410
934
  message?: string;
935
+ /**
936
+ * ISO timestamp of the publication that produced this snapshot.
937
+ */
411
938
  publishedAt?: string;
939
+ /**
940
+ * ISO timestamp of the last draft edit (drafts only).
941
+ */
412
942
  updatedAt?: string;
413
943
  };
414
944
  };
@@ -424,12 +954,58 @@ export type UpdateData = {
424
954
  * Constraints the agent must follow, injected into its prompt.
425
955
  */
426
956
  hardRules?: Array<{
957
+ /**
958
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
959
+ */
427
960
  name: string;
961
+ /**
962
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
963
+ */
428
964
  instruction: string;
429
- triggers?: {
430
- intents?: Array<string>;
431
- };
965
+ /**
966
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
967
+ */
968
+ intents?: Array<string>;
969
+ /**
970
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
971
+ */
432
972
  priority?: number;
973
+ /**
974
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
975
+ */
976
+ disabled?: boolean;
977
+ }>;
978
+ /**
979
+ * Few-shot examples shown to the agent in its prompt. Use them to demonstrate input → output patterns.
980
+ */
981
+ examples?: Array<{
982
+ /**
983
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
984
+ */
985
+ name?: string;
986
+ /**
987
+ * Short human-readable description of the scenario this example illustrates.
988
+ */
989
+ description: string;
990
+ /**
991
+ * User message used as the example input.
992
+ */
993
+ input: string;
994
+ /**
995
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
996
+ */
997
+ output?: unknown;
998
+ /**
999
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
1000
+ */
1001
+ context?: unknown;
1002
+ /**
1003
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
1004
+ */
1005
+ intents?: Array<string>;
1006
+ /**
1007
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
1008
+ */
433
1009
  disabled?: boolean;
434
1010
  }>;
435
1011
  /**
@@ -442,18 +1018,54 @@ export type UpdateData = {
442
1018
  * Per-channel writing style. Editable on the response agent only.
443
1019
  */
444
1020
  responseConfig?: {
1021
+ /**
1022
+ * Writing style applied when the conversation channel is email.
1023
+ */
445
1024
  email?: {
1025
+ /**
1026
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
1027
+ */
446
1028
  greeting?: string;
1029
+ /**
1030
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
1031
+ */
447
1032
  signature?: string;
1033
+ /**
1034
+ * Writing tone for this channel.
1035
+ */
448
1036
  tone?: 'empathetic' | 'formal' | 'friendly';
1037
+ /**
1038
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
1039
+ */
449
1040
  addressForm?: 'formal' | 'informal';
1041
+ /**
1042
+ * Allow the agent to use one emoji per message. Defaults to `false`.
1043
+ */
450
1044
  allowEmojis?: boolean;
451
1045
  };
1046
+ /**
1047
+ * Writing style applied when the conversation channel is chat.
1048
+ */
452
1049
  chat?: {
1050
+ /**
1051
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
1052
+ */
453
1053
  greeting?: string;
1054
+ /**
1055
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
1056
+ */
454
1057
  signature?: string;
1058
+ /**
1059
+ * Writing tone for this channel.
1060
+ */
455
1061
  tone?: 'empathetic' | 'formal' | 'friendly';
1062
+ /**
1063
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
1064
+ */
456
1065
  addressForm?: 'formal' | 'informal';
1066
+ /**
1067
+ * Allow the agent to use one emoji per message. Defaults to `false`.
1068
+ */
457
1069
  allowEmojis?: boolean;
458
1070
  };
459
1071
  };
@@ -514,87 +1126,317 @@ export type UpdateResponses = {
514
1126
  * Successful response
515
1127
  */
516
1128
  200: {
1129
+ /**
1130
+ * Machine name of the agent (e.g. `orchestrator`, `response`, `specialist_billing`).
1131
+ */
517
1132
  name: string;
1133
+ /**
1134
+ * Human-readable label shown in the dashboard.
1135
+ */
518
1136
  label: string;
1137
+ /**
1138
+ * Cascade level of this view (global / organization / entity).
1139
+ */
519
1140
  scope: {
1141
+ /**
1142
+ * Cascade level this config lives at — `global` (whole tenant), `organization` (per-org override), or `entity` (per-entity override).
1143
+ */
520
1144
  level: 'global' | 'organization' | 'entity';
1145
+ /**
1146
+ * ID of the organization when `level` is `organization` or `entity`.
1147
+ */
521
1148
  organizationId?: string;
1149
+ /**
1150
+ * ID of the entity when `level` is `entity`.
1151
+ */
522
1152
  entityId?: string;
523
1153
  };
524
1154
  /**
525
1155
  * The agent config the runtime sees at the request scope, after cascade resolution.
526
1156
  */
527
1157
  resolved: {
1158
+ /**
1159
+ * Monotonic version number of this snapshot at its scope.
1160
+ */
528
1161
  version: number;
1162
+ /**
1163
+ * System prompt active in this snapshot. Omitted on override snapshots that inherit the prompt from the cascade.
1164
+ */
529
1165
  prompt?: string;
1166
+ /**
1167
+ * Resolved list of hard rules. On override snapshots, may be omitted when the override doesn't customise rules.
1168
+ */
530
1169
  hardRules?: Array<{
1170
+ /**
1171
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
1172
+ */
531
1173
  name: string;
1174
+ /**
1175
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
1176
+ */
532
1177
  instruction: string;
533
- triggers?: {
534
- intents?: Array<string>;
535
- };
1178
+ /**
1179
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
1180
+ */
1181
+ intents?: Array<string>;
1182
+ /**
1183
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
1184
+ */
536
1185
  priority?: number;
1186
+ /**
1187
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
1188
+ */
1189
+ disabled?: boolean;
1190
+ }>;
1191
+ /**
1192
+ * Resolved list of few-shot examples. On override snapshots, may be omitted when the override doesn't customise examples.
1193
+ */
1194
+ examples?: Array<{
1195
+ /**
1196
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
1197
+ */
1198
+ name?: string;
1199
+ /**
1200
+ * Short human-readable description of the scenario this example illustrates.
1201
+ */
1202
+ description: string;
1203
+ /**
1204
+ * User message used as the example input.
1205
+ */
1206
+ input: string;
1207
+ /**
1208
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
1209
+ */
1210
+ output?: unknown;
1211
+ /**
1212
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
1213
+ */
1214
+ context?: unknown;
1215
+ /**
1216
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
1217
+ */
1218
+ intents?: Array<string>;
1219
+ /**
1220
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
1221
+ */
537
1222
  disabled?: boolean;
538
1223
  }>;
1224
+ /**
1225
+ * Toggled user-context fields exposed to the agent.
1226
+ */
539
1227
  userContextConfig?: {
540
1228
  [key: string]: boolean;
541
1229
  };
1230
+ /**
1231
+ * Per-channel writing style (response agent only).
1232
+ */
542
1233
  responseConfig?: {
1234
+ /**
1235
+ * Writing style applied when the conversation channel is email.
1236
+ */
543
1237
  email?: {
1238
+ /**
1239
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
1240
+ */
544
1241
  greeting?: string;
1242
+ /**
1243
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
1244
+ */
545
1245
  signature?: string;
1246
+ /**
1247
+ * Writing tone for this channel.
1248
+ */
546
1249
  tone?: 'empathetic' | 'formal' | 'friendly';
1250
+ /**
1251
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
1252
+ */
547
1253
  addressForm?: 'formal' | 'informal';
1254
+ /**
1255
+ * Allow the agent to use one emoji per message. Defaults to `false`.
1256
+ */
548
1257
  allowEmojis?: boolean;
549
1258
  };
1259
+ /**
1260
+ * Writing style applied when the conversation channel is chat.
1261
+ */
550
1262
  chat?: {
1263
+ /**
1264
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
1265
+ */
551
1266
  greeting?: string;
1267
+ /**
1268
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
1269
+ */
552
1270
  signature?: string;
1271
+ /**
1272
+ * Writing tone for this channel.
1273
+ */
553
1274
  tone?: 'empathetic' | 'formal' | 'friendly';
1275
+ /**
1276
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
1277
+ */
554
1278
  addressForm?: 'formal' | 'informal';
1279
+ /**
1280
+ * Allow the agent to use one emoji per message. Defaults to `false`.
1281
+ */
555
1282
  allowEmojis?: boolean;
556
1283
  };
557
1284
  };
1285
+ /**
1286
+ * Optional release note attached when this version was published.
1287
+ */
558
1288
  message?: string;
1289
+ /**
1290
+ * ISO timestamp of the publication that produced this snapshot.
1291
+ */
559
1292
  publishedAt?: string;
1293
+ /**
1294
+ * ISO timestamp of the last draft edit (drafts only).
1295
+ */
560
1296
  updatedAt?: string;
561
1297
  };
562
1298
  /**
563
1299
  * Override draft at this scope, when one exists.
564
1300
  */
565
1301
  draft?: {
1302
+ /**
1303
+ * Monotonic version number of this snapshot at its scope.
1304
+ */
566
1305
  version: number;
1306
+ /**
1307
+ * System prompt active in this snapshot. Omitted on override snapshots that inherit the prompt from the cascade.
1308
+ */
567
1309
  prompt?: string;
1310
+ /**
1311
+ * Resolved list of hard rules. On override snapshots, may be omitted when the override doesn't customise rules.
1312
+ */
568
1313
  hardRules?: Array<{
1314
+ /**
1315
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
1316
+ */
569
1317
  name: string;
1318
+ /**
1319
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
1320
+ */
570
1321
  instruction: string;
571
- triggers?: {
572
- intents?: Array<string>;
573
- };
1322
+ /**
1323
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
1324
+ */
1325
+ intents?: Array<string>;
1326
+ /**
1327
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
1328
+ */
574
1329
  priority?: number;
1330
+ /**
1331
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
1332
+ */
1333
+ disabled?: boolean;
1334
+ }>;
1335
+ /**
1336
+ * Resolved list of few-shot examples. On override snapshots, may be omitted when the override doesn't customise examples.
1337
+ */
1338
+ examples?: Array<{
1339
+ /**
1340
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
1341
+ */
1342
+ name?: string;
1343
+ /**
1344
+ * Short human-readable description of the scenario this example illustrates.
1345
+ */
1346
+ description: string;
1347
+ /**
1348
+ * User message used as the example input.
1349
+ */
1350
+ input: string;
1351
+ /**
1352
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
1353
+ */
1354
+ output?: unknown;
1355
+ /**
1356
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
1357
+ */
1358
+ context?: unknown;
1359
+ /**
1360
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
1361
+ */
1362
+ intents?: Array<string>;
1363
+ /**
1364
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
1365
+ */
575
1366
  disabled?: boolean;
576
1367
  }>;
1368
+ /**
1369
+ * Toggled user-context fields exposed to the agent.
1370
+ */
577
1371
  userContextConfig?: {
578
1372
  [key: string]: boolean;
579
1373
  };
1374
+ /**
1375
+ * Per-channel writing style (response agent only).
1376
+ */
580
1377
  responseConfig?: {
1378
+ /**
1379
+ * Writing style applied when the conversation channel is email.
1380
+ */
581
1381
  email?: {
1382
+ /**
1383
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
1384
+ */
582
1385
  greeting?: string;
1386
+ /**
1387
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
1388
+ */
583
1389
  signature?: string;
1390
+ /**
1391
+ * Writing tone for this channel.
1392
+ */
584
1393
  tone?: 'empathetic' | 'formal' | 'friendly';
1394
+ /**
1395
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
1396
+ */
585
1397
  addressForm?: 'formal' | 'informal';
1398
+ /**
1399
+ * Allow the agent to use one emoji per message. Defaults to `false`.
1400
+ */
586
1401
  allowEmojis?: boolean;
587
1402
  };
1403
+ /**
1404
+ * Writing style applied when the conversation channel is chat.
1405
+ */
588
1406
  chat?: {
1407
+ /**
1408
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
1409
+ */
589
1410
  greeting?: string;
1411
+ /**
1412
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
1413
+ */
590
1414
  signature?: string;
1415
+ /**
1416
+ * Writing tone for this channel.
1417
+ */
591
1418
  tone?: 'empathetic' | 'formal' | 'friendly';
1419
+ /**
1420
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
1421
+ */
592
1422
  addressForm?: 'formal' | 'informal';
1423
+ /**
1424
+ * Allow the agent to use one emoji per message. Defaults to `false`.
1425
+ */
593
1426
  allowEmojis?: boolean;
594
1427
  };
595
1428
  };
1429
+ /**
1430
+ * Optional release note attached when this version was published.
1431
+ */
596
1432
  message?: string;
1433
+ /**
1434
+ * ISO timestamp of the publication that produced this snapshot.
1435
+ */
597
1436
  publishedAt?: string;
1437
+ /**
1438
+ * ISO timestamp of the last draft edit (drafts only).
1439
+ */
598
1440
  updatedAt?: string;
599
1441
  };
600
1442
  };
@@ -654,6 +1496,9 @@ export type DeleteOverrideResponses = {
654
1496
  * Successful response
655
1497
  */
656
1498
  200: {
1499
+ /**
1500
+ * Confirmation message describing the deletion outcome.
1501
+ */
657
1502
  message: string;
658
1503
  };
659
1504
  };
@@ -717,87 +1562,317 @@ export type PublishResponses = {
717
1562
  * Successful response
718
1563
  */
719
1564
  200: {
1565
+ /**
1566
+ * Machine name of the agent (e.g. `orchestrator`, `response`, `specialist_billing`).
1567
+ */
720
1568
  name: string;
1569
+ /**
1570
+ * Human-readable label shown in the dashboard.
1571
+ */
721
1572
  label: string;
1573
+ /**
1574
+ * Cascade level of this view (global / organization / entity).
1575
+ */
722
1576
  scope: {
1577
+ /**
1578
+ * Cascade level this config lives at — `global` (whole tenant), `organization` (per-org override), or `entity` (per-entity override).
1579
+ */
723
1580
  level: 'global' | 'organization' | 'entity';
1581
+ /**
1582
+ * ID of the organization when `level` is `organization` or `entity`.
1583
+ */
724
1584
  organizationId?: string;
1585
+ /**
1586
+ * ID of the entity when `level` is `entity`.
1587
+ */
725
1588
  entityId?: string;
726
1589
  };
727
1590
  /**
728
1591
  * The agent config the runtime sees at the request scope, after cascade resolution.
729
1592
  */
730
1593
  resolved: {
1594
+ /**
1595
+ * Monotonic version number of this snapshot at its scope.
1596
+ */
731
1597
  version: number;
1598
+ /**
1599
+ * System prompt active in this snapshot. Omitted on override snapshots that inherit the prompt from the cascade.
1600
+ */
732
1601
  prompt?: string;
1602
+ /**
1603
+ * Resolved list of hard rules. On override snapshots, may be omitted when the override doesn't customise rules.
1604
+ */
733
1605
  hardRules?: Array<{
1606
+ /**
1607
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
1608
+ */
734
1609
  name: string;
1610
+ /**
1611
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
1612
+ */
735
1613
  instruction: string;
736
- triggers?: {
737
- intents?: Array<string>;
738
- };
1614
+ /**
1615
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
1616
+ */
1617
+ intents?: Array<string>;
1618
+ /**
1619
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
1620
+ */
739
1621
  priority?: number;
1622
+ /**
1623
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
1624
+ */
1625
+ disabled?: boolean;
1626
+ }>;
1627
+ /**
1628
+ * Resolved list of few-shot examples. On override snapshots, may be omitted when the override doesn't customise examples.
1629
+ */
1630
+ examples?: Array<{
1631
+ /**
1632
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
1633
+ */
1634
+ name?: string;
1635
+ /**
1636
+ * Short human-readable description of the scenario this example illustrates.
1637
+ */
1638
+ description: string;
1639
+ /**
1640
+ * User message used as the example input.
1641
+ */
1642
+ input: string;
1643
+ /**
1644
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
1645
+ */
1646
+ output?: unknown;
1647
+ /**
1648
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
1649
+ */
1650
+ context?: unknown;
1651
+ /**
1652
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
1653
+ */
1654
+ intents?: Array<string>;
1655
+ /**
1656
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
1657
+ */
740
1658
  disabled?: boolean;
741
1659
  }>;
1660
+ /**
1661
+ * Toggled user-context fields exposed to the agent.
1662
+ */
742
1663
  userContextConfig?: {
743
1664
  [key: string]: boolean;
744
1665
  };
1666
+ /**
1667
+ * Per-channel writing style (response agent only).
1668
+ */
745
1669
  responseConfig?: {
1670
+ /**
1671
+ * Writing style applied when the conversation channel is email.
1672
+ */
746
1673
  email?: {
1674
+ /**
1675
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
1676
+ */
747
1677
  greeting?: string;
1678
+ /**
1679
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
1680
+ */
748
1681
  signature?: string;
1682
+ /**
1683
+ * Writing tone for this channel.
1684
+ */
749
1685
  tone?: 'empathetic' | 'formal' | 'friendly';
1686
+ /**
1687
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
1688
+ */
750
1689
  addressForm?: 'formal' | 'informal';
1690
+ /**
1691
+ * Allow the agent to use one emoji per message. Defaults to `false`.
1692
+ */
751
1693
  allowEmojis?: boolean;
752
1694
  };
1695
+ /**
1696
+ * Writing style applied when the conversation channel is chat.
1697
+ */
753
1698
  chat?: {
1699
+ /**
1700
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
1701
+ */
754
1702
  greeting?: string;
1703
+ /**
1704
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
1705
+ */
755
1706
  signature?: string;
1707
+ /**
1708
+ * Writing tone for this channel.
1709
+ */
756
1710
  tone?: 'empathetic' | 'formal' | 'friendly';
1711
+ /**
1712
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
1713
+ */
757
1714
  addressForm?: 'formal' | 'informal';
1715
+ /**
1716
+ * Allow the agent to use one emoji per message. Defaults to `false`.
1717
+ */
758
1718
  allowEmojis?: boolean;
759
1719
  };
760
1720
  };
1721
+ /**
1722
+ * Optional release note attached when this version was published.
1723
+ */
761
1724
  message?: string;
1725
+ /**
1726
+ * ISO timestamp of the publication that produced this snapshot.
1727
+ */
762
1728
  publishedAt?: string;
1729
+ /**
1730
+ * ISO timestamp of the last draft edit (drafts only).
1731
+ */
763
1732
  updatedAt?: string;
764
1733
  };
765
1734
  /**
766
1735
  * Override draft at this scope, when one exists.
767
1736
  */
768
1737
  draft?: {
1738
+ /**
1739
+ * Monotonic version number of this snapshot at its scope.
1740
+ */
769
1741
  version: number;
1742
+ /**
1743
+ * System prompt active in this snapshot. Omitted on override snapshots that inherit the prompt from the cascade.
1744
+ */
770
1745
  prompt?: string;
1746
+ /**
1747
+ * Resolved list of hard rules. On override snapshots, may be omitted when the override doesn't customise rules.
1748
+ */
771
1749
  hardRules?: Array<{
1750
+ /**
1751
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
1752
+ */
772
1753
  name: string;
1754
+ /**
1755
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
1756
+ */
773
1757
  instruction: string;
774
- triggers?: {
775
- intents?: Array<string>;
776
- };
1758
+ /**
1759
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
1760
+ */
1761
+ intents?: Array<string>;
1762
+ /**
1763
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
1764
+ */
777
1765
  priority?: number;
1766
+ /**
1767
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
1768
+ */
1769
+ disabled?: boolean;
1770
+ }>;
1771
+ /**
1772
+ * Resolved list of few-shot examples. On override snapshots, may be omitted when the override doesn't customise examples.
1773
+ */
1774
+ examples?: Array<{
1775
+ /**
1776
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
1777
+ */
1778
+ name?: string;
1779
+ /**
1780
+ * Short human-readable description of the scenario this example illustrates.
1781
+ */
1782
+ description: string;
1783
+ /**
1784
+ * User message used as the example input.
1785
+ */
1786
+ input: string;
1787
+ /**
1788
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
1789
+ */
1790
+ output?: unknown;
1791
+ /**
1792
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
1793
+ */
1794
+ context?: unknown;
1795
+ /**
1796
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
1797
+ */
1798
+ intents?: Array<string>;
1799
+ /**
1800
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
1801
+ */
778
1802
  disabled?: boolean;
779
1803
  }>;
1804
+ /**
1805
+ * Toggled user-context fields exposed to the agent.
1806
+ */
780
1807
  userContextConfig?: {
781
1808
  [key: string]: boolean;
782
1809
  };
1810
+ /**
1811
+ * Per-channel writing style (response agent only).
1812
+ */
783
1813
  responseConfig?: {
1814
+ /**
1815
+ * Writing style applied when the conversation channel is email.
1816
+ */
784
1817
  email?: {
1818
+ /**
1819
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
1820
+ */
785
1821
  greeting?: string;
1822
+ /**
1823
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
1824
+ */
786
1825
  signature?: string;
1826
+ /**
1827
+ * Writing tone for this channel.
1828
+ */
787
1829
  tone?: 'empathetic' | 'formal' | 'friendly';
1830
+ /**
1831
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
1832
+ */
788
1833
  addressForm?: 'formal' | 'informal';
1834
+ /**
1835
+ * Allow the agent to use one emoji per message. Defaults to `false`.
1836
+ */
789
1837
  allowEmojis?: boolean;
790
1838
  };
1839
+ /**
1840
+ * Writing style applied when the conversation channel is chat.
1841
+ */
791
1842
  chat?: {
1843
+ /**
1844
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
1845
+ */
792
1846
  greeting?: string;
1847
+ /**
1848
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
1849
+ */
793
1850
  signature?: string;
1851
+ /**
1852
+ * Writing tone for this channel.
1853
+ */
794
1854
  tone?: 'empathetic' | 'formal' | 'friendly';
1855
+ /**
1856
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
1857
+ */
795
1858
  addressForm?: 'formal' | 'informal';
1859
+ /**
1860
+ * Allow the agent to use one emoji per message. Defaults to `false`.
1861
+ */
796
1862
  allowEmojis?: boolean;
797
1863
  };
798
1864
  };
1865
+ /**
1866
+ * Optional release note attached when this version was published.
1867
+ */
799
1868
  message?: string;
1869
+ /**
1870
+ * ISO timestamp of the publication that produced this snapshot.
1871
+ */
800
1872
  publishedAt?: string;
1873
+ /**
1874
+ * ISO timestamp of the last draft edit (drafts only).
1875
+ */
801
1876
  updatedAt?: string;
802
1877
  };
803
1878
  };
@@ -862,87 +1937,317 @@ export type RollbackResponses = {
862
1937
  * Successful response
863
1938
  */
864
1939
  200: {
1940
+ /**
1941
+ * Machine name of the agent (e.g. `orchestrator`, `response`, `specialist_billing`).
1942
+ */
865
1943
  name: string;
1944
+ /**
1945
+ * Human-readable label shown in the dashboard.
1946
+ */
866
1947
  label: string;
1948
+ /**
1949
+ * Cascade level of this view (global / organization / entity).
1950
+ */
867
1951
  scope: {
1952
+ /**
1953
+ * Cascade level this config lives at — `global` (whole tenant), `organization` (per-org override), or `entity` (per-entity override).
1954
+ */
868
1955
  level: 'global' | 'organization' | 'entity';
1956
+ /**
1957
+ * ID of the organization when `level` is `organization` or `entity`.
1958
+ */
869
1959
  organizationId?: string;
1960
+ /**
1961
+ * ID of the entity when `level` is `entity`.
1962
+ */
870
1963
  entityId?: string;
871
1964
  };
872
1965
  /**
873
1966
  * The agent config the runtime sees at the request scope, after cascade resolution.
874
1967
  */
875
1968
  resolved: {
1969
+ /**
1970
+ * Monotonic version number of this snapshot at its scope.
1971
+ */
876
1972
  version: number;
1973
+ /**
1974
+ * System prompt active in this snapshot. Omitted on override snapshots that inherit the prompt from the cascade.
1975
+ */
877
1976
  prompt?: string;
1977
+ /**
1978
+ * Resolved list of hard rules. On override snapshots, may be omitted when the override doesn't customise rules.
1979
+ */
878
1980
  hardRules?: Array<{
1981
+ /**
1982
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
1983
+ */
879
1984
  name: string;
1985
+ /**
1986
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
1987
+ */
880
1988
  instruction: string;
881
- triggers?: {
882
- intents?: Array<string>;
883
- };
1989
+ /**
1990
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
1991
+ */
1992
+ intents?: Array<string>;
1993
+ /**
1994
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
1995
+ */
884
1996
  priority?: number;
1997
+ /**
1998
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
1999
+ */
2000
+ disabled?: boolean;
2001
+ }>;
2002
+ /**
2003
+ * Resolved list of few-shot examples. On override snapshots, may be omitted when the override doesn't customise examples.
2004
+ */
2005
+ examples?: Array<{
2006
+ /**
2007
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
2008
+ */
2009
+ name?: string;
2010
+ /**
2011
+ * Short human-readable description of the scenario this example illustrates.
2012
+ */
2013
+ description: string;
2014
+ /**
2015
+ * User message used as the example input.
2016
+ */
2017
+ input: string;
2018
+ /**
2019
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
2020
+ */
2021
+ output?: unknown;
2022
+ /**
2023
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
2024
+ */
2025
+ context?: unknown;
2026
+ /**
2027
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
2028
+ */
2029
+ intents?: Array<string>;
2030
+ /**
2031
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
2032
+ */
885
2033
  disabled?: boolean;
886
2034
  }>;
2035
+ /**
2036
+ * Toggled user-context fields exposed to the agent.
2037
+ */
887
2038
  userContextConfig?: {
888
2039
  [key: string]: boolean;
889
2040
  };
2041
+ /**
2042
+ * Per-channel writing style (response agent only).
2043
+ */
890
2044
  responseConfig?: {
2045
+ /**
2046
+ * Writing style applied when the conversation channel is email.
2047
+ */
891
2048
  email?: {
2049
+ /**
2050
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
2051
+ */
892
2052
  greeting?: string;
2053
+ /**
2054
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
2055
+ */
893
2056
  signature?: string;
2057
+ /**
2058
+ * Writing tone for this channel.
2059
+ */
894
2060
  tone?: 'empathetic' | 'formal' | 'friendly';
2061
+ /**
2062
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
2063
+ */
895
2064
  addressForm?: 'formal' | 'informal';
2065
+ /**
2066
+ * Allow the agent to use one emoji per message. Defaults to `false`.
2067
+ */
896
2068
  allowEmojis?: boolean;
897
2069
  };
2070
+ /**
2071
+ * Writing style applied when the conversation channel is chat.
2072
+ */
898
2073
  chat?: {
2074
+ /**
2075
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
2076
+ */
899
2077
  greeting?: string;
2078
+ /**
2079
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
2080
+ */
900
2081
  signature?: string;
2082
+ /**
2083
+ * Writing tone for this channel.
2084
+ */
901
2085
  tone?: 'empathetic' | 'formal' | 'friendly';
2086
+ /**
2087
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
2088
+ */
902
2089
  addressForm?: 'formal' | 'informal';
2090
+ /**
2091
+ * Allow the agent to use one emoji per message. Defaults to `false`.
2092
+ */
903
2093
  allowEmojis?: boolean;
904
2094
  };
905
2095
  };
2096
+ /**
2097
+ * Optional release note attached when this version was published.
2098
+ */
906
2099
  message?: string;
2100
+ /**
2101
+ * ISO timestamp of the publication that produced this snapshot.
2102
+ */
907
2103
  publishedAt?: string;
2104
+ /**
2105
+ * ISO timestamp of the last draft edit (drafts only).
2106
+ */
908
2107
  updatedAt?: string;
909
2108
  };
910
2109
  /**
911
2110
  * Override draft at this scope, when one exists.
912
2111
  */
913
2112
  draft?: {
2113
+ /**
2114
+ * Monotonic version number of this snapshot at its scope.
2115
+ */
914
2116
  version: number;
2117
+ /**
2118
+ * System prompt active in this snapshot. Omitted on override snapshots that inherit the prompt from the cascade.
2119
+ */
915
2120
  prompt?: string;
2121
+ /**
2122
+ * Resolved list of hard rules. On override snapshots, may be omitted when the override doesn't customise rules.
2123
+ */
916
2124
  hardRules?: Array<{
2125
+ /**
2126
+ * Stable identifier for the rule. Also used as the merge key when this rule is overridden at a deeper scope (organization/entity).
2127
+ */
917
2128
  name: string;
2129
+ /**
2130
+ * Plain-text instruction injected into the agent's prompt. The agent must always respect it.
2131
+ */
918
2132
  instruction: string;
919
- triggers?: {
920
- intents?: Array<string>;
921
- };
2133
+ /**
2134
+ * Restrict the rule to specific intents. Empty array = the rule applies on every turn regardless of intent.
2135
+ */
2136
+ intents?: Array<string>;
2137
+ /**
2138
+ * Relative priority within the agent's rule set (0–100, higher first). Use it to order conflicting rules; values are not absolute.
2139
+ */
922
2140
  priority?: number;
2141
+ /**
2142
+ * Set on an override doc to filter out an inherited rule of the same name at runtime. The rule shape is kept so toggling back works.
2143
+ */
2144
+ disabled?: boolean;
2145
+ }>;
2146
+ /**
2147
+ * Resolved list of few-shot examples. On override snapshots, may be omitted when the override doesn't customise examples.
2148
+ */
2149
+ examples?: Array<{
2150
+ /**
2151
+ * Stable identifier for the example. Also used as the merge key when this example is overridden at a deeper scope (organization/entity).
2152
+ */
2153
+ name?: string;
2154
+ /**
2155
+ * Short human-readable description of the scenario this example illustrates.
2156
+ */
2157
+ description: string;
2158
+ /**
2159
+ * User message used as the example input.
2160
+ */
2161
+ input: string;
2162
+ /**
2163
+ * Expected agent output. Shape depends on the agent type (structured JSON for orchestrator/specialist, plain text for response). Write outputs in English — the runtime LLM transposes them into the user's language.
2164
+ */
2165
+ output?: unknown;
2166
+ /**
2167
+ * Optional scenario context (user data, KB facts, previous decisions) attached to this example for the agent to read alongside the input.
2168
+ */
2169
+ context?: unknown;
2170
+ /**
2171
+ * Restrict the example to specific intents. Applied at runtime by specialist and response agents — the orchestrator ignores it since it runs before intent detection. Empty array = the example applies regardless of intent.
2172
+ */
2173
+ intents?: Array<string>;
2174
+ /**
2175
+ * Set on an override doc to filter out an inherited example of the same name at runtime.
2176
+ */
923
2177
  disabled?: boolean;
924
2178
  }>;
2179
+ /**
2180
+ * Toggled user-context fields exposed to the agent.
2181
+ */
925
2182
  userContextConfig?: {
926
2183
  [key: string]: boolean;
927
2184
  };
2185
+ /**
2186
+ * Per-channel writing style (response agent only).
2187
+ */
928
2188
  responseConfig?: {
2189
+ /**
2190
+ * Writing style applied when the conversation channel is email.
2191
+ */
929
2192
  email?: {
2193
+ /**
2194
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
2195
+ */
930
2196
  greeting?: string;
2197
+ /**
2198
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
2199
+ */
931
2200
  signature?: string;
2201
+ /**
2202
+ * Writing tone for this channel.
2203
+ */
932
2204
  tone?: 'empathetic' | 'formal' | 'friendly';
2205
+ /**
2206
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
2207
+ */
933
2208
  addressForm?: 'formal' | 'informal';
2209
+ /**
2210
+ * Allow the agent to use one emoji per message. Defaults to `false`.
2211
+ */
934
2212
  allowEmojis?: boolean;
935
2213
  };
2214
+ /**
2215
+ * Writing style applied when the conversation channel is chat.
2216
+ */
936
2217
  chat?: {
2218
+ /**
2219
+ * Greeting text to start the agent's response. The agent translates it into the user's language.
2220
+ */
937
2221
  greeting?: string;
2222
+ /**
2223
+ * Sign-off text appended to the agent's response. The agent translates it into the user's language.
2224
+ */
938
2225
  signature?: string;
2226
+ /**
2227
+ * Writing tone for this channel.
2228
+ */
939
2229
  tone?: 'empathetic' | 'formal' | 'friendly';
2230
+ /**
2231
+ * `formal` uses the polite pronoun in T-V languages (e.g. French "vous"); `informal` uses the familiar one. Defaults to `formal`.
2232
+ */
940
2233
  addressForm?: 'formal' | 'informal';
2234
+ /**
2235
+ * Allow the agent to use one emoji per message. Defaults to `false`.
2236
+ */
941
2237
  allowEmojis?: boolean;
942
2238
  };
943
2239
  };
2240
+ /**
2241
+ * Optional release note attached when this version was published.
2242
+ */
944
2243
  message?: string;
2244
+ /**
2245
+ * ISO timestamp of the publication that produced this snapshot.
2246
+ */
945
2247
  publishedAt?: string;
2248
+ /**
2249
+ * ISO timestamp of the last draft edit (drafts only).
2250
+ */
946
2251
  updatedAt?: string;
947
2252
  };
948
2253
  };
@@ -1015,9 +2320,12 @@ export type List2Responses = {
1015
2320
  */
1016
2321
  conversationId: string;
1017
2322
  /**
1018
- * Organization linked to the conversation (when you use organizations).
2323
+ * Organization the conversation is linked to (id + name); null when not tied to one.
1019
2324
  */
1020
- organizationId?: string;
2325
+ organization: {
2326
+ id: string;
2327
+ name: string;
2328
+ } | null;
1021
2329
  /**
1022
2330
  * Current lifecycle status of the conversation.
1023
2331
  */
@@ -1040,9 +2348,12 @@ export type List2Responses = {
1040
2348
  resolved?: boolean;
1041
2349
  } | null;
1042
2350
  /**
1043
- * Entity linked to the conversation (when you use entities).
2351
+ * Entity the conversation is linked to (id + name); null when not tied to one.
1044
2352
  */
1045
- entityId?: string;
2353
+ entity: {
2354
+ id: string;
2355
+ name: string;
2356
+ } | null;
1046
2357
  /**
1047
2358
  * Total number of messages exchanged so far (user + agent).
1048
2359
  */
@@ -1129,9 +2440,12 @@ export type Get2Responses = {
1129
2440
  */
1130
2441
  conversationId: string;
1131
2442
  /**
1132
- * Organization linked to the conversation (when you use organizations).
2443
+ * Organization the conversation is linked to (id + name); null when not tied to one.
1133
2444
  */
1134
- organizationId?: string;
2445
+ organization: {
2446
+ id: string;
2447
+ name: string;
2448
+ } | null;
1135
2449
  /**
1136
2450
  * Current lifecycle status of the conversation.
1137
2451
  */
@@ -1160,9 +2474,12 @@ export type Get2Responses = {
1160
2474
  };
1161
2475
  } | null;
1162
2476
  /**
1163
- * Entity linked to the conversation (when you use entities).
2477
+ * Entity the conversation is linked to (id + name); null when not tied to one.
1164
2478
  */
1165
- entityId?: string;
2479
+ entity: {
2480
+ id: string;
2481
+ name: string;
2482
+ } | null;
1166
2483
  /**
1167
2484
  * Total number of messages exchanged so far (user + agent).
1168
2485
  */
@@ -1319,9 +2636,12 @@ export type SendMessageResponses = {
1319
2636
  */
1320
2637
  conversationId: string;
1321
2638
  /**
1322
- * Organization linked to the conversation (when you use organizations).
2639
+ * Organization the conversation is linked to (id + name); null when not tied to one.
1323
2640
  */
1324
- organizationId?: string;
2641
+ organization: {
2642
+ id: string;
2643
+ name: string;
2644
+ } | null;
1325
2645
  /**
1326
2646
  * Index of the user message that was just processed. Pass this to [`validateResponse`](#tag/conversations/POST/conversations/{conversationId}/validate-response) if `mode` is `copilot` and you need to validate the response later.
1327
2647
  */
@@ -1346,9 +2666,12 @@ export type SendMessageResponses = {
1346
2666
  };
1347
2667
  } | null;
1348
2668
  /**
1349
- * Entity linked to the conversation (when you use entities).
2669
+ * Entity the conversation is linked to (id + name); null when not tied to one.
1350
2670
  */
1351
- entityId?: string;
2671
+ entity: {
2672
+ id: string;
2673
+ name: string;
2674
+ } | null;
1352
2675
  /**
1353
2676
  * AI-generated response to the user message.
1354
2677
  */
@@ -1543,6 +2866,10 @@ export type List3Data = {
1543
2866
  * Number of items to skip for pagination.
1544
2867
  */
1545
2868
  offset?: number | null;
2869
+ /**
2870
+ * Substring match on name or id (case-insensitive).
2871
+ */
2872
+ search?: string;
1546
2873
  };
1547
2874
  url: '/entities';
1548
2875
  };
@@ -1589,7 +2916,13 @@ export type List3Responses = {
1589
2916
  * Entity ID (format: ent_xxxxxxxxxxxx).
1590
2917
  */
1591
2918
  id: string;
1592
- organizationId?: string | null;
2919
+ /**
2920
+ * Parent organization ref (id + name); null when not tied to one.
2921
+ */
2922
+ organization: {
2923
+ id: string;
2924
+ name: string;
2925
+ } | null;
1593
2926
  /**
1594
2927
  * Human-readable name of the entity.
1595
2928
  */
@@ -1677,7 +3010,13 @@ export type Create2Responses = {
1677
3010
  * Entity ID (format: ent_xxxxxxxxxxxx).
1678
3011
  */
1679
3012
  id: string;
1680
- organizationId?: string | null;
3013
+ /**
3014
+ * Parent organization ref (id + name); null when not tied to one.
3015
+ */
3016
+ organization: {
3017
+ id: string;
3018
+ name: string;
3019
+ } | null;
1681
3020
  /**
1682
3021
  * Human-readable name of the entity.
1683
3022
  */
@@ -1808,7 +3147,13 @@ export type Get3Responses = {
1808
3147
  * Entity ID (format: ent_xxxxxxxxxxxx).
1809
3148
  */
1810
3149
  id: string;
1811
- organizationId?: string | null;
3150
+ /**
3151
+ * Parent organization ref (id + name); null when not tied to one.
3152
+ */
3153
+ organization: {
3154
+ id: string;
3155
+ name: string;
3156
+ } | null;
1812
3157
  /**
1813
3158
  * Human-readable name of the entity.
1814
3159
  */
@@ -1894,7 +3239,13 @@ export type Update2Responses = {
1894
3239
  * Entity ID (format: ent_xxxxxxxxxxxx).
1895
3240
  */
1896
3241
  id: string;
1897
- organizationId?: string | null;
3242
+ /**
3243
+ * Parent organization ref (id + name); null when not tied to one.
3244
+ */
3245
+ organization: {
3246
+ id: string;
3247
+ name: string;
3248
+ } | null;
1898
3249
  /**
1899
3250
  * Human-readable name of the entity.
1900
3251
  */
@@ -1974,17 +3325,50 @@ export type List4Responses = {
1974
3325
  */
1975
3326
  200: {
1976
3327
  articles: Array<{
3328
+ /**
3329
+ * KB article ID (format: kb_xxxxxxxxxxxx).
3330
+ */
1977
3331
  id: string;
3332
+ /**
3333
+ * Current published title of the article.
3334
+ */
1978
3335
  title: string;
3336
+ /**
3337
+ * Intent IDs this article serves. Empty array = always-on within its scope.
3338
+ */
1979
3339
  intents: Array<string>;
3340
+ /**
3341
+ * Cascade level at which this article was created.
3342
+ */
1980
3343
  scope: {
3344
+ /**
3345
+ * Cascade level this article lives at — `global` (whole tenant), `organization` (per-org), or `entity` (per-entity).
3346
+ */
1981
3347
  level: 'global' | 'organization' | 'entity';
3348
+ /**
3349
+ * ID of the organization when `level` is `organization` or `entity`.
3350
+ */
1982
3351
  organizationId?: string;
3352
+ /**
3353
+ * ID of the entity when `level` is `entity`.
3354
+ */
1983
3355
  entityId?: string;
1984
3356
  };
3357
+ /**
3358
+ * Version number of the published content.
3359
+ */
1985
3360
  version: number;
3361
+ /**
3362
+ * True when an unpublished draft exists on this article.
3363
+ */
1986
3364
  hasDraft: boolean;
3365
+ /**
3366
+ * ISO timestamp of the last publication.
3367
+ */
1987
3368
  publishedAt?: string;
3369
+ /**
3370
+ * ISO timestamp of the last modification.
3371
+ */
1988
3372
  updatedAt: string;
1989
3373
  }>;
1990
3374
  /**
@@ -2068,27 +3452,84 @@ export type Create3Responses = {
2068
3452
  * KB article ID (format: kb_xxxxxxxxxxxx).
2069
3453
  */
2070
3454
  id: string;
3455
+ /**
3456
+ * Cascade level at which this article was created.
3457
+ */
2071
3458
  scope: {
3459
+ /**
3460
+ * Cascade level this article lives at — `global` (whole tenant), `organization` (per-org), or `entity` (per-entity).
3461
+ */
2072
3462
  level: 'global' | 'organization' | 'entity';
3463
+ /**
3464
+ * ID of the organization when `level` is `organization` or `entity`.
3465
+ */
2073
3466
  organizationId?: string;
3467
+ /**
3468
+ * ID of the entity when `level` is `entity`.
3469
+ */
2074
3470
  entityId?: string;
2075
3471
  };
3472
+ /**
3473
+ * Intent IDs this article serves. Empty array = always-on within its scope.
3474
+ */
2076
3475
  intents: Array<string>;
3476
+ /**
3477
+ * Currently published content of the article.
3478
+ */
2077
3479
  published: {
3480
+ /**
3481
+ * Monotonic version number of this snapshot.
3482
+ */
2078
3483
  version: number;
3484
+ /**
3485
+ * Article title at this version.
3486
+ */
2079
3487
  title: string;
3488
+ /**
3489
+ * Article body (Markdown) at this version.
3490
+ */
2080
3491
  content: string;
3492
+ /**
3493
+ * ISO timestamp of the publication that produced this snapshot.
3494
+ */
2081
3495
  publishedAt?: string;
3496
+ /**
3497
+ * ISO timestamp of the last draft edit (drafts only).
3498
+ */
2082
3499
  updatedAt?: string;
2083
3500
  };
3501
+ /**
3502
+ * Pending draft content, when one exists. Promote it via `publish: true` on update.
3503
+ */
2084
3504
  draft?: {
3505
+ /**
3506
+ * Monotonic version number of this snapshot.
3507
+ */
2085
3508
  version: number;
3509
+ /**
3510
+ * Article title at this version.
3511
+ */
2086
3512
  title: string;
3513
+ /**
3514
+ * Article body (Markdown) at this version.
3515
+ */
2087
3516
  content: string;
3517
+ /**
3518
+ * ISO timestamp of the publication that produced this snapshot.
3519
+ */
2088
3520
  publishedAt?: string;
3521
+ /**
3522
+ * ISO timestamp of the last draft edit (drafts only).
3523
+ */
2089
3524
  updatedAt?: string;
2090
3525
  };
3526
+ /**
3527
+ * ISO timestamp when the article was created.
3528
+ */
2091
3529
  createdAt: string;
3530
+ /**
3531
+ * ISO timestamp of the last modification (publish, draft edit, intents change).
3532
+ */
2092
3533
  updatedAt: string;
2093
3534
  };
2094
3535
  };
@@ -2142,6 +3583,9 @@ export type Delete3Responses = {
2142
3583
  * Successful response
2143
3584
  */
2144
3585
  200: {
3586
+ /**
3587
+ * Confirmation message describing the deletion outcome.
3588
+ */
2145
3589
  message: string;
2146
3590
  };
2147
3591
  };
@@ -2199,27 +3643,84 @@ export type Get4Responses = {
2199
3643
  * KB article ID (format: kb_xxxxxxxxxxxx).
2200
3644
  */
2201
3645
  id: string;
3646
+ /**
3647
+ * Cascade level at which this article was created.
3648
+ */
2202
3649
  scope: {
3650
+ /**
3651
+ * Cascade level this article lives at — `global` (whole tenant), `organization` (per-org), or `entity` (per-entity).
3652
+ */
2203
3653
  level: 'global' | 'organization' | 'entity';
3654
+ /**
3655
+ * ID of the organization when `level` is `organization` or `entity`.
3656
+ */
2204
3657
  organizationId?: string;
3658
+ /**
3659
+ * ID of the entity when `level` is `entity`.
3660
+ */
2205
3661
  entityId?: string;
2206
3662
  };
3663
+ /**
3664
+ * Intent IDs this article serves. Empty array = always-on within its scope.
3665
+ */
2207
3666
  intents: Array<string>;
3667
+ /**
3668
+ * Currently published content of the article.
3669
+ */
2208
3670
  published: {
3671
+ /**
3672
+ * Monotonic version number of this snapshot.
3673
+ */
2209
3674
  version: number;
3675
+ /**
3676
+ * Article title at this version.
3677
+ */
2210
3678
  title: string;
3679
+ /**
3680
+ * Article body (Markdown) at this version.
3681
+ */
2211
3682
  content: string;
3683
+ /**
3684
+ * ISO timestamp of the publication that produced this snapshot.
3685
+ */
2212
3686
  publishedAt?: string;
3687
+ /**
3688
+ * ISO timestamp of the last draft edit (drafts only).
3689
+ */
2213
3690
  updatedAt?: string;
2214
3691
  };
3692
+ /**
3693
+ * Pending draft content, when one exists. Promote it via `publish: true` on update.
3694
+ */
2215
3695
  draft?: {
3696
+ /**
3697
+ * Monotonic version number of this snapshot.
3698
+ */
2216
3699
  version: number;
3700
+ /**
3701
+ * Article title at this version.
3702
+ */
2217
3703
  title: string;
3704
+ /**
3705
+ * Article body (Markdown) at this version.
3706
+ */
2218
3707
  content: string;
3708
+ /**
3709
+ * ISO timestamp of the publication that produced this snapshot.
3710
+ */
2219
3711
  publishedAt?: string;
3712
+ /**
3713
+ * ISO timestamp of the last draft edit (drafts only).
3714
+ */
2220
3715
  updatedAt?: string;
2221
3716
  };
3717
+ /**
3718
+ * ISO timestamp when the article was created.
3719
+ */
2222
3720
  createdAt: string;
3721
+ /**
3722
+ * ISO timestamp of the last modification (publish, draft edit, intents change).
3723
+ */
2223
3724
  updatedAt: string;
2224
3725
  };
2225
3726
  };
@@ -2294,27 +3795,84 @@ export type Update3Responses = {
2294
3795
  * KB article ID (format: kb_xxxxxxxxxxxx).
2295
3796
  */
2296
3797
  id: string;
3798
+ /**
3799
+ * Cascade level at which this article was created.
3800
+ */
2297
3801
  scope: {
3802
+ /**
3803
+ * Cascade level this article lives at — `global` (whole tenant), `organization` (per-org), or `entity` (per-entity).
3804
+ */
2298
3805
  level: 'global' | 'organization' | 'entity';
3806
+ /**
3807
+ * ID of the organization when `level` is `organization` or `entity`.
3808
+ */
2299
3809
  organizationId?: string;
3810
+ /**
3811
+ * ID of the entity when `level` is `entity`.
3812
+ */
2300
3813
  entityId?: string;
2301
3814
  };
3815
+ /**
3816
+ * Intent IDs this article serves. Empty array = always-on within its scope.
3817
+ */
2302
3818
  intents: Array<string>;
3819
+ /**
3820
+ * Currently published content of the article.
3821
+ */
2303
3822
  published: {
3823
+ /**
3824
+ * Monotonic version number of this snapshot.
3825
+ */
2304
3826
  version: number;
3827
+ /**
3828
+ * Article title at this version.
3829
+ */
2305
3830
  title: string;
3831
+ /**
3832
+ * Article body (Markdown) at this version.
3833
+ */
2306
3834
  content: string;
3835
+ /**
3836
+ * ISO timestamp of the publication that produced this snapshot.
3837
+ */
2307
3838
  publishedAt?: string;
3839
+ /**
3840
+ * ISO timestamp of the last draft edit (drafts only).
3841
+ */
2308
3842
  updatedAt?: string;
2309
3843
  };
3844
+ /**
3845
+ * Pending draft content, when one exists. Promote it via `publish: true` on update.
3846
+ */
2310
3847
  draft?: {
3848
+ /**
3849
+ * Monotonic version number of this snapshot.
3850
+ */
2311
3851
  version: number;
3852
+ /**
3853
+ * Article title at this version.
3854
+ */
2312
3855
  title: string;
3856
+ /**
3857
+ * Article body (Markdown) at this version.
3858
+ */
2313
3859
  content: string;
3860
+ /**
3861
+ * ISO timestamp of the publication that produced this snapshot.
3862
+ */
2314
3863
  publishedAt?: string;
3864
+ /**
3865
+ * ISO timestamp of the last draft edit (drafts only).
3866
+ */
2315
3867
  updatedAt?: string;
2316
3868
  };
3869
+ /**
3870
+ * ISO timestamp when the article was created.
3871
+ */
2317
3872
  createdAt: string;
3873
+ /**
3874
+ * ISO timestamp of the last modification (publish, draft edit, intents change).
3875
+ */
2318
3876
  updatedAt: string;
2319
3877
  };
2320
3878
  };
@@ -2372,27 +3930,84 @@ export type Publish2Responses = {
2372
3930
  * KB article ID (format: kb_xxxxxxxxxxxx).
2373
3931
  */
2374
3932
  id: string;
3933
+ /**
3934
+ * Cascade level at which this article was created.
3935
+ */
2375
3936
  scope: {
3937
+ /**
3938
+ * Cascade level this article lives at — `global` (whole tenant), `organization` (per-org), or `entity` (per-entity).
3939
+ */
2376
3940
  level: 'global' | 'organization' | 'entity';
3941
+ /**
3942
+ * ID of the organization when `level` is `organization` or `entity`.
3943
+ */
2377
3944
  organizationId?: string;
3945
+ /**
3946
+ * ID of the entity when `level` is `entity`.
3947
+ */
2378
3948
  entityId?: string;
2379
3949
  };
3950
+ /**
3951
+ * Intent IDs this article serves. Empty array = always-on within its scope.
3952
+ */
2380
3953
  intents: Array<string>;
3954
+ /**
3955
+ * Currently published content of the article.
3956
+ */
2381
3957
  published: {
3958
+ /**
3959
+ * Monotonic version number of this snapshot.
3960
+ */
2382
3961
  version: number;
3962
+ /**
3963
+ * Article title at this version.
3964
+ */
2383
3965
  title: string;
3966
+ /**
3967
+ * Article body (Markdown) at this version.
3968
+ */
2384
3969
  content: string;
3970
+ /**
3971
+ * ISO timestamp of the publication that produced this snapshot.
3972
+ */
2385
3973
  publishedAt?: string;
3974
+ /**
3975
+ * ISO timestamp of the last draft edit (drafts only).
3976
+ */
2386
3977
  updatedAt?: string;
2387
3978
  };
3979
+ /**
3980
+ * Pending draft content, when one exists. Promote it via `publish: true` on update.
3981
+ */
2388
3982
  draft?: {
3983
+ /**
3984
+ * Monotonic version number of this snapshot.
3985
+ */
2389
3986
  version: number;
3987
+ /**
3988
+ * Article title at this version.
3989
+ */
2390
3990
  title: string;
3991
+ /**
3992
+ * Article body (Markdown) at this version.
3993
+ */
2391
3994
  content: string;
3995
+ /**
3996
+ * ISO timestamp of the publication that produced this snapshot.
3997
+ */
2392
3998
  publishedAt?: string;
3999
+ /**
4000
+ * ISO timestamp of the last draft edit (drafts only).
4001
+ */
2393
4002
  updatedAt?: string;
2394
4003
  };
4004
+ /**
4005
+ * ISO timestamp when the article was created.
4006
+ */
2395
4007
  createdAt: string;
4008
+ /**
4009
+ * ISO timestamp of the last modification (publish, draft edit, intents change).
4010
+ */
2396
4011
  updatedAt: string;
2397
4012
  };
2398
4013
  };
@@ -2455,27 +4070,84 @@ export type Rollback2Responses = {
2455
4070
  * KB article ID (format: kb_xxxxxxxxxxxx).
2456
4071
  */
2457
4072
  id: string;
4073
+ /**
4074
+ * Cascade level at which this article was created.
4075
+ */
2458
4076
  scope: {
4077
+ /**
4078
+ * Cascade level this article lives at — `global` (whole tenant), `organization` (per-org), or `entity` (per-entity).
4079
+ */
2459
4080
  level: 'global' | 'organization' | 'entity';
4081
+ /**
4082
+ * ID of the organization when `level` is `organization` or `entity`.
4083
+ */
2460
4084
  organizationId?: string;
4085
+ /**
4086
+ * ID of the entity when `level` is `entity`.
4087
+ */
2461
4088
  entityId?: string;
2462
4089
  };
4090
+ /**
4091
+ * Intent IDs this article serves. Empty array = always-on within its scope.
4092
+ */
2463
4093
  intents: Array<string>;
4094
+ /**
4095
+ * Currently published content of the article.
4096
+ */
2464
4097
  published: {
4098
+ /**
4099
+ * Monotonic version number of this snapshot.
4100
+ */
2465
4101
  version: number;
4102
+ /**
4103
+ * Article title at this version.
4104
+ */
2466
4105
  title: string;
4106
+ /**
4107
+ * Article body (Markdown) at this version.
4108
+ */
2467
4109
  content: string;
4110
+ /**
4111
+ * ISO timestamp of the publication that produced this snapshot.
4112
+ */
2468
4113
  publishedAt?: string;
4114
+ /**
4115
+ * ISO timestamp of the last draft edit (drafts only).
4116
+ */
2469
4117
  updatedAt?: string;
2470
4118
  };
4119
+ /**
4120
+ * Pending draft content, when one exists. Promote it via `publish: true` on update.
4121
+ */
2471
4122
  draft?: {
4123
+ /**
4124
+ * Monotonic version number of this snapshot.
4125
+ */
2472
4126
  version: number;
4127
+ /**
4128
+ * Article title at this version.
4129
+ */
2473
4130
  title: string;
4131
+ /**
4132
+ * Article body (Markdown) at this version.
4133
+ */
2474
4134
  content: string;
4135
+ /**
4136
+ * ISO timestamp of the publication that produced this snapshot.
4137
+ */
2475
4138
  publishedAt?: string;
4139
+ /**
4140
+ * ISO timestamp of the last draft edit (drafts only).
4141
+ */
2476
4142
  updatedAt?: string;
2477
4143
  };
4144
+ /**
4145
+ * ISO timestamp when the article was created.
4146
+ */
2478
4147
  createdAt: string;
4148
+ /**
4149
+ * ISO timestamp of the last modification (publish, draft edit, intents change).
4150
+ */
2479
4151
  updatedAt: string;
2480
4152
  };
2481
4153
  };
@@ -2492,6 +4164,10 @@ export type List5Data = {
2492
4164
  * Number of items to skip for pagination.
2493
4165
  */
2494
4166
  offset?: number | null;
4167
+ /**
4168
+ * Substring match on name or id (case-insensitive).
4169
+ */
4170
+ search?: string;
2495
4171
  };
2496
4172
  url: '/organizations';
2497
4173
  };