@stream-io/node-sdk 0.9.1 → 0.9.2

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.
@@ -248,7 +248,7 @@ export interface ActionLogResponse {
248
248
  */
249
249
  reason: string;
250
250
  /**
251
- * Classification of who triggered the action (e.g. user, moderator, automod, api_integration)
251
+ * Classification of who triggered the action (e.g. user, moderator, automod, agent_reviewer, api_integration)
252
252
  */
253
253
  reporter_type: string;
254
254
  /**
@@ -265,9 +265,10 @@ export interface ActionLogResponse {
265
265
  user_id: string;
266
266
  ai_providers: Array<string>;
267
267
  /**
268
- * Additional metadata about the action
268
+ * Additional metadata about the action. An agent_recommendation log keeps the suggested action under recommended_action
269
269
  */
270
270
  custom: Record<string, any>;
271
+ agent_recommendation?: AgentRecommendationResponse;
271
272
  review_queue_item?: ReviewQueueItemResponse;
272
273
  /**
273
274
  * User response object
@@ -951,7 +952,7 @@ export interface ActivityRestoredEvent {
951
952
 
952
953
  export interface ActivitySelectorConfig {
953
954
  /**
954
- * Type of selector. One of: popular, proximity, following, current_feed, query, interest, follow_suggestion
955
+ * Type of selector. One of: popular, proximity, following, current_feed, query, interest, follow_suggestion, friends_engaged
955
956
  */
956
957
  type: ActivitySelectorType;
957
958
  /**
@@ -962,6 +963,18 @@ export interface ActivitySelectorConfig {
962
963
  * Flexible relative time window for activity selection (e.g., '1h', '3d', '1y'). Activities older than this duration will be filtered out. Cannot be used together with cutoff_time
963
964
  */
964
965
  cutoff_window?: string;
966
+ /**
967
+ * Who counts as a friend for the friends_engaged selector: 'mutual' (default, users the viewer and they follow each other) or 'following' (users the viewer follows). Only supported on the friends_engaged selector
968
+ */
969
+ friend_type?: 'mutual' | 'following';
970
+ /**
971
+ * Maximum number of close friends the friends_engaged selector reads reactions from (1-50, default 10). Only supported on the friends_engaged selector
972
+ */
973
+ max_friends?: number;
974
+ /**
975
+ * Minimum number of distinct close friends that must have reacted to an activity for friends_engaged to select it (1-10, default 1, not above max_friends). Only supported on the friends_engaged selector
976
+ */
977
+ min_friends?: number;
965
978
  /**
966
979
  * Minimum popularity threshold. For the 'popular' selector, omit to use the default (5); values below 1 are rejected
967
980
  */
@@ -978,6 +991,10 @@ export interface ActivitySelectorConfig {
978
991
  * Radius in kilometers the proximity selector searches around the viewer's location (the request's viewer_location, else the user's custom.location) when its filter has no near or within_bounds. Greater than 0 and at most 250. Omit to use the default (10). Only supported on the proximity selector
979
992
  */
980
993
  viewer_location_radius_km?: number;
994
+ /**
995
+ * Reaction types that count for the friends_engaged selector (at most 10, default all types). Only supported on the friends_engaged selector
996
+ */
997
+ reaction_types?: Array<string>;
981
998
  /**
982
999
  * Sort parameters for activity selection
983
1000
  */
@@ -1003,6 +1020,18 @@ export interface ActivitySelectorConfigResponse {
1003
1020
  * Flexible relative time window for activity selection (e.g., '1h', '3d', '1y')
1004
1021
  */
1005
1022
  cutoff_window?: string;
1023
+ /**
1024
+ * Who counts as a friend for the friends_engaged selector
1025
+ */
1026
+ friend_type?: 'mutual' | 'following';
1027
+ /**
1028
+ * Maximum number of close friends the friends_engaged selector reads reactions from
1029
+ */
1030
+ max_friends?: number;
1031
+ /**
1032
+ * Minimum number of distinct close friends that must have reacted for friends_engaged to select an activity
1033
+ */
1034
+ min_friends?: number;
1006
1035
  /**
1007
1036
  * Minimum popularity threshold. For the 'popular' selector, values below 1 are normalized to the default (5) at read time.
1008
1037
  */
@@ -1019,6 +1048,10 @@ export interface ActivitySelectorConfigResponse {
1019
1048
  * Radius in kilometers the proximity selector searches around the viewer's location
1020
1049
  */
1021
1050
  viewer_location_radius_km?: number;
1051
+ /**
1052
+ * Reaction types that count for the friends_engaged selector
1053
+ */
1054
+ reaction_types?: Array<string>;
1022
1055
  /**
1023
1056
  * Sort parameters for activity selection
1024
1057
  */
@@ -1041,7 +1074,8 @@ export type ActivitySelectorType =
1041
1074
  | 'current_feed'
1042
1075
  | 'query'
1043
1076
  | 'interest'
1044
- | 'follow_suggestion';
1077
+ | 'follow_suggestion'
1078
+ | 'friends_engaged';
1045
1079
 
1046
1080
  export interface ActivityUnpinnedEvent {
1047
1081
  /**
@@ -1506,6 +1540,262 @@ export interface AddUserGroupMembersResponse {
1506
1540
  user_group?: UserGroupResponse;
1507
1541
  }
1508
1542
 
1543
+ export interface AgentFeedbackResponse {
1544
+ /**
1545
+ * Nora review this correction is about
1546
+ */
1547
+ agent_review_id: string;
1548
+ /**
1549
+ * Text of the item when the correction was saved
1550
+ */
1551
+ content_excerpt: string;
1552
+ /**
1553
+ * When the correction was first saved
1554
+ */
1555
+ created_at: TimestampNS;
1556
+ /**
1557
+ * Moderator who submitted the correction
1558
+ */
1559
+ created_by: string;
1560
+ /**
1561
+ * Entity type of the queue item
1562
+ */
1563
+ entity_type: string;
1564
+ /**
1565
+ * Feedback row id
1566
+ */
1567
+ id: string;
1568
+ /**
1569
+ * How similar cases should be judged
1570
+ */
1571
+ improvement: string;
1572
+ /**
1573
+ * Review queue item the correction is about
1574
+ */
1575
+ item_id: string;
1576
+ /**
1577
+ * Action the moderator took
1578
+ */
1579
+ moderator_action: string;
1580
+ /**
1581
+ * Policy action Nora recommended
1582
+ */
1583
+ nora_action:
1584
+ | 'keep'
1585
+ | 'flag'
1586
+ | 'mask'
1587
+ | 'mask_flag'
1588
+ | 'shadow'
1589
+ | 'remove'
1590
+ | 'bounce'
1591
+ | 'bounce_flag'
1592
+ | 'bounce_remove';
1593
+ /**
1594
+ * Why the moderator disagreed
1595
+ */
1596
+ reason: string;
1597
+ /**
1598
+ * When the correction was last saved
1599
+ */
1600
+ updated_at: TimestampNS;
1601
+ /**
1602
+ * Labels Nora matched on this review
1603
+ */
1604
+ labels: Array<string>;
1605
+ }
1606
+
1607
+ export interface AgentRecommendationPayload {
1608
+ /**
1609
+ * Why Nora suggests this action. Stored on the action log, cut to 500 bytes
1610
+ */
1611
+ reason: string;
1612
+ /**
1613
+ * Action Nora suggests for the item
1614
+ */
1615
+ recommended_action:
1616
+ | 'keep'
1617
+ | 'flag'
1618
+ | 'mask'
1619
+ | 'mask_flag'
1620
+ | 'shadow'
1621
+ | 'remove'
1622
+ | 'bounce'
1623
+ | 'bounce_flag'
1624
+ | 'bounce_remove'
1625
+ | 'review';
1626
+ }
1627
+
1628
+ export interface AgentRecommendationResponse {
1629
+ /**
1630
+ * Why Nora suggested this action
1631
+ */
1632
+ reason: string;
1633
+ /**
1634
+ * Action Nora suggested for the item
1635
+ */
1636
+ recommended_action:
1637
+ | 'keep'
1638
+ | 'flag'
1639
+ | 'mask'
1640
+ | 'mask_flag'
1641
+ | 'shadow'
1642
+ | 'remove'
1643
+ | 'bounce'
1644
+ | 'bounce_flag'
1645
+ | 'bounce_remove'
1646
+ | 'review';
1647
+ }
1648
+
1649
+ export interface AgentReviewJudgmentResponse {
1650
+ /**
1651
+ * Why the agent matched this label
1652
+ */
1653
+ explanation?: string;
1654
+ /**
1655
+ * Moderation label this judgment is about
1656
+ */
1657
+ label?: string;
1658
+ /**
1659
+ * The agent's verdict for this label
1660
+ */
1661
+ verdict?: string;
1662
+ /**
1663
+ * Quotes from the content that support the verdict
1664
+ */
1665
+ evidence?: Array<string>;
1666
+ }
1667
+
1668
+ export interface AgentReviewResponse {
1669
+ /**
1670
+ * True when the agent did not have the full context it needed
1671
+ */
1672
+ context_incomplete: boolean;
1673
+ /**
1674
+ * When this review was recorded
1675
+ */
1676
+ created_at: TimestampNS;
1677
+ /**
1678
+ * Lifecycle status of the review
1679
+ */
1680
+ status: 'pending' | 'processing' | 'done' | 'failed' | 'skipped';
1681
+ /**
1682
+ * Session id of the agent run that produced this review
1683
+ */
1684
+ agent_session_id?: string;
1685
+ /**
1686
+ * The agent's confidence in its recommended action, from 0 to 1
1687
+ */
1688
+ confidence?: number;
1689
+ /**
1690
+ * Whether the flag is supported, a likely false positive, or uncertain
1691
+ */
1692
+ flag_assessment?: 'supported' | 'likely_false_positive' | 'uncertain';
1693
+ /**
1694
+ * Model route that produced this review
1695
+ */
1696
+ model_route?: string;
1697
+ /**
1698
+ * Why Nora chose the recommended action
1699
+ */
1700
+ reason?: string;
1701
+ /**
1702
+ * Action the agent recommends for the item
1703
+ */
1704
+ recommended_action?:
1705
+ | 'keep'
1706
+ | 'flag'
1707
+ | 'mask'
1708
+ | 'mask_flag'
1709
+ | 'shadow'
1710
+ | 'remove'
1711
+ | 'bounce'
1712
+ | 'bounce_flag'
1713
+ | 'bounce_remove'
1714
+ | 'review';
1715
+ /**
1716
+ * Why the review was skipped or failed. Set when status is skipped or failed
1717
+ */
1718
+ skip_reason?: string;
1719
+ /**
1720
+ * Short summary of the review
1721
+ */
1722
+ summary?: string;
1723
+ /**
1724
+ * Per-label judgments, with the evidence the agent quoted
1725
+ */
1726
+ judgments?: Array<AgentReviewJudgmentResponse>;
1727
+ /**
1728
+ * Token usage reported for this review
1729
+ */
1730
+ usage?: Record<string, any>;
1731
+ }
1732
+
1733
+ export interface AgentReviewSettingsPayload {
1734
+ /**
1735
+ * The app's Accelerate agent config with role agent_moderator.
1736
+ */
1737
+ agent_config_id?: string;
1738
+ /**
1739
+ * Minimum verdict confidence (0-1) for auto_act to apply an action. Defaults to 0.9.
1740
+ */
1741
+ auto_act_min_confidence?: number;
1742
+ /**
1743
+ * Days of the user's moderation history given to the agent. Defaults to 7, at most 30.
1744
+ */
1745
+ context_days?: number;
1746
+ /**
1747
+ * Surrounding items given to the agent on each side of the reviewed one: chat messages, Feeds comments, or the author's other Feeds activities. Defaults to 20, at most 100.
1748
+ */
1749
+ context_messages?: number;
1750
+ /**
1751
+ * Turns the agent reviewer on. It only runs when agent_config_id is set too.
1752
+ */
1753
+ enabled?: boolean;
1754
+ /**
1755
+ * Maximum reviews in flight for the app. Defaults to 10, at most 100.
1756
+ */
1757
+ max_concurrency?: number;
1758
+ /**
1759
+ * approve_first records the verdict for a moderator to approve; auto_act applies it when its confidence reaches auto_act_min_confidence; export_only changes nothing on the review queue and only exports each verdict for evaluation. Defaults to approve_first.
1760
+ */
1761
+ mode?: 'approve_first' | 'auto_act' | 'export_only';
1762
+ /**
1763
+ * Sends the images of the content under review to the agent, so it can judge them alongside the text. The agent config must run on a model that sees images. Defaults to false.
1764
+ */
1765
+ review_images?: boolean;
1766
+ /**
1767
+ * Fraction (0-1) of checks reviewed with scope all_checks. Defaults to 1.
1768
+ */
1769
+ sample_rate?: number;
1770
+ /**
1771
+ * Which checks are reviewed: flagged ones only, or all_checks sampled by sample_rate. Defaults to flagged.
1772
+ */
1773
+ scope?: 'flagged' | 'all_checks';
1774
+ /**
1775
+ * Moderation rule IDs: only items flagged by one of these rules are reviewed, and items flagged only by other sources are left to moderators. Empty reviews every flagged item. Only used with scope flagged; at most 100.
1776
+ */
1777
+ rule_ids?: Array<string>;
1778
+ }
1779
+
1780
+ export interface AgentReviewSummaryResponse {
1781
+ /**
1782
+ * Verdict confidence from 0 to 1
1783
+ */
1784
+ confidence: number;
1785
+ /**
1786
+ * pending, processing, done, failed, or skipped
1787
+ */
1788
+ status: string;
1789
+ /**
1790
+ * Whether the flag matches the content. Set once the review is done
1791
+ */
1792
+ flag_assessment?: string;
1793
+ /**
1794
+ * The action Nora recommends. Set once the review is done
1795
+ */
1796
+ recommended_action?: string;
1797
+ }
1798
+
1509
1799
  export interface AggregatedActivityResponse {
1510
1800
  /**
1511
1801
  * Number of activities in this aggregation
@@ -1826,7 +2116,15 @@ export interface AppResponseFields {
1826
2116
  geofences?: Array<GeofenceResponse>;
1827
2117
  image_moderation_labels?: Array<string>;
1828
2118
  activity_metrics_config?: Record<string, number>;
2119
+ /**
2120
+ * Settings for the moderation agent reviewer, which reviews moderation outcomes and proposes or applies an action.
2121
+ */
2122
+ agent_review?: AgentReviewSettingsPayload;
1829
2123
  datadog_info?: DataDogInfo;
2124
+ /**
2125
+ * Settings for the moderation agent reviewer, which reviews moderation outcomes and proposes or applies an action.
2126
+ */
2127
+ effective_agent_review?: AgentReviewSettingsPayload;
1830
2128
  moderation_dashboard_preferences?: ModerationDashboardPreferences;
1831
2129
  }
1832
2130
 
@@ -1991,7 +2289,7 @@ export interface ArrangeConfig {
1991
2289
  */
1992
2290
  key?: string;
1993
2291
  /**
1994
- * Arrangement mode. Currently only 'blend' is supported; 'diversify' and 'slot' are reserved
2292
+ * Arrangement mode. 'blend' and 'diversify' are supported; 'slot' is reserved
1995
2293
  */
1996
2294
  mode?: string;
1997
2295
  /**
@@ -1999,6 +2297,7 @@ export interface ArrangeConfig {
1999
2297
  */
2000
2298
  tail_below?: number;
2001
2299
  blend?: BlendArrangeConfig;
2300
+ diversify?: DiversifyArrangeConfig;
2002
2301
  }
2003
2302
 
2004
2303
  export interface AsyncBulkImageModerationEvent {
@@ -3150,6 +3449,7 @@ export interface CallCreatedEvent {
3150
3449
  }
3151
3450
 
3152
3451
  export interface CallCustomPropertyParameters {
3452
+ expected_value?: any;
3153
3453
  operator?: string;
3154
3454
  property_key?: string;
3155
3455
  }
@@ -3648,7 +3948,7 @@ export interface CallRejectedEvent {
3648
3948
  */
3649
3949
  type: string;
3650
3950
  /**
3651
- * Provides information about why the call was rejected. You can provide any value, but the Stream API and SDKs use these default values: rejected, cancel, timeout and busy
3951
+ * Provides information about why the call was rejected. You can provide any value, but the Stream API and SDKs use these default values: decline, cancel, timeout and busy
3652
3952
  */
3653
3953
  reason?: string;
3654
3954
  }
@@ -6637,6 +6937,7 @@ export interface ClosedCaptionRuleParameters {
6637
6937
  threshold?: number;
6638
6938
  time_window?: string;
6639
6939
  harm_labels?: Array<string>;
6940
+ severities?: Array<string>;
6640
6941
  llm_harm_labels?: Record<string, string>;
6641
6942
  }
6642
6943
 
@@ -7145,6 +7446,10 @@ export interface ConfigResponse {
7145
7446
  */
7146
7447
  updated_at: TimestampNS;
7147
7448
  supported_video_call_harm_types: Array<string>;
7449
+ /**
7450
+ * The version of this configuration moderation currently runs
7451
+ */
7452
+ published_version?: number;
7148
7453
  /**
7149
7454
  * Configurable image moderation label definitions for dashboard rendering
7150
7455
  */
@@ -7173,6 +7478,25 @@ export interface ConfigResponse {
7173
7478
  video_call_rule_config?: VideoCallRuleConfig;
7174
7479
  }
7175
7480
 
7481
+ export interface ConfigVersionResponse {
7482
+ /**
7483
+ * When this version was saved
7484
+ */
7485
+ created_at: TimestampNS;
7486
+ /**
7487
+ * ID of the user who saved this version, empty when saved without a user
7488
+ */
7489
+ created_by: string;
7490
+ /**
7491
+ * Whether this is the version moderation currently runs
7492
+ */
7493
+ published: boolean;
7494
+ /**
7495
+ * Sequential version number, per key and team
7496
+ */
7497
+ version: number;
7498
+ }
7499
+
7176
7500
  export interface ContentCountRuleParameters {
7177
7501
  threshold?: number;
7178
7502
  time_window?: string;
@@ -7184,6 +7508,7 @@ export interface ContentCountryCodeParameters {
7184
7508
  }
7185
7509
 
7186
7510
  export interface ContentCustomPropertyCountParameters {
7511
+ expected_value?: any;
7187
7512
  operator?: string;
7188
7513
  property_key?: string;
7189
7514
  threshold?: number;
@@ -7191,6 +7516,7 @@ export interface ContentCustomPropertyCountParameters {
7191
7516
  }
7192
7517
 
7193
7518
  export interface ContentCustomPropertyParameters {
7519
+ expected_value?: any;
7194
7520
  operator?: string;
7195
7521
  property_key?: string;
7196
7522
  }
@@ -7211,6 +7537,38 @@ export interface CountByMinuteResponse {
7211
7537
  start_ts: TimestampNS;
7212
7538
  }
7213
7539
 
7540
+ export interface CountReviewQueueRequest {
7541
+ user_id?: string;
7542
+ /**
7543
+ * Filter conditions for review queue items, the same filter Query Review Queue takes. The count covers exactly the items that query lists for this filter, ignoring sort, paging and item locks.
7544
+ */
7545
+ filter?: Record<string, any>;
7546
+ /**
7547
+ * User request object
7548
+ */
7549
+ user?: UserRequest;
7550
+ }
7551
+
7552
+ export interface CountReviewQueueResponse {
7553
+ /**
7554
+ * Whether more items match than are counted exactly (50,000), so total is a lower bound
7555
+ */
7556
+ capped: boolean;
7557
+ duration: string;
7558
+ /**
7559
+ * Whether the count is missing or out of date because the queue changed since it was computed. A later request may return a fresher count.
7560
+ */
7561
+ pending: boolean;
7562
+ /**
7563
+ * Number of review queue items matching the filter. When capped is true, at least this many items match.
7564
+ */
7565
+ total: number;
7566
+ /**
7567
+ * When the count was computed. Counts are refreshed in the background as the review queue changes.
7568
+ */
7569
+ computed_at?: TimestampNS;
7570
+ }
7571
+
7214
7572
  export interface Coverage {
7215
7573
  publisher_encoding_profiles: number;
7216
7574
  absent: Array<AbsentMetric>;
@@ -9070,6 +9428,29 @@ export interface DeviceResponse {
9070
9428
  voip?: boolean;
9071
9429
  }
9072
9430
 
9431
+ export interface DiversifyArrangeConfig {
9432
+ /**
9433
+ * Decay strategy: per-repeat score multiplier, greater than 0 and less than 1. Defaults to 0.5
9434
+ */
9435
+ decay?: number;
9436
+ /**
9437
+ * Decay strategy: the lowest multiplier a repeated key can reach, at least 0 and less than 1. Defaults to 0.25
9438
+ */
9439
+ floor?: number;
9440
+ /**
9441
+ * Cap strategy: the most items of one key value allowed in any window of consecutive slots. At least 1
9442
+ */
9443
+ max?: number;
9444
+ /**
9445
+ * Diversify strategy: 'cap' (default) or 'decay'
9446
+ */
9447
+ strategy?: string;
9448
+ /**
9449
+ * Cap strategy: window size in slots, greater than max and at most 100. Defaults to max + 1
9450
+ */
9451
+ window?: number;
9452
+ }
9453
+
9073
9454
  export interface DraftPayloadResponse {
9074
9455
  /**
9075
9456
  * Message ID is unique string identifier of the message
@@ -9470,6 +9851,10 @@ export interface EventHook {
9470
9851
  sns_event_based_message_group_id_enabled?: boolean;
9471
9852
  sns_key?: string;
9472
9853
  sns_region?: string;
9854
+ /**
9855
+ * @deprecated
9856
+ * Deprecated: Role auth was never supported; use resource auth.
9857
+ */
9473
9858
  sns_role_arn?: string;
9474
9859
  sns_secret?: string;
9475
9860
  sns_topic_arn?: string;
@@ -9478,6 +9863,10 @@ export interface EventHook {
9478
9863
  sqs_key?: string;
9479
9864
  sqs_queue_url?: string;
9480
9865
  sqs_region?: string;
9866
+ /**
9867
+ * @deprecated
9868
+ * Deprecated: Role auth was never supported; use resource auth.
9869
+ */
9481
9870
  sqs_role_arn?: string;
9482
9871
  sqs_secret?: string;
9483
9872
  timeout_ms?: number;
@@ -11331,6 +11720,26 @@ export interface GetActivityResponse {
11331
11720
  activity: ActivityResponse;
11332
11721
  }
11333
11722
 
11723
+ export interface GetAgentReviewStatusResponse {
11724
+ /**
11725
+ * Actions Nora took in the last 7 days
11726
+ */
11727
+ applied: number;
11728
+ duration: string;
11729
+ /**
11730
+ * Items Nora escalated in the last 7 days
11731
+ */
11732
+ escalated: number;
11733
+ /**
11734
+ * Reviews that finished in the last 7 days
11735
+ */
11736
+ reviewed: number;
11737
+ /**
11738
+ * Why the latest review failed. Absent unless that review failed
11739
+ */
11740
+ last_error?: string;
11741
+ }
11742
+
11334
11743
  export interface GetAppealResponse {
11335
11744
  duration: string;
11336
11745
  item?: AppealItemResponse;
@@ -11557,6 +11966,12 @@ export interface GetConfigResponse {
11557
11966
  config?: ConfigResponse;
11558
11967
  }
11559
11968
 
11969
+ export interface GetConfigVersionResponse {
11970
+ duration: string;
11971
+ version: ConfigVersionResponse;
11972
+ config?: ConfigResponse;
11973
+ }
11974
+
11560
11975
  export interface GetCustomPermissionResponse {
11561
11976
  /**
11562
11977
  * Duration of the request in milliseconds
@@ -12206,6 +12621,7 @@ export interface GetRetentionPolicyRunsResponse {
12206
12621
 
12207
12622
  export interface GetReviewQueueItemResponse {
12208
12623
  duration: string;
12624
+ agent_review?: AgentReviewResponse;
12209
12625
  item?: ReviewQueueItemResponse;
12210
12626
  }
12211
12627
 
@@ -12454,6 +12870,7 @@ export interface IPFlagCountRuleParameters {
12454
12870
  threshold?: number;
12455
12871
  time_window?: string;
12456
12872
  harm_labels?: Array<string>;
12873
+ severities?: Array<string>;
12457
12874
  }
12458
12875
 
12459
12876
  export interface ImageContentParameters {
@@ -12541,6 +12958,8 @@ export interface ImportBlockListResponse {
12541
12958
  task_id: string;
12542
12959
  }
12543
12960
 
12961
+ export type ImportCustomFormat = 'root' | 'nested';
12962
+
12544
12963
  export interface ImportTask {
12545
12964
  created_at: TimestampNS;
12546
12965
  id: string;
@@ -12570,6 +12989,10 @@ export interface ImportV2TaskItem {
12570
12989
  }
12571
12990
 
12572
12991
  export interface ImportV2TaskSettings {
12992
+ /**
12993
+ * How custom fields are read from imported items: root (default) takes unknown root keys as custom data, nested reads them from a custom object and is only supported for feeds imports.
12994
+ */
12995
+ custom_format?: ImportCustomFormat;
12573
12996
  merge_custom?: boolean;
12574
12997
  mode?: string;
12575
12998
  path?: string;
@@ -13223,14 +13646,14 @@ export interface LayoutSettingsResponse {
13223
13646
 
13224
13647
  export interface LifecycleSettingsRequest {
13225
13648
  /**
13226
- * Call lifecycle mode. One of: reusable, single_use. A single_use call cannot be reused once it has ended; the server ends it when its ring settles without an answer (currently: when the caller cancels the ring). Fixed at call creation
13649
+ * Call lifecycle mode. One of: reusable, single_use. A single_use call cannot be reused once it has ended; the server ends it when its ring settles without an answer: when the caller cancels the ring, or when the ring times out on the server (missed_call_timeout_ms) without anyone accepting or joining. Fixed at call creation
13227
13650
  */
13228
13651
  mode?: CallLifecycleMode;
13229
13652
  }
13230
13653
 
13231
13654
  export interface LifecycleSettingsResponse {
13232
13655
  /**
13233
- * Call lifecycle mode. One of: reusable, single_use. A single_use call cannot be reused once it has ended; the server ends it when its ring settles without an answer (currently: when the caller cancels the ring). Fixed at call creation
13656
+ * Call lifecycle mode. One of: reusable, single_use. A single_use call cannot be reused once it has ended; the server ends it when its ring settles without an answer: when the caller cancels the ring, or when the ring times out on the server (missed_call_timeout_ms) without anyone accepting or joining. Fixed at call creation
13234
13657
  */
13235
13658
  mode: CallLifecycleMode;
13236
13659
  }
@@ -13271,6 +13694,18 @@ export interface LimitsSettingsResponse {
13271
13694
  max_participants_exclude_owner?: boolean;
13272
13695
  }
13273
13696
 
13697
+ export interface ListAgentFeedbackResponse {
13698
+ duration: string;
13699
+ /**
13700
+ * Corrections, newest first
13701
+ */
13702
+ feedback: Array<AgentFeedbackResponse>;
13703
+ /**
13704
+ * Cursor for the next page. Absent when this is the last page
13705
+ */
13706
+ next?: string;
13707
+ }
13708
+
13274
13709
  export interface ListBlockListResponse {
13275
13710
  /**
13276
13711
  * Duration of the request in milliseconds
@@ -13301,6 +13736,18 @@ export interface ListCommandsResponse {
13301
13736
  commands: Array<Command>;
13302
13737
  }
13303
13738
 
13739
+ export interface ListConfigVersionsResponse {
13740
+ duration: string;
13741
+ /**
13742
+ * Retained versions of this configuration, newest first, including the published one
13743
+ */
13744
+ versions: Array<ConfigVersionResponse>;
13745
+ /**
13746
+ * The version moderation currently runs
13747
+ */
13748
+ published_version?: number;
13749
+ }
13750
+
13304
13751
  export interface ListDevicesResponse {
13305
13752
  duration: string;
13306
13753
  /**
@@ -13585,6 +14032,17 @@ export interface MarkUnreadRequest {
13585
14032
  user?: UserRequest;
13586
14033
  }
13587
14034
 
14035
+ export interface MatchedBlocklist {
14036
+ /**
14037
+ * Blocklist name, as set on the rule condition.
14038
+ */
14039
+ name: string;
14040
+ /**
14041
+ * Distinct text the blocklist matched in the content, at most 10 values of up to 256 bytes each. Word, email and domain blocklists report a single match, in the normalized form they compare, even when several words hit; regex lists and domain/email allowlists report every match, except that an allowlist with LLM domain validation enabled reports the one URL the check kept. Regex lists match on the text with invisible characters removed, except the built-in URL list, which reports the URL as it appears in the content. Can be empty when the blocklist hit but no value was recorded (for example a flag stored before this field existed).
14042
+ */
14043
+ matches: Array<string>;
14044
+ }
14045
+
13588
14046
  export interface MatchedContent {
13589
14047
  /**
13590
14048
  * The `content_ids[label]` value supplied on the `/analyze` request that contributed this entry.
@@ -14956,12 +15414,17 @@ export interface ModerationCheckCompletedEvent {
14956
15414
  custom: Record<string, any>;
14957
15415
  type: string;
14958
15416
  received_at?: TimestampNS;
15417
+ /**
15418
+ * Content payload for moderation
15419
+ */
15420
+ moderation_payload?: ModerationPayloadResponse;
14959
15421
  }
14960
15422
 
14961
15423
  export interface ModerationConfig {
14962
15424
  async?: boolean;
14963
15425
  created_at?: Date;
14964
15426
  key?: string;
15427
+ published_version?: number;
14965
15428
  team?: string;
14966
15429
  updated_at?: Date;
14967
15430
  supported_video_call_harm_types?: Array<string>;
@@ -15023,24 +15486,45 @@ export interface ModerationDashboardPreferences {
15023
15486
 
15024
15487
  export interface ModerationEngineConfigRequest {
15025
15488
  /**
15026
- * LLM model used when the provider resolves to llm. Not allowed with provider nlp. Empty uses the app's moderation settings
15489
+ * LLM model used when the provider resolves to llm, or a Stream model with provider stream (an alias, or a pinned version the server accepts). Not allowed with provider nlp. Empty uses the app's moderation settings, or the latest Stream model
15490
+ */
15491
+ model?:
15492
+ | 'gpt-4o-mini'
15493
+ | 'gpt-4o'
15494
+ | 'gpt-6-luna'
15495
+ | 'stream-mammoth-1'
15496
+ | 'stream-elephant-1';
15497
+ /**
15498
+ * llm, nlp or stream. Empty follows the app's LLM moderation setting
15499
+ */
15500
+ provider?: 'llm' | 'nlp' | 'stream';
15501
+ /**
15502
+ * OpenAI reasoning effort for model. Requires model, and must be one the model accepts. Empty uses the model's default
15027
15503
  */
15028
- model?: 'gpt-4o-mini' | 'gpt-4o';
15504
+ reasoning_effort?: string;
15029
15505
  /**
15030
- * llm or nlp. Empty follows the app's LLM moderation setting
15506
+ * How sure a Stream model must be before it flags: relaxed, balanced or strict. Only with provider stream. Empty is balanced
15031
15507
  */
15032
- provider?: 'llm' | 'nlp';
15508
+ strictness?: 'relaxed' | 'balanced' | 'strict';
15033
15509
  }
15034
15510
 
15035
15511
  export interface ModerationEngineConfigResponse {
15036
15512
  /**
15037
- * LLM model used when the provider resolves to llm. Not allowed with provider nlp. Empty uses the app's moderation settings
15513
+ * LLM model used when the provider resolves to llm, or a Stream model with provider stream (an alias, or a pinned version the server accepts). Not allowed with provider nlp. Empty uses the app's moderation settings, or the latest Stream model
15038
15514
  */
15039
15515
  model?: string;
15040
15516
  /**
15041
- * llm or nlp. Empty follows the app's LLM moderation setting
15517
+ * llm, nlp or stream. Empty follows the app's LLM moderation setting
15518
+ */
15519
+ provider?: 'llm' | 'nlp' | 'stream';
15520
+ /**
15521
+ * OpenAI reasoning effort for model. Requires model, and must be one the model accepts. Empty uses the model's default
15042
15522
  */
15043
- provider?: 'llm' | 'nlp';
15523
+ reasoning_effort?: string;
15524
+ /**
15525
+ * How sure a Stream model must be before it flags: relaxed, balanced or strict. Only with provider stream. Empty is balanced
15526
+ */
15527
+ strictness?: 'relaxed' | 'balanced' | 'strict';
15044
15528
  }
15045
15529
 
15046
15530
  export interface ModerationFeedbackItemResponse {
@@ -15358,6 +15842,8 @@ export interface ModerationQueueResponse {
15358
15842
  description: string;
15359
15843
  id: string;
15360
15844
  item_count: number;
15845
+ item_count_capped: boolean;
15846
+ item_count_pending: boolean;
15361
15847
  name: string;
15362
15848
  type: string;
15363
15849
  updated_at: TimestampNS;
@@ -15463,6 +15949,10 @@ export interface ModerationRulesTriggeredEvent {
15463
15949
  * The violation number for call rules (optional)
15464
15950
  */
15465
15951
  violation_number?: number;
15952
+ /**
15953
+ * Blocklists that the rule's blocklist conditions (`text_content`, `text_rule`) matched, each with the text it matched in the content. Omitted when the rule has no such condition or none matched.
15954
+ */
15955
+ matched_blocklists?: Array<MatchedBlocklist>;
15466
15956
  /**
15467
15957
  * Ordered list of contents whose verdicts contributed to an aggregation rule's threshold. Populated only for aggregation rules when callers supplied `content_ids`.
15468
15958
  */
@@ -15940,6 +16430,7 @@ export interface OCRContentParameters {
15940
16430
  label_operator?: string;
15941
16431
  severity?: string;
15942
16432
  harm_labels?: Array<string>;
16433
+ severities?: Array<string>;
15943
16434
  }
15944
16435
 
15945
16436
  export interface OCRRule {
@@ -16850,6 +17341,26 @@ export interface PrivacySettingsResponse {
16850
17341
  typing_indicators?: TypingIndicatorsResponse;
16851
17342
  }
16852
17343
 
17344
+ export interface PublishConfigVersionRequest {
17345
+ /**
17346
+ * Team associated with the configuration
17347
+ */
17348
+ team?: string;
17349
+ /**
17350
+ * Optional user ID to associate with the audit log entry
17351
+ */
17352
+ user_id?: string;
17353
+ /**
17354
+ * User request object
17355
+ */
17356
+ user?: UserRequest;
17357
+ }
17358
+
17359
+ export interface PublishConfigVersionResponse {
17360
+ duration: string;
17361
+ config?: ConfigResponse;
17362
+ }
17363
+
16853
17364
  export interface PublishedTrackFlags {
16854
17365
  audio: boolean;
16855
17366
  screenshare: boolean;
@@ -20068,6 +20579,7 @@ export interface ReviewQueueItemResponse {
20068
20579
  */
20069
20580
  teams?: Array<string>;
20070
20581
  activity?: EnrichedActivity;
20582
+ agent_review?: AgentReviewSummaryResponse;
20071
20583
  appeal?: AppealItemResponse;
20072
20584
  /**
20073
20585
  * User response object
@@ -20831,6 +21343,60 @@ export interface SRTIngress {
20831
21343
  address: string;
20832
21344
  }
20833
21345
 
21346
+ export interface SaveConfigVersionRequest {
21347
+ /**
21348
+ * Latest version the edit was based on, 0 for a policy without versions. The save is rejected when a newer version exists
21349
+ */
21350
+ base_version: number;
21351
+ /**
21352
+ * Unique identifier for the moderation configuration
21353
+ */
21354
+ key: string;
21355
+ /**
21356
+ * Whether moderation should be performed asynchronously
21357
+ */
21358
+ async?: boolean;
21359
+ /**
21360
+ * Team associated with the configuration
21361
+ */
21362
+ team?: string;
21363
+ /**
21364
+ * Optional user ID to associate with the audit log entry
21365
+ */
21366
+ user_id?: string;
21367
+ ai_audio_config?: AIAudioConfigRequest;
21368
+ ai_image_config?: AIImageConfig;
21369
+ ai_text_config?: AITextConfig;
21370
+ ai_video_config?: AIVideoConfigRequest;
21371
+ automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;
21372
+ automod_semantic_filters_config?: AutomodSemanticFiltersConfig;
21373
+ automod_toxicity_config?: AutomodToxicityConfig;
21374
+ aws_rekognition_config?: AIImageConfig;
21375
+ block_list_config?: BlockListConfig;
21376
+ bodyguard_config?: AITextConfig;
21377
+ engine?: ModerationEngineConfigRequest;
21378
+ flood_config?: FloodConfig;
21379
+ google_vision_config?: GoogleVisionConfig;
21380
+ intent_config?: IntentConfigRequest;
21381
+ llm_config?: LLMConfig;
21382
+ rule_builder_config?: RuleBuilderConfig;
21383
+ /**
21384
+ * User request object
21385
+ */
21386
+ user?: UserRequest;
21387
+ velocity_filter_config?: VelocityFilterConfig;
21388
+ video_call_rule_config?: VideoCallRuleConfig;
21389
+ }
21390
+
21391
+ export interface SaveConfigVersionResponse {
21392
+ duration: string;
21393
+ version: ConfigVersionResponse;
21394
+ /**
21395
+ * The version moderation currently runs
21396
+ */
21397
+ published_version?: number;
21398
+ }
21399
+
20834
21400
  export interface ScheduledMessageChannelResponse {
20835
21401
  /**
20836
21402
  * Channel CID (<type>:<id>)
@@ -21095,6 +21661,97 @@ export interface ScreensharingSettingsResponse {
21095
21661
  target_resolution?: TargetResolution;
21096
21662
  }
21097
21663
 
21664
+ export interface SearchAllChannelsSection {
21665
+ /**
21666
+ * Opaque cursor for the next page of this section, present only when more results exist. Pass it back under next.channels with the same query
21667
+ */
21668
+ next?: string;
21669
+ /**
21670
+ * Channels the caller is a member of whose name starts with the query, in the same shape as the query channels endpoint's results but without messages or members
21671
+ */
21672
+ channels?: Array<ChannelStateResponseFields>;
21673
+ error?: SearchAllSectionError;
21674
+ warning?: SearchAllWarning;
21675
+ }
21676
+
21677
+ export interface SearchAllMessagesSection {
21678
+ /**
21679
+ * Opaque cursor for the next page of this section, present only when more results exist. Pass it back under next.messages with the same query
21680
+ */
21681
+ next?: string;
21682
+ /**
21683
+ * Matching messages, newest first, in the same shape as the search endpoint's results
21684
+ */
21685
+ results?: Array<SearchResult>;
21686
+ error?: SearchAllSectionError;
21687
+ results_warning?: SearchWarning;
21688
+ warning?: SearchAllWarning;
21689
+ }
21690
+
21691
+ export interface SearchAllRequest {
21692
+ /**
21693
+ * Number of results per section, 1-30. Defaults to 10. Applies to every requested section; there is no per-section limit
21694
+ */
21695
+ limit?: number;
21696
+ /**
21697
+ * Free-text search phrase, 1-80 characters after trimming whitespace. Required. Matched as a prefix of a user's name or username and of a channel's name, and as full-text against message text
21698
+ */
21699
+ query?: string;
21700
+ /**
21701
+ * Which sections to search: any subset of messages, users and channels. Defaults to all three when omitted; must not be empty when provided. Response sections always appear in the order messages, users, channels
21702
+ */
21703
+ entities?: Array<string>;
21704
+ /**
21705
+ * Opaque pagination cursors from a previous response, keyed by entity. A cursor that fails to decode restarts that section from page 1 with a cursor_rejected warning; the request fails with 400 only when every cursor supplied for a requested entity is invalid. Cursors for entities not in entities are ignored
21706
+ */
21707
+ next?: Record<string, string>;
21708
+ }
21709
+
21710
+ export interface SearchAllResponse {
21711
+ /**
21712
+ * Duration of the request in milliseconds
21713
+ */
21714
+ duration: string;
21715
+ channels?: SearchAllChannelsSection;
21716
+ messages?: SearchAllMessagesSection;
21717
+ users?: SearchAllUsersSection;
21718
+ }
21719
+
21720
+ export interface SearchAllSectionError {
21721
+ /**
21722
+ * Error code. backend_timeout and backend_unavailable are retryable; unsupported (the app's configuration cannot serve this section) and internal_error are not
21723
+ */
21724
+ code:
21725
+ | 'backend_unavailable'
21726
+ | 'backend_timeout'
21727
+ | 'unsupported'
21728
+ | 'internal_error';
21729
+ /**
21730
+ * Human-readable description of the failure
21731
+ */
21732
+ message: string;
21733
+ }
21734
+
21735
+ export interface SearchAllUsersSection {
21736
+ /**
21737
+ * Opaque cursor for the next page of this section, present only when more results exist. Pass it back under next.users with the same query
21738
+ */
21739
+ next?: string;
21740
+ /**
21741
+ * Users whose name or username starts with the query, in the same shape as the query users endpoint's results
21742
+ */
21743
+ users?: Array<FullUserResponse>;
21744
+ error?: SearchAllSectionError;
21745
+ warning?: SearchAllWarning;
21746
+ }
21747
+
21748
+ export interface SearchAllWarning {
21749
+ /**
21750
+ * Warning code. cursor_rejected: the cursor supplied for this section failed to decode, so the section restarted from page 1
21751
+ */
21752
+ code: 'cursor_rejected';
21753
+ }
21754
+
21098
21755
  export interface SearchPayload {
21099
21756
  /**
21100
21757
  * Channel filter conditions
@@ -21987,7 +22644,7 @@ export interface StoriesFeedUpdatedEvent {
21987
22644
 
21988
22645
  export interface SubmitActionRequest {
21989
22646
  /**
21990
- * Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, delete_poll, delete_poll_option, delete_poll_answer, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate
22647
+ * Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, delete_poll, delete_poll_option, delete_poll_answer, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate, agent_recommendation
21991
22648
  */
21992
22649
  action_type:
21993
22650
  | 'flag'
@@ -22014,7 +22671,8 @@ export interface SubmitActionRequest {
22014
22671
  | 'reject_appeal'
22015
22672
  | 'escalate'
22016
22673
  | 'de_escalate'
22017
- | 'bypass';
22674
+ | 'bypass'
22675
+ | 'agent_recommendation';
22018
22676
  /**
22019
22677
  * UUID of the appeal to act on (required for reject_appeal, optional for other actions)
22020
22678
  */
@@ -22024,6 +22682,7 @@ export interface SubmitActionRequest {
22024
22682
  */
22025
22683
  item_id?: string;
22026
22684
  user_id?: string;
22685
+ agent_recommendation?: AgentRecommendationPayload;
22027
22686
  /**
22028
22687
  * Configuration for ban moderation action
22029
22688
  */
@@ -22119,6 +22778,95 @@ export interface SubmitActionResponse {
22119
22778
  item?: ReviewQueueItemResponse;
22120
22779
  }
22121
22780
 
22781
+ export interface SubmitAgentFeedbackRequest {
22782
+ /**
22783
+ * Review queue item Nora reviewed
22784
+ */
22785
+ item_id: string;
22786
+ /**
22787
+ * Action the moderator took
22788
+ */
22789
+ moderator_action: string;
22790
+ /**
22791
+ * How similar cases should be judged, up to 2000 characters
22792
+ */
22793
+ improvement?: string;
22794
+ /**
22795
+ * Why the moderator disagreed, up to 2000 characters
22796
+ */
22797
+ reason?: string;
22798
+ user_id?: string;
22799
+ /**
22800
+ * User request object
22801
+ */
22802
+ user?: UserRequest;
22803
+ }
22804
+
22805
+ export interface SubmitAgentFeedbackResponse {
22806
+ /**
22807
+ * Nora review this correction is about
22808
+ */
22809
+ agent_review_id: string;
22810
+ /**
22811
+ * Text of the item when the correction was saved
22812
+ */
22813
+ content_excerpt: string;
22814
+ /**
22815
+ * When the correction was first saved
22816
+ */
22817
+ created_at: TimestampNS;
22818
+ /**
22819
+ * Moderator who submitted the correction
22820
+ */
22821
+ created_by: string;
22822
+ duration: string;
22823
+ /**
22824
+ * Entity type of the queue item
22825
+ */
22826
+ entity_type: string;
22827
+ /**
22828
+ * Feedback row id
22829
+ */
22830
+ id: string;
22831
+ /**
22832
+ * How similar cases should be judged
22833
+ */
22834
+ improvement: string;
22835
+ /**
22836
+ * Review queue item the correction is about
22837
+ */
22838
+ item_id: string;
22839
+ /**
22840
+ * Action the moderator took
22841
+ */
22842
+ moderator_action: string;
22843
+ /**
22844
+ * Policy action Nora recommended
22845
+ */
22846
+ nora_action:
22847
+ | 'keep'
22848
+ | 'flag'
22849
+ | 'mask'
22850
+ | 'mask_flag'
22851
+ | 'shadow'
22852
+ | 'remove'
22853
+ | 'bounce'
22854
+ | 'bounce_flag'
22855
+ | 'bounce_remove';
22856
+ /**
22857
+ * Why the moderator disagreed
22858
+ */
22859
+ reason: string;
22860
+ /**
22861
+ * When the correction was last saved
22862
+ */
22863
+ updated_at: TimestampNS;
22864
+ /**
22865
+ * Labels Nora matched on this review
22866
+ */
22867
+ labels: Array<string>;
22868
+ }
22869
+
22122
22870
  export interface SubmitModerationFeedbackItem {
22123
22871
  /**
22124
22872
  * Action originally produced for this item
@@ -22365,6 +23113,7 @@ export interface TextContentParameters {
22365
23113
  text_length_operator?: string;
22366
23114
  blocklist_match?: Array<string>;
22367
23115
  harm_labels?: Array<string>;
23116
+ severities?: Array<string>;
22368
23117
  llm_harm_labels?: Record<string, string>;
22369
23118
  }
22370
23119
 
@@ -22377,6 +23126,7 @@ export interface TextRuleParameters {
22377
23126
  blocklist_match?: Array<string>;
22378
23127
  harm_labels?: Array<string>;
22379
23128
  semantic_filter_names?: Array<string>;
23129
+ severities?: Array<string>;
22380
23130
  llm_harm_labels?: Record<string, string>;
22381
23131
  }
22382
23132
 
@@ -23530,6 +24280,10 @@ export interface UpdateAppRequest {
23530
24280
  user_search_disallowed_roles?: Array<string>;
23531
24281
  webhook_events?: Array<string>;
23532
24282
  activity_metrics_config?: Record<string, number>;
24283
+ /**
24284
+ * Settings for the moderation agent reviewer, which reviews moderation outcomes and proposes or applies an action.
24285
+ */
24286
+ agent_review?: AgentReviewSettingsPayload;
23533
24287
  apn_config?: APNConfig;
23534
24288
  async_moderation_config?: AsyncModerationConfiguration;
23535
24289
  datadog_info?: DataDogInfo;
@@ -25394,6 +26148,7 @@ export interface UserCustomEventRequest {
25394
26148
  }
25395
26149
 
25396
26150
  export interface UserCustomPropertyParameters {
26151
+ expected_value?: any;
25397
26152
  operator?: string;
25398
26153
  property_key?: string;
25399
26154
  }