mirror of
https://github.com/timokz/flutter-vienna-hackathon-25.git
synced 2025-11-08 17:04:19 +01:00
tree-wide: run serverpod generate
Signed-off-by: Max R. Carrara <max@aequito.sh>
This commit is contained in:
parent
5a8c072d64
commit
c64fa677ac
3 changed files with 31 additions and 27 deletions
|
|
@ -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<void> updateQuote(_i3.Quote quote) =>
|
||||
caller.callServerEndpoint<void>(
|
||||
'quote',
|
||||
'showLatestNewsWidget',
|
||||
'updateQuote',
|
||||
{'quote': quote},
|
||||
);
|
||||
|
||||
_i2.Future<List<_i3.Quote>> getAllQuotes({required int limit}) =>
|
||||
caller.callServerEndpoint<List<_i3.Quote>>(
|
||||
'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<String, _i1.EndpointRef> get endpointRefLookup => {'quote': quote};
|
||||
Map<String, _i1.EndpointRef> get endpointRefLookup =>
|
||||
{'showLatestNewsWidget': showLatestNewsWidget};
|
||||
|
||||
@override
|
||||
Map<String, _i1.ModuleEndpointCaller> get moduleLookup =>
|
||||
|
|
|
|||
|
|
@ -20,16 +20,16 @@ class Endpoints extends _i1.EndpointDispatch {
|
|||
@override
|
||||
void initializeEndpoints(_i1.Server server) {
|
||||
var endpoints = <String, _i1.Endpoint>{
|
||||
'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<String, dynamic> 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<String, dynamic> 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<String, dynamic> params,
|
||||
) async =>
|
||||
(endpoints['quote'] as _i2.QuoteEndpoint).getAllQuotes(
|
||||
(endpoints['showLatestNewsWidget'] as _i2.ShowLatestNewsWidget)
|
||||
.getAllQuotes(
|
||||
session,
|
||||
limit: params['limit'],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue