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,26 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for Account
void main() {
final instance = AccountBuilder();
// TODO add properties to the builder and call build()
group(Account, () {
// bool active
test('to test the property `active`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// int personalnummer
test('to test the property `personalnummer`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,18 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
/// tests for AccountsApi
void main() {
final instance = HolzleitnerApi().getAccountsApi();
group(AccountsApi, () {
// Liest den Account zu einer Personalnummer.
//
//Future<Account> getAccount(int personalnummer) async
test('test getAccount', () async {
// TODO
});
});
}

View File

@ -0,0 +1,36 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for Address
void main() {
final instance = AddressBuilder();
// TODO add properties to the builder and call build()
group(Address, () {
// String city
test('to test the property `city`', () async {
// TODO
});
// String country
test('to test the property `country`', () async {
// TODO
});
// String houseNumber
test('to test the property `houseNumber`', () async {
// TODO
});
// String postalCode
test('to test the property `postalCode`', () async {
// TODO
});
// String street
test('to test the property `street`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for ApplyScansRequest
void main() {
final instance = ApplyScansRequestBuilder();
// TODO add properties to the builder and call build()
group(ApplyScansRequest, () {
// BuiltList<ScanEvent> scans
test('to test the property `scans`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for ApplyScansResponse
void main() {
final instance = ApplyScansResponseBuilder();
// TODO add properties to the builder and call build()
group(ApplyScansResponse, () {
// BuiltList<ScanResult> results
test('to test the property `results`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,36 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for Article
void main() {
final instance = ArticleBuilder();
// TODO add properties to the builder and call build()
group(Article, () {
// String articleNumber
test('to test the property `articleNumber`', () async {
// TODO
});
// String defaultWarehouseId
test('to test the property `defaultWarehouseId`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// bool scannable
test('to test the property `scannable`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for AssignCarRequest
void main() {
final instance = AssignCarRequestBuilder();
// TODO add properties to the builder and call build()
group(AssignCarRequest, () {
// String carId
test('to test the property `carId`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,9 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for AuditAction
void main() {
group(AuditAction, () {
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for CancelDeliveryRequest
void main() {
final instance = CancelDeliveryRequestBuilder();
// TODO add properties to the builder and call build()
group(CancelDeliveryRequest, () {
// String reason
test('to test the property `reason`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for CarResponse
void main() {
final instance = CarResponseBuilder();
// TODO add properties to the builder and call build()
group(CarResponse, () {
// Car car
test('to test the property `car`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,32 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for Car
void main() {
final instance = CarBuilder();
// TODO add properties to the builder and call build()
group(Car, () {
// Verweis auf [`crate::domain::Account::personalnummer`].
// int accountId
test('to test the property `accountId`', () async {
// TODO
});
// bool active
test('to test the property `active`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// String plate
test('to test the property `plate`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,32 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
/// tests for CarsApi
void main() {
final instance = HolzleitnerApi().getCarsApi();
group(CarsApi, () {
// Legt ein neues Fahrzeug für den angemeldeten Fahrer an.
//
//Future<CarResponse> createMyCar(CreateCarRequest createCarRequest) async
test('test createMyCar', () async {
// TODO
});
// Listet die Fahrzeuge des angemeldeten Fahrers.
//
//Future<CarsList> listMyCars({ bool includeInactive }) async
test('test listMyCars', () async {
// TODO
});
// Aktualisiert ein Fahrzeug (Kennzeichen ändern / deaktivieren).
//
//Future<CarResponse> updateMyCar(String carId, UpdateCarRequest updateCarRequest) async
test('test updateMyCar', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for CarsList
void main() {
final instance = CarsListBuilder();
// TODO add properties to the builder and call build()
group(CarsList, () {
// BuiltList<Car> cars
test('to test the property `cars`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for CreateCarRequest
void main() {
final instance = CreateCarRequestBuilder();
// TODO add properties to the builder and call build()
group(CreateCarRequest, () {
// String plate
test('to test the property `plate`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,28 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for CreateDeliveryNoteRequest
void main() {
final instance = CreateDeliveryNoteRequestBuilder();
// TODO add properties to the builder and call build()
group(CreateDeliveryNoteRequest, () {
// Fahrzeug, das die Notiz erzeugt hat. Muss zum angemeldeten Account gehören. `None` ist erlaubt.
// String authorCarId
test('to test the property `authorCarId`', () async {
// TODO
});
// Object-Storage-Key oder URL eines vorab hochgeladenen Bildes.
// String imageAttachment
test('to test the property `imageAttachment`', () async {
// TODO
});
// String text
test('to test the property `text`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,36 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for CustomerContact
void main() {
final instance = CustomerContactBuilder();
// TODO add properties to the builder and call build()
group(CustomerContact, () {
// String customerId
test('to test the property `customerId`', () async {
// TODO
});
// String email
test('to test the property `email`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// String phone
test('to test the property `phone`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,31 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for Customer
void main() {
final instance = CustomerBuilder();
// TODO add properties to the builder and call build()
group(Customer, () {
// Address address
test('to test the property `address`', () async {
// TODO
});
// int erpCustomerId
test('to test the property `erpCustomerId`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,53 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
/// tests for DeliveriesApi
void main() {
final instance = HolzleitnerApi().getDeliveriesApi();
group(DeliveriesApi, () {
// Setzt das `assigned_car_id` einer Lieferung. `carId: null` löst die Zuordnung wieder. Der Use Case stellt sicher, dass das Fahrzeug zum angemeldeten Account gehört.
//
//Future<DeliveryResponse> assignCar(String deliveryId, AssignCarRequest assignCarRequest) async
test('test assignCar', () async {
// TODO
});
// Setzt die Lieferung auf `canceled` — endgültig. Erlaubt aus `active` und `held`.
//
//Future<DeliveryResponse> cancel(String deliveryId, CancelDeliveryRequest cancelDeliveryRequest) async
test('test cancel', () async {
// TODO
});
// Schließt die Lieferung ab — `state = completed`. Nur aus `active`.
//
//Future<DeliveryResponse> complete(String deliveryId) async
test('test complete', () async {
// TODO
});
// Legt eine neue Notiz an einer Lieferung an. Mindestens eines von `text` und `imageAttachment` muss inhaltlich gefüllt sein (Leerstrings werden serverseitig getrimmt und als leer behandelt).
//
//Future<DeliveryNoteResponse> createNote(String deliveryId, CreateDeliveryNoteRequest createDeliveryNoteRequest) async
test('test createNote', () async {
// TODO
});
// Setzt die Lieferung auf `held`. Nur aus `active` zulässig.
//
//Future<DeliveryResponse> hold(String deliveryId, HoldDeliveryRequest holdDeliveryRequest) async
test('test hold', () async {
// TODO
});
// Setzt die Lieferung zurück auf `active`. Nur aus `held` zulässig.
//
//Future<DeliveryResponse> resume(String deliveryId) async
test('test resume', () async {
// TODO
});
});
}

View File

@ -0,0 +1,53 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for DeliveryItem
void main() {
final instance = DeliveryItemBuilder();
// TODO add properties to the builder and call build()
group(DeliveryItem, () {
// String articleId
test('to test the property `articleId`', () async {
// TODO
});
// ERP-Belegzeilen-Nr (Position innerhalb des Belegs).
// int belegzeilenNr
test('to test the property `belegzeilenNr`', () async {
// TODO
});
// String deliveryId
test('to test the property `deliveryId`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// Bei Items aus einer Stückliste: Artikelnummer der Komponente. Bei regulären Belegzeilen: `None`.
// String komponentenArtikelNr
test('to test the property `komponentenArtikelNr`', () async {
// TODO
});
// int requiredQuantity
test('to test the property `requiredQuantity`', () async {
// TODO
});
// ScanState scanState
test('to test the property `scanState`', () async {
// TODO
});
// String warehouseId
test('to test the property `warehouseId`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for DeliveryNoteResponse
void main() {
final instance = DeliveryNoteResponseBuilder();
// TODO add properties to the builder and call build()
group(DeliveryNoteResponse, () {
// DeliveryNote note
test('to test the property `note`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,49 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for DeliveryNote
void main() {
final instance = DeliveryNoteBuilder();
// TODO add properties to the builder and call build()
group(DeliveryNote, () {
// Fahrzeug, falls bekannt — nullable bis das Backend Cars verwaltet.
// String authorCarId
test('to test the property `authorCarId`', () async {
// TODO
});
// Personalnummer des Akteurs (aus dem JWT). Pflicht.
// int authorPersonalnummer
test('to test the property `authorPersonalnummer`', () async {
// TODO
});
// DateTime createdAt
test('to test the property `createdAt`', () async {
// TODO
});
// String deliveryId
test('to test the property `deliveryId`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// Referenz auf einen Bild-Anhang (z. B. Object-Storage-Key/URL).
// String imageAttachment
test('to test the property `imageAttachment`', () async {
// TODO
});
// String text
test('to test the property `text`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,21 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for DeliveryOrderEntry
void main() {
final instance = DeliveryOrderEntryBuilder();
// TODO add properties to the builder and call build()
group(DeliveryOrderEntry, () {
// String deliveryId
test('to test the property `deliveryId`', () async {
// TODO
});
// int sortOrder
test('to test the property `sortOrder`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for DeliveryResponse
void main() {
final instance = DeliveryResponseBuilder();
// TODO add properties to the builder and call build()
group(DeliveryResponse, () {
// Delivery delivery
test('to test the property `delivery`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,9 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for DeliveryState
void main() {
group(DeliveryState, () {
});
}

View File

@ -0,0 +1,78 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for Delivery
void main() {
//final instance = DeliveryBuilder();
// TODO add properties to the builder and call build()
group(Delivery, () {
// Fahrzeug-Zuordnung, gesetzt in der Auswählen-Phase. Bei Ein-Auto-Teams beim Sync automatisch gefüllt.
// String assignedCarId
test('to test the property `assignedCarId`', () async {
// TODO
});
// Ausgewählte Ansprechpartner für genau diese Lieferung (Auswahl aus `Customer.contacts`). Kann leer sein.
// BuiltList<String> contactPersonIds
test('to test the property `contactPersonIds`', () async {
// TODO
});
// String customerId
test('to test the property `customerId`', () async {
// TODO
});
// Eingefrorene Liefer-Adresse zum Zeitpunkt des Tour-Syncs. Schützt vor rückwirkenden Kunden-Adressänderungen.
// Address deliveryAddressSnapshot
test('to test the property `deliveryAddressSnapshot`', () async {
// TODO
});
// Wunsch-Lieferzeit als Freitext (z. B. \"vormittags\", \"ab 14:00\").
// String desiredTime
test('to test the property `desiredTime`', () async {
// TODO
});
// ERP-Beleg-Bezug: business-stabiles Paar `(Belegart, Belegnummer)`. Überlebt den Belegkopf-Archivübergang.
// int erpBelegartId
test('to test the property `erpBelegartId`', () async {
// TODO
});
// String erpBelegnummer
test('to test the property `erpBelegnummer`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// Sondervereinbarungen (z. B. „Türklingel defekt, hintenrum klopfen\").
// String specialAgreements
test('to test the property `specialAgreements`', () async {
// TODO
});
// DeliveryState state
test('to test the property `state`', () async {
// TODO
});
// Begründung bei `state == Held` oder `state == Canceled`. Beim Resume / Complete wieder `None`.
// String stateReason
test('to test the property `stateReason`', () async {
// TODO
});
// String tourId
test('to test the property `tourId`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,89 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for DeliveryWithItems
void main() {
final instance = DeliveryWithItemsBuilder();
// TODO add properties to the builder and call build()
group(DeliveryWithItems, () {
// Fahrzeug-Zuordnung, gesetzt in der Auswählen-Phase. Bei Ein-Auto-Teams beim Sync automatisch gefüllt.
// String assignedCarId
test('to test the property `assignedCarId`', () async {
// TODO
});
// Ausgewählte Ansprechpartner für genau diese Lieferung (Auswahl aus `Customer.contacts`). Kann leer sein.
// BuiltList<String> contactPersonIds
test('to test the property `contactPersonIds`', () async {
// TODO
});
// String customerId
test('to test the property `customerId`', () async {
// TODO
});
// Eingefrorene Liefer-Adresse zum Zeitpunkt des Tour-Syncs. Schützt vor rückwirkenden Kunden-Adressänderungen.
// Address deliveryAddressSnapshot
test('to test the property `deliveryAddressSnapshot`', () async {
// TODO
});
// Wunsch-Lieferzeit als Freitext (z. B. \"vormittags\", \"ab 14:00\").
// String desiredTime
test('to test the property `desiredTime`', () async {
// TODO
});
// ERP-Beleg-Bezug: business-stabiles Paar `(Belegart, Belegnummer)`. Überlebt den Belegkopf-Archivübergang.
// int erpBelegartId
test('to test the property `erpBelegartId`', () async {
// TODO
});
// String erpBelegnummer
test('to test the property `erpBelegnummer`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// Sondervereinbarungen (z. B. „Türklingel defekt, hintenrum klopfen\").
// String specialAgreements
test('to test the property `specialAgreements`', () async {
// TODO
});
// DeliveryState state
test('to test the property `state`', () async {
// TODO
});
// Begründung bei `state == Held` oder `state == Canceled`. Beim Resume / Complete wieder `None`.
// String stateReason
test('to test the property `stateReason`', () async {
// TODO
});
// String tourId
test('to test the property `tourId`', () async {
// TODO
});
// BuiltList<DeliveryItem> items
test('to test the property `items`', () async {
// TODO
});
// Sortier-Reihenfolge innerhalb der Tour (1-basiert).
// int sortOrder
test('to test the property `sortOrder`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,18 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
/// tests for HealthApi
void main() {
final instance = HolzleitnerApi().getHealthApi();
group(HealthApi, () {
// Health-Endpoint für Load-Balancer und Container-Probes. Bewusst kein Auth — eine `200 ok`-Antwort darf nicht von der Auth abhängen.
//
//Future<String> health() async
test('test health', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for HoldDeliveryRequest
void main() {
final instance = HoldDeliveryRequestBuilder();
// TODO add properties to the builder and call build()
group(HoldDeliveryRequest, () {
// String reason
test('to test the property `reason`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,43 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for ScanEvent
void main() {
final instance = ScanEventBuilder();
// TODO add properties to the builder and call build()
group(ScanEvent, () {
// AuditAction action
test('to test the property `action`', () async {
// TODO
});
// Fahrzeug, in dem der Scan gemacht wurde. Muss zum angemeldeten Account gehören. `None` ist erlaubt, schwächt aber den Audit-Trail.
// String actorCarId
test('to test the property `actorCarId`', () async {
// TODO
});
// String clientScanId
test('to test the property `clientScanId`', () async {
// TODO
});
// DateTime clientScannedAt
test('to test the property `clientScannedAt`', () async {
// TODO
});
// String deliveryItemId
test('to test the property `deliveryItemId`', () async {
// TODO
});
// Pflicht bei `Hold` und `Remove`. Sonst ignoriert.
// String reason
test('to test the property `reason`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,9 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for ScanResultStatus
void main() {
group(ScanResultStatus, () {
});
}

View File

@ -0,0 +1,38 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for ScanResult
void main() {
final instance = ScanResultBuilder();
// TODO add properties to the builder and call build()
group(ScanResult, () {
// String clientScanId
test('to test the property `clientScanId`', () async {
// TODO
});
// Aktueller `scan_state` der Position nach der Verarbeitung — genau dann gesetzt, wenn der Server den Stand kennen konnte (`Applied` oder `Duplicate`). Erlaubt der App, die UI ohne Re-Fetch zu aktualisieren.
// String deliveryItemId
test('to test the property `deliveryItemId`', () async {
// TODO
});
// ScanState newScanState
test('to test the property `newScanState`', () async {
// TODO
});
// Bei `Rejected`: Begründung. Bei `Applied`/`Duplicate`: `None`.
// String reason
test('to test the property `reason`', () async {
// TODO
});
// ScanResultStatus status
test('to test the property `status`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,32 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for ScanState
void main() {
final instance = ScanStateBuilder();
// TODO add properties to the builder and call build()
group(ScanState, () {
// Grund bei `status == Held` oder `status == Removed`.
// String heldReason
test('to test the property `heldReason`', () async {
// TODO
});
// DateTime lastUpdatedAt
test('to test the property `lastUpdatedAt`', () async {
// TODO
});
// int scannedQuantity
test('to test the property `scannedQuantity`', () async {
// TODO
});
// ScanStatus status
test('to test the property `status`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,9 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for ScanStatus
void main() {
group(ScanStatus, () {
});
}

View File

@ -0,0 +1,20 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
/// tests for ScansApi
void main() {
final instance = HolzleitnerApi().getScansApi();
group(ScansApi, () {
// Wendet eine Liste von Scan-Events idempotent an.
//
// Pro Event ein eigenes Resultat. Status `applied` schreibt einen frischen Audit-Eintrag, `duplicate` liefert den aktuellen Stand am Server, `rejected` enthält die Begründung. Reihenfolge der `results` entspricht der Reihenfolge der `scans` im Request.
//
//Future<ApplyScansResponse> applyScans(ApplyScansRequest applyScansRequest) async
test('test applyScans', () async {
// TODO
});
});
}

View File

@ -0,0 +1,17 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for SetDeliveryOrderRequest
void main() {
final instance = SetDeliveryOrderRequestBuilder();
// TODO add properties to the builder and call build()
group(SetDeliveryOrderRequest, () {
// Reihenfolge: Position im Array (0-basiert) wird zu `sort_order` (1-basiert) gemappt.
// BuiltList<String> deliveryIds
test('to test the property `deliveryIds`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,21 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for SetDeliveryOrderResponse
void main() {
final instance = SetDeliveryOrderResponseBuilder();
// TODO add properties to the builder and call build()
group(SetDeliveryOrderResponse, () {
// BuiltList<DeliveryOrderEntry> order
test('to test the property `order`', () async {
// TODO
});
// String tourId
test('to test the property `tourId`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,18 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
/// tests for SyncApi
void main() {
final instance = HolzleitnerApi().getSyncApi();
group(SyncApi, () {
// Sync-Endpoint für das ERP: legt eine Tagestour samt Lieferungen und Positionen idempotent an. Identität pro Tour `(driver_personalnummer, tour_date)`, pro Lieferung `(belegart_id, belegnummer)`.
//
//Future<SyncTourResponse> syncTour(SyncTourRequest syncTourRequest) async
test('test syncTour', () async {
// TODO
});
});
}

View File

@ -0,0 +1,58 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for SyncDeliveryItem
void main() {
final instance = SyncDeliveryItemBuilder();
// TODO add properties to the builder and call build()
group(SyncDeliveryItem, () {
// Default-Lager-Code für den Artikel (Anlage neuer Artikel).
// String articleDefaultWarehouseCode
test('to test the property `articleDefaultWarehouseCode`', () async {
// TODO
});
// String articleName
test('to test the property `articleName`', () async {
// TODO
});
// String articleNumber
test('to test the property `articleNumber`', () async {
// TODO
});
// bool articleScannable
test('to test the property `articleScannable`', () async {
// TODO
});
// int belegzeilenNr
test('to test the property `belegzeilenNr`', () async {
// TODO
});
// Komponenten-Artikelnummer bei aufgelösten Stücklisten, sonst leer.
// String komponentenArtikelNr
test('to test the property `komponentenArtikelNr`', () async {
// TODO
});
// int requiredQuantity
test('to test the property `requiredQuantity`', () async {
// TODO
});
// String warehouseCode
test('to test the property `warehouseCode`', () async {
// TODO
});
// String warehouseName
test('to test the property `warehouseName`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,63 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for SyncDelivery
void main() {
final instance = SyncDeliveryBuilder();
// TODO add properties to the builder and call build()
group(SyncDelivery, () {
// int belegartId
test('to test the property `belegartId`', () async {
// TODO
});
// String belegnummer
test('to test the property `belegnummer`', () async {
// TODO
});
// Address customerAddress
test('to test the property `customerAddress`', () async {
// TODO
});
// String customerName
test('to test the property `customerName`', () async {
// TODO
});
// Snapshot der Lieferadresse (kann von der Stammadresse abweichen).
// Address deliveryAddress
test('to test the property `deliveryAddress`', () async {
// TODO
});
// String desiredTime
test('to test the property `desiredTime`', () async {
// TODO
});
// int erpCustomerId
test('to test the property `erpCustomerId`', () async {
// TODO
});
// BuiltList<SyncDeliveryItem> items
test('to test the property `items`', () async {
// TODO
});
// 1-basiert, definiert die initiale Reihenfolge in der App.
// int sortOrder
test('to test the property `sortOrder`', () async {
// TODO
});
// String specialAgreements
test('to test the property `specialAgreements`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,26 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for SyncTourRequest
void main() {
final instance = SyncTourRequestBuilder();
// TODO add properties to the builder and call build()
group(SyncTourRequest, () {
// BuiltList<SyncDelivery> deliveries
test('to test the property `deliveries`', () async {
// TODO
});
// int driverPersonalnummer
test('to test the property `driverPersonalnummer`', () async {
// TODO
});
// Date tourDate
test('to test the property `tourDate`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for SyncTourResponse
void main() {
final instance = SyncTourResponseBuilder();
// TODO add properties to the builder and call build()
group(SyncTourResponse, () {
// String tourId
test('to test the property `tourId`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,47 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for TourDetails
void main() {
final instance = TourDetailsBuilder();
// TODO add properties to the builder and call build()
group(TourDetails, () {
// BuiltList<Article> articles
test('to test the property `articles`', () async {
// TODO
});
// BuiltList<CustomerContact> customerContacts
test('to test the property `customerContacts`', () async {
// TODO
});
// BuiltList<Customer> customers
test('to test the property `customers`', () async {
// TODO
});
// BuiltList<DeliveryWithItems> deliveries
test('to test the property `deliveries`', () async {
// TODO
});
// Alle Notizen aller Lieferungen dieser Tour, in einer Liste. Die App joint clientseitig per `delivery_id`. Reihenfolge: pro Lieferung aufsteigend nach `created_at`.
// BuiltList<DeliveryNote> notes
test('to test the property `notes`', () async {
// TODO
});
// Tour tour
test('to test the property `tour`', () async {
// TODO
});
// BuiltList<Warehouse> warehouses
test('to test the property `warehouses`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,16 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for TourSummaryList
void main() {
final instance = TourSummaryListBuilder();
// TODO add properties to the builder and call build()
group(TourSummaryList, () {
// BuiltList<TourSummary> tours
test('to test the property `tours`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,26 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for TourSummary
void main() {
final instance = TourSummaryBuilder();
// TODO add properties to the builder and call build()
group(TourSummary, () {
// int deliveryCount
test('to test the property `deliveryCount`', () async {
// TODO
});
// Date tourDate
test('to test the property `tourDate`', () async {
// TODO
});
// String tourId
test('to test the property `tourId`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,32 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for Tour
void main() {
final instance = TourBuilder();
// TODO add properties to the builder and call build()
group(Tour, () {
// int accountId
test('to test the property `accountId`', () async {
// TODO
});
// Date date
test('to test the property `date`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// Zeitpunkt des letzten ERP-Sync — für Drift-Erkennung.
// DateTime syncedAt
test('to test the property `syncedAt`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,32 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
/// tests for ToursApi
void main() {
final instance = HolzleitnerApi().getToursApi();
group(ToursApi, () {
// Lädt eine Tour mit allen Lieferungen, Positionen und referenzierten Stammdaten — die App nutzt das als einzigen großen Read.
//
//Future<TourDetails> getTour(String tourId) async
test('test getTour', () async {
// TODO
});
// Listet heutige Touren des angemeldeten Fahrers (Filter aus dem JWT).
//
//Future<TourSummaryList> listMyToursToday() async
test('test listMyToursToday', () async {
// TODO
});
// Schreibt die Sortier-Reihenfolge aller Lieferungen einer Tour neu. Der Client schickt die **vollständige** neue Reihenfolge; fehlende oder fremde Lieferungs-Ids werden mit `400 validation` abgelehnt.
//
//Future<SetDeliveryOrderResponse> setDeliveryOrder(String tourId, SetDeliveryOrderRequest setDeliveryOrderRequest) async
test('test setDeliveryOrder', () async {
// TODO
});
});
}

View File

@ -0,0 +1,23 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for UpdateCarRequest
void main() {
final instance = UpdateCarRequestBuilder();
// TODO add properties to the builder and call build()
group(UpdateCarRequest, () {
// Wenn gesetzt: aktiv/inaktiv. Inaktive Fahrzeuge tauchen in `GET /me/cars?activeOnly=true` (default) nicht auf.
// bool active
test('to test the property `active`', () async {
// TODO
});
// Wenn gesetzt: neues Kennzeichen.
// String plate
test('to test the property `plate`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,31 @@
import 'package:test/test.dart';
import 'package:holzleitner_api/holzleitner_api.dart';
// tests for Warehouse
void main() {
final instance = WarehouseBuilder();
// TODO add properties to the builder and call build()
group(Warehouse, () {
// String code
test('to test the property `code`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// bool isStandard
test('to test the property `isStandard`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
});
}