Configuration (create, update, del) + Section (create, update, del)

more test to be sure for section but should be ok
This commit is contained in:
Thomas Fransolet 2025-05-13 17:12:04 +02:00
parent 3b3184afc6
commit 4818a1af52
244 changed files with 14754 additions and 5350 deletions

View File

@ -6,7 +6,7 @@ import 'package:manager_app/constants.dart';
class DropDownInputContainerCategories extends StatefulWidget {
final String label;
final List<CategorieDTO> categories;
final CategorieDTO? initialValue;
final int? initialValue;
final ValueChanged<CategorieDTO>? onChange;
const DropDownInputContainerCategories({
Key? key,
@ -27,7 +27,7 @@ class _DropDownInputContainerCategoriesState extends State<DropDownInputContaine
@override
void initState() {
if(widget.initialValue != null) {
selectedCategorieDTO = widget.categories.firstWhere((element) => element.id == widget.initialValue!.id);
selectedCategorieDTO = widget.categories.firstWhere((element) => element.id == widget.initialValue);
}
List<TranslationDTO> label = [];
label.add(TranslationDTO(language: "FR", value: "Aucune catégorie"));

View File

@ -1,21 +1,21 @@
import 'package:another_flushbar/flushbar.dart';
//import 'package:another_flushbar/flushbar.dart';
import 'package:flutter/material.dart';
showNotification (Color backgroundColor, Color textColor, String text, BuildContext context, int? duration) async {
await Flushbar(
/*await Flushbar(
message: text,
messageColor: textColor,
margin: EdgeInsets.all(8),
backgroundColor: backgroundColor,
borderRadius: BorderRadius.circular(8),
duration: duration == null ? Duration(milliseconds: 1500) : Duration(milliseconds: duration),
).show(context);
).show(context);*/
/*final snackBar = SnackBar(
final snackBar = SnackBar(
behavior: SnackBarBehavior.floating,
duration: duration == null ? Duration(milliseconds: 1500) : Duration(milliseconds: duration),
width: 320.0, // Width of the SnackBar.
width: 450.0, // Width of the SnackBar.
backgroundColor: backgroundColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
@ -24,7 +24,7 @@ showNotification (Color backgroundColor, Color textColor, String text, BuildCont
horizontal: 10.0, // Inner padding for SnackBar content.
),
content: Container(
height: 32.5,
height: 50.5,
child: Center(
child: Text(
text,
@ -34,5 +34,5 @@ showNotification (Color backgroundColor, Color textColor, String text, BuildCont
),
)
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);*/
ScaffoldMessenger.of(context).showSnackBar(snackBar);
}

View File

@ -65,7 +65,7 @@ class MultiStringInputAndResourceContainer extends StatelessWidget {
newValues.add(TranslationAndResourceDTO.fromJson(jsonDecode(jsonEncode(initials.firstWhere((element) => element.language == value)))!)!);
} else {
// New language
newValues.add(TranslationAndResourceDTO(language: value, value: "", resourceType: null, resourceId: null, resourceUrl: null));
newValues.add(TranslationAndResourceDTO(language: value, value: "", resource: null));
}
});

View File

@ -9,8 +9,8 @@ import 'package:manager_app/constants.dart';
class PDFFileInputContainer extends StatefulWidget {
final Color color;
final String label;
List<PDFFileDTO> initialValue;
final ValueChanged<List<PDFFileDTO>> onChanged;
List<OrderedTranslationAndResourceDTO> initialValue;
final ValueChanged<List<OrderedTranslationAndResourceDTO>> onChanged;
PDFFileInputContainer({
Key? key,
this.color = kSecond,
@ -47,8 +47,8 @@ class _PDFFileInputContainerState extends State<PDFFileInputContainer> {
width: size.width *0.15,
child: InkWell(
onTap: () {
List<PDFFileDTO> newValues = <PDFFileDTO>[];
List<PDFFileDTO> initials = widget.initialValue;
List<OrderedTranslationAndResourceDTO> newValues = <OrderedTranslationAndResourceDTO>[];
List<OrderedTranslationAndResourceDTO> initials = widget.initialValue;
showCreateOrUpdatePdfFiles("Fichiers PDF", initials, newValues, (value) {
widget.onChanged(value);
widget.initialValue = value;
@ -79,7 +79,7 @@ class _PDFFileInputContainerState extends State<PDFFileInputContainer> {
}
}
showCreateOrUpdatePdfFiles(String modalLabel, List<PDFFileDTO> values, List<PDFFileDTO> newValues, Function onGetResult, BuildContext context) {
showCreateOrUpdatePdfFiles(String modalLabel, List<OrderedTranslationAndResourceDTO> values, List<OrderedTranslationAndResourceDTO> newValues, Function onGetResult, BuildContext context) {
showDialog(
builder: (BuildContext context) {
Size size = MediaQuery.of(context).size;

View File

@ -184,12 +184,13 @@ class _TranslationInputAndResourceContainerState extends State<TranslationInputA
setState(() {
if(resource.id == null) {
newValues.where((element) => element.language! == value).first.resourceId = null;
newValues.where((element) => element.language! == value).first.resourceUrl = null;
newValues.where((element) => element.language! == value).first.resourceType = null;
newValues.where((element) => element.language! == value).first.resource?.url = null;
newValues.where((element) => element.language! == value).first.resource?.type = null;
} else {
newValues.where((element) => element.language! == value).first.resourceId = resource.id;
newValues.where((element) => element.language! == value).first.resourceUrl = resource.url;
newValues.where((element) => element.language! == value).first.resourceType = resource.type;
newValues.where((element) => element.language! == value).first.resource = resource;
/*newValues.where((element) => element.language! == value).first.resourceUrl = resource.url;
newValues.where((element) => element.language! == value).first.resourceType = resource.type;*/
}
});
},

View File

@ -8,18 +8,18 @@ class ManagerAppContext with ChangeNotifier{
String? instanceId;
String? host;
String? accessToken;
int? pinCode;
String? pinCode;
Client? clientAPI;
String? currentRoute;
int? currentPositionMenu;
ConfigurationDTO? selectedConfiguration;
SectionDTO? selectedSection;
bool? isLoading = false;
ManagerAppContext({this.email, this.accessToken, this.currentRoute});
ManagerAppContext({this.email, this.accessToken, this.currentPositionMenu});
// Implement toString to make it easier to see information about
@override
String toString() {
return 'ManagerAppContext{email: $email, host: $host, token: $accessToken, instanceId: $instanceId, currentRoute: $currentRoute}, selectedConfiguration: $selectedConfiguration, selectedSection: $selectedSection}';
return 'ManagerAppContext{email: $email, host: $host, token: $accessToken, instanceId: $instanceId, currentPositionMenu: $currentPositionMenu}, selectedConfiguration: $selectedConfiguration, selectedSection: $selectedSection}';
}
}

View File

@ -11,7 +11,7 @@ import 'package:manager_app/constants.dart';
class AgendaConfig extends StatefulWidget {
final String? color;
final String? label;
final String initialValue;
final AgendaDTO initialValue;
final ValueChanged<String> onChanged;
const AgendaConfig({
Key? key,
@ -30,7 +30,7 @@ class _AgendaConfigState extends State<AgendaConfig> {
@override
void initState() {
AgendaDTO test = AgendaDTO.fromJson(json.decode(widget.initialValue))!;
AgendaDTO test = widget.initialValue;
agendaDTO = test;
super.initState();
}
@ -40,7 +40,7 @@ class _AgendaConfigState extends State<AgendaConfig> {
Size size = MediaQuery.of(context).size;
var mapProviderIn = "";
switch(agendaDTO.mapProvider) {
switch(agendaDTO.agendaMapProvider) {
case MapProvider.Google :
mapProviderIn = "Google";
break;
@ -68,10 +68,10 @@ class _AgendaConfigState extends State<AgendaConfig> {
onChanged: (String value) {
switch(value) {
case "Google":
agendaDTO.mapProvider = MapProvider.Google;
agendaDTO.agendaMapProvider = MapProvider.Google;
break;
case "MapBox":
agendaDTO.mapProvider = MapProvider.MapBox;
agendaDTO.agendaMapProvider = MapProvider.MapBox;
break;
}
widget.onChanged(jsonEncode(agendaDTO).toString());

View File

@ -14,7 +14,7 @@ import 'package:provider/provider.dart';
class ArticleConfig extends StatefulWidget {
final String? color;
final String? label;
final String initialValue;
final ArticleDTO initialValue;
final ValueChanged<String> onChanged;
const ArticleConfig({
Key? key,
@ -34,7 +34,7 @@ class _ArticleConfigState extends State<ArticleConfig> {
@override
void initState() {
super.initState();
articleDTO = ArticleDTO.fromJson(json.decode(widget.initialValue))!;
articleDTO = widget.initialValue;
List<ContentDTO> test = new List<ContentDTO>.from(articleDTO.contents!);
articleDTO.contents = test;
@ -177,7 +177,7 @@ class _ArticleConfigState extends State<ArticleConfig> {
List<ContentDTO> test = new List<ContentDTO>.from(images);
articleDTO.contents = test;
List<ContentDTO> testToSend = new List<ContentDTO>.from(images);
testToSend = testToSend.where((element) => element.resourceUrl != null).toList();
testToSend = testToSend.where((element) => element.resource?.url != null).toList();
var articleToSend = new ArticleDTO();
articleToSend.contents = testToSend;
articleToSend.audioIds = articleDTO.audioIds;

View File

@ -175,7 +175,7 @@ class _CategoryListState extends State<CategoryList> {
height: 50,
child: Row(
children: [
if(category.iconResourceId != null) Container(
if(category.resourceDTO?.id != null) Container(
height: 60,
width: 60,
decoration: imageBoxDecoration(category, appContext),
@ -275,10 +275,10 @@ imageBoxDecoration(CategorieDTO categorieDTO, appContext) {
shape: BoxShape.rectangle,
border: Border.all(width: 1.5, color: kSecond),
borderRadius: BorderRadius.circular(10.0),
image: categorieDTO.iconUrl != null ? new DecorationImage(
image: categorieDTO.resourceDTO?.url != null ? new DecorationImage(
fit: BoxFit.cover,
image: new NetworkImage(
categorieDTO.iconUrl!,
categorieDTO.resourceDTO!.url!,
),
) : null,
);

View File

@ -7,8 +7,8 @@ import 'package:manager_api_new/api.dart';
import 'package:provider/provider.dart';
class GeoPointContentList extends StatefulWidget {
final List<ContentGeoPoint> contents;
final ValueChanged<List<ContentGeoPoint>> onChanged;
final List<ContentDTO> contents;
final ValueChanged<List<ContentDTO>> onChanged;
const GeoPointContentList({
Key? key,
required this.contents,
@ -20,12 +20,12 @@ class GeoPointContentList extends StatefulWidget {
}
class _GeoPointContentListState extends State<GeoPointContentList> {
late List<ContentGeoPoint> contentsGeo;
late List<ContentDTO> contentsGeo;
@override
void initState() {
super.initState();
contentsGeo = new List<ContentGeoPoint>.from(widget.contents);
contentsGeo = new List<ContentDTO>.from(widget.contents);
}
void _onReorder(int oldIndex, int newIndex) {
@ -34,7 +34,7 @@ class _GeoPointContentListState extends State<GeoPointContentList> {
if (newIndex > oldIndex) {
newIndex -= 1;
}
final ContentGeoPoint item = contentsGeo.removeAt(oldIndex);
final ContentDTO item = contentsGeo.removeAt(oldIndex);
contentsGeo.insert(newIndex, item);
widget.onChanged(contentsGeo);
@ -99,7 +99,8 @@ class _GeoPointContentListState extends State<GeoPointContentList> {
);
if (result != null) {
setState(() {
ContentGeoPoint newImage = new ContentGeoPoint(resourceId: result.id, resourceUrl: result.url, resourceName: result.label, resourceType: result.type);
print("TODO CHECK !!");
ContentDTO newImage = new ContentDTO(resourceId: result.id, resource: ResourceDTO(url: result.url, label: result.label, type: result.type));
//print("RESULT IMAGES = ");
//print(newImage);
contentsGeo.add(newImage);

View File

@ -7,9 +7,9 @@ import 'package:provider/provider.dart';
class ListViewCardGeoPointContents extends StatefulWidget {
final int index;
final Key key;
final List<ContentGeoPoint> listContents;
final List<ContentDTO> listContents;
final AppContext appContext;
final ValueChanged<List<ContentGeoPoint>> onChanged;
final ValueChanged<List<ContentDTO>> onChanged;
ListViewCardGeoPointContents(
this.listContents,
@ -74,16 +74,16 @@ class _ListViewCardGeoPointContentsState extends State<ListViewCardGeoPointConte
);
}
getElement(int index, ContentGeoPoint contentGeoPoint, Size size, AppContext appContext) {
if(contentGeoPoint.resourceType == ResourceType.Image || contentGeoPoint.resourceType == ResourceType.ImageUrl) {
getElement(int index, ContentDTO contentGeoPoint, Size size, AppContext appContext) {
if(contentGeoPoint.resource?.type == ResourceType.Image || contentGeoPoint.resource?.type == ResourceType.ImageUrl) {
return Container(
width: double.infinity,
height: double.infinity,
child: Stack(
children: [
contentGeoPoint.resourceUrl != null ? Center(
contentGeoPoint.resource?.url != null ? Center(
child: Image.network( // TODO support video etc
contentGeoPoint.resourceUrl!,
contentGeoPoint.resource!.url!,
fit:BoxFit.scaleDown,
loadingBuilder: (BuildContext context, Widget child,
ImageChunkEvent? loadingProgress) {
@ -126,7 +126,7 @@ class _ListViewCardGeoPointContentsState extends State<ListViewCardGeoPointConte
} else {
return Container(
child: Center(
child: Text(contentGeoPoint.resourceName!),
child: Text(contentGeoPoint.resource!.label!),
)
);
}

View File

@ -24,8 +24,8 @@ import 'package:provider/provider.dart';
class MapConfig extends StatefulWidget {
final String? color;
final String? label;
final String initialValue;
final ValueChanged<String> onChanged;
final MapDTO initialValue;
final ValueChanged<MapDTO> onChanged;
const MapConfig({
Key? key,
this.color,
@ -50,15 +50,17 @@ class _MapConfigState extends State<MapConfig> {
@override
void initState() {
super.initState();
mapDTO = MapDTO.fromJson(json.decode(widget.initialValue))!;
//mapDTO = MapDTO.fromJson(json.decode(widget.initialValue))!;
mapDTO = widget.initialValue;
pointsToShow = new List<GeoPointDTO>.from(mapDTO.points!);
mapDTO.points = pointsToShow;
pointsToShow.sort((a, b) => a.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase().compareTo(b.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase()));
selectedCategories = mapDTO.categories!.map((categorie) => categorie.label!.firstWhere((element) => element.language == 'FR').value!).toList();
//selectedCategories = mapDTO.categories!.map((categorie) => categorie.label!.firstWhere((element) => element.language == 'FR').value!).toList();
selectedCategories = mapDTO.categories!.map((categorie) => categorie.id!.toString()).toList();
pointsToShow.forEach((pts) {
if(pts.categorieId == null && pts.categorie != null && mapDTO.categories!.any((e) => e.order == pts.categorie!.order)) {
/*if(pts.categorieId == null && pts.categorie != null && mapDTO.categories!.any((e) => e.order == pts.categorie!.order)) {
print("SET CATEGORIE ID FOR CAT");
print(pts.categorie);
var testCat = mapDTO.categories!.where((c) => c.label![0].value == pts.categorie!.label![0].value);
@ -70,7 +72,7 @@ class _MapConfigState extends State<MapConfig> {
}
print(pts.categorieId);
}
}*/
});
print(pointsToShow);
@ -173,7 +175,8 @@ class _MapConfigState extends State<MapConfig> {
mapDTO.mapProvider = MapProvider.MapBox;
break;
}
widget.onChanged(jsonEncode(mapDTO).toString());
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
}
),
GeolocInputContainer(
@ -185,7 +188,8 @@ class _MapConfigState extends State<MapConfig> {
mapDTO.longitude = localisation.longitude.toString();
mapDTO.latitude = localisation.latitude.toString();
}
widget.onChanged(jsonEncode(mapDTO).toString());
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
},
isSmall: true
),
@ -203,7 +207,8 @@ class _MapConfigState extends State<MapConfig> {
mapDTO.iconResourceId = resource.id;
mapDTO.iconSource = resource.url;
}
widget.onChanged(jsonEncode(mapDTO).toString());
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
},
isSmall: true
),
@ -220,7 +225,8 @@ class _MapConfigState extends State<MapConfig> {
initialValue: mapType,
onChange: (String? value) {
mapDTO.mapType = MapTypeApp.fromJson(value);
widget.onChanged(jsonEncode(mapDTO).toString());
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
},
),
if(mapDTO.mapProvider == MapProvider.MapBox)
@ -230,7 +236,8 @@ class _MapConfigState extends State<MapConfig> {
initialValue: mapTypeMapBox,
onChange: (String? value) {
mapDTO.mapTypeMapbox = MapTypeMapBox.fromJson(value);
widget.onChanged(jsonEncode(mapDTO).toString());
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
},
),
// Zoom
@ -242,7 +249,8 @@ class _MapConfigState extends State<MapConfig> {
max: 30,
onChanged: (double value) {
mapDTO.zoom = value.toInt();
widget.onChanged(jsonEncode(mapDTO).toString());
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
},
),
Container(
@ -265,32 +273,33 @@ class _MapConfigState extends State<MapConfig> {
{
print("DELETE CAT REF");
print(p.categorieId);
print(p.categorie);
//print(p.categorie);
// delete cat ref from point
p.categorieId = null;
p.categorie = null;
//p.categorie = null;
}
// update point category - Update
if(p.categorieId != null && mapDTO.categories!.map((c) => c.id).any((e) => e != null && e == p.categorieId))
{
var categorie = mapDTO.categories!.firstWhere((c) => c.id == p.categorieId);
p.categorie = categorie;
//p.categorie = categorie;
print("UPDATE CAT REF");
}
print(p);
if(p.categorieId == null && p.categorie != null && p.categorie!.label != null)
/*if(p.categorieId == null && p.categorie != null && p.categorie!.label != null)
{
// need to update with label
var categorie = mapDTO.categories!.firstWhere((c) => c.label![0].value == p.categorie!.label![0].value);
//p.categorie = categorie;
p.categorieId = categorie.id;
}
}*/
});
}
/*print("mapDTO.points");
print(mapDTO.points);*/
widget.onChanged(jsonEncode(mapDTO).toString());
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
}
},
),
@ -353,9 +362,11 @@ class _MapConfigState extends State<MapConfig> {
setState(() {
selectedCategories = tempOutput;
if(selectedCategories == null || selectedCategories!.length == 0) {
pointsToShow = mapDTO.points!.where((point) => point.categorie == null).toList();
//pointsToShow = mapDTO.points!.where((point) => point.categorie == null).toList();
pointsToShow = mapDTO.points!.where((point) => point.categorieId == null).toList();
} else {
pointsToShow = mapDTO.points!.where((point) => tempOutput.any((tps) => point.categorie == null || point.categorie?.label?.firstWhere((lab) => lab.language == 'FR').value == tps)).toList();
//pointsToShow = mapDTO.points!.where((point) => tempOutput.any((tps) => point.categorie == null || point.categorie?.label?.firstWhere((lab) => lab.language == 'FR').value == tps)).toList();
pointsToShow = mapDTO.points!.where((point) => tempOutput.any((tps) => point.categorieId == null || point.categorieId == tps)).toList();
}
});
},
@ -395,12 +406,15 @@ class _MapConfigState extends State<MapConfig> {
mapDTO.points!.sort((a, b) => a.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase().compareTo(b.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase()));
if(selectedCategories == null || selectedCategories!.length == 0) {
pointsToShow = mapDTO.points!.where((point) => point.categorie == null).toList();
//pointsToShow = mapDTO.points!.where((point) => point.categorie == null).toList();
pointsToShow = mapDTO.points!.where((point) => point.categorieId == null).toList();
} else {
pointsToShow = mapDTO.points!.where((point) => selectedCategories!.any((tps) => point.categorie == null || point.categorie?.label?.firstWhere((lab) => lab.language == 'FR').value == tps)).toList();
//pointsToShow = mapDTO.points!.where((point) => selectedCategories!.any((tps) => point.categorie == null || point.categorie?.label?.firstWhere((lab) => lab.language == 'FR').value == tps)).toList();
pointsToShow = mapDTO.points!.where((point) => selectedCategories!.any((tps) => point.categorieId == null || point.categorieId == tps)).toList();
}
widget.onChanged(jsonEncode(mapDTO).toString());
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
});
},
appContext,
@ -482,7 +496,8 @@ class _MapConfigState extends State<MapConfig> {
mapDTO.points![mapDTOPointsIndex] = pointToUpdate;
mapDTO.points!.sort((a, b) => a.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase().compareTo(b.title!.firstWhere((t) => t.language == 'FR').value!.toLowerCase()));
widget.onChanged(jsonEncode(mapDTO).toString());
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
});
},
appContext,
@ -506,7 +521,8 @@ class _MapConfigState extends State<MapConfig> {
pointsToShow.removeAt(index);
});
widget.onChanged(jsonEncode(mapDTO).toString());
//widget.onChanged(jsonEncode(mapDTO).toString());
widget.onChanged(mapDTO);
},
child: Icon(
Icons.delete,

View File

@ -80,16 +80,18 @@ Future<CategorieDTO?> showNewOrUpdateCategory(CategorieDTO? inputCategorieDTO, A
constraints: BoxConstraints(minHeight: 50, maxHeight: 80),
child: ResourceInputContainer(
label: "Icône catégorie :",
initialValue: categorieDTO.iconResourceId,
initialValue: categorieDTO.resourceDTO?.id,
color: kPrimaryColor,
onChanged: (ResourceDTO resource) {
if(resource.id == null) {
categorieDTO.iconResourceId = null;
categorieDTO.iconUrl = null;
categorieDTO.resourceDTO?.id = null;
categorieDTO.resourceDTO?.url = null;
categorieDTO.resourceDTO?.label = null;
} else {
categorieDTO.iconResourceId = resource.id;
categorieDTO.iconUrl = resource.url;
print("Icône catégorieIcône catégorie");
categorieDTO.resourceDTO?.id = resource.id;
categorieDTO.resourceDTO?.url = resource.url;
categorieDTO.resourceDTO?.label = resource.label;
print("Icône catégorie Icône catégorie");
print(categorieDTO);
}
},

View File

@ -20,7 +20,7 @@ void showNewOrUpdateGeoPoint(MapDTO mapDTO, GeoPointDTO? inputGeoPointDTO, Funct
} else {
geoPointDTO.title = <TranslationDTO>[];
geoPointDTO.description = <TranslationDTO>[];
geoPointDTO.contents = <ContentGeoPoint>[];
geoPointDTO.contents = <ContentDTO>[];
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedConfiguration!.languages!.forEach((element) {
@ -277,14 +277,14 @@ void showNewOrUpdateGeoPoint(MapDTO mapDTO, GeoPointDTO? inputGeoPointDTO, Funct
child: DropDownInputContainerCategories(
label: "Choisir une catégorie:",
categories: mapDTO.categories!,
initialValue: geoPointDTO.categorie,
initialValue: geoPointDTO.categorieId,
onChange: (CategorieDTO? value) {
if(value != null && value.order != -1)
{
geoPointDTO.categorie = value;
geoPointDTO.categorieId = value.id;
} else
{
geoPointDTO.categorie = null;
geoPointDTO.categorieId = null;
}
},
),
@ -310,7 +310,7 @@ void showNewOrUpdateGeoPoint(MapDTO mapDTO, GeoPointDTO? inputGeoPointDTO, Funct
),
child: GeoPointContentList(
contents: geoPointDTO.contents!,
onChanged: (List<ContentGeoPoint> contentsOutput) {
onChanged: (List<ContentDTO> contentsOutput) {
geoPointDTO.contents = contentsOutput;
},
),

View File

@ -14,7 +14,7 @@ import 'package:provider/provider.dart';
class MenuConfig extends StatefulWidget {
final String? color;
final String? label;
final String initialValue;
final MenuDTO initialValue;
final ValueChanged<String> onChanged;
const MenuConfig({
Key? key,
@ -35,7 +35,7 @@ class _MenuConfigState extends State<MenuConfig> {
void initState() {
super.initState();
menuDTO = MenuDTO.fromJson(json.decode(widget.initialValue))!;
menuDTO = widget.initialValue;
List<SectionDTO> test = new List<SectionDTO>.from(menuDTO.sections!);
menuDTO.sections = test;
}

View File

@ -176,15 +176,16 @@ void showEditSubSection(SectionDTO subSectionDTO, Function getResult, AppContext
getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appContext) {
switch(sectionDTO.type) {
case SectionType.Map:
return MapConfig(
return Text("TODO");
/*return MapConfig(
initialValue: sectionDTO.data!,
onChanged: (String data) {
//print("Received info in parent");
//print(data);
sectionDTO.data = data;
},
);
case SectionType.Slider:
);*/
/*case SectionType.Slider:
return Container(
width: MediaQuery.of(context).size.width * 0.5,
height: MediaQuery.of(context).size.height * 0.5,
@ -251,6 +252,6 @@ getSpecificData(SectionDTO sectionDTO, BuildContext context, AppContext appConte
onChanged: (String data) {
sectionDTO.data = data;
},
);
);*/
}
}

View File

@ -10,7 +10,7 @@ import 'package:manager_app/constants.dart';
class PDFConfig extends StatefulWidget {
final String? color;
final String? label;
final String initialValue;
final PdfDTO initialValue;
final ValueChanged<String> onChanged;
const PDFConfig({
Key? key,
@ -29,7 +29,7 @@ class _PDFConfigState extends State<PDFConfig> {
@override
void initState() {
PdfDTO test = PdfDTO.fromJson(json.decode(widget.initialValue))!;
PdfDTO test = widget.initialValue;
pdfDTO = test;
super.initState();
}
@ -44,7 +44,7 @@ class _PDFConfigState extends State<PDFConfig> {
label: "Fichiers PDF :",
initialValue: pdfDTO.pdfs != null ? pdfDTO.pdfs! : [],
color: kPrimaryColor,
onChanged: (List<PDFFileDTO>? value) {
onChanged: (List<OrderedTranslationAndResourceDTO>? value) {
if(value != null) {
pdfDTO.pdfs = value;
widget.onChanged(jsonEncode(pdfDTO).toString());

View File

@ -10,13 +10,13 @@ import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
Future<PDFFileDTO?> showNewOrUpdatePDFFile(PDFFileDTO? inputPdfFile, AppContext appContext, BuildContext context, String text) async {
PDFFileDTO pdfFileDTO = new PDFFileDTO();
Future<OrderedTranslationAndResourceDTO?> showNewOrUpdatePDFFile(OrderedTranslationAndResourceDTO? inputPdfFile, AppContext appContext, BuildContext context, String text) async {
OrderedTranslationAndResourceDTO pdfFileDTO = new OrderedTranslationAndResourceDTO();
if (inputPdfFile != null) {
pdfFileDTO = inputPdfFile;
} else {
pdfFileDTO.pdfFilesAndTitles = <TranslationAndResourceDTO>[];
pdfFileDTO.translationAndResourceDTOs = <TranslationAndResourceDTO>[];
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedConfiguration!.languages!.forEach((element) {
@ -25,7 +25,7 @@ Future<PDFFileDTO?> showNewOrUpdatePDFFile(PDFFileDTO? inputPdfFile, AppContext
translationMessageDTO.value = "";
translationMessageDTO.resourceId = null;
pdfFileDTO.pdfFilesAndTitles!.add(translationMessageDTO);
pdfFileDTO.translationAndResourceDTOs!.add(translationMessageDTO);
});
}
@ -66,13 +66,13 @@ Future<PDFFileDTO?> showNewOrUpdatePDFFile(PDFFileDTO? inputPdfFile, AppContext
modalLabel: "Fichier et titre pdf",
fontSize: 20,
color: kPrimaryColor,
initialValue: pdfFileDTO.pdfFilesAndTitles != null ? pdfFileDTO.pdfFilesAndTitles! : [],
initialValue: pdfFileDTO.translationAndResourceDTOs != null ? pdfFileDTO.translationAndResourceDTOs! : [],
resourceTypes: [ResourceType.Pdf],
onGetResult: (value) {
if (pdfFileDTO.pdfFilesAndTitles != value) {
if (pdfFileDTO.translationAndResourceDTOs != value) {
print("get resut hereeee");
print(value);
pdfFileDTO.pdfFilesAndTitles = value;
pdfFileDTO.translationAndResourceDTOs = value;
}
},
maxLines: 1,
@ -137,7 +137,7 @@ Future<PDFFileDTO?> showNewOrUpdatePDFFile(PDFFileDTO? inputPdfFile, AppContext
color: kPrimaryColor,
textColor: kWhite,
press: () {
if(pdfFileDTO.pdfFilesAndTitles != null && pdfFileDTO.pdfFilesAndTitles!.isNotEmpty)
if(pdfFileDTO.translationAndResourceDTOs != null && pdfFileDTO.translationAndResourceDTOs!.isNotEmpty)
{
Navigator.pop(dialogContext, pdfFileDTO);
}

View File

@ -9,8 +9,8 @@ import 'package:manager_api_new/api.dart';
import 'package:provider/provider.dart';
class PDFList extends StatefulWidget {
final List<PDFFileDTO> pdfs;
final ValueChanged<List<PDFFileDTO>> onChanged;
final List<OrderedTranslationAndResourceDTO> pdfs;
final ValueChanged<List<OrderedTranslationAndResourceDTO>> onChanged;
const PDFList({
Key? key,
required this.pdfs,
@ -22,12 +22,12 @@ class PDFList extends StatefulWidget {
}
class _PDFListState extends State<PDFList> {
late List<PDFFileDTO> pdfsMiddle;
late List<OrderedTranslationAndResourceDTO> pdfsMiddle;
@override
void initState() {
super.initState();
pdfsMiddle = new List<PDFFileDTO>.from(widget.pdfs);
pdfsMiddle = new List<OrderedTranslationAndResourceDTO>.from(widget.pdfs);
pdfsMiddle.sort((a, b) => a.order!.compareTo(b.order!));
}
@ -50,7 +50,7 @@ class _PDFListState extends State<PDFList> {
if (newIndex > oldIndex) {
newIndex -= 1;
}
final PDFFileDTO item = pdfsMiddle.removeAt(oldIndex);
final OrderedTranslationAndResourceDTO item = pdfsMiddle.removeAt(oldIndex);
pdfsMiddle.insert(newIndex, item);
var i = 0;
@ -93,7 +93,7 @@ class _PDFListState extends State<PDFList> {
right: 10,
child: InkWell(
onTap: () async {
PDFFileDTO newPdfFile = PDFFileDTO(order: null);
OrderedTranslationAndResourceDTO newPdfFile = OrderedTranslationAndResourceDTO(order: null);
var result = await showNewOrUpdatePDFFile(newPdfFile, appContext, context, "Création PDF");
if (result != null)
@ -133,7 +133,7 @@ class _PDFListState extends State<PDFList> {
);
}
getElement(int index, PDFFileDTO pdfFileDTO, Size size, AppContext appContext) {
getElement(int index, OrderedTranslationAndResourceDTO pdfFileDTO, Size size, AppContext appContext) {
return Stack(
children: [
Container(
@ -145,7 +145,7 @@ class _PDFListState extends State<PDFList> {
child: Padding(
padding: const EdgeInsets.all(2.0),
child: HtmlWidget(
pdfFileDTO.pdfFilesAndTitles == null ? "" : pdfFileDTO.pdfFilesAndTitles![0].value!,
pdfFileDTO.translationAndResourceDTOs == null ? "" : pdfFileDTO.translationAndResourceDTOs![0].value!,
//textAlign: TextAlign.left,
textStyle: TextStyle(fontSize: 15)
),

View File

@ -11,7 +11,7 @@ import 'package:manager_app/constants.dart';
class PuzzleConfig extends StatefulWidget {
final String? color;
final String? label;
final String initialValue;
final PuzzleDTO initialValue;
final ValueChanged<String> onChanged;
const PuzzleConfig({
Key? key,
@ -30,9 +30,9 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
@override
void initState() {
PuzzleDTO test = PuzzleDTO.fromJson(json.decode(widget.initialValue))!;
if(test.image == null) {
test.image = PuzzleDTOImage();
PuzzleDTO test = widget.initialValue;
if(test.puzzleImage == null) {
test.puzzleImage = ResourceDTO();
}
puzzleDTO = test;
puzzleDTO.rows = puzzleDTO.rows == null ? 3 : puzzleDTO.rows;
@ -52,13 +52,13 @@ class _PuzzleConfigState extends State<PuzzleConfig> {
children: [
ResourceInputContainer(
label: "Image du puzzle :",
initialValue: puzzleDTO.image!.resourceId == null ? '': puzzleDTO.image!.resourceId,
initialValue: puzzleDTO.puzzleImage!.id == null ? '': puzzleDTO.puzzleImage!.id,
onChanged: (ResourceDTO resourceDTO) {
setState(() {
puzzleDTO.image!.resourceId = resourceDTO.id;
puzzleDTO.image!.resourceType = resourceDTO.type;
puzzleDTO.image!.resourceUrl = resourceDTO.url;
print(puzzleDTO.image);
puzzleDTO.puzzleImage!.id = resourceDTO.id;
puzzleDTO.puzzleImage!.type = resourceDTO.type;
puzzleDTO.puzzleImage!.url = resourceDTO.url;
print(puzzleDTO.puzzleImage);
widget.onChanged(jsonEncode(puzzleDTO).toString());
});
}

View File

@ -10,13 +10,13 @@ import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
@deprecated
Future<LevelDTO?> showNewOrUpdateScoreQuizz(LevelDTO? inputLevelDTO, AppContext appContext, BuildContext context, String text) async {
LevelDTO levelDTO = new LevelDTO();
Future<List<TranslationAndResourceDTO>?> showNewOrUpdateScoreQuizz(List<TranslationAndResourceDTO>? inputLevelDTO, AppContext appContext, BuildContext context, String text) async {
List<TranslationAndResourceDTO> levelDTO = <TranslationAndResourceDTO>[];
if (inputLevelDTO != null) {
levelDTO = inputLevelDTO;
} else {
levelDTO.label = <TranslationAndResourceDTO>[];
levelDTO = <TranslationAndResourceDTO>[];
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedConfiguration!.languages!.forEach((element) {
@ -24,7 +24,7 @@ Future<LevelDTO?> showNewOrUpdateScoreQuizz(LevelDTO? inputLevelDTO, AppContext
translationMessageDTO.language = element;
translationMessageDTO.value = "";
levelDTO.label!.add(translationMessageDTO);
levelDTO.add(translationMessageDTO);
});
}
@ -45,7 +45,7 @@ Future<LevelDTO?> showNewOrUpdateScoreQuizz(LevelDTO? inputLevelDTO, AppContext
print("RTESULTYTYT ");
print(value);
if(value != null && value.isNotEmpty) {
levelDTO.label = value;
levelDTO = value;
print("RETURN VALUE");
print(levelDTO);
return levelDTO;
@ -78,10 +78,10 @@ Future<LevelDTO?> showNewOrUpdateScoreQuizz(LevelDTO? inputLevelDTO, AppContext
modalLabel: text,
fontSize: 20,
color: kPrimaryColor,
initialValue: levelDTO.label != null ? levelDTO.label! : [],
initialValue: levelDTO != null ? levelDTO! : [],
onGetResult: (value) {
if (levelDTO.label != value) {
levelDTO.label = value;
if (levelDTO != value) {
levelDTO = value;
}
},
maxLines: 1,

View File

@ -15,7 +15,7 @@ import 'new_update_question_quizz.dart';
class QuizzConfig extends StatefulWidget {
final String? color;
final String? label;
final String initialValue;
final QuizDTO initialValue;
final ValueChanged<String> onChanged;
const QuizzConfig({
Key? key,
@ -30,12 +30,12 @@ class QuizzConfig extends StatefulWidget {
}
class _QuizzConfigState extends State<QuizzConfig> {
late QuizzDTO quizzDTO;
late QuizDTO quizzDTO;
@override
void initState() {
super.initState();
quizzDTO = QuizzDTO.fromJson(json.decode(widget.initialValue))!;
quizzDTO = widget.initialValue;
List<QuestionDTO> test = new List<QuestionDTO>.from(quizzDTO.questions!);
quizzDTO.questions = test;
quizzDTO.questions!.sort((a, b) => a.order!.compareTo(b.order!));
@ -308,13 +308,13 @@ class _QuizzConfigState extends State<QuizzConfig> {
);
}
updateScoreQuizMessage(BuildContext context, AppContext appContext, LevelDTO? inLevelDTO, String text, int levelToUpdate) {
LevelDTO levelDTO = new LevelDTO();
updateScoreQuizMessage(BuildContext context, AppContext appContext, List<TranslationAndResourceDTO>? inLevelDTO, String text, int levelToUpdate) {
List<TranslationAndResourceDTO> levelDTO = <TranslationAndResourceDTO>[];
if (inLevelDTO != null) {
levelDTO = inLevelDTO;
} else {
levelDTO.label = <TranslationAndResourceDTO>[];
levelDTO = <TranslationAndResourceDTO>[];
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedConfiguration!.languages!.forEach((element) {
@ -322,13 +322,13 @@ class _QuizzConfigState extends State<QuizzConfig> {
translationMessageDTO.language = element;
translationMessageDTO.value = "";
levelDTO.label!.add(translationMessageDTO);
levelDTO!.add(translationMessageDTO);
});
}
List<TranslationAndResourceDTO> newValues = <TranslationAndResourceDTO>[];
List<TranslationAndResourceDTO> initials = levelDTO.label!;
List<TranslationAndResourceDTO> initials = levelDTO!;
appContext.getContext().selectedConfiguration!.languages!.forEach((value) {
if(initials.map((iv) => iv.language).contains(value)) {
@ -341,7 +341,7 @@ class _QuizzConfigState extends State<QuizzConfig> {
showMultiStringInputAndResourceHTML(text, text, true, initials, newValues, (value) {
if(value != null && value.isNotEmpty) {
levelDTO.label = value;
levelDTO = value;
setState(() {
switch(levelToUpdate) {
case 0:

View File

@ -140,10 +140,10 @@ boxDecoration(ContentDTO contentDTO, appContext) {
shape: BoxShape.rectangle,
border: Border.all(width: 1.5, color: kSecond),
borderRadius: BorderRadius.circular(10.0),
image: contentDTO.title != null && contentDTO.resourceUrl != null && (contentDTO.resourceType == ResourceType.ImageUrl || contentDTO.resourceType == ResourceType.Image) ? new DecorationImage(
image: contentDTO.title != null && contentDTO.resource?.url != null && (contentDTO.resource?.type == ResourceType.ImageUrl || contentDTO.resource?.type == ResourceType.Image) ? new DecorationImage(
fit: BoxFit.scaleDown,
image: new NetworkImage(
contentDTO.resourceUrl!,
contentDTO.resource!.url!,
),
) : null,
boxShadow: [

View File

@ -58,12 +58,13 @@ Future<ContentDTO?> showNewOrUpdateContentSlider(ContentDTO? inputContentDTO, Ap
onChanged: (ResourceDTO resource) {
if(resource.id == null) {
contentDTO.resourceId = null;
contentDTO.resourceUrl = null;
contentDTO.resourceType = null;
contentDTO.resource = null;
} else {
contentDTO.resourceId = resource.id;
contentDTO.resourceUrl = resource.url;
contentDTO.resourceType = resource.type;
contentDTO.resource = ResourceDTO();
contentDTO.resource!.url = resource.url;
contentDTO.resource!.type = resource.type;
contentDTO.resource!.label = resource.label;
}
},
isSmall: true

View File

@ -11,7 +11,7 @@ import 'package:provider/provider.dart';
class SliderConfig extends StatefulWidget {
final String? color;
final String? label;
final String initialValue;
final SliderDTO initialValue;
final ValueChanged<String> onChanged;
const SliderConfig({
Key? key,
@ -32,7 +32,8 @@ class _SliderConfigState extends State<SliderConfig> {
void initState() {
super.initState();
sliderDTO = SliderDTO.fromJson(json.decode(widget.initialValue))!;
//sliderDTO = SliderDTO.fromJson(json.decode(widget.initialValue))!;
sliderDTO = widget.initialValue;
List<ContentDTO> test = new List<ContentDTO>.from(sliderDTO.contents!);
sliderDTO.contents = test;
sliderDTO.contents!.sort((a, b) => a.order!.compareTo(b.order!));
@ -84,7 +85,7 @@ class _SliderConfigState extends State<SliderConfig> {
List<ContentDTO> test = new List<ContentDTO>.from(images);
sliderDTO.contents = test;
List<ContentDTO> testToSend = new List<ContentDTO>.from(images);
testToSend = testToSend.where((element) => element.resourceUrl != null).toList();
testToSend = testToSend.where((element) => element.resource != null && element.resource?.url != null).toList();
var sliderToSend = new SliderDTO();
sliderToSend.contents = testToSend;
widget.onChanged(jsonEncode(sliderToSend).toString());

View File

@ -6,7 +6,7 @@ import 'dart:convert';
class WeatherConfig extends StatefulWidget {
final String? color;
final String initialValue;
final WeatherDTO initialValue;
final ValueChanged<String> onChanged; // To return video or web url
const WeatherConfig({
Key? key,
@ -24,7 +24,7 @@ class _WeatherConfigState extends State<WeatherConfig> {
@override
void initState() {
WeatherDTO test = WeatherDTO.fromJson(json.decode(widget.initialValue))!;
WeatherDTO test = widget.initialValue;
resourceSource = test;
super.initState();
}

View File

@ -7,7 +7,7 @@ import 'dart:convert';
class WebOrVideoConfig extends StatefulWidget {
final String? color;
final String? label;
final String initialValue;
final WebDTO initialValue;
final ValueChanged<String> onChanged; // To return video or web url
const WebOrVideoConfig({
Key? key,
@ -26,7 +26,7 @@ class _WebOrVideoConfigState extends State<WebOrVideoConfig> {
@override
void initState() {
WebDTO test = WebDTO.fromJson(json.decode(widget.initialValue))!;
WebDTO test = widget.initialValue;
resourceSource = test;
super.initState();
}

View File

@ -48,6 +48,7 @@ class SectionDetailScreen extends StatefulWidget {
}
class _SectionDetailScreenState extends State<SectionDetailScreen> {
late SectionDTO sectionDTO;
@override
Widget build(BuildContext context) {
@ -55,23 +56,31 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
Size size = MediaQuery.of(context).size;
GlobalKey globalKey = new GlobalKey();
Object? rawSectionData;
return FutureBuilder(
future: getSection(widget.id, (appContext.getContext() as ManagerAppContext).clientAPI!),
builder: (context, AsyncSnapshot<dynamic> snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return Stack(
children: [
bodySection(snapshot.data, size, appContext, context, globalKey),
Align(
alignment: AlignmentDirectional.bottomCenter,
child: Container(
height: 80,
child: getButtons(snapshot.data, appContext),
),
)
],
);
rawSectionData = snapshot.data;
sectionDTO = SectionDTO.fromJson(rawSectionData)!; // TODO handle null value !
if(sectionDTO != null) {
return Stack(
children: [
bodySection(rawSectionData, size, appContext, context, globalKey),
Align(
alignment: AlignmentDirectional.bottomCenter,
child: Container(
height: 80,
child: getButtons(sectionDTO!, appContext),
),
)
],
);
} else {
return Center(child: Text("Une erreur est survenue lors de la récupération de la section"));
}
} else if (snapshot.connectionState == ConnectionState.none) {
return Text("No data");
} else {
@ -86,8 +95,9 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
);
}
Widget bodySection(SectionDTO? sectionDTO, Size size, AppContext appContext, BuildContext context, GlobalKey globalKey) {
Widget bodySection(Object? rawSectionDTO, Size size, AppContext appContext, BuildContext context, GlobalKey globalKey) {
ManagerAppContext managerAppContext = appContext.getContext();
//SectionDTO? sectionDTO = SectionDTO.fromJson(rawSectionDTO);
return SingleChildScrollView(
child: Column(
@ -204,7 +214,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
onChanged: (value) {
setState(() {
sectionDTO.isBeacon = value;
save(true, sectionDTO, appContext);
save(false, sectionDTO, appContext);
});
},
),
@ -305,7 +315,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
height: size.height * 0.5,
child: Padding(
padding: const EdgeInsets.all(10.0),
child: sectionDTO != null ? getSpecificData(sectionDTO, appContext) : null,
child: sectionDTO != null ? getSpecificData(sectionDTO, rawSectionDTO, appContext) : null,
),
decoration: BoxDecoration(
//color: Colors.lightGreen,
@ -370,8 +380,9 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
Future<void> cancel(SectionDTO sectionDTO, AppContext appContext) async {
ManagerAppContext managerAppContext = appContext.getContext();
SectionDTO? section = await (appContext.getContext() as ManagerAppContext).clientAPI!.sectionApi!.sectionGetDetail(sectionDTO.id!);
managerAppContext.selectedSection = section;
Object? section = await (appContext.getContext() as ManagerAppContext).clientAPI!.sectionApi!.sectionGetDetail(sectionDTO.id!);
// TODO parse as SectionDTO
managerAppContext.selectedSection = section as SectionDTO;
appContext.setContext(managerAppContext);
}
@ -396,89 +407,104 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
appContext.setContext(managerAppContext);
if (isTraduction) {
showNotification(Colors.green, kWhite, 'Les traductions de la section ont été sauvegardées avec succès', context, null);
showNotification(kSuccess, kWhite, 'Les traductions de la section ont été sauvegardées avec succès', context, null);
} else {
showNotification(Colors.green, kWhite, 'La section a été sauvegardée avec succès', context, null);
}
showNotification(kSuccess, kWhite, 'La section a été sauvegardée avec succès', context, null);
}
}
getSpecificData(SectionDTO sectionDTO, Object? rawSectionData, AppContext appContext) {
// TODO handle null value !
getSpecificData(SectionDTO sectionDTO, AppContext appContext) {
switch(sectionDTO.type) {
case SectionType.Map:
MapDTO mapDTO = MapDTO.fromJson(rawSectionData)!;
return MapConfig(
initialValue: sectionDTO.data!,
onChanged: (String data) {
sectionDTO.data = data;
initialValue: mapDTO,
onChanged: (MapDTO mapDTO) {
// TODO DO something
//sectionDTO.data = data;
//save(false, sectionDTO, appContext);
},
);
case SectionType.Slider:
SliderDTO sliderDTO = SliderDTO.fromJson(rawSectionData)!;
return SliderConfig(
initialValue: sectionDTO.data!,
initialValue: sliderDTO,
onChanged: (String data) {
sectionDTO.data = data;
save(false, sectionDTO, appContext);
// TODO DO something
/*sectionDTO.data = data;
save(false, sectionDTO, appContext);*/
},
);
case SectionType.Video:
case SectionType.Web:
WebDTO webDTO = WebDTO.fromJson(rawSectionData)!;
return WebOrVideoConfig(
label: sectionDTO.type == SectionType.Video ? "Url de la vidéo:": "Url du site web:",
initialValue: sectionDTO.data!,
initialValue: webDTO,
onChanged: (String data) {
sectionDTO.data = data;
// TODO DO something
//sectionDTO.data = data;
},
);
case SectionType.Menu:
MenuDTO menuDTO = MenuDTO.fromJson(rawSectionData)!;
return MenuConfig(
initialValue: sectionDTO.data!,
initialValue: menuDTO,
onChanged: (String data) {
sectionDTO.data = data;
//sectionDTO.data = data;
},
);
case SectionType.Quizz:
QuizDTO quizDTO = QuizDTO.fromJson(rawSectionData)!;
return QuizzConfig(
initialValue: sectionDTO.data!,
initialValue: quizDTO,
onChanged: (String data) {
sectionDTO.data = data;
//sectionDTO.data = data;
},
);
case SectionType.Article:
ArticleDTO articleDTO = ArticleDTO.fromJson(rawSectionData)!;
return ArticleConfig(
initialValue: sectionDTO.data!,
initialValue: articleDTO,
onChanged: (String data) {
sectionDTO.data = data;
save(false, sectionDTO, appContext);
/*sectionDTO.data = data;
save(false, sectionDTO, appContext);*/
},
);
case SectionType.Pdf:
PdfDTO pdfDTO = PdfDTO.fromJson(rawSectionData)!;
return PDFConfig(
initialValue: sectionDTO.data!,
initialValue: pdfDTO,
onChanged: (String data) {
sectionDTO.data = data;
//sectionDTO.data = data;
//save(false, sectionDTO, appContext);
},
);
case SectionType.Puzzle:
PuzzleDTO puzzleDTO = PuzzleDTO.fromJson(rawSectionData)!;
return PuzzleConfig(
initialValue: sectionDTO.data!,
initialValue: puzzleDTO,
onChanged: (String data) {
sectionDTO.data = data;
//sectionDTO.data = data;
},
);
case SectionType.Agenda:
AgendaDTO agendaDTO = AgendaDTO.fromJson(rawSectionData)!;
return AgendaConfig(
initialValue: sectionDTO.data!,
initialValue: agendaDTO,
onChanged: (String data) {
sectionDTO.data = data;
save(false, sectionDTO, appContext);
/*sectionDTO.data = data;
save(false, sectionDTO, appContext);*/
},
);
case SectionType.Weather:
WeatherDTO weatherDTO = WeatherDTO.fromJson(rawSectionData)!;
return WeatherConfig(
initialValue: sectionDTO.data!,
initialValue: weatherDTO,
onChanged: (String data) {
sectionDTO.data = data;
//sectionDTO.data = data;
//save(false, sectionDTO, appContext);
},
);
@ -486,10 +512,15 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
}
}
Future<SectionDTO?> getSection(String sectionId, Client client) async {
SectionDTO? section = await client.sectionApi!.sectionGetDetail(sectionId);
//print(section);
return section;
Future<Object?> getSection(String sectionId, Client client) async {
try{
Object? section = await client.sectionApi!.sectionGetDetail(sectionId);
return section;
} catch(e) {
print(e);
return null;
}
}
Future<Uint8List?> _captureAndSharePng(GlobalKey globalKey, String sectionId) async {

View File

@ -100,7 +100,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
anchorElement.click();
} else {
File test = await FileHelper().storeConfiguration(export);
showNotification(Colors.green, kWhite, "L'export de la configuration a réussi, le document se trouve à cet endroit : " + test.path, context, 3000);
showNotification(kSuccess, kWhite, "L'export de la configuration a réussi, le document se trouve à cet endroit : " + test.path, context, 3000);
}
} catch(e) {
log(e.toString());
@ -248,7 +248,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
configurationDTO.isMobile = value;
},
),
if(configurationDTO.isMobile!)
if(configurationDTO.isMobile != null && configurationDTO.isMobile!)
RoundedButton(
text: "Télécharger les QRCodes",
icon: Icons.qr_code,
@ -507,6 +507,11 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
ManagerAppContext managerAppContext = appContext.getContext();
await managerAppContext.clientAPI!.sectionApi!.sectionUpdateOrder(sections!);
},
askReload: () {
setState(() {
// refresh UI
});
},
),
),
),
@ -529,6 +534,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
await managerAppContext.clientAPI!.configurationApi!.configurationDelete(configurationDTO.id!);
managerAppContext.selectedConfiguration = null;
appContext.setContext(managerAppContext);
showNotification(kSuccess, kWhite, 'La configuration a été supprimée avec succès', context, null);
},
context
);
@ -540,7 +546,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
managerAppContext.selectedConfiguration = configuration;
appContext.setContext(managerAppContext);
showNotification(Colors.green, kWhite, 'La configuration a été sauvegardée avec succès', context, null);
showNotification(kSuccess, kWhite, 'La configuration a été sauvegardée avec succès', context, null);
}
Future<ConfigurationDTO?> getConfiguration(ConfigurationDetailScreen widget, Client client) async {

View File

@ -1,6 +1,7 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/loading_common.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Screens/Configurations/configuration_detail_screen.dart';
import 'package:manager_app/Screens/Configurations/new_configuration_popup.dart';
@ -68,15 +69,33 @@ class _ConfigurationsScreenState extends State<ConfigurationsScreen> {
itemBuilder: (BuildContext context, int index) {
return
InkWell(
onTap: () {
onTap: () async {
if (data[index].id == null) {
showNewConfiguration(appContext, (bool) {
var configurationToCreate = await showNewConfiguration(appContext, (bool) {
if (bool) {
setState(() {
// Thanks future builder for the refresh..
});
}
}, context, mainContext);
if(configurationToCreate != null) {
if (configurationToCreate.label != null) {
configurationToCreate.dateCreation = DateTime.now();
configurationToCreate.isMobile = false;
configurationToCreate.isTablet = false;
configurationToCreate.isOffline = false;
configurationToCreate.isDate = false;
configurationToCreate.isHour = false;
configurationToCreate.isSectionImageBackground = false;
configurationToCreate.instanceId = (appContext.getContext() as ManagerAppContext).instanceId;
await (appContext.getContext() as ManagerAppContext).clientAPI!.configurationApi!.configurationCreate(configurationToCreate);
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedConfiguration = null;
await appContext.setContext(managerAppContext);
showNotification(kSuccess, kWhite, 'La configuration a été créée avec succès', context, null);
}
}
} else {
setState(() {
ManagerAppContext managerAppContext = appContext.getContext();

View File

@ -10,12 +10,12 @@ import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
void showNewConfiguration(AppContext appContext, ValueChanged<bool> isImport, BuildContext context, BuildContext mainContext) {
Future<ConfigurationDTO?> showNewConfiguration(AppContext appContext, ValueChanged<bool> isImport, BuildContext context, BuildContext mainContext) {
ConfigurationDTO configurationDTO = new ConfigurationDTO();
Size size = MediaQuery.of(mainContext).size;
configurationDTO.label = "";
showDialog(
var configuration = showDialog<ConfigurationDTO?>(
builder: (BuildContext context) => AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(20.0))
@ -107,7 +107,8 @@ void showNewConfiguration(AppContext appContext, ValueChanged<bool> isImport, Bu
textColor: kWhite,
press: () {
if(configurationDTO.label != null && configurationDTO.label!.length > 2) {
create(configurationDTO, appContext, context);
//create(configurationDTO, appContext, context);
Navigator.of(context).pop(configurationDTO);
} else {
showNotification(Colors.orange, kWhite, 'Veuillez spécifier un nom pour la nouvelle visite', context, null);
}
@ -121,6 +122,8 @@ void showNewConfiguration(AppContext appContext, ValueChanged<bool> isImport, Bu
],
), context: context
);
return configuration;
}
String filePicker() {
@ -141,22 +144,21 @@ String filePicker() {
void create(ConfigurationDTO configurationDTO, AppContext appContext, context) async {
if (configurationDTO.label != null) {
configurationDTO.dateCreation = DateTime.now();
/*configurationDTO.dateCreation = DateTime.now();
configurationDTO.isMobile = false;
configurationDTO.isTablet = false;
configurationDTO.isOffline = false;
configurationDTO.isDate = false;
configurationDTO.isHour = false;
configurationDTO.isSectionImageBackground = false;
configurationDTO.isWeather = false;
configurationDTO.instanceId = (appContext.getContext() as ManagerAppContext).instanceId;
await (appContext.getContext() as ManagerAppContext).clientAPI!.configurationApi!.configurationCreate(configurationDTO);
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedConfiguration = null;
appContext.setContext(managerAppContext);
await appContext.setContext(managerAppContext);
showNotification(Colors.green, kWhite, 'La configuration a été créée avec succès', context, null);
showNotification(Colors.green, kWhite, 'La configuration a été créée avec succès', context, null);*/
Navigator.of(context).pop();
Navigator.of(context).pop(configurationDTO);
}
}

View File

@ -9,7 +9,7 @@ import 'package:manager_app/app_context.dart';
import 'package:manager_app/constants.dart';
import 'package:manager_api_new/api.dart';
void showNewSection(String configurationId, AppContext appContext, BuildContext contextBuild, bool isSubSection, Function? sendSubSection, bool isMobile) {
Future<SectionDTO?> showNewSection(String configurationId, AppContext appContext, BuildContext contextBuild, bool isSubSection, Function? sendSubSection, bool isMobile) {
SectionDTO sectionDTO = new SectionDTO();
sectionDTO.label = "";
sectionDTO.configurationId = configurationId;
@ -18,7 +18,7 @@ void showNewSection(String configurationId, AppContext appContext, BuildContext
Size size = MediaQuery.of(contextBuild).size;
sectionDTO.type = isMobile ? SectionType.Article : SectionType.Map;
showDialog(
var section = showDialog<SectionDTO?>(
builder: (BuildContext context) => AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(20.0))
@ -102,7 +102,8 @@ void showNewSection(String configurationId, AppContext appContext, BuildContext
press: () {
if(sectionDTO.label != null && sectionDTO.label!.length > 2) {
//onYes();
create(sectionDTO, appContext, context, isSubSection, sendSubSection);
Navigator.of(context).pop(sectionDTO);
//create(sectionDTO, appContext, context, isSubSection, sendSubSection);
} else {
showNotification(Colors.orange, kWhite, 'Veuillez spécifier un nom pour la nouvelle section', context, null);
}
@ -116,6 +117,8 @@ void showNewSection(String configurationId, AppContext appContext, BuildContext
],
), context: contextBuild
);
return section;
}
void create(SectionDTO sectionDTO, AppContext appContext, BuildContext context, bool isSubSection, Function? sendSubSection) async {
@ -132,7 +135,7 @@ void create(SectionDTO sectionDTO, AppContext appContext, BuildContext context,
}
managerAppContext.selectedConfiguration.sectionIds.add(newSection.id);*/
appContext.setContext(managerAppContext);
showNotification(Colors.green, kWhite, 'La section a été créée avec succès !', context, null);
showNotification(kSuccess, kWhite, 'La section a été créée avec succès !', context, null);
} else {
sendSubSection!(newSection);
}

View File

@ -1,5 +1,6 @@
import 'package:diacritic/diacritic.dart';
import 'package:flutter/material.dart';
import 'package:manager_app/Components/message_notification.dart';
import 'package:manager_app/Components/string_input_container.dart';
import 'package:manager_app/Models/managerContext.dart';
import 'package:manager_app/Screens/Configurations/listView_card_section.dart';
@ -13,11 +14,13 @@ class SectionReorderList extends StatefulWidget {
final String configurationId;
final List<SectionDTO> sectionsIn;
final ValueChanged<List<SectionDTO>> onChangedOrder;
final Function askReload;
const SectionReorderList({
Key? key,
required this.configurationId,
required this.sectionsIn,
required this.onChangedOrder,
required this.askReload,
}) : super(key: key);
@override
@ -81,12 +84,12 @@ class _SectionReorderListState extends State<SectionReorderList> {
Key('$index'),
currentConfiguration.isMobile!,
appContext,
(section) {
setState(() {
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedSection = section;
appContext.setContext(managerAppContext);
});
(section) {
setState(() {
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedSection = section;
appContext.setContext(managerAppContext);
});
}
);
},
@ -143,8 +146,20 @@ class _SectionReorderListState extends State<SectionReorderList> {
top: 10,
right: 10,
child: InkWell(
onTap: () {
showNewSection(widget.configurationId, appContext, context, false, null, currentConfiguration.isMobile!);
onTap: () async {
var sectionToCreate = await showNewSection(widget.configurationId, appContext, context, false, null, currentConfiguration.isMobile!);
if(sectionToCreate != null)
{
ManagerAppContext managerAppContext = appContext.getContext();
sectionToCreate.instanceId = managerAppContext.instanceId;
sectionToCreate.isBeacon = false;
sectionToCreate.dateCreation = DateTime.now();
SectionDTO? newSection = await managerAppContext.clientAPI!.sectionApi!.sectionCreate(sectionToCreate);
showNotification(kSuccess, kWhite, 'La section a été créée avec succès !', context, null);
widget.askReload();
}
},
child: Container(
height: MediaQuery.of(context).size.width * 0.04,

View File

@ -40,7 +40,7 @@ class _DeviceElementState extends State<DeviceElement> {
width: 15,
height: 15,
decoration: BoxDecoration(
color: deviceDTO.connected! ? Colors.green : Colors.red,
color: deviceDTO.connected! ? Colors.green : kError,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(25.0),
boxShadow: [

View File

@ -63,8 +63,13 @@ class _BodyState extends State<Body> {
menu.sections!.add(configurations);
menu.sections!.add(resources);
ManagerAppContext managerAppContext = appContext.getContext();
currentPosition = managerAppContext.currentPositionMenu ?? currentPosition;
selectedElement = initElementToShow(currentPosition, menu);
return Background(
child: Row(
children: [
@ -110,6 +115,8 @@ class _BodyState extends State<Body> {
setState(() {
currentPosition = section.order;
selectedElement = initElementToShow(currentPosition, menu);
managerAppContext.currentPositionMenu = currentPosition;
appContext.setContext(managerAppContext);
})
},
child: Container(

View File

@ -18,6 +18,8 @@ class MainScreen extends StatefulWidget {
class _MainScreenState extends State<MainScreen> {
@override
Widget build(BuildContext context) {
final GlobalKey<_MainScreenState> key = GlobalKey();
final appContext = Provider.of<AppContext>(context);
ManagerAppContext managerAppContext = appContext.getContext();
@ -25,10 +27,12 @@ class _MainScreenState extends State<MainScreen> {
if(!ResponsiveBreakpoints.of(context).equals(TABLET) || isFortSt) {
return Scaffold(
key: key,
body: Body(showDevice: !isFortSt),
);
} else {
return Scaffold(
key: key,
appBar: AppBar(title: Text("MyInfoMate", style: new TextStyle(color: kPrimaryColor, fontSize: 30, fontWeight: FontWeight.w400, fontFamily: "Helvetica")), backgroundColor: kSecond.withOpacity(0.3), iconTheme: IconThemeData(color: kPrimaryColor)),
drawer: Drawer(
child: getMenu()

View File

@ -30,14 +30,14 @@ class LoginScreen extends StatefulWidget {
class _LoginScreenState extends State<LoginScreen> {
String email = ""; // DEV "test@email.be"
String password = ""; // DEV = "kljqsdkljqsd"
String? host = "https://api.myinfomate.be"; // "https://api.myinfomate.be" // "https://api.mymuseum.be" // DEV = "http://192.168.31.96" // http://localhost:5000 // https://api.mymuseum.be // myCore http://192.168.31.140:8089
String? host = "http://localhost:5000"; // "https://api.myinfomate.be" // "https://api.mymuseum.be" // DEV = "http://192.168.31.96" // http://localhost:5000 // https://api.mymuseum.be // myCore http://192.168.31.140:8089
Client? clientAPI;
bool isLoading = false;
bool isRememberMe = false;
String pageTitle = "MyInfoMate";
String? token;
String? instanceId;
int? pinCode;
String? pinCode;
Storage localStorage = window.localStorage;
void authenticateTRY(AppContext appContext, bool fromClick) async {
@ -128,7 +128,12 @@ class _LoginScreenState extends State<LoginScreen> {
isLoading = false;
});
}
Navigator.pushAndRemoveUntil(
Navigator.pushNamedAndRemoveUntil(
context,
'/main', // <- correspond à ta route définie
(Route<dynamic> route) => false,
);
/*Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (context) {
@ -136,7 +141,7 @@ class _LoginScreenState extends State<LoginScreen> {
},
),
(Route<dynamic> route) => false // For pushAndRemoveUntil
);
);*/
} else {
showNotification(Colors.orange, kWhite, 'Un problème est survenu lors de la connexion', context, null);
setState(() {
@ -173,7 +178,7 @@ class _LoginScreenState extends State<LoginScreen> {
@override
void initState() {
//this.isRememberMe = widget.session.rememberMe;
this.host = "https://api.myinfomate.be"; // "https://api.myinfomate.be"// "https://api.mymuseum.be" // "http://localhost:5000" //widget.session.host; // MDLF "http://192.168.1.19:8089" // "https://api.mymuseum.be"
this.host = "http://localhost:5000"; // "https://api.myinfomate.be"// "https://api.mymuseum.be" // "http://localhost:5000" //widget.session.host; // MDLF "http://192.168.1.19:8089" // "https://api.mymuseum.be"
//this.email = "test@email.be"; //widget.session.email;
//this.password = "kljqsdkljqsd"; //widget.session.password;
@ -190,7 +195,7 @@ class _LoginScreenState extends State<LoginScreen> {
this.instanceId = localStorage.entries.where((element) => element.key == "instanceId").first.value;
}
if(localStorage.containsKey("pinCode")) {
this.pinCode = int.tryParse(localStorage.entries.where((element) => element.key == "pinCode").first.value);
this.pinCode = localStorage.entries.where((element) => element.key == "pinCode").first.value;
}
}
super.initState();
@ -227,6 +232,8 @@ class _LoginScreenState extends State<LoginScreen> {
final appContext = Provider.of<AppContext>(context);
Size size = MediaQuery.of(context).size;
final GlobalKey<_LoginScreenState> loginKey = GlobalKey();
initInstance(appContext.getContext());
// ==> We need to work with route or something else like pop-up (pop up is nice) to make it works !
@ -236,6 +243,7 @@ class _LoginScreenState extends State<LoginScreen> {
}*/
return Scaffold(
key: loginKey,
body: Center(
child: SingleChildScrollView(
child: Container(

View File

@ -1,11 +1,11 @@
// Openapi Generator last run: : 2025-05-07T14:31:51.428558
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
@Openapi(
additionalProperties:
AdditionalProperties(pubName: 'manager_api_new', pubAuthor: 'Fransolet Thomas', useEnumExtension: true),
inputSpecFile: 'lib/api/swagger.yaml',
inputSpec: InputSpec(path: 'lib/api/swagger.yaml'),
generatorName: Generator.dart,
alwaysRun: true,
outputDirectory: 'manager_api_new')
class Example extends OpenapiGeneratorConfig {}

File diff suppressed because it is too large Load Diff

View File

@ -60,11 +60,14 @@ class MyApp extends StatefulWidget {
}
class _MyAppState extends State<MyApp> {
final GlobalKey<_MyAppState> mainKey = GlobalKey();
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider<AppContext>(
create: (_) => AppContext(widget.managerAppContext),
child: MaterialApp(
key: mainKey,
builder: (context, child) => ResponsiveBreakpoints.builder(
child: child!,
breakpoints: [
@ -96,7 +99,10 @@ class _MyAppState extends State<MyApp> {
'/policy': (context) => PolicyScreen(),
'/policy/mdlf': (context) => PolicyScreen(param: "mdlf"),
'/policy/fort': (context) => PolicyScreen(param: "fort"),
}
},
onUnknownRoute: (settings) => MaterialPageRoute(
builder: (context) => Container(child: Center(child: Text("Not found"))),
),
),
);
}

View File

@ -3,7 +3,9 @@
.dart_tool/
.packages
build/
pubspec.lock # Except for application packages
# Except for application packages
pubspec.lock
doc/api/

View File

@ -3,48 +3,51 @@
README.md
analysis_options.yaml
doc/AgendaDTO.md
doc/AgendaDTOAllOfAgendaMapProvider.md
doc/ArticleDTO.md
doc/AuthenticationApi.md
doc/CategorieDTO.md
doc/ConfigurationApi.md
doc/ConfigurationDTO.md
doc/ContentDTO.md
doc/ContentGeoPoint.md
doc/ContentDTOResource.md
doc/DeviceApi.md
doc/DeviceDTO.md
doc/DeviceDetailDTO.md
doc/DeviceDetailDTOAllOf.md
doc/ExportConfigurationDTO.md
doc/ExportConfigurationDTOAllOf.md
doc/GeoPoint.md
doc/GeoPointDTO.md
doc/GeoPointDTOCategorie.md
doc/Instance.md
doc/InstanceApi.md
doc/InstanceDTO.md
doc/LevelDTO.md
doc/LoginDTO.md
doc/MapDTO.md
doc/MapDTOMapProvider.md
doc/MapDTOMapType.md
doc/MapDTOMapTypeMapbox.md
doc/MapDTOAllOfMapProvider.md
doc/MapDTOAllOfMapType.md
doc/MapDTOAllOfMapTypeMapbox.md
doc/MapProvider.md
doc/MapTypeApp.md
doc/MapTypeMapBox.md
doc/MenuDTO.md
doc/PDFFileDTO.md
doc/OrderedTranslationAndResourceDTO.md
doc/PdfDTO.md
doc/PlayerMessageDTO.md
doc/PuzzleDTO.md
doc/PuzzleDTOImage.md
doc/PuzzleDTOAllOfPuzzleImage.md
doc/QuestionDTO.md
doc/QuizzDTO.md
doc/QuizzDTOBadLevel.md
doc/QuestionDTOImageBackgroundResourceType.md
doc/QuizDTO.md
doc/QuizQuestion.md
doc/QuizQuestionResource.md
doc/Resource.md
doc/ResourceApi.md
doc/ResourceDTO.md
doc/ResourceType.md
doc/ResponseDTO.md
doc/SectionApi.md
doc/SectionDTO.md
doc/SectionMapApi.md
doc/SectionQuizApi.md
doc/SectionType.md
doc/SliderDTO.md
doc/TokenDTO.md
@ -64,6 +67,8 @@ lib/api/device_api.dart
lib/api/instance_api.dart
lib/api/resource_api.dart
lib/api/section_api.dart
lib/api/section_map_api.dart
lib/api/section_quiz_api.dart
lib/api/user_api.dart
lib/api_client.dart
lib/api_exception.dart
@ -74,38 +79,39 @@ lib/auth/http_basic_auth.dart
lib/auth/http_bearer_auth.dart
lib/auth/oauth.dart
lib/model/agenda_dto.dart
lib/model/agenda_dto_all_of_agenda_map_provider.dart
lib/model/article_dto.dart
lib/model/categorie_dto.dart
lib/model/configuration_dto.dart
lib/model/content_dto.dart
lib/model/content_geo_point.dart
lib/model/content_dto_resource.dart
lib/model/device_detail_dto.dart
lib/model/device_detail_dto_all_of.dart
lib/model/device_dto.dart
lib/model/export_configuration_dto.dart
lib/model/export_configuration_dto_all_of.dart
lib/model/geo_point.dart
lib/model/geo_point_dto.dart
lib/model/geo_point_dto_categorie.dart
lib/model/instance.dart
lib/model/instance_dto.dart
lib/model/level_dto.dart
lib/model/login_dto.dart
lib/model/map_dto.dart
lib/model/map_dto_map_provider.dart
lib/model/map_dto_map_type.dart
lib/model/map_dto_map_type_mapbox.dart
lib/model/map_dto_all_of_map_provider.dart
lib/model/map_dto_all_of_map_type.dart
lib/model/map_dto_all_of_map_type_mapbox.dart
lib/model/map_provider.dart
lib/model/map_type_app.dart
lib/model/map_type_map_box.dart
lib/model/menu_dto.dart
lib/model/ordered_translation_and_resource_dto.dart
lib/model/pdf_dto.dart
lib/model/pdf_file_dto.dart
lib/model/player_message_dto.dart
lib/model/puzzle_dto.dart
lib/model/puzzle_dto_image.dart
lib/model/puzzle_dto_all_of_puzzle_image.dart
lib/model/question_dto.dart
lib/model/quizz_dto.dart
lib/model/quizz_dto_bad_level.dart
lib/model/question_dto_image_background_resource_type.dart
lib/model/quiz_dto.dart
lib/model/quiz_question.dart
lib/model/quiz_question_resource.dart
lib/model/resource.dart
lib/model/resource_dto.dart
lib/model/resource_type.dart
lib/model/response_dto.dart
@ -121,5 +127,18 @@ lib/model/video_dto.dart
lib/model/weather_dto.dart
lib/model/web_dto.dart
pubspec.yaml
test/pdf_file_dto_test.dart
test/weather_dto_test.dart
test/agenda_dto_all_of_agenda_map_provider_test.dart
test/content_dto_resource_test.dart
test/geo_point_test.dart
test/map_dto_all_of_map_provider_test.dart
test/map_dto_all_of_map_type_mapbox_test.dart
test/map_dto_all_of_map_type_test.dart
test/ordered_translation_and_resource_dto_test.dart
test/puzzle_dto_all_of_puzzle_image_test.dart
test/question_dto_image_background_resource_type_test.dart
test/quiz_dto_test.dart
test/quiz_question_resource_test.dart
test/quiz_question_test.dart
test/resource_test.dart
test/section_map_api_test.dart
test/section_quiz_api_test.dart

View File

@ -1 +1 @@
unset
7.9.0

View File

@ -3,7 +3,8 @@ API Manager Service
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: Version Alpha
- API version: Version Alpha 0
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
## Requirements
@ -60,117 +61,126 @@ try {
## Documentation for API Endpoints
All URIs are relative to *https://api.myinfomate.be*
All URIs are relative to *https://localhost:5001*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc\/AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token |
*AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc\/AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate |
*ConfigurationApi* | [**configurationCreate**](doc\/ConfigurationApi.md#configurationcreate) | **POST** /api/Configuration |
*ConfigurationApi* | [**configurationDelete**](doc\/ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} |
*ConfigurationApi* | [**configurationExport**](doc\/ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export |
*ConfigurationApi* | [**configurationGet**](doc\/ConfigurationApi.md#configurationget) | **GET** /api/Configuration |
*ConfigurationApi* | [**configurationGetConfigurationsByPinCode**](doc\/ConfigurationApi.md#configurationgetconfigurationsbypincode) | **GET** /api/Configuration/byPin |
*ConfigurationApi* | [**configurationGetDetail**](doc\/ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} |
*ConfigurationApi* | [**configurationImport**](doc\/ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import |
*ConfigurationApi* | [**configurationUpdate**](doc\/ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration |
*DeviceApi* | [**deviceCreate**](doc\/DeviceApi.md#devicecreate) | **POST** /api/Device |
*DeviceApi* | [**deviceDelete**](doc\/DeviceApi.md#devicedelete) | **DELETE** /api/Device/{id} |
*DeviceApi* | [**deviceGet**](doc\/DeviceApi.md#deviceget) | **GET** /api/Device |
*DeviceApi* | [**deviceGetDetail**](doc\/DeviceApi.md#devicegetdetail) | **GET** /api/Device/{id}/detail |
*DeviceApi* | [**deviceUpdate**](doc\/DeviceApi.md#deviceupdate) | **PUT** /api/Device |
*DeviceApi* | [**deviceUpdateMainInfos**](doc\/DeviceApi.md#deviceupdatemaininfos) | **PUT** /api/Device/mainInfos |
*InstanceApi* | [**instanceCreateInstance**](doc\/InstanceApi.md#instancecreateinstance) | **POST** /api/Instance |
*InstanceApi* | [**instanceDeleteInstance**](doc\/InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} |
*InstanceApi* | [**instanceGet**](doc\/InstanceApi.md#instanceget) | **GET** /api/Instance |
*InstanceApi* | [**instanceGetDetail**](doc\/InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} |
*InstanceApi* | [**instanceGetInstanceByPinCode**](doc\/InstanceApi.md#instancegetinstancebypincode) | **GET** /api/Instance/byPin |
*InstanceApi* | [**instanceUpdateinstance**](doc\/InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance |
*ResourceApi* | [**resourceCreate**](doc\/ResourceApi.md#resourcecreate) | **POST** /api/Resource |
*ResourceApi* | [**resourceDelete**](doc\/ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} |
*ResourceApi* | [**resourceGet**](doc\/ResourceApi.md#resourceget) | **GET** /api/Resource |
*ResourceApi* | [**resourceGetDetail**](doc\/ResourceApi.md#resourcegetdetail) | **GET** /api/Resource/{id}/detail |
*ResourceApi* | [**resourceShow**](doc\/ResourceApi.md#resourceshow) | **GET** /api/Resource/{id} |
*ResourceApi* | [**resourceUpdate**](doc\/ResourceApi.md#resourceupdate) | **PUT** /api/Resource |
*ResourceApi* | [**resourceUpload**](doc\/ResourceApi.md#resourceupload) | **POST** /api/Resource/upload |
*SectionApi* | [**sectionCreate**](doc\/SectionApi.md#sectioncreate) | **POST** /api/Section |
*SectionApi* | [**sectionDelete**](doc\/SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
*SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
*SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section |
*SectionApi* | [**sectionGetAgendaDTO**](doc\/SectionApi.md#sectiongetagendadto) | **GET** /api/Section/AgendaDTO |
*SectionApi* | [**sectionGetAllBeaconsForInstance**](doc\/SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} |
*SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
*SectionApi* | [**sectionGetArticleDTO**](doc\/SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
*SectionApi* | [**sectionGetDetail**](doc\/SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
*SectionApi* | [**sectionGetFromConfiguration**](doc\/SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
*SectionApi* | [**sectionGetMapDTO**](doc\/SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
*SectionApi* | [**sectionGetMenuDTO**](doc\/SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
*SectionApi* | [**sectionGetPdfDTO**](doc\/SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO |
*SectionApi* | [**sectionGetPuzzleDTO**](doc\/SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO |
*SectionApi* | [**sectionGetQuizzDTO**](doc\/SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO |
*SectionApi* | [**sectionGetSliderDTO**](doc\/SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
*SectionApi* | [**sectionGetVideoDTO**](doc\/SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
*SectionApi* | [**sectionGetWeatherDTO**](doc\/SectionApi.md#sectiongetweatherdto) | **GET** /api/Section/WeatherDTO |
*SectionApi* | [**sectionGetWebDTO**](doc\/SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO |
*SectionApi* | [**sectionPlayerMessageDTO**](doc\/SectionApi.md#sectionplayermessagedto) | **GET** /api/Section/PlayerMessageDTO |
*SectionApi* | [**sectionUpdate**](doc\/SectionApi.md#sectionupdate) | **PUT** /api/Section |
*SectionApi* | [**sectionUpdateOrder**](doc\/SectionApi.md#sectionupdateorder) | **PUT** /api/Section/order |
*UserApi* | [**userCreateUser**](doc\/UserApi.md#usercreateuser) | **POST** /api/User |
*UserApi* | [**userDeleteUser**](doc\/UserApi.md#userdeleteuser) | **DELETE** /api/User/{id} |
*UserApi* | [**userGet**](doc\/UserApi.md#userget) | **GET** /api/User |
*UserApi* | [**userGetDetail**](doc\/UserApi.md#usergetdetail) | **GET** /api/User/{id} |
*UserApi* | [**userUpdateUser**](doc\/UserApi.md#userupdateuser) | **PUT** /api/User |
*AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc//AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token |
*AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc//AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate |
*ConfigurationApi* | [**configurationCreate**](doc//ConfigurationApi.md#configurationcreate) | **POST** /api/Configuration |
*ConfigurationApi* | [**configurationDelete**](doc//ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} |
*ConfigurationApi* | [**configurationExport**](doc//ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export |
*ConfigurationApi* | [**configurationGet**](doc//ConfigurationApi.md#configurationget) | **GET** /api/Configuration |
*ConfigurationApi* | [**configurationGetConfigurationsByPinCode**](doc//ConfigurationApi.md#configurationgetconfigurationsbypincode) | **GET** /api/Configuration/byPin |
*ConfigurationApi* | [**configurationGetDetail**](doc//ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} |
*ConfigurationApi* | [**configurationImport**](doc//ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import |
*ConfigurationApi* | [**configurationUpdate**](doc//ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration |
*DeviceApi* | [**deviceCreate**](doc//DeviceApi.md#devicecreate) | **POST** /api/Device |
*DeviceApi* | [**deviceDelete**](doc//DeviceApi.md#devicedelete) | **DELETE** /api/Device/{id} |
*DeviceApi* | [**deviceGet**](doc//DeviceApi.md#deviceget) | **GET** /api/Device |
*DeviceApi* | [**deviceGetDetail**](doc//DeviceApi.md#devicegetdetail) | **GET** /api/Device/{id}/detail |
*DeviceApi* | [**deviceUpdate**](doc//DeviceApi.md#deviceupdate) | **PUT** /api/Device |
*DeviceApi* | [**deviceUpdateMainInfos**](doc//DeviceApi.md#deviceupdatemaininfos) | **PUT** /api/Device/mainInfos |
*InstanceApi* | [**instanceCreateInstance**](doc//InstanceApi.md#instancecreateinstance) | **POST** /api/Instance |
*InstanceApi* | [**instanceDeleteInstance**](doc//InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} |
*InstanceApi* | [**instanceGet**](doc//InstanceApi.md#instanceget) | **GET** /api/Instance |
*InstanceApi* | [**instanceGetDetail**](doc//InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} |
*InstanceApi* | [**instanceGetInstanceByPinCode**](doc//InstanceApi.md#instancegetinstancebypincode) | **GET** /api/Instance/byPin |
*InstanceApi* | [**instanceUpdateinstance**](doc//InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance |
*ResourceApi* | [**resourceCreate**](doc//ResourceApi.md#resourcecreate) | **POST** /api/Resource |
*ResourceApi* | [**resourceDelete**](doc//ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} |
*ResourceApi* | [**resourceGet**](doc//ResourceApi.md#resourceget) | **GET** /api/Resource |
*ResourceApi* | [**resourceGetDetail**](doc//ResourceApi.md#resourcegetdetail) | **GET** /api/Resource/{id}/detail |
*ResourceApi* | [**resourceShow**](doc//ResourceApi.md#resourceshow) | **GET** /api/Resource/{id} |
*ResourceApi* | [**resourceUpdate**](doc//ResourceApi.md#resourceupdate) | **PUT** /api/Resource |
*ResourceApi* | [**resourceUpload**](doc//ResourceApi.md#resourceupload) | **POST** /api/Resource/upload |
*SectionApi* | [**sectionCreate**](doc//SectionApi.md#sectioncreate) | **POST** /api/Section |
*SectionApi* | [**sectionDelete**](doc//SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
*SectionApi* | [**sectionDeleteAllForConfiguration**](doc//SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
*SectionApi* | [**sectionGet**](doc//SectionApi.md#sectionget) | **GET** /api/Section |
*SectionApi* | [**sectionGetAgendaDTO**](doc//SectionApi.md#sectiongetagendadto) | **GET** /api/Section/AgendaDTO |
*SectionApi* | [**sectionGetAllBeaconsForInstance**](doc//SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} |
*SectionApi* | [**sectionGetAllSectionSubSections**](doc//SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
*SectionApi* | [**sectionGetArticleDTO**](doc//SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
*SectionApi* | [**sectionGetDetail**](doc//SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
*SectionApi* | [**sectionGetFromConfiguration**](doc//SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
*SectionApi* | [**sectionGetMapDTO**](doc//SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
*SectionApi* | [**sectionGetMenuDTO**](doc//SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
*SectionApi* | [**sectionGetPdfDTO**](doc//SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO |
*SectionApi* | [**sectionGetPuzzleDTO**](doc//SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO |
*SectionApi* | [**sectionGetQuizDTO**](doc//SectionApi.md#sectiongetquizdto) | **GET** /api/Section/QuizDTO |
*SectionApi* | [**sectionGetSliderDTO**](doc//SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
*SectionApi* | [**sectionGetVideoDTO**](doc//SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
*SectionApi* | [**sectionGetWeatherDTO**](doc//SectionApi.md#sectiongetweatherdto) | **GET** /api/Section/WeatherDTO |
*SectionApi* | [**sectionGetWebDTO**](doc//SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO |
*SectionApi* | [**sectionPlayerMessageDTO**](doc//SectionApi.md#sectionplayermessagedto) | **GET** /api/Section/PlayerMessageDTO |
*SectionApi* | [**sectionUpdate**](doc//SectionApi.md#sectionupdate) | **PUT** /api/Section |
*SectionApi* | [**sectionUpdateOrder**](doc//SectionApi.md#sectionupdateorder) | **PUT** /api/Section/order |
*SectionMapApi* | [**sectionMapCreate**](doc//SectionMapApi.md#sectionmapcreate) | **POST** /api/SectionMap/{sectionId}/points |
*SectionMapApi* | [**sectionMapDelete**](doc//SectionMapApi.md#sectionmapdelete) | **DELETE** /api/SectionMap/points/delete/{geoPointId} |
*SectionMapApi* | [**sectionMapGetAllGeoPointsFromSection**](doc//SectionMapApi.md#sectionmapgetallgeopointsfromsection) | **GET** /api/SectionMap/{sectionId}/points |
*SectionMapApi* | [**sectionMapUpdate**](doc//SectionMapApi.md#sectionmapupdate) | **PUT** /api/SectionMap |
*SectionQuizApi* | [**sectionQuizCreate**](doc//SectionQuizApi.md#sectionquizcreate) | **POST** /api/SectionQuiz/{sectionId}/questions |
*SectionQuizApi* | [**sectionQuizDelete**](doc//SectionQuizApi.md#sectionquizdelete) | **DELETE** /api/SectionQuiz/questions/delete/{quizQuestionId} |
*SectionQuizApi* | [**sectionQuizGetAllQuizQuestionFromSection**](doc//SectionQuizApi.md#sectionquizgetallquizquestionfromsection) | **GET** /api/SectionQuiz/{sectionId}/questions |
*SectionQuizApi* | [**sectionQuizUpdate**](doc//SectionQuizApi.md#sectionquizupdate) | **PUT** /api/SectionQuiz |
*UserApi* | [**userCreateUser**](doc//UserApi.md#usercreateuser) | **POST** /api/User |
*UserApi* | [**userDeleteUser**](doc//UserApi.md#userdeleteuser) | **DELETE** /api/User/{id} |
*UserApi* | [**userGet**](doc//UserApi.md#userget) | **GET** /api/User |
*UserApi* | [**userGetDetail**](doc//UserApi.md#usergetdetail) | **GET** /api/User/{id} |
*UserApi* | [**userUpdateUser**](doc//UserApi.md#userupdateuser) | **PUT** /api/User |
## Documentation For Models
- [AgendaDTO](doc\/AgendaDTO.md)
- [ArticleDTO](doc\/ArticleDTO.md)
- [CategorieDTO](doc\/CategorieDTO.md)
- [ConfigurationDTO](doc\/ConfigurationDTO.md)
- [ContentDTO](doc\/ContentDTO.md)
- [ContentGeoPoint](doc\/ContentGeoPoint.md)
- [DeviceDTO](doc\/DeviceDTO.md)
- [DeviceDetailDTO](doc\/DeviceDetailDTO.md)
- [DeviceDetailDTOAllOf](doc\/DeviceDetailDTOAllOf.md)
- [ExportConfigurationDTO](doc\/ExportConfigurationDTO.md)
- [ExportConfigurationDTOAllOf](doc\/ExportConfigurationDTOAllOf.md)
- [GeoPointDTO](doc\/GeoPointDTO.md)
- [GeoPointDTOCategorie](doc\/GeoPointDTOCategorie.md)
- [Instance](doc\/Instance.md)
- [InstanceDTO](doc\/InstanceDTO.md)
- [LevelDTO](doc\/LevelDTO.md)
- [LoginDTO](doc\/LoginDTO.md)
- [MapDTO](doc\/MapDTO.md)
- [MapDTOMapProvider](doc\/MapDTOMapProvider.md)
- [MapDTOMapType](doc\/MapDTOMapType.md)
- [MapDTOMapTypeMapbox](doc\/MapDTOMapTypeMapbox.md)
- [MapProvider](doc\/MapProvider.md)
- [MapTypeApp](doc\/MapTypeApp.md)
- [MapTypeMapBox](doc\/MapTypeMapBox.md)
- [MenuDTO](doc\/MenuDTO.md)
- [PDFFileDTO](doc\/PDFFileDTO.md)
- [PdfDTO](doc\/PdfDTO.md)
- [PlayerMessageDTO](doc\/PlayerMessageDTO.md)
- [PuzzleDTO](doc\/PuzzleDTO.md)
- [PuzzleDTOImage](doc\/PuzzleDTOImage.md)
- [QuestionDTO](doc\/QuestionDTO.md)
- [QuizzDTO](doc\/QuizzDTO.md)
- [QuizzDTOBadLevel](doc\/QuizzDTOBadLevel.md)
- [ResourceDTO](doc\/ResourceDTO.md)
- [ResourceType](doc\/ResourceType.md)
- [ResponseDTO](doc\/ResponseDTO.md)
- [SectionDTO](doc\/SectionDTO.md)
- [SectionType](doc\/SectionType.md)
- [SliderDTO](doc\/SliderDTO.md)
- [TokenDTO](doc\/TokenDTO.md)
- [TranslationAndResourceDTO](doc\/TranslationAndResourceDTO.md)
- [TranslationDTO](doc\/TranslationDTO.md)
- [User](doc\/User.md)
- [UserDetailDTO](doc\/UserDetailDTO.md)
- [VideoDTO](doc\/VideoDTO.md)
- [WeatherDTO](doc\/WeatherDTO.md)
- [WebDTO](doc\/WebDTO.md)
- [AgendaDTO](doc//AgendaDTO.md)
- [AgendaDTOAllOfAgendaMapProvider](doc//AgendaDTOAllOfAgendaMapProvider.md)
- [ArticleDTO](doc//ArticleDTO.md)
- [CategorieDTO](doc//CategorieDTO.md)
- [ConfigurationDTO](doc//ConfigurationDTO.md)
- [ContentDTO](doc//ContentDTO.md)
- [ContentDTOResource](doc//ContentDTOResource.md)
- [DeviceDTO](doc//DeviceDTO.md)
- [DeviceDetailDTO](doc//DeviceDetailDTO.md)
- [ExportConfigurationDTO](doc//ExportConfigurationDTO.md)
- [GeoPoint](doc//GeoPoint.md)
- [GeoPointDTO](doc//GeoPointDTO.md)
- [Instance](doc//Instance.md)
- [InstanceDTO](doc//InstanceDTO.md)
- [LoginDTO](doc//LoginDTO.md)
- [MapDTO](doc//MapDTO.md)
- [MapDTOAllOfMapProvider](doc//MapDTOAllOfMapProvider.md)
- [MapDTOAllOfMapType](doc//MapDTOAllOfMapType.md)
- [MapDTOAllOfMapTypeMapbox](doc//MapDTOAllOfMapTypeMapbox.md)
- [MapProvider](doc//MapProvider.md)
- [MapTypeApp](doc//MapTypeApp.md)
- [MapTypeMapBox](doc//MapTypeMapBox.md)
- [MenuDTO](doc//MenuDTO.md)
- [OrderedTranslationAndResourceDTO](doc//OrderedTranslationAndResourceDTO.md)
- [PdfDTO](doc//PdfDTO.md)
- [PlayerMessageDTO](doc//PlayerMessageDTO.md)
- [PuzzleDTO](doc//PuzzleDTO.md)
- [PuzzleDTOAllOfPuzzleImage](doc//PuzzleDTOAllOfPuzzleImage.md)
- [QuestionDTO](doc//QuestionDTO.md)
- [QuestionDTOImageBackgroundResourceType](doc//QuestionDTOImageBackgroundResourceType.md)
- [QuizDTO](doc//QuizDTO.md)
- [QuizQuestion](doc//QuizQuestion.md)
- [QuizQuestionResource](doc//QuizQuestionResource.md)
- [Resource](doc//Resource.md)
- [ResourceDTO](doc//ResourceDTO.md)
- [ResourceType](doc//ResourceType.md)
- [ResponseDTO](doc//ResponseDTO.md)
- [SectionDTO](doc//SectionDTO.md)
- [SectionType](doc//SectionType.md)
- [SliderDTO](doc//SliderDTO.md)
- [TokenDTO](doc//TokenDTO.md)
- [TranslationAndResourceDTO](doc//TranslationAndResourceDTO.md)
- [TranslationDTO](doc//TranslationDTO.md)
- [User](doc//User.md)
- [UserDetailDTO](doc//UserDetailDTO.md)
- [VideoDTO](doc//VideoDTO.md)
- [WeatherDTO](doc//WeatherDTO.md)
- [WebDTO](doc//WebDTO.md)
## Documentation For Authorization

View File

@ -8,8 +8,26 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**resourceIds** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [optional]
**agendaMapProvider** | [**AgendaDTOAllOfAgendaMapProvider**](AgendaDTOAllOfAgendaMapProvider.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# manager_api_new.model.AgendaDTOAllOfAgendaMapProvider
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,6 +8,24 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**content** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**isContentTop** | **bool** | | [optional]
**audioIds** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://api.myinfomate.be*
All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -11,8 +11,7 @@ Name | Type | Description | Notes
**id** | **int** | | [optional]
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**icon** | **String** | | [optional]
**iconResourceId** | **String** | | [optional]
**iconUrl** | **String** | | [optional]
**resourceDTO** | [**ContentDTOResource**](ContentDTOResource.md) | | [optional]
**order** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://api.myinfomate.be*
All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -205,7 +205,7 @@ import 'package:manager_api_new/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = ConfigurationApi();
final pinCode = 56; // int |
final pinCode = pinCode_example; // String |
try {
final result = api_instance.configurationGetConfigurationsByPinCode(pinCode);
@ -219,7 +219,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pinCode** | **int**| | [optional]
**pinCode** | **String**| | [optional]
### Return type

View File

@ -24,10 +24,6 @@ Name | Type | Description | Notes
**sectionIds** | **List<String>** | | [optional] [default to const []]
**loaderImageId** | **String** | | [optional]
**loaderImageUrl** | **String** | | [optional]
**weatherCity** | **String** | | [optional]
**weatherUpdatedDate** | [**DateTime**](DateTime.md) | | [optional]
**weatherResult** | **String** | | [optional]
**isWeather** | **bool** | | [optional]
**isDate** | **bool** | | [optional]
**isHour** | **bool** | | [optional]
**isSectionImageBackground** | **bool** | | [optional]

View File

@ -10,10 +10,9 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**resourceId** | **String** | | [optional]
**resourceUrl** | **String** | | [optional]
**order** | **int** | | [optional]
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
**resourceId** | **String** | | [optional]
**resource** | [**ContentDTOResource**](ContentDTOResource.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,20 @@
# manager_api_new.model.ContentDTOResource
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**type** | [**ResourceType**](ResourceType.md) | | [optional]
**label** | **String** | | [optional]
**url** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://api.myinfomate.be*
All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -24,10 +24,6 @@ Name | Type | Description | Notes
**sectionIds** | **List<String>** | | [optional] [default to const []]
**loaderImageId** | **String** | | [optional]
**loaderImageUrl** | **String** | | [optional]
**weatherCity** | **String** | | [optional]
**weatherUpdatedDate** | [**DateTime**](DateTime.md) | | [optional]
**weatherResult** | **String** | | [optional]
**isWeather** | **bool** | | [optional]
**isDate** | **bool** | | [optional]
**isHour** | **bool** | | [optional]
**isSectionImageBackground** | **bool** | | [optional]

View File

@ -0,0 +1,28 @@
# manager_api_new.model.GeoPoint
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | |
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**contents** | [**List<ContentDTO>**](ContentDTO.md) | | [default to const []]
**schedules** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**prices** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**phone** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**email** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**site** | [**List<TranslationDTO>**](TranslationDTO.md) | | [default to const []]
**categorieId** | **int** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**imageResourceId** | **String** | | [optional]
**imageUrl** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -11,8 +11,7 @@ Name | Type | Description | Notes
**id** | **int** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**contents** | [**List<ContentGeoPoint>**](ContentGeoPoint.md) | | [optional] [default to const []]
**categorie** | [**GeoPointDTOCategorie**](GeoPointDTOCategorie.md) | | [optional]
**contents** | [**List<ContentDTO>**](ContentDTO.md) | | [optional] [default to const []]
**categorieId** | **int** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]

View File

@ -8,10 +8,10 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**name** | **String** | | [optional]
**id** | **String** | |
**name** | **String** | |
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**pinCode** | **int** | | [optional]
**pinCode** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://api.myinfomate.be*
All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -18,7 +18,7 @@ Method | HTTP request | Description
# **instanceCreateInstance**
> InstanceDTO instanceCreateInstance(instance)
> InstanceDTO instanceCreateInstance(instanceDTO)
@ -29,10 +29,10 @@ import 'package:manager_api_new/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = InstanceApi();
final instance = Instance(); // Instance |
final instanceDTO = InstanceDTO(); // InstanceDTO |
try {
final result = api_instance.instanceCreateInstance(instance);
final result = api_instance.instanceCreateInstance(instanceDTO);
print(result);
} catch (e) {
print('Exception when calling InstanceApi->instanceCreateInstance: $e\n');
@ -43,7 +43,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**instance** | [**Instance**](Instance.md)| |
**instanceDTO** | [**InstanceDTO**](InstanceDTO.md)| |
### Return type
@ -197,7 +197,7 @@ import 'package:manager_api_new/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = InstanceApi();
final pinCode = 56; // int |
final pinCode = pinCode_example; // String |
try {
final result = api_instance.instanceGetInstanceByPinCode(pinCode);
@ -211,7 +211,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pinCode** | **int**| | [optional]
**pinCode** | **String**| | [optional]
### Return type
@ -229,7 +229,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **instanceUpdateinstance**
> InstanceDTO instanceUpdateinstance(instance)
> InstanceDTO instanceUpdateinstance(instanceDTO)
@ -240,10 +240,10 @@ import 'package:manager_api_new/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = InstanceApi();
final instance = Instance(); // Instance |
final instanceDTO = InstanceDTO(); // InstanceDTO |
try {
final result = api_instance.instanceUpdateinstance(instance);
final result = api_instance.instanceUpdateinstance(instanceDTO);
print(result);
} catch (e) {
print('Exception when calling InstanceApi->instanceUpdateinstance: $e\n');
@ -254,7 +254,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**instance** | [**Instance**](Instance.md)| |
**instanceDTO** | [**InstanceDTO**](InstanceDTO.md)| |
### Return type

View File

@ -11,7 +11,7 @@ Name | Type | Description | Notes
**id** | **String** | | [optional]
**name** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**pinCode** | **int** | | [optional]
**pinCode** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,16 +8,34 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**zoom** | **int** | | [optional]
**mapType** | [**MapDTOMapType**](MapDTOMapType.md) | | [optional]
**mapTypeMapbox** | [**MapDTOMapTypeMapbox**](MapDTOMapTypeMapbox.md) | | [optional]
**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [optional]
**mapType** | [**MapDTOAllOfMapType**](MapDTOAllOfMapType.md) | | [optional]
**mapTypeMapbox** | [**MapDTOAllOfMapTypeMapbox**](MapDTOAllOfMapTypeMapbox.md) | | [optional]
**mapProvider** | [**MapDTOAllOfMapProvider**](MapDTOAllOfMapProvider.md) | | [optional]
**points** | [**List<GeoPointDTO>**](GeoPointDTO.md) | | [optional] [default to const []]
**iconResourceId** | **String** | | [optional]
**iconSource** | **String** | | [optional]
**categories** | [**List<CategorieDTO>**](CategorieDTO.md) | | [optional] [default to const []]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**centerLatitude** | **String** | | [optional]
**centerLongitude** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# manager_api_new.model.MapDTOAllOfMapProvider
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# manager_api_new.model.MapDTOAllOfMapType
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# manager_api_new.model.MapDTOAllOfMapTypeMapbox
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,6 +8,24 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,16 @@
# manager_api_new.model.OrderedTranslationAndResourceDTO
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**translationAndResourceDTOs** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
**order** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,7 +8,25 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pdfs** | [**List<PDFFileDTO>**](PDFFileDTO.md) | | [optional] [default to const []]
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**pdfs** | [**List<OrderedTranslationAndResourceDTO>**](OrderedTranslationAndResourceDTO.md) | | [optional] [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,9 +8,28 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**messageDebut** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
**messageFin** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
**image** | [**PuzzleDTOImage**](PuzzleDTOImage.md) | | [optional]
**puzzleImage** | [**PuzzleDTOAllOfPuzzleImage**](PuzzleDTOAllOfPuzzleImage.md) | | [optional]
**puzzleImageId** | **String** | | [optional]
**rows** | **int** | | [optional]
**cols** | **int** | | [optional]

View File

@ -0,0 +1,20 @@
# manager_api_new.model.PuzzleDTOAllOfPuzzleImage
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**type** | [**ResourceType**](ResourceType.md) | | [optional]
**label** | **String** | | [optional]
**url** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,10 +8,11 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
**responses** | [**List<ResponseDTO>**](ResponseDTO.md) | | [optional] [default to const []]
**imageBackgroundResourceId** | **String** | | [optional]
**imageBackgroundResourceType** | [**ResourceType**](ResourceType.md) | | [optional]
**imageBackgroundResourceType** | [**QuestionDTOImageBackgroundResourceType**](QuestionDTOImageBackgroundResourceType.md) | | [optional]
**imageBackgroundResourceUrl** | **String** | | [optional]
**order** | **int** | | [optional]

View File

@ -0,0 +1,37 @@
# manager_api_new.model.QuizDTO
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**questions** | [**List<QuestionDTO>**](QuestionDTO.md) | | [optional] [default to const []]
**badLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
**mediumLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
**goodLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
**greatLevel** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,20 @@
# manager_api_new.model.QuizQuestion
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | |
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [default to const []]
**responses** | [**List<ResponseDTO>**](ResponseDTO.md) | | [default to const []]
**resourceId** | **String** | | [optional]
**resource** | [**QuizQuestionResource**](QuizQuestionResource.md) | | [optional]
**order** | **int** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,20 @@
# manager_api_new.model.QuizQuestionResource
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**type** | [**ResourceType**](ResourceType.md) | |
**label** | **String** | |
**instanceId** | **String** | |
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**url** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,20 @@
# manager_api_new.model.Resource
## Load the model package
```dart
import 'package:manager_api_new/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**type** | [**ResourceType**](ResourceType.md) | |
**label** | **String** | |
**instanceId** | **String** | |
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**url** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://api.myinfomate.be*
All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://api.myinfomate.be*
All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -23,7 +23,7 @@ Method | HTTP request | Description
[**sectionGetMenuDTO**](SectionApi.md#sectiongetmenudto) | **GET** /api/Section/MenuDTO |
[**sectionGetPdfDTO**](SectionApi.md#sectiongetpdfdto) | **GET** /api/Section/PdfDTO |
[**sectionGetPuzzleDTO**](SectionApi.md#sectiongetpuzzledto) | **GET** /api/Section/PuzzleDTO |
[**sectionGetQuizzDTO**](SectionApi.md#sectiongetquizzdto) | **GET** /api/Section/QuizzDTO |
[**sectionGetQuizDTO**](SectionApi.md#sectiongetquizdto) | **GET** /api/Section/QuizDTO |
[**sectionGetSliderDTO**](SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO |
[**sectionGetVideoDTO**](SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO |
[**sectionGetWeatherDTO**](SectionApi.md#sectiongetweatherdto) | **GET** /api/Section/WeatherDTO |
@ -370,7 +370,7 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGetDetail**
> SectionDTO sectionGetDetail(id)
> Object sectionGetDetail(id)
@ -399,7 +399,7 @@ Name | Type | Description | Notes
### Return type
[**SectionDTO**](SectionDTO.md)
[**Object**](Object.md)
### Authorization
@ -611,8 +611,8 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGetQuizzDTO**
> QuizzDTO sectionGetQuizzDTO()
# **sectionGetQuizDTO**
> QuizDTO sectionGetQuizDTO()
@ -625,10 +625,10 @@ import 'package:manager_api_new/api.dart';
final api_instance = SectionApi();
try {
final result = api_instance.sectionGetQuizzDTO();
final result = api_instance.sectionGetQuizDTO();
print(result);
} catch (e) {
print('Exception when calling SectionApi->sectionGetQuizzDTO: $e\n');
print('Exception when calling SectionApi->sectionGetQuizDTO: $e\n');
}
```
@ -637,7 +637,7 @@ This endpoint does not need any parameter.
### Return type
[**QuizzDTO**](QuizzDTO.md)
[**QuizDTO**](QuizDTO.md)
### Authorization
@ -846,7 +846,7 @@ This endpoint does not need any parameter.
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionUpdate**
> SectionDTO sectionUpdate(sectionDTO)
> SectionDTO sectionUpdate(body)
@ -857,10 +857,10 @@ import 'package:manager_api_new/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionApi();
final sectionDTO = SectionDTO(); // SectionDTO |
final body = Object(); // Object |
try {
final result = api_instance.sectionUpdate(sectionDTO);
final result = api_instance.sectionUpdate(body);
print(result);
} catch (e) {
print('Exception when calling SectionApi->sectionUpdate: $e\n');
@ -871,7 +871,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**sectionDTO** | [**SectionDTO**](SectionDTO.md)| |
**body** | **Object**| |
### Return type

View File

@ -18,7 +18,6 @@ Name | Type | Description | Notes
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**data** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]

View File

@ -0,0 +1,191 @@
# manager_api_new.api.SectionMapApi
## Load the API package
```dart
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description
------------- | ------------- | -------------
[**sectionMapCreate**](SectionMapApi.md#sectionmapcreate) | **POST** /api/SectionMap/{sectionId}/points |
[**sectionMapDelete**](SectionMapApi.md#sectionmapdelete) | **DELETE** /api/SectionMap/points/delete/{geoPointId} |
[**sectionMapGetAllGeoPointsFromSection**](SectionMapApi.md#sectionmapgetallgeopointsfromsection) | **GET** /api/SectionMap/{sectionId}/points |
[**sectionMapUpdate**](SectionMapApi.md#sectionmapupdate) | **PUT** /api/SectionMap |
# **sectionMapCreate**
> GeoPoint sectionMapCreate(sectionId, geoPointDTO)
### Example
```dart
import 'package:manager_api_new/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionMapApi();
final sectionId = sectionId_example; // String |
final geoPointDTO = GeoPointDTO(); // GeoPointDTO |
try {
final result = api_instance.sectionMapCreate(sectionId, geoPointDTO);
print(result);
} catch (e) {
print('Exception when calling SectionMapApi->sectionMapCreate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**sectionId** | **String**| |
**geoPointDTO** | [**GeoPointDTO**](GeoPointDTO.md)| |
### Return type
[**GeoPoint**](GeoPoint.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionMapDelete**
> String sectionMapDelete(geoPointId)
### Example
```dart
import 'package:manager_api_new/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionMapApi();
final geoPointId = 56; // int |
try {
final result = api_instance.sectionMapDelete(geoPointId);
print(result);
} catch (e) {
print('Exception when calling SectionMapApi->sectionMapDelete: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**geoPointId** | **int**| |
### Return type
**String**
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionMapGetAllGeoPointsFromSection**
> List<GeoPointDTO> sectionMapGetAllGeoPointsFromSection(sectionId)
### Example
```dart
import 'package:manager_api_new/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionMapApi();
final sectionId = sectionId_example; // String |
try {
final result = api_instance.sectionMapGetAllGeoPointsFromSection(sectionId);
print(result);
} catch (e) {
print('Exception when calling SectionMapApi->sectionMapGetAllGeoPointsFromSection: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**sectionId** | **String**| |
### Return type
[**List<GeoPointDTO>**](GeoPointDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionMapUpdate**
> GeoPoint sectionMapUpdate(geoPointDTO)
### Example
```dart
import 'package:manager_api_new/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionMapApi();
final geoPointDTO = GeoPointDTO(); // GeoPointDTO |
try {
final result = api_instance.sectionMapUpdate(geoPointDTO);
print(result);
} catch (e) {
print('Exception when calling SectionMapApi->sectionMapUpdate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**geoPointDTO** | [**GeoPointDTO**](GeoPointDTO.md)| |
### Return type
[**GeoPoint**](GeoPoint.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,191 @@
# manager_api_new.api.SectionQuizApi
## Load the API package
```dart
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description
------------- | ------------- | -------------
[**sectionQuizCreate**](SectionQuizApi.md#sectionquizcreate) | **POST** /api/SectionQuiz/{sectionId}/questions |
[**sectionQuizDelete**](SectionQuizApi.md#sectionquizdelete) | **DELETE** /api/SectionQuiz/questions/delete/{quizQuestionId} |
[**sectionQuizGetAllQuizQuestionFromSection**](SectionQuizApi.md#sectionquizgetallquizquestionfromsection) | **GET** /api/SectionQuiz/{sectionId}/questions |
[**sectionQuizUpdate**](SectionQuizApi.md#sectionquizupdate) | **PUT** /api/SectionQuiz |
# **sectionQuizCreate**
> QuizQuestion sectionQuizCreate(sectionId, questionDTO)
### Example
```dart
import 'package:manager_api_new/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionQuizApi();
final sectionId = sectionId_example; // String |
final questionDTO = QuestionDTO(); // QuestionDTO |
try {
final result = api_instance.sectionQuizCreate(sectionId, questionDTO);
print(result);
} catch (e) {
print('Exception when calling SectionQuizApi->sectionQuizCreate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**sectionId** | **String**| |
**questionDTO** | [**QuestionDTO**](QuestionDTO.md)| |
### Return type
[**QuizQuestion**](QuizQuestion.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionQuizDelete**
> String sectionQuizDelete(quizQuestionId)
### Example
```dart
import 'package:manager_api_new/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionQuizApi();
final quizQuestionId = 56; // int |
try {
final result = api_instance.sectionQuizDelete(quizQuestionId);
print(result);
} catch (e) {
print('Exception when calling SectionQuizApi->sectionQuizDelete: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**quizQuestionId** | **int**| |
### Return type
**String**
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionQuizGetAllQuizQuestionFromSection**
> List<QuestionDTO> sectionQuizGetAllQuizQuestionFromSection(sectionId)
### Example
```dart
import 'package:manager_api_new/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionQuizApi();
final sectionId = sectionId_example; // String |
try {
final result = api_instance.sectionQuizGetAllQuizQuestionFromSection(sectionId);
print(result);
} catch (e) {
print('Exception when calling SectionQuizApi->sectionQuizGetAllQuizQuestionFromSection: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**sectionId** | **String**| |
### Return type
[**List<QuestionDTO>**](QuestionDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionQuizUpdate**
> QuizQuestion sectionQuizUpdate(questionDTO)
### Example
```dart
import 'package:manager_api_new/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionQuizApi();
final questionDTO = QuestionDTO(); // QuestionDTO |
try {
final result = api_instance.sectionQuizUpdate(questionDTO);
print(result);
} catch (e) {
print('Exception when calling SectionQuizApi->sectionQuizUpdate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**questionDTO** | [**QuestionDTO**](QuestionDTO.md)| |
### Return type
[**QuizQuestion**](QuizQuestion.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -8,6 +8,24 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**contents** | [**List<ContentDTO>**](ContentDTO.md) | | [optional] [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -15,7 +15,7 @@ Name | Type | Description | Notes
**expiresIn** | **int** | | [optional]
**expiration** | [**DateTime**](DateTime.md) | | [optional]
**instanceId** | **String** | | [optional]
**pinCode** | **int** | | [optional]
**pinCode** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -11,8 +11,7 @@ Name | Type | Description | Notes
**language** | **String** | | [optional]
**value** | **String** | | [optional]
**resourceId** | **String** | | [optional]
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
**resourceUrl** | **String** | | [optional]
**resource** | [**ContentDTOResource**](ContentDTOResource.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,14 +8,14 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**email** | **String** | | [optional]
**password** | **String** | | [optional]
**id** | **String** | |
**email** | **String** | |
**password** | **String** | |
**lastName** | **String** | |
**token** | **String** | |
**instanceId** | **String** | |
**firstName** | **String** | | [optional]
**lastName** | **String** | | [optional]
**token** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api_new/api.dart';
```
All URIs are relative to *https://api.myinfomate.be*
All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -17,7 +17,7 @@ Method | HTTP request | Description
# **userCreateUser**
> UserDetailDTO userCreateUser(user)
> UserDetailDTO userCreateUser(userDetailDTO)
@ -28,10 +28,10 @@ import 'package:manager_api_new/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = UserApi();
final user = User(); // User |
final userDetailDTO = UserDetailDTO(); // UserDetailDTO |
try {
final result = api_instance.userCreateUser(user);
final result = api_instance.userCreateUser(userDetailDTO);
print(result);
} catch (e) {
print('Exception when calling UserApi->userCreateUser: $e\n');
@ -42,7 +42,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**User**](User.md)| |
**userDetailDTO** | [**UserDetailDTO**](UserDetailDTO.md)| |
### Return type
@ -185,7 +185,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **userUpdateUser**
> UserDetailDTO userUpdateUser(user)
> UserDetailDTO userUpdateUser(userDetailDTO)
@ -196,10 +196,10 @@ import 'package:manager_api_new/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = UserApi();
final user = User(); // User |
final userDetailDTO = UserDetailDTO(); // UserDetailDTO |
try {
final result = api_instance.userUpdateUser(user);
final result = api_instance.userUpdateUser(userDetailDTO);
print(result);
} catch (e) {
print('Exception when calling UserApi->userUpdateUser: $e\n');
@ -210,7 +210,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**User**](User.md)| |
**userDetailDTO** | [**UserDetailDTO**](UserDetailDTO.md)| |
### Return type

View File

@ -12,6 +12,7 @@ Name | Type | Description | Notes
**email** | **String** | | [optional]
**firstName** | **String** | | [optional]
**lastName** | **String** | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,6 +8,24 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**source_** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,6 +8,24 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**city** | **String** | | [optional]
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
**result** | **String** | | [optional]

View File

@ -8,6 +8,24 @@ import 'package:manager_api_new/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**label** | **String** | | [optional]
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**imageId** | **String** | | [optional]
**imageSource** | **String** | | [optional]
**configurationId** | **String** | | [optional]
**isSubSection** | **bool** | | [optional]
**parentId** | **String** | | [optional]
**type** | [**SectionType**](SectionType.md) | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**meterZoneGPS** | **int** | | [optional]
**isBeacon** | **bool** | | [optional]
**beaconId** | **int** | | [optional]
**source_** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,7 +1,7 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
@ -14,6 +14,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:collection/collection.dart';
import 'package:http/http.dart';
import 'package:intl/intl.dart';
import 'package:meta/meta.dart';
@ -33,41 +34,44 @@ part 'api/device_api.dart';
part 'api/instance_api.dart';
part 'api/resource_api.dart';
part 'api/section_api.dart';
part 'api/section_map_api.dart';
part 'api/section_quiz_api.dart';
part 'api/user_api.dart';
part 'model/agenda_dto.dart';
part 'model/agenda_dto_all_of_agenda_map_provider.dart';
part 'model/article_dto.dart';
part 'model/categorie_dto.dart';
part 'model/configuration_dto.dart';
part 'model/content_dto.dart';
part 'model/content_geo_point.dart';
part 'model/content_dto_resource.dart';
part 'model/device_dto.dart';
part 'model/device_detail_dto.dart';
part 'model/device_detail_dto_all_of.dart';
part 'model/export_configuration_dto.dart';
part 'model/export_configuration_dto_all_of.dart';
part 'model/geo_point.dart';
part 'model/geo_point_dto.dart';
part 'model/geo_point_dto_categorie.dart';
part 'model/instance.dart';
part 'model/instance_dto.dart';
part 'model/level_dto.dart';
part 'model/login_dto.dart';
part 'model/map_dto.dart';
part 'model/map_dto_map_provider.dart';
part 'model/map_dto_map_type.dart';
part 'model/map_dto_map_type_mapbox.dart';
part 'model/map_dto_all_of_map_provider.dart';
part 'model/map_dto_all_of_map_type.dart';
part 'model/map_dto_all_of_map_type_mapbox.dart';
part 'model/map_provider.dart';
part 'model/map_type_app.dart';
part 'model/map_type_map_box.dart';
part 'model/menu_dto.dart';
part 'model/pdf_file_dto.dart';
part 'model/ordered_translation_and_resource_dto.dart';
part 'model/pdf_dto.dart';
part 'model/player_message_dto.dart';
part 'model/puzzle_dto.dart';
part 'model/puzzle_dto_image.dart';
part 'model/puzzle_dto_all_of_puzzle_image.dart';
part 'model/question_dto.dart';
part 'model/quizz_dto.dart';
part 'model/quizz_dto_bad_level.dart';
part 'model/question_dto_image_background_resource_type.dart';
part 'model/quiz_dto.dart';
part 'model/quiz_question.dart';
part 'model/quiz_question_resource.dart';
part 'model/resource.dart';
part 'model/resource_dto.dart';
part 'model/resource_type.dart';
part 'model/response_dto.dart';
@ -83,12 +87,17 @@ part 'model/video_dto.dart';
part 'model/weather_dto.dart';
part 'model/web_dto.dart';
/// An [ApiClient] instance that uses the default values obtained from
/// the OpenAPI specification file.
var defaultApiClient = ApiClient();
const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'};
const _dateEpochMarker = 'epoch';
const _deepEquality = DeepCollectionEquality();
final _dateFormatter = DateFormat('yyyy-MM-dd');
final _regList = RegExp(r'^List<(.*)>$');
final _regSet = RegExp(r'^Set<(.*)>$');
final _regMap = RegExp(r'^Map<String,(.*)>$');
ApiClient defaultApiClient = ApiClient();
bool _isEpochMarker(String? pattern) =>
pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/';

View File

@ -1,7 +1,7 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
@ -10,9 +10,9 @@
part of openapi.api;
class AuthenticationApi {
AuthenticationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
AuthenticationApi([ApiClient? apiClient])
: apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
@ -28,7 +28,13 @@ class AuthenticationApi {
/// * [String] clientId:
///
/// * [String] clientSecret:
Future<Response> authenticationAuthenticateWithFormWithHttpInfo({ String? grantType, String? username, String? password, String? clientId, String? clientSecret, }) async {
Future<Response> authenticationAuthenticateWithFormWithHttpInfo({
String? grantType,
String? username,
String? password,
String? clientId,
String? clientSecret,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/Authentication/Token';
@ -89,17 +95,32 @@ class AuthenticationApi {
/// * [String] clientId:
///
/// * [String] clientSecret:
Future<TokenDTO?> authenticationAuthenticateWithForm({ String? grantType, String? username, String? password, String? clientId, String? clientSecret, }) async {
final response = await authenticationAuthenticateWithFormWithHttpInfo( grantType: grantType, username: username, password: password, clientId: clientId, clientSecret: clientSecret, );
Future<TokenDTO?> authenticationAuthenticateWithForm({
String? grantType,
String? username,
String? password,
String? clientId,
String? clientSecret,
}) async {
final response = await authenticationAuthenticateWithFormWithHttpInfo(
grantType: grantType,
username: username,
password: password,
clientId: clientId,
clientSecret: clientSecret,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TokenDTO',) as TokenDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'TokenDTO',
) as TokenDTO;
}
return null;
}
@ -108,7 +129,9 @@ class AuthenticationApi {
/// Parameters:
///
/// * [LoginDTO] loginDTO (required):
Future<Response> authenticationAuthenticateWithJsonWithHttpInfo(LoginDTO loginDTO,) async {
Future<Response> authenticationAuthenticateWithJsonWithHttpInfo(
LoginDTO loginDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Authentication/Authenticate';
@ -121,7 +144,6 @@ class AuthenticationApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
@ -136,17 +158,24 @@ class AuthenticationApi {
/// Parameters:
///
/// * [LoginDTO] loginDTO (required):
Future<TokenDTO?> authenticationAuthenticateWithJson(LoginDTO loginDTO,) async {
final response = await authenticationAuthenticateWithJsonWithHttpInfo(loginDTO,);
Future<TokenDTO?> authenticationAuthenticateWithJson(
LoginDTO loginDTO,
) async {
final response = await authenticationAuthenticateWithJsonWithHttpInfo(
loginDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TokenDTO',) as TokenDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'TokenDTO',
) as TokenDTO;
}
return null;
}

View File

@ -1,7 +1,7 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
@ -10,9 +10,9 @@
part of openapi.api;
class ConfigurationApi {
ConfigurationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
ConfigurationApi([ApiClient? apiClient])
: apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
@ -20,7 +20,9 @@ class ConfigurationApi {
/// Parameters:
///
/// * [ConfigurationDTO] configurationDTO (required):
Future<Response> configurationCreateWithHttpInfo(ConfigurationDTO configurationDTO,) async {
Future<Response> configurationCreateWithHttpInfo(
ConfigurationDTO configurationDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Configuration';
@ -33,7 +35,6 @@ class ConfigurationApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
@ -48,17 +49,24 @@ class ConfigurationApi {
/// Parameters:
///
/// * [ConfigurationDTO] configurationDTO (required):
Future<ConfigurationDTO?> configurationCreate(ConfigurationDTO configurationDTO,) async {
final response = await configurationCreateWithHttpInfo(configurationDTO,);
Future<ConfigurationDTO?> configurationCreate(
ConfigurationDTO configurationDTO,
) async {
final response = await configurationCreateWithHttpInfo(
configurationDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConfigurationDTO',) as ConfigurationDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'ConfigurationDTO',
) as ConfigurationDTO;
}
return null;
}
@ -67,10 +75,11 @@ class ConfigurationApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> configurationDeleteWithHttpInfo(String id,) async {
Future<Response> configurationDeleteWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Configuration/{id}'
.replaceAll('{id}', id);
final path = r'/api/Configuration/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -81,7 +90,6 @@ class ConfigurationApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
@ -96,17 +104,24 @@ class ConfigurationApi {
/// Parameters:
///
/// * [String] id (required):
Future<String?> configurationDelete(String id,) async {
final response = await configurationDeleteWithHttpInfo(id,);
Future<String?> configurationDelete(
String id,
) async {
final response = await configurationDeleteWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
@ -117,10 +132,12 @@ class ConfigurationApi {
/// * [String] id (required):
///
/// * [String] language:
Future<Response> configurationExportWithHttpInfo(String id, { String? language, }) async {
Future<Response> configurationExportWithHttpInfo(
String id, {
String? language,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/Configuration/{id}/export'
.replaceAll('{id}', id);
final path = r'/api/Configuration/{id}/export'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -135,7 +152,6 @@ class ConfigurationApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -150,8 +166,16 @@ class ConfigurationApi {
/// Parameters:
///
/// * [String] id (required):
Future<ExportConfigurationDTO> configurationExport(String id,) async {
final response = await configurationExportWithHttpInfo(id,);
///
/// * [String] language:
Future<ExportConfigurationDTO> configurationExport(
String id, {
String? language,
}) async {
final response = await configurationExportWithHttpInfo(
id,
language: language,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
@ -169,7 +193,9 @@ class ConfigurationApi {
/// Parameters:
///
/// * [String] instanceId:
Future<Response> configurationGetWithHttpInfo({ String? instanceId, }) async {
Future<Response> configurationGetWithHttpInfo({
String? instanceId,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/Configuration';
@ -186,7 +212,6 @@ class ConfigurationApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -201,20 +226,25 @@ class ConfigurationApi {
/// Parameters:
///
/// * [String] instanceId:
Future<List<ConfigurationDTO>?> configurationGet({ String? instanceId, }) async {
final response = await configurationGetWithHttpInfo( instanceId: instanceId, );
Future<List<ConfigurationDTO>?> configurationGet({
String? instanceId,
}) async {
final response = await configurationGetWithHttpInfo(
instanceId: instanceId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<ConfigurationDTO>') as List)
.cast<ConfigurationDTO>()
.toList();
return (await apiClient.deserializeAsync(
responseBody, 'List<ConfigurationDTO>') as List)
.cast<ConfigurationDTO>()
.toList(growable: false);
}
return null;
}
@ -222,8 +252,10 @@ class ConfigurationApi {
/// Performs an HTTP 'GET /api/Configuration/byPin' operation and returns the [Response].
/// Parameters:
///
/// * [int] pinCode:
Future<Response> configurationGetConfigurationsByPinCodeWithHttpInfo({ int? pinCode, }) async {
/// * [String] pinCode:
Future<Response> configurationGetConfigurationsByPinCodeWithHttpInfo({
String? pinCode,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/Configuration/byPin';
@ -240,7 +272,6 @@ class ConfigurationApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -254,21 +285,26 @@ class ConfigurationApi {
/// Parameters:
///
/// * [int] pinCode:
Future<List<ConfigurationDTO>?> configurationGetConfigurationsByPinCode({ int? pinCode, }) async {
final response = await configurationGetConfigurationsByPinCodeWithHttpInfo( pinCode: pinCode, );
/// * [String] pinCode:
Future<List<ConfigurationDTO>?> configurationGetConfigurationsByPinCode({
String? pinCode,
}) async {
final response = await configurationGetConfigurationsByPinCodeWithHttpInfo(
pinCode: pinCode,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<ConfigurationDTO>') as List)
.cast<ConfigurationDTO>()
.toList();
return (await apiClient.deserializeAsync(
responseBody, 'List<ConfigurationDTO>') as List)
.cast<ConfigurationDTO>()
.toList(growable: false);
}
return null;
}
@ -277,10 +313,11 @@ class ConfigurationApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> configurationGetDetailWithHttpInfo(String id,) async {
Future<Response> configurationGetDetailWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Configuration/{id}'
.replaceAll('{id}', id);
final path = r'/api/Configuration/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -291,7 +328,6 @@ class ConfigurationApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -306,17 +342,24 @@ class ConfigurationApi {
/// Parameters:
///
/// * [String] id (required):
Future<ConfigurationDTO?> configurationGetDetail(String id,) async {
final response = await configurationGetDetailWithHttpInfo(id,);
Future<ConfigurationDTO?> configurationGetDetail(
String id,
) async {
final response = await configurationGetDetailWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConfigurationDTO',) as ConfigurationDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'ConfigurationDTO',
) as ConfigurationDTO;
}
return null;
}
@ -325,7 +368,9 @@ class ConfigurationApi {
/// Parameters:
///
/// * [ExportConfigurationDTO] exportConfigurationDTO (required):
Future<Response> configurationImportWithHttpInfo(ExportConfigurationDTO exportConfigurationDTO,) async {
Future<Response> configurationImportWithHttpInfo(
ExportConfigurationDTO exportConfigurationDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Configuration/import';
@ -338,7 +383,6 @@ class ConfigurationApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
@ -353,17 +397,24 @@ class ConfigurationApi {
/// Parameters:
///
/// * [ExportConfigurationDTO] exportConfigurationDTO (required):
Future<String?> configurationImport(ExportConfigurationDTO exportConfigurationDTO,) async {
final response = await configurationImportWithHttpInfo(exportConfigurationDTO,);
Future<String?> configurationImport(
ExportConfigurationDTO exportConfigurationDTO,
) async {
final response = await configurationImportWithHttpInfo(
exportConfigurationDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
@ -372,7 +423,9 @@ class ConfigurationApi {
/// Parameters:
///
/// * [ConfigurationDTO] configurationDTO (required):
Future<Response> configurationUpdateWithHttpInfo(ConfigurationDTO configurationDTO,) async {
Future<Response> configurationUpdateWithHttpInfo(
ConfigurationDTO configurationDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Configuration';
@ -385,7 +438,6 @@ class ConfigurationApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
@ -400,17 +452,24 @@ class ConfigurationApi {
/// Parameters:
///
/// * [ConfigurationDTO] configurationDTO (required):
Future<ConfigurationDTO?> configurationUpdate(ConfigurationDTO configurationDTO,) async {
final response = await configurationUpdateWithHttpInfo(configurationDTO,);
Future<ConfigurationDTO?> configurationUpdate(
ConfigurationDTO configurationDTO,
) async {
final response = await configurationUpdateWithHttpInfo(
configurationDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ConfigurationDTO',) as ConfigurationDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'ConfigurationDTO',
) as ConfigurationDTO;
}
return null;
}

View File

@ -1,7 +1,7 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
@ -10,7 +10,6 @@
part of openapi.api;
class DeviceApi {
DeviceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
@ -20,7 +19,9 @@ class DeviceApi {
/// Parameters:
///
/// * [DeviceDetailDTO] deviceDetailDTO (required):
Future<Response> deviceCreateWithHttpInfo(DeviceDetailDTO deviceDetailDTO,) async {
Future<Response> deviceCreateWithHttpInfo(
DeviceDetailDTO deviceDetailDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Device';
@ -33,7 +34,6 @@ class DeviceApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
@ -48,17 +48,24 @@ class DeviceApi {
/// Parameters:
///
/// * [DeviceDetailDTO] deviceDetailDTO (required):
Future<DeviceDetailDTO?> deviceCreate(DeviceDetailDTO deviceDetailDTO,) async {
final response = await deviceCreateWithHttpInfo(deviceDetailDTO,);
Future<DeviceDetailDTO?> deviceCreate(
DeviceDetailDTO deviceDetailDTO,
) async {
final response = await deviceCreateWithHttpInfo(
deviceDetailDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDetailDTO',) as DeviceDetailDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'DeviceDetailDTO',
) as DeviceDetailDTO;
}
return null;
}
@ -67,10 +74,11 @@ class DeviceApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> deviceDeleteWithHttpInfo(String id,) async {
Future<Response> deviceDeleteWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Device/{id}'
.replaceAll('{id}', id);
final path = r'/api/Device/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -81,7 +89,6 @@ class DeviceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
@ -96,17 +103,24 @@ class DeviceApi {
/// Parameters:
///
/// * [String] id (required):
Future<String?> deviceDelete(String id,) async {
final response = await deviceDeleteWithHttpInfo(id,);
Future<String?> deviceDelete(
String id,
) async {
final response = await deviceDeleteWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
@ -115,7 +129,9 @@ class DeviceApi {
/// Parameters:
///
/// * [String] instanceId:
Future<Response> deviceGetWithHttpInfo({ String? instanceId, }) async {
Future<Response> deviceGetWithHttpInfo({
String? instanceId,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/Device';
@ -132,7 +148,6 @@ class DeviceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -147,20 +162,25 @@ class DeviceApi {
/// Parameters:
///
/// * [String] instanceId:
Future<List<DeviceDTO>?> deviceGet({ String? instanceId, }) async {
final response = await deviceGetWithHttpInfo( instanceId: instanceId, );
Future<List<DeviceDTO>?> deviceGet({
String? instanceId,
}) async {
final response = await deviceGetWithHttpInfo(
instanceId: instanceId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<DeviceDTO>') as List)
.cast<DeviceDTO>()
.toList();
return (await apiClient.deserializeAsync(responseBody, 'List<DeviceDTO>')
as List)
.cast<DeviceDTO>()
.toList(growable: false);
}
return null;
}
@ -169,10 +189,11 @@ class DeviceApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> deviceGetDetailWithHttpInfo(String id,) async {
Future<Response> deviceGetDetailWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Device/{id}/detail'
.replaceAll('{id}', id);
final path = r'/api/Device/{id}/detail'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -183,7 +204,6 @@ class DeviceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -198,17 +218,24 @@ class DeviceApi {
/// Parameters:
///
/// * [String] id (required):
Future<DeviceDetailDTO?> deviceGetDetail(String id,) async {
final response = await deviceGetDetailWithHttpInfo(id,);
Future<DeviceDetailDTO?> deviceGetDetail(
String id,
) async {
final response = await deviceGetDetailWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDetailDTO',) as DeviceDetailDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'DeviceDetailDTO',
) as DeviceDetailDTO;
}
return null;
}
@ -217,7 +244,9 @@ class DeviceApi {
/// Parameters:
///
/// * [DeviceDetailDTO] deviceDetailDTO (required):
Future<Response> deviceUpdateWithHttpInfo(DeviceDetailDTO deviceDetailDTO,) async {
Future<Response> deviceUpdateWithHttpInfo(
DeviceDetailDTO deviceDetailDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Device';
@ -230,7 +259,6 @@ class DeviceApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
@ -245,17 +273,24 @@ class DeviceApi {
/// Parameters:
///
/// * [DeviceDetailDTO] deviceDetailDTO (required):
Future<DeviceDetailDTO?> deviceUpdate(DeviceDetailDTO deviceDetailDTO,) async {
final response = await deviceUpdateWithHttpInfo(deviceDetailDTO,);
Future<DeviceDetailDTO?> deviceUpdate(
DeviceDetailDTO deviceDetailDTO,
) async {
final response = await deviceUpdateWithHttpInfo(
deviceDetailDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDetailDTO',) as DeviceDetailDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'DeviceDetailDTO',
) as DeviceDetailDTO;
}
return null;
}
@ -264,7 +299,9 @@ class DeviceApi {
/// Parameters:
///
/// * [DeviceDTO] deviceDTO (required):
Future<Response> deviceUpdateMainInfosWithHttpInfo(DeviceDTO deviceDTO,) async {
Future<Response> deviceUpdateMainInfosWithHttpInfo(
DeviceDTO deviceDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Device/mainInfos';
@ -277,7 +314,6 @@ class DeviceApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
@ -292,17 +328,24 @@ class DeviceApi {
/// Parameters:
///
/// * [DeviceDTO] deviceDTO (required):
Future<DeviceDTO?> deviceUpdateMainInfos(DeviceDTO deviceDTO,) async {
final response = await deviceUpdateMainInfosWithHttpInfo(deviceDTO,);
Future<DeviceDTO?> deviceUpdateMainInfos(
DeviceDTO deviceDTO,
) async {
final response = await deviceUpdateMainInfosWithHttpInfo(
deviceDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceDTO',) as DeviceDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'DeviceDTO',
) as DeviceDTO;
}
return null;
}

View File

@ -1,7 +1,7 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
@ -10,22 +10,24 @@
part of openapi.api;
class InstanceApi {
InstanceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
InstanceApi([ApiClient? apiClient])
: apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /api/Instance' operation and returns the [Response].
/// Parameters:
///
/// * [Instance] instance (required):
Future<Response> instanceCreateInstanceWithHttpInfo(Instance instance,) async {
/// * [InstanceDTO] instanceDTO (required):
Future<Response> instanceCreateInstanceWithHttpInfo(
InstanceDTO instanceDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Instance';
// ignore: prefer_final_locals
Object? postBody = instance;
Object? postBody = instanceDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
@ -33,7 +35,6 @@ class InstanceApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
@ -47,18 +48,25 @@ class InstanceApi {
/// Parameters:
///
/// * [Instance] instance (required):
Future<InstanceDTO?> instanceCreateInstance(Instance instance,) async {
final response = await instanceCreateInstanceWithHttpInfo(instance,);
/// * [InstanceDTO] instanceDTO (required):
Future<InstanceDTO?> instanceCreateInstance(
InstanceDTO instanceDTO,
) async {
final response = await instanceCreateInstanceWithHttpInfo(
instanceDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'InstanceDTO',
) as InstanceDTO;
}
return null;
}
@ -67,10 +75,11 @@ class InstanceApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> instanceDeleteInstanceWithHttpInfo(String id,) async {
Future<Response> instanceDeleteInstanceWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Instance/{id}'
.replaceAll('{id}', id);
final path = r'/api/Instance/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -81,7 +90,6 @@ class InstanceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
@ -96,17 +104,24 @@ class InstanceApi {
/// Parameters:
///
/// * [String] id (required):
Future<String?> instanceDeleteInstance(String id,) async {
final response = await instanceDeleteInstanceWithHttpInfo(id,);
Future<String?> instanceDeleteInstance(
String id,
) async {
final response = await instanceDeleteInstanceWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
@ -125,7 +140,6 @@ class InstanceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -145,12 +159,13 @@ class InstanceApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<Instance>') as List)
.cast<Instance>()
.toList();
return (await apiClient.deserializeAsync(responseBody, 'List<Instance>')
as List)
.cast<Instance>()
.toList(growable: false);
}
return null;
}
@ -159,10 +174,11 @@ class InstanceApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> instanceGetDetailWithHttpInfo(String id,) async {
Future<Response> instanceGetDetailWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Instance/{id}'
.replaceAll('{id}', id);
final path = r'/api/Instance/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -173,7 +189,6 @@ class InstanceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -188,17 +203,24 @@ class InstanceApi {
/// Parameters:
///
/// * [String] id (required):
Future<InstanceDTO?> instanceGetDetail(String id,) async {
final response = await instanceGetDetailWithHttpInfo(id,);
Future<InstanceDTO?> instanceGetDetail(
String id,
) async {
final response = await instanceGetDetailWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'InstanceDTO',
) as InstanceDTO;
}
return null;
}
@ -206,8 +228,10 @@ class InstanceApi {
/// Performs an HTTP 'GET /api/Instance/byPin' operation and returns the [Response].
/// Parameters:
///
/// * [int] pinCode:
Future<Response> instanceGetInstanceByPinCodeWithHttpInfo({ int? pinCode, }) async {
/// * [String] pinCode:
Future<Response> instanceGetInstanceByPinCodeWithHttpInfo({
String? pinCode,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/Instance/byPin';
@ -224,7 +248,6 @@ class InstanceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -238,18 +261,25 @@ class InstanceApi {
/// Parameters:
///
/// * [int] pinCode:
Future<InstanceDTO?> instanceGetInstanceByPinCode({ int? pinCode, }) async {
final response = await instanceGetInstanceByPinCodeWithHttpInfo( pinCode: pinCode, );
/// * [String] pinCode:
Future<InstanceDTO?> instanceGetInstanceByPinCode({
String? pinCode,
}) async {
final response = await instanceGetInstanceByPinCodeWithHttpInfo(
pinCode: pinCode,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'InstanceDTO',
) as InstanceDTO;
}
return null;
}
@ -257,13 +287,15 @@ class InstanceApi {
/// Performs an HTTP 'PUT /api/Instance' operation and returns the [Response].
/// Parameters:
///
/// * [Instance] instance (required):
Future<Response> instanceUpdateinstanceWithHttpInfo(Instance instance,) async {
/// * [InstanceDTO] instanceDTO (required):
Future<Response> instanceUpdateinstanceWithHttpInfo(
InstanceDTO instanceDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Instance';
// ignore: prefer_final_locals
Object? postBody = instance;
Object? postBody = instanceDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
@ -271,7 +303,6 @@ class InstanceApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
@ -285,18 +316,25 @@ class InstanceApi {
/// Parameters:
///
/// * [Instance] instance (required):
Future<InstanceDTO?> instanceUpdateinstance(Instance instance,) async {
final response = await instanceUpdateinstanceWithHttpInfo(instance,);
/// * [InstanceDTO] instanceDTO (required):
Future<InstanceDTO?> instanceUpdateinstance(
InstanceDTO instanceDTO,
) async {
final response = await instanceUpdateinstanceWithHttpInfo(
instanceDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'InstanceDTO',
) as InstanceDTO;
}
return null;
}

View File

@ -1,7 +1,7 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
@ -10,9 +10,9 @@
part of openapi.api;
class ResourceApi {
ResourceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
ResourceApi([ApiClient? apiClient])
: apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
@ -20,7 +20,9 @@ class ResourceApi {
/// Parameters:
///
/// * [ResourceDTO] resourceDTO (required):
Future<Response> resourceCreateWithHttpInfo(ResourceDTO resourceDTO,) async {
Future<Response> resourceCreateWithHttpInfo(
ResourceDTO resourceDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Resource';
@ -33,7 +35,6 @@ class ResourceApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
@ -48,17 +49,24 @@ class ResourceApi {
/// Parameters:
///
/// * [ResourceDTO] resourceDTO (required):
Future<ResourceDTO?> resourceCreate(ResourceDTO resourceDTO,) async {
final response = await resourceCreateWithHttpInfo(resourceDTO,);
Future<ResourceDTO?> resourceCreate(
ResourceDTO resourceDTO,
) async {
final response = await resourceCreateWithHttpInfo(
resourceDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ResourceDTO',) as ResourceDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'ResourceDTO',
) as ResourceDTO;
}
return null;
}
@ -67,10 +75,11 @@ class ResourceApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> resourceDeleteWithHttpInfo(String id,) async {
Future<Response> resourceDeleteWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Resource/{id}'
.replaceAll('{id}', id);
final path = r'/api/Resource/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -81,7 +90,6 @@ class ResourceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
@ -96,17 +104,24 @@ class ResourceApi {
/// Parameters:
///
/// * [String] id (required):
Future<String?> resourceDelete(String id,) async {
final response = await resourceDeleteWithHttpInfo(id,);
Future<String?> resourceDelete(
String id,
) async {
final response = await resourceDeleteWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
@ -117,7 +132,10 @@ class ResourceApi {
/// * [String] instanceId:
///
/// * [List<ResourceType>] types:
Future<Response> resourceGetWithHttpInfo({ String? instanceId, List<ResourceType>? types, }) async {
Future<Response> resourceGetWithHttpInfo({
String? instanceId,
List<ResourceType>? types,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/Resource';
@ -137,7 +155,6 @@ class ResourceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -154,20 +171,27 @@ class ResourceApi {
/// * [String] instanceId:
///
/// * [List<ResourceType>] types:
Future<List<ResourceDTO>?> resourceGet({ String? instanceId, List<ResourceType>? types, }) async {
final response = await resourceGetWithHttpInfo( instanceId: instanceId, types: types, );
Future<List<ResourceDTO>?> resourceGet({
String? instanceId,
List<ResourceType>? types,
}) async {
final response = await resourceGetWithHttpInfo(
instanceId: instanceId,
types: types,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<ResourceDTO>') as List)
.cast<ResourceDTO>()
.toList();
return (await apiClient.deserializeAsync(
responseBody, 'List<ResourceDTO>') as List)
.cast<ResourceDTO>()
.toList(growable: false);
}
return null;
}
@ -176,10 +200,11 @@ class ResourceApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> resourceGetDetailWithHttpInfo(String id,) async {
Future<Response> resourceGetDetailWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Resource/{id}/detail'
.replaceAll('{id}', id);
final path = r'/api/Resource/{id}/detail'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -190,7 +215,6 @@ class ResourceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -205,17 +229,24 @@ class ResourceApi {
/// Parameters:
///
/// * [String] id (required):
Future<ResourceDTO?> resourceGetDetail(String id,) async {
final response = await resourceGetDetailWithHttpInfo(id,);
Future<ResourceDTO?> resourceGetDetail(
String id,
) async {
final response = await resourceGetDetailWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ResourceDTO',) as ResourceDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'ResourceDTO',
) as ResourceDTO;
}
return null;
}
@ -224,10 +255,11 @@ class ResourceApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> resourceShowWithHttpInfo(String id,) async {
Future<Response> resourceShowWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Resource/{id}'
.replaceAll('{id}', id);
final path = r'/api/Resource/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -238,7 +270,6 @@ class ResourceApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -253,17 +284,24 @@ class ResourceApi {
/// Parameters:
///
/// * [String] id (required):
Future<MultipartFile?> resourceShow(String id,) async {
final response = await resourceShowWithHttpInfo(id,);
Future<MultipartFile?> resourceShow(
String id,
) async {
final response = await resourceShowWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'MultipartFile',
) as MultipartFile;
}
return null;
}
@ -272,7 +310,9 @@ class ResourceApi {
/// Parameters:
///
/// * [ResourceDTO] resourceDTO (required):
Future<Response> resourceUpdateWithHttpInfo(ResourceDTO resourceDTO,) async {
Future<Response> resourceUpdateWithHttpInfo(
ResourceDTO resourceDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Resource';
@ -285,7 +325,6 @@ class ResourceApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
@ -300,17 +339,24 @@ class ResourceApi {
/// Parameters:
///
/// * [ResourceDTO] resourceDTO (required):
Future<ResourceDTO?> resourceUpdate(ResourceDTO resourceDTO,) async {
final response = await resourceUpdateWithHttpInfo(resourceDTO,);
Future<ResourceDTO?> resourceUpdate(
ResourceDTO resourceDTO,
) async {
final response = await resourceUpdateWithHttpInfo(
resourceDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ResourceDTO',) as ResourceDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'ResourceDTO',
) as ResourceDTO;
}
return null;
}
@ -323,7 +369,11 @@ class ResourceApi {
/// * [String] type:
///
/// * [String] instanceId:
Future<Response> resourceUploadWithHttpInfo({ String? label, String? type, String? instanceId, }) async {
Future<Response> resourceUploadWithHttpInfo({
String? label,
String? type,
String? instanceId,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/Resource/upload';
@ -372,17 +422,28 @@ class ResourceApi {
/// * [String] type:
///
/// * [String] instanceId:
Future<String?> resourceUpload({ String? label, String? type, String? instanceId, }) async {
final response = await resourceUploadWithHttpInfo( label: label, type: type, instanceId: instanceId, );
Future<String?> resourceUpload({
String? label,
String? type,
String? instanceId,
}) async {
final response = await resourceUploadWithHttpInfo(
label: label,
type: type,
instanceId: instanceId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}

View File

@ -1,7 +1,7 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
@ -10,9 +10,9 @@
part of openapi.api;
class SectionApi {
SectionApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
SectionApi([ApiClient? apiClient])
: apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
@ -20,7 +20,9 @@ class SectionApi {
/// Parameters:
///
/// * [SectionDTO] sectionDTO (required):
Future<Response> sectionCreateWithHttpInfo(SectionDTO sectionDTO,) async {
Future<Response> sectionCreateWithHttpInfo(
SectionDTO sectionDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section';
@ -33,7 +35,6 @@ class SectionApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
@ -48,17 +49,24 @@ class SectionApi {
/// Parameters:
///
/// * [SectionDTO] sectionDTO (required):
Future<SectionDTO?> sectionCreate(SectionDTO sectionDTO,) async {
final response = await sectionCreateWithHttpInfo(sectionDTO,);
Future<SectionDTO?> sectionCreate(
SectionDTO sectionDTO,
) async {
final response = await sectionCreateWithHttpInfo(
sectionDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SectionDTO',) as SectionDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'SectionDTO',
) as SectionDTO;
}
return null;
}
@ -67,10 +75,11 @@ class SectionApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> sectionDeleteWithHttpInfo(String id,) async {
Future<Response> sectionDeleteWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/{id}'
.replaceAll('{id}', id);
final path = r'/api/Section/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -81,7 +90,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
@ -96,17 +104,24 @@ class SectionApi {
/// Parameters:
///
/// * [String] id (required):
Future<String?> sectionDelete(String id,) async {
final response = await sectionDeleteWithHttpInfo(id,);
Future<String?> sectionDelete(
String id,
) async {
final response = await sectionDeleteWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
@ -115,10 +130,11 @@ class SectionApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> sectionDeleteAllForConfigurationWithHttpInfo(String id,) async {
Future<Response> sectionDeleteAllForConfigurationWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/configuration/{id}'
.replaceAll('{id}', id);
final path = r'/api/Section/configuration/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -129,7 +145,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
@ -144,17 +159,24 @@ class SectionApi {
/// Parameters:
///
/// * [String] id (required):
Future<String?> sectionDeleteAllForConfiguration(String id,) async {
final response = await sectionDeleteAllForConfigurationWithHttpInfo(id,);
Future<String?> sectionDeleteAllForConfiguration(
String id,
) async {
final response = await sectionDeleteAllForConfigurationWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
@ -163,7 +185,9 @@ class SectionApi {
/// Parameters:
///
/// * [String] instanceId:
Future<Response> sectionGetWithHttpInfo({ String? instanceId, }) async {
Future<Response> sectionGetWithHttpInfo({
String? instanceId,
}) async {
// ignore: prefer_const_declarations
final path = r'/api/Section';
@ -180,7 +204,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -195,20 +218,25 @@ class SectionApi {
/// Parameters:
///
/// * [String] instanceId:
Future<List<SectionDTO>?> sectionGet({ String? instanceId, }) async {
final response = await sectionGetWithHttpInfo( instanceId: instanceId, );
Future<List<SectionDTO>?> sectionGet({
String? instanceId,
}) async {
final response = await sectionGetWithHttpInfo(
instanceId: instanceId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<SectionDTO>') as List)
.cast<SectionDTO>()
.toList();
return (await apiClient.deserializeAsync(responseBody, 'List<SectionDTO>')
as List)
.cast<SectionDTO>()
.toList(growable: false);
}
return null;
}
@ -227,7 +255,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -247,9 +274,12 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AgendaDTO',) as AgendaDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'AgendaDTO',
) as AgendaDTO;
}
return null;
}
@ -258,10 +288,12 @@ class SectionApi {
/// Parameters:
///
/// * [String] instanceId (required):
Future<Response> sectionGetAllBeaconsForInstanceWithHttpInfo(String instanceId,) async {
Future<Response> sectionGetAllBeaconsForInstanceWithHttpInfo(
String instanceId,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/beacons/{instanceId}'
.replaceAll('{instanceId}', instanceId);
.replaceAll('{instanceId}', instanceId);
// ignore: prefer_final_locals
Object? postBody;
@ -272,7 +304,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -287,20 +318,25 @@ class SectionApi {
/// Parameters:
///
/// * [String] instanceId (required):
Future<List<SectionDTO>?> sectionGetAllBeaconsForInstance(String instanceId,) async {
final response = await sectionGetAllBeaconsForInstanceWithHttpInfo(instanceId,);
Future<List<SectionDTO>?> sectionGetAllBeaconsForInstance(
String instanceId,
) async {
final response = await sectionGetAllBeaconsForInstanceWithHttpInfo(
instanceId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<SectionDTO>') as List)
.cast<SectionDTO>()
.toList();
return (await apiClient.deserializeAsync(responseBody, 'List<SectionDTO>')
as List)
.cast<SectionDTO>()
.toList(growable: false);
}
return null;
}
@ -309,10 +345,11 @@ class SectionApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> sectionGetAllSectionSubSectionsWithHttpInfo(String id,) async {
Future<Response> sectionGetAllSectionSubSectionsWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/{id}/subsections'
.replaceAll('{id}', id);
final path = r'/api/Section/{id}/subsections'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -323,7 +360,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -338,20 +374,25 @@ class SectionApi {
/// Parameters:
///
/// * [String] id (required):
Future<List<Object>?> sectionGetAllSectionSubSections(String id,) async {
final response = await sectionGetAllSectionSubSectionsWithHttpInfo(id,);
Future<List<Object>?> sectionGetAllSectionSubSections(
String id,
) async {
final response = await sectionGetAllSectionSubSectionsWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<Object>') as List)
.cast<Object>()
.toList();
return (await apiClient.deserializeAsync(responseBody, 'List<Object>')
as List)
.cast<Object>()
.toList(growable: false);
}
return null;
}
@ -370,7 +411,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -390,9 +430,12 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ArticleDTO',) as ArticleDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'ArticleDTO',
) as ArticleDTO;
}
return null;
}
@ -401,10 +444,11 @@ class SectionApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> sectionGetDetailWithHttpInfo(String id,) async {
Future<Response> sectionGetDetailWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/{id}'
.replaceAll('{id}', id);
final path = r'/api/Section/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -415,7 +459,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -430,17 +473,27 @@ class SectionApi {
/// Parameters:
///
/// * [String] id (required):
Future<SectionDTO?> sectionGetDetail(String id,) async {
final response = await sectionGetDetailWithHttpInfo(id,);
Future<Object?> sectionGetDetail(
String id,
) async {
final response = await sectionGetDetailWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SectionDTO',) as SectionDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
/*return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'Object',
) as Object;*/
final decoded = json.decode(await _decodeBodyBytes(response));
return decoded; // <- Ce sera un Map<String, dynamic> ou une List<dynamic> selon le JSON
}
return null;
}
@ -449,10 +502,11 @@ class SectionApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> sectionGetFromConfigurationWithHttpInfo(String id,) async {
Future<Response> sectionGetFromConfigurationWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/configuration/{id}'
.replaceAll('{id}', id);
final path = r'/api/Section/configuration/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -463,7 +517,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -478,20 +531,25 @@ class SectionApi {
/// Parameters:
///
/// * [String] id (required):
Future<List<SectionDTO>?> sectionGetFromConfiguration(String id,) async {
final response = await sectionGetFromConfigurationWithHttpInfo(id,);
Future<List<SectionDTO>?> sectionGetFromConfiguration(
String id,
) async {
final response = await sectionGetFromConfigurationWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<SectionDTO>') as List)
.cast<SectionDTO>()
.toList();
return (await apiClient.deserializeAsync(responseBody, 'List<SectionDTO>')
as List)
.cast<SectionDTO>()
.toList(growable: false);
}
return null;
}
@ -510,7 +568,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -530,9 +587,12 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MapDTO',) as MapDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'MapDTO',
) as MapDTO;
}
return null;
}
@ -551,7 +611,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -571,9 +630,12 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MenuDTO',) as MenuDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'MenuDTO',
) as MenuDTO;
}
return null;
}
@ -592,7 +654,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -612,9 +673,12 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PdfDTO',) as PdfDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'PdfDTO',
) as PdfDTO;
}
return null;
}
@ -633,7 +697,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -653,17 +716,20 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PuzzleDTO',) as PuzzleDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'PuzzleDTO',
) as PuzzleDTO;
}
return null;
}
/// Performs an HTTP 'GET /api/Section/QuizzDTO' operation and returns the [Response].
Future<Response> sectionGetQuizzDTOWithHttpInfo() async {
/// Performs an HTTP 'GET /api/Section/QuizDTO' operation and returns the [Response].
Future<Response> sectionGetQuizDTOWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Section/QuizzDTO';
final path = r'/api/Section/QuizDTO';
// ignore: prefer_final_locals
Object? postBody;
@ -674,7 +740,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -686,17 +751,20 @@ class SectionApi {
);
}
Future<QuizzDTO?> sectionGetQuizzDTO() async {
final response = await sectionGetQuizzDTOWithHttpInfo();
Future<QuizDTO?> sectionGetQuizDTO() async {
final response = await sectionGetQuizDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QuizzDTO',) as QuizzDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'QuizDTO',
) as QuizDTO;
}
return null;
}
@ -715,7 +783,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -735,9 +802,12 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SliderDTO',) as SliderDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'SliderDTO',
) as SliderDTO;
}
return null;
}
@ -756,7 +826,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -776,9 +845,12 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VideoDTO',) as VideoDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'VideoDTO',
) as VideoDTO;
}
return null;
}
@ -797,7 +869,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -817,9 +888,12 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WeatherDTO',) as WeatherDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'WeatherDTO',
) as WeatherDTO;
}
return null;
}
@ -838,7 +912,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -858,9 +931,12 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WebDTO',) as WebDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'WebDTO',
) as WebDTO;
}
return null;
}
@ -879,7 +955,6 @@ class SectionApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -899,9 +974,12 @@ class SectionApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PlayerMessageDTO',) as PlayerMessageDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'PlayerMessageDTO',
) as PlayerMessageDTO;
}
return null;
}
@ -909,13 +987,15 @@ class SectionApi {
/// Performs an HTTP 'PUT /api/Section' operation and returns the [Response].
/// Parameters:
///
/// * [SectionDTO] sectionDTO (required):
Future<Response> sectionUpdateWithHttpInfo(SectionDTO sectionDTO,) async {
/// * [Object] body (required):
Future<Response> sectionUpdateWithHttpInfo(
Object body,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section';
// ignore: prefer_final_locals
Object? postBody = sectionDTO;
Object? postBody = body;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
@ -923,7 +1003,6 @@ class SectionApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
@ -937,18 +1016,25 @@ class SectionApi {
/// Parameters:
///
/// * [SectionDTO] sectionDTO (required):
Future<SectionDTO?> sectionUpdate(SectionDTO sectionDTO,) async {
final response = await sectionUpdateWithHttpInfo(sectionDTO,);
/// * [Object] body (required):
Future<SectionDTO?> sectionUpdate(
Object body,
) async {
final response = await sectionUpdateWithHttpInfo(
body,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SectionDTO',) as SectionDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'SectionDTO',
) as SectionDTO;
}
return null;
}
@ -957,7 +1043,9 @@ class SectionApi {
/// Parameters:
///
/// * [List<SectionDTO>] sectionDTO (required):
Future<Response> sectionUpdateOrderWithHttpInfo(List<SectionDTO> sectionDTO,) async {
Future<Response> sectionUpdateOrderWithHttpInfo(
List<SectionDTO> sectionDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/Section/order';
@ -970,7 +1058,6 @@ class SectionApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
@ -985,17 +1072,24 @@ class SectionApi {
/// Parameters:
///
/// * [List<SectionDTO>] sectionDTO (required):
Future<String?> sectionUpdateOrder(List<SectionDTO> sectionDTO,) async {
final response = await sectionUpdateOrderWithHttpInfo(sectionDTO,);
Future<String?> sectionUpdateOrder(
List<SectionDTO> sectionDTO,
) async {
final response = await sectionUpdateOrderWithHttpInfo(
sectionDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}

View File

@ -0,0 +1,249 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SectionMapApi {
SectionMapApi([ApiClient? apiClient])
: apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /api/SectionMap/{sectionId}/points' operation and returns the [Response].
/// Parameters:
///
/// * [String] sectionId (required):
///
/// * [GeoPointDTO] geoPointDTO (required):
Future<Response> sectionMapCreateWithHttpInfo(
String sectionId,
GeoPointDTO geoPointDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionMap/{sectionId}/points'
.replaceAll('{sectionId}', sectionId);
// ignore: prefer_final_locals
Object? postBody = geoPointDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] sectionId (required):
///
/// * [GeoPointDTO] geoPointDTO (required):
Future<GeoPoint?> sectionMapCreate(
String sectionId,
GeoPointDTO geoPointDTO,
) async {
final response = await sectionMapCreateWithHttpInfo(
sectionId,
geoPointDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'GeoPoint',
) as GeoPoint;
}
return null;
}
/// Performs an HTTP 'DELETE /api/SectionMap/points/delete/{geoPointId}' operation and returns the [Response].
/// Parameters:
///
/// * [int] geoPointId (required):
Future<Response> sectionMapDeleteWithHttpInfo(
int geoPointId,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionMap/points/delete/{geoPointId}'
.replaceAll('{geoPointId}', geoPointId.toString());
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [int] geoPointId (required):
Future<String?> sectionMapDelete(
int geoPointId,
) async {
final response = await sectionMapDeleteWithHttpInfo(
geoPointId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
/// Performs an HTTP 'GET /api/SectionMap/{sectionId}/points' operation and returns the [Response].
/// Parameters:
///
/// * [String] sectionId (required):
Future<Response> sectionMapGetAllGeoPointsFromSectionWithHttpInfo(
String sectionId,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionMap/{sectionId}/points'
.replaceAll('{sectionId}', sectionId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] sectionId (required):
Future<List<GeoPointDTO>?> sectionMapGetAllGeoPointsFromSection(
String sectionId,
) async {
final response = await sectionMapGetAllGeoPointsFromSectionWithHttpInfo(
sectionId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(
responseBody, 'List<GeoPointDTO>') as List)
.cast<GeoPointDTO>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'PUT /api/SectionMap' operation and returns the [Response].
/// Parameters:
///
/// * [GeoPointDTO] geoPointDTO (required):
Future<Response> sectionMapUpdateWithHttpInfo(
GeoPointDTO geoPointDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionMap';
// ignore: prefer_final_locals
Object? postBody = geoPointDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [GeoPointDTO] geoPointDTO (required):
Future<GeoPoint?> sectionMapUpdate(
GeoPointDTO geoPointDTO,
) async {
final response = await sectionMapUpdateWithHttpInfo(
geoPointDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'GeoPoint',
) as GeoPoint;
}
return null;
}
}

View File

@ -0,0 +1,249 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SectionQuizApi {
SectionQuizApi([ApiClient? apiClient])
: apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /api/SectionQuiz/{sectionId}/questions' operation and returns the [Response].
/// Parameters:
///
/// * [String] sectionId (required):
///
/// * [QuestionDTO] questionDTO (required):
Future<Response> sectionQuizCreateWithHttpInfo(
String sectionId,
QuestionDTO questionDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionQuiz/{sectionId}/questions'
.replaceAll('{sectionId}', sectionId);
// ignore: prefer_final_locals
Object? postBody = questionDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] sectionId (required):
///
/// * [QuestionDTO] questionDTO (required):
Future<QuizQuestion?> sectionQuizCreate(
String sectionId,
QuestionDTO questionDTO,
) async {
final response = await sectionQuizCreateWithHttpInfo(
sectionId,
questionDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'QuizQuestion',
) as QuizQuestion;
}
return null;
}
/// Performs an HTTP 'DELETE /api/SectionQuiz/questions/delete/{quizQuestionId}' operation and returns the [Response].
/// Parameters:
///
/// * [int] quizQuestionId (required):
Future<Response> sectionQuizDeleteWithHttpInfo(
int quizQuestionId,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionQuiz/questions/delete/{quizQuestionId}'
.replaceAll('{quizQuestionId}', quizQuestionId.toString());
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [int] quizQuestionId (required):
Future<String?> sectionQuizDelete(
int quizQuestionId,
) async {
final response = await sectionQuizDeleteWithHttpInfo(
quizQuestionId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
/// Performs an HTTP 'GET /api/SectionQuiz/{sectionId}/questions' operation and returns the [Response].
/// Parameters:
///
/// * [String] sectionId (required):
Future<Response> sectionQuizGetAllQuizQuestionFromSectionWithHttpInfo(
String sectionId,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionQuiz/{sectionId}/questions'
.replaceAll('{sectionId}', sectionId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] sectionId (required):
Future<List<QuestionDTO>?> sectionQuizGetAllQuizQuestionFromSection(
String sectionId,
) async {
final response = await sectionQuizGetAllQuizQuestionFromSectionWithHttpInfo(
sectionId,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(
responseBody, 'List<QuestionDTO>') as List)
.cast<QuestionDTO>()
.toList(growable: false);
}
return null;
}
/// Performs an HTTP 'PUT /api/SectionQuiz' operation and returns the [Response].
/// Parameters:
///
/// * [QuestionDTO] questionDTO (required):
Future<Response> sectionQuizUpdateWithHttpInfo(
QuestionDTO questionDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/SectionQuiz';
// ignore: prefer_final_locals
Object? postBody = questionDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [QuestionDTO] questionDTO (required):
Future<QuizQuestion?> sectionQuizUpdate(
QuestionDTO questionDTO,
) async {
final response = await sectionQuizUpdateWithHttpInfo(
questionDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'QuizQuestion',
) as QuizQuestion;
}
return null;
}
}

View File

@ -1,7 +1,7 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
@ -10,7 +10,6 @@
part of openapi.api;
class UserApi {
UserApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
@ -19,13 +18,15 @@ class UserApi {
/// Performs an HTTP 'POST /api/User' operation and returns the [Response].
/// Parameters:
///
/// * [User] user (required):
Future<Response> userCreateUserWithHttpInfo(User user,) async {
/// * [UserDetailDTO] userDetailDTO (required):
Future<Response> userCreateUserWithHttpInfo(
UserDetailDTO userDetailDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/User';
// ignore: prefer_final_locals
Object? postBody = user;
Object? postBody = userDetailDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
@ -33,7 +34,6 @@ class UserApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
@ -47,18 +47,25 @@ class UserApi {
/// Parameters:
///
/// * [User] user (required):
Future<UserDetailDTO?> userCreateUser(User user,) async {
final response = await userCreateUserWithHttpInfo(user,);
/// * [UserDetailDTO] userDetailDTO (required):
Future<UserDetailDTO?> userCreateUser(
UserDetailDTO userDetailDTO,
) async {
final response = await userCreateUserWithHttpInfo(
userDetailDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserDetailDTO',) as UserDetailDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'UserDetailDTO',
) as UserDetailDTO;
}
return null;
}
@ -67,10 +74,11 @@ class UserApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> userDeleteUserWithHttpInfo(String id,) async {
Future<Response> userDeleteUserWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/User/{id}'
.replaceAll('{id}', id);
final path = r'/api/User/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -81,7 +89,6 @@ class UserApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
@ -96,17 +103,24 @@ class UserApi {
/// Parameters:
///
/// * [String] id (required):
Future<String?> userDeleteUser(String id,) async {
final response = await userDeleteUserWithHttpInfo(id,);
Future<String?> userDeleteUser(
String id,
) async {
final response = await userDeleteUserWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'String',
) as String;
}
return null;
}
@ -125,7 +139,6 @@ class UserApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -145,12 +158,13 @@ class UserApi {
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<User>') as List)
.cast<User>()
.toList();
return (await apiClient.deserializeAsync(responseBody, 'List<User>')
as List)
.cast<User>()
.toList(growable: false);
}
return null;
}
@ -159,10 +173,11 @@ class UserApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> userGetDetailWithHttpInfo(String id,) async {
Future<Response> userGetDetailWithHttpInfo(
String id,
) async {
// ignore: prefer_const_declarations
final path = r'/api/User/{id}'
.replaceAll('{id}', id);
final path = r'/api/User/{id}'.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
@ -173,7 +188,6 @@ class UserApi {
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
@ -188,17 +202,24 @@ class UserApi {
/// Parameters:
///
/// * [String] id (required):
Future<UserDetailDTO?> userGetDetail(String id,) async {
final response = await userGetDetailWithHttpInfo(id,);
Future<UserDetailDTO?> userGetDetail(
String id,
) async {
final response = await userGetDetailWithHttpInfo(
id,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserDetailDTO',) as UserDetailDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'UserDetailDTO',
) as UserDetailDTO;
}
return null;
}
@ -206,13 +227,15 @@ class UserApi {
/// Performs an HTTP 'PUT /api/User' operation and returns the [Response].
/// Parameters:
///
/// * [User] user (required):
Future<Response> userUpdateUserWithHttpInfo(User user,) async {
/// * [UserDetailDTO] userDetailDTO (required):
Future<Response> userUpdateUserWithHttpInfo(
UserDetailDTO userDetailDTO,
) async {
// ignore: prefer_const_declarations
final path = r'/api/User';
// ignore: prefer_final_locals
Object? postBody = user;
Object? postBody = userDetailDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
@ -220,7 +243,6 @@ class UserApi {
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
@ -234,18 +256,25 @@ class UserApi {
/// Parameters:
///
/// * [User] user (required):
Future<UserDetailDTO?> userUpdateUser(User user,) async {
final response = await userUpdateUserWithHttpInfo(user,);
/// * [UserDetailDTO] userDetailDTO (required):
Future<UserDetailDTO?> userUpdateUser(
UserDetailDTO userDetailDTO,
) async {
final response = await userUpdateUserWithHttpInfo(
userDetailDTO,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserDetailDTO',) as UserDetailDTO;
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'UserDetailDTO',
) as UserDetailDTO;
}
return null;
}

View File

@ -1,7 +1,7 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
@ -11,7 +11,10 @@
part of openapi.api;
class ApiClient {
ApiClient({this.basePath = 'https://api.myinfomate.be', this.authentication,});
ApiClient({
this.basePath = 'https://localhost:5001',
this.authentication,
});
final String basePath;
final Authentication? authentication;
@ -32,7 +35,7 @@ class ApiClient {
Map<String, String> get defaultHeaderMap => _defaultHeaderMap;
void addDefaultHeader(String key, String value) {
_defaultHeaderMap[key] = value;
_defaultHeaderMap[key] = value;
}
// We don't use a Map<String, String> for queryParams.
@ -54,25 +57,26 @@ class ApiClient {
}
final urlEncodedQueryParams = queryParams.map((param) => '$param');
final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : '';
final queryString = urlEncodedQueryParams.isNotEmpty
? '?${urlEncodedQueryParams.join('&')}'
: '';
final uri = Uri.parse('$basePath$path$queryString');
try {
// Special case for uploading a single file which isn't a 'multipart/form-data'.
if (
body is MultipartFile && (contentType == null ||
!contentType.toLowerCase().startsWith('multipart/form-data'))
) {
if (body is MultipartFile &&
(contentType == null ||
!contentType.toLowerCase().startsWith('multipart/form-data'))) {
final request = StreamedRequest(method, uri);
request.headers.addAll(headerParams);
request.contentLength = body.length;
body.finalize().listen(
request.sink.add,
onDone: request.sink.close,
// ignore: avoid_types_on_closure_parameters
onError: (Object error, StackTrace trace) => request.sink.close(),
cancelOnError: true,
);
request.sink.add,
onDone: request.sink.close,
// ignore: avoid_types_on_closure_parameters
onError: (Object error, StackTrace trace) => request.sink.close(),
cancelOnError: true,
);
final response = await _client.send(request);
return Response.fromStream(response);
}
@ -88,17 +92,45 @@ class ApiClient {
}
final msgBody = contentType == 'application/x-www-form-urlencoded'
? formParams
: await serializeAsync(body);
? formParams
: await serializeAsync(body);
final nullableHeaderParams = headerParams.isEmpty ? null : headerParams;
switch(method) {
case 'POST': return await _client.post(uri, headers: nullableHeaderParams, body: msgBody,);
case 'PUT': return await _client.put(uri, headers: nullableHeaderParams, body: msgBody,);
case 'DELETE': return await _client.delete(uri, headers: nullableHeaderParams, body: msgBody,);
case 'PATCH': return await _client.patch(uri, headers: nullableHeaderParams, body: msgBody,);
case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,);
case 'GET': return await _client.get(uri, headers: nullableHeaderParams,);
switch (method) {
case 'POST':
return await _client.post(
uri,
headers: nullableHeaderParams,
body: msgBody,
);
case 'PUT':
return await _client.put(
uri,
headers: nullableHeaderParams,
body: msgBody,
);
case 'DELETE':
return await _client.delete(
uri,
headers: nullableHeaderParams,
body: msgBody,
);
case 'PATCH':
return await _client.patch(
uri,
headers: nullableHeaderParams,
body: msgBody,
);
case 'HEAD':
return await _client.head(
uri,
headers: nullableHeaderParams,
);
case 'GET':
return await _client.get(
uri,
headers: nullableHeaderParams,
);
}
} on SocketException catch (error, trace) {
throw ApiException.withInner(
@ -143,28 +175,44 @@ class ApiClient {
);
}
Future<dynamic> deserializeAsync(String json, String targetType, {bool growable = false,}) async =>
// ignore: deprecated_member_use_from_same_package
deserialize(json, targetType, growable: growable);
Future<dynamic> deserializeAsync(
String value,
String targetType, {
bool growable = false,
}) async =>
// ignore: deprecated_member_use_from_same_package
deserialize(value, targetType, growable: growable);
@Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
dynamic deserialize(String json, String targetType, {bool growable = false,}) {
@Deprecated(
'Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
dynamic deserialize(
String value,
String targetType, {
bool growable = false,
}) {
// Remove all spaces. Necessary for regular expressions as well.
targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments
targetType =
targetType.replaceAll(' ', ''); // ignore: parameter_assignments
// If the expected target type is String, nothing to do...
return targetType == 'String'
? json
: _deserialize(jsonDecode(json), targetType, growable: growable);
? value
: fromJson(json.decode(value), targetType, growable: growable);
}
// ignore: deprecated_member_use_from_same_package
Future<String> serializeAsync(Object? value) async => serialize(value);
@Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.')
@Deprecated(
'Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.')
String serialize(Object? value) => value == null ? '' : json.encode(value);
static dynamic _deserialize(dynamic value, String targetType, {bool growable = false}) {
/// Returns a native instance of an OpenAPI class matching the [specified type][targetType].
static dynamic fromJson(
dynamic value,
String targetType, {
bool growable = false,
}) {
try {
switch (targetType) {
case 'String':
@ -183,6 +231,8 @@ class ApiClient {
return value is DateTime ? value : DateTime.tryParse(value);
case 'AgendaDTO':
return AgendaDTO.fromJson(value);
case 'AgendaDTOAllOfAgendaMapProvider':
return AgendaDTOAllOfAgendaMapProvider.fromJson(value);
case 'ArticleDTO':
return ArticleDTO.fromJson(value);
case 'CategorieDTO':
@ -191,38 +241,32 @@ class ApiClient {
return ConfigurationDTO.fromJson(value);
case 'ContentDTO':
return ContentDTO.fromJson(value);
case 'ContentGeoPoint':
return ContentGeoPoint.fromJson(value);
case 'ContentDTOResource':
return ContentDTOResource.fromJson(value);
case 'DeviceDTO':
return DeviceDTO.fromJson(value);
case 'DeviceDetailDTO':
return DeviceDetailDTO.fromJson(value);
case 'DeviceDetailDTOAllOf':
return DeviceDetailDTOAllOf.fromJson(value);
case 'ExportConfigurationDTO':
return ExportConfigurationDTO.fromJson(value);
case 'ExportConfigurationDTOAllOf':
return ExportConfigurationDTOAllOf.fromJson(value);
case 'GeoPoint':
return GeoPoint.fromJson(value);
case 'GeoPointDTO':
return GeoPointDTO.fromJson(value);
case 'GeoPointDTOCategorie':
return GeoPointDTOCategorie.fromJson(value);
case 'Instance':
return Instance.fromJson(value);
case 'InstanceDTO':
return InstanceDTO.fromJson(value);
case 'LevelDTO':
return LevelDTO.fromJson(value);
case 'LoginDTO':
return LoginDTO.fromJson(value);
case 'MapDTO':
return MapDTO.fromJson(value);
case 'MapDTOMapProvider':
return MapDTOMapProvider.fromJson(value);
case 'MapDTOMapType':
return MapDTOMapType.fromJson(value);
case 'MapDTOMapTypeMapbox':
return MapDTOMapTypeMapbox.fromJson(value);
case 'MapDTOAllOfMapProvider':
return MapDTOAllOfMapProvider.fromJson(value);
case 'MapDTOAllOfMapType':
return MapDTOAllOfMapType.fromJson(value);
case 'MapDTOAllOfMapTypeMapbox':
return MapDTOAllOfMapTypeMapbox.fromJson(value);
case 'MapProvider':
return MapProviderTypeTransformer().decode(value);
case 'MapTypeApp':
@ -231,22 +275,28 @@ class ApiClient {
return MapTypeMapBoxTypeTransformer().decode(value);
case 'MenuDTO':
return MenuDTO.fromJson(value);
case 'PDFFileDTO':
return PDFFileDTO.fromJson(value);
case 'OrderedTranslationAndResourceDTO':
return OrderedTranslationAndResourceDTO.fromJson(value);
case 'PdfDTO':
return PdfDTO.fromJson(value);
case 'PlayerMessageDTO':
return PlayerMessageDTO.fromJson(value);
case 'PuzzleDTO':
return PuzzleDTO.fromJson(value);
case 'PuzzleDTOImage':
return PuzzleDTOImage.fromJson(value);
case 'PuzzleDTOAllOfPuzzleImage':
return PuzzleDTOAllOfPuzzleImage.fromJson(value);
case 'QuestionDTO':
return QuestionDTO.fromJson(value);
case 'QuizzDTO':
return QuizzDTO.fromJson(value);
case 'QuizzDTOBadLevel':
return QuizzDTOBadLevel.fromJson(value);
case 'QuestionDTOImageBackgroundResourceType':
return QuestionDTOImageBackgroundResourceType.fromJson(value);
case 'QuizDTO':
return QuizDTO.fromJson(value);
case 'QuizQuestion':
return QuizQuestion.fromJson(value);
case 'QuizQuestionResource':
return QuizQuestionResource.fromJson(value);
case 'Resource':
return Resource.fromJson(value);
case 'ResourceDTO':
return ResourceDTO.fromJson(value);
case 'ResourceType':
@ -277,27 +327,50 @@ class ApiClient {
return WebDTO.fromJson(value);
default:
dynamic match;
if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) {
if (value is List &&
(match = _regList.firstMatch(targetType)?.group(1)) != null) {
return value
.map<dynamic>((dynamic v) => _deserialize(v, match, growable: growable,))
.toList(growable: growable);
.map<dynamic>((dynamic v) => fromJson(
v,
match,
growable: growable,
))
.toList(growable: growable);
}
if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) {
if (value is Set &&
(match = _regSet.firstMatch(targetType)?.group(1)) != null) {
return value
.map<dynamic>((dynamic v) => _deserialize(v, match, growable: growable,))
.toSet();
.map<dynamic>((dynamic v) => fromJson(
v,
match,
growable: growable,
))
.toSet();
}
if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) {
if (value is Map &&
(match = _regMap.firstMatch(targetType)?.group(1)) != null) {
return Map<String, dynamic>.fromIterables(
value.keys.cast<String>(),
value.values.map<dynamic>((dynamic v) => _deserialize(v, match, growable: growable,)),
value.values.map<dynamic>((dynamic v) => fromJson(
v,
match,
growable: growable,
)),
);
}
}
} on Exception catch (error, trace) {
throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', error, trace,);
throw ApiException.withInner(
HttpStatus.internalServerError,
'Exception during deserialization.',
error,
trace,
);
}
throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',);
throw ApiException(
HttpStatus.internalServerError,
'Could not find a suitable class for deserialization',
);
}
}
@ -319,6 +392,15 @@ class DeserializationMessage {
final bool growable;
}
/// Primarily intended for use in an isolate.
Future<dynamic> decodeAsync(DeserializationMessage message) async {
// Remove all spaces. Necessary for regular expressions as well.
final targetType = message.targetType.replaceAll(' ', '');
// If the expected target type is String, nothing to do...
return targetType == 'String' ? message.json : json.decode(message.json);
}
/// Primarily intended for use in an isolate.
Future<dynamic> deserializeAsync(DeserializationMessage message) async {
// Remove all spaces. Necessary for regular expressions as well.
@ -326,13 +408,14 @@ Future<dynamic> deserializeAsync(DeserializationMessage message) async {
// If the expected target type is String, nothing to do...
return targetType == 'String'
? message.json
: ApiClient._deserialize(
jsonDecode(message.json),
targetType,
growable: message.growable,
);
? message.json
: ApiClient.fromJson(
json.decode(message.json),
targetType,
growable: message.growable,
);
}
/// Primarily intended for use in an isolate.
Future<String> serializeAsync(Object? value) async => value == null ? '' : json.encode(value);
Future<String> serializeAsync(Object? value) async =>
value == null ? '' : json.encode(value);

View File

@ -1,7 +1,7 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
@ -13,7 +13,8 @@ part of openapi.api;
class ApiException implements Exception {
ApiException(this.code, this.message);
ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace);
ApiException.withInner(
this.code, this.message, this.innerException, this.stackTrace);
int code = 0;
String? message;

Some files were not shown because too many files have changed in this diff Show More