supermemory 3.3.0__py3-none-any.whl → 3.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of supermemory might be problematic. Click here for more details.

Files changed (35) hide show
  1. supermemory/_version.py +1 -1
  2. supermemory/resources/documents.py +6 -52
  3. supermemory/resources/memories.py +6 -52
  4. supermemory/types/__init__.py +1 -0
  5. supermemory/types/connection_get_by_id_response.py +2 -3
  6. supermemory/types/connection_get_by_tags_response.py +2 -3
  7. supermemory/types/connection_list_response.py +2 -3
  8. supermemory/types/document_add_params.py +0 -14
  9. supermemory/types/document_get_response.py +5 -6
  10. supermemory/types/document_list_params.py +6 -71
  11. supermemory/types/document_list_response.py +4 -5
  12. supermemory/types/document_update_params.py +0 -14
  13. supermemory/types/document_upload_file_params.py +4 -3
  14. supermemory/types/memory_add_params.py +0 -14
  15. supermemory/types/memory_get_response.py +5 -6
  16. supermemory/types/memory_list_params.py +6 -71
  17. supermemory/types/memory_list_response.py +4 -5
  18. supermemory/types/memory_update_params.py +0 -14
  19. supermemory/types/memory_upload_file_params.py +4 -3
  20. supermemory/types/search_documents_params.py +5 -70
  21. supermemory/types/search_documents_response.py +2 -3
  22. supermemory/types/search_execute_params.py +5 -70
  23. supermemory/types/search_execute_response.py +2 -3
  24. supermemory/types/search_memories_params.py +6 -72
  25. supermemory/types/search_memories_response.py +5 -6
  26. supermemory/types/shared/__init__.py +4 -0
  27. supermemory/types/shared/and_.py +13 -0
  28. supermemory/types/shared/or_.py +13 -0
  29. supermemory/types/shared_params/__init__.py +4 -0
  30. supermemory/types/shared_params/and_.py +14 -0
  31. supermemory/types/shared_params/or_.py +14 -0
  32. {supermemory-3.3.0.dist-info → supermemory-3.4.0.dist-info}/METADATA +1 -1
  33. {supermemory-3.3.0.dist-info → supermemory-3.4.0.dist-info}/RECORD +35 -29
  34. {supermemory-3.3.0.dist-info → supermemory-3.4.0.dist-info}/WHEEL +0 -0
  35. {supermemory-3.3.0.dist-info → supermemory-3.4.0.dist-info}/licenses/LICENSE +0 -0
supermemory/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "supermemory"
4
- __version__ = "3.3.0" # x-release-please-version
4
+ __version__ = "3.4.0" # x-release-please-version
@@ -56,9 +56,7 @@ class DocumentsResource(SyncAPIResource):
56
56
  container_tags: SequenceNotStr[str] | Omit = omit,
57
57
  content: str | Omit = omit,
58
58
  custom_id: str | Omit = omit,
59
- file_type: str | Omit = omit,
60
59
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
61
- mime_type: str | Omit = omit,
62
60
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
63
61
  # The extra values given here take precedence over values defined on the client or passed to this method.
64
62
  extra_headers: Headers | None = None,
@@ -90,20 +88,12 @@ class DocumentsResource(SyncAPIResource):
90
88
  custom_id: Optional custom ID of the document. This could be an ID from your database that
91
89
  will uniquely identify this document.
92
90
 
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
-
98
91
  metadata: Optional metadata for the document. This is used to store additional information
99
92
  about the document. You can use this to store any additional information you
100
93
  need about the document. Metadata can be filtered through. Keys must be strings
101
94
  and are case sensitive. Values can be strings, numbers, or booleans. You cannot
102
95
  nest objects.
103
96
 
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
-
107
97
  extra_headers: Send extra headers
108
98
 
109
99
  extra_query: Add additional query parameters to the request
@@ -122,9 +112,7 @@ class DocumentsResource(SyncAPIResource):
122
112
  "container_tags": container_tags,
123
113
  "content": content,
124
114
  "custom_id": custom_id,
125
- "file_type": file_type,
126
115
  "metadata": metadata,
127
- "mime_type": mime_type,
128
116
  },
129
117
  document_update_params.DocumentUpdateParams,
130
118
  ),
@@ -241,9 +229,7 @@ class DocumentsResource(SyncAPIResource):
241
229
  container_tag: str | Omit = omit,
242
230
  container_tags: SequenceNotStr[str] | Omit = omit,
243
231
  custom_id: str | Omit = omit,
244
- file_type: str | Omit = omit,
245
232
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
246
- mime_type: str | Omit = omit,
247
233
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
248
234
  # The extra values given here take precedence over values defined on the client or passed to this method.
249
235
  extra_headers: Headers | None = None,
@@ -275,20 +261,12 @@ class DocumentsResource(SyncAPIResource):
275
261
  custom_id: Optional custom ID of the document. This could be an ID from your database that
276
262
  will uniquely identify this document.
277
263
 
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
-
283
264
  metadata: Optional metadata for the document. This is used to store additional information
284
265
  about the document. You can use this to store any additional information you
285
266
  need about the document. Metadata can be filtered through. Keys must be strings
286
267
  and are case sensitive. Values can be strings, numbers, or booleans. You cannot
287
268
  nest objects.
288
269
 
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
-
292
270
  extra_headers: Send extra headers
293
271
 
294
272
  extra_query: Add additional query parameters to the request
@@ -305,9 +283,7 @@ class DocumentsResource(SyncAPIResource):
305
283
  "container_tag": container_tag,
306
284
  "container_tags": container_tags,
307
285
  "custom_id": custom_id,
308
- "file_type": file_type,
309
286
  "metadata": metadata,
310
- "mime_type": mime_type,
311
287
  },
312
288
  document_add_params.DocumentAddParams,
313
289
  ),
@@ -371,8 +347,9 @@ class DocumentsResource(SyncAPIResource):
371
347
  Args:
372
348
  file: File to upload and process
373
349
 
374
- container_tags: Optional JSON string of container tags array. This can be an ID for your user, a
375
- project ID, or any other identifier you wish to use to group documents.
350
+ container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
351
+ '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
352
+ strings will be automatically converted to an array.
376
353
 
377
354
  file_type:
378
355
  Optional file type override to force specific processing behavior. Valid values:
@@ -447,9 +424,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
447
424
  container_tags: SequenceNotStr[str] | Omit = omit,
448
425
  content: str | Omit = omit,
449
426
  custom_id: str | Omit = omit,
450
- file_type: str | Omit = omit,
451
427
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
452
- mime_type: str | Omit = omit,
453
428
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
454
429
  # The extra values given here take precedence over values defined on the client or passed to this method.
455
430
  extra_headers: Headers | None = None,
@@ -481,20 +456,12 @@ class AsyncDocumentsResource(AsyncAPIResource):
481
456
  custom_id: Optional custom ID of the document. This could be an ID from your database that
482
457
  will uniquely identify this document.
483
458
 
484
- file_type:
485
- Optional file type override to force specific processing behavior. Valid values:
486
- text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
487
- notion_doc, webpage, onedrive
488
-
489
459
  metadata: Optional metadata for the document. This is used to store additional information
490
460
  about the document. You can use this to store any additional information you
491
461
  need about the document. Metadata can be filtered through. Keys must be strings
492
462
  and are case sensitive. Values can be strings, numbers, or booleans. You cannot
493
463
  nest objects.
494
464
 
495
- mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
496
- use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
497
-
498
465
  extra_headers: Send extra headers
499
466
 
500
467
  extra_query: Add additional query parameters to the request
@@ -513,9 +480,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
513
480
  "container_tags": container_tags,
514
481
  "content": content,
515
482
  "custom_id": custom_id,
516
- "file_type": file_type,
517
483
  "metadata": metadata,
518
- "mime_type": mime_type,
519
484
  },
520
485
  document_update_params.DocumentUpdateParams,
521
486
  ),
@@ -632,9 +597,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
632
597
  container_tag: str | Omit = omit,
633
598
  container_tags: SequenceNotStr[str] | Omit = omit,
634
599
  custom_id: str | Omit = omit,
635
- file_type: str | Omit = omit,
636
600
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
637
- mime_type: str | Omit = omit,
638
601
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
639
602
  # The extra values given here take precedence over values defined on the client or passed to this method.
640
603
  extra_headers: Headers | None = None,
@@ -666,20 +629,12 @@ class AsyncDocumentsResource(AsyncAPIResource):
666
629
  custom_id: Optional custom ID of the document. This could be an ID from your database that
667
630
  will uniquely identify this document.
668
631
 
669
- file_type:
670
- Optional file type override to force specific processing behavior. Valid values:
671
- text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
672
- notion_doc, webpage, onedrive
673
-
674
632
  metadata: Optional metadata for the document. This is used to store additional information
675
633
  about the document. You can use this to store any additional information you
676
634
  need about the document. Metadata can be filtered through. Keys must be strings
677
635
  and are case sensitive. Values can be strings, numbers, or booleans. You cannot
678
636
  nest objects.
679
637
 
680
- mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
681
- use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
682
-
683
638
  extra_headers: Send extra headers
684
639
 
685
640
  extra_query: Add additional query parameters to the request
@@ -696,9 +651,7 @@ class AsyncDocumentsResource(AsyncAPIResource):
696
651
  "container_tag": container_tag,
697
652
  "container_tags": container_tags,
698
653
  "custom_id": custom_id,
699
- "file_type": file_type,
700
654
  "metadata": metadata,
701
- "mime_type": mime_type,
702
655
  },
703
656
  document_add_params.DocumentAddParams,
704
657
  ),
@@ -762,8 +715,9 @@ class AsyncDocumentsResource(AsyncAPIResource):
762
715
  Args:
763
716
  file: File to upload and process
764
717
 
765
- container_tags: Optional JSON string of container tags array. This can be an ID for your user, a
766
- project ID, or any other identifier you wish to use to group documents.
718
+ container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
719
+ '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
720
+ strings will be automatically converted to an array.
767
721
 
768
722
  file_type:
769
723
  Optional file type override to force specific processing behavior. Valid values:
@@ -56,9 +56,7 @@ class MemoriesResource(SyncAPIResource):
56
56
  container_tags: SequenceNotStr[str] | Omit = omit,
57
57
  content: str | Omit = omit,
58
58
  custom_id: str | Omit = omit,
59
- file_type: str | Omit = omit,
60
59
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
61
- mime_type: str | Omit = omit,
62
60
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
63
61
  # The extra values given here take precedence over values defined on the client or passed to this method.
64
62
  extra_headers: Headers | None = None,
@@ -90,20 +88,12 @@ class MemoriesResource(SyncAPIResource):
90
88
  custom_id: Optional custom ID of the document. This could be an ID from your database that
91
89
  will uniquely identify this document.
92
90
 
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
-
98
91
  metadata: Optional metadata for the document. This is used to store additional information
99
92
  about the document. You can use this to store any additional information you
100
93
  need about the document. Metadata can be filtered through. Keys must be strings
101
94
  and are case sensitive. Values can be strings, numbers, or booleans. You cannot
102
95
  nest objects.
103
96
 
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
-
107
97
  extra_headers: Send extra headers
108
98
 
109
99
  extra_query: Add additional query parameters to the request
@@ -122,9 +112,7 @@ class MemoriesResource(SyncAPIResource):
122
112
  "container_tags": container_tags,
123
113
  "content": content,
124
114
  "custom_id": custom_id,
125
- "file_type": file_type,
126
115
  "metadata": metadata,
127
- "mime_type": mime_type,
128
116
  },
129
117
  memory_update_params.MemoryUpdateParams,
130
118
  ),
@@ -241,9 +229,7 @@ class MemoriesResource(SyncAPIResource):
241
229
  container_tag: str | Omit = omit,
242
230
  container_tags: SequenceNotStr[str] | Omit = omit,
243
231
  custom_id: str | Omit = omit,
244
- file_type: str | Omit = omit,
245
232
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
246
- mime_type: str | Omit = omit,
247
233
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
248
234
  # The extra values given here take precedence over values defined on the client or passed to this method.
249
235
  extra_headers: Headers | None = None,
@@ -275,20 +261,12 @@ class MemoriesResource(SyncAPIResource):
275
261
  custom_id: Optional custom ID of the document. This could be an ID from your database that
276
262
  will uniquely identify this document.
277
263
 
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
-
283
264
  metadata: Optional metadata for the document. This is used to store additional information
284
265
  about the document. You can use this to store any additional information you
285
266
  need about the document. Metadata can be filtered through. Keys must be strings
286
267
  and are case sensitive. Values can be strings, numbers, or booleans. You cannot
287
268
  nest objects.
288
269
 
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
-
292
270
  extra_headers: Send extra headers
293
271
 
294
272
  extra_query: Add additional query parameters to the request
@@ -305,9 +283,7 @@ class MemoriesResource(SyncAPIResource):
305
283
  "container_tag": container_tag,
306
284
  "container_tags": container_tags,
307
285
  "custom_id": custom_id,
308
- "file_type": file_type,
309
286
  "metadata": metadata,
310
- "mime_type": mime_type,
311
287
  },
312
288
  memory_add_params.MemoryAddParams,
313
289
  ),
@@ -371,8 +347,9 @@ class MemoriesResource(SyncAPIResource):
371
347
  Args:
372
348
  file: File to upload and process
373
349
 
374
- container_tags: Optional JSON string of container tags array. This can be an ID for your user, a
375
- project ID, or any other identifier you wish to use to group documents.
350
+ container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
351
+ '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
352
+ strings will be automatically converted to an array.
376
353
 
377
354
  file_type:
378
355
  Optional file type override to force specific processing behavior. Valid values:
@@ -447,9 +424,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
447
424
  container_tags: SequenceNotStr[str] | Omit = omit,
448
425
  content: str | Omit = omit,
449
426
  custom_id: str | Omit = omit,
450
- file_type: str | Omit = omit,
451
427
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
452
- mime_type: str | Omit = omit,
453
428
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
454
429
  # The extra values given here take precedence over values defined on the client or passed to this method.
455
430
  extra_headers: Headers | None = None,
@@ -481,20 +456,12 @@ class AsyncMemoriesResource(AsyncAPIResource):
481
456
  custom_id: Optional custom ID of the document. This could be an ID from your database that
482
457
  will uniquely identify this document.
483
458
 
484
- file_type:
485
- Optional file type override to force specific processing behavior. Valid values:
486
- text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
487
- notion_doc, webpage, onedrive
488
-
489
459
  metadata: Optional metadata for the document. This is used to store additional information
490
460
  about the document. You can use this to store any additional information you
491
461
  need about the document. Metadata can be filtered through. Keys must be strings
492
462
  and are case sensitive. Values can be strings, numbers, or booleans. You cannot
493
463
  nest objects.
494
464
 
495
- mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
496
- use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
497
-
498
465
  extra_headers: Send extra headers
499
466
 
500
467
  extra_query: Add additional query parameters to the request
@@ -513,9 +480,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
513
480
  "container_tags": container_tags,
514
481
  "content": content,
515
482
  "custom_id": custom_id,
516
- "file_type": file_type,
517
483
  "metadata": metadata,
518
- "mime_type": mime_type,
519
484
  },
520
485
  memory_update_params.MemoryUpdateParams,
521
486
  ),
@@ -632,9 +597,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
632
597
  container_tag: str | Omit = omit,
633
598
  container_tags: SequenceNotStr[str] | Omit = omit,
634
599
  custom_id: str | Omit = omit,
635
- file_type: str | Omit = omit,
636
600
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
637
- mime_type: str | Omit = omit,
638
601
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
639
602
  # The extra values given here take precedence over values defined on the client or passed to this method.
640
603
  extra_headers: Headers | None = None,
@@ -666,20 +629,12 @@ class AsyncMemoriesResource(AsyncAPIResource):
666
629
  custom_id: Optional custom ID of the document. This could be an ID from your database that
667
630
  will uniquely identify this document.
668
631
 
669
- file_type:
670
- Optional file type override to force specific processing behavior. Valid values:
671
- text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
672
- notion_doc, webpage, onedrive
673
-
674
632
  metadata: Optional metadata for the document. This is used to store additional information
675
633
  about the document. You can use this to store any additional information you
676
634
  need about the document. Metadata can be filtered through. Keys must be strings
677
635
  and are case sensitive. Values can be strings, numbers, or booleans. You cannot
678
636
  nest objects.
679
637
 
680
- mime_type: Required when fileType is 'image' or 'video'. Specifies the exact MIME type to
681
- use (e.g., 'image/png', 'image/jpeg', 'video/mp4', 'video/webm')
682
-
683
638
  extra_headers: Send extra headers
684
639
 
685
640
  extra_query: Add additional query parameters to the request
@@ -696,9 +651,7 @@ class AsyncMemoriesResource(AsyncAPIResource):
696
651
  "container_tag": container_tag,
697
652
  "container_tags": container_tags,
698
653
  "custom_id": custom_id,
699
- "file_type": file_type,
700
654
  "metadata": metadata,
701
- "mime_type": mime_type,
702
655
  },
703
656
  memory_add_params.MemoryAddParams,
704
657
  ),
@@ -762,8 +715,9 @@ class AsyncMemoriesResource(AsyncAPIResource):
762
715
  Args:
763
716
  file: File to upload and process
764
717
 
765
- container_tags: Optional JSON string of container tags array. This can be an ID for your user, a
766
- project ID, or any other identifier you wish to use to group documents.
718
+ container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
719
+ '["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
720
+ strings will be automatically converted to an array.
767
721
 
768
722
  file_type:
769
723
  Optional file type override to force specific processing behavior. Valid values:
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .shared import Or as Or, And as And
5
6
  from .memory_add_params import MemoryAddParams as MemoryAddParams
6
7
  from .memory_list_params import MemoryListParams as MemoryListParams
7
8
  from .document_add_params import DocumentAddParams as DocumentAddParams
@@ -1,7 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from typing import Dict, Optional
4
- from datetime import datetime
5
4
 
6
5
  from pydantic import Field as FieldInfo
7
6
 
@@ -13,7 +12,7 @@ __all__ = ["ConnectionGetByIDResponse"]
13
12
  class ConnectionGetByIDResponse(BaseModel):
14
13
  id: str
15
14
 
16
- created_at: datetime = FieldInfo(alias="createdAt")
15
+ created_at: str = FieldInfo(alias="createdAt")
17
16
 
18
17
  provider: str
19
18
 
@@ -21,6 +20,6 @@ class ConnectionGetByIDResponse(BaseModel):
21
20
 
22
21
  email: Optional[str] = None
23
22
 
24
- expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None)
23
+ expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
25
24
 
26
25
  metadata: Optional[Dict[str, object]] = None
@@ -1,7 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from typing import Dict, Optional
4
- from datetime import datetime
5
4
 
6
5
  from pydantic import Field as FieldInfo
7
6
 
@@ -13,7 +12,7 @@ __all__ = ["ConnectionGetByTagsResponse"]
13
12
  class ConnectionGetByTagsResponse(BaseModel):
14
13
  id: str
15
14
 
16
- created_at: datetime = FieldInfo(alias="createdAt")
15
+ created_at: str = FieldInfo(alias="createdAt")
17
16
 
18
17
  provider: str
19
18
 
@@ -21,6 +20,6 @@ class ConnectionGetByTagsResponse(BaseModel):
21
20
 
22
21
  email: Optional[str] = None
23
22
 
24
- expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None)
23
+ expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
25
24
 
26
25
  metadata: Optional[Dict[str, object]] = None
@@ -1,7 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from typing import Dict, List, Optional
4
- from datetime import datetime
5
4
  from typing_extensions import TypeAlias
6
5
 
7
6
  from pydantic import Field as FieldInfo
@@ -14,7 +13,7 @@ __all__ = ["ConnectionListResponse", "ConnectionListResponseItem"]
14
13
  class ConnectionListResponseItem(BaseModel):
15
14
  id: str
16
15
 
17
- created_at: datetime = FieldInfo(alias="createdAt")
16
+ created_at: str = FieldInfo(alias="createdAt")
18
17
 
19
18
  provider: str
20
19
 
@@ -22,7 +21,7 @@ class ConnectionListResponseItem(BaseModel):
22
21
 
23
22
  email: Optional[str] = None
24
23
 
25
- expires_at: Optional[datetime] = FieldInfo(alias="expiresAt", default=None)
24
+ expires_at: Optional[str] = FieldInfo(alias="expiresAt", default=None)
26
25
 
27
26
  metadata: Optional[Dict[str, object]] = None
28
27
 
@@ -45,13 +45,6 @@ class DocumentAddParams(TypedDict, total=False):
45
45
  document.
46
46
  """
47
47
 
48
- file_type: Annotated[str, PropertyInfo(alias="fileType")]
49
- """Optional file type override to force specific processing behavior.
50
-
51
- Valid values: text, pdf, tweet, google_doc, google_slide, google_sheet, image,
52
- video, notion_doc, webpage, onedrive
53
- """
54
-
55
48
  metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
56
49
  """Optional metadata for the document.
57
50
 
@@ -60,10 +53,3 @@ class DocumentAddParams(TypedDict, total=False):
60
53
  can be filtered through. Keys must be strings and are case sensitive. Values can
61
54
  be strings, numbers, or booleans. You cannot nest objects.
62
55
  """
63
-
64
- mime_type: Annotated[str, PropertyInfo(alias="mimeType")]
65
- """Required when fileType is 'image' or 'video'.
66
-
67
- Specifies the exact MIME type to use (e.g., 'image/png', 'image/jpeg',
68
- 'video/mp4', 'video/webm')
69
- """
@@ -1,7 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from typing import Dict, List, Union, Optional
4
- from datetime import datetime
5
4
  from typing_extensions import Literal
6
5
 
7
6
  from pydantic import Field as FieldInfo
@@ -33,7 +32,7 @@ class DocumentGetResponse(BaseModel):
33
32
  We automatically detect the content type from the url's response format.
34
33
  """
35
34
 
36
- created_at: datetime = FieldInfo(alias="createdAt")
35
+ created_at: str = FieldInfo(alias="createdAt")
37
36
  """Creation timestamp"""
38
37
 
39
38
  custom_id: Optional[str] = FieldInfo(alias="customId", default=None)
@@ -54,6 +53,9 @@ class DocumentGetResponse(BaseModel):
54
53
 
55
54
  og_image: Optional[str] = FieldInfo(alias="ogImage", default=None)
56
55
 
56
+ raw: object
57
+ """Raw content of the document"""
58
+
57
59
  source: Optional[str] = None
58
60
  """Source of the document"""
59
61
 
@@ -87,7 +89,7 @@ class DocumentGetResponse(BaseModel):
87
89
  ]
88
90
  """Type of the document"""
89
91
 
90
- updated_at: datetime = FieldInfo(alias="updatedAt")
92
+ updated_at: str = FieldInfo(alias="updatedAt")
91
93
  """Last update timestamp"""
92
94
 
93
95
  container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None)
@@ -97,8 +99,5 @@ class DocumentGetResponse(BaseModel):
97
99
  to use to group documents.
98
100
  """
99
101
 
100
- raw: None = None
101
- """Raw content of the document"""
102
-
103
102
  url: Optional[str] = None
104
103
  """URL of the document"""
@@ -2,26 +2,15 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Union, Iterable
6
- from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
5
+ from typing import Union
6
+ from typing_extensions import Literal, Annotated, TypeAlias, TypedDict
7
7
 
8
8
  from .._types import SequenceNotStr
9
9
  from .._utils import PropertyInfo
10
+ from .shared_params.or_ import Or
11
+ from .shared_params.and_ import And
10
12
 
11
- __all__ = [
12
- "DocumentListParams",
13
- "Filters",
14
- "FiltersOr",
15
- "FiltersOrOr",
16
- "FiltersOrOrUnionMember0",
17
- "FiltersOrOrOr",
18
- "FiltersOrOrAnd",
19
- "FiltersAnd",
20
- "FiltersAndAnd",
21
- "FiltersAndAndUnionMember0",
22
- "FiltersAndAndOr",
23
- "FiltersAndAndAnd",
24
- ]
13
+ __all__ = ["DocumentListParams", "Filters"]
25
14
 
26
15
 
27
16
  class DocumentListParams(TypedDict, total=False):
@@ -54,58 +43,4 @@ class DocumentListParams(TypedDict, total=False):
54
43
  """Field to sort by"""
55
44
 
56
45
 
57
- class FiltersOrOrUnionMember0(TypedDict, total=False):
58
- key: Required[str]
59
-
60
- value: Required[str]
61
-
62
- filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")]
63
-
64
- negate: Union[bool, Literal["true", "false"]]
65
-
66
- numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")]
67
-
68
-
69
- class FiltersOrOrOr(TypedDict, total=False):
70
- or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]]
71
-
72
-
73
- class FiltersOrOrAnd(TypedDict, total=False):
74
- and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]]
75
-
76
-
77
- FiltersOrOr: TypeAlias = Union[FiltersOrOrUnionMember0, FiltersOrOrOr, FiltersOrOrAnd]
78
-
79
-
80
- class FiltersOr(TypedDict, total=False):
81
- or_: Required[Annotated[Iterable[FiltersOrOr], PropertyInfo(alias="OR")]]
82
-
83
-
84
- class FiltersAndAndUnionMember0(TypedDict, total=False):
85
- key: Required[str]
86
-
87
- value: Required[str]
88
-
89
- filter_type: Annotated[Literal["metadata", "numeric", "array_contains"], PropertyInfo(alias="filterType")]
90
-
91
- negate: Union[bool, Literal["true", "false"]]
92
-
93
- numeric_operator: Annotated[Literal[">", "<", ">=", "<=", "="], PropertyInfo(alias="numericOperator")]
94
-
95
-
96
- class FiltersAndAndOr(TypedDict, total=False):
97
- or_: Required[Annotated[Iterable[object], PropertyInfo(alias="OR")]]
98
-
99
-
100
- class FiltersAndAndAnd(TypedDict, total=False):
101
- and_: Required[Annotated[Iterable[object], PropertyInfo(alias="AND")]]
102
-
103
-
104
- FiltersAndAnd: TypeAlias = Union[FiltersAndAndUnionMember0, FiltersAndAndOr, FiltersAndAndAnd]
105
-
106
-
107
- class FiltersAnd(TypedDict, total=False):
108
- and_: Required[Annotated[Iterable[FiltersAndAnd], PropertyInfo(alias="AND")]]
109
-
110
-
111
- Filters: TypeAlias = Union[FiltersOr, FiltersAnd]
46
+ Filters: TypeAlias = Union[Or, And]
@@ -1,7 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  from typing import Dict, List, Union, Optional
4
- from datetime import datetime
5
4
  from typing_extensions import Literal
6
5
 
7
6
  from pydantic import Field as FieldInfo
@@ -21,7 +20,7 @@ class Memory(BaseModel):
21
20
  This is useful for identifying the source of the document.
22
21
  """
23
22
 
24
- created_at: datetime = FieldInfo(alias="createdAt")
23
+ created_at: str = FieldInfo(alias="createdAt")
25
24
  """Creation timestamp"""
26
25
 
27
26
  custom_id: Optional[str] = FieldInfo(alias="customId", default=None)
@@ -64,7 +63,7 @@ class Memory(BaseModel):
64
63
  ]
65
64
  """Type of the document"""
66
65
 
67
- updated_at: datetime = FieldInfo(alias="updatedAt")
66
+ updated_at: str = FieldInfo(alias="updatedAt")
68
67
  """Last update timestamp"""
69
68
 
70
69
  container_tags: Optional[List[str]] = FieldInfo(alias="containerTags", default=None)
@@ -81,12 +80,12 @@ class Memory(BaseModel):
81
80
  class Pagination(BaseModel):
82
81
  current_page: float = FieldInfo(alias="currentPage")
83
82
 
84
- limit: float
85
-
86
83
  total_items: float = FieldInfo(alias="totalItems")
87
84
 
88
85
  total_pages: float = FieldInfo(alias="totalPages")
89
86
 
87
+ limit: Optional[float] = None
88
+
90
89
 
91
90
  class DocumentListResponse(BaseModel):
92
91
  memories: List[Memory]