unique_sdk 0.10.16__py3-none-any.whl → 0.10.18__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.
- unique_sdk/api_resources/_content.py +43 -19
- unique_sdk/api_resources/_folder.py +3 -3
- {unique_sdk-0.10.16.dist-info → unique_sdk-0.10.18.dist-info}/METADATA +44 -11
- {unique_sdk-0.10.16.dist-info → unique_sdk-0.10.18.dist-info}/RECORD +6 -6
- {unique_sdk-0.10.16.dist-info → unique_sdk-0.10.18.dist-info}/LICENSE +0 -0
- {unique_sdk-0.10.16.dist-info → unique_sdk-0.10.18.dist-info}/WHEEL +0 -0
@@ -127,6 +127,11 @@ class Content(APIResource["Content"]):
|
|
127
127
|
storeInternally: bool
|
128
128
|
fileUrl: Optional[str]
|
129
129
|
|
130
|
+
class UpdateParams(RequestOptions):
|
131
|
+
contentId: str | None = None
|
132
|
+
ownerId: str | None = None
|
133
|
+
title: str | None = None
|
134
|
+
|
130
135
|
class Chunk(TypedDict):
|
131
136
|
id: str
|
132
137
|
text: str
|
@@ -160,7 +165,6 @@ class Content(APIResource["Content"]):
|
|
160
165
|
|
161
166
|
class DeleteParams(RequestOptions):
|
162
167
|
contentId: NotRequired[str]
|
163
|
-
filePath: NotRequired[str]
|
164
168
|
chatId: NotRequired[str]
|
165
169
|
|
166
170
|
class DeleteResponse(TypedDict):
|
@@ -391,6 +395,42 @@ class Content(APIResource["Content"]):
|
|
391
395
|
),
|
392
396
|
)
|
393
397
|
|
398
|
+
@classmethod
|
399
|
+
def update(
|
400
|
+
cls,
|
401
|
+
user_id: str,
|
402
|
+
company_id: str,
|
403
|
+
**params: Unpack["Content.UpdateParams"],
|
404
|
+
) -> "Content.ContentInfo":
|
405
|
+
return cast(
|
406
|
+
"Content.ContentInfo",
|
407
|
+
cls._static_request(
|
408
|
+
"patch",
|
409
|
+
f"/content/{params.get('contentId')}",
|
410
|
+
user_id,
|
411
|
+
company_id,
|
412
|
+
params=params,
|
413
|
+
),
|
414
|
+
)
|
415
|
+
|
416
|
+
@classmethod
|
417
|
+
async def update_async(
|
418
|
+
cls,
|
419
|
+
user_id: str,
|
420
|
+
company_id: str,
|
421
|
+
**params: Unpack["Content.UpdateParams"],
|
422
|
+
) -> "Content.ContentInfo":
|
423
|
+
return cast(
|
424
|
+
"Content.ContentInfo",
|
425
|
+
await cls._static_request_async(
|
426
|
+
"patch",
|
427
|
+
f"/content/{params.get('contentId')}",
|
428
|
+
user_id,
|
429
|
+
company_id,
|
430
|
+
params=params,
|
431
|
+
),
|
432
|
+
)
|
433
|
+
|
394
434
|
@classmethod
|
395
435
|
def delete(
|
396
436
|
cls,
|
@@ -401,20 +441,12 @@ class Content(APIResource["Content"]):
|
|
401
441
|
"""
|
402
442
|
Deletes a content by its id or file path.
|
403
443
|
"""
|
404
|
-
content_id = cls.resolve_content_id_from_file_path(
|
405
|
-
user_id,
|
406
|
-
company_id,
|
407
|
-
params.get("contentId"),
|
408
|
-
params.get("filePath"),
|
409
|
-
)
|
410
|
-
params.pop("contentId", None)
|
411
|
-
params.pop("filePath", None)
|
412
444
|
|
413
445
|
return cast(
|
414
446
|
"Content.DeleteResponse",
|
415
447
|
cls._static_request(
|
416
448
|
"delete",
|
417
|
-
f"/content/{
|
449
|
+
f"/content/{params.get('contentId')}",
|
418
450
|
user_id,
|
419
451
|
company_id,
|
420
452
|
params=params,
|
@@ -431,20 +463,12 @@ class Content(APIResource["Content"]):
|
|
431
463
|
"""
|
432
464
|
Async deletes a content by its id or file path.
|
433
465
|
"""
|
434
|
-
content_id = cls.resolve_content_id_from_file_path(
|
435
|
-
user_id,
|
436
|
-
company_id,
|
437
|
-
params.get("contentId"),
|
438
|
-
params.get("filePath"),
|
439
|
-
)
|
440
|
-
params.pop("contentId", None)
|
441
|
-
params.pop("filePath", None)
|
442
466
|
|
443
467
|
return cast(
|
444
468
|
"Content.DeleteResponse",
|
445
469
|
await cls._static_request_async(
|
446
470
|
"delete",
|
447
|
-
f"/content/{
|
471
|
+
f"/content/{params.get('contentId')}",
|
448
472
|
user_id,
|
449
473
|
company_id,
|
450
474
|
params=params,
|
@@ -418,7 +418,7 @@ class Folder(APIResource["Folder"]):
|
|
418
418
|
Delete a folder by its ID or path.
|
419
419
|
"""
|
420
420
|
|
421
|
-
scopeId = cls.
|
421
|
+
scopeId = cls.resolve_scope_id_from_folder_path(
|
422
422
|
user_id, company_id, params.get("scopeId"), params.get("folderPath")
|
423
423
|
)
|
424
424
|
params.pop("scopeId", None)
|
@@ -445,7 +445,7 @@ class Folder(APIResource["Folder"]):
|
|
445
445
|
"""
|
446
446
|
Async delete a folder by its ID or path.
|
447
447
|
"""
|
448
|
-
scopeId = cls.
|
448
|
+
scopeId = cls.resolve_scope_id_from_folder_path(
|
449
449
|
user_id, company_id, params.get("scopeId"), params.get("folderPath")
|
450
450
|
)
|
451
451
|
params.pop("scopeId", None)
|
@@ -463,7 +463,7 @@ class Folder(APIResource["Folder"]):
|
|
463
463
|
)
|
464
464
|
|
465
465
|
@classmethod
|
466
|
-
def
|
466
|
+
def resolve_scope_id_from_folder_path(
|
467
467
|
cls,
|
468
468
|
user_id: str,
|
469
469
|
company_id: str,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: unique_sdk
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.18
|
4
4
|
Summary:
|
5
5
|
License: MIT
|
6
6
|
Author: Martin Fadler
|
@@ -554,32 +554,59 @@ Allows you to ingest a magic table sheet, each row is processed and converted in
|
|
554
554
|
unique_sdk.Content.ingest_magic_table_sheets(**params)
|
555
555
|
```
|
556
556
|
|
557
|
-
#### `unique_sdk.Content.
|
557
|
+
#### `unique_sdk.Content.update` (Compatible with release >.36)
|
558
558
|
|
559
|
-
Allows you to
|
559
|
+
Allows you to update a file specified by its `contentId`.
|
560
560
|
|
561
|
-
- `contentId`
|
562
|
-
- `chatId` optional, the id of the chat where the file is. Only needed if the file is part of a chat
|
563
|
-
- `filePath` optional if `contentId` is provided, the absolute path of the file to be deleted
|
561
|
+
- `contentId` the id of the file to be updated
|
564
562
|
|
565
|
-
|
563
|
+
Currently, the following updates are supported:
|
564
|
+
|
565
|
+
Title update:
|
566
|
+
- `title` optional, allows updating the title of the folder
|
567
|
+
|
568
|
+
Move the file to a different folder. this can be done by specifying either the `ownerId`.
|
569
|
+
- `ownerId` optional, allows moving the file to a different folder. Represents the new folder for the file and it should be the id of a folder e.g.: `scope_dhjfieurfloakmdle`.
|
570
|
+
|
571
|
+
|
572
|
+
Example of moving a file specified by its content id.
|
566
573
|
|
567
574
|
```python
|
568
|
-
unique_sdk.Content.
|
575
|
+
unique_sdk.Content.update(
|
569
576
|
user_id=user_id,
|
570
577
|
company_id=company_id,
|
571
578
|
contentId="cont_ok2343q5owbce80w78hudawu5",
|
572
|
-
|
579
|
+
ownerId="scope_e68yz5asho7glfh7c7d041el"
|
573
580
|
)
|
574
581
|
```
|
575
582
|
|
576
|
-
Example of
|
583
|
+
Example of moving a file and updating its title.
|
584
|
+
|
585
|
+
```python
|
586
|
+
unique_sdk.Content.update(
|
587
|
+
user_id=user_id,
|
588
|
+
company_id=company_id,
|
589
|
+
contentId="cont_ok2343q5owbce80w78hudawu5",
|
590
|
+
ownerId="scope_e68yz5asho7glfh7c7d041el",
|
591
|
+
title="Revision Deck (1)"
|
592
|
+
)
|
593
|
+
```
|
594
|
+
|
595
|
+
#### `unique_sdk.Content.delete` (Compatible with release >.36)
|
596
|
+
|
597
|
+
Allows you to delete a file by its `contentId`. If the file is part of a chat, the `chatId` also needs do be set.
|
598
|
+
|
599
|
+
- `contentId` the id of the file to be deleted
|
600
|
+
- `chatId` optional, the id of the chat where the file is. Only needed if the file is part of a chat
|
601
|
+
|
602
|
+
Example of deleting a file from a chat.
|
577
603
|
|
578
604
|
```python
|
579
605
|
unique_sdk.Content.delete(
|
580
606
|
user_id=user_id,
|
581
607
|
company_id=company_id,
|
582
|
-
|
608
|
+
contentId="cont_ok2343q5owbce80w78hudawu5",
|
609
|
+
chatId="chat_v3xfa7liv876h89vuiibus1"
|
583
610
|
)
|
584
611
|
```
|
585
612
|
|
@@ -1545,6 +1572,12 @@ All notable changes to this project will be documented in this file.
|
|
1545
1572
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
1546
1573
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
1547
1574
|
|
1575
|
+
## [0.10.18] - 2025-09-02
|
1576
|
+
- Temporarily remove support for udpate and delete files by filePath.
|
1577
|
+
|
1578
|
+
## [0.10.17] - 2025-09-01
|
1579
|
+
- Add function to update a file
|
1580
|
+
|
1548
1581
|
## [0.10.16] - 2025-08-31
|
1549
1582
|
- Add function to delete a content.
|
1550
1583
|
|
@@ -17,10 +17,10 @@ unique_sdk/api_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
17
17
|
unique_sdk/api_resources/_acronyms.py,sha256=GIU1XH1flGWQYcpsFqTYwg4ioIGxVmb15tux84nmhEg,891
|
18
18
|
unique_sdk/api_resources/_agentic_table.py,sha256=8-_f7t-m_iiiOj2835iESoxz91YRxl4-tkxpzQbgdcI,9958
|
19
19
|
unique_sdk/api_resources/_chat_completion.py,sha256=ILCAffxkbkfh2iV9L4KKnfe80gZmT9pWfkNmf3mq68U,2172
|
20
|
-
unique_sdk/api_resources/_content.py,sha256=
|
20
|
+
unique_sdk/api_resources/_content.py,sha256=Vi-wZ-T5f-OqBGXkA3B9dALoFHer5F8LAQlc5x6pcls,14109
|
21
21
|
unique_sdk/api_resources/_embedding.py,sha256=C6qak7cCUBMBINfPhgH8taCJZ9n6w1MUElqDJJ8dG10,1281
|
22
22
|
unique_sdk/api_resources/_event.py,sha256=bpWF9vstdoAWbUzr-iiGP713ceP0zPk77GJXiImf9zg,374
|
23
|
-
unique_sdk/api_resources/_folder.py,sha256=
|
23
|
+
unique_sdk/api_resources/_folder.py,sha256=mIyWaxJtIHlDLPFZ0FY1U9b3dmtmIcjDEbgOZtLA-DI,12871
|
24
24
|
unique_sdk/api_resources/_integrated.py,sha256=z_DrftwjgVCi10QQqRYnG5_-95kD7Kfjogbb-dmnJuA,5854
|
25
25
|
unique_sdk/api_resources/_mcp.py,sha256=zKh0dyn0QnkKk57N2zlGVN_GQoxEp5T2CS38vVm6jQY,3341
|
26
26
|
unique_sdk/api_resources/_message.py,sha256=gEDIzg3METZU2k7m69meAuf0IWmZxnYOjbBKPRMwPYE,7688
|
@@ -36,7 +36,7 @@ unique_sdk/utils/chat_in_space.py,sha256=3NeBjOu7p43V_6PrjwxyaTkgknUS10KE4QRuTlF
|
|
36
36
|
unique_sdk/utils/file_io.py,sha256=YY8B7VJcTLOPmCXByiOfNerXGlAtjCC5EVNmAbQJ3dQ,4306
|
37
37
|
unique_sdk/utils/sources.py,sha256=DoxxhMLcLhmDfNarjXa41H4JD2GSSDywr71hiC-4pYc,4952
|
38
38
|
unique_sdk/utils/token.py,sha256=AzKuAA1AwBtnvSFxGcsHLpxXr_wWE5Mj4jYBbOz2ljA,1740
|
39
|
-
unique_sdk-0.10.
|
40
|
-
unique_sdk-0.10.
|
41
|
-
unique_sdk-0.10.
|
42
|
-
unique_sdk-0.10.
|
39
|
+
unique_sdk-0.10.18.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
|
40
|
+
unique_sdk-0.10.18.dist-info/METADATA,sha256=aduy4luaw6fs5a2fInb5ws8VfGb_glx3CG1RrgFrnmM,53900
|
41
|
+
unique_sdk-0.10.18.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
42
|
+
unique_sdk-0.10.18.dist-info/RECORD,,
|
File without changes
|
File without changes
|