Skip to content

Commit b43172b

Browse files
fix(java): Resolve name collisions
1 parent 7a8046b commit b43172b

File tree

10 files changed

+76
-76
lines changed

10 files changed

+76
-76
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-970ab04a97244c68824c0c52e06925cba14fb7dbfc36c03167c1afe74cd1b150.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-640ec74bfc2f335f7277863ee0cbd0af98bb6018cb1ec2f116ce4145148f4477.yml
33
openapi_spec_hash: 315e7859c3f77311261fb824b74a8247
4-
config_hash: f2846563903bf75ab0858872154df0f7
4+
config_hash: f921f92cc97449dcc1334a594b435c73

api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,10 @@ Methods:
430430
Types:
431431

432432
```python
433-
from finch.types.connect import SessionNewResponse, SessionReauthenticateResponse
433+
from finch.types.connect import SessionConnectResponse, SessionReauthenticateResponse
434434
```
435435

436436
Methods:
437437

438-
- <code title="post /connect/sessions">client.connect.sessions.<a href="./src/finch/resources/connect/sessions.py">new</a>(\*\*<a href="src/finch/types/connect/session_new_params.py">params</a>) -> <a href="./src/finch/types/connect/session_new_response.py">SessionNewResponse</a></code>
438+
- <code title="post /connect/sessions">client.connect.sessions.<a href="./src/finch/resources/connect/sessions.py">connect</a>(\*\*<a href="src/finch/types/connect/session_connect_params.py">params</a>) -> <a href="./src/finch/types/connect/session_connect_response.py">SessionConnectResponse</a></code>
439439
- <code title="post /connect/sessions/reauthenticate">client.connect.sessions.<a href="./src/finch/resources/connect/sessions.py">reauthenticate</a>(\*\*<a href="src/finch/types/connect/session_reauthenticate_params.py">params</a>) -> <a href="./src/finch/types/connect/session_reauthenticate_response.py">SessionReauthenticateResponse</a></code>

src/finch/resources/connect/sessions.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from ..._resource import SyncAPIResource, AsyncAPIResource
1515
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
1616
from ..._base_client import make_request_options
17-
from ...types.connect import session_new_params, session_reauthenticate_params
18-
from ...types.connect.session_new_response import SessionNewResponse
17+
from ...types.connect import session_connect_params, session_reauthenticate_params
18+
from ...types.connect.session_connect_response import SessionConnectResponse
1919
from ...types.connect.session_reauthenticate_response import SessionReauthenticateResponse
2020

2121
__all__ = ["Sessions", "AsyncSessions"]
@@ -41,7 +41,7 @@ def with_streaming_response(self) -> SessionsWithStreamingResponse:
4141
"""
4242
return SessionsWithStreamingResponse(self)
4343

44-
def new(
44+
def connect(
4545
self,
4646
*,
4747
customer_id: str,
@@ -61,7 +61,7 @@ def new(
6161
]
6262
],
6363
customer_email: Optional[str] | Omit = omit,
64-
integration: Optional[session_new_params.Integration] | Omit = omit,
64+
integration: Optional[session_connect_params.Integration] | Omit = omit,
6565
manual: Optional[bool] | Omit = omit,
6666
minutes_to_expire: Optional[float] | Omit = omit,
6767
redirect_uri: Optional[str] | Omit = omit,
@@ -72,7 +72,7 @@ def new(
7272
extra_query: Query | None = None,
7373
extra_body: Body | None = None,
7474
timeout: float | httpx.Timeout | None | NotGiven = not_given,
75-
) -> SessionNewResponse:
75+
) -> SessionConnectResponse:
7676
"""
7777
Create a new connect session for an employer
7878
@@ -118,12 +118,12 @@ def new(
118118
"redirect_uri": redirect_uri,
119119
"sandbox": sandbox,
120120
},
121-
session_new_params.SessionNewParams,
121+
session_connect_params.SessionConnectParams,
122122
),
123123
options=make_request_options(
124124
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
125125
),
126-
cast_to=SessionNewResponse,
126+
cast_to=SessionConnectResponse,
127127
)
128128

129129
def reauthenticate(
@@ -215,7 +215,7 @@ def with_streaming_response(self) -> AsyncSessionsWithStreamingResponse:
215215
"""
216216
return AsyncSessionsWithStreamingResponse(self)
217217

218-
async def new(
218+
async def connect(
219219
self,
220220
*,
221221
customer_id: str,
@@ -235,7 +235,7 @@ async def new(
235235
]
236236
],
237237
customer_email: Optional[str] | Omit = omit,
238-
integration: Optional[session_new_params.Integration] | Omit = omit,
238+
integration: Optional[session_connect_params.Integration] | Omit = omit,
239239
manual: Optional[bool] | Omit = omit,
240240
minutes_to_expire: Optional[float] | Omit = omit,
241241
redirect_uri: Optional[str] | Omit = omit,
@@ -246,7 +246,7 @@ async def new(
246246
extra_query: Query | None = None,
247247
extra_body: Body | None = None,
248248
timeout: float | httpx.Timeout | None | NotGiven = not_given,
249-
) -> SessionNewResponse:
249+
) -> SessionConnectResponse:
250250
"""
251251
Create a new connect session for an employer
252252
@@ -292,12 +292,12 @@ async def new(
292292
"redirect_uri": redirect_uri,
293293
"sandbox": sandbox,
294294
},
295-
session_new_params.SessionNewParams,
295+
session_connect_params.SessionConnectParams,
296296
),
297297
options=make_request_options(
298298
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
299299
),
300-
cast_to=SessionNewResponse,
300+
cast_to=SessionConnectResponse,
301301
)
302302

303303
async def reauthenticate(
@@ -373,8 +373,8 @@ class SessionsWithRawResponse:
373373
def __init__(self, sessions: Sessions) -> None:
374374
self._sessions = sessions
375375

376-
self.new = _legacy_response.to_raw_response_wrapper(
377-
sessions.new,
376+
self.connect = _legacy_response.to_raw_response_wrapper(
377+
sessions.connect,
378378
)
379379
self.reauthenticate = _legacy_response.to_raw_response_wrapper(
380380
sessions.reauthenticate,
@@ -385,8 +385,8 @@ class AsyncSessionsWithRawResponse:
385385
def __init__(self, sessions: AsyncSessions) -> None:
386386
self._sessions = sessions
387387

388-
self.new = _legacy_response.async_to_raw_response_wrapper(
389-
sessions.new,
388+
self.connect = _legacy_response.async_to_raw_response_wrapper(
389+
sessions.connect,
390390
)
391391
self.reauthenticate = _legacy_response.async_to_raw_response_wrapper(
392392
sessions.reauthenticate,
@@ -397,8 +397,8 @@ class SessionsWithStreamingResponse:
397397
def __init__(self, sessions: Sessions) -> None:
398398
self._sessions = sessions
399399

400-
self.new = to_streamed_response_wrapper(
401-
sessions.new,
400+
self.connect = to_streamed_response_wrapper(
401+
sessions.connect,
402402
)
403403
self.reauthenticate = to_streamed_response_wrapper(
404404
sessions.reauthenticate,
@@ -409,8 +409,8 @@ class AsyncSessionsWithStreamingResponse:
409409
def __init__(self, sessions: AsyncSessions) -> None:
410410
self._sessions = sessions
411411

412-
self.new = async_to_streamed_response_wrapper(
413-
sessions.new,
412+
self.connect = async_to_streamed_response_wrapper(
413+
sessions.connect,
414414
)
415415
self.reauthenticate = async_to_streamed_response_wrapper(
416416
sessions.reauthenticate,

src/finch/resources/request_forwarding.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def forward(
4545
method: str,
4646
route: str,
4747
data: Optional[str] | Omit = omit,
48-
headers: Optional[Dict[str, Optional[object]]] | Omit = omit,
4948
params: Optional[Dict[str, Optional[object]]] | Omit = omit,
49+
request_headers: Optional[Dict[str, Optional[object]]] | Omit = omit,
5050
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5151
# The extra values given here take precedence over values defined on the client or passed to this method.
5252
extra_headers: Headers | None = None,
@@ -72,13 +72,13 @@ def forward(
7272
data: The body for the forwarded request. This value must be specified as either a
7373
string or a valid JSON object.
7474
75-
headers: The HTTP headers to include on the forwarded request. This value must be
76-
specified as an object of key-value pairs. Example:
77-
`{"Content-Type": "application/xml", "X-API-Version": "v1" }`
78-
7975
params: The query parameters for the forwarded request. This value must be specified as
8076
a valid JSON object rather than a query string.
8177
78+
request_headers: The HTTP headers to include on the forwarded request. This value must be
79+
specified as an object of key-value pairs. Example:
80+
`{"Content-Type": "application/xml", "X-API-Version": "v1" }`
81+
8282
extra_headers: Send extra headers
8383
8484
extra_query: Add additional query parameters to the request
@@ -94,8 +94,8 @@ def forward(
9494
"method": method,
9595
"route": route,
9696
"data": data,
97-
"headers": headers,
9897
"params": params,
98+
"request_headers": request_headers,
9999
},
100100
request_forwarding_forward_params.RequestForwardingForwardParams,
101101
),
@@ -132,8 +132,8 @@ async def forward(
132132
method: str,
133133
route: str,
134134
data: Optional[str] | Omit = omit,
135-
headers: Optional[Dict[str, Optional[object]]] | Omit = omit,
136135
params: Optional[Dict[str, Optional[object]]] | Omit = omit,
136+
request_headers: Optional[Dict[str, Optional[object]]] | Omit = omit,
137137
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
138138
# The extra values given here take precedence over values defined on the client or passed to this method.
139139
extra_headers: Headers | None = None,
@@ -159,13 +159,13 @@ async def forward(
159159
data: The body for the forwarded request. This value must be specified as either a
160160
string or a valid JSON object.
161161
162-
headers: The HTTP headers to include on the forwarded request. This value must be
163-
specified as an object of key-value pairs. Example:
164-
`{"Content-Type": "application/xml", "X-API-Version": "v1" }`
165-
166162
params: The query parameters for the forwarded request. This value must be specified as
167163
a valid JSON object rather than a query string.
168164
165+
request_headers: The HTTP headers to include on the forwarded request. This value must be
166+
specified as an object of key-value pairs. Example:
167+
`{"Content-Type": "application/xml", "X-API-Version": "v1" }`
168+
169169
extra_headers: Send extra headers
170170
171171
extra_query: Add additional query parameters to the request
@@ -181,8 +181,8 @@ async def forward(
181181
"method": method,
182182
"route": route,
183183
"data": data,
184-
"headers": headers,
185184
"params": params,
185+
"request_headers": request_headers,
186186
},
187187
request_forwarding_forward_params.RequestForwardingForwardParams,
188188
),

src/finch/types/connect/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from .session_new_params import SessionNewParams as SessionNewParams
6-
from .session_new_response import SessionNewResponse as SessionNewResponse
5+
from .session_connect_params import SessionConnectParams as SessionConnectParams
6+
from .session_connect_response import SessionConnectResponse as SessionConnectResponse
77
from .session_reauthenticate_params import SessionReauthenticateParams as SessionReauthenticateParams
88
from .session_reauthenticate_response import SessionReauthenticateResponse as SessionReauthenticateResponse

src/finch/types/connect/session_new_params.py renamed to src/finch/types/connect/session_connect_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from typing import List, Optional
66
from typing_extensions import Literal, Required, TypedDict
77

8-
__all__ = ["SessionNewParams", "Integration"]
8+
__all__ = ["SessionConnectParams", "Integration"]
99

1010

11-
class SessionNewParams(TypedDict, total=False):
11+
class SessionConnectParams(TypedDict, total=False):
1212
customer_id: Required[str]
1313
"""Unique identifier for the customer"""
1414

src/finch/types/connect/session_new_response.py renamed to src/finch/types/connect/session_connect_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
from ..._models import BaseModel
44

5-
__all__ = ["SessionNewResponse"]
5+
__all__ = ["SessionConnectResponse"]
66

77

8-
class SessionNewResponse(BaseModel):
8+
class SessionConnectResponse(BaseModel):
99
connect_url: str
1010
"""The Connect URL to redirect the user to for authentication"""
1111

src/finch/types/request_forwarding_forward_params.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ class RequestForwardingForwardParams(TypedDict, total=False):
2828
This value must be specified as either a string or a valid JSON object.
2929
"""
3030

31-
headers: Optional[Dict[str, Optional[object]]]
32-
"""The HTTP headers to include on the forwarded request.
33-
34-
This value must be specified as an object of key-value pairs. Example:
35-
`{"Content-Type": "application/xml", "X-API-Version": "v1" }`
36-
"""
37-
3831
params: Optional[Dict[str, Optional[object]]]
3932
"""The query parameters for the forwarded request.
4033
4134
This value must be specified as a valid JSON object rather than a query string.
4235
"""
36+
37+
request_headers: Optional[Dict[str, Optional[object]]]
38+
"""The HTTP headers to include on the forwarded request.
39+
40+
This value must be specified as an object of key-value pairs. Example:
41+
`{"Content-Type": "application/xml", "X-API-Version": "v1" }`
42+
"""

0 commit comments

Comments
 (0)