Skip to content

Commit fa9f582

Browse files
feat(api): api update
1 parent d1b2a97 commit fa9f582

File tree

5 files changed

+22
-2
lines changed

5 files changed

+22
-2
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: 11
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-7b4755d42a27a1e18d43be34546005155b34a06583a96ec20698a68a1ce9b466.yml
3-
openapi_spec_hash: 836ddb14f2b942acd38b1b3420ca2a07
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-a21611536939732050acbb8df94fea712aaca3d24a0428d97f97d7fd47d585ef.yml
3+
openapi_spec_hash: db614ee0bb0fa13db67364ddf563f2c7
44
config_hash: 8477e3ee6fd596ab6ac911d052e4de79

src/supermemory/resources/connections.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def create(
5050
provider: Literal["notion", "google-drive", "onedrive"],
5151
*,
5252
container_tags: List[str] | NotGiven = NOT_GIVEN,
53+
document_limit: int | NotGiven = NOT_GIVEN,
5354
metadata: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
5455
redirect_url: str | NotGiven = NOT_GIVEN,
5556
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -63,6 +64,9 @@ def create(
6364
Initialize connection and get authorization URL
6465
6566
Args:
67+
document_limit: Maximum number of documents to sync from this connection (default: 100,
68+
max: 10000)
69+
6670
extra_headers: Send extra headers
6771
6872
extra_query: Add additional query parameters to the request
@@ -78,6 +82,7 @@ def create(
7882
body=maybe_transform(
7983
{
8084
"container_tags": container_tags,
85+
"document_limit": document_limit,
8186
"metadata": metadata,
8287
"redirect_url": redirect_url,
8388
},
@@ -148,6 +153,7 @@ async def create(
148153
provider: Literal["notion", "google-drive", "onedrive"],
149154
*,
150155
container_tags: List[str] | NotGiven = NOT_GIVEN,
156+
document_limit: int | NotGiven = NOT_GIVEN,
151157
metadata: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
152158
redirect_url: str | NotGiven = NOT_GIVEN,
153159
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -161,6 +167,9 @@ async def create(
161167
Initialize connection and get authorization URL
162168
163169
Args:
170+
document_limit: Maximum number of documents to sync from this connection (default: 100,
171+
max: 10000)
172+
164173
extra_headers: Send extra headers
165174
166175
extra_query: Add additional query parameters to the request
@@ -176,6 +185,7 @@ async def create(
176185
body=await async_maybe_transform(
177186
{
178187
"container_tags": container_tags,
188+
"document_limit": document_limit,
179189
"metadata": metadata,
180190
"redirect_url": redirect_url,
181191
},

src/supermemory/types/connection_create_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
class ConnectionCreateParams(TypedDict, total=False):
1414
container_tags: Annotated[List[str], PropertyInfo(alias="containerTags")]
1515

16+
document_limit: Annotated[int, PropertyInfo(alias="documentLimit")]
17+
"""
18+
Maximum number of documents to sync from this connection (default: 100,
19+
max: 10000)
20+
"""
21+
1622
metadata: Optional[Dict[str, Union[str, float, bool]]]
1723

1824
redirect_url: Annotated[str, PropertyInfo(alias="redirectUrl")]

src/supermemory/types/connection_get_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class ConnectionGetResponse(BaseModel):
1616

1717
provider: str
1818

19+
document_limit: Optional[float] = FieldInfo(alias="documentLimit", default=None)
20+
1921
expires_at: Optional[float] = FieldInfo(alias="expiresAt", default=None)
2022

2123
metadata: Optional[Dict[str, object]] = None

tests/api_resources/test_connections.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def test_method_create_with_all_params(self, client: Supermemory) -> None:
3131
connection = client.connections.create(
3232
provider="notion",
3333
container_tags=["string"],
34+
document_limit=100,
3435
metadata={"foo": "string"},
3536
redirect_url="redirectUrl",
3637
)
@@ -122,6 +123,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncSupermemor
122123
connection = await async_client.connections.create(
123124
provider="notion",
124125
container_tags=["string"],
126+
document_limit=100,
125127
metadata={"foo": "string"},
126128
redirect_url="redirectUrl",
127129
)

0 commit comments

Comments
 (0)