auth_service.dart: - URL corregida: https://api.siax-system.net (no la IP interna) - Campo contraseña corregido: paswd (no password) - Eliminado paso empresas innecesario — login directo igual que sigmac_app - Sesión guardada en SharedPreferences con mismas claves que sigmac_app - AuthSession.fromMap idéntico al de CentralCloudApi.AuthSession cloud_sync_service.dart (nuevo): - Base URL: https://api-gateway-cloud.telcotronics.net - Solo x-api-key en headers (NO Bearer JWT) — igual que GatewayCloudApi - Items: GET /api/items/sync con paginación por offset - Clientes: GET /api/clientes/verClientesJsonApp - Campos reales: codigo_prdcto, detalle_prdcto, client_rucCed, etc. app_provider.dart: - login() llama AuthService.login() con la firma correcta - Después de auth exitosa sincroniza items y clientes del cloud - Preserva precios locales en upsert de productos (API no devuelve precios) - Fallback offline mantiene credenciales SQLite locales - logout() borra SharedPreferences Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
490 B
Swift
17 lines
490 B
Swift
//
|
|
// Generated file. Do not edit.
|
|
//
|
|
|
|
import FlutterMacOS
|
|
import Foundation
|
|
|
|
import mobile_scanner
|
|
import shared_preferences_foundation
|
|
import sqflite
|
|
|
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|
MobileScannerPlugin.register(with: registry.registrar(forPlugin: "MobileScannerPlugin"))
|
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
|
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
|
}
|