unique_sdk 0.10.42__py3-none-any.whl → 0.10.43__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/__init__.py CHANGED
@@ -85,6 +85,7 @@ from unique_sdk.api_resources._embedding import Embeddings as Embeddings
85
85
  from unique_sdk.api_resources._acronyms import Acronyms as Acronyms
86
86
  from unique_sdk.api_resources._llm_models import LLMModels as LLMModels
87
87
  from unique_sdk.api_resources._user import User as User
88
+ from unique_sdk.api_resources._group import Group as Group
88
89
  from unique_sdk.api_resources._message_assessment import (
89
90
  MessageAssessment as MessageAssessment,
90
91
  )
@@ -0,0 +1,194 @@
1
+ from typing import (
2
+ ClassVar,
3
+ List,
4
+ Literal,
5
+ NotRequired,
6
+ Optional,
7
+ TypedDict,
8
+ Unpack,
9
+ cast,
10
+ )
11
+
12
+ from unique_sdk._api_resource import APIResource
13
+ from unique_sdk._request_options import RequestOptions
14
+
15
+
16
+ class Group(APIResource["Group"]):
17
+ OBJECT_NAME: ClassVar[Literal["group"]] = "group"
18
+
19
+ class GetParams(RequestOptions):
20
+ """
21
+ Parameters for getting groups in a company.
22
+ """
23
+
24
+ skip: NotRequired[Optional[int]]
25
+ take: NotRequired[Optional[int]]
26
+ name: NotRequired[Optional[str]]
27
+
28
+ class UpdateParams(RequestOptions):
29
+ """
30
+ Parameters for updating a group.
31
+ """
32
+
33
+ name: NotRequired[Optional[str]]
34
+
35
+ class GroupMember(TypedDict):
36
+ """
37
+ Represents a member of a group.
38
+ """
39
+
40
+ entityId: str
41
+
42
+ class Group(TypedDict):
43
+ """
44
+ Represents a group in the company.
45
+ """
46
+
47
+ id: str
48
+ name: str
49
+ externalId: str
50
+ parentId: Optional[str]
51
+ roles: Optional[List[str]]
52
+ members: Optional[List["Group.GroupMember"]]
53
+ createdAt: str
54
+ updatedAt: str
55
+
56
+ class Groups(TypedDict):
57
+ """
58
+ Response for getting groups.
59
+ """
60
+
61
+ groups: List["Group.Group"]
62
+
63
+ class DeleteResponse(TypedDict):
64
+ """
65
+ Response for deleting a group.
66
+ """
67
+
68
+ id: str
69
+
70
+ @classmethod
71
+ def get_groups(
72
+ cls,
73
+ user_id: str,
74
+ company_id: str,
75
+ **params: Unpack["Group.GetParams"],
76
+ ) -> "Group.Groups":
77
+ """
78
+ Get groups in a company.
79
+ """
80
+ return cast(
81
+ "Group.Groups",
82
+ cls._static_request(
83
+ "get",
84
+ "/groups",
85
+ user_id,
86
+ company_id,
87
+ params=params,
88
+ ),
89
+ )
90
+
91
+ @classmethod
92
+ async def get_groups_async(
93
+ cls,
94
+ user_id: str,
95
+ company_id: str,
96
+ **params: Unpack["Group.GetParams"],
97
+ ) -> "Group.Groups":
98
+ """
99
+ Async get groups in a company.
100
+ """
101
+ return cast(
102
+ "Group.Groups",
103
+ await cls._static_request_async(
104
+ "get",
105
+ "/groups",
106
+ user_id,
107
+ company_id,
108
+ params=params,
109
+ ),
110
+ )
111
+
112
+ @classmethod
113
+ def delete_group(
114
+ cls,
115
+ user_id: str,
116
+ company_id: str,
117
+ group_id: str,
118
+ ) -> "Group.DeleteResponse":
119
+ """
120
+ Delete a group in a company.
121
+ """
122
+ return cast(
123
+ "Group.DeleteResponse",
124
+ cls._static_request(
125
+ "delete",
126
+ f"/groups/{group_id}",
127
+ user_id,
128
+ company_id,
129
+ ),
130
+ )
131
+
132
+ @classmethod
133
+ async def delete_group_async(
134
+ cls,
135
+ user_id: str,
136
+ company_id: str,
137
+ group_id: str,
138
+ ) -> "Group.DeleteResponse":
139
+ """
140
+ Async delete a group in a company.
141
+ """
142
+ return cast(
143
+ "Group.DeleteResponse",
144
+ await cls._static_request_async(
145
+ "delete",
146
+ f"/groups/{group_id}",
147
+ user_id,
148
+ company_id,
149
+ ),
150
+ )
151
+
152
+ @classmethod
153
+ def update_group(
154
+ cls,
155
+ user_id: str,
156
+ company_id: str,
157
+ group_id: str,
158
+ **params: Unpack["Group.UpdateParams"],
159
+ ) -> "Group.Group":
160
+ """
161
+ Update a group in a company.
162
+ """
163
+ return cast(
164
+ "Group.Group",
165
+ cls._static_request(
166
+ "patch",
167
+ f"/groups/{group_id}",
168
+ user_id,
169
+ company_id,
170
+ params=params,
171
+ ),
172
+ )
173
+
174
+ @classmethod
175
+ async def update_group_async(
176
+ cls,
177
+ user_id: str,
178
+ company_id: str,
179
+ group_id: str,
180
+ **params: Unpack["Group.UpdateParams"],
181
+ ) -> "Group.Group":
182
+ """
183
+ Async update a group in a company.
184
+ """
185
+ return cast(
186
+ "Group.Group",
187
+ await cls._static_request_async(
188
+ "patch",
189
+ f"/groups/{group_id}",
190
+ user_id,
191
+ company_id,
192
+ params=params,
193
+ ),
194
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_sdk
3
- Version: 0.10.42
3
+ Version: 0.10.43
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Martin Fadler
@@ -44,6 +44,7 @@ The Unique Python SDK provides access to the public API of Unique AI. It also en
44
44
  - [Space](#space)
45
45
  - [LLM Models](#llm-models)
46
46
  - [User](#user)
47
+ - [Group](#group)
47
48
  - [Agentic Table](#agentic-table)
48
49
  6. [UniqueQL](#uniqueql)
49
50
  - [Query Structure](#uniqueql-query-structure)
@@ -264,6 +265,7 @@ unique_sdk.Message.modify(
264
265
  - [Space](#space)
265
266
  - [LLM Models](#llm-models)
266
267
  - [User](#user)
268
+ - [Group](#group)
267
269
  - [Agentic Table](#agentic-table)
268
270
 
269
271
  Most of the API services provide an asynchronous version of the method. The async methods are suffixed with `_async`.
@@ -1445,6 +1447,47 @@ users = unique_sdk.User.get_users(
1445
1447
  )
1446
1448
  ```
1447
1449
 
1450
+ ### Group
1451
+
1452
+ #### `unique_sdk.Group.get_groups` (Compatible with release >.48)
1453
+
1454
+ Get groups in a company. You can filter by name and use pagination with skip and take parameters.
1455
+
1456
+ ```python
1457
+ groups = unique_sdk.Group.get_groups(
1458
+ user_id=user_id,
1459
+ company_id=company_id,
1460
+ skip=0, # Optional - number of records to skip for pagination
1461
+ take=50, # Optional - number of records to return (max 1000)
1462
+ name="Admin", # Optional - filter by group name
1463
+ )
1464
+ ```
1465
+
1466
+ #### `unique_sdk.Group.update_group` (Compatible with release >.48)
1467
+
1468
+ Update a group in a company. You can update the group's name.
1469
+
1470
+ ```python
1471
+ updated_group = unique_sdk.Group.update_group(
1472
+ user_id=user_id,
1473
+ company_id=company_id,
1474
+ group_id="group_id_here",
1475
+ name="New Group Name", # Optional - update the group name
1476
+ )
1477
+ ```
1478
+
1479
+ #### `unique_sdk.Group.delete_group` (Compatible with release >.48)
1480
+
1481
+ Delete a group in a company by its group ID.
1482
+
1483
+ ```python
1484
+ result = unique_sdk.Group.delete_group(
1485
+ user_id=user_id,
1486
+ company_id=company_id,
1487
+ group_id="group_id_here",
1488
+ )
1489
+ ```
1490
+
1448
1491
  ### Agentic Table
1449
1492
 
1450
1493
  The Agentic Table (Magic Table) API provides functionality for managing interactive tables with AI-powered cells, activity tracking, and metadata management.
@@ -2050,6 +2093,9 @@ All notable changes to this project will be documented in this file.
2050
2093
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2051
2094
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
2052
2095
 
2096
+ ## [0.10.43] - 2025-11-14
2097
+ - Add get, delete and update groups functions.
2098
+
2053
2099
  ## [0.10.42] - 2025-11-14
2054
2100
  - Add get_users function.
2055
2101
 
@@ -1,4 +1,4 @@
1
- unique_sdk/__init__.py,sha256=nBscz8qGKhZxUDUM43h4hfTjWZ_IWSswNo6bQ1K0TMs,4145
1
+ unique_sdk/__init__.py,sha256=yfrzJ2M36Ota9-eohCxD-rmvfthh_eI3E3Jz_DPqiqs,4204
2
2
  unique_sdk/_api_requestor.py,sha256=i4gCpzx8zP95sv-AhJfpQxKvWR0U-I6lclHyV55RPtg,14397
3
3
  unique_sdk/_api_resource.py,sha256=ytjomI-IVJwsbvdPyuZCfF-bl-Abgf66bu1D34YxCu8,6244
4
4
  unique_sdk/_api_version.py,sha256=Ku4JPdeyJtnX5eJJvRCEc1_u44UObdVrvrL1T-WwWCs,46
@@ -21,6 +21,7 @@ unique_sdk/api_resources/_content.py,sha256=Z7BU2bw1qULnn-UBX0f6ix_XV0qI1yaRH6zO
21
21
  unique_sdk/api_resources/_embedding.py,sha256=C6qak7cCUBMBINfPhgH8taCJZ9n6w1MUElqDJJ8dG10,1281
22
22
  unique_sdk/api_resources/_event.py,sha256=bpWF9vstdoAWbUzr-iiGP713ceP0zPk77GJXiImf9zg,374
23
23
  unique_sdk/api_resources/_folder.py,sha256=WPyRPsdAE62tU7p4hEYiVB4OoArv_60b8t4j7hgrJKk,15765
24
+ unique_sdk/api_resources/_group.py,sha256=f3spoWF0fX0rZkWrJZdalBMLkwRtccNOSSxFadypum0,4341
24
25
  unique_sdk/api_resources/_integrated.py,sha256=O8e673z-RB7FRFMQYn_YEuHijebr5W7KJxkUnymbBZk,6164
25
26
  unique_sdk/api_resources/_llm_models.py,sha256=3Jn6MpxWgZ43Hze8JHd4_n27si5xmwd3JE8r8cEZq_M,1640
26
27
  unique_sdk/api_resources/_mcp.py,sha256=zKh0dyn0QnkKk57N2zlGVN_GQoxEp5T2CS38vVm6jQY,3341
@@ -38,7 +39,7 @@ unique_sdk/utils/chat_in_space.py,sha256=cdjETBLnjv-OE8qsQpm626ks5yBdfQG_KBeG0WI
38
39
  unique_sdk/utils/file_io.py,sha256=lskRULIh7qExK26o_1YqRs0f5mqJHTS9m_mdxlsVo4s,4497
39
40
  unique_sdk/utils/sources.py,sha256=DoxxhMLcLhmDfNarjXa41H4JD2GSSDywr71hiC-4pYc,4952
40
41
  unique_sdk/utils/token.py,sha256=AzKuAA1AwBtnvSFxGcsHLpxXr_wWE5Mj4jYBbOz2ljA,1740
41
- unique_sdk-0.10.42.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
42
- unique_sdk-0.10.42.dist-info/METADATA,sha256=hZwJdmI3RPTLRNJgAcPH0kedZuEo1pMK-7zfNpe0uvs,70570
43
- unique_sdk-0.10.42.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
44
- unique_sdk-0.10.42.dist-info/RECORD,,
42
+ unique_sdk-0.10.43.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
43
+ unique_sdk-0.10.43.dist-info/METADATA,sha256=KdrdST-aefdKEsL0BaXUxAm4IyhnZSwc4TcKVDEVOBA,71736
44
+ unique_sdk-0.10.43.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
45
+ unique_sdk-0.10.43.dist-info/RECORD,,