@proveanything/smartlinks 2.1.40 → 2.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +754 -754
  2. package/dist/README.md +573 -573
  3. package/dist/adminCardsView.js +55 -55
  4. package/dist/api/collection.d.ts +8 -1
  5. package/dist/api/collection.js +10 -0
  6. package/dist/baseline.css +194 -194
  7. package/dist/docs/API_SUMMARY.md +863 -835
  8. package/dist/docs/admin-cards.md +189 -189
  9. package/dist/docs/agent-tools.md +156 -156
  10. package/dist/docs/ai-tools-and-skills.md +180 -180
  11. package/dist/docs/ai.md +1721 -1721
  12. package/dist/docs/analytics.md +39 -39
  13. package/dist/docs/app-data-storage.md +277 -277
  14. package/dist/docs/app-docs.md +73 -73
  15. package/dist/docs/app-manifest.md +852 -852
  16. package/dist/docs/app-records-pattern.md +388 -388
  17. package/dist/docs/appConfig.md +550 -550
  18. package/dist/docs/assistant-apps.md +172 -172
  19. package/dist/docs/assistant-context.md +119 -119
  20. package/dist/docs/bookings.md +442 -442
  21. package/dist/docs/comms.md +686 -686
  22. package/dist/docs/connectors.md +340 -340
  23. package/dist/docs/css-baseline.md +133 -133
  24. package/dist/docs/customer-guide.md +70 -70
  25. package/dist/docs/deploying-apps.md +340 -340
  26. package/dist/docs/entitlements.md +90 -90
  27. package/dist/docs/files.md +69 -69
  28. package/dist/docs/host-dependency-contract.md +210 -210
  29. package/dist/docs/integrations.md +322 -322
  30. package/dist/docs/interactions.md +545 -545
  31. package/dist/docs/item-context.md +181 -181
  32. package/dist/docs/knowledge.md +102 -102
  33. package/dist/docs/lots.md +111 -111
  34. package/dist/docs/loyalty.md +352 -352
  35. package/dist/docs/members.md +182 -182
  36. package/dist/docs/mobile-admin-container.md +693 -693
  37. package/dist/docs/operations.md +281 -281
  38. package/dist/docs/overview.md +482 -482
  39. package/dist/docs/proof-comms-triggers.md +142 -142
  40. package/dist/docs/proof-ownership-transfer.md +155 -155
  41. package/dist/docs/proof-product-data-scoping.md +462 -462
  42. package/dist/docs/proof-share-grants.md +305 -305
  43. package/dist/docs/realtime.md +138 -138
  44. package/dist/docs/records-admin-pattern.md +304 -304
  45. package/dist/docs/standard-query.md +187 -187
  46. package/dist/docs/tag-codes.md +97 -97
  47. package/dist/docs/theme-tokens.md +252 -252
  48. package/dist/docs/wallet-passes.md +107 -107
  49. package/dist/docs/websites.md +123 -123
  50. package/dist/openapi.yaml +80 -3
  51. package/dist/theme-boot.js +78 -78
  52. package/dist/theme.css +75 -75
  53. package/dist/types/appManifest.d.ts +21 -0
  54. package/dist/types/collection.d.ts +26 -0
  55. package/docs/API_SUMMARY.md +863 -835
  56. package/docs/admin-cards.md +189 -189
  57. package/docs/agent-tools.md +156 -156
  58. package/docs/ai-tools-and-skills.md +180 -180
  59. package/docs/ai.md +1721 -1721
  60. package/docs/analytics.md +39 -39
  61. package/docs/app-data-storage.md +277 -277
  62. package/docs/app-docs.md +73 -73
  63. package/docs/app-manifest.md +852 -852
  64. package/docs/app-records-pattern.md +388 -388
  65. package/docs/appConfig.md +550 -550
  66. package/docs/assistant-apps.md +172 -172
  67. package/docs/assistant-context.md +119 -119
  68. package/docs/bookings.md +442 -442
  69. package/docs/comms.md +686 -686
  70. package/docs/connectors.md +340 -340
  71. package/docs/css-baseline.md +133 -133
  72. package/docs/customer-guide.md +70 -70
  73. package/docs/deploying-apps.md +340 -340
  74. package/docs/entitlements.md +90 -90
  75. package/docs/files.md +69 -69
  76. package/docs/host-dependency-contract.md +210 -210
  77. package/docs/integrations.md +322 -322
  78. package/docs/interactions.md +545 -545
  79. package/docs/item-context.md +181 -181
  80. package/docs/knowledge.md +102 -102
  81. package/docs/lots.md +111 -111
  82. package/docs/loyalty.md +352 -352
  83. package/docs/members.md +182 -182
  84. package/docs/mobile-admin-container.md +693 -693
  85. package/docs/operations.md +281 -281
  86. package/docs/overview.md +482 -482
  87. package/docs/proof-comms-triggers.md +142 -142
  88. package/docs/proof-ownership-transfer.md +155 -155
  89. package/docs/proof-product-data-scoping.md +462 -462
  90. package/docs/proof-share-grants.md +305 -305
  91. package/docs/realtime.md +138 -138
  92. package/docs/standard-query.md +187 -187
  93. package/docs/tag-codes.md +97 -97
  94. package/docs/theme-lookbook.v1.json +120 -120
  95. package/docs/theme-tokens.md +252 -252
  96. package/docs/wallet-passes.md +107 -107
  97. package/docs/websites.md +123 -123
  98. package/openapi.yaml +80 -3
  99. package/package.json +87 -87
  100. package/scripts/headless-check.mjs +87 -87
  101. package/scripts/lib/bare-imports.mjs +57 -57
  102. package/scripts/lib/keyed-app-data.mjs +21 -21
  103. package/scripts/publish.mjs +272 -272
  104. package/scripts/register-release.mjs +91 -91
@@ -1,78 +1,78 @@
1
- /* @proveanything/smartlinks/theme-boot.js — iframe theme + viewer-prefs bootstrap (theme tokens v1)
2
- *
3
- * ONLY for iframe / standalone app entries (admin.html, index.html). Container & widget apps do NOT
4
- * need this — they inherit the host's :root tokens through the DOM. See docs/theme-tokens.md.
5
- *
6
- * What it does, and nothing more:
7
- * 1. BOOT (synchronous, before first paint): reads the initial theme + viewer prefs from the URL
8
- * (`#slt=<base64url JSON>` plus convenience params ?theme=&contrast=&lang=&fontScale=) and applies
9
- * them to :root. Put this in <head>, inline, so it runs before the app's stylesheet — no flash.
10
- * 2. LIVE: applies generic root-state updates the host posts (`smartlinks:root-state`) — viewer /
11
- * accessibility prefs (dark, contrast, font-scale, lang) and, if the host chooses, editor
12
- * brand-preview. The app AUTHORS CSS against these root hooks; it never writes a message handler.
13
- *
14
- * Root hooks the app styles against:
15
- * - theme: the `.dark` class (Tailwind/shadcn convention) AND `[data-theme="dark|light"]`
16
- * - contrast: `[data-contrast="high"]` (also honour @media (prefers-contrast: more) natively)
17
- * - font size: `--sl-font-scale` (e.g. 1.25) — scale your rem/base type off it
18
- * - language: `lang` attribute (content/i18n is the app's own job; this just flags it)
19
- * - brand: the --sl-* theme tokens (see theme.css)
20
- *
21
- * Brand THEME changes are expected via iframe reload (rare, operator-driven). Viewer / a11y prefs are
22
- * applied LIVE here (a reload on an accessibility toggle is itself an accessibility failure).
23
- */
24
- (function () {
25
- if (typeof document === 'undefined') return;
26
- var root = document.documentElement;
27
-
28
- function setVar(k, val) {
29
- root.style.setProperty(k.charAt(0) === '-' ? k : '--sl-' + k, String(val));
30
- }
31
- function applyTheme(mode) { // 'dark' | 'light'
32
- if (!mode) return;
33
- root.classList.toggle('dark', mode === 'dark');
34
- root.setAttribute('data-theme', mode);
35
- }
36
- function applyState(s) {
37
- if (!s || typeof s !== 'object') return;
38
- var v = s.values || s.vars;
39
- if (v) for (var k in v) if (Object.prototype.hasOwnProperty.call(v, k)) setVar(k, v[k]);
40
- if (s.theme) applyTheme(s.theme);
41
- if (s.contrast != null) {
42
- if (s.contrast === 'normal' || s.contrast === false) root.removeAttribute('data-contrast');
43
- else root.setAttribute('data-contrast', String(s.contrast));
44
- }
45
- if (s.fontScale != null) setVar('font-scale', s.fontScale);
46
- if (s.lang) root.setAttribute('lang', String(s.lang));
47
- var a = s.attrs;
48
- if (a) for (var name in a) if (Object.prototype.hasOwnProperty.call(a, name)) {
49
- if (a[name] == null || a[name] === false) root.removeAttribute(name);
50
- else root.setAttribute(name, a[name] === true ? '' : String(a[name]));
51
- }
52
- }
53
-
54
- // 1) BOOT from the URL — synchronous, before paint.
55
- try {
56
- var hash = location.hash || '';
57
- var m = hash.match(/[#&]slt=([^&]+)/);
58
- if (m) {
59
- var b64 = m[1].replace(/-/g, '+').replace(/_/g, '/');
60
- applyState(JSON.parse(decodeURIComponent(escape(atob(b64)))));
61
- }
62
- var q = new URLSearchParams(location.search);
63
- var boot = {};
64
- if (q.get('theme')) boot.theme = q.get('theme');
65
- if (q.get('contrast')) boot.contrast = q.get('contrast');
66
- if (q.get('lang')) boot.lang = q.get('lang');
67
- if (q.get('fontScale')) boot.fontScale = q.get('fontScale');
68
- applyState(boot);
69
- } catch (e) { /* never block the app on a malformed theme payload */ }
70
-
71
- // 2) LIVE updates — generic; the app never writes this.
72
- try {
73
- window.addEventListener('message', function (e) {
74
- var d = e && e.data;
75
- if (d && d.type === 'smartlinks:root-state') applyState(d);
76
- });
77
- } catch (e) {}
78
- })();
1
+ /* @proveanything/smartlinks/theme-boot.js — iframe theme + viewer-prefs bootstrap (theme tokens v1)
2
+ *
3
+ * ONLY for iframe / standalone app entries (admin.html, index.html). Container & widget apps do NOT
4
+ * need this — they inherit the host's :root tokens through the DOM. See docs/theme-tokens.md.
5
+ *
6
+ * What it does, and nothing more:
7
+ * 1. BOOT (synchronous, before first paint): reads the initial theme + viewer prefs from the URL
8
+ * (`#slt=<base64url JSON>` plus convenience params ?theme=&contrast=&lang=&fontScale=) and applies
9
+ * them to :root. Put this in <head>, inline, so it runs before the app's stylesheet — no flash.
10
+ * 2. LIVE: applies generic root-state updates the host posts (`smartlinks:root-state`) — viewer /
11
+ * accessibility prefs (dark, contrast, font-scale, lang) and, if the host chooses, editor
12
+ * brand-preview. The app AUTHORS CSS against these root hooks; it never writes a message handler.
13
+ *
14
+ * Root hooks the app styles against:
15
+ * - theme: the `.dark` class (Tailwind/shadcn convention) AND `[data-theme="dark|light"]`
16
+ * - contrast: `[data-contrast="high"]` (also honour @media (prefers-contrast: more) natively)
17
+ * - font size: `--sl-font-scale` (e.g. 1.25) — scale your rem/base type off it
18
+ * - language: `lang` attribute (content/i18n is the app's own job; this just flags it)
19
+ * - brand: the --sl-* theme tokens (see theme.css)
20
+ *
21
+ * Brand THEME changes are expected via iframe reload (rare, operator-driven). Viewer / a11y prefs are
22
+ * applied LIVE here (a reload on an accessibility toggle is itself an accessibility failure).
23
+ */
24
+ (function () {
25
+ if (typeof document === 'undefined') return;
26
+ var root = document.documentElement;
27
+
28
+ function setVar(k, val) {
29
+ root.style.setProperty(k.charAt(0) === '-' ? k : '--sl-' + k, String(val));
30
+ }
31
+ function applyTheme(mode) { // 'dark' | 'light'
32
+ if (!mode) return;
33
+ root.classList.toggle('dark', mode === 'dark');
34
+ root.setAttribute('data-theme', mode);
35
+ }
36
+ function applyState(s) {
37
+ if (!s || typeof s !== 'object') return;
38
+ var v = s.values || s.vars;
39
+ if (v) for (var k in v) if (Object.prototype.hasOwnProperty.call(v, k)) setVar(k, v[k]);
40
+ if (s.theme) applyTheme(s.theme);
41
+ if (s.contrast != null) {
42
+ if (s.contrast === 'normal' || s.contrast === false) root.removeAttribute('data-contrast');
43
+ else root.setAttribute('data-contrast', String(s.contrast));
44
+ }
45
+ if (s.fontScale != null) setVar('font-scale', s.fontScale);
46
+ if (s.lang) root.setAttribute('lang', String(s.lang));
47
+ var a = s.attrs;
48
+ if (a) for (var name in a) if (Object.prototype.hasOwnProperty.call(a, name)) {
49
+ if (a[name] == null || a[name] === false) root.removeAttribute(name);
50
+ else root.setAttribute(name, a[name] === true ? '' : String(a[name]));
51
+ }
52
+ }
53
+
54
+ // 1) BOOT from the URL — synchronous, before paint.
55
+ try {
56
+ var hash = location.hash || '';
57
+ var m = hash.match(/[#&]slt=([^&]+)/);
58
+ if (m) {
59
+ var b64 = m[1].replace(/-/g, '+').replace(/_/g, '/');
60
+ applyState(JSON.parse(decodeURIComponent(escape(atob(b64)))));
61
+ }
62
+ var q = new URLSearchParams(location.search);
63
+ var boot = {};
64
+ if (q.get('theme')) boot.theme = q.get('theme');
65
+ if (q.get('contrast')) boot.contrast = q.get('contrast');
66
+ if (q.get('lang')) boot.lang = q.get('lang');
67
+ if (q.get('fontScale')) boot.fontScale = q.get('fontScale');
68
+ applyState(boot);
69
+ } catch (e) { /* never block the app on a malformed theme payload */ }
70
+
71
+ // 2) LIVE updates — generic; the app never writes this.
72
+ try {
73
+ window.addEventListener('message', function (e) {
74
+ var d = e && e.data;
75
+ if (d && d.type === 'smartlinks:root-state') applyState(d);
76
+ });
77
+ } catch (e) {}
78
+ })();
package/dist/theme.css CHANGED
@@ -1,75 +1,75 @@
1
- /* @proveanything/smartlinks/theme.css — SmartLinks host theming preset (theme tokens v1)
2
- *
3
- * Maps Tailwind 4's design tokens onto the SmartLinks semantic theme tokens (--sl-color-*,
4
- * --sl-radius-*, --sl-font-*) that the host sets on each app's mount root. After importing this,
5
- * an app's `bg-primary` / `text-foreground` / `border-border` / `rounded-md` / `font-heading`
6
- * resolve to whatever brand the host is running — no per-app mapping, no hardcoded palette.
7
- *
8
- * app styles.css:
9
- * @import "tailwindcss";
10
- * @import "@proveanything/smartlinks/theme.css";
11
- *
12
- * Requires Tailwind 4 (@theme). Every value has a neutral fallback, so the app renders correctly
13
- * even against a host that sets none of the --sl-* tokens. See docs/theme-tokens.md.
14
- */
15
-
16
- @theme {
17
- /* ── Colour (semantic roles) ─────────────────────────────────────────── */
18
- --color-background: var(--sl-color-bg, #ffffff);
19
- --color-surface: var(--sl-color-surface, #f7f7f8);
20
- --color-surface-raised:var(--sl-color-surface-raised, var(--sl-color-surface, #ffffff));
21
- --color-foreground: var(--sl-color-fg, #18181b);
22
- --color-muted: var(--sl-color-muted, #71717a);
23
- --color-border: var(--sl-color-border, #e4e4e7);
24
- --color-primary: var(--sl-color-accent, #4f46e5);
25
- --color-on-primary: var(--sl-color-on-accent, #ffffff);
26
- --color-primary-soft: var(--sl-color-accent-soft, color-mix(in oklab, var(--sl-color-accent, #4f46e5) 12%, transparent));
27
- --color-success: var(--sl-color-success, #16a34a);
28
- --color-danger: var(--sl-color-danger, #dc2626);
29
-
30
- /* ── Shape ───────────────────────────────────────────────────────────── */
31
- --radius-sm: var(--sl-radius-sm, 4px);
32
- --radius-md: var(--sl-radius-md, 8px);
33
- --radius-lg: var(--sl-radius-lg, 16px);
34
-
35
- /* ── Type ────────────────────────────────────────────────────────────── */
36
- --font-heading: var(--sl-font-heading, var(--sl-font-body, ui-sans-serif, system-ui, sans-serif));
37
- --font-body: var(--sl-font-body, ui-sans-serif, system-ui, sans-serif);
38
-
39
- /* ── Elevation (extended; no shadow unless the host sets one) ─────────── */
40
- --shadow-sm: var(--sl-shadow-sm, 0 0 #0000);
41
- --shadow-md: var(--sl-shadow-md, 0 0 #0000);
42
- }
43
-
44
- /* Dark mode without values. A host in dark mode should send a dark value-set (the --sl-* tokens); one
45
- * that only sets the hook (.dark / data-theme="dark") left every colour on its light fallback — white
46
- * cards and near-black text on a dark page. Under the hook the fallbacks are dark too; whatever the host
47
- * does send still wins. (Re-declared on the hook's element, so it works wherever the host puts it.) */
48
- .dark,
49
- [data-theme="dark"] {
50
- --color-background: var(--sl-color-bg, #09090b);
51
- --color-surface: var(--sl-color-surface, #18181b);
52
- --color-surface-raised:var(--sl-color-surface-raised, var(--sl-color-surface, #27272a));
53
- --color-foreground: var(--sl-color-fg, #fafafa);
54
- --color-muted: var(--sl-color-muted, #a1a1aa);
55
- --color-border: var(--sl-color-border, #3f3f46);
56
- --color-primary: var(--sl-color-accent, #6366f1);
57
- --color-on-primary: var(--sl-color-on-accent, #ffffff);
58
- --color-primary-soft: var(--sl-color-accent-soft, color-mix(in oklab, var(--sl-color-accent, #6366f1) 20%, transparent));
59
- --color-success: var(--sl-color-success, #22c55e);
60
- --color-danger: var(--sl-color-danger, #f87171);
61
- color-scheme: dark;
62
- }
63
-
64
- /* shadcn bridge (optional): if the app uses shadcn's --primary/--background/etc. HSL variables,
65
- * uncomment to drive them from the SmartLinks tokens too. Left commented so it never overrides an
66
- * app that has deliberately customised its shadcn palette — opt in per app (see migration step 17).
67
- *
68
- * :where([data-sl-app]) {
69
- * --primary: var(--sl-color-accent);
70
- * --background: var(--sl-color-bg);
71
- * --foreground: var(--sl-color-fg);
72
- * --border: var(--sl-color-border);
73
- * --radius: var(--sl-radius-md);
74
- * }
75
- */
1
+ /* @proveanything/smartlinks/theme.css — SmartLinks host theming preset (theme tokens v1)
2
+ *
3
+ * Maps Tailwind 4's design tokens onto the SmartLinks semantic theme tokens (--sl-color-*,
4
+ * --sl-radius-*, --sl-font-*) that the host sets on each app's mount root. After importing this,
5
+ * an app's `bg-primary` / `text-foreground` / `border-border` / `rounded-md` / `font-heading`
6
+ * resolve to whatever brand the host is running — no per-app mapping, no hardcoded palette.
7
+ *
8
+ * app styles.css:
9
+ * @import "tailwindcss";
10
+ * @import "@proveanything/smartlinks/theme.css";
11
+ *
12
+ * Requires Tailwind 4 (@theme). Every value has a neutral fallback, so the app renders correctly
13
+ * even against a host that sets none of the --sl-* tokens. See docs/theme-tokens.md.
14
+ */
15
+
16
+ @theme {
17
+ /* ── Colour (semantic roles) ─────────────────────────────────────────── */
18
+ --color-background: var(--sl-color-bg, #ffffff);
19
+ --color-surface: var(--sl-color-surface, #f7f7f8);
20
+ --color-surface-raised:var(--sl-color-surface-raised, var(--sl-color-surface, #ffffff));
21
+ --color-foreground: var(--sl-color-fg, #18181b);
22
+ --color-muted: var(--sl-color-muted, #71717a);
23
+ --color-border: var(--sl-color-border, #e4e4e7);
24
+ --color-primary: var(--sl-color-accent, #4f46e5);
25
+ --color-on-primary: var(--sl-color-on-accent, #ffffff);
26
+ --color-primary-soft: var(--sl-color-accent-soft, color-mix(in oklab, var(--sl-color-accent, #4f46e5) 12%, transparent));
27
+ --color-success: var(--sl-color-success, #16a34a);
28
+ --color-danger: var(--sl-color-danger, #dc2626);
29
+
30
+ /* ── Shape ───────────────────────────────────────────────────────────── */
31
+ --radius-sm: var(--sl-radius-sm, 4px);
32
+ --radius-md: var(--sl-radius-md, 8px);
33
+ --radius-lg: var(--sl-radius-lg, 16px);
34
+
35
+ /* ── Type ────────────────────────────────────────────────────────────── */
36
+ --font-heading: var(--sl-font-heading, var(--sl-font-body, ui-sans-serif, system-ui, sans-serif));
37
+ --font-body: var(--sl-font-body, ui-sans-serif, system-ui, sans-serif);
38
+
39
+ /* ── Elevation (extended; no shadow unless the host sets one) ─────────── */
40
+ --shadow-sm: var(--sl-shadow-sm, 0 0 #0000);
41
+ --shadow-md: var(--sl-shadow-md, 0 0 #0000);
42
+ }
43
+
44
+ /* Dark mode without values. A host in dark mode should send a dark value-set (the --sl-* tokens); one
45
+ * that only sets the hook (.dark / data-theme="dark") left every colour on its light fallback — white
46
+ * cards and near-black text on a dark page. Under the hook the fallbacks are dark too; whatever the host
47
+ * does send still wins. (Re-declared on the hook's element, so it works wherever the host puts it.) */
48
+ .dark,
49
+ [data-theme="dark"] {
50
+ --color-background: var(--sl-color-bg, #09090b);
51
+ --color-surface: var(--sl-color-surface, #18181b);
52
+ --color-surface-raised:var(--sl-color-surface-raised, var(--sl-color-surface, #27272a));
53
+ --color-foreground: var(--sl-color-fg, #fafafa);
54
+ --color-muted: var(--sl-color-muted, #a1a1aa);
55
+ --color-border: var(--sl-color-border, #3f3f46);
56
+ --color-primary: var(--sl-color-accent, #6366f1);
57
+ --color-on-primary: var(--sl-color-on-accent, #ffffff);
58
+ --color-primary-soft: var(--sl-color-accent-soft, color-mix(in oklab, var(--sl-color-accent, #6366f1) 20%, transparent));
59
+ --color-success: var(--sl-color-success, #22c55e);
60
+ --color-danger: var(--sl-color-danger, #f87171);
61
+ color-scheme: dark;
62
+ }
63
+
64
+ /* shadcn bridge (optional): if the app uses shadcn's --primary/--background/etc. HSL variables,
65
+ * uncomment to drive them from the SmartLinks tokens too. Left commented so it never overrides an
66
+ * app that has deliberately customised its shadcn palette — opt in per app (see migration step 17).
67
+ *
68
+ * :where([data-sl-app]) {
69
+ * --primary: var(--sl-color-accent);
70
+ * --background: var(--sl-color-bg);
71
+ * --foreground: var(--sl-color-fg);
72
+ * --border: var(--sl-color-border);
73
+ * --radius: var(--sl-radius-md);
74
+ * }
75
+ */
@@ -1284,6 +1284,13 @@ export interface AppManifest {
1284
1284
  * docs/admin-views.md
1285
1285
  */
1286
1286
  adminViews?: AdminView[];
1287
+ /**
1288
+ * What the app needs before it can do its job. Installing the app turns on what can be turned on
1289
+ * (signIn: the standard customer sign-in; crm / products: switched back on); the rest shows in the
1290
+ * collection's readiness list (`collection.readiness`). @see AppRequirement
1291
+ * @example requires: ["signIn", { need: "crm", optional: true, why: "to keep a customer list" }]
1292
+ */
1293
+ requires?: AppRequirement[];
1287
1294
  /**
1288
1295
  * Executor bundle declaration. Present when the app ships a programmatic executor
1289
1296
  * for AI-driven configuration, server-side SEO, and LLM content generation.
@@ -1738,3 +1745,17 @@ export interface GetCollectionWidgetsOptions {
1738
1745
  /** Bypass server cache and fetch fresh manifests */
1739
1746
  force?: boolean;
1740
1747
  }
1748
+ /**
1749
+ * Something an app needs (manifest `requires`):
1750
+ * - `signIn` — customers sign in (turned on automatically: the standard sign-in)
1751
+ * - `crm` — the customer list (switched back on if off; needs a plan with customers)
1752
+ * - `products` — products (switched back on if off)
1753
+ * - `claimableItems` — something customers can claim (claim codes, or claiming on scan; not automatic)
1754
+ */
1755
+ export type AppNeed = 'signIn' | 'crm' | 'products' | 'claimableItems';
1756
+ /** A need, or a need with detail. Optional needs aren't turned on automatically and only warn when missing. */
1757
+ export type AppRequirement = AppNeed | {
1758
+ need: AppNeed;
1759
+ optional?: boolean;
1760
+ why?: string;
1761
+ };
@@ -192,3 +192,29 @@ export interface InviteUserInput {
192
192
  /** Origin used to build the branded invite link. Defaults to `window.location.origin` in the browser. */
193
193
  consoleOrigin?: string;
194
194
  }
195
+ /** One thing the readiness list says (GET /admin/collection/:id/readiness). */
196
+ export interface ReadinessItem {
197
+ /** 'problem': something won't work; 'warning': works, probably not what's meant; 'info': worth knowing. */
198
+ level: 'problem' | 'warning' | 'info';
199
+ /** e.g. SIGN_IN_MISSING, SIGN_IN_STANDARD, CRM_NOT_IN_PLAN, CRM_OFF, PRODUCTS_OFF, NO_CLAIM_CODES */
200
+ code: string;
201
+ /** Plain words for the business. */
202
+ message: string;
203
+ /** The app that needs it (master id) and its name. */
204
+ app?: string;
205
+ appName?: string;
206
+ /** The screen that fixes it: `open` is the adminViews.openApp payload; studioPath a plain link. */
207
+ fix?: {
208
+ label: string;
209
+ open: {
210
+ appId: string;
211
+ view?: string;
212
+ };
213
+ studioPath: string;
214
+ };
215
+ }
216
+ /** What the installed apps need and whether it's there. `ready` is false when any item is a problem. */
217
+ export interface CollectionReadiness {
218
+ ready: boolean;
219
+ items: ReadinessItem[];
220
+ }