Skip to content

Commit 5d76dfb

Browse files
committed
fix: updated endpoint params
1 parent 6d97dee commit 5d76dfb

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

src/types.ts

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4460,25 +4460,47 @@ export type EventHook = {
44604460
updated_at?: string;
44614461
};
44624462

4463+
export type BatchUpdateOperation =
4464+
| 'addMembers'
4465+
| 'removeMembers'
4466+
| 'invites'
4467+
| 'assignRoles'
4468+
| 'addModerators'
4469+
| 'demoteModerators'
4470+
| 'hide'
4471+
| 'show'
4472+
| 'archive'
4473+
| 'unarchive'
4474+
| 'updateData'
4475+
| 'addFilterTags'
4476+
| 'removeFilterTags';
4477+
4478+
export type BatchChannelDataUpdate = {
4479+
frozen?: boolean;
4480+
disabled?: boolean;
4481+
custom?: Record<string, unknown>;
4482+
team?: string;
4483+
config_overrides?: Record<string, unknown>;
4484+
auto_translation_enabled?: boolean;
4485+
auto_translation_language?: string;
4486+
};
4487+
44634488
export type UpdateChannelsBatchOptions = {
4464-
operation: string;
4489+
operation: BatchUpdateOperation;
44654490
filter: UpdateChannelsBatchFilters;
44664491
members?: string[] | Array<NewMemberPayload>;
4467-
data?: Partial<ChannelData>;
4492+
data?: BatchChannelDataUpdate;
44684493
};
44694494

44704495
export type UpdateChannelsBatchFilters = QueryFilters<{
44714496
cids?:
4472-
| RequireOnlyOne<Pick<QueryFilter<string>, '$in'>>
4473-
| RequireOnlyOne<Pick<QueryFilter<string[]>, '$eq'>>
4497+
| RequireOnlyOne<Pick<QueryFilter<string>, '$in' | '$eq'>>
44744498
| PrimitiveFilter<string[]>;
44754499
types?:
4476-
| RequireOnlyOne<Pick<QueryFilter<string>, '$in'>>
4477-
| RequireOnlyOne<Pick<QueryFilter<string[]>, '$eq'>>
4500+
| RequireOnlyOne<Pick<QueryFilter<string>, '$in' | '$eq'>>
44784501
| PrimitiveFilter<string[]>;
44794502
filter_tags?:
4480-
| RequireOnlyOne<Pick<QueryFilter<string>, '$in'>>
4481-
| RequireOnlyOne<Pick<QueryFilter<Record<string, string>>, '$eq'>>
4503+
| RequireOnlyOne<Pick<QueryFilter<string>, '$in' | '$eq'>>
44824504
| PrimitiveFilter<Record<string, string>>;
44834505
}>;
44844506

0 commit comments

Comments
 (0)