@opencx/mcp 1.11.83 → 1.11.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schema.d.ts CHANGED
@@ -819,6 +819,46 @@ export interface paths {
819
819
  patch?: never;
820
820
  trace?: never;
821
821
  };
822
+ "/knowledgebase-items": {
823
+ parameters: {
824
+ query?: never;
825
+ header?: never;
826
+ path?: never;
827
+ cookie?: never;
828
+ };
829
+ /**
830
+ * List knowledge base items
831
+ * @description List knowledge base items synced from external data sources (website, Confluence, Notion, etc.). Use this to find item ids and inspect their contact-segment restrictions.
832
+ */
833
+ get: operations["listKnowledgebaseItems"];
834
+ put?: never;
835
+ post?: never;
836
+ delete?: never;
837
+ options?: never;
838
+ head?: never;
839
+ patch?: never;
840
+ trace?: never;
841
+ };
842
+ "/knowledgebase-items/{id}": {
843
+ parameters: {
844
+ query?: never;
845
+ header?: never;
846
+ path?: never;
847
+ cookie?: never;
848
+ };
849
+ get?: never;
850
+ /**
851
+ * Update a knowledge base item
852
+ * @description Update a knowledge base item. Primarily used to set `restricted_to_segments` so the AI only uses the item for contacts in the given segments (empty = all contacts).
853
+ */
854
+ put: operations["updateKnowledgebaseItem"];
855
+ post?: never;
856
+ delete?: never;
857
+ options?: never;
858
+ head?: never;
859
+ patch?: never;
860
+ trace?: never;
861
+ };
822
862
  "/csat/scores": {
823
863
  parameters: {
824
864
  query?: never;
@@ -1519,7 +1559,7 @@ export interface paths {
1519
1559
  put?: never;
1520
1560
  /**
1521
1561
  * [Beta] Validate a workflow definition
1522
- * @description Validate workflow blocks without creating a workflow. Returns validation issues and the list of action types used. Use this before creating or updating a workflow to catch errors early.
1562
+ * @description Validate workflow blocks without creating a workflow. Runs both the structural check and the deep semantic validation the dashboard editor runs on Save (action inputs against each action's input schema, trigger configuration against the trigger's configuration_def). Returns validation issues and the list of action types used. Use this before creating or updating a workflow to catch errors early.
1523
1563
  */
1524
1564
  post: operations["validateWorkflow"];
1525
1565
  delete?: never;
@@ -1543,7 +1583,7 @@ export interface paths {
1543
1583
  put?: never;
1544
1584
  /**
1545
1585
  * [Beta] Create a workflow
1546
- * @description Create a new workflow. The workflow is created as an inactive draft (version 1). Use the activate endpoint to make it live. Use GET /workflows/definitions to discover available action and trigger types.
1586
+ * @description Create a new workflow. The workflow is created as an inactive draft (version 1). Use the activate endpoint to make it live. Use GET /workflows/definitions to discover available action and trigger types. Rejects definitions that fail deep validation (missing required action inputs or trigger configuration) with a 400 carrying structured issues.
1547
1587
  */
1548
1588
  post: operations["createWorkflow"];
1549
1589
  delete?: never;
@@ -1561,7 +1601,7 @@ export interface paths {
1561
1601
  };
1562
1602
  /**
1563
1603
  * [Beta] Get a workflow
1564
- * @description Get a specific workflow by its UUID, including its blocks, trigger configuration, and active status.
1604
+ * @description Get a specific workflow by its UUID, including its blocks, trigger configuration, and active status. In companion context (acting user), the user’s unsaved draft — when one exists — is returned as the working copy in place of the latest saved version.
1565
1605
  */
1566
1606
  get: operations["getWorkflow"];
1567
1607
  put?: never;
@@ -1575,7 +1615,7 @@ export interface paths {
1575
1615
  head?: never;
1576
1616
  /**
1577
1617
  * [Beta] Update a workflow (creates a new version)
1578
- * @description Update a workflow by creating a new version. The new version is created as an inactive draft. Only the provided fields are changed; omitted fields carry over from the current version. Use the activate endpoint to make the new version live.
1618
+ * @description Update a workflow by creating a new version. The new version is created as an inactive draft. Only the provided fields are changed; omitted fields carry over from the current version. Use the activate endpoint to make the new version live. When blocks or trigger fields are provided, the resulting definition must pass deep validation — failures return a 400 with structured issues.
1579
1619
  */
1580
1620
  patch: operations["updateWorkflow"];
1581
1621
  trace?: never;
@@ -1595,7 +1635,7 @@ export interface paths {
1595
1635
  head?: never;
1596
1636
  /**
1597
1637
  * [Beta] Update a workflow draft in place when possible
1598
- * @description Updates the latest workflow version in place when it is already a draft. If the latest version is active, a new inactive draft version is created instead.
1638
+ * @description Updates the latest workflow version in place when it is a pristine draft (inactive and without recorded non-test runs). If the latest version is active or has real run history, a new inactive draft version is created instead. In companion context (acting user), the edit applies on top of the user’s unsaved editor draft — snapshotting their work-in-progress into the version — and consumes that draft. The resulting definition must pass deep validation when it changes; failures return a 400 with structured issues. Only versions can be activated.
1599
1639
  */
1600
1640
  patch: operations["updateWorkflowDraftAware"];
1601
1641
  trace?: never;
@@ -2458,6 +2498,26 @@ export interface paths {
2458
2498
  patch?: never;
2459
2499
  trace?: never;
2460
2500
  };
2501
+ "/training/{id}/restrictions": {
2502
+ parameters: {
2503
+ query?: never;
2504
+ header?: never;
2505
+ path?: never;
2506
+ cookie?: never;
2507
+ };
2508
+ get?: never;
2509
+ /**
2510
+ * Update instruction restrictions
2511
+ * @description Set the contact-segment and/or channel restrictions for an instruction without changing its content. An empty array clears that restriction (available everywhere).
2512
+ */
2513
+ put: operations["updateTrainingRestrictions"];
2514
+ post?: never;
2515
+ delete?: never;
2516
+ options?: never;
2517
+ head?: never;
2518
+ patch?: never;
2519
+ trace?: never;
2520
+ };
2461
2521
  "/training/{id}/diff": {
2462
2522
  parameters: {
2463
2523
  query?: never;
@@ -3741,6 +3801,67 @@ export interface components {
3741
3801
  /** Format: date-time */
3742
3802
  before?: string;
3743
3803
  };
3804
+ CreateGroupDto: {
3805
+ name: string;
3806
+ description?: string;
3807
+ is_support_enabled?: boolean;
3808
+ support_office_hours_id?: string | null;
3809
+ /** @enum {string} */
3810
+ support_assignment_strategy?: "least-busy" | "round-robin" | "unassigned";
3811
+ };
3812
+ CreateVocCategoryDto: {
3813
+ name: string;
3814
+ description?: string | null;
3815
+ };
3816
+ UpdateCategoryDto: {
3817
+ name?: string;
3818
+ description?: string | null;
3819
+ };
3820
+ GetVocQueryDto: {
3821
+ /** @description Filter by category name */
3822
+ category?: string | null;
3823
+ status?: ("all" | "unresolved" | "resolved" | "archived") | null;
3824
+ sentiment?: ("angry" | "happy" | "neutral") | null;
3825
+ sortBy?: ("occurrence_count" | "last_seen_at" | "first_seen_at" | "created_at") | null;
3826
+ sortOrder?: ("asc" | "desc") | null;
3827
+ minSessions?: number | null;
3828
+ /** @description Search in insight content */
3829
+ search?: string | null;
3830
+ /** @description Filter by specific team ID or none for unassigned insights */
3831
+ teamId?: (string | "not_assigned" | null) | null;
3832
+ /** @description Filter by insight number */
3833
+ insightNumber?: number | null;
3834
+ /** @description Filter by language */
3835
+ sessionLanguage?: ("az" | "el" | "de" | "fr" | "it" | "es" | "pt" | "nl" | "da" | "sv" | "no" | "fi" | "et" | "is" | "pl" | "cs" | "sk" | "hu" | "ro" | "bg" | "hr" | "sr" | "uk" | "ru" | "tr" | "en" | "zh" | "ja" | "ko" | "hi" | "bn" | "id" | "ms" | "th" | "vi" | "tl" | "ar" | "he" | "fa" | "ur" | "af" | "sw" | "ku" | "ckb" | "kmr") | null;
3836
+ ticketSentiment?: ("angry" | "happy" | "neutral") | null;
3837
+ /** @description Filter by session channel */
3838
+ channel?: components["schemas"]["SessionChannel"] | null;
3839
+ sessionFromDate?: string | null;
3840
+ sessionToDate?: string | null;
3841
+ /** @description Filter by session status */
3842
+ sessionStatus?: ("closed_resolved" | "closed_unresolved" | "open") | null;
3843
+ sessionContactId?: string | null;
3844
+ /** @description A list of objects with key-value pairs to filter by. Relationship is OR between objects, and AND between the values in each object */
3845
+ ticketCustomData?: {
3846
+ [key: string]: string;
3847
+ }[] | null;
3848
+ /** @description Filter by contact custom data key-value pairs */
3849
+ contactCustomData?: {
3850
+ [key: string]: string;
3851
+ }[] | null;
3852
+ /** @default 1 */
3853
+ page: number;
3854
+ };
3855
+ ArchiveInsightDto: {
3856
+ /**
3857
+ * @description When the insight should resurface after archiving
3858
+ * @default until_escalating
3859
+ * @enum {string}
3860
+ */
3861
+ policy: "forever" | "until_count" | "until_escalating";
3862
+ /** @description Reason for archiving */
3863
+ reason?: string;
3864
+ };
3744
3865
  MakeOutboundCallDto: {
3745
3866
  phoneAgentId: string;
3746
3867
  contact: {
@@ -3848,67 +3969,6 @@ export interface components {
3848
3969
  }[];
3849
3970
  }[];
3850
3971
  };
3851
- CreateGroupDto: {
3852
- name: string;
3853
- description?: string;
3854
- is_support_enabled?: boolean;
3855
- support_office_hours_id?: string | null;
3856
- /** @enum {string} */
3857
- support_assignment_strategy?: "least-busy" | "round-robin" | "unassigned";
3858
- };
3859
- CreateVocCategoryDto: {
3860
- name: string;
3861
- description?: string | null;
3862
- };
3863
- UpdateCategoryDto: {
3864
- name?: string;
3865
- description?: string | null;
3866
- };
3867
- GetVocQueryDto: {
3868
- /** @description Filter by category name */
3869
- category?: string | null;
3870
- status?: ("all" | "unresolved" | "resolved" | "archived") | null;
3871
- sentiment?: ("angry" | "happy" | "neutral") | null;
3872
- sortBy?: ("occurrence_count" | "last_seen_at" | "first_seen_at" | "created_at") | null;
3873
- sortOrder?: ("asc" | "desc") | null;
3874
- minSessions?: number | null;
3875
- /** @description Search in insight content */
3876
- search?: string | null;
3877
- /** @description Filter by specific team ID or none for unassigned insights */
3878
- teamId?: (string | "not_assigned" | null) | null;
3879
- /** @description Filter by insight number */
3880
- insightNumber?: number | null;
3881
- /** @description Filter by language */
3882
- sessionLanguage?: ("az" | "el" | "de" | "fr" | "it" | "es" | "pt" | "nl" | "da" | "sv" | "no" | "fi" | "et" | "is" | "pl" | "cs" | "sk" | "hu" | "ro" | "bg" | "hr" | "sr" | "uk" | "ru" | "tr" | "en" | "zh" | "ja" | "ko" | "hi" | "bn" | "id" | "ms" | "th" | "vi" | "tl" | "ar" | "he" | "fa" | "ur" | "af" | "sw" | "ku" | "ckb" | "kmr") | null;
3883
- ticketSentiment?: ("angry" | "happy" | "neutral") | null;
3884
- /** @description Filter by session channel */
3885
- channel?: components["schemas"]["SessionChannel"] | null;
3886
- sessionFromDate?: string | null;
3887
- sessionToDate?: string | null;
3888
- /** @description Filter by session status */
3889
- sessionStatus?: ("closed_resolved" | "closed_unresolved" | "open") | null;
3890
- sessionContactId?: string | null;
3891
- /** @description A list of objects with key-value pairs to filter by. Relationship is OR between objects, and AND between the values in each object */
3892
- ticketCustomData?: {
3893
- [key: string]: string;
3894
- }[] | null;
3895
- /** @description Filter by contact custom data key-value pairs */
3896
- contactCustomData?: {
3897
- [key: string]: string;
3898
- }[] | null;
3899
- /** @default 1 */
3900
- page: number;
3901
- };
3902
- ArchiveInsightDto: {
3903
- /**
3904
- * @description When the insight should resurface after archiving
3905
- * @default until_escalating
3906
- * @enum {string}
3907
- */
3908
- policy: "forever" | "until_count" | "until_escalating";
3909
- /** @description Reason for archiving */
3910
- reason?: string;
3911
- };
3912
3972
  FileUploadDto: {
3913
3973
  /**
3914
3974
  * Format: binary
@@ -3959,6 +4019,8 @@ export interface components {
3959
4019
  crawl_interval_hours: number | null;
3960
4020
  /** @default true */
3961
4021
  auto_start_crawl: boolean;
4022
+ /** @default [] */
4023
+ restricted_to_channels: components["schemas"]["SessionChannel"][];
3962
4024
  };
3963
4025
  UpdateWebsiteDatasourceDto: {
3964
4026
  display_name?: string;
@@ -3968,6 +4030,7 @@ export interface components {
3968
4030
  crawl_interval_hours?: number | null;
3969
4031
  /** @enum {string} */
3970
4032
  status?: "active" | "paused";
4033
+ restricted_to_channels?: components["schemas"]["SessionChannel"][];
3971
4034
  };
3972
4035
  BulkPageActionDto: {
3973
4036
  page_ids: string[];
@@ -4429,6 +4492,19 @@ export interface components {
4429
4492
  */
4430
4493
  limit: number;
4431
4494
  };
4495
+ UpdatePublicKnowledgebaseItem: {
4496
+ /** @description Contact segment ids this item should be restricted to. Pass [] to make it available to all contacts. */
4497
+ restricted_to_segments?: string[];
4498
+ /** @description Channels this item should be restricted to. Pass [] to make it available on all channels. */
4499
+ restricted_to_channels?: components["schemas"]["SessionChannel"][];
4500
+ /** @description ISO 8601 instant (UTC) when the AI may start using this item. Null clears it. */
4501
+ start_time?: string | null;
4502
+ /** @description ISO 8601 instant (UTC) when the AI stops using this item. Null clears it. */
4503
+ end_time?: string | null;
4504
+ /** @enum {string} */
4505
+ visibility?: "internal" | "public";
4506
+ title?: string;
4507
+ };
4432
4508
  EmailRecipient: {
4433
4509
  /** Format: email */
4434
4510
  to_email: string;
@@ -4624,6 +4700,12 @@ export interface components {
4624
4700
  /** @description ISO 8601 instant (UTC) when the AI stops using this instruction. Null clears the end bound. */
4625
4701
  end_time?: string | null;
4626
4702
  };
4703
+ UpdateTrainingRestrictionsDto: {
4704
+ /** @description Channels this instruction applies to. Pass [] to make it available on all channels. */
4705
+ restricted_to_channels?: components["schemas"]["SessionChannel"][];
4706
+ /** @description Contact segment ids this instruction applies to. Pass [] to make it available to all contacts. */
4707
+ restricted_to_segments?: string[];
4708
+ };
4627
4709
  ApplyTrainingDiffDto: {
4628
4710
  /** @description Pre-rendered TipTap diff HTML */
4629
4711
  diff_html: string;
@@ -4711,6 +4793,8 @@ export interface components {
4711
4793
  * @enum {string}
4712
4794
  */
4713
4795
  trigger_type: "manual-trigger" | "ai-trigger" | "cron-trigger" | "form-trigger" | "webhook" | "contact-created" | "phone-call-started" | "phone-call-finished" | "ticket-created" | "ticket-reassigned" | "ticket-resolved" | "ticket-handoff" | "pre-ticket-handoff" | "ticket-tag-added" | "ticket-inactive" | "agent-inactive" | "sequence-completed" | "csat-score-submit" | "prohibited-topic-detected" | "sla-first-reply-breached" | "sla-next-reply-breached" | "sla-resolution-breached" | "voice-call-transferred" | "pre-voice-call-transfer" | "pre-phone-call-finished" | "manual-ticket-trigger" | "contact-message-received" | "macro-called" | "agent-availability-changed" | "agent-avail-in-team-changed";
4796
+ /** @description Trigger configuration to validate against the trigger's configuration_def. When omitted, the trigger is validated as if unconfigured — triggers with required configuration (e.g. cron-trigger, ai-trigger) will report errors. */
4797
+ trigger_configuration?: unknown | null;
4714
4798
  /** @description Workflow blocks to validate */
4715
4799
  workflow_blocks: unknown[];
4716
4800
  };
@@ -5041,7 +5125,7 @@ export interface components {
5041
5125
  /** @constant */
5042
5126
  type: "response_skipped";
5043
5127
  /** @enum {string} */
5044
- reason?: "empty_response" | "potential_answers_dead_end";
5128
+ reason?: "empty_response" | "potential_answers_dead_end" | "silent_handoff";
5045
5129
  reasoning?: ({
5046
5130
  /** @constant */
5047
5131
  type: "reasoning";
@@ -5310,6 +5394,50 @@ export interface components {
5310
5394
  edited_at?: string | null;
5311
5395
  deleted_at?: string | null;
5312
5396
  };
5397
+ GroupUsersDto: {
5398
+ id: number;
5399
+ name: string;
5400
+ email: string;
5401
+ is_available: boolean;
5402
+ group_capacity: number | null;
5403
+ global_capacity: number;
5404
+ };
5405
+ GroupDto: {
5406
+ id: string;
5407
+ organization_id: string;
5408
+ name: string;
5409
+ description: string | null;
5410
+ is_support_enabled: boolean;
5411
+ support_office_hours_id: string | null;
5412
+ /** @enum {string} */
5413
+ support_assignment_strategy: "least-busy" | "round-robin" | "unassigned";
5414
+ created_at: string | null;
5415
+ updated_at: string | null;
5416
+ deleted_at: string | null;
5417
+ };
5418
+ VersionHistoryItemDto: {
5419
+ /** Format: uuid */
5420
+ id: string;
5421
+ instruction_id: string;
5422
+ version_number: number;
5423
+ question: string;
5424
+ answer: string;
5425
+ /** @enum {string} */
5426
+ type: "BEHAVIORAL" | "SCENARIO_SPECIFIC";
5427
+ /** Format: date-time */
5428
+ published_at: string;
5429
+ published_by: number | null;
5430
+ published_by_name: string | null;
5431
+ /** Format: date-time */
5432
+ created_at: string;
5433
+ start_time: string | null;
5434
+ end_time: string | null;
5435
+ };
5436
+ CustomTrainingDirectoriesDto: {
5437
+ id: string;
5438
+ name: string;
5439
+ org_id: string;
5440
+ };
5313
5441
  PhoneAgentDto: {
5314
5442
  id: string;
5315
5443
  org_id: string;
@@ -5465,50 +5593,6 @@ export interface components {
5465
5593
  ended_at: string | null;
5466
5594
  status: components["schemas"]["SequenceStatus"] | null;
5467
5595
  };
5468
- GroupUsersDto: {
5469
- id: number;
5470
- name: string;
5471
- email: string;
5472
- is_available: boolean;
5473
- group_capacity: number | null;
5474
- global_capacity: number;
5475
- };
5476
- GroupDto: {
5477
- id: string;
5478
- organization_id: string;
5479
- name: string;
5480
- description: string | null;
5481
- is_support_enabled: boolean;
5482
- support_office_hours_id: string | null;
5483
- /** @enum {string} */
5484
- support_assignment_strategy: "least-busy" | "round-robin" | "unassigned";
5485
- created_at: string | null;
5486
- updated_at: string | null;
5487
- deleted_at: string | null;
5488
- };
5489
- VersionHistoryItemDto: {
5490
- /** Format: uuid */
5491
- id: string;
5492
- instruction_id: string;
5493
- version_number: number;
5494
- question: string;
5495
- answer: string;
5496
- /** @enum {string} */
5497
- type: "BEHAVIORAL" | "SCENARIO_SPECIFIC";
5498
- /** Format: date-time */
5499
- published_at: string;
5500
- published_by: number | null;
5501
- published_by_name: string | null;
5502
- /** Format: date-time */
5503
- created_at: string;
5504
- start_time: string | null;
5505
- end_time: string | null;
5506
- };
5507
- CustomTrainingDirectoriesDto: {
5508
- id: string;
5509
- name: string;
5510
- org_id: string;
5511
- };
5512
5596
  EmailTemplateActivityItemDto: {
5513
5597
  id: string;
5514
5598
  from_email: string;
@@ -6641,6 +6725,8 @@ export interface components {
6641
6725
  exclude_paths: string[];
6642
6726
  include_paths: string[];
6643
6727
  crawl_interval_hours: number | null;
6728
+ /** @description Channels this datasource is restricted to. Empty = available on all channels. */
6729
+ restricted_to_channels: components["schemas"]["SessionChannel"][];
6644
6730
  last_crawl_started_at: string | null;
6645
6731
  last_crawl_completed_at: string | null;
6646
6732
  error_message: string | null;
@@ -6659,6 +6745,8 @@ export interface components {
6659
6745
  exclude_paths: string[];
6660
6746
  include_paths: string[];
6661
6747
  crawl_interval_hours: number | null;
6748
+ /** @description Channels this datasource is restricted to. Empty = available on all channels. */
6749
+ restricted_to_channels: components["schemas"]["SessionChannel"][];
6662
6750
  last_crawl_started_at: string | null;
6663
6751
  last_crawl_completed_at: string | null;
6664
6752
  error_message: string | null;
@@ -6678,6 +6766,8 @@ export interface components {
6678
6766
  exclude_paths: string[];
6679
6767
  include_paths: string[];
6680
6768
  crawl_interval_hours: number | null;
6769
+ /** @description Channels this datasource is restricted to. Empty = available on all channels. */
6770
+ restricted_to_channels: components["schemas"]["SessionChannel"][];
6681
6771
  last_crawl_started_at: string | null;
6682
6772
  last_crawl_completed_at: string | null;
6683
6773
  error_message: string | null;
@@ -6767,6 +6857,39 @@ export interface components {
6767
6857
  has_prev_page: boolean;
6768
6858
  data: components["schemas"]["CrawlPage"][];
6769
6859
  };
6860
+ PublicKnowledgebaseItem: {
6861
+ id: string;
6862
+ title: string;
6863
+ /** @enum {string} */
6864
+ visibility: "internal" | "public";
6865
+ /** @enum {string} */
6866
+ source_type: "custom_training" | "help_center" | "integration" | "website";
6867
+ /** @description External source the item was synced from (present when listing). */
6868
+ data_source?: ("confluence" | "notion" | "zendesk_support" | "shopify" | "gitbook" | "intercom" | "front" | "freshdesk" | "ai_instructions" | "custom_training" | "website") | null;
6869
+ stream?: string | null;
6870
+ source_url: string | null;
6871
+ /** @description Contact segment ids this item is restricted to. Empty = available to all contacts. */
6872
+ restricted_to_segments: string[];
6873
+ /** @description Channels this item is restricted to. Empty = available on all channels. */
6874
+ restricted_to_channels: components["schemas"]["SessionChannel"][];
6875
+ /** @description Active window start (UTC). Null = no start bound. */
6876
+ start_time: string | null;
6877
+ /** @description Active window end (UTC). Null = no end bound. */
6878
+ end_time: string | null;
6879
+ /** Format: date-time */
6880
+ updated_at: string;
6881
+ };
6882
+ ListPublicKnowledgebaseItemsOutput: {
6883
+ items: components["schemas"]["PublicKnowledgebaseItem"][];
6884
+ pagination: {
6885
+ current_page: number;
6886
+ total_pages: number;
6887
+ total_items: number;
6888
+ items_per_page: number;
6889
+ has_next_page: boolean;
6890
+ has_previous_page: boolean;
6891
+ };
6892
+ };
6770
6893
  CsatScorePublic: {
6771
6894
  id: string;
6772
6895
  organization_id: string;
@@ -7145,7 +7268,7 @@ export interface components {
7145
7268
  created_at: string;
7146
7269
  };
7147
7270
  ValidateWorkflowPublicOutput: {
7148
- /** @description Whether the workflow definition is valid */
7271
+ /** @description Whether the workflow definition is valid (no error-severity issues) */
7149
7272
  valid: boolean;
7150
7273
  /** @description List of validation issues found */
7151
7274
  issues: {
@@ -7153,10 +7276,34 @@ export interface components {
7153
7276
  step_id: string | null;
7154
7277
  /** @description Description of the validation issue */
7155
7278
  message: string;
7279
+ /**
7280
+ * @description "error" blocks create/update/activate; "warning" is advisory only
7281
+ * @enum {string}
7282
+ */
7283
+ severity: "error" | "warning";
7156
7284
  }[];
7157
7285
  /** @description List of action types referenced in the workflow */
7158
7286
  action_types_used: string[];
7159
7287
  };
7288
+ WorkflowValidationErrorResponse: {
7289
+ /** @constant */
7290
+ statusCode: 400;
7291
+ /** @description Human-readable summary of the validation failure */
7292
+ message: string;
7293
+ error: string;
7294
+ /** @description Structured validation issues — fix each step_id and retry */
7295
+ issues: {
7296
+ /** @description The step ID where the issue was found, if applicable */
7297
+ step_id: string | null;
7298
+ /** @description Description of the validation issue */
7299
+ message: string;
7300
+ /**
7301
+ * @description "error" blocks create/update/activate; "warning" is advisory only
7302
+ * @enum {string}
7303
+ */
7304
+ severity: "error" | "warning";
7305
+ }[];
7306
+ };
7160
7307
  FieldSchemaPublicDto: {
7161
7308
  /** @description Field name (use as key in input object) */
7162
7309
  name: string;
@@ -7218,7 +7365,7 @@ export interface components {
7218
7365
  */
7219
7366
  type: "Unary" | "Binary" | "Logical";
7220
7367
  /** @description Field types this operator can be applied to */
7221
- applies_to: ("String" | "Number" | "Boolean" | "Array" | "Object" | "DateTime" | "LongText" | "Url" | "Email" | "Select" | "LazySelect" | "Code" | "MultiSelect" | "JsonSchema" | "Any" | "AnyObject" | "RichText" | "File")[];
7368
+ applies_to: ("String" | "Number" | "Boolean" | "Array" | "Object" | "DateTime" | "LongText" | "Url" | "Email" | "Select" | "LazySelect" | "Code" | "MultiSelect" | "JsonSchema" | "Any" | "AnyObject" | "RichText" | "File" | "PhoneNumber" | "DateOnly" | "CronExpression" | "Integer")[];
7222
7369
  };
7223
7370
  WorkflowDefinitionsPublicDto: {
7224
7371
  /** @description Available action types with their input/output schemas */
@@ -7512,6 +7659,10 @@ export interface components {
7512
7659
  is_draft?: boolean;
7513
7660
  /** @default 0 */
7514
7661
  usage_count: number;
7662
+ restricted_to_segments?: string[];
7663
+ restricted_to_channels?: string[];
7664
+ start_time?: string | null;
7665
+ end_time?: string | null;
7515
7666
  /** @description First 500 characters of content */
7516
7667
  content_preview: string;
7517
7668
  }[];
@@ -9280,6 +9431,79 @@ export interface operations {
9280
9431
  };
9281
9432
  };
9282
9433
  };
9434
+ listKnowledgebaseItems: {
9435
+ parameters: {
9436
+ query?: {
9437
+ /** @description Full-text search over item titles/content */
9438
+ search?: string;
9439
+ /** @description Filter to a specific external data source (e.g. website, confluence, notion) */
9440
+ data_source?: "confluence" | "notion" | "zendesk_support" | "shopify" | "gitbook" | "intercom" | "front" | "freshdesk" | "ai_instructions" | "custom_training" | "website";
9441
+ visibility?: "internal" | "public";
9442
+ page?: number;
9443
+ limit?: number;
9444
+ };
9445
+ header?: never;
9446
+ path?: never;
9447
+ cookie?: never;
9448
+ };
9449
+ requestBody?: never;
9450
+ responses: {
9451
+ /** @description Default Response */
9452
+ 200: {
9453
+ headers: {
9454
+ [name: string]: unknown;
9455
+ };
9456
+ content: {
9457
+ "application/json": components["schemas"]["ListPublicKnowledgebaseItemsOutput"];
9458
+ };
9459
+ };
9460
+ /** @description Internal Server Error */
9461
+ 500: {
9462
+ headers: {
9463
+ [name: string]: unknown;
9464
+ };
9465
+ content: {
9466
+ "application/json": components["schemas"]["ErrorDto"];
9467
+ };
9468
+ };
9469
+ };
9470
+ };
9471
+ updateKnowledgebaseItem: {
9472
+ parameters: {
9473
+ query?: never;
9474
+ header?: never;
9475
+ path: {
9476
+ /** @description The knowledge base item id */
9477
+ id: string;
9478
+ };
9479
+ cookie?: never;
9480
+ };
9481
+ requestBody: {
9482
+ content: {
9483
+ "application/json": components["schemas"]["UpdatePublicKnowledgebaseItem"];
9484
+ };
9485
+ };
9486
+ responses: {
9487
+ /** @description Default Response */
9488
+ 200: {
9489
+ headers: {
9490
+ [name: string]: unknown;
9491
+ };
9492
+ content: {
9493
+ "application/json": components["schemas"]["PublicKnowledgebaseItem"];
9494
+ };
9495
+ };
9496
+ /** @description Internal Server Error */
9497
+ 500: {
9498
+ headers: {
9499
+ [name: string]: unknown;
9500
+ };
9501
+ content: {
9502
+ "application/json": components["schemas"]["ErrorDto"];
9503
+ };
9504
+ };
9505
+ };
9506
+ };
9283
9507
  getCsatScores: {
9284
9508
  parameters: {
9285
9509
  query?: {
@@ -10783,6 +11007,15 @@ export interface operations {
10783
11007
  "application/json": components["schemas"]["WorkflowDetailPublicResponseDto"];
10784
11008
  };
10785
11009
  };
11010
+ /** @description Default Response */
11011
+ 400: {
11012
+ headers: {
11013
+ [name: string]: unknown;
11014
+ };
11015
+ content: {
11016
+ "application/json": components["schemas"]["WorkflowValidationErrorResponse"];
11017
+ };
11018
+ };
10786
11019
  /** @description Internal Server Error */
10787
11020
  500: {
10788
11021
  headers: {
@@ -10880,6 +11113,15 @@ export interface operations {
10880
11113
  "application/json": components["schemas"]["WorkflowDetailPublicResponseDto"];
10881
11114
  };
10882
11115
  };
11116
+ /** @description Default Response */
11117
+ 400: {
11118
+ headers: {
11119
+ [name: string]: unknown;
11120
+ };
11121
+ content: {
11122
+ "application/json": components["schemas"]["WorkflowValidationErrorResponse"];
11123
+ };
11124
+ };
10883
11125
  /** @description Internal Server Error */
10884
11126
  500: {
10885
11127
  headers: {
@@ -10915,6 +11157,15 @@ export interface operations {
10915
11157
  "application/json": components["schemas"]["WorkflowDetailPublicResponseDto"];
10916
11158
  };
10917
11159
  };
11160
+ /** @description Default Response */
11161
+ 400: {
11162
+ headers: {
11163
+ [name: string]: unknown;
11164
+ };
11165
+ content: {
11166
+ "application/json": components["schemas"]["WorkflowValidationErrorResponse"];
11167
+ };
11168
+ };
10918
11169
  /** @description Internal Server Error */
10919
11170
  500: {
10920
11171
  headers: {
@@ -12847,6 +13098,41 @@ export interface operations {
12847
13098
  };
12848
13099
  };
12849
13100
  };
13101
+ updateTrainingRestrictions: {
13102
+ parameters: {
13103
+ query?: never;
13104
+ header?: never;
13105
+ path: {
13106
+ id: string;
13107
+ };
13108
+ cookie?: never;
13109
+ };
13110
+ requestBody: {
13111
+ content: {
13112
+ "application/json": components["schemas"]["UpdateTrainingRestrictionsDto"];
13113
+ };
13114
+ };
13115
+ responses: {
13116
+ /** @description Default Response */
13117
+ 200: {
13118
+ headers: {
13119
+ [name: string]: unknown;
13120
+ };
13121
+ content: {
13122
+ "application/json": components["schemas"]["TrainingPublicResponseDto"];
13123
+ };
13124
+ };
13125
+ /** @description Internal Server Error */
13126
+ 500: {
13127
+ headers: {
13128
+ [name: string]: unknown;
13129
+ };
13130
+ content: {
13131
+ "application/json": components["schemas"]["ErrorDto"];
13132
+ };
13133
+ };
13134
+ };
13135
+ };
12850
13136
  applyTrainingDiff: {
12851
13137
  parameters: {
12852
13138
  query?: never;