p1-polymorph-studio 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,895 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const LexConfigSchema: z.ZodObject<{
4
+ $schema: z.ZodOptional<z.ZodString>;
5
+ version: z.ZodNumber;
6
+ name: z.ZodString;
7
+ projectId: z.ZodString;
8
+ tokens: z.ZodOptional<z.ZodObject<{
9
+ source: z.ZodString;
10
+ css: z.ZodString;
11
+ overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ source: string;
14
+ css: string;
15
+ overrides?: Record<string, unknown> | undefined;
16
+ }, {
17
+ source: string;
18
+ css: string;
19
+ overrides?: Record<string, unknown> | undefined;
20
+ }>>;
21
+ kuds: z.ZodOptional<z.ZodObject<{
22
+ typesFile: z.ZodString;
23
+ componentsDir: z.ZodString;
24
+ registry: z.ZodDefault<z.ZodString>;
25
+ autoSync: z.ZodDefault<z.ZodBoolean>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ typesFile: string;
28
+ componentsDir: string;
29
+ registry: string;
30
+ autoSync: boolean;
31
+ }, {
32
+ typesFile: string;
33
+ componentsDir: string;
34
+ registry?: string | undefined;
35
+ autoSync?: boolean | undefined;
36
+ }>>;
37
+ figma: z.ZodOptional<z.ZodObject<{
38
+ fileKey: z.ZodString;
39
+ variableCollections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ fileKey: string;
42
+ variableCollections?: string[] | undefined;
43
+ }, {
44
+ fileKey: string;
45
+ variableCollections?: string[] | undefined;
46
+ }>>;
47
+ api: z.ZodOptional<z.ZodObject<{
48
+ baseUrl: z.ZodString;
49
+ token: z.ZodString;
50
+ routes: z.ZodDefault<z.ZodString>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ baseUrl: string;
53
+ token: string;
54
+ routes: string;
55
+ }, {
56
+ baseUrl: string;
57
+ token: string;
58
+ routes?: string | undefined;
59
+ }>>;
60
+ github: z.ZodOptional<z.ZodObject<{
61
+ repo: z.ZodString;
62
+ branchPrefix: z.ZodOptional<z.ZodString>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ repo: string;
65
+ branchPrefix?: string | undefined;
66
+ }, {
67
+ repo: string;
68
+ branchPrefix?: string | undefined;
69
+ }>>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ version: number;
72
+ name: string;
73
+ projectId: string;
74
+ $schema?: string | undefined;
75
+ tokens?: {
76
+ source: string;
77
+ css: string;
78
+ overrides?: Record<string, unknown> | undefined;
79
+ } | undefined;
80
+ kuds?: {
81
+ typesFile: string;
82
+ componentsDir: string;
83
+ registry: string;
84
+ autoSync: boolean;
85
+ } | undefined;
86
+ figma?: {
87
+ fileKey: string;
88
+ variableCollections?: string[] | undefined;
89
+ } | undefined;
90
+ api?: {
91
+ baseUrl: string;
92
+ token: string;
93
+ routes: string;
94
+ } | undefined;
95
+ github?: {
96
+ repo: string;
97
+ branchPrefix?: string | undefined;
98
+ } | undefined;
99
+ }, {
100
+ version: number;
101
+ name: string;
102
+ projectId: string;
103
+ $schema?: string | undefined;
104
+ tokens?: {
105
+ source: string;
106
+ css: string;
107
+ overrides?: Record<string, unknown> | undefined;
108
+ } | undefined;
109
+ kuds?: {
110
+ typesFile: string;
111
+ componentsDir: string;
112
+ registry?: string | undefined;
113
+ autoSync?: boolean | undefined;
114
+ } | undefined;
115
+ figma?: {
116
+ fileKey: string;
117
+ variableCollections?: string[] | undefined;
118
+ } | undefined;
119
+ api?: {
120
+ baseUrl: string;
121
+ token: string;
122
+ routes?: string | undefined;
123
+ } | undefined;
124
+ github?: {
125
+ repo: string;
126
+ branchPrefix?: string | undefined;
127
+ } | undefined;
128
+ }>;
129
+ type LexConfig = z.infer<typeof LexConfigSchema>;
130
+ declare const LexClientOptionsSchema: z.ZodObject<{
131
+ baseUrl: z.ZodString;
132
+ token: z.ZodString;
133
+ projectId: z.ZodString;
134
+ fetch: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ projectId: string;
137
+ baseUrl: string;
138
+ token: string;
139
+ fetch?: ((...args: unknown[]) => unknown) | undefined;
140
+ }, {
141
+ projectId: string;
142
+ baseUrl: string;
143
+ token: string;
144
+ fetch?: ((...args: unknown[]) => unknown) | undefined;
145
+ }>;
146
+ interface LexClientOptions {
147
+ baseUrl: string;
148
+ token: string;
149
+ projectId: string;
150
+ fetch?: typeof globalThis.fetch;
151
+ }
152
+
153
+ declare const KUDFieldTypeSchema: z.ZodEnum<["string", "text", "number", "boolean", "image", "link", "array", "object"]>;
154
+ type KUDFieldType = z.infer<typeof KUDFieldTypeSchema>;
155
+ declare const KUDFieldDefSchema: z.ZodType<KUDFieldDef>;
156
+ interface KUDFieldDef {
157
+ type: KUDFieldType;
158
+ required?: boolean;
159
+ description?: string;
160
+ items?: KUDFieldDef;
161
+ properties?: Record<string, KUDFieldDef>;
162
+ }
163
+ declare const KUDSchema: z.ZodObject<{
164
+ id: z.ZodString;
165
+ projectId: z.ZodString;
166
+ type: z.ZodString;
167
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
168
+ version: z.ZodDefault<z.ZodNumber>;
169
+ schema: z.ZodRecord<z.ZodString, z.ZodType<KUDFieldDef, z.ZodTypeDef, KUDFieldDef>>;
170
+ defaultKuiId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
171
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
172
+ createdAt: z.ZodString;
173
+ updatedAt: z.ZodString;
174
+ }, "strip", z.ZodTypeAny, {
175
+ version: number;
176
+ projectId: string;
177
+ type: string;
178
+ id: string;
179
+ schema: Record<string, KUDFieldDef>;
180
+ createdAt: string;
181
+ updatedAt: string;
182
+ label?: string | null | undefined;
183
+ defaultKuiId?: string | null | undefined;
184
+ metadata?: Record<string, unknown> | null | undefined;
185
+ }, {
186
+ projectId: string;
187
+ type: string;
188
+ id: string;
189
+ schema: Record<string, KUDFieldDef>;
190
+ createdAt: string;
191
+ updatedAt: string;
192
+ version?: number | undefined;
193
+ label?: string | null | undefined;
194
+ defaultKuiId?: string | null | undefined;
195
+ metadata?: Record<string, unknown> | null | undefined;
196
+ }>;
197
+ type KUD = z.infer<typeof KUDSchema>;
198
+ declare const CreateKUDInputSchema: z.ZodObject<{
199
+ type: z.ZodString;
200
+ label: z.ZodOptional<z.ZodString>;
201
+ schema: z.ZodRecord<z.ZodString, z.ZodType<KUDFieldDef, z.ZodTypeDef, KUDFieldDef>>;
202
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
203
+ }, "strip", z.ZodTypeAny, {
204
+ type: string;
205
+ schema: Record<string, KUDFieldDef>;
206
+ label?: string | undefined;
207
+ metadata?: Record<string, unknown> | undefined;
208
+ }, {
209
+ type: string;
210
+ schema: Record<string, KUDFieldDef>;
211
+ label?: string | undefined;
212
+ metadata?: Record<string, unknown> | undefined;
213
+ }>;
214
+ type CreateKUDInput = z.infer<typeof CreateKUDInputSchema>;
215
+ declare const UpdateKUDInputSchema: z.ZodObject<{
216
+ label: z.ZodOptional<z.ZodString>;
217
+ schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<KUDFieldDef, z.ZodTypeDef, KUDFieldDef>>>;
218
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ label?: string | undefined;
221
+ schema?: Record<string, KUDFieldDef> | undefined;
222
+ metadata?: Record<string, unknown> | undefined;
223
+ }, {
224
+ label?: string | undefined;
225
+ schema?: Record<string, KUDFieldDef> | undefined;
226
+ metadata?: Record<string, unknown> | undefined;
227
+ }>;
228
+ type UpdateKUDInput = z.infer<typeof UpdateKUDInputSchema>;
229
+
230
+ interface SyncResult {
231
+ created: number;
232
+ updated: number;
233
+ deleted: number;
234
+ unchanged: number;
235
+ }
236
+ interface KudsClient {
237
+ list(): Promise<KUD[]>;
238
+ getByType(type: string): Promise<KUD | null>;
239
+ create(input: CreateKUDInput): Promise<KUD>;
240
+ update(id: string, input: UpdateKUDInput): Promise<KUD>;
241
+ delete(id: string): Promise<void>;
242
+ syncFromRegistry(registryPath: string): Promise<SyncResult>;
243
+ syncToRegistry(registryPath: string): Promise<void>;
244
+ }
245
+
246
+ declare const IntentVectorSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
247
+ type IntentVector = z.infer<typeof IntentVectorSchema>;
248
+ declare const KUIStatusSchema: z.ZodEnum<["draft", "published", "archived"]>;
249
+ type KUIStatus = z.infer<typeof KUIStatusSchema>;
250
+ declare const KUISchema: z.ZodObject<{
251
+ id: z.ZodString;
252
+ kudId: z.ZodString;
253
+ kudType: z.ZodString;
254
+ projectId: z.ZodString;
255
+ locale: z.ZodDefault<z.ZodString>;
256
+ intentAffinity: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
257
+ intentVelocity: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
258
+ priority: z.ZodDefault<z.ZodNumber>;
259
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
260
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
261
+ status: z.ZodDefault<z.ZodEnum<["draft", "published", "archived"]>>;
262
+ createdAt: z.ZodString;
263
+ updatedAt: z.ZodString;
264
+ }, "strip", z.ZodTypeAny, {
265
+ projectId: string;
266
+ status: "draft" | "published" | "archived";
267
+ id: string;
268
+ createdAt: string;
269
+ updatedAt: string;
270
+ kudId: string;
271
+ kudType: string;
272
+ locale: string;
273
+ intentAffinity: [number, number, number, number, number];
274
+ priority: number;
275
+ content: Record<string, unknown>;
276
+ metadata?: Record<string, unknown> | null | undefined;
277
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
278
+ }, {
279
+ projectId: string;
280
+ id: string;
281
+ createdAt: string;
282
+ updatedAt: string;
283
+ kudId: string;
284
+ kudType: string;
285
+ intentAffinity: [number, number, number, number, number];
286
+ content: Record<string, unknown>;
287
+ status?: "draft" | "published" | "archived" | undefined;
288
+ metadata?: Record<string, unknown> | null | undefined;
289
+ locale?: string | undefined;
290
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
291
+ priority?: number | undefined;
292
+ }>;
293
+ type KUI = z.infer<typeof KUISchema>;
294
+ declare const CreateKUIInputSchema: z.ZodObject<{
295
+ kudType: z.ZodString;
296
+ locale: z.ZodDefault<z.ZodString>;
297
+ intentAffinity: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
298
+ intentVelocity: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
299
+ priority: z.ZodDefault<z.ZodNumber>;
300
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
301
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
302
+ }, "strip", z.ZodTypeAny, {
303
+ kudType: string;
304
+ locale: string;
305
+ intentAffinity: [number, number, number, number, number];
306
+ priority: number;
307
+ content: Record<string, unknown>;
308
+ metadata?: Record<string, unknown> | undefined;
309
+ intentVelocity?: [number, number, number, number, number] | undefined;
310
+ }, {
311
+ kudType: string;
312
+ intentAffinity: [number, number, number, number, number];
313
+ content: Record<string, unknown>;
314
+ metadata?: Record<string, unknown> | undefined;
315
+ locale?: string | undefined;
316
+ intentVelocity?: [number, number, number, number, number] | undefined;
317
+ priority?: number | undefined;
318
+ }>;
319
+ type CreateKUIInput = z.infer<typeof CreateKUIInputSchema>;
320
+ declare const UpdateKUIInputSchema: z.ZodObject<{
321
+ locale: z.ZodOptional<z.ZodString>;
322
+ intentAffinity: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
323
+ intentVelocity: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
324
+ priority: z.ZodOptional<z.ZodNumber>;
325
+ content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
326
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
327
+ status: z.ZodOptional<z.ZodEnum<["draft", "published", "archived"]>>;
328
+ }, "strip", z.ZodTypeAny, {
329
+ status?: "draft" | "published" | "archived" | undefined;
330
+ metadata?: Record<string, unknown> | undefined;
331
+ locale?: string | undefined;
332
+ intentAffinity?: [number, number, number, number, number] | undefined;
333
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
334
+ priority?: number | undefined;
335
+ content?: Record<string, unknown> | undefined;
336
+ }, {
337
+ status?: "draft" | "published" | "archived" | undefined;
338
+ metadata?: Record<string, unknown> | undefined;
339
+ locale?: string | undefined;
340
+ intentAffinity?: [number, number, number, number, number] | undefined;
341
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
342
+ priority?: number | undefined;
343
+ content?: Record<string, unknown> | undefined;
344
+ }>;
345
+ type UpdateKUIInput = z.infer<typeof UpdateKUIInputSchema>;
346
+ declare const ResolveKUIInputSchema: z.ZodObject<{
347
+ kudType: z.ZodString;
348
+ intentVector: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
349
+ intentVelocity: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
350
+ velocityWeight: z.ZodDefault<z.ZodNumber>;
351
+ locale: z.ZodDefault<z.ZodString>;
352
+ }, "strip", z.ZodTypeAny, {
353
+ kudType: string;
354
+ locale: string;
355
+ intentVector: [number, number, number, number, number];
356
+ velocityWeight: number;
357
+ intentVelocity?: [number, number, number, number, number] | undefined;
358
+ }, {
359
+ kudType: string;
360
+ intentVector: [number, number, number, number, number];
361
+ locale?: string | undefined;
362
+ intentVelocity?: [number, number, number, number, number] | undefined;
363
+ velocityWeight?: number | undefined;
364
+ }>;
365
+ type ResolveKUIInput = z.infer<typeof ResolveKUIInputSchema>;
366
+ declare const ListKUIsFilterSchema: z.ZodObject<{
367
+ kudType: z.ZodOptional<z.ZodString>;
368
+ locale: z.ZodOptional<z.ZodString>;
369
+ status: z.ZodOptional<z.ZodEnum<["draft", "published", "archived"]>>;
370
+ intentStage: z.ZodOptional<z.ZodEnum<["awareness", "interest", "consideration", "decision", "evaluation"]>>;
371
+ }, "strip", z.ZodTypeAny, {
372
+ status?: "draft" | "published" | "archived" | undefined;
373
+ kudType?: string | undefined;
374
+ locale?: string | undefined;
375
+ intentStage?: "awareness" | "interest" | "consideration" | "decision" | "evaluation" | undefined;
376
+ }, {
377
+ status?: "draft" | "published" | "archived" | undefined;
378
+ kudType?: string | undefined;
379
+ locale?: string | undefined;
380
+ intentStage?: "awareness" | "interest" | "consideration" | "decision" | "evaluation" | undefined;
381
+ }>;
382
+ type ListKUIsFilter = z.infer<typeof ListKUIsFilterSchema>;
383
+
384
+ interface BulkImportResult {
385
+ created: number;
386
+ errors: Array<{
387
+ index: number;
388
+ error: string;
389
+ }>;
390
+ }
391
+ interface KuisClient {
392
+ list(filter?: ListKUIsFilter): Promise<KUI[]>;
393
+ resolve(input: ResolveKUIInput): Promise<KUI | null>;
394
+ create(input: CreateKUIInput): Promise<KUI>;
395
+ update(id: string, input: UpdateKUIInput): Promise<KUI>;
396
+ publish(id: string): Promise<KUI>;
397
+ archive(id: string): Promise<KUI>;
398
+ bulkImport(items: CreateKUIInput[]): Promise<BulkImportResult>;
399
+ }
400
+
401
+ declare const PageSlotSchema: z.ZodObject<{
402
+ slotId: z.ZodString;
403
+ kudId: z.ZodString;
404
+ required: z.ZodDefault<z.ZodBoolean>;
405
+ candidateKuiIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
406
+ }, "strip", z.ZodTypeAny, {
407
+ required: boolean;
408
+ kudId: string;
409
+ slotId: string;
410
+ candidateKuiIds?: string[] | undefined;
411
+ }, {
412
+ kudId: string;
413
+ slotId: string;
414
+ required?: boolean | undefined;
415
+ candidateKuiIds?: string[] | undefined;
416
+ }>;
417
+ type PageSlot = z.infer<typeof PageSlotSchema>;
418
+ declare const PageLayoutSchema: z.ZodObject<{
419
+ id: z.ZodString;
420
+ projectId: z.ZodString;
421
+ pageId: z.ZodString;
422
+ locale: z.ZodDefault<z.ZodString>;
423
+ slots: z.ZodArray<z.ZodObject<{
424
+ slotId: z.ZodString;
425
+ kudId: z.ZodString;
426
+ required: z.ZodDefault<z.ZodBoolean>;
427
+ candidateKuiIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
428
+ }, "strip", z.ZodTypeAny, {
429
+ required: boolean;
430
+ kudId: string;
431
+ slotId: string;
432
+ candidateKuiIds?: string[] | undefined;
433
+ }, {
434
+ kudId: string;
435
+ slotId: string;
436
+ required?: boolean | undefined;
437
+ candidateKuiIds?: string[] | undefined;
438
+ }>, "many">;
439
+ createdAt: z.ZodString;
440
+ updatedAt: z.ZodString;
441
+ }, "strip", z.ZodTypeAny, {
442
+ projectId: string;
443
+ id: string;
444
+ createdAt: string;
445
+ updatedAt: string;
446
+ locale: string;
447
+ pageId: string;
448
+ slots: {
449
+ required: boolean;
450
+ kudId: string;
451
+ slotId: string;
452
+ candidateKuiIds?: string[] | undefined;
453
+ }[];
454
+ }, {
455
+ projectId: string;
456
+ id: string;
457
+ createdAt: string;
458
+ updatedAt: string;
459
+ pageId: string;
460
+ slots: {
461
+ kudId: string;
462
+ slotId: string;
463
+ required?: boolean | undefined;
464
+ candidateKuiIds?: string[] | undefined;
465
+ }[];
466
+ locale?: string | undefined;
467
+ }>;
468
+ type PageLayout = z.infer<typeof PageLayoutSchema>;
469
+ declare const ResolvedSlotSchema: z.ZodObject<{
470
+ slotId: z.ZodString;
471
+ kui: z.ZodObject<{
472
+ id: z.ZodString;
473
+ kudId: z.ZodString;
474
+ kudType: z.ZodString;
475
+ projectId: z.ZodString;
476
+ locale: z.ZodDefault<z.ZodString>;
477
+ intentAffinity: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
478
+ intentVelocity: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
479
+ priority: z.ZodDefault<z.ZodNumber>;
480
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
481
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
482
+ status: z.ZodDefault<z.ZodEnum<["draft", "published", "archived"]>>;
483
+ createdAt: z.ZodString;
484
+ updatedAt: z.ZodString;
485
+ }, "strip", z.ZodTypeAny, {
486
+ projectId: string;
487
+ status: "draft" | "published" | "archived";
488
+ id: string;
489
+ createdAt: string;
490
+ updatedAt: string;
491
+ kudId: string;
492
+ kudType: string;
493
+ locale: string;
494
+ intentAffinity: [number, number, number, number, number];
495
+ priority: number;
496
+ content: Record<string, unknown>;
497
+ metadata?: Record<string, unknown> | null | undefined;
498
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
499
+ }, {
500
+ projectId: string;
501
+ id: string;
502
+ createdAt: string;
503
+ updatedAt: string;
504
+ kudId: string;
505
+ kudType: string;
506
+ intentAffinity: [number, number, number, number, number];
507
+ content: Record<string, unknown>;
508
+ status?: "draft" | "published" | "archived" | undefined;
509
+ metadata?: Record<string, unknown> | null | undefined;
510
+ locale?: string | undefined;
511
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
512
+ priority?: number | undefined;
513
+ }>;
514
+ score: z.ZodNumber;
515
+ }, "strip", z.ZodTypeAny, {
516
+ score: number;
517
+ slotId: string;
518
+ kui: {
519
+ projectId: string;
520
+ status: "draft" | "published" | "archived";
521
+ id: string;
522
+ createdAt: string;
523
+ updatedAt: string;
524
+ kudId: string;
525
+ kudType: string;
526
+ locale: string;
527
+ intentAffinity: [number, number, number, number, number];
528
+ priority: number;
529
+ content: Record<string, unknown>;
530
+ metadata?: Record<string, unknown> | null | undefined;
531
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
532
+ };
533
+ }, {
534
+ score: number;
535
+ slotId: string;
536
+ kui: {
537
+ projectId: string;
538
+ id: string;
539
+ createdAt: string;
540
+ updatedAt: string;
541
+ kudId: string;
542
+ kudType: string;
543
+ intentAffinity: [number, number, number, number, number];
544
+ content: Record<string, unknown>;
545
+ status?: "draft" | "published" | "archived" | undefined;
546
+ metadata?: Record<string, unknown> | null | undefined;
547
+ locale?: string | undefined;
548
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
549
+ priority?: number | undefined;
550
+ };
551
+ }>;
552
+ type ResolvedSlot = z.infer<typeof ResolvedSlotSchema>;
553
+ declare const ResolvedPageSchema: z.ZodObject<{
554
+ pageId: z.ZodString;
555
+ slots: z.ZodArray<z.ZodObject<{
556
+ slotId: z.ZodString;
557
+ kui: z.ZodObject<{
558
+ id: z.ZodString;
559
+ kudId: z.ZodString;
560
+ kudType: z.ZodString;
561
+ projectId: z.ZodString;
562
+ locale: z.ZodDefault<z.ZodString>;
563
+ intentAffinity: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
564
+ intentVelocity: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>>;
565
+ priority: z.ZodDefault<z.ZodNumber>;
566
+ content: z.ZodRecord<z.ZodString, z.ZodUnknown>;
567
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
568
+ status: z.ZodDefault<z.ZodEnum<["draft", "published", "archived"]>>;
569
+ createdAt: z.ZodString;
570
+ updatedAt: z.ZodString;
571
+ }, "strip", z.ZodTypeAny, {
572
+ projectId: string;
573
+ status: "draft" | "published" | "archived";
574
+ id: string;
575
+ createdAt: string;
576
+ updatedAt: string;
577
+ kudId: string;
578
+ kudType: string;
579
+ locale: string;
580
+ intentAffinity: [number, number, number, number, number];
581
+ priority: number;
582
+ content: Record<string, unknown>;
583
+ metadata?: Record<string, unknown> | null | undefined;
584
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
585
+ }, {
586
+ projectId: string;
587
+ id: string;
588
+ createdAt: string;
589
+ updatedAt: string;
590
+ kudId: string;
591
+ kudType: string;
592
+ intentAffinity: [number, number, number, number, number];
593
+ content: Record<string, unknown>;
594
+ status?: "draft" | "published" | "archived" | undefined;
595
+ metadata?: Record<string, unknown> | null | undefined;
596
+ locale?: string | undefined;
597
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
598
+ priority?: number | undefined;
599
+ }>;
600
+ score: z.ZodNumber;
601
+ }, "strip", z.ZodTypeAny, {
602
+ score: number;
603
+ slotId: string;
604
+ kui: {
605
+ projectId: string;
606
+ status: "draft" | "published" | "archived";
607
+ id: string;
608
+ createdAt: string;
609
+ updatedAt: string;
610
+ kudId: string;
611
+ kudType: string;
612
+ locale: string;
613
+ intentAffinity: [number, number, number, number, number];
614
+ priority: number;
615
+ content: Record<string, unknown>;
616
+ metadata?: Record<string, unknown> | null | undefined;
617
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
618
+ };
619
+ }, {
620
+ score: number;
621
+ slotId: string;
622
+ kui: {
623
+ projectId: string;
624
+ id: string;
625
+ createdAt: string;
626
+ updatedAt: string;
627
+ kudId: string;
628
+ kudType: string;
629
+ intentAffinity: [number, number, number, number, number];
630
+ content: Record<string, unknown>;
631
+ status?: "draft" | "published" | "archived" | undefined;
632
+ metadata?: Record<string, unknown> | null | undefined;
633
+ locale?: string | undefined;
634
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
635
+ priority?: number | undefined;
636
+ };
637
+ }>, "many">;
638
+ }, "strip", z.ZodTypeAny, {
639
+ pageId: string;
640
+ slots: {
641
+ score: number;
642
+ slotId: string;
643
+ kui: {
644
+ projectId: string;
645
+ status: "draft" | "published" | "archived";
646
+ id: string;
647
+ createdAt: string;
648
+ updatedAt: string;
649
+ kudId: string;
650
+ kudType: string;
651
+ locale: string;
652
+ intentAffinity: [number, number, number, number, number];
653
+ priority: number;
654
+ content: Record<string, unknown>;
655
+ metadata?: Record<string, unknown> | null | undefined;
656
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
657
+ };
658
+ }[];
659
+ }, {
660
+ pageId: string;
661
+ slots: {
662
+ score: number;
663
+ slotId: string;
664
+ kui: {
665
+ projectId: string;
666
+ id: string;
667
+ createdAt: string;
668
+ updatedAt: string;
669
+ kudId: string;
670
+ kudType: string;
671
+ intentAffinity: [number, number, number, number, number];
672
+ content: Record<string, unknown>;
673
+ status?: "draft" | "published" | "archived" | undefined;
674
+ metadata?: Record<string, unknown> | null | undefined;
675
+ locale?: string | undefined;
676
+ intentVelocity?: [number, number, number, number, number] | null | undefined;
677
+ priority?: number | undefined;
678
+ };
679
+ }[];
680
+ }>;
681
+ type ResolvedPage = z.infer<typeof ResolvedPageSchema>;
682
+ declare const UpdateLayoutInputSchema: z.ZodObject<{
683
+ slots: z.ZodArray<z.ZodObject<{
684
+ slotId: z.ZodString;
685
+ kudId: z.ZodString;
686
+ required: z.ZodDefault<z.ZodBoolean>;
687
+ candidateKuiIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
688
+ }, "strip", z.ZodTypeAny, {
689
+ required: boolean;
690
+ kudId: string;
691
+ slotId: string;
692
+ candidateKuiIds?: string[] | undefined;
693
+ }, {
694
+ kudId: string;
695
+ slotId: string;
696
+ required?: boolean | undefined;
697
+ candidateKuiIds?: string[] | undefined;
698
+ }>, "many">;
699
+ }, "strip", z.ZodTypeAny, {
700
+ slots: {
701
+ required: boolean;
702
+ kudId: string;
703
+ slotId: string;
704
+ candidateKuiIds?: string[] | undefined;
705
+ }[];
706
+ }, {
707
+ slots: {
708
+ kudId: string;
709
+ slotId: string;
710
+ required?: boolean | undefined;
711
+ candidateKuiIds?: string[] | undefined;
712
+ }[];
713
+ }>;
714
+ type UpdateLayoutInput = z.infer<typeof UpdateLayoutInputSchema>;
715
+
716
+ interface ResolveLayoutOptions {
717
+ locale?: string;
718
+ intentVector: IntentVector;
719
+ intentVelocity?: IntentVector;
720
+ velocityWeight?: number;
721
+ }
722
+ interface LayoutsClient {
723
+ get(pageId: string, locale?: string): Promise<PageLayout>;
724
+ update(pageId: string, locale: string, input: UpdateLayoutInput): Promise<PageLayout>;
725
+ resolve(pageId: string, opts: ResolveLayoutOptions): Promise<ResolvedPage>;
726
+ }
727
+
728
+ interface PullFromFigmaOptions {
729
+ fileKey: string;
730
+ figmaToken: string;
731
+ }
732
+ interface TokensClient {
733
+ pushFromCode(cssPath: string): Promise<{
734
+ upserted: number;
735
+ }>;
736
+ pullToCode(cssPath: string): Promise<void>;
737
+ pullFromFigma(opts: PullFromFigmaOptions): Promise<{
738
+ synced: number;
739
+ }>;
740
+ exportDTCG(): Promise<Record<string, unknown>>;
741
+ }
742
+
743
+ interface WatchOptions {
744
+ paths: string[];
745
+ onChange: (changedFile: string) => Promise<void> | void;
746
+ }
747
+ interface ConfigClient {
748
+ generate(outputPath?: string): Promise<void>;
749
+ generateRegistry(outputPath?: string): Promise<void>;
750
+ watch(opts: WatchOptions): () => void;
751
+ }
752
+
753
+ declare const KudRegistryEntrySchema: z.ZodObject<{
754
+ type: z.ZodString;
755
+ label: z.ZodOptional<z.ZodString>;
756
+ version: z.ZodDefault<z.ZodNumber>;
757
+ schema: z.ZodRecord<z.ZodString, z.ZodType<KUDFieldDef, z.ZodTypeDef, KUDFieldDef>>;
758
+ componentPath: z.ZodOptional<z.ZodString>;
759
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
760
+ }, "strip", z.ZodTypeAny, {
761
+ version: number;
762
+ type: string;
763
+ schema: Record<string, KUDFieldDef>;
764
+ label?: string | undefined;
765
+ metadata?: Record<string, unknown> | undefined;
766
+ componentPath?: string | undefined;
767
+ }, {
768
+ type: string;
769
+ schema: Record<string, KUDFieldDef>;
770
+ version?: number | undefined;
771
+ label?: string | undefined;
772
+ metadata?: Record<string, unknown> | undefined;
773
+ componentPath?: string | undefined;
774
+ }>;
775
+ type KudRegistryEntry = z.infer<typeof KudRegistryEntrySchema>;
776
+ declare const KudRegistrySchema: z.ZodObject<{
777
+ version: z.ZodDefault<z.ZodNumber>;
778
+ projectId: z.ZodString;
779
+ generatedAt: z.ZodString;
780
+ kuds: z.ZodArray<z.ZodObject<{
781
+ type: z.ZodString;
782
+ label: z.ZodOptional<z.ZodString>;
783
+ version: z.ZodDefault<z.ZodNumber>;
784
+ schema: z.ZodRecord<z.ZodString, z.ZodType<KUDFieldDef, z.ZodTypeDef, KUDFieldDef>>;
785
+ componentPath: z.ZodOptional<z.ZodString>;
786
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
787
+ }, "strip", z.ZodTypeAny, {
788
+ version: number;
789
+ type: string;
790
+ schema: Record<string, KUDFieldDef>;
791
+ label?: string | undefined;
792
+ metadata?: Record<string, unknown> | undefined;
793
+ componentPath?: string | undefined;
794
+ }, {
795
+ type: string;
796
+ schema: Record<string, KUDFieldDef>;
797
+ version?: number | undefined;
798
+ label?: string | undefined;
799
+ metadata?: Record<string, unknown> | undefined;
800
+ componentPath?: string | undefined;
801
+ }>, "many">;
802
+ }, "strip", z.ZodTypeAny, {
803
+ version: number;
804
+ projectId: string;
805
+ kuds: {
806
+ version: number;
807
+ type: string;
808
+ schema: Record<string, KUDFieldDef>;
809
+ label?: string | undefined;
810
+ metadata?: Record<string, unknown> | undefined;
811
+ componentPath?: string | undefined;
812
+ }[];
813
+ generatedAt: string;
814
+ }, {
815
+ projectId: string;
816
+ kuds: {
817
+ type: string;
818
+ schema: Record<string, KUDFieldDef>;
819
+ version?: number | undefined;
820
+ label?: string | undefined;
821
+ metadata?: Record<string, unknown> | undefined;
822
+ componentPath?: string | undefined;
823
+ }[];
824
+ generatedAt: string;
825
+ version?: number | undefined;
826
+ }>;
827
+ type KudRegistry = z.infer<typeof KudRegistrySchema>;
828
+
829
+ declare const DesignTokenSchema: z.ZodObject<{
830
+ id: z.ZodString;
831
+ projectId: z.ZodString;
832
+ collection: z.ZodString;
833
+ name: z.ZodString;
834
+ valueLight: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
835
+ valueDark: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
836
+ figmaVariableId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
837
+ updatedAt: z.ZodString;
838
+ }, "strip", z.ZodTypeAny, {
839
+ name: string;
840
+ projectId: string;
841
+ id: string;
842
+ updatedAt: string;
843
+ collection: string;
844
+ valueLight?: unknown;
845
+ valueDark?: unknown;
846
+ figmaVariableId?: string | null | undefined;
847
+ }, {
848
+ name: string;
849
+ projectId: string;
850
+ id: string;
851
+ updatedAt: string;
852
+ collection: string;
853
+ valueLight?: unknown;
854
+ valueDark?: unknown;
855
+ figmaVariableId?: string | null | undefined;
856
+ }>;
857
+ type DesignToken = z.infer<typeof DesignTokenSchema>;
858
+ declare const DTCGTokenSchema: z.ZodObject<{
859
+ $value: z.ZodUnknown;
860
+ $type: z.ZodOptional<z.ZodString>;
861
+ $description: z.ZodOptional<z.ZodString>;
862
+ }, "strip", z.ZodTypeAny, {
863
+ $value?: unknown;
864
+ $type?: string | undefined;
865
+ $description?: string | undefined;
866
+ }, {
867
+ $value?: unknown;
868
+ $type?: string | undefined;
869
+ $description?: string | undefined;
870
+ }>;
871
+ type DTCGToken = z.infer<typeof DTCGTokenSchema>;
872
+
873
+ declare class LexApiError extends Error {
874
+ statusCode: number;
875
+ body: unknown;
876
+ constructor(message: string, statusCode: number, body: unknown);
877
+ }
878
+ declare class LexValidationError extends Error {
879
+ errors: string[];
880
+ constructor(message: string, errors: string[]);
881
+ }
882
+ declare class LexConfigError extends Error {
883
+ constructor(message: string);
884
+ }
885
+
886
+ interface LexClient {
887
+ kuds: KudsClient;
888
+ kuis: KuisClient;
889
+ layouts: LayoutsClient;
890
+ tokens: TokensClient;
891
+ config: ConfigClient;
892
+ }
893
+ declare function createLexClient(options: LexClientOptions): LexClient;
894
+
895
+ export { type BulkImportResult, type CreateKUDInput, CreateKUDInputSchema, type CreateKUIInput, CreateKUIInputSchema, type DTCGToken, DTCGTokenSchema, type DesignToken, DesignTokenSchema, type IntentVector, IntentVectorSchema, type KUD, type KUDFieldDef, KUDFieldDefSchema, type KUDFieldType, KUDFieldTypeSchema, KUDSchema, type KUI, KUISchema, type KUIStatus, KUIStatusSchema, type KudRegistry, type KudRegistryEntry, KudRegistryEntrySchema, KudRegistrySchema, LexApiError, type LexClient, type LexClientOptions, LexClientOptionsSchema, type LexConfig, LexConfigError, LexConfigSchema, LexValidationError, type ListKUIsFilter, ListKUIsFilterSchema, type PageLayout, PageLayoutSchema, type PageSlot, PageSlotSchema, type PullFromFigmaOptions, type ResolveKUIInput, ResolveKUIInputSchema, type ResolveLayoutOptions, type ResolvedPage, ResolvedPageSchema, type ResolvedSlot, ResolvedSlotSchema, type SyncResult, type UpdateKUDInput, UpdateKUDInputSchema, type UpdateKUIInput, UpdateKUIInputSchema, type UpdateLayoutInput, UpdateLayoutInputSchema, type WatchOptions, createLexClient };