@adminiumjs/manifest 0.1.2 → 0.2.2-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +732 -9
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +171 -10
- package/dist/schema.js.map +1 -1
- package/dist/validate.d.ts +11 -0
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +14 -1
- package/dist/validate.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
* server-side installer land in later waves and consume a validated manifest.
|
|
7
7
|
*/
|
|
8
8
|
export declare const PACKAGE_NAME = "@adminium/manifest";
|
|
9
|
-
export { MANIFEST_VERSION, MANIFEST_CATEGORIES, MANIFEST_CAPABILITIES, COLUMN_TYPES, COLUMN_SEMANTICS, COLUMN_ROLES, FRONTEND_KINDS, FIRST_PARTY_PUBLISHER_ID, manifestSchema, identitySchema, compatibilitySchema, requiredSchemaSchema, requiredTableSchema, requiredColumnSchema, pageSchema, roleSchema, settingSchema, seedSchema, frontendSchema, capabilitySchema, categorySchema, publisherSchema, i18nMessageSchema, compareSemver, type Manifest, type Capability, type Publisher, type I18nMessage, } from './schema.js';
|
|
9
|
+
export { MANIFEST_VERSION, MANIFEST_KINDS, MANIFEST_CATEGORIES, MANIFEST_CAPABILITIES, RESERVED_KEYS, COLUMN_TYPES, COLUMN_SEMANTICS, COLUMN_ROLES, FRONTEND_KINDS, FIRST_PARTY_PUBLISHER_ID, manifestSchema, appManifestSchema, addOnManifestSchema, manifestKindSchema, addOnIssues, isAddOnManifest, identitySchema, compatibilitySchema, requiredSchemaSchema, requiredTableSchema, requiredColumnSchema, pageSchema, roleSchema, settingSchema, seedSchema, frontendSchema, capabilitySchema, categorySchema, publisherSchema, i18nMessageSchema, compareSemver, type Manifest, type AppManifest, type AddOnManifest, type ManifestKind, type AddOnBlock, type Capability, type Publisher, type I18nMessage, } from './schema.js';
|
|
10
10
|
export { validateManifest, parseManifest, type ValidateManifestResult, type ValidateManifestOptions, type ManifestIssue, } from './validate.js';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,uBAAuB,CAAC;AAEjD,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,UAAU,EACV,aAAa,EACb,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,aAAa,GACnB,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
1
2
|
/**
|
|
2
3
|
* @adminium/manifest — Micro-SaaS manifest spec v1 (13-marketplace.md §2).
|
|
3
4
|
*
|
|
@@ -6,6 +7,6 @@
|
|
|
6
7
|
* server-side installer land in later waves and consume a validated manifest.
|
|
7
8
|
*/
|
|
8
9
|
export const PACKAGE_NAME = '@adminium/manifest';
|
|
9
|
-
export { MANIFEST_VERSION, MANIFEST_CATEGORIES, MANIFEST_CAPABILITIES, COLUMN_TYPES, COLUMN_SEMANTICS, COLUMN_ROLES, FRONTEND_KINDS, FIRST_PARTY_PUBLISHER_ID, manifestSchema, identitySchema, compatibilitySchema, requiredSchemaSchema, requiredTableSchema, requiredColumnSchema, pageSchema, roleSchema, settingSchema, seedSchema, frontendSchema, capabilitySchema, categorySchema, publisherSchema, i18nMessageSchema, compareSemver, } from './schema.js';
|
|
10
|
+
export { MANIFEST_VERSION, MANIFEST_KINDS, MANIFEST_CATEGORIES, MANIFEST_CAPABILITIES, RESERVED_KEYS, COLUMN_TYPES, COLUMN_SEMANTICS, COLUMN_ROLES, FRONTEND_KINDS, FIRST_PARTY_PUBLISHER_ID, manifestSchema, appManifestSchema, addOnManifestSchema, manifestKindSchema, addOnIssues, isAddOnManifest, identitySchema, compatibilitySchema, requiredSchemaSchema, requiredTableSchema, requiredColumnSchema, pageSchema, roleSchema, settingSchema, seedSchema, frontendSchema, capabilitySchema, categorySchema, publisherSchema, i18nMessageSchema, compareSemver, } from './schema.js';
|
|
10
11
|
export { validateManifest, parseManifest, } from './validate.js';
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAEjD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,UAAU,EACV,aAAa,EACb,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,aAAa,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAC;AAEjD,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,UAAU,EACV,aAAa,EACb,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,aAAa,GASd,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,gBAAgB,EAChB,aAAa,GAId,MAAM,eAAe,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -8,9 +8,23 @@
|
|
|
8
8
|
* The install PLANNER (planInstall / requiredSchema → create-or-map diff) and
|
|
9
9
|
* the server-side installer are later layers that consume a validated manifest.
|
|
10
10
|
*/
|
|
11
|
+
import { type AddOnBlock } from '@adminium/add-on-contracts';
|
|
11
12
|
import { z } from 'zod';
|
|
12
13
|
/** Integer spec version, frozen at 1 for Adminium 1.x (§2, 01 §8). */
|
|
13
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];
|
|
14
28
|
/** An i18n message: a catalog key plus the English fallback rendered if absent. */
|
|
15
29
|
export declare const i18nMessageSchema: z.ZodObject<{
|
|
16
30
|
key: z.ZodString;
|
|
@@ -34,7 +48,11 @@ export declare const publisherSchema: z.ZodObject<{
|
|
|
34
48
|
url: z.ZodOptional<z.ZodURL>;
|
|
35
49
|
}, z.core.$strict>;
|
|
36
50
|
export type Publisher = z.infer<typeof publisherSchema>;
|
|
37
|
-
|
|
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: {
|
|
38
56
|
key: z.ZodString;
|
|
39
57
|
name: z.ZodString;
|
|
40
58
|
version: z.ZodString;
|
|
@@ -48,6 +66,8 @@ export declare const identitySchema: z.ZodObject<{
|
|
|
48
66
|
key: z.ZodString;
|
|
49
67
|
fallback: z.ZodString;
|
|
50
68
|
}, z.core.$strict>;
|
|
69
|
+
};
|
|
70
|
+
export declare const identitySchema: z.ZodObject<{
|
|
51
71
|
categories: z.ZodArray<z.ZodEnum<{
|
|
52
72
|
commerce: "commerce";
|
|
53
73
|
hospitality: "hospitality";
|
|
@@ -55,8 +75,26 @@ export declare const identitySchema: z.ZodObject<{
|
|
|
55
75
|
crm: "crm";
|
|
56
76
|
"internal-tools": "internal-tools";
|
|
57
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>;
|
|
58
91
|
}, z.core.$strict>;
|
|
59
|
-
|
|
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"];
|
|
60
98
|
export declare const capabilitySchema: z.ZodEnum<{
|
|
61
99
|
"hosted-only": "hosted-only";
|
|
62
100
|
"offline-required": "offline-required";
|
|
@@ -66,6 +104,8 @@ export declare const capabilitySchema: z.ZodEnum<{
|
|
|
66
104
|
"file-storage": "file-storage";
|
|
67
105
|
"email-delivery": "email-delivery";
|
|
68
106
|
realtime: "realtime";
|
|
107
|
+
"outbound-http": "outbound-http";
|
|
108
|
+
"oauth-connect": "oauth-connect";
|
|
69
109
|
}>;
|
|
70
110
|
export type Capability = z.infer<typeof capabilitySchema>;
|
|
71
111
|
export declare const compatibilitySchema: z.ZodObject<{
|
|
@@ -80,6 +120,8 @@ export declare const compatibilitySchema: z.ZodObject<{
|
|
|
80
120
|
"file-storage": "file-storage";
|
|
81
121
|
"email-delivery": "email-delivery";
|
|
82
122
|
realtime: "realtime";
|
|
123
|
+
"outbound-http": "outbound-http";
|
|
124
|
+
"oauth-connect": "oauth-connect";
|
|
83
125
|
}>>>;
|
|
84
126
|
}, z.core.$strict>;
|
|
85
127
|
/** Abstract column types the introspection engine emits (§2.5, research §15.2). */
|
|
@@ -324,7 +366,7 @@ export declare const frontendSchema: z.ZodObject<{
|
|
|
324
366
|
example: z.ZodOptional<z.ZodString>;
|
|
325
367
|
}, z.core.$strict>>>;
|
|
326
368
|
}, z.core.$strict>;
|
|
327
|
-
export declare const
|
|
369
|
+
export declare const appManifestSchema: z.ZodObject<{
|
|
328
370
|
compatibility: z.ZodObject<{
|
|
329
371
|
minAdminiumVersion: z.ZodString;
|
|
330
372
|
maxAdminiumVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -337,6 +379,8 @@ export declare const manifestSchema: z.ZodObject<{
|
|
|
337
379
|
"file-storage": "file-storage";
|
|
338
380
|
"email-delivery": "email-delivery";
|
|
339
381
|
realtime: "realtime";
|
|
382
|
+
"outbound-http": "outbound-http";
|
|
383
|
+
"oauth-connect": "oauth-connect";
|
|
340
384
|
}>>>;
|
|
341
385
|
}, z.core.$strict>;
|
|
342
386
|
requiredSchema: z.ZodObject<{
|
|
@@ -485,6 +529,8 @@ export declare const manifestSchema: z.ZodObject<{
|
|
|
485
529
|
"file-storage": "file-storage";
|
|
486
530
|
"email-delivery": "email-delivery";
|
|
487
531
|
realtime: "realtime";
|
|
532
|
+
"outbound-http": "outbound-http";
|
|
533
|
+
"oauth-connect": "oauth-connect";
|
|
488
534
|
}>>>;
|
|
489
535
|
frontend: z.ZodObject<{
|
|
490
536
|
kind: z.ZodEnum<{
|
|
@@ -498,6 +544,13 @@ export declare const manifestSchema: z.ZodObject<{
|
|
|
498
544
|
example: z.ZodOptional<z.ZodString>;
|
|
499
545
|
}, z.core.$strict>>>;
|
|
500
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
|
+
}>>;
|
|
501
554
|
key: z.ZodString;
|
|
502
555
|
name: z.ZodString;
|
|
503
556
|
version: z.ZodString;
|
|
@@ -511,16 +564,686 @@ export declare const manifestSchema: z.ZodObject<{
|
|
|
511
564
|
key: z.ZodString;
|
|
512
565
|
fallback: z.ZodString;
|
|
513
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<{
|
|
514
576
|
categories: z.ZodArray<z.ZodEnum<{
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
577
|
+
artwork: "artwork";
|
|
578
|
+
delivery: "delivery";
|
|
579
|
+
payments: "payments";
|
|
580
|
+
email: "email";
|
|
581
|
+
data: "data";
|
|
520
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">;
|
|
521
797
|
manifestVersion: z.ZodLiteral<1>;
|
|
522
798
|
}, z.core.$strict>;
|
|
523
|
-
|
|
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
|
+
}[];
|
|
524
1247
|
/**
|
|
525
1248
|
* Numeric semver compare on the release triple (pre-release/build ignored —
|
|
526
1249
|
* enough for the compatibility-window and upgrade ordering checks). Returns
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AAEH,OAAO,EAIL,KAAK,UA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ACjC,gFAAgF;IAChF,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B,GACL;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CAuFnD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAU1D"}
|
package/dist/schema.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
1
2
|
/**
|
|
2
3
|
* Manifest spec v1 (13-marketplace.md §2), frozen at `manifestVersion: 1` for
|
|
3
4
|
* all of Adminium 1.x. Pure Zod v4 + types — no `node:` imports — so the
|
|
@@ -8,9 +9,19 @@
|
|
|
8
9
|
* The install PLANNER (planInstall / requiredSchema → create-or-map diff) and
|
|
9
10
|
* the server-side installer are later layers that consume a validated manifest.
|
|
10
11
|
*/
|
|
12
|
+
import { addOnBlockSchema, addOnCategorySchema, isSlotId, } from '@adminium/add-on-contracts';
|
|
11
13
|
import { z } from 'zod';
|
|
12
14
|
/** Integer spec version, frozen at 1 for Adminium 1.x (§2, 01 §8). */
|
|
13
15
|
export const MANIFEST_VERSION = 1;
|
|
16
|
+
/**
|
|
17
|
+
* What kind of thing this manifest describes (24 §5.2). OPTIONAL, defaulting to
|
|
18
|
+
* `"app"` — which is the whole reason `manifestVersion` does not move: every
|
|
19
|
+
* manifest written before wave 4 stays valid unchanged, and an additive
|
|
20
|
+
* optional field with a back-compatible default is how a frozen spec grows
|
|
21
|
+
* without lying about its version.
|
|
22
|
+
*/
|
|
23
|
+
export const MANIFEST_KINDS = ['app', 'add-on'];
|
|
24
|
+
export const manifestKindSchema = z.enum(MANIFEST_KINDS);
|
|
14
25
|
/** strict semver — `major.minor.patch` with optional pre-release/build. */
|
|
15
26
|
const SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
|
|
16
27
|
const semver = z.string().regex(SEMVER, 'must be strict semver (major.minor.patch)');
|
|
@@ -40,8 +51,11 @@ export const publisherSchema = z
|
|
|
40
51
|
url: z.url().max(200).optional(),
|
|
41
52
|
})
|
|
42
53
|
.strict();
|
|
43
|
-
|
|
44
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Everything both kinds share. `categories` is deliberately NOT here: it splits
|
|
56
|
+
* by kind (an add-on is not a vertical — D2), so each branch adds its own.
|
|
57
|
+
*/
|
|
58
|
+
export const identityShape = {
|
|
45
59
|
key: z.string().regex(/^[a-z][a-z0-9-]{1,79}$/, 'key must be ^[a-z][a-z0-9-]{1,79}$'),
|
|
46
60
|
name: z.string().min(1).max(80),
|
|
47
61
|
version: semver,
|
|
@@ -49,9 +63,18 @@ export const identitySchema = z
|
|
|
49
63
|
// SPDX id — the FRONTEND's license (informational; core is AGPL-3.0).
|
|
50
64
|
license: z.string().min(1).max(80),
|
|
51
65
|
description: i18nMessageSchema,
|
|
66
|
+
};
|
|
67
|
+
export const identitySchema = z
|
|
68
|
+
.object({
|
|
69
|
+
...identityShape,
|
|
52
70
|
categories: z.array(categorySchema).min(1),
|
|
53
71
|
})
|
|
54
72
|
.strict();
|
|
73
|
+
/**
|
|
74
|
+
* Keys no app or add-on may ever take, because they would shadow a storefront
|
|
75
|
+
* route or a data file (D17). Apps and add-ons share one key namespace.
|
|
76
|
+
*/
|
|
77
|
+
export const RESERVED_KEYS = ['apps', 'add-on', 'add-ons', 'demo', 'index', 'search'];
|
|
55
78
|
// ── §2.11 capabilities ───────────────────────────────────────────────────────
|
|
56
79
|
export const MANIFEST_CAPABILITIES = [
|
|
57
80
|
'hosted-only',
|
|
@@ -62,6 +85,14 @@ export const MANIFEST_CAPABILITIES = [
|
|
|
62
85
|
'file-storage',
|
|
63
86
|
'email-delivery',
|
|
64
87
|
'realtime',
|
|
88
|
+
// Added by wave 4 (24 D3). Adding a capability key is a THREE-place change
|
|
89
|
+
// and all three land together: here, `CAP_ICONS` in the website's
|
|
90
|
+
// marketplace data (note `CAP_META` derives from it), and a
|
|
91
|
+
// `marketplaceData.cap.<key>` label in all eight locales.
|
|
92
|
+
/** The add-on's server code calls a third-party API. */
|
|
93
|
+
'outbound-http',
|
|
94
|
+
/** The host runs an OAuth 2.0 authorization-code flow on the add-on's behalf. */
|
|
95
|
+
'oauth-connect',
|
|
65
96
|
];
|
|
66
97
|
export const capabilitySchema = z.enum(MANIFEST_CAPABILITIES);
|
|
67
98
|
// ── §2.4 compatibility ───────────────────────────────────────────────────────
|
|
@@ -239,9 +270,23 @@ export const frontendSchema = z
|
|
|
239
270
|
env: z.record(z.string(), frontendEnvVarSchema).optional(),
|
|
240
271
|
})
|
|
241
272
|
.strict();
|
|
242
|
-
|
|
243
|
-
|
|
273
|
+
/** §2.11 — hosted-only and offline-required are mutually exclusive. */
|
|
274
|
+
const capabilitiesNotContradictory = (m) => !((m.capabilities?.includes('hosted-only') ?? false) &&
|
|
275
|
+
(m.capabilities?.includes('offline-required') ?? false));
|
|
276
|
+
/** maxAdminiumVersion (exclusive) must be strictly above the min. */
|
|
277
|
+
const compatibilityWindowOrdered = (m) => m.compatibility.maxAdminiumVersion === undefined ||
|
|
278
|
+
compareSemver(m.compatibility.maxAdminiumVersion, m.compatibility.minAdminiumVersion) > 0;
|
|
279
|
+
const CAPS_MESSAGE = {
|
|
280
|
+
message: 'hosted-only and offline-required are mutually exclusive',
|
|
281
|
+
path: ['capabilities'],
|
|
282
|
+
};
|
|
283
|
+
const WINDOW_MESSAGE = {
|
|
284
|
+
message: 'maxAdminiumVersion must be greater than minAdminiumVersion',
|
|
285
|
+
path: ['compatibility'],
|
|
286
|
+
};
|
|
287
|
+
export const appManifestSchema = z
|
|
244
288
|
.object({
|
|
289
|
+
kind: z.literal('app'),
|
|
245
290
|
manifestVersion: z.literal(MANIFEST_VERSION),
|
|
246
291
|
...identitySchema.shape,
|
|
247
292
|
compatibility: compatibilitySchema,
|
|
@@ -255,12 +300,128 @@ export const manifestSchema = z
|
|
|
255
300
|
frontend: frontendSchema,
|
|
256
301
|
})
|
|
257
302
|
.strict()
|
|
258
|
-
|
|
259
|
-
.refine(
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
303
|
+
.refine(capabilitiesNotContradictory, { ...CAPS_MESSAGE, path: [...CAPS_MESSAGE.path] })
|
|
304
|
+
.refine(compatibilityWindowOrdered, { ...WINDOW_MESSAGE, path: [...WINDOW_MESSAGE.path] });
|
|
305
|
+
/**
|
|
306
|
+
* `pages` and `frontend` are absent from this branch on purpose (24 §5.7 item
|
|
307
|
+
* 6): an add-on cannot install pages, roles or a frontend, and leaving the
|
|
308
|
+
* fields off the schema entirely is a stronger guarantee than a lint rule.
|
|
309
|
+
*/
|
|
310
|
+
export const addOnManifestSchema = z
|
|
311
|
+
.object({
|
|
312
|
+
kind: z.literal('add-on'),
|
|
313
|
+
manifestVersion: z.literal(MANIFEST_VERSION),
|
|
314
|
+
...identityShape,
|
|
315
|
+
categories: z.array(addOnCategorySchema).min(1),
|
|
316
|
+
compatibility: compatibilitySchema,
|
|
317
|
+
addOn: addOnBlockSchema,
|
|
318
|
+
// An add-on may bring its own tables — kept on disconnect (D16).
|
|
319
|
+
requiredSchema: requiredSchemaSchema.optional(),
|
|
320
|
+
settings: z.array(settingSchema).optional(),
|
|
321
|
+
capabilities: z.array(capabilitySchema).optional(),
|
|
322
|
+
widgets: z.array(manifestWidgetSchema).optional(),
|
|
323
|
+
})
|
|
324
|
+
.strict()
|
|
325
|
+
.refine(capabilitiesNotContradictory, { ...CAPS_MESSAGE, path: [...CAPS_MESSAGE.path] })
|
|
326
|
+
.refine(compatibilityWindowOrdered, { ...WINDOW_MESSAGE, path: [...WINDOW_MESSAGE.path] });
|
|
327
|
+
/**
|
|
328
|
+
* The envelope. A document with no `kind` is treated as an app before the union
|
|
329
|
+
* discriminates, which is what keeps every pre-wave-4 manifest valid.
|
|
330
|
+
*/
|
|
331
|
+
export const manifestSchema = z.preprocess((v) => typeof v === 'object' && v !== null && !Array.isArray(v) && v.kind === undefined
|
|
332
|
+
? { ...v, kind: 'app' }
|
|
333
|
+
: v, z.discriminatedUnion('kind', [appManifestSchema, addOnManifestSchema]));
|
|
334
|
+
/** Narrowing helper — the discriminant is the only thing worth branching on. */
|
|
335
|
+
export function isAddOnManifest(m) {
|
|
336
|
+
return m.kind === 'add-on';
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Cross-block rules the envelope cannot express, each with its issue code
|
|
340
|
+
* (24 §5.3). Runs only for `kind: "add-on"`; returns [] for an app.
|
|
341
|
+
*/
|
|
342
|
+
export function addOnIssues(m, ctx = {}) {
|
|
343
|
+
if (!isAddOnManifest(m))
|
|
344
|
+
return [];
|
|
345
|
+
const out = [];
|
|
346
|
+
const block = m.addOn;
|
|
347
|
+
// ATTACH_TARGET_UNKNOWN — every target is a known app key or "*".
|
|
348
|
+
if (ctx.knownAppKeys !== undefined) {
|
|
349
|
+
block.attaches.forEach((target, i) => {
|
|
350
|
+
if (target.app !== '*' && !ctx.knownAppKeys.includes(target.app)) {
|
|
351
|
+
out.push({
|
|
352
|
+
code: 'ATTACH_TARGET_UNKNOWN',
|
|
353
|
+
path: `addOn.attaches.${i}.app`,
|
|
354
|
+
message: `attaches to an unknown app key "${target.app}"`,
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
// SLOT_UNKNOWN — belt and braces; the schema enum already refuses these.
|
|
360
|
+
(block.slots ?? []).forEach((fill, i) => {
|
|
361
|
+
if (!isSlotId(fill.slot)) {
|
|
362
|
+
out.push({
|
|
363
|
+
code: 'SLOT_UNKNOWN',
|
|
364
|
+
path: `addOn.slots.${i}.slot`,
|
|
365
|
+
message: `"${fill.slot}" is not in the closed slot registry`,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
// SCOPE_OUT_OF_RANGE — a `records:<table>:<verb>` scope must name a table this
|
|
370
|
+
// add-on can actually reach: one of the host app's, or one of its own.
|
|
371
|
+
const reachable = new Set([
|
|
372
|
+
...(m.requiredSchema?.tables ?? []).map((t) => t.ref),
|
|
373
|
+
...(ctx.hostTables ?? []),
|
|
374
|
+
]);
|
|
375
|
+
(block.scopes ?? []).forEach((scope, i) => {
|
|
376
|
+
const [domain, table] = scope.split(':');
|
|
377
|
+
if (domain !== 'records')
|
|
378
|
+
return;
|
|
379
|
+
if (table === undefined || table.length === 0) {
|
|
380
|
+
out.push({
|
|
381
|
+
code: 'SCOPE_OUT_OF_RANGE',
|
|
382
|
+
path: `addOn.scopes.${i}`,
|
|
383
|
+
message: `"${scope}" names no table`,
|
|
384
|
+
});
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
if (ctx.hostTables !== undefined && !reachable.has(table)) {
|
|
388
|
+
out.push({
|
|
389
|
+
code: 'SCOPE_OUT_OF_RANGE',
|
|
390
|
+
path: `addOn.scopes.${i}`,
|
|
391
|
+
message: `"${scope}" reaches a table neither the host app nor this add-on declares`,
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
// NETWORK_ALLOW_REQUIRED — outbound-http without an allow-list is a hole.
|
|
396
|
+
const wantsHttp = m.capabilities?.includes('outbound-http') ?? false;
|
|
397
|
+
if (wantsHttp && (block.network?.allow.length ?? 0) === 0) {
|
|
398
|
+
out.push({
|
|
399
|
+
code: 'NETWORK_ALLOW_REQUIRED',
|
|
400
|
+
path: 'addOn.network.allow',
|
|
401
|
+
message: 'outbound-http requires a non-empty allow-list of exact https hostnames',
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
// CAPABILITY_CONFLICT — an oauth2 connect needs the capability that runs it.
|
|
405
|
+
if (block.connect.kind === 'oauth2' && !(m.capabilities?.includes('oauth-connect') ?? false)) {
|
|
406
|
+
out.push({
|
|
407
|
+
code: 'CAPABILITY_CONFLICT',
|
|
408
|
+
path: 'capabilities',
|
|
409
|
+
message: 'connect.kind "oauth2" requires the oauth-connect capability',
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
// FRONTEND_SECRET_LEAK — publicSettings may never name a secret setting.
|
|
413
|
+
const secrets = new Set((m.settings ?? []).filter((s) => s.secret === true).map((s) => s.key));
|
|
414
|
+
(block.publicSettings ?? []).forEach((key, i) => {
|
|
415
|
+
if (secrets.has(key)) {
|
|
416
|
+
out.push({
|
|
417
|
+
code: 'FRONTEND_SECRET_LEAK',
|
|
418
|
+
path: `addOn.publicSettings.${i}`,
|
|
419
|
+
message: `"${key}" is marked secret and must never reach the client bundle`,
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
return out;
|
|
424
|
+
}
|
|
264
425
|
/**
|
|
265
426
|
* Numeric semver compare on the release triple (pre-release/build ignored —
|
|
266
427
|
* enough for the compatibility-window and upgrade ordering checks). Returns
|
package/dist/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sEAAsE;AACtE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,2EAA2E;AAC3E,MAAM,MAAM,GACV,2HAA2H,CAAC;AAC9H,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,2CAA2C,CAAC,CAAC;AAErF,mFAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,G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AE,GAAG,EAAE,CAAC;AACvC,CAAC"}
|
package/dist/validate.d.ts
CHANGED
|
@@ -9,13 +9,24 @@ export interface ManifestIssue {
|
|
|
9
9
|
/** Dotted path to the offending field, e.g. `publisher.id`. */
|
|
10
10
|
path: string;
|
|
11
11
|
message: string;
|
|
12
|
+
/** Issue code for the add-on rules (24 §5.3); absent for schema issues. */
|
|
13
|
+
code?: string;
|
|
12
14
|
}
|
|
13
15
|
export interface ValidateManifestOptions {
|
|
14
16
|
/**
|
|
15
17
|
* Allow a non-`adminium` publisher. Wired to the `third-party-publishers`
|
|
16
18
|
* feature flag (§9); OFF in v1, so third-party manifests are rejected.
|
|
19
|
+
*
|
|
20
|
+
* For an add-on the gate matters MORE, not less: an add-on's server half runs
|
|
21
|
+
* in the host process with no sandbox (24 D13), so an unsandboxed in-process
|
|
22
|
+
* add-on from an unknown publisher would be remote code execution with a
|
|
23
|
+
* marketplace in front of it.
|
|
17
24
|
*/
|
|
18
25
|
allowThirdPartyPublishers?: boolean;
|
|
26
|
+
/** Installed app keys, so an add-on's `attaches` can be checked (24 §5.3). */
|
|
27
|
+
knownAppKeys?: readonly string[];
|
|
28
|
+
/** The host app's table refs, so an add-on's `scopes` can be bounded. */
|
|
29
|
+
hostTables?: readonly string[];
|
|
19
30
|
}
|
|
20
31
|
export type ValidateManifestResult = {
|
|
21
32
|
ok: true;
|
package/dist/validate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,OAAO,EAKL,KAAK,QAAQ,EACd,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;OAQG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,8EAA8E;IAC9E,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,yEAAyE;IACzE,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,MAAM,sBAAsB,GAC9B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GAChC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,aAAa,EAAE,CAAA;CAAE,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,EACd,IAAI,GAAE,uBAA4B,GACjC,sBAAsB,CAwCxB;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,GAAE,uBAA4B,GAAG,QAAQ,CAO1F"}
|
package/dist/validate.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
1
2
|
/**
|
|
2
3
|
* Manifest validation entry point (13-marketplace.md §2, §9). Layers the
|
|
3
4
|
* envelope schema with the v1 publisher policy: the installer rejects any
|
|
4
5
|
* `publisher.id` other than `adminium` unless the `third-party-publishers`
|
|
5
6
|
* feature flag is on (off in v1). Pure — safe in the browser storefront.
|
|
6
7
|
*/
|
|
7
|
-
import { FIRST_PARTY_PUBLISHER_ID, manifestSchema } from './schema.js';
|
|
8
|
+
import { FIRST_PARTY_PUBLISHER_ID, RESERVED_KEYS, addOnIssues, manifestSchema, } from './schema.js';
|
|
8
9
|
/**
|
|
9
10
|
* Validate an untrusted manifest document. Returns the typed manifest on
|
|
10
11
|
* success, or every issue found (schema + policy) on failure — never throws.
|
|
@@ -28,6 +29,18 @@ export function validateManifest(input, opts = {}) {
|
|
|
28
29
|
message: `third-party publishers are not accepted in v1 (expected "${FIRST_PARTY_PUBLISHER_ID}")`,
|
|
29
30
|
});
|
|
30
31
|
}
|
|
32
|
+
// D17 — apps and add-ons share one key namespace, and these keys shadow a
|
|
33
|
+
// storefront route or a data file.
|
|
34
|
+
if (RESERVED_KEYS.includes(manifest.key)) {
|
|
35
|
+
issues.push({
|
|
36
|
+
path: 'key',
|
|
37
|
+
message: `"${manifest.key}" is reserved and cannot be used as an app or add-on key`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
issues.push(...addOnIssues(manifest, {
|
|
41
|
+
...(opts.knownAppKeys !== undefined ? { knownAppKeys: opts.knownAppKeys } : {}),
|
|
42
|
+
...(opts.hostTables !== undefined ? { hostTables: opts.hostTables } : {}),
|
|
43
|
+
}));
|
|
31
44
|
if (issues.length > 0)
|
|
32
45
|
return { ok: false, issues };
|
|
33
46
|
return { ok: true, manifest };
|
package/dist/validate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;GAKG;AAEH,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,WAAW,EACX,cAAc,GAEf,MAAM,aAAa,CAAC;AA+BrB;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAc,EACd,OAAgC,EAAE;IAElC,MAAM,MAAM,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC/C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE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D,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAChC,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,aAAa,CAAC,KAAc,EAAE,OAAgC,EAAE;IAC9E,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7C,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/E,MAAM,IAAI,KAAK,CAAC,qBAAqB,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminiumjs/manifest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2-rc.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
+
"@adminium/add-on-contracts": "npm:@adminiumjs/add-on-contracts@0.2.2-rc.0",
|
|
23
24
|
"zod": "^4.4.3"
|
|
24
25
|
},
|
|
25
26
|
"files": [
|