@adminiumjs/manifest 0.1.0 → 0.2.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.
@@ -0,0 +1,1253 @@
1
+ /**
2
+ * Manifest spec v1 (13-marketplace.md §2), frozen at `manifestVersion: 1` for
3
+ * all of Adminium 1.x. Pure Zod v4 + types — no `node:` imports — so the
4
+ * storefront and the Electron shell can validate a manifest in the browser
5
+ * (01-architecture.md §3, the `@adminium/manifest` package row).
6
+ *
7
+ * This module is the envelope: every block's shape and the cross-block rules.
8
+ * The install PLANNER (planInstall / requiredSchema → create-or-map diff) and
9
+ * the server-side installer are later layers that consume a validated manifest.
10
+ */
11
+ import { type AddOnBlock } from '@adminium/add-on-contracts';
12
+ import { z } from 'zod';
13
+ /** Integer spec version, frozen at 1 for Adminium 1.x (§2, 01 §8). */
14
+ export declare const MANIFEST_VERSION = 1;
15
+ /**
16
+ * What kind of thing this manifest describes (24 §5.2). OPTIONAL, defaulting to
17
+ * `"app"` — which is the whole reason `manifestVersion` does not move: every
18
+ * manifest written before wave 4 stays valid unchanged, and an additive
19
+ * optional field with a back-compatible default is how a frozen spec grows
20
+ * without lying about its version.
21
+ */
22
+ export declare const MANIFEST_KINDS: readonly ["app", "add-on"];
23
+ export declare const manifestKindSchema: z.ZodEnum<{
24
+ app: "app";
25
+ "add-on": "add-on";
26
+ }>;
27
+ export type ManifestKind = (typeof MANIFEST_KINDS)[number];
28
+ /** An i18n message: a catalog key plus the English fallback rendered if absent. */
29
+ export declare const i18nMessageSchema: z.ZodObject<{
30
+ key: z.ZodString;
31
+ fallback: z.ZodString;
32
+ }, z.core.$strict>;
33
+ export type I18nMessage = z.infer<typeof i18nMessageSchema>;
34
+ /** Closed v1 storefront facet set (§2.3). */
35
+ export declare const MANIFEST_CATEGORIES: readonly ["commerce", "hospitality", "operations", "crm", "internal-tools"];
36
+ export declare const categorySchema: z.ZodEnum<{
37
+ commerce: "commerce";
38
+ hospitality: "hospitality";
39
+ operations: "operations";
40
+ crm: "crm";
41
+ "internal-tools": "internal-tools";
42
+ }>;
43
+ /** The one publisher id v1 accepts unless `third-party-publishers` is on (§2.3/§9). */
44
+ export declare const FIRST_PARTY_PUBLISHER_ID = "adminium";
45
+ export declare const publisherSchema: z.ZodObject<{
46
+ id: z.ZodString;
47
+ name: z.ZodString;
48
+ url: z.ZodOptional<z.ZodURL>;
49
+ }, z.core.$strict>;
50
+ export type Publisher = z.infer<typeof publisherSchema>;
51
+ /**
52
+ * Everything both kinds share. `categories` is deliberately NOT here: it splits
53
+ * by kind (an add-on is not a vertical — D2), so each branch adds its own.
54
+ */
55
+ export declare const identityShape: {
56
+ key: z.ZodString;
57
+ name: z.ZodString;
58
+ version: z.ZodString;
59
+ publisher: z.ZodObject<{
60
+ id: z.ZodString;
61
+ name: z.ZodString;
62
+ url: z.ZodOptional<z.ZodURL>;
63
+ }, z.core.$strict>;
64
+ license: z.ZodString;
65
+ description: z.ZodObject<{
66
+ key: z.ZodString;
67
+ fallback: z.ZodString;
68
+ }, z.core.$strict>;
69
+ };
70
+ export declare const identitySchema: z.ZodObject<{
71
+ categories: z.ZodArray<z.ZodEnum<{
72
+ commerce: "commerce";
73
+ hospitality: "hospitality";
74
+ operations: "operations";
75
+ crm: "crm";
76
+ "internal-tools": "internal-tools";
77
+ }>>;
78
+ key: z.ZodString;
79
+ name: z.ZodString;
80
+ version: z.ZodString;
81
+ publisher: z.ZodObject<{
82
+ id: z.ZodString;
83
+ name: z.ZodString;
84
+ url: z.ZodOptional<z.ZodURL>;
85
+ }, z.core.$strict>;
86
+ license: z.ZodString;
87
+ description: z.ZodObject<{
88
+ key: z.ZodString;
89
+ fallback: z.ZodString;
90
+ }, z.core.$strict>;
91
+ }, z.core.$strict>;
92
+ /**
93
+ * Keys no app or add-on may ever take, because they would shadow a storefront
94
+ * route or a data file (D17). Apps and add-ons share one key namespace.
95
+ */
96
+ export declare const RESERVED_KEYS: readonly ["apps", "add-on", "add-ons", "demo", "index", "search"];
97
+ export declare const MANIFEST_CAPABILITIES: readonly ["hosted-only", "offline-required", "receipt-printer", "barcode-scanner", "payments", "file-storage", "email-delivery", "realtime", "outbound-http", "oauth-connect"];
98
+ export declare const capabilitySchema: z.ZodEnum<{
99
+ "hosted-only": "hosted-only";
100
+ "offline-required": "offline-required";
101
+ "receipt-printer": "receipt-printer";
102
+ "barcode-scanner": "barcode-scanner";
103
+ payments: "payments";
104
+ "file-storage": "file-storage";
105
+ "email-delivery": "email-delivery";
106
+ realtime: "realtime";
107
+ "outbound-http": "outbound-http";
108
+ "oauth-connect": "oauth-connect";
109
+ }>;
110
+ export type Capability = z.infer<typeof capabilitySchema>;
111
+ export declare const compatibilitySchema: z.ZodObject<{
112
+ minAdminiumVersion: z.ZodString;
113
+ maxAdminiumVersion: z.ZodOptional<z.ZodString>;
114
+ requires: z.ZodOptional<z.ZodArray<z.ZodEnum<{
115
+ "hosted-only": "hosted-only";
116
+ "offline-required": "offline-required";
117
+ "receipt-printer": "receipt-printer";
118
+ "barcode-scanner": "barcode-scanner";
119
+ payments: "payments";
120
+ "file-storage": "file-storage";
121
+ "email-delivery": "email-delivery";
122
+ realtime: "realtime";
123
+ "outbound-http": "outbound-http";
124
+ "oauth-connect": "oauth-connect";
125
+ }>>>;
126
+ }, z.core.$strict>;
127
+ /** Abstract column types the introspection engine emits (§2.5, research §15.2). */
128
+ export declare const COLUMN_TYPES: readonly ["id", "text", "int", "bigint", "decimal", "money", "float", "bool", "enum", "json", "date", "timestamptz", "uuid", "fk", "blob"];
129
+ /** Optional semantic pre-seed so widgets auto-instantiate (§2.5). */
130
+ export declare const COLUMN_SEMANTICS: readonly ["name", "money", "image", "email", "avatar", "geo-lat", "geo-lng"];
131
+ /** Structural role markers (§2.5). */
132
+ export declare const COLUMN_ROLES: readonly ["pk", "created_at", "updated_at"];
133
+ export declare const requiredColumnSchema: z.ZodObject<{
134
+ ref: z.ZodString;
135
+ type: z.ZodEnum<{
136
+ bigint: "bigint";
137
+ id: "id";
138
+ int: "int";
139
+ date: "date";
140
+ enum: "enum";
141
+ text: "text";
142
+ decimal: "decimal";
143
+ money: "money";
144
+ float: "float";
145
+ bool: "bool";
146
+ json: "json";
147
+ timestamptz: "timestamptz";
148
+ uuid: "uuid";
149
+ fk: "fk";
150
+ blob: "blob";
151
+ }>;
152
+ semantic: z.ZodOptional<z.ZodEnum<{
153
+ name: "name";
154
+ money: "money";
155
+ image: "image";
156
+ email: "email";
157
+ avatar: "avatar";
158
+ "geo-lat": "geo-lat";
159
+ "geo-lng": "geo-lng";
160
+ }>>;
161
+ role: z.ZodOptional<z.ZodEnum<{
162
+ pk: "pk";
163
+ created_at: "created_at";
164
+ updated_at: "updated_at";
165
+ }>>;
166
+ nullable: z.ZodOptional<z.ZodBoolean>;
167
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
168
+ references: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strict>;
170
+ export declare const requiredTableSchema: z.ZodObject<{
171
+ ref: z.ZodString;
172
+ columns: z.ZodArray<z.ZodObject<{
173
+ ref: z.ZodString;
174
+ type: z.ZodEnum<{
175
+ bigint: "bigint";
176
+ id: "id";
177
+ int: "int";
178
+ date: "date";
179
+ enum: "enum";
180
+ text: "text";
181
+ decimal: "decimal";
182
+ money: "money";
183
+ float: "float";
184
+ bool: "bool";
185
+ json: "json";
186
+ timestamptz: "timestamptz";
187
+ uuid: "uuid";
188
+ fk: "fk";
189
+ blob: "blob";
190
+ }>;
191
+ semantic: z.ZodOptional<z.ZodEnum<{
192
+ name: "name";
193
+ money: "money";
194
+ image: "image";
195
+ email: "email";
196
+ avatar: "avatar";
197
+ "geo-lat": "geo-lat";
198
+ "geo-lng": "geo-lng";
199
+ }>>;
200
+ role: z.ZodOptional<z.ZodEnum<{
201
+ pk: "pk";
202
+ created_at: "created_at";
203
+ updated_at: "updated_at";
204
+ }>>;
205
+ nullable: z.ZodOptional<z.ZodBoolean>;
206
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
207
+ references: z.ZodOptional<z.ZodString>;
208
+ }, z.core.$strict>>;
209
+ }, z.core.$strict>;
210
+ export declare const requiredSchemaSchema: z.ZodObject<{
211
+ tables: z.ZodArray<z.ZodObject<{
212
+ ref: z.ZodString;
213
+ columns: z.ZodArray<z.ZodObject<{
214
+ ref: z.ZodString;
215
+ type: z.ZodEnum<{
216
+ bigint: "bigint";
217
+ id: "id";
218
+ int: "int";
219
+ date: "date";
220
+ enum: "enum";
221
+ text: "text";
222
+ decimal: "decimal";
223
+ money: "money";
224
+ float: "float";
225
+ bool: "bool";
226
+ json: "json";
227
+ timestamptz: "timestamptz";
228
+ uuid: "uuid";
229
+ fk: "fk";
230
+ blob: "blob";
231
+ }>;
232
+ semantic: z.ZodOptional<z.ZodEnum<{
233
+ name: "name";
234
+ money: "money";
235
+ image: "image";
236
+ email: "email";
237
+ avatar: "avatar";
238
+ "geo-lat": "geo-lat";
239
+ "geo-lng": "geo-lng";
240
+ }>>;
241
+ role: z.ZodOptional<z.ZodEnum<{
242
+ pk: "pk";
243
+ created_at: "created_at";
244
+ updated_at: "updated_at";
245
+ }>>;
246
+ nullable: z.ZodOptional<z.ZodBoolean>;
247
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
248
+ references: z.ZodOptional<z.ZodString>;
249
+ }, z.core.$strict>>;
250
+ }, z.core.$strict>>;
251
+ }, z.core.$strict>;
252
+ export declare const pageNavSchema: z.ZodObject<{
253
+ group: z.ZodString;
254
+ icon: z.ZodString;
255
+ order: z.ZodNumber;
256
+ }, z.core.$strict>;
257
+ export declare const pageSchema: z.ZodObject<{
258
+ ref: z.ZodString;
259
+ template: z.ZodString;
260
+ title: z.ZodObject<{
261
+ key: z.ZodString;
262
+ fallback: z.ZodString;
263
+ }, z.core.$strict>;
264
+ nav: z.ZodObject<{
265
+ group: z.ZodString;
266
+ icon: z.ZodString;
267
+ order: z.ZodNumber;
268
+ }, z.core.$strict>;
269
+ bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
270
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
271
+ }, z.core.$strict>;
272
+ export declare const roleSchema: z.ZodObject<{
273
+ key: z.ZodString;
274
+ name: z.ZodString;
275
+ cloneFrom: z.ZodOptional<z.ZodString>;
276
+ permissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
277
+ }, z.core.$strict>;
278
+ export declare const settingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
279
+ type: z.ZodLiteral<"string">;
280
+ default: z.ZodOptional<z.ZodString>;
281
+ key: z.ZodString;
282
+ required: z.ZodOptional<z.ZodBoolean>;
283
+ secret: z.ZodOptional<z.ZodBoolean>;
284
+ label: z.ZodOptional<z.ZodObject<{
285
+ key: z.ZodString;
286
+ fallback: z.ZodString;
287
+ }, z.core.$strict>>;
288
+ }, z.core.$strict>, z.ZodObject<{
289
+ type: z.ZodLiteral<"number">;
290
+ default: z.ZodOptional<z.ZodNumber>;
291
+ min: z.ZodOptional<z.ZodNumber>;
292
+ max: z.ZodOptional<z.ZodNumber>;
293
+ unit: z.ZodOptional<z.ZodString>;
294
+ key: z.ZodString;
295
+ required: z.ZodOptional<z.ZodBoolean>;
296
+ secret: z.ZodOptional<z.ZodBoolean>;
297
+ label: z.ZodOptional<z.ZodObject<{
298
+ key: z.ZodString;
299
+ fallback: z.ZodString;
300
+ }, z.core.$strict>>;
301
+ }, z.core.$strict>, z.ZodObject<{
302
+ type: z.ZodLiteral<"boolean">;
303
+ default: z.ZodOptional<z.ZodBoolean>;
304
+ key: z.ZodString;
305
+ required: z.ZodOptional<z.ZodBoolean>;
306
+ secret: z.ZodOptional<z.ZodBoolean>;
307
+ label: z.ZodOptional<z.ZodObject<{
308
+ key: z.ZodString;
309
+ fallback: z.ZodString;
310
+ }, z.core.$strict>>;
311
+ }, z.core.$strict>, z.ZodObject<{
312
+ type: z.ZodLiteral<"enum">;
313
+ enum: z.ZodArray<z.ZodString>;
314
+ default: z.ZodOptional<z.ZodString>;
315
+ key: z.ZodString;
316
+ required: z.ZodOptional<z.ZodBoolean>;
317
+ secret: z.ZodOptional<z.ZodBoolean>;
318
+ label: z.ZodOptional<z.ZodObject<{
319
+ key: z.ZodString;
320
+ fallback: z.ZodString;
321
+ }, z.core.$strict>>;
322
+ }, z.core.$strict>, z.ZodObject<{
323
+ type: z.ZodLiteral<"file">;
324
+ accept: z.ZodOptional<z.ZodArray<z.ZodString>>;
325
+ key: z.ZodString;
326
+ required: z.ZodOptional<z.ZodBoolean>;
327
+ secret: z.ZodOptional<z.ZodBoolean>;
328
+ label: z.ZodOptional<z.ZodObject<{
329
+ key: z.ZodString;
330
+ fallback: z.ZodString;
331
+ }, z.core.$strict>>;
332
+ }, z.core.$strict>, z.ZodObject<{
333
+ type: z.ZodLiteral<"json">;
334
+ default: z.ZodOptional<z.ZodUnknown>;
335
+ key: z.ZodString;
336
+ required: z.ZodOptional<z.ZodBoolean>;
337
+ secret: z.ZodOptional<z.ZodBoolean>;
338
+ label: z.ZodOptional<z.ZodObject<{
339
+ key: z.ZodString;
340
+ fallback: z.ZodString;
341
+ }, z.core.$strict>>;
342
+ }, z.core.$strict>], "type">;
343
+ export declare const seedSchema: z.ZodObject<{
344
+ table: z.ZodString;
345
+ rows: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
346
+ file: z.ZodOptional<z.ZodString>;
347
+ }, z.core.$strict>;
348
+ export declare const manifestWidgetSchema: z.ZodObject<{
349
+ id: z.ZodString;
350
+ entry: z.ZodString;
351
+ }, z.core.$strict>;
352
+ export declare const FRONTEND_KINDS: readonly ["spa", "electron", "none"];
353
+ export declare const frontendEnvVarSchema: z.ZodObject<{
354
+ required: z.ZodBoolean;
355
+ example: z.ZodOptional<z.ZodString>;
356
+ }, z.core.$strict>;
357
+ export declare const frontendSchema: z.ZodObject<{
358
+ kind: z.ZodEnum<{
359
+ spa: "spa";
360
+ electron: "electron";
361
+ none: "none";
362
+ }>;
363
+ entry: z.ZodOptional<z.ZodString>;
364
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
365
+ required: z.ZodBoolean;
366
+ example: z.ZodOptional<z.ZodString>;
367
+ }, z.core.$strict>>>;
368
+ }, z.core.$strict>;
369
+ export declare const appManifestSchema: z.ZodObject<{
370
+ compatibility: z.ZodObject<{
371
+ minAdminiumVersion: z.ZodString;
372
+ maxAdminiumVersion: z.ZodOptional<z.ZodString>;
373
+ requires: z.ZodOptional<z.ZodArray<z.ZodEnum<{
374
+ "hosted-only": "hosted-only";
375
+ "offline-required": "offline-required";
376
+ "receipt-printer": "receipt-printer";
377
+ "barcode-scanner": "barcode-scanner";
378
+ payments: "payments";
379
+ "file-storage": "file-storage";
380
+ "email-delivery": "email-delivery";
381
+ realtime: "realtime";
382
+ "outbound-http": "outbound-http";
383
+ "oauth-connect": "oauth-connect";
384
+ }>>>;
385
+ }, z.core.$strict>;
386
+ requiredSchema: z.ZodObject<{
387
+ tables: z.ZodArray<z.ZodObject<{
388
+ ref: z.ZodString;
389
+ columns: z.ZodArray<z.ZodObject<{
390
+ ref: z.ZodString;
391
+ type: z.ZodEnum<{
392
+ bigint: "bigint";
393
+ id: "id";
394
+ int: "int";
395
+ date: "date";
396
+ enum: "enum";
397
+ text: "text";
398
+ decimal: "decimal";
399
+ money: "money";
400
+ float: "float";
401
+ bool: "bool";
402
+ json: "json";
403
+ timestamptz: "timestamptz";
404
+ uuid: "uuid";
405
+ fk: "fk";
406
+ blob: "blob";
407
+ }>;
408
+ semantic: z.ZodOptional<z.ZodEnum<{
409
+ name: "name";
410
+ money: "money";
411
+ image: "image";
412
+ email: "email";
413
+ avatar: "avatar";
414
+ "geo-lat": "geo-lat";
415
+ "geo-lng": "geo-lng";
416
+ }>>;
417
+ role: z.ZodOptional<z.ZodEnum<{
418
+ pk: "pk";
419
+ created_at: "created_at";
420
+ updated_at: "updated_at";
421
+ }>>;
422
+ nullable: z.ZodOptional<z.ZodBoolean>;
423
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
424
+ references: z.ZodOptional<z.ZodString>;
425
+ }, z.core.$strict>>;
426
+ }, z.core.$strict>>;
427
+ }, z.core.$strict>;
428
+ pages: z.ZodArray<z.ZodObject<{
429
+ ref: z.ZodString;
430
+ template: z.ZodString;
431
+ title: z.ZodObject<{
432
+ key: z.ZodString;
433
+ fallback: z.ZodString;
434
+ }, z.core.$strict>;
435
+ nav: z.ZodObject<{
436
+ group: z.ZodString;
437
+ icon: z.ZodString;
438
+ order: z.ZodNumber;
439
+ }, z.core.$strict>;
440
+ bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
441
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
442
+ }, z.core.$strict>>;
443
+ roles: z.ZodOptional<z.ZodArray<z.ZodObject<{
444
+ key: z.ZodString;
445
+ name: z.ZodString;
446
+ cloneFrom: z.ZodOptional<z.ZodString>;
447
+ permissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
448
+ }, z.core.$strict>>>;
449
+ settings: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
450
+ type: z.ZodLiteral<"string">;
451
+ default: z.ZodOptional<z.ZodString>;
452
+ key: z.ZodString;
453
+ required: z.ZodOptional<z.ZodBoolean>;
454
+ secret: z.ZodOptional<z.ZodBoolean>;
455
+ label: z.ZodOptional<z.ZodObject<{
456
+ key: z.ZodString;
457
+ fallback: z.ZodString;
458
+ }, z.core.$strict>>;
459
+ }, z.core.$strict>, z.ZodObject<{
460
+ type: z.ZodLiteral<"number">;
461
+ default: z.ZodOptional<z.ZodNumber>;
462
+ min: z.ZodOptional<z.ZodNumber>;
463
+ max: z.ZodOptional<z.ZodNumber>;
464
+ unit: z.ZodOptional<z.ZodString>;
465
+ key: z.ZodString;
466
+ required: z.ZodOptional<z.ZodBoolean>;
467
+ secret: z.ZodOptional<z.ZodBoolean>;
468
+ label: z.ZodOptional<z.ZodObject<{
469
+ key: z.ZodString;
470
+ fallback: z.ZodString;
471
+ }, z.core.$strict>>;
472
+ }, z.core.$strict>, z.ZodObject<{
473
+ type: z.ZodLiteral<"boolean">;
474
+ default: z.ZodOptional<z.ZodBoolean>;
475
+ key: z.ZodString;
476
+ required: z.ZodOptional<z.ZodBoolean>;
477
+ secret: z.ZodOptional<z.ZodBoolean>;
478
+ label: z.ZodOptional<z.ZodObject<{
479
+ key: z.ZodString;
480
+ fallback: z.ZodString;
481
+ }, z.core.$strict>>;
482
+ }, z.core.$strict>, z.ZodObject<{
483
+ type: z.ZodLiteral<"enum">;
484
+ enum: z.ZodArray<z.ZodString>;
485
+ default: z.ZodOptional<z.ZodString>;
486
+ key: z.ZodString;
487
+ required: z.ZodOptional<z.ZodBoolean>;
488
+ secret: z.ZodOptional<z.ZodBoolean>;
489
+ label: z.ZodOptional<z.ZodObject<{
490
+ key: z.ZodString;
491
+ fallback: z.ZodString;
492
+ }, z.core.$strict>>;
493
+ }, z.core.$strict>, z.ZodObject<{
494
+ type: z.ZodLiteral<"file">;
495
+ accept: z.ZodOptional<z.ZodArray<z.ZodString>>;
496
+ key: z.ZodString;
497
+ required: z.ZodOptional<z.ZodBoolean>;
498
+ secret: z.ZodOptional<z.ZodBoolean>;
499
+ label: z.ZodOptional<z.ZodObject<{
500
+ key: z.ZodString;
501
+ fallback: z.ZodString;
502
+ }, z.core.$strict>>;
503
+ }, z.core.$strict>, z.ZodObject<{
504
+ type: z.ZodLiteral<"json">;
505
+ default: z.ZodOptional<z.ZodUnknown>;
506
+ key: z.ZodString;
507
+ required: z.ZodOptional<z.ZodBoolean>;
508
+ secret: z.ZodOptional<z.ZodBoolean>;
509
+ label: z.ZodOptional<z.ZodObject<{
510
+ key: z.ZodString;
511
+ fallback: z.ZodString;
512
+ }, z.core.$strict>>;
513
+ }, z.core.$strict>], "type">>>;
514
+ seeds: z.ZodOptional<z.ZodArray<z.ZodObject<{
515
+ table: z.ZodString;
516
+ rows: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
517
+ file: z.ZodOptional<z.ZodString>;
518
+ }, z.core.$strict>>>;
519
+ widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
520
+ id: z.ZodString;
521
+ entry: z.ZodString;
522
+ }, z.core.$strict>>>;
523
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
524
+ "hosted-only": "hosted-only";
525
+ "offline-required": "offline-required";
526
+ "receipt-printer": "receipt-printer";
527
+ "barcode-scanner": "barcode-scanner";
528
+ payments: "payments";
529
+ "file-storage": "file-storage";
530
+ "email-delivery": "email-delivery";
531
+ realtime: "realtime";
532
+ "outbound-http": "outbound-http";
533
+ "oauth-connect": "oauth-connect";
534
+ }>>>;
535
+ frontend: z.ZodObject<{
536
+ kind: z.ZodEnum<{
537
+ spa: "spa";
538
+ electron: "electron";
539
+ none: "none";
540
+ }>;
541
+ entry: z.ZodOptional<z.ZodString>;
542
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
543
+ required: z.ZodBoolean;
544
+ example: z.ZodOptional<z.ZodString>;
545
+ }, z.core.$strict>>>;
546
+ }, z.core.$strict>;
547
+ categories: z.ZodArray<z.ZodEnum<{
548
+ commerce: "commerce";
549
+ hospitality: "hospitality";
550
+ operations: "operations";
551
+ crm: "crm";
552
+ "internal-tools": "internal-tools";
553
+ }>>;
554
+ key: z.ZodString;
555
+ name: z.ZodString;
556
+ version: z.ZodString;
557
+ publisher: z.ZodObject<{
558
+ id: z.ZodString;
559
+ name: z.ZodString;
560
+ url: z.ZodOptional<z.ZodURL>;
561
+ }, z.core.$strict>;
562
+ license: z.ZodString;
563
+ description: z.ZodObject<{
564
+ key: z.ZodString;
565
+ fallback: z.ZodString;
566
+ }, z.core.$strict>;
567
+ kind: z.ZodLiteral<"app">;
568
+ manifestVersion: z.ZodLiteral<1>;
569
+ }, z.core.$strict>;
570
+ /**
571
+ * `pages` and `frontend` are absent from this branch on purpose (24 §5.7 item
572
+ * 6): an add-on cannot install pages, roles or a frontend, and leaving the
573
+ * fields off the schema entirely is a stronger guarantee than a lint rule.
574
+ */
575
+ export declare const addOnManifestSchema: z.ZodObject<{
576
+ categories: z.ZodArray<z.ZodEnum<{
577
+ artwork: "artwork";
578
+ delivery: "delivery";
579
+ payments: "payments";
580
+ email: "email";
581
+ data: "data";
582
+ }>>;
583
+ compatibility: z.ZodObject<{
584
+ minAdminiumVersion: z.ZodString;
585
+ maxAdminiumVersion: z.ZodOptional<z.ZodString>;
586
+ requires: z.ZodOptional<z.ZodArray<z.ZodEnum<{
587
+ "hosted-only": "hosted-only";
588
+ "offline-required": "offline-required";
589
+ "receipt-printer": "receipt-printer";
590
+ "barcode-scanner": "barcode-scanner";
591
+ payments: "payments";
592
+ "file-storage": "file-storage";
593
+ "email-delivery": "email-delivery";
594
+ realtime: "realtime";
595
+ "outbound-http": "outbound-http";
596
+ "oauth-connect": "oauth-connect";
597
+ }>>>;
598
+ }, z.core.$strict>;
599
+ addOn: z.ZodObject<{
600
+ attaches: z.ZodArray<z.ZodObject<{
601
+ app: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodString]>;
602
+ range: z.ZodOptional<z.ZodString>;
603
+ table: z.ZodOptional<z.ZodString>;
604
+ }, z.core.$strict>>;
605
+ provides: z.ZodOptional<z.ZodArray<z.ZodObject<{
606
+ contract: z.ZodEnum<{
607
+ "artwork-source": "artwork-source";
608
+ "shipping-carrier": "shipping-carrier";
609
+ "product-personalizer": "product-personalizer";
610
+ }>;
611
+ version: z.ZodNumber;
612
+ server: z.ZodString;
613
+ }, z.core.$strict>>>;
614
+ consumes: z.ZodOptional<z.ZodArray<z.ZodObject<{
615
+ contract: z.ZodEnum<{
616
+ "artwork-source": "artwork-source";
617
+ "shipping-carrier": "shipping-carrier";
618
+ "product-personalizer": "product-personalizer";
619
+ }>;
620
+ version: z.ZodNumber;
621
+ }, z.core.$strict>>>;
622
+ slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
623
+ slot: z.ZodEnum<{
624
+ "artwork.sources": "artwork.sources";
625
+ "checkout.delivery.methods": "checkout.delivery.methods";
626
+ "order.dispatch.panel": "order.dispatch.panel";
627
+ "order.dispatch.actions": "order.dispatch.actions";
628
+ "settings.add-on.panel": "settings.add-on.panel";
629
+ "nav.add-on.routes": "nav.add-on.routes";
630
+ "product.options.personalize": "product.options.personalize";
631
+ "cart.line.preview": "cart.line.preview";
632
+ "product.admin.panel": "product.admin.panel";
633
+ "order.line.actions": "order.line.actions";
634
+ "record.editor.panel": "record.editor.panel";
635
+ }>;
636
+ client: z.ZodString;
637
+ order: z.ZodNumber;
638
+ }, z.core.$strict>>>;
639
+ events: z.ZodOptional<z.ZodArray<z.ZodObject<{
640
+ on: z.ZodString;
641
+ server: z.ZodString;
642
+ }, z.core.$strict>>>;
643
+ connect: z.ZodObject<{
644
+ kind: z.ZodEnum<{
645
+ none: "none";
646
+ "api-key": "api-key";
647
+ oauth2: "oauth2";
648
+ }>;
649
+ authorizeUrl: z.ZodOptional<z.ZodURL>;
650
+ tokenUrl: z.ZodOptional<z.ZodURL>;
651
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
652
+ }, z.core.$strict>;
653
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
654
+ network: z.ZodOptional<z.ZodObject<{
655
+ allow: z.ZodArray<z.ZodString>;
656
+ }, z.core.$strict>>;
657
+ publicSettings: z.ZodOptional<z.ZodArray<z.ZodString>>;
658
+ demoTransport: z.ZodOptional<z.ZodString>;
659
+ }, z.core.$strict>;
660
+ requiredSchema: z.ZodOptional<z.ZodObject<{
661
+ tables: z.ZodArray<z.ZodObject<{
662
+ ref: z.ZodString;
663
+ columns: z.ZodArray<z.ZodObject<{
664
+ ref: z.ZodString;
665
+ type: z.ZodEnum<{
666
+ bigint: "bigint";
667
+ id: "id";
668
+ int: "int";
669
+ date: "date";
670
+ enum: "enum";
671
+ text: "text";
672
+ decimal: "decimal";
673
+ money: "money";
674
+ float: "float";
675
+ bool: "bool";
676
+ json: "json";
677
+ timestamptz: "timestamptz";
678
+ uuid: "uuid";
679
+ fk: "fk";
680
+ blob: "blob";
681
+ }>;
682
+ semantic: z.ZodOptional<z.ZodEnum<{
683
+ name: "name";
684
+ money: "money";
685
+ image: "image";
686
+ email: "email";
687
+ avatar: "avatar";
688
+ "geo-lat": "geo-lat";
689
+ "geo-lng": "geo-lng";
690
+ }>>;
691
+ role: z.ZodOptional<z.ZodEnum<{
692
+ pk: "pk";
693
+ created_at: "created_at";
694
+ updated_at: "updated_at";
695
+ }>>;
696
+ nullable: z.ZodOptional<z.ZodBoolean>;
697
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
698
+ references: z.ZodOptional<z.ZodString>;
699
+ }, z.core.$strict>>;
700
+ }, z.core.$strict>>;
701
+ }, z.core.$strict>>;
702
+ settings: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
703
+ type: z.ZodLiteral<"string">;
704
+ default: z.ZodOptional<z.ZodString>;
705
+ key: z.ZodString;
706
+ required: z.ZodOptional<z.ZodBoolean>;
707
+ secret: z.ZodOptional<z.ZodBoolean>;
708
+ label: z.ZodOptional<z.ZodObject<{
709
+ key: z.ZodString;
710
+ fallback: z.ZodString;
711
+ }, z.core.$strict>>;
712
+ }, z.core.$strict>, z.ZodObject<{
713
+ type: z.ZodLiteral<"number">;
714
+ default: z.ZodOptional<z.ZodNumber>;
715
+ min: z.ZodOptional<z.ZodNumber>;
716
+ max: z.ZodOptional<z.ZodNumber>;
717
+ unit: z.ZodOptional<z.ZodString>;
718
+ key: z.ZodString;
719
+ required: z.ZodOptional<z.ZodBoolean>;
720
+ secret: z.ZodOptional<z.ZodBoolean>;
721
+ label: z.ZodOptional<z.ZodObject<{
722
+ key: z.ZodString;
723
+ fallback: z.ZodString;
724
+ }, z.core.$strict>>;
725
+ }, z.core.$strict>, z.ZodObject<{
726
+ type: z.ZodLiteral<"boolean">;
727
+ default: z.ZodOptional<z.ZodBoolean>;
728
+ key: z.ZodString;
729
+ required: z.ZodOptional<z.ZodBoolean>;
730
+ secret: z.ZodOptional<z.ZodBoolean>;
731
+ label: z.ZodOptional<z.ZodObject<{
732
+ key: z.ZodString;
733
+ fallback: z.ZodString;
734
+ }, z.core.$strict>>;
735
+ }, z.core.$strict>, z.ZodObject<{
736
+ type: z.ZodLiteral<"enum">;
737
+ enum: z.ZodArray<z.ZodString>;
738
+ default: z.ZodOptional<z.ZodString>;
739
+ key: z.ZodString;
740
+ required: z.ZodOptional<z.ZodBoolean>;
741
+ secret: z.ZodOptional<z.ZodBoolean>;
742
+ label: z.ZodOptional<z.ZodObject<{
743
+ key: z.ZodString;
744
+ fallback: z.ZodString;
745
+ }, z.core.$strict>>;
746
+ }, z.core.$strict>, z.ZodObject<{
747
+ type: z.ZodLiteral<"file">;
748
+ accept: z.ZodOptional<z.ZodArray<z.ZodString>>;
749
+ key: z.ZodString;
750
+ required: z.ZodOptional<z.ZodBoolean>;
751
+ secret: z.ZodOptional<z.ZodBoolean>;
752
+ label: z.ZodOptional<z.ZodObject<{
753
+ key: z.ZodString;
754
+ fallback: z.ZodString;
755
+ }, z.core.$strict>>;
756
+ }, z.core.$strict>, z.ZodObject<{
757
+ type: z.ZodLiteral<"json">;
758
+ default: z.ZodOptional<z.ZodUnknown>;
759
+ key: z.ZodString;
760
+ required: z.ZodOptional<z.ZodBoolean>;
761
+ secret: z.ZodOptional<z.ZodBoolean>;
762
+ label: z.ZodOptional<z.ZodObject<{
763
+ key: z.ZodString;
764
+ fallback: z.ZodString;
765
+ }, z.core.$strict>>;
766
+ }, z.core.$strict>], "type">>>;
767
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
768
+ "hosted-only": "hosted-only";
769
+ "offline-required": "offline-required";
770
+ "receipt-printer": "receipt-printer";
771
+ "barcode-scanner": "barcode-scanner";
772
+ payments: "payments";
773
+ "file-storage": "file-storage";
774
+ "email-delivery": "email-delivery";
775
+ realtime: "realtime";
776
+ "outbound-http": "outbound-http";
777
+ "oauth-connect": "oauth-connect";
778
+ }>>>;
779
+ widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
780
+ id: z.ZodString;
781
+ entry: z.ZodString;
782
+ }, z.core.$strict>>>;
783
+ key: z.ZodString;
784
+ name: z.ZodString;
785
+ version: z.ZodString;
786
+ publisher: z.ZodObject<{
787
+ id: z.ZodString;
788
+ name: z.ZodString;
789
+ url: z.ZodOptional<z.ZodURL>;
790
+ }, z.core.$strict>;
791
+ license: z.ZodString;
792
+ description: z.ZodObject<{
793
+ key: z.ZodString;
794
+ fallback: z.ZodString;
795
+ }, z.core.$strict>;
796
+ kind: z.ZodLiteral<"add-on">;
797
+ manifestVersion: z.ZodLiteral<1>;
798
+ }, z.core.$strict>;
799
+ /**
800
+ * The envelope. A document with no `kind` is treated as an app before the union
801
+ * discriminates, which is what keeps every pre-wave-4 manifest valid.
802
+ */
803
+ export declare const manifestSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
804
+ compatibility: z.ZodObject<{
805
+ minAdminiumVersion: z.ZodString;
806
+ maxAdminiumVersion: z.ZodOptional<z.ZodString>;
807
+ requires: z.ZodOptional<z.ZodArray<z.ZodEnum<{
808
+ "hosted-only": "hosted-only";
809
+ "offline-required": "offline-required";
810
+ "receipt-printer": "receipt-printer";
811
+ "barcode-scanner": "barcode-scanner";
812
+ payments: "payments";
813
+ "file-storage": "file-storage";
814
+ "email-delivery": "email-delivery";
815
+ realtime: "realtime";
816
+ "outbound-http": "outbound-http";
817
+ "oauth-connect": "oauth-connect";
818
+ }>>>;
819
+ }, z.core.$strict>;
820
+ requiredSchema: z.ZodObject<{
821
+ tables: z.ZodArray<z.ZodObject<{
822
+ ref: z.ZodString;
823
+ columns: z.ZodArray<z.ZodObject<{
824
+ ref: z.ZodString;
825
+ type: z.ZodEnum<{
826
+ bigint: "bigint";
827
+ id: "id";
828
+ int: "int";
829
+ date: "date";
830
+ enum: "enum";
831
+ text: "text";
832
+ decimal: "decimal";
833
+ money: "money";
834
+ float: "float";
835
+ bool: "bool";
836
+ json: "json";
837
+ timestamptz: "timestamptz";
838
+ uuid: "uuid";
839
+ fk: "fk";
840
+ blob: "blob";
841
+ }>;
842
+ semantic: z.ZodOptional<z.ZodEnum<{
843
+ name: "name";
844
+ money: "money";
845
+ image: "image";
846
+ email: "email";
847
+ avatar: "avatar";
848
+ "geo-lat": "geo-lat";
849
+ "geo-lng": "geo-lng";
850
+ }>>;
851
+ role: z.ZodOptional<z.ZodEnum<{
852
+ pk: "pk";
853
+ created_at: "created_at";
854
+ updated_at: "updated_at";
855
+ }>>;
856
+ nullable: z.ZodOptional<z.ZodBoolean>;
857
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
858
+ references: z.ZodOptional<z.ZodString>;
859
+ }, z.core.$strict>>;
860
+ }, z.core.$strict>>;
861
+ }, z.core.$strict>;
862
+ pages: z.ZodArray<z.ZodObject<{
863
+ ref: z.ZodString;
864
+ template: z.ZodString;
865
+ title: z.ZodObject<{
866
+ key: z.ZodString;
867
+ fallback: z.ZodString;
868
+ }, z.core.$strict>;
869
+ nav: z.ZodObject<{
870
+ group: z.ZodString;
871
+ icon: z.ZodString;
872
+ order: z.ZodNumber;
873
+ }, z.core.$strict>;
874
+ bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
875
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
876
+ }, z.core.$strict>>;
877
+ roles: z.ZodOptional<z.ZodArray<z.ZodObject<{
878
+ key: z.ZodString;
879
+ name: z.ZodString;
880
+ cloneFrom: z.ZodOptional<z.ZodString>;
881
+ permissions: z.ZodOptional<z.ZodArray<z.ZodString>>;
882
+ }, z.core.$strict>>>;
883
+ settings: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
884
+ type: z.ZodLiteral<"string">;
885
+ default: z.ZodOptional<z.ZodString>;
886
+ key: z.ZodString;
887
+ required: z.ZodOptional<z.ZodBoolean>;
888
+ secret: z.ZodOptional<z.ZodBoolean>;
889
+ label: z.ZodOptional<z.ZodObject<{
890
+ key: z.ZodString;
891
+ fallback: z.ZodString;
892
+ }, z.core.$strict>>;
893
+ }, z.core.$strict>, z.ZodObject<{
894
+ type: z.ZodLiteral<"number">;
895
+ default: z.ZodOptional<z.ZodNumber>;
896
+ min: z.ZodOptional<z.ZodNumber>;
897
+ max: z.ZodOptional<z.ZodNumber>;
898
+ unit: z.ZodOptional<z.ZodString>;
899
+ key: z.ZodString;
900
+ required: z.ZodOptional<z.ZodBoolean>;
901
+ secret: z.ZodOptional<z.ZodBoolean>;
902
+ label: z.ZodOptional<z.ZodObject<{
903
+ key: z.ZodString;
904
+ fallback: z.ZodString;
905
+ }, z.core.$strict>>;
906
+ }, z.core.$strict>, z.ZodObject<{
907
+ type: z.ZodLiteral<"boolean">;
908
+ default: z.ZodOptional<z.ZodBoolean>;
909
+ key: z.ZodString;
910
+ required: z.ZodOptional<z.ZodBoolean>;
911
+ secret: z.ZodOptional<z.ZodBoolean>;
912
+ label: z.ZodOptional<z.ZodObject<{
913
+ key: z.ZodString;
914
+ fallback: z.ZodString;
915
+ }, z.core.$strict>>;
916
+ }, z.core.$strict>, z.ZodObject<{
917
+ type: z.ZodLiteral<"enum">;
918
+ enum: z.ZodArray<z.ZodString>;
919
+ default: z.ZodOptional<z.ZodString>;
920
+ key: z.ZodString;
921
+ required: z.ZodOptional<z.ZodBoolean>;
922
+ secret: z.ZodOptional<z.ZodBoolean>;
923
+ label: z.ZodOptional<z.ZodObject<{
924
+ key: z.ZodString;
925
+ fallback: z.ZodString;
926
+ }, z.core.$strict>>;
927
+ }, z.core.$strict>, z.ZodObject<{
928
+ type: z.ZodLiteral<"file">;
929
+ accept: z.ZodOptional<z.ZodArray<z.ZodString>>;
930
+ key: z.ZodString;
931
+ required: z.ZodOptional<z.ZodBoolean>;
932
+ secret: z.ZodOptional<z.ZodBoolean>;
933
+ label: z.ZodOptional<z.ZodObject<{
934
+ key: z.ZodString;
935
+ fallback: z.ZodString;
936
+ }, z.core.$strict>>;
937
+ }, z.core.$strict>, z.ZodObject<{
938
+ type: z.ZodLiteral<"json">;
939
+ default: z.ZodOptional<z.ZodUnknown>;
940
+ key: z.ZodString;
941
+ required: z.ZodOptional<z.ZodBoolean>;
942
+ secret: z.ZodOptional<z.ZodBoolean>;
943
+ label: z.ZodOptional<z.ZodObject<{
944
+ key: z.ZodString;
945
+ fallback: z.ZodString;
946
+ }, z.core.$strict>>;
947
+ }, z.core.$strict>], "type">>>;
948
+ seeds: z.ZodOptional<z.ZodArray<z.ZodObject<{
949
+ table: z.ZodString;
950
+ rows: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
951
+ file: z.ZodOptional<z.ZodString>;
952
+ }, z.core.$strict>>>;
953
+ widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
954
+ id: z.ZodString;
955
+ entry: z.ZodString;
956
+ }, z.core.$strict>>>;
957
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
958
+ "hosted-only": "hosted-only";
959
+ "offline-required": "offline-required";
960
+ "receipt-printer": "receipt-printer";
961
+ "barcode-scanner": "barcode-scanner";
962
+ payments: "payments";
963
+ "file-storage": "file-storage";
964
+ "email-delivery": "email-delivery";
965
+ realtime: "realtime";
966
+ "outbound-http": "outbound-http";
967
+ "oauth-connect": "oauth-connect";
968
+ }>>>;
969
+ frontend: z.ZodObject<{
970
+ kind: z.ZodEnum<{
971
+ spa: "spa";
972
+ electron: "electron";
973
+ none: "none";
974
+ }>;
975
+ entry: z.ZodOptional<z.ZodString>;
976
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
977
+ required: z.ZodBoolean;
978
+ example: z.ZodOptional<z.ZodString>;
979
+ }, z.core.$strict>>>;
980
+ }, z.core.$strict>;
981
+ categories: z.ZodArray<z.ZodEnum<{
982
+ commerce: "commerce";
983
+ hospitality: "hospitality";
984
+ operations: "operations";
985
+ crm: "crm";
986
+ "internal-tools": "internal-tools";
987
+ }>>;
988
+ key: z.ZodString;
989
+ name: z.ZodString;
990
+ version: z.ZodString;
991
+ publisher: z.ZodObject<{
992
+ id: z.ZodString;
993
+ name: z.ZodString;
994
+ url: z.ZodOptional<z.ZodURL>;
995
+ }, z.core.$strict>;
996
+ license: z.ZodString;
997
+ description: z.ZodObject<{
998
+ key: z.ZodString;
999
+ fallback: z.ZodString;
1000
+ }, z.core.$strict>;
1001
+ kind: z.ZodLiteral<"app">;
1002
+ manifestVersion: z.ZodLiteral<1>;
1003
+ }, z.core.$strict>, z.ZodObject<{
1004
+ categories: z.ZodArray<z.ZodEnum<{
1005
+ artwork: "artwork";
1006
+ delivery: "delivery";
1007
+ payments: "payments";
1008
+ email: "email";
1009
+ data: "data";
1010
+ }>>;
1011
+ compatibility: z.ZodObject<{
1012
+ minAdminiumVersion: z.ZodString;
1013
+ maxAdminiumVersion: z.ZodOptional<z.ZodString>;
1014
+ requires: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1015
+ "hosted-only": "hosted-only";
1016
+ "offline-required": "offline-required";
1017
+ "receipt-printer": "receipt-printer";
1018
+ "barcode-scanner": "barcode-scanner";
1019
+ payments: "payments";
1020
+ "file-storage": "file-storage";
1021
+ "email-delivery": "email-delivery";
1022
+ realtime: "realtime";
1023
+ "outbound-http": "outbound-http";
1024
+ "oauth-connect": "oauth-connect";
1025
+ }>>>;
1026
+ }, z.core.$strict>;
1027
+ addOn: z.ZodObject<{
1028
+ attaches: z.ZodArray<z.ZodObject<{
1029
+ app: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodString]>;
1030
+ range: z.ZodOptional<z.ZodString>;
1031
+ table: z.ZodOptional<z.ZodString>;
1032
+ }, z.core.$strict>>;
1033
+ provides: z.ZodOptional<z.ZodArray<z.ZodObject<{
1034
+ contract: z.ZodEnum<{
1035
+ "artwork-source": "artwork-source";
1036
+ "shipping-carrier": "shipping-carrier";
1037
+ "product-personalizer": "product-personalizer";
1038
+ }>;
1039
+ version: z.ZodNumber;
1040
+ server: z.ZodString;
1041
+ }, z.core.$strict>>>;
1042
+ consumes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1043
+ contract: z.ZodEnum<{
1044
+ "artwork-source": "artwork-source";
1045
+ "shipping-carrier": "shipping-carrier";
1046
+ "product-personalizer": "product-personalizer";
1047
+ }>;
1048
+ version: z.ZodNumber;
1049
+ }, z.core.$strict>>>;
1050
+ slots: z.ZodOptional<z.ZodArray<z.ZodObject<{
1051
+ slot: z.ZodEnum<{
1052
+ "artwork.sources": "artwork.sources";
1053
+ "checkout.delivery.methods": "checkout.delivery.methods";
1054
+ "order.dispatch.panel": "order.dispatch.panel";
1055
+ "order.dispatch.actions": "order.dispatch.actions";
1056
+ "settings.add-on.panel": "settings.add-on.panel";
1057
+ "nav.add-on.routes": "nav.add-on.routes";
1058
+ "product.options.personalize": "product.options.personalize";
1059
+ "cart.line.preview": "cart.line.preview";
1060
+ "product.admin.panel": "product.admin.panel";
1061
+ "order.line.actions": "order.line.actions";
1062
+ "record.editor.panel": "record.editor.panel";
1063
+ }>;
1064
+ client: z.ZodString;
1065
+ order: z.ZodNumber;
1066
+ }, z.core.$strict>>>;
1067
+ events: z.ZodOptional<z.ZodArray<z.ZodObject<{
1068
+ on: z.ZodString;
1069
+ server: z.ZodString;
1070
+ }, z.core.$strict>>>;
1071
+ connect: z.ZodObject<{
1072
+ kind: z.ZodEnum<{
1073
+ none: "none";
1074
+ "api-key": "api-key";
1075
+ oauth2: "oauth2";
1076
+ }>;
1077
+ authorizeUrl: z.ZodOptional<z.ZodURL>;
1078
+ tokenUrl: z.ZodOptional<z.ZodURL>;
1079
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1080
+ }, z.core.$strict>;
1081
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1082
+ network: z.ZodOptional<z.ZodObject<{
1083
+ allow: z.ZodArray<z.ZodString>;
1084
+ }, z.core.$strict>>;
1085
+ publicSettings: z.ZodOptional<z.ZodArray<z.ZodString>>;
1086
+ demoTransport: z.ZodOptional<z.ZodString>;
1087
+ }, z.core.$strict>;
1088
+ requiredSchema: z.ZodOptional<z.ZodObject<{
1089
+ tables: z.ZodArray<z.ZodObject<{
1090
+ ref: z.ZodString;
1091
+ columns: z.ZodArray<z.ZodObject<{
1092
+ ref: z.ZodString;
1093
+ type: z.ZodEnum<{
1094
+ bigint: "bigint";
1095
+ id: "id";
1096
+ int: "int";
1097
+ date: "date";
1098
+ enum: "enum";
1099
+ text: "text";
1100
+ decimal: "decimal";
1101
+ money: "money";
1102
+ float: "float";
1103
+ bool: "bool";
1104
+ json: "json";
1105
+ timestamptz: "timestamptz";
1106
+ uuid: "uuid";
1107
+ fk: "fk";
1108
+ blob: "blob";
1109
+ }>;
1110
+ semantic: z.ZodOptional<z.ZodEnum<{
1111
+ name: "name";
1112
+ money: "money";
1113
+ image: "image";
1114
+ email: "email";
1115
+ avatar: "avatar";
1116
+ "geo-lat": "geo-lat";
1117
+ "geo-lng": "geo-lng";
1118
+ }>>;
1119
+ role: z.ZodOptional<z.ZodEnum<{
1120
+ pk: "pk";
1121
+ created_at: "created_at";
1122
+ updated_at: "updated_at";
1123
+ }>>;
1124
+ nullable: z.ZodOptional<z.ZodBoolean>;
1125
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
1126
+ references: z.ZodOptional<z.ZodString>;
1127
+ }, z.core.$strict>>;
1128
+ }, z.core.$strict>>;
1129
+ }, z.core.$strict>>;
1130
+ settings: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1131
+ type: z.ZodLiteral<"string">;
1132
+ default: z.ZodOptional<z.ZodString>;
1133
+ key: z.ZodString;
1134
+ required: z.ZodOptional<z.ZodBoolean>;
1135
+ secret: z.ZodOptional<z.ZodBoolean>;
1136
+ label: z.ZodOptional<z.ZodObject<{
1137
+ key: z.ZodString;
1138
+ fallback: z.ZodString;
1139
+ }, z.core.$strict>>;
1140
+ }, z.core.$strict>, z.ZodObject<{
1141
+ type: z.ZodLiteral<"number">;
1142
+ default: z.ZodOptional<z.ZodNumber>;
1143
+ min: z.ZodOptional<z.ZodNumber>;
1144
+ max: z.ZodOptional<z.ZodNumber>;
1145
+ unit: z.ZodOptional<z.ZodString>;
1146
+ key: z.ZodString;
1147
+ required: z.ZodOptional<z.ZodBoolean>;
1148
+ secret: z.ZodOptional<z.ZodBoolean>;
1149
+ label: z.ZodOptional<z.ZodObject<{
1150
+ key: z.ZodString;
1151
+ fallback: z.ZodString;
1152
+ }, z.core.$strict>>;
1153
+ }, z.core.$strict>, z.ZodObject<{
1154
+ type: z.ZodLiteral<"boolean">;
1155
+ default: z.ZodOptional<z.ZodBoolean>;
1156
+ key: z.ZodString;
1157
+ required: z.ZodOptional<z.ZodBoolean>;
1158
+ secret: z.ZodOptional<z.ZodBoolean>;
1159
+ label: z.ZodOptional<z.ZodObject<{
1160
+ key: z.ZodString;
1161
+ fallback: z.ZodString;
1162
+ }, z.core.$strict>>;
1163
+ }, z.core.$strict>, z.ZodObject<{
1164
+ type: z.ZodLiteral<"enum">;
1165
+ enum: z.ZodArray<z.ZodString>;
1166
+ default: z.ZodOptional<z.ZodString>;
1167
+ key: z.ZodString;
1168
+ required: z.ZodOptional<z.ZodBoolean>;
1169
+ secret: z.ZodOptional<z.ZodBoolean>;
1170
+ label: z.ZodOptional<z.ZodObject<{
1171
+ key: z.ZodString;
1172
+ fallback: z.ZodString;
1173
+ }, z.core.$strict>>;
1174
+ }, z.core.$strict>, z.ZodObject<{
1175
+ type: z.ZodLiteral<"file">;
1176
+ accept: z.ZodOptional<z.ZodArray<z.ZodString>>;
1177
+ key: z.ZodString;
1178
+ required: z.ZodOptional<z.ZodBoolean>;
1179
+ secret: z.ZodOptional<z.ZodBoolean>;
1180
+ label: z.ZodOptional<z.ZodObject<{
1181
+ key: z.ZodString;
1182
+ fallback: z.ZodString;
1183
+ }, z.core.$strict>>;
1184
+ }, z.core.$strict>, z.ZodObject<{
1185
+ type: z.ZodLiteral<"json">;
1186
+ default: z.ZodOptional<z.ZodUnknown>;
1187
+ key: z.ZodString;
1188
+ required: z.ZodOptional<z.ZodBoolean>;
1189
+ secret: z.ZodOptional<z.ZodBoolean>;
1190
+ label: z.ZodOptional<z.ZodObject<{
1191
+ key: z.ZodString;
1192
+ fallback: z.ZodString;
1193
+ }, z.core.$strict>>;
1194
+ }, z.core.$strict>], "type">>>;
1195
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1196
+ "hosted-only": "hosted-only";
1197
+ "offline-required": "offline-required";
1198
+ "receipt-printer": "receipt-printer";
1199
+ "barcode-scanner": "barcode-scanner";
1200
+ payments: "payments";
1201
+ "file-storage": "file-storage";
1202
+ "email-delivery": "email-delivery";
1203
+ realtime: "realtime";
1204
+ "outbound-http": "outbound-http";
1205
+ "oauth-connect": "oauth-connect";
1206
+ }>>>;
1207
+ widgets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1208
+ id: z.ZodString;
1209
+ entry: z.ZodString;
1210
+ }, z.core.$strict>>>;
1211
+ key: z.ZodString;
1212
+ name: z.ZodString;
1213
+ version: z.ZodString;
1214
+ publisher: z.ZodObject<{
1215
+ id: z.ZodString;
1216
+ name: z.ZodString;
1217
+ url: z.ZodOptional<z.ZodURL>;
1218
+ }, z.core.$strict>;
1219
+ license: z.ZodString;
1220
+ description: z.ZodObject<{
1221
+ key: z.ZodString;
1222
+ fallback: z.ZodString;
1223
+ }, z.core.$strict>;
1224
+ kind: z.ZodLiteral<"add-on">;
1225
+ manifestVersion: z.ZodLiteral<1>;
1226
+ }, z.core.$strict>], "kind">>;
1227
+ export type AppManifest = z.infer<typeof appManifestSchema>;
1228
+ export type AddOnManifest = z.infer<typeof addOnManifestSchema>;
1229
+ export type Manifest = AppManifest | AddOnManifest;
1230
+ export type { AddOnBlock };
1231
+ /** Narrowing helper — the discriminant is the only thing worth branching on. */
1232
+ export declare function isAddOnManifest(m: Manifest): m is AddOnManifest;
1233
+ /**
1234
+ * Cross-block rules the envelope cannot express, each with its issue code
1235
+ * (24 §5.3). Runs only for `kind: "add-on"`; returns [] for an app.
1236
+ */
1237
+ export declare function addOnIssues(m: Manifest, ctx?: {
1238
+ /** Installed app keys, so `attaches` can be checked. Omit to skip. */
1239
+ knownAppKeys?: readonly string[];
1240
+ /** The host app's `requiredSchema` table refs. Omit to skip the scope check. */
1241
+ hostTables?: readonly string[];
1242
+ }): {
1243
+ code: string;
1244
+ path: string;
1245
+ message: string;
1246
+ }[];
1247
+ /**
1248
+ * Numeric semver compare on the release triple (pre-release/build ignored —
1249
+ * enough for the compatibility-window and upgrade ordering checks). Returns
1250
+ * <0, 0, >0. Exported for the installer's upgrade rule (§4.3).
1251
+ */
1252
+ export declare function compareSemver(a: string, b: string): number;
1253
+ //# sourceMappingURL=schema.d.ts.map