@stream-io/node-sdk 0.8.11 → 0.8.12
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 +14 -0
- package/dist/index.cjs.js +227 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +227 -10
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/StreamChannel.d.ts +8 -1
- package/dist/src/StreamChatClient.d.ts +12 -0
- package/dist/src/gen/common/CommonApi.d.ts +2 -1
- package/dist/src/gen/feeds/FeedsApi.d.ts +4 -1
- package/dist/src/gen/models/index.d.ts +580 -11
- package/dist/src/gen/video/VideoApi.d.ts +2 -1
- package/package.json +1 -1
- package/src/StreamChannel.ts +23 -1
- package/src/StreamChatClient.ts +29 -1
- package/src/StreamClient.ts +13 -6
- package/src/gen/common/CommonApi.ts +25 -0
- package/src/gen/feeds/FeedsApi.ts +29 -0
- package/src/gen/model-decoders/decoders.ts +118 -2
- package/src/gen/models/index.ts +594 -11
- package/src/gen/moderation/ModerationApi.ts +2 -0
- package/src/gen/video/VideoApi.ts +25 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.12](https://github.com/GetStream/stream-node/compare/v0.8.11...v0.8.12) (2026-10-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add selector time_budget_ms and degraded_selectors ([#371](https://github.com/GetStream/stream-node/issues/371)) ([b60a393](https://github.com/GetStream/stream-node/commit/b60a39319672a283e0e2407102b4f508a7a376d2))
|
|
9
|
+
* update to latest API spec ([#368](https://github.com/GetStream/stream-node/issues/368)) ([f2d53d2](https://github.com/GetStream/stream-node/commit/f2d53d2fa0e7e800bfa04f90f97f434d16ec79b0))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* don't encode validity_in_seconds in user/call token payloads ([#366](https://github.com/GetStream/stream-node/issues/366)) ([e74fad5](https://github.com/GetStream/stream-node/commit/e74fad5d59382f9138a2eadb568edde25501034e))
|
|
15
|
+
* file type in uploadChannelImage/uploadChannelFile methods ([#370](https://github.com/GetStream/stream-node/issues/370)) ([3748509](https://github.com/GetStream/stream-node/commit/3748509b8295cecc98e6917c5811bc405c8f21cd))
|
|
16
|
+
|
|
3
17
|
## [0.8.11](https://github.com/GetStream/stream-node/compare/v0.8.10...v0.8.11) (2026-10-05)
|
|
4
18
|
|
|
5
19
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -847,6 +847,26 @@ decoders["AsyncExportErrorEvent"] = (input) => {
|
|
|
847
847
|
}
|
|
848
848
|
}, input);
|
|
849
849
|
};
|
|
850
|
+
decoders["AsyncExportLabelResultsEvent"] = (input) => {
|
|
851
|
+
return decode({
|
|
852
|
+
created_at: {
|
|
853
|
+
type: "DatetimeType",
|
|
854
|
+
isSingle: true
|
|
855
|
+
},
|
|
856
|
+
finished_at: {
|
|
857
|
+
type: "DatetimeType",
|
|
858
|
+
isSingle: true
|
|
859
|
+
},
|
|
860
|
+
started_at: {
|
|
861
|
+
type: "DatetimeType",
|
|
862
|
+
isSingle: true
|
|
863
|
+
},
|
|
864
|
+
received_at: {
|
|
865
|
+
type: "DatetimeType",
|
|
866
|
+
isSingle: true
|
|
867
|
+
}
|
|
868
|
+
}, input);
|
|
869
|
+
};
|
|
850
870
|
decoders["AsyncExportModerationLogsEvent"] = (input) => {
|
|
851
871
|
return decode({
|
|
852
872
|
created_at: {
|
|
@@ -907,6 +927,46 @@ decoders["AsyncExportUsersEvent"] = (input) => {
|
|
|
907
927
|
}
|
|
908
928
|
}, input);
|
|
909
929
|
};
|
|
930
|
+
decoders["AsyncImportErrorEvent"] = (input) => {
|
|
931
|
+
return decode({
|
|
932
|
+
created_at: {
|
|
933
|
+
type: "DatetimeType",
|
|
934
|
+
isSingle: true
|
|
935
|
+
},
|
|
936
|
+
finished_at: {
|
|
937
|
+
type: "DatetimeType",
|
|
938
|
+
isSingle: true
|
|
939
|
+
},
|
|
940
|
+
received_at: {
|
|
941
|
+
type: "DatetimeType",
|
|
942
|
+
isSingle: true
|
|
943
|
+
},
|
|
944
|
+
started_at: {
|
|
945
|
+
type: "DatetimeType",
|
|
946
|
+
isSingle: true
|
|
947
|
+
}
|
|
948
|
+
}, input);
|
|
949
|
+
};
|
|
950
|
+
decoders["AsyncImportSuccessEvent"] = (input) => {
|
|
951
|
+
return decode({
|
|
952
|
+
created_at: {
|
|
953
|
+
type: "DatetimeType",
|
|
954
|
+
isSingle: true
|
|
955
|
+
},
|
|
956
|
+
finished_at: {
|
|
957
|
+
type: "DatetimeType",
|
|
958
|
+
isSingle: true
|
|
959
|
+
},
|
|
960
|
+
received_at: {
|
|
961
|
+
type: "DatetimeType",
|
|
962
|
+
isSingle: true
|
|
963
|
+
},
|
|
964
|
+
started_at: {
|
|
965
|
+
type: "DatetimeType",
|
|
966
|
+
isSingle: true
|
|
967
|
+
}
|
|
968
|
+
}, input);
|
|
969
|
+
};
|
|
910
970
|
decoders["AutomodDetailsResponse"] = (input) => {
|
|
911
971
|
return decode({ result: {
|
|
912
972
|
type: "MessageModerationResult",
|
|
@@ -1623,6 +1683,22 @@ decoders["CallRingEvent"] = (input) => {
|
|
|
1623
1683
|
}
|
|
1624
1684
|
}, input);
|
|
1625
1685
|
};
|
|
1686
|
+
decoders["CallRingSettledEvent"] = (input) => {
|
|
1687
|
+
return decode({
|
|
1688
|
+
created_at: {
|
|
1689
|
+
type: "DatetimeType",
|
|
1690
|
+
isSingle: true
|
|
1691
|
+
},
|
|
1692
|
+
rang_at: {
|
|
1693
|
+
type: "DatetimeType",
|
|
1694
|
+
isSingle: true
|
|
1695
|
+
},
|
|
1696
|
+
settled_at: {
|
|
1697
|
+
type: "DatetimeType",
|
|
1698
|
+
isSingle: true
|
|
1699
|
+
}
|
|
1700
|
+
}, input);
|
|
1701
|
+
};
|
|
1626
1702
|
decoders["CallRtmpBroadcastFailedEvent"] = (input) => {
|
|
1627
1703
|
return decode({ created_at: {
|
|
1628
1704
|
type: "DatetimeType",
|
|
@@ -2803,6 +2879,22 @@ decoders["CommentDeletedEvent"] = (input) => {
|
|
|
2803
2879
|
}
|
|
2804
2880
|
}, input);
|
|
2805
2881
|
};
|
|
2882
|
+
decoders["CommentFeedbackEvent"] = (input) => {
|
|
2883
|
+
return decode({
|
|
2884
|
+
created_at: {
|
|
2885
|
+
type: "DatetimeType",
|
|
2886
|
+
isSingle: true
|
|
2887
|
+
},
|
|
2888
|
+
received_at: {
|
|
2889
|
+
type: "DatetimeType",
|
|
2890
|
+
isSingle: true
|
|
2891
|
+
},
|
|
2892
|
+
user: {
|
|
2893
|
+
type: "UserResponseCommonFields",
|
|
2894
|
+
isSingle: true
|
|
2895
|
+
}
|
|
2896
|
+
}, input);
|
|
2897
|
+
};
|
|
2806
2898
|
decoders["CommentReactionAddedEvent"] = (input) => {
|
|
2807
2899
|
return decode({
|
|
2808
2900
|
created_at: {
|
|
@@ -3729,6 +3821,12 @@ decoders["FeedsReactionResponse"] = (input) => {
|
|
|
3729
3821
|
}
|
|
3730
3822
|
}, input);
|
|
3731
3823
|
};
|
|
3824
|
+
decoders["FeedsRetentionPolicy"] = (input) => {
|
|
3825
|
+
return decode({ enabled_at: {
|
|
3826
|
+
type: "DatetimeType",
|
|
3827
|
+
isSingle: true
|
|
3828
|
+
} }, input);
|
|
3829
|
+
};
|
|
3732
3830
|
decoders["FeedsShareResponse"] = (input) => {
|
|
3733
3831
|
return decode({
|
|
3734
3832
|
created_at: {
|
|
@@ -4239,7 +4337,7 @@ decoders["GetFeedViewResponse"] = (input) => {
|
|
|
4239
4337
|
};
|
|
4240
4338
|
decoders["GetFeedsRetentionPolicyResponse"] = (input) => {
|
|
4241
4339
|
return decode({ policies: {
|
|
4242
|
-
type: "
|
|
4340
|
+
type: "FeedsRetentionPolicy",
|
|
4243
4341
|
isSingle: false
|
|
4244
4342
|
} }, input);
|
|
4245
4343
|
};
|
|
@@ -5967,6 +6065,12 @@ decoders["QueryCallParticipantsResponse"] = (input) => {
|
|
|
5967
6065
|
}
|
|
5968
6066
|
}, input);
|
|
5969
6067
|
};
|
|
6068
|
+
decoders["QueryCallRingAttemptsResponse"] = (input) => {
|
|
6069
|
+
return decode({ ring_attempts: {
|
|
6070
|
+
type: "RingAttemptResponse",
|
|
6071
|
+
isSingle: false
|
|
6072
|
+
} }, input);
|
|
6073
|
+
};
|
|
5970
6074
|
decoders["QueryCallSessionParticipantStatsResponse"] = (input) => {
|
|
5971
6075
|
return decode({
|
|
5972
6076
|
participants: {
|
|
@@ -6703,6 +6807,66 @@ decoders["RevisionHistoryResponse"] = (input) => {
|
|
|
6703
6807
|
isSingle: true
|
|
6704
6808
|
} }, input);
|
|
6705
6809
|
};
|
|
6810
|
+
decoders["RingAttemptResponse"] = (input) => {
|
|
6811
|
+
return decode({
|
|
6812
|
+
created_at: {
|
|
6813
|
+
type: "DatetimeType",
|
|
6814
|
+
isSingle: true
|
|
6815
|
+
},
|
|
6816
|
+
expires_at: {
|
|
6817
|
+
type: "DatetimeType",
|
|
6818
|
+
isSingle: true
|
|
6819
|
+
},
|
|
6820
|
+
targets: {
|
|
6821
|
+
type: "RingTargetResponse",
|
|
6822
|
+
isSingle: false
|
|
6823
|
+
},
|
|
6824
|
+
deleted_at: {
|
|
6825
|
+
type: "DatetimeType",
|
|
6826
|
+
isSingle: true
|
|
6827
|
+
},
|
|
6828
|
+
settled_at: {
|
|
6829
|
+
type: "DatetimeType",
|
|
6830
|
+
isSingle: true
|
|
6831
|
+
}
|
|
6832
|
+
}, input);
|
|
6833
|
+
};
|
|
6834
|
+
decoders["RingDeliveryResponse"] = (input) => {
|
|
6835
|
+
return decode({
|
|
6836
|
+
sent_at: {
|
|
6837
|
+
type: "DatetimeType",
|
|
6838
|
+
isSingle: true
|
|
6839
|
+
},
|
|
6840
|
+
acked_at: {
|
|
6841
|
+
type: "DatetimeType",
|
|
6842
|
+
isSingle: true
|
|
6843
|
+
},
|
|
6844
|
+
displayed_at: {
|
|
6845
|
+
type: "DatetimeType",
|
|
6846
|
+
isSingle: true
|
|
6847
|
+
},
|
|
6848
|
+
fetched_at: {
|
|
6849
|
+
type: "DatetimeType",
|
|
6850
|
+
isSingle: true
|
|
6851
|
+
},
|
|
6852
|
+
provider_accepted_at: {
|
|
6853
|
+
type: "DatetimeType",
|
|
6854
|
+
isSingle: true
|
|
6855
|
+
}
|
|
6856
|
+
}, input);
|
|
6857
|
+
};
|
|
6858
|
+
decoders["RingTargetResponse"] = (input) => {
|
|
6859
|
+
return decode({
|
|
6860
|
+
state_at: {
|
|
6861
|
+
type: "DatetimeType",
|
|
6862
|
+
isSingle: true
|
|
6863
|
+
},
|
|
6864
|
+
deliveries: {
|
|
6865
|
+
type: "RingDeliveryResponse",
|
|
6866
|
+
isSingle: false
|
|
6867
|
+
}
|
|
6868
|
+
}, input);
|
|
6869
|
+
};
|
|
6706
6870
|
decoders["Role"] = (input) => {
|
|
6707
6871
|
return decode({
|
|
6708
6872
|
created_at: {
|
|
@@ -6917,7 +7081,7 @@ decoders["SessionWarningResponse"] = (input) => {
|
|
|
6917
7081
|
};
|
|
6918
7082
|
decoders["SetFeedsRetentionPolicyResponse"] = (input) => {
|
|
6919
7083
|
return decode({ policy: {
|
|
6920
|
-
type: "
|
|
7084
|
+
type: "FeedsRetentionPolicy",
|
|
6921
7085
|
isSingle: true
|
|
6922
7086
|
} }, input);
|
|
6923
7087
|
};
|
|
@@ -8274,6 +8438,16 @@ var CommonApi = class {
|
|
|
8274
8438
|
decoders["UpdateBlockListResponse"]?.(response);
|
|
8275
8439
|
return response;
|
|
8276
8440
|
}
|
|
8441
|
+
async checkGCPPubSub(request) {
|
|
8442
|
+
const body = {
|
|
8443
|
+
gcp_pubsub_event_based_ordering_key_enabled: request?.gcp_pubsub_event_based_ordering_key_enabled,
|
|
8444
|
+
gcp_pubsub_region: request?.gcp_pubsub_region,
|
|
8445
|
+
gcp_pubsub_topic: request?.gcp_pubsub_topic
|
|
8446
|
+
};
|
|
8447
|
+
const response = await this.apiClient.sendRequest("POST", "/api/v2/check_gcp_pubsub", void 0, void 0, body);
|
|
8448
|
+
decoders["CheckGCPPubSubResponse"]?.(response);
|
|
8449
|
+
return response;
|
|
8450
|
+
}
|
|
8277
8451
|
async checkPush(request) {
|
|
8278
8452
|
const body = {
|
|
8279
8453
|
apn_template: request?.apn_template,
|
|
@@ -9055,6 +9229,16 @@ var VideoApi = class {
|
|
|
9055
9229
|
decoders["QueryCallMembersResponse"]?.(response);
|
|
9056
9230
|
return response;
|
|
9057
9231
|
}
|
|
9232
|
+
async queryCallRingAttempts(request) {
|
|
9233
|
+
const body = {
|
|
9234
|
+
id: request?.id,
|
|
9235
|
+
type: request?.type,
|
|
9236
|
+
call_session_id: request?.call_session_id
|
|
9237
|
+
};
|
|
9238
|
+
const response = await this.apiClient.sendRequest("POST", "/api/v2/video/call/ring_attempts", void 0, void 0, body);
|
|
9239
|
+
decoders["QueryCallRingAttemptsResponse"]?.(response);
|
|
9240
|
+
return response;
|
|
9241
|
+
}
|
|
9058
9242
|
async queryCallStats(request) {
|
|
9059
9243
|
const body = {
|
|
9060
9244
|
limit: request?.limit,
|
|
@@ -11609,6 +11793,12 @@ var StreamChannel = class extends ChannelApi {
|
|
|
11609
11793
|
...request?.payload ?? { filter_conditions: {} }
|
|
11610
11794
|
} });
|
|
11611
11795
|
}
|
|
11796
|
+
uploadChannelFile = (request) => {
|
|
11797
|
+
return super.uploadChannelFile(request);
|
|
11798
|
+
};
|
|
11799
|
+
uploadChannelImage = (request) => {
|
|
11800
|
+
return super.uploadChannelImage(request);
|
|
11801
|
+
};
|
|
11612
11802
|
};
|
|
11613
11803
|
//#endregion
|
|
11614
11804
|
//#region src/StreamChatClient.ts
|
|
@@ -11616,6 +11806,12 @@ var StreamChatClient = class extends ChatApi {
|
|
|
11616
11806
|
channel = (type, id) => {
|
|
11617
11807
|
return new StreamChannel(this, type, id);
|
|
11618
11808
|
};
|
|
11809
|
+
uploadChannelFile = (request) => {
|
|
11810
|
+
return super.uploadChannelFile(request);
|
|
11811
|
+
};
|
|
11812
|
+
uploadChannelImage = (request) => {
|
|
11813
|
+
return super.uploadChannelImage(request);
|
|
11814
|
+
};
|
|
11619
11815
|
};
|
|
11620
11816
|
//#endregion
|
|
11621
11817
|
//#region src/gen/moderation/ModerationApi.ts
|
|
@@ -11768,9 +11964,11 @@ var ModerationApi = class {
|
|
|
11768
11964
|
async ban(request) {
|
|
11769
11965
|
const body = {
|
|
11770
11966
|
target_user_id: request?.target_user_id,
|
|
11967
|
+
ban_from_future_channels: request?.ban_from_future_channels,
|
|
11771
11968
|
banned_by_id: request?.banned_by_id,
|
|
11772
11969
|
channel_cid: request?.channel_cid,
|
|
11773
11970
|
delete_messages: request?.delete_messages,
|
|
11971
|
+
delete_reactions: request?.delete_reactions,
|
|
11774
11972
|
ip_ban: request?.ip_ban,
|
|
11775
11973
|
reason: request?.reason,
|
|
11776
11974
|
shadow: request?.shadow,
|
|
@@ -12325,7 +12523,7 @@ var ApiClient = class {
|
|
|
12325
12523
|
const headers = {
|
|
12326
12524
|
Authorization: this.apiConfig.token,
|
|
12327
12525
|
"stream-auth-type": "jwt",
|
|
12328
|
-
"X-Stream-Client": "stream-node-0.8.
|
|
12526
|
+
"X-Stream-Client": "stream-node-0.8.12",
|
|
12329
12527
|
"Accept-Encoding": "gzip",
|
|
12330
12528
|
"x-client-request-id": clientRequestId
|
|
12331
12529
|
};
|
|
@@ -13002,6 +13200,17 @@ var FeedsApi = class {
|
|
|
13002
13200
|
decoders["UpdateCommentResponse"]?.(response);
|
|
13003
13201
|
return response;
|
|
13004
13202
|
}
|
|
13203
|
+
async commentFeedback(request) {
|
|
13204
|
+
const pathParams = { id: request?.id };
|
|
13205
|
+
const body = {
|
|
13206
|
+
hide: request?.hide,
|
|
13207
|
+
user_id: request?.user_id,
|
|
13208
|
+
user: request?.user
|
|
13209
|
+
};
|
|
13210
|
+
const response = await this.apiClient.sendRequest("POST", "/api/v2/feeds/comments/{id}/feedback", pathParams, void 0, body);
|
|
13211
|
+
decoders["CommentFeedbackResponse"]?.(response);
|
|
13212
|
+
return response;
|
|
13213
|
+
}
|
|
13005
13214
|
async updateCommentPartial(request) {
|
|
13006
13215
|
const pathParams = { id: request?.id };
|
|
13007
13216
|
const body = {
|
|
@@ -13155,6 +13364,7 @@ var FeedsApi = class {
|
|
|
13155
13364
|
user_id: request?.user_id,
|
|
13156
13365
|
view: request?.view,
|
|
13157
13366
|
watch: request?.watch,
|
|
13367
|
+
discard_actors: request?.discard_actors,
|
|
13158
13368
|
data: request?.data,
|
|
13159
13369
|
enrichment_options: request?.enrichment_options,
|
|
13160
13370
|
external_ranking: request?.external_ranking,
|
|
@@ -13715,7 +13925,8 @@ var FeedsApi = class {
|
|
|
13715
13925
|
const body = {
|
|
13716
13926
|
max_age_hours: request?.max_age_hours,
|
|
13717
13927
|
policy: request?.policy,
|
|
13718
|
-
enabled: request?.enabled
|
|
13928
|
+
enabled: request?.enabled,
|
|
13929
|
+
feed_groups: request?.feed_groups
|
|
13719
13930
|
};
|
|
13720
13931
|
const response = await this.apiClient.sendRequest("POST", "/api/v2/feeds/retention_policy", void 0, void 0, body);
|
|
13721
13932
|
decoders["SetFeedsRetentionPolicyResponse"]?.(response);
|
|
@@ -14046,11 +14257,15 @@ var StreamClient = class StreamClient extends CommonApi {
|
|
|
14046
14257
|
* - iat - issued at date of the token, unix timestamp in seconds, by default it's now
|
|
14047
14258
|
*/
|
|
14048
14259
|
generateUserToken = (payload) => {
|
|
14260
|
+
const { validity_in_seconds, ...claims } = payload;
|
|
14049
14261
|
const defaultIat = Math.floor((Date.now() - 1e3) / 1e3);
|
|
14050
|
-
|
|
14051
|
-
const
|
|
14052
|
-
|
|
14053
|
-
|
|
14262
|
+
const iat = claims.iat ?? defaultIat;
|
|
14263
|
+
const exp = claims.exp ?? iat + (validity_in_seconds ?? 3600);
|
|
14264
|
+
return JWTUserToken(this.secret, {
|
|
14265
|
+
...claims,
|
|
14266
|
+
iat,
|
|
14267
|
+
exp
|
|
14268
|
+
});
|
|
14054
14269
|
};
|
|
14055
14270
|
/**
|
|
14056
14271
|
*
|
|
@@ -14060,8 +14275,10 @@ var StreamClient = class StreamClient extends CommonApi {
|
|
|
14060
14275
|
*/
|
|
14061
14276
|
generatePermanentUserToken = (payload) => {
|
|
14062
14277
|
const defaultIat = Math.floor((Date.now() - 1e3) / 1e3);
|
|
14063
|
-
|
|
14064
|
-
|
|
14278
|
+
return JWTUserToken(this.secret, {
|
|
14279
|
+
...payload,
|
|
14280
|
+
iat: payload.iat ?? defaultIat
|
|
14281
|
+
});
|
|
14065
14282
|
};
|
|
14066
14283
|
/**
|
|
14067
14284
|
*
|