File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,9 @@ const deleteRules = await client.v2.updateStreamRules({
216216 ids: [' 281646' , ' 1534843' ],
217217 },
218218});
219+
220+ // Delete all rules
221+ await client .v2 .updateStreamRules ({}, { delete_all: true });
219222```
220223
221224### Sample endpoint
Original file line number Diff line number Diff line change @@ -52,14 +52,25 @@ export interface StreamingV2DeleteRulesParams {
5252 } ;
5353}
5454
55- export type StreamingV2UpdateRulesParams = StreamingV2AddRulesParams | StreamingV2DeleteRulesParams ;
55+ /** Empty body used when deleting all rules through the `delete_all` query parameter. */
56+ export type StreamingV2DeleteAllRulesParams = Record < string , never > ;
57+
58+ export type StreamingV2UpdateRulesParams =
59+ | StreamingV2AddRulesParams
60+ | StreamingV2DeleteRulesParams
61+ | StreamingV2DeleteAllRulesParams ;
5662
5763export interface StreamingV2UpdateRulesQuery {
5864 /**
5965 * Set to true to test a the syntax of your rule without submitting it.
6066 * This is useful if you want to check the syntax of a rule before removing one or more of your existing rules.
6167 */
6268 dry_run : boolean ;
69+ /**
70+ * Delete all of the rules associated with this client app. It should be specified with no other parameters.
71+ * Once deleted, rules cannot be recovered.
72+ */
73+ delete_all ?: boolean ;
6374}
6475
6576export type StreamingV2UpdateRulesAddResult = DataAndMetaV2 < StreamingV2Rule [ ] , {
You can’t perform that action at this time.
0 commit comments