Phase A: generierter Dart-Client + DI-Foundation für Rust-Backend

OpenAPI-Generator-Setup:
- tool/generate_api_client.sh: Direkter Aufruf der openapi-generator-cli.jar
  (Java-CLI statt Dart-build_runner-Integration — vermeidet die
  analyzer-/source_gen-Version-Hölle mit json_serializable)
- tool/fetch_openapi_generator.sh: lädt die JAR (29 MB) nach (gitignored)
- openapi/holzleitner.json: Snapshot der Backend-Spec für reproduzierbare
  Generation
- packages/holzleitner_api/: generiertes Dart-Sub-Package (built_value +
  dio), per path-dep im Haupt-pubspec eingehängt

Netzwerk-Layer (lib/data/network/):
- BackendConfig: API- und Keycloak-Endpoints für Local-Dev (localhost
  wegen Keycloak-iss-Claim).
- AuthTokenProvider-Schnittstelle.
- DevPasswordGrantTokenProvider: Phase-A-Provider via Keycloak
  password-grant, Token-Caching mit Expiry-Check (Phase B ersetzt das
  durch flutter_appauth PKCE).
- HolzleitnerAuthInterceptor: dynamischer Bearer-Inject pro Request.
- HolzleitnerApiFactory: baut die generierte HolzleitnerApi-Klasse
  mit unserem Interceptor statt der vier Default-Auth-Interceptors.
- network_locator.registerNetworking(): get_it-Setup, in main() vor
  runApp() aufgerufen.

Clean-Arch-Scaffolding (lib/data/, lib/domain/):
- Verzeichnisstruktur für Phase C+D angelegt (mapper/, repository/,
  entity/, repository/) — befüllt sich in den Folge-Phasen.

Smoke-Test:
- tool/smoke_test_api.dart ruft /health (ungeschützt) und /me/cars
  (mit Bearer) via generiertem Client — grün gegen lokales Backend.
This commit is contained in:
Dennis Nemec
2026-05-14 22:44:51 +02:00
parent 456fb59668
commit 8cf4045e44
222 changed files with 19350 additions and 0 deletions

View File

@ -0,0 +1,199 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'tour_details.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
class _$TourDetails extends TourDetails {
@override
final BuiltList<Article> articles;
@override
final BuiltList<CustomerContact> customerContacts;
@override
final BuiltList<Customer> customers;
@override
final BuiltList<DeliveryWithItems> deliveries;
@override
final BuiltList<DeliveryNote> notes;
@override
final Tour tour;
@override
final BuiltList<Warehouse> warehouses;
factory _$TourDetails([void Function(TourDetailsBuilder)? updates]) =>
(TourDetailsBuilder()..update(updates))._build();
_$TourDetails._(
{required this.articles,
required this.customerContacts,
required this.customers,
required this.deliveries,
required this.notes,
required this.tour,
required this.warehouses})
: super._();
@override
TourDetails rebuild(void Function(TourDetailsBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
TourDetailsBuilder toBuilder() => TourDetailsBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is TourDetails &&
articles == other.articles &&
customerContacts == other.customerContacts &&
customers == other.customers &&
deliveries == other.deliveries &&
notes == other.notes &&
tour == other.tour &&
warehouses == other.warehouses;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, articles.hashCode);
_$hash = $jc(_$hash, customerContacts.hashCode);
_$hash = $jc(_$hash, customers.hashCode);
_$hash = $jc(_$hash, deliveries.hashCode);
_$hash = $jc(_$hash, notes.hashCode);
_$hash = $jc(_$hash, tour.hashCode);
_$hash = $jc(_$hash, warehouses.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'TourDetails')
..add('articles', articles)
..add('customerContacts', customerContacts)
..add('customers', customers)
..add('deliveries', deliveries)
..add('notes', notes)
..add('tour', tour)
..add('warehouses', warehouses))
.toString();
}
}
class TourDetailsBuilder implements Builder<TourDetails, TourDetailsBuilder> {
_$TourDetails? _$v;
ListBuilder<Article>? _articles;
ListBuilder<Article> get articles =>
_$this._articles ??= ListBuilder<Article>();
set articles(ListBuilder<Article>? articles) => _$this._articles = articles;
ListBuilder<CustomerContact>? _customerContacts;
ListBuilder<CustomerContact> get customerContacts =>
_$this._customerContacts ??= ListBuilder<CustomerContact>();
set customerContacts(ListBuilder<CustomerContact>? customerContacts) =>
_$this._customerContacts = customerContacts;
ListBuilder<Customer>? _customers;
ListBuilder<Customer> get customers =>
_$this._customers ??= ListBuilder<Customer>();
set customers(ListBuilder<Customer>? customers) =>
_$this._customers = customers;
ListBuilder<DeliveryWithItems>? _deliveries;
ListBuilder<DeliveryWithItems> get deliveries =>
_$this._deliveries ??= ListBuilder<DeliveryWithItems>();
set deliveries(ListBuilder<DeliveryWithItems>? deliveries) =>
_$this._deliveries = deliveries;
ListBuilder<DeliveryNote>? _notes;
ListBuilder<DeliveryNote> get notes =>
_$this._notes ??= ListBuilder<DeliveryNote>();
set notes(ListBuilder<DeliveryNote>? notes) => _$this._notes = notes;
TourBuilder? _tour;
TourBuilder get tour => _$this._tour ??= TourBuilder();
set tour(TourBuilder? tour) => _$this._tour = tour;
ListBuilder<Warehouse>? _warehouses;
ListBuilder<Warehouse> get warehouses =>
_$this._warehouses ??= ListBuilder<Warehouse>();
set warehouses(ListBuilder<Warehouse>? warehouses) =>
_$this._warehouses = warehouses;
TourDetailsBuilder() {
TourDetails._defaults(this);
}
TourDetailsBuilder get _$this {
final $v = _$v;
if ($v != null) {
_articles = $v.articles.toBuilder();
_customerContacts = $v.customerContacts.toBuilder();
_customers = $v.customers.toBuilder();
_deliveries = $v.deliveries.toBuilder();
_notes = $v.notes.toBuilder();
_tour = $v.tour.toBuilder();
_warehouses = $v.warehouses.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(TourDetails other) {
_$v = other as _$TourDetails;
}
@override
void update(void Function(TourDetailsBuilder)? updates) {
if (updates != null) updates(this);
}
@override
TourDetails build() => _build();
_$TourDetails _build() {
_$TourDetails _$result;
try {
_$result = _$v ??
_$TourDetails._(
articles: articles.build(),
customerContacts: customerContacts.build(),
customers: customers.build(),
deliveries: deliveries.build(),
notes: notes.build(),
tour: tour.build(),
warehouses: warehouses.build(),
);
} catch (_) {
late String _$failedField;
try {
_$failedField = 'articles';
articles.build();
_$failedField = 'customerContacts';
customerContacts.build();
_$failedField = 'customers';
customers.build();
_$failedField = 'deliveries';
deliveries.build();
_$failedField = 'notes';
notes.build();
_$failedField = 'tour';
tour.build();
_$failedField = 'warehouses';
warehouses.build();
} catch (e) {
throw BuiltValueNestedFieldError(
r'TourDetails', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint