@autobusal/providers 1.32.0 → 1.34.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.34.0
4
+
5
+ ### Added
6
+
7
+ - **`OperatorData.brand_name` / `OperatorData.display_name`** - an operator's optional public-facing trade name and the computed field (`brand_name` if set, else `company`) every customer-facing display should read. `company` stays as the registered legal name, for legal/financial contexts only.
8
+
9
+ ## 1.33.0
10
+
11
+ ### Added
12
+
13
+ - **`LabelSettings.ai`** and **`LabelData.is_main`** - a label's per-provider AI configuration (`{providers: {openai: {status, api_key?, models?, default_model?, labels_allowed?}, ...}, default_provider}`) and whether this label IS the platform's main one, both needed by the new admin-label AI tab to know which fields to show.
14
+
3
15
  ## 1.32.0
4
16
 
5
17
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.32.0",
3
+ "version": "1.34.0",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"
@@ -8,6 +8,14 @@ export interface OperatorData {
8
8
  rating?: RatingData | null
9
9
  id: number
10
10
  company: string
11
+ // Edited: Ferjolt Ozuni - Date: 2026-08-10
12
+ // brand_name is the raw, optional override; display_name is what every
13
+ // customer-facing display should actually read (brand_name if set, else
14
+ // company) - obtapi computes the fallback, nothing on this side should
15
+ // re-derive it. `company` itself stays for legal/financial contexts
16
+ // only (invoices, admin/back-office screens).
17
+ brand_name?: string
18
+ display_name: string
11
19
  nipt: string
12
20
  name: string
13
21
  code: string
package/types/settings.ts CHANGED
@@ -127,6 +127,7 @@ export interface LabelData {
127
127
  id: number
128
128
  name: string
129
129
  internal: string
130
+ is_main: boolean
130
131
  settings: LabelSettings
131
132
  payments: LabelPayments
132
133
  }
@@ -314,6 +315,24 @@ export interface LabelSettings {
314
315
  preset: string
315
316
  overrides: Record<string, any>
316
317
  } | null
318
+
319
+ // Edited: Ferjolt Ozuni - Date: 2026-08-08
320
+ // Per-provider AI configuration - see obtapi's Labels\AdminController::
321
+ // ai() and Libraries\AI\Resolver. 'main' status is only ever meaningful
322
+ // on a non-main label (borrow the platform's key for that provider);
323
+ // labels_allowed is only ever meaningful on the main label (whether
324
+ // other labels may borrow THIS key). api_key/models/default_model are
325
+ // only present once status is 'dedicated'.
326
+ ai?: {
327
+ providers: Record<string, {
328
+ status: 'disabled' | 'dedicated' | 'main'
329
+ api_key?: string
330
+ models?: string[]
331
+ default_model?: string
332
+ labels_allowed?: boolean
333
+ }>
334
+ default_provider?: string
335
+ }
317
336
  }
318
337
 
319
338
  // Edited: Ferjolt Ozuni - Date: 2026-07-18