@proveanything/smartlinks 2.0.64 → 2.0.66
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/ai-tools.js +2 -2
- package/dist/api/appConfiguration.d.ts +23 -0
- package/dist/api/appConfiguration.js +32 -0
- package/dist/docs/API_SUMMARY.md +25 -4
- package/dist/docs/admin-cards.md +3 -1
- package/dist/docs/ai.md +28 -7
- package/dist/docs/appConfig.md +37 -0
- package/dist/openapi.yaml +53 -3
- package/dist/types/ai.d.ts +45 -5
- package/dist/types/appConfiguration.d.ts +8 -0
- package/docs/API_SUMMARY.md +25 -4
- package/docs/admin-cards.md +3 -1
- package/docs/ai.md +28 -7
- package/docs/appConfig.md +37 -0
- package/openapi.yaml +53 -3
- package/package.json +1 -1
package/dist/ai-tools.js
CHANGED
|
@@ -82,9 +82,9 @@ export const BUILTIN_AI_TOOLS = [
|
|
|
82
82
|
{ name: 'pdf.edit', group: 'media', capabilities: ['web:read', 'media:pdf'],
|
|
83
83
|
description: 'Edit an existing PDF: replace LIVE text (glyph-exact removal so neighbouring text never moves; redrawn in the original font when it has the glyphs, else an embedded fallback; CMYK/spot colour kept; matches may span lines), add text and images in boxes (cmyk converts images for print). Returns url + per-item results with verified flags. Outlined text cannot be edited.' },
|
|
84
84
|
{ name: 'pdf.preflight', group: 'media', capabilities: ['web:read'],
|
|
85
|
-
description: 'Prepress preflight without changing the PDF: non-embedded fonts, RGB/Lab content, missing TrimBox/BleedBox and short bleed, low effective image resolution, transparency, white overprint, missing PDF/X output intent. Severity follows the target profile. No AI.' },
|
|
85
|
+
description: 'Prepress preflight without changing the PDF: non-embedded fonts, RGB/Lab content, missing TrimBox/BleedBox and short bleed, low effective image resolution, transparency, white overprint, annotations, hidden layers, missing PDF/X output intent. Severity follows the target profile. No AI.' },
|
|
86
86
|
{ name: 'pdf.printReady', group: 'media', capabilities: ['web:read', 'media:pdf'],
|
|
87
|
-
description: 'Prepare a PDF for print: RGB/Lab -> CMYK with a real press profile (spot colours kept
|
|
87
|
+
description: 'Prepare a PDF for print: text outlined to curves (or live embedded fonts), RGB/Lab -> CMYK with a real press profile (or grey), spot colours kept or converted, comments removed, layers chosen by name, optional image downsampling, page selection, boxes from included bleed, crop marks and transparency flattening; mark as PDF/X-1a or PDF/X-4 with the output intent embedded, then preflight the RESULT. Returns url + report { compliant, findings, changes }.' },
|
|
88
88
|
{ name: 'http.request', group: 'net', capabilities: ['net:http'],
|
|
89
89
|
description: 'SSRF-guarded outbound HTTP(S) request to a public URL; returns status/headers/body.' },
|
|
90
90
|
{ name: 'translate', group: 'text', capabilities: ['ai:text'],
|
|
@@ -483,4 +483,27 @@ export declare namespace appConfiguration {
|
|
|
483
483
|
* ```
|
|
484
484
|
*/
|
|
485
485
|
function isFeatureEnabledSync(collectionId: string, flag: string): boolean | undefined;
|
|
486
|
+
/**
|
|
487
|
+
* Has the collection SWITCHED ON this part of the platform (`appConfig.enabled[key]`)? A missing
|
|
488
|
+
* key is on — only an explicit `false` is off. This is "does this business use it", not "does the
|
|
489
|
+
* plan allow it": for something a plan gates, check `resolveFeature()` as well. docs/appConfig.md §8a.
|
|
490
|
+
*/
|
|
491
|
+
function resolveEnabled(cfg: {
|
|
492
|
+
enabled?: Record<string, boolean>;
|
|
493
|
+
} | null | undefined, key: string): boolean;
|
|
494
|
+
/**
|
|
495
|
+
* Has the collection switched on `key` (`products`, `crm`, `analytics`, `hub`, `portal`,
|
|
496
|
+
* `printStudio`, or an app's own key)? Hide what's off: a website-only business switches off
|
|
497
|
+
* products and the CRM, so menus, cards and setup steps for them shouldn't appear.
|
|
498
|
+
*
|
|
499
|
+
* @example
|
|
500
|
+
* ```typescript
|
|
501
|
+
* if (await appConfiguration.isEnabled(collectionId, 'products')) showProductsMenu();
|
|
502
|
+
* ```
|
|
503
|
+
*/
|
|
504
|
+
function isEnabled(collectionId: string, key: string, options?: {
|
|
505
|
+
force?: boolean;
|
|
506
|
+
}): Promise<boolean>;
|
|
507
|
+
/** Cache-only `isEnabled` — `undefined` until `getAppConfig()` has been read this page load. */
|
|
508
|
+
function isEnabledSync(collectionId: string, key: string): boolean | undefined;
|
|
486
509
|
}
|
|
@@ -620,4 +620,36 @@ export var appConfiguration;
|
|
|
620
620
|
return resolveFeature(cfg.system, flag);
|
|
621
621
|
}
|
|
622
622
|
appConfiguration.isFeatureEnabledSync = isFeatureEnabledSync;
|
|
623
|
+
/**
|
|
624
|
+
* Has the collection SWITCHED ON this part of the platform (`appConfig.enabled[key]`)? A missing
|
|
625
|
+
* key is on — only an explicit `false` is off. This is "does this business use it", not "does the
|
|
626
|
+
* plan allow it": for something a plan gates, check `resolveFeature()` as well. docs/appConfig.md §8a.
|
|
627
|
+
*/
|
|
628
|
+
function resolveEnabled(cfg, key) {
|
|
629
|
+
var _a;
|
|
630
|
+
return ((_a = cfg === null || cfg === void 0 ? void 0 : cfg.enabled) === null || _a === void 0 ? void 0 : _a[key]) !== false;
|
|
631
|
+
}
|
|
632
|
+
appConfiguration.resolveEnabled = resolveEnabled;
|
|
633
|
+
/**
|
|
634
|
+
* Has the collection switched on `key` (`products`, `crm`, `analytics`, `hub`, `portal`,
|
|
635
|
+
* `printStudio`, or an app's own key)? Hide what's off: a website-only business switches off
|
|
636
|
+
* products and the CRM, so menus, cards and setup steps for them shouldn't appear.
|
|
637
|
+
*
|
|
638
|
+
* @example
|
|
639
|
+
* ```typescript
|
|
640
|
+
* if (await appConfiguration.isEnabled(collectionId, 'products')) showProductsMenu();
|
|
641
|
+
* ```
|
|
642
|
+
*/
|
|
643
|
+
async function isEnabled(collectionId, key, options) {
|
|
644
|
+
return resolveEnabled(await getAppConfig(collectionId, options), key);
|
|
645
|
+
}
|
|
646
|
+
appConfiguration.isEnabled = isEnabled;
|
|
647
|
+
/** Cache-only `isEnabled` — `undefined` until `getAppConfig()` has been read this page load. */
|
|
648
|
+
function isEnabledSync(collectionId, key) {
|
|
649
|
+
const cfg = cache.peek(appConfigCacheKey(collectionId));
|
|
650
|
+
if (!cfg)
|
|
651
|
+
return undefined;
|
|
652
|
+
return resolveEnabled(cfg, key);
|
|
653
|
+
}
|
|
654
|
+
appConfiguration.isEnabledSync = isEnabledSync;
|
|
623
655
|
})(appConfiguration || (appConfiguration = {}));
|
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.66 | Generated: 2026-10-14T17:03:31.949Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -1688,13 +1688,22 @@ interface PdfPreflightArgs {
|
|
|
1688
1688
|
```typescript
|
|
1689
1689
|
interface PdfPrintReadyArgs {
|
|
1690
1690
|
url: string
|
|
1691
|
-
profile?: PdfXProfile
|
|
1691
|
+
profile?: PdfXProfile | 'none'
|
|
1692
1692
|
outputIntent?: string
|
|
1693
|
-
|
|
1693
|
+
colour?: 'cmyk' | 'gray' | 'keep'
|
|
1694
|
+
spotColours?: 'keep' | 'convert'
|
|
1695
|
+
outlineFonts?: boolean
|
|
1694
1696
|
embedFonts?: boolean
|
|
1697
|
+
downsample?: { dpi: number }
|
|
1698
|
+
pages?: string
|
|
1699
|
+
annotations?: 'remove' | 'flatten' | 'keep'
|
|
1700
|
+
layers?: { hide?: string[]; show?: string[] }
|
|
1695
1701
|
bleed?: { mm: number }
|
|
1702
|
+
bleedIncluded?: { mm: number; force?: boolean }
|
|
1703
|
+
cropMarks?: { offsetMm?: number; lengthMm?: number; weightPt?: number }
|
|
1696
1704
|
flattenTransparency?: boolean
|
|
1697
1705
|
minDpi?: number
|
|
1706
|
+
title?: string
|
|
1698
1707
|
}
|
|
1699
1708
|
```
|
|
1700
1709
|
|
|
@@ -1954,6 +1963,8 @@ interface PdfPreflightResult {
|
|
|
1954
1963
|
images: { page: number; dpi: number; width: number; height: number; space: string; placedMm: { w: number; h: number } }[]
|
|
1955
1964
|
transparency: boolean
|
|
1956
1965
|
outputIntent: { identifier: string | null; hasProfile: boolean } | null
|
|
1966
|
+
annotations: number
|
|
1967
|
+
layers: { name: string; visible: boolean }[]
|
|
1957
1968
|
[key: string]: any
|
|
1958
1969
|
}
|
|
1959
1970
|
}
|
|
@@ -1965,7 +1976,7 @@ interface PdfPrintReadyResult {
|
|
|
1965
1976
|
url: string
|
|
1966
1977
|
report: {
|
|
1967
1978
|
compliant: boolean
|
|
1968
|
-
profile: PdfXProfile
|
|
1979
|
+
profile: PdfXProfile | 'none'
|
|
1969
1980
|
outputIntent: string
|
|
1970
1981
|
findings: PdfPreflightFinding[]
|
|
1971
1982
|
changes: { code: string; message: string }[]
|
|
@@ -2468,6 +2479,7 @@ interface AppConfigSettings {
|
|
|
2468
2479
|
addOns?: string[]
|
|
2469
2480
|
requestedBasePlanId?: string
|
|
2470
2481
|
itemRecordMode?: 'registered' | 'owned' | null
|
|
2482
|
+
enabled?: Record<string, boolean>
|
|
2471
2483
|
system?: SystemBlock
|
|
2472
2484
|
}
|
|
2473
2485
|
```
|
|
@@ -10875,6 +10887,15 @@ Check whether a feature flag is enabled for a collection, per `appConfig.system.
|
|
|
10875
10887
|
**isFeatureEnabledSync**(collectionId: string, flag: string) → `boolean | undefined`
|
|
10876
10888
|
Synchronous, cache-only check for a feature flag. Returns `undefined` if `getAppConfig()` / `isFeatureEnabled()` hasn't been called yet for this collection this page load (i.e. nothing to read without an await) — treat `undefined` as "not yet known", not as "disabled". ```typescript // Warm the cache once, e.g. in a top-level effect: useEffect(() => { appConfiguration.isFeatureEnabled(collectionId, 'custom_domain') }, [collectionId]); // Elsewhere, read synchronously without an await: const enabled = appConfiguration.isFeatureEnabledSync(collectionId, 'custom_domain'); if (enabled === undefined) { // not warmed yet — fall back to a loading state or the async version } ```
|
|
10877
10889
|
|
|
10890
|
+
**resolveEnabled**(cfg: { enabled?: Record<string, boolean> } | null | undefined, key: string) → `boolean`
|
|
10891
|
+
Has the collection SWITCHED ON this part of the platform (`appConfig.enabled[key]`)? A missing key is on — only an explicit `false` is off. This is "does this business use it", not "does the plan allow it": for something a plan gates, check `resolveFeature()` as well. docs/appConfig.md §8a.
|
|
10892
|
+
|
|
10893
|
+
**isEnabled**(collectionId: string, key: string, options?: { force?: boolean }) → `Promise<boolean>`
|
|
10894
|
+
Has the collection switched on `key` (`products`, `crm`, `analytics`, `hub`, `portal`, `printStudio`, or an app's own key)? Hide what's off: a website-only business switches off products and the CRM, so menus, cards and setup steps for them shouldn't appear. ```typescript if (await appConfiguration.isEnabled(collectionId, 'products')) showProductsMenu(); ```
|
|
10895
|
+
|
|
10896
|
+
**isEnabledSync**(collectionId: string, key: string) → `boolean | undefined`
|
|
10897
|
+
Cache-only `isEnabled` — `undefined` until `getAppConfig()` has been read this page load.
|
|
10898
|
+
|
|
10878
10899
|
### asset
|
|
10879
10900
|
|
|
10880
10901
|
**upload**(options: UploadAssetOptions) → `Promise<Asset>`
|
package/dist/docs/admin-cards.md
CHANGED
|
@@ -86,7 +86,9 @@ Data that changes without an event (visit counts, "due this week") — use `maxA
|
|
|
86
86
|
|
|
87
87
|
## Return the payload
|
|
88
88
|
|
|
89
|
-
The function returns an `AdminCardPayload` — every field optional; return what the card needs
|
|
89
|
+
The function returns an `AdminCardPayload` — every field optional; return what the card needs.
|
|
90
|
+
It's called with **POST** (an http function's default method — no `trigger.methods` needed) and the body
|
|
91
|
+
`{ "card": "<card id>" }`, so one function can serve several cards:
|
|
90
92
|
|
|
91
93
|
```ts
|
|
92
94
|
import type { AdminCardPayload } from '@proveanything/smartlinks'
|
package/dist/docs/ai.md
CHANGED
|
@@ -333,8 +333,8 @@ in `input`.
|
|
|
333
333
|
| `pdf.decodeBarcodes` | Deterministically decode barcodes/QR on a page (WASM, no AI) → value + symbology + page + bbox + confidence. Use this for barcode digits, never vision. |
|
|
334
334
|
| `pdf.inspectGraphics` | Prepress inspection: per-page path/image/outlined-text counts + colour spaces, plus named SPOT colours (e.g. "PANTONE 871 C"). No AI. |
|
|
335
335
|
| `pdf.edit` | Edit an existing PDF: replace **live** text (glyph-exact removal, neighbours never move; original font when it has the glyphs, else an embedded fallback; CMYK/spot colour kept; matches may span lines), add text / images in boxes (`colorSpace: "cmyk"` converts images for print). Per-item `results` with `verified`. |
|
|
336
|
-
| `pdf.preflight` | Prepress preflight, no changes: fonts, RGB/Lab, TrimBox/BleedBox + bleed, effective image dpi, transparency, white overprint, output intent. No AI. |
|
|
337
|
-
| `pdf.printReady` | RGB→CMYK with a press profile (spot colours kept),
|
|
336
|
+
| `pdf.preflight` | Prepress preflight, no changes: fonts, RGB/Lab, TrimBox/BleedBox + bleed, effective image dpi, transparency, white overprint, annotations, hidden layers, output intent. No AI. |
|
|
337
|
+
| `pdf.printReady` | Text outlined to curves, RGB→CMYK with a press profile (spot colours kept), comments removed, layers merged as chosen, mark PDF/X-1a or PDF/X-4 with the output intent embedded, then preflight the result → `{ url, report }`. Options for grey, spot conversion, downsampling, pages, crop marks and more (below). |
|
|
338
338
|
| `http.request` | SSRF-guarded outbound HTTP(S) to a public URL (call a REST API). |
|
|
339
339
|
| `translate` | Translate text into one or more languages (generic, model-based). |
|
|
340
340
|
|
|
@@ -362,11 +362,31 @@ in `input`.
|
|
|
362
362
|
— it may run into neighbouring text. Text outlined to curves can't be edited: the item fails with
|
|
363
363
|
"not found as live text" — put it on the designer change list. `verified: true` means the new text
|
|
364
364
|
reads back from the output.
|
|
365
|
-
- **Is it print-ready?** → `pdf.preflight` (report only
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
365
|
+
- **Is it print-ready?** → `pdf.preflight` (report only; `stats.layers` lists the file's layers).
|
|
366
|
+
**Make it print-ready** → `pdf.printReady`. By default it outlines all text to curves, converts
|
|
367
|
+
RGB/Lab to CMYK for the `outputIntent` (e.g. `FOGRA39`), keeps spot colours, removes comments and
|
|
368
|
+
links, merges layers as the file shows them (hidden layers left out) and marks the file PDF/X-4.
|
|
369
|
+
`report.changes` says what was done, measured on the output; `report.compliant` comes from
|
|
370
|
+
preflighting the OUTPUT, so remaining issues (low-res images, missing bleed, white overprint) are
|
|
371
|
+
reported rather than hidden. Options:
|
|
372
|
+
|
|
373
|
+
| Option | Values |
|
|
374
|
+
|---|---|
|
|
375
|
+
| `profile` | `pdfx-4` (default), `pdfx-1a` (CMYK + spot only), `none` (convert, no PDF/X marking) |
|
|
376
|
+
| `outputIntent` | `FOGRA39` (default), `FOGRA51`, `FOGRA52`, `FOGRA29`, `GRACoL2006`, `SWOP2006`, `JapanColor2011` |
|
|
377
|
+
| `colour` | `cmyk` (default), `gray`, `keep` |
|
|
378
|
+
| `spotColours` | `keep` (default) or `convert` to process colour |
|
|
379
|
+
| `outlineFonts` | `true` (default) text → curves; `false` keeps live text (fonts embedded with `embedFonts`, default true) |
|
|
380
|
+
| `layers` | `{ hide: ['Dieline'], show: [...] }` by name — e.g. print without the dieline |
|
|
381
|
+
| `annotations` | `remove` (default), `flatten` (draw into the artwork), `keep` |
|
|
382
|
+
| `pages` | `"1-3,5"` (default all) |
|
|
383
|
+
| `downsample` | `{ dpi: 300 }` — resample images placed above 1.5× that; off by default |
|
|
384
|
+
| `bleed` | `{ mm: 3 }` — required bleed, checked and reported, never added |
|
|
385
|
+
| `bleedIncluded` | `{ mm: 3 }` — the artwork already includes its bleed: sets TrimBox/BleedBox |
|
|
386
|
+
| `cropMarks` | `{}` or `{ offsetMm, lengthMm, weightPt }` — crop marks outside the bleed |
|
|
387
|
+
| `flattenTransparency` | PDF/X-1a only: affected pages become images. Default false |
|
|
388
|
+
|
|
389
|
+
Outlined text can't be edited or searched afterwards: keep the source PDF for changes and regenerate.
|
|
370
390
|
|
|
371
391
|
```ts
|
|
372
392
|
const edited = await SL.ai.tools.run(collectionId, 'pdf.edit', {
|
|
@@ -375,6 +395,7 @@ const edited = await SL.ai.tools.run(collectionId, 'pdf.edit', {
|
|
|
375
395
|
})
|
|
376
396
|
const ready = await SL.ai.tools.run(collectionId, 'pdf.printReady', {
|
|
377
397
|
url: edited.result.url, profile: 'pdfx-4', outputIntent: 'FOGRA39', bleed: { mm: 3 },
|
|
398
|
+
layers: { hide: ['Dieline'] }, cropMarks: {},
|
|
378
399
|
})
|
|
379
400
|
if (!ready.result.report.compliant) showFindings(ready.result.report.findings)
|
|
380
401
|
```
|
package/dist/docs/appConfig.md
CHANGED
|
@@ -36,6 +36,8 @@ export interface AppConfigSettings {
|
|
|
36
36
|
|
|
37
37
|
/** How the account handles individual physical items. */
|
|
38
38
|
itemRecordMode?: 'registered' | 'owned' | null;
|
|
39
|
+
/** What the collection has switched on (absent key = on) — see §8a. */
|
|
40
|
+
enabled?: Record<string, boolean>;
|
|
39
41
|
|
|
40
42
|
// ── SYSTEM-OWNED, PUBLIC (reconcile writes; client read-only) ─────
|
|
41
43
|
/** Resolved entitlement truth. Read this to gate features. */
|
|
@@ -501,6 +503,41 @@ the customer add-ons page (`src/components/pricing/ItemHandlingSection`)
|
|
|
501
503
|
because these settings change the whole UX shape (claim, ownership,
|
|
502
504
|
CRM visibility), not just a capability flag.
|
|
503
505
|
|
|
506
|
+
## 8a. What's switched on (`enabled`)
|
|
507
|
+
|
|
508
|
+
A root-level, user-owned map (like `itemRecordMode`; reconcile never touches it) saying which parts of
|
|
509
|
+
the platform this collection **uses** — separate from what its plan **allows** (`system.features`):
|
|
510
|
+
|
|
511
|
+
| | Plan allows (`system.features`) | Switched on (`enabled`) |
|
|
512
|
+
|---|---|---|
|
|
513
|
+
| Written by | billing (`entitlements-reconcile`) | the collection: sign-up wizards, admins |
|
|
514
|
+
| Means | "you may have this" | "this business uses this" |
|
|
515
|
+
| Missing key | standard: off · enterprise: on | **on** |
|
|
516
|
+
|
|
517
|
+
```json
|
|
518
|
+
{ "enabled": { "products": false, "crm": false, "hub": false, "portal": false, "printStudio": false } }
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
**A missing key is on**, so a collection that never set `enabled` behaves exactly as before. Only an
|
|
522
|
+
explicit `false` switches something off. A website-only sign-up switches off what it doesn't use
|
|
523
|
+
(products, CRM, Hub, Portal…), and Studio hides the menus, dashboard cards and setup steps for them;
|
|
524
|
+
an admin can switch them back on.
|
|
525
|
+
|
|
526
|
+
Known keys: `products`, `crm`, `analytics`, `hub`, `portal`, `printStudio`. The map is open — an app
|
|
527
|
+
may define its own key.
|
|
528
|
+
|
|
529
|
+
```ts
|
|
530
|
+
if (await SL.appConfiguration.isEnabled(collectionId, 'products')) showProducts()
|
|
531
|
+
// already have the config:
|
|
532
|
+
SL.appConfiguration.resolveEnabled(cfg, 'crm')
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
For something a plan gates, show it only when both hold: `resolveEnabled(cfg, key)` **and**
|
|
536
|
+
`resolveFeature(cfg.system, flag)`.
|
|
537
|
+
|
|
538
|
+
Write it through the admin settings route (`collection.updateSettings(collectionId, 'appConfig',
|
|
539
|
+
{ enabled: { products: true } })`) — keys merge, so set only the ones you change.
|
|
540
|
+
|
|
504
541
|
## 9. Migration notes
|
|
505
542
|
|
|
506
543
|
- Legacy `entitlements` settings group is deprecated. Everything moved
|
package/dist/openapi.yaml
CHANGED
|
@@ -17615,20 +17615,55 @@ components:
|
|
|
17615
17615
|
url:
|
|
17616
17616
|
type: string
|
|
17617
17617
|
profile:
|
|
17618
|
-
|
|
17618
|
+
type: string
|
|
17619
|
+
enum:
|
|
17620
|
+
- none
|
|
17619
17621
|
outputIntent:
|
|
17620
17622
|
type: string
|
|
17621
|
-
|
|
17623
|
+
colour:
|
|
17624
|
+
type: string
|
|
17625
|
+
enum:
|
|
17626
|
+
- cmyk
|
|
17627
|
+
- gray
|
|
17628
|
+
- keep
|
|
17629
|
+
spotColours:
|
|
17630
|
+
type: string
|
|
17631
|
+
enum:
|
|
17632
|
+
- keep
|
|
17633
|
+
- convert
|
|
17634
|
+
outlineFonts:
|
|
17622
17635
|
type: boolean
|
|
17623
17636
|
embedFonts:
|
|
17624
17637
|
type: boolean
|
|
17638
|
+
downsample:
|
|
17639
|
+
type: object
|
|
17640
|
+
additionalProperties: true
|
|
17641
|
+
pages:
|
|
17642
|
+
type: string
|
|
17643
|
+
annotations:
|
|
17644
|
+
type: string
|
|
17645
|
+
enum:
|
|
17646
|
+
- remove
|
|
17647
|
+
- flatten
|
|
17648
|
+
- keep
|
|
17649
|
+
layers:
|
|
17650
|
+
type: object
|
|
17651
|
+
additionalProperties: true
|
|
17625
17652
|
bleed:
|
|
17626
17653
|
type: object
|
|
17627
17654
|
additionalProperties: true
|
|
17655
|
+
bleedIncluded:
|
|
17656
|
+
type: object
|
|
17657
|
+
additionalProperties: true
|
|
17658
|
+
cropMarks:
|
|
17659
|
+
type: object
|
|
17660
|
+
additionalProperties: true
|
|
17628
17661
|
flattenTransparency:
|
|
17629
17662
|
type: boolean
|
|
17630
17663
|
minDpi:
|
|
17631
17664
|
type: number
|
|
17665
|
+
title:
|
|
17666
|
+
type: string
|
|
17632
17667
|
required:
|
|
17633
17668
|
- url
|
|
17634
17669
|
HttpRequestArgs:
|
|
@@ -18040,6 +18075,13 @@ components:
|
|
|
18040
18075
|
outputIntent:
|
|
18041
18076
|
type: object
|
|
18042
18077
|
additionalProperties: true
|
|
18078
|
+
annotations:
|
|
18079
|
+
type: number
|
|
18080
|
+
layers:
|
|
18081
|
+
type: array
|
|
18082
|
+
items:
|
|
18083
|
+
type: object
|
|
18084
|
+
additionalProperties: true
|
|
18043
18085
|
required:
|
|
18044
18086
|
- url
|
|
18045
18087
|
- compliant
|
|
@@ -18053,6 +18095,8 @@ components:
|
|
|
18053
18095
|
- images
|
|
18054
18096
|
- transparency
|
|
18055
18097
|
- outputIntent
|
|
18098
|
+
- annotations
|
|
18099
|
+
- layers
|
|
18056
18100
|
PdfPrintReadyResult:
|
|
18057
18101
|
type: object
|
|
18058
18102
|
properties:
|
|
@@ -18064,7 +18108,9 @@ components:
|
|
|
18064
18108
|
compliant:
|
|
18065
18109
|
type: boolean
|
|
18066
18110
|
profile:
|
|
18067
|
-
|
|
18111
|
+
type: string
|
|
18112
|
+
enum:
|
|
18113
|
+
- none
|
|
18068
18114
|
outputIntent:
|
|
18069
18115
|
type: string
|
|
18070
18116
|
findings:
|
|
@@ -19122,6 +19168,10 @@ components:
|
|
|
19122
19168
|
enum:
|
|
19123
19169
|
- registered
|
|
19124
19170
|
- owned
|
|
19171
|
+
enabled:
|
|
19172
|
+
type: object
|
|
19173
|
+
additionalProperties:
|
|
19174
|
+
type: boolean
|
|
19125
19175
|
system:
|
|
19126
19176
|
$ref: "#/components/schemas/SystemBlock"
|
|
19127
19177
|
required:
|
package/dist/types/ai.d.ts
CHANGED
|
@@ -1041,19 +1041,51 @@ export interface PdfPreflightArgs {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
export interface PdfPrintReadyArgs {
|
|
1043
1043
|
url: string;
|
|
1044
|
-
/** Default 'pdfx-4' (keeps live transparency); 'pdfx-1a' = CMYK + spot only, no transparency. */
|
|
1045
|
-
profile?: PdfXProfile;
|
|
1044
|
+
/** Default 'pdfx-4' (keeps live transparency); 'pdfx-1a' = CMYK + spot only, no transparency; 'none' = convert without PDF/X marking. */
|
|
1045
|
+
profile?: PdfXProfile | 'none';
|
|
1046
1046
|
/** FOGRA39 (default), FOGRA51, FOGRA52, FOGRA29, GRACoL2006, SWOP2006, JapanColor2011. */
|
|
1047
1047
|
outputIntent?: string;
|
|
1048
|
-
|
|
1048
|
+
/** 'cmyk' (default: RGB/Lab → CMYK with the press profile), 'gray' (single-colour jobs), 'keep'. */
|
|
1049
|
+
colour?: 'cmyk' | 'gray' | 'keep';
|
|
1050
|
+
/** 'keep' (default) the spot plates (Pantone, varnish, white, dieline) or 'convert' them to process colour. */
|
|
1051
|
+
spotColours?: 'keep' | 'convert';
|
|
1052
|
+
/** Convert all text to vector curves so no fonts are needed (default true). false keeps live text. */
|
|
1053
|
+
outlineFonts?: boolean;
|
|
1054
|
+
/** With outlineFonts false: embed (subset) every font (default true). */
|
|
1049
1055
|
embedFonts?: boolean;
|
|
1050
|
-
/**
|
|
1056
|
+
/** Resample images placed above 1.5× this resolution down to it (e.g. { dpi: 300 }). Off by default. */
|
|
1057
|
+
downsample?: {
|
|
1058
|
+
dpi: number;
|
|
1059
|
+
};
|
|
1060
|
+
/** Pages to keep, e.g. "1-3,5" (default all). */
|
|
1061
|
+
pages?: string;
|
|
1062
|
+
/** Comments, links and form fields: 'remove' (default), 'flatten' (drawn into the artwork), 'keep'. */
|
|
1063
|
+
annotations?: 'remove' | 'flatten' | 'keep';
|
|
1064
|
+
/** Choose which layers print, by name (case-insensitive), e.g. { hide: ['Dieline'] }. Layers are merged into the artwork; hidden ones are left out. */
|
|
1065
|
+
layers?: {
|
|
1066
|
+
hide?: string[];
|
|
1067
|
+
show?: string[];
|
|
1068
|
+
};
|
|
1069
|
+
/** Required bleed — checked and reported, never added. */
|
|
1051
1070
|
bleed?: {
|
|
1052
1071
|
mm: number;
|
|
1053
1072
|
};
|
|
1073
|
+
/** The artwork already includes this much bleed (page = finished size + bleed): sets TrimBox/BleedBox (pages without a TrimBox; all with force). */
|
|
1074
|
+
bleedIncluded?: {
|
|
1075
|
+
mm: number;
|
|
1076
|
+
force?: boolean;
|
|
1077
|
+
};
|
|
1078
|
+
/** Add crop marks outside the bleed in registration colour; {} for defaults (3 mm offset, 5 mm long, 0.25 pt). */
|
|
1079
|
+
cropMarks?: {
|
|
1080
|
+
offsetMm?: number;
|
|
1081
|
+
lengthMm?: number;
|
|
1082
|
+
weightPt?: number;
|
|
1083
|
+
};
|
|
1054
1084
|
/** pdfx-1a only: flatten transparency (affected pages become images). Default false. */
|
|
1055
1085
|
flattenTransparency?: boolean;
|
|
1056
1086
|
minDpi?: number;
|
|
1087
|
+
/** Document title written into the file (default: the source title). */
|
|
1088
|
+
title?: string;
|
|
1057
1089
|
}
|
|
1058
1090
|
export interface HttpRequestArgs {
|
|
1059
1091
|
url: string;
|
|
@@ -1332,6 +1364,13 @@ export interface PdfPreflightResult {
|
|
|
1332
1364
|
identifier: string | null;
|
|
1333
1365
|
hasProfile: boolean;
|
|
1334
1366
|
} | null;
|
|
1367
|
+
/** Comments, links and form fields on the pages (printer's marks / trapping excluded). */
|
|
1368
|
+
annotations: number;
|
|
1369
|
+
/** Optional content (layers) and whether each is visible in the default view. */
|
|
1370
|
+
layers: {
|
|
1371
|
+
name: string;
|
|
1372
|
+
visible: boolean;
|
|
1373
|
+
}[];
|
|
1335
1374
|
[key: string]: any;
|
|
1336
1375
|
};
|
|
1337
1376
|
}
|
|
@@ -1340,9 +1379,10 @@ export interface PdfPrintReadyResult {
|
|
|
1340
1379
|
report: {
|
|
1341
1380
|
/** From the post-conversion preflight — never assumed. */
|
|
1342
1381
|
compliant: boolean;
|
|
1343
|
-
profile: PdfXProfile;
|
|
1382
|
+
profile: PdfXProfile | 'none';
|
|
1344
1383
|
outputIntent: string;
|
|
1345
1384
|
findings: PdfPreflightFinding[];
|
|
1385
|
+
/** What was done, measured on the result: FONTS_OUTLINED, CONVERTED_TO_CMYK, SPOT_COLOURS_CONVERTED, IMAGES_DOWNSAMPLED, PAGES_SELECTED, ANNOTATIONS_REMOVED, LAYERS_MERGED, BOXES_FROM_BLEED, CROP_MARKS, OUTPUT_INTENT, PDFX_IDENTIFIED… */
|
|
1346
1386
|
changes: {
|
|
1347
1387
|
code: string;
|
|
1348
1388
|
message: string;
|
|
@@ -128,6 +128,14 @@ export interface AppConfigSettings {
|
|
|
128
128
|
requestedBasePlanId?: string;
|
|
129
129
|
/** How the account handles individual physical items. */
|
|
130
130
|
itemRecordMode?: 'registered' | 'owned' | null;
|
|
131
|
+
/**
|
|
132
|
+
* What this collection has SWITCHED ON — separate from what its plan allows (`system.features`).
|
|
133
|
+
* A missing key means on, so collections that never set it behave as they always have. A website
|
|
134
|
+
* sign-up switches off what it doesn't use, e.g. `{ products: false, crm: false, hub: false }`.
|
|
135
|
+
* Known keys: `products`, `crm`, `analytics`, `hub`, `portal`, `printStudio`; the map is open.
|
|
136
|
+
* Read it with `appConfiguration.isEnabled()` / `resolveEnabled()` — docs/appConfig.md §8a.
|
|
137
|
+
*/
|
|
138
|
+
enabled?: Record<string, boolean>;
|
|
131
139
|
/** Resolved entitlement truth. Read this to gate features. */
|
|
132
140
|
system?: SystemBlock;
|
|
133
141
|
}
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.66 | Generated: 2026-10-14T17:03:31.949Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -1688,13 +1688,22 @@ interface PdfPreflightArgs {
|
|
|
1688
1688
|
```typescript
|
|
1689
1689
|
interface PdfPrintReadyArgs {
|
|
1690
1690
|
url: string
|
|
1691
|
-
profile?: PdfXProfile
|
|
1691
|
+
profile?: PdfXProfile | 'none'
|
|
1692
1692
|
outputIntent?: string
|
|
1693
|
-
|
|
1693
|
+
colour?: 'cmyk' | 'gray' | 'keep'
|
|
1694
|
+
spotColours?: 'keep' | 'convert'
|
|
1695
|
+
outlineFonts?: boolean
|
|
1694
1696
|
embedFonts?: boolean
|
|
1697
|
+
downsample?: { dpi: number }
|
|
1698
|
+
pages?: string
|
|
1699
|
+
annotations?: 'remove' | 'flatten' | 'keep'
|
|
1700
|
+
layers?: { hide?: string[]; show?: string[] }
|
|
1695
1701
|
bleed?: { mm: number }
|
|
1702
|
+
bleedIncluded?: { mm: number; force?: boolean }
|
|
1703
|
+
cropMarks?: { offsetMm?: number; lengthMm?: number; weightPt?: number }
|
|
1696
1704
|
flattenTransparency?: boolean
|
|
1697
1705
|
minDpi?: number
|
|
1706
|
+
title?: string
|
|
1698
1707
|
}
|
|
1699
1708
|
```
|
|
1700
1709
|
|
|
@@ -1954,6 +1963,8 @@ interface PdfPreflightResult {
|
|
|
1954
1963
|
images: { page: number; dpi: number; width: number; height: number; space: string; placedMm: { w: number; h: number } }[]
|
|
1955
1964
|
transparency: boolean
|
|
1956
1965
|
outputIntent: { identifier: string | null; hasProfile: boolean } | null
|
|
1966
|
+
annotations: number
|
|
1967
|
+
layers: { name: string; visible: boolean }[]
|
|
1957
1968
|
[key: string]: any
|
|
1958
1969
|
}
|
|
1959
1970
|
}
|
|
@@ -1965,7 +1976,7 @@ interface PdfPrintReadyResult {
|
|
|
1965
1976
|
url: string
|
|
1966
1977
|
report: {
|
|
1967
1978
|
compliant: boolean
|
|
1968
|
-
profile: PdfXProfile
|
|
1979
|
+
profile: PdfXProfile | 'none'
|
|
1969
1980
|
outputIntent: string
|
|
1970
1981
|
findings: PdfPreflightFinding[]
|
|
1971
1982
|
changes: { code: string; message: string }[]
|
|
@@ -2468,6 +2479,7 @@ interface AppConfigSettings {
|
|
|
2468
2479
|
addOns?: string[]
|
|
2469
2480
|
requestedBasePlanId?: string
|
|
2470
2481
|
itemRecordMode?: 'registered' | 'owned' | null
|
|
2482
|
+
enabled?: Record<string, boolean>
|
|
2471
2483
|
system?: SystemBlock
|
|
2472
2484
|
}
|
|
2473
2485
|
```
|
|
@@ -10875,6 +10887,15 @@ Check whether a feature flag is enabled for a collection, per `appConfig.system.
|
|
|
10875
10887
|
**isFeatureEnabledSync**(collectionId: string, flag: string) → `boolean | undefined`
|
|
10876
10888
|
Synchronous, cache-only check for a feature flag. Returns `undefined` if `getAppConfig()` / `isFeatureEnabled()` hasn't been called yet for this collection this page load (i.e. nothing to read without an await) — treat `undefined` as "not yet known", not as "disabled". ```typescript // Warm the cache once, e.g. in a top-level effect: useEffect(() => { appConfiguration.isFeatureEnabled(collectionId, 'custom_domain') }, [collectionId]); // Elsewhere, read synchronously without an await: const enabled = appConfiguration.isFeatureEnabledSync(collectionId, 'custom_domain'); if (enabled === undefined) { // not warmed yet — fall back to a loading state or the async version } ```
|
|
10877
10889
|
|
|
10890
|
+
**resolveEnabled**(cfg: { enabled?: Record<string, boolean> } | null | undefined, key: string) → `boolean`
|
|
10891
|
+
Has the collection SWITCHED ON this part of the platform (`appConfig.enabled[key]`)? A missing key is on — only an explicit `false` is off. This is "does this business use it", not "does the plan allow it": for something a plan gates, check `resolveFeature()` as well. docs/appConfig.md §8a.
|
|
10892
|
+
|
|
10893
|
+
**isEnabled**(collectionId: string, key: string, options?: { force?: boolean }) → `Promise<boolean>`
|
|
10894
|
+
Has the collection switched on `key` (`products`, `crm`, `analytics`, `hub`, `portal`, `printStudio`, or an app's own key)? Hide what's off: a website-only business switches off products and the CRM, so menus, cards and setup steps for them shouldn't appear. ```typescript if (await appConfiguration.isEnabled(collectionId, 'products')) showProductsMenu(); ```
|
|
10895
|
+
|
|
10896
|
+
**isEnabledSync**(collectionId: string, key: string) → `boolean | undefined`
|
|
10897
|
+
Cache-only `isEnabled` — `undefined` until `getAppConfig()` has been read this page load.
|
|
10898
|
+
|
|
10878
10899
|
### asset
|
|
10879
10900
|
|
|
10880
10901
|
**upload**(options: UploadAssetOptions) → `Promise<Asset>`
|
package/docs/admin-cards.md
CHANGED
|
@@ -86,7 +86,9 @@ Data that changes without an event (visit counts, "due this week") — use `maxA
|
|
|
86
86
|
|
|
87
87
|
## Return the payload
|
|
88
88
|
|
|
89
|
-
The function returns an `AdminCardPayload` — every field optional; return what the card needs
|
|
89
|
+
The function returns an `AdminCardPayload` — every field optional; return what the card needs.
|
|
90
|
+
It's called with **POST** (an http function's default method — no `trigger.methods` needed) and the body
|
|
91
|
+
`{ "card": "<card id>" }`, so one function can serve several cards:
|
|
90
92
|
|
|
91
93
|
```ts
|
|
92
94
|
import type { AdminCardPayload } from '@proveanything/smartlinks'
|
package/docs/ai.md
CHANGED
|
@@ -333,8 +333,8 @@ in `input`.
|
|
|
333
333
|
| `pdf.decodeBarcodes` | Deterministically decode barcodes/QR on a page (WASM, no AI) → value + symbology + page + bbox + confidence. Use this for barcode digits, never vision. |
|
|
334
334
|
| `pdf.inspectGraphics` | Prepress inspection: per-page path/image/outlined-text counts + colour spaces, plus named SPOT colours (e.g. "PANTONE 871 C"). No AI. |
|
|
335
335
|
| `pdf.edit` | Edit an existing PDF: replace **live** text (glyph-exact removal, neighbours never move; original font when it has the glyphs, else an embedded fallback; CMYK/spot colour kept; matches may span lines), add text / images in boxes (`colorSpace: "cmyk"` converts images for print). Per-item `results` with `verified`. |
|
|
336
|
-
| `pdf.preflight` | Prepress preflight, no changes: fonts, RGB/Lab, TrimBox/BleedBox + bleed, effective image dpi, transparency, white overprint, output intent. No AI. |
|
|
337
|
-
| `pdf.printReady` | RGB→CMYK with a press profile (spot colours kept),
|
|
336
|
+
| `pdf.preflight` | Prepress preflight, no changes: fonts, RGB/Lab, TrimBox/BleedBox + bleed, effective image dpi, transparency, white overprint, annotations, hidden layers, output intent. No AI. |
|
|
337
|
+
| `pdf.printReady` | Text outlined to curves, RGB→CMYK with a press profile (spot colours kept), comments removed, layers merged as chosen, mark PDF/X-1a or PDF/X-4 with the output intent embedded, then preflight the result → `{ url, report }`. Options for grey, spot conversion, downsampling, pages, crop marks and more (below). |
|
|
338
338
|
| `http.request` | SSRF-guarded outbound HTTP(S) to a public URL (call a REST API). |
|
|
339
339
|
| `translate` | Translate text into one or more languages (generic, model-based). |
|
|
340
340
|
|
|
@@ -362,11 +362,31 @@ in `input`.
|
|
|
362
362
|
— it may run into neighbouring text. Text outlined to curves can't be edited: the item fails with
|
|
363
363
|
"not found as live text" — put it on the designer change list. `verified: true` means the new text
|
|
364
364
|
reads back from the output.
|
|
365
|
-
- **Is it print-ready?** → `pdf.preflight` (report only
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
365
|
+
- **Is it print-ready?** → `pdf.preflight` (report only; `stats.layers` lists the file's layers).
|
|
366
|
+
**Make it print-ready** → `pdf.printReady`. By default it outlines all text to curves, converts
|
|
367
|
+
RGB/Lab to CMYK for the `outputIntent` (e.g. `FOGRA39`), keeps spot colours, removes comments and
|
|
368
|
+
links, merges layers as the file shows them (hidden layers left out) and marks the file PDF/X-4.
|
|
369
|
+
`report.changes` says what was done, measured on the output; `report.compliant` comes from
|
|
370
|
+
preflighting the OUTPUT, so remaining issues (low-res images, missing bleed, white overprint) are
|
|
371
|
+
reported rather than hidden. Options:
|
|
372
|
+
|
|
373
|
+
| Option | Values |
|
|
374
|
+
|---|---|
|
|
375
|
+
| `profile` | `pdfx-4` (default), `pdfx-1a` (CMYK + spot only), `none` (convert, no PDF/X marking) |
|
|
376
|
+
| `outputIntent` | `FOGRA39` (default), `FOGRA51`, `FOGRA52`, `FOGRA29`, `GRACoL2006`, `SWOP2006`, `JapanColor2011` |
|
|
377
|
+
| `colour` | `cmyk` (default), `gray`, `keep` |
|
|
378
|
+
| `spotColours` | `keep` (default) or `convert` to process colour |
|
|
379
|
+
| `outlineFonts` | `true` (default) text → curves; `false` keeps live text (fonts embedded with `embedFonts`, default true) |
|
|
380
|
+
| `layers` | `{ hide: ['Dieline'], show: [...] }` by name — e.g. print without the dieline |
|
|
381
|
+
| `annotations` | `remove` (default), `flatten` (draw into the artwork), `keep` |
|
|
382
|
+
| `pages` | `"1-3,5"` (default all) |
|
|
383
|
+
| `downsample` | `{ dpi: 300 }` — resample images placed above 1.5× that; off by default |
|
|
384
|
+
| `bleed` | `{ mm: 3 }` — required bleed, checked and reported, never added |
|
|
385
|
+
| `bleedIncluded` | `{ mm: 3 }` — the artwork already includes its bleed: sets TrimBox/BleedBox |
|
|
386
|
+
| `cropMarks` | `{}` or `{ offsetMm, lengthMm, weightPt }` — crop marks outside the bleed |
|
|
387
|
+
| `flattenTransparency` | PDF/X-1a only: affected pages become images. Default false |
|
|
388
|
+
|
|
389
|
+
Outlined text can't be edited or searched afterwards: keep the source PDF for changes and regenerate.
|
|
370
390
|
|
|
371
391
|
```ts
|
|
372
392
|
const edited = await SL.ai.tools.run(collectionId, 'pdf.edit', {
|
|
@@ -375,6 +395,7 @@ const edited = await SL.ai.tools.run(collectionId, 'pdf.edit', {
|
|
|
375
395
|
})
|
|
376
396
|
const ready = await SL.ai.tools.run(collectionId, 'pdf.printReady', {
|
|
377
397
|
url: edited.result.url, profile: 'pdfx-4', outputIntent: 'FOGRA39', bleed: { mm: 3 },
|
|
398
|
+
layers: { hide: ['Dieline'] }, cropMarks: {},
|
|
378
399
|
})
|
|
379
400
|
if (!ready.result.report.compliant) showFindings(ready.result.report.findings)
|
|
380
401
|
```
|
package/docs/appConfig.md
CHANGED
|
@@ -36,6 +36,8 @@ export interface AppConfigSettings {
|
|
|
36
36
|
|
|
37
37
|
/** How the account handles individual physical items. */
|
|
38
38
|
itemRecordMode?: 'registered' | 'owned' | null;
|
|
39
|
+
/** What the collection has switched on (absent key = on) — see §8a. */
|
|
40
|
+
enabled?: Record<string, boolean>;
|
|
39
41
|
|
|
40
42
|
// ── SYSTEM-OWNED, PUBLIC (reconcile writes; client read-only) ─────
|
|
41
43
|
/** Resolved entitlement truth. Read this to gate features. */
|
|
@@ -501,6 +503,41 @@ the customer add-ons page (`src/components/pricing/ItemHandlingSection`)
|
|
|
501
503
|
because these settings change the whole UX shape (claim, ownership,
|
|
502
504
|
CRM visibility), not just a capability flag.
|
|
503
505
|
|
|
506
|
+
## 8a. What's switched on (`enabled`)
|
|
507
|
+
|
|
508
|
+
A root-level, user-owned map (like `itemRecordMode`; reconcile never touches it) saying which parts of
|
|
509
|
+
the platform this collection **uses** — separate from what its plan **allows** (`system.features`):
|
|
510
|
+
|
|
511
|
+
| | Plan allows (`system.features`) | Switched on (`enabled`) |
|
|
512
|
+
|---|---|---|
|
|
513
|
+
| Written by | billing (`entitlements-reconcile`) | the collection: sign-up wizards, admins |
|
|
514
|
+
| Means | "you may have this" | "this business uses this" |
|
|
515
|
+
| Missing key | standard: off · enterprise: on | **on** |
|
|
516
|
+
|
|
517
|
+
```json
|
|
518
|
+
{ "enabled": { "products": false, "crm": false, "hub": false, "portal": false, "printStudio": false } }
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
**A missing key is on**, so a collection that never set `enabled` behaves exactly as before. Only an
|
|
522
|
+
explicit `false` switches something off. A website-only sign-up switches off what it doesn't use
|
|
523
|
+
(products, CRM, Hub, Portal…), and Studio hides the menus, dashboard cards and setup steps for them;
|
|
524
|
+
an admin can switch them back on.
|
|
525
|
+
|
|
526
|
+
Known keys: `products`, `crm`, `analytics`, `hub`, `portal`, `printStudio`. The map is open — an app
|
|
527
|
+
may define its own key.
|
|
528
|
+
|
|
529
|
+
```ts
|
|
530
|
+
if (await SL.appConfiguration.isEnabled(collectionId, 'products')) showProducts()
|
|
531
|
+
// already have the config:
|
|
532
|
+
SL.appConfiguration.resolveEnabled(cfg, 'crm')
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
For something a plan gates, show it only when both hold: `resolveEnabled(cfg, key)` **and**
|
|
536
|
+
`resolveFeature(cfg.system, flag)`.
|
|
537
|
+
|
|
538
|
+
Write it through the admin settings route (`collection.updateSettings(collectionId, 'appConfig',
|
|
539
|
+
{ enabled: { products: true } })`) — keys merge, so set only the ones you change.
|
|
540
|
+
|
|
504
541
|
## 9. Migration notes
|
|
505
542
|
|
|
506
543
|
- Legacy `entitlements` settings group is deprecated. Everything moved
|
package/openapi.yaml
CHANGED
|
@@ -17615,20 +17615,55 @@ components:
|
|
|
17615
17615
|
url:
|
|
17616
17616
|
type: string
|
|
17617
17617
|
profile:
|
|
17618
|
-
|
|
17618
|
+
type: string
|
|
17619
|
+
enum:
|
|
17620
|
+
- none
|
|
17619
17621
|
outputIntent:
|
|
17620
17622
|
type: string
|
|
17621
|
-
|
|
17623
|
+
colour:
|
|
17624
|
+
type: string
|
|
17625
|
+
enum:
|
|
17626
|
+
- cmyk
|
|
17627
|
+
- gray
|
|
17628
|
+
- keep
|
|
17629
|
+
spotColours:
|
|
17630
|
+
type: string
|
|
17631
|
+
enum:
|
|
17632
|
+
- keep
|
|
17633
|
+
- convert
|
|
17634
|
+
outlineFonts:
|
|
17622
17635
|
type: boolean
|
|
17623
17636
|
embedFonts:
|
|
17624
17637
|
type: boolean
|
|
17638
|
+
downsample:
|
|
17639
|
+
type: object
|
|
17640
|
+
additionalProperties: true
|
|
17641
|
+
pages:
|
|
17642
|
+
type: string
|
|
17643
|
+
annotations:
|
|
17644
|
+
type: string
|
|
17645
|
+
enum:
|
|
17646
|
+
- remove
|
|
17647
|
+
- flatten
|
|
17648
|
+
- keep
|
|
17649
|
+
layers:
|
|
17650
|
+
type: object
|
|
17651
|
+
additionalProperties: true
|
|
17625
17652
|
bleed:
|
|
17626
17653
|
type: object
|
|
17627
17654
|
additionalProperties: true
|
|
17655
|
+
bleedIncluded:
|
|
17656
|
+
type: object
|
|
17657
|
+
additionalProperties: true
|
|
17658
|
+
cropMarks:
|
|
17659
|
+
type: object
|
|
17660
|
+
additionalProperties: true
|
|
17628
17661
|
flattenTransparency:
|
|
17629
17662
|
type: boolean
|
|
17630
17663
|
minDpi:
|
|
17631
17664
|
type: number
|
|
17665
|
+
title:
|
|
17666
|
+
type: string
|
|
17632
17667
|
required:
|
|
17633
17668
|
- url
|
|
17634
17669
|
HttpRequestArgs:
|
|
@@ -18040,6 +18075,13 @@ components:
|
|
|
18040
18075
|
outputIntent:
|
|
18041
18076
|
type: object
|
|
18042
18077
|
additionalProperties: true
|
|
18078
|
+
annotations:
|
|
18079
|
+
type: number
|
|
18080
|
+
layers:
|
|
18081
|
+
type: array
|
|
18082
|
+
items:
|
|
18083
|
+
type: object
|
|
18084
|
+
additionalProperties: true
|
|
18043
18085
|
required:
|
|
18044
18086
|
- url
|
|
18045
18087
|
- compliant
|
|
@@ -18053,6 +18095,8 @@ components:
|
|
|
18053
18095
|
- images
|
|
18054
18096
|
- transparency
|
|
18055
18097
|
- outputIntent
|
|
18098
|
+
- annotations
|
|
18099
|
+
- layers
|
|
18056
18100
|
PdfPrintReadyResult:
|
|
18057
18101
|
type: object
|
|
18058
18102
|
properties:
|
|
@@ -18064,7 +18108,9 @@ components:
|
|
|
18064
18108
|
compliant:
|
|
18065
18109
|
type: boolean
|
|
18066
18110
|
profile:
|
|
18067
|
-
|
|
18111
|
+
type: string
|
|
18112
|
+
enum:
|
|
18113
|
+
- none
|
|
18068
18114
|
outputIntent:
|
|
18069
18115
|
type: string
|
|
18070
18116
|
findings:
|
|
@@ -19122,6 +19168,10 @@ components:
|
|
|
19122
19168
|
enum:
|
|
19123
19169
|
- registered
|
|
19124
19170
|
- owned
|
|
19171
|
+
enabled:
|
|
19172
|
+
type: object
|
|
19173
|
+
additionalProperties:
|
|
19174
|
+
type: boolean
|
|
19125
19175
|
system:
|
|
19126
19176
|
$ref: "#/components/schemas/SystemBlock"
|
|
19127
19177
|
required:
|