@stream-io/feeds-client 0.2.2 → 0.2.4

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/@react-bindings/contexts/StreamSearchContext.d.ts +1 -1
  3. package/dist/@react-bindings/contexts/StreamSearchResultsContext.d.ts +1 -1
  4. package/dist/@react-bindings/hooks/search-state-hooks/useSearchQuery.d.ts +1 -1
  5. package/dist/@react-bindings/hooks/search-state-hooks/useSearchResult.d.ts +1 -1
  6. package/dist/@react-bindings/hooks/search-state-hooks/useSearchSources.d.ts +2 -2
  7. package/dist/@react-bindings/wrappers/StreamSearch.d.ts +1 -1
  8. package/dist/@react-bindings/wrappers/StreamSearchResults.d.ts +1 -1
  9. package/dist/index-react-bindings.browser.cjs +29 -9
  10. package/dist/index-react-bindings.browser.cjs.map +1 -1
  11. package/dist/index-react-bindings.browser.js +29 -9
  12. package/dist/index-react-bindings.browser.js.map +1 -1
  13. package/dist/index-react-bindings.node.cjs +29 -9
  14. package/dist/index-react-bindings.node.cjs.map +1 -1
  15. package/dist/index-react-bindings.node.js +29 -9
  16. package/dist/index-react-bindings.node.js.map +1 -1
  17. package/dist/index.browser.cjs +243 -171
  18. package/dist/index.browser.cjs.map +1 -1
  19. package/dist/index.browser.js +243 -172
  20. package/dist/index.browser.js.map +1 -1
  21. package/dist/index.d.ts +1 -5
  22. package/dist/index.node.cjs +243 -171
  23. package/dist/index.node.cjs.map +1 -1
  24. package/dist/index.node.js +243 -172
  25. package/dist/index.node.js.map +1 -1
  26. package/dist/src/common/{ActivitySearchSource.d.ts → search/ActivitySearchSource.d.ts} +3 -3
  27. package/dist/src/common/{BaseSearchSource.d.ts → search/BaseSearchSource.d.ts} +41 -35
  28. package/dist/src/common/{FeedSearchSource.d.ts → search/FeedSearchSource.d.ts} +5 -5
  29. package/dist/src/common/{SearchController.d.ts → search/SearchController.d.ts} +1 -3
  30. package/dist/src/common/{UserSearchSource.d.ts → search/UserSearchSource.d.ts} +4 -4
  31. package/dist/src/common/search/index.d.ts +6 -0
  32. package/dist/src/common/search/types.d.ts +22 -0
  33. package/dist/src/common/types.d.ts +1 -0
  34. package/dist/src/feed/event-handlers/activity/handle-activity-deleted.d.ts +5 -12
  35. package/dist/src/gen/models/index.d.ts +68 -26
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/index.ts +1 -5
  38. package/package.json +1 -1
  39. package/src/common/{ActivitySearchSource.ts → search/ActivitySearchSource.ts} +3 -3
  40. package/src/common/{BaseSearchSource.ts → search/BaseSearchSource.ts} +137 -69
  41. package/src/common/{FeedSearchSource.ts → search/FeedSearchSource.ts} +6 -5
  42. package/src/common/{SearchController.ts → search/SearchController.ts} +2 -7
  43. package/src/common/{UserSearchSource.ts → search/UserSearchSource.ts} +3 -3
  44. package/src/common/search/index.ts +6 -0
  45. package/src/common/search/types.ts +21 -0
  46. package/src/common/types.ts +2 -0
  47. package/src/feed/event-handlers/activity/activity-utils.test.ts +2 -2
  48. package/src/feed/event-handlers/activity/handle-activity-added.test.ts +86 -0
  49. package/src/feed/event-handlers/activity/handle-activity-deleted.test.ts +117 -0
  50. package/src/feed/event-handlers/activity/handle-activity-deleted.ts +8 -4
  51. package/src/feed/event-handlers/feed-member/handle-feed-member-added.test.ts +75 -0
  52. package/src/feed/event-handlers/feed-member/handle-feed-member-removed.test.ts +82 -0
  53. package/src/feed/event-handlers/feed-member/handle-feed-member-removed.ts +19 -9
  54. package/src/feed/event-handlers/feed-member/handle-feed-member-updated.test.ts +84 -0
  55. package/src/gen/feeds/FeedsApi.ts +6 -0
  56. package/src/gen/model-decoders/decoders.ts +13 -1
  57. package/src/gen/models/index.ts +108 -34
  58. package/src/test-utils/response-generators.ts +107 -0
  59. package/dist/src/test-utils/index.d.ts +0 -1
  60. package/dist/src/test-utils/response-generators.d.ts +0 -74
@@ -1,7 +1,7 @@
1
1
  import { BaseSearchSource } from './BaseSearchSource';
2
- import type { SearchSourceOptions } from './BaseSearchSource';
3
- import { FeedsClient } from '../feeds-client';
4
- import { ActivityResponse } from '../gen/models';
2
+ import type { SearchSourceOptions } from './types';
3
+ import { FeedsClient } from '../../feeds-client';
4
+ import { ActivityResponse } from '../../gen/models';
5
5
  export declare class ActivitySearchSource extends BaseSearchSource<ActivityResponse> {
6
6
  readonly type: "activity";
7
7
  private readonly client;
@@ -1,17 +1,12 @@
1
- import { StateStore } from './StateStore';
2
- import { type DebouncedFunc } from './utils';
3
- export type SearchSourceType = 'activity' | 'user' | 'feed' | (string & {});
4
- export type QueryReturnValue<T> = {
5
- items: T[];
6
- next?: string | null;
7
- };
1
+ import { StateStore } from '../StateStore';
2
+ import { type DebouncedFunc } from '../utils';
3
+ import type { QueryReturnValue, SearchSourceOptions, SearchSourceState, SearchSourceType } from './types';
8
4
  export type DebounceOptions = {
9
5
  debounceMs: number;
10
6
  };
11
7
  type DebouncedExecQueryFunction = DebouncedFunc<(searchString?: string) => Promise<void>>;
12
- export interface SearchSource<T = any> {
8
+ interface ISearchSource<T = any> {
13
9
  activate(): void;
14
- cancelScheduledQuery(): void;
15
10
  canExecuteQuery(newSearchString?: string): boolean;
16
11
  deactivate(): void;
17
12
  readonly hasNext: boolean;
@@ -24,34 +19,26 @@ export interface SearchSource<T = any> {
24
19
  readonly next: string | undefined | null;
25
20
  readonly offset: number | undefined;
26
21
  resetState(): void;
27
- search(text?: string): Promise<void> | undefined;
28
22
  readonly searchQuery: string;
29
- setDebounceOptions(options: DebounceOptions): void;
30
23
  readonly state: StateStore<SearchSourceState<T>>;
31
24
  readonly type: SearchSourceType;
32
25
  }
33
- export type SearchSourceState<T = any> = {
34
- hasNext: boolean;
35
- isActive: boolean;
36
- isLoading: boolean;
37
- items: T[] | undefined;
38
- searchQuery: string;
39
- lastQueryError?: Error;
40
- next?: string | null;
41
- offset?: number;
42
- };
43
- export type SearchSourceOptions = {
44
- /** The number of milliseconds to debounce the search query. The default interval is 300ms. */
45
- debounceMs?: number;
46
- pageSize?: number;
47
- allowEmptySearchString?: boolean;
48
- };
49
- export declare abstract class BaseSearchSource<T> implements SearchSource<T> {
26
+ export interface SearchSource<T = any> extends ISearchSource<T> {
27
+ cancelScheduledQuery(): void;
28
+ setDebounceOptions(options: DebounceOptions): void;
29
+ search(text?: string): Promise<void> | undefined;
30
+ }
31
+ export interface SearchSourceSync<T = any> extends ISearchSource<T> {
32
+ cancelScheduledQuery(): void;
33
+ setDebounceOptions(options: DebounceOptions): void;
34
+ search(text?: string): void;
35
+ }
36
+ declare abstract class BaseSearchSourceBase<T> implements ISearchSource<T> {
50
37
  state: StateStore<SearchSourceState<T>>;
51
- protected pageSize: number;
38
+ pageSize: number;
52
39
  protected allowEmptySearchString: boolean;
40
+ protected resetOnNewSearchQuery: boolean;
53
41
  abstract readonly type: SearchSourceType;
54
- protected searchDebounced: DebouncedExecQueryFunction;
55
42
  protected constructor(options?: SearchSourceOptions);
56
43
  get lastQueryError(): Error | undefined;
57
44
  get hasNext(): boolean;
@@ -72,18 +59,37 @@ export declare abstract class BaseSearchSource<T> implements SearchSource<T> {
72
59
  get next(): string | null | undefined;
73
60
  get offset(): number | undefined;
74
61
  get searchQuery(): string;
75
- protected abstract query(searchQuery: string): Promise<QueryReturnValue<T>>;
76
- protected abstract filterQueryResults(items: T[]): T[] | Promise<T[]>;
77
- setDebounceOptions: ({ debounceMs }: DebounceOptions) => void;
78
62
  activate: () => void;
79
63
  deactivate: () => void;
80
64
  canExecuteQuery: (newSearchString?: string) => boolean;
81
65
  protected getStateBeforeFirstQuery(newSearchString: string): SearchSourceState<T>;
82
66
  protected getStateAfterQuery(stateUpdate: Partial<SearchSourceState<T>>, isFirstPage: boolean): SearchSourceState<T>;
67
+ protected prepareStateForQuery(newSearchString?: string): {
68
+ searchString: string;
69
+ hasNewSearchQuery: boolean;
70
+ };
71
+ protected updatePaginationStateFromQuery(result: QueryReturnValue<T>): Partial<SearchSourceState<T>>;
72
+ resetState(): void;
73
+ resetStateAndActivate(): void;
74
+ }
75
+ export declare abstract class BaseSearchSource<T> extends BaseSearchSourceBase<T> implements SearchSource<T> {
76
+ protected searchDebounced: DebouncedExecQueryFunction;
77
+ constructor(options?: SearchSourceOptions);
78
+ protected abstract query(searchQuery: string): Promise<QueryReturnValue<T>>;
79
+ protected abstract filterQueryResults(items: T[]): T[] | Promise<T[]>;
80
+ setDebounceOptions: ({ debounceMs }: DebounceOptions) => void;
83
81
  executeQuery(newSearchString?: string): Promise<void>;
84
82
  search: (searchQuery?: string) => Promise<void> | undefined;
85
83
  cancelScheduledQuery(): void;
86
- resetState(): void;
87
- resetStateAndActivate(): void;
84
+ }
85
+ export declare abstract class BaseSearchSourceSync<T> extends BaseSearchSourceBase<T> implements SearchSourceSync<T> {
86
+ protected searchDebounced: DebouncedExecQueryFunction;
87
+ constructor(options?: SearchSourceOptions);
88
+ protected abstract query(searchQuery: string): QueryReturnValue<T>;
89
+ protected abstract filterQueryResults(items: T[]): T[];
90
+ setDebounceOptions: ({ debounceMs }: DebounceOptions) => void;
91
+ executeQuery(newSearchString?: string): void;
92
+ search: (searchQuery?: string) => Promise<void> | undefined;
93
+ cancelScheduledQuery(): void;
88
94
  }
89
95
  export {};
@@ -1,14 +1,14 @@
1
1
  import { BaseSearchSource } from './BaseSearchSource';
2
- import type { SearchSourceOptions } from './BaseSearchSource';
3
- import { FeedsClient } from '../feeds-client';
4
- import { Feed } from '../feed';
2
+ import type { SearchSourceOptions } from './types';
3
+ import { FeedsClient } from '../../feeds-client';
4
+ import { Feed } from '../../feed';
5
5
  export type FeedSearchSourceOptions = SearchSourceOptions & {
6
6
  groupId?: string;
7
7
  };
8
8
  export declare class FeedSearchSource extends BaseSearchSource<Feed> {
9
- readonly type: "feed";
9
+ readonly type: string;
10
+ readonly feedGroupId?: string | undefined;
10
11
  private readonly client;
11
- private readonly feedGroupId?;
12
12
  constructor(client: FeedsClient, options?: FeedSearchSourceOptions);
13
13
  protected query(searchQuery: string): Promise<{
14
14
  items: never[];
@@ -1,4 +1,4 @@
1
- import { StateStore } from './StateStore';
1
+ import { StateStore } from '../StateStore';
2
2
  import type { SearchSource } from './BaseSearchSource';
3
3
  export type SearchControllerState = {
4
4
  isActive: boolean;
@@ -17,8 +17,6 @@ export declare class SearchController {
17
17
  /**
18
18
  * Not intended for direct use by integrators, might be removed without notice resulting in
19
19
  * broken integrations.
20
- *
21
- * @internal
22
20
  */
23
21
  _internalState: StateStore<InternalSearchControllerState>;
24
22
  state: StateStore<SearchControllerState>;
@@ -1,7 +1,7 @@
1
1
  import { BaseSearchSource } from './BaseSearchSource';
2
- import type { SearchSourceOptions } from './BaseSearchSource';
3
- import { FeedsClient } from '../feeds-client';
4
- import { UserResponse } from '../gen/models';
2
+ import type { SearchSourceOptions } from './types';
3
+ import { FeedsClient } from '../../feeds-client';
4
+ import { UserResponse } from '../../gen/models';
5
5
  export declare class UserSearchSource extends BaseSearchSource<UserResponse> {
6
6
  readonly type: "user";
7
7
  private readonly client;
@@ -10,7 +10,7 @@ export declare class UserSearchSource extends BaseSearchSource<UserResponse> {
10
10
  items: never[];
11
11
  next?: undefined;
12
12
  } | {
13
- items: import("../gen/models").FullUserResponse[];
13
+ items: import("../../gen/models").FullUserResponse[];
14
14
  next: undefined;
15
15
  }>;
16
16
  protected filterQueryResults(items: UserResponse[]): UserResponse[];
@@ -0,0 +1,6 @@
1
+ export * from './SearchController';
2
+ export * from './BaseSearchSource';
3
+ export * from './ActivitySearchSource';
4
+ export * from './FeedSearchSource';
5
+ export * from './UserSearchSource';
6
+ export * from './types';
@@ -0,0 +1,22 @@
1
+ export type SearchSourceState<T = any> = {
2
+ hasNext: boolean;
3
+ isActive: boolean;
4
+ isLoading: boolean;
5
+ items: T[] | undefined;
6
+ searchQuery: string;
7
+ lastQueryError?: Error;
8
+ next?: string | null;
9
+ offset?: number;
10
+ };
11
+ export type SearchSourceOptions = {
12
+ /** The number of milliseconds to debounce the search query. The default interval is 300ms. */
13
+ debounceMs?: number;
14
+ pageSize?: number;
15
+ allowEmptySearchString?: boolean;
16
+ resetOnNewSearchQuery?: boolean;
17
+ };
18
+ export type SearchSourceType = 'activity' | 'user' | 'feed' | (string & {});
19
+ export type QueryReturnValue<T> = {
20
+ items: T[];
21
+ next?: string | null;
22
+ };
@@ -1,3 +1,4 @@
1
+ export * from './search/types';
1
2
  export type FeedsClientOptions = {
2
3
  base_url?: string;
3
4
  timeout?: number;
@@ -1,17 +1,10 @@
1
1
  import type { Feed } from '../../../feed';
2
2
  import type { ActivityPinResponse, ActivityResponse } from '../../../gen/models';
3
- import type { EventPayload } from '../../../types-internal';
4
- export declare const removeActivityFromState: (activityResponse: ActivityResponse, activities: ActivityResponse[] | undefined) => {
5
- changed: boolean;
3
+ import type { EventPayload, UpdateStateResult } from '../../../types-internal';
4
+ export declare const removeActivityFromState: (activityResponse: ActivityResponse, activities: ActivityResponse[] | undefined) => UpdateStateResult<{
6
5
  activities: ActivityResponse[] | undefined;
7
- };
8
- export declare const removePinnedActivityFromState: (activityResponse: ActivityResponse, pinnedActivities: ActivityPinResponse[] | undefined) => {
9
- changed: boolean;
10
- activities: ActivityPinResponse[];
11
- pinned_activities?: undefined;
12
- } | {
13
- changed: boolean;
6
+ }>;
7
+ export declare const removePinnedActivityFromState: (activityResponse: ActivityResponse, pinnedActivities: ActivityPinResponse[] | undefined) => UpdateStateResult<{
14
8
  pinned_activities: ActivityPinResponse[] | undefined;
15
- activities?: undefined;
16
- };
9
+ }>;
17
10
  export declare function handleActivityDeleted(this: Feed, event: EventPayload<'feeds.activity.deleted'>): void;
@@ -326,6 +326,7 @@ export interface AddBookmarkResponse {
326
326
  export interface AddCommentReactionRequest {
327
327
  type: string;
328
328
  create_notification_activity?: boolean;
329
+ skip_push?: boolean;
329
330
  custom?: Record<string, any>;
330
331
  }
331
332
  export interface AddCommentReactionResponse {
@@ -339,6 +340,7 @@ export interface AddCommentRequest {
339
340
  object_type: string;
340
341
  create_notification_activity?: boolean;
341
342
  parent_id?: string;
343
+ skip_push?: boolean;
342
344
  attachments?: Attachment[];
343
345
  mentioned_user_ids?: string[];
344
346
  custom?: Record<string, any>;
@@ -361,6 +363,7 @@ export interface AddFolderRequest {
361
363
  export interface AddReactionRequest {
362
364
  type: string;
363
365
  create_notification_activity?: boolean;
366
+ skip_push?: boolean;
364
367
  custom?: Record<string, any>;
365
368
  }
366
369
  export interface AddReactionResponse {
@@ -495,10 +498,10 @@ export interface BanActionRequest {
495
498
  timeout?: number;
496
499
  }
497
500
  export interface BanOptions {
498
- duration: number;
499
- ip_ban: boolean;
500
- reason: string;
501
- shadow_ban: boolean;
501
+ duration?: number;
502
+ ip_ban?: boolean;
503
+ reason?: string;
504
+ shadow_ban?: boolean;
502
505
  }
503
506
  export interface BanRequest {
504
507
  target_user_id: string;
@@ -515,7 +518,7 @@ export interface BanResponse {
515
518
  duration: string;
516
519
  }
517
520
  export interface BlockContentOptions {
518
- reason: string;
521
+ reason?: string;
519
522
  }
520
523
  export interface BlockListConfig {
521
524
  enabled: boolean;
@@ -944,6 +947,9 @@ export interface ChannelMember {
944
947
  deleted_messages?: string[];
945
948
  user?: UserResponse;
946
949
  }
950
+ export interface ChannelMemberResponse {
951
+ channel_role: string;
952
+ }
947
953
  export interface ChannelMute {
948
954
  created_at: Date;
949
955
  updated_at: Date;
@@ -1030,6 +1036,7 @@ export interface Command {
1030
1036
  export interface CommentAddedEvent {
1031
1037
  created_at: Date;
1032
1038
  fid: string;
1039
+ activity: ActivityResponse;
1033
1040
  comment: CommentResponse;
1034
1041
  custom: Record<string, any>;
1035
1042
  type: string;
@@ -1050,6 +1057,7 @@ export interface CommentDeletedEvent {
1050
1057
  export interface CommentReactionAddedEvent {
1051
1058
  created_at: Date;
1052
1059
  fid: string;
1060
+ activity: ActivityResponse;
1053
1061
  comment: CommentResponse;
1054
1062
  custom: Record<string, any>;
1055
1063
  reaction: FeedsReactionResponse;
@@ -1071,6 +1079,7 @@ export interface CommentReactionDeletedEvent {
1071
1079
  export interface CommentReactionUpdatedEvent {
1072
1080
  created_at: Date;
1073
1081
  fid: string;
1082
+ activity: ActivityResponse;
1074
1083
  comment: CommentResponse;
1075
1084
  custom: Record<string, any>;
1076
1085
  reaction: FeedsReactionResponse;
@@ -1149,7 +1158,6 @@ export interface ConfigResponse {
1149
1158
  automod_toxicity_config?: AutomodToxicityConfig;
1150
1159
  block_list_config?: BlockListConfig;
1151
1160
  llm_config?: LLMConfig;
1152
- rule_builder_config?: RuleBuilderConfig;
1153
1161
  velocity_filter_config?: VelocityFilterConfig;
1154
1162
  video_call_rule_config?: VideoCallRuleConfig;
1155
1163
  }
@@ -1163,8 +1171,8 @@ export interface ConnectUserDetailsRequest {
1163
1171
  privacy_settings?: PrivacySettingsResponse;
1164
1172
  }
1165
1173
  export interface ContentCountRuleParameters {
1166
- threshold: number;
1167
- time_window: string;
1174
+ threshold?: number;
1175
+ time_window?: string;
1168
1176
  }
1169
1177
  export interface CreateBlockListRequest {
1170
1178
  name: string;
@@ -1265,6 +1273,7 @@ export interface DeleteCommentResponse {
1265
1273
  }
1266
1274
  export interface DeleteFeedResponse {
1267
1275
  duration: string;
1276
+ task_id: string;
1268
1277
  }
1269
1278
  export interface DeleteMessageRequest {
1270
1279
  hard_delete?: boolean;
@@ -1484,6 +1493,7 @@ export interface FeedGroup {
1484
1493
  last_feed_get_at?: Date;
1485
1494
  aggregation?: AggregationConfig;
1486
1495
  notification?: NotificationConfig;
1496
+ push_notification?: PushNotificationConfig;
1487
1497
  ranking?: RankingConfig;
1488
1498
  stories?: StoriesConfig;
1489
1499
  }
@@ -1635,6 +1645,14 @@ export interface FeedUpdatedEvent {
1635
1645
  received_at?: Date;
1636
1646
  user?: UserResponseCommonFields;
1637
1647
  }
1648
+ export interface FeedsPreferences {
1649
+ comment?: string;
1650
+ comment_reaction?: string;
1651
+ follow?: string;
1652
+ mention?: string;
1653
+ reaction?: string;
1654
+ custom_activity_types?: Record<string, string>;
1655
+ }
1638
1656
  export interface FeedsReactionResponse {
1639
1657
  activity_id: string;
1640
1658
  created_at: Date;
@@ -1684,7 +1702,7 @@ export interface Flag {
1684
1702
  user?: User;
1685
1703
  }
1686
1704
  export interface FlagContentOptions {
1687
- reason: string;
1705
+ reason?: string;
1688
1706
  }
1689
1707
  export interface FlagRequest {
1690
1708
  entity_id: string;
@@ -1699,7 +1717,7 @@ export interface FlagResponse {
1699
1717
  item_id: string;
1700
1718
  }
1701
1719
  export interface FlagUserOptions {
1702
- reason: string;
1720
+ reason?: string;
1703
1721
  }
1704
1722
  export interface FollowBatchRequest {
1705
1723
  follows: FollowRequest[];
@@ -1731,6 +1749,7 @@ export interface FollowRequest {
1731
1749
  target: string;
1732
1750
  create_notification_activity?: boolean;
1733
1751
  push_preference?: 'all' | 'none';
1752
+ skip_push?: boolean;
1734
1753
  custom?: Record<string, any>;
1735
1754
  }
1736
1755
  export interface FollowResponse {
@@ -1951,8 +1970,8 @@ export interface ImageData {
1951
1970
  width: string;
1952
1971
  }
1953
1972
  export interface ImageRuleParameters {
1954
- threshold: number;
1955
- time_window: string;
1973
+ threshold?: number;
1974
+ time_window?: string;
1956
1975
  harm_labels?: string[];
1957
1976
  }
1958
1977
  export interface ImageSize {
@@ -2024,6 +2043,7 @@ export interface IngressVideoLayerResponse {
2024
2043
  export interface LLMConfig {
2025
2044
  enabled: boolean;
2026
2045
  rules: LLMRule[];
2046
+ app_context?: string;
2027
2047
  async?: boolean;
2028
2048
  severity_descriptions?: Record<string, string>;
2029
2049
  }
@@ -2125,6 +2145,7 @@ export interface Message {
2125
2145
  thread_participants?: User[];
2126
2146
  i18n?: Record<string, string>;
2127
2147
  image_labels?: Record<string, string[]>;
2148
+ member?: ChannelMember;
2128
2149
  moderation?: ModerationV2Response;
2129
2150
  pinned_by?: User;
2130
2151
  poll?: Poll;
@@ -2182,6 +2203,7 @@ export interface MessageResponse {
2182
2203
  draft?: DraftResponse;
2183
2204
  i18n?: Record<string, string>;
2184
2205
  image_labels?: Record<string, string[]>;
2206
+ member?: ChannelMemberResponse;
2185
2207
  moderation?: ModerationV2Response;
2186
2208
  pinned_by?: UserResponse;
2187
2209
  poll?: PollResponseData;
@@ -2206,11 +2228,11 @@ export interface ModerationCustomActionEvent {
2206
2228
  user?: User;
2207
2229
  }
2208
2230
  export interface ModerationFlagResponse {
2209
- created_at: string;
2231
+ created_at: Date;
2210
2232
  entity_id: string;
2211
2233
  entity_type: string;
2212
2234
  type: string;
2213
- updated_at: string;
2235
+ updated_at: Date;
2214
2236
  user_id: string;
2215
2237
  result: Array<Record<string, any>>;
2216
2238
  entity_creator_id?: string;
@@ -2554,10 +2576,16 @@ export interface PrivacySettingsResponse {
2554
2576
  read_receipts?: ReadReceiptsResponse;
2555
2577
  typing_indicators?: TypingIndicatorsResponse;
2556
2578
  }
2579
+ export interface PushNotificationConfig {
2580
+ enable_push?: boolean;
2581
+ push_types?: string[];
2582
+ }
2557
2583
  export interface PushPreferences {
2558
2584
  call_level?: string;
2559
2585
  chat_level?: string;
2560
2586
  disabled_until?: Date;
2587
+ feeds_level?: string;
2588
+ feeds_preferences?: FeedsPreferences;
2561
2589
  }
2562
2590
  export interface Quality {
2563
2591
  bitdepth?: number;
@@ -2947,40 +2975,39 @@ export interface RingSettingsResponse {
2947
2975
  missed_call_timeout_ms: number;
2948
2976
  }
2949
2977
  export interface RuleBuilderAction {
2950
- type: string;
2978
+ type?: string;
2951
2979
  ban_options?: BanOptions;
2952
2980
  flag_content_options?: FlagContentOptions;
2953
2981
  flag_user_options?: FlagUserOptions;
2954
2982
  remove_content_options?: BlockContentOptions;
2955
2983
  }
2956
2984
  export interface RuleBuilderCondition {
2957
- type: string;
2958
2985
  confidence?: number;
2986
+ type?: string;
2959
2987
  content_count_rule_params?: ContentCountRuleParameters;
2960
2988
  image_content_params?: ImageContentParameters;
2961
2989
  image_rule_params?: ImageRuleParameters;
2962
2990
  text_content_params?: TextContentParameters;
2963
2991
  text_rule_params?: TextRuleParameters;
2964
2992
  user_created_within_params?: UserCreatedWithinParameters;
2993
+ user_custom_property_params?: UserCustomPropertyParameters;
2965
2994
  user_rule_params?: UserRuleParameters;
2966
2995
  video_content_params?: VideoContentParameters;
2967
2996
  video_rule_params?: VideoRuleParameters;
2968
2997
  }
2969
2998
  export interface RuleBuilderConditionGroup {
2970
- logic: string;
2971
- conditions: RuleBuilderCondition[];
2999
+ logic?: string;
3000
+ conditions?: RuleBuilderCondition[];
2972
3001
  }
2973
3002
  export interface RuleBuilderConfig {
2974
- rules: RuleBuilderRule[];
2975
3003
  async?: boolean;
3004
+ rules?: RuleBuilderRule[];
2976
3005
  }
2977
3006
  export interface RuleBuilderRule {
2978
- enabled: boolean;
2979
- id: string;
2980
- name: string;
2981
3007
  rule_type: string;
2982
3008
  action: RuleBuilderAction;
2983
3009
  cooldown_period?: string;
3010
+ id?: string;
2984
3011
  logic?: string;
2985
3012
  conditions?: RuleBuilderCondition[];
2986
3013
  groups?: RuleBuilderConditionGroup[];
@@ -2999,6 +3026,7 @@ export interface STTEgressConfig {
2999
3026
  whisper_server_base_url?: string;
3000
3027
  translation_languages?: string[];
3001
3028
  external_storage?: ExternalStorage;
3029
+ speech_segment_config?: SpeechSegmentConfig;
3002
3030
  }
3003
3031
  export interface ScreensharingSettings {
3004
3032
  access_request_enabled: boolean;
@@ -3074,6 +3102,10 @@ export interface SortParamRequest {
3074
3102
  direction?: number;
3075
3103
  field?: string;
3076
3104
  }
3105
+ export interface SpeechSegmentConfig {
3106
+ max_speech_caption_ms?: number;
3107
+ silence_duration_ms?: number;
3108
+ }
3077
3109
  export interface StoriesConfig {
3078
3110
  expiration_behaviour?: 'hide_for_everyone' | 'visible_for_author';
3079
3111
  skip_watched?: boolean;
@@ -3104,14 +3136,16 @@ export interface TextContentParameters {
3104
3136
  severity?: string;
3105
3137
  blocklist_match?: string[];
3106
3138
  harm_labels?: string[];
3139
+ llm_harm_labels?: Record<string, string>;
3107
3140
  }
3108
3141
  export interface TextRuleParameters {
3109
- threshold: number;
3110
- time_window: string;
3111
3142
  contains_url?: boolean;
3112
3143
  severity?: string;
3144
+ threshold?: number;
3145
+ time_window?: string;
3113
3146
  blocklist_match?: string[];
3114
3147
  harm_labels?: string[];
3148
+ llm_harm_labels?: Record<string, string>;
3115
3149
  }
3116
3150
  export interface ThreadedCommentResponse {
3117
3151
  confidence_score: number;
@@ -3161,11 +3195,13 @@ export interface TranscriptionSettings {
3161
3195
  closed_caption_mode: 'available' | 'disabled' | 'auto-on';
3162
3196
  language: 'auto' | 'en' | 'fr' | 'es' | 'de' | 'it' | 'nl' | 'pt' | 'pl' | 'ca' | 'cs' | 'da' | 'el' | 'fi' | 'id' | 'ja' | 'ru' | 'sv' | 'ta' | 'th' | 'tr' | 'hu' | 'ro' | 'zh' | 'ar' | 'tl' | 'he' | 'hi' | 'hr' | 'ko' | 'ms' | 'no' | 'uk' | 'bg' | 'et' | 'sl' | 'sk';
3163
3197
  mode: 'available' | 'disabled' | 'auto-on';
3198
+ speech_segment_config?: SpeechSegmentConfig;
3164
3199
  }
3165
3200
  export interface TranscriptionSettingsResponse {
3166
3201
  closed_caption_mode: 'available' | 'disabled' | 'auto-on';
3167
3202
  language: 'auto' | 'en' | 'fr' | 'es' | 'de' | 'it' | 'nl' | 'pt' | 'pl' | 'ca' | 'cs' | 'da' | 'el' | 'fi' | 'id' | 'ja' | 'ru' | 'sv' | 'ta' | 'th' | 'tr' | 'hu' | 'ro' | 'zh' | 'ar' | 'tl' | 'he' | 'hi' | 'hr' | 'ko' | 'ms' | 'no' | 'uk' | 'bg' | 'et' | 'sl' | 'sk';
3168
3203
  mode: 'available' | 'disabled' | 'auto-on';
3204
+ speech_segment_config?: SpeechSegmentConfig;
3169
3205
  }
3170
3206
  export interface TypingIndicators {
3171
3207
  enabled: boolean;
@@ -3244,6 +3280,7 @@ export interface UpdateBookmarkResponse {
3244
3280
  }
3245
3281
  export interface UpdateCommentRequest {
3246
3282
  comment?: string;
3283
+ skip_push?: boolean;
3247
3284
  custom?: Record<string, any>;
3248
3285
  }
3249
3286
  export interface UpdateCommentResponse {
@@ -3276,6 +3313,7 @@ export interface UpdateFollowRequest {
3276
3313
  create_notification_activity?: boolean;
3277
3314
  follower_role?: string;
3278
3315
  push_preference?: 'all' | 'none';
3316
+ skip_push?: boolean;
3279
3317
  custom?: Record<string, any>;
3280
3318
  }
3281
3319
  export interface UpdateFollowResponse {
@@ -3393,6 +3431,10 @@ export interface UserBannedEvent {
3393
3431
  export interface UserCreatedWithinParameters {
3394
3432
  max_age?: string;
3395
3433
  }
3434
+ export interface UserCustomPropertyParameters {
3435
+ operator?: string;
3436
+ property_key?: string;
3437
+ }
3396
3438
  export interface UserDeactivatedEvent {
3397
3439
  created_at: Date;
3398
3440
  created_by: User;
@@ -3545,8 +3587,8 @@ export interface VideoOrientation {
3545
3587
  orientation?: number;
3546
3588
  }
3547
3589
  export interface VideoRuleParameters {
3548
- threshold: number;
3549
- time_window: string;
3590
+ threshold?: number;
3591
+ time_window?: string;
3550
3592
  harm_labels?: string[];
3551
3593
  }
3552
3594
  export interface VideoSettings {