|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | | -from typing import List, Iterable, Optional |
| 5 | +from typing import Iterable, Optional |
6 | 6 |
|
7 | 7 | import httpx |
8 | 8 |
|
9 | 9 | from ..types import bot_list_params, bot_create_params, bot_invite_params, bot_update_params |
10 | | -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven |
| 10 | +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr |
11 | 11 | from .._utils import maybe_transform, async_maybe_transform |
12 | 12 | from .._compat import cached_property |
13 | 13 | from .._resource import SyncAPIResource, AsyncAPIResource |
@@ -47,18 +47,18 @@ def with_streaming_response(self) -> BotsResourceWithStreamingResponse: |
47 | 47 | def create( |
48 | 48 | self, |
49 | 49 | *, |
50 | | - datasource_ids: List[str], |
| 50 | + datasource_ids: SequenceNotStr[str], |
51 | 51 | name: str, |
52 | 52 | color_theme: Optional[str] | NotGiven = NOT_GIVEN, |
53 | 53 | debug: bool | NotGiven = NOT_GIVEN, |
54 | | - extapi_ids: List[str] | NotGiven = NOT_GIVEN, |
| 54 | + extapi_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, |
55 | 55 | interaction_rules: Iterable[bot_create_params.InteractionRule] | NotGiven = NOT_GIVEN, |
56 | 56 | magic_input: Optional[str] | NotGiven = NOT_GIVEN, |
57 | 57 | max_rows: int | NotGiven = NOT_GIVEN, |
58 | 58 | publish: bool | NotGiven = NOT_GIVEN, |
59 | 59 | query_balance: Optional[int] | NotGiven = NOT_GIVEN, |
60 | | - sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN, |
61 | | - webhooks: List[str] | NotGiven = NOT_GIVEN, |
| 60 | + sample_questions: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
| 61 | + webhooks: SequenceNotStr[str] | NotGiven = NOT_GIVEN, |
62 | 62 | welcome_message: Optional[str] | NotGiven = NOT_GIVEN, |
63 | 63 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
64 | 64 | # The extra values given here take precedence over values defined on the client or passed to this method. |
@@ -170,17 +170,17 @@ def update( |
170 | 170 | *, |
171 | 171 | avatar_url: Optional[str] | NotGiven = NOT_GIVEN, |
172 | 172 | color_theme: Optional[str] | NotGiven = NOT_GIVEN, |
173 | | - datasource_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, |
| 173 | + datasource_ids: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
174 | 174 | debug: Optional[bool] | NotGiven = NOT_GIVEN, |
175 | | - extapi_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, |
| 175 | + extapi_ids: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
176 | 176 | interaction_rules: Optional[Iterable[bot_update_params.InteractionRule]] | NotGiven = NOT_GIVEN, |
177 | 177 | magic_input: Optional[str] | NotGiven = NOT_GIVEN, |
178 | 178 | max_rows: Optional[int] | NotGiven = NOT_GIVEN, |
179 | 179 | name: Optional[str] | NotGiven = NOT_GIVEN, |
180 | 180 | publish: Optional[bool] | NotGiven = NOT_GIVEN, |
181 | 181 | query_balance: Optional[int] | NotGiven = NOT_GIVEN, |
182 | | - sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN, |
183 | | - webhooks: Optional[List[str]] | NotGiven = NOT_GIVEN, |
| 182 | + sample_questions: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
| 183 | + webhooks: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
184 | 184 | welcome_message: Optional[str] | NotGiven = NOT_GIVEN, |
185 | 185 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
186 | 186 | # The extra values given here take precedence over values defined on the client or passed to this method. |
@@ -261,7 +261,7 @@ def update( |
261 | 261 | def list( |
262 | 262 | self, |
263 | 263 | *, |
264 | | - bot_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, |
| 264 | + bot_ids: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
265 | 265 | name: Optional[str] | NotGiven = NOT_GIVEN, |
266 | 266 | page: int | NotGiven = NOT_GIVEN, |
267 | 267 | size: int | NotGiven = NOT_GIVEN, |
@@ -408,18 +408,18 @@ def with_streaming_response(self) -> AsyncBotsResourceWithStreamingResponse: |
408 | 408 | async def create( |
409 | 409 | self, |
410 | 410 | *, |
411 | | - datasource_ids: List[str], |
| 411 | + datasource_ids: SequenceNotStr[str], |
412 | 412 | name: str, |
413 | 413 | color_theme: Optional[str] | NotGiven = NOT_GIVEN, |
414 | 414 | debug: bool | NotGiven = NOT_GIVEN, |
415 | | - extapi_ids: List[str] | NotGiven = NOT_GIVEN, |
| 415 | + extapi_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN, |
416 | 416 | interaction_rules: Iterable[bot_create_params.InteractionRule] | NotGiven = NOT_GIVEN, |
417 | 417 | magic_input: Optional[str] | NotGiven = NOT_GIVEN, |
418 | 418 | max_rows: int | NotGiven = NOT_GIVEN, |
419 | 419 | publish: bool | NotGiven = NOT_GIVEN, |
420 | 420 | query_balance: Optional[int] | NotGiven = NOT_GIVEN, |
421 | | - sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN, |
422 | | - webhooks: List[str] | NotGiven = NOT_GIVEN, |
| 421 | + sample_questions: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
| 422 | + webhooks: SequenceNotStr[str] | NotGiven = NOT_GIVEN, |
423 | 423 | welcome_message: Optional[str] | NotGiven = NOT_GIVEN, |
424 | 424 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
425 | 425 | # The extra values given here take precedence over values defined on the client or passed to this method. |
@@ -531,17 +531,17 @@ async def update( |
531 | 531 | *, |
532 | 532 | avatar_url: Optional[str] | NotGiven = NOT_GIVEN, |
533 | 533 | color_theme: Optional[str] | NotGiven = NOT_GIVEN, |
534 | | - datasource_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, |
| 534 | + datasource_ids: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
535 | 535 | debug: Optional[bool] | NotGiven = NOT_GIVEN, |
536 | | - extapi_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, |
| 536 | + extapi_ids: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
537 | 537 | interaction_rules: Optional[Iterable[bot_update_params.InteractionRule]] | NotGiven = NOT_GIVEN, |
538 | 538 | magic_input: Optional[str] | NotGiven = NOT_GIVEN, |
539 | 539 | max_rows: Optional[int] | NotGiven = NOT_GIVEN, |
540 | 540 | name: Optional[str] | NotGiven = NOT_GIVEN, |
541 | 541 | publish: Optional[bool] | NotGiven = NOT_GIVEN, |
542 | 542 | query_balance: Optional[int] | NotGiven = NOT_GIVEN, |
543 | | - sample_questions: Optional[List[str]] | NotGiven = NOT_GIVEN, |
544 | | - webhooks: Optional[List[str]] | NotGiven = NOT_GIVEN, |
| 543 | + sample_questions: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
| 544 | + webhooks: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
545 | 545 | welcome_message: Optional[str] | NotGiven = NOT_GIVEN, |
546 | 546 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
547 | 547 | # The extra values given here take precedence over values defined on the client or passed to this method. |
@@ -622,7 +622,7 @@ async def update( |
622 | 622 | def list( |
623 | 623 | self, |
624 | 624 | *, |
625 | | - bot_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, |
| 625 | + bot_ids: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
626 | 626 | name: Optional[str] | NotGiven = NOT_GIVEN, |
627 | 627 | page: int | NotGiven = NOT_GIVEN, |
628 | 628 | size: int | NotGiven = NOT_GIVEN, |
|
0 commit comments