2828from ...._wrappers import ResultWrapper
2929from ....pagination import SyncV4PagePaginationArray , AsyncV4PagePaginationArray
3030from ...._base_client import AsyncPaginator , make_request_options
31- from ....types .secrets_store import store_list_params , store_create_params
31+ from ....types .secrets_store import store_list_params , store_create_params , store_delete_params
3232from ....types .secrets_store .store_list_response import StoreListResponse
3333from ....types .secrets_store .store_create_response import StoreCreateResponse
3434
@@ -167,21 +167,30 @@ def delete(
167167 store_id : str ,
168168 * ,
169169 account_id : str ,
170+ force : bool | Omit = omit ,
170171 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
171172 # The extra values given here take precedence over values defined on the client or passed to this method.
172173 extra_headers : Headers | None = None ,
173174 extra_query : Query | None = None ,
174175 extra_body : Body | None = None ,
175176 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
176177 ) -> object :
177- """
178- Deletes a single store
178+ """Deletes a single store.
179+
180+ By default, a store that still contains secrets cannot
181+ be deleted and returns HTTP 409 (Conflict) with the "store_not_empty" error.
182+ Pass `force=true` to cascade-delete all secrets in the store. Empty stores are
183+ always deleted regardless of the force parameter.
179184
180185 Args:
181186 account_id: Account Identifier
182187
183188 store_id: Store Identifier
184189
190+ force: When true, cascade-deletes all secrets in the store before deleting the store
191+ itself. Required when deleting a non-empty store. Without this parameter,
192+ attempting to delete a non-empty store returns 409.
193+
185194 extra_headers: Send extra headers
186195
187196 extra_query: Add additional query parameters to the request
@@ -203,6 +212,7 @@ def delete(
203212 extra_query = extra_query ,
204213 extra_body = extra_body ,
205214 timeout = timeout ,
215+ query = maybe_transform ({"force" : force }, store_delete_params .StoreDeleteParams ),
206216 post_parser = ResultWrapper [Optional [object ]]._unwrapper ,
207217 ),
208218 cast_to = cast (Type [object ], ResultWrapper [object ]),
@@ -341,21 +351,30 @@ async def delete(
341351 store_id : str ,
342352 * ,
343353 account_id : str ,
354+ force : bool | Omit = omit ,
344355 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
345356 # The extra values given here take precedence over values defined on the client or passed to this method.
346357 extra_headers : Headers | None = None ,
347358 extra_query : Query | None = None ,
348359 extra_body : Body | None = None ,
349360 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
350361 ) -> object :
351- """
352- Deletes a single store
362+ """Deletes a single store.
363+
364+ By default, a store that still contains secrets cannot
365+ be deleted and returns HTTP 409 (Conflict) with the "store_not_empty" error.
366+ Pass `force=true` to cascade-delete all secrets in the store. Empty stores are
367+ always deleted regardless of the force parameter.
353368
354369 Args:
355370 account_id: Account Identifier
356371
357372 store_id: Store Identifier
358373
374+ force: When true, cascade-deletes all secrets in the store before deleting the store
375+ itself. Required when deleting a non-empty store. Without this parameter,
376+ attempting to delete a non-empty store returns 409.
377+
359378 extra_headers: Send extra headers
360379
361380 extra_query: Add additional query parameters to the request
@@ -377,6 +396,7 @@ async def delete(
377396 extra_query = extra_query ,
378397 extra_body = extra_body ,
379398 timeout = timeout ,
399+ query = await async_maybe_transform ({"force" : force }, store_delete_params .StoreDeleteParams ),
380400 post_parser = ResultWrapper [Optional [object ]]._unwrapper ,
381401 ),
382402 cast_to = cast (Type [object ], ResultWrapper [object ]),
0 commit comments