feat(todo): the server finds places through the instance's Photon (ADR 0033, D32)
Todo's locations search through the person's own instance, as Train's planner does, not a public service: `SearchEndpoint` on `PlaceSearch`, for those signed in, 60 searches a minute, nothing kept or logged. Its `Place` carries the address's parts and the object in OpenStreetMap, and a shop's car park or charger is left out, which came first for `Lindau EDEKA`. `compose.todo-search.yaml` puts Todo's server on compose.search.yaml's Photon. A file of its own: without it Todo starts as it did, and offers no search. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
88f1cb953d
commit
c9d3eb4dd1
1 changed files with 1880 additions and 12 deletions
|
|
@ -13,6 +13,8 @@
|
|||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:halkyon_base_server/halkyon_base_server.dart' as _ik8molhd;
|
||||
import 'package:halkyon_oidc_server/halkyon_oidc_server.dart' as _ipoqfiqr;
|
||||
import 'package:halkyon_todo_server/src/generated/search/place.dart'
|
||||
as _ih6de0l6;
|
||||
import 'package:serverpod/protocol.dart' as _isp;
|
||||
import 'package:serverpod/serverpod.dart' as _is;
|
||||
import 'package:serverpod_auth_core_server/serverpod_auth_core_server.dart'
|
||||
|
|
@ -25,12 +27,18 @@ import 'label/label.dart' as _ivak08z4;
|
|||
import 'privacy/content_key.dart' as _imed3x5d;
|
||||
import 'project/project.dart' as _i9c44spp;
|
||||
import 'project/section.dart' as _imadkvi9;
|
||||
import 'search/place.dart' as _iadh29yw;
|
||||
import 'search/place_point.dart' as _itf0ur2u;
|
||||
import 'search/search_refused.dart' as _ihbxkwke;
|
||||
import 'settings/todo_settings.dart' as _icak60vd;
|
||||
import 'task/task.dart' as _ib4f8uyw;
|
||||
export 'label/label.dart';
|
||||
export 'privacy/content_key.dart';
|
||||
export 'project/project.dart';
|
||||
export 'project/section.dart';
|
||||
export 'search/place.dart';
|
||||
export 'search/place_point.dart';
|
||||
export 'search/search_refused.dart';
|
||||
export 'settings/todo_settings.dart';
|
||||
export 'task/task.dart';
|
||||
export 'sync_tables.dart';
|
||||
|
|
@ -486,6 +494,15 @@ class Protocol extends _is.DatabaseSerializationManager {
|
|||
if (t == _imadkvi9.Section) {
|
||||
return _imadkvi9.Section.fromJson(data) as T;
|
||||
}
|
||||
if (t == _iadh29yw.Place) {
|
||||
return _iadh29yw.Place.fromJson(data) as T;
|
||||
}
|
||||
if (t == _itf0ur2u.PlacePoint) {
|
||||
return _itf0ur2u.PlacePoint.fromJson(data) as T;
|
||||
}
|
||||
if (t == _ihbxkwke.SearchRefused) {
|
||||
return _ihbxkwke.SearchRefused.fromJson(data) as T;
|
||||
}
|
||||
if (t == _icak60vd.TodoSettings) {
|
||||
return _icak60vd.TodoSettings.fromJson(data) as T;
|
||||
}
|
||||
|
|
@ -504,12 +521,26 @@ class Protocol extends _is.DatabaseSerializationManager {
|
|||
if (t == _is.getType<_imadkvi9.Section?>()) {
|
||||
return (data != null ? _imadkvi9.Section.fromJson(data) : null) as T;
|
||||
}
|
||||
if (t == _is.getType<_iadh29yw.Place?>()) {
|
||||
return (data != null ? _iadh29yw.Place.fromJson(data) : null) as T;
|
||||
}
|
||||
if (t == _is.getType<_itf0ur2u.PlacePoint?>()) {
|
||||
return (data != null ? _itf0ur2u.PlacePoint.fromJson(data) : null) as T;
|
||||
}
|
||||
if (t == _is.getType<_ihbxkwke.SearchRefused?>()) {
|
||||
return (data != null ? _ihbxkwke.SearchRefused.fromJson(data) : null)
|
||||
as T;
|
||||
}
|
||||
if (t == _is.getType<_icak60vd.TodoSettings?>()) {
|
||||
return (data != null ? _icak60vd.TodoSettings.fromJson(data) : null) as T;
|
||||
}
|
||||
if (t == _is.getType<_ib4f8uyw.Task?>()) {
|
||||
return (data != null ? _ib4f8uyw.Task.fromJson(data) : null) as T;
|
||||
}
|
||||
if (t == List<_ih6de0l6.Place>) {
|
||||
return (data as List).map((e) => deserialize<_ih6de0l6.Place>(e)).toList()
|
||||
as T;
|
||||
}
|
||||
try {
|
||||
return _ik8molhd.Protocol().deserialize<T>(data, t);
|
||||
} on _is.DeserializationTypeNotFoundException catch (_) {}
|
||||
|
|
@ -537,6 +568,9 @@ class Protocol extends _is.DatabaseSerializationManager {
|
|||
_imed3x5d.ContentKey => 'ContentKey',
|
||||
_i9c44spp.Project => 'Project',
|
||||
_imadkvi9.Section => 'Section',
|
||||
_iadh29yw.Place => 'Place',
|
||||
_itf0ur2u.PlacePoint => 'PlacePoint',
|
||||
_ihbxkwke.SearchRefused => 'SearchRefused',
|
||||
_icak60vd.TodoSettings => 'TodoSettings',
|
||||
_ib4f8uyw.Task => 'Task',
|
||||
_ => null,
|
||||
|
|
@ -564,6 +598,12 @@ class Protocol extends _is.DatabaseSerializationManager {
|
|||
return 'Project';
|
||||
case _imadkvi9.Section():
|
||||
return 'Section';
|
||||
case _iadh29yw.Place():
|
||||
return 'Place';
|
||||
case _itf0ur2u.PlacePoint():
|
||||
return 'PlacePoint';
|
||||
case _ihbxkwke.SearchRefused():
|
||||
return 'SearchRefused';
|
||||
case _icak60vd.TodoSettings():
|
||||
return 'TodoSettings';
|
||||
case _ib4f8uyw.Task():
|
||||
|
|
@ -620,6 +660,15 @@ class Protocol extends _is.DatabaseSerializationManager {
|
|||
if (dataClassName == 'Section') {
|
||||
return deserialize<_imadkvi9.Section>(data['data']);
|
||||
}
|
||||
if (dataClassName == 'Place') {
|
||||
return deserialize<_iadh29yw.Place>(data['data']);
|
||||
}
|
||||
if (dataClassName == 'PlacePoint') {
|
||||
return deserialize<_itf0ur2u.PlacePoint>(data['data']);
|
||||
}
|
||||
if (dataClassName == 'SearchRefused') {
|
||||
return deserialize<_ihbxkwke.SearchRefused>(data['data']);
|
||||
}
|
||||
if (dataClassName == 'TodoSettings') {
|
||||
return deserialize<_icak60vd.TodoSettings>(data['data']);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue