Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions src/channel_batch_updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,40 +208,4 @@ export class ChannelBatchUpdater {
data,
});
}

/**
* addFilterTags - Add filter tags to channels matching the filter
*
* @param {UpdateChannelsBatchFilters} filter Filter to select channels
* @param {string[]} tags Tags to add
* @return {Promise<APIResponse & UpdateChannelsBatchResponse>} The server response
*/
async addFilterTags(
filter: UpdateChannelsBatchFilters,
tags: string[],
): Promise<APIResponse & UpdateChannelsBatchResponse> {
return await this.client.updateChannelsBatch({
operation: 'addFilterTags',
filter,
filter_tags_update: tags,
});
}

/**
* removeFilterTags - Remove filter tags from channels matching the filter
*
* @param {UpdateChannelsBatchFilters} filter Filter to select channels
* @param {string[]} tags Tags to remove
* @return {Promise<APIResponse & UpdateChannelsBatchResponse>} The server response
*/
async removeFilterTags(
filter: UpdateChannelsBatchFilters,
tags: string[],
): Promise<APIResponse & UpdateChannelsBatchResponse> {
return await this.client.updateChannelsBatch({
operation: 'removeFilterTags',
filter,
filter_tags_update: tags,
});
}
}
8 changes: 1 addition & 7 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4620,9 +4620,7 @@ export type BatchUpdateOperation =
| 'show'
| 'archive'
| 'unarchive'
| 'updateData'
| 'addFilterTags'
| 'removeFilterTags';
| 'updateData';

export type BatchChannelDataUpdate = {
frozen?: boolean;
Expand All @@ -4639,7 +4637,6 @@ export type UpdateChannelsBatchOptions = {
filter: UpdateChannelsBatchFilters;
members?: string[] | Array<NewMemberPayload>;
data?: BatchChannelDataUpdate;
filter_tags_update?: string[];
};

export type UpdateChannelsBatchFilters = QueryFilters<{
Expand All @@ -4649,9 +4646,6 @@ export type UpdateChannelsBatchFilters = QueryFilters<{
types?:
| RequireOnlyOne<Pick<QueryFilter<string>, '$in' | '$eq'>>
| PrimitiveFilter<string[]>;
filter_tags?:
| RequireOnlyOne<Pick<QueryFilter<string>, '$in' | '$eq'>>
| PrimitiveFilter<Record<string, string>>;
}>;

export type UpdateChannelsBatchResponse = {
Expand Down
Loading