@lumibase/sdk 0.10.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/dist/index.cjs +1326 -0
- package/dist/index.d.cts +1753 -0
- package/dist/index.d.ts +1753 -0
- package/dist/index.js +1257 -0
- package/package.json +38 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1753 @@
|
|
|
1
|
+
type DefaultSchema = Record<string, Record<string, unknown>>;
|
|
2
|
+
type ID = string;
|
|
3
|
+
type Locale = string;
|
|
4
|
+
type Brand<TBrand extends string, TValue> = TValue & {
|
|
5
|
+
readonly __brand: TBrand;
|
|
6
|
+
};
|
|
7
|
+
type AgentRiskLevel = "safe" | "review_required" | "dangerous" | "blocked";
|
|
8
|
+
interface AgentGoalResource {
|
|
9
|
+
id: string;
|
|
10
|
+
siteId: string;
|
|
11
|
+
title: string;
|
|
12
|
+
description: string | null;
|
|
13
|
+
source: string;
|
|
14
|
+
createdBy: string | null;
|
|
15
|
+
assigneeAgent: string;
|
|
16
|
+
priority: string;
|
|
17
|
+
deadline: string | null;
|
|
18
|
+
status: string;
|
|
19
|
+
successCriteria: Record<string, unknown>;
|
|
20
|
+
metadata: Record<string, unknown>;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}
|
|
24
|
+
interface AgentGoalCreateInput {
|
|
25
|
+
title: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
source?: "user" | "flow" | "api" | "schedule";
|
|
28
|
+
assigneeAgent?: string;
|
|
29
|
+
priority?: "low" | "normal" | "high" | "urgent";
|
|
30
|
+
successCriteria?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
interface AgentRunResource {
|
|
33
|
+
id: string;
|
|
34
|
+
goalId: string;
|
|
35
|
+
siteId: string;
|
|
36
|
+
agentName: string;
|
|
37
|
+
provider: string;
|
|
38
|
+
model: string;
|
|
39
|
+
status: string;
|
|
40
|
+
budget: Record<string, unknown>;
|
|
41
|
+
policySnapshotHash: string | null;
|
|
42
|
+
risk: AgentRiskLevel | string;
|
|
43
|
+
metrics: Record<string, unknown>;
|
|
44
|
+
error: string | null;
|
|
45
|
+
retryOfRunId: string | null;
|
|
46
|
+
startedAt: string;
|
|
47
|
+
finishedAt: string | null;
|
|
48
|
+
createdAt: string;
|
|
49
|
+
updatedAt: string;
|
|
50
|
+
}
|
|
51
|
+
interface AgentToolResource {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
requiredCapabilities: string[];
|
|
55
|
+
service: "schema" | "items" | "ai";
|
|
56
|
+
inputSchema: Record<string, unknown>;
|
|
57
|
+
outputSchema: Record<string, unknown>;
|
|
58
|
+
riskPolicy: {
|
|
59
|
+
level: AgentRiskLevel;
|
|
60
|
+
approvalPolicy?: string;
|
|
61
|
+
};
|
|
62
|
+
rateLimit: {
|
|
63
|
+
maxCallsPerMinute?: number;
|
|
64
|
+
maxCallsPerRun?: number;
|
|
65
|
+
};
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
owner: string;
|
|
68
|
+
extensionId?: string | null;
|
|
69
|
+
}
|
|
70
|
+
interface AgentApprovalResource {
|
|
71
|
+
id: string;
|
|
72
|
+
runId: string;
|
|
73
|
+
siteId: string;
|
|
74
|
+
legacyApprovalId: string | null;
|
|
75
|
+
subjectType: "plan" | "tool_call" | "artifact" | "schema_diff" | string;
|
|
76
|
+
subjectId: string;
|
|
77
|
+
status: string;
|
|
78
|
+
approvalPolicy: string;
|
|
79
|
+
requestedByAgent: string;
|
|
80
|
+
decidedBy: string | null;
|
|
81
|
+
decisionReason: string | null;
|
|
82
|
+
expiresAt: string | null;
|
|
83
|
+
createdAt: string;
|
|
84
|
+
decidedAt: string | null;
|
|
85
|
+
}
|
|
86
|
+
type AgentArtifactType = "schema_diff" | "page_spec" | "component_spec" | "seed_data" | "api_spec" | "prompt" | "migration";
|
|
87
|
+
interface AgentArtifactResource {
|
|
88
|
+
id: string;
|
|
89
|
+
runId: string;
|
|
90
|
+
siteId: string;
|
|
91
|
+
type: AgentArtifactType | string;
|
|
92
|
+
target: string | null;
|
|
93
|
+
title: string;
|
|
94
|
+
contentRef: string | null;
|
|
95
|
+
content: Record<string, unknown>;
|
|
96
|
+
hash: string;
|
|
97
|
+
version: number;
|
|
98
|
+
status: string;
|
|
99
|
+
metadata: Record<string, unknown>;
|
|
100
|
+
createdAt: string;
|
|
101
|
+
updatedAt: string;
|
|
102
|
+
}
|
|
103
|
+
interface AgentArtifactCreateInput {
|
|
104
|
+
runId: string;
|
|
105
|
+
type: AgentArtifactType;
|
|
106
|
+
title: string;
|
|
107
|
+
target?: string;
|
|
108
|
+
content: Record<string, unknown>;
|
|
109
|
+
}
|
|
110
|
+
interface AgentEvaluationResource {
|
|
111
|
+
id: string;
|
|
112
|
+
runId: string;
|
|
113
|
+
siteId: string;
|
|
114
|
+
artifactId: string | null;
|
|
115
|
+
kind: string;
|
|
116
|
+
status: "pass" | "warn" | "fail" | string;
|
|
117
|
+
score: number | null;
|
|
118
|
+
summary: string;
|
|
119
|
+
details: Record<string, unknown>;
|
|
120
|
+
artifactHash: string | null;
|
|
121
|
+
createdAt: string;
|
|
122
|
+
}
|
|
123
|
+
interface AgentMemoryResource {
|
|
124
|
+
id: string;
|
|
125
|
+
siteId: string;
|
|
126
|
+
scope: string;
|
|
127
|
+
scopeId: string | null;
|
|
128
|
+
sourceType: string;
|
|
129
|
+
sourceId: string | null;
|
|
130
|
+
content: string;
|
|
131
|
+
embedding: unknown;
|
|
132
|
+
confidence: number;
|
|
133
|
+
metadata: Record<string, unknown>;
|
|
134
|
+
expiresAt: string | null;
|
|
135
|
+
createdAt: string;
|
|
136
|
+
}
|
|
137
|
+
interface AgentMemoryContext {
|
|
138
|
+
siteId: string;
|
|
139
|
+
memories: AgentMemoryResource[];
|
|
140
|
+
recentRuns: AgentRunResource[];
|
|
141
|
+
approvedArtifacts: AgentArtifactResource[];
|
|
142
|
+
}
|
|
143
|
+
interface AgentMemoryWriteInput {
|
|
144
|
+
scope: string;
|
|
145
|
+
scopeId?: string;
|
|
146
|
+
sourceType: string;
|
|
147
|
+
sourceId?: string;
|
|
148
|
+
content: string;
|
|
149
|
+
confidence?: number;
|
|
150
|
+
}
|
|
151
|
+
interface AgentGenerateAppInput {
|
|
152
|
+
collections?: string[];
|
|
153
|
+
targetApp?: string;
|
|
154
|
+
constraints?: Record<string, unknown>;
|
|
155
|
+
budget?: Record<string, unknown>;
|
|
156
|
+
approvalPolicy?: string;
|
|
157
|
+
}
|
|
158
|
+
interface AgentGenerateAppResult {
|
|
159
|
+
run: {
|
|
160
|
+
goalId: string;
|
|
161
|
+
runId: string;
|
|
162
|
+
agentName: string;
|
|
163
|
+
};
|
|
164
|
+
artifacts: AgentArtifactResource[];
|
|
165
|
+
evaluations: AgentEvaluationResource[];
|
|
166
|
+
}
|
|
167
|
+
type PrimaryKeyType = "nanoid" | "uuid" | "integer" | "bigInteger" | "string";
|
|
168
|
+
type StorageMode = "jsonb" | "materialized" | "physical" | "external";
|
|
169
|
+
interface CollectionResource {
|
|
170
|
+
id: string;
|
|
171
|
+
siteId: string;
|
|
172
|
+
name: string;
|
|
173
|
+
label?: string | null;
|
|
174
|
+
pluralLabel?: string | null;
|
|
175
|
+
hidden?: boolean;
|
|
176
|
+
system?: boolean;
|
|
177
|
+
singleton: boolean;
|
|
178
|
+
icon?: string | null;
|
|
179
|
+
color?: string | null;
|
|
180
|
+
note?: string | null;
|
|
181
|
+
primaryKeyField?: string;
|
|
182
|
+
displayTemplate: string | null;
|
|
183
|
+
sortField: string | null;
|
|
184
|
+
archiveField: string | null;
|
|
185
|
+
archiveValue: string | null;
|
|
186
|
+
unarchiveValue?: string | null;
|
|
187
|
+
itemDuplicationFields?: string[];
|
|
188
|
+
translations?: Record<string, unknown>;
|
|
189
|
+
accountability?: "all" | "activity" | "none";
|
|
190
|
+
versioning?: boolean;
|
|
191
|
+
primaryKeyType?: PrimaryKeyType;
|
|
192
|
+
storageMode?: StorageMode;
|
|
193
|
+
meta: Record<string, unknown>;
|
|
194
|
+
fields?: FieldResource[];
|
|
195
|
+
systemFields?: FieldResource[];
|
|
196
|
+
createdAt?: string;
|
|
197
|
+
updatedAt?: string;
|
|
198
|
+
}
|
|
199
|
+
type CollectionInput = Omit<Partial<CollectionResource>, "id" | "siteId" | "fields" | "systemFields" | "createdAt" | "updatedAt"> & {
|
|
200
|
+
name: string;
|
|
201
|
+
};
|
|
202
|
+
interface FieldResource {
|
|
203
|
+
id: string;
|
|
204
|
+
collectionId: string;
|
|
205
|
+
name: string;
|
|
206
|
+
type: string;
|
|
207
|
+
interface: string;
|
|
208
|
+
display?: string | null;
|
|
209
|
+
label?: string | null;
|
|
210
|
+
note?: string | null;
|
|
211
|
+
defaultValue?: unknown;
|
|
212
|
+
nullable?: boolean;
|
|
213
|
+
unique?: boolean;
|
|
214
|
+
indexed?: boolean;
|
|
215
|
+
searchable?: boolean;
|
|
216
|
+
length?: number | null;
|
|
217
|
+
precision?: number | null;
|
|
218
|
+
scale?: number | null;
|
|
219
|
+
special?: unknown[];
|
|
220
|
+
translations?: Record<string, unknown>;
|
|
221
|
+
options?: Record<string, unknown>;
|
|
222
|
+
displayOptions?: Record<string, unknown>;
|
|
223
|
+
validation?: Record<string, unknown>;
|
|
224
|
+
conditions?: unknown[];
|
|
225
|
+
required: boolean;
|
|
226
|
+
readonly?: boolean;
|
|
227
|
+
hidden: boolean;
|
|
228
|
+
encrypted?: boolean;
|
|
229
|
+
versioned?: boolean;
|
|
230
|
+
rawEnabled?: boolean;
|
|
231
|
+
width?: "half" | "full" | "fill";
|
|
232
|
+
group?: string | null;
|
|
233
|
+
sortOrder: number;
|
|
234
|
+
system?: boolean;
|
|
235
|
+
locked?: boolean;
|
|
236
|
+
generated?: boolean;
|
|
237
|
+
column?: string;
|
|
238
|
+
renameFrom?: string;
|
|
239
|
+
migrationPlan?: Record<string, unknown>;
|
|
240
|
+
confirmRiskyChange?: boolean;
|
|
241
|
+
[key: string]: unknown;
|
|
242
|
+
}
|
|
243
|
+
type FieldInput = Omit<Partial<FieldResource>, "id" | "collectionId"> & {
|
|
244
|
+
name: string;
|
|
245
|
+
type: string;
|
|
246
|
+
interface: string;
|
|
247
|
+
};
|
|
248
|
+
interface FieldMutationOptions {
|
|
249
|
+
migrationPlan?: Record<string, unknown>;
|
|
250
|
+
confirmRiskyChange?: boolean;
|
|
251
|
+
}
|
|
252
|
+
interface FieldRenameInput extends FieldMutationOptions {
|
|
253
|
+
type: string;
|
|
254
|
+
interface: string;
|
|
255
|
+
display?: string | null;
|
|
256
|
+
label?: string | null;
|
|
257
|
+
note?: string | null;
|
|
258
|
+
defaultValue?: unknown;
|
|
259
|
+
nullable?: boolean;
|
|
260
|
+
unique?: boolean;
|
|
261
|
+
indexed?: boolean;
|
|
262
|
+
searchable?: boolean;
|
|
263
|
+
length?: number | null;
|
|
264
|
+
precision?: number | null;
|
|
265
|
+
scale?: number | null;
|
|
266
|
+
special?: unknown[];
|
|
267
|
+
options?: Record<string, unknown>;
|
|
268
|
+
displayOptions?: Record<string, unknown>;
|
|
269
|
+
validation?: Record<string, unknown>;
|
|
270
|
+
conditions?: unknown[];
|
|
271
|
+
required?: boolean;
|
|
272
|
+
readonly?: boolean;
|
|
273
|
+
hidden?: boolean;
|
|
274
|
+
encrypted?: boolean;
|
|
275
|
+
versioned?: boolean;
|
|
276
|
+
rawEnabled?: boolean;
|
|
277
|
+
width?: "half" | "full" | "fill";
|
|
278
|
+
group?: string | null;
|
|
279
|
+
sortOrder?: number;
|
|
280
|
+
[key: string]: unknown;
|
|
281
|
+
}
|
|
282
|
+
interface FieldDeleteOptions extends FieldMutationOptions {
|
|
283
|
+
force?: boolean;
|
|
284
|
+
backupToRevisions?: boolean;
|
|
285
|
+
}
|
|
286
|
+
interface RelationResource {
|
|
287
|
+
id: string;
|
|
288
|
+
siteId: string;
|
|
289
|
+
manyCollection: string;
|
|
290
|
+
manyField: string;
|
|
291
|
+
oneCollection: string;
|
|
292
|
+
oneField: string | null;
|
|
293
|
+
junctionCollection: string | null;
|
|
294
|
+
type?: RelationType;
|
|
295
|
+
aliasField?: string | null;
|
|
296
|
+
relatedDisplayTemplate?: string | null;
|
|
297
|
+
junctionManyField?: string | null;
|
|
298
|
+
junctionOneField?: string | null;
|
|
299
|
+
sortField?: string | null;
|
|
300
|
+
onDelete?: "restrict" | "cascade" | "set null" | "no action";
|
|
301
|
+
meta?: Record<string, unknown>;
|
|
302
|
+
}
|
|
303
|
+
type RelationType = "m2o" | "o2m" | "m2m" | "m2a";
|
|
304
|
+
type RelationInput = Omit<Partial<RelationResource>, "id" | "siteId"> & {
|
|
305
|
+
manyCollection: string;
|
|
306
|
+
manyField: string;
|
|
307
|
+
oneCollection: string;
|
|
308
|
+
type?: RelationType;
|
|
309
|
+
};
|
|
310
|
+
type SchemaDiffRisk = "low" | "medium" | "high";
|
|
311
|
+
type SchemaRuntimeImpact = "cache_invalidation" | "permission_recompile" | "typegen_rebuild" | "data_migration_required" | "relation_reindex" | "storage_runtime_change";
|
|
312
|
+
interface SchemaDiffEntry {
|
|
313
|
+
name?: string;
|
|
314
|
+
field?: string;
|
|
315
|
+
identity?: string;
|
|
316
|
+
type?: string;
|
|
317
|
+
changes?: string[];
|
|
318
|
+
risk: SchemaDiffRisk;
|
|
319
|
+
runtimeImpact: SchemaRuntimeImpact[];
|
|
320
|
+
}
|
|
321
|
+
interface SchemaDiff {
|
|
322
|
+
risk: SchemaDiffRisk;
|
|
323
|
+
runtimeImpact: SchemaRuntimeImpact[];
|
|
324
|
+
collection: {
|
|
325
|
+
added: string[];
|
|
326
|
+
removed: string[];
|
|
327
|
+
changed: SchemaDiffEntry[];
|
|
328
|
+
};
|
|
329
|
+
fields: {
|
|
330
|
+
added: SchemaDiffEntry[];
|
|
331
|
+
removed: SchemaDiffEntry[];
|
|
332
|
+
changed: SchemaDiffEntry[];
|
|
333
|
+
};
|
|
334
|
+
relations: {
|
|
335
|
+
added: SchemaDiffEntry[];
|
|
336
|
+
removed: SchemaDiffEntry[];
|
|
337
|
+
changed: SchemaDiffEntry[];
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
interface SchemaChangedEvent {
|
|
341
|
+
type: "schema.changed";
|
|
342
|
+
siteId: string;
|
|
343
|
+
collection: string;
|
|
344
|
+
affectedCollections: string[];
|
|
345
|
+
diff: SchemaDiff;
|
|
346
|
+
}
|
|
347
|
+
interface SchemaApplyResult {
|
|
348
|
+
collection: CollectionResource;
|
|
349
|
+
diff: SchemaDiff;
|
|
350
|
+
affectedCollections: string[];
|
|
351
|
+
event: SchemaChangedEvent;
|
|
352
|
+
}
|
|
353
|
+
type SchemaApplyInput = Partial<CollectionInput> & {
|
|
354
|
+
fields?: FieldInput[];
|
|
355
|
+
relations?: RelationInput[];
|
|
356
|
+
};
|
|
357
|
+
type SchemaDiffInput = SchemaApplyInput & {
|
|
358
|
+
name: string;
|
|
359
|
+
};
|
|
360
|
+
interface TypegenSchemaFilters {
|
|
361
|
+
include?: string[];
|
|
362
|
+
exclude?: string[];
|
|
363
|
+
}
|
|
364
|
+
type ItemFilterOp = "_eq" | "_neq" | "_in" | "_nin" | "_gt" | "_gte" | "_lt" | "_lte" | "_contains" | "_starts_with" | "_ends_with" | "_null" | "_nnull";
|
|
365
|
+
interface ItemFilter {
|
|
366
|
+
_and?: ItemFilter[];
|
|
367
|
+
_or?: ItemFilter[];
|
|
368
|
+
[key: string]: {
|
|
369
|
+
[op in ItemFilterOp]?: unknown;
|
|
370
|
+
} | ItemFilter[] | undefined;
|
|
371
|
+
}
|
|
372
|
+
interface ListItemsParams {
|
|
373
|
+
fields?: string[];
|
|
374
|
+
filter?: ItemFilter;
|
|
375
|
+
sort?: string[];
|
|
376
|
+
limit?: number;
|
|
377
|
+
offset?: number;
|
|
378
|
+
status?: string | null;
|
|
379
|
+
search?: string;
|
|
380
|
+
}
|
|
381
|
+
interface ItemRow<TData extends Record<string, unknown> = Record<string, unknown>> {
|
|
382
|
+
id: string;
|
|
383
|
+
siteId: string;
|
|
384
|
+
collectionId: string;
|
|
385
|
+
status: string;
|
|
386
|
+
data: TData;
|
|
387
|
+
sort: number;
|
|
388
|
+
/** Content scheduling window (Publish_Window); null when not scheduled. */
|
|
389
|
+
publishAt?: string | null;
|
|
390
|
+
unpublishAt?: string | null;
|
|
391
|
+
/** Editorial workflow state; null when the workflow is not in use. */
|
|
392
|
+
editorialState?: string | null;
|
|
393
|
+
userCreated: string | null;
|
|
394
|
+
userUpdated: string | null;
|
|
395
|
+
createdAt: string;
|
|
396
|
+
updatedAt: string;
|
|
397
|
+
deletedAt: string | null;
|
|
398
|
+
}
|
|
399
|
+
interface RevisionRow {
|
|
400
|
+
id: string;
|
|
401
|
+
siteId: string;
|
|
402
|
+
collectionId: string;
|
|
403
|
+
itemId: string;
|
|
404
|
+
delta: {
|
|
405
|
+
before?: Record<string, unknown> | null;
|
|
406
|
+
after?: Record<string, unknown>;
|
|
407
|
+
};
|
|
408
|
+
userId: string | null;
|
|
409
|
+
createdAt: string;
|
|
410
|
+
authorType?: "human" | "agent";
|
|
411
|
+
createdByRunId?: string | null;
|
|
412
|
+
model?: string | null;
|
|
413
|
+
constitutionHash?: string | null;
|
|
414
|
+
confidence?: number | null;
|
|
415
|
+
sources?: unknown[] | null;
|
|
416
|
+
staged?: boolean;
|
|
417
|
+
autoCommitAt?: string | null;
|
|
418
|
+
}
|
|
419
|
+
interface ListItemsResponse<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
420
|
+
data: ItemRow<T>[];
|
|
421
|
+
meta: {
|
|
422
|
+
total: number;
|
|
423
|
+
limit: number;
|
|
424
|
+
offset: number;
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
type PermissionAction = "create" | "read" | "update" | "delete" | "share" | "read_decrypted";
|
|
428
|
+
interface RoleResource {
|
|
429
|
+
id: string;
|
|
430
|
+
siteId: string;
|
|
431
|
+
key: string | null;
|
|
432
|
+
systemKey: string | null;
|
|
433
|
+
name: string;
|
|
434
|
+
description: string | null;
|
|
435
|
+
icon: string | null;
|
|
436
|
+
parentId: string | null;
|
|
437
|
+
adminAccess: boolean;
|
|
438
|
+
appAccess: boolean;
|
|
439
|
+
createdAt?: string;
|
|
440
|
+
}
|
|
441
|
+
interface RoleDetail extends RoleResource {
|
|
442
|
+
policies: Array<{
|
|
443
|
+
policyId: string;
|
|
444
|
+
priority: number;
|
|
445
|
+
}>;
|
|
446
|
+
users: Array<{
|
|
447
|
+
userId: string;
|
|
448
|
+
}>;
|
|
449
|
+
}
|
|
450
|
+
interface PolicyResource {
|
|
451
|
+
id: string;
|
|
452
|
+
siteId: string;
|
|
453
|
+
key: string | null;
|
|
454
|
+
name: string;
|
|
455
|
+
icon: string | null;
|
|
456
|
+
description: string | null;
|
|
457
|
+
adminAccess: boolean;
|
|
458
|
+
appAccess: boolean;
|
|
459
|
+
enforceTfa: boolean;
|
|
460
|
+
ipAllow: string[];
|
|
461
|
+
ipDeny: string[];
|
|
462
|
+
validFrom: string | null;
|
|
463
|
+
validUntil: string | null;
|
|
464
|
+
/** Top-level guardrails: time window, IP allow/deny. */
|
|
465
|
+
rules: Record<string, unknown>;
|
|
466
|
+
createdAt?: string;
|
|
467
|
+
}
|
|
468
|
+
interface PermissionRow {
|
|
469
|
+
id: string;
|
|
470
|
+
siteId: string;
|
|
471
|
+
policyId: string;
|
|
472
|
+
collection: string;
|
|
473
|
+
action: PermissionAction;
|
|
474
|
+
permissions: Record<string, unknown>;
|
|
475
|
+
validation: Record<string, unknown>;
|
|
476
|
+
presets: Record<string, unknown>;
|
|
477
|
+
fields: string[];
|
|
478
|
+
}
|
|
479
|
+
interface PolicyDetail extends PolicyResource {
|
|
480
|
+
permissions: PermissionRow[];
|
|
481
|
+
}
|
|
482
|
+
interface CompiledPermission {
|
|
483
|
+
collection: string;
|
|
484
|
+
action: PermissionAction;
|
|
485
|
+
rule: Record<string, unknown> | null;
|
|
486
|
+
fields: string[];
|
|
487
|
+
presets: Record<string, unknown>;
|
|
488
|
+
validation: Record<string, unknown>;
|
|
489
|
+
sources?: Array<{
|
|
490
|
+
policyId: string;
|
|
491
|
+
policyName: string;
|
|
492
|
+
}>;
|
|
493
|
+
}
|
|
494
|
+
interface PermissionBundle {
|
|
495
|
+
admin: boolean;
|
|
496
|
+
appAccess: boolean;
|
|
497
|
+
tfaRequired: boolean;
|
|
498
|
+
byKey: Record<string, CompiledPermission>;
|
|
499
|
+
roles: Array<{
|
|
500
|
+
id: string;
|
|
501
|
+
name: string;
|
|
502
|
+
adminAccess: boolean;
|
|
503
|
+
appAccess: boolean;
|
|
504
|
+
}>;
|
|
505
|
+
policies: Array<{
|
|
506
|
+
id: string;
|
|
507
|
+
name: string;
|
|
508
|
+
key: string | null;
|
|
509
|
+
}>;
|
|
510
|
+
}
|
|
511
|
+
interface PermissionCheckResult {
|
|
512
|
+
allowed: boolean;
|
|
513
|
+
reason: string | null;
|
|
514
|
+
fields: string[];
|
|
515
|
+
rule?: Record<string, unknown> | null;
|
|
516
|
+
presets?: Record<string, unknown>;
|
|
517
|
+
}
|
|
518
|
+
interface AccessConflict {
|
|
519
|
+
severity: "warning" | "blocking";
|
|
520
|
+
collection: string;
|
|
521
|
+
action: PermissionAction;
|
|
522
|
+
existingPolicy: string;
|
|
523
|
+
incomingPolicy: string;
|
|
524
|
+
reason: string;
|
|
525
|
+
}
|
|
526
|
+
interface AccessConflictReport {
|
|
527
|
+
ok: boolean;
|
|
528
|
+
conflicts: AccessConflict[];
|
|
529
|
+
warnings: AccessConflict[];
|
|
530
|
+
}
|
|
531
|
+
interface AccessConflictCheckInput {
|
|
532
|
+
target: {
|
|
533
|
+
type: "role" | "user" | "api_key";
|
|
534
|
+
id: string;
|
|
535
|
+
};
|
|
536
|
+
addPolicies?: string[];
|
|
537
|
+
removePolicies?: string[];
|
|
538
|
+
}
|
|
539
|
+
declare const ACCESS_EXPORT_SCHEMA = "lumibase.access@v1";
|
|
540
|
+
type AccessImportMode = "merge" | "replace-managed" | "replace-all";
|
|
541
|
+
interface AccessExportManifest {
|
|
542
|
+
schema: typeof ACCESS_EXPORT_SCHEMA;
|
|
543
|
+
exportedAt: string;
|
|
544
|
+
roles: AccessExportRole[];
|
|
545
|
+
policies: AccessExportPolicy[];
|
|
546
|
+
bindings: AccessExportBindings;
|
|
547
|
+
apiKeys: AccessExportApiKey[];
|
|
548
|
+
}
|
|
549
|
+
interface AccessExportRole {
|
|
550
|
+
ref: string;
|
|
551
|
+
key: string | null;
|
|
552
|
+
systemKey: string | null;
|
|
553
|
+
name: string;
|
|
554
|
+
description: string | null;
|
|
555
|
+
icon: string | null;
|
|
556
|
+
parent: string | null;
|
|
557
|
+
adminAccess: boolean;
|
|
558
|
+
appAccess: boolean;
|
|
559
|
+
}
|
|
560
|
+
interface AccessExportPolicy {
|
|
561
|
+
ref: string;
|
|
562
|
+
key: string | null;
|
|
563
|
+
name: string;
|
|
564
|
+
icon: string | null;
|
|
565
|
+
description: string | null;
|
|
566
|
+
adminAccess: boolean;
|
|
567
|
+
appAccess: boolean;
|
|
568
|
+
enforceTfa: boolean;
|
|
569
|
+
ipAllow: string[];
|
|
570
|
+
ipDeny: string[];
|
|
571
|
+
validFrom: string | null;
|
|
572
|
+
validUntil: string | null;
|
|
573
|
+
rules: Record<string, unknown>;
|
|
574
|
+
permissions: AccessExportPermission[];
|
|
575
|
+
}
|
|
576
|
+
interface AccessExportPermission {
|
|
577
|
+
collection: string;
|
|
578
|
+
action: PermissionAction;
|
|
579
|
+
permissions: Record<string, unknown>;
|
|
580
|
+
validation: Record<string, unknown>;
|
|
581
|
+
presets: Record<string, unknown>;
|
|
582
|
+
fields: string[];
|
|
583
|
+
}
|
|
584
|
+
interface AccessExportBindings {
|
|
585
|
+
rolePolicies: Array<{
|
|
586
|
+
role: string;
|
|
587
|
+
policy: string;
|
|
588
|
+
priority: number;
|
|
589
|
+
}>;
|
|
590
|
+
userRoles: Array<{
|
|
591
|
+
userId: string;
|
|
592
|
+
role: string;
|
|
593
|
+
primary: boolean;
|
|
594
|
+
}>;
|
|
595
|
+
userPolicies: Array<{
|
|
596
|
+
userId: string;
|
|
597
|
+
policy: string;
|
|
598
|
+
priority: number;
|
|
599
|
+
}>;
|
|
600
|
+
apiKeyRoles: Array<{
|
|
601
|
+
apiKey: string;
|
|
602
|
+
role: string;
|
|
603
|
+
priority: number;
|
|
604
|
+
}>;
|
|
605
|
+
apiKeyPolicies: Array<{
|
|
606
|
+
apiKey: string;
|
|
607
|
+
policy: string;
|
|
608
|
+
priority: number;
|
|
609
|
+
}>;
|
|
610
|
+
}
|
|
611
|
+
interface AccessExportApiKey {
|
|
612
|
+
ref: string;
|
|
613
|
+
name: string;
|
|
614
|
+
description: string | null;
|
|
615
|
+
prefix: string;
|
|
616
|
+
expiresAt: string | null;
|
|
617
|
+
revokedAt: string | null;
|
|
618
|
+
metadata: Record<string, unknown>;
|
|
619
|
+
}
|
|
620
|
+
interface AccessImportIssue {
|
|
621
|
+
code: string;
|
|
622
|
+
message: string;
|
|
623
|
+
path?: string;
|
|
624
|
+
}
|
|
625
|
+
interface AccessImportDiffEntry {
|
|
626
|
+
ref: string;
|
|
627
|
+
status: "create" | "update" | "unchanged" | "delete";
|
|
628
|
+
}
|
|
629
|
+
interface AccessImportDiffSection {
|
|
630
|
+
create: number;
|
|
631
|
+
update: number;
|
|
632
|
+
unchanged: number;
|
|
633
|
+
delete: number;
|
|
634
|
+
entries: AccessImportDiffEntry[];
|
|
635
|
+
}
|
|
636
|
+
interface AccessImportDiff {
|
|
637
|
+
roles: AccessImportDiffSection;
|
|
638
|
+
policies: AccessImportDiffSection;
|
|
639
|
+
apiKeys: AccessImportDiffSection;
|
|
640
|
+
bindings: {
|
|
641
|
+
rolePolicies: AccessImportDiffSection;
|
|
642
|
+
userRoles: AccessImportDiffSection;
|
|
643
|
+
userPolicies: AccessImportDiffSection;
|
|
644
|
+
apiKeyRoles: AccessImportDiffSection;
|
|
645
|
+
apiKeyPolicies: AccessImportDiffSection;
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
interface AccessImportDryRunResult {
|
|
649
|
+
dryRun: true;
|
|
650
|
+
valid: boolean;
|
|
651
|
+
errors: AccessImportIssue[];
|
|
652
|
+
diff: AccessImportDiff;
|
|
653
|
+
conflicts: AccessConflictReport;
|
|
654
|
+
}
|
|
655
|
+
interface AccessImportSummary {
|
|
656
|
+
mode: AccessImportMode;
|
|
657
|
+
roles: AccessImportDiffSection;
|
|
658
|
+
policies: AccessImportDiffSection;
|
|
659
|
+
apiKeys: AccessImportDiffSection;
|
|
660
|
+
bindings: AccessImportDiff["bindings"];
|
|
661
|
+
}
|
|
662
|
+
interface AccessImportApplyResult extends Omit<AccessImportDryRunResult, "dryRun"> {
|
|
663
|
+
dryRun: false;
|
|
664
|
+
mode: AccessImportMode;
|
|
665
|
+
applied: boolean;
|
|
666
|
+
audit: {
|
|
667
|
+
event: "access_import_applied";
|
|
668
|
+
summary: AccessImportSummary;
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
interface AccessImportOptions {
|
|
672
|
+
mode?: AccessImportMode;
|
|
673
|
+
}
|
|
674
|
+
interface ApiKeyResource {
|
|
675
|
+
id: string;
|
|
676
|
+
siteId: string;
|
|
677
|
+
name: string;
|
|
678
|
+
description: string | null;
|
|
679
|
+
prefix: string;
|
|
680
|
+
createdBy: string | null;
|
|
681
|
+
rotatedAt: string | null;
|
|
682
|
+
rotatedBy: string | null;
|
|
683
|
+
expiresAt: string | null;
|
|
684
|
+
revokedAt: string | null;
|
|
685
|
+
revokedBy: string | null;
|
|
686
|
+
lastUsedAt: string | null;
|
|
687
|
+
lastUsedIp: string | null;
|
|
688
|
+
lastUsedUserAgent: string | null;
|
|
689
|
+
metadata: Record<string, unknown>;
|
|
690
|
+
createdAt: string;
|
|
691
|
+
roles: Array<{
|
|
692
|
+
roleId: string;
|
|
693
|
+
priority: number;
|
|
694
|
+
}>;
|
|
695
|
+
policies: Array<{
|
|
696
|
+
policyId: string;
|
|
697
|
+
priority: number;
|
|
698
|
+
}>;
|
|
699
|
+
}
|
|
700
|
+
interface ApiKeyCreateInput {
|
|
701
|
+
name: string;
|
|
702
|
+
description?: string;
|
|
703
|
+
expiresAt?: string | Date | null;
|
|
704
|
+
metadata?: Record<string, unknown>;
|
|
705
|
+
}
|
|
706
|
+
interface ApiKeyRotateInput {
|
|
707
|
+
expiresAt?: string | Date | null;
|
|
708
|
+
}
|
|
709
|
+
interface ApiKeySecretResult extends ApiKeyResource {
|
|
710
|
+
/** Plaintext token. Returned only by create/rotate responses. */
|
|
711
|
+
token: string;
|
|
712
|
+
}
|
|
713
|
+
interface ApiKeyRoleAttachment {
|
|
714
|
+
apiKeyId: string;
|
|
715
|
+
siteId: string;
|
|
716
|
+
roleId: string;
|
|
717
|
+
priority: number;
|
|
718
|
+
createdAt?: string;
|
|
719
|
+
}
|
|
720
|
+
interface ApiKeyPolicyAttachment {
|
|
721
|
+
apiKeyId: string;
|
|
722
|
+
siteId: string;
|
|
723
|
+
policyId: string;
|
|
724
|
+
priority: number;
|
|
725
|
+
createdAt?: string;
|
|
726
|
+
}
|
|
727
|
+
interface ShareResource {
|
|
728
|
+
id: string;
|
|
729
|
+
siteId: string;
|
|
730
|
+
collection: string;
|
|
731
|
+
itemId: string;
|
|
732
|
+
roleId: string;
|
|
733
|
+
validFrom: string | null;
|
|
734
|
+
validUntil: string | null;
|
|
735
|
+
maxUses: number | null;
|
|
736
|
+
usedCount: number;
|
|
737
|
+
revokedAt: string | null;
|
|
738
|
+
revokedBy: string | null;
|
|
739
|
+
createdBy: string | null;
|
|
740
|
+
lastUsedAt: string | null;
|
|
741
|
+
createdAt: string;
|
|
742
|
+
}
|
|
743
|
+
interface ShareCreateInput {
|
|
744
|
+
collection: string;
|
|
745
|
+
itemId: string;
|
|
746
|
+
roleId: string;
|
|
747
|
+
password?: string;
|
|
748
|
+
validFrom?: string | Date | null;
|
|
749
|
+
validUntil?: string | Date | null;
|
|
750
|
+
maxUses?: number | null;
|
|
751
|
+
}
|
|
752
|
+
interface ShareSecretResult extends ShareResource {
|
|
753
|
+
token: string;
|
|
754
|
+
url: string;
|
|
755
|
+
}
|
|
756
|
+
interface PresetResource {
|
|
757
|
+
id: string;
|
|
758
|
+
siteId: string;
|
|
759
|
+
bookmark: string | null;
|
|
760
|
+
collection: string;
|
|
761
|
+
userId: string | null;
|
|
762
|
+
roleId: string | null;
|
|
763
|
+
layout: string;
|
|
764
|
+
layoutQuery: Record<string, unknown>;
|
|
765
|
+
layoutOptions: Record<string, unknown>;
|
|
766
|
+
search: string | null;
|
|
767
|
+
filter: Record<string, unknown>;
|
|
768
|
+
icon: string | null;
|
|
769
|
+
color: string | null;
|
|
770
|
+
refreshInterval: number;
|
|
771
|
+
createdAt: string;
|
|
772
|
+
}
|
|
773
|
+
interface TranslationResource {
|
|
774
|
+
id: string;
|
|
775
|
+
siteId: string;
|
|
776
|
+
language: string;
|
|
777
|
+
namespace: string;
|
|
778
|
+
key: string;
|
|
779
|
+
value: string;
|
|
780
|
+
status: string;
|
|
781
|
+
updatedAt: string;
|
|
782
|
+
}
|
|
783
|
+
interface SettingResource {
|
|
784
|
+
id: string;
|
|
785
|
+
siteId: string;
|
|
786
|
+
key: string;
|
|
787
|
+
value: Record<string, unknown>;
|
|
788
|
+
scope: string;
|
|
789
|
+
updatedAt: string;
|
|
790
|
+
}
|
|
791
|
+
/** Site (tenant) configuration row — identity, branding and theme defaults. */
|
|
792
|
+
interface SiteResource {
|
|
793
|
+
id: string;
|
|
794
|
+
name: string;
|
|
795
|
+
domain: string | null;
|
|
796
|
+
displayTitle: string | null;
|
|
797
|
+
siteUrl: string | null;
|
|
798
|
+
descriptor: string | null;
|
|
799
|
+
defaultLanguage: string;
|
|
800
|
+
defaultAppearance: string;
|
|
801
|
+
branding: {
|
|
802
|
+
logoUrl?: string;
|
|
803
|
+
faviconUrl?: string;
|
|
804
|
+
brandColor?: string;
|
|
805
|
+
};
|
|
806
|
+
themeOverrides: {
|
|
807
|
+
light?: Record<string, string>;
|
|
808
|
+
dark?: Record<string, string>;
|
|
809
|
+
};
|
|
810
|
+
customCss: string | null;
|
|
811
|
+
createdAt: string;
|
|
812
|
+
updatedAt: string;
|
|
813
|
+
}
|
|
814
|
+
/** PATCH payload for `/api/v1/site`; every field optional. */
|
|
815
|
+
type SiteConfigUpdate = Partial<Omit<SiteResource, 'id' | 'createdAt' | 'updatedAt'>>;
|
|
816
|
+
type CdcConnectorType = "debezium_kafka" | "materialized_engine" | "airbyte";
|
|
817
|
+
type CdcPipelineStatus = "active" | "paused" | "error" | "provisioning";
|
|
818
|
+
type CdcDeploymentTarget = "docker_compose" | "cloudflare_workers";
|
|
819
|
+
type CdcDeploymentStatus = "pending" | "running" | "completed" | "failed" | "rolled_back";
|
|
820
|
+
interface CdcPipelineResource {
|
|
821
|
+
id: string;
|
|
822
|
+
siteId: string;
|
|
823
|
+
pipelineName: string;
|
|
824
|
+
connectorType: CdcConnectorType;
|
|
825
|
+
status: CdcPipelineStatus;
|
|
826
|
+
statusMessage: string | null;
|
|
827
|
+
replicationTables: string[];
|
|
828
|
+
config: Record<string, unknown>;
|
|
829
|
+
lastSyncAt: string | null;
|
|
830
|
+
lastSyncRecordCount: number | null;
|
|
831
|
+
createdAt: string;
|
|
832
|
+
updatedAt: string;
|
|
833
|
+
}
|
|
834
|
+
interface CdcPipelineCreateInput {
|
|
835
|
+
pipeline_name: string;
|
|
836
|
+
cdc_connector_type: CdcConnectorType;
|
|
837
|
+
source_database_connection: string;
|
|
838
|
+
clickhouse_sink_connection: string;
|
|
839
|
+
replication_tables: string[];
|
|
840
|
+
intermediary_connection?: string;
|
|
841
|
+
config?: Record<string, unknown>;
|
|
842
|
+
}
|
|
843
|
+
interface CdcPipelinePatchInput {
|
|
844
|
+
pipeline_name?: string;
|
|
845
|
+
source_database_connection?: string;
|
|
846
|
+
clickhouse_sink_connection?: string;
|
|
847
|
+
intermediary_connection?: string | null;
|
|
848
|
+
replication_tables?: string[];
|
|
849
|
+
config?: Record<string, unknown>;
|
|
850
|
+
}
|
|
851
|
+
interface CdcHealthCheckResult {
|
|
852
|
+
healthy: boolean;
|
|
853
|
+
latencyMs?: number;
|
|
854
|
+
error?: string;
|
|
855
|
+
details?: Record<string, unknown>;
|
|
856
|
+
}
|
|
857
|
+
interface CdcPipelineMetrics {
|
|
858
|
+
pipelineId?: string;
|
|
859
|
+
replicationLagMs: number;
|
|
860
|
+
eventsPerSecond: number;
|
|
861
|
+
errorCount: number;
|
|
862
|
+
lastEventAt?: string | null;
|
|
863
|
+
status?: string;
|
|
864
|
+
}
|
|
865
|
+
interface CdcHealthMetricEntry {
|
|
866
|
+
pipelineId: string;
|
|
867
|
+
replicationLagMs: number;
|
|
868
|
+
eventsPerSecond: number;
|
|
869
|
+
errorCount: number;
|
|
870
|
+
recordedAt: string;
|
|
871
|
+
}
|
|
872
|
+
interface CdcDeploymentStep {
|
|
873
|
+
id?: string;
|
|
874
|
+
name: string;
|
|
875
|
+
status: string;
|
|
876
|
+
startedAt?: string;
|
|
877
|
+
completedAt?: string;
|
|
878
|
+
error?: string | Record<string, unknown>;
|
|
879
|
+
[key: string]: unknown;
|
|
880
|
+
}
|
|
881
|
+
interface CdcDeploymentResult {
|
|
882
|
+
deploymentId: string;
|
|
883
|
+
status: CdcDeploymentStatus;
|
|
884
|
+
steps: CdcDeploymentStep[];
|
|
885
|
+
completedAt: string;
|
|
886
|
+
error?: {
|
|
887
|
+
code?: string;
|
|
888
|
+
description?: string;
|
|
889
|
+
[key: string]: unknown;
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
interface CdcDeployInput {
|
|
893
|
+
approach: CdcConnectorType;
|
|
894
|
+
target: CdcDeploymentTarget;
|
|
895
|
+
pipeline_id?: string;
|
|
896
|
+
env?: Record<string, string>;
|
|
897
|
+
}
|
|
898
|
+
interface CdcValidateEnvInput {
|
|
899
|
+
approach: CdcConnectorType;
|
|
900
|
+
target: CdcDeploymentTarget;
|
|
901
|
+
env: Record<string, string>;
|
|
902
|
+
}
|
|
903
|
+
interface CdcEnvValidationResult {
|
|
904
|
+
valid: boolean;
|
|
905
|
+
invalidFields: Array<{
|
|
906
|
+
key: string;
|
|
907
|
+
reason: string;
|
|
908
|
+
}>;
|
|
909
|
+
}
|
|
910
|
+
interface CdcRollbackResult {
|
|
911
|
+
deploymentId: string;
|
|
912
|
+
status: CdcDeploymentStatus;
|
|
913
|
+
steps: CdcDeploymentStep[];
|
|
914
|
+
rolledBackAt?: string;
|
|
915
|
+
error?: string | Record<string, unknown>;
|
|
916
|
+
}
|
|
917
|
+
interface UserResource {
|
|
918
|
+
id: string;
|
|
919
|
+
email: string;
|
|
920
|
+
firstName: string | null;
|
|
921
|
+
lastName: string | null;
|
|
922
|
+
avatar: string | null;
|
|
923
|
+
status: string;
|
|
924
|
+
lastSeenAt: string | null;
|
|
925
|
+
roleId: string | null;
|
|
926
|
+
joinedAt: string;
|
|
927
|
+
}
|
|
928
|
+
interface TeamResource {
|
|
929
|
+
id: string;
|
|
930
|
+
siteId: string;
|
|
931
|
+
name: string;
|
|
932
|
+
description: string | null;
|
|
933
|
+
createdAt: string;
|
|
934
|
+
}
|
|
935
|
+
interface TeamMemberResource {
|
|
936
|
+
teamId: string;
|
|
937
|
+
userId: string;
|
|
938
|
+
addedAt: string;
|
|
939
|
+
}
|
|
940
|
+
interface FolderResource {
|
|
941
|
+
id: string;
|
|
942
|
+
siteId: string;
|
|
943
|
+
name: string;
|
|
944
|
+
parent: string | null;
|
|
945
|
+
createdAt: string;
|
|
946
|
+
}
|
|
947
|
+
interface FileResource {
|
|
948
|
+
id: string;
|
|
949
|
+
siteId: string;
|
|
950
|
+
storage: string;
|
|
951
|
+
filenameDisk: string;
|
|
952
|
+
filenameDownload: string;
|
|
953
|
+
mime: string;
|
|
954
|
+
filesize: number;
|
|
955
|
+
width: number | null;
|
|
956
|
+
height: number | null;
|
|
957
|
+
duration: number | null;
|
|
958
|
+
folder: string | null;
|
|
959
|
+
metadata: Record<string, unknown>;
|
|
960
|
+
uploadedBy: string | null;
|
|
961
|
+
createdAt: string;
|
|
962
|
+
}
|
|
963
|
+
interface WebhookResource {
|
|
964
|
+
id: string;
|
|
965
|
+
siteId: string;
|
|
966
|
+
name: string;
|
|
967
|
+
url: string;
|
|
968
|
+
actions: string[];
|
|
969
|
+
collections: string[];
|
|
970
|
+
headers: Record<string, string>;
|
|
971
|
+
status: string;
|
|
972
|
+
secret: string | null;
|
|
973
|
+
createdAt: string;
|
|
974
|
+
}
|
|
975
|
+
interface ActivityResource {
|
|
976
|
+
id: string;
|
|
977
|
+
siteId: string;
|
|
978
|
+
action: string;
|
|
979
|
+
userId: string | null;
|
|
980
|
+
collection: string | null;
|
|
981
|
+
itemId: string | null;
|
|
982
|
+
ip: string | null;
|
|
983
|
+
userAgent: string | null;
|
|
984
|
+
comment: string | null;
|
|
985
|
+
payload: Record<string, unknown>;
|
|
986
|
+
createdAt: string;
|
|
987
|
+
}
|
|
988
|
+
interface ExtensionResource {
|
|
989
|
+
id: string;
|
|
990
|
+
siteId: string | null;
|
|
991
|
+
key: string | null;
|
|
992
|
+
name: string;
|
|
993
|
+
version: string;
|
|
994
|
+
type: string;
|
|
995
|
+
enabled: boolean;
|
|
996
|
+
bundleUrl: string;
|
|
997
|
+
manifest: Record<string, unknown>;
|
|
998
|
+
capabilities: string[];
|
|
999
|
+
installedBy: string | null;
|
|
1000
|
+
installedAt: string;
|
|
1001
|
+
}
|
|
1002
|
+
type AIChatStatus = "executed" | "pending_approval" | "denied";
|
|
1003
|
+
interface AIChatResponse {
|
|
1004
|
+
status: AIChatStatus;
|
|
1005
|
+
message: string;
|
|
1006
|
+
conversationId: string;
|
|
1007
|
+
pendingId: string | null;
|
|
1008
|
+
result: Record<string, unknown> | null;
|
|
1009
|
+
}
|
|
1010
|
+
interface AIConversation {
|
|
1011
|
+
id: string;
|
|
1012
|
+
siteId: string;
|
|
1013
|
+
userId: string | null;
|
|
1014
|
+
title: string;
|
|
1015
|
+
createdAt: string;
|
|
1016
|
+
updatedAt: string;
|
|
1017
|
+
}
|
|
1018
|
+
interface AIMessage {
|
|
1019
|
+
id: string;
|
|
1020
|
+
conversationId: string;
|
|
1021
|
+
role: "user" | "assistant" | "system";
|
|
1022
|
+
content: string;
|
|
1023
|
+
toolCalls: Array<Record<string, unknown>> | null;
|
|
1024
|
+
metadata: Record<string, unknown> | null;
|
|
1025
|
+
createdAt: string;
|
|
1026
|
+
}
|
|
1027
|
+
type AIApprovalStatus = "pending" | "approved" | "rejected";
|
|
1028
|
+
interface AIApproval {
|
|
1029
|
+
id: string;
|
|
1030
|
+
siteId: string;
|
|
1031
|
+
userId: string | null;
|
|
1032
|
+
conversationId: string | null;
|
|
1033
|
+
toolName: string;
|
|
1034
|
+
toolArgs: Record<string, unknown>;
|
|
1035
|
+
status: AIApprovalStatus;
|
|
1036
|
+
decidedBy: string | null;
|
|
1037
|
+
decidedAt: string | null;
|
|
1038
|
+
createdAt: string;
|
|
1039
|
+
}
|
|
1040
|
+
interface AIFieldSuggestion {
|
|
1041
|
+
type: string;
|
|
1042
|
+
interface: string;
|
|
1043
|
+
confidence: number;
|
|
1044
|
+
}
|
|
1045
|
+
interface AIContentAssistResult {
|
|
1046
|
+
content: string;
|
|
1047
|
+
tokensUsed: number;
|
|
1048
|
+
}
|
|
1049
|
+
interface FlowNode {
|
|
1050
|
+
id: string;
|
|
1051
|
+
key: string;
|
|
1052
|
+
options?: Record<string, unknown>;
|
|
1053
|
+
next?: string | null;
|
|
1054
|
+
onError?: string | null;
|
|
1055
|
+
}
|
|
1056
|
+
interface FlowGraph {
|
|
1057
|
+
entry?: string | null;
|
|
1058
|
+
nodes: FlowNode[];
|
|
1059
|
+
}
|
|
1060
|
+
type FlowStatus = "active" | "inactive" | "draft";
|
|
1061
|
+
type FlowTriggerType = "webhook" | "event" | "schedule" | "manual";
|
|
1062
|
+
interface FlowResource {
|
|
1063
|
+
id: string;
|
|
1064
|
+
siteId: string;
|
|
1065
|
+
name: string;
|
|
1066
|
+
description: string | null;
|
|
1067
|
+
status: FlowStatus;
|
|
1068
|
+
triggerType: FlowTriggerType;
|
|
1069
|
+
triggerOptions: Record<string, unknown>;
|
|
1070
|
+
graph: FlowGraph;
|
|
1071
|
+
createdAt: string;
|
|
1072
|
+
updatedAt: string;
|
|
1073
|
+
}
|
|
1074
|
+
type FlowRunStatus = "running" | "success" | "error";
|
|
1075
|
+
interface FlowRun {
|
|
1076
|
+
id: string;
|
|
1077
|
+
flowId: string;
|
|
1078
|
+
siteId: string;
|
|
1079
|
+
status: FlowRunStatus;
|
|
1080
|
+
input: Record<string, unknown>;
|
|
1081
|
+
steps: Array<Record<string, unknown>>;
|
|
1082
|
+
error: string | null;
|
|
1083
|
+
startedAt: string;
|
|
1084
|
+
finishedAt: string | null;
|
|
1085
|
+
}
|
|
1086
|
+
interface FlowRunResult {
|
|
1087
|
+
runId: string;
|
|
1088
|
+
status: "success" | "error";
|
|
1089
|
+
steps: Array<Record<string, unknown>>;
|
|
1090
|
+
error: string | null;
|
|
1091
|
+
}
|
|
1092
|
+
interface MarketplaceExtension {
|
|
1093
|
+
id: string;
|
|
1094
|
+
name: string;
|
|
1095
|
+
slug: string;
|
|
1096
|
+
version: string;
|
|
1097
|
+
type: string;
|
|
1098
|
+
bundleUrl: string;
|
|
1099
|
+
/** Base64-encoded Ed25519 detached signature of SHA-256(bundle). */
|
|
1100
|
+
signature: string;
|
|
1101
|
+
keyId: string;
|
|
1102
|
+
manifest: Record<string, unknown>;
|
|
1103
|
+
capabilities: string[];
|
|
1104
|
+
publishedAt: string;
|
|
1105
|
+
verified: boolean;
|
|
1106
|
+
}
|
|
1107
|
+
interface ListMarketplaceExtensionsParams {
|
|
1108
|
+
type?: string;
|
|
1109
|
+
search?: string;
|
|
1110
|
+
limit?: number;
|
|
1111
|
+
offset?: number;
|
|
1112
|
+
}
|
|
1113
|
+
interface MarketplaceListResponse {
|
|
1114
|
+
data: MarketplaceExtension[];
|
|
1115
|
+
meta: {
|
|
1116
|
+
total: number;
|
|
1117
|
+
limit: number;
|
|
1118
|
+
offset: number;
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
type MaterializeRefreshStrategy = "auto" | "cron" | "manual";
|
|
1122
|
+
interface MaterializeProjection {
|
|
1123
|
+
fields: string[];
|
|
1124
|
+
orderBy?: string | null;
|
|
1125
|
+
}
|
|
1126
|
+
interface MaterializedCollection {
|
|
1127
|
+
id: string;
|
|
1128
|
+
siteId: string;
|
|
1129
|
+
collection: string;
|
|
1130
|
+
target: string;
|
|
1131
|
+
refreshStrategy: MaterializeRefreshStrategy;
|
|
1132
|
+
refreshCron: string | null;
|
|
1133
|
+
projection: MaterializeProjection;
|
|
1134
|
+
filter: Record<string, unknown>;
|
|
1135
|
+
lastRefreshedAt: string | null;
|
|
1136
|
+
rowCount: number | null;
|
|
1137
|
+
createdAt: string;
|
|
1138
|
+
updatedAt: string;
|
|
1139
|
+
}
|
|
1140
|
+
interface MaterializeRefreshResult {
|
|
1141
|
+
rowsInserted: number;
|
|
1142
|
+
refreshedAt: string;
|
|
1143
|
+
}
|
|
1144
|
+
interface MaterializeDataResponse {
|
|
1145
|
+
data: Array<Record<string, unknown>>;
|
|
1146
|
+
meta: {
|
|
1147
|
+
total: number;
|
|
1148
|
+
limit: number;
|
|
1149
|
+
offset: number;
|
|
1150
|
+
};
|
|
1151
|
+
}
|
|
1152
|
+
interface SCIMTokenMeta {
|
|
1153
|
+
id: string;
|
|
1154
|
+
label: string;
|
|
1155
|
+
createdBy: string;
|
|
1156
|
+
expiresAt: string | null;
|
|
1157
|
+
lastUsedAt: string | null;
|
|
1158
|
+
createdAt: string;
|
|
1159
|
+
}
|
|
1160
|
+
interface SCIMTokenCreated extends SCIMTokenMeta {
|
|
1161
|
+
/** Raw bearer token — returned exactly once in plaintext. Store immediately. */
|
|
1162
|
+
token: string;
|
|
1163
|
+
}
|
|
1164
|
+
interface SCIMTokenRotated extends SCIMTokenCreated {
|
|
1165
|
+
/** Old token continues to accept requests until this ISO-8601 timestamp (24h grace). */
|
|
1166
|
+
oldTokenGraceExpiresAt: string;
|
|
1167
|
+
}
|
|
1168
|
+
interface CreateSCIMTokenParams {
|
|
1169
|
+
label: string;
|
|
1170
|
+
/** Number of days until expiry. Default: 90. Max: 365. */
|
|
1171
|
+
lifespanDays?: number;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* LumiBase JS SDK
|
|
1176
|
+
* Composable Client Architecture
|
|
1177
|
+
*/
|
|
1178
|
+
|
|
1179
|
+
interface LumiClientOptions {
|
|
1180
|
+
/** Base URL of the API, e.g. `http://127.0.0.1:1989` or `https://api.lumibase.dev`. */
|
|
1181
|
+
url: string;
|
|
1182
|
+
/** Bearer token (Logto access token, or `dev:<logtoId>` in dev mode). */
|
|
1183
|
+
token: string;
|
|
1184
|
+
/** Active tenant id. Sent as `X-Lumi-Site`. */
|
|
1185
|
+
siteId: string;
|
|
1186
|
+
/** Override fetch (Node/Workers polyfills). Defaults to `globalThis.fetch`. */
|
|
1187
|
+
fetcher?: typeof fetch;
|
|
1188
|
+
/** Additional headers sent with every request. */
|
|
1189
|
+
headers?: Record<string, string>;
|
|
1190
|
+
/**
|
|
1191
|
+
* Invoked once whenever the server answers a request with `401
|
|
1192
|
+
* Unauthorized` — i.e. the bearer token is missing, expired, or no
|
|
1193
|
+
* longer valid for the resolved site/user. Fires before the `LumiError`
|
|
1194
|
+
* is thrown so a host (e.g. Studio) can clear the stale token and route
|
|
1195
|
+
* the operator back to the login screen. Errors thrown by the callback
|
|
1196
|
+
* are swallowed so they never mask the original `LumiError`.
|
|
1197
|
+
*/
|
|
1198
|
+
onUnauthorized?: () => void;
|
|
1199
|
+
}
|
|
1200
|
+
interface LumiResponse<T> {
|
|
1201
|
+
data: T;
|
|
1202
|
+
meta?: Record<string, unknown>;
|
|
1203
|
+
}
|
|
1204
|
+
interface LumiErrorBody {
|
|
1205
|
+
errors: Array<{
|
|
1206
|
+
code: string;
|
|
1207
|
+
message: string;
|
|
1208
|
+
path?: string | string[];
|
|
1209
|
+
risk?: string;
|
|
1210
|
+
trace?: unknown;
|
|
1211
|
+
[key: string]: unknown;
|
|
1212
|
+
}>;
|
|
1213
|
+
}
|
|
1214
|
+
declare class LumiError extends Error {
|
|
1215
|
+
status: number;
|
|
1216
|
+
body: LumiErrorBody | any;
|
|
1217
|
+
constructor(status: number, body: LumiErrorBody | any);
|
|
1218
|
+
}
|
|
1219
|
+
interface LumiClient<TSchema extends DefaultSchema = DefaultSchema> {
|
|
1220
|
+
url: string;
|
|
1221
|
+
token: string;
|
|
1222
|
+
siteId: string;
|
|
1223
|
+
fetcher: typeof fetch;
|
|
1224
|
+
rawRequest: <T>(path: string, init?: RequestInit) => Promise<LumiResponse<T>>;
|
|
1225
|
+
request: <Output>(command: (client: LumiClient<TSchema>) => Promise<Output>) => Promise<Output>;
|
|
1226
|
+
with: <Extension>(plugin: (client: LumiClient<TSchema>) => Extension) => LumiClient<TSchema> & Extension;
|
|
1227
|
+
}
|
|
1228
|
+
declare function createLumiClient<TSchema extends DefaultSchema = DefaultSchema>(opts: LumiClientOptions): LumiClient<TSchema>;
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* RealtimeClient — typed WebSocket client for the LumiBase realtime API.
|
|
1232
|
+
*
|
|
1233
|
+
* Features:
|
|
1234
|
+
* - subscribe/unsubscribe to collections
|
|
1235
|
+
* - presence tracking (send + receive)
|
|
1236
|
+
* - pong response to server heartbeat pings
|
|
1237
|
+
* - automatic exponential-backoff reconnection
|
|
1238
|
+
* - typed event callbacks
|
|
1239
|
+
*
|
|
1240
|
+
* Usage:
|
|
1241
|
+
* const rt = new RealtimeClient({ baseUrl, token, siteId });
|
|
1242
|
+
* rt.subscribe('posts', (event) => console.log(event));
|
|
1243
|
+
* rt.presence({ collection: 'posts', itemId: '123' });
|
|
1244
|
+
* rt.connect();
|
|
1245
|
+
* // ... later
|
|
1246
|
+
* rt.disconnect();
|
|
1247
|
+
*/
|
|
1248
|
+
interface RealtimeEvent {
|
|
1249
|
+
type: 'event';
|
|
1250
|
+
collection: string;
|
|
1251
|
+
action: 'create' | 'update' | 'delete';
|
|
1252
|
+
itemId: string;
|
|
1253
|
+
payload: unknown;
|
|
1254
|
+
}
|
|
1255
|
+
interface PresenceEntry {
|
|
1256
|
+
sessionId: string;
|
|
1257
|
+
userId: string;
|
|
1258
|
+
collection?: string;
|
|
1259
|
+
itemId?: string;
|
|
1260
|
+
meta?: Record<string, unknown>;
|
|
1261
|
+
lastSeen: string;
|
|
1262
|
+
}
|
|
1263
|
+
type RealtimeEventCallback = (event: RealtimeEvent) => void;
|
|
1264
|
+
type PresenceCallback = (users: PresenceEntry[]) => void;
|
|
1265
|
+
interface RealtimeClientOptions {
|
|
1266
|
+
/** Base HTTP URL of the CMS (e.g. https://cms.example.com). wss:// prefix is derived automatically. */
|
|
1267
|
+
baseUrl: string;
|
|
1268
|
+
/** Bearer token passed as ?token= query param (WS handshake cannot carry Authorization headers in browsers). */
|
|
1269
|
+
token: string;
|
|
1270
|
+
/** Site ID forwarded to the SiteRoom DO. */
|
|
1271
|
+
siteId: string;
|
|
1272
|
+
/** Optional user ID included in presence meta. */
|
|
1273
|
+
userId?: string;
|
|
1274
|
+
/** Initial backoff in milliseconds. Default: 1000. */
|
|
1275
|
+
initialBackoffMs?: number;
|
|
1276
|
+
/** Maximum backoff in milliseconds. Default: 30000. */
|
|
1277
|
+
maxBackoffMs?: number;
|
|
1278
|
+
}
|
|
1279
|
+
declare class RealtimeClient {
|
|
1280
|
+
private readonly opts;
|
|
1281
|
+
private ws;
|
|
1282
|
+
private readonly subscriptions;
|
|
1283
|
+
private presenceListeners;
|
|
1284
|
+
private currentPresence;
|
|
1285
|
+
private sessionId;
|
|
1286
|
+
private reconnectTimeout;
|
|
1287
|
+
private backoffMs;
|
|
1288
|
+
private stopped;
|
|
1289
|
+
constructor(opts: RealtimeClientOptions);
|
|
1290
|
+
/** Open the WebSocket connection. Safe to call multiple times. */
|
|
1291
|
+
connect(): this;
|
|
1292
|
+
/** Close the WebSocket and stop reconnect attempts. */
|
|
1293
|
+
disconnect(): void;
|
|
1294
|
+
/**
|
|
1295
|
+
* Subscribe to item mutation events for a specific collection.
|
|
1296
|
+
* Multiple handlers per collection are supported.
|
|
1297
|
+
*
|
|
1298
|
+
* @returns Unsubscribe function.
|
|
1299
|
+
*/
|
|
1300
|
+
subscribe(collection: string, callback: RealtimeEventCallback): () => void;
|
|
1301
|
+
/** Remove a specific handler from a collection subscription. */
|
|
1302
|
+
unsubscribe(collection: string, callback: RealtimeEventCallback): void;
|
|
1303
|
+
/** Update the current user's presence. Sent immediately and on reconnect. */
|
|
1304
|
+
presence(opts: {
|
|
1305
|
+
collection?: string;
|
|
1306
|
+
itemId?: string;
|
|
1307
|
+
meta?: Record<string, unknown>;
|
|
1308
|
+
}): void;
|
|
1309
|
+
/** Register a callback for peer presence updates. */
|
|
1310
|
+
onPresence(callback: PresenceCallback): () => void;
|
|
1311
|
+
/** Returns the current session ID assigned by the server after connection. */
|
|
1312
|
+
get session(): string | null;
|
|
1313
|
+
/** Whether the WebSocket is currently OPEN. */
|
|
1314
|
+
get isConnected(): boolean;
|
|
1315
|
+
private _connect;
|
|
1316
|
+
private _handleMessage;
|
|
1317
|
+
private _scheduleReconnect;
|
|
1318
|
+
private _send;
|
|
1319
|
+
private _sendRaw;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
declare function legacyRest(): <TSchema extends DefaultSchema>(client: LumiClient<TSchema>) => {
|
|
1323
|
+
schema: {
|
|
1324
|
+
collections: {
|
|
1325
|
+
list: () => Promise<LumiResponse<CollectionResource[]>>;
|
|
1326
|
+
get: (name: string) => Promise<LumiResponse<CollectionResource>>;
|
|
1327
|
+
compiled: (name: string) => Promise<LumiResponse<CollectionResource>>;
|
|
1328
|
+
create: (input: CollectionInput) => Promise<LumiResponse<CollectionResource>>;
|
|
1329
|
+
update: (name: string, patch: Partial<CollectionInput>) => Promise<LumiResponse<CollectionResource>>;
|
|
1330
|
+
delete: (name: string) => Promise<LumiResponse<null>>;
|
|
1331
|
+
};
|
|
1332
|
+
fields: {
|
|
1333
|
+
list: (collectionName: string) => Promise<LumiResponse<FieldResource[]>>;
|
|
1334
|
+
upsert: (collectionName: string, fieldName: string, input: FieldInput) => Promise<LumiResponse<FieldResource>>;
|
|
1335
|
+
create: (collectionName: string, input: FieldInput) => Promise<LumiResponse<FieldResource>>;
|
|
1336
|
+
update: (collectionName: string, fieldName: string, input: FieldInput) => Promise<LumiResponse<FieldResource>>;
|
|
1337
|
+
rename: (collectionName: string, fromFieldName: string, toFieldName: string, input: FieldRenameInput) => Promise<LumiResponse<FieldResource>>;
|
|
1338
|
+
delete: (collectionName: string, fieldName: string, options?: FieldDeleteOptions) => Promise<LumiResponse<null>>;
|
|
1339
|
+
};
|
|
1340
|
+
relations: {
|
|
1341
|
+
list: () => Promise<LumiResponse<RelationResource[]>>;
|
|
1342
|
+
create: (input: RelationInput) => Promise<LumiResponse<RelationResource>>;
|
|
1343
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1344
|
+
};
|
|
1345
|
+
diff: (name: string, proposed: SchemaApplyInput) => Promise<LumiResponse<SchemaDiff>>;
|
|
1346
|
+
diffInput: (input: SchemaDiffInput) => Promise<LumiResponse<SchemaDiff>>;
|
|
1347
|
+
apply: (name: string, proposed: SchemaApplyInput) => Promise<LumiResponse<SchemaApplyResult>>;
|
|
1348
|
+
typegen: (filters?: TypegenSchemaFilters) => Promise<LumiResponse<unknown>>;
|
|
1349
|
+
listCollections: () => Promise<LumiResponse<CollectionResource[]>>;
|
|
1350
|
+
getCollection: (name: string) => Promise<LumiResponse<CollectionResource>>;
|
|
1351
|
+
getCompiled: (name: string) => Promise<LumiResponse<CollectionResource>>;
|
|
1352
|
+
createCollection: (input: CollectionInput) => Promise<LumiResponse<CollectionResource>>;
|
|
1353
|
+
updateCollection: (name: string, patch: Partial<CollectionInput>) => Promise<LumiResponse<CollectionResource>>;
|
|
1354
|
+
deleteCollection: (name: string) => Promise<LumiResponse<null>>;
|
|
1355
|
+
listFields: (collectionName: string) => Promise<LumiResponse<FieldResource[]>>;
|
|
1356
|
+
upsertField: (collectionName: string, fieldName: string, input: FieldInput) => Promise<LumiResponse<FieldResource>>;
|
|
1357
|
+
deleteField: (collectionName: string, fieldName: string, options?: FieldDeleteOptions) => Promise<LumiResponse<null>>;
|
|
1358
|
+
listRelations: () => Promise<LumiResponse<RelationResource[]>>;
|
|
1359
|
+
createRelation: (input: RelationInput) => Promise<LumiResponse<RelationResource>>;
|
|
1360
|
+
deleteRelation: (id: string) => Promise<LumiResponse<null>>;
|
|
1361
|
+
};
|
|
1362
|
+
items: <TName extends keyof TSchema & string>(name: TName) => {
|
|
1363
|
+
list: (params?: ListItemsParams) => Promise<ListItemsResponse<TSchema[TName] extends Record<string, unknown> ? TSchema[TName] : Record<string, unknown>>>;
|
|
1364
|
+
detail: (id: string, fields?: string[]) => Promise<LumiResponse<ItemRow<TSchema[TName] extends Record<string, unknown> ? TSchema[TName] : Record<string, unknown>>>>;
|
|
1365
|
+
create: (input: {
|
|
1366
|
+
data: Partial<TSchema[TName] extends Record<string, unknown> ? TSchema[TName] : Record<string, unknown>>;
|
|
1367
|
+
status?: string;
|
|
1368
|
+
sort?: number;
|
|
1369
|
+
/** ISO timestamps for content scheduling (Publish_Window). */
|
|
1370
|
+
publishAt?: string | null;
|
|
1371
|
+
unpublishAt?: string | null;
|
|
1372
|
+
}) => Promise<LumiResponse<ItemRow<TSchema[TName] extends Record<string, unknown> ? TSchema[TName] : Record<string, unknown>>>>;
|
|
1373
|
+
patch: (id: string, input: {
|
|
1374
|
+
data?: Partial<TSchema[TName] extends Record<string, unknown> ? TSchema[TName] : Record<string, unknown>>;
|
|
1375
|
+
status?: string;
|
|
1376
|
+
sort?: number;
|
|
1377
|
+
/** ISO timestamps for content scheduling (Publish_Window). */
|
|
1378
|
+
publishAt?: string | null;
|
|
1379
|
+
unpublishAt?: string | null;
|
|
1380
|
+
}) => Promise<LumiResponse<ItemRow<TSchema[TName] extends Record<string, unknown> ? TSchema[TName] : Record<string, unknown>>>>;
|
|
1381
|
+
replace: (id: string, input: {
|
|
1382
|
+
data: TSchema[TName] extends Record<string, unknown> ? TSchema[TName] : Record<string, unknown>;
|
|
1383
|
+
status?: string;
|
|
1384
|
+
sort?: number;
|
|
1385
|
+
}) => Promise<LumiResponse<ItemRow<TSchema[TName] extends Record<string, unknown> ? TSchema[TName] : Record<string, unknown>>>>;
|
|
1386
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1387
|
+
bulk: (op: "create" | "update" | "delete", payload: Array<Record<string, unknown>>) => Promise<LumiResponse<ItemRow<TSchema[TName] extends Record<string, unknown> ? TSchema[TName] : Record<string, unknown>>[]>>;
|
|
1388
|
+
listRevisions: (id: string) => Promise<LumiResponse<RevisionRow[]>>;
|
|
1389
|
+
revertRevision: (id: string, revisionId: string) => Promise<LumiResponse<ItemRow<TSchema[TName] extends Record<string, unknown> ? TSchema[TName] : Record<string, unknown>>>>;
|
|
1390
|
+
listPins: (id: string) => Promise<LumiResponse<{
|
|
1391
|
+
pinnedFields: string[];
|
|
1392
|
+
}>>;
|
|
1393
|
+
releasePin: (id: string, field: string) => Promise<LumiResponse<{
|
|
1394
|
+
pinnedFields: string[];
|
|
1395
|
+
}>>;
|
|
1396
|
+
};
|
|
1397
|
+
roles: {
|
|
1398
|
+
list: () => Promise<LumiResponse<RoleResource[]>>;
|
|
1399
|
+
detail: (id: string) => Promise<LumiResponse<RoleDetail>>;
|
|
1400
|
+
create: (input: Partial<RoleResource> & {
|
|
1401
|
+
name: string;
|
|
1402
|
+
}) => Promise<LumiResponse<RoleResource>>;
|
|
1403
|
+
update: (id: string, patch: Partial<RoleResource>) => Promise<LumiResponse<RoleResource>>;
|
|
1404
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1405
|
+
attachPolicy: (id: string, input: {
|
|
1406
|
+
policyId: string;
|
|
1407
|
+
priority?: number;
|
|
1408
|
+
overrideWarnings?: boolean;
|
|
1409
|
+
}) => Promise<LumiResponse<{
|
|
1410
|
+
roleId: string;
|
|
1411
|
+
policyId: string;
|
|
1412
|
+
priority: number;
|
|
1413
|
+
}>>;
|
|
1414
|
+
detachPolicy: (id: string, policyId: string) => Promise<LumiResponse<null>>;
|
|
1415
|
+
assignUser: (id: string, input: {
|
|
1416
|
+
userId: string;
|
|
1417
|
+
}) => Promise<LumiResponse<{
|
|
1418
|
+
userId: string;
|
|
1419
|
+
siteId: string;
|
|
1420
|
+
roleId: string;
|
|
1421
|
+
}>>;
|
|
1422
|
+
removeUser: (id: string, userId: string) => Promise<LumiResponse<null>>;
|
|
1423
|
+
};
|
|
1424
|
+
policies: {
|
|
1425
|
+
list: () => Promise<LumiResponse<PolicyResource[]>>;
|
|
1426
|
+
detail: (id: string) => Promise<LumiResponse<PolicyDetail>>;
|
|
1427
|
+
create: (input: Partial<PolicyResource> & {
|
|
1428
|
+
name: string;
|
|
1429
|
+
}) => Promise<LumiResponse<PolicyResource>>;
|
|
1430
|
+
update: (id: string, patch: Partial<PolicyResource>) => Promise<LumiResponse<PolicyResource>>;
|
|
1431
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1432
|
+
addPermission: (id: string, input: {
|
|
1433
|
+
collection: string;
|
|
1434
|
+
action: PermissionAction;
|
|
1435
|
+
permissions?: Record<string, unknown>;
|
|
1436
|
+
validation?: Record<string, unknown>;
|
|
1437
|
+
presets?: Record<string, unknown>;
|
|
1438
|
+
fields?: string[];
|
|
1439
|
+
}) => Promise<LumiResponse<PermissionRow>>;
|
|
1440
|
+
patchPermission: (id: string, permId: string, patch: Partial<PermissionRow>) => Promise<LumiResponse<PermissionRow>>;
|
|
1441
|
+
removePermission: (id: string, permId: string) => Promise<LumiResponse<null>>;
|
|
1442
|
+
attachUser: (id: string, input: {
|
|
1443
|
+
userId: string;
|
|
1444
|
+
priority?: number;
|
|
1445
|
+
}) => Promise<LumiResponse<{
|
|
1446
|
+
userId: string;
|
|
1447
|
+
policyId: string;
|
|
1448
|
+
priority: number;
|
|
1449
|
+
}>>;
|
|
1450
|
+
detachUser: (id: string, userId: string) => Promise<LumiResponse<null>>;
|
|
1451
|
+
};
|
|
1452
|
+
access: {
|
|
1453
|
+
checkConflicts: (input: AccessConflictCheckInput) => Promise<LumiResponse<AccessConflictReport>>;
|
|
1454
|
+
exportManifest: () => Promise<LumiResponse<AccessExportManifest>>;
|
|
1455
|
+
dryRunImport: (manifest: AccessExportManifest) => Promise<LumiResponse<AccessImportDryRunResult>>;
|
|
1456
|
+
importManifest: (manifest: AccessExportManifest, options?: AccessImportOptions) => Promise<LumiResponse<AccessImportApplyResult>>;
|
|
1457
|
+
};
|
|
1458
|
+
apiKeys: {
|
|
1459
|
+
list: () => Promise<LumiResponse<ApiKeyResource[]>>;
|
|
1460
|
+
get: (id: string) => Promise<LumiResponse<ApiKeyResource>>;
|
|
1461
|
+
create: (input: ApiKeyCreateInput) => Promise<LumiResponse<ApiKeySecretResult>>;
|
|
1462
|
+
rotate: (id: string, input?: ApiKeyRotateInput) => Promise<LumiResponse<ApiKeySecretResult>>;
|
|
1463
|
+
revoke: (id: string) => Promise<LumiResponse<ApiKeyResource>>;
|
|
1464
|
+
attachRole: (id: string, input: {
|
|
1465
|
+
roleId: string;
|
|
1466
|
+
priority?: number;
|
|
1467
|
+
overrideWarnings?: boolean;
|
|
1468
|
+
}) => Promise<LumiResponse<ApiKeyRoleAttachment>>;
|
|
1469
|
+
detachRole: (id: string, roleId: string) => Promise<LumiResponse<null>>;
|
|
1470
|
+
attachPolicy: (id: string, input: {
|
|
1471
|
+
policyId: string;
|
|
1472
|
+
priority?: number;
|
|
1473
|
+
overrideWarnings?: boolean;
|
|
1474
|
+
}) => Promise<LumiResponse<ApiKeyPolicyAttachment>>;
|
|
1475
|
+
detachPolicy: (id: string, policyId: string) => Promise<LumiResponse<null>>;
|
|
1476
|
+
previewConflicts: (id: string, input: Omit<AccessConflictCheckInput, "target">) => Promise<LumiResponse<AccessConflictReport>>;
|
|
1477
|
+
};
|
|
1478
|
+
shares: {
|
|
1479
|
+
create: (input: ShareCreateInput) => Promise<LumiResponse<ShareSecretResult>>;
|
|
1480
|
+
revoke: (id: string) => Promise<LumiResponse<ShareResource>>;
|
|
1481
|
+
};
|
|
1482
|
+
permissions: {
|
|
1483
|
+
me: () => Promise<LumiResponse<PermissionBundle>>;
|
|
1484
|
+
check: (input: {
|
|
1485
|
+
collection: string;
|
|
1486
|
+
action: PermissionAction;
|
|
1487
|
+
item?: Record<string, unknown>;
|
|
1488
|
+
}) => Promise<LumiResponse<PermissionCheckResult>>;
|
|
1489
|
+
};
|
|
1490
|
+
presets: {
|
|
1491
|
+
list: (collection?: string) => Promise<LumiResponse<PresetResource[]>>;
|
|
1492
|
+
get: (id: string) => Promise<LumiResponse<PresetResource>>;
|
|
1493
|
+
create: (input: Partial<PresetResource> & {
|
|
1494
|
+
collection: string;
|
|
1495
|
+
}) => Promise<LumiResponse<PresetResource>>;
|
|
1496
|
+
update: (id: string, patch: Partial<PresetResource>) => Promise<LumiResponse<PresetResource>>;
|
|
1497
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1498
|
+
};
|
|
1499
|
+
translations: {
|
|
1500
|
+
list: (params?: {
|
|
1501
|
+
namespace?: string;
|
|
1502
|
+
language?: string;
|
|
1503
|
+
}) => Promise<LumiResponse<TranslationResource[]>>;
|
|
1504
|
+
get: (id: string) => Promise<LumiResponse<TranslationResource>>;
|
|
1505
|
+
create: (input: Partial<TranslationResource> & {
|
|
1506
|
+
language: string;
|
|
1507
|
+
namespace: string;
|
|
1508
|
+
key: string;
|
|
1509
|
+
value: string;
|
|
1510
|
+
}) => Promise<LumiResponse<TranslationResource>>;
|
|
1511
|
+
update: (id: string, patch: Partial<TranslationResource>) => Promise<LumiResponse<TranslationResource>>;
|
|
1512
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1513
|
+
};
|
|
1514
|
+
settings: {
|
|
1515
|
+
list: (scope?: string) => Promise<LumiResponse<SettingResource[]>>;
|
|
1516
|
+
get: (key: string) => Promise<LumiResponse<SettingResource>>;
|
|
1517
|
+
set: (key: string, value: Record<string, unknown>, scope?: string) => Promise<LumiResponse<SettingResource>>;
|
|
1518
|
+
delete: (key: string) => Promise<LumiResponse<null>>;
|
|
1519
|
+
};
|
|
1520
|
+
site: {
|
|
1521
|
+
get: () => Promise<LumiResponse<SiteResource>>;
|
|
1522
|
+
update: (patch: SiteConfigUpdate) => Promise<LumiResponse<SiteResource>>;
|
|
1523
|
+
};
|
|
1524
|
+
users: {
|
|
1525
|
+
list: () => Promise<LumiResponse<UserResource[]>>;
|
|
1526
|
+
get: (id: string) => Promise<LumiResponse<UserResource>>;
|
|
1527
|
+
invite: (input: {
|
|
1528
|
+
email: string;
|
|
1529
|
+
roleId?: string;
|
|
1530
|
+
}) => Promise<LumiResponse<UserResource>>;
|
|
1531
|
+
update: (id: string, patch: {
|
|
1532
|
+
roleId?: string | null;
|
|
1533
|
+
status?: string;
|
|
1534
|
+
}) => Promise<LumiResponse<{
|
|
1535
|
+
id: string;
|
|
1536
|
+
}>>;
|
|
1537
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1538
|
+
impersonate: (id: string) => Promise<LumiResponse<{
|
|
1539
|
+
token: string;
|
|
1540
|
+
}>>;
|
|
1541
|
+
};
|
|
1542
|
+
teams: {
|
|
1543
|
+
list: () => Promise<LumiResponse<TeamResource[]>>;
|
|
1544
|
+
get: (id: string) => Promise<LumiResponse<TeamResource>>;
|
|
1545
|
+
create: (input: {
|
|
1546
|
+
name: string;
|
|
1547
|
+
description?: string;
|
|
1548
|
+
}) => Promise<LumiResponse<TeamResource>>;
|
|
1549
|
+
update: (id: string, patch: {
|
|
1550
|
+
name?: string;
|
|
1551
|
+
description?: string;
|
|
1552
|
+
}) => Promise<LumiResponse<TeamResource>>;
|
|
1553
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1554
|
+
members: {
|
|
1555
|
+
list: (teamId: string) => Promise<LumiResponse<TeamMemberResource[]>>;
|
|
1556
|
+
add: (teamId: string, userId: string) => Promise<LumiResponse<TeamMemberResource>>;
|
|
1557
|
+
remove: (teamId: string, userId: string) => Promise<LumiResponse<null>>;
|
|
1558
|
+
};
|
|
1559
|
+
};
|
|
1560
|
+
folders: {
|
|
1561
|
+
list: () => Promise<LumiResponse<FolderResource[]>>;
|
|
1562
|
+
create: (input: {
|
|
1563
|
+
name: string;
|
|
1564
|
+
parent?: string | null;
|
|
1565
|
+
}) => Promise<LumiResponse<FolderResource>>;
|
|
1566
|
+
update: (id: string, patch: {
|
|
1567
|
+
name?: string;
|
|
1568
|
+
parent?: string | null;
|
|
1569
|
+
}) => Promise<LumiResponse<FolderResource>>;
|
|
1570
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1571
|
+
};
|
|
1572
|
+
files: {
|
|
1573
|
+
list: () => Promise<LumiResponse<FileResource[]>>;
|
|
1574
|
+
create: (input: Record<string, unknown>) => Promise<LumiResponse<FileResource>>;
|
|
1575
|
+
update: (id: string, patch: Record<string, unknown>) => Promise<LumiResponse<FileResource>>;
|
|
1576
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1577
|
+
getPresignedUrl: (filename: string) => Promise<LumiResponse<{
|
|
1578
|
+
url: string;
|
|
1579
|
+
method: string;
|
|
1580
|
+
key: string;
|
|
1581
|
+
}>>;
|
|
1582
|
+
};
|
|
1583
|
+
webhooks: {
|
|
1584
|
+
list: () => Promise<LumiResponse<WebhookResource[]>>;
|
|
1585
|
+
create: (input: Record<string, unknown>) => Promise<LumiResponse<WebhookResource>>;
|
|
1586
|
+
update: (id: string, patch: Record<string, unknown>) => Promise<LumiResponse<WebhookResource>>;
|
|
1587
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1588
|
+
};
|
|
1589
|
+
activity: {
|
|
1590
|
+
list: (params?: {
|
|
1591
|
+
limit?: number;
|
|
1592
|
+
offset?: number;
|
|
1593
|
+
}) => Promise<LumiResponse<ActivityResource[]>>;
|
|
1594
|
+
};
|
|
1595
|
+
extensions: {
|
|
1596
|
+
list: () => Promise<LumiResponse<ExtensionResource[]>>;
|
|
1597
|
+
create: (input: Record<string, unknown>) => Promise<LumiResponse<ExtensionResource>>;
|
|
1598
|
+
update: (id: string, patch: Record<string, unknown>) => Promise<LumiResponse<ExtensionResource>>;
|
|
1599
|
+
delete: (id: string) => Promise<LumiResponse<null>>;
|
|
1600
|
+
};
|
|
1601
|
+
realtime: {
|
|
1602
|
+
/**
|
|
1603
|
+
* Create a RealtimeClient for the current site.
|
|
1604
|
+
*
|
|
1605
|
+
* @param token Bearer token (or dev token) for the WS handshake.
|
|
1606
|
+
* @param opts Optional overrides (userId, backoff timing).
|
|
1607
|
+
*/
|
|
1608
|
+
create: (token: string, opts?: {
|
|
1609
|
+
userId?: string;
|
|
1610
|
+
initialBackoffMs?: number;
|
|
1611
|
+
maxBackoffMs?: number;
|
|
1612
|
+
}) => RealtimeClient;
|
|
1613
|
+
/** @deprecated Use .realtime.create() instead. */
|
|
1614
|
+
connect: (siteId: string) => Promise<WebSocket>;
|
|
1615
|
+
};
|
|
1616
|
+
auth: {
|
|
1617
|
+
me: () => Promise<LumiResponse<{
|
|
1618
|
+
logtoId: string;
|
|
1619
|
+
email?: string;
|
|
1620
|
+
roles: string[];
|
|
1621
|
+
siteId: string;
|
|
1622
|
+
}>>;
|
|
1623
|
+
};
|
|
1624
|
+
_schemaType: TSchema;
|
|
1625
|
+
request: <T>(path: string, init?: RequestInit) => Promise<LumiResponse<T>>;
|
|
1626
|
+
};
|
|
1627
|
+
|
|
1628
|
+
declare function readItems<Schema extends DefaultSchema, Collection extends keyof Schema & string, Row = ItemRow<Schema[Collection] extends Record<string, unknown> ? Schema[Collection] : Record<string, unknown>>, ListResp = ListItemsResponse<Schema[Collection] extends Record<string, unknown> ? Schema[Collection] : Record<string, unknown>>>(collection: Collection, params?: ListItemsParams): (client: LumiClient<Schema>) => Promise<ListResp>;
|
|
1629
|
+
declare function readItem<Schema extends DefaultSchema, Collection extends keyof Schema & string, Row = ItemRow<Schema[Collection] extends Record<string, unknown> ? Schema[Collection] : Record<string, unknown>>>(collection: Collection, id: string, fields?: string[]): (client: LumiClient<Schema>) => Promise<Row>;
|
|
1630
|
+
declare function exportAccessManifest(): (client: LumiClient) => Promise<AccessExportManifest>;
|
|
1631
|
+
declare function dryRunAccessImport(manifest: AccessExportManifest): (client: LumiClient) => Promise<AccessImportDryRunResult>;
|
|
1632
|
+
declare function importAccessManifest(manifest: AccessExportManifest, options?: AccessImportOptions): (client: LumiClient) => Promise<AccessImportApplyResult>;
|
|
1633
|
+
declare function createCdcPipeline(input: CdcPipelineCreateInput): (client: LumiClient) => Promise<CdcPipelineResource>;
|
|
1634
|
+
declare function listCdcPipelines(): (client: LumiClient) => Promise<CdcPipelineResource[]>;
|
|
1635
|
+
declare function readCdcPipeline(id: string): (client: LumiClient) => Promise<CdcPipelineResource>;
|
|
1636
|
+
declare function updateCdcPipeline(id: string, input: CdcPipelinePatchInput): (client: LumiClient) => Promise<CdcPipelineResource>;
|
|
1637
|
+
declare function deleteCdcPipeline(id: string): (client: LumiClient) => Promise<{
|
|
1638
|
+
deleted: boolean;
|
|
1639
|
+
id: string;
|
|
1640
|
+
}>;
|
|
1641
|
+
declare function startCdcPipeline(id: string): (client: LumiClient) => Promise<CdcPipelineResource>;
|
|
1642
|
+
declare function stopCdcPipeline(id: string): (client: LumiClient) => Promise<CdcPipelineResource>;
|
|
1643
|
+
declare function checkCdcPipelineHealth(id: string): (client: LumiClient) => Promise<CdcHealthCheckResult>;
|
|
1644
|
+
declare function readCdcPipelineMetrics(id: string): (client: LumiClient) => Promise<CdcPipelineMetrics>;
|
|
1645
|
+
declare function readCdcPipelineMetricHistory(id: string, since?: string | Date): (client: LumiClient) => Promise<{
|
|
1646
|
+
history: CdcHealthMetricEntry[];
|
|
1647
|
+
since: string;
|
|
1648
|
+
}>;
|
|
1649
|
+
declare function deployCdc(input: CdcDeployInput): (client: LumiClient) => Promise<CdcDeploymentResult>;
|
|
1650
|
+
declare function validateCdcDeploymentEnv(input: CdcValidateEnvInput): (client: LumiClient) => Promise<CdcEnvValidationResult>;
|
|
1651
|
+
declare function rollbackCdcDeployment(id: string): (client: LumiClient) => Promise<CdcRollbackResult>;
|
|
1652
|
+
declare function listAgentGoals(): (client: LumiClient) => Promise<AgentGoalResource[]>;
|
|
1653
|
+
declare function createAgentGoal(input: AgentGoalCreateInput): (client: LumiClient) => Promise<AgentGoalResource>;
|
|
1654
|
+
declare function listAgentRuns(): (client: LumiClient) => Promise<AgentRunResource[]>;
|
|
1655
|
+
declare function retryAgentRun(id: string): (client: LumiClient) => Promise<{
|
|
1656
|
+
goalId: string;
|
|
1657
|
+
runId: string;
|
|
1658
|
+
agentName: string;
|
|
1659
|
+
}>;
|
|
1660
|
+
declare function listAgentTools(): (client: LumiClient) => Promise<AgentToolResource[]>;
|
|
1661
|
+
declare function listAgentApprovals(): (client: LumiClient) => Promise<AgentApprovalResource[]>;
|
|
1662
|
+
declare function decideAgentApproval(id: string, decision: "approved" | "rejected", reason?: string): (client: LumiClient) => Promise<AgentApprovalResource>;
|
|
1663
|
+
declare function listAgentArtifacts(runId?: string): (client: LumiClient) => Promise<AgentArtifactResource[]>;
|
|
1664
|
+
declare function createAgentArtifact(input: AgentArtifactCreateInput): (client: LumiClient) => Promise<AgentArtifactResource>;
|
|
1665
|
+
declare function evaluateAgentArtifact(id: string, runId: string): (client: LumiClient) => Promise<AgentEvaluationResource>;
|
|
1666
|
+
declare function publishAgentArtifact(id: string, overrideReason?: string): (client: LumiClient) => Promise<AgentArtifactResource>;
|
|
1667
|
+
declare function rollbackAgentArtifact(id: string, reason?: string): (client: LumiClient) => Promise<AgentArtifactResource>;
|
|
1668
|
+
declare function readAgentMemoryContext(scope?: string, scopeId?: string): (client: LumiClient) => Promise<AgentMemoryContext>;
|
|
1669
|
+
declare function writeAgentMemory(input: AgentMemoryWriteInput): (client: LumiClient) => Promise<AgentMemoryContext["memories"][number]>;
|
|
1670
|
+
declare function generateAgentApp(input: AgentGenerateAppInput): (client: LumiClient) => Promise<AgentGenerateAppResult>;
|
|
1671
|
+
|
|
1672
|
+
interface GraphQLExtension {
|
|
1673
|
+
/** Executes a GraphQL document and returns the `data` payload. */
|
|
1674
|
+
query: <T = unknown>(document: string, variables?: Record<string, unknown>) => Promise<T>;
|
|
1675
|
+
/** Alias of `query` — semantic helper for mutations. */
|
|
1676
|
+
mutate: <T = unknown>(document: string, variables?: Record<string, unknown>) => Promise<T>;
|
|
1677
|
+
}
|
|
1678
|
+
declare function graphql(endpoint?: string): (client: LumiClient) => GraphQLExtension;
|
|
1679
|
+
|
|
1680
|
+
interface TypegenManifest {
|
|
1681
|
+
version: number;
|
|
1682
|
+
site: string;
|
|
1683
|
+
collections: TypegenCollection[];
|
|
1684
|
+
}
|
|
1685
|
+
interface TypegenCollection {
|
|
1686
|
+
name: string;
|
|
1687
|
+
primaryKey: string;
|
|
1688
|
+
primaryKeyField?: string;
|
|
1689
|
+
primaryKeyType?: 'nanoid' | 'uuid' | 'integer' | 'bigInteger' | 'string';
|
|
1690
|
+
fields: TypegenField[];
|
|
1691
|
+
relations?: TypegenRelation[];
|
|
1692
|
+
}
|
|
1693
|
+
interface TypegenField {
|
|
1694
|
+
name: string;
|
|
1695
|
+
type: string;
|
|
1696
|
+
required: boolean;
|
|
1697
|
+
nullable: boolean;
|
|
1698
|
+
readonly?: boolean;
|
|
1699
|
+
generated?: boolean;
|
|
1700
|
+
system?: boolean;
|
|
1701
|
+
encrypted?: boolean;
|
|
1702
|
+
primaryKey?: boolean;
|
|
1703
|
+
branded?: string;
|
|
1704
|
+
kind?: 'm2o' | 'o2m' | 'm2m' | 'm2a';
|
|
1705
|
+
target?: string;
|
|
1706
|
+
enum?: string[];
|
|
1707
|
+
}
|
|
1708
|
+
interface TypegenRelation {
|
|
1709
|
+
field: string;
|
|
1710
|
+
kind: 'm2o' | 'o2m' | 'm2m' | 'm2a';
|
|
1711
|
+
target: string;
|
|
1712
|
+
manyCollection?: string;
|
|
1713
|
+
manyField?: string;
|
|
1714
|
+
oneCollection?: string;
|
|
1715
|
+
oneField?: string | null;
|
|
1716
|
+
junctionCollection?: string | null;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
interface GenerateOptions {
|
|
1720
|
+
format?: 'single' | 'per-collection';
|
|
1721
|
+
branded?: boolean;
|
|
1722
|
+
}
|
|
1723
|
+
declare function generateTypes(manifest: TypegenManifest, options?: GenerateOptions): string;
|
|
1724
|
+
|
|
1725
|
+
/**
|
|
1726
|
+
* SEO helpers for consuming the Delivery API's `_seo` block (Req 14.4).
|
|
1727
|
+
*
|
|
1728
|
+
* Use {@link toNextMetadata} inside a Next.js `generateMetadata` to map a
|
|
1729
|
+
* delivery item's `_seo` into the framework's Metadata shape without
|
|
1730
|
+
* re-deriving anything client-side.
|
|
1731
|
+
*/
|
|
1732
|
+
interface DeliverySeo {
|
|
1733
|
+
title?: string;
|
|
1734
|
+
description?: string;
|
|
1735
|
+
canonical?: string;
|
|
1736
|
+
openGraph?: Record<string, unknown>;
|
|
1737
|
+
jsonLd?: Record<string, unknown>;
|
|
1738
|
+
}
|
|
1739
|
+
/** Extract the `_seo` block from a delivery item, if present. */
|
|
1740
|
+
declare function extractSeo(item: unknown): DeliverySeo | undefined;
|
|
1741
|
+
/**
|
|
1742
|
+
* Map a delivery item's `_seo` to a Next.js `generateMetadata` return value.
|
|
1743
|
+
* The shape is intentionally framework-agnostic (a plain object) so it does
|
|
1744
|
+
* not create a hard dependency on `next`.
|
|
1745
|
+
*/
|
|
1746
|
+
declare function toNextMetadata(item: unknown): Record<string, unknown>;
|
|
1747
|
+
/**
|
|
1748
|
+
* Render the JSON-LD block as a string suitable for a
|
|
1749
|
+
* `<script type="application/ld+json">` tag.
|
|
1750
|
+
*/
|
|
1751
|
+
declare function jsonLdScript(item: unknown): string | undefined;
|
|
1752
|
+
|
|
1753
|
+
export { ACCESS_EXPORT_SCHEMA, type AIApproval, type AIApprovalStatus, type AIChatResponse, type AIChatStatus, type AIContentAssistResult, type AIConversation, type AIFieldSuggestion, type AIMessage, type AccessConflict, type AccessConflictCheckInput, type AccessConflictReport, type AccessExportApiKey, type AccessExportBindings, type AccessExportManifest, type AccessExportPermission, type AccessExportPolicy, type AccessExportRole, type AccessImportApplyResult, type AccessImportDiff, type AccessImportDiffEntry, type AccessImportDiffSection, type AccessImportDryRunResult, type AccessImportIssue, type AccessImportMode, type AccessImportOptions, type AccessImportSummary, type ActivityResource, type AgentApprovalResource, type AgentArtifactCreateInput, type AgentArtifactResource, type AgentArtifactType, type AgentEvaluationResource, type AgentGenerateAppInput, type AgentGenerateAppResult, type AgentGoalCreateInput, type AgentGoalResource, type AgentMemoryContext, type AgentMemoryResource, type AgentMemoryWriteInput, type AgentRiskLevel, type AgentRunResource, type AgentToolResource, type ApiKeyCreateInput, type ApiKeyPolicyAttachment, type ApiKeyResource, type ApiKeyRoleAttachment, type ApiKeyRotateInput, type ApiKeySecretResult, type Brand, type CdcConnectorType, type CdcDeployInput, type CdcDeploymentResult, type CdcDeploymentStatus, type CdcDeploymentStep, type CdcDeploymentTarget, type CdcEnvValidationResult, type CdcHealthCheckResult, type CdcHealthMetricEntry, type CdcPipelineCreateInput, type CdcPipelineMetrics, type CdcPipelinePatchInput, type CdcPipelineResource, type CdcPipelineStatus, type CdcRollbackResult, type CdcValidateEnvInput, type CollectionInput, type CollectionResource, type CompiledPermission, type CreateSCIMTokenParams, type DefaultSchema, type DeliverySeo, type ExtensionResource, type FieldDeleteOptions, type FieldInput, type FieldMutationOptions, type FieldRenameInput, type FieldResource, type FileResource, type FlowGraph, type FlowNode, type FlowResource, type FlowRun, type FlowRunResult, type FlowRunStatus, type FlowStatus, type FlowTriggerType, type FolderResource, type GenerateOptions, type GraphQLExtension, type ID, type ItemFilter, type ItemFilterOp, type ItemRow, type ListItemsParams, type ListItemsResponse, type ListMarketplaceExtensionsParams, type Locale, type LumiClient, type LumiClientOptions, LumiError, type LumiErrorBody, type LumiResponse, type MarketplaceExtension, type MarketplaceListResponse, type MaterializeDataResponse, type MaterializeProjection, type MaterializeRefreshResult, type MaterializeRefreshStrategy, type MaterializedCollection, type PermissionAction, type PermissionBundle, type PermissionCheckResult, type PermissionRow, type PolicyDetail, type PolicyResource, type PresenceCallback, type PresenceEntry, type PresetResource, type PrimaryKeyType, RealtimeClient, type RealtimeEvent, type RealtimeEventCallback, type RelationInput, type RelationResource, type RelationType, type RevisionRow, type RoleDetail, type RoleResource, type SCIMTokenCreated, type SCIMTokenMeta, type SCIMTokenRotated, type SchemaApplyInput, type SchemaApplyResult, type SchemaChangedEvent, type SchemaDiff, type SchemaDiffEntry, type SchemaDiffInput, type SchemaDiffRisk, type SchemaRuntimeImpact, type SettingResource, type ShareCreateInput, type ShareResource, type ShareSecretResult, type SiteConfigUpdate, type SiteResource, type StorageMode, type TeamMemberResource, type TeamResource, type TranslationResource, type TypegenCollection, type TypegenField, type TypegenManifest, type TypegenRelation, type TypegenSchemaFilters, type UserResource, type WebhookResource, checkCdcPipelineHealth, createAgentArtifact, createAgentGoal, createCdcPipeline, createLumiClient, decideAgentApproval, deleteCdcPipeline, deployCdc, dryRunAccessImport, evaluateAgentArtifact, exportAccessManifest, extractSeo, generateAgentApp, generateTypes, graphql, importAccessManifest, jsonLdScript, legacyRest, listAgentApprovals, listAgentArtifacts, listAgentGoals, listAgentRuns, listAgentTools, listCdcPipelines, publishAgentArtifact, readAgentMemoryContext, readCdcPipeline, readCdcPipelineMetricHistory, readCdcPipelineMetrics, readItem, readItems, retryAgentRun, rollbackAgentArtifact, rollbackCdcDeployment, startCdcPipeline, stopCdcPipeline, toNextMetadata, updateCdcPipeline, validateCdcDeploymentEnv, writeAgentMemory };
|