Skip to content

Commit 0a01f62

Browse files
feat(api): api update
1 parent 91585de commit 0a01f62

24 files changed

+281
-93
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-cdabb80ed9d7dae231be9b5ec36bd1056bebea71d69780c8457789834763d678.yml
3-
openapi_spec_hash: 5bc8a0413b16125cb0fd1ef5027614aa
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-4033be3204bb6bc9a92a54ba796dbc2c0601f72532f93c3f1ee0180e23723709.yml
3+
openapi_spec_hash: 091da422bf6888c497c61ad0a910f276
44
config_hash: a478b24249ee4f53abfb5787ca4daf8b

src/supermemory/resources/documents.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def update(
5656
container_tags: SequenceNotStr[str] | Omit = omit,
5757
content: str | Omit = omit,
5858
custom_id: str | Omit = omit,
59+
file_type: str | Omit = omit,
5960
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
61+
mime_type: str | Omit = omit,
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,
@@ -88,12 +90,20 @@ def update(
8890
custom_id: Optional custom ID of the document. This could be an ID from your database that
8991
will uniquely identify this document.
9092
93+
file_type:
94+
Optional file type override to force specific processing behavior. Valid values:
95+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
96+
notion_doc, webpage, onedrive
97+
9198
metadata: Optional metadata for the document. This is used to store additional information
9299
about the document. You can use this to store any additional information you
93100
need about the document. Metadata can be filtered through. Keys must be strings
94101
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
95102
nest objects.
96103
104+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
105+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
106+
97107
extra_headers: Send extra headers
98108
99109
extra_query: Add additional query parameters to the request
@@ -112,7 +122,9 @@ def update(
112122
"container_tags": container_tags,
113123
"content": content,
114124
"custom_id": custom_id,
125+
"file_type": file_type,
115126
"metadata": metadata,
127+
"mime_type": mime_type,
116128
},
117129
document_update_params.DocumentUpdateParams,
118130
),
@@ -229,7 +241,9 @@ def add(
229241
container_tag: str | Omit = omit,
230242
container_tags: SequenceNotStr[str] | Omit = omit,
231243
custom_id: str | Omit = omit,
244+
file_type: str | Omit = omit,
232245
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
246+
mime_type: str | Omit = omit,
233247
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
234248
# The extra values given here take precedence over values defined on the client or passed to this method.
235249
extra_headers: Headers | None = None,
@@ -261,12 +275,20 @@ def add(
261275
custom_id: Optional custom ID of the document. This could be an ID from your database that
262276
will uniquely identify this document.
263277
278+
file_type:
279+
Optional file type override to force specific processing behavior. Valid values:
280+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
281+
notion_doc, webpage, onedrive
282+
264283
metadata: Optional metadata for the document. This is used to store additional information
265284
about the document. You can use this to store any additional information you
266285
need about the document. Metadata can be filtered through. Keys must be strings
267286
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
268287
nest objects.
269288
289+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
290+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
291+
270292
extra_headers: Send extra headers
271293
272294
extra_query: Add additional query parameters to the request
@@ -283,7 +305,9 @@ def add(
283305
"container_tag": container_tag,
284306
"container_tags": container_tags,
285307
"custom_id": custom_id,
308+
"file_type": file_type,
286309
"metadata": metadata,
310+
"mime_type": mime_type,
287311
},
288312
document_add_params.DocumentAddParams,
289313
),
@@ -424,7 +448,9 @@ async def update(
424448
container_tags: SequenceNotStr[str] | Omit = omit,
425449
content: str | Omit = omit,
426450
custom_id: str | Omit = omit,
451+
file_type: str | Omit = omit,
427452
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
453+
mime_type: str | Omit = omit,
428454
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
429455
# The extra values given here take precedence over values defined on the client or passed to this method.
430456
extra_headers: Headers | None = None,
@@ -456,12 +482,20 @@ async def update(
456482
custom_id: Optional custom ID of the document. This could be an ID from your database that
457483
will uniquely identify this document.
458484
485+
file_type:
486+
Optional file type override to force specific processing behavior. Valid values:
487+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
488+
notion_doc, webpage, onedrive
489+
459490
metadata: Optional metadata for the document. This is used to store additional information
460491
about the document. You can use this to store any additional information you
461492
need about the document. Metadata can be filtered through. Keys must be strings
462493
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
463494
nest objects.
464495
496+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
497+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
498+
465499
extra_headers: Send extra headers
466500
467501
extra_query: Add additional query parameters to the request
@@ -480,7 +514,9 @@ async def update(
480514
"container_tags": container_tags,
481515
"content": content,
482516
"custom_id": custom_id,
517+
"file_type": file_type,
483518
"metadata": metadata,
519+
"mime_type": mime_type,
484520
},
485521
document_update_params.DocumentUpdateParams,
486522
),
@@ -597,7 +633,9 @@ async def add(
597633
container_tag: str | Omit = omit,
598634
container_tags: SequenceNotStr[str] | Omit = omit,
599635
custom_id: str | Omit = omit,
636+
file_type: str | Omit = omit,
600637
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
638+
mime_type: str | Omit = omit,
601639
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
602640
# The extra values given here take precedence over values defined on the client or passed to this method.
603641
extra_headers: Headers | None = None,
@@ -629,12 +667,20 @@ async def add(
629667
custom_id: Optional custom ID of the document. This could be an ID from your database that
630668
will uniquely identify this document.
631669
670+
file_type:
671+
Optional file type override to force specific processing behavior. Valid values:
672+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
673+
notion_doc, webpage, onedrive
674+
632675
metadata: Optional metadata for the document. This is used to store additional information
633676
about the document. You can use this to store any additional information you
634677
need about the document. Metadata can be filtered through. Keys must be strings
635678
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
636679
nest objects.
637680
681+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
682+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
683+
638684
extra_headers: Send extra headers
639685
640686
extra_query: Add additional query parameters to the request
@@ -651,7 +697,9 @@ async def add(
651697
"container_tag": container_tag,
652698
"container_tags": container_tags,
653699
"custom_id": custom_id,
700+
"file_type": file_type,
654701
"metadata": metadata,
702+
"mime_type": mime_type,
655703
},
656704
document_add_params.DocumentAddParams,
657705
),

src/supermemory/resources/memories.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def update(
5656
container_tags: SequenceNotStr[str] | Omit = omit,
5757
content: str | Omit = omit,
5858
custom_id: str | Omit = omit,
59+
file_type: str | Omit = omit,
5960
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
61+
mime_type: str | Omit = omit,
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,
@@ -88,12 +90,20 @@ def update(
8890
custom_id: Optional custom ID of the document. This could be an ID from your database that
8991
will uniquely identify this document.
9092
93+
file_type:
94+
Optional file type override to force specific processing behavior. Valid values:
95+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
96+
notion_doc, webpage, onedrive
97+
9198
metadata: Optional metadata for the document. This is used to store additional information
9299
about the document. You can use this to store any additional information you
93100
need about the document. Metadata can be filtered through. Keys must be strings
94101
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
95102
nest objects.
96103
104+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
105+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
106+
97107
extra_headers: Send extra headers
98108
99109
extra_query: Add additional query parameters to the request
@@ -112,7 +122,9 @@ def update(
112122
"container_tags": container_tags,
113123
"content": content,
114124
"custom_id": custom_id,
125+
"file_type": file_type,
115126
"metadata": metadata,
127+
"mime_type": mime_type,
116128
},
117129
memory_update_params.MemoryUpdateParams,
118130
),
@@ -229,7 +241,9 @@ def add(
229241
container_tag: str | Omit = omit,
230242
container_tags: SequenceNotStr[str] | Omit = omit,
231243
custom_id: str | Omit = omit,
244+
file_type: str | Omit = omit,
232245
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
246+
mime_type: str | Omit = omit,
233247
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
234248
# The extra values given here take precedence over values defined on the client or passed to this method.
235249
extra_headers: Headers | None = None,
@@ -261,12 +275,20 @@ def add(
261275
custom_id: Optional custom ID of the document. This could be an ID from your database that
262276
will uniquely identify this document.
263277
278+
file_type:
279+
Optional file type override to force specific processing behavior. Valid values:
280+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
281+
notion_doc, webpage, onedrive
282+
264283
metadata: Optional metadata for the document. This is used to store additional information
265284
about the document. You can use this to store any additional information you
266285
need about the document. Metadata can be filtered through. Keys must be strings
267286
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
268287
nest objects.
269288
289+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
290+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
291+
270292
extra_headers: Send extra headers
271293
272294
extra_query: Add additional query parameters to the request
@@ -283,7 +305,9 @@ def add(
283305
"container_tag": container_tag,
284306
"container_tags": container_tags,
285307
"custom_id": custom_id,
308+
"file_type": file_type,
286309
"metadata": metadata,
310+
"mime_type": mime_type,
287311
},
288312
memory_add_params.MemoryAddParams,
289313
),
@@ -424,7 +448,9 @@ async def update(
424448
container_tags: SequenceNotStr[str] | Omit = omit,
425449
content: str | Omit = omit,
426450
custom_id: str | Omit = omit,
451+
file_type: str | Omit = omit,
427452
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
453+
mime_type: str | Omit = omit,
428454
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
429455
# The extra values given here take precedence over values defined on the client or passed to this method.
430456
extra_headers: Headers | None = None,
@@ -456,12 +482,20 @@ async def update(
456482
custom_id: Optional custom ID of the document. This could be an ID from your database that
457483
will uniquely identify this document.
458484
485+
file_type:
486+
Optional file type override to force specific processing behavior. Valid values:
487+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
488+
notion_doc, webpage, onedrive
489+
459490
metadata: Optional metadata for the document. This is used to store additional information
460491
about the document. You can use this to store any additional information you
461492
need about the document. Metadata can be filtered through. Keys must be strings
462493
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
463494
nest objects.
464495
496+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
497+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
498+
465499
extra_headers: Send extra headers
466500
467501
extra_query: Add additional query parameters to the request
@@ -480,7 +514,9 @@ async def update(
480514
"container_tags": container_tags,
481515
"content": content,
482516
"custom_id": custom_id,
517+
"file_type": file_type,
483518
"metadata": metadata,
519+
"mime_type": mime_type,
484520
},
485521
memory_update_params.MemoryUpdateParams,
486522
),
@@ -597,7 +633,9 @@ async def add(
597633
container_tag: str | Omit = omit,
598634
container_tags: SequenceNotStr[str] | Omit = omit,
599635
custom_id: str | Omit = omit,
636+
file_type: str | Omit = omit,
600637
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
638+
mime_type: str | Omit = omit,
601639
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
602640
# The extra values given here take precedence over values defined on the client or passed to this method.
603641
extra_headers: Headers | None = None,
@@ -629,12 +667,20 @@ async def add(
629667
custom_id: Optional custom ID of the document. This could be an ID from your database that
630668
will uniquely identify this document.
631669
670+
file_type:
671+
Optional file type override to force specific processing behavior. Valid values:
672+
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
673+
notion_doc, webpage, onedrive
674+
632675
metadata: Optional metadata for the document. This is used to store additional information
633676
about the document. You can use this to store any additional information you
634677
need about the document. Metadata can be filtered through. Keys must be strings
635678
and are case sensitive. Values can be strings, numbers, or booleans. You cannot
636679
nest objects.
637680
681+
mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
682+
use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
683+
638684
extra_headers: Send extra headers
639685
640686
extra_query: Add additional query parameters to the request
@@ -651,7 +697,9 @@ async def add(
651697
"container_tag": container_tag,
652698
"container_tags": container_tags,
653699
"custom_id": custom_id,
700+
"file_type": file_type,
654701
"metadata": metadata,
702+
"mime_type": mime_type,
655703
},
656704
memory_add_params.MemoryAddParams,
657705
),

src/supermemory/types/connection_get_by_id_response.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
from typing import Dict, Optional
4+
from datetime import datetime
45

56
from pydantic import Field as FieldInfo
67

@@ -12,14 +13,14 @@
1213
class ConnectionGetByIDResponse(BaseModel):
1314
id: str
1415

15-
created_at: str = FieldInfo(alias="createdAt")
16+
created_at: datetime = FieldInfo(alias="createdAt")
1617

1718
provider: str
1819

1920
document_limit: Optional[float] = FieldInfo(alias="documentLimit", default=None)
2021

2122
email: Optional[str] = None
2223

23-
expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
24+
expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None)
2425

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

src/supermemory/types/connection_get_by_tags_response.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
from typing import Dict, Optional
4+
from datetime import datetime
45

56
from pydantic import Field as FieldInfo
67

@@ -12,14 +13,14 @@
1213
class ConnectionGetByTagsResponse(BaseModel):
1314
id: str
1415

15-
created_at: str = FieldInfo(alias="createdAt")
16+
created_at: datetime = FieldInfo(alias="createdAt")
1617

1718
provider: str
1819

1920
document_limit: Optional[float] = FieldInfo(alias="documentLimit", default=None)
2021

2122
email: Optional[str] = None
2223

23-
expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
24+
expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None)
2425

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

0 commit comments

Comments
 (0)