Skip to content

Commit b4fd409

Browse files
authored
Merge pull request #58 from openintegrations/release-please--branches--main--changes--next
release: 1.4.0
2 parents 2984bf2 + 4330e7f commit b4fd409

31 files changed

+18062
-8281
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
lint:
1313
name: lint
1414
runs-on: ubuntu-latest
15-
1615
steps:
1716
- uses: actions/checkout@v4
1817

@@ -33,7 +32,6 @@ jobs:
3332
test:
3433
name: test
3534
runs-on: ubuntu-latest
36-
3735
steps:
3836
- uses: actions/checkout@v4
3937

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.3.0"
2+
".": "1.4.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 9
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openint%2Fopenint-573ba7bb24acb12f9769960c0d801cd5e6d9522993d27f66c5c10c9e6588ea0e.yml
3-
openapi_spec_hash: db9d90654bbdc3d6280c4a4c752a08ed
4-
config_hash: 3745e90e1c879ca82ecfade8dfd108df
1+
configured_endpoints: 10
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openint%2Fopenint-349f41f89a594b4ccde7574cb56751d53504914e8b74a0561c86522f5b838e01.yml
3+
openapi_spec_hash: b33b7134c3e9650af2beebfbc0af1389
4+
config_hash: a6e549521fa293498319c532d9cfa93f

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## 1.4.0 (2025-04-17)
4+
5+
Full Changelog: [v1.3.0...v1.4.0](https://github.com/openintegrations/python-sdk/compare/v1.3.0...v1.4.0)
6+
7+
### Features
8+
9+
* **docs:** updating documented docs for stainless ([#59](https://github.com/openintegrations/python-sdk/issues/59)) ([67d2b1a](https://github.com/openintegrations/python-sdk/commit/67d2b1afd93f7c03ec0cf4b9efca10955e67b0a2))
10+
* **docs:** updating documented docs for stainless ([#60](https://github.com/openintegrations/python-sdk/issues/60)) ([3198217](https://github.com/openintegrations/python-sdk/commit/3198217a87b4905bccd2a2aa8b73d1d7078c64dd))
11+
* **docs:** updating documented docs for stainless ([#63](https://github.com/openintegrations/python-sdk/issues/63)) ([c58d10f](https://github.com/openintegrations/python-sdk/commit/c58d10f974edc4e5b0a4b773e491ac15dc0a6a1a))
12+
13+
14+
### Bug Fixes
15+
16+
* **api:** adding list connectors ([#57](https://github.com/openintegrations/python-sdk/issues/57)) ([4346d9f](https://github.com/openintegrations/python-sdk/commit/4346d9f25c93a12cc9d053a875f7ddd8713ad8b2))
17+
* **client:** add missing `None` default ([#62](https://github.com/openintegrations/python-sdk/issues/62)) ([c485bed](https://github.com/openintegrations/python-sdk/commit/c485bed766abe22f064cbe35e565dd46a7c65153))
18+
* **client:** send all configured auth headers ([#64](https://github.com/openintegrations/python-sdk/issues/64)) ([d275e08](https://github.com/openintegrations/python-sdk/commit/d275e08a1ad94ceb314199a05ac77f4fe3fa42c5))
19+
* **perf:** optimize some hot paths ([0cfd3e8](https://github.com/openintegrations/python-sdk/commit/0cfd3e84986aab3170fe95d03914fca2cf4a6de1))
20+
* **perf:** skip traversing types for NotGiven values ([8701b67](https://github.com/openintegrations/python-sdk/commit/8701b673ba7330a950b8b01ced03e7f932aafc1c))
21+
22+
23+
### Chores
24+
25+
* **client:** minor internal fixes ([51521a0](https://github.com/openintegrations/python-sdk/commit/51521a02d06ba4735c88b2a2c4a8e5cbc1a73fc4))
26+
* **internal:** base client updates ([b363862](https://github.com/openintegrations/python-sdk/commit/b363862cbc085488312f80981f866bf116e49b42))
27+
* **internal:** bump pyright version ([218ab17](https://github.com/openintegrations/python-sdk/commit/218ab17be07865cca836d851809edf2e1aa11943))
28+
* **internal:** expand CI branch coverage ([2fd500b](https://github.com/openintegrations/python-sdk/commit/2fd500bff96581dad3331a0a89e2a02d0a00f872))
29+
* **internal:** reduce CI branch coverage ([763f501](https://github.com/openintegrations/python-sdk/commit/763f501a41880cfff017f4469863d0d5e2e3789d))
30+
* **internal:** remove trailing character ([#61](https://github.com/openintegrations/python-sdk/issues/61)) ([b5d7c1c](https://github.com/openintegrations/python-sdk/commit/b5d7c1ca8c2180df9c831996e0253415e0b0571b))
31+
* **internal:** slight transform perf improvement ([#65](https://github.com/openintegrations/python-sdk/issues/65)) ([8ec7112](https://github.com/openintegrations/python-sdk/commit/8ec71120f3f140b0998e561bb738b7de6bb0c489))
32+
* **internal:** update pyright settings ([075ff3f](https://github.com/openintegrations/python-sdk/commit/075ff3f61e5dcfc11e68df7db663e5611f1c064a))
33+
334
## 1.3.0 (2025-04-03)
435

536
Full Changelog: [v1.2.0...v1.3.0](https://github.com/openintegrations/python-sdk/compare/v1.2.0...v1.3.0)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ response = client.create_magic_link(
9090
"minus_card_foreground": "--card-foreground",
9191
"minus_foreground": "--foreground",
9292
"minus_primary": "--primary",
93-
"connector_name": "plaid",
93+
"connector_name": "aircall",
9494
"debug": True,
95-
"tab": "my-connections",
95+
"view": "add",
9696
},
9797
)
9898
print(response.client_options)

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ from openint.types import (
1313
GetCurrentUserResponse,
1414
ListConnectionConfigsResponse,
1515
ListConnectionsResponse,
16+
ListConnectorsResponse,
1617
)
1718
```
1819

@@ -27,3 +28,4 @@ Methods:
2728
- <code title="get /viewer">client.<a href="./src/openint/_client.py">get_current_user</a>() -> <a href="./src/openint/types/get_current_user_response.py">GetCurrentUserResponse</a></code>
2829
- <code title="get /connector-config">client.<a href="./src/openint/_client.py">list_connection_configs</a>(\*\*<a href="src/openint/types/client_list_connection_configs_params.py">params</a>) -> <a href="./src/openint/types/list_connection_configs_response.py">SyncOffsetPagination[ListConnectionConfigsResponse]</a></code>
2930
- <code title="get /connection">client.<a href="./src/openint/_client.py">list_connections</a>(\*\*<a href="src/openint/types/client_list_connections_params.py">params</a>) -> <a href="./src/openint/types/list_connections_response.py">SyncOffsetPagination[ListConnectionsResponse]</a></code>
31+
- <code title="get /connector">client.<a href="./src/openint/_client.py">list_connectors</a>(\*\*<a href="src/openint/types/client_list_connectors_params.py">params</a>) -> <a href="./src/openint/types/list_connectors_response.py">ListConnectorsResponse</a></code>

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openint"
3-
version = "1.3.0"
3+
version = "1.4.0"
44
description = "The official Python library for the Openint API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -42,7 +42,7 @@ Repository = "https://github.com/openintegrations/python-sdk"
4242
managed = true
4343
# version pins are in requirements-dev.lock
4444
dev-dependencies = [
45-
"pyright>=1.1.359",
45+
"pyright==1.1.399",
4646
"mypy",
4747
"respx",
4848
"pytest",
@@ -147,6 +147,7 @@ exclude = [
147147
]
148148

149149
reportImplicitOverride = true
150+
reportOverlappingOverload = false
150151

151152
reportImportCycles = false
152153
reportPrivateUsage = false

requirements-dev.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pydantic-core==2.27.1
6969
# via pydantic
7070
pygments==2.18.0
7171
# via rich
72-
pyright==1.1.392.post0
72+
pyright==1.1.399
7373
pytest==8.3.3
7474
# via pytest-asyncio
7575
pytest-asyncio==0.24.0

src/openint/_base_client.py

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@
9898
_AsyncStreamT = TypeVar("_AsyncStreamT", bound=AsyncStream[Any])
9999

100100
if TYPE_CHECKING:
101-
from httpx._config import DEFAULT_TIMEOUT_CONFIG as HTTPX_DEFAULT_TIMEOUT
101+
from httpx._config import (
102+
DEFAULT_TIMEOUT_CONFIG, # pyright: ignore[reportPrivateImportUsage]
103+
)
104+
105+
HTTPX_DEFAULT_TIMEOUT = DEFAULT_TIMEOUT_CONFIG
102106
else:
103107
try:
104108
from httpx._config import DEFAULT_TIMEOUT_CONFIG as HTTPX_DEFAULT_TIMEOUT
@@ -115,6 +119,7 @@ class PageInfo:
115119

116120
url: URL | NotGiven
117121
params: Query | NotGiven
122+
json: Body | NotGiven
118123

119124
@overload
120125
def __init__(
@@ -130,19 +135,30 @@ def __init__(
130135
params: Query,
131136
) -> None: ...
132137

138+
@overload
139+
def __init__(
140+
self,
141+
*,
142+
json: Body,
143+
) -> None: ...
144+
133145
def __init__(
134146
self,
135147
*,
136148
url: URL | NotGiven = NOT_GIVEN,
149+
json: Body | NotGiven = NOT_GIVEN,
137150
params: Query | NotGiven = NOT_GIVEN,
138151
) -> None:
139152
self.url = url
153+
self.json = json
140154
self.params = params
141155

142156
@override
143157
def __repr__(self) -> str:
144158
if self.url:
145159
return f"{self.__class__.__name__}(url={self.url})"
160+
if self.json:
161+
return f"{self.__class__.__name__}(json={self.json})"
146162
return f"{self.__class__.__name__}(params={self.params})"
147163

148164

@@ -191,6 +207,19 @@ def _info_to_options(self, info: PageInfo) -> FinalRequestOptions:
191207
options.url = str(url)
192208
return options
193209

210+
if not isinstance(info.json, NotGiven):
211+
if not is_mapping(info.json):
212+
raise TypeError("Pagination is only supported with mappings")
213+
214+
if not options.json_data:
215+
options.json_data = {**info.json}
216+
else:
217+
if not is_mapping(options.json_data):
218+
raise TypeError("Pagination is only supported with mappings")
219+
220+
options.json_data = {**options.json_data, **info.json}
221+
return options
222+
194223
raise ValueError("Unexpected PageInfo state")
195224

196225

@@ -409,7 +438,8 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0
409438

410439
idempotency_header = self._idempotency_header
411440
if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers:
412-
headers[idempotency_header] = options.idempotency_key or self._idempotency_key()
441+
options.idempotency_key = options.idempotency_key or self._idempotency_key()
442+
headers[idempotency_header] = options.idempotency_key
413443

414444
# Don't set these headers if they were already set or removed by the caller. We check
415445
# `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case.
@@ -943,6 +973,10 @@ def _request(
943973
request = self._build_request(options, retries_taken=retries_taken)
944974
self._prepare_request(request)
945975

976+
if options.idempotency_key:
977+
# ensure the idempotency key is reused between requests
978+
input_options.idempotency_key = options.idempotency_key
979+
946980
kwargs: HttpxSendArgs = {}
947981
if self.custom_auth is not None:
948982
kwargs["auth"] = self.custom_auth
@@ -1475,6 +1509,10 @@ async def _request(
14751509
request = self._build_request(options, retries_taken=retries_taken)
14761510
await self._prepare_request(request)
14771511

1512+
if options.idempotency_key:
1513+
# ensure the idempotency key is reused between requests
1514+
input_options.idempotency_key = options.idempotency_key
1515+
14781516
kwargs: HttpxSendArgs = {}
14791517
if self.custom_auth is not None:
14801518
kwargs["auth"] = self.custom_auth

0 commit comments

Comments
 (0)