File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import type {
9
9
CoreAPIFolder ,
10
10
CoreAPITable ,
11
11
PostDataSourceDocumentRequestBody ,
12
+ ProviderVisibility ,
12
13
} from "@dust-tt/types" ;
13
14
import {
14
15
isValidDate ,
@@ -1249,7 +1250,7 @@ export async function _upsertDataSourceFolder({
1249
1250
parentId : string | null ;
1250
1251
title : string ;
1251
1252
mimeType : string ;
1252
- providerVisibility ?: string ;
1253
+ providerVisibility ?: ProviderVisibility ;
1253
1254
} ) {
1254
1255
const now = new Date ( ) ;
1255
1256
Original file line number Diff line number Diff line change @@ -841,7 +841,7 @@ export class DustAPI {
841
841
parentId : string | null ;
842
842
parents : string [ ] ;
843
843
mimeType : string ;
844
- providerVisibility : string | null ;
844
+ providerVisibility : "public" | "private" | null ;
845
845
} ) {
846
846
const res = await this . request ( {
847
847
method : "POST" ,
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ export type ConnectorType = {
56
56
*/
57
57
export type ConnectorPermission = "read" | "write" | "read_write" | "none" ;
58
58
export type ContentNodeType = "file" | "folder" | "database" | "channel" ;
59
+ export type ProviderVisibility = "public" | "private" ;
59
60
60
61
/*
61
62
* This constant defines the priority order for sorting content nodes by their type.
@@ -107,7 +108,7 @@ export interface ContentNode {
107
108
preventSelection ?: boolean ;
108
109
permission : ConnectorPermission ;
109
110
lastUpdatedAt : number | null ;
110
- providerVisibility ?: "public" | "private" ;
111
+ providerVisibility ?: ProviderVisibility ;
111
112
}
112
113
113
114
export type ContentNodeWithParentIds = ContentNode & {
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import {
26
26
import { LightWorkspaceType } from "../../front/user" ;
27
27
import { LoggerInterface } from "../../shared/logger" ;
28
28
import { Err , Ok , Result } from "../../shared/result" ;
29
+ import { ProviderVisibility } from "./connectors_api" ;
29
30
30
31
export const MAX_CHUNK_SIZE = 512 ;
31
32
@@ -1553,7 +1554,7 @@ export class CoreAPI {
1553
1554
parents : string [ ] ;
1554
1555
title : string ;
1555
1556
mimeType : string ;
1556
- providerVisibility : string | null | undefined ;
1557
+ providerVisibility : ProviderVisibility | null | undefined ;
1557
1558
} ) : Promise < CoreAPIResponse < { folder : CoreAPIFolder } > > {
1558
1559
const response = await this . _fetchWithError (
1559
1560
`${ this . _url } /projects/${ projectId } /data_sources/${ encodeURIComponent (
You can’t perform that action at this time.
0 commit comments