@stream-io/node-sdk 0.9.1 → 0.9.3
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 +173 -62
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.mjs +172 -61
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/ApiClient.d.ts +1 -1
- package/dist/src/gen/chat/ChannelApi.d.ts +1 -0
- package/dist/src/gen/chat/ChatApi.d.ts +3 -1
- package/dist/src/gen/common/CommonApi.d.ts +4 -1
- package/dist/src/gen/feeds/FeedsApi.d.ts +1 -0
- package/dist/src/gen/models/index.d.ts +683 -17
- package/dist/src/gen/moderation/ModerationApi.d.ts +23 -1
- package/dist/src/utils/webhook.d.ts +15 -0
- package/index.ts +1 -0
- package/package.json +11 -11
- package/src/ApiClient.ts +5 -2
- package/src/gen/chat/ChannelApi.ts +1 -0
- package/src/gen/chat/ChatApi.ts +27 -0
- package/src/gen/common/CommonApi.ts +11 -2
- package/src/gen/feeds/FeedsApi.ts +2 -0
- package/src/gen/models/index.ts +772 -17
- package/src/gen/moderation/ModerationApi.ts +222 -0
- package/src/utils/webhook.ts +24 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.3](https://github.com/GetStream/stream-node/compare/v0.9.2...v0.9.3) (2026-11-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* limit decompressed webhook payloads to 10 MiB, configurable with webhookConfig.maxPayloadBytes ([#394](https://github.com/GetStream/stream-node/issues/394)) ([3de82bd](https://github.com/GetStream/stream-node/commit/3de82bda9eff5a2531c3d90086bb221e01a2f3e7))
|
|
9
|
+
|
|
10
|
+
## [0.9.2](https://github.com/GetStream/stream-node/compare/v0.9.1...v0.9.2) (2026-11-13)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* regenerate OpenAPI clients from latest spec ([#392](https://github.com/GetStream/stream-node/issues/392)) ([315e419](https://github.com/GetStream/stream-node/commit/315e419fd043f8758bdb75b887395273d1a8e7d6))
|
|
16
|
+
|
|
3
17
|
## [0.9.1](https://github.com/GetStream/stream-node/compare/v0.9.0...v0.9.1) (2026-11-09)
|
|
4
18
|
|
|
5
19
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -20,14 +20,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
20
20
|
value: mod,
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
|
-
//#endregion
|
|
24
23
|
let jsonwebtoken = require("jsonwebtoken");
|
|
25
24
|
jsonwebtoken = __toESM(jsonwebtoken);
|
|
26
25
|
let crypto = require("crypto");
|
|
27
26
|
crypto = __toESM(crypto);
|
|
28
27
|
let zlib = require("zlib");
|
|
29
28
|
zlib = __toESM(zlib);
|
|
30
|
-
|
|
29
|
+
// src/utils/create-token.ts
|
|
31
30
|
function JWTUserToken(apiSecret, payload) {
|
|
32
31
|
if (jsonwebtoken.default?.sign == null) throw Error(`Unable to find jwt crypto, if you are getting this error is probably because you are trying to generate tokens on browser or React Native (or other environment where crypto functions are not available). Please Note: token should only be generated server-side.`);
|
|
33
32
|
const opts = {
|
|
@@ -45,8 +44,7 @@ function JWTServerToken(apiSecret, jwtOptions = {}) {
|
|
|
45
44
|
}, jwtOptions);
|
|
46
45
|
return jsonwebtoken.default.sign(payload, apiSecret, opts);
|
|
47
46
|
}
|
|
48
|
-
|
|
49
|
-
//#region src/utils/webhook.ts
|
|
47
|
+
// src/utils/webhook.ts
|
|
50
48
|
/**
|
|
51
49
|
* Canonical failure-mode messages for {@link InvalidWebhookError}.
|
|
52
50
|
*
|
|
@@ -77,6 +75,15 @@ var InvalidWebhookError = class extends Error {
|
|
|
77
75
|
};
|
|
78
76
|
var GZIP_MAGIC = Buffer.from([31, 139]);
|
|
79
77
|
/**
|
|
78
|
+
* Webhook helper settings.
|
|
79
|
+
*
|
|
80
|
+
* `maxPayloadBytes` caps the decompressed size of a gzip webhook body
|
|
81
|
+
* (default 10 MiB). {@link gunzipPayload} runs before the signature
|
|
82
|
+
* check, so without a cap an unsigned gzip bomb could exhaust memory.
|
|
83
|
+
* Raise it if your events are larger.
|
|
84
|
+
*/
|
|
85
|
+
var webhookConfig = { maxPayloadBytes: 10485760 };
|
|
86
|
+
/**
|
|
80
87
|
* Returns `body` as a `Buffer`, gzip-decompressed when its first two
|
|
81
88
|
* bytes match the gzip magic (`1f 8b`, per RFC 1952). When the body is
|
|
82
89
|
* plain JSON (no compression, or middleware already decompressed), the
|
|
@@ -85,13 +92,21 @@ var GZIP_MAGIC = Buffer.from([31, 139]);
|
|
|
85
92
|
* Magic-byte detection (rather than relying on a header) keeps the same
|
|
86
93
|
* handler correct when middleware - Express, Next.js, AWS Lambda -
|
|
87
94
|
* auto-decompresses the request before your code sees it.
|
|
95
|
+
*
|
|
96
|
+
* @throws {InvalidWebhookError} When the body has the gzip magic but is
|
|
97
|
+
* not valid gzip, or inflates to more than
|
|
98
|
+
* `webhookConfig.maxPayloadBytes`.
|
|
88
99
|
*/
|
|
89
100
|
function gunzipPayload(rawBody) {
|
|
90
101
|
const body = Buffer.isBuffer(rawBody) ? rawBody : Buffer.from(rawBody);
|
|
91
|
-
if (body.length >= 2 && body.subarray(0, 2).equals(GZIP_MAGIC))
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
if (body.length >= 2 && body.subarray(0, 2).equals(GZIP_MAGIC)) {
|
|
103
|
+
const limit = webhookConfig.maxPayloadBytes;
|
|
104
|
+
try {
|
|
105
|
+
return zlib.default.gunzipSync(body, { maxOutputLength: limit });
|
|
106
|
+
} catch (err) {
|
|
107
|
+
if (err.code === "ERR_BUFFER_TOO_LARGE") throw new InvalidWebhookError(`${InvalidWebhookErrorMessages.gzipFailed}: payload exceeds ${limit} bytes`);
|
|
108
|
+
throw new InvalidWebhookError(InvalidWebhookErrorMessages.gzipFailed);
|
|
109
|
+
}
|
|
95
110
|
}
|
|
96
111
|
return body;
|
|
97
112
|
}
|
|
@@ -199,8 +214,7 @@ function parseSqs(messageBody) {
|
|
|
199
214
|
function parseSns(notificationBody) {
|
|
200
215
|
return parseEvent(decodeSnsPayload(notificationBody));
|
|
201
216
|
}
|
|
202
|
-
|
|
203
|
-
//#region src/gen/model-decoders/decoders.ts
|
|
217
|
+
// src/gen/model-decoders/decoders.ts
|
|
204
218
|
var decoders = {};
|
|
205
219
|
var decodeDatetimeType = (input) => typeof input === "number" ? new Date(Math.floor(input / 1e6)) : new Date(input);
|
|
206
220
|
decoders.DatetimeType = decodeDatetimeType;
|
|
@@ -245,8 +259,7 @@ decoders["GetApplicationResponse"] = (input) => {
|
|
|
245
259
|
isSingle: true
|
|
246
260
|
} }, input);
|
|
247
261
|
};
|
|
248
|
-
|
|
249
|
-
//#region src/gen/common/CommonApi.ts
|
|
262
|
+
// src/gen/common/CommonApi.ts
|
|
250
263
|
var CommonApi = class {
|
|
251
264
|
apiClient;
|
|
252
265
|
constructor(apiClient) {
|
|
@@ -309,6 +322,7 @@ var CommonApi = class {
|
|
|
309
322
|
user_search_disallowed_roles: request?.user_search_disallowed_roles,
|
|
310
323
|
webhook_events: request?.webhook_events,
|
|
311
324
|
activity_metrics_config: request?.activity_metrics_config,
|
|
325
|
+
agent_review: request?.agent_review,
|
|
312
326
|
apn_config: request?.apn_config,
|
|
313
327
|
async_moderation_config: request?.async_moderation_config,
|
|
314
328
|
datadog_info: request?.datadog_info,
|
|
@@ -534,8 +548,12 @@ var CommonApi = class {
|
|
|
534
548
|
decoders["CreateImportURLResponse"]?.(response);
|
|
535
549
|
return response;
|
|
536
550
|
}
|
|
537
|
-
async listImports() {
|
|
538
|
-
const
|
|
551
|
+
async listImports(request) {
|
|
552
|
+
const queryParams = {
|
|
553
|
+
limit: request?.limit,
|
|
554
|
+
offset: request?.offset
|
|
555
|
+
};
|
|
556
|
+
const response = await this.apiClient.sendRequest("GET", "/api/v2/imports", void 0, queryParams);
|
|
539
557
|
decoders["ListImportsResponse"]?.(response);
|
|
540
558
|
return response;
|
|
541
559
|
}
|
|
@@ -1166,8 +1184,7 @@ var CommonApi = class {
|
|
|
1166
1184
|
return response;
|
|
1167
1185
|
}
|
|
1168
1186
|
};
|
|
1169
|
-
|
|
1170
|
-
//#region src/gen/video/VideoApi.ts
|
|
1187
|
+
// src/gen/video/VideoApi.ts
|
|
1171
1188
|
var VideoApi = class {
|
|
1172
1189
|
apiClient;
|
|
1173
1190
|
constructor(apiClient) {
|
|
@@ -1997,8 +2014,7 @@ var VideoApi = class {
|
|
|
1997
2014
|
return response;
|
|
1998
2015
|
}
|
|
1999
2016
|
};
|
|
2000
|
-
|
|
2001
|
-
//#region src/gen/video/CallApi.ts
|
|
2017
|
+
// src/gen/video/CallApi.ts
|
|
2002
2018
|
var CallApi = class {
|
|
2003
2019
|
videoApi;
|
|
2004
2020
|
type;
|
|
@@ -2282,8 +2298,7 @@ var CallApi = class {
|
|
|
2282
2298
|
});
|
|
2283
2299
|
}
|
|
2284
2300
|
};
|
|
2285
|
-
|
|
2286
|
-
//#region src/StreamCall.ts
|
|
2301
|
+
// src/StreamCall.ts
|
|
2287
2302
|
var StreamCall = class extends CallApi {
|
|
2288
2303
|
type;
|
|
2289
2304
|
id;
|
|
@@ -2324,8 +2339,7 @@ var StreamCall = class extends CallApi {
|
|
|
2324
2339
|
return { address: this.data.ingress.srt.address.replace("{passphrase}", segments[2]).replace("{token}", token) };
|
|
2325
2340
|
};
|
|
2326
2341
|
};
|
|
2327
|
-
|
|
2328
|
-
//#region src/StreamVideoClient.ts
|
|
2342
|
+
// src/StreamVideoClient.ts
|
|
2329
2343
|
var StreamVideoClient = class extends VideoApi {
|
|
2330
2344
|
streamClient;
|
|
2331
2345
|
constructor({ streamClient, apiClient }) {
|
|
@@ -2367,8 +2381,7 @@ var StreamVideoClient = class extends VideoApi {
|
|
|
2367
2381
|
return realtimeClient;
|
|
2368
2382
|
};
|
|
2369
2383
|
};
|
|
2370
|
-
|
|
2371
|
-
//#region src/gen/chat/ChatApi.ts
|
|
2384
|
+
// src/gen/chat/ChatApi.ts
|
|
2372
2385
|
var ChatApi = class {
|
|
2373
2386
|
apiClient;
|
|
2374
2387
|
constructor(apiClient) {
|
|
@@ -2591,6 +2604,7 @@ var ChatApi = class {
|
|
|
2591
2604
|
messages_id_gt: request?.messages_id_gt,
|
|
2592
2605
|
messages_id_gte: request?.messages_id_gte,
|
|
2593
2606
|
messages_id_around: request?.messages_id_around,
|
|
2607
|
+
include_soft_deleted_channel: request?.include_soft_deleted_channel,
|
|
2594
2608
|
user_id: request?.user_id
|
|
2595
2609
|
};
|
|
2596
2610
|
const pathParams = {
|
|
@@ -3554,6 +3568,17 @@ var ChatApi = class {
|
|
|
3554
3568
|
decoders["SearchResponse"]?.(response);
|
|
3555
3569
|
return response;
|
|
3556
3570
|
}
|
|
3571
|
+
async searchAll(request) {
|
|
3572
|
+
const body = {
|
|
3573
|
+
limit: request?.limit,
|
|
3574
|
+
query: request?.query,
|
|
3575
|
+
entities: request?.entities,
|
|
3576
|
+
next: request?.next
|
|
3577
|
+
};
|
|
3578
|
+
const response = await this.apiClient.sendRequest("POST", "/api/v2/chat/search/all", void 0, void 0, body);
|
|
3579
|
+
decoders["SearchAllResponse"]?.(response);
|
|
3580
|
+
return response;
|
|
3581
|
+
}
|
|
3557
3582
|
async createSegment(request) {
|
|
3558
3583
|
const body = {
|
|
3559
3584
|
type: request?.type,
|
|
@@ -3715,8 +3740,7 @@ var ChatApi = class {
|
|
|
3715
3740
|
return response;
|
|
3716
3741
|
}
|
|
3717
3742
|
};
|
|
3718
|
-
|
|
3719
|
-
//#region src/gen/chat/ChannelApi.ts
|
|
3743
|
+
// src/gen/chat/ChannelApi.ts
|
|
3720
3744
|
var ChannelApi = class {
|
|
3721
3745
|
chatApi;
|
|
3722
3746
|
type;
|
|
@@ -3927,8 +3951,7 @@ var ChannelApi = class {
|
|
|
3927
3951
|
});
|
|
3928
3952
|
}
|
|
3929
3953
|
};
|
|
3930
|
-
|
|
3931
|
-
//#region src/StreamChannel.ts
|
|
3954
|
+
// src/StreamChannel.ts
|
|
3932
3955
|
var StreamChannel = class extends ChannelApi {
|
|
3933
3956
|
get cid() {
|
|
3934
3957
|
return `${this.type}:${this.id}`;
|
|
@@ -3961,8 +3984,7 @@ var StreamChannel = class extends ChannelApi {
|
|
|
3961
3984
|
return super.uploadChannelImage(request);
|
|
3962
3985
|
};
|
|
3963
3986
|
};
|
|
3964
|
-
|
|
3965
|
-
//#region src/StreamChatClient.ts
|
|
3987
|
+
// src/StreamChatClient.ts
|
|
3966
3988
|
var StreamChatClient = class extends ChatApi {
|
|
3967
3989
|
channel = (type, id) => {
|
|
3968
3990
|
return new StreamChannel(this, type, id);
|
|
@@ -3974,8 +3996,7 @@ var StreamChatClient = class extends ChatApi {
|
|
|
3974
3996
|
return super.uploadChannelImage(request);
|
|
3975
3997
|
};
|
|
3976
3998
|
};
|
|
3977
|
-
|
|
3978
|
-
//#region src/gen/moderation/ModerationApi.ts
|
|
3999
|
+
// src/gen/moderation/ModerationApi.ts
|
|
3979
4000
|
var ModerationApi = class {
|
|
3980
4001
|
apiClient;
|
|
3981
4002
|
constructor(apiClient) {
|
|
@@ -4052,6 +4073,33 @@ var ModerationApi = class {
|
|
|
4052
4073
|
decoders["InsertActionLogResponse"]?.(response);
|
|
4053
4074
|
return response;
|
|
4054
4075
|
}
|
|
4076
|
+
async listAgentFeedback(request) {
|
|
4077
|
+
const queryParams = {
|
|
4078
|
+
limit: request?.limit,
|
|
4079
|
+
next: request?.next
|
|
4080
|
+
};
|
|
4081
|
+
const response = await this.apiClient.sendRequest("GET", "/api/v2/moderation/agent_feedback", void 0, queryParams);
|
|
4082
|
+
decoders["ListAgentFeedbackResponse"]?.(response);
|
|
4083
|
+
return response;
|
|
4084
|
+
}
|
|
4085
|
+
async submitAgentFeedback(request) {
|
|
4086
|
+
const body = {
|
|
4087
|
+
item_id: request?.item_id,
|
|
4088
|
+
moderator_action: request?.moderator_action,
|
|
4089
|
+
improvement: request?.improvement,
|
|
4090
|
+
reason: request?.reason,
|
|
4091
|
+
user_id: request?.user_id,
|
|
4092
|
+
user: request?.user
|
|
4093
|
+
};
|
|
4094
|
+
const response = await this.apiClient.sendRequest("POST", "/api/v2/moderation/agent_feedback", void 0, void 0, body);
|
|
4095
|
+
decoders["SubmitAgentFeedbackResponse"]?.(response);
|
|
4096
|
+
return response;
|
|
4097
|
+
}
|
|
4098
|
+
async getAgentReviewStatus() {
|
|
4099
|
+
const response = await this.apiClient.sendRequest("GET", "/api/v2/moderation/agent_review_status", void 0, void 0);
|
|
4100
|
+
decoders["GetAgentReviewStatusResponse"]?.(response);
|
|
4101
|
+
return response;
|
|
4102
|
+
}
|
|
4055
4103
|
async analyze(request) {
|
|
4056
4104
|
const body = {
|
|
4057
4105
|
async_response: request?.async_response,
|
|
@@ -4213,6 +4261,37 @@ var ModerationApi = class {
|
|
|
4213
4261
|
decoders["UpsertConfigResponse"]?.(response);
|
|
4214
4262
|
return response;
|
|
4215
4263
|
}
|
|
4264
|
+
async saveConfigVersion(request) {
|
|
4265
|
+
const body = {
|
|
4266
|
+
base_version: request?.base_version,
|
|
4267
|
+
key: request?.key,
|
|
4268
|
+
async: request?.async,
|
|
4269
|
+
team: request?.team,
|
|
4270
|
+
user_id: request?.user_id,
|
|
4271
|
+
ai_audio_config: request?.ai_audio_config,
|
|
4272
|
+
ai_image_config: request?.ai_image_config,
|
|
4273
|
+
ai_text_config: request?.ai_text_config,
|
|
4274
|
+
ai_video_config: request?.ai_video_config,
|
|
4275
|
+
automod_platform_circumvention_config: request?.automod_platform_circumvention_config,
|
|
4276
|
+
automod_semantic_filters_config: request?.automod_semantic_filters_config,
|
|
4277
|
+
automod_toxicity_config: request?.automod_toxicity_config,
|
|
4278
|
+
aws_rekognition_config: request?.aws_rekognition_config,
|
|
4279
|
+
block_list_config: request?.block_list_config,
|
|
4280
|
+
bodyguard_config: request?.bodyguard_config,
|
|
4281
|
+
engine: request?.engine,
|
|
4282
|
+
flood_config: request?.flood_config,
|
|
4283
|
+
google_vision_config: request?.google_vision_config,
|
|
4284
|
+
intent_config: request?.intent_config,
|
|
4285
|
+
llm_config: request?.llm_config,
|
|
4286
|
+
rule_builder_config: request?.rule_builder_config,
|
|
4287
|
+
user: request?.user,
|
|
4288
|
+
velocity_filter_config: request?.velocity_filter_config,
|
|
4289
|
+
video_call_rule_config: request?.video_call_rule_config
|
|
4290
|
+
};
|
|
4291
|
+
const response = await this.apiClient.sendRequest("POST", "/api/v2/moderation/config/versions", void 0, void 0, body);
|
|
4292
|
+
decoders["SaveConfigVersionResponse"]?.(response);
|
|
4293
|
+
return response;
|
|
4294
|
+
}
|
|
4216
4295
|
async deleteConfig(request) {
|
|
4217
4296
|
const queryParams = {
|
|
4218
4297
|
team: request?.team,
|
|
@@ -4230,6 +4309,37 @@ var ModerationApi = class {
|
|
|
4230
4309
|
decoders["GetConfigResponse"]?.(response);
|
|
4231
4310
|
return response;
|
|
4232
4311
|
}
|
|
4312
|
+
async listConfigVersions(request) {
|
|
4313
|
+
const queryParams = { team: request?.team };
|
|
4314
|
+
const pathParams = { key: request?.key };
|
|
4315
|
+
const response = await this.apiClient.sendRequest("GET", "/api/v2/moderation/config/{key}/versions", pathParams, queryParams);
|
|
4316
|
+
decoders["ListConfigVersionsResponse"]?.(response);
|
|
4317
|
+
return response;
|
|
4318
|
+
}
|
|
4319
|
+
async getConfigVersion(request) {
|
|
4320
|
+
const queryParams = { team: request?.team };
|
|
4321
|
+
const pathParams = {
|
|
4322
|
+
key: request?.key,
|
|
4323
|
+
version: request?.version
|
|
4324
|
+
};
|
|
4325
|
+
const response = await this.apiClient.sendRequest("GET", "/api/v2/moderation/config/{key}/versions/{version}", pathParams, queryParams);
|
|
4326
|
+
decoders["GetConfigVersionResponse"]?.(response);
|
|
4327
|
+
return response;
|
|
4328
|
+
}
|
|
4329
|
+
async publishConfigVersion(request) {
|
|
4330
|
+
const pathParams = {
|
|
4331
|
+
key: request?.key,
|
|
4332
|
+
version: request?.version
|
|
4333
|
+
};
|
|
4334
|
+
const body = {
|
|
4335
|
+
team: request?.team,
|
|
4336
|
+
user_id: request?.user_id,
|
|
4337
|
+
user: request?.user
|
|
4338
|
+
};
|
|
4339
|
+
const response = await this.apiClient.sendRequest("POST", "/api/v2/moderation/config/{key}/versions/{version}/publish", pathParams, void 0, body);
|
|
4340
|
+
decoders["PublishConfigVersionResponse"]?.(response);
|
|
4341
|
+
return response;
|
|
4342
|
+
}
|
|
4233
4343
|
async queryModerationConfigs(request) {
|
|
4234
4344
|
const body = {
|
|
4235
4345
|
limit: request?.limit,
|
|
@@ -4556,6 +4666,16 @@ var ModerationApi = class {
|
|
|
4556
4666
|
decoders["QueryReviewQueueResponse"]?.(response);
|
|
4557
4667
|
return response;
|
|
4558
4668
|
}
|
|
4669
|
+
async countReviewQueue(request) {
|
|
4670
|
+
const body = {
|
|
4671
|
+
user_id: request?.user_id,
|
|
4672
|
+
filter: request?.filter,
|
|
4673
|
+
user: request?.user
|
|
4674
|
+
};
|
|
4675
|
+
const response = await this.apiClient.sendRequest("POST", "/api/v2/moderation/review_queue/count", void 0, void 0, body);
|
|
4676
|
+
decoders["CountReviewQueueResponse"]?.(response);
|
|
4677
|
+
return response;
|
|
4678
|
+
}
|
|
4559
4679
|
async getReviewQueueItem(request) {
|
|
4560
4680
|
const pathParams = { id: request?.id };
|
|
4561
4681
|
const response = await this.apiClient.sendRequest("GET", "/api/v2/moderation/review_queue/{id}", pathParams, void 0);
|
|
@@ -4583,6 +4703,7 @@ var ModerationApi = class {
|
|
|
4583
4703
|
appeal_id: request?.appeal_id,
|
|
4584
4704
|
item_id: request?.item_id,
|
|
4585
4705
|
user_id: request?.user_id,
|
|
4706
|
+
agent_recommendation: request?.agent_recommendation,
|
|
4586
4707
|
ban: request?.ban,
|
|
4587
4708
|
block: request?.block,
|
|
4588
4709
|
bypass: request?.bypass,
|
|
@@ -4640,7 +4761,8 @@ var ModerationApi = class {
|
|
|
4640
4761
|
const queryParams = {
|
|
4641
4762
|
target_user_id: request?.target_user_id,
|
|
4642
4763
|
channel_cid: request?.channel_cid,
|
|
4643
|
-
created_by: request?.created_by
|
|
4764
|
+
created_by: request?.created_by,
|
|
4765
|
+
remove_future_channels_ban: request?.remove_future_channels_ban
|
|
4644
4766
|
};
|
|
4645
4767
|
const body = {
|
|
4646
4768
|
unbanned_by_id: request?.unbanned_by_id,
|
|
@@ -4661,11 +4783,9 @@ var ModerationApi = class {
|
|
|
4661
4783
|
return response;
|
|
4662
4784
|
}
|
|
4663
4785
|
};
|
|
4664
|
-
|
|
4665
|
-
//#region src/StreamModerationClient.ts
|
|
4786
|
+
// src/StreamModerationClient.ts
|
|
4666
4787
|
var StreamModerationClient = class extends ModerationApi {};
|
|
4667
|
-
|
|
4668
|
-
//#region src/types.ts
|
|
4788
|
+
// src/types.ts
|
|
4669
4789
|
var StreamError = class extends Error {
|
|
4670
4790
|
metadata;
|
|
4671
4791
|
code;
|
|
@@ -4677,8 +4797,7 @@ var StreamError = class extends Error {
|
|
|
4677
4797
|
this.apiError = apiError;
|
|
4678
4798
|
}
|
|
4679
4799
|
};
|
|
4680
|
-
|
|
4681
|
-
//#region src/utils/rate-limit.ts
|
|
4800
|
+
// src/utils/rate-limit.ts
|
|
4682
4801
|
var getRateLimitFromResponseHeader = (responseHeaders) => {
|
|
4683
4802
|
return {
|
|
4684
4803
|
rateLimit: responseHeaders.has("x-ratelimit-limit") ? +responseHeaders.get("x-ratelimit-limit") : void 0,
|
|
@@ -4686,8 +4805,7 @@ var getRateLimitFromResponseHeader = (responseHeaders) => {
|
|
|
4686
4805
|
rateLimitReset: responseHeaders.has("x-ratelimit-reset") ? /* @__PURE__ */ new Date(+responseHeaders.get("x-ratelimit-reset") * 1e3) : void 0
|
|
4687
4806
|
};
|
|
4688
4807
|
};
|
|
4689
|
-
|
|
4690
|
-
//#region src/utils/query-params.ts
|
|
4808
|
+
// src/utils/query-params.ts
|
|
4691
4809
|
var isScalar = (value) => {
|
|
4692
4810
|
const type = typeof value;
|
|
4693
4811
|
return type === "string" || type === "number" || type === "boolean";
|
|
@@ -4707,8 +4825,7 @@ var stringifyArrayParam = (param) => {
|
|
|
4707
4825
|
}
|
|
4708
4826
|
return allScalar ? entries.join(",") : JSON.stringify(entries);
|
|
4709
4827
|
};
|
|
4710
|
-
|
|
4711
|
-
//#region src/ApiClient.ts
|
|
4828
|
+
// src/ApiClient.ts
|
|
4712
4829
|
var ApiClient = class {
|
|
4713
4830
|
apiConfig;
|
|
4714
4831
|
dispatcher;
|
|
@@ -4725,14 +4842,14 @@ var ApiClient = class {
|
|
|
4725
4842
|
queryParams.api_key = this.apiConfig.apiKey;
|
|
4726
4843
|
const encodedParams = this.queryParamsStringify(queryParams);
|
|
4727
4844
|
if (pathParams) Object.keys(pathParams).forEach((paramName) => {
|
|
4728
|
-
url = url.replace(`{${paramName}}`, pathParams[paramName]);
|
|
4845
|
+
url = url.replace(`{${paramName}}`, encodeURIComponent(pathParams[paramName]));
|
|
4729
4846
|
});
|
|
4730
4847
|
url += `?${encodedParams}`;
|
|
4731
4848
|
const clientRequestId = (0, crypto.randomUUID)();
|
|
4732
4849
|
const headers = {
|
|
4733
4850
|
Authorization: this.apiConfig.token,
|
|
4734
4851
|
"stream-auth-type": "jwt",
|
|
4735
|
-
"X-Stream-Client": "stream-node-0.9.
|
|
4852
|
+
"X-Stream-Client": "stream-node-0.9.3",
|
|
4736
4853
|
"Accept-Encoding": "gzip",
|
|
4737
4854
|
"x-client-request-id": clientRequestId
|
|
4738
4855
|
};
|
|
@@ -4801,8 +4918,7 @@ var ApiClient = class {
|
|
|
4801
4918
|
return newParams.join("&");
|
|
4802
4919
|
};
|
|
4803
4920
|
};
|
|
4804
|
-
|
|
4805
|
-
//#region src/gen/feeds/FeedsApi.ts
|
|
4921
|
+
// src/gen/feeds/FeedsApi.ts
|
|
4806
4922
|
var FeedsApi = class {
|
|
4807
4923
|
apiClient;
|
|
4808
4924
|
constructor(apiClient) {
|
|
@@ -5076,7 +5192,8 @@ var FeedsApi = class {
|
|
|
5076
5192
|
translate_text: request?.translate_text,
|
|
5077
5193
|
include_top_level_comment_count: request?.include_top_level_comment_count,
|
|
5078
5194
|
include_soft_deleted_activities: request?.include_soft_deleted_activities,
|
|
5079
|
-
include_moderated_activities: request?.include_moderated_activities
|
|
5195
|
+
include_moderated_activities: request?.include_moderated_activities,
|
|
5196
|
+
skip_viewer_visibility: request?.skip_viewer_visibility
|
|
5080
5197
|
};
|
|
5081
5198
|
const pathParams = { id: request?.id };
|
|
5082
5199
|
const response = await this.apiClient.sendRequest("GET", "/api/v2/feeds/activities/{id}", pathParams, queryParams);
|
|
@@ -6303,8 +6420,7 @@ var FeedsApi = class {
|
|
|
6303
6420
|
return response;
|
|
6304
6421
|
}
|
|
6305
6422
|
};
|
|
6306
|
-
|
|
6307
|
-
//#region src/gen/feeds/FeedApi.ts
|
|
6423
|
+
// src/gen/feeds/FeedApi.ts
|
|
6308
6424
|
var FeedApi = class {
|
|
6309
6425
|
feedsApi;
|
|
6310
6426
|
group;
|
|
@@ -6412,15 +6528,13 @@ var FeedApi = class {
|
|
|
6412
6528
|
});
|
|
6413
6529
|
}
|
|
6414
6530
|
};
|
|
6415
|
-
|
|
6416
|
-
//#region src/StreamFeed.ts
|
|
6531
|
+
// src/StreamFeed.ts
|
|
6417
6532
|
var StreamFeed = class extends FeedApi {
|
|
6418
6533
|
get feed() {
|
|
6419
6534
|
return `${this.group}:${this.id}`;
|
|
6420
6535
|
}
|
|
6421
6536
|
};
|
|
6422
|
-
|
|
6423
|
-
//#region src/StreamFeedsClient.ts
|
|
6537
|
+
// src/StreamFeedsClient.ts
|
|
6424
6538
|
var StreamFeedsClient = class extends FeedsApi {
|
|
6425
6539
|
feed = (group, id) => {
|
|
6426
6540
|
return new StreamFeed(this, group, id);
|
|
@@ -6447,8 +6561,7 @@ var StreamFeedsClient = class extends FeedsApi {
|
|
|
6447
6561
|
return super.unfollowBatch(request);
|
|
6448
6562
|
};
|
|
6449
6563
|
};
|
|
6450
|
-
|
|
6451
|
-
//#region src/StreamClient.ts
|
|
6564
|
+
// src/StreamClient.ts
|
|
6452
6565
|
var StreamClient = class StreamClient extends CommonApi {
|
|
6453
6566
|
apiKey;
|
|
6454
6567
|
secret;
|
|
@@ -6645,8 +6758,7 @@ var StreamClient = class StreamClient extends CommonApi {
|
|
|
6645
6758
|
*/
|
|
6646
6759
|
parseSns = (notificationBody) => parseSns(notificationBody);
|
|
6647
6760
|
};
|
|
6648
|
-
|
|
6649
|
-
//#region src/gen/models/index.ts
|
|
6761
|
+
// src/gen/models/index.ts
|
|
6650
6762
|
var ChannelOwnCapability = {
|
|
6651
6763
|
BAN_CHANNEL_MEMBERS: "ban-channel-members",
|
|
6652
6764
|
CAST_POLL_VOTE: "cast-poll-vote",
|
|
@@ -6761,8 +6873,7 @@ var OwnCapability = {
|
|
|
6761
6873
|
UPDATE_CALL_PERMISSIONS: "update-call-permissions",
|
|
6762
6874
|
UPDATE_CALL_SETTINGS: "update-call-settings"
|
|
6763
6875
|
};
|
|
6764
|
-
|
|
6765
|
-
//#region src/utils/time.ts
|
|
6876
|
+
// src/utils/time.ts
|
|
6766
6877
|
/**
|
|
6767
6878
|
* Unit conversions between the API's timestamps and JavaScript's.
|
|
6768
6879
|
*
|
|
@@ -6837,7 +6948,6 @@ var convertTimestampToDate = (timestamp) => {
|
|
|
6837
6948
|
if (timestamp == null || !Number.isFinite(timestamp)) return void 0;
|
|
6838
6949
|
return nsToDate(timestamp);
|
|
6839
6950
|
};
|
|
6840
|
-
//#endregion
|
|
6841
6951
|
exports.ChannelOwnCapability = ChannelOwnCapability;
|
|
6842
6952
|
exports.FeedOwnCapability = FeedOwnCapability;
|
|
6843
6953
|
exports.InvalidWebhookError = InvalidWebhookError;
|
|
@@ -6860,5 +6970,6 @@ exports.nsToDate = nsToDate;
|
|
|
6860
6970
|
exports.nsToMs = nsToMs;
|
|
6861
6971
|
exports.nsToRfc3339 = nsToRfc3339;
|
|
6862
6972
|
exports.verifyAndParseWebhook = verifyAndParseWebhook;
|
|
6973
|
+
exports.webhookConfig = webhookConfig;
|
|
6863
6974
|
|
|
6864
6975
|
//# sourceMappingURL=index.cjs.js.map
|