Skip to content

Commit 0eaf416

Browse files
feat(api): api update
1 parent 5e2fc3b commit 0eaf416

7 files changed

Lines changed: 35 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 26
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-008c99427a2471a387bd071f936b0a1e352b81cea24a7d329719c28c652738df.yml
3-
openapi_spec_hash: b47b3fdce4626adc8193b4c340e340ed
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-cb825424a78065806e278b10053f1fa86b058c5921cd1897493bbe162a5a46bf.yml
3+
openapi_spec_hash: fcaa9f922c209e43a9be57695f3ce6ad
44
config_hash: f3eb5ca71172780678106f6d46f15dda

src/supermemory/_client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,14 @@ def search(self) -> SearchResource:
145145

146146
@cached_property
147147
def settings(self) -> SettingsResource:
148+
"""Organization settings"""
148149
from .resources.settings import SettingsResource
149150

150151
return SettingsResource(self)
151152

152153
@cached_property
153154
def connections(self) -> ConnectionsResource:
155+
"""External service integrations"""
154156
from .resources.connections import ConnectionsResource
155157

156158
return ConnectionsResource(self)
@@ -458,12 +460,14 @@ def search(self) -> AsyncSearchResource:
458460

459461
@cached_property
460462
def settings(self) -> AsyncSettingsResource:
463+
"""Organization settings"""
461464
from .resources.settings import AsyncSettingsResource
462465

463466
return AsyncSettingsResource(self)
464467

465468
@cached_property
466469
def connections(self) -> AsyncConnectionsResource:
470+
"""External service integrations"""
467471
from .resources.connections import AsyncConnectionsResource
468472

469473
return AsyncConnectionsResource(self)
@@ -729,12 +733,14 @@ def search(self) -> search.SearchResourceWithRawResponse:
729733

730734
@cached_property
731735
def settings(self) -> settings.SettingsResourceWithRawResponse:
736+
"""Organization settings"""
732737
from .resources.settings import SettingsResourceWithRawResponse
733738

734739
return SettingsResourceWithRawResponse(self._client.settings)
735740

736741
@cached_property
737742
def connections(self) -> connections.ConnectionsResourceWithRawResponse:
743+
"""External service integrations"""
738744
from .resources.connections import ConnectionsResourceWithRawResponse
739745

740746
return ConnectionsResourceWithRawResponse(self._client.connections)
@@ -773,12 +779,14 @@ def search(self) -> search.AsyncSearchResourceWithRawResponse:
773779

774780
@cached_property
775781
def settings(self) -> settings.AsyncSettingsResourceWithRawResponse:
782+
"""Organization settings"""
776783
from .resources.settings import AsyncSettingsResourceWithRawResponse
777784

778785
return AsyncSettingsResourceWithRawResponse(self._client.settings)
779786

780787
@cached_property
781788
def connections(self) -> connections.AsyncConnectionsResourceWithRawResponse:
789+
"""External service integrations"""
782790
from .resources.connections import AsyncConnectionsResourceWithRawResponse
783791

784792
return AsyncConnectionsResourceWithRawResponse(self._client.connections)
@@ -817,12 +825,14 @@ def search(self) -> search.SearchResourceWithStreamingResponse:
817825

818826
@cached_property
819827
def settings(self) -> settings.SettingsResourceWithStreamingResponse:
828+
"""Organization settings"""
820829
from .resources.settings import SettingsResourceWithStreamingResponse
821830

822831
return SettingsResourceWithStreamingResponse(self._client.settings)
823832

824833
@cached_property
825834
def connections(self) -> connections.ConnectionsResourceWithStreamingResponse:
835+
"""External service integrations"""
826836
from .resources.connections import ConnectionsResourceWithStreamingResponse
827837

828838
return ConnectionsResourceWithStreamingResponse(self._client.connections)
@@ -861,12 +871,14 @@ def search(self) -> search.AsyncSearchResourceWithStreamingResponse:
861871

862872
@cached_property
863873
def settings(self) -> settings.AsyncSettingsResourceWithStreamingResponse:
874+
"""Organization settings"""
864875
from .resources.settings import AsyncSettingsResourceWithStreamingResponse
865876

866877
return AsyncSettingsResourceWithStreamingResponse(self._client.settings)
867878

868879
@cached_property
869880
def connections(self) -> connections.AsyncConnectionsResourceWithStreamingResponse:
881+
"""External service integrations"""
870882
from .resources.connections import AsyncConnectionsResourceWithStreamingResponse
871883

872884
return AsyncConnectionsResourceWithStreamingResponse(self._client.connections)

src/supermemory/resources/connections.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343

4444

4545
class ConnectionsResource(SyncAPIResource):
46+
"""External service integrations"""
47+
4648
@cached_property
4749
def with_raw_response(self) -> ConnectionsResourceWithRawResponse:
4850
"""
@@ -457,6 +459,8 @@ def resources(
457459

458460

459461
class AsyncConnectionsResource(AsyncAPIResource):
462+
"""External service integrations"""
463+
460464
@cached_property
461465
def with_raw_response(self) -> AsyncConnectionsResourceWithRawResponse:
462466
"""

src/supermemory/resources/documents.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ def upload_file(
453453
self,
454454
*,
455455
file: FileTypes,
456+
container_tag: str | Omit = omit,
456457
container_tags: str | Omit = omit,
457458
file_type: str | Omit = omit,
458459
metadata: str | Omit = omit,
@@ -471,6 +472,8 @@ def upload_file(
471472
Args:
472473
file: File to upload and process
473474
475+
container_tag: Optional container tag (e.g., 'user_123'). Use this for a single tag.
476+
474477
container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
475478
'["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
476479
strings will be automatically converted to an array.
@@ -502,6 +505,7 @@ def upload_file(
502505
body = deepcopy_minimal(
503506
{
504507
"file": file,
508+
"container_tag": container_tag,
505509
"container_tags": container_tags,
506510
"file_type": file_type,
507511
"metadata": metadata,
@@ -940,6 +944,7 @@ async def upload_file(
940944
self,
941945
*,
942946
file: FileTypes,
947+
container_tag: str | Omit = omit,
943948
container_tags: str | Omit = omit,
944949
file_type: str | Omit = omit,
945950
metadata: str | Omit = omit,
@@ -958,6 +963,8 @@ async def upload_file(
958963
Args:
959964
file: File to upload and process
960965
966+
container_tag: Optional container tag (e.g., 'user_123'). Use this for a single tag.
967+
961968
container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
962969
'["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
963970
strings will be automatically converted to an array.
@@ -989,6 +996,7 @@ async def upload_file(
989996
body = deepcopy_minimal(
990997
{
991998
"file": file,
999+
"container_tag": container_tag,
9921000
"container_tags": container_tags,
9931001
"file_type": file_type,
9941002
"metadata": metadata,

src/supermemory/resources/settings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626

2727
class SettingsResource(SyncAPIResource):
28+
"""Organization settings"""
29+
2830
@cached_property
2931
def with_raw_response(self) -> SettingsResourceWithRawResponse:
3032
"""
@@ -134,6 +136,8 @@ def get(
134136

135137

136138
class AsyncSettingsResource(AsyncAPIResource):
139+
"""Organization settings"""
140+
137141
@cached_property
138142
def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse:
139143
"""

src/supermemory/types/document_upload_file_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ class DocumentUploadFileParams(TypedDict, total=False):
1414
file: Required[FileTypes]
1515
"""File to upload and process"""
1616

17+
container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
18+
"""Optional container tag (e.g., 'user_123'). Use this for a single tag."""
19+
1720
container_tags: Annotated[str, PropertyInfo(alias="containerTags")]
1821
"""Optional container tags.
1922

tests/api_resources/test_documents.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ def test_method_upload_file(self, client: Supermemory) -> None:
426426
def test_method_upload_file_with_all_params(self, client: Supermemory) -> None:
427427
document = client.documents.upload_file(
428428
file=b"Example data",
429+
container_tag="user",
429430
container_tags='["user_123", "project_123"]',
430431
file_type="image",
431432
metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',
@@ -866,6 +867,7 @@ async def test_method_upload_file(self, async_client: AsyncSupermemory) -> None:
866867
async def test_method_upload_file_with_all_params(self, async_client: AsyncSupermemory) -> None:
867868
document = await async_client.documents.upload_file(
868869
file=b"Example data",
870+
container_tag="user",
869871
container_tags='["user_123", "project_123"]',
870872
file_type="image",
871873
metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',

0 commit comments

Comments
 (0)