@autobusal/providers 1.34.0 → 1.36.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 +12 -0
- package/package.json +1 -1
- package/types/pages.ts +28 -10
- package/types/settings.ts +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.36.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`LabelSettings.locales`** - `{default, available}`, an admin-editable override of `preferences.languages` (which UI locales this label's site responds to, and its default). Null until the new admin-label Locales tab saves one, in which case `preferences.languages` keeps coming from the label's settings.json file exactly as before.
|
|
8
|
+
|
|
9
|
+
## 1.35.0
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- **`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.
|
|
14
|
+
|
|
3
15
|
## 1.34.0
|
|
4
16
|
|
|
5
17
|
### 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
|
|
package/types/settings.ts
CHANGED
|
@@ -140,6 +140,19 @@ export interface LabelSettings {
|
|
|
140
140
|
currency: string
|
|
141
141
|
affiliate_max_tickets: number
|
|
142
142
|
|
|
143
|
+
/**
|
|
144
|
+
* Edited: Ferjolt Ozuni - Date: 2026-08-10
|
|
145
|
+
* Admin-editable override of `preferences.languages` (the label's active
|
|
146
|
+
* UI locales) - null until an admin saves the Locales tab, in which case
|
|
147
|
+
* `preferences.languages` keeps coming from the label's settings.json
|
|
148
|
+
* file, same as before this existed. See Labels\AdminController::
|
|
149
|
+
* locales() and the add_locales_to_labels_settings migration.
|
|
150
|
+
*/
|
|
151
|
+
locales?: {
|
|
152
|
+
default: string
|
|
153
|
+
available: string[]
|
|
154
|
+
} | null
|
|
155
|
+
|
|
143
156
|
legal: {
|
|
144
157
|
kop: string
|
|
145
158
|
njb: string
|