@objectstack/objectql 1.0.4 → 1.0.5
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/.turbo/turbo-build.log +22 -0
- package/CHANGELOG.md +14 -0
- package/dist/{registry.d.ts → index.d.mts} +433 -3
- package/dist/index.d.ts +999 -6
- package/dist/index.js +798 -9
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +768 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +5 -5
- package/tsconfig.json +1 -3
- package/dist/engine.d.ts +0 -304
- package/dist/engine.d.ts.map +0 -1
- package/dist/engine.js +0 -445
- package/dist/index.d.ts.map +0 -1
- package/dist/plugin.d.ts +0 -14
- package/dist/plugin.d.ts.map +0 -1
- package/dist/plugin.js +0 -52
- package/dist/protocol.d.ts +0 -119
- package/dist/protocol.d.ts.map +0 -1
- package/dist/protocol.js +0 -247
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -119
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,999 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ServiceObject, HookContext, DataEngineQueryOptions, DataEngineInsertOptions, DataEngineUpdateOptions, DataEngineDeleteOptions, DataEngineCountOptions, DataEngineAggregateOptions } from '@objectstack/spec/data';
|
|
2
|
+
import { ObjectStackManifest } from '@objectstack/spec/kernel';
|
|
3
|
+
import { ObjectStackProtocol, MetadataCacheRequest, MetadataCacheResponse, BatchUpdateRequest, BatchUpdateResponse, UpdateManyDataRequest, DeleteManyDataRequest } from '@objectstack/spec/api';
|
|
4
|
+
import { IDataEngine, DriverInterface, Logger, Plugin, PluginContext } from '@objectstack/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Global Schema Registry
|
|
8
|
+
* Unified storage for all metadata types (Objects, Apps, Flows, Layouts, etc.)
|
|
9
|
+
*/
|
|
10
|
+
declare class SchemaRegistry {
|
|
11
|
+
private static metadata;
|
|
12
|
+
/**
|
|
13
|
+
* Universal Register Method
|
|
14
|
+
* @param type The category of metadata (e.g., 'object', 'app', 'plugin')
|
|
15
|
+
* @param item The metadata item itself
|
|
16
|
+
* @param keyField The property to use as the unique key (default: 'name')
|
|
17
|
+
*/
|
|
18
|
+
static registerItem<T>(type: string, item: T, keyField?: keyof T): void;
|
|
19
|
+
/**
|
|
20
|
+
* Validate Metadata against Spec Zod Schemas
|
|
21
|
+
*/
|
|
22
|
+
static validate(type: string, item: any): true | {
|
|
23
|
+
fields: Record<string, {
|
|
24
|
+
type: "number" | "boolean" | "code" | "date" | "lookup" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "datetime" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "master_detail" | "tree" | "image" | "file" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "signature" | "qrcode" | "progress" | "tags" | "vector";
|
|
25
|
+
required: boolean;
|
|
26
|
+
searchable: boolean;
|
|
27
|
+
multiple: boolean;
|
|
28
|
+
unique: boolean;
|
|
29
|
+
deleteBehavior: "set_null" | "cascade" | "restrict";
|
|
30
|
+
auditTrail: boolean;
|
|
31
|
+
hidden: boolean;
|
|
32
|
+
readonly: boolean;
|
|
33
|
+
encryption: boolean;
|
|
34
|
+
index: boolean;
|
|
35
|
+
externalId: boolean;
|
|
36
|
+
options?: {
|
|
37
|
+
value: string;
|
|
38
|
+
label: string;
|
|
39
|
+
color?: string | undefined;
|
|
40
|
+
default?: boolean | undefined;
|
|
41
|
+
}[] | undefined;
|
|
42
|
+
expression?: string | undefined;
|
|
43
|
+
defaultValue?: any;
|
|
44
|
+
min?: number | undefined;
|
|
45
|
+
max?: number | undefined;
|
|
46
|
+
step?: number | undefined;
|
|
47
|
+
language?: string | undefined;
|
|
48
|
+
encryptionConfig?: {
|
|
49
|
+
enabled: boolean;
|
|
50
|
+
algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
|
|
51
|
+
keyManagement: {
|
|
52
|
+
provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
|
|
53
|
+
keyId?: string | undefined;
|
|
54
|
+
rotationPolicy?: {
|
|
55
|
+
enabled: boolean;
|
|
56
|
+
frequencyDays: number;
|
|
57
|
+
retainOldVersions: number;
|
|
58
|
+
autoRotate: boolean;
|
|
59
|
+
} | undefined;
|
|
60
|
+
};
|
|
61
|
+
scope: "table" | "field" | "database" | "record";
|
|
62
|
+
deterministicEncryption: boolean;
|
|
63
|
+
searchableEncryption: boolean;
|
|
64
|
+
} | undefined;
|
|
65
|
+
formula?: string | undefined;
|
|
66
|
+
label?: string | undefined;
|
|
67
|
+
precision?: number | undefined;
|
|
68
|
+
name?: string | undefined;
|
|
69
|
+
description?: string | undefined;
|
|
70
|
+
format?: string | undefined;
|
|
71
|
+
maxLength?: number | undefined;
|
|
72
|
+
minLength?: number | undefined;
|
|
73
|
+
scale?: number | undefined;
|
|
74
|
+
reference?: string | undefined;
|
|
75
|
+
referenceFilters?: string[] | undefined;
|
|
76
|
+
writeRequiresMasterRead?: boolean | undefined;
|
|
77
|
+
summaryOperations?: {
|
|
78
|
+
object: string;
|
|
79
|
+
function: "count" | "sum" | "avg" | "min" | "max";
|
|
80
|
+
field: string;
|
|
81
|
+
} | undefined;
|
|
82
|
+
theme?: string | undefined;
|
|
83
|
+
lineNumbers?: boolean | undefined;
|
|
84
|
+
maxRating?: number | undefined;
|
|
85
|
+
allowHalf?: boolean | undefined;
|
|
86
|
+
displayMap?: boolean | undefined;
|
|
87
|
+
allowGeocoding?: boolean | undefined;
|
|
88
|
+
addressFormat?: "us" | "uk" | "international" | undefined;
|
|
89
|
+
colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
|
|
90
|
+
allowAlpha?: boolean | undefined;
|
|
91
|
+
presetColors?: string[] | undefined;
|
|
92
|
+
showValue?: boolean | undefined;
|
|
93
|
+
marks?: Record<string, string> | undefined;
|
|
94
|
+
barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
|
|
95
|
+
qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
|
|
96
|
+
displayValue?: boolean | undefined;
|
|
97
|
+
allowScanning?: boolean | undefined;
|
|
98
|
+
currencyConfig?: {
|
|
99
|
+
precision: number;
|
|
100
|
+
currencyMode: "dynamic" | "fixed";
|
|
101
|
+
defaultCurrency: string;
|
|
102
|
+
} | undefined;
|
|
103
|
+
vectorConfig?: {
|
|
104
|
+
dimensions: number;
|
|
105
|
+
distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
|
|
106
|
+
normalized: boolean;
|
|
107
|
+
indexed: boolean;
|
|
108
|
+
indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
|
|
109
|
+
} | undefined;
|
|
110
|
+
fileAttachmentConfig?: {
|
|
111
|
+
virusScan: boolean;
|
|
112
|
+
virusScanOnUpload: boolean;
|
|
113
|
+
quarantineOnThreat: boolean;
|
|
114
|
+
allowMultiple: boolean;
|
|
115
|
+
allowReplace: boolean;
|
|
116
|
+
allowDelete: boolean;
|
|
117
|
+
requireUpload: boolean;
|
|
118
|
+
extractMetadata: boolean;
|
|
119
|
+
extractText: boolean;
|
|
120
|
+
versioningEnabled: boolean;
|
|
121
|
+
publicRead: boolean;
|
|
122
|
+
presignedUrlExpiry: number;
|
|
123
|
+
minSize?: number | undefined;
|
|
124
|
+
maxSize?: number | undefined;
|
|
125
|
+
allowedTypes?: string[] | undefined;
|
|
126
|
+
blockedTypes?: string[] | undefined;
|
|
127
|
+
allowedMimeTypes?: string[] | undefined;
|
|
128
|
+
blockedMimeTypes?: string[] | undefined;
|
|
129
|
+
virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
|
|
130
|
+
storageProvider?: string | undefined;
|
|
131
|
+
storageBucket?: string | undefined;
|
|
132
|
+
storagePrefix?: string | undefined;
|
|
133
|
+
imageValidation?: {
|
|
134
|
+
autoRotate: boolean;
|
|
135
|
+
generateThumbnails: boolean;
|
|
136
|
+
preserveMetadata: boolean;
|
|
137
|
+
minWidth?: number | undefined;
|
|
138
|
+
maxWidth?: number | undefined;
|
|
139
|
+
minHeight?: number | undefined;
|
|
140
|
+
maxHeight?: number | undefined;
|
|
141
|
+
aspectRatio?: string | undefined;
|
|
142
|
+
thumbnailSizes?: {
|
|
143
|
+
name: string;
|
|
144
|
+
width: number;
|
|
145
|
+
height: number;
|
|
146
|
+
crop: boolean;
|
|
147
|
+
}[] | undefined;
|
|
148
|
+
} | undefined;
|
|
149
|
+
maxVersions?: number | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
maskingRule?: {
|
|
152
|
+
field: string;
|
|
153
|
+
strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
|
|
154
|
+
preserveFormat: boolean;
|
|
155
|
+
preserveLength: boolean;
|
|
156
|
+
pattern?: string | undefined;
|
|
157
|
+
roles?: string[] | undefined;
|
|
158
|
+
exemptRoles?: string[] | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
dependencies?: string[] | undefined;
|
|
161
|
+
cached?: {
|
|
162
|
+
enabled: boolean;
|
|
163
|
+
ttl: number;
|
|
164
|
+
invalidateOn: string[];
|
|
165
|
+
} | undefined;
|
|
166
|
+
dataQuality?: {
|
|
167
|
+
uniqueness: boolean;
|
|
168
|
+
completeness: number;
|
|
169
|
+
accuracy?: {
|
|
170
|
+
source: string;
|
|
171
|
+
threshold: number;
|
|
172
|
+
} | undefined;
|
|
173
|
+
} | undefined;
|
|
174
|
+
}>;
|
|
175
|
+
name: string;
|
|
176
|
+
active: boolean;
|
|
177
|
+
isSystem: boolean;
|
|
178
|
+
abstract: boolean;
|
|
179
|
+
datasource: string;
|
|
180
|
+
search?: {
|
|
181
|
+
fields: string[];
|
|
182
|
+
displayFields?: string[] | undefined;
|
|
183
|
+
filters?: string[] | undefined;
|
|
184
|
+
} | undefined;
|
|
185
|
+
tags?: string[] | undefined;
|
|
186
|
+
label?: string | undefined;
|
|
187
|
+
description?: string | undefined;
|
|
188
|
+
pluralLabel?: string | undefined;
|
|
189
|
+
icon?: string | undefined;
|
|
190
|
+
tableName?: string | undefined;
|
|
191
|
+
indexes?: {
|
|
192
|
+
type: "hash" | "btree" | "gin" | "gist" | "fulltext";
|
|
193
|
+
fields: string[];
|
|
194
|
+
unique: boolean;
|
|
195
|
+
partial?: string | undefined;
|
|
196
|
+
name?: string | undefined;
|
|
197
|
+
}[] | undefined;
|
|
198
|
+
tenancy?: {
|
|
199
|
+
enabled: boolean;
|
|
200
|
+
strategy: "shared" | "isolated" | "hybrid";
|
|
201
|
+
tenantField: string;
|
|
202
|
+
crossTenantAccess: boolean;
|
|
203
|
+
} | undefined;
|
|
204
|
+
softDelete?: {
|
|
205
|
+
enabled: boolean;
|
|
206
|
+
field: string;
|
|
207
|
+
cascadeDelete: boolean;
|
|
208
|
+
} | undefined;
|
|
209
|
+
versioning?: {
|
|
210
|
+
enabled: boolean;
|
|
211
|
+
strategy: "snapshot" | "delta" | "event-sourcing";
|
|
212
|
+
versionField: string;
|
|
213
|
+
retentionDays?: number | undefined;
|
|
214
|
+
} | undefined;
|
|
215
|
+
partitioning?: {
|
|
216
|
+
enabled: boolean;
|
|
217
|
+
strategy: "hash" | "range" | "list";
|
|
218
|
+
key: string;
|
|
219
|
+
interval?: string | undefined;
|
|
220
|
+
} | undefined;
|
|
221
|
+
cdc?: {
|
|
222
|
+
enabled: boolean;
|
|
223
|
+
events: ("insert" | "update" | "delete")[];
|
|
224
|
+
destination: string;
|
|
225
|
+
} | undefined;
|
|
226
|
+
validations?: any[] | undefined;
|
|
227
|
+
titleFormat?: string | undefined;
|
|
228
|
+
compactLayout?: string[] | undefined;
|
|
229
|
+
enable?: {
|
|
230
|
+
searchable: boolean;
|
|
231
|
+
trackHistory: boolean;
|
|
232
|
+
apiEnabled: boolean;
|
|
233
|
+
files: boolean;
|
|
234
|
+
feeds: boolean;
|
|
235
|
+
activities: boolean;
|
|
236
|
+
trash: boolean;
|
|
237
|
+
mru: boolean;
|
|
238
|
+
clone: boolean;
|
|
239
|
+
apiMethods?: ("search" | "update" | "delete" | "get" | "list" | "create" | "upsert" | "bulk" | "aggregate" | "history" | "restore" | "purge" | "import" | "export")[] | undefined;
|
|
240
|
+
} | undefined;
|
|
241
|
+
} | {
|
|
242
|
+
label: string;
|
|
243
|
+
name: string;
|
|
244
|
+
active: boolean;
|
|
245
|
+
isDefault: boolean;
|
|
246
|
+
description?: string | undefined;
|
|
247
|
+
version?: string | undefined;
|
|
248
|
+
icon?: string | undefined;
|
|
249
|
+
objects?: any[] | undefined;
|
|
250
|
+
branding?: {
|
|
251
|
+
primaryColor?: string | undefined;
|
|
252
|
+
logo?: string | undefined;
|
|
253
|
+
favicon?: string | undefined;
|
|
254
|
+
} | undefined;
|
|
255
|
+
navigation?: any[] | undefined;
|
|
256
|
+
homePageId?: string | undefined;
|
|
257
|
+
requiredPermissions?: string[] | undefined;
|
|
258
|
+
apis?: any[] | undefined;
|
|
259
|
+
} | {
|
|
260
|
+
type: "driver" | "app" | "plugin" | "module" | "objectql" | "gateway" | "adapter";
|
|
261
|
+
name: string;
|
|
262
|
+
version: string;
|
|
263
|
+
id: string;
|
|
264
|
+
description?: string | undefined;
|
|
265
|
+
dependencies?: Record<string, string> | undefined;
|
|
266
|
+
data?: {
|
|
267
|
+
object: string;
|
|
268
|
+
mode: "insert" | "upsert" | "ignore";
|
|
269
|
+
records: Record<string, any>[];
|
|
270
|
+
}[] | undefined;
|
|
271
|
+
capabilities?: {
|
|
272
|
+
implements?: {
|
|
273
|
+
protocol: {
|
|
274
|
+
label: string;
|
|
275
|
+
version: {
|
|
276
|
+
major: number;
|
|
277
|
+
minor: number;
|
|
278
|
+
patch: number;
|
|
279
|
+
};
|
|
280
|
+
id: string;
|
|
281
|
+
description?: string | undefined;
|
|
282
|
+
specification?: string | undefined;
|
|
283
|
+
};
|
|
284
|
+
conformance: "partial" | "full" | "deprecated" | "experimental";
|
|
285
|
+
certified: boolean;
|
|
286
|
+
metadata?: Record<string, any> | undefined;
|
|
287
|
+
features?: {
|
|
288
|
+
enabled: boolean;
|
|
289
|
+
name: string;
|
|
290
|
+
description?: string | undefined;
|
|
291
|
+
sinceVersion?: string | undefined;
|
|
292
|
+
deprecatedSince?: string | undefined;
|
|
293
|
+
}[] | undefined;
|
|
294
|
+
implementedFeatures?: string[] | undefined;
|
|
295
|
+
certificationDate?: string | undefined;
|
|
296
|
+
}[] | undefined;
|
|
297
|
+
provides?: {
|
|
298
|
+
methods: {
|
|
299
|
+
name: string;
|
|
300
|
+
async: boolean;
|
|
301
|
+
description?: string | undefined;
|
|
302
|
+
parameters?: {
|
|
303
|
+
type: string;
|
|
304
|
+
required: boolean;
|
|
305
|
+
name: string;
|
|
306
|
+
description?: string | undefined;
|
|
307
|
+
}[] | undefined;
|
|
308
|
+
returnType?: string | undefined;
|
|
309
|
+
}[];
|
|
310
|
+
name: string;
|
|
311
|
+
version: {
|
|
312
|
+
major: number;
|
|
313
|
+
minor: number;
|
|
314
|
+
patch: number;
|
|
315
|
+
};
|
|
316
|
+
id: string;
|
|
317
|
+
stability: "alpha" | "experimental" | "stable" | "beta";
|
|
318
|
+
description?: string | undefined;
|
|
319
|
+
events?: {
|
|
320
|
+
name: string;
|
|
321
|
+
description?: string | undefined;
|
|
322
|
+
payload?: string | undefined;
|
|
323
|
+
}[] | undefined;
|
|
324
|
+
}[] | undefined;
|
|
325
|
+
requires?: {
|
|
326
|
+
version: string;
|
|
327
|
+
optional: boolean;
|
|
328
|
+
pluginId: string;
|
|
329
|
+
reason?: string | undefined;
|
|
330
|
+
requiredCapabilities?: string[] | undefined;
|
|
331
|
+
}[] | undefined;
|
|
332
|
+
extensionPoints?: {
|
|
333
|
+
type: "provider" | "action" | "widget" | "hook" | "transformer" | "validator" | "decorator";
|
|
334
|
+
name: string;
|
|
335
|
+
id: string;
|
|
336
|
+
cardinality: "multiple" | "single";
|
|
337
|
+
description?: string | undefined;
|
|
338
|
+
contract?: {
|
|
339
|
+
signature?: string | undefined;
|
|
340
|
+
input?: string | undefined;
|
|
341
|
+
output?: string | undefined;
|
|
342
|
+
} | undefined;
|
|
343
|
+
}[] | undefined;
|
|
344
|
+
extensions?: {
|
|
345
|
+
priority: number;
|
|
346
|
+
implementation: string;
|
|
347
|
+
targetPluginId: string;
|
|
348
|
+
extensionPointId: string;
|
|
349
|
+
}[] | undefined;
|
|
350
|
+
} | undefined;
|
|
351
|
+
objects?: string[] | undefined;
|
|
352
|
+
permissions?: string[] | undefined;
|
|
353
|
+
extensions?: Record<string, any> | undefined;
|
|
354
|
+
loading?: {
|
|
355
|
+
strategy: "parallel" | "eager" | "lazy" | "deferred" | "on-demand";
|
|
356
|
+
caching?: {
|
|
357
|
+
enabled: boolean;
|
|
358
|
+
storage: "hybrid" | "memory" | "disk" | "indexeddb";
|
|
359
|
+
keyStrategy: "hash" | "version" | "timestamp";
|
|
360
|
+
maxSize?: number | undefined;
|
|
361
|
+
ttl?: number | undefined;
|
|
362
|
+
invalidateOn?: ("error" | "manual" | "version-change" | "dependency-change")[] | undefined;
|
|
363
|
+
compression?: {
|
|
364
|
+
enabled: boolean;
|
|
365
|
+
algorithm: "gzip" | "brotli" | "deflate";
|
|
366
|
+
} | undefined;
|
|
367
|
+
} | undefined;
|
|
368
|
+
preload?: {
|
|
369
|
+
enabled: boolean;
|
|
370
|
+
priority: number;
|
|
371
|
+
conditions?: {
|
|
372
|
+
roles?: string[] | undefined;
|
|
373
|
+
routes?: string[] | undefined;
|
|
374
|
+
deviceType?: ("desktop" | "mobile" | "tablet")[] | undefined;
|
|
375
|
+
minNetworkSpeed?: "slow-2g" | "2g" | "3g" | "4g" | undefined;
|
|
376
|
+
} | undefined;
|
|
377
|
+
resources?: ("code" | "dependencies" | "metadata" | "assets" | "services")[] | undefined;
|
|
378
|
+
} | undefined;
|
|
379
|
+
codeSplitting?: {
|
|
380
|
+
enabled: boolean;
|
|
381
|
+
strategy: "custom" | "size" | "route" | "feature";
|
|
382
|
+
chunkNaming: "hashed" | "named" | "sequential";
|
|
383
|
+
maxChunkSize?: number | undefined;
|
|
384
|
+
sharedDependencies?: {
|
|
385
|
+
enabled: boolean;
|
|
386
|
+
minChunks: number;
|
|
387
|
+
} | undefined;
|
|
388
|
+
} | undefined;
|
|
389
|
+
dynamicImport?: {
|
|
390
|
+
enabled: boolean;
|
|
391
|
+
timeout: number;
|
|
392
|
+
mode: "async" | "eager" | "lazy" | "sync";
|
|
393
|
+
prefetch: boolean;
|
|
394
|
+
preload: boolean;
|
|
395
|
+
retry?: {
|
|
396
|
+
enabled: boolean;
|
|
397
|
+
maxAttempts: number;
|
|
398
|
+
backoffMs: number;
|
|
399
|
+
} | undefined;
|
|
400
|
+
webpackChunkName?: string | undefined;
|
|
401
|
+
} | undefined;
|
|
402
|
+
initialization?: {
|
|
403
|
+
timeout: number;
|
|
404
|
+
priority: number;
|
|
405
|
+
mode: "async" | "parallel" | "sequential" | "sync";
|
|
406
|
+
critical: boolean;
|
|
407
|
+
retry?: {
|
|
408
|
+
enabled: boolean;
|
|
409
|
+
maxAttempts: number;
|
|
410
|
+
backoffMs: number;
|
|
411
|
+
} | undefined;
|
|
412
|
+
healthCheckInterval?: number | undefined;
|
|
413
|
+
} | undefined;
|
|
414
|
+
dependencyResolution?: {
|
|
415
|
+
strategy: "strict" | "latest" | "compatible" | "pinned";
|
|
416
|
+
conflictResolution: "latest" | "manual" | "fail" | "oldest";
|
|
417
|
+
circularDependencies: "error" | "warn" | "allow";
|
|
418
|
+
peerDependencies?: {
|
|
419
|
+
resolve: boolean;
|
|
420
|
+
onMissing: "error" | "warn" | "ignore";
|
|
421
|
+
onMismatch: "error" | "warn" | "ignore";
|
|
422
|
+
} | undefined;
|
|
423
|
+
optionalDependencies?: {
|
|
424
|
+
load: boolean;
|
|
425
|
+
onFailure: "warn" | "ignore";
|
|
426
|
+
} | undefined;
|
|
427
|
+
} | undefined;
|
|
428
|
+
hotReload?: {
|
|
429
|
+
enabled: boolean;
|
|
430
|
+
strategy: "partial" | "full" | "state-preserve";
|
|
431
|
+
debounceMs: number;
|
|
432
|
+
preserveState: boolean;
|
|
433
|
+
watchPatterns?: string[] | undefined;
|
|
434
|
+
ignorePatterns?: string[] | undefined;
|
|
435
|
+
stateSerialization?: {
|
|
436
|
+
enabled: boolean;
|
|
437
|
+
handler?: string | undefined;
|
|
438
|
+
} | undefined;
|
|
439
|
+
hooks?: {
|
|
440
|
+
onError?: string | undefined;
|
|
441
|
+
beforeReload?: string | undefined;
|
|
442
|
+
afterReload?: string | undefined;
|
|
443
|
+
} | undefined;
|
|
444
|
+
} | undefined;
|
|
445
|
+
sandboxing?: {
|
|
446
|
+
enabled: boolean;
|
|
447
|
+
isolationLevel: "none" | "process" | "vm" | "iframe" | "web-worker";
|
|
448
|
+
permissions?: {
|
|
449
|
+
allowedAPIs?: string[] | undefined;
|
|
450
|
+
allowedPaths?: string[] | undefined;
|
|
451
|
+
allowedEndpoints?: string[] | undefined;
|
|
452
|
+
allowedEnvVars?: string[] | undefined;
|
|
453
|
+
} | undefined;
|
|
454
|
+
allowedCapabilities?: string[] | undefined;
|
|
455
|
+
resourceQuotas?: {
|
|
456
|
+
maxMemoryMB?: number | undefined;
|
|
457
|
+
maxCpuTimeMs?: number | undefined;
|
|
458
|
+
maxFileDescriptors?: number | undefined;
|
|
459
|
+
maxNetworkKBps?: number | undefined;
|
|
460
|
+
} | undefined;
|
|
461
|
+
} | undefined;
|
|
462
|
+
monitoring?: {
|
|
463
|
+
enabled: boolean;
|
|
464
|
+
samplingRate: number;
|
|
465
|
+
reportingInterval: number;
|
|
466
|
+
onBudgetViolation: "error" | "warn" | "ignore";
|
|
467
|
+
metrics?: ("load-time" | "init-time" | "memory-usage" | "cpu-usage" | "api-calls" | "error-rate" | "cache-hit-rate")[] | undefined;
|
|
468
|
+
budgets?: {
|
|
469
|
+
maxMemoryMB?: number | undefined;
|
|
470
|
+
maxLoadTimeMs?: number | undefined;
|
|
471
|
+
maxInitTimeMs?: number | undefined;
|
|
472
|
+
} | undefined;
|
|
473
|
+
} | undefined;
|
|
474
|
+
} | undefined;
|
|
475
|
+
datasources?: string[] | undefined;
|
|
476
|
+
configuration?: {
|
|
477
|
+
properties: Record<string, {
|
|
478
|
+
type: "string" | "number" | "boolean" | "object" | "array";
|
|
479
|
+
required?: boolean | undefined;
|
|
480
|
+
default?: any;
|
|
481
|
+
description?: string | undefined;
|
|
482
|
+
enum?: string[] | undefined;
|
|
483
|
+
secret?: boolean | undefined;
|
|
484
|
+
}>;
|
|
485
|
+
title?: string | undefined;
|
|
486
|
+
} | undefined;
|
|
487
|
+
contributes?: {
|
|
488
|
+
events?: string[] | undefined;
|
|
489
|
+
fieldTypes?: {
|
|
490
|
+
label: string;
|
|
491
|
+
name: string;
|
|
492
|
+
description?: string | undefined;
|
|
493
|
+
}[] | undefined;
|
|
494
|
+
actions?: {
|
|
495
|
+
name: string;
|
|
496
|
+
label?: string | undefined;
|
|
497
|
+
description?: string | undefined;
|
|
498
|
+
input?: any;
|
|
499
|
+
output?: any;
|
|
500
|
+
}[] | undefined;
|
|
501
|
+
kinds?: {
|
|
502
|
+
id: string;
|
|
503
|
+
globs: string[];
|
|
504
|
+
description?: string | undefined;
|
|
505
|
+
}[] | undefined;
|
|
506
|
+
menus?: Record<string, {
|
|
507
|
+
label: string;
|
|
508
|
+
id: string;
|
|
509
|
+
command?: string | undefined;
|
|
510
|
+
}[]> | undefined;
|
|
511
|
+
themes?: {
|
|
512
|
+
path: string;
|
|
513
|
+
label: string;
|
|
514
|
+
id: string;
|
|
515
|
+
}[] | undefined;
|
|
516
|
+
translations?: {
|
|
517
|
+
path: string;
|
|
518
|
+
locale: string;
|
|
519
|
+
}[] | undefined;
|
|
520
|
+
drivers?: {
|
|
521
|
+
label: string;
|
|
522
|
+
id: string;
|
|
523
|
+
description?: string | undefined;
|
|
524
|
+
}[] | undefined;
|
|
525
|
+
functions?: {
|
|
526
|
+
name: string;
|
|
527
|
+
description?: string | undefined;
|
|
528
|
+
returnType?: string | undefined;
|
|
529
|
+
args?: string[] | undefined;
|
|
530
|
+
}[] | undefined;
|
|
531
|
+
} | undefined;
|
|
532
|
+
};
|
|
533
|
+
/**
|
|
534
|
+
* Universal Unregister Method
|
|
535
|
+
*/
|
|
536
|
+
static unregisterItem(type: string, name: string): void;
|
|
537
|
+
/**
|
|
538
|
+
* Universal Get Method
|
|
539
|
+
*/
|
|
540
|
+
static getItem<T>(type: string, name: string): T | undefined;
|
|
541
|
+
/**
|
|
542
|
+
* Universal List Method
|
|
543
|
+
*/
|
|
544
|
+
static listItems<T>(type: string): T[];
|
|
545
|
+
/**
|
|
546
|
+
* Get all registered metadata types (Kinds)
|
|
547
|
+
*/
|
|
548
|
+
static getRegisteredTypes(): string[];
|
|
549
|
+
/**
|
|
550
|
+
* Object Helpers
|
|
551
|
+
*/
|
|
552
|
+
static registerObject(schema: ServiceObject): void;
|
|
553
|
+
static getObject(name: string): ServiceObject | undefined;
|
|
554
|
+
static getAllObjects(): ServiceObject[];
|
|
555
|
+
/**
|
|
556
|
+
* Plugin Helpers
|
|
557
|
+
*/
|
|
558
|
+
static registerPlugin(manifest: ObjectStackManifest): void;
|
|
559
|
+
static getAllPlugins(): ObjectStackManifest[];
|
|
560
|
+
/**
|
|
561
|
+
* Kind (Metadata Type) Helpers
|
|
562
|
+
*/
|
|
563
|
+
static registerKind(kind: {
|
|
564
|
+
id: string;
|
|
565
|
+
globs: string[];
|
|
566
|
+
}): void;
|
|
567
|
+
static getAllKinds(): {
|
|
568
|
+
id: string;
|
|
569
|
+
globs: string[];
|
|
570
|
+
}[];
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
|
|
574
|
+
private engine;
|
|
575
|
+
constructor(engine: IDataEngine);
|
|
576
|
+
getDiscovery(_request: {}): Promise<{
|
|
577
|
+
version: string;
|
|
578
|
+
apiName: string;
|
|
579
|
+
capabilities: {
|
|
580
|
+
graphql: boolean;
|
|
581
|
+
search: boolean;
|
|
582
|
+
websockets: boolean;
|
|
583
|
+
files: boolean;
|
|
584
|
+
analytics: boolean;
|
|
585
|
+
hub: boolean;
|
|
586
|
+
};
|
|
587
|
+
endpoints: {
|
|
588
|
+
data: string;
|
|
589
|
+
metadata: string;
|
|
590
|
+
auth: string;
|
|
591
|
+
};
|
|
592
|
+
}>;
|
|
593
|
+
getMetaTypes(_request: {}): Promise<{
|
|
594
|
+
types: string[];
|
|
595
|
+
}>;
|
|
596
|
+
getMetaItems(request: {
|
|
597
|
+
type: string;
|
|
598
|
+
}): Promise<{
|
|
599
|
+
type: string;
|
|
600
|
+
items: unknown[];
|
|
601
|
+
}>;
|
|
602
|
+
getMetaItem(request: {
|
|
603
|
+
type: string;
|
|
604
|
+
name: string;
|
|
605
|
+
}): Promise<{
|
|
606
|
+
type: string;
|
|
607
|
+
name: string;
|
|
608
|
+
item: unknown;
|
|
609
|
+
}>;
|
|
610
|
+
getUiView(request: {
|
|
611
|
+
object: string;
|
|
612
|
+
type: 'list' | 'form';
|
|
613
|
+
}): Promise<any>;
|
|
614
|
+
findData(request: {
|
|
615
|
+
object: string;
|
|
616
|
+
query?: any;
|
|
617
|
+
}): Promise<{
|
|
618
|
+
object: string;
|
|
619
|
+
value: any[];
|
|
620
|
+
records: any[];
|
|
621
|
+
total: number;
|
|
622
|
+
hasMore: boolean;
|
|
623
|
+
}>;
|
|
624
|
+
getData(request: {
|
|
625
|
+
object: string;
|
|
626
|
+
id: string;
|
|
627
|
+
}): Promise<{
|
|
628
|
+
object: string;
|
|
629
|
+
id: string;
|
|
630
|
+
record: any;
|
|
631
|
+
}>;
|
|
632
|
+
createData(request: {
|
|
633
|
+
object: string;
|
|
634
|
+
data: any;
|
|
635
|
+
}): Promise<{
|
|
636
|
+
object: string;
|
|
637
|
+
id: any;
|
|
638
|
+
record: any;
|
|
639
|
+
}>;
|
|
640
|
+
updateData(request: {
|
|
641
|
+
object: string;
|
|
642
|
+
id: string;
|
|
643
|
+
data: any;
|
|
644
|
+
}): Promise<{
|
|
645
|
+
object: string;
|
|
646
|
+
id: string;
|
|
647
|
+
record: any;
|
|
648
|
+
}>;
|
|
649
|
+
deleteData(request: {
|
|
650
|
+
object: string;
|
|
651
|
+
id: string;
|
|
652
|
+
}): Promise<{
|
|
653
|
+
object: string;
|
|
654
|
+
id: string;
|
|
655
|
+
success: boolean;
|
|
656
|
+
}>;
|
|
657
|
+
getMetaItemCached(request: {
|
|
658
|
+
type: string;
|
|
659
|
+
name: string;
|
|
660
|
+
cacheRequest?: MetadataCacheRequest;
|
|
661
|
+
}): Promise<MetadataCacheResponse>;
|
|
662
|
+
batchData(_request: {
|
|
663
|
+
object: string;
|
|
664
|
+
request: BatchUpdateRequest;
|
|
665
|
+
}): Promise<BatchUpdateResponse>;
|
|
666
|
+
createManyData(request: {
|
|
667
|
+
object: string;
|
|
668
|
+
records: any[];
|
|
669
|
+
}): Promise<any>;
|
|
670
|
+
updateManyData(_request: UpdateManyDataRequest): Promise<any>;
|
|
671
|
+
analyticsQuery(_request: any): Promise<any>;
|
|
672
|
+
getAnalyticsMeta(_request: any): Promise<any>;
|
|
673
|
+
triggerAutomation(_request: any): Promise<any>;
|
|
674
|
+
listSpaces(_request: any): Promise<any>;
|
|
675
|
+
createSpace(_request: any): Promise<any>;
|
|
676
|
+
installPlugin(_request: any): Promise<any>;
|
|
677
|
+
deleteManyData(request: DeleteManyDataRequest): Promise<any>;
|
|
678
|
+
saveMetaItem(request: {
|
|
679
|
+
type: string;
|
|
680
|
+
name: string;
|
|
681
|
+
item?: any;
|
|
682
|
+
}): Promise<{
|
|
683
|
+
success: boolean;
|
|
684
|
+
message: string;
|
|
685
|
+
}>;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
type HookHandler = (context: HookContext) => Promise<void> | void;
|
|
689
|
+
/**
|
|
690
|
+
* Host Context provided to plugins (Internal ObjectQL Plugin System)
|
|
691
|
+
*/
|
|
692
|
+
interface ObjectQLHostContext {
|
|
693
|
+
ql: ObjectQL;
|
|
694
|
+
logger: Logger;
|
|
695
|
+
[key: string]: any;
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* ObjectQL Engine
|
|
699
|
+
*
|
|
700
|
+
* Implements the IDataEngine interface for data persistence.
|
|
701
|
+
* Acts as the reference implementation for:
|
|
702
|
+
* - CoreServiceName.data (CRUD)
|
|
703
|
+
* - CoreServiceName.metadata (Schema Registry)
|
|
704
|
+
*/
|
|
705
|
+
declare class ObjectQL implements IDataEngine {
|
|
706
|
+
private drivers;
|
|
707
|
+
private defaultDriver;
|
|
708
|
+
private logger;
|
|
709
|
+
private hooks;
|
|
710
|
+
private hostContext;
|
|
711
|
+
constructor(hostContext?: Record<string, any>);
|
|
712
|
+
/**
|
|
713
|
+
* Service Status Report
|
|
714
|
+
* Used by Kernel to verify health and capabilities.
|
|
715
|
+
*/
|
|
716
|
+
getStatus(): {
|
|
717
|
+
name: "data";
|
|
718
|
+
status: string;
|
|
719
|
+
version: string;
|
|
720
|
+
features: string[];
|
|
721
|
+
};
|
|
722
|
+
/**
|
|
723
|
+
* Expose the SchemaRegistry for plugins to register metadata
|
|
724
|
+
*/
|
|
725
|
+
get registry(): typeof SchemaRegistry;
|
|
726
|
+
/**
|
|
727
|
+
* Load and Register a Plugin
|
|
728
|
+
*/
|
|
729
|
+
use(manifestPart: any, runtimePart?: any): Promise<void>;
|
|
730
|
+
/**
|
|
731
|
+
* Register a hook
|
|
732
|
+
* @param event The event name (e.g. 'beforeFind', 'afterInsert')
|
|
733
|
+
* @param handler The handler function
|
|
734
|
+
*/
|
|
735
|
+
registerHook(event: string, handler: HookHandler): void;
|
|
736
|
+
triggerHooks(event: string, context: HookContext): Promise<void>;
|
|
737
|
+
/**
|
|
738
|
+
* Register contribution (Manifest)
|
|
739
|
+
*/
|
|
740
|
+
registerApp(manifest: any): void;
|
|
741
|
+
/**
|
|
742
|
+
* Register a new storage driver
|
|
743
|
+
*/
|
|
744
|
+
registerDriver(driver: DriverInterface, isDefault?: boolean): void;
|
|
745
|
+
/**
|
|
746
|
+
* Helper to get object definition
|
|
747
|
+
*/
|
|
748
|
+
getSchema(objectName: string): {
|
|
749
|
+
fields: Record<string, {
|
|
750
|
+
type: "number" | "boolean" | "code" | "date" | "lookup" | "text" | "textarea" | "email" | "url" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "datetime" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "master_detail" | "tree" | "image" | "file" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "signature" | "qrcode" | "progress" | "tags" | "vector";
|
|
751
|
+
required: boolean;
|
|
752
|
+
searchable: boolean;
|
|
753
|
+
multiple: boolean;
|
|
754
|
+
unique: boolean;
|
|
755
|
+
deleteBehavior: "set_null" | "cascade" | "restrict";
|
|
756
|
+
auditTrail: boolean;
|
|
757
|
+
hidden: boolean;
|
|
758
|
+
readonly: boolean;
|
|
759
|
+
encryption: boolean;
|
|
760
|
+
index: boolean;
|
|
761
|
+
externalId: boolean;
|
|
762
|
+
options?: {
|
|
763
|
+
value: string;
|
|
764
|
+
label: string;
|
|
765
|
+
color?: string | undefined;
|
|
766
|
+
default?: boolean | undefined;
|
|
767
|
+
}[] | undefined;
|
|
768
|
+
expression?: string | undefined;
|
|
769
|
+
defaultValue?: any;
|
|
770
|
+
min?: number | undefined;
|
|
771
|
+
max?: number | undefined;
|
|
772
|
+
step?: number | undefined;
|
|
773
|
+
language?: string | undefined;
|
|
774
|
+
encryptionConfig?: {
|
|
775
|
+
enabled: boolean;
|
|
776
|
+
algorithm: "aes-256-gcm" | "aes-256-cbc" | "chacha20-poly1305";
|
|
777
|
+
keyManagement: {
|
|
778
|
+
provider: "local" | "aws-kms" | "azure-key-vault" | "gcp-kms" | "hashicorp-vault";
|
|
779
|
+
keyId?: string | undefined;
|
|
780
|
+
rotationPolicy?: {
|
|
781
|
+
enabled: boolean;
|
|
782
|
+
frequencyDays: number;
|
|
783
|
+
retainOldVersions: number;
|
|
784
|
+
autoRotate: boolean;
|
|
785
|
+
} | undefined;
|
|
786
|
+
};
|
|
787
|
+
scope: "table" | "field" | "database" | "record";
|
|
788
|
+
deterministicEncryption: boolean;
|
|
789
|
+
searchableEncryption: boolean;
|
|
790
|
+
} | undefined;
|
|
791
|
+
formula?: string | undefined;
|
|
792
|
+
label?: string | undefined;
|
|
793
|
+
precision?: number | undefined;
|
|
794
|
+
name?: string | undefined;
|
|
795
|
+
description?: string | undefined;
|
|
796
|
+
format?: string | undefined;
|
|
797
|
+
maxLength?: number | undefined;
|
|
798
|
+
minLength?: number | undefined;
|
|
799
|
+
scale?: number | undefined;
|
|
800
|
+
reference?: string | undefined;
|
|
801
|
+
referenceFilters?: string[] | undefined;
|
|
802
|
+
writeRequiresMasterRead?: boolean | undefined;
|
|
803
|
+
summaryOperations?: {
|
|
804
|
+
object: string;
|
|
805
|
+
function: "count" | "sum" | "avg" | "min" | "max";
|
|
806
|
+
field: string;
|
|
807
|
+
} | undefined;
|
|
808
|
+
theme?: string | undefined;
|
|
809
|
+
lineNumbers?: boolean | undefined;
|
|
810
|
+
maxRating?: number | undefined;
|
|
811
|
+
allowHalf?: boolean | undefined;
|
|
812
|
+
displayMap?: boolean | undefined;
|
|
813
|
+
allowGeocoding?: boolean | undefined;
|
|
814
|
+
addressFormat?: "us" | "uk" | "international" | undefined;
|
|
815
|
+
colorFormat?: "hex" | "rgb" | "rgba" | "hsl" | undefined;
|
|
816
|
+
allowAlpha?: boolean | undefined;
|
|
817
|
+
presetColors?: string[] | undefined;
|
|
818
|
+
showValue?: boolean | undefined;
|
|
819
|
+
marks?: Record<string, string> | undefined;
|
|
820
|
+
barcodeFormat?: "qr" | "ean13" | "ean8" | "code128" | "code39" | "upca" | "upce" | undefined;
|
|
821
|
+
qrErrorCorrection?: "L" | "M" | "Q" | "H" | undefined;
|
|
822
|
+
displayValue?: boolean | undefined;
|
|
823
|
+
allowScanning?: boolean | undefined;
|
|
824
|
+
currencyConfig?: {
|
|
825
|
+
precision: number;
|
|
826
|
+
currencyMode: "dynamic" | "fixed";
|
|
827
|
+
defaultCurrency: string;
|
|
828
|
+
} | undefined;
|
|
829
|
+
vectorConfig?: {
|
|
830
|
+
dimensions: number;
|
|
831
|
+
distanceMetric: "cosine" | "euclidean" | "dotProduct" | "manhattan";
|
|
832
|
+
normalized: boolean;
|
|
833
|
+
indexed: boolean;
|
|
834
|
+
indexType?: "flat" | "hnsw" | "ivfflat" | undefined;
|
|
835
|
+
} | undefined;
|
|
836
|
+
fileAttachmentConfig?: {
|
|
837
|
+
virusScan: boolean;
|
|
838
|
+
virusScanOnUpload: boolean;
|
|
839
|
+
quarantineOnThreat: boolean;
|
|
840
|
+
allowMultiple: boolean;
|
|
841
|
+
allowReplace: boolean;
|
|
842
|
+
allowDelete: boolean;
|
|
843
|
+
requireUpload: boolean;
|
|
844
|
+
extractMetadata: boolean;
|
|
845
|
+
extractText: boolean;
|
|
846
|
+
versioningEnabled: boolean;
|
|
847
|
+
publicRead: boolean;
|
|
848
|
+
presignedUrlExpiry: number;
|
|
849
|
+
minSize?: number | undefined;
|
|
850
|
+
maxSize?: number | undefined;
|
|
851
|
+
allowedTypes?: string[] | undefined;
|
|
852
|
+
blockedTypes?: string[] | undefined;
|
|
853
|
+
allowedMimeTypes?: string[] | undefined;
|
|
854
|
+
blockedMimeTypes?: string[] | undefined;
|
|
855
|
+
virusScanProvider?: "custom" | "clamav" | "virustotal" | "metadefender" | undefined;
|
|
856
|
+
storageProvider?: string | undefined;
|
|
857
|
+
storageBucket?: string | undefined;
|
|
858
|
+
storagePrefix?: string | undefined;
|
|
859
|
+
imageValidation?: {
|
|
860
|
+
autoRotate: boolean;
|
|
861
|
+
generateThumbnails: boolean;
|
|
862
|
+
preserveMetadata: boolean;
|
|
863
|
+
minWidth?: number | undefined;
|
|
864
|
+
maxWidth?: number | undefined;
|
|
865
|
+
minHeight?: number | undefined;
|
|
866
|
+
maxHeight?: number | undefined;
|
|
867
|
+
aspectRatio?: string | undefined;
|
|
868
|
+
thumbnailSizes?: {
|
|
869
|
+
name: string;
|
|
870
|
+
width: number;
|
|
871
|
+
height: number;
|
|
872
|
+
crop: boolean;
|
|
873
|
+
}[] | undefined;
|
|
874
|
+
} | undefined;
|
|
875
|
+
maxVersions?: number | undefined;
|
|
876
|
+
} | undefined;
|
|
877
|
+
maskingRule?: {
|
|
878
|
+
field: string;
|
|
879
|
+
strategy: "partial" | "hash" | "redact" | "tokenize" | "randomize" | "nullify" | "substitute";
|
|
880
|
+
preserveFormat: boolean;
|
|
881
|
+
preserveLength: boolean;
|
|
882
|
+
pattern?: string | undefined;
|
|
883
|
+
roles?: string[] | undefined;
|
|
884
|
+
exemptRoles?: string[] | undefined;
|
|
885
|
+
} | undefined;
|
|
886
|
+
dependencies?: string[] | undefined;
|
|
887
|
+
cached?: {
|
|
888
|
+
enabled: boolean;
|
|
889
|
+
ttl: number;
|
|
890
|
+
invalidateOn: string[];
|
|
891
|
+
} | undefined;
|
|
892
|
+
dataQuality?: {
|
|
893
|
+
uniqueness: boolean;
|
|
894
|
+
completeness: number;
|
|
895
|
+
accuracy?: {
|
|
896
|
+
source: string;
|
|
897
|
+
threshold: number;
|
|
898
|
+
} | undefined;
|
|
899
|
+
} | undefined;
|
|
900
|
+
}>;
|
|
901
|
+
name: string;
|
|
902
|
+
active: boolean;
|
|
903
|
+
isSystem: boolean;
|
|
904
|
+
abstract: boolean;
|
|
905
|
+
datasource: string;
|
|
906
|
+
search?: {
|
|
907
|
+
fields: string[];
|
|
908
|
+
displayFields?: string[] | undefined;
|
|
909
|
+
filters?: string[] | undefined;
|
|
910
|
+
} | undefined;
|
|
911
|
+
tags?: string[] | undefined;
|
|
912
|
+
label?: string | undefined;
|
|
913
|
+
description?: string | undefined;
|
|
914
|
+
pluralLabel?: string | undefined;
|
|
915
|
+
icon?: string | undefined;
|
|
916
|
+
tableName?: string | undefined;
|
|
917
|
+
indexes?: {
|
|
918
|
+
type: "hash" | "btree" | "gin" | "gist" | "fulltext";
|
|
919
|
+
fields: string[];
|
|
920
|
+
unique: boolean;
|
|
921
|
+
partial?: string | undefined;
|
|
922
|
+
name?: string | undefined;
|
|
923
|
+
}[] | undefined;
|
|
924
|
+
tenancy?: {
|
|
925
|
+
enabled: boolean;
|
|
926
|
+
strategy: "shared" | "isolated" | "hybrid";
|
|
927
|
+
tenantField: string;
|
|
928
|
+
crossTenantAccess: boolean;
|
|
929
|
+
} | undefined;
|
|
930
|
+
softDelete?: {
|
|
931
|
+
enabled: boolean;
|
|
932
|
+
field: string;
|
|
933
|
+
cascadeDelete: boolean;
|
|
934
|
+
} | undefined;
|
|
935
|
+
versioning?: {
|
|
936
|
+
enabled: boolean;
|
|
937
|
+
strategy: "snapshot" | "delta" | "event-sourcing";
|
|
938
|
+
versionField: string;
|
|
939
|
+
retentionDays?: number | undefined;
|
|
940
|
+
} | undefined;
|
|
941
|
+
partitioning?: {
|
|
942
|
+
enabled: boolean;
|
|
943
|
+
strategy: "hash" | "range" | "list";
|
|
944
|
+
key: string;
|
|
945
|
+
interval?: string | undefined;
|
|
946
|
+
} | undefined;
|
|
947
|
+
cdc?: {
|
|
948
|
+
enabled: boolean;
|
|
949
|
+
events: ("insert" | "update" | "delete")[];
|
|
950
|
+
destination: string;
|
|
951
|
+
} | undefined;
|
|
952
|
+
validations?: any[] | undefined;
|
|
953
|
+
titleFormat?: string | undefined;
|
|
954
|
+
compactLayout?: string[] | undefined;
|
|
955
|
+
enable?: {
|
|
956
|
+
searchable: boolean;
|
|
957
|
+
trackHistory: boolean;
|
|
958
|
+
apiEnabled: boolean;
|
|
959
|
+
files: boolean;
|
|
960
|
+
feeds: boolean;
|
|
961
|
+
activities: boolean;
|
|
962
|
+
trash: boolean;
|
|
963
|
+
mru: boolean;
|
|
964
|
+
clone: boolean;
|
|
965
|
+
apiMethods?: ("search" | "update" | "delete" | "get" | "list" | "create" | "upsert" | "bulk" | "aggregate" | "history" | "restore" | "purge" | "import" | "export")[] | undefined;
|
|
966
|
+
} | undefined;
|
|
967
|
+
} | undefined;
|
|
968
|
+
/**
|
|
969
|
+
* Helper to get the target driver
|
|
970
|
+
*/
|
|
971
|
+
private getDriver;
|
|
972
|
+
/**
|
|
973
|
+
* Initialize the engine and all registered drivers
|
|
974
|
+
*/
|
|
975
|
+
init(): Promise<void>;
|
|
976
|
+
destroy(): Promise<void>;
|
|
977
|
+
private toQueryAST;
|
|
978
|
+
find(object: string, query?: DataEngineQueryOptions): Promise<any[]>;
|
|
979
|
+
findOne(objectName: string, query?: DataEngineQueryOptions): Promise<any>;
|
|
980
|
+
insert(object: string, data: any | any[], options?: DataEngineInsertOptions): Promise<any>;
|
|
981
|
+
update(object: string, data: any, options?: DataEngineUpdateOptions): Promise<any>;
|
|
982
|
+
delete(object: string, options?: DataEngineDeleteOptions): Promise<any>;
|
|
983
|
+
count(object: string, query?: DataEngineCountOptions): Promise<number>;
|
|
984
|
+
aggregate(object: string, query: DataEngineAggregateOptions): Promise<any[]>;
|
|
985
|
+
execute(command: any, options?: Record<string, any>): Promise<any>;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
declare class ObjectQLPlugin implements Plugin {
|
|
989
|
+
name: string;
|
|
990
|
+
type: "objectql";
|
|
991
|
+
version: string;
|
|
992
|
+
private ql;
|
|
993
|
+
private hostContext?;
|
|
994
|
+
constructor(ql?: ObjectQL, hostContext?: Record<string, any>);
|
|
995
|
+
init: (ctx: PluginContext) => Promise<void>;
|
|
996
|
+
start: (ctx: PluginContext) => Promise<void>;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
export { type HookHandler, ObjectQL, type ObjectQLHostContext, ObjectQLPlugin, ObjectStackProtocolImplementation, SchemaRegistry };
|