unique_sdk 0.9.32__py3-none-any.whl → 0.9.35__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/_folder.py +69 -12
- {unique_sdk-0.9.32.dist-info → unique_sdk-0.9.35.dist-info}/METADATA +100 -8
- {unique_sdk-0.9.32.dist-info → unique_sdk-0.9.35.dist-info}/RECORD +5 -5
- {unique_sdk-0.9.32.dist-info → unique_sdk-0.9.35.dist-info}/LICENSE +0 -0
- {unique_sdk-0.9.32.dist-info → unique_sdk-0.9.35.dist-info}/WHEEL +0 -0
|
@@ -78,6 +78,19 @@ class Folder(APIResource["Folder"]):
|
|
|
78
78
|
class CreateParams(RequestOptions):
|
|
79
79
|
paths: List[str]
|
|
80
80
|
|
|
81
|
+
class FolderInfo(TypedDict):
|
|
82
|
+
"""
|
|
83
|
+
Represents the information of a folder.
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
id: str
|
|
87
|
+
name: str
|
|
88
|
+
ingestionConfig: "Folder.IngestionConfig"
|
|
89
|
+
createdAt: str | None
|
|
90
|
+
updatedAt: str | None
|
|
91
|
+
parentId: str | None
|
|
92
|
+
externalId: str | None
|
|
93
|
+
|
|
81
94
|
id: str
|
|
82
95
|
name: str
|
|
83
96
|
scopeAccess: List[ScopeAccess]
|
|
@@ -88,6 +101,8 @@ class Folder(APIResource["Folder"]):
|
|
|
88
101
|
Parameters for updating folder ingestion config.
|
|
89
102
|
"""
|
|
90
103
|
|
|
104
|
+
scopeId: str | None
|
|
105
|
+
folderPath: str | None
|
|
91
106
|
ingestionConfig: "Folder.IngestionConfig"
|
|
92
107
|
applyToSubScopes: bool
|
|
93
108
|
|
|
@@ -96,6 +111,8 @@ class Folder(APIResource["Folder"]):
|
|
|
96
111
|
Parameters for adding access to a folder.
|
|
97
112
|
"""
|
|
98
113
|
|
|
114
|
+
scopeId: str | None
|
|
115
|
+
folderPath: str | None
|
|
99
116
|
scopeAccesses: List["Folder.ScopeAccess"]
|
|
100
117
|
applyToSubScopes: bool
|
|
101
118
|
|
|
@@ -104,9 +121,55 @@ class Folder(APIResource["Folder"]):
|
|
|
104
121
|
Parameters for removing access from a folder.
|
|
105
122
|
"""
|
|
106
123
|
|
|
124
|
+
scopeId: str | None
|
|
125
|
+
folderPath: str | None
|
|
107
126
|
scopeAccesses: List["Folder.ScopeAccess"]
|
|
108
127
|
applyToSubScopes: bool
|
|
109
128
|
|
|
129
|
+
class GetParams(RequestOptions):
|
|
130
|
+
"""
|
|
131
|
+
Parameters for getting a folder by its ID or path.
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
scopeId: str | None = None
|
|
135
|
+
folderPath: str | None = None
|
|
136
|
+
|
|
137
|
+
@classmethod
|
|
138
|
+
def get_info(
|
|
139
|
+
cls, user_id: str, company_id: str, **params: Unpack["Folder.GetParams"]
|
|
140
|
+
) -> "Folder.FolderInfo":
|
|
141
|
+
"""
|
|
142
|
+
Get a folder by its ID or path.
|
|
143
|
+
"""
|
|
144
|
+
return cast(
|
|
145
|
+
"Folder.FolderInfo",
|
|
146
|
+
cls._static_request(
|
|
147
|
+
"get",
|
|
148
|
+
"/folder/info",
|
|
149
|
+
user_id,
|
|
150
|
+
company_id,
|
|
151
|
+
params=params,
|
|
152
|
+
),
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
@classmethod
|
|
156
|
+
async def get_info_async(
|
|
157
|
+
cls, user_id: str, company_id: str, **params: Unpack["Folder.GetParams"]
|
|
158
|
+
) -> "Folder.FolderInfo":
|
|
159
|
+
"""
|
|
160
|
+
Async get a folder by its ID or path.
|
|
161
|
+
"""
|
|
162
|
+
return cast(
|
|
163
|
+
"Folder.FolderInfo",
|
|
164
|
+
await cls._static_request_async(
|
|
165
|
+
"get",
|
|
166
|
+
"/folder/info",
|
|
167
|
+
user_id,
|
|
168
|
+
company_id,
|
|
169
|
+
params=params,
|
|
170
|
+
),
|
|
171
|
+
)
|
|
172
|
+
|
|
110
173
|
@classmethod
|
|
111
174
|
def create_paths(
|
|
112
175
|
cls, user_id: str, company_id: str, **params: Unpack["Folder.CreateParams"]
|
|
@@ -142,7 +205,6 @@ class Folder(APIResource["Folder"]):
|
|
|
142
205
|
cls,
|
|
143
206
|
user_id: str,
|
|
144
207
|
company_id: str,
|
|
145
|
-
scope_id: str,
|
|
146
208
|
**params: Unpack["Folder.UpdateIngestionConfigParams"],
|
|
147
209
|
) -> "Folder":
|
|
148
210
|
"""
|
|
@@ -152,7 +214,7 @@ class Folder(APIResource["Folder"]):
|
|
|
152
214
|
"Folder",
|
|
153
215
|
cls._static_request(
|
|
154
216
|
"patch",
|
|
155
|
-
|
|
217
|
+
"/folder/ingestion-config",
|
|
156
218
|
user_id,
|
|
157
219
|
company_id,
|
|
158
220
|
params=params,
|
|
@@ -164,7 +226,6 @@ class Folder(APIResource["Folder"]):
|
|
|
164
226
|
cls,
|
|
165
227
|
user_id: str,
|
|
166
228
|
company_id: str,
|
|
167
|
-
scope_id: str,
|
|
168
229
|
**params: Unpack["Folder.UpdateIngestionConfigParams"],
|
|
169
230
|
) -> "Folder":
|
|
170
231
|
"""
|
|
@@ -174,7 +235,7 @@ class Folder(APIResource["Folder"]):
|
|
|
174
235
|
"Folder",
|
|
175
236
|
await cls._static_request_async(
|
|
176
237
|
"patch",
|
|
177
|
-
|
|
238
|
+
"/folder/ingestion-config",
|
|
178
239
|
user_id,
|
|
179
240
|
company_id,
|
|
180
241
|
params=params,
|
|
@@ -186,7 +247,6 @@ class Folder(APIResource["Folder"]):
|
|
|
186
247
|
cls,
|
|
187
248
|
user_id: str,
|
|
188
249
|
company_id: str,
|
|
189
|
-
scope_id: str,
|
|
190
250
|
**params: Unpack["Folder.AddAccessParams"],
|
|
191
251
|
) -> "Folder":
|
|
192
252
|
"""
|
|
@@ -196,7 +256,7 @@ class Folder(APIResource["Folder"]):
|
|
|
196
256
|
"Folder",
|
|
197
257
|
cls._static_request(
|
|
198
258
|
"patch",
|
|
199
|
-
|
|
259
|
+
"/folder/add-access",
|
|
200
260
|
user_id,
|
|
201
261
|
company_id,
|
|
202
262
|
params=params,
|
|
@@ -208,7 +268,6 @@ class Folder(APIResource["Folder"]):
|
|
|
208
268
|
cls,
|
|
209
269
|
user_id: str,
|
|
210
270
|
company_id: str,
|
|
211
|
-
scope_id: str,
|
|
212
271
|
**params: Unpack["Folder.AddAccessParams"],
|
|
213
272
|
) -> "Folder":
|
|
214
273
|
"""
|
|
@@ -218,7 +277,7 @@ class Folder(APIResource["Folder"]):
|
|
|
218
277
|
"Folder",
|
|
219
278
|
await cls._static_request_async(
|
|
220
279
|
"patch",
|
|
221
|
-
|
|
280
|
+
"/folder/add-access",
|
|
222
281
|
user_id,
|
|
223
282
|
company_id,
|
|
224
283
|
params=params,
|
|
@@ -230,7 +289,6 @@ class Folder(APIResource["Folder"]):
|
|
|
230
289
|
cls,
|
|
231
290
|
user_id: str,
|
|
232
291
|
company_id: str,
|
|
233
|
-
scope_id: str,
|
|
234
292
|
**params: Unpack["Folder.RemoveAccessParams"],
|
|
235
293
|
) -> dict:
|
|
236
294
|
"""
|
|
@@ -240,7 +298,7 @@ class Folder(APIResource["Folder"]):
|
|
|
240
298
|
dict,
|
|
241
299
|
cls._static_request(
|
|
242
300
|
"patch",
|
|
243
|
-
|
|
301
|
+
"/folder/remove-access",
|
|
244
302
|
user_id,
|
|
245
303
|
company_id,
|
|
246
304
|
params=params,
|
|
@@ -252,7 +310,6 @@ class Folder(APIResource["Folder"]):
|
|
|
252
310
|
cls,
|
|
253
311
|
user_id: str,
|
|
254
312
|
company_id: str,
|
|
255
|
-
scope_id: str,
|
|
256
313
|
**params: Unpack["Folder.RemoveAccessParams"],
|
|
257
314
|
) -> "Folder":
|
|
258
315
|
"""
|
|
@@ -262,7 +319,7 @@ class Folder(APIResource["Folder"]):
|
|
|
262
319
|
"Folder",
|
|
263
320
|
await cls._static_request_async(
|
|
264
321
|
"patch",
|
|
265
|
-
|
|
322
|
+
"/folder/remove-access",
|
|
266
323
|
user_id,
|
|
267
324
|
company_id,
|
|
268
325
|
params=params,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: unique_sdk
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.35
|
|
4
4
|
Summary:
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Martin Fadler
|
|
@@ -470,6 +470,30 @@ Allows you to ingest a magic table sheet, each row is processed and converted in
|
|
|
470
470
|
|
|
471
471
|
### Folder
|
|
472
472
|
|
|
473
|
+
#### `unique_sdk.Folder.get`
|
|
474
|
+
|
|
475
|
+
Get a folder by scope id or by path.
|
|
476
|
+
|
|
477
|
+
By scope id:
|
|
478
|
+
|
|
479
|
+
```python
|
|
480
|
+
unique_sdk.Folder.get_info(
|
|
481
|
+
user_id=user_id,
|
|
482
|
+
company_id=company_id,
|
|
483
|
+
scopeId="scope_w78wfn114va9o22s13r03yq",
|
|
484
|
+
)
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
By path:
|
|
488
|
+
|
|
489
|
+
```python
|
|
490
|
+
unique_sdk.Folder.get_info(
|
|
491
|
+
user_id=user_id,
|
|
492
|
+
company_id=company_id,
|
|
493
|
+
folderPath="/Company/Atlas/Due Dilligence/Arch,
|
|
494
|
+
)
|
|
495
|
+
```
|
|
496
|
+
|
|
473
497
|
#### `unique_sdk.Folder.create_paths`
|
|
474
498
|
|
|
475
499
|
Create each folder in the provided list of paths if it does not already exist.
|
|
@@ -484,18 +508,35 @@ unique_sdk.Folder.create_paths(
|
|
|
484
508
|
|
|
485
509
|
#### `unique_sdk.Folder.update_ingestion_config`
|
|
486
510
|
|
|
487
|
-
Allows you to update the ingestion config of a folder and whether to apply to the subscopes or not: `
|
|
511
|
+
Allows you to update the ingestion config of a folder and choose whether to apply to the subscopes or not: `
|
|
488
512
|
|
|
489
513
|
- `ingestionConfig`
|
|
490
514
|
- `applyToSubScopes`
|
|
491
515
|
|
|
492
|
-
|
|
516
|
+
The update can be done by referencing the folder by id or by path. If none of them are provided. the API will return an error. If both of them are provided, the scope id will take precedence.
|
|
517
|
+
|
|
518
|
+
Example of updating the ingestion config of a folder and its subfolders using the id.
|
|
493
519
|
|
|
494
520
|
```python
|
|
495
521
|
unique_sdk.Folder.update_ingestion_config(
|
|
496
522
|
user_id=user_id,
|
|
497
523
|
company_id=company_id,
|
|
498
|
-
|
|
524
|
+
scopeId="scope_qbnkde820dbmuw2900,
|
|
525
|
+
ingestionConfig={
|
|
526
|
+
"chunkStrategy": "default",
|
|
527
|
+
"uniqueIngestionMode": "standard",
|
|
528
|
+
},
|
|
529
|
+
applyToSubScopes=True
|
|
530
|
+
)
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
Example of updating the ingestion config of a folder and its subfolders using the path.
|
|
534
|
+
|
|
535
|
+
```python
|
|
536
|
+
unique_sdk.Folder.update_ingestion_config(
|
|
537
|
+
user_id=user_id,
|
|
538
|
+
company_id=company_id,
|
|
539
|
+
folderPath="/Company/folder1/folder2",
|
|
499
540
|
ingestionConfig={
|
|
500
541
|
"chunkStrategy": "default",
|
|
501
542
|
"uniqueIngestionMode": "standard",
|
|
@@ -511,13 +552,33 @@ Allows you to add access to a folder and apply to the subfolders or not: `
|
|
|
511
552
|
- `scopeAccesses`
|
|
512
553
|
- `applyToSubScopes`
|
|
513
554
|
|
|
514
|
-
|
|
555
|
+
The update can be done by referencing the folder by id or by path. If none of them are provided. the API will return an error. If both of them are provided, the scope id will take precedence.
|
|
556
|
+
|
|
557
|
+
Example of adding access to a folder and its subfolders using the id.
|
|
515
558
|
|
|
516
559
|
```python
|
|
517
560
|
unique_sdk.Folder.add_access(
|
|
518
561
|
user_id=user_id,
|
|
519
562
|
company_id=company_id,
|
|
520
|
-
|
|
563
|
+
scopeId="scope_231e4kjn4foffww34",
|
|
564
|
+
scopeAccesses=[
|
|
565
|
+
{
|
|
566
|
+
"entityId": "group_id",
|
|
567
|
+
"type": "WRITE",
|
|
568
|
+
"entityType": "GROUP",
|
|
569
|
+
}
|
|
570
|
+
],
|
|
571
|
+
applyToSubScopes=True,
|
|
572
|
+
)
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
Example of adding access to a folder and its subfolders using the folder path.
|
|
576
|
+
|
|
577
|
+
```python
|
|
578
|
+
unique_sdk.Folder.add_access(
|
|
579
|
+
user_id=user_id,
|
|
580
|
+
company_id=company_id,
|
|
581
|
+
folderPath="/Company/folder1/folder2"
|
|
521
582
|
scopeAccesses=[
|
|
522
583
|
{
|
|
523
584
|
"entityId": "group_id",
|
|
@@ -536,13 +597,35 @@ Allows you to delete access from a folder and apply to the subfolders or not: `
|
|
|
536
597
|
- `scopeAccesses`
|
|
537
598
|
- `applyToSubScopes`
|
|
538
599
|
|
|
539
|
-
|
|
600
|
+
The update can be done by referencing the folder by id or by path. If none of them are provided. the API will return an error. If both of them are provided, the scope id will take precedence.
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
Example of deleting the access from a folder and its subfolders using the id.
|
|
604
|
+
|
|
605
|
+
```python
|
|
606
|
+
unique_sdk.Folder.remove_access(
|
|
607
|
+
user_id=user_id,
|
|
608
|
+
company_id=company_id,
|
|
609
|
+
scopeId="scope_dwekjnf3330woioppm,
|
|
610
|
+
scopeAccesses=[
|
|
611
|
+
{
|
|
612
|
+
"entityId": "group_id",
|
|
613
|
+
"type": "WRITE",
|
|
614
|
+
"entityType": "GROUP",
|
|
615
|
+
}
|
|
616
|
+
],
|
|
617
|
+
applyToSubScopes=True,
|
|
618
|
+
)
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
Example of deleting the access from a folder and its subfolders using the path.
|
|
540
623
|
|
|
541
624
|
```python
|
|
542
625
|
unique_sdk.Folder.remove_access(
|
|
543
626
|
user_id=user_id,
|
|
544
627
|
company_id=company_id,
|
|
545
|
-
|
|
628
|
+
folderPath="/Company/folder1/folder2"
|
|
546
629
|
scopeAccesses=[
|
|
547
630
|
{
|
|
548
631
|
"entityId": "group_id",
|
|
@@ -1146,6 +1229,15 @@ All notable changes to this project will be documented in this file.
|
|
|
1146
1229
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
1147
1230
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
1148
1231
|
|
|
1232
|
+
## [0.9.35] - 2025-06-18
|
|
1233
|
+
- Allow scope access updates (add/remove) on folder based on scope id or path.
|
|
1234
|
+
|
|
1235
|
+
## [0.9.34] - 2025-06-17
|
|
1236
|
+
- Allow ingestion config updates on folder based on scope id or path.
|
|
1237
|
+
|
|
1238
|
+
## [0.9.33] - 2025-06-11
|
|
1239
|
+
- Add function to get a folder by id or by path.
|
|
1240
|
+
|
|
1149
1241
|
## [0.9.32] - 2025-06-11
|
|
1150
1242
|
- Add function to ingest magic table sheets.
|
|
1151
1243
|
|
|
@@ -19,7 +19,7 @@ unique_sdk/api_resources/_chat_completion.py,sha256=hAPPHxoljcoHeTboxoJkcXgpqA2h
|
|
|
19
19
|
unique_sdk/api_resources/_content.py,sha256=BLv4qXdazSYy_L0Z9ihr0hquE3xFIY32CBpfbOkxSpE,9527
|
|
20
20
|
unique_sdk/api_resources/_embedding.py,sha256=C6qak7cCUBMBINfPhgH8taCJZ9n6w1MUElqDJJ8dG10,1281
|
|
21
21
|
unique_sdk/api_resources/_event.py,sha256=bpWF9vstdoAWbUzr-iiGP713ceP0zPk77GJXiImf9zg,374
|
|
22
|
-
unique_sdk/api_resources/_folder.py,sha256=
|
|
22
|
+
unique_sdk/api_resources/_folder.py,sha256=dmPorUoOJSe-hcxlJq3RnkQeZg3gPqGF37ZsLgnloT0,8335
|
|
23
23
|
unique_sdk/api_resources/_integrated.py,sha256=l1vS8kJiSLie61mqDO3KI2MNmYwFydmCIoJpP_tPhSI,2956
|
|
24
24
|
unique_sdk/api_resources/_message.py,sha256=gEDIzg3METZU2k7m69meAuf0IWmZxnYOjbBKPRMwPYE,7688
|
|
25
25
|
unique_sdk/api_resources/_message_assessment.py,sha256=SSfx6eW7zb_GKe8cFJzCqW-t-_eWEXxKP5cnIb0DhIc,2276
|
|
@@ -30,7 +30,7 @@ unique_sdk/utils/chat_history.py,sha256=5UqL9hF1O9pV7skbNOlEibF5rHdYsmG3m5-YEPUo
|
|
|
30
30
|
unique_sdk/utils/file_io.py,sha256=YY8B7VJcTLOPmCXByiOfNerXGlAtjCC5EVNmAbQJ3dQ,4306
|
|
31
31
|
unique_sdk/utils/sources.py,sha256=wfboE-neMKa0Wuq9QzfAEFMkNLrIrmm0v-QF33sLo6k,4952
|
|
32
32
|
unique_sdk/utils/token.py,sha256=AzKuAA1AwBtnvSFxGcsHLpxXr_wWE5Mj4jYBbOz2ljA,1740
|
|
33
|
-
unique_sdk-0.9.
|
|
34
|
-
unique_sdk-0.9.
|
|
35
|
-
unique_sdk-0.9.
|
|
36
|
-
unique_sdk-0.9.
|
|
33
|
+
unique_sdk-0.9.35.dist-info/LICENSE,sha256=EJCWoHgrXVBUb47PnjeV4MFIEOR71MAdCOIgv61J-4k,1065
|
|
34
|
+
unique_sdk-0.9.35.dist-info/METADATA,sha256=Dt2oGjlLS-BCKfEthkcQvpmzzm4_4GvTi1YI2cpF_Xs,39169
|
|
35
|
+
unique_sdk-0.9.35.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
36
|
+
unique_sdk-0.9.35.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|