@@ -11,6 +11,7 @@ import {
1111 CheckSQSRequest ,
1212 CheckSQSResponse ,
1313 CreateBlockListRequest ,
14+ CreateBlockListResponse ,
1415 CreateDeviceRequest ,
1516 CreateExternalStorageRequest ,
1617 CreateExternalStorageResponse ,
@@ -59,6 +60,7 @@ import {
5960 UnblockUsersResponse ,
6061 UpdateAppRequest ,
6162 UpdateBlockListRequest ,
63+ UpdateBlockListResponse ,
6264 UpdateExternalStorageRequest ,
6365 UpdateExternalStorageResponse ,
6466 UpdateUsersPartialRequest ,
@@ -141,10 +143,16 @@ export class CommonApi extends BaseApi {
141143 return { ...response . body , metadata : response . metadata } ;
142144 } ;
143145
144- listBlockLists = async ( ) : Promise < StreamResponse < ListBlockListResponse > > => {
146+ listBlockLists = async ( request ?: {
147+ team ?: string ;
148+ } ) : Promise < StreamResponse < ListBlockListResponse > > => {
149+ const queryParams = {
150+ team : request ?. team ,
151+ } ;
152+
145153 const response = await this . sendRequest <
146154 StreamResponse < ListBlockListResponse >
147- > ( 'GET' , '/api/v2/blocklists' , undefined , undefined ) ;
155+ > ( 'GET' , '/api/v2/blocklists' , undefined , queryParams ) ;
148156
149157 decoders . ListBlockListResponse ?.( response . body ) ;
150158
@@ -153,29 +161,30 @@ export class CommonApi extends BaseApi {
153161
154162 createBlockList = async (
155163 request : CreateBlockListRequest ,
156- ) : Promise < StreamResponse < Response > > => {
164+ ) : Promise < StreamResponse < CreateBlockListResponse > > => {
157165 const body = {
158166 name : request ?. name ,
159167 words : request ?. words ,
168+ team : request ?. team ,
160169 type : request ?. type ,
161170 } ;
162171
163- const response = await this . sendRequest < StreamResponse < Response > > (
164- 'POST' ,
165- '/api/v2/blocklists' ,
166- undefined ,
167- undefined ,
168- body ,
169- ) ;
172+ const response = await this . sendRequest <
173+ StreamResponse < CreateBlockListResponse >
174+ > ( 'POST' , '/api/v2/blocklists' , undefined , undefined , body ) ;
170175
171- decoders . Response ?.( response . body ) ;
176+ decoders . CreateBlockListResponse ?.( response . body ) ;
172177
173178 return { ...response . body , metadata : response . metadata } ;
174179 } ;
175180
176181 deleteBlockList = async ( request : {
177182 name : string ;
183+ team ?: string ;
178184 } ) : Promise < StreamResponse < Response > > => {
185+ const queryParams = {
186+ team : request ?. team ,
187+ } ;
179188 const pathParams = {
180189 name : request ?. name ,
181190 } ;
@@ -184,7 +193,7 @@ export class CommonApi extends BaseApi {
184193 'DELETE' ,
185194 '/api/v2/blocklists/{name}' ,
186195 pathParams ,
187- undefined ,
196+ queryParams ,
188197 ) ;
189198
190199 decoders . Response ?.( response . body ) ;
@@ -194,14 +203,18 @@ export class CommonApi extends BaseApi {
194203
195204 getBlockList = async ( request : {
196205 name : string ;
206+ team ?: string ;
197207 } ) : Promise < StreamResponse < GetBlockListResponse > > => {
208+ const queryParams = {
209+ team : request ?. team ,
210+ } ;
198211 const pathParams = {
199212 name : request ?. name ,
200213 } ;
201214
202215 const response = await this . sendRequest <
203216 StreamResponse < GetBlockListResponse >
204- > ( 'GET' , '/api/v2/blocklists/{name}' , pathParams , undefined ) ;
217+ > ( 'GET' , '/api/v2/blocklists/{name}' , pathParams , queryParams ) ;
205218
206219 decoders . GetBlockListResponse ?.( response . body ) ;
207220
@@ -210,23 +223,20 @@ export class CommonApi extends BaseApi {
210223
211224 updateBlockList = async (
212225 request : UpdateBlockListRequest & { name : string } ,
213- ) : Promise < StreamResponse < Response > > => {
226+ ) : Promise < StreamResponse < UpdateBlockListResponse > > => {
214227 const pathParams = {
215228 name : request ?. name ,
216229 } ;
217230 const body = {
231+ team : request ?. team ,
218232 words : request ?. words ,
219233 } ;
220234
221- const response = await this . sendRequest < StreamResponse < Response > > (
222- 'PUT' ,
223- '/api/v2/blocklists/{name}' ,
224- pathParams ,
225- undefined ,
226- body ,
227- ) ;
235+ const response = await this . sendRequest <
236+ StreamResponse < UpdateBlockListResponse >
237+ > ( 'PUT' , '/api/v2/blocklists/{name}' , pathParams , undefined , body ) ;
228238
229- decoders . Response ?.( response . body ) ;
239+ decoders . UpdateBlockListResponse ?.( response . body ) ;
230240
231241 return { ...response . body , metadata : response . metadata } ;
232242 } ;
0 commit comments