@owlmeans/wled 0.1.18-rc.1 → 0.1.18-rc.11

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/README.md CHANGED
@@ -1,27 +1,27 @@
1
1
  # @owlmeans/wled
2
2
 
3
- Whitelabel ("wled") core — shared types, models, and module declarations for entity-specific branding/content.
3
+ Whitelabel ("wled") core — shared types, models, and entrypoint declarations for organization-entity-specific branding/content.
4
4
 
5
5
  ## Overview
6
6
 
7
- - `WL_PROVIDE` / `WL_PROVIDE_PATH` — module alias and path for the whitelabel provide endpoint
7
+ - `WL_PROVIDE` / `WL_PROVIDE_PATH` — entrypoint alias and path for the whitelabel provide endpoint
8
8
  - `WL_TYPE_COMPANY_INFO`, `WL_TYPE_STYLES`, `WL_TYPE_MEDIA`, `WL_TYPE_DNS` — whitelabel content type discriminators
9
9
  - Type definitions: `CompanyInfo`, `CustomStyles`, `CustomColors`, `CustomFont`, `CustomMedia`, `CustomBrand`, `ProvideParams`, `ProvidedWL<T>`
10
- - `modules` — array containing the `GET /wl/provide/:entity` declaration
10
+ - `entrypoints` — array containing the `GET /wl/provide/:entity` declaration
11
11
  - AJV models under `model/` (e.g., `ProvideParamsSchema`)
12
12
 
13
13
  ## Installation
14
14
 
15
15
  ```bash
16
- bun add @owlmeans/wled
16
+ bun add @owlmeans/wled@^0.1.18-rc.10
17
17
  ```
18
18
 
19
19
  ## Usage
20
20
 
21
- Use the shared module declarations and types when wiring server- and web-side whitelabel features:
21
+ Use the shared entrypoint declarations and types when wiring server- and web-side whitelabel features:
22
22
 
23
23
  ```typescript
24
- import { modules as wlModules } from '@owlmeans/wled'
24
+ import { entrypoints as wlEntrypoints } from '@owlmeans/wled'
25
25
  import type { ProvidedWL, CompanyInfo, CustomStyles } from '@owlmeans/wled'
26
26
  ```
27
27
 
@@ -50,7 +50,7 @@ The actual server handlers live in `@owlmeans/server-wl`; web UI in `@owlmeans/w
50
50
 
51
51
  `CompanyInfo`, `CustomStyles`, `CustomColors`, `CustomFont`, `CustomMedia`, `CustomBrand`, `ProvideParams`, `ProvidedWL<T>` — re-exported at the root entry.
52
52
 
53
- ### `modules`
53
+ ### `entrypoints`
54
54
 
55
55
  Array with one declaration: `GET /wl/provide/:entity` (alias `WL_PROVIDE`), with `params` filter using `ProvideParamsSchema`.
56
56
 
@@ -60,7 +60,7 @@ Submodule exporting AJV schemas (e.g., `ProvideParamsSchema`) and helpers for wh
60
60
 
61
61
  ## Related Packages
62
62
 
63
- - [`@owlmeans/server-wl`](../server-wl) — server-side whitelabel handlers (uses `modules` from here)
63
+ - [`@owlmeans/server-wl`](../server-wl) — server-side whitelabel handlers (uses `entrypoints` from here)
64
64
  - [`@owlmeans/web-wl`](../web-wl) — web UI components for whitelabel content
65
65
  - [`@owlmeans/client-wl`](../client-wl) — client-side whitelabel placeholder
66
66
 
@@ -72,7 +72,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
72
72
  your project's skill store (`.agents/skills/`):
73
73
 
74
74
  ```sh
75
- npx @owlmeans/agent-skills
75
+ npx @owlmeans/agent-skills@^0.1.18-rc.12
76
76
  ```
77
77
 
78
78
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/wled",
4
- "version": "0.1.18-rc.0",
5
- "generatedAt": "2026-08-16T22:20:50.510Z",
4
+ "version": "0.1.18-rc.11",
5
+ "generatedAt": "2026-09-04T22:43:25.446Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: wled
3
- description: How to use @owlmeans/wled — whitelist/allowlist ("white-label") entity types, model, and shared module declarations. Auto-invoked when importing wled types or building white-label features.
3
+ description: How to use @owlmeans/wled — the shared white-label contract — company info, custom styles, brand media and DNS shapes, their AJV schemas, the wl type constants and the single WL_PROVIDE entrypoint both sides elevate. Auto-invoked when importing white-label types or schemas, or when adding a white-label provider.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
@@ -8,29 +8,77 @@ user-invocable: false
8
8
  # @owlmeans/wled
9
9
 
10
10
  **Layer:** Core
11
- **Install:** `"@owlmeans/wled": "^0.1.18-rc.0"` in `dependencies`
11
+ **Install:** `"@owlmeans/wled": "^0.1.18-rc.11"` in `dependencies`
12
+
13
+ The contract only. It owns no service and reaches no store: it declares the white-label record
14
+ shapes, their schemas, and one entrypoint that the server side answers and the browser side calls.
15
+ Everything that produces a white-label record lives downstream.
12
16
 
13
17
  ## Key Exports
14
18
 
15
19
  | Export | Description |
16
20
  |--------|-------------|
17
- | `Wled`, `Entity` types | Whitelist entry / entity shapes |
18
- | `WL_BUCKET` and constants | Shared aliases (e.g. storage bucket name) |
19
- | Modules | Shared whitelist module declarations |
20
- | `model` submodule | Validation/model helpers |
21
+ | `entrypoints` | The single `WL_PROVIDE` declaration — a backend `GET /wl/provide/:entity`, filtered by `params(ProvideParamsSchema)` and guarded by nothing. Elevate it, never redeclare it |
22
+ | `WL_PROVIDE` | That entrypoint's alias. Both `@owlmeans/server-wl` and `@owlmeans/web-wl` elevate this exact alias |
23
+ | `WL_PROVIDE_PATH` | `'/wl/provide/:entity'` |
24
+ | `WL_TYPE_COMPANY_INFO`, `WL_TYPE_STYLES`, `WL_TYPE_MEDIA`, `WL_TYPE_DNS` | The `type` a provider stamps on the record it returns — `'company-info'`, `'styles'`, `'media'`, `'dns'` |
25
+ | `ProvidedWL<T>` | What one provider answers: `T & { type: string; exists: boolean \| null }` |
26
+ | `CompanyInfo` | `{ resource?, entityId, fullName, shortName, slug, description }` |
27
+ | `CustomStyles` | `{ resource?, entityId, font, colors }` — a whole theme record, not just the palette |
28
+ | `CustomFont`, `CustomColors` | `{ fontFamily, basicSize? }` (`basicSize` minimum 8), and a required `primaryColor` plus optional secondary/alert/success colours and their backgrounds |
29
+ | `CustomMedia`, `CustomBrand` | `{ brand: { squareLogo?, wideLogo? } }` — both are URLs |
30
+ | `CustomUrls` | `{ adminUrl, userUrl }` |
31
+ | `ProvideParams` | `{ entity: string }` — the one path param |
32
+ | `CompanyInfoSchema`, `CustomStylesSchema`, `CustomFontSchema`, `CustomColorsSchema`, `ColorSchema`, `ProvideParamsSchema` | The AJV schemas for the shapes above. `ajv` is a peer dependency |
33
+
34
+ ## The provide contract
21
35
 
22
- ## Usage
36
+ `WL_PROVIDE` answers one object per organization entity, keyed by **provider service alias** — not by
37
+ white-label type:
23
38
 
24
39
  ```typescript
25
- import { WL_BUCKET } from '@owlmeans/wled'
40
+ import { WL_TYPE_MEDIA } from '@owlmeans/wled'
41
+ import type { CustomMedia, ProvidedWL } from '@owlmeans/wled'
26
42
 
27
- cfg.storageBuckets = {
28
- [WL_BUCKET]: { url: '/etc/app-config/s3-bucket-url', apiKey: '/etc/master-secret/s3-storage', basePrefix: WL_BUCKET_PREFIX }
43
+ // what a provider registered under the alias 'wl-logo' contributes
44
+ const media: ProvidedWL<CustomMedia> = {
45
+ type: WL_TYPE_MEDIA,
46
+ exists: true,
47
+ brand: { wideLogo: 'https://…/wide.png' }
29
48
  }
49
+ // → the response carries it as { 'wl-logo': media, 'wl-info': …, 'wl-styles': … }
30
50
  ```
31
51
 
32
- Server side wires the module declarations through `@owlmeans/server-wl`; web side through `@owlmeans/web-wl` / `@owlmeans/client-wl`.
52
+ So a reader picks a section by the alias it registered the provider under, and `type` tells it which
53
+ shape it is holding. `exists` is a tri-state: `true` a stored record, `false` a deliberate empty
54
+ default, `null` unknown.
55
+
56
+ ## Rules
57
+
58
+ - **The declaration carries no guard.** Whatever elevates `WL_PROVIDE` serves it anonymously unless
59
+ it adds one, so every section a deployment registers is readable by anyone who can name an
60
+ organization. Put nothing in a white-label record that is not meant to be public, or add a guard
61
+ where the entrypoint is elevated.
62
+ - `entityId`, `slug` and the `entity` param are declared with `EntityValueSchema` from
63
+ `@owlmeans/auth`, a plain `{ type: 'string', minLength: 3, maxLength: 256 }` — it bounds length and
64
+ nothing else, so a record id and a slug both pass (`CompanyInfo.slug` relaxes `minLength` to 0 on
65
+ top of it). `EntityValueSchema` is `@deprecated` in favour of `EntitySlugValueSchema`, the identical
66
+ schema it aliases; write new fields against the slug schema. What the `entity` param is expected to
67
+ hold is the serving side's rule, not this package's — see the `server-wl` skill.
68
+ - `ColorSchema` accepts `#` followed by 3–8 hex digits (length 4–9), so a named CSS colour or an
69
+ `rgb()` string fails it. That check runs only where `CustomColorsSchema` or `CustomStylesSchema` is
70
+ actually applied — this package's own entrypoint filter validates the path params alone, so a
71
+ package that stores styles must put the schema in its own filter or run it itself.
72
+ - `CustomStylesSchema` requires only `font` and `colors`, while the `CustomStyles` type also requires
73
+ `entityId`. Construct the record from the type — an object that satisfies the schema can still be
74
+ missing the id every provider keys on.
75
+ - Colours and fonts are all optional except `primaryColor` and `fontFamily` — a consumer must render
76
+ with whatever subset it gets rather than assuming a full palette.
33
77
 
34
78
  ## Depends On
35
79
 
36
- - `@owlmeans/entrypoint`, `@owlmeans/route`, `@owlmeans/auth-common`
80
+ - `@owlmeans/entrypoint`, `@owlmeans/route`, `@owlmeans/auth`
81
+ - `ajv` (peer)
82
+
83
+ Server side elevates the declaration through `@owlmeans/server-wl`; browser side through
84
+ `@owlmeans/web-wl`.
@@ -0,0 +1,2 @@
1
+ export declare const entrypoints: import("@owlmeans/entrypoint").CommonEntrypoint[];
2
+ //# sourceMappingURL=entrypoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entrypoints.d.ts","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,mDAKvB,CAAA"}
@@ -2,7 +2,7 @@ import { filter, entrypoint, params } from '@owlmeans/entrypoint';
2
2
  import { route, backend } from '@owlmeans/route';
3
3
  import { WL_PROVIDE, WL_PROVIDE_PATH } from './consts.js';
4
4
  import { ProvideParamsSchema } from './model/provider.js';
5
- export const modules = [
5
+ export const entrypoints = [
6
6
  entrypoint(route(WL_PROVIDE, WL_PROVIDE_PATH, backend()), filter(params(ProvideParamsSchema)))
7
7
  ];
8
- //# sourceMappingURL=modules.js.map
8
+ //# sourceMappingURL=entrypoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entrypoints.js","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEzD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,UAAU,CACR,KAAK,CAAC,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAC7C,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CACpC;CACF,CAAA"}
package/build/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type * from './types.js';
2
2
  export * from './model/index.js';
3
3
  export * from './consts.js';
4
- export * from './modules.js';
4
+ export * from './entrypoints.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './model/index.js';
2
2
  export * from './consts.js';
3
- export * from './modules.js';
3
+ export * from './entrypoints.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/wled",
3
- "version": "0.1.18-rc.1",
3
+ "version": "0.1.18-rc.11",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -24,9 +24,9 @@
24
24
  "ajv": "*"
25
25
  },
26
26
  "dependencies": {
27
- "@owlmeans/auth": "^0.1.18-rc.1",
28
- "@owlmeans/entrypoint": "^0.1.18-rc.1",
29
- "@owlmeans/route": "^0.1.18-rc.1"
27
+ "@owlmeans/auth": "^0.1.18-rc.9",
28
+ "@owlmeans/entrypoint": "^0.1.18-rc.11",
29
+ "@owlmeans/route": "^0.1.18-rc.9"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@owlmeans/dep-config": "workspace:*",
@@ -3,7 +3,7 @@ import { route, backend } from '@owlmeans/route'
3
3
  import { WL_PROVIDE, WL_PROVIDE_PATH } from './consts.js'
4
4
  import { ProvideParamsSchema } from './model/provider.js'
5
5
 
6
- export const modules = [
6
+ export const entrypoints = [
7
7
  entrypoint(
8
8
  route(WL_PROVIDE, WL_PROVIDE_PATH, backend()),
9
9
  filter(params(ProvideParamsSchema))
package/src/index.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  export type * from './types.js'
3
3
  export * from './model/index.js'
4
4
  export * from './consts.js'
5
- export * from './modules.js'
5
+ export * from './entrypoints.js'
@@ -1,2 +0,0 @@
1
- export declare const modules: import("@owlmeans/entrypoint").CommonEntrypoint[];
2
- //# sourceMappingURL=modules.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,mDAKnB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"modules.js","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEzD,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,UAAU,CACR,KAAK,CAAC,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAC7C,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CACpC;CACF,CAAA"}