File tree Expand file tree Collapse file tree 5 files changed +12
-0
lines changed
front/pages/api/v1/w/[wId]/spaces/[spaceId]/data_sources/[dsId]/folders Expand file tree Collapse file tree 5 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1240,6 +1240,7 @@ export async function _upsertDataSourceFolder({
1240
1240
parentId,
1241
1241
title,
1242
1242
mimeType,
1243
+ providerVisibility,
1243
1244
} : {
1244
1245
dataSourceConfig : DataSourceConfig ;
1245
1246
folderId : string ;
@@ -1248,6 +1249,7 @@ export async function _upsertDataSourceFolder({
1248
1249
parentId : string | null ;
1249
1250
title : string ;
1250
1251
mimeType : string ;
1252
+ providerVisibility ?: string ;
1251
1253
} ) {
1252
1254
const now = new Date ( ) ;
1253
1255
@@ -1259,6 +1261,7 @@ export async function _upsertDataSourceFolder({
1259
1261
parentId,
1260
1262
parents,
1261
1263
mimeType,
1264
+ providerVisibility : providerVisibility || null ,
1262
1265
} ) ;
1263
1266
1264
1267
if ( r . isErr ( ) ) {
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ async function handler(
120
120
parents,
121
121
title,
122
122
mime_type,
123
+ provider_visibility,
123
124
} = r . data ;
124
125
if ( parentId && parents && parents [ 1 ] !== parentId ) {
125
126
return apiError ( req , res , {
@@ -153,6 +154,7 @@ async function handler(
153
154
parents : parents || [ fId ] ,
154
155
title : title ,
155
156
mimeType : mime_type ,
157
+ providerVisibility : provider_visibility ,
156
158
} ) ;
157
159
158
160
if ( upsertRes . isErr ( ) ) {
Original file line number Diff line number Diff line change @@ -829,6 +829,7 @@ export class DustAPI {
829
829
parentId,
830
830
parents,
831
831
mimeType,
832
+ providerVisibility,
832
833
} : {
833
834
dataSourceId : string ;
834
835
folderId : string ;
@@ -837,6 +838,7 @@ export class DustAPI {
837
838
parentId : string | null ;
838
839
parents : string [ ] ;
839
840
mimeType : string ;
841
+ providerVisibility : string | null ;
840
842
} ) {
841
843
const res = await this . request ( {
842
844
method : "POST" ,
@@ -849,6 +851,7 @@ export class DustAPI {
849
851
parent_id : parentId ,
850
852
parents,
851
853
mime_type : mimeType ,
854
+ provider_visibility : providerVisibility ,
852
855
} ,
853
856
} ) ;
854
857
Original file line number Diff line number Diff line change @@ -2120,6 +2120,7 @@ export const UpsertDataSourceFolderRequestSchema = z.object({
2120
2120
parent_id : z . string ( ) . nullable ( ) . optional ( ) ,
2121
2121
title : z . string ( ) ,
2122
2122
mime_type : z . string ( ) ,
2123
+ provider_visibility : z . string ( ) . nullable ( ) . optional ( ) ,
2123
2124
} ) ;
2124
2125
export type UpsertDataSourceFolderRequestType = z . infer <
2125
2126
typeof UpsertDataSourceFolderRequestSchema
Original file line number Diff line number Diff line change @@ -1543,6 +1543,7 @@ export class CoreAPI {
1543
1543
parents,
1544
1544
title,
1545
1545
mimeType,
1546
+ providerVisibility,
1546
1547
} : {
1547
1548
projectId : string ;
1548
1549
dataSourceId : string ;
@@ -1552,6 +1553,7 @@ export class CoreAPI {
1552
1553
parents : string [ ] ;
1553
1554
title : string ;
1554
1555
mimeType : string ;
1556
+ providerVisibility : string | null | undefined ;
1555
1557
} ) : Promise < CoreAPIResponse < { folder : CoreAPIFolder } > > {
1556
1558
const response = await this . _fetchWithError (
1557
1559
`${ this . _url } /projects/${ projectId } /data_sources/${ encodeURIComponent (
@@ -1569,6 +1571,7 @@ export class CoreAPI {
1569
1571
parent_id : parentId ,
1570
1572
parents,
1571
1573
mime_type : mimeType ,
1574
+ provider_visibility : providerVisibility ,
1572
1575
} ) ,
1573
1576
}
1574
1577
) ;
You can’t perform that action at this time.
0 commit comments