@autobusal/providers 1.34.0 → 1.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/types/pages.ts +28 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.35.0
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- **`PageData` (the admin Pages shape) is now locale-object-based, not `_en`/`_sq` columns.** `title`/`content`/`keywords`/`description` are each `LocalizedText` (`Record<string, string>`, one value per locale) - matches obtapi's `pages_content_to_json` migration, which moved `pages` off the two-content-language ceiling onto the same JSON-per-locale shape `faqs` already established. `title_en`/`title_sq`/`content_en`/`content_sq` and friends are gone from the type entirely. New `PageSaveData` covers what the admin save endpoint actually accepts (each field JSON-stringified, not the raw object) - the public page-view response (`@autobusal/page/types.ts`) is unaffected, it was already a single resolved string per field.
|
|
8
|
+
|
|
3
9
|
## 1.34.0
|
|
4
10
|
|
|
5
11
|
### Added
|
package/package.json
CHANGED
package/types/pages.ts
CHANGED
|
@@ -1,19 +1,37 @@
|
|
|
1
|
+
/** One value per locale, e.g. `{ en: "About Us", sq: "Rreth Nesh" }`. */
|
|
2
|
+
export type LocalizedText = Record<string, string>
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The ADMIN shape (Pages\AdminController::get()) - title/content/keywords/
|
|
6
|
+
* description are the raw per-locale objects (Page's own JSON columns,
|
|
7
|
+
* see the pages_content_to_json migration), unlike the public page-view
|
|
8
|
+
* response (@autobusal/page/types.ts), which is already resolved to one
|
|
9
|
+
* locale's plain string.
|
|
10
|
+
*/
|
|
1
11
|
export interface PageData {
|
|
2
12
|
id: number
|
|
3
13
|
name: string
|
|
4
|
-
name_en?: string
|
|
5
|
-
name_sq?: string
|
|
6
14
|
internal: string
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
title: LocalizedText
|
|
16
|
+
content: LocalizedText
|
|
17
|
+
keywords: LocalizedText
|
|
18
|
+
description: LocalizedText
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* What Pages\AdminController::update() actually accepts - title/content/
|
|
23
|
+
* keywords/description are each a JSON-STRINGIFIED LocalizedText, not the
|
|
24
|
+
* raw object PageData carries. Matches the wire shape Content/Ai.tsx
|
|
25
|
+
* already uses for its own multi-entry field, and avoids the bracket-
|
|
26
|
+
* notation array fields the BFF proxy can't forward (see the
|
|
27
|
+
* bff-token-field-collision memory).
|
|
28
|
+
*/
|
|
29
|
+
export interface PageSaveData {
|
|
30
|
+
name: string
|
|
31
|
+
internal: string
|
|
32
|
+
title: string
|
|
11
33
|
content: string
|
|
12
|
-
keywords_en: string
|
|
13
|
-
keywords_sq: string
|
|
14
34
|
keywords: string
|
|
15
|
-
description_en: string
|
|
16
|
-
description_sq: string
|
|
17
35
|
description: string
|
|
18
36
|
}
|
|
19
37
|
|