unique_sdk 0.10.62__py3-none-any.whl → 0.10.63__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/_space.py +194 -9
- {unique_sdk-0.10.62.dist-info → unique_sdk-0.10.63.dist-info}/METADATA +4 -1
- {unique_sdk-0.10.62.dist-info → unique_sdk-0.10.63.dist-info}/RECORD +5 -5
- {unique_sdk-0.10.62.dist-info → unique_sdk-0.10.63.dist-info}/LICENSE +0 -0
- {unique_sdk-0.10.62.dist-info → unique_sdk-0.10.63.dist-info}/WHEEL +0 -0
|
@@ -18,6 +18,43 @@ from unique_sdk._request_options import RequestOptions
|
|
|
18
18
|
class Space(APIResource["Space"]):
|
|
19
19
|
OBJECT_NAME: ClassVar[Literal["space"]] = "space"
|
|
20
20
|
|
|
21
|
+
class ModuleParams(TypedDict):
|
|
22
|
+
name: str
|
|
23
|
+
description: NotRequired[Optional[str]]
|
|
24
|
+
weight: NotRequired[Optional[int]]
|
|
25
|
+
isExternal: NotRequired[Optional[bool]]
|
|
26
|
+
isCustomInstructionEnabled: NotRequired[Optional[bool]]
|
|
27
|
+
configuration: NotRequired[Optional[Dict[str, Any]]]
|
|
28
|
+
toolDefinition: NotRequired[Optional[Dict[str, Any]]]
|
|
29
|
+
|
|
30
|
+
class CreateSpaceParams(RequestOptions):
|
|
31
|
+
name: str
|
|
32
|
+
fallbackModule: str
|
|
33
|
+
modules: List["Space.ModuleParams"]
|
|
34
|
+
explanation: NotRequired[Optional[str]]
|
|
35
|
+
alert: NotRequired[Optional[str]]
|
|
36
|
+
chatUpload: NotRequired[Optional[Literal["ENABLED", "DISABLED"]]]
|
|
37
|
+
languageModel: NotRequired[Optional[str]]
|
|
38
|
+
isExternal: NotRequired[Optional[bool]]
|
|
39
|
+
isPinned: NotRequired[Optional[bool]]
|
|
40
|
+
uiType: NotRequired[
|
|
41
|
+
Optional[
|
|
42
|
+
Literal["MAGIC_TABLE", "UNIQUE_CUSTOM", "TRANSLATION", "UNIQUE_AI"]
|
|
43
|
+
]
|
|
44
|
+
]
|
|
45
|
+
settings: NotRequired[Optional[Dict[str, Any]]]
|
|
46
|
+
|
|
47
|
+
class AccessEntry(TypedDict):
|
|
48
|
+
entityId: str
|
|
49
|
+
entityType: Literal["USER", "GROUP"]
|
|
50
|
+
type: Literal["USE", "MANAGE", "UPLOAD"]
|
|
51
|
+
|
|
52
|
+
class AddSpaceAccessParams(RequestOptions):
|
|
53
|
+
access: List["Space.AccessEntry"]
|
|
54
|
+
|
|
55
|
+
class DeleteSpaceAccessParams(RequestOptions):
|
|
56
|
+
accessIds: List[str]
|
|
57
|
+
|
|
21
58
|
class CreateMessageParams(RequestOptions):
|
|
22
59
|
"""
|
|
23
60
|
Parameters for querying the assistant for a message.
|
|
@@ -104,9 +141,9 @@ class Space(APIResource["Space"]):
|
|
|
104
141
|
messages: List["Space.Message"]
|
|
105
142
|
totalCount: int
|
|
106
143
|
|
|
107
|
-
class
|
|
144
|
+
class McpServer(TypedDict):
|
|
108
145
|
"""
|
|
109
|
-
Represents an MCP server associated with
|
|
146
|
+
Represents an MCP server associated with a space.
|
|
110
147
|
"""
|
|
111
148
|
|
|
112
149
|
id: str
|
|
@@ -149,16 +186,18 @@ class Space(APIResource["Space"]):
|
|
|
149
186
|
createdAt: str
|
|
150
187
|
updatedAt: str
|
|
151
188
|
|
|
152
|
-
class
|
|
153
|
-
"""
|
|
154
|
-
Represents access control for a space.
|
|
155
|
-
"""
|
|
156
|
-
|
|
189
|
+
class Access(TypedDict):
|
|
157
190
|
id: str
|
|
158
191
|
entityId: str
|
|
159
192
|
entityType: str
|
|
160
193
|
type: str
|
|
161
194
|
|
|
195
|
+
class SpaceAccessResponse(TypedDict):
|
|
196
|
+
access: List["Space.Access"]
|
|
197
|
+
|
|
198
|
+
class DeleteSpaceAccessResponse(TypedDict):
|
|
199
|
+
success: bool
|
|
200
|
+
|
|
162
201
|
id: str
|
|
163
202
|
name: str
|
|
164
203
|
defaultForCompanyId: Optional[str]
|
|
@@ -177,10 +216,10 @@ class Space(APIResource["Space"]):
|
|
|
177
216
|
isPinned: bool
|
|
178
217
|
uiType: str
|
|
179
218
|
settings: Optional[Dict[str, Any]]
|
|
180
|
-
assistantMcpServers: List["Space.
|
|
219
|
+
assistantMcpServers: List["Space.McpServer"]
|
|
181
220
|
modules: List["Space.Module"]
|
|
182
221
|
scopeRules: List["Space.ScopeRule"]
|
|
183
|
-
assistantAccess: List["Space.
|
|
222
|
+
assistantAccess: List["Space.Access"]
|
|
184
223
|
createdAt: str
|
|
185
224
|
updatedAt: str
|
|
186
225
|
|
|
@@ -385,3 +424,149 @@ class Space(APIResource["Space"]):
|
|
|
385
424
|
company_id,
|
|
386
425
|
),
|
|
387
426
|
)
|
|
427
|
+
|
|
428
|
+
@classmethod
|
|
429
|
+
def create_space(
|
|
430
|
+
cls,
|
|
431
|
+
user_id: str,
|
|
432
|
+
company_id: str,
|
|
433
|
+
**params: Unpack["Space.CreateSpaceParams"],
|
|
434
|
+
) -> "Space":
|
|
435
|
+
return cast(
|
|
436
|
+
"Space",
|
|
437
|
+
cls._static_request(
|
|
438
|
+
"post",
|
|
439
|
+
"/space",
|
|
440
|
+
user_id,
|
|
441
|
+
company_id,
|
|
442
|
+
params=params,
|
|
443
|
+
),
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
@classmethod
|
|
447
|
+
async def create_space_async(
|
|
448
|
+
cls,
|
|
449
|
+
user_id: str,
|
|
450
|
+
company_id: str,
|
|
451
|
+
**params: Unpack["Space.CreateSpaceParams"],
|
|
452
|
+
) -> "Space":
|
|
453
|
+
return cast(
|
|
454
|
+
"Space",
|
|
455
|
+
await cls._static_request_async(
|
|
456
|
+
"post",
|
|
457
|
+
"/space",
|
|
458
|
+
user_id,
|
|
459
|
+
company_id,
|
|
460
|
+
params=params,
|
|
461
|
+
),
|
|
462
|
+
)
|
|
463
|
+
|
|
464
|
+
@classmethod
|
|
465
|
+
def get_space_access(
|
|
466
|
+
cls,
|
|
467
|
+
user_id: str,
|
|
468
|
+
company_id: str,
|
|
469
|
+
space_id: str,
|
|
470
|
+
) -> "Space.SpaceAccessResponse":
|
|
471
|
+
return cast(
|
|
472
|
+
"Space.SpaceAccessResponse",
|
|
473
|
+
cls._static_request(
|
|
474
|
+
"get",
|
|
475
|
+
f"/space/{space_id}/access",
|
|
476
|
+
user_id,
|
|
477
|
+
company_id,
|
|
478
|
+
),
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
@classmethod
|
|
482
|
+
async def get_space_access_async(
|
|
483
|
+
cls,
|
|
484
|
+
user_id: str,
|
|
485
|
+
company_id: str,
|
|
486
|
+
space_id: str,
|
|
487
|
+
) -> "Space.SpaceAccessResponse":
|
|
488
|
+
return cast(
|
|
489
|
+
"Space.SpaceAccessResponse",
|
|
490
|
+
await cls._static_request_async(
|
|
491
|
+
"get",
|
|
492
|
+
f"/space/{space_id}/access",
|
|
493
|
+
user_id,
|
|
494
|
+
company_id,
|
|
495
|
+
),
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
@classmethod
|
|
499
|
+
def add_space_access(
|
|
500
|
+
cls,
|
|
501
|
+
user_id: str,
|
|
502
|
+
company_id: str,
|
|
503
|
+
space_id: str,
|
|
504
|
+
**params: Unpack["Space.AddSpaceAccessParams"],
|
|
505
|
+
) -> "Space.SpaceAccessResponse":
|
|
506
|
+
return cast(
|
|
507
|
+
"Space.SpaceAccessResponse",
|
|
508
|
+
cls._static_request(
|
|
509
|
+
"post",
|
|
510
|
+
f"/space/{space_id}/access",
|
|
511
|
+
user_id,
|
|
512
|
+
company_id,
|
|
513
|
+
params=params,
|
|
514
|
+
),
|
|
515
|
+
)
|
|
516
|
+
|
|
517
|
+
@classmethod
|
|
518
|
+
async def add_space_access_async(
|
|
519
|
+
cls,
|
|
520
|
+
user_id: str,
|
|
521
|
+
company_id: str,
|
|
522
|
+
space_id: str,
|
|
523
|
+
**params: Unpack["Space.AddSpaceAccessParams"],
|
|
524
|
+
) -> "Space.SpaceAccessResponse":
|
|
525
|
+
return cast(
|
|
526
|
+
"Space.SpaceAccessResponse",
|
|
527
|
+
await cls._static_request_async(
|
|
528
|
+
"post",
|
|
529
|
+
f"/space/{space_id}/access",
|
|
530
|
+
user_id,
|
|
531
|
+
company_id,
|
|
532
|
+
params=params,
|
|
533
|
+
),
|
|
534
|
+
)
|
|
535
|
+
|
|
536
|
+
@classmethod
|
|
537
|
+
def delete_space_access(
|
|
538
|
+
cls,
|
|
539
|
+
user_id: str,
|
|
540
|
+
company_id: str,
|
|
541
|
+
space_id: str,
|
|
542
|
+
**params: Unpack["Space.DeleteSpaceAccessParams"],
|
|
543
|
+
) -> "Space.DeleteSpaceAccessResponse":
|
|
544
|
+
return cast(
|
|
545
|
+
"Space.DeleteSpaceAccessResponse",
|
|
546
|
+
cls._static_request(
|
|
547
|
+
"delete",
|
|
548
|
+
f"/space/{space_id}/access",
|
|
549
|
+
user_id,
|
|
550
|
+
company_id,
|
|
551
|
+
params=params,
|
|
552
|
+
),
|
|
553
|
+
)
|
|
554
|
+
|
|
555
|
+
@classmethod
|
|
556
|
+
async def delete_space_access_async(
|
|
557
|
+
cls,
|
|
558
|
+
user_id: str,
|
|
559
|
+
company_id: str,
|
|
560
|
+
space_id: str,
|
|
561
|
+
**params: Unpack["Space.DeleteSpaceAccessParams"],
|
|
562
|
+
) -> "Space.DeleteSpaceAccessResponse":
|
|
563
|
+
return cast(
|
|
564
|
+
"Space.DeleteSpaceAccessResponse",
|
|
565
|
+
await cls._static_request_async(
|
|
566
|
+
"delete",
|
|
567
|
+
f"/space/{space_id}/access",
|
|
568
|
+
user_id,
|
|
569
|
+
company_id,
|
|
570
|
+
params=params,
|
|
571
|
+
),
|
|
572
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_sdk
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.63
|
|
4
4
|
Summary:
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Martin Fadler
|
|
@@ -28,6 +28,9 @@ All notable changes to this project will be documented in this file.
|
|
|
28
28
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
29
29
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
30
30
|
|
|
31
|
+
## [0.10.63] - 2025-12-23
|
|
32
|
+
- Add functions to craete a space and manage its access.
|
|
33
|
+
|
|
31
34
|
## [0.10.62] - 2025-12-23
|
|
32
35
|
- Add get user gorups function and allow the get users function to filter by username.
|
|
33
36
|
|
|
@@ -32,14 +32,14 @@ unique_sdk/api_resources/_message_log.py,sha256=_DifZ4Di7uKyzkP0i8rwu5IIiYZPCBp5
|
|
|
32
32
|
unique_sdk/api_resources/_search.py,sha256=GQItZKoGNOVZfkLLltBmsRZYBIreRKU0lGW8Kgpj1_Q,1959
|
|
33
33
|
unique_sdk/api_resources/_search_string.py,sha256=LZz2_QPZXV1NXucRR06dnDC2miK7J8XBY7dXX2xoDY4,1610
|
|
34
34
|
unique_sdk/api_resources/_short_term_memory.py,sha256=vPRN-Y0WPx74E6y-A3LocGc0TxJdzT-xGL66WzZwKRg,2820
|
|
35
|
-
unique_sdk/api_resources/_space.py,sha256=
|
|
35
|
+
unique_sdk/api_resources/_space.py,sha256=bIeR2IOba2Nzzz4HP15dDEXe50mx7gh9GfatDxwNGXo,14598
|
|
36
36
|
unique_sdk/api_resources/_user.py,sha256=XGlE3SDtv-0qs9boT-ts6F2Cxq8RXAT5OCrvY5nOCx8,4677
|
|
37
37
|
unique_sdk/utils/chat_history.py,sha256=5UqL9hF1O9pV7skbNOlEibF5rHdYsmG3m5-YEPUowOs,3037
|
|
38
38
|
unique_sdk/utils/chat_in_space.py,sha256=mBH4W-Jb8wgGCYV3m12LvoLjTE56xdwUTC-ghMupkSs,5889
|
|
39
39
|
unique_sdk/utils/file_io.py,sha256=z0VdAOtrkU-tMq2v-nogeHtBku3TtnM5eJDHAR6A0-w,5721
|
|
40
40
|
unique_sdk/utils/sources.py,sha256=DoxxhMLcLhmDfNarjXa41H4JD2GSSDywr71hiC-4pYc,4952
|
|
41
41
|
unique_sdk/utils/token.py,sha256=AzKuAA1AwBtnvSFxGcsHLpxXr_wWE5Mj4jYBbOz2ljA,1740
|
|
42
|
-
unique_sdk-0.10.
|
|
43
|
-
unique_sdk-0.10.
|
|
44
|
-
unique_sdk-0.10.
|
|
45
|
-
unique_sdk-0.10.
|
|
42
|
+
unique_sdk-0.10.63.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
|
|
43
|
+
unique_sdk-0.10.63.dist-info/METADATA,sha256=EiN1b3u7xQ_64Fia3zXToNH0x9IkuCOPXowvkx51vkY,11163
|
|
44
|
+
unique_sdk-0.10.63.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
45
|
+
unique_sdk-0.10.63.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|