unique_sdk 0.10.22__tar.gz → 0.10.24__tar.gz

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.
Files changed (43) hide show
  1. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/CHANGELOG.md +6 -0
  2. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/PKG-INFO +50 -2
  3. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/README.md +43 -1
  4. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/pyproject.toml +1 -1
  5. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_chat_completion.py +0 -49
  6. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_folder.py +89 -0
  7. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/LICENSE +0 -0
  8. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/__init__.py +0 -0
  9. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_api_requestor.py +0 -0
  10. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_api_resource.py +0 -0
  11. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_api_version.py +0 -0
  12. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_error.py +0 -0
  13. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_http_client.py +0 -0
  14. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_list_object.py +0 -0
  15. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_object_classes.py +0 -0
  16. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_request_options.py +0 -0
  17. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_unique_object.py +0 -0
  18. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_unique_ql.py +0 -0
  19. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_unique_response.py +0 -0
  20. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_util.py +0 -0
  21. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_version.py +0 -0
  22. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/_webhook.py +0 -0
  23. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/__init__.py +0 -0
  24. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_acronyms.py +0 -0
  25. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_agentic_table.py +0 -0
  26. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_content.py +0 -0
  27. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_embedding.py +0 -0
  28. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_event.py +0 -0
  29. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_integrated.py +0 -0
  30. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_mcp.py +0 -0
  31. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_message.py +0 -0
  32. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_message_assessment.py +0 -0
  33. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_message_execution.py +0 -0
  34. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_message_log.py +0 -0
  35. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_search.py +0 -0
  36. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_search_string.py +0 -0
  37. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_short_term_memory.py +0 -0
  38. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/api_resources/_space.py +0 -0
  39. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/utils/chat_history.py +0 -0
  40. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/utils/chat_in_space.py +0 -0
  41. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/utils/file_io.py +0 -0
  42. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/utils/sources.py +0 -0
  43. {unique_sdk-0.10.22 → unique_sdk-0.10.24}/unique_sdk/utils/token.py +0 -0
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.10.24] - 2025-09-17
9
+ - Add function to update a folder.
10
+
11
+ ## [0.10.23] - 2025-09-12
12
+ - Revert to using default reasoning effort.
13
+
8
14
  ## [0.10.22] - 2025-09-12
9
15
  - Add support for metadata update of a file.
10
16
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_sdk
3
- Version: 0.10.22
3
+ Version: 0.10.24
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Martin Fadler
@@ -797,7 +797,6 @@ chat_completion = unique_sdk.ChatCompletion.create(
797
797
  ],
798
798
  options={
799
799
  "temperature": 0.5, # optional
800
- "reasoningEffort": "low", # optional
801
800
  } # optional
802
801
  )
803
802
  ```
@@ -1144,6 +1143,49 @@ unique_sdk.Folder.remove_access(
1144
1143
  )
1145
1144
  ```
1146
1145
 
1146
+ #### `unique_sdk.Folder.update`
1147
+ Uupdate a folder specified by its `scopeId` or path. The following properties can be updated:
1148
+ - parent folder - move the folder to a new parent folder specified by its `scopeId` or path. If the new parent folder is the root folder, the `parentId` should be explicitly specificed by setting `newParentId` to `None`.
1149
+ - name - update the name by setting the `name` field to the new name.
1150
+
1151
+ Examples:
1152
+
1153
+ Move the folder specified by its `scopeId` to a new parent folder specified by its path.
1154
+
1155
+ ```python
1156
+ unique_sdk.Folder.update(
1157
+ user_id=user_id,
1158
+ company_id=company_id,
1159
+ scopeId="scope_dwekjnf3330woioppm",
1160
+ parentFolderPath="/Company/folder1/folder2"
1161
+ )
1162
+ ```
1163
+
1164
+ Move the parent of a folder specified by its path to a new parent folder specified by its `scopeId` and update the name to "January".
1165
+
1166
+ ```python
1167
+ unique_sdk.Folder.update(
1168
+ user_id=user_id,
1169
+ company_id=company_id,
1170
+ folderPath="/Company/folder1",
1171
+ parentId="scope_dweekjrfhirtuhgroppm",
1172
+ name="January"
1173
+ )
1174
+ ```
1175
+
1176
+ Move the parent of a folder specified by its path to the root folder and update the name to "January".
1177
+
1178
+ ```python
1179
+ unique_sdk.Folder.update(
1180
+ user_id=user_id,
1181
+ company_id=company_id,
1182
+ folderPath="/Company/folder1",
1183
+ parentId=None,
1184
+ name="January"
1185
+ )
1186
+ ```
1187
+
1188
+
1147
1189
  #### `unique_sdk.Folder.delete` (Compatible with release >.36)
1148
1190
 
1149
1191
  Given a `scopeId` or `folderPath`, the function deletes the folder. If the folder is not empty or if the user has no WRITE access, the delete will fail.
@@ -1583,6 +1625,12 @@ All notable changes to this project will be documented in this file.
1583
1625
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1584
1626
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1585
1627
 
1628
+ ## [0.10.24] - 2025-09-17
1629
+ - Add function to update a folder.
1630
+
1631
+ ## [0.10.23] - 2025-09-12
1632
+ - Revert to using default reasoning effort.
1633
+
1586
1634
  ## [0.10.22] - 2025-09-12
1587
1635
  - Add support for metadata update of a file.
1588
1636
 
@@ -779,7 +779,6 @@ chat_completion = unique_sdk.ChatCompletion.create(
779
779
  ],
780
780
  options={
781
781
  "temperature": 0.5, # optional
782
- "reasoningEffort": "low", # optional
783
782
  } # optional
784
783
  )
785
784
  ```
@@ -1126,6 +1125,49 @@ unique_sdk.Folder.remove_access(
1126
1125
  )
1127
1126
  ```
1128
1127
 
1128
+ #### `unique_sdk.Folder.update`
1129
+ Uupdate a folder specified by its `scopeId` or path. The following properties can be updated:
1130
+ - parent folder - move the folder to a new parent folder specified by its `scopeId` or path. If the new parent folder is the root folder, the `parentId` should be explicitly specificed by setting `newParentId` to `None`.
1131
+ - name - update the name by setting the `name` field to the new name.
1132
+
1133
+ Examples:
1134
+
1135
+ Move the folder specified by its `scopeId` to a new parent folder specified by its path.
1136
+
1137
+ ```python
1138
+ unique_sdk.Folder.update(
1139
+ user_id=user_id,
1140
+ company_id=company_id,
1141
+ scopeId="scope_dwekjnf3330woioppm",
1142
+ parentFolderPath="/Company/folder1/folder2"
1143
+ )
1144
+ ```
1145
+
1146
+ Move the parent of a folder specified by its path to a new parent folder specified by its `scopeId` and update the name to "January".
1147
+
1148
+ ```python
1149
+ unique_sdk.Folder.update(
1150
+ user_id=user_id,
1151
+ company_id=company_id,
1152
+ folderPath="/Company/folder1",
1153
+ parentId="scope_dweekjrfhirtuhgroppm",
1154
+ name="January"
1155
+ )
1156
+ ```
1157
+
1158
+ Move the parent of a folder specified by its path to the root folder and update the name to "January".
1159
+
1160
+ ```python
1161
+ unique_sdk.Folder.update(
1162
+ user_id=user_id,
1163
+ company_id=company_id,
1164
+ folderPath="/Company/folder1",
1165
+ parentId=None,
1166
+ name="January"
1167
+ )
1168
+ ```
1169
+
1170
+
1129
1171
  #### `unique_sdk.Folder.delete` (Compatible with release >.36)
1130
1172
 
1131
1173
  Given a `scopeId` or `folderPath`, the function deletes the folder. If the folder is not empty or if the user has no WRITE access, the delete will fail.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "unique_sdk"
3
- version = "0.10.22"
3
+ version = "0.10.24"
4
4
  description = ""
5
5
  authors = [
6
6
  "Martin Fadler <martin.fadler@unique.ch>",
@@ -1,13 +1,10 @@
1
1
  from typing import (
2
- Any,
3
2
  ClassVar,
4
- Dict,
5
3
  List,
6
4
  Literal,
7
5
  NotRequired,
8
6
  Optional,
9
7
  TypedDict,
10
- Union,
11
8
  Unpack,
12
9
  cast,
13
10
  )
@@ -37,51 +34,6 @@ class ChatCompletionChoicesInner(TypedDict):
37
34
  class ChatCompletion(APIResource["ChatCompletion"]):
38
35
  OBJECT_NAME: ClassVar[Literal["openai.chat.completion"]] = "openai.chat.completion"
39
36
 
40
- class FunctionDefinition(TypedDict, total=False):
41
- name: str
42
- description: Optional[str]
43
- parameters: Optional[Dict[str, Any]]
44
-
45
- class ChatCompletionsFunctionToolDefinition(TypedDict):
46
- type: Literal["function"]
47
- function: "ChatCompletion.FunctionDefinition"
48
-
49
- class FunctionName(TypedDict):
50
- name: str
51
-
52
- class ChatCompletionsNamedFunctionToolSelectionName(TypedDict):
53
- name: str
54
-
55
- class ChatCompletionsNamedFunctionToolSelection(TypedDict):
56
- type: Literal["function"]
57
- function: "ChatCompletion.ChatCompletionsNamedFunctionToolSelectionName"
58
-
59
- class ChatCompletionsTextResponseFormat(TypedDict, total=False):
60
- type: Literal["text", "json_schema"]
61
- json_schema: dict
62
-
63
- class Options(TypedDict, total=False):
64
- functions: NotRequired[List["ChatCompletion.FunctionDefinition"]]
65
- reasoningEffort: NotRequired[Literal["low", "medium", "high", None]]
66
- functionCall: NotRequired[
67
- Union[Literal["auto", "none"], "ChatCompletion.FunctionName"]
68
- ]
69
- maxTokens: NotRequired[int]
70
- temperature: NotRequired[float]
71
- topP: NotRequired[float]
72
- logitBias: NotRequired[Dict[str, float]]
73
- user: NotRequired[str]
74
- n: NotRequired[int]
75
- stop: NotRequired[List[str]]
76
- presencePenalty: NotRequired[float]
77
- frequencyPenalty: NotRequired[float]
78
- seed: NotRequired[int]
79
- responseFormat: NotRequired["ChatCompletion.ChatCompletionsTextResponseFormat"]
80
- tools: NotRequired[List["ChatCompletion.ChatCompletionsFunctionToolDefinition"]]
81
- toolChoice: NotRequired[
82
- "ChatCompletion.ChatCompletionsNamedFunctionToolSelection"
83
- ]
84
-
85
37
  class CreateParams(RequestOptions):
86
38
  model: NotRequired[
87
39
  Literal[
@@ -91,7 +43,6 @@ class ChatCompletion(APIResource["ChatCompletion"]):
91
43
  ]
92
44
  timeout: NotRequired[Optional["int"]]
93
45
  messages: List[ChatCompletionRequestMessage]
94
- options: NotRequired["ChatCompletion.Options"]
95
46
 
96
47
  model: Literal[
97
48
  "AZURE_GPT_4_0613",
@@ -152,6 +152,17 @@ class Folder(APIResource["Folder"]):
152
152
  scopeId: str | None = None
153
153
  folderPath: str | None = None
154
154
 
155
+ class UpdateParams(RequestOptions):
156
+ """
157
+ Parameters for updating a folder.
158
+ """
159
+
160
+ scopeId: NotRequired[str]
161
+ folderPath: NotRequired[str]
162
+ parentFolderPath: NotRequired[str]
163
+ parentId: NotRequired[str]
164
+ name: NotRequired[str]
165
+
155
166
  class GetInfosParams(RequestOptions):
156
167
  """
157
168
  Parameters for getting multiple paginated folders by their parent Id.
@@ -407,6 +418,84 @@ class Folder(APIResource["Folder"]):
407
418
  ),
408
419
  )
409
420
 
421
+ @classmethod
422
+ def update(
423
+ cls,
424
+ user_id: str,
425
+ company_id: str,
426
+ **params: Unpack["Folder.UpdateParams"],
427
+ ) -> "Folder.FolderInfo":
428
+ """
429
+ Update a folder given its id or path. Can update the name or the parent folder by specifying its id or path.
430
+ """
431
+
432
+ scopeId = cls.resolve_scope_id_from_folder_path(
433
+ user_id=user_id,
434
+ company_id=company_id,
435
+ scope_id=params.get("scopeId"),
436
+ folder_path=params.get("folderPath"),
437
+ )
438
+ parentId = cls.resolve_scope_id_from_folder_path(
439
+ user_id=user_id,
440
+ company_id=company_id,
441
+ scope_id=params.get("parentId"),
442
+ folder_path=params.get("parentFolderPath"),
443
+ )
444
+ params.pop("folderPath", None)
445
+ params.pop("parentFolderPath", None)
446
+ if parentId:
447
+ params["parentId"] = parentId
448
+
449
+ return cast(
450
+ "Folder.FolderInfo",
451
+ cls._static_request(
452
+ "patch",
453
+ f"{cls.RESOURCE_URL}/{scopeId}",
454
+ user_id,
455
+ company_id=company_id,
456
+ params=params,
457
+ ),
458
+ )
459
+
460
+ @classmethod
461
+ async def update_async(
462
+ cls,
463
+ user_id: str,
464
+ company_id: str,
465
+ **params: Unpack["Folder.UpdateParams"],
466
+ ) -> "Folder.FolderInfo":
467
+ """
468
+ Async update a folder given its id or path. Can update the name or the parent folder by specifying its id or path.
469
+ """
470
+
471
+ scopeId = cls.resolve_scope_id_from_folder_path(
472
+ user_id=user_id,
473
+ company_id=company_id,
474
+ scope_id=params.get("scopeId"),
475
+ folder_path=params.get("folderPath"),
476
+ )
477
+ parentId = cls.resolve_scope_id_from_folder_path(
478
+ user_id=user_id,
479
+ company_id=company_id,
480
+ scope_id=params.get("parentId"),
481
+ folder_path=params.get("parentFolderPath"),
482
+ )
483
+ params.pop("folderPath", None)
484
+ params.pop("parentFolderPath", None)
485
+ if parentId:
486
+ params["parentId"] = parentId
487
+
488
+ return cast(
489
+ "Folder.FolderInfo",
490
+ await cls._static_request_async(
491
+ "patch",
492
+ f"{cls.RESOURCE_URL}/{scopeId}",
493
+ user_id,
494
+ company_id=company_id,
495
+ params=params,
496
+ ),
497
+ )
498
+
410
499
  @classmethod
411
500
  def delete(
412
501
  cls,
File without changes