Skip to content

Commit 4812077

Browse files
feat(api): api update
1 parent a4f4259 commit 4812077

File tree

6 files changed

+146
-4
lines changed

6 files changed

+146
-4
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: 18
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-d3db80a2ee031274f023285c4ce7fe482d76ef850eac429bdef66c18da593ed8.yml
3-
openapi_spec_hash: 467b45efb291874fa8e76e80f492ec5e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-31f4f80c7bc7bc150414e94e9ba4c423f0bce39b2334825bb36d5a4f61c696cb.yml
3+
openapi_spec_hash: 60b7934ffcbb145ed11b57a1b76a465a
44
config_hash: 9b9291a6c872b063900a46386729ba3c

src/supermemory/resources/memories.py

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def update(
5656
container_tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
5757
content: str | NotGiven = NOT_GIVEN,
5858
custom_id: str | NotGiven = NOT_GIVEN,
59+
file_type: str | NotGiven = NOT_GIVEN,
5960
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | NotGiven = NOT_GIVEN,
61+
mime_type: str | NotGiven = NOT_GIVEN,
6062
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6163
# The extra values given here take precedence over values defined on the client or passed to this method.
6264
extra_headers: Headers | None = None,
@@ -87,12 +89,20 @@ def update(
8789
custom_id: Optional custom ID of the memory. This could be an ID from your database that
8890
will uniquely identify this memory.
8991
92+
file_type:
93+
Optional file type override to force specific processing behavior. Valid values:
94+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
95+
notion_doc, webpage, onedrive
96+
9097
metadata: Optional metadata for the memory. This is used to store additional information
9198
about the memory. You can use this to store any additional information you need
9299
about the memory. Metadata can be filtered through. Keys must be strings and are
93100
case sensitive. Values can be strings, numbers, or booleans. You cannot nest
94101
objects.
95102
103+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
104+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
105+
96106
extra_headers: Send extra headers
97107
98108
extra_query: Add additional query parameters to the request
@@ -111,7 +121,9 @@ def update(
111121
"container_tags": container_tags,
112122
"content": content,
113123
"custom_id": custom_id,
124+
"file_type": file_type,
114125
"metadata": metadata,
126+
"mime_type": mime_type,
115127
},
116128
memory_update_params.MemoryUpdateParams,
117129
),
@@ -227,7 +239,9 @@ def add(
227239
container_tag: str | NotGiven = NOT_GIVEN,
228240
container_tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
229241
custom_id: str | NotGiven = NOT_GIVEN,
242+
file_type: str | NotGiven = NOT_GIVEN,
230243
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | NotGiven = NOT_GIVEN,
244+
mime_type: str | NotGiven = NOT_GIVEN,
231245
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
232246
# The extra values given here take precedence over values defined on the client or passed to this method.
233247
extra_headers: Headers | None = None,
@@ -258,12 +272,20 @@ def add(
258272
custom_id: Optional custom ID of the memory. This could be an ID from your database that
259273
will uniquely identify this memory.
260274
275+
file_type:
276+
Optional file type override to force specific processing behavior. Valid values:
277+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
278+
notion_doc, webpage, onedrive
279+
261280
metadata: Optional metadata for the memory. This is used to store additional information
262281
about the memory. You can use this to store any additional information you need
263282
about the memory. Metadata can be filtered through. Keys must be strings and are
264283
case sensitive. Values can be strings, numbers, or booleans. You cannot nest
265284
objects.
266285
286+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
287+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
288+
267289
extra_headers: Send extra headers
268290
269291
extra_query: Add additional query parameters to the request
@@ -280,7 +302,9 @@ def add(
280302
"container_tag": container_tag,
281303
"container_tags": container_tags,
282304
"custom_id": custom_id,
305+
"file_type": file_type,
283306
"metadata": metadata,
307+
"mime_type": mime_type,
284308
},
285309
memory_add_params.MemoryAddParams,
286310
),
@@ -328,6 +352,8 @@ def upload_file(
328352
*,
329353
file: FileTypes,
330354
container_tags: str | NotGiven = NOT_GIVEN,
355+
file_type: str | NotGiven = NOT_GIVEN,
356+
mime_type: str | NotGiven = NOT_GIVEN,
331357
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
332358
# The extra values given here take precedence over values defined on the client or passed to this method.
333359
extra_headers: Headers | None = None,
@@ -339,6 +365,19 @@ def upload_file(
339365
Upload a file to be processed
340366
341367
Args:
368+
file: File to upload and process
369+
370+
container_tags: Optional JSON string of container tags array. This can be an ID for your user, a
371+
project ID, or any other identifier you wish to use to group memories.
372+
373+
file_type:
374+
Optional file type override to force specific processing behavior. Valid values:
375+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
376+
notion_doc, webpage, onedrive
377+
378+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
379+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
380+
342381
extra_headers: Send extra headers
343382
344383
extra_query: Add additional query parameters to the request
@@ -351,6 +390,8 @@ def upload_file(
351390
{
352391
"file": file,
353392
"container_tags": container_tags,
393+
"file_type": file_type,
394+
"mime_type": mime_type,
354395
}
355396
)
356397
files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
@@ -397,7 +438,9 @@ async def update(
397438
container_tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
398439
content: str | NotGiven = NOT_GIVEN,
399440
custom_id: str | NotGiven = NOT_GIVEN,
441+
file_type: str | NotGiven = NOT_GIVEN,
400442
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | NotGiven = NOT_GIVEN,
443+
mime_type: str | NotGiven = NOT_GIVEN,
401444
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
402445
# The extra values given here take precedence over values defined on the client or passed to this method.
403446
extra_headers: Headers | None = None,
@@ -428,12 +471,20 @@ async def update(
428471
custom_id: Optional custom ID of the memory. This could be an ID from your database that
429472
will uniquely identify this memory.
430473
474+
file_type:
475+
Optional file type override to force specific processing behavior. Valid values:
476+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
477+
notion_doc, webpage, onedrive
478+
431479
metadata: Optional metadata for the memory. This is used to store additional information
432480
about the memory. You can use this to store any additional information you need
433481
about the memory. Metadata can be filtered through. Keys must be strings and are
434482
case sensitive. Values can be strings, numbers, or booleans. You cannot nest
435483
objects.
436484
485+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
486+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
487+
437488
extra_headers: Send extra headers
438489
439490
extra_query: Add additional query parameters to the request
@@ -452,7 +503,9 @@ async def update(
452503
"container_tags": container_tags,
453504
"content": content,
454505
"custom_id": custom_id,
506+
"file_type": file_type,
455507
"metadata": metadata,
508+
"mime_type": mime_type,
456509
},
457510
memory_update_params.MemoryUpdateParams,
458511
),
@@ -568,7 +621,9 @@ async def add(
568621
container_tag: str | NotGiven = NOT_GIVEN,
569622
container_tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
570623
custom_id: str | NotGiven = NOT_GIVEN,
624+
file_type: str | NotGiven = NOT_GIVEN,
571625
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | NotGiven = NOT_GIVEN,
626+
mime_type: str | NotGiven = NOT_GIVEN,
572627
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
573628
# The extra values given here take precedence over values defined on the client or passed to this method.
574629
extra_headers: Headers | None = None,
@@ -599,12 +654,20 @@ async def add(
599654
custom_id: Optional custom ID of the memory. This could be an ID from your database that
600655
will uniquely identify this memory.
601656
657+
file_type:
658+
Optional file type override to force specific processing behavior. Valid values:
659+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
660+
notion_doc, webpage, onedrive
661+
602662
metadata: Optional metadata for the memory. This is used to store additional information
603663
about the memory. You can use this to store any additional information you need
604664
about the memory. Metadata can be filtered through. Keys must be strings and are
605665
case sensitive. Values can be strings, numbers, or booleans. You cannot nest
606666
objects.
607667
668+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
669+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
670+
608671
extra_headers: Send extra headers
609672
610673
extra_query: Add additional query parameters to the request
@@ -621,7 +684,9 @@ async def add(
621684
"container_tag": container_tag,
622685
"container_tags": container_tags,
623686
"custom_id": custom_id,
687+
"file_type": file_type,
624688
"metadata": metadata,
689+
"mime_type": mime_type,
625690
},
626691
memory_add_params.MemoryAddParams,
627692
),
@@ -669,6 +734,8 @@ async def upload_file(
669734
*,
670735
file: FileTypes,
671736
container_tags: str | NotGiven = NOT_GIVEN,
737+
file_type: str | NotGiven = NOT_GIVEN,
738+
mime_type: str | NotGiven = NOT_GIVEN,
672739
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
673740
# The extra values given here take precedence over values defined on the client or passed to this method.
674741
extra_headers: Headers | None = None,
@@ -680,6 +747,19 @@ async def upload_file(
680747
Upload a file to be processed
681748
682749
Args:
750+
file: File to upload and process
751+
752+
container_tags: Optional JSON string of container tags array. This can be an ID for your user, a
753+
project ID, or any other identifier you wish to use to group memories.
754+
755+
file_type:
756+
Optional file type override to force specific processing behavior. Valid values:
757+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
758+
notion_doc, webpage, onedrive
759+
760+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
761+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
762+
683763
extra_headers: Send extra headers
684764
685765
extra_query: Add additional query parameters to the request
@@ -692,6 +772,8 @@ async def upload_file(
692772
{
693773
"file": file,
694774
"container_tags": container_tags,
775+
"file_type": file_type,
776+
"mime_type": mime_type,
695777
}
696778
)
697779
files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])

src/supermemory/types/memory_add_params.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ class MemoryAddParams(TypedDict, total=False):
4444
This could be an ID from your database that will uniquely identify this memory.
4545
"""
4646

47+
file_type: Annotated[str, PropertyInfo(alias="fileType")]
48+
"""Optional file type override to force specific processing behavior.
49+
50+
Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image,
51+
video, notion_doc, webpage, onedrive
52+
"""
53+
4754
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
4855
"""Optional metadata for the memory.
4956
@@ -52,3 +59,10 @@ class MemoryAddParams(TypedDict, total=False):
5259
filtered through. Keys must be strings and are case sensitive. Values can be
5360
strings, numbers, or booleans. You cannot nest objects.
5461
"""
62+
63+
mime_type: Annotated[str, PropertyInfo(alias="mimeType")]
64+
"""Required when fileType is 'image' or 'video'.
65+
66+
Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg',
67+
'video/mp4', 'video/webm')
68+
"""

src/supermemory/types/memory_update_params.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ class MemoryUpdateParams(TypedDict, total=False):
4444
This could be an ID from your database that will uniquely identify this memory.
4545
"""
4646

47+
file_type: Annotated[str, PropertyInfo(alias="fileType")]
48+
"""Optional file type override to force specific processing behavior.
49+
50+
Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image,
51+
video, notion_doc, webpage, onedrive
52+
"""
53+
4754
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
4855
"""Optional metadata for the memory.
4956
@@ -52,3 +59,10 @@ class MemoryUpdateParams(TypedDict, total=False):
5259
filtered through. Keys must be strings and are case sensitive. Values can be
5360
strings, numbers, or booleans. You cannot nest objects.
5461
"""
62+
63+
mime_type: Annotated[str, PropertyInfo(alias="mimeType")]
64+
"""Required when fileType is 'image' or 'video'.
65+
66+
Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg',
67+
'video/mp4', 'video/webm')
68+
"""

src/supermemory/types/memory_upload_file_params.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,25 @@
1212

1313
class MemoryUploadFileParams(TypedDict, total=False):
1414
file: Required[FileTypes]
15+
"""File to upload and process"""
1516

1617
container_tags: Annotated[str, PropertyInfo(alias="containerTags")]
18+
"""Optional JSON string of container tags array.
19+
20+
This can be an ID for your user, a project ID, or any other identifier you wish
21+
to use to group memories.
22+
"""
23+
24+
file_type: Annotated[str, PropertyInfo(alias="fileType")]
25+
"""Optional file type override to force specific processing behavior.
26+
27+
Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image,
28+
video, notion_doc, webpage, onedrive
29+
"""
30+
31+
mime_type: Annotated[str, PropertyInfo(alias="mimeType")]
32+
"""Required when fileType is 'image' or 'video'.
33+
34+
Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg',
35+
'video/mp4', 'video/webm')
36+
"""

0 commit comments

Comments
 (0)