@sybil-studio-devs/sdk 0.1.0 → 0.2.0
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.
- package/README.md +433 -146
- package/dist/atlas/index.d.mts +28 -0
- package/dist/atlas/index.d.ts +28 -0
- package/dist/atlas/index.js +418 -0
- package/dist/atlas/index.mjs +8 -0
- package/dist/chunk-B6RXZKRY.mjs +391 -0
- package/dist/chunk-IN53AFMQ.mjs +348 -0
- package/dist/chunk-MM27YV6Z.mjs +668 -0
- package/dist/client-BPFcAPV8.d.mts +428 -0
- package/dist/client-BPFcAPV8.d.ts +428 -0
- package/dist/index.d.mts +8 -394
- package/dist/index.d.ts +8 -394
- package/dist/index.js +1159 -7
- package/dist/index.mjs +19 -252
- package/dist/nexus/index.d.mts +34 -0
- package/dist/nexus/index.d.ts +34 -0
- package/dist/nexus/index.js +695 -0
- package/dist/nexus/index.mjs +8 -0
- package/dist/react/index.d.mts +235 -0
- package/dist/react/index.d.ts +235 -0
- package/dist/react/index.js +2354 -0
- package/dist/react/index.mjs +935 -0
- package/dist/types-BjxgQxBW.d.mts +182 -0
- package/dist/types-BjxgQxBW.d.ts +182 -0
- package/dist/types-DVY5_vpY.d.mts +258 -0
- package/dist/types-DVY5_vpY.d.ts +258 -0
- package/package.json +33 -5
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
interface AtlasTheme {
|
|
2
|
+
background?: string;
|
|
3
|
+
backgroundSecondary?: string;
|
|
4
|
+
text?: string;
|
|
5
|
+
textSecondary?: string;
|
|
6
|
+
textMuted?: string;
|
|
7
|
+
border?: string;
|
|
8
|
+
accent?: string;
|
|
9
|
+
accentText?: string;
|
|
10
|
+
sidebarBackground?: string;
|
|
11
|
+
sidebarText?: string;
|
|
12
|
+
sidebarHover?: string;
|
|
13
|
+
}
|
|
14
|
+
interface AtlasPage {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
slug?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
icon?: string;
|
|
20
|
+
coverImage?: string;
|
|
21
|
+
blocks: AtlasBlock[];
|
|
22
|
+
parentId?: string | null;
|
|
23
|
+
isPublished: boolean;
|
|
24
|
+
isFavorite?: boolean;
|
|
25
|
+
visibilityScope?: 'private' | 'shared' | 'teamspace';
|
|
26
|
+
teamspaceId?: string | null;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
updatedAt: string;
|
|
29
|
+
version: number;
|
|
30
|
+
}
|
|
31
|
+
interface AtlasBlock {
|
|
32
|
+
type: string;
|
|
33
|
+
content?: Array<{
|
|
34
|
+
type: string;
|
|
35
|
+
text?: string;
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
}>;
|
|
38
|
+
attrs?: Record<string, unknown>;
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
}
|
|
41
|
+
interface AtlasTeamspace {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
color?: string;
|
|
46
|
+
icon?: string;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
}
|
|
49
|
+
interface AtlasSidebarData {
|
|
50
|
+
private: AtlasSidebarPage[];
|
|
51
|
+
shared: AtlasSidebarPage[];
|
|
52
|
+
favorites: AtlasSidebarPage[];
|
|
53
|
+
teamspaces: Array<AtlasTeamspace & {
|
|
54
|
+
pages: AtlasSidebarPage[];
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
57
|
+
interface AtlasSidebarPage {
|
|
58
|
+
id: string;
|
|
59
|
+
title: string;
|
|
60
|
+
icon?: string;
|
|
61
|
+
parentId?: string | null;
|
|
62
|
+
hasChildren: boolean;
|
|
63
|
+
visibilityScope?: string;
|
|
64
|
+
teamspaceId?: string | null;
|
|
65
|
+
}
|
|
66
|
+
interface AtlasEmbedConfig {
|
|
67
|
+
apiKey: string;
|
|
68
|
+
workspaceId: string;
|
|
69
|
+
container: HTMLElement | string;
|
|
70
|
+
baseUrl?: string;
|
|
71
|
+
theme?: 'light' | 'dark' | AtlasTheme;
|
|
72
|
+
showSidebar?: boolean;
|
|
73
|
+
sidebarWidth?: number;
|
|
74
|
+
sidebarCollapsible?: boolean;
|
|
75
|
+
readOnly?: boolean;
|
|
76
|
+
defaultPageId?: string;
|
|
77
|
+
allowCreate?: boolean;
|
|
78
|
+
allowDelete?: boolean;
|
|
79
|
+
allowExport?: boolean;
|
|
80
|
+
features?: AtlasFeatures;
|
|
81
|
+
logging?: AtlasLoggingConfig;
|
|
82
|
+
onReady?: (instance: AtlasInstance) => void;
|
|
83
|
+
onPageChange?: (page: AtlasPage) => void;
|
|
84
|
+
onPageCreate?: (page: AtlasPage) => void;
|
|
85
|
+
onPageDelete?: (pageId: string) => void;
|
|
86
|
+
onPageUpdate?: (page: AtlasPage) => void;
|
|
87
|
+
onError?: (error: AtlasError) => void;
|
|
88
|
+
onNavigate?: (pageId: string) => void;
|
|
89
|
+
}
|
|
90
|
+
interface AtlasFeatures {
|
|
91
|
+
favorites?: boolean;
|
|
92
|
+
teamspaces?: boolean;
|
|
93
|
+
search?: boolean;
|
|
94
|
+
export?: boolean;
|
|
95
|
+
coverImages?: boolean;
|
|
96
|
+
icons?: boolean;
|
|
97
|
+
comments?: boolean;
|
|
98
|
+
history?: boolean;
|
|
99
|
+
minimap?: boolean;
|
|
100
|
+
floatingToolbar?: boolean;
|
|
101
|
+
aiAssist?: boolean;
|
|
102
|
+
}
|
|
103
|
+
interface AtlasLoggingConfig {
|
|
104
|
+
enabled: boolean;
|
|
105
|
+
level?: 'debug' | 'info' | 'warn' | 'error';
|
|
106
|
+
onLog?: (entry: AtlasLogEntry) => void;
|
|
107
|
+
}
|
|
108
|
+
interface AtlasLogEntry {
|
|
109
|
+
timestamp: string;
|
|
110
|
+
level: 'debug' | 'info' | 'warn' | 'error';
|
|
111
|
+
category: 'api' | 'render' | 'navigation' | 'editor' | 'sync';
|
|
112
|
+
message: string;
|
|
113
|
+
data?: Record<string, unknown>;
|
|
114
|
+
duration?: number;
|
|
115
|
+
}
|
|
116
|
+
interface AtlasError {
|
|
117
|
+
code: string;
|
|
118
|
+
message: string;
|
|
119
|
+
status?: number;
|
|
120
|
+
details?: Record<string, unknown>;
|
|
121
|
+
timestamp: string;
|
|
122
|
+
requestId?: string;
|
|
123
|
+
}
|
|
124
|
+
interface AtlasInstance {
|
|
125
|
+
getPages: () => Promise<AtlasSidebarData>;
|
|
126
|
+
getPage: (pageId: string) => Promise<AtlasPage>;
|
|
127
|
+
createPage: (params: CreateAtlasPageParams) => Promise<AtlasPage>;
|
|
128
|
+
updatePage: (pageId: string, params: UpdateAtlasPageParams) => Promise<AtlasPage>;
|
|
129
|
+
deletePage: (pageId: string) => Promise<void>;
|
|
130
|
+
navigateTo: (pageId: string) => void;
|
|
131
|
+
getCurrentPage: () => AtlasPage | null;
|
|
132
|
+
exportPage: (pageId: string, format: 'pdf' | 'docx' | 'md') => Promise<Blob>;
|
|
133
|
+
toggleSidebar: () => void;
|
|
134
|
+
setSidebarWidth: (width: number) => void;
|
|
135
|
+
setTheme: (theme: 'light' | 'dark' | AtlasTheme) => void;
|
|
136
|
+
refresh: () => Promise<void>;
|
|
137
|
+
destroy: () => void;
|
|
138
|
+
getLogs: () => AtlasLogEntry[];
|
|
139
|
+
clearLogs: () => void;
|
|
140
|
+
}
|
|
141
|
+
interface CreateAtlasPageParams {
|
|
142
|
+
title?: string;
|
|
143
|
+
parentId?: string;
|
|
144
|
+
visibilityScope?: 'private' | 'shared' | 'teamspace';
|
|
145
|
+
teamspaceId?: string;
|
|
146
|
+
icon?: string;
|
|
147
|
+
blocks?: AtlasBlock[];
|
|
148
|
+
}
|
|
149
|
+
interface UpdateAtlasPageParams {
|
|
150
|
+
title?: string;
|
|
151
|
+
description?: string;
|
|
152
|
+
icon?: string;
|
|
153
|
+
coverImage?: string;
|
|
154
|
+
blocks?: AtlasBlock[];
|
|
155
|
+
isPublished?: boolean;
|
|
156
|
+
parentId?: string | null;
|
|
157
|
+
}
|
|
158
|
+
interface AtlasAPIResponse<T> {
|
|
159
|
+
data: T;
|
|
160
|
+
meta?: {
|
|
161
|
+
requestId: string;
|
|
162
|
+
processingTime: number;
|
|
163
|
+
rateLimit?: {
|
|
164
|
+
limit: number;
|
|
165
|
+
remaining: number;
|
|
166
|
+
resetAt: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
interface AtlasAPIError {
|
|
171
|
+
error: {
|
|
172
|
+
code: string;
|
|
173
|
+
message: string;
|
|
174
|
+
details?: Record<string, unknown>;
|
|
175
|
+
};
|
|
176
|
+
meta?: {
|
|
177
|
+
requestId: string;
|
|
178
|
+
timestamp: string;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export type { AtlasTheme as A, CreateAtlasPageParams as C, UpdateAtlasPageParams as U, AtlasPage as a, AtlasBlock as b, AtlasTeamspace as c, AtlasSidebarData as d, AtlasSidebarPage as e, AtlasEmbedConfig as f, AtlasFeatures as g, AtlasLoggingConfig as h, AtlasLogEntry as i, AtlasError as j, AtlasInstance as k, AtlasAPIResponse as l, AtlasAPIError as m };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
interface AtlasTheme {
|
|
2
|
+
background?: string;
|
|
3
|
+
backgroundSecondary?: string;
|
|
4
|
+
text?: string;
|
|
5
|
+
textSecondary?: string;
|
|
6
|
+
textMuted?: string;
|
|
7
|
+
border?: string;
|
|
8
|
+
accent?: string;
|
|
9
|
+
accentText?: string;
|
|
10
|
+
sidebarBackground?: string;
|
|
11
|
+
sidebarText?: string;
|
|
12
|
+
sidebarHover?: string;
|
|
13
|
+
}
|
|
14
|
+
interface AtlasPage {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
slug?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
icon?: string;
|
|
20
|
+
coverImage?: string;
|
|
21
|
+
blocks: AtlasBlock[];
|
|
22
|
+
parentId?: string | null;
|
|
23
|
+
isPublished: boolean;
|
|
24
|
+
isFavorite?: boolean;
|
|
25
|
+
visibilityScope?: 'private' | 'shared' | 'teamspace';
|
|
26
|
+
teamspaceId?: string | null;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
updatedAt: string;
|
|
29
|
+
version: number;
|
|
30
|
+
}
|
|
31
|
+
interface AtlasBlock {
|
|
32
|
+
type: string;
|
|
33
|
+
content?: Array<{
|
|
34
|
+
type: string;
|
|
35
|
+
text?: string;
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
}>;
|
|
38
|
+
attrs?: Record<string, unknown>;
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
}
|
|
41
|
+
interface AtlasTeamspace {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
color?: string;
|
|
46
|
+
icon?: string;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
}
|
|
49
|
+
interface AtlasSidebarData {
|
|
50
|
+
private: AtlasSidebarPage[];
|
|
51
|
+
shared: AtlasSidebarPage[];
|
|
52
|
+
favorites: AtlasSidebarPage[];
|
|
53
|
+
teamspaces: Array<AtlasTeamspace & {
|
|
54
|
+
pages: AtlasSidebarPage[];
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
57
|
+
interface AtlasSidebarPage {
|
|
58
|
+
id: string;
|
|
59
|
+
title: string;
|
|
60
|
+
icon?: string;
|
|
61
|
+
parentId?: string | null;
|
|
62
|
+
hasChildren: boolean;
|
|
63
|
+
visibilityScope?: string;
|
|
64
|
+
teamspaceId?: string | null;
|
|
65
|
+
}
|
|
66
|
+
interface AtlasEmbedConfig {
|
|
67
|
+
apiKey: string;
|
|
68
|
+
workspaceId: string;
|
|
69
|
+
container: HTMLElement | string;
|
|
70
|
+
baseUrl?: string;
|
|
71
|
+
theme?: 'light' | 'dark' | AtlasTheme;
|
|
72
|
+
showSidebar?: boolean;
|
|
73
|
+
sidebarWidth?: number;
|
|
74
|
+
sidebarCollapsible?: boolean;
|
|
75
|
+
readOnly?: boolean;
|
|
76
|
+
defaultPageId?: string;
|
|
77
|
+
allowCreate?: boolean;
|
|
78
|
+
allowDelete?: boolean;
|
|
79
|
+
allowExport?: boolean;
|
|
80
|
+
features?: AtlasFeatures;
|
|
81
|
+
logging?: AtlasLoggingConfig;
|
|
82
|
+
onReady?: (instance: AtlasInstance) => void;
|
|
83
|
+
onPageChange?: (page: AtlasPage) => void;
|
|
84
|
+
onPageCreate?: (page: AtlasPage) => void;
|
|
85
|
+
onPageDelete?: (pageId: string) => void;
|
|
86
|
+
onPageUpdate?: (page: AtlasPage) => void;
|
|
87
|
+
onError?: (error: AtlasError) => void;
|
|
88
|
+
onNavigate?: (pageId: string) => void;
|
|
89
|
+
}
|
|
90
|
+
interface AtlasFeatures {
|
|
91
|
+
favorites?: boolean;
|
|
92
|
+
teamspaces?: boolean;
|
|
93
|
+
search?: boolean;
|
|
94
|
+
export?: boolean;
|
|
95
|
+
coverImages?: boolean;
|
|
96
|
+
icons?: boolean;
|
|
97
|
+
comments?: boolean;
|
|
98
|
+
history?: boolean;
|
|
99
|
+
minimap?: boolean;
|
|
100
|
+
floatingToolbar?: boolean;
|
|
101
|
+
aiAssist?: boolean;
|
|
102
|
+
}
|
|
103
|
+
interface AtlasLoggingConfig {
|
|
104
|
+
enabled: boolean;
|
|
105
|
+
level?: 'debug' | 'info' | 'warn' | 'error';
|
|
106
|
+
onLog?: (entry: AtlasLogEntry) => void;
|
|
107
|
+
}
|
|
108
|
+
interface AtlasLogEntry {
|
|
109
|
+
timestamp: string;
|
|
110
|
+
level: 'debug' | 'info' | 'warn' | 'error';
|
|
111
|
+
category: 'api' | 'render' | 'navigation' | 'editor' | 'sync';
|
|
112
|
+
message: string;
|
|
113
|
+
data?: Record<string, unknown>;
|
|
114
|
+
duration?: number;
|
|
115
|
+
}
|
|
116
|
+
interface AtlasError {
|
|
117
|
+
code: string;
|
|
118
|
+
message: string;
|
|
119
|
+
status?: number;
|
|
120
|
+
details?: Record<string, unknown>;
|
|
121
|
+
timestamp: string;
|
|
122
|
+
requestId?: string;
|
|
123
|
+
}
|
|
124
|
+
interface AtlasInstance {
|
|
125
|
+
getPages: () => Promise<AtlasSidebarData>;
|
|
126
|
+
getPage: (pageId: string) => Promise<AtlasPage>;
|
|
127
|
+
createPage: (params: CreateAtlasPageParams) => Promise<AtlasPage>;
|
|
128
|
+
updatePage: (pageId: string, params: UpdateAtlasPageParams) => Promise<AtlasPage>;
|
|
129
|
+
deletePage: (pageId: string) => Promise<void>;
|
|
130
|
+
navigateTo: (pageId: string) => void;
|
|
131
|
+
getCurrentPage: () => AtlasPage | null;
|
|
132
|
+
exportPage: (pageId: string, format: 'pdf' | 'docx' | 'md') => Promise<Blob>;
|
|
133
|
+
toggleSidebar: () => void;
|
|
134
|
+
setSidebarWidth: (width: number) => void;
|
|
135
|
+
setTheme: (theme: 'light' | 'dark' | AtlasTheme) => void;
|
|
136
|
+
refresh: () => Promise<void>;
|
|
137
|
+
destroy: () => void;
|
|
138
|
+
getLogs: () => AtlasLogEntry[];
|
|
139
|
+
clearLogs: () => void;
|
|
140
|
+
}
|
|
141
|
+
interface CreateAtlasPageParams {
|
|
142
|
+
title?: string;
|
|
143
|
+
parentId?: string;
|
|
144
|
+
visibilityScope?: 'private' | 'shared' | 'teamspace';
|
|
145
|
+
teamspaceId?: string;
|
|
146
|
+
icon?: string;
|
|
147
|
+
blocks?: AtlasBlock[];
|
|
148
|
+
}
|
|
149
|
+
interface UpdateAtlasPageParams {
|
|
150
|
+
title?: string;
|
|
151
|
+
description?: string;
|
|
152
|
+
icon?: string;
|
|
153
|
+
coverImage?: string;
|
|
154
|
+
blocks?: AtlasBlock[];
|
|
155
|
+
isPublished?: boolean;
|
|
156
|
+
parentId?: string | null;
|
|
157
|
+
}
|
|
158
|
+
interface AtlasAPIResponse<T> {
|
|
159
|
+
data: T;
|
|
160
|
+
meta?: {
|
|
161
|
+
requestId: string;
|
|
162
|
+
processingTime: number;
|
|
163
|
+
rateLimit?: {
|
|
164
|
+
limit: number;
|
|
165
|
+
remaining: number;
|
|
166
|
+
resetAt: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
interface AtlasAPIError {
|
|
171
|
+
error: {
|
|
172
|
+
code: string;
|
|
173
|
+
message: string;
|
|
174
|
+
details?: Record<string, unknown>;
|
|
175
|
+
};
|
|
176
|
+
meta?: {
|
|
177
|
+
requestId: string;
|
|
178
|
+
timestamp: string;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export type { AtlasTheme as A, CreateAtlasPageParams as C, UpdateAtlasPageParams as U, AtlasPage as a, AtlasBlock as b, AtlasTeamspace as c, AtlasSidebarData as d, AtlasSidebarPage as e, AtlasEmbedConfig as f, AtlasFeatures as g, AtlasLoggingConfig as h, AtlasLogEntry as i, AtlasError as j, AtlasInstance as k, AtlasAPIResponse as l, AtlasAPIError as m };
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
interface NexusTheme {
|
|
2
|
+
background?: string;
|
|
3
|
+
backgroundSecondary?: string;
|
|
4
|
+
text?: string;
|
|
5
|
+
textSecondary?: string;
|
|
6
|
+
textMuted?: string;
|
|
7
|
+
border?: string;
|
|
8
|
+
accent?: string;
|
|
9
|
+
accentText?: string;
|
|
10
|
+
sidebarBackground?: string;
|
|
11
|
+
folderColor?: string;
|
|
12
|
+
fileIconColors?: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
interface NexusFile {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
originalName: string;
|
|
18
|
+
mimeType: string;
|
|
19
|
+
sizeBytes: number;
|
|
20
|
+
folderId: string | null;
|
|
21
|
+
workspaceId: string;
|
|
22
|
+
storagePath: string;
|
|
23
|
+
isStarred: boolean;
|
|
24
|
+
isTrashed: boolean;
|
|
25
|
+
documentId?: string | null;
|
|
26
|
+
thumbnailUrl?: string | null;
|
|
27
|
+
previewUrl?: string | null;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
createdBy: string;
|
|
32
|
+
}
|
|
33
|
+
interface NexusFolder {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
parentId: string | null;
|
|
37
|
+
workspaceId: string;
|
|
38
|
+
color?: string;
|
|
39
|
+
icon?: string;
|
|
40
|
+
path: string;
|
|
41
|
+
isTrashed: boolean;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
updatedAt: string;
|
|
44
|
+
createdBy: string;
|
|
45
|
+
}
|
|
46
|
+
interface NexusItem {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
itemType: 'file' | 'folder';
|
|
50
|
+
mimeType?: string | null;
|
|
51
|
+
sizeBytes?: number | null;
|
|
52
|
+
folderId?: string | null;
|
|
53
|
+
parentId?: string | null;
|
|
54
|
+
isStarred?: boolean;
|
|
55
|
+
isTrashed?: boolean;
|
|
56
|
+
documentId?: string | null;
|
|
57
|
+
path?: string;
|
|
58
|
+
color?: string;
|
|
59
|
+
icon?: string;
|
|
60
|
+
thumbnailUrl?: string | null;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
}
|
|
64
|
+
interface NexusBreadcrumb {
|
|
65
|
+
id: string;
|
|
66
|
+
name: string;
|
|
67
|
+
path: string;
|
|
68
|
+
}
|
|
69
|
+
interface NexusFolderTree {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
parentId: string | null;
|
|
73
|
+
children: NexusFolderTree[];
|
|
74
|
+
path: string;
|
|
75
|
+
color?: string;
|
|
76
|
+
icon?: string;
|
|
77
|
+
}
|
|
78
|
+
interface NexusActivity {
|
|
79
|
+
id: string;
|
|
80
|
+
action: 'created' | 'updated' | 'deleted' | 'moved' | 'renamed' | 'starred' | 'unstarred' | 'trashed' | 'restored' | 'downloaded' | 'shared';
|
|
81
|
+
itemId: string;
|
|
82
|
+
itemName: string;
|
|
83
|
+
itemType: 'file' | 'folder';
|
|
84
|
+
userId: string;
|
|
85
|
+
userName?: string;
|
|
86
|
+
userAvatar?: string;
|
|
87
|
+
metadata?: Record<string, unknown>;
|
|
88
|
+
createdAt: string;
|
|
89
|
+
}
|
|
90
|
+
interface NexusLabel {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
color: string;
|
|
94
|
+
description?: string;
|
|
95
|
+
workspaceId: string;
|
|
96
|
+
createdAt: string;
|
|
97
|
+
}
|
|
98
|
+
interface NexusStats {
|
|
99
|
+
totalFiles: number;
|
|
100
|
+
totalFolders: number;
|
|
101
|
+
totalSize: number;
|
|
102
|
+
starredCount: number;
|
|
103
|
+
trashedCount: number;
|
|
104
|
+
recentActivity: number;
|
|
105
|
+
}
|
|
106
|
+
interface NexusEmbedConfig {
|
|
107
|
+
apiKey: string;
|
|
108
|
+
workspaceId: string;
|
|
109
|
+
container: HTMLElement | string;
|
|
110
|
+
baseUrl?: string;
|
|
111
|
+
theme?: 'light' | 'dark' | NexusTheme;
|
|
112
|
+
initialFolderId?: string | null;
|
|
113
|
+
viewMode?: 'list' | 'grid';
|
|
114
|
+
showSidebar?: boolean;
|
|
115
|
+
showActivityFeed?: boolean;
|
|
116
|
+
showBreadcrumbs?: boolean;
|
|
117
|
+
showSearch?: boolean;
|
|
118
|
+
allowUpload?: boolean;
|
|
119
|
+
allowDownload?: boolean;
|
|
120
|
+
allowDelete?: boolean;
|
|
121
|
+
allowMove?: boolean;
|
|
122
|
+
allowRename?: boolean;
|
|
123
|
+
allowCreateFolder?: boolean;
|
|
124
|
+
allowMultiSelect?: boolean;
|
|
125
|
+
maxUploadSize?: number;
|
|
126
|
+
acceptedFileTypes?: string[];
|
|
127
|
+
features?: NexusFeatures;
|
|
128
|
+
logging?: NexusLoggingConfig;
|
|
129
|
+
onReady?: (instance: NexusInstance) => void;
|
|
130
|
+
onNavigate?: (folderId: string | null) => void;
|
|
131
|
+
onFileSelect?: (file: NexusFile) => void;
|
|
132
|
+
onFileOpen?: (file: NexusFile) => void;
|
|
133
|
+
onFileUpload?: (file: NexusFile) => void;
|
|
134
|
+
onFileDelete?: (fileId: string) => void;
|
|
135
|
+
onFolderCreate?: (folder: NexusFolder) => void;
|
|
136
|
+
onFolderDelete?: (folderId: string) => void;
|
|
137
|
+
onSelectionChange?: (items: NexusItem[]) => void;
|
|
138
|
+
onError?: (error: NexusError) => void;
|
|
139
|
+
}
|
|
140
|
+
interface NexusFeatures {
|
|
141
|
+
aiAnalysis?: boolean;
|
|
142
|
+
labels?: boolean;
|
|
143
|
+
starring?: boolean;
|
|
144
|
+
trash?: boolean;
|
|
145
|
+
preview?: boolean;
|
|
146
|
+
thumbnails?: boolean;
|
|
147
|
+
dragAndDrop?: boolean;
|
|
148
|
+
keyboardShortcuts?: boolean;
|
|
149
|
+
commandMenu?: boolean;
|
|
150
|
+
contextMenu?: boolean;
|
|
151
|
+
bulkActions?: boolean;
|
|
152
|
+
}
|
|
153
|
+
interface NexusLoggingConfig {
|
|
154
|
+
enabled: boolean;
|
|
155
|
+
level?: 'debug' | 'info' | 'warn' | 'error';
|
|
156
|
+
onLog?: (entry: NexusLogEntry) => void;
|
|
157
|
+
}
|
|
158
|
+
interface NexusLogEntry {
|
|
159
|
+
timestamp: string;
|
|
160
|
+
level: 'debug' | 'info' | 'warn' | 'error';
|
|
161
|
+
category: 'api' | 'upload' | 'download' | 'navigation' | 'selection' | 'ui';
|
|
162
|
+
message: string;
|
|
163
|
+
data?: Record<string, unknown>;
|
|
164
|
+
duration?: number;
|
|
165
|
+
fileId?: string;
|
|
166
|
+
folderId?: string;
|
|
167
|
+
}
|
|
168
|
+
interface NexusError {
|
|
169
|
+
code: string;
|
|
170
|
+
message: string;
|
|
171
|
+
status?: number;
|
|
172
|
+
details?: Record<string, unknown>;
|
|
173
|
+
timestamp: string;
|
|
174
|
+
requestId?: string;
|
|
175
|
+
}
|
|
176
|
+
interface NexusInstance {
|
|
177
|
+
getFiles: (folderId?: string | null) => Promise<NexusItem[]>;
|
|
178
|
+
getFolders: (parentId?: string | null) => Promise<NexusFolder[]>;
|
|
179
|
+
getFolderContents: (folderId?: string | null) => Promise<{
|
|
180
|
+
items: NexusItem[];
|
|
181
|
+
breadcrumb: NexusBreadcrumb[];
|
|
182
|
+
}>;
|
|
183
|
+
getFolderTree: () => Promise<NexusFolderTree[]>;
|
|
184
|
+
getFile: (fileId: string) => Promise<NexusFile>;
|
|
185
|
+
getFolder: (folderId: string) => Promise<NexusFolder & {
|
|
186
|
+
breadcrumb: NexusBreadcrumb[];
|
|
187
|
+
}>;
|
|
188
|
+
uploadFile: (file: File, folderId?: string | null, onProgress?: (progress: number) => void) => Promise<NexusFile>;
|
|
189
|
+
uploadFiles: (files: File[], folderId?: string | null, onProgress?: (fileIndex: number, progress: number) => void) => Promise<NexusFile[]>;
|
|
190
|
+
downloadFile: (fileId: string) => Promise<Blob>;
|
|
191
|
+
getDownloadUrl: (fileId: string) => Promise<string>;
|
|
192
|
+
deleteFile: (fileId: string) => Promise<void>;
|
|
193
|
+
deleteFiles: (fileIds: string[]) => Promise<void>;
|
|
194
|
+
moveFile: (fileId: string, targetFolderId: string | null) => Promise<NexusFile>;
|
|
195
|
+
moveFiles: (fileIds: string[], targetFolderId: string | null) => Promise<NexusFile[]>;
|
|
196
|
+
renameFile: (fileId: string, newName: string) => Promise<NexusFile>;
|
|
197
|
+
starFile: (fileId: string, starred: boolean) => Promise<NexusFile>;
|
|
198
|
+
starFiles: (fileIds: string[], starred: boolean) => Promise<void>;
|
|
199
|
+
trashFile: (fileId: string) => Promise<void>;
|
|
200
|
+
restoreFile: (fileId: string, folderId?: string | null) => Promise<NexusFile>;
|
|
201
|
+
createFolder: (name: string, parentId?: string | null, options?: {
|
|
202
|
+
color?: string;
|
|
203
|
+
icon?: string;
|
|
204
|
+
}) => Promise<NexusFolder>;
|
|
205
|
+
deleteFolder: (folderId: string) => Promise<void>;
|
|
206
|
+
moveFolder: (folderId: string, targetParentId: string | null) => Promise<NexusFolder>;
|
|
207
|
+
renameFolder: (folderId: string, newName: string) => Promise<NexusFolder>;
|
|
208
|
+
navigateTo: (folderId: string | null) => void;
|
|
209
|
+
getCurrentFolder: () => string | null;
|
|
210
|
+
getSelection: () => NexusItem[];
|
|
211
|
+
setSelection: (itemIds: string[]) => void;
|
|
212
|
+
clearSelection: () => void;
|
|
213
|
+
selectAll: () => void;
|
|
214
|
+
setViewMode: (mode: 'list' | 'grid') => void;
|
|
215
|
+
toggleActivityFeed: () => void;
|
|
216
|
+
toggleSidebar: () => void;
|
|
217
|
+
refresh: () => Promise<void>;
|
|
218
|
+
search: (query: string) => Promise<NexusItem[]>;
|
|
219
|
+
getStats: () => Promise<NexusStats>;
|
|
220
|
+
getActivity: (limit?: number) => Promise<NexusActivity[]>;
|
|
221
|
+
getLabels: () => Promise<NexusLabel[]>;
|
|
222
|
+
applyLabel: (itemIds: string[], labelId: string) => Promise<void>;
|
|
223
|
+
removeLabel: (itemIds: string[], labelId: string) => Promise<void>;
|
|
224
|
+
setTheme: (theme: 'light' | 'dark' | NexusTheme) => void;
|
|
225
|
+
destroy: () => void;
|
|
226
|
+
getLogs: () => NexusLogEntry[];
|
|
227
|
+
clearLogs: () => void;
|
|
228
|
+
}
|
|
229
|
+
interface NexusUploadOptions {
|
|
230
|
+
folderId?: string | null;
|
|
231
|
+
onProgress?: (progress: number) => void;
|
|
232
|
+
metadata?: Record<string, unknown>;
|
|
233
|
+
}
|
|
234
|
+
interface NexusAPIResponse<T> {
|
|
235
|
+
data: T;
|
|
236
|
+
meta?: {
|
|
237
|
+
requestId: string;
|
|
238
|
+
processingTime: number;
|
|
239
|
+
rateLimit?: {
|
|
240
|
+
limit: number;
|
|
241
|
+
remaining: number;
|
|
242
|
+
resetAt: string;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
interface NexusAPIError {
|
|
247
|
+
error: {
|
|
248
|
+
code: string;
|
|
249
|
+
message: string;
|
|
250
|
+
details?: Record<string, unknown>;
|
|
251
|
+
};
|
|
252
|
+
meta?: {
|
|
253
|
+
requestId: string;
|
|
254
|
+
timestamp: string;
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export type { NexusTheme as N, NexusFile as a, NexusFolder as b, NexusItem as c, NexusBreadcrumb as d, NexusFolderTree as e, NexusActivity as f, NexusLabel as g, NexusStats as h, NexusEmbedConfig as i, NexusFeatures as j, NexusLoggingConfig as k, NexusLogEntry as l, NexusError as m, NexusInstance as n, NexusUploadOptions as o, NexusAPIResponse as p, NexusAPIError as q };
|