From c64fa677ac86e05ce5a03cbc9e6f0aee77e1e75b Mon Sep 17 00:00:00 2001 From: "Max R. Carrara" Date: Sat, 16 Aug 2025 19:23:11 +0200 Subject: [PATCH] tree-wide: run `serverpod generate` Signed-off-by: Max R. Carrara --- .../lib/src/protocol/client.dart | 19 +++++++++--------- .../lib/src/generated/endpoints.dart | 19 ++++++++++-------- .../test_tools/serverpod_test_tools.dart | 20 +++++++++---------- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/wien_talks/wien_talks_client/lib/src/protocol/client.dart b/wien_talks/wien_talks_client/lib/src/protocol/client.dart index a580f14..581c172 100644 --- a/wien_talks/wien_talks_client/lib/src/protocol/client.dart +++ b/wien_talks/wien_talks_client/lib/src/protocol/client.dart @@ -17,29 +17,29 @@ import 'package:serverpod_auth_client/serverpod_auth_client.dart' as _i5; import 'protocol.dart' as _i6; /// {@category Endpoint} -class EndpointQuote extends _i1.EndpointRef { - EndpointQuote(_i1.EndpointCaller caller) : super(caller); +class EndpointShowLatestNewsWidget extends _i1.EndpointRef { + EndpointShowLatestNewsWidget(_i1.EndpointCaller caller) : super(caller); @override - String get name => 'quote'; + String get name => 'showLatestNewsWidget'; _i2.Future<_i3.Quote> createQuote(_i4.CreateQuoteRequest req) => caller.callServerEndpoint<_i3.Quote>( - 'quote', + 'showLatestNewsWidget', 'createQuote', {'req': req}, ); _i2.Future updateQuote(_i3.Quote quote) => caller.callServerEndpoint( - 'quote', + 'showLatestNewsWidget', 'updateQuote', {'quote': quote}, ); _i2.Future> getAllQuotes({required int limit}) => caller.callServerEndpoint>( - 'quote', + 'showLatestNewsWidget', 'getAllQuotes', {'limit': limit}, ); @@ -79,16 +79,17 @@ class Client extends _i1.ServerpodClientShared { disconnectStreamsOnLostInternetConnection: disconnectStreamsOnLostInternetConnection, ) { - quote = EndpointQuote(this); + showLatestNewsWidget = EndpointShowLatestNewsWidget(this); modules = Modules(this); } - late final EndpointQuote quote; + late final EndpointShowLatestNewsWidget showLatestNewsWidget; late final Modules modules; @override - Map get endpointRefLookup => {'quote': quote}; + Map get endpointRefLookup => + {'showLatestNewsWidget': showLatestNewsWidget}; @override Map get moduleLookup => diff --git a/wien_talks/wien_talks_server/lib/src/generated/endpoints.dart b/wien_talks/wien_talks_server/lib/src/generated/endpoints.dart index 2054dea..438f1d1 100644 --- a/wien_talks/wien_talks_server/lib/src/generated/endpoints.dart +++ b/wien_talks/wien_talks_server/lib/src/generated/endpoints.dart @@ -20,16 +20,16 @@ class Endpoints extends _i1.EndpointDispatch { @override void initializeEndpoints(_i1.Server server) { var endpoints = { - 'quote': _i2.QuoteEndpoint() + 'showLatestNewsWidget': _i2.ShowLatestNewsWidget() ..initialize( server, - 'quote', + 'showLatestNewsWidget', null, ) }; - connectors['quote'] = _i1.EndpointConnector( - name: 'quote', - endpoint: endpoints['quote']!, + connectors['showLatestNewsWidget'] = _i1.EndpointConnector( + name: 'showLatestNewsWidget', + endpoint: endpoints['showLatestNewsWidget']!, methodConnectors: { 'createQuote': _i1.MethodConnector( name: 'createQuote', @@ -44,7 +44,8 @@ class Endpoints extends _i1.EndpointDispatch { _i1.Session session, Map params, ) async => - (endpoints['quote'] as _i2.QuoteEndpoint).createQuote( + (endpoints['showLatestNewsWidget'] as _i2.ShowLatestNewsWidget) + .createQuote( session, params['req'], ), @@ -62,7 +63,8 @@ class Endpoints extends _i1.EndpointDispatch { _i1.Session session, Map params, ) async => - (endpoints['quote'] as _i2.QuoteEndpoint).updateQuote( + (endpoints['showLatestNewsWidget'] as _i2.ShowLatestNewsWidget) + .updateQuote( session, params['quote'], ), @@ -80,7 +82,8 @@ class Endpoints extends _i1.EndpointDispatch { _i1.Session session, Map params, ) async => - (endpoints['quote'] as _i2.QuoteEndpoint).getAllQuotes( + (endpoints['showLatestNewsWidget'] as _i2.ShowLatestNewsWidget) + .getAllQuotes( session, limit: params['limit'], ), diff --git a/wien_talks/wien_talks_server/test/integration/test_tools/serverpod_test_tools.dart b/wien_talks/wien_talks_server/test/integration/test_tools/serverpod_test_tools.dart index 87bbd13..c5a1587 100644 --- a/wien_talks/wien_talks_server/test/integration/test_tools/serverpod_test_tools.dart +++ b/wien_talks/wien_talks_server/test/integration/test_tools/serverpod_test_tools.dart @@ -103,7 +103,7 @@ void withServerpod( } class TestEndpoints { - late final _QuoteEndpoint quote; + late final _ShowLatestNewsWidget showLatestNewsWidget; } class _InternalTestEndpoints extends TestEndpoints @@ -113,15 +113,15 @@ class _InternalTestEndpoints extends TestEndpoints _i2.SerializationManager serializationManager, _i2.EndpointDispatch endpoints, ) { - quote = _QuoteEndpoint( + showLatestNewsWidget = _ShowLatestNewsWidget( endpoints, serializationManager, ); } } -class _QuoteEndpoint { - _QuoteEndpoint( +class _ShowLatestNewsWidget { + _ShowLatestNewsWidget( this._endpointDispatch, this._serializationManager, ); @@ -137,13 +137,13 @@ class _QuoteEndpoint { return _i1.callAwaitableFunctionAndHandleExceptions(() async { var _localUniqueSession = (sessionBuilder as _i1.InternalTestSessionBuilder).internalBuild( - endpoint: 'quote', + endpoint: 'showLatestNewsWidget', method: 'createQuote', ); try { var _localCallContext = await _endpointDispatch.getMethodCallContext( createSessionCallback: (_) => _localUniqueSession, - endpointPath: 'quote', + endpointPath: 'showLatestNewsWidget', methodName: 'createQuote', parameters: _i1.testObjectToJson({'req': req}), serializationManager: _serializationManager, @@ -166,13 +166,13 @@ class _QuoteEndpoint { return _i1.callAwaitableFunctionAndHandleExceptions(() async { var _localUniqueSession = (sessionBuilder as _i1.InternalTestSessionBuilder).internalBuild( - endpoint: 'quote', + endpoint: 'showLatestNewsWidget', method: 'updateQuote', ); try { var _localCallContext = await _endpointDispatch.getMethodCallContext( createSessionCallback: (_) => _localUniqueSession, - endpointPath: 'quote', + endpointPath: 'showLatestNewsWidget', methodName: 'updateQuote', parameters: _i1.testObjectToJson({'quote': quote}), serializationManager: _serializationManager, @@ -195,13 +195,13 @@ class _QuoteEndpoint { return _i1.callAwaitableFunctionAndHandleExceptions(() async { var _localUniqueSession = (sessionBuilder as _i1.InternalTestSessionBuilder).internalBuild( - endpoint: 'quote', + endpoint: 'showLatestNewsWidget', method: 'getAllQuotes', ); try { var _localCallContext = await _endpointDispatch.getMethodCallContext( createSessionCallback: (_) => _localUniqueSession, - endpointPath: 'quote', + endpointPath: 'showLatestNewsWidget', methodName: 'getAllQuotes', parameters: _i1.testObjectToJson({'limit': limit}), serializationManager: _serializationManager,