mirror of
https://github.com/timokz/flutter-vienna-hackathon-25.git
synced 2025-11-08 21:04:20 +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;
|
import 'protocol.dart' as _i6;
|
||||||
|
|
||||||
/// {@category Endpoint}
|
/// {@category Endpoint}
|
||||||
class EndpointQuote extends _i1.EndpointRef {
|
class EndpointShowLatestNewsWidget extends _i1.EndpointRef {
|
||||||
EndpointQuote(_i1.EndpointCaller caller) : super(caller);
|
EndpointShowLatestNewsWidget(_i1.EndpointCaller caller) : super(caller);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get name => 'quote';
|
String get name => 'showLatestNewsWidget';
|
||||||
|
|
||||||
_i2.Future<_i3.Quote> createQuote(_i4.CreateQuoteRequest req) =>
|
_i2.Future<_i3.Quote> createQuote(_i4.CreateQuoteRequest req) =>
|
||||||
caller.callServerEndpoint<_i3.Quote>(
|
caller.callServerEndpoint<_i3.Quote>(
|
||||||
'quote',
|
'showLatestNewsWidget',
|
||||||
'createQuote',
|
'createQuote',
|
||||||
{'req': req},
|
{'req': req},
|
||||||
);
|
);
|
||||||
|
|
||||||
_i2.Future<void> updateQuote(_i3.Quote quote) =>
|
_i2.Future<void> updateQuote(_i3.Quote quote) =>
|
||||||
caller.callServerEndpoint<void>(
|
caller.callServerEndpoint<void>(
|
||||||
'quote',
|
'showLatestNewsWidget',
|
||||||
'updateQuote',
|
'updateQuote',
|
||||||
{'quote': quote},
|
{'quote': quote},
|
||||||
);
|
);
|
||||||
|
|
||||||
_i2.Future<List<_i3.Quote>> getAllQuotes({required int limit}) =>
|
_i2.Future<List<_i3.Quote>> getAllQuotes({required int limit}) =>
|
||||||
caller.callServerEndpoint<List<_i3.Quote>>(
|
caller.callServerEndpoint<List<_i3.Quote>>(
|
||||||
'quote',
|
'showLatestNewsWidget',
|
||||||
'getAllQuotes',
|
'getAllQuotes',
|
||||||
{'limit': limit},
|
{'limit': limit},
|
||||||
);
|
);
|
||||||
|
|
@ -79,16 +79,17 @@ class Client extends _i1.ServerpodClientShared {
|
||||||
disconnectStreamsOnLostInternetConnection:
|
disconnectStreamsOnLostInternetConnection:
|
||||||
disconnectStreamsOnLostInternetConnection,
|
disconnectStreamsOnLostInternetConnection,
|
||||||
) {
|
) {
|
||||||
quote = EndpointQuote(this);
|
showLatestNewsWidget = EndpointShowLatestNewsWidget(this);
|
||||||
modules = Modules(this);
|
modules = Modules(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
late final EndpointQuote quote;
|
late final EndpointShowLatestNewsWidget showLatestNewsWidget;
|
||||||
|
|
||||||
late final Modules modules;
|
late final Modules modules;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, _i1.EndpointRef> get endpointRefLookup => {'quote': quote};
|
Map<String, _i1.EndpointRef> get endpointRefLookup =>
|
||||||
|
{'showLatestNewsWidget': showLatestNewsWidget};
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, _i1.ModuleEndpointCaller> get moduleLookup =>
|
Map<String, _i1.ModuleEndpointCaller> get moduleLookup =>
|
||||||
|
|
|
||||||
|
|
@ -20,16 +20,16 @@ class Endpoints extends _i1.EndpointDispatch {
|
||||||
@override
|
@override
|
||||||
void initializeEndpoints(_i1.Server server) {
|
void initializeEndpoints(_i1.Server server) {
|
||||||
var endpoints = <String, _i1.Endpoint>{
|
var endpoints = <String, _i1.Endpoint>{
|
||||||
'quote': _i2.QuoteEndpoint()
|
'showLatestNewsWidget': _i2.ShowLatestNewsWidget()
|
||||||
..initialize(
|
..initialize(
|
||||||
server,
|
server,
|
||||||
'quote',
|
'showLatestNewsWidget',
|
||||||
null,
|
null,
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
connectors['quote'] = _i1.EndpointConnector(
|
connectors['showLatestNewsWidget'] = _i1.EndpointConnector(
|
||||||
name: 'quote',
|
name: 'showLatestNewsWidget',
|
||||||
endpoint: endpoints['quote']!,
|
endpoint: endpoints['showLatestNewsWidget']!,
|
||||||
methodConnectors: {
|
methodConnectors: {
|
||||||
'createQuote': _i1.MethodConnector(
|
'createQuote': _i1.MethodConnector(
|
||||||
name: 'createQuote',
|
name: 'createQuote',
|
||||||
|
|
@ -44,7 +44,8 @@ class Endpoints extends _i1.EndpointDispatch {
|
||||||
_i1.Session session,
|
_i1.Session session,
|
||||||
Map<String, dynamic> params,
|
Map<String, dynamic> params,
|
||||||
) async =>
|
) async =>
|
||||||
(endpoints['quote'] as _i2.QuoteEndpoint).createQuote(
|
(endpoints['showLatestNewsWidget'] as _i2.ShowLatestNewsWidget)
|
||||||
|
.createQuote(
|
||||||
session,
|
session,
|
||||||
params['req'],
|
params['req'],
|
||||||
),
|
),
|
||||||
|
|
@ -62,7 +63,8 @@ class Endpoints extends _i1.EndpointDispatch {
|
||||||
_i1.Session session,
|
_i1.Session session,
|
||||||
Map<String, dynamic> params,
|
Map<String, dynamic> params,
|
||||||
) async =>
|
) async =>
|
||||||
(endpoints['quote'] as _i2.QuoteEndpoint).updateQuote(
|
(endpoints['showLatestNewsWidget'] as _i2.ShowLatestNewsWidget)
|
||||||
|
.updateQuote(
|
||||||
session,
|
session,
|
||||||
params['quote'],
|
params['quote'],
|
||||||
),
|
),
|
||||||
|
|
@ -80,7 +82,8 @@ class Endpoints extends _i1.EndpointDispatch {
|
||||||
_i1.Session session,
|
_i1.Session session,
|
||||||
Map<String, dynamic> params,
|
Map<String, dynamic> params,
|
||||||
) async =>
|
) async =>
|
||||||
(endpoints['quote'] as _i2.QuoteEndpoint).getAllQuotes(
|
(endpoints['showLatestNewsWidget'] as _i2.ShowLatestNewsWidget)
|
||||||
|
.getAllQuotes(
|
||||||
session,
|
session,
|
||||||
limit: params['limit'],
|
limit: params['limit'],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ void withServerpod(
|
||||||
}
|
}
|
||||||
|
|
||||||
class TestEndpoints {
|
class TestEndpoints {
|
||||||
late final _QuoteEndpoint quote;
|
late final _ShowLatestNewsWidget showLatestNewsWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _InternalTestEndpoints extends TestEndpoints
|
class _InternalTestEndpoints extends TestEndpoints
|
||||||
|
|
@ -113,15 +113,15 @@ class _InternalTestEndpoints extends TestEndpoints
|
||||||
_i2.SerializationManager serializationManager,
|
_i2.SerializationManager serializationManager,
|
||||||
_i2.EndpointDispatch endpoints,
|
_i2.EndpointDispatch endpoints,
|
||||||
) {
|
) {
|
||||||
quote = _QuoteEndpoint(
|
showLatestNewsWidget = _ShowLatestNewsWidget(
|
||||||
endpoints,
|
endpoints,
|
||||||
serializationManager,
|
serializationManager,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _QuoteEndpoint {
|
class _ShowLatestNewsWidget {
|
||||||
_QuoteEndpoint(
|
_ShowLatestNewsWidget(
|
||||||
this._endpointDispatch,
|
this._endpointDispatch,
|
||||||
this._serializationManager,
|
this._serializationManager,
|
||||||
);
|
);
|
||||||
|
|
@ -137,13 +137,13 @@ class _QuoteEndpoint {
|
||||||
return _i1.callAwaitableFunctionAndHandleExceptions(() async {
|
return _i1.callAwaitableFunctionAndHandleExceptions(() async {
|
||||||
var _localUniqueSession =
|
var _localUniqueSession =
|
||||||
(sessionBuilder as _i1.InternalTestSessionBuilder).internalBuild(
|
(sessionBuilder as _i1.InternalTestSessionBuilder).internalBuild(
|
||||||
endpoint: 'quote',
|
endpoint: 'showLatestNewsWidget',
|
||||||
method: 'createQuote',
|
method: 'createQuote',
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
var _localCallContext = await _endpointDispatch.getMethodCallContext(
|
var _localCallContext = await _endpointDispatch.getMethodCallContext(
|
||||||
createSessionCallback: (_) => _localUniqueSession,
|
createSessionCallback: (_) => _localUniqueSession,
|
||||||
endpointPath: 'quote',
|
endpointPath: 'showLatestNewsWidget',
|
||||||
methodName: 'createQuote',
|
methodName: 'createQuote',
|
||||||
parameters: _i1.testObjectToJson({'req': req}),
|
parameters: _i1.testObjectToJson({'req': req}),
|
||||||
serializationManager: _serializationManager,
|
serializationManager: _serializationManager,
|
||||||
|
|
@ -166,13 +166,13 @@ class _QuoteEndpoint {
|
||||||
return _i1.callAwaitableFunctionAndHandleExceptions(() async {
|
return _i1.callAwaitableFunctionAndHandleExceptions(() async {
|
||||||
var _localUniqueSession =
|
var _localUniqueSession =
|
||||||
(sessionBuilder as _i1.InternalTestSessionBuilder).internalBuild(
|
(sessionBuilder as _i1.InternalTestSessionBuilder).internalBuild(
|
||||||
endpoint: 'quote',
|
endpoint: 'showLatestNewsWidget',
|
||||||
method: 'updateQuote',
|
method: 'updateQuote',
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
var _localCallContext = await _endpointDispatch.getMethodCallContext(
|
var _localCallContext = await _endpointDispatch.getMethodCallContext(
|
||||||
createSessionCallback: (_) => _localUniqueSession,
|
createSessionCallback: (_) => _localUniqueSession,
|
||||||
endpointPath: 'quote',
|
endpointPath: 'showLatestNewsWidget',
|
||||||
methodName: 'updateQuote',
|
methodName: 'updateQuote',
|
||||||
parameters: _i1.testObjectToJson({'quote': quote}),
|
parameters: _i1.testObjectToJson({'quote': quote}),
|
||||||
serializationManager: _serializationManager,
|
serializationManager: _serializationManager,
|
||||||
|
|
@ -195,13 +195,13 @@ class _QuoteEndpoint {
|
||||||
return _i1.callAwaitableFunctionAndHandleExceptions(() async {
|
return _i1.callAwaitableFunctionAndHandleExceptions(() async {
|
||||||
var _localUniqueSession =
|
var _localUniqueSession =
|
||||||
(sessionBuilder as _i1.InternalTestSessionBuilder).internalBuild(
|
(sessionBuilder as _i1.InternalTestSessionBuilder).internalBuild(
|
||||||
endpoint: 'quote',
|
endpoint: 'showLatestNewsWidget',
|
||||||
method: 'getAllQuotes',
|
method: 'getAllQuotes',
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
var _localCallContext = await _endpointDispatch.getMethodCallContext(
|
var _localCallContext = await _endpointDispatch.getMethodCallContext(
|
||||||
createSessionCallback: (_) => _localUniqueSession,
|
createSessionCallback: (_) => _localUniqueSession,
|
||||||
endpointPath: 'quote',
|
endpointPath: 'showLatestNewsWidget',
|
||||||
methodName: 'getAllQuotes',
|
methodName: 'getAllQuotes',
|
||||||
parameters: _i1.testObjectToJson({'limit': limit}),
|
parameters: _i1.testObjectToJson({'limit': limit}),
|
||||||
serializationManager: _serializationManager,
|
serializationManager: _serializationManager,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue