@b10cks/mgmt-client 0.1.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/LICENSE +21 -0
- package/README.md +482 -0
- package/dist/index.d.ts +518 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +424 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +49 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
declare class AiResource {
|
|
2
|
+
private readonly client;
|
|
3
|
+
constructor(client: HttpClient);
|
|
4
|
+
getAvailableModels(params?: AvailableModelsParams): Promise<unknown>;
|
|
5
|
+
generateMetaTags(): Promise<unknown>;
|
|
6
|
+
translate(): Promise<unknown>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export declare interface Asset {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
filename: string;
|
|
13
|
+
mime_type: string;
|
|
14
|
+
size: number;
|
|
15
|
+
url: string;
|
|
16
|
+
folder_id: string | null;
|
|
17
|
+
space_id: string;
|
|
18
|
+
metadata: Record<string, unknown> | null;
|
|
19
|
+
created_at: string;
|
|
20
|
+
updated_at: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export declare interface AssetFolder {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
parent_id: string | null;
|
|
27
|
+
space_id: string;
|
|
28
|
+
created_at: string;
|
|
29
|
+
updated_at: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare class AssetFoldersResource {
|
|
33
|
+
private readonly client;
|
|
34
|
+
constructor(client: HttpClient);
|
|
35
|
+
list(spaceId: string): Promise<PaginatedResponse<AssetFolder>>;
|
|
36
|
+
create(spaceId: string): Promise<AssetFolder>;
|
|
37
|
+
get(spaceId: string, folderId: string): Promise<AssetFolder>;
|
|
38
|
+
update(spaceId: string, folderId: string): Promise<AssetFolder>;
|
|
39
|
+
delete(spaceId: string, folderId: string): Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class AssetsResource {
|
|
43
|
+
private readonly client;
|
|
44
|
+
constructor(client: HttpClient);
|
|
45
|
+
list(spaceId: string): Promise<PaginatedResponse<Asset>>;
|
|
46
|
+
create(spaceId: string): Promise<Asset>;
|
|
47
|
+
get(spaceId: string, assetId: string): Promise<Asset>;
|
|
48
|
+
update(spaceId: string, assetId: string): Promise<Asset>;
|
|
49
|
+
delete(spaceId: string, assetId: string): Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export declare interface AssetTag {
|
|
53
|
+
id: string;
|
|
54
|
+
name: string;
|
|
55
|
+
slug: string;
|
|
56
|
+
color: string | null;
|
|
57
|
+
space_id: string;
|
|
58
|
+
created_at: string;
|
|
59
|
+
updated_at: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare class AssetTagsResource {
|
|
63
|
+
private readonly client;
|
|
64
|
+
constructor(client: HttpClient);
|
|
65
|
+
list(spaceId: string): Promise<PaginatedResponse<AssetTag>>;
|
|
66
|
+
create(spaceId: string): Promise<AssetTag>;
|
|
67
|
+
get(spaceId: string, tagId: string): Promise<AssetTag>;
|
|
68
|
+
update(spaceId: string, tagId: string): Promise<AssetTag>;
|
|
69
|
+
delete(spaceId: string, tagId: string): Promise<void>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export declare interface AvailableModelsParams {
|
|
73
|
+
provider?: string;
|
|
74
|
+
capability?: string;
|
|
75
|
+
min_context_window?: number;
|
|
76
|
+
max_context_window?: number;
|
|
77
|
+
supports_streaming?: boolean;
|
|
78
|
+
model_type?: 'text' | 'image' | 'audio' | 'video' | 'multimodal' | 'embedding' | 'code' | 'chat' | 'completion' | 'translation' | 'summarization' | 'other';
|
|
79
|
+
[key: string]: unknown;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export declare interface Block {
|
|
83
|
+
id: string;
|
|
84
|
+
name: string;
|
|
85
|
+
slug: string;
|
|
86
|
+
type: string;
|
|
87
|
+
description: string | null;
|
|
88
|
+
icon: string | null;
|
|
89
|
+
color: string | null;
|
|
90
|
+
schema: Record<string, unknown>;
|
|
91
|
+
settings: Record<string, unknown> | null;
|
|
92
|
+
folder_id: string | null;
|
|
93
|
+
space_id: string;
|
|
94
|
+
created_at: string;
|
|
95
|
+
updated_at: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export declare interface BlockFolder {
|
|
99
|
+
id: string;
|
|
100
|
+
name: string;
|
|
101
|
+
parent_id: string | null;
|
|
102
|
+
space_id: string;
|
|
103
|
+
created_at: string;
|
|
104
|
+
updated_at: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare class BlockFoldersResource {
|
|
108
|
+
private readonly client;
|
|
109
|
+
constructor(client: HttpClient);
|
|
110
|
+
list(spaceId: string): Promise<PaginatedResponse<BlockFolder>>;
|
|
111
|
+
create(spaceId: string): Promise<BlockFolder>;
|
|
112
|
+
get(spaceId: string, folderId: string): Promise<BlockFolder>;
|
|
113
|
+
update(spaceId: string, folderId: string): Promise<BlockFolder>;
|
|
114
|
+
delete(spaceId: string, folderId: string): Promise<void>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
declare class BlocksResource {
|
|
118
|
+
private readonly client;
|
|
119
|
+
constructor(client: HttpClient);
|
|
120
|
+
list(spaceId: string, params?: GetBlocksParams): Promise<PaginatedResponse<Block>>;
|
|
121
|
+
create(spaceId: string): Promise<Block>;
|
|
122
|
+
get(spaceId: string, blockId: string): Promise<Block>;
|
|
123
|
+
update(spaceId: string, blockId: string): Promise<Block>;
|
|
124
|
+
delete(spaceId: string, blockId: string): Promise<void>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export declare interface BlockTag {
|
|
128
|
+
id: string;
|
|
129
|
+
name: string;
|
|
130
|
+
slug: string;
|
|
131
|
+
color: string | null;
|
|
132
|
+
space_id: string;
|
|
133
|
+
created_at: string;
|
|
134
|
+
updated_at: string;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
declare class BlockTagsResource {
|
|
138
|
+
private readonly client;
|
|
139
|
+
constructor(client: HttpClient);
|
|
140
|
+
list(spaceId: string): Promise<PaginatedResponse<BlockTag>>;
|
|
141
|
+
create(spaceId: string): Promise<BlockTag>;
|
|
142
|
+
get(spaceId: string, tagId: string): Promise<BlockTag>;
|
|
143
|
+
update(spaceId: string, tagId: string): Promise<BlockTag>;
|
|
144
|
+
delete(spaceId: string, tagId: string): Promise<void>;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export declare interface ClientConfig {
|
|
148
|
+
baseUrl: string;
|
|
149
|
+
token: string;
|
|
150
|
+
timeout?: number;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export declare interface Content {
|
|
154
|
+
id: string;
|
|
155
|
+
name: string;
|
|
156
|
+
slug: string;
|
|
157
|
+
block_id: string;
|
|
158
|
+
space_id: string;
|
|
159
|
+
data: Record<string, unknown>;
|
|
160
|
+
metadata: Record<string, unknown> | null;
|
|
161
|
+
published_at: string | null;
|
|
162
|
+
created_at: string;
|
|
163
|
+
updated_at: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
declare class ContentsResource {
|
|
167
|
+
private readonly client;
|
|
168
|
+
constructor(client: HttpClient);
|
|
169
|
+
list(spaceId: string, params?: GetContentsParams): Promise<PaginatedResponse<Content>>;
|
|
170
|
+
create(spaceId: string): Promise<Content>;
|
|
171
|
+
get(spaceId: string, contentId: string): Promise<Content>;
|
|
172
|
+
update(spaceId: string, contentId: string): Promise<Content>;
|
|
173
|
+
delete(spaceId: string, contentId: string): Promise<void>;
|
|
174
|
+
publish(spaceId: string, contentId: string): Promise<Content>;
|
|
175
|
+
unpublish(spaceId: string, contentId: string): Promise<Content>;
|
|
176
|
+
getVersion(spaceId: string, contentId: string, version: number): Promise<ContentVersion>;
|
|
177
|
+
updateVersion(spaceId: string, contentId: string, version: number): Promise<ContentVersion>;
|
|
178
|
+
publishVersion(spaceId: string, contentId: string, version: number): Promise<void>;
|
|
179
|
+
setVersionAsCurrent(spaceId: string, contentId: string, version: number): Promise<void>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export declare interface ContentVersion {
|
|
183
|
+
id: string;
|
|
184
|
+
content_id: string;
|
|
185
|
+
version: number;
|
|
186
|
+
data: Record<string, unknown>;
|
|
187
|
+
metadata: Record<string, unknown> | null;
|
|
188
|
+
created_by: string;
|
|
189
|
+
created_at: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export declare interface CreateSpaceParams {
|
|
193
|
+
name: string;
|
|
194
|
+
slug: string;
|
|
195
|
+
icon?: string | null;
|
|
196
|
+
team_id?: string | null;
|
|
197
|
+
color?: string | null;
|
|
198
|
+
description?: string | null;
|
|
199
|
+
settings?: Record<string, unknown> | null;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export declare interface CreateSpaceTokenParams {
|
|
203
|
+
name: string;
|
|
204
|
+
expires_at?: string | null;
|
|
205
|
+
execution_limit?: number | null;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export declare interface CreateTeamParams {
|
|
209
|
+
name: string;
|
|
210
|
+
icon?: string | null;
|
|
211
|
+
color?: string | null;
|
|
212
|
+
description?: string | null;
|
|
213
|
+
parent_id?: string | null;
|
|
214
|
+
settings?: Record<string, unknown> | null;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export declare interface DataEntry {
|
|
218
|
+
id: string;
|
|
219
|
+
data_source_id: string;
|
|
220
|
+
data: Record<string, unknown>;
|
|
221
|
+
metadata: Record<string, unknown> | null;
|
|
222
|
+
created_at: string;
|
|
223
|
+
updated_at: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export declare interface DataSource {
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
slug: string;
|
|
230
|
+
type: string;
|
|
231
|
+
space_id: string;
|
|
232
|
+
schema: Record<string, unknown>;
|
|
233
|
+
settings: Record<string, unknown> | null;
|
|
234
|
+
created_at: string;
|
|
235
|
+
updated_at: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
declare class DataSourcesResource {
|
|
239
|
+
private readonly client;
|
|
240
|
+
constructor(client: HttpClient);
|
|
241
|
+
list(spaceId: string): Promise<PaginatedResponse<DataSource>>;
|
|
242
|
+
create(spaceId: string): Promise<DataSource>;
|
|
243
|
+
get(spaceId: string, dataSourceId: string): Promise<DataSource>;
|
|
244
|
+
update(spaceId: string, dataSourceId: string): Promise<DataSource>;
|
|
245
|
+
delete(spaceId: string, dataSourceId: string): Promise<void>;
|
|
246
|
+
listEntries(spaceId: string, dataSourceId: string): Promise<PaginatedResponse<DataEntry>>;
|
|
247
|
+
createEntry(spaceId: string, dataSourceId: string): Promise<DataEntry>;
|
|
248
|
+
getEntry(spaceId: string, dataSourceId: string, entryId: string): Promise<DataEntry>;
|
|
249
|
+
updateEntry(spaceId: string, dataSourceId: string, entryId: string): Promise<DataEntry>;
|
|
250
|
+
deleteEntry(spaceId: string, dataSourceId: string, entryId: string): Promise<void>;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export declare interface GetBlocksParams extends PaginationParams {
|
|
254
|
+
search?: string;
|
|
255
|
+
folder_id?: string;
|
|
256
|
+
tag_id?: string;
|
|
257
|
+
include_archived?: boolean;
|
|
258
|
+
include_in_navigation?: boolean;
|
|
259
|
+
created_after?: string;
|
|
260
|
+
updated_after?: string;
|
|
261
|
+
type?: string | string[];
|
|
262
|
+
sort?: 'created_at' | 'updated_at' | 'name' | '-created_at' | '-updated_at' | '-name';
|
|
263
|
+
[key: string]: unknown;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export declare interface GetContentsParams extends PaginationParams {
|
|
267
|
+
created_after?: string;
|
|
268
|
+
updated_after?: string;
|
|
269
|
+
published_after?: string;
|
|
270
|
+
search?: string;
|
|
271
|
+
block_id?: string | string[];
|
|
272
|
+
published?: boolean;
|
|
273
|
+
[key: string]: unknown;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export declare interface GetRedirectsParams extends PaginationParams {
|
|
277
|
+
search?: string;
|
|
278
|
+
source?: string;
|
|
279
|
+
destination?: string;
|
|
280
|
+
type?: 'permanent' | 'temporary';
|
|
281
|
+
sort?: 'created_at' | 'updated_at' | 'hits' | '-created_at' | '-updated_at' | '-hits';
|
|
282
|
+
[key: string]: unknown;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
declare class HttpClient {
|
|
286
|
+
private readonly baseUrl;
|
|
287
|
+
private readonly token;
|
|
288
|
+
private readonly timeout;
|
|
289
|
+
constructor(config: ClientConfig);
|
|
290
|
+
private request;
|
|
291
|
+
get<T>(path: string, params?: Record<string, unknown>): Promise<T>;
|
|
292
|
+
post<T>(path: string, data?: unknown): Promise<T>;
|
|
293
|
+
put<T>(path: string, data?: unknown): Promise<T>;
|
|
294
|
+
patch<T>(path: string, data?: unknown): Promise<T>;
|
|
295
|
+
delete<T>(path: string): Promise<T>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export declare class ManagementApiError extends Error {
|
|
299
|
+
readonly statusCode: number;
|
|
300
|
+
readonly response?: unknown | undefined;
|
|
301
|
+
constructor(message: string, statusCode?: number, response?: unknown | undefined);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export declare class ManagementClient {
|
|
305
|
+
private readonly httpClient;
|
|
306
|
+
readonly users: UsersResource;
|
|
307
|
+
readonly teams: TeamsResource;
|
|
308
|
+
readonly spaces: SpacesResource;
|
|
309
|
+
readonly blocks: BlocksResource;
|
|
310
|
+
readonly blockTags: BlockTagsResource;
|
|
311
|
+
readonly blockFolders: BlockFoldersResource;
|
|
312
|
+
readonly contents: ContentsResource;
|
|
313
|
+
readonly assets: AssetsResource;
|
|
314
|
+
readonly assetFolders: AssetFoldersResource;
|
|
315
|
+
readonly assetTags: AssetTagsResource;
|
|
316
|
+
readonly redirects: RedirectsResource;
|
|
317
|
+
readonly tokens: TokensResource;
|
|
318
|
+
readonly dataSources: DataSourcesResource;
|
|
319
|
+
readonly ai: AiResource;
|
|
320
|
+
readonly system: SystemResource;
|
|
321
|
+
constructor(config: ClientConfig);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export declare interface PaginatedResponse<T> {
|
|
325
|
+
data: T[];
|
|
326
|
+
links: {
|
|
327
|
+
first: string;
|
|
328
|
+
last: string;
|
|
329
|
+
prev: string | null;
|
|
330
|
+
next: string | null;
|
|
331
|
+
};
|
|
332
|
+
meta: {
|
|
333
|
+
current_page: number;
|
|
334
|
+
from: number | null;
|
|
335
|
+
last_page: number;
|
|
336
|
+
per_page: number;
|
|
337
|
+
to: number | null;
|
|
338
|
+
total: number;
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export declare interface PaginationParams {
|
|
343
|
+
page?: number;
|
|
344
|
+
per_page?: number;
|
|
345
|
+
[key: string]: unknown;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export declare interface Redirect {
|
|
349
|
+
id: string;
|
|
350
|
+
source: string;
|
|
351
|
+
destination: string;
|
|
352
|
+
type: 'permanent' | 'temporary';
|
|
353
|
+
space_id: string;
|
|
354
|
+
hits: number;
|
|
355
|
+
last_hit_at: string | null;
|
|
356
|
+
created_at: string;
|
|
357
|
+
updated_at: string;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
declare class RedirectsResource {
|
|
361
|
+
private readonly client;
|
|
362
|
+
constructor(client: HttpClient);
|
|
363
|
+
list(spaceId: string, params?: GetRedirectsParams): Promise<PaginatedResponse<Redirect>>;
|
|
364
|
+
create(spaceId: string): Promise<Redirect>;
|
|
365
|
+
get(spaceId: string, redirectId: string): Promise<Redirect>;
|
|
366
|
+
update(spaceId: string, redirectId: string): Promise<Redirect>;
|
|
367
|
+
delete(spaceId: string, redirectId: string): Promise<void>;
|
|
368
|
+
reset(spaceId: string, redirectId: string): Promise<Redirect>;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export declare interface Space {
|
|
372
|
+
id: string;
|
|
373
|
+
name: string;
|
|
374
|
+
slug: string;
|
|
375
|
+
icon: string | null;
|
|
376
|
+
color: string | null;
|
|
377
|
+
description: string | null;
|
|
378
|
+
team_id: string | null;
|
|
379
|
+
state: 'active' | 'archived' | 'draft';
|
|
380
|
+
settings: Record<string, unknown> | null;
|
|
381
|
+
created_at: string;
|
|
382
|
+
updated_at: string;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
declare class SpacesResource {
|
|
386
|
+
private readonly client;
|
|
387
|
+
constructor(client: HttpClient);
|
|
388
|
+
create(params: CreateSpaceParams): Promise<Space>;
|
|
389
|
+
get(spaceId: string): Promise<Space>;
|
|
390
|
+
update(spaceId: string, params: UpdateSpaceParams): Promise<Space>;
|
|
391
|
+
delete(spaceId: string): Promise<void>;
|
|
392
|
+
updateIcon(spaceId: string, params: UpdateSpaceIconParams): Promise<void>;
|
|
393
|
+
archive(spaceId: string): Promise<void>;
|
|
394
|
+
getAiUsage(spaceId: string): Promise<unknown>;
|
|
395
|
+
getStats(spaceId: string): Promise<unknown>;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export declare interface SpaceToken {
|
|
399
|
+
id: string;
|
|
400
|
+
name: string;
|
|
401
|
+
token: string;
|
|
402
|
+
space_id: string;
|
|
403
|
+
expires_at: string | null;
|
|
404
|
+
execution_limit: number | null;
|
|
405
|
+
executions: number;
|
|
406
|
+
last_used_at: string | null;
|
|
407
|
+
created_at: string;
|
|
408
|
+
updated_at: string;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
declare class SystemResource {
|
|
412
|
+
private readonly client;
|
|
413
|
+
constructor(client: HttpClient);
|
|
414
|
+
health(): Promise<unknown>;
|
|
415
|
+
getConfig(): Promise<unknown>;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export declare interface Team {
|
|
419
|
+
id: string;
|
|
420
|
+
name: string;
|
|
421
|
+
slug: string;
|
|
422
|
+
icon: string | null;
|
|
423
|
+
color: string | null;
|
|
424
|
+
description: string | null;
|
|
425
|
+
type: string;
|
|
426
|
+
parent_id: string | null;
|
|
427
|
+
settings: Record<string, unknown> | null;
|
|
428
|
+
created_at: string;
|
|
429
|
+
updated_at: string;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export declare interface TeamHierarchy {
|
|
433
|
+
id: string;
|
|
434
|
+
name: string;
|
|
435
|
+
type: string;
|
|
436
|
+
children: TeamHierarchy[];
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
declare class TeamsResource {
|
|
440
|
+
private readonly client;
|
|
441
|
+
constructor(client: HttpClient);
|
|
442
|
+
list(): Promise<PaginatedResponse<Team>>;
|
|
443
|
+
create(params: CreateTeamParams): Promise<Team>;
|
|
444
|
+
get(teamId: string): Promise<Team>;
|
|
445
|
+
update(teamId: string, params: UpdateTeamParams): Promise<Team>;
|
|
446
|
+
delete(teamId: string): Promise<void>;
|
|
447
|
+
getHierarchy(): Promise<TeamHierarchy>;
|
|
448
|
+
addUser(teamId: string): Promise<void>;
|
|
449
|
+
updateUser(teamId: string, userId: string): Promise<void>;
|
|
450
|
+
removeUser(teamId: string, userId: string): Promise<void>;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
declare class TokensResource {
|
|
454
|
+
private readonly client;
|
|
455
|
+
constructor(client: HttpClient);
|
|
456
|
+
create(spaceId: string, params: CreateSpaceTokenParams): Promise<SpaceToken>;
|
|
457
|
+
delete(spaceId: string, tokenId: string): Promise<void>;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export declare interface UpdateAvatarParams {
|
|
461
|
+
avatar: string;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export declare interface UpdatePasswordParams {
|
|
465
|
+
old_password: string;
|
|
466
|
+
password: string;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export declare interface UpdateSpaceIconParams {
|
|
470
|
+
icon: string;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export declare interface UpdateSpaceParams {
|
|
474
|
+
name: string;
|
|
475
|
+
slug: string;
|
|
476
|
+
icon?: string | null;
|
|
477
|
+
color?: string | null;
|
|
478
|
+
description?: string | null;
|
|
479
|
+
settings?: Record<string, unknown> | null;
|
|
480
|
+
state?: 'active' | 'archived' | 'draft';
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
export declare interface UpdateTeamParams {
|
|
484
|
+
name: string;
|
|
485
|
+
icon?: string | null;
|
|
486
|
+
color?: string | null;
|
|
487
|
+
description?: string | null;
|
|
488
|
+
type?: 'personal' | 'organization' | 'team' | 'project' | null;
|
|
489
|
+
parent_id?: string | null;
|
|
490
|
+
settings?: Record<string, unknown> | null;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export declare interface UpdateUserParams {
|
|
494
|
+
firstname?: string | null;
|
|
495
|
+
lastname?: string | null;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export declare interface User {
|
|
499
|
+
id: string;
|
|
500
|
+
email: string;
|
|
501
|
+
firstname: string | null;
|
|
502
|
+
lastname: string | null;
|
|
503
|
+
avatar: string | null;
|
|
504
|
+
created_at: string;
|
|
505
|
+
updated_at: string;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
declare class UsersResource {
|
|
509
|
+
private readonly client;
|
|
510
|
+
constructor(client: HttpClient);
|
|
511
|
+
getMe(): Promise<User>;
|
|
512
|
+
updateMe(params: UpdateUserParams): Promise<User>;
|
|
513
|
+
updateSettings(): Promise<void>;
|
|
514
|
+
updateAvatar(params: UpdateAvatarParams): Promise<void>;
|
|
515
|
+
updatePassword(params: UpdatePasswordParams): Promise<void>;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export { }
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class a extends Error{constructor(t,e=0,s){super(t),this.statusCode=e,this.response=s,this.name="ManagementApiError"}}class g{baseUrl;token;timeout;constructor(t){this.baseUrl=t.baseUrl.replace(/\/$/,""),this.token=t.token,this.timeout=t.timeout??3e4}async request(t,e,s,l){const i=new URL(e,this.baseUrl);if(l){for(const[c,r]of Object.entries(l))if(r!=null)if(Array.isArray(r))for(const h of r)i.searchParams.append(`${c}[]`,String(h));else i.searchParams.append(c,String(r))}const m={"Content-Type":"application/json",Authorization:`Bearer ${this.token}`},o=new AbortController,u=setTimeout(()=>o.abort(),this.timeout);try{const c=await fetch(i.toString(),{method:t,headers:m,body:s?JSON.stringify(s):void 0,signal:o.signal});if(clearTimeout(u),!c.ok){const r=await c.json().catch(()=>({message:c.statusText,error:"Unknown error",code:c.status}));throw new a(r.message||"Request failed",c.status,r)}return c.status===204?void 0:await c.json()}catch(c){throw clearTimeout(u),c instanceof a?c:new a(c instanceof Error?c.message:"Request failed",0,c)}}async get(t,e){return this.request("GET",t,void 0,e)}async post(t,e){return this.request("POST",t,e)}async put(t,e){return this.request("PUT",t,e)}async patch(t,e){return this.request("PATCH",t,e)}async delete(t){return this.request("DELETE",t)}}class p{constructor(t){this.client=t}async getAvailableModels(t){return this.client.get("/mgmt/v1/ai/available-models",t)}async generateMetaTags(){return this.client.post("/mgmt/v1/ai/meta-tags")}async translate(){return this.client.post("/mgmt/v1/ai/translate")}}class ${constructor(t){this.client=t}async list(t){return this.client.get(`/mgmt/v1/spaces/${t}/asset-folders`)}async create(t){return this.client.post(`/mgmt/v1/spaces/${t}/asset-folders`)}async get(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/asset-folders/${e}`)}async update(t,e){return this.client.put(`/mgmt/v1/spaces/${t}/asset-folders/${e}`)}async delete(t,e){return this.client.delete(`/mgmt/v1/spaces/${t}/asset-folders/${e}`)}}class y{constructor(t){this.client=t}async list(t){return this.client.get(`/mgmt/v1/spaces/${t}/asset-tags`)}async create(t){return this.client.post(`/mgmt/v1/spaces/${t}/asset-tags`)}async get(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/asset-tags/${e}`)}async update(t,e){return this.client.put(`/mgmt/v1/spaces/${t}/asset-tags/${e}`)}async delete(t,e){return this.client.delete(`/mgmt/v1/spaces/${t}/asset-tags/${e}`)}}class d{constructor(t){this.client=t}async list(t){return this.client.get(`/mgmt/v1/spaces/${t}/assets`)}async create(t){return this.client.post(`/mgmt/v1/spaces/${t}/assets`)}async get(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/assets/${e}`)}async update(t,e){return this.client.put(`/mgmt/v1/spaces/${t}/assets/${e}`)}async delete(t,e){return this.client.delete(`/mgmt/v1/spaces/${t}/assets/${e}`)}}class v{constructor(t){this.client=t}async list(t){return this.client.get(`/mgmt/v1/spaces/${t}/block-folders`)}async create(t){return this.client.post(`/mgmt/v1/spaces/${t}/block-folders`)}async get(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/block-folders/${e}`)}async update(t,e){return this.client.put(`/mgmt/v1/spaces/${t}/block-folders/${e}`)}async delete(t,e){return this.client.delete(`/mgmt/v1/spaces/${t}/block-folders/${e}`)}}class b{constructor(t){this.client=t}async list(t){return this.client.get(`/mgmt/v1/spaces/${t}/block-tags`)}async create(t){return this.client.post(`/mgmt/v1/spaces/${t}/block-tags`)}async get(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/block-tags/${e}`)}async update(t,e){return this.client.put(`/mgmt/v1/spaces/${t}/block-tags/${e}`)}async delete(t,e){return this.client.delete(`/mgmt/v1/spaces/${t}/block-tags/${e}`)}}class k{constructor(t){this.client=t}async list(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/blocks`,e)}async create(t){return this.client.post(`/mgmt/v1/spaces/${t}/blocks`)}async get(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/blocks/${e}`)}async update(t,e){return this.client.put(`/mgmt/v1/spaces/${t}/blocks/${e}`)}async delete(t,e){return this.client.delete(`/mgmt/v1/spaces/${t}/blocks/${e}`)}}class w{constructor(t){this.client=t}async list(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/contents`,e)}async create(t){return this.client.post(`/mgmt/v1/spaces/${t}/contents`)}async get(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/contents/${e}`)}async update(t,e){return this.client.put(`/mgmt/v1/spaces/${t}/contents/${e}`)}async delete(t,e){return this.client.delete(`/mgmt/v1/spaces/${t}/contents/${e}`)}async publish(t,e){return this.client.post(`/mgmt/v1/spaces/${t}/contents/${e}/publish`)}async unpublish(t,e){return this.client.post(`/mgmt/v1/spaces/${t}/contents/${e}/unpublish`)}async getVersion(t,e,s){return this.client.get(`/mgmt/v1/spaces/${t}/contents/${e}/versions/${s}`)}async updateVersion(t,e,s){return this.client.patch(`/mgmt/v1/spaces/${t}/contents/${e}/versions/${s}`)}async publishVersion(t,e,s){return this.client.post(`/mgmt/v1/spaces/${t}/contents/${e}/versions/${s}/publish`)}async setVersionAsCurrent(t,e,s){return this.client.post(`/mgmt/v1/spaces/${t}/contents/${e}/versions/${s}/current`)}}class f{constructor(t){this.client=t}async list(t){return this.client.get(`/mgmt/v1/spaces/${t}/data-sources`)}async create(t){return this.client.post(`/mgmt/v1/spaces/${t}/data-sources`)}async get(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/data-sources/${e}`)}async update(t,e){return this.client.put(`/mgmt/v1/spaces/${t}/data-sources/${e}`)}async delete(t,e){return this.client.delete(`/mgmt/v1/spaces/${t}/data-sources/${e}`)}async listEntries(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/data-sources/${e}/entries`)}async createEntry(t,e){return this.client.post(`/mgmt/v1/spaces/${t}/data-sources/${e}/entries`)}async getEntry(t,e,s){return this.client.get(`/mgmt/v1/spaces/${t}/data-sources/${e}/entries/${s}`)}async updateEntry(t,e,s){return this.client.put(`/mgmt/v1/spaces/${t}/data-sources/${e}/entries/${s}`)}async deleteEntry(t,e,s){return this.client.delete(`/mgmt/v1/spaces/${t}/data-sources/${e}/entries/${s}`)}}class C{constructor(t){this.client=t}async list(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/redirects`,e)}async create(t){return this.client.post(`/mgmt/v1/spaces/${t}/redirects`)}async get(t,e){return this.client.get(`/mgmt/v1/spaces/${t}/redirects/${e}`)}async update(t,e){return this.client.put(`/mgmt/v1/spaces/${t}/redirects/${e}`)}async delete(t,e){return this.client.delete(`/mgmt/v1/spaces/${t}/redirects/${e}`)}async reset(t,e){return this.client.post(`/mgmt/v1/spaces/${t}/redirects/${e}/reset`)}}class T{constructor(t){this.client=t}async create(t){return this.client.post("/mgmt/v1/spaces",t)}async get(t){return this.client.get(`/mgmt/v1/spaces/${t}`)}async update(t,e){return this.client.put(`/mgmt/v1/spaces/${t}`,e)}async delete(t){return this.client.delete(`/mgmt/v1/spaces/${t}`)}async updateIcon(t,e){return this.client.post(`/mgmt/v1/spaces/${t}/icon`,e)}async archive(t){return this.client.post(`/mgmt/v1/spaces/${t}/archive`)}async getAiUsage(t){return this.client.get(`/mgmt/v1/spaces/${t}/ai-usage`)}async getStats(t){return this.client.get(`/mgmt/v1/spaces/${t}/stats`)}}class R{constructor(t){this.client=t}async health(){return this.client.get("/mgmt/v1/health")}async getConfig(){return this.client.get("/mgmt/v1/config")}}class A{constructor(t){this.client=t}async list(){return this.client.get("/mgmt/v1/teams")}async create(t){return this.client.post("/mgmt/v1/teams",t)}async get(t){return this.client.get(`/mgmt/v1/teams/${t}`)}async update(t,e){return this.client.put(`/mgmt/v1/teams/${t}`,e)}async delete(t){return this.client.delete(`/mgmt/v1/teams/${t}`)}async getHierarchy(){return this.client.get("/mgmt/v1/teams/hierarchy")}async addUser(t){return this.client.post(`/mgmt/v1/teams/${t}/users`)}async updateUser(t,e){return this.client.patch(`/mgmt/v1/teams/${t}/users/${e}`)}async removeUser(t,e){return this.client.delete(`/mgmt/v1/teams/${t}/users/${e}`)}}class E{constructor(t){this.client=t}async create(t,e){return this.client.post(`/mgmt/v1/spaces/${t}/tokens`,e)}async delete(t,e){return this.client.delete(`/mgmt/v1/spaces/${t}/tokens/${e}`)}}class S{constructor(t){this.client=t}async getMe(){return this.client.get("/mgmt/v1/users/me")}async updateMe(t){return this.client.patch("/mgmt/v1/users/me",t)}async updateSettings(){return this.client.post("/mgmt/v1/users/me/settings")}async updateAvatar(t){return this.client.post("/mgmt/v1/users/me/avatar",t)}async updatePassword(t){return this.client.post("/mgmt/v1/users/me/password",t)}}class U{httpClient;users;teams;spaces;blocks;blockTags;blockFolders;contents;assets;assetFolders;assetTags;redirects;tokens;dataSources;ai;system;constructor(t){this.httpClient=new g(t),this.users=new S(this.httpClient),this.teams=new A(this.httpClient),this.spaces=new T(this.httpClient),this.blocks=new k(this.httpClient),this.blockTags=new b(this.httpClient),this.blockFolders=new v(this.httpClient),this.contents=new w(this.httpClient),this.assets=new d(this.httpClient),this.assetFolders=new $(this.httpClient),this.assetTags=new y(this.httpClient),this.redirects=new C(this.httpClient),this.tokens=new E(this.httpClient),this.dataSources=new f(this.httpClient),this.ai=new p(this.httpClient),this.system=new R(this.httpClient)}}exports.ManagementApiError=a;exports.ManagementClient=U;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/http-client.ts","../src/resources/ai.ts","../src/resources/asset-folders.ts","../src/resources/asset-tags.ts","../src/resources/assets.ts","../src/resources/block-folders.ts","../src/resources/block-tags.ts","../src/resources/blocks.ts","../src/resources/contents.ts","../src/resources/data-sources.ts","../src/resources/redirects.ts","../src/resources/spaces.ts","../src/resources/system.ts","../src/resources/teams.ts","../src/resources/tokens.ts","../src/resources/users.ts","../src/client.ts"],"sourcesContent":["import type { ClientConfig } from './types'\n\nexport class ManagementApiError extends Error {\n constructor(\n message: string,\n public readonly statusCode: number = 0,\n public readonly response?: unknown\n ) {\n super(message)\n this.name = 'ManagementApiError'\n }\n}\n\nexport class HttpClient {\n private readonly baseUrl: string\n private readonly token: string\n private readonly timeout: number\n\n constructor(config: ClientConfig) {\n this.baseUrl = config.baseUrl.replace(/\\/$/, '')\n this.token = config.token\n this.timeout = config.timeout ?? 30000\n }\n\n private async request<T>(method: string, path: string, body?: unknown, params?: Record<string, unknown>): Promise<T> {\n const url = new URL(path, this.baseUrl)\n\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined && value !== null) {\n if (Array.isArray(value)) {\n for (const item of value) {\n url.searchParams.append(`${key}[]`, String(item))\n }\n } else {\n url.searchParams.append(key, String(value))\n }\n }\n }\n }\n\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${this.token}`,\n }\n\n const controller = new AbortController()\n const timeoutId = setTimeout(() => controller.abort(), this.timeout)\n\n try {\n const response = await fetch(url.toString(), {\n method,\n headers,\n body: body ? JSON.stringify(body) : undefined,\n signal: controller.signal,\n })\n\n clearTimeout(timeoutId)\n\n if (!response.ok) {\n const error = await response.json().catch(() => ({\n message: response.statusText,\n error: 'Unknown error',\n code: response.status,\n }))\n throw new ManagementApiError(error.message || 'Request failed', response.status, error)\n }\n\n if (response.status === 204) {\n return undefined as T\n }\n\n return (await response.json()) as T\n } catch (error) {\n clearTimeout(timeoutId)\n if (error instanceof ManagementApiError) {\n throw error\n }\n throw new ManagementApiError(error instanceof Error ? error.message : 'Request failed', 0, error)\n }\n }\n\n async get<T>(path: string, params?: Record<string, unknown>): Promise<T> {\n return this.request<T>('GET', path, undefined, params)\n }\n\n async post<T>(path: string, data?: unknown): Promise<T> {\n return this.request<T>('POST', path, data)\n }\n\n async put<T>(path: string, data?: unknown): Promise<T> {\n return this.request<T>('PUT', path, data)\n }\n\n async patch<T>(path: string, data?: unknown): Promise<T> {\n return this.request<T>('PATCH', path, data)\n }\n\n async delete<T>(path: string): Promise<T> {\n return this.request<T>('DELETE', path)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { AvailableModelsParams } from '../types'\n\nexport class AiResource {\n constructor(private readonly client: HttpClient) {}\n\n async getAvailableModels(params?: AvailableModelsParams): Promise<unknown> {\n return this.client.get<unknown>('/mgmt/v1/ai/available-models', params)\n }\n\n async generateMetaTags(): Promise<unknown> {\n return this.client.post<unknown>('/mgmt/v1/ai/meta-tags')\n }\n\n async translate(): Promise<unknown> {\n return this.client.post<unknown>('/mgmt/v1/ai/translate')\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { AssetFolder, PaginatedResponse } from '../types'\n\nexport class AssetFoldersResource {\n constructor(private readonly client: HttpClient) {}\n\n async list(spaceId: string): Promise<PaginatedResponse<AssetFolder>> {\n return this.client.get<PaginatedResponse<AssetFolder>>(`/mgmt/v1/spaces/${spaceId}/asset-folders`)\n }\n\n async create(spaceId: string): Promise<AssetFolder> {\n return this.client.post<AssetFolder>(`/mgmt/v1/spaces/${spaceId}/asset-folders`)\n }\n\n async get(spaceId: string, folderId: string): Promise<AssetFolder> {\n return this.client.get<AssetFolder>(`/mgmt/v1/spaces/${spaceId}/asset-folders/${folderId}`)\n }\n\n async update(spaceId: string, folderId: string): Promise<AssetFolder> {\n return this.client.put<AssetFolder>(`/mgmt/v1/spaces/${spaceId}/asset-folders/${folderId}`)\n }\n\n async delete(spaceId: string, folderId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/asset-folders/${folderId}`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { AssetTag, PaginatedResponse } from '../types'\n\nexport class AssetTagsResource {\n constructor(private readonly client: HttpClient) {}\n\n async list(spaceId: string): Promise<PaginatedResponse<AssetTag>> {\n return this.client.get<PaginatedResponse<AssetTag>>(`/mgmt/v1/spaces/${spaceId}/asset-tags`)\n }\n\n async create(spaceId: string): Promise<AssetTag> {\n return this.client.post<AssetTag>(`/mgmt/v1/spaces/${spaceId}/asset-tags`)\n }\n\n async get(spaceId: string, tagId: string): Promise<AssetTag> {\n return this.client.get<AssetTag>(`/mgmt/v1/spaces/${spaceId}/asset-tags/${tagId}`)\n }\n\n async update(spaceId: string, tagId: string): Promise<AssetTag> {\n return this.client.put<AssetTag>(`/mgmt/v1/spaces/${spaceId}/asset-tags/${tagId}`)\n }\n\n async delete(spaceId: string, tagId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/asset-tags/${tagId}`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { Asset, PaginatedResponse } from '../types'\n\nexport class AssetsResource {\n constructor(private readonly client: HttpClient) {}\n\n async list(spaceId: string): Promise<PaginatedResponse<Asset>> {\n return this.client.get<PaginatedResponse<Asset>>(`/mgmt/v1/spaces/${spaceId}/assets`)\n }\n\n async create(spaceId: string): Promise<Asset> {\n return this.client.post<Asset>(`/mgmt/v1/spaces/${spaceId}/assets`)\n }\n\n async get(spaceId: string, assetId: string): Promise<Asset> {\n return this.client.get<Asset>(`/mgmt/v1/spaces/${spaceId}/assets/${assetId}`)\n }\n\n async update(spaceId: string, assetId: string): Promise<Asset> {\n return this.client.put<Asset>(`/mgmt/v1/spaces/${spaceId}/assets/${assetId}`)\n }\n\n async delete(spaceId: string, assetId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/assets/${assetId}`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { BlockFolder, PaginatedResponse } from '../types'\n\nexport class BlockFoldersResource {\n constructor(private readonly client: HttpClient) {}\n\n async list(spaceId: string): Promise<PaginatedResponse<BlockFolder>> {\n return this.client.get<PaginatedResponse<BlockFolder>>(`/mgmt/v1/spaces/${spaceId}/block-folders`)\n }\n\n async create(spaceId: string): Promise<BlockFolder> {\n return this.client.post<BlockFolder>(`/mgmt/v1/spaces/${spaceId}/block-folders`)\n }\n\n async get(spaceId: string, folderId: string): Promise<BlockFolder> {\n return this.client.get<BlockFolder>(`/mgmt/v1/spaces/${spaceId}/block-folders/${folderId}`)\n }\n\n async update(spaceId: string, folderId: string): Promise<BlockFolder> {\n return this.client.put<BlockFolder>(`/mgmt/v1/spaces/${spaceId}/block-folders/${folderId}`)\n }\n\n async delete(spaceId: string, folderId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/block-folders/${folderId}`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { BlockTag, PaginatedResponse } from '../types'\n\nexport class BlockTagsResource {\n constructor(private readonly client: HttpClient) {}\n\n async list(spaceId: string): Promise<PaginatedResponse<BlockTag>> {\n return this.client.get<PaginatedResponse<BlockTag>>(`/mgmt/v1/spaces/${spaceId}/block-tags`)\n }\n\n async create(spaceId: string): Promise<BlockTag> {\n return this.client.post<BlockTag>(`/mgmt/v1/spaces/${spaceId}/block-tags`)\n }\n\n async get(spaceId: string, tagId: string): Promise<BlockTag> {\n return this.client.get<BlockTag>(`/mgmt/v1/spaces/${spaceId}/block-tags/${tagId}`)\n }\n\n async update(spaceId: string, tagId: string): Promise<BlockTag> {\n return this.client.put<BlockTag>(`/mgmt/v1/spaces/${spaceId}/block-tags/${tagId}`)\n }\n\n async delete(spaceId: string, tagId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/block-tags/${tagId}`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { Block, GetBlocksParams, PaginatedResponse } from '../types'\n\nexport class BlocksResource {\n constructor(private readonly client: HttpClient) {}\n\n async list(spaceId: string, params?: GetBlocksParams): Promise<PaginatedResponse<Block>> {\n return this.client.get<PaginatedResponse<Block>>(`/mgmt/v1/spaces/${spaceId}/blocks`, params)\n }\n\n async create(spaceId: string): Promise<Block> {\n return this.client.post<Block>(`/mgmt/v1/spaces/${spaceId}/blocks`)\n }\n\n async get(spaceId: string, blockId: string): Promise<Block> {\n return this.client.get<Block>(`/mgmt/v1/spaces/${spaceId}/blocks/${blockId}`)\n }\n\n async update(spaceId: string, blockId: string): Promise<Block> {\n return this.client.put<Block>(`/mgmt/v1/spaces/${spaceId}/blocks/${blockId}`)\n }\n\n async delete(spaceId: string, blockId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/blocks/${blockId}`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { Content, ContentVersion, GetContentsParams, PaginatedResponse } from '../types'\n\nexport class ContentsResource {\n constructor(private readonly client: HttpClient) {}\n\n async list(spaceId: string, params?: GetContentsParams): Promise<PaginatedResponse<Content>> {\n return this.client.get<PaginatedResponse<Content>>(`/mgmt/v1/spaces/${spaceId}/contents`, params)\n }\n\n async create(spaceId: string): Promise<Content> {\n return this.client.post<Content>(`/mgmt/v1/spaces/${spaceId}/contents`)\n }\n\n async get(spaceId: string, contentId: string): Promise<Content> {\n return this.client.get<Content>(`/mgmt/v1/spaces/${spaceId}/contents/${contentId}`)\n }\n\n async update(spaceId: string, contentId: string): Promise<Content> {\n return this.client.put<Content>(`/mgmt/v1/spaces/${spaceId}/contents/${contentId}`)\n }\n\n async delete(spaceId: string, contentId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/contents/${contentId}`)\n }\n\n async publish(spaceId: string, contentId: string): Promise<Content> {\n return this.client.post<Content>(`/mgmt/v1/spaces/${spaceId}/contents/${contentId}/publish`)\n }\n\n async unpublish(spaceId: string, contentId: string): Promise<Content> {\n return this.client.post<Content>(`/mgmt/v1/spaces/${spaceId}/contents/${contentId}/unpublish`)\n }\n\n async getVersion(spaceId: string, contentId: string, version: number): Promise<ContentVersion> {\n return this.client.get<ContentVersion>(`/mgmt/v1/spaces/${spaceId}/contents/${contentId}/versions/${version}`)\n }\n\n async updateVersion(spaceId: string, contentId: string, version: number): Promise<ContentVersion> {\n return this.client.patch<ContentVersion>(`/mgmt/v1/spaces/${spaceId}/contents/${contentId}/versions/${version}`)\n }\n\n async publishVersion(spaceId: string, contentId: string, version: number): Promise<void> {\n return this.client.post<void>(`/mgmt/v1/spaces/${spaceId}/contents/${contentId}/versions/${version}/publish`)\n }\n\n async setVersionAsCurrent(spaceId: string, contentId: string, version: number): Promise<void> {\n return this.client.post<void>(`/mgmt/v1/spaces/${spaceId}/contents/${contentId}/versions/${version}/current`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { DataEntry, DataSource, PaginatedResponse } from '../types'\n\nexport class DataSourcesResource {\n constructor(private readonly client: HttpClient) {}\n\n async list(spaceId: string): Promise<PaginatedResponse<DataSource>> {\n return this.client.get<PaginatedResponse<DataSource>>(`/mgmt/v1/spaces/${spaceId}/data-sources`)\n }\n\n async create(spaceId: string): Promise<DataSource> {\n return this.client.post<DataSource>(`/mgmt/v1/spaces/${spaceId}/data-sources`)\n }\n\n async get(spaceId: string, dataSourceId: string): Promise<DataSource> {\n return this.client.get<DataSource>(`/mgmt/v1/spaces/${spaceId}/data-sources/${dataSourceId}`)\n }\n\n async update(spaceId: string, dataSourceId: string): Promise<DataSource> {\n return this.client.put<DataSource>(`/mgmt/v1/spaces/${spaceId}/data-sources/${dataSourceId}`)\n }\n\n async delete(spaceId: string, dataSourceId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/data-sources/${dataSourceId}`)\n }\n\n async listEntries(spaceId: string, dataSourceId: string): Promise<PaginatedResponse<DataEntry>> {\n return this.client.get<PaginatedResponse<DataEntry>>(\n `/mgmt/v1/spaces/${spaceId}/data-sources/${dataSourceId}/entries`\n )\n }\n\n async createEntry(spaceId: string, dataSourceId: string): Promise<DataEntry> {\n return this.client.post<DataEntry>(`/mgmt/v1/spaces/${spaceId}/data-sources/${dataSourceId}/entries`)\n }\n\n async getEntry(spaceId: string, dataSourceId: string, entryId: string): Promise<DataEntry> {\n return this.client.get<DataEntry>(`/mgmt/v1/spaces/${spaceId}/data-sources/${dataSourceId}/entries/${entryId}`)\n }\n\n async updateEntry(spaceId: string, dataSourceId: string, entryId: string): Promise<DataEntry> {\n return this.client.put<DataEntry>(`/mgmt/v1/spaces/${spaceId}/data-sources/${dataSourceId}/entries/${entryId}`)\n }\n\n async deleteEntry(spaceId: string, dataSourceId: string, entryId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/data-sources/${dataSourceId}/entries/${entryId}`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { GetRedirectsParams, PaginatedResponse, Redirect } from '../types'\n\nexport class RedirectsResource {\n constructor(private readonly client: HttpClient) {}\n\n async list(spaceId: string, params?: GetRedirectsParams): Promise<PaginatedResponse<Redirect>> {\n return this.client.get<PaginatedResponse<Redirect>>(`/mgmt/v1/spaces/${spaceId}/redirects`, params)\n }\n\n async create(spaceId: string): Promise<Redirect> {\n return this.client.post<Redirect>(`/mgmt/v1/spaces/${spaceId}/redirects`)\n }\n\n async get(spaceId: string, redirectId: string): Promise<Redirect> {\n return this.client.get<Redirect>(`/mgmt/v1/spaces/${spaceId}/redirects/${redirectId}`)\n }\n\n async update(spaceId: string, redirectId: string): Promise<Redirect> {\n return this.client.put<Redirect>(`/mgmt/v1/spaces/${spaceId}/redirects/${redirectId}`)\n }\n\n async delete(spaceId: string, redirectId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/redirects/${redirectId}`)\n }\n\n async reset(spaceId: string, redirectId: string): Promise<Redirect> {\n return this.client.post<Redirect>(`/mgmt/v1/spaces/${spaceId}/redirects/${redirectId}/reset`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { CreateSpaceParams, PaginatedResponse, Space, UpdateSpaceIconParams, UpdateSpaceParams } from '../types'\n\nexport class SpacesResource {\n constructor(private readonly client: HttpClient) {}\n\n async create(params: CreateSpaceParams): Promise<Space> {\n return this.client.post<Space>('/mgmt/v1/spaces', params)\n }\n\n async get(spaceId: string): Promise<Space> {\n return this.client.get<Space>(`/mgmt/v1/spaces/${spaceId}`)\n }\n\n async update(spaceId: string, params: UpdateSpaceParams): Promise<Space> {\n return this.client.put<Space>(`/mgmt/v1/spaces/${spaceId}`, params)\n }\n\n async delete(spaceId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}`)\n }\n\n async updateIcon(spaceId: string, params: UpdateSpaceIconParams): Promise<void> {\n return this.client.post<void>(`/mgmt/v1/spaces/${spaceId}/icon`, params)\n }\n\n async archive(spaceId: string): Promise<void> {\n return this.client.post<void>(`/mgmt/v1/spaces/${spaceId}/archive`)\n }\n\n async getAiUsage(spaceId: string): Promise<unknown> {\n return this.client.get<unknown>(`/mgmt/v1/spaces/${spaceId}/ai-usage`)\n }\n\n async getStats(spaceId: string): Promise<unknown> {\n return this.client.get<unknown>(`/mgmt/v1/spaces/${spaceId}/stats`)\n }\n}\n","import type { HttpClient } from '../http-client'\n\nexport class SystemResource {\n constructor(private readonly client: HttpClient) {}\n\n async health(): Promise<unknown> {\n return this.client.get<unknown>('/mgmt/v1/health')\n }\n\n async getConfig(): Promise<unknown> {\n return this.client.get<unknown>('/mgmt/v1/config')\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { CreateTeamParams, PaginatedResponse, Team, TeamHierarchy, UpdateTeamParams } from '../types'\n\nexport class TeamsResource {\n constructor(private readonly client: HttpClient) {}\n\n async list(): Promise<PaginatedResponse<Team>> {\n return this.client.get<PaginatedResponse<Team>>('/mgmt/v1/teams')\n }\n\n async create(params: CreateTeamParams): Promise<Team> {\n return this.client.post<Team>('/mgmt/v1/teams', params)\n }\n\n async get(teamId: string): Promise<Team> {\n return this.client.get<Team>(`/mgmt/v1/teams/${teamId}`)\n }\n\n async update(teamId: string, params: UpdateTeamParams): Promise<Team> {\n return this.client.put<Team>(`/mgmt/v1/teams/${teamId}`, params)\n }\n\n async delete(teamId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/teams/${teamId}`)\n }\n\n async getHierarchy(): Promise<TeamHierarchy> {\n return this.client.get<TeamHierarchy>('/mgmt/v1/teams/hierarchy')\n }\n\n async addUser(teamId: string): Promise<void> {\n return this.client.post<void>(`/mgmt/v1/teams/${teamId}/users`)\n }\n\n async updateUser(teamId: string, userId: string): Promise<void> {\n return this.client.patch<void>(`/mgmt/v1/teams/${teamId}/users/${userId}`)\n }\n\n async removeUser(teamId: string, userId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/teams/${teamId}/users/${userId}`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { CreateSpaceTokenParams, SpaceToken } from '../types'\n\nexport class TokensResource {\n constructor(private readonly client: HttpClient) {}\n\n async create(spaceId: string, params: CreateSpaceTokenParams): Promise<SpaceToken> {\n return this.client.post<SpaceToken>(`/mgmt/v1/spaces/${spaceId}/tokens`, params)\n }\n\n async delete(spaceId: string, tokenId: string): Promise<void> {\n return this.client.delete<void>(`/mgmt/v1/spaces/${spaceId}/tokens/${tokenId}`)\n }\n}\n","import type { HttpClient } from '../http-client'\nimport type { UpdateAvatarParams, UpdatePasswordParams, UpdateUserParams, User } from '../types'\n\nexport class UsersResource {\n constructor(private readonly client: HttpClient) {}\n\n async getMe(): Promise<User> {\n return this.client.get<User>('/mgmt/v1/users/me')\n }\n\n async updateMe(params: UpdateUserParams): Promise<User> {\n return this.client.patch<User>('/mgmt/v1/users/me', params)\n }\n\n async updateSettings(): Promise<void> {\n return this.client.post<void>('/mgmt/v1/users/me/settings')\n }\n\n async updateAvatar(params: UpdateAvatarParams): Promise<void> {\n return this.client.post<void>('/mgmt/v1/users/me/avatar', params)\n }\n\n async updatePassword(params: UpdatePasswordParams): Promise<void> {\n return this.client.post<void>('/mgmt/v1/users/me/password', params)\n }\n}\n","import { HttpClient } from './http-client'\nimport { AiResource } from './resources/ai'\nimport { AssetFoldersResource } from './resources/asset-folders'\nimport { AssetTagsResource } from './resources/asset-tags'\nimport { AssetsResource } from './resources/assets'\nimport { BlockFoldersResource } from './resources/block-folders'\nimport { BlockTagsResource } from './resources/block-tags'\nimport { BlocksResource } from './resources/blocks'\nimport { ContentsResource } from './resources/contents'\nimport { DataSourcesResource } from './resources/data-sources'\nimport { RedirectsResource } from './resources/redirects'\nimport { SpacesResource } from './resources/spaces'\nimport { SystemResource } from './resources/system'\nimport { TeamsResource } from './resources/teams'\nimport { TokensResource } from './resources/tokens'\nimport { UsersResource } from './resources/users'\nimport type { ClientConfig } from './types'\n\nexport class ManagementClient {\n private readonly httpClient: HttpClient\n\n public readonly users: UsersResource\n public readonly teams: TeamsResource\n public readonly spaces: SpacesResource\n public readonly blocks: BlocksResource\n public readonly blockTags: BlockTagsResource\n public readonly blockFolders: BlockFoldersResource\n public readonly contents: ContentsResource\n public readonly assets: AssetsResource\n public readonly assetFolders: AssetFoldersResource\n public readonly assetTags: AssetTagsResource\n public readonly redirects: RedirectsResource\n public readonly tokens: TokensResource\n public readonly dataSources: DataSourcesResource\n public readonly ai: AiResource\n public readonly system: SystemResource\n\n constructor(config: ClientConfig) {\n this.httpClient = new HttpClient(config)\n\n this.users = new UsersResource(this.httpClient)\n this.teams = new TeamsResource(this.httpClient)\n this.spaces = new SpacesResource(this.httpClient)\n this.blocks = new BlocksResource(this.httpClient)\n this.blockTags = new BlockTagsResource(this.httpClient)\n this.blockFolders = new BlockFoldersResource(this.httpClient)\n this.contents = new ContentsResource(this.httpClient)\n this.assets = new AssetsResource(this.httpClient)\n this.assetFolders = new AssetFoldersResource(this.httpClient)\n this.assetTags = new AssetTagsResource(this.httpClient)\n this.redirects = new RedirectsResource(this.httpClient)\n this.tokens = new TokensResource(this.httpClient)\n this.dataSources = new DataSourcesResource(this.httpClient)\n this.ai = new AiResource(this.httpClient)\n this.system = new SystemResource(this.httpClient)\n }\n}\n"],"names":["ManagementApiError","message","statusCode","response","HttpClient","config","method","path","body","params","url","key","value","item","headers","controller","timeoutId","error","data","AiResource","client","AssetFoldersResource","spaceId","folderId","AssetTagsResource","tagId","AssetsResource","assetId","BlockFoldersResource","BlockTagsResource","BlocksResource","blockId","ContentsResource","contentId","version","DataSourcesResource","dataSourceId","entryId","RedirectsResource","redirectId","SpacesResource","SystemResource","TeamsResource","teamId","userId","TokensResource","tokenId","UsersResource","ManagementClient"],"mappings":"gFAEO,MAAMA,UAA2B,KAAM,CAC5C,YACEC,EACgBC,EAAqB,EACrBC,EAChB,CACA,MAAMF,CAAO,EAHG,KAAA,WAAAC,EACA,KAAA,SAAAC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