@stream-io/node-sdk 0.7.49 → 0.7.51
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/dist/index.cjs.js +95 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +95 -1
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChatApi.d.ts +5 -1
- package/dist/src/gen/common/CommonApi.d.ts +5 -1
- package/dist/src/gen/models/index.d.ts +195 -15
- package/dist/src/gen/moderation/ModerationApi.d.ts +3 -1
- package/package.json +1 -1
- package/src/gen/chat/ChatApi.ts +93 -0
- package/src/gen/common/CommonApi.ts +70 -0
- package/src/gen/feeds/FeedsApi.ts +3 -0
- package/src/gen/model-decoders/decoders.ts +11 -0
- package/src/gen/models/index.ts +245 -16
- package/src/gen/moderation/ModerationApi.ts +58 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1939,6 +1939,13 @@ decoders.GetDraftResponse = (input) => {
|
|
|
1939
1939
|
};
|
|
1940
1940
|
return decode(typeMappings, input);
|
|
1941
1941
|
};
|
|
1942
|
+
decoders.GetExternalStorageResponse = (input) => {
|
|
1943
|
+
const typeMappings = {
|
|
1944
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1945
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1946
|
+
};
|
|
1947
|
+
return decode(typeMappings, input);
|
|
1948
|
+
};
|
|
1942
1949
|
decoders.GetFeedGroupResponse = (input) => {
|
|
1943
1950
|
const typeMappings = {
|
|
1944
1951
|
feed_group: { type: 'FeedGroupResponse', isSingle: true },
|
|
@@ -3186,6 +3193,7 @@ decoders.ReviewQueueItemResponse = (input) => {
|
|
|
3186
3193
|
bans: { type: 'BanInfoResponse', isSingle: false },
|
|
3187
3194
|
flags: { type: 'ModerationFlagResponse', isSingle: false },
|
|
3188
3195
|
completed_at: { type: 'DatetimeType', isSingle: true },
|
|
3196
|
+
escalated_at: { type: 'DatetimeType', isSingle: true },
|
|
3189
3197
|
reviewed_at: { type: 'DatetimeType', isSingle: true },
|
|
3190
3198
|
appeal: { type: 'AppealItemResponse', isSingle: true },
|
|
3191
3199
|
assigned_to: { type: 'UserResponse', isSingle: true },
|
|
@@ -4277,6 +4285,30 @@ class CommonApi {
|
|
|
4277
4285
|
decoders.CreateImportV2TaskResponse?.(response.body);
|
|
4278
4286
|
return { ...response.body, metadata: response.metadata };
|
|
4279
4287
|
}
|
|
4288
|
+
async deleteImporterExternalStorage() {
|
|
4289
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/imports/v2/external-storage', undefined, undefined);
|
|
4290
|
+
decoders.DeleteExternalStorageResponse?.(response.body);
|
|
4291
|
+
return { ...response.body, metadata: response.metadata };
|
|
4292
|
+
}
|
|
4293
|
+
async getImporterExternalStorage() {
|
|
4294
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/imports/v2/external-storage', undefined, undefined);
|
|
4295
|
+
decoders.GetExternalStorageResponse?.(response.body);
|
|
4296
|
+
return { ...response.body, metadata: response.metadata };
|
|
4297
|
+
}
|
|
4298
|
+
async upsertImporterExternalStorage(request) {
|
|
4299
|
+
const body = {
|
|
4300
|
+
type: request?.type,
|
|
4301
|
+
aws_s3: request?.aws_s3,
|
|
4302
|
+
};
|
|
4303
|
+
const response = await this.apiClient.sendRequest('PUT', '/api/v2/imports/v2/external-storage', undefined, undefined, body, 'application/json');
|
|
4304
|
+
decoders.UpsertExternalStorageResponse?.(response.body);
|
|
4305
|
+
return { ...response.body, metadata: response.metadata };
|
|
4306
|
+
}
|
|
4307
|
+
async validateImporterExternalStorage() {
|
|
4308
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/imports/v2/external-storage/validate', undefined, undefined);
|
|
4309
|
+
decoders.ValidateExternalStorageResponse?.(response.body);
|
|
4310
|
+
return { ...response.body, metadata: response.metadata };
|
|
4311
|
+
}
|
|
4280
4312
|
async deleteImportV2Task(request) {
|
|
4281
4313
|
const pathParams = {
|
|
4282
4314
|
id: request?.id,
|
|
@@ -4687,6 +4719,7 @@ class CommonApi {
|
|
|
4687
4719
|
};
|
|
4688
4720
|
const body = {
|
|
4689
4721
|
member_ids: request?.member_ids,
|
|
4722
|
+
as_admin: request?.as_admin,
|
|
4690
4723
|
team_id: request?.team_id,
|
|
4691
4724
|
};
|
|
4692
4725
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/usergroups/{id}/members', pathParams, undefined, body, 'application/json');
|
|
@@ -6933,6 +6966,40 @@ class ChatApi {
|
|
|
6933
6966
|
decoders.QueryRemindersResponse?.(response.body);
|
|
6934
6967
|
return { ...response.body, metadata: response.metadata };
|
|
6935
6968
|
}
|
|
6969
|
+
async getRetentionPolicy() {
|
|
6970
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/chat/retention_policy', undefined, undefined);
|
|
6971
|
+
decoders.GetRetentionPolicyResponse?.(response.body);
|
|
6972
|
+
return { ...response.body, metadata: response.metadata };
|
|
6973
|
+
}
|
|
6974
|
+
async setRetentionPolicy(request) {
|
|
6975
|
+
const body = {
|
|
6976
|
+
max_age_hours: request?.max_age_hours,
|
|
6977
|
+
policy: request?.policy,
|
|
6978
|
+
};
|
|
6979
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/retention_policy', undefined, undefined, body, 'application/json');
|
|
6980
|
+
decoders.SetRetentionPolicyResponse?.(response.body);
|
|
6981
|
+
return { ...response.body, metadata: response.metadata };
|
|
6982
|
+
}
|
|
6983
|
+
async deleteRetentionPolicy(request) {
|
|
6984
|
+
const body = {
|
|
6985
|
+
policy: request?.policy,
|
|
6986
|
+
};
|
|
6987
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/retention_policy/delete', undefined, undefined, body, 'application/json');
|
|
6988
|
+
decoders.DeleteRetentionPolicyResponse?.(response.body);
|
|
6989
|
+
return { ...response.body, metadata: response.metadata };
|
|
6990
|
+
}
|
|
6991
|
+
async getRetentionPolicyRuns(request) {
|
|
6992
|
+
const body = {
|
|
6993
|
+
limit: request?.limit,
|
|
6994
|
+
next: request?.next,
|
|
6995
|
+
prev: request?.prev,
|
|
6996
|
+
sort: request?.sort,
|
|
6997
|
+
filter_conditions: request?.filter_conditions,
|
|
6998
|
+
};
|
|
6999
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/retention_policy/runs', undefined, undefined, body, 'application/json');
|
|
7000
|
+
decoders.GetRetentionPolicyRunsResponse?.(response.body);
|
|
7001
|
+
return { ...response.body, metadata: response.metadata };
|
|
7002
|
+
}
|
|
6936
7003
|
async search(request) {
|
|
6937
7004
|
const queryParams = {
|
|
6938
7005
|
payload: request?.payload,
|
|
@@ -7326,6 +7393,19 @@ class ModerationApi {
|
|
|
7326
7393
|
constructor(apiClient) {
|
|
7327
7394
|
this.apiClient = apiClient;
|
|
7328
7395
|
}
|
|
7396
|
+
async insertActionLog(request) {
|
|
7397
|
+
const body = {
|
|
7398
|
+
action_type: request?.action_type,
|
|
7399
|
+
entity_creator_id: request?.entity_creator_id,
|
|
7400
|
+
entity_id: request?.entity_id,
|
|
7401
|
+
entity_type: request?.entity_type,
|
|
7402
|
+
reason: request?.reason,
|
|
7403
|
+
custom: request?.custom,
|
|
7404
|
+
};
|
|
7405
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/action_logs', undefined, undefined, body, 'application/json');
|
|
7406
|
+
decoders.InsertActionLogResponse?.(response.body);
|
|
7407
|
+
return { ...response.body, metadata: response.metadata };
|
|
7408
|
+
}
|
|
7329
7409
|
async appeal(request) {
|
|
7330
7410
|
const body = {
|
|
7331
7411
|
appeal_reason: request?.appeal_reason,
|
|
@@ -7392,6 +7472,7 @@ class ModerationApi {
|
|
|
7392
7472
|
entity_type: request?.entity_type,
|
|
7393
7473
|
config_key: request?.config_key,
|
|
7394
7474
|
config_team: request?.config_team,
|
|
7475
|
+
content_published_at: request?.content_published_at,
|
|
7395
7476
|
test_mode: request?.test_mode,
|
|
7396
7477
|
user_id: request?.user_id,
|
|
7397
7478
|
config: request?.config,
|
|
@@ -7521,6 +7602,15 @@ class ModerationApi {
|
|
|
7521
7602
|
decoders.FlagResponse?.(response.body);
|
|
7522
7603
|
return { ...response.body, metadata: response.metadata };
|
|
7523
7604
|
}
|
|
7605
|
+
async getFlagCount(request) {
|
|
7606
|
+
const body = {
|
|
7607
|
+
entity_creator_id: request?.entity_creator_id,
|
|
7608
|
+
entity_type: request?.entity_type,
|
|
7609
|
+
};
|
|
7610
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/flag_count', undefined, undefined, body, 'application/json');
|
|
7611
|
+
decoders.GetFlagCountResponse?.(response.body);
|
|
7612
|
+
return { ...response.body, metadata: response.metadata };
|
|
7613
|
+
}
|
|
7524
7614
|
async queryModerationFlags(request) {
|
|
7525
7615
|
const body = {
|
|
7526
7616
|
limit: request?.limit,
|
|
@@ -7641,6 +7731,7 @@ class ModerationApi {
|
|
|
7641
7731
|
delete_message: request?.delete_message,
|
|
7642
7732
|
delete_reaction: request?.delete_reaction,
|
|
7643
7733
|
delete_user: request?.delete_user,
|
|
7734
|
+
escalate: request?.escalate,
|
|
7644
7735
|
flag: request?.flag,
|
|
7645
7736
|
mark_reviewed: request?.mark_reviewed,
|
|
7646
7737
|
reject_appeal: request?.reject_appeal,
|
|
@@ -7730,7 +7821,7 @@ class ApiClient {
|
|
|
7730
7821
|
const headers = {
|
|
7731
7822
|
Authorization: this.apiConfig.token,
|
|
7732
7823
|
'stream-auth-type': 'jwt',
|
|
7733
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7824
|
+
'X-Stream-Client': 'stream-node-' + "0.7.51",
|
|
7734
7825
|
'Accept-Encoding': 'gzip',
|
|
7735
7826
|
'x-client-request-id': clientRequestId,
|
|
7736
7827
|
};
|
|
@@ -7897,6 +7988,7 @@ class FeedsApi {
|
|
|
7897
7988
|
enrich_own_fields: request?.enrich_own_fields,
|
|
7898
7989
|
include_expired_activities: request?.include_expired_activities,
|
|
7899
7990
|
include_private_activities: request?.include_private_activities,
|
|
7991
|
+
include_soft_deleted_activities: request?.include_soft_deleted_activities,
|
|
7900
7992
|
limit: request?.limit,
|
|
7901
7993
|
next: request?.next,
|
|
7902
7994
|
prev: request?.prev,
|
|
@@ -8851,6 +8943,7 @@ class FeedsApi {
|
|
|
8851
8943
|
const body = {
|
|
8852
8944
|
source: request?.source,
|
|
8853
8945
|
target: request?.target,
|
|
8946
|
+
activity_copy_limit: request?.activity_copy_limit,
|
|
8854
8947
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
8855
8948
|
create_notification_activity: request?.create_notification_activity,
|
|
8856
8949
|
enrich_own_fields: request?.enrich_own_fields,
|
|
@@ -8868,6 +8961,7 @@ class FeedsApi {
|
|
|
8868
8961
|
const body = {
|
|
8869
8962
|
source: request?.source,
|
|
8870
8963
|
target: request?.target,
|
|
8964
|
+
activity_copy_limit: request?.activity_copy_limit,
|
|
8871
8965
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
8872
8966
|
create_notification_activity: request?.create_notification_activity,
|
|
8873
8967
|
enrich_own_fields: request?.enrich_own_fields,
|