@mdxui/do 2.1.1

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.
Files changed (42) hide show
  1. package/README.md +412 -0
  2. package/dist/__test-utils__/index.d.ts +399 -0
  3. package/dist/__test-utils__/index.js +34641 -0
  4. package/dist/__test-utils__/index.js.map +1 -0
  5. package/dist/agents-xcIn2dUB.d.ts +832 -0
  6. package/dist/chunk-EEDMN7UF.js +1351 -0
  7. package/dist/chunk-EEDMN7UF.js.map +1 -0
  8. package/dist/chunk-G3PMV62Z.js +33 -0
  9. package/dist/chunk-G3PMV62Z.js.map +1 -0
  10. package/dist/chunk-GGO5GW72.js +695 -0
  11. package/dist/chunk-GGO5GW72.js.map +1 -0
  12. package/dist/chunk-GKSP5RIA.js +3 -0
  13. package/dist/chunk-GKSP5RIA.js.map +1 -0
  14. package/dist/chunk-NXPXL5NA.js +3789 -0
  15. package/dist/chunk-NXPXL5NA.js.map +1 -0
  16. package/dist/chunk-PC5FJY6M.js +20 -0
  17. package/dist/chunk-PC5FJY6M.js.map +1 -0
  18. package/dist/chunk-XF6LKY2M.js +445 -0
  19. package/dist/chunk-XF6LKY2M.js.map +1 -0
  20. package/dist/components/index.d.ts +813 -0
  21. package/dist/components/index.js +8 -0
  22. package/dist/components/index.js.map +1 -0
  23. package/dist/do-CaQVueZw.d.ts +195 -0
  24. package/dist/hooks/index.d.ts +801 -0
  25. package/dist/hooks/index.js +7 -0
  26. package/dist/hooks/index.js.map +1 -0
  27. package/dist/index.d.ts +1012 -0
  28. package/dist/index.js +843 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/magic-string.es-J7BYFTTJ.js +1307 -0
  31. package/dist/magic-string.es-J7BYFTTJ.js.map +1 -0
  32. package/dist/providers/index.d.ts +90 -0
  33. package/dist/providers/index.js +5 -0
  34. package/dist/providers/index.js.map +1 -0
  35. package/dist/schemas/index.d.ts +206 -0
  36. package/dist/schemas/index.js +262 -0
  37. package/dist/schemas/index.js.map +1 -0
  38. package/dist/thing-DtI25yZh.d.ts +902 -0
  39. package/dist/types/index.d.ts +7681 -0
  40. package/dist/types/index.js +5 -0
  41. package/dist/types/index.js.map +1 -0
  42. package/package.json +94 -0
@@ -0,0 +1,902 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Thing Zod Schemas - Semantic Entity Management
5
+ *
6
+ * Things are the core entities in the .do platform, stored in the Things table
7
+ * with ClickHouse's ReplacingMergeTree engine for immutable, versioned storage.
8
+ *
9
+ * All types are derived from Zod schemas to ensure a single source of truth.
10
+ *
11
+ * @remarks
12
+ * Key patterns:
13
+ * - Semantic IDs: `[namespace]/[Name]` (e.g., `schema.org/Person`)
14
+ * - JSON-LD compatible data structure
15
+ * - Full version history via Events table
16
+ * - Soft deletes with deletedAt timestamp
17
+ */
18
+
19
+ /**
20
+ * Schema for ThingData - JSON-LD compatible data structure for Things.
21
+ */
22
+ declare const ThingDataSchema: z.ZodObject<{
23
+ /** JSON-LD context */
24
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
25
+ /** JSON-LD type (should match Thing.type) */
26
+ '@type': z.ZodOptional<z.ZodString>;
27
+ /** JSON-LD identifier */
28
+ '@id': z.ZodOptional<z.ZodString>;
29
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
30
+ /** JSON-LD context */
31
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
32
+ /** JSON-LD type (should match Thing.type) */
33
+ '@type': z.ZodOptional<z.ZodString>;
34
+ /** JSON-LD identifier */
35
+ '@id': z.ZodOptional<z.ZodString>;
36
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
37
+ /** JSON-LD context */
38
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
39
+ /** JSON-LD type (should match Thing.type) */
40
+ '@type': z.ZodOptional<z.ZodString>;
41
+ /** JSON-LD identifier */
42
+ '@id': z.ZodOptional<z.ZodString>;
43
+ }, z.ZodTypeAny, "passthrough">>;
44
+ /**
45
+ * JSON-LD compatible data structure for Things.
46
+ */
47
+ type ThingData = z.infer<typeof ThingDataSchema>;
48
+ /**
49
+ * Schema for Thing - base Thing record from database.
50
+ */
51
+ declare const ThingSchema: z.ZodObject<{
52
+ /** Namespace (tenant/domain) */
53
+ ns: z.ZodString;
54
+ /** Entity type (e.g., 'Person', 'Organization', 'Agent') */
55
+ type: z.ZodString;
56
+ /** Unique identifier within namespace/type */
57
+ id: z.ZodString;
58
+ /** Version timestamp for deduplication */
59
+ ts: z.ZodDate;
60
+ /** Display name */
61
+ name: z.ZodString;
62
+ /** Creation timestamp */
63
+ createdAt: z.ZodDate;
64
+ /** Last update timestamp */
65
+ updatedAt: z.ZodDate;
66
+ /** Creator user ID */
67
+ createdBy: z.ZodOptional<z.ZodString>;
68
+ /** Last updater user ID */
69
+ updatedBy: z.ZodOptional<z.ZodString>;
70
+ /** Soft delete timestamp */
71
+ deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodNull]>>;
72
+ /** A/B test variant */
73
+ variant: z.ZodOptional<z.ZodString>;
74
+ /** JSON-LD data blob */
75
+ data: z.ZodObject<{
76
+ /** JSON-LD context */
77
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
78
+ /** JSON-LD type (should match Thing.type) */
79
+ '@type': z.ZodOptional<z.ZodString>;
80
+ /** JSON-LD identifier */
81
+ '@id': z.ZodOptional<z.ZodString>;
82
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83
+ /** JSON-LD context */
84
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
85
+ /** JSON-LD type (should match Thing.type) */
86
+ '@type': z.ZodOptional<z.ZodString>;
87
+ /** JSON-LD identifier */
88
+ '@id': z.ZodOptional<z.ZodString>;
89
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
90
+ /** JSON-LD context */
91
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
92
+ /** JSON-LD type (should match Thing.type) */
93
+ '@type': z.ZodOptional<z.ZodString>;
94
+ /** JSON-LD identifier */
95
+ '@id': z.ZodOptional<z.ZodString>;
96
+ }, z.ZodTypeAny, "passthrough">>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ type: string;
99
+ ns: string;
100
+ id: string;
101
+ name: string;
102
+ data: {
103
+ '@context'?: string | Record<string, unknown> | undefined;
104
+ '@type'?: string | undefined;
105
+ '@id'?: string | undefined;
106
+ } & {
107
+ [k: string]: unknown;
108
+ };
109
+ ts: Date;
110
+ createdAt: Date;
111
+ updatedAt: Date;
112
+ createdBy?: string | undefined;
113
+ updatedBy?: string | undefined;
114
+ deletedAt?: Date | null | undefined;
115
+ variant?: string | undefined;
116
+ }, {
117
+ type: string;
118
+ ns: string;
119
+ id: string;
120
+ name: string;
121
+ data: {
122
+ '@context'?: string | Record<string, unknown> | undefined;
123
+ '@type'?: string | undefined;
124
+ '@id'?: string | undefined;
125
+ } & {
126
+ [k: string]: unknown;
127
+ };
128
+ ts: Date;
129
+ createdAt: Date;
130
+ updatedAt: Date;
131
+ createdBy?: string | undefined;
132
+ updatedBy?: string | undefined;
133
+ deletedAt?: Date | null | undefined;
134
+ variant?: string | undefined;
135
+ }>;
136
+ /**
137
+ * Base Thing record from database.
138
+ */
139
+ type Thing = z.infer<typeof ThingSchema>;
140
+ /**
141
+ * Schema for ThingFilter - query filters for Things.
142
+ */
143
+ declare const ThingFilterSchema: z.ZodObject<{
144
+ /** Filter by namespace - single string or array of strings */
145
+ ns: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
146
+ /** Filter by type - single string or array of strings */
147
+ type: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
148
+ /** Filter by ID pattern (supports wildcards) */
149
+ idPattern: z.ZodOptional<z.ZodString>;
150
+ /** Filter by name (case-insensitive search) */
151
+ nameSearch: z.ZodOptional<z.ZodString>;
152
+ /** Filter by creation date range - start */
153
+ createdAfter: z.ZodOptional<z.ZodDate>;
154
+ /** Filter by creation date range - end */
155
+ createdBefore: z.ZodOptional<z.ZodDate>;
156
+ /** Filter by update date range - start */
157
+ updatedAfter: z.ZodOptional<z.ZodDate>;
158
+ /** Filter by update date range - end */
159
+ updatedBefore: z.ZodOptional<z.ZodDate>;
160
+ /** Include soft-deleted things */
161
+ includeDeleted: z.ZodOptional<z.ZodBoolean>;
162
+ /** Filter by specific property values in data */
163
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
164
+ /** Filter by variant */
165
+ variant: z.ZodOptional<z.ZodString>;
166
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
167
+ /** Filter by namespace - single string or array of strings */
168
+ ns: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
169
+ /** Filter by type - single string or array of strings */
170
+ type: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
171
+ /** Filter by ID pattern (supports wildcards) */
172
+ idPattern: z.ZodOptional<z.ZodString>;
173
+ /** Filter by name (case-insensitive search) */
174
+ nameSearch: z.ZodOptional<z.ZodString>;
175
+ /** Filter by creation date range - start */
176
+ createdAfter: z.ZodOptional<z.ZodDate>;
177
+ /** Filter by creation date range - end */
178
+ createdBefore: z.ZodOptional<z.ZodDate>;
179
+ /** Filter by update date range - start */
180
+ updatedAfter: z.ZodOptional<z.ZodDate>;
181
+ /** Filter by update date range - end */
182
+ updatedBefore: z.ZodOptional<z.ZodDate>;
183
+ /** Include soft-deleted things */
184
+ includeDeleted: z.ZodOptional<z.ZodBoolean>;
185
+ /** Filter by specific property values in data */
186
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
187
+ /** Filter by variant */
188
+ variant: z.ZodOptional<z.ZodString>;
189
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
190
+ /** Filter by namespace - single string or array of strings */
191
+ ns: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
192
+ /** Filter by type - single string or array of strings */
193
+ type: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
194
+ /** Filter by ID pattern (supports wildcards) */
195
+ idPattern: z.ZodOptional<z.ZodString>;
196
+ /** Filter by name (case-insensitive search) */
197
+ nameSearch: z.ZodOptional<z.ZodString>;
198
+ /** Filter by creation date range - start */
199
+ createdAfter: z.ZodOptional<z.ZodDate>;
200
+ /** Filter by creation date range - end */
201
+ createdBefore: z.ZodOptional<z.ZodDate>;
202
+ /** Filter by update date range - start */
203
+ updatedAfter: z.ZodOptional<z.ZodDate>;
204
+ /** Filter by update date range - end */
205
+ updatedBefore: z.ZodOptional<z.ZodDate>;
206
+ /** Include soft-deleted things */
207
+ includeDeleted: z.ZodOptional<z.ZodBoolean>;
208
+ /** Filter by specific property values in data */
209
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
210
+ /** Filter by variant */
211
+ variant: z.ZodOptional<z.ZodString>;
212
+ }, z.ZodTypeAny, "passthrough">>;
213
+ /**
214
+ * Query filters for Things.
215
+ */
216
+ type ThingFilter = z.infer<typeof ThingFilterSchema>;
217
+ /**
218
+ * Schema for ThingSort - sort options for Things.
219
+ */
220
+ declare const ThingSortSchema: z.ZodObject<{
221
+ /** Field to sort by */
222
+ field: z.ZodEnum<["name", "createdAt", "updatedAt", "ts", "type"]>;
223
+ /** Sort direction */
224
+ order: z.ZodEnum<["asc", "desc"]>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ field: "type" | "name" | "ts" | "createdAt" | "updatedAt";
227
+ order: "asc" | "desc";
228
+ }, {
229
+ field: "type" | "name" | "ts" | "createdAt" | "updatedAt";
230
+ order: "asc" | "desc";
231
+ }>;
232
+ /**
233
+ * Sort options for Things.
234
+ */
235
+ type ThingSort = z.infer<typeof ThingSortSchema>;
236
+ /**
237
+ * Schema for ThingPagination - pagination for Things queries.
238
+ */
239
+ declare const ThingPaginationSchema: z.ZodObject<{
240
+ /** Page number (1-indexed, must be positive) */
241
+ page: z.ZodNumber;
242
+ /** Items per page (must be positive, max 1000) */
243
+ perPage: z.ZodNumber;
244
+ }, "strip", z.ZodTypeAny, {
245
+ page: number;
246
+ perPage: number;
247
+ }, {
248
+ page: number;
249
+ perPage: number;
250
+ }>;
251
+ /**
252
+ * Pagination for Things queries.
253
+ */
254
+ type ThingPagination = z.infer<typeof ThingPaginationSchema>;
255
+ /**
256
+ * Schema for ThingQueryResult - result of a Things query.
257
+ */
258
+ declare const ThingQueryResultSchema: z.ZodObject<{
259
+ /** Matching things */
260
+ data: z.ZodArray<z.ZodObject<{
261
+ /** Namespace (tenant/domain) */
262
+ ns: z.ZodString;
263
+ /** Entity type (e.g., 'Person', 'Organization', 'Agent') */
264
+ type: z.ZodString;
265
+ /** Unique identifier within namespace/type */
266
+ id: z.ZodString;
267
+ /** Version timestamp for deduplication */
268
+ ts: z.ZodDate;
269
+ /** Display name */
270
+ name: z.ZodString;
271
+ /** Creation timestamp */
272
+ createdAt: z.ZodDate;
273
+ /** Last update timestamp */
274
+ updatedAt: z.ZodDate;
275
+ /** Creator user ID */
276
+ createdBy: z.ZodOptional<z.ZodString>;
277
+ /** Last updater user ID */
278
+ updatedBy: z.ZodOptional<z.ZodString>;
279
+ /** Soft delete timestamp */
280
+ deletedAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodNull]>>;
281
+ /** A/B test variant */
282
+ variant: z.ZodOptional<z.ZodString>;
283
+ /** JSON-LD data blob */
284
+ data: z.ZodObject<{
285
+ /** JSON-LD context */
286
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
287
+ /** JSON-LD type (should match Thing.type) */
288
+ '@type': z.ZodOptional<z.ZodString>;
289
+ /** JSON-LD identifier */
290
+ '@id': z.ZodOptional<z.ZodString>;
291
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
292
+ /** JSON-LD context */
293
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
294
+ /** JSON-LD type (should match Thing.type) */
295
+ '@type': z.ZodOptional<z.ZodString>;
296
+ /** JSON-LD identifier */
297
+ '@id': z.ZodOptional<z.ZodString>;
298
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
299
+ /** JSON-LD context */
300
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
301
+ /** JSON-LD type (should match Thing.type) */
302
+ '@type': z.ZodOptional<z.ZodString>;
303
+ /** JSON-LD identifier */
304
+ '@id': z.ZodOptional<z.ZodString>;
305
+ }, z.ZodTypeAny, "passthrough">>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ type: string;
308
+ ns: string;
309
+ id: string;
310
+ name: string;
311
+ data: {
312
+ '@context'?: string | Record<string, unknown> | undefined;
313
+ '@type'?: string | undefined;
314
+ '@id'?: string | undefined;
315
+ } & {
316
+ [k: string]: unknown;
317
+ };
318
+ ts: Date;
319
+ createdAt: Date;
320
+ updatedAt: Date;
321
+ createdBy?: string | undefined;
322
+ updatedBy?: string | undefined;
323
+ deletedAt?: Date | null | undefined;
324
+ variant?: string | undefined;
325
+ }, {
326
+ type: string;
327
+ ns: string;
328
+ id: string;
329
+ name: string;
330
+ data: {
331
+ '@context'?: string | Record<string, unknown> | undefined;
332
+ '@type'?: string | undefined;
333
+ '@id'?: string | undefined;
334
+ } & {
335
+ [k: string]: unknown;
336
+ };
337
+ ts: Date;
338
+ createdAt: Date;
339
+ updatedAt: Date;
340
+ createdBy?: string | undefined;
341
+ updatedBy?: string | undefined;
342
+ deletedAt?: Date | null | undefined;
343
+ variant?: string | undefined;
344
+ }>, "many">;
345
+ /** Total count (without pagination) */
346
+ total: z.ZodNumber;
347
+ /** Current page */
348
+ page: z.ZodNumber;
349
+ /** Items per page */
350
+ perPage: z.ZodNumber;
351
+ /** Total pages */
352
+ totalPages: z.ZodNumber;
353
+ }, "strip", z.ZodTypeAny, {
354
+ page: number;
355
+ perPage: number;
356
+ data: {
357
+ type: string;
358
+ ns: string;
359
+ id: string;
360
+ name: string;
361
+ data: {
362
+ '@context'?: string | Record<string, unknown> | undefined;
363
+ '@type'?: string | undefined;
364
+ '@id'?: string | undefined;
365
+ } & {
366
+ [k: string]: unknown;
367
+ };
368
+ ts: Date;
369
+ createdAt: Date;
370
+ updatedAt: Date;
371
+ createdBy?: string | undefined;
372
+ updatedBy?: string | undefined;
373
+ deletedAt?: Date | null | undefined;
374
+ variant?: string | undefined;
375
+ }[];
376
+ total: number;
377
+ totalPages: number;
378
+ }, {
379
+ page: number;
380
+ perPage: number;
381
+ data: {
382
+ type: string;
383
+ ns: string;
384
+ id: string;
385
+ name: string;
386
+ data: {
387
+ '@context'?: string | Record<string, unknown> | undefined;
388
+ '@type'?: string | undefined;
389
+ '@id'?: string | undefined;
390
+ } & {
391
+ [k: string]: unknown;
392
+ };
393
+ ts: Date;
394
+ createdAt: Date;
395
+ updatedAt: Date;
396
+ createdBy?: string | undefined;
397
+ updatedBy?: string | undefined;
398
+ deletedAt?: Date | null | undefined;
399
+ variant?: string | undefined;
400
+ }[];
401
+ total: number;
402
+ totalPages: number;
403
+ }>;
404
+ /**
405
+ * Result of a Things query.
406
+ */
407
+ type ThingQueryResult = z.infer<typeof ThingQueryResultSchema>;
408
+ /**
409
+ * Schema for ThingCreateInput - thing creation payload.
410
+ */
411
+ declare const ThingCreateInputSchema: z.ZodObject<{
412
+ /** Namespace (required, non-empty string) */
413
+ ns: z.ZodString;
414
+ /** Type (required, non-empty string) */
415
+ type: z.ZodString;
416
+ /** ID (optional, auto-generated if not provided) */
417
+ id: z.ZodOptional<z.ZodString>;
418
+ /** Display name (required, non-empty string) */
419
+ name: z.ZodString;
420
+ /** JSON-LD data */
421
+ data: z.ZodObject<{
422
+ /** JSON-LD context */
423
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
424
+ /** JSON-LD type (should match Thing.type) */
425
+ '@type': z.ZodOptional<z.ZodString>;
426
+ /** JSON-LD identifier */
427
+ '@id': z.ZodOptional<z.ZodString>;
428
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
429
+ /** JSON-LD context */
430
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
431
+ /** JSON-LD type (should match Thing.type) */
432
+ '@type': z.ZodOptional<z.ZodString>;
433
+ /** JSON-LD identifier */
434
+ '@id': z.ZodOptional<z.ZodString>;
435
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
436
+ /** JSON-LD context */
437
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
438
+ /** JSON-LD type (should match Thing.type) */
439
+ '@type': z.ZodOptional<z.ZodString>;
440
+ /** JSON-LD identifier */
441
+ '@id': z.ZodOptional<z.ZodString>;
442
+ }, z.ZodTypeAny, "passthrough">>;
443
+ /** Variant for A/B testing */
444
+ variant: z.ZodOptional<z.ZodString>;
445
+ }, "strip", z.ZodTypeAny, {
446
+ type: string;
447
+ ns: string;
448
+ name: string;
449
+ data: {
450
+ '@context'?: string | Record<string, unknown> | undefined;
451
+ '@type'?: string | undefined;
452
+ '@id'?: string | undefined;
453
+ } & {
454
+ [k: string]: unknown;
455
+ };
456
+ id?: string | undefined;
457
+ variant?: string | undefined;
458
+ }, {
459
+ type: string;
460
+ ns: string;
461
+ name: string;
462
+ data: {
463
+ '@context'?: string | Record<string, unknown> | undefined;
464
+ '@type'?: string | undefined;
465
+ '@id'?: string | undefined;
466
+ } & {
467
+ [k: string]: unknown;
468
+ };
469
+ id?: string | undefined;
470
+ variant?: string | undefined;
471
+ }>;
472
+ /**
473
+ * Thing creation payload.
474
+ */
475
+ type ThingCreateInput = z.infer<typeof ThingCreateInputSchema>;
476
+ /**
477
+ * Schema for ThingUpdateInput - thing update payload.
478
+ */
479
+ declare const ThingUpdateInputSchema: z.ZodObject<{
480
+ /** Updated name */
481
+ name: z.ZodOptional<z.ZodString>;
482
+ /** Updated data (merged with existing) */
483
+ data: z.ZodOptional<z.ZodObject<{
484
+ '@context': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
485
+ '@type': z.ZodOptional<z.ZodOptional<z.ZodString>>;
486
+ '@id': z.ZodOptional<z.ZodOptional<z.ZodString>>;
487
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
488
+ '@context': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
489
+ '@type': z.ZodOptional<z.ZodOptional<z.ZodString>>;
490
+ '@id': z.ZodOptional<z.ZodOptional<z.ZodString>>;
491
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
492
+ '@context': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
493
+ '@type': z.ZodOptional<z.ZodOptional<z.ZodString>>;
494
+ '@id': z.ZodOptional<z.ZodOptional<z.ZodString>>;
495
+ }, z.ZodTypeAny, "passthrough">>>;
496
+ /** Updated variant */
497
+ variant: z.ZodOptional<z.ZodString>;
498
+ }, "strip", z.ZodTypeAny, {
499
+ name?: string | undefined;
500
+ data?: z.objectOutputType<{
501
+ '@context': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
502
+ '@type': z.ZodOptional<z.ZodOptional<z.ZodString>>;
503
+ '@id': z.ZodOptional<z.ZodOptional<z.ZodString>>;
504
+ }, z.ZodTypeAny, "passthrough"> | undefined;
505
+ variant?: string | undefined;
506
+ }, {
507
+ name?: string | undefined;
508
+ data?: z.objectInputType<{
509
+ '@context': z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
510
+ '@type': z.ZodOptional<z.ZodOptional<z.ZodString>>;
511
+ '@id': z.ZodOptional<z.ZodOptional<z.ZodString>>;
512
+ }, z.ZodTypeAny, "passthrough"> | undefined;
513
+ variant?: string | undefined;
514
+ }>;
515
+ /**
516
+ * Thing update payload.
517
+ */
518
+ type ThingUpdateInput = z.infer<typeof ThingUpdateInputSchema>;
519
+ /**
520
+ * Schema for ThingDeleteOptions - delete options.
521
+ */
522
+ declare const ThingDeleteOptionsSchema: z.ZodObject<{
523
+ /** Hard delete (permanent) vs soft delete */
524
+ hard: z.ZodOptional<z.ZodBoolean>;
525
+ }, "strip", z.ZodTypeAny, {
526
+ hard?: boolean | undefined;
527
+ }, {
528
+ hard?: boolean | undefined;
529
+ }>;
530
+ /**
531
+ * Thing delete options.
532
+ */
533
+ type ThingDeleteOptions = z.infer<typeof ThingDeleteOptionsSchema>;
534
+ /**
535
+ * Schema for ThingVersion - thing version from Events table.
536
+ */
537
+ declare const ThingVersionSchema: z.ZodObject<{
538
+ /** Event ID */
539
+ eventId: z.ZodString;
540
+ /** Event type (create, update, delete) */
541
+ eventType: z.ZodEnum<["create", "update", "delete", "create_version", "update_version"]>;
542
+ /** Version timestamp */
543
+ ts: z.ZodDate;
544
+ /** User who made the change */
545
+ userId: z.ZodString;
546
+ /** Full data snapshot at this version */
547
+ data: z.ZodObject<{
548
+ /** JSON-LD context */
549
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
550
+ /** JSON-LD type (should match Thing.type) */
551
+ '@type': z.ZodOptional<z.ZodString>;
552
+ /** JSON-LD identifier */
553
+ '@id': z.ZodOptional<z.ZodString>;
554
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
555
+ /** JSON-LD context */
556
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
557
+ /** JSON-LD type (should match Thing.type) */
558
+ '@type': z.ZodOptional<z.ZodString>;
559
+ /** JSON-LD identifier */
560
+ '@id': z.ZodOptional<z.ZodString>;
561
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
562
+ /** JSON-LD context */
563
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
564
+ /** JSON-LD type (should match Thing.type) */
565
+ '@type': z.ZodOptional<z.ZodString>;
566
+ /** JSON-LD identifier */
567
+ '@id': z.ZodOptional<z.ZodString>;
568
+ }, z.ZodTypeAny, "passthrough">>;
569
+ /** Delta from previous version */
570
+ delta: z.ZodOptional<z.ZodObject<{
571
+ /** JSON-LD context */
572
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
573
+ /** JSON-LD type (should match Thing.type) */
574
+ '@type': z.ZodOptional<z.ZodString>;
575
+ /** JSON-LD identifier */
576
+ '@id': z.ZodOptional<z.ZodString>;
577
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
578
+ /** JSON-LD context */
579
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
580
+ /** JSON-LD type (should match Thing.type) */
581
+ '@type': z.ZodOptional<z.ZodString>;
582
+ /** JSON-LD identifier */
583
+ '@id': z.ZodOptional<z.ZodString>;
584
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
585
+ /** JSON-LD context */
586
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
587
+ /** JSON-LD type (should match Thing.type) */
588
+ '@type': z.ZodOptional<z.ZodString>;
589
+ /** JSON-LD identifier */
590
+ '@id': z.ZodOptional<z.ZodString>;
591
+ }, z.ZodTypeAny, "passthrough">>>;
592
+ /** Event metadata */
593
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
594
+ }, "strip", z.ZodTypeAny, {
595
+ data: {
596
+ '@context'?: string | Record<string, unknown> | undefined;
597
+ '@type'?: string | undefined;
598
+ '@id'?: string | undefined;
599
+ } & {
600
+ [k: string]: unknown;
601
+ };
602
+ ts: Date;
603
+ eventId: string;
604
+ eventType: "create" | "update" | "delete" | "create_version" | "update_version";
605
+ userId: string;
606
+ metadata: Record<string, unknown>;
607
+ delta?: z.objectOutputType<{
608
+ /** JSON-LD context */
609
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
610
+ /** JSON-LD type (should match Thing.type) */
611
+ '@type': z.ZodOptional<z.ZodString>;
612
+ /** JSON-LD identifier */
613
+ '@id': z.ZodOptional<z.ZodString>;
614
+ }, z.ZodTypeAny, "passthrough"> | undefined;
615
+ }, {
616
+ data: {
617
+ '@context'?: string | Record<string, unknown> | undefined;
618
+ '@type'?: string | undefined;
619
+ '@id'?: string | undefined;
620
+ } & {
621
+ [k: string]: unknown;
622
+ };
623
+ ts: Date;
624
+ eventId: string;
625
+ eventType: "create" | "update" | "delete" | "create_version" | "update_version";
626
+ userId: string;
627
+ metadata: Record<string, unknown>;
628
+ delta?: z.objectInputType<{
629
+ /** JSON-LD context */
630
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
631
+ /** JSON-LD type (should match Thing.type) */
632
+ '@type': z.ZodOptional<z.ZodString>;
633
+ /** JSON-LD identifier */
634
+ '@id': z.ZodOptional<z.ZodString>;
635
+ }, z.ZodTypeAny, "passthrough"> | undefined;
636
+ }>;
637
+ /**
638
+ * Thing version from Events table.
639
+ */
640
+ type ThingVersion = z.infer<typeof ThingVersionSchema>;
641
+ /**
642
+ * Schema for SemanticProperty - property definition for semantic types.
643
+ */
644
+ declare const SemanticPropertySchema: z.ZodObject<{
645
+ /** Property name */
646
+ name: z.ZodString;
647
+ /** Property label */
648
+ label: z.ZodString;
649
+ /** Property description */
650
+ description: z.ZodString;
651
+ /** Expected value types */
652
+ rangeIncludes: z.ZodArray<z.ZodString, "many">;
653
+ /** Types that use this property */
654
+ domainIncludes: z.ZodArray<z.ZodString, "many">;
655
+ /** Is this property required? */
656
+ required: z.ZodBoolean;
657
+ /** Is this property an array? */
658
+ isArray: z.ZodBoolean;
659
+ /** Default value */
660
+ defaultValue: z.ZodOptional<z.ZodUnknown>;
661
+ }, "strip", z.ZodTypeAny, {
662
+ name: string;
663
+ label: string;
664
+ description: string;
665
+ rangeIncludes: string[];
666
+ domainIncludes: string[];
667
+ required: boolean;
668
+ isArray: boolean;
669
+ defaultValue?: unknown;
670
+ }, {
671
+ name: string;
672
+ label: string;
673
+ description: string;
674
+ rangeIncludes: string[];
675
+ domainIncludes: string[];
676
+ required: boolean;
677
+ isArray: boolean;
678
+ defaultValue?: unknown;
679
+ }>;
680
+ /**
681
+ * Property definition for semantic types.
682
+ */
683
+ type SemanticProperty = z.infer<typeof SemanticPropertySchema>;
684
+ /**
685
+ * Schema for SemanticType - semantic type definition (like schema.org types).
686
+ */
687
+ declare const SemanticTypeSchema: z.ZodObject<{
688
+ /** Type namespace (e.g., 'schema.org') */
689
+ namespace: z.ZodString;
690
+ /** Type name (e.g., 'Person') */
691
+ name: z.ZodString;
692
+ /** Full semantic ID */
693
+ id: z.ZodString;
694
+ /** Human-readable label */
695
+ label: z.ZodString;
696
+ /** Type description */
697
+ description: z.ZodString;
698
+ /** Parent types (inheritance) */
699
+ parentTypes: z.ZodArray<z.ZodString, "many">;
700
+ /** Properties defined by this type */
701
+ properties: z.ZodArray<z.ZodObject<{
702
+ /** Property name */
703
+ name: z.ZodString;
704
+ /** Property label */
705
+ label: z.ZodString;
706
+ /** Property description */
707
+ description: z.ZodString;
708
+ /** Expected value types */
709
+ rangeIncludes: z.ZodArray<z.ZodString, "many">;
710
+ /** Types that use this property */
711
+ domainIncludes: z.ZodArray<z.ZodString, "many">;
712
+ /** Is this property required? */
713
+ required: z.ZodBoolean;
714
+ /** Is this property an array? */
715
+ isArray: z.ZodBoolean;
716
+ /** Default value */
717
+ defaultValue: z.ZodOptional<z.ZodUnknown>;
718
+ }, "strip", z.ZodTypeAny, {
719
+ name: string;
720
+ label: string;
721
+ description: string;
722
+ rangeIncludes: string[];
723
+ domainIncludes: string[];
724
+ required: boolean;
725
+ isArray: boolean;
726
+ defaultValue?: unknown;
727
+ }, {
728
+ name: string;
729
+ label: string;
730
+ description: string;
731
+ rangeIncludes: string[];
732
+ domainIncludes: string[];
733
+ required: boolean;
734
+ isArray: boolean;
735
+ defaultValue?: unknown;
736
+ }>, "many">;
737
+ /** Child types */
738
+ subtypes: z.ZodArray<z.ZodString, "many">;
739
+ /** Example instances */
740
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
741
+ /** JSON-LD context */
742
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
743
+ /** JSON-LD type (should match Thing.type) */
744
+ '@type': z.ZodOptional<z.ZodString>;
745
+ /** JSON-LD identifier */
746
+ '@id': z.ZodOptional<z.ZodString>;
747
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
748
+ /** JSON-LD context */
749
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
750
+ /** JSON-LD type (should match Thing.type) */
751
+ '@type': z.ZodOptional<z.ZodString>;
752
+ /** JSON-LD identifier */
753
+ '@id': z.ZodOptional<z.ZodString>;
754
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
755
+ /** JSON-LD context */
756
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
757
+ /** JSON-LD type (should match Thing.type) */
758
+ '@type': z.ZodOptional<z.ZodString>;
759
+ /** JSON-LD identifier */
760
+ '@id': z.ZodOptional<z.ZodString>;
761
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
762
+ }, "strip", z.ZodTypeAny, {
763
+ id: string;
764
+ name: string;
765
+ properties: {
766
+ name: string;
767
+ label: string;
768
+ description: string;
769
+ rangeIncludes: string[];
770
+ domainIncludes: string[];
771
+ required: boolean;
772
+ isArray: boolean;
773
+ defaultValue?: unknown;
774
+ }[];
775
+ label: string;
776
+ description: string;
777
+ namespace: string;
778
+ parentTypes: string[];
779
+ subtypes: string[];
780
+ examples?: z.objectOutputType<{
781
+ /** JSON-LD context */
782
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
783
+ /** JSON-LD type (should match Thing.type) */
784
+ '@type': z.ZodOptional<z.ZodString>;
785
+ /** JSON-LD identifier */
786
+ '@id': z.ZodOptional<z.ZodString>;
787
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
788
+ }, {
789
+ id: string;
790
+ name: string;
791
+ properties: {
792
+ name: string;
793
+ label: string;
794
+ description: string;
795
+ rangeIncludes: string[];
796
+ domainIncludes: string[];
797
+ required: boolean;
798
+ isArray: boolean;
799
+ defaultValue?: unknown;
800
+ }[];
801
+ label: string;
802
+ description: string;
803
+ namespace: string;
804
+ parentTypes: string[];
805
+ subtypes: string[];
806
+ examples?: z.objectInputType<{
807
+ /** JSON-LD context */
808
+ '@context': z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
809
+ /** JSON-LD type (should match Thing.type) */
810
+ '@type': z.ZodOptional<z.ZodString>;
811
+ /** JSON-LD identifier */
812
+ '@id': z.ZodOptional<z.ZodString>;
813
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
814
+ }>;
815
+ /**
816
+ * Semantic type definition (like schema.org types).
817
+ */
818
+ type SemanticType = z.infer<typeof SemanticTypeSchema>;
819
+ /**
820
+ * Schema for Namespace - namespace definition (tenant/domain).
821
+ */
822
+ declare const NamespaceSchema: z.ZodObject<{
823
+ /** Namespace identifier */
824
+ id: z.ZodString;
825
+ /** Namespace name */
826
+ name: z.ZodString;
827
+ /** Namespace description */
828
+ description: z.ZodOptional<z.ZodString>;
829
+ /** Base URL for the namespace */
830
+ baseUrl: z.ZodOptional<z.ZodString>;
831
+ /** Available types in this namespace */
832
+ types: z.ZodArray<z.ZodString, "many">;
833
+ /** Thing count in this namespace */
834
+ thingCount: z.ZodNumber;
835
+ /** Creation timestamp */
836
+ createdAt: z.ZodDate;
837
+ }, "strip", z.ZodTypeAny, {
838
+ id: string;
839
+ name: string;
840
+ createdAt: Date;
841
+ types: string[];
842
+ thingCount: number;
843
+ description?: string | undefined;
844
+ baseUrl?: string | undefined;
845
+ }, {
846
+ id: string;
847
+ name: string;
848
+ createdAt: Date;
849
+ types: string[];
850
+ thingCount: number;
851
+ description?: string | undefined;
852
+ baseUrl?: string | undefined;
853
+ }>;
854
+ /**
855
+ * Namespace definition (tenant/domain).
856
+ */
857
+ type Namespace = z.infer<typeof NamespaceSchema>;
858
+ /**
859
+ * Schema for TypeStats - statistics for a type.
860
+ */
861
+ declare const TypeStatsSchema: z.ZodObject<{
862
+ /** Type name */
863
+ type: z.ZodString;
864
+ /** Namespace */
865
+ ns: z.ZodString;
866
+ /** Total count */
867
+ count: z.ZodNumber;
868
+ /** Active count (not deleted) */
869
+ activeCount: z.ZodNumber;
870
+ /** Created today */
871
+ createdToday: z.ZodNumber;
872
+ /** Updated today */
873
+ updatedToday: z.ZodNumber;
874
+ /** Most recent creation */
875
+ lastCreatedAt: z.ZodOptional<z.ZodDate>;
876
+ /** Most recent update */
877
+ lastUpdatedAt: z.ZodOptional<z.ZodDate>;
878
+ }, "strip", z.ZodTypeAny, {
879
+ type: string;
880
+ ns: string;
881
+ count: number;
882
+ activeCount: number;
883
+ createdToday: number;
884
+ updatedToday: number;
885
+ lastCreatedAt?: Date | undefined;
886
+ lastUpdatedAt?: Date | undefined;
887
+ }, {
888
+ type: string;
889
+ ns: string;
890
+ count: number;
891
+ activeCount: number;
892
+ createdToday: number;
893
+ updatedToday: number;
894
+ lastCreatedAt?: Date | undefined;
895
+ lastUpdatedAt?: Date | undefined;
896
+ }>;
897
+ /**
898
+ * Statistics for a type.
899
+ */
900
+ type TypeStats = z.infer<typeof TypeStatsSchema>;
901
+
902
+ export { type Namespace as N, type SemanticType as S, type Thing as T, type ThingQueryResult as a, type ThingCreateInput as b, type ThingFilter as c, type ThingSort as d, type ThingPagination as e, type ThingData as f, type SemanticProperty as g, type ThingUpdateInput as h, type ThingDeleteOptions as i, type ThingVersion as j, type TypeStats as k, ThingDataSchema as l, ThingSchema as m, ThingFilterSchema as n, ThingSortSchema as o, ThingPaginationSchema as p, ThingQueryResultSchema as q, ThingCreateInputSchema as r, ThingUpdateInputSchema as s, ThingDeleteOptionsSchema as t, ThingVersionSchema as u, SemanticPropertySchema as v, SemanticTypeSchema as w, NamespaceSchema as x, TypeStatsSchema as y };