stream-chat
Advanced tools
Comparing version 8.48.0 to 8.49.0
@@ -1,2 +0,2 @@ | ||
import { APIResponse, ModerationConfig, DefaultGenerics, ExtendableGenerics, GetConfigResponse, GetUserModerationReportResponse, ReviewQueueFilters, ReviewQueuePaginationOptions, ReviewQueueResponse, ReviewQueueSort, UpsertConfigResponse, ModerationFlagOptions, ModerationMuteOptions, GetUserModerationReportOptions, SubmitActionOptions, QueryModerationConfigsFilters, QueryModerationConfigsSort, Pager, CustomCheckFlag, ReviewQueueItem } from './types'; | ||
import { APIResponse, ModerationConfig, DefaultGenerics, ExtendableGenerics, GetConfigResponse, GetUserModerationReportResponse, ReviewQueueFilters, ReviewQueuePaginationOptions, ReviewQueueResponse, ReviewQueueSort, UpsertConfigResponse, ModerationFlagOptions, ModerationMuteOptions, GetUserModerationReportOptions, SubmitActionOptions, QueryModerationConfigsFilters, QueryModerationConfigsSort, Pager, CustomCheckFlag, ReviewQueueItem, QueryConfigsResponse } from './types'; | ||
import { StreamChat } from './client'; | ||
@@ -97,3 +97,3 @@ export declare const MODERATION_ENTITY_TYPES: { | ||
*/ | ||
upsertConfig(config?: ModerationConfig): Promise<UpsertConfigResponse>; | ||
upsertConfig(config: ModerationConfig): Promise<UpsertConfigResponse>; | ||
/** | ||
@@ -103,4 +103,8 @@ * Get moderation config | ||
*/ | ||
getConfig(key: string): Promise<GetConfigResponse>; | ||
deleteConfig(key: string): Promise<unknown>; | ||
getConfig(key: string, data?: { | ||
team?: string; | ||
}): Promise<GetConfigResponse>; | ||
deleteConfig(key: string, data?: { | ||
team?: string; | ||
}): Promise<unknown>; | ||
/** | ||
@@ -112,3 +116,3 @@ * Query moderation configs | ||
*/ | ||
queryConfigs(filterConditions: QueryModerationConfigsFilters, sort: QueryModerationConfigsSort, options?: Pager): Promise<unknown>; | ||
queryConfigs(filterConditions: QueryModerationConfigsFilters, sort: QueryModerationConfigsSort, options?: Pager): Promise<QueryConfigsResponse>; | ||
submitAction(actionType: string, itemID: string, options?: SubmitActionOptions): Promise<{ | ||
@@ -115,0 +119,0 @@ item_id: string; |
{ | ||
"name": "stream-chat", | ||
"version": "8.48.0", | ||
"version": "8.49.0", | ||
"description": "JS SDK for the Stream Chat API", | ||
@@ -5,0 +5,0 @@ "author": "GetStream", |
@@ -23,2 +23,3 @@ import { | ||
ReviewQueueItem, | ||
QueryConfigsResponse, | ||
} from './types'; | ||
@@ -178,3 +179,3 @@ import { StreamChat } from './client'; | ||
*/ | ||
async upsertConfig(config: ModerationConfig = {}) { | ||
async upsertConfig(config: ModerationConfig) { | ||
return await this.client.post<UpsertConfigResponse>(this.client.baseURL + '/api/v2/moderation/config', config); | ||
@@ -187,8 +188,8 @@ } | ||
*/ | ||
async getConfig(key: string) { | ||
return await this.client.get<GetConfigResponse>(this.client.baseURL + '/api/v2/moderation/config/' + key); | ||
async getConfig(key: string, data?: { team?: string }) { | ||
return await this.client.get<GetConfigResponse>(this.client.baseURL + '/api/v2/moderation/config/' + key, data); | ||
} | ||
async deleteConfig(key: string) { | ||
return await this.client.delete(this.client.baseURL + '/api/v2/moderation/config/' + key); | ||
async deleteConfig(key: string, data?: { team?: string }) { | ||
return await this.client.delete(this.client.baseURL + '/api/v2/moderation/config/' + key, data); | ||
} | ||
@@ -207,3 +208,3 @@ | ||
) { | ||
return await this.client.post(this.client.baseURL + '/api/v2/moderation/configs', { | ||
return await this.client.post<QueryConfigsResponse>(this.client.baseURL + '/api/v2/moderation/configs', { | ||
filter: filterConditions, | ||
@@ -210,0 +211,0 @@ sort, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
7492742
78095