@reblu/site-client 4.0.1 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +157 -0
  2. package/package.json +5 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,157 @@
1
+ # @reblu/site-client
2
+
3
+ ## 5.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 9f54c58: REB-774 — ship `CHANGELOG.md` inside the published npm tarball for every
8
+ `@reblu/site-*` package (verified via `pnpm pack`: it was previously absent,
9
+ since `"files": ["dist"]` limited the tarball to `dist/` and npm only
10
+ auto-includes `README.md`, `LICENSE` and `package.json`). Consumers can now
11
+ read the changelog for the version they installed straight from
12
+ `node_modules/@reblu/<pkg>/CHANGELOG.md`.
13
+ - 9f54c58: REB-774 — widen `@reblu/site-client`'s and `@reblu/site-blocks`' internal
14
+ `@reblu/site-*` dependency ranges from `workspace:*` to `workspace:^`, which
15
+ pnpm publishes as a caret range (e.g. `^1.0.0`) instead of an exact pin.
16
+ Verified against the packed tarballs: `site-client`'s `@reblu/site-contracts`
17
+ peerDependency and devDependency, and `site-blocks`' `@reblu/site-contracts`
18
+ and `@reblu/site-ui` dependencies, now publish as `^1.0.0` / `^0.5.0`. A
19
+ consuming SITE on a caret range for those packages no longer risks two copies
20
+ of the same dependency in its tree, or an unmet peer, the next time
21
+ `site-contracts` or `site-ui` ships an additive release.
22
+
23
+ ## 5.0.0
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [340db30]
28
+ - @reblu/site-contracts@1.0.0
29
+
30
+ ## 4.0.1
31
+
32
+ ### Patch Changes
33
+
34
+ - f0d6d0a: Document the real range of `PagesListParams.pageSize` (REB-736).
35
+
36
+ `pageSize` was typed as a bare `number`, so a typed caller could write `pages.list({ pageSize: 101 })` and have it typecheck — while the API it calls, `GET /api/site/pages`, previously 500'd on that exact value (REB-736) and now silently clamps it to 100 instead. The type is unchanged (TypeScript has no numeric-range type worth reaching for here), but the field now carries a doc comment stating the real, asymmetric contract: above 100 clamps down to 100, while anything below 1 or non-numeric falls back to the default of 20 — not down to 1. A caller reading the type sees this instead of an unbounded `number` that quietly disagrees with the server.
37
+
38
+ ## 4.0.0
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [7dcfb4f]
43
+ - @reblu/site-contracts@0.5.0
44
+
45
+ ## 3.0.0
46
+
47
+ ### Major Changes
48
+
49
+ - eef13bf: Expose typed professional-profile fields on `Page`/`pages.list`, widen the list filter beyond the legacy DB page type, and add the pagination/sort params `pages.list` was missing.
50
+
51
+ `pageType='team'` pages carry a structured, sector-agnostic professional
52
+ profile (role, structured CV, social links) — previously trapped in
53
+ `Page.metadata`, which never reached the wire. `pageListItemSchema` and
54
+ `pageDetailSchema` now expose it as a typed `professional` field (`null` for
55
+ every other pageType).
56
+ - `@reblu/site-contracts` (minor, additive-only) publishes `ProfessionalSummary`,
57
+ `ProfessionalProfile`, `ProfessionalCv`, `ProfessionalCvEntry`,
58
+ `ProfessionalLanguage`, `ProfessionalLanguageLevel`, `ProfessionalSocialLink`,
59
+ `ProfessionalSocialPlatform`, and `PagesListSort`.
60
+ - `@reblu/site-client` (major — see below) `pages.list({ type })` is widened
61
+ from `LegacyPageType` (SERVICE|CUSTOM) to the flexible `PageType`
62
+ (service|custom|treatments|specialties|team|generic) — the value space the
63
+ route actually filters on. A typed SITE can now request `type: 'team'`
64
+ without escaping its own types. `type` also accepts an array for a
65
+ multi-type filter (repeated `?type=`).
66
+ - `pages.list` also gains `page`/`pageSize`/`sort` — `pagesListParamsSchema`
67
+ already accepted them and the route already returns a populated `meta`
68
+ (total/page/limit/pages), but `PagesListParams` exposed none of it, so a
69
+ typed caller had no way to request page 2 or change sort. Note the param
70
+ is `pageSize`, not `limit` — pages and blog genuinely differ (this route
71
+ reads `pageSize`; blog's reads `limit`), while the response `meta.limit`
72
+ key is the same word for a different request param on this endpoint.
73
+
74
+ **Breaking (major, not minor):** `PagesListParams.type`'s value space changes
75
+ from `LegacyPageType` to `PageType` — a caller passing `'SERVICE'`/`'CUSTOM'`
76
+ literally will no longer typecheck. No runtime behavior changes for existing
77
+ callers: the route was already silently dropping those values, since it only
78
+ ever validated the lowercase flexible set — but the type change itself is a
79
+ real breaking change for compilation, so this ships as major rather than
80
+ minor even though nothing behaves differently at runtime.
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [eef13bf]
85
+ - @reblu/site-contracts@0.4.0
86
+
87
+ ## 2.0.0
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies [495d32d]
92
+ - @reblu/site-contracts@0.3.0
93
+
94
+ ## 1.0.0
95
+
96
+ ### Minor Changes
97
+
98
+ - d081f12: Expose the academy course catalogue through the SDK.
99
+
100
+ The headless academy endpoints shipped in REB-528/REB-534, but their contract
101
+ file was never re-exported from base-api's contracts barrel, so the types could
102
+ not reach `@reblu/site-contracts` and SITEs had no typed way to call them.
103
+ - `@reblu/site-contracts` publishes the catalogue DTOs: `AcademyCourseSummary`,
104
+ `AcademyCourseDetail`, `AcademyCategoryPublic`, `AcademyModulePublic`,
105
+ `AcademyLessonPublic`, `AcademyInstructorPublic`, and the `AcademyCourseSort`
106
+ query union.
107
+ - `@reblu/site-client` adds the `academy` namespace: `academy.courses(params?)`
108
+ (filtered + paginated), `academy.bySlug(slug)`, and `academy.categories()`.
109
+ `sort` is typed as a union because the server silently ignores an unknown key,
110
+ so a typo is now a compile error instead of a no-op falling back to default
111
+ order.
112
+
113
+ Additive only — no existing export changes shape.
114
+
115
+ ### Patch Changes
116
+
117
+ - 06de596: Expose the academy enrollment request through the SDK.
118
+
119
+ `academy.enrollmentRequest(body)` wraps `POST /api/site/academy/enrollment-requests`,
120
+ completing the academy surface the catalogue namespace opened in REB-507.
121
+
122
+ It deliberately uses the raw `request()` transport rather than `requestMutation`.
123
+ That route answers with a bare `{ message }` instead of the `{ data }` envelope
124
+ every other write uses, so `requestMutation` would unwrap a missing `.data` and
125
+ resolve to `undefined`. Normalizing the route's envelope was rejected: its
126
+ response shape is load-bearing anti-enumeration behaviour.
127
+
128
+ Callers should note the reply is UNIFORM by design — it does not reveal whether
129
+ the email was new (a request row was created) or already known (a sign-in link
130
+ was sent and no row exists). It is not a receipt, and UI copy must not present
131
+ it as one.
132
+
133
+ Adds the SDK-owned request types `AcademyEnrollmentRequestInput` and
134
+ `AcademyEnrollmentRequestResult`. Additive only — no existing export changes shape.
135
+
136
+ - Updated dependencies [d081f12]
137
+ - @reblu/site-contracts@0.2.0
138
+
139
+ ## 0.1.2
140
+
141
+ ### Patch Changes
142
+
143
+ - 356e04d: Republish with `dist/` included and shop surface exposed.
144
+
145
+ `0.1.0` was published broken: the bootstrap publish ran without a build, so the
146
+ tarball shipped only `LICENSE`, `README.md`, and `package.json` — `dist/` was
147
+ absent and `main`/`module`/`types` pointed at files that did not exist, making
148
+ both packages unusable when installed.
149
+ - Add a `prepack` lifecycle script to both packages so `pnpm pack` / `npm pack`
150
+ / `npm publish` always run the build and emit `dist/` into the tarball. Build
151
+ before publish is now enforced by the package itself, not only by CI.
152
+ - `@reblu/site-client` ships the `shop` domain (`domains/shop.ts`) and
153
+ `@reblu/site-contracts` exports the matching shop types, so the SITE API shop
154
+ surface is available to external consumers.
155
+
156
+ - Updated dependencies [356e04d]
157
+ - @reblu/site-contracts@0.1.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reblu/site-client",
3
- "version": "4.0.1",
3
+ "version": "5.0.1",
4
4
  "description": "Framework-agnostic HTTP client for the Reblu SITE API — dependency-free, injectable cache adapter, typed by @reblu/site-contracts.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Reblu — Adolfo Unturbe",
@@ -25,7 +25,8 @@
25
25
  "type": "module",
26
26
  "sideEffects": false,
27
27
  "files": [
28
- "dist"
28
+ "dist",
29
+ "CHANGELOG.md"
29
30
  ],
30
31
  "main": "./dist/index.cjs",
31
32
  "module": "./dist/index.js",
@@ -46,7 +47,7 @@
46
47
  "access": "public"
47
48
  },
48
49
  "peerDependencies": {
49
- "@reblu/site-contracts": "0.5.0"
50
+ "@reblu/site-contracts": "^1.0.1"
50
51
  },
51
52
  "devDependencies": {
52
53
  "@size-limit/preset-small-lib": "^11.1.6",
@@ -57,7 +58,7 @@
57
58
  "typescript": "^5.8.3",
58
59
  "vitest": "^4.0.15",
59
60
  "@reblu/config": "0.0.1",
60
- "@reblu/site-contracts": "0.5.0"
61
+ "@reblu/site-contracts": "^1.0.1"
61
62
  },
62
63
  "size-limit": [
63
64
  {