Skip to content

Commit 556b996

Browse files
feat(api): api update
1 parent 55f8ab2 commit 556b996

9 files changed

Lines changed: 128 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/supermemory-new-5ad0e09495301abdcb7a5a63738ce5841248518504e122003219230ef35ed439.yml
3-
openapi_spec_hash: 6462e423d826118caba0292cd5956178
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-4bec4aac7a4fd11299c105dd60bc086c0aaf51d5cd0f63075efefa56bc19a67f.yml
3+
openapi_spec_hash: f87b9769f91d448f4eb797c37ef4d061
44
config_hash: cde97ef3188581c5f4924c633ec33ddb

src/supermemory/_client.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ def add(
254254
container_tag: str | Omit = omit,
255255
container_tags: SequenceNotStr[str] | Omit = omit,
256256
custom_id: str | Omit = omit,
257+
document_date: str | Omit = omit,
257258
dreaming: Literal["instant", "dynamic"] | Omit = omit,
258259
entity_context: str | Omit = omit,
259260
filepath: str | Omit = omit,
@@ -280,6 +281,12 @@ def add(
280281
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
281282
hyphens, underscores, and dots only.
282283
284+
document_date: When this document's content is from, as opposed to when it was uploaded.
285+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
286+
relative dates against this instead of the ingestion time, and documents in a
287+
batch are processed oldest-first so newer facts correctly supersede older ones.
288+
Set this whenever you backfill historical content.
289+
283290
dreaming: Processing mode. "dynamic" (default) groups related documents together so
284291
memories form from coherent, logical units rather than one isolated entry at a
285292
time. "instant" processes each document on its own right away, and bills one
@@ -315,6 +322,7 @@ def add(
315322
"container_tag": container_tag,
316323
"container_tags": container_tags,
317324
"custom_id": custom_id,
325+
"document_date": document_date,
318326
"dreaming": dreaming,
319327
"entity_context": entity_context,
320328
"filepath": filepath,
@@ -611,6 +619,7 @@ async def add(
611619
container_tag: str | Omit = omit,
612620
container_tags: SequenceNotStr[str] | Omit = omit,
613621
custom_id: str | Omit = omit,
622+
document_date: str | Omit = omit,
614623
dreaming: Literal["instant", "dynamic"] | Omit = omit,
615624
entity_context: str | Omit = omit,
616625
filepath: str | Omit = omit,
@@ -637,6 +646,12 @@ async def add(
637646
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
638647
hyphens, underscores, and dots only.
639648
649+
document_date: When this document's content is from, as opposed to when it was uploaded.
650+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
651+
relative dates against this instead of the ingestion time, and documents in a
652+
batch are processed oldest-first so newer facts correctly supersede older ones.
653+
Set this whenever you backfill historical content.
654+
640655
dreaming: Processing mode. "dynamic" (default) groups related documents together so
641656
memories form from coherent, logical units rather than one isolated entry at a
642657
time. "instant" processes each document on its own right away, and bills one
@@ -672,6 +687,7 @@ async def add(
672687
"container_tag": container_tag,
673688
"container_tags": container_tags,
674689
"custom_id": custom_id,
690+
"document_date": document_date,
675691
"dreaming": dreaming,
676692
"entity_context": entity_context,
677693
"filepath": filepath,

src/supermemory/resources/documents.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def update(
6767
container_tags: SequenceNotStr[str] | Omit = omit,
6868
content: str | Omit = omit,
6969
custom_id: str | Omit = omit,
70+
document_date: str | Omit = omit,
7071
filepath: str | Omit = omit,
7172
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
7273
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
@@ -102,6 +103,13 @@ def update(
102103
custom_id: Optional custom ID of the document. This could be an ID from your database that
103104
will uniquely identify this document.
104105
106+
document_date: When this document's content is from, as opposed to when it was uploaded.
107+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
108+
relative dates ('yesterday', 'last quarter') against this instead of the
109+
ingestion time, and documents in a batch are processed oldest-first so newer
110+
facts correctly supersede older ones. Set this whenever you backfill historical
111+
content.
112+
105113
filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
106114
by supermemoryfs to map documents to filesystem paths.
107115
@@ -137,6 +145,7 @@ def update(
137145
"container_tags": container_tags,
138146
"content": content,
139147
"custom_id": custom_id,
148+
"document_date": document_date,
140149
"filepath": filepath,
141150
"filter_by_metadata": filter_by_metadata,
142151
"metadata": metadata,
@@ -262,6 +271,7 @@ def add(
262271
container_tag: str | Omit = omit,
263272
container_tags: SequenceNotStr[str] | Omit = omit,
264273
custom_id: str | Omit = omit,
274+
document_date: str | Omit = omit,
265275
dreaming: Literal["instant", "dynamic"] | Omit = omit,
266276
entity_context: str | Omit = omit,
267277
filepath: str | Omit = omit,
@@ -288,6 +298,12 @@ def add(
288298
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
289299
hyphens, underscores, and dots only.
290300
301+
document_date: When this document's content is from, as opposed to when it was uploaded.
302+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
303+
relative dates against this instead of the ingestion time, and documents in a
304+
batch are processed oldest-first so newer facts correctly supersede older ones.
305+
Set this whenever you backfill historical content.
306+
291307
dreaming: Processing mode. "dynamic" (default) groups related documents together so
292308
memories form from coherent, logical units rather than one isolated entry at a
293309
time. "instant" processes each document on its own right away, and bills one
@@ -323,6 +339,7 @@ def add(
323339
"container_tag": container_tag,
324340
"container_tags": container_tags,
325341
"custom_id": custom_id,
342+
"document_date": document_date,
326343
"dreaming": dreaming,
327344
"entity_context": entity_context,
328345
"filepath": filepath,
@@ -345,6 +362,7 @@ def batch_add(
345362
container_tag: str | Omit = omit,
346363
container_tags: SequenceNotStr[str] | Omit = omit,
347364
content: None | Omit = omit,
365+
document_date: str | Omit = omit,
348366
dreaming: Literal["instant", "dynamic"] | Omit = omit,
349367
entity_context: str | Omit = omit,
350368
filepath: str | Omit = omit,
@@ -372,6 +390,13 @@ def batch_add(
372390
containerized by. This can be an ID for your user, a project ID, or any other
373391
identifier you wish to use to group documents.
374392
393+
document_date: When this document's content is from, as opposed to when it was uploaded.
394+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
395+
relative dates ('yesterday', 'last quarter') against this instead of the
396+
ingestion time, and documents in a batch are processed oldest-first so newer
397+
facts correctly supersede older ones. Set this whenever you backfill historical
398+
content.
399+
375400
dreaming: Processing mode. "dynamic" (default) groups related documents together so
376401
memories form from coherent, logical units rather than one isolated entry at a
377402
time. "instant" processes each document on its own right away, and bills one
@@ -413,6 +438,7 @@ def batch_add(
413438
"container_tag": container_tag,
414439
"container_tags": container_tags,
415440
"content": content,
441+
"document_date": document_date,
416442
"dreaming": dreaming,
417443
"entity_context": entity_context,
418444
"filepath": filepath,
@@ -670,6 +696,7 @@ async def update(
670696
container_tags: SequenceNotStr[str] | Omit = omit,
671697
content: str | Omit = omit,
672698
custom_id: str | Omit = omit,
699+
document_date: str | Omit = omit,
673700
filepath: str | Omit = omit,
674701
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
675702
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
@@ -705,6 +732,13 @@ async def update(
705732
custom_id: Optional custom ID of the document. This could be an ID from your database that
706733
will uniquely identify this document.
707734
735+
document_date: When this document's content is from, as opposed to when it was uploaded.
736+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
737+
relative dates ('yesterday', 'last quarter') against this instead of the
738+
ingestion time, and documents in a batch are processed oldest-first so newer
739+
facts correctly supersede older ones. Set this whenever you backfill historical
740+
content.
741+
708742
filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
709743
by supermemoryfs to map documents to filesystem paths.
710744
@@ -740,6 +774,7 @@ async def update(
740774
"container_tags": container_tags,
741775
"content": content,
742776
"custom_id": custom_id,
777+
"document_date": document_date,
743778
"filepath": filepath,
744779
"filter_by_metadata": filter_by_metadata,
745780
"metadata": metadata,
@@ -865,6 +900,7 @@ async def add(
865900
container_tag: str | Omit = omit,
866901
container_tags: SequenceNotStr[str] | Omit = omit,
867902
custom_id: str | Omit = omit,
903+
document_date: str | Omit = omit,
868904
dreaming: Literal["instant", "dynamic"] | Omit = omit,
869905
entity_context: str | Omit = omit,
870906
filepath: str | Omit = omit,
@@ -891,6 +927,12 @@ async def add(
891927
custom_id: Optional custom ID of the document. Max 100 characters, alphanumeric with
892928
hyphens, underscores, and dots only.
893929
930+
document_date: When this document's content is from, as opposed to when it was uploaded.
931+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
932+
relative dates against this instead of the ingestion time, and documents in a
933+
batch are processed oldest-first so newer facts correctly supersede older ones.
934+
Set this whenever you backfill historical content.
935+
894936
dreaming: Processing mode. "dynamic" (default) groups related documents together so
895937
memories form from coherent, logical units rather than one isolated entry at a
896938
time. "instant" processes each document on its own right away, and bills one
@@ -926,6 +968,7 @@ async def add(
926968
"container_tag": container_tag,
927969
"container_tags": container_tags,
928970
"custom_id": custom_id,
971+
"document_date": document_date,
929972
"dreaming": dreaming,
930973
"entity_context": entity_context,
931974
"filepath": filepath,
@@ -948,6 +991,7 @@ async def batch_add(
948991
container_tag: str | Omit = omit,
949992
container_tags: SequenceNotStr[str] | Omit = omit,
950993
content: None | Omit = omit,
994+
document_date: str | Omit = omit,
951995
dreaming: Literal["instant", "dynamic"] | Omit = omit,
952996
entity_context: str | Omit = omit,
953997
filepath: str | Omit = omit,
@@ -975,6 +1019,13 @@ async def batch_add(
9751019
containerized by. This can be an ID for your user, a project ID, or any other
9761020
identifier you wish to use to group documents.
9771021
1022+
document_date: When this document's content is from, as opposed to when it was uploaded.
1023+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
1024+
relative dates ('yesterday', 'last quarter') against this instead of the
1025+
ingestion time, and documents in a batch are processed oldest-first so newer
1026+
facts correctly supersede older ones. Set this whenever you backfill historical
1027+
content.
1028+
9781029
dreaming: Processing mode. "dynamic" (default) groups related documents together so
9791030
memories form from coherent, logical units rather than one isolated entry at a
9801031
time. "instant" processes each document on its own right away, and bills one
@@ -1016,6 +1067,7 @@ async def batch_add(
10161067
"container_tag": container_tag,
10171068
"container_tags": container_tags,
10181069
"content": content,
1070+
"document_date": document_date,
10191071
"dreaming": dreaming,
10201072
"entity_context": entity_context,
10211073
"filepath": filepath,

src/supermemory/types/client_add_params.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ class ClientAddParams(TypedDict, total=False):
3232
Max 100 characters, alphanumeric with hyphens, underscores, and dots only.
3333
"""
3434

35+
document_date: Annotated[str, PropertyInfo(alias="documentDate")]
36+
"""When this document's content is from, as opposed to when it was uploaded.
37+
38+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
39+
relative dates against this instead of the ingestion time, and documents in a
40+
batch are processed oldest-first so newer facts correctly supersede older ones.
41+
Set this whenever you backfill historical content.
42+
"""
43+
3544
dreaming: Literal["instant", "dynamic"]
3645
"""Processing mode.
3746

src/supermemory/types/document_add_params.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ class DocumentAddParams(TypedDict, total=False):
3232
Max 100 characters, alphanumeric with hyphens, underscores, and dots only.
3333
"""
3434

35+
document_date: Annotated[str, PropertyInfo(alias="documentDate")]
36+
"""When this document's content is from, as opposed to when it was uploaded.
37+
38+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
39+
relative dates against this instead of the ingestion time, and documents in a
40+
batch are processed oldest-first so newer facts correctly supersede older ones.
41+
Set this whenever you backfill historical content.
42+
"""
43+
3544
dreaming: Literal["instant", "dynamic"]
3645
"""Processing mode.
3746

src/supermemory/types/document_batch_add_params.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ class DocumentBatchAddParams(TypedDict, total=False):
3030

3131
content: None
3232

33+
document_date: Annotated[str, PropertyInfo(alias="documentDate")]
34+
"""When this document's content is from, as opposed to when it was uploaded.
35+
36+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
37+
relative dates ('yesterday', 'last quarter') against this instead of the
38+
ingestion time, and documents in a batch are processed oldest-first so newer
39+
facts correctly supersede older ones. Set this whenever you backfill historical
40+
content.
41+
"""
42+
3343
dreaming: Literal["instant", "dynamic"]
3444
"""Processing mode.
3545
@@ -111,6 +121,16 @@ class DocumentsUnionMember0(TypedDict, total=False):
111121
document.
112122
"""
113123

124+
document_date: Annotated[str, PropertyInfo(alias="documentDate")]
125+
"""When this document's content is from, as opposed to when it was uploaded.
126+
127+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
128+
relative dates ('yesterday', 'last quarter') against this instead of the
129+
ingestion time, and documents in a batch are processed oldest-first so newer
130+
facts correctly supersede older ones. Set this whenever you backfill historical
131+
content.
132+
"""
133+
114134
dreaming: Literal["instant", "dynamic"]
115135
"""Processing mode.
116136

src/supermemory/types/document_update_params.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ class DocumentUpdateParams(TypedDict, total=False):
4545
document.
4646
"""
4747

48+
document_date: Annotated[str, PropertyInfo(alias="documentDate")]
49+
"""When this document's content is from, as opposed to when it was uploaded.
50+
51+
Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves
52+
relative dates ('yesterday', 'last quarter') against this instead of the
53+
ingestion time, and documents in a batch are processed oldest-first so newer
54+
facts correctly supersede older ones. Set this whenever you backfill historical
55+
content.
56+
"""
57+
4858
filepath: str
4959
"""Optional file path for the document (e.g., '/documents/reports/file.pdf').
5060

tests/api_resources/test_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def test_method_add_with_all_params(self, client: Supermemory) -> None:
3333
container_tag="containerTag",
3434
container_tags=["string"],
3535
custom_id="customId",
36+
document_date="documentDate",
3637
dreaming="instant",
3738
entity_context="entityContext",
3839
filepath="filepath",
@@ -148,6 +149,7 @@ async def test_method_add_with_all_params(self, async_client: AsyncSupermemory)
148149
container_tag="containerTag",
149150
container_tags=["string"],
150151
custom_id="customId",
152+
document_date="documentDate",
151153
dreaming="instant",
152154
entity_context="entityContext",
153155
filepath="filepath",

0 commit comments

Comments
 (0)