d6956395c8
Rename the whole project from CommGate to gsmnode and re-skin every surface onto the new signal-green + ink design system (Space Grotesk / IBM Plex Sans / JetBrains Mono, flat surfaces, two-arrow routing mark, lowercase gsm+node wordmark). - Web App + API panel: rewrite token layer, gn-* utilities, data-gsm-theme, new logo/favicon assets; both builds verified. - Phone App (Flutter): green theme, new mark/wordmark widgets, adaptive launcher icons; rename Android applicationId/package to app.gsmnode.phone; bump AGP to 8.6.0 and google_fonts to 8.1.0; debug APK build verified. - API Server (Go): panel routes, User-Agent, health service id, branding. - Home Assistant Plugin: rename integration domain sms_gateway to gsmnode (folder, DOMAIN, services, entity ids, classes); py_compile verified. - Update all READMEs; add .gitignore (excludes Design/, build artifacts). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
34 lines
939 B
Dart
34 lines
939 B
Dart
/// An outbound message handed to the device by the API Server.
|
|
class GatewayMessage {
|
|
final String id;
|
|
final String type; // 'sms' or 'call'
|
|
final List<String> phoneNumbers;
|
|
final String textMessage;
|
|
final int? simNumber;
|
|
final String status;
|
|
|
|
GatewayMessage({
|
|
required this.id,
|
|
required this.type,
|
|
required this.phoneNumbers,
|
|
required this.textMessage,
|
|
this.simNumber,
|
|
required this.status,
|
|
});
|
|
|
|
bool get isCall => type == 'call';
|
|
|
|
factory GatewayMessage.fromJson(Map<String, dynamic> json) {
|
|
return GatewayMessage(
|
|
id: json['id'] as String? ?? '',
|
|
type: json['type'] as String? ?? 'sms',
|
|
phoneNumbers: (json['phone_numbers'] as List<dynamic>? ?? [])
|
|
.map((e) => e.toString())
|
|
.toList(),
|
|
textMessage: json['text_message'] as String? ?? '',
|
|
simNumber: json['sim_number'] as int?,
|
|
status: json['status'] as String? ?? '',
|
|
);
|
|
}
|
|
}
|