@stream-io/feeds-client 1.2.0 → 1.4.0
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/CHANGELOG.md +15 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-bindings.js +1 -1
- package/dist/es/index.mjs +1 -1
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/react-bindings.mjs +1 -1
- package/dist/{feeds-client-BP0fE4NZ.js → feeds-client-BaIrmzwU.js} +53 -2
- package/dist/feeds-client-BaIrmzwU.js.map +1 -0
- package/dist/{feeds-client-ACVPbpUP.mjs → feeds-client-Dne86c6R.mjs} +53 -2
- package/dist/feeds-client-Dne86c6R.mjs.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/common/real-time/StableWSConnection.d.ts +3 -3
- package/dist/types/common/real-time/StableWSConnection.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/activity-updater.d.ts +1 -0
- package/dist/types/feed/event-handlers/activity-updater.d.ts.map +1 -1
- package/dist/types/feed/feed.d.ts +2 -2
- package/dist/types/feed/feed.d.ts.map +1 -1
- package/dist/types/feeds-client/feeds-client.d.ts +4 -2
- package/dist/types/feeds-client/feeds-client.d.ts.map +1 -1
- package/dist/types/gen/feeds/FeedsApi.d.ts +4 -1
- package/dist/types/gen/feeds/FeedsApi.d.ts.map +1 -1
- package/dist/types/gen/model-decoders/event-decoder-mapping.d.ts.map +1 -1
- package/dist/types/gen/models/index.d.ts +66 -1
- package/dist/types/gen/models/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/feed/feed.ts +1 -0
- package/src/feeds-client/feeds-client.ts +12 -0
- package/src/gen/feeds/FeedsApi.ts +27 -0
- package/src/gen/model-decoders/decoders.ts +20 -0
- package/src/gen/model-decoders/event-decoder-mapping.ts +3 -0
- package/src/gen/models/index.ts +111 -1
- package/dist/feeds-client-ACVPbpUP.mjs.map +0 -1
- package/dist/feeds-client-BP0fE4NZ.js.map +0 -1
|
@@ -685,6 +685,17 @@ decoders.CommentResponse = (input?: Record<string, any>) => {
|
|
|
685
685
|
return decode(typeMappings, input);
|
|
686
686
|
};
|
|
687
687
|
|
|
688
|
+
decoders.CommentRestoredEvent = (input?: Record<string, any>) => {
|
|
689
|
+
const typeMappings: TypeMapping = {
|
|
690
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
691
|
+
|
|
692
|
+
comment: { type: 'CommentResponse', isSingle: true },
|
|
693
|
+
|
|
694
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
695
|
+
};
|
|
696
|
+
return decode(typeMappings, input);
|
|
697
|
+
};
|
|
698
|
+
|
|
688
699
|
decoders.CommentUpdatedEvent = (input?: Record<string, any>) => {
|
|
689
700
|
const typeMappings: TypeMapping = {
|
|
690
701
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1707,6 +1718,15 @@ decoders.RestoreActivityResponse = (input?: Record<string, any>) => {
|
|
|
1707
1718
|
return decode(typeMappings, input);
|
|
1708
1719
|
};
|
|
1709
1720
|
|
|
1721
|
+
decoders.RestoreCommentResponse = (input?: Record<string, any>) => {
|
|
1722
|
+
const typeMappings: TypeMapping = {
|
|
1723
|
+
activity: { type: 'ActivityResponse', isSingle: true },
|
|
1724
|
+
|
|
1725
|
+
comment: { type: 'CommentResponse', isSingle: true },
|
|
1726
|
+
};
|
|
1727
|
+
return decode(typeMappings, input);
|
|
1728
|
+
};
|
|
1729
|
+
|
|
1710
1730
|
decoders.ReviewQueueItemResponse = (input?: Record<string, any>) => {
|
|
1711
1731
|
const typeMappings: TypeMapping = {
|
|
1712
1732
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -73,6 +73,9 @@ const eventDecoderMapping: Record<
|
|
|
73
73
|
'feeds.comment.reaction.updated': (data: Record<string, any>) =>
|
|
74
74
|
decoders.CommentReactionUpdatedEvent(data),
|
|
75
75
|
|
|
76
|
+
'feeds.comment.restored': (data: Record<string, any>) =>
|
|
77
|
+
decoders.CommentRestoredEvent(data),
|
|
78
|
+
|
|
76
79
|
'feeds.comment.updated': (data: Record<string, any>) =>
|
|
77
80
|
decoders.CommentUpdatedEvent(data),
|
|
78
81
|
|
package/src/gen/models/index.ts
CHANGED
|
@@ -8,6 +8,16 @@ export interface AIImageConfig {
|
|
|
8
8
|
async?: boolean;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
export interface AIImageLabelDefinition {
|
|
12
|
+
description: string;
|
|
13
|
+
|
|
14
|
+
group: string;
|
|
15
|
+
|
|
16
|
+
key: string;
|
|
17
|
+
|
|
18
|
+
label: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
export interface AITextConfig {
|
|
12
22
|
enabled: boolean;
|
|
13
23
|
|
|
@@ -59,7 +69,7 @@ export interface AWSRekognitionRule {
|
|
|
59
69
|
|
|
60
70
|
min_confidence: number;
|
|
61
71
|
|
|
62
|
-
subclassifications?: Record<string,
|
|
72
|
+
subclassifications?: Record<string, any>;
|
|
63
73
|
}
|
|
64
74
|
|
|
65
75
|
export interface AcceptFeedMemberInviteRequest {}
|
|
@@ -502,6 +512,8 @@ export interface ActivityResponse {
|
|
|
502
512
|
parent?: ActivityResponse;
|
|
503
513
|
|
|
504
514
|
poll?: PollResponseData;
|
|
515
|
+
|
|
516
|
+
score_vars?: Record<string, any>;
|
|
505
517
|
}
|
|
506
518
|
|
|
507
519
|
export interface ActivityRestoredEvent {
|
|
@@ -1508,6 +1520,8 @@ export interface ChannelConfigWithInfo {
|
|
|
1508
1520
|
|
|
1509
1521
|
automod_thresholds?: Thresholds;
|
|
1510
1522
|
|
|
1523
|
+
chat_preferences?: ChatPreferences;
|
|
1524
|
+
|
|
1511
1525
|
grants?: Record<string, string[]>;
|
|
1512
1526
|
}
|
|
1513
1527
|
|
|
@@ -1612,6 +1626,8 @@ export interface ChannelPushPreferencesResponse {
|
|
|
1612
1626
|
chat_level?: string;
|
|
1613
1627
|
|
|
1614
1628
|
disabled_until?: Date;
|
|
1629
|
+
|
|
1630
|
+
chat_preferences?: ChatPreferencesResponse;
|
|
1615
1631
|
}
|
|
1616
1632
|
|
|
1617
1633
|
export interface ChannelResponse {
|
|
@@ -1672,6 +1688,56 @@ export interface ChannelResponse {
|
|
|
1672
1688
|
truncated_by?: UserResponse;
|
|
1673
1689
|
}
|
|
1674
1690
|
|
|
1691
|
+
export interface ChatPreferences {
|
|
1692
|
+
channel_mentions?: string;
|
|
1693
|
+
|
|
1694
|
+
default_preference?: string;
|
|
1695
|
+
|
|
1696
|
+
direct_mentions?: string;
|
|
1697
|
+
|
|
1698
|
+
distinct_channel_messages?: string;
|
|
1699
|
+
|
|
1700
|
+
group_mentions?: string;
|
|
1701
|
+
|
|
1702
|
+
here_mentions?: string;
|
|
1703
|
+
|
|
1704
|
+
role_mentions?: string;
|
|
1705
|
+
|
|
1706
|
+
thread_replies?: string;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
export interface ChatPreferencesInput {
|
|
1710
|
+
channel_mentions?: 'all' | 'none';
|
|
1711
|
+
|
|
1712
|
+
default_preference?: 'all' | 'none';
|
|
1713
|
+
|
|
1714
|
+
direct_mentions?: 'all' | 'none';
|
|
1715
|
+
|
|
1716
|
+
group_mentions?: 'all' | 'none';
|
|
1717
|
+
|
|
1718
|
+
here_mentions?: 'all' | 'none';
|
|
1719
|
+
|
|
1720
|
+
role_mentions?: 'all' | 'none';
|
|
1721
|
+
|
|
1722
|
+
thread_replies?: 'all' | 'none';
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
export interface ChatPreferencesResponse {
|
|
1726
|
+
channel_mentions?: string;
|
|
1727
|
+
|
|
1728
|
+
default_preference?: string;
|
|
1729
|
+
|
|
1730
|
+
direct_mentions?: string;
|
|
1731
|
+
|
|
1732
|
+
group_mentions?: string;
|
|
1733
|
+
|
|
1734
|
+
here_mentions?: string;
|
|
1735
|
+
|
|
1736
|
+
role_mentions?: string;
|
|
1737
|
+
|
|
1738
|
+
thread_replies?: string;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1675
1741
|
export interface ClosedCaptionRuleParameters {
|
|
1676
1742
|
threshold?: number;
|
|
1677
1743
|
|
|
@@ -1868,6 +1934,24 @@ export interface CommentResponse {
|
|
|
1868
1934
|
reaction_groups?: Record<string, FeedsReactionGroupResponse>;
|
|
1869
1935
|
}
|
|
1870
1936
|
|
|
1937
|
+
export interface CommentRestoredEvent {
|
|
1938
|
+
created_at: Date;
|
|
1939
|
+
|
|
1940
|
+
fid: string;
|
|
1941
|
+
|
|
1942
|
+
comment: CommentResponse;
|
|
1943
|
+
|
|
1944
|
+
custom: Record<string, any>;
|
|
1945
|
+
|
|
1946
|
+
type: string;
|
|
1947
|
+
|
|
1948
|
+
feed_visibility?: string;
|
|
1949
|
+
|
|
1950
|
+
received_at?: Date;
|
|
1951
|
+
|
|
1952
|
+
user?: UserResponseCommonFields;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1871
1955
|
export interface CommentUpdatedEvent {
|
|
1872
1956
|
created_at: Date;
|
|
1873
1957
|
|
|
@@ -1903,6 +1987,8 @@ export interface ConfigResponse {
|
|
|
1903
1987
|
|
|
1904
1988
|
supported_video_call_harm_types: string[];
|
|
1905
1989
|
|
|
1990
|
+
ai_image_label_definitions?: AIImageLabelDefinition[];
|
|
1991
|
+
|
|
1906
1992
|
ai_image_config?: AIImageConfig;
|
|
1907
1993
|
|
|
1908
1994
|
ai_image_subclassifications?: Record<string, string[]>;
|
|
@@ -2383,6 +2469,8 @@ export interface EnrichedReaction {
|
|
|
2383
2469
|
export interface EnrichmentOptions {
|
|
2384
2470
|
enrich_own_followings?: boolean;
|
|
2385
2471
|
|
|
2472
|
+
include_score_vars?: boolean;
|
|
2473
|
+
|
|
2386
2474
|
skip_activity?: boolean;
|
|
2387
2475
|
|
|
2388
2476
|
skip_activity_collections?: boolean;
|
|
@@ -2953,6 +3041,8 @@ export interface FilterConfigResponse {
|
|
|
2953
3041
|
llm_labels: string[];
|
|
2954
3042
|
|
|
2955
3043
|
ai_text_labels?: string[];
|
|
3044
|
+
|
|
3045
|
+
config_keys?: string[];
|
|
2956
3046
|
}
|
|
2957
3047
|
|
|
2958
3048
|
export interface FlagCountRuleParameters {
|
|
@@ -4349,6 +4439,8 @@ export interface PushPreferenceInput {
|
|
|
4349
4439
|
|
|
4350
4440
|
user_id?: string;
|
|
4351
4441
|
|
|
4442
|
+
chat_preferences?: ChatPreferencesInput;
|
|
4443
|
+
|
|
4352
4444
|
feeds_preferences?: FeedsPreferences;
|
|
4353
4445
|
}
|
|
4354
4446
|
|
|
@@ -4361,12 +4453,16 @@ export interface PushPreferencesResponse {
|
|
|
4361
4453
|
|
|
4362
4454
|
feeds_level?: string;
|
|
4363
4455
|
|
|
4456
|
+
chat_preferences?: ChatPreferencesResponse;
|
|
4457
|
+
|
|
4364
4458
|
feeds_preferences?: FeedsPreferencesResponse;
|
|
4365
4459
|
}
|
|
4366
4460
|
|
|
4367
4461
|
export interface QueryActivitiesRequest {
|
|
4368
4462
|
enrich_own_fields?: boolean;
|
|
4369
4463
|
|
|
4464
|
+
include_soft_deleted_activities?: boolean;
|
|
4465
|
+
|
|
4370
4466
|
limit?: number;
|
|
4371
4467
|
|
|
4372
4468
|
next?: string;
|
|
@@ -4944,6 +5040,16 @@ export interface RestoreActivityResponse {
|
|
|
4944
5040
|
activity: ActivityResponse;
|
|
4945
5041
|
}
|
|
4946
5042
|
|
|
5043
|
+
export interface RestoreCommentRequest {}
|
|
5044
|
+
|
|
5045
|
+
export interface RestoreCommentResponse {
|
|
5046
|
+
duration: string;
|
|
5047
|
+
|
|
5048
|
+
activity: ActivityResponse;
|
|
5049
|
+
|
|
5050
|
+
comment: CommentResponse;
|
|
5051
|
+
}
|
|
5052
|
+
|
|
4947
5053
|
export interface ReviewQueueItemResponse {
|
|
4948
5054
|
ai_text_severity: string;
|
|
4949
5055
|
|
|
@@ -5021,6 +5127,8 @@ export interface RingSettingsResponse {
|
|
|
5021
5127
|
}
|
|
5022
5128
|
|
|
5023
5129
|
export interface RuleBuilderAction {
|
|
5130
|
+
skip_inbox?: boolean;
|
|
5131
|
+
|
|
5024
5132
|
type?:
|
|
5025
5133
|
| 'ban_user'
|
|
5026
5134
|
| 'flag_user'
|
|
@@ -6389,6 +6497,7 @@ export type WSClientEvent =
|
|
|
6389
6497
|
| ({ type: 'feeds.comment.reaction.added' } & CommentReactionAddedEvent)
|
|
6390
6498
|
| ({ type: 'feeds.comment.reaction.deleted' } & CommentReactionDeletedEvent)
|
|
6391
6499
|
| ({ type: 'feeds.comment.reaction.updated' } & CommentReactionUpdatedEvent)
|
|
6500
|
+
| ({ type: 'feeds.comment.restored' } & CommentRestoredEvent)
|
|
6392
6501
|
| ({ type: 'feeds.comment.updated' } & CommentUpdatedEvent)
|
|
6393
6502
|
| ({ type: 'feeds.feed.created' } & FeedCreatedEvent)
|
|
6394
6503
|
| ({ type: 'feeds.feed.deleted' } & FeedDeletedEvent)
|
|
@@ -6446,6 +6555,7 @@ export type WSEvent =
|
|
|
6446
6555
|
| ({ type: 'feeds.comment.reaction.added' } & CommentReactionAddedEvent)
|
|
6447
6556
|
| ({ type: 'feeds.comment.reaction.deleted' } & CommentReactionDeletedEvent)
|
|
6448
6557
|
| ({ type: 'feeds.comment.reaction.updated' } & CommentReactionUpdatedEvent)
|
|
6558
|
+
| ({ type: 'feeds.comment.restored' } & CommentRestoredEvent)
|
|
6449
6559
|
| ({ type: 'feeds.comment.updated' } & CommentUpdatedEvent)
|
|
6450
6560
|
| ({ type: 'feeds.feed.created' } & FeedCreatedEvent)
|
|
6451
6561
|
| ({ type: 'feeds.feed.deleted' } & FeedDeletedEvent)
|